aclocal.m4 revision a966c04f
1a966c04fSmrg# generated automatically by aclocal 1.10 -*- Autoconf -*- 2a966c04fSmrg 3a966c04fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4a966c04fSmrg# 2005, 2006 Free Software Foundation, Inc. 5a966c04fSmrg# This file is free software; the Free Software Foundation 6a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 7a966c04fSmrg# with or without modifications, as long as this notice is preserved. 8a966c04fSmrg 9a966c04fSmrg# This program is distributed in the hope that it will be useful, 10a966c04fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11a966c04fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12a966c04fSmrg# PARTICULAR PURPOSE. 13a966c04fSmrg 14a966c04fSmrgm4_if(m4_PACKAGE_VERSION, [2.61],, 15a966c04fSmrg[m4_fatal([this file was generated for autoconf 2.61. 16a966c04fSmrgYou have another version of autoconf. If you want to use that, 17a966c04fSmrgyou should regenerate the build system entirely.], [63])]) 18a966c04fSmrg 19a966c04fSmrg# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. 20a966c04fSmrg# 21a966c04fSmrg# This file is free software; the Free Software Foundation 22a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 23a966c04fSmrg# with or without modifications, as long as this notice is preserved. 24a966c04fSmrg 25a966c04fSmrg# AM_AUTOMAKE_VERSION(VERSION) 26a966c04fSmrg# ---------------------------- 27a966c04fSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 28a966c04fSmrg# generated from the m4 files accompanying Automake X.Y. 29a966c04fSmrg# (This private macro should not be called outside this file.) 30a966c04fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 31a966c04fSmrg[am__api_version='1.10' 32a966c04fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 33a966c04fSmrgdnl require some minimum version. Point them to the right macro. 34a966c04fSmrgm4_if([$1], [1.10], [], 35a966c04fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 36a966c04fSmrg]) 37a966c04fSmrg 38a966c04fSmrg# _AM_AUTOCONF_VERSION(VERSION) 39a966c04fSmrg# ----------------------------- 40a966c04fSmrg# aclocal traces this macro to find the Autoconf version. 41a966c04fSmrg# This is a private macro too. Using m4_define simplifies 42a966c04fSmrg# the logic in aclocal, which can simply ignore this definition. 43a966c04fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 44a966c04fSmrg 45a966c04fSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 46a966c04fSmrg# ------------------------------- 47a966c04fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 48a966c04fSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 49a966c04fSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 50a966c04fSmrg[AM_AUTOMAKE_VERSION([1.10])dnl 51a966c04fSmrg_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) 52a966c04fSmrg 53a966c04fSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 54a966c04fSmrg 55a966c04fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 56a966c04fSmrg# 57a966c04fSmrg# This file is free software; the Free Software Foundation 58a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 59a966c04fSmrg# with or without modifications, as long as this notice is preserved. 60a966c04fSmrg 61a966c04fSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 62a966c04fSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 63a966c04fSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 64a966c04fSmrg# 65a966c04fSmrg# Of course, Automake must honor this variable whenever it calls a 66a966c04fSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 67a966c04fSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 68a966c04fSmrg# depending on how configure is run. This is pretty annoying, since 69a966c04fSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 70a966c04fSmrg# source directory, any form will work fine, but in subdirectories a 71a966c04fSmrg# relative path needs to be adjusted first. 72a966c04fSmrg# 73a966c04fSmrg# $ac_aux_dir/missing 74a966c04fSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 75a966c04fSmrg# $top_srcdir/$ac_aux_dir/missing 76a966c04fSmrg# fails if $ac_aux_dir is absolute, 77a966c04fSmrg# fails when called from a subdirectory in a VPATH build with 78a966c04fSmrg# a relative $ac_aux_dir 79a966c04fSmrg# 80a966c04fSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 81a966c04fSmrg# are both prefixed by $srcdir. In an in-source build this is usually 82a966c04fSmrg# harmless because $srcdir is `.', but things will broke when you 83a966c04fSmrg# start a VPATH build or use an absolute $srcdir. 84a966c04fSmrg# 85a966c04fSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 86a966c04fSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 87a966c04fSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 88a966c04fSmrg# and then we would define $MISSING as 89a966c04fSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 90a966c04fSmrg# This will work as long as MISSING is not called from configure, because 91a966c04fSmrg# unfortunately $(top_srcdir) has no meaning in configure. 92a966c04fSmrg# However there are other variables, like CC, which are often used in 93a966c04fSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 94a966c04fSmrg# 95a966c04fSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 96a966c04fSmrg# absolute PATH. The drawback is that using absolute paths prevent a 97a966c04fSmrg# configured tree to be moved without reconfiguration. 98a966c04fSmrg 99a966c04fSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 100a966c04fSmrg[dnl Rely on autoconf to set up CDPATH properly. 101a966c04fSmrgAC_PREREQ([2.50])dnl 102a966c04fSmrg# expand $ac_aux_dir to an absolute path 103a966c04fSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 104a966c04fSmrg]) 105a966c04fSmrg 106a966c04fSmrg# AM_CONDITIONAL -*- Autoconf -*- 107a966c04fSmrg 108a966c04fSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 109a966c04fSmrg# Free Software Foundation, Inc. 110a966c04fSmrg# 111a966c04fSmrg# This file is free software; the Free Software Foundation 112a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 113a966c04fSmrg# with or without modifications, as long as this notice is preserved. 114a966c04fSmrg 115a966c04fSmrg# serial 8 116a966c04fSmrg 117a966c04fSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 118a966c04fSmrg# ------------------------------------- 119a966c04fSmrg# Define a conditional. 120a966c04fSmrgAC_DEFUN([AM_CONDITIONAL], 121a966c04fSmrg[AC_PREREQ(2.52)dnl 122a966c04fSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 123a966c04fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 124a966c04fSmrgAC_SUBST([$1_TRUE])dnl 125a966c04fSmrgAC_SUBST([$1_FALSE])dnl 126a966c04fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 127a966c04fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 128a966c04fSmrgif $2; then 129a966c04fSmrg $1_TRUE= 130a966c04fSmrg $1_FALSE='#' 131a966c04fSmrgelse 132a966c04fSmrg $1_TRUE='#' 133a966c04fSmrg $1_FALSE= 134a966c04fSmrgfi 135a966c04fSmrgAC_CONFIG_COMMANDS_PRE( 136a966c04fSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 137a966c04fSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 138a966c04fSmrgUsually this means the macro was only invoked conditionally.]]) 139a966c04fSmrgfi])]) 140a966c04fSmrg 141a966c04fSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 142a966c04fSmrg# Free Software Foundation, Inc. 143a966c04fSmrg# 144a966c04fSmrg# This file is free software; the Free Software Foundation 145a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 146a966c04fSmrg# with or without modifications, as long as this notice is preserved. 147a966c04fSmrg 148a966c04fSmrg# serial 9 149a966c04fSmrg 150a966c04fSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 151a966c04fSmrg# written in clear, in which case automake, when reading aclocal.m4, 152a966c04fSmrg# will think it sees a *use*, and therefore will trigger all it's 153a966c04fSmrg# C support machinery. Also note that it means that autoscan, seeing 154a966c04fSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 155a966c04fSmrg 156a966c04fSmrg 157a966c04fSmrg# _AM_DEPENDENCIES(NAME) 158a966c04fSmrg# ---------------------- 159a966c04fSmrg# See how the compiler implements dependency checking. 160a966c04fSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 161a966c04fSmrg# We try a few techniques and use that to set a single cache variable. 162a966c04fSmrg# 163a966c04fSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 164a966c04fSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 165a966c04fSmrg# dependency, and given that the user is not expected to run this macro, 166a966c04fSmrg# just rely on AC_PROG_CC. 167a966c04fSmrgAC_DEFUN([_AM_DEPENDENCIES], 168a966c04fSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 169a966c04fSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 170a966c04fSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 171a966c04fSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 172a966c04fSmrg 173a966c04fSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 174a966c04fSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 175a966c04fSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 176a966c04fSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 177a966c04fSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 178a966c04fSmrg [depcc="$$1" am_compiler_list=]) 179a966c04fSmrg 180a966c04fSmrgAC_CACHE_CHECK([dependency style of $depcc], 181a966c04fSmrg [am_cv_$1_dependencies_compiler_type], 182a966c04fSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 183a966c04fSmrg # We make a subdir and do the tests there. Otherwise we can end up 184a966c04fSmrg # making bogus files that we don't know about and never remove. For 185a966c04fSmrg # instance it was reported that on HP-UX the gcc test will end up 186a966c04fSmrg # making a dummy file named `D' -- because `-MD' means `put the output 187a966c04fSmrg # in D'. 188a966c04fSmrg mkdir conftest.dir 189a966c04fSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 190a966c04fSmrg # using a relative directory. 191a966c04fSmrg cp "$am_depcomp" conftest.dir 192a966c04fSmrg cd conftest.dir 193a966c04fSmrg # We will build objects and dependencies in a subdirectory because 194a966c04fSmrg # it helps to detect inapplicable dependency modes. For instance 195a966c04fSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 196a966c04fSmrg # side effect of compilation, but ICC will put the dependencies in 197a966c04fSmrg # the current directory while Tru64 will put them in the object 198a966c04fSmrg # directory. 199a966c04fSmrg mkdir sub 200a966c04fSmrg 201a966c04fSmrg am_cv_$1_dependencies_compiler_type=none 202a966c04fSmrg if test "$am_compiler_list" = ""; then 203a966c04fSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 204a966c04fSmrg fi 205a966c04fSmrg for depmode in $am_compiler_list; do 206a966c04fSmrg # Setup a source with many dependencies, because some compilers 207a966c04fSmrg # like to wrap large dependency lists on column 80 (with \), and 208a966c04fSmrg # we should not choose a depcomp mode which is confused by this. 209a966c04fSmrg # 210a966c04fSmrg # We need to recreate these files for each test, as the compiler may 211a966c04fSmrg # overwrite some of them when testing with obscure command lines. 212a966c04fSmrg # This happens at least with the AIX C compiler. 213a966c04fSmrg : > sub/conftest.c 214a966c04fSmrg for i in 1 2 3 4 5 6; do 215a966c04fSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 216a966c04fSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 217a966c04fSmrg # Solaris 8's {/usr,}/bin/sh. 218a966c04fSmrg touch sub/conftst$i.h 219a966c04fSmrg done 220a966c04fSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 221a966c04fSmrg 222a966c04fSmrg case $depmode in 223a966c04fSmrg nosideeffect) 224a966c04fSmrg # after this tag, mechanisms are not by side-effect, so they'll 225a966c04fSmrg # only be used when explicitly requested 226a966c04fSmrg if test "x$enable_dependency_tracking" = xyes; then 227a966c04fSmrg continue 228a966c04fSmrg else 229a966c04fSmrg break 230a966c04fSmrg fi 231a966c04fSmrg ;; 232a966c04fSmrg none) break ;; 233a966c04fSmrg esac 234a966c04fSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 235a966c04fSmrg # mode. It turns out that the SunPro C++ compiler does not properly 236a966c04fSmrg # handle `-M -o', and we need to detect this. 237a966c04fSmrg if depmode=$depmode \ 238a966c04fSmrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 239a966c04fSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 240a966c04fSmrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 241a966c04fSmrg >/dev/null 2>conftest.err && 242a966c04fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 243a966c04fSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 244a966c04fSmrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 245a966c04fSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 246a966c04fSmrg # icc doesn't choke on unknown options, it will just issue warnings 247a966c04fSmrg # or remarks (even with -Werror). So we grep stderr for any message 248a966c04fSmrg # that says an option was ignored or not supported. 249a966c04fSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 250a966c04fSmrg # icc: Command line warning: ignoring option '-M'; no argument required 251a966c04fSmrg # The diagnosis changed in icc 8.0: 252a966c04fSmrg # icc: Command line remark: option '-MP' not supported 253a966c04fSmrg if (grep 'ignoring option' conftest.err || 254a966c04fSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 255a966c04fSmrg am_cv_$1_dependencies_compiler_type=$depmode 256a966c04fSmrg break 257a966c04fSmrg fi 258a966c04fSmrg fi 259a966c04fSmrg done 260a966c04fSmrg 261a966c04fSmrg cd .. 262a966c04fSmrg rm -rf conftest.dir 263a966c04fSmrgelse 264a966c04fSmrg am_cv_$1_dependencies_compiler_type=none 265a966c04fSmrgfi 266a966c04fSmrg]) 267a966c04fSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 268a966c04fSmrgAM_CONDITIONAL([am__fastdep$1], [ 269a966c04fSmrg test "x$enable_dependency_tracking" != xno \ 270a966c04fSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 271a966c04fSmrg]) 272a966c04fSmrg 273a966c04fSmrg 274a966c04fSmrg# AM_SET_DEPDIR 275a966c04fSmrg# ------------- 276a966c04fSmrg# Choose a directory name for dependency files. 277a966c04fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 278a966c04fSmrgAC_DEFUN([AM_SET_DEPDIR], 279a966c04fSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 280a966c04fSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 281a966c04fSmrg]) 282a966c04fSmrg 283a966c04fSmrg 284a966c04fSmrg# AM_DEP_TRACK 285a966c04fSmrg# ------------ 286a966c04fSmrgAC_DEFUN([AM_DEP_TRACK], 287a966c04fSmrg[AC_ARG_ENABLE(dependency-tracking, 288a966c04fSmrg[ --disable-dependency-tracking speeds up one-time build 289a966c04fSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 290a966c04fSmrgif test "x$enable_dependency_tracking" != xno; then 291a966c04fSmrg am_depcomp="$ac_aux_dir/depcomp" 292a966c04fSmrg AMDEPBACKSLASH='\' 293a966c04fSmrgfi 294a966c04fSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 295a966c04fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 296a966c04fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 297a966c04fSmrg]) 298a966c04fSmrg 299a966c04fSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 300a966c04fSmrg 301a966c04fSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 302a966c04fSmrg# Free Software Foundation, Inc. 303a966c04fSmrg# 304a966c04fSmrg# This file is free software; the Free Software Foundation 305a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 306a966c04fSmrg# with or without modifications, as long as this notice is preserved. 307a966c04fSmrg 308a966c04fSmrg#serial 3 309a966c04fSmrg 310a966c04fSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 311a966c04fSmrg# ------------------------------ 312a966c04fSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 313a966c04fSmrg[for mf in $CONFIG_FILES; do 314a966c04fSmrg # Strip MF so we end up with the name of the file. 315a966c04fSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 316a966c04fSmrg # Check whether this is an Automake generated Makefile or not. 317a966c04fSmrg # We used to match only the files named `Makefile.in', but 318a966c04fSmrg # some people rename them; so instead we look at the file content. 319a966c04fSmrg # Grep'ing the first line is not enough: some people post-process 320a966c04fSmrg # each Makefile.in and add a new line on top of each file to say so. 321a966c04fSmrg # Grep'ing the whole file is not good either: AIX grep has a line 322a966c04fSmrg # limit of 2048, but all sed's we know have understand at least 4000. 323a966c04fSmrg if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then 324a966c04fSmrg dirpart=`AS_DIRNAME("$mf")` 325a966c04fSmrg else 326a966c04fSmrg continue 327a966c04fSmrg fi 328a966c04fSmrg # Extract the definition of DEPDIR, am__include, and am__quote 329a966c04fSmrg # from the Makefile without running `make'. 330a966c04fSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 331a966c04fSmrg test -z "$DEPDIR" && continue 332a966c04fSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 333a966c04fSmrg test -z "am__include" && continue 334a966c04fSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 335a966c04fSmrg # When using ansi2knr, U may be empty or an underscore; expand it 336a966c04fSmrg U=`sed -n 's/^U = //p' < "$mf"` 337a966c04fSmrg # Find all dependency output files, they are included files with 338a966c04fSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 339a966c04fSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 340a966c04fSmrg # expansion. 341a966c04fSmrg for file in `sed -n " 342a966c04fSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 343a966c04fSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 344a966c04fSmrg # Make sure the directory exists. 345a966c04fSmrg test -f "$dirpart/$file" && continue 346a966c04fSmrg fdir=`AS_DIRNAME(["$file"])` 347a966c04fSmrg AS_MKDIR_P([$dirpart/$fdir]) 348a966c04fSmrg # echo "creating $dirpart/$file" 349a966c04fSmrg echo '# dummy' > "$dirpart/$file" 350a966c04fSmrg done 351a966c04fSmrgdone 352a966c04fSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 353a966c04fSmrg 354a966c04fSmrg 355a966c04fSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 356a966c04fSmrg# ----------------------------- 357a966c04fSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 358a966c04fSmrg# 359a966c04fSmrg# This code is only required when automatic dependency tracking 360a966c04fSmrg# is enabled. FIXME. This creates each `.P' file that we will 361a966c04fSmrg# need in order to bootstrap the dependency handling code. 362a966c04fSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 363a966c04fSmrg[AC_CONFIG_COMMANDS([depfiles], 364a966c04fSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 365a966c04fSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 366a966c04fSmrg]) 367a966c04fSmrg 368a966c04fSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 369a966c04fSmrg# Free Software Foundation, Inc. 370a966c04fSmrg# 371a966c04fSmrg# This file is free software; the Free Software Foundation 372a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 373a966c04fSmrg# with or without modifications, as long as this notice is preserved. 374a966c04fSmrg 375a966c04fSmrg# serial 8 376a966c04fSmrg 377a966c04fSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 378a966c04fSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 379a966c04fSmrg 380a966c04fSmrg# Do all the work for Automake. -*- Autoconf -*- 381a966c04fSmrg 382a966c04fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 383a966c04fSmrg# 2005, 2006 Free Software Foundation, Inc. 384a966c04fSmrg# 385a966c04fSmrg# This file is free software; the Free Software Foundation 386a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 387a966c04fSmrg# with or without modifications, as long as this notice is preserved. 388a966c04fSmrg 389a966c04fSmrg# serial 12 390a966c04fSmrg 391a966c04fSmrg# This macro actually does too much. Some checks are only needed if 392a966c04fSmrg# your package does certain things. But this isn't really a big deal. 393a966c04fSmrg 394a966c04fSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 395a966c04fSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 396a966c04fSmrg# ----------------------------------------------- 397a966c04fSmrg# The call with PACKAGE and VERSION arguments is the old style 398a966c04fSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 399a966c04fSmrg# and VERSION should now be passed to AC_INIT and removed from 400a966c04fSmrg# the call to AM_INIT_AUTOMAKE. 401a966c04fSmrg# We support both call styles for the transition. After 402a966c04fSmrg# the next Automake release, Autoconf can make the AC_INIT 403a966c04fSmrg# arguments mandatory, and then we can depend on a new Autoconf 404a966c04fSmrg# release and drop the old call support. 405a966c04fSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 406a966c04fSmrg[AC_PREREQ([2.60])dnl 407a966c04fSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 408a966c04fSmrgdnl the ones we care about. 409a966c04fSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 410a966c04fSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 411a966c04fSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 412a966c04fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 413a966c04fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 414a966c04fSmrg # is not polluted with repeated "-I." 415a966c04fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 416a966c04fSmrg # test to see if srcdir already configured 417a966c04fSmrg if test -f $srcdir/config.status; then 418a966c04fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 419a966c04fSmrg fi 420a966c04fSmrgfi 421a966c04fSmrg 422a966c04fSmrg# test whether we have cygpath 423a966c04fSmrgif test -z "$CYGPATH_W"; then 424a966c04fSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 425a966c04fSmrg CYGPATH_W='cygpath -w' 426a966c04fSmrg else 427a966c04fSmrg CYGPATH_W=echo 428a966c04fSmrg fi 429a966c04fSmrgfi 430a966c04fSmrgAC_SUBST([CYGPATH_W]) 431a966c04fSmrg 432a966c04fSmrg# Define the identity of the package. 433a966c04fSmrgdnl Distinguish between old-style and new-style calls. 434a966c04fSmrgm4_ifval([$2], 435a966c04fSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 436a966c04fSmrg AC_SUBST([PACKAGE], [$1])dnl 437a966c04fSmrg AC_SUBST([VERSION], [$2])], 438a966c04fSmrg[_AM_SET_OPTIONS([$1])dnl 439a966c04fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 440a966c04fSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 441a966c04fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 442a966c04fSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 443a966c04fSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 444a966c04fSmrg 445a966c04fSmrg_AM_IF_OPTION([no-define],, 446a966c04fSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 447a966c04fSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 448a966c04fSmrg 449a966c04fSmrg# Some tools Automake needs. 450a966c04fSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 451a966c04fSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 452a966c04fSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 453a966c04fSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 454a966c04fSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 455a966c04fSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 456a966c04fSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 457a966c04fSmrgAM_PROG_INSTALL_SH 458a966c04fSmrgAM_PROG_INSTALL_STRIP 459a966c04fSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 460a966c04fSmrg# We need awk for the "check" target. The system "awk" is bad on 461a966c04fSmrg# some platforms. 462a966c04fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 463a966c04fSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 464a966c04fSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 465a966c04fSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 466a966c04fSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 467a966c04fSmrg [_AM_PROG_TAR([v7])])]) 468a966c04fSmrg_AM_IF_OPTION([no-dependencies],, 469a966c04fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 470a966c04fSmrg [_AM_DEPENDENCIES(CC)], 471a966c04fSmrg [define([AC_PROG_CC], 472a966c04fSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 473a966c04fSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 474a966c04fSmrg [_AM_DEPENDENCIES(CXX)], 475a966c04fSmrg [define([AC_PROG_CXX], 476a966c04fSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 477a966c04fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 478a966c04fSmrg [_AM_DEPENDENCIES(OBJC)], 479a966c04fSmrg [define([AC_PROG_OBJC], 480a966c04fSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 481a966c04fSmrg]) 482a966c04fSmrg]) 483a966c04fSmrg 484a966c04fSmrg 485a966c04fSmrg# When config.status generates a header, we must update the stamp-h file. 486a966c04fSmrg# This file resides in the same directory as the config header 487a966c04fSmrg# that is generated. The stamp files are numbered to have different names. 488a966c04fSmrg 489a966c04fSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 490a966c04fSmrg# loop where config.status creates the headers, so we can generate 491a966c04fSmrg# our stamp files there. 492a966c04fSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 493a966c04fSmrg[# Compute $1's index in $config_headers. 494a966c04fSmrg_am_stamp_count=1 495a966c04fSmrgfor _am_header in $config_headers :; do 496a966c04fSmrg case $_am_header in 497a966c04fSmrg $1 | $1:* ) 498a966c04fSmrg break ;; 499a966c04fSmrg * ) 500a966c04fSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 501a966c04fSmrg esac 502a966c04fSmrgdone 503a966c04fSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 504a966c04fSmrg 505a966c04fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 506a966c04fSmrg# 507a966c04fSmrg# This file is free software; the Free Software Foundation 508a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 509a966c04fSmrg# with or without modifications, as long as this notice is preserved. 510a966c04fSmrg 511a966c04fSmrg# AM_PROG_INSTALL_SH 512a966c04fSmrg# ------------------ 513a966c04fSmrg# Define $install_sh. 514a966c04fSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 515a966c04fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 516a966c04fSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 517a966c04fSmrgAC_SUBST(install_sh)]) 518a966c04fSmrg 519a966c04fSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 520a966c04fSmrg# 521a966c04fSmrg# This file is free software; the Free Software Foundation 522a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 523a966c04fSmrg# with or without modifications, as long as this notice is preserved. 524a966c04fSmrg 525a966c04fSmrg# serial 2 526a966c04fSmrg 527a966c04fSmrg# Check whether the underlying file-system supports filenames 528a966c04fSmrg# with a leading dot. For instance MS-DOS doesn't. 529a966c04fSmrgAC_DEFUN([AM_SET_LEADING_DOT], 530a966c04fSmrg[rm -rf .tst 2>/dev/null 531a966c04fSmrgmkdir .tst 2>/dev/null 532a966c04fSmrgif test -d .tst; then 533a966c04fSmrg am__leading_dot=. 534a966c04fSmrgelse 535a966c04fSmrg am__leading_dot=_ 536a966c04fSmrgfi 537a966c04fSmrgrmdir .tst 2>/dev/null 538a966c04fSmrgAC_SUBST([am__leading_dot])]) 539a966c04fSmrg 540a966c04fSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 541a966c04fSmrg# From Jim Meyering 542a966c04fSmrg 543a966c04fSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 544a966c04fSmrg# Free Software Foundation, Inc. 545a966c04fSmrg# 546a966c04fSmrg# This file is free software; the Free Software Foundation 547a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 548a966c04fSmrg# with or without modifications, as long as this notice is preserved. 549a966c04fSmrg 550a966c04fSmrg# serial 4 551a966c04fSmrg 552a966c04fSmrgAC_DEFUN([AM_MAINTAINER_MODE], 553a966c04fSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 554a966c04fSmrg dnl maintainer-mode is disabled by default 555a966c04fSmrg AC_ARG_ENABLE(maintainer-mode, 556a966c04fSmrg[ --enable-maintainer-mode enable make rules and dependencies not useful 557a966c04fSmrg (and sometimes confusing) to the casual installer], 558a966c04fSmrg USE_MAINTAINER_MODE=$enableval, 559a966c04fSmrg USE_MAINTAINER_MODE=no) 560a966c04fSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 561a966c04fSmrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 562a966c04fSmrg MAINT=$MAINTAINER_MODE_TRUE 563a966c04fSmrg AC_SUBST(MAINT)dnl 564a966c04fSmrg] 565a966c04fSmrg) 566a966c04fSmrg 567a966c04fSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 568a966c04fSmrg 569a966c04fSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 570a966c04fSmrg 571a966c04fSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 572a966c04fSmrg# 573a966c04fSmrg# This file is free software; the Free Software Foundation 574a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 575a966c04fSmrg# with or without modifications, as long as this notice is preserved. 576a966c04fSmrg 577a966c04fSmrg# serial 3 578a966c04fSmrg 579a966c04fSmrg# AM_MAKE_INCLUDE() 580a966c04fSmrg# ----------------- 581a966c04fSmrg# Check to see how make treats includes. 582a966c04fSmrgAC_DEFUN([AM_MAKE_INCLUDE], 583a966c04fSmrg[am_make=${MAKE-make} 584a966c04fSmrgcat > confinc << 'END' 585a966c04fSmrgam__doit: 586a966c04fSmrg @echo done 587a966c04fSmrg.PHONY: am__doit 588a966c04fSmrgEND 589a966c04fSmrg# If we don't find an include directive, just comment out the code. 590a966c04fSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 591a966c04fSmrgam__include="#" 592a966c04fSmrgam__quote= 593a966c04fSmrg_am_result=none 594a966c04fSmrg# First try GNU make style include. 595a966c04fSmrgecho "include confinc" > confmf 596a966c04fSmrg# We grep out `Entering directory' and `Leaving directory' 597a966c04fSmrg# messages which can occur if `w' ends up in MAKEFLAGS. 598a966c04fSmrg# In particular we don't look at `^make:' because GNU make might 599a966c04fSmrg# be invoked under some other name (usually "gmake"), in which 600a966c04fSmrg# case it prints its new name instead of `make'. 601a966c04fSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 602a966c04fSmrg am__include=include 603a966c04fSmrg am__quote= 604a966c04fSmrg _am_result=GNU 605a966c04fSmrgfi 606a966c04fSmrg# Now try BSD make style include. 607a966c04fSmrgif test "$am__include" = "#"; then 608a966c04fSmrg echo '.include "confinc"' > confmf 609a966c04fSmrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 610a966c04fSmrg am__include=.include 611a966c04fSmrg am__quote="\"" 612a966c04fSmrg _am_result=BSD 613a966c04fSmrg fi 614a966c04fSmrgfi 615a966c04fSmrgAC_SUBST([am__include]) 616a966c04fSmrgAC_SUBST([am__quote]) 617a966c04fSmrgAC_MSG_RESULT([$_am_result]) 618a966c04fSmrgrm -f confinc confmf 619a966c04fSmrg]) 620a966c04fSmrg 621a966c04fSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 622a966c04fSmrg 623a966c04fSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 624a966c04fSmrg# Free Software Foundation, Inc. 625a966c04fSmrg# 626a966c04fSmrg# This file is free software; the Free Software Foundation 627a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 628a966c04fSmrg# with or without modifications, as long as this notice is preserved. 629a966c04fSmrg 630a966c04fSmrg# serial 5 631a966c04fSmrg 632a966c04fSmrg# AM_MISSING_PROG(NAME, PROGRAM) 633a966c04fSmrg# ------------------------------ 634a966c04fSmrgAC_DEFUN([AM_MISSING_PROG], 635a966c04fSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 636a966c04fSmrg$1=${$1-"${am_missing_run}$2"} 637a966c04fSmrgAC_SUBST($1)]) 638a966c04fSmrg 639a966c04fSmrg 640a966c04fSmrg# AM_MISSING_HAS_RUN 641a966c04fSmrg# ------------------ 642a966c04fSmrg# Define MISSING if not defined so far and test if it supports --run. 643a966c04fSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 644a966c04fSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 645a966c04fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 646a966c04fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 647a966c04fSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 648a966c04fSmrg# Use eval to expand $SHELL 649a966c04fSmrgif eval "$MISSING --run true"; then 650a966c04fSmrg am_missing_run="$MISSING --run " 651a966c04fSmrgelse 652a966c04fSmrg am_missing_run= 653a966c04fSmrg AC_MSG_WARN([`missing' script is too old or missing]) 654a966c04fSmrgfi 655a966c04fSmrg]) 656a966c04fSmrg 657a966c04fSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 658a966c04fSmrg# 659a966c04fSmrg# This file is free software; the Free Software Foundation 660a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 661a966c04fSmrg# with or without modifications, as long as this notice is preserved. 662a966c04fSmrg 663a966c04fSmrg# AM_PROG_MKDIR_P 664a966c04fSmrg# --------------- 665a966c04fSmrg# Check for `mkdir -p'. 666a966c04fSmrgAC_DEFUN([AM_PROG_MKDIR_P], 667a966c04fSmrg[AC_PREREQ([2.60])dnl 668a966c04fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 669a966c04fSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 670a966c04fSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 671a966c04fSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 672a966c04fSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 673a966c04fSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 674a966c04fSmrgdnl adjustment using top_builddir (which is defined more often than 675a966c04fSmrgdnl MKDIR_P). 676a966c04fSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 677a966c04fSmrgcase $mkdir_p in 678a966c04fSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 679a966c04fSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 680a966c04fSmrgesac 681a966c04fSmrg]) 682a966c04fSmrg 683a966c04fSmrg# Helper functions for option handling. -*- Autoconf -*- 684a966c04fSmrg 685a966c04fSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 686a966c04fSmrg# 687a966c04fSmrg# This file is free software; the Free Software Foundation 688a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 689a966c04fSmrg# with or without modifications, as long as this notice is preserved. 690a966c04fSmrg 691a966c04fSmrg# serial 3 692a966c04fSmrg 693a966c04fSmrg# _AM_MANGLE_OPTION(NAME) 694a966c04fSmrg# ----------------------- 695a966c04fSmrgAC_DEFUN([_AM_MANGLE_OPTION], 696a966c04fSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 697a966c04fSmrg 698a966c04fSmrg# _AM_SET_OPTION(NAME) 699a966c04fSmrg# ------------------------------ 700a966c04fSmrg# Set option NAME. Presently that only means defining a flag for this option. 701a966c04fSmrgAC_DEFUN([_AM_SET_OPTION], 702a966c04fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 703a966c04fSmrg 704a966c04fSmrg# _AM_SET_OPTIONS(OPTIONS) 705a966c04fSmrg# ---------------------------------- 706a966c04fSmrg# OPTIONS is a space-separated list of Automake options. 707a966c04fSmrgAC_DEFUN([_AM_SET_OPTIONS], 708a966c04fSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 709a966c04fSmrg 710a966c04fSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 711a966c04fSmrg# ------------------------------------------- 712a966c04fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 713a966c04fSmrgAC_DEFUN([_AM_IF_OPTION], 714a966c04fSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 715a966c04fSmrg 716a966c04fSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 717a966c04fSmrg 718a966c04fSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 719a966c04fSmrg# Free Software Foundation, Inc. 720a966c04fSmrg# 721a966c04fSmrg# This file is free software; the Free Software Foundation 722a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 723a966c04fSmrg# with or without modifications, as long as this notice is preserved. 724a966c04fSmrg 725a966c04fSmrg# serial 4 726a966c04fSmrg 727a966c04fSmrg# AM_SANITY_CHECK 728a966c04fSmrg# --------------- 729a966c04fSmrgAC_DEFUN([AM_SANITY_CHECK], 730a966c04fSmrg[AC_MSG_CHECKING([whether build environment is sane]) 731a966c04fSmrg# Just in case 732a966c04fSmrgsleep 1 733a966c04fSmrgecho timestamp > conftest.file 734a966c04fSmrg# Do `set' in a subshell so we don't clobber the current shell's 735a966c04fSmrg# arguments. Must try -L first in case configure is actually a 736a966c04fSmrg# symlink; some systems play weird games with the mod time of symlinks 737a966c04fSmrg# (eg FreeBSD returns the mod time of the symlink's containing 738a966c04fSmrg# directory). 739a966c04fSmrgif ( 740a966c04fSmrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 741a966c04fSmrg if test "$[*]" = "X"; then 742a966c04fSmrg # -L didn't work. 743a966c04fSmrg set X `ls -t $srcdir/configure conftest.file` 744a966c04fSmrg fi 745a966c04fSmrg rm -f conftest.file 746a966c04fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 747a966c04fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 748a966c04fSmrg 749a966c04fSmrg # If neither matched, then we have a broken ls. This can happen 750a966c04fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 751a966c04fSmrg # broken ls alias from the environment. This has actually 752a966c04fSmrg # happened. Such a system could not be considered "sane". 753a966c04fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 754a966c04fSmrgalias in your environment]) 755a966c04fSmrg fi 756a966c04fSmrg 757a966c04fSmrg test "$[2]" = conftest.file 758a966c04fSmrg ) 759a966c04fSmrgthen 760a966c04fSmrg # Ok. 761a966c04fSmrg : 762a966c04fSmrgelse 763a966c04fSmrg AC_MSG_ERROR([newly created file is older than distributed files! 764a966c04fSmrgCheck your system clock]) 765a966c04fSmrgfi 766a966c04fSmrgAC_MSG_RESULT(yes)]) 767a966c04fSmrg 768a966c04fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 769a966c04fSmrg# 770a966c04fSmrg# This file is free software; the Free Software Foundation 771a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 772a966c04fSmrg# with or without modifications, as long as this notice is preserved. 773a966c04fSmrg 774a966c04fSmrg# AM_PROG_INSTALL_STRIP 775a966c04fSmrg# --------------------- 776a966c04fSmrg# One issue with vendor `install' (even GNU) is that you can't 777a966c04fSmrg# specify the program used to strip binaries. This is especially 778a966c04fSmrg# annoying in cross-compiling environments, where the build's strip 779a966c04fSmrg# is unlikely to handle the host's binaries. 780a966c04fSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 781a966c04fSmrg# always use install-sh in `make install-strip', and initialize 782a966c04fSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 783a966c04fSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 784a966c04fSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 785a966c04fSmrg# Installed binaries are usually stripped using `strip' when the user 786a966c04fSmrg# run `make install-strip'. However `strip' might not be the right 787a966c04fSmrg# tool to use in cross-compilation environments, therefore Automake 788a966c04fSmrg# will honor the `STRIP' environment variable to overrule this program. 789a966c04fSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 790a966c04fSmrgif test "$cross_compiling" != no; then 791a966c04fSmrg AC_CHECK_TOOL([STRIP], [strip], :) 792a966c04fSmrgfi 793a966c04fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 794a966c04fSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 795a966c04fSmrg 796a966c04fSmrg# Copyright (C) 2006 Free Software Foundation, Inc. 797a966c04fSmrg# 798a966c04fSmrg# This file is free software; the Free Software Foundation 799a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 800a966c04fSmrg# with or without modifications, as long as this notice is preserved. 801a966c04fSmrg 802a966c04fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 803a966c04fSmrg# --------------------------- 804a966c04fSmrg# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. 805a966c04fSmrg# This macro is traced by Automake. 806a966c04fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 807a966c04fSmrg 808a966c04fSmrg# Check how to create a tarball. -*- Autoconf -*- 809a966c04fSmrg 810a966c04fSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 811a966c04fSmrg# 812a966c04fSmrg# This file is free software; the Free Software Foundation 813a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 814a966c04fSmrg# with or without modifications, as long as this notice is preserved. 815a966c04fSmrg 816a966c04fSmrg# serial 2 817a966c04fSmrg 818a966c04fSmrg# _AM_PROG_TAR(FORMAT) 819a966c04fSmrg# -------------------- 820a966c04fSmrg# Check how to create a tarball in format FORMAT. 821a966c04fSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 822a966c04fSmrg# 823a966c04fSmrg# Substitute a variable $(am__tar) that is a command 824a966c04fSmrg# writing to stdout a FORMAT-tarball containing the directory 825a966c04fSmrg# $tardir. 826a966c04fSmrg# tardir=directory && $(am__tar) > result.tar 827a966c04fSmrg# 828a966c04fSmrg# Substitute a variable $(am__untar) that extract such 829a966c04fSmrg# a tarball read from stdin. 830a966c04fSmrg# $(am__untar) < result.tar 831a966c04fSmrgAC_DEFUN([_AM_PROG_TAR], 832a966c04fSmrg[# Always define AMTAR for backward compatibility. 833a966c04fSmrgAM_MISSING_PROG([AMTAR], [tar]) 834a966c04fSmrgm4_if([$1], [v7], 835a966c04fSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 836a966c04fSmrg [m4_case([$1], [ustar],, [pax],, 837a966c04fSmrg [m4_fatal([Unknown tar format])]) 838a966c04fSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 839a966c04fSmrg# Loop over all known methods to create a tar archive until one works. 840a966c04fSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 841a966c04fSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 842a966c04fSmrg# Do not fold the above two line into one, because Tru64 sh and 843a966c04fSmrg# Solaris sh will not grok spaces in the rhs of `-'. 844a966c04fSmrgfor _am_tool in $_am_tools 845a966c04fSmrgdo 846a966c04fSmrg case $_am_tool in 847a966c04fSmrg gnutar) 848a966c04fSmrg for _am_tar in tar gnutar gtar; 849a966c04fSmrg do 850a966c04fSmrg AM_RUN_LOG([$_am_tar --version]) && break 851a966c04fSmrg done 852a966c04fSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 853a966c04fSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 854a966c04fSmrg am__untar="$_am_tar -xf -" 855a966c04fSmrg ;; 856a966c04fSmrg plaintar) 857a966c04fSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 858a966c04fSmrg # ustar tarball either. 859a966c04fSmrg (tar --version) >/dev/null 2>&1 && continue 860a966c04fSmrg am__tar='tar chf - "$$tardir"' 861a966c04fSmrg am__tar_='tar chf - "$tardir"' 862a966c04fSmrg am__untar='tar xf -' 863a966c04fSmrg ;; 864a966c04fSmrg pax) 865a966c04fSmrg am__tar='pax -L -x $1 -w "$$tardir"' 866a966c04fSmrg am__tar_='pax -L -x $1 -w "$tardir"' 867a966c04fSmrg am__untar='pax -r' 868a966c04fSmrg ;; 869a966c04fSmrg cpio) 870a966c04fSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 871a966c04fSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 872a966c04fSmrg am__untar='cpio -i -H $1 -d' 873a966c04fSmrg ;; 874a966c04fSmrg none) 875a966c04fSmrg am__tar=false 876a966c04fSmrg am__tar_=false 877a966c04fSmrg am__untar=false 878a966c04fSmrg ;; 879a966c04fSmrg esac 880a966c04fSmrg 881a966c04fSmrg # If the value was cached, stop now. We just wanted to have am__tar 882a966c04fSmrg # and am__untar set. 883a966c04fSmrg test -n "${am_cv_prog_tar_$1}" && break 884a966c04fSmrg 885a966c04fSmrg # tar/untar a dummy directory, and stop if the command works 886a966c04fSmrg rm -rf conftest.dir 887a966c04fSmrg mkdir conftest.dir 888a966c04fSmrg echo GrepMe > conftest.dir/file 889a966c04fSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 890a966c04fSmrg rm -rf conftest.dir 891a966c04fSmrg if test -s conftest.tar; then 892a966c04fSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 893a966c04fSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 894a966c04fSmrg fi 895a966c04fSmrgdone 896a966c04fSmrgrm -rf conftest.dir 897a966c04fSmrg 898a966c04fSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 899a966c04fSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 900a966c04fSmrgAC_SUBST([am__tar]) 901a966c04fSmrgAC_SUBST([am__untar]) 902a966c04fSmrg]) # _AM_PROG_TAR 903a966c04fSmrg 904a966c04fSmrgdnl 905a966c04fSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 906a966c04fSmrgdnl 907a966c04fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 908a966c04fSmrgdnl copy of this software and associated documentation files (the 909a966c04fSmrgdnl "Software"), to deal in the Software without restriction, including 910a966c04fSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 911a966c04fSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 912a966c04fSmrgdnl to whom the Software is furnished to do so, provided that the above 913a966c04fSmrgdnl copyright notice(s) and this permission notice appear in all copies of 914a966c04fSmrgdnl the Software and that both the above copyright notice(s) and this 915a966c04fSmrgdnl permission notice appear in supporting documentation. 916a966c04fSmrgdnl 917a966c04fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 918a966c04fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 919a966c04fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 920a966c04fSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 921a966c04fSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 922a966c04fSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 923a966c04fSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 924a966c04fSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 925a966c04fSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 926a966c04fSmrgdnl 927a966c04fSmrgdnl Except as contained in this notice, the name of a copyright holder 928a966c04fSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 929a966c04fSmrgdnl or other dealings in this Software without prior written authorization 930a966c04fSmrgdnl of the copyright holder. 931a966c04fSmrg 932a966c04fSmrg# XORG_MACROS_VERSION(required-version) 933a966c04fSmrg# ------------------------------------- 934a966c04fSmrg# Minimum version: 1.1.0 935a966c04fSmrg# 936a966c04fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 937a966c04fSmrg# your configure.ac with the minimum required version, such as: 938a966c04fSmrg# XORG_MACROS_VERSION(1.1) 939a966c04fSmrg# 940a966c04fSmrg# To force at least a version with this macro defined, also add: 941a966c04fSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 942a966c04fSmrg# 943a966c04fSmrg# 944a966c04fSmrg# See the "minimum version" comment for each macro you use to see what 945a966c04fSmrg# version you require. 946a966c04fSmrgAC_DEFUN([XORG_MACROS_VERSION],[ 947a966c04fSmrg [XORG_MACROS_needed_version=$1 948a966c04fSmrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 949a966c04fSmrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 950a966c04fSmrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 951a966c04fSmrg [XORG_MACROS_version=1.1.5 952a966c04fSmrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 953a966c04fSmrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 954a966c04fSmrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 955a966c04fSmrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 956a966c04fSmrg fi 957a966c04fSmrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 958a966c04fSmrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 959a966c04fSmrg fi 960a966c04fSmrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 961a966c04fSmrg]) # XORG_MACROS_VERSION 962a966c04fSmrg 963a966c04fSmrg# XORG_PROG_RAWCPP() 964a966c04fSmrg# ------------------ 965a966c04fSmrg# Minimum version: 1.0.0 966a966c04fSmrg# 967a966c04fSmrg# Find cpp program and necessary flags for use in pre-processing text files 968a966c04fSmrg# such as man pages and config files 969a966c04fSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 970a966c04fSmrgAC_REQUIRE([AC_PROG_CPP]) 971a966c04fSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 972a966c04fSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 973a966c04fSmrg 974a966c04fSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 975a966c04fSmrg# which is not the best choice for supporting other OS'es, but covers most 976a966c04fSmrg# of the ones we need for now. 977a966c04fSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 978a966c04fSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 979a966c04fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 980a966c04fSmrg AC_MSG_RESULT([no]) 981a966c04fSmrgelse 982a966c04fSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 983a966c04fSmrg RAWCPPFLAGS=-undef 984a966c04fSmrg AC_MSG_RESULT([yes]) 985a966c04fSmrg else 986a966c04fSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 987a966c04fSmrg fi 988a966c04fSmrgfi 989a966c04fSmrgrm -f conftest.$ac_ext 990a966c04fSmrg 991a966c04fSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 992a966c04fSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 993a966c04fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 994a966c04fSmrg AC_MSG_RESULT([no]) 995a966c04fSmrgelse 996a966c04fSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 997a966c04fSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 998a966c04fSmrg AC_MSG_RESULT([yes]) 999a966c04fSmrg else 1000a966c04fSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1001a966c04fSmrg fi 1002a966c04fSmrgfi 1003a966c04fSmrgrm -f conftest.$ac_ext 1004a966c04fSmrgAC_SUBST(RAWCPPFLAGS) 1005a966c04fSmrg]) # XORG_PROG_RAWCPP 1006a966c04fSmrg 1007a966c04fSmrg# XORG_MANPAGE_SECTIONS() 1008a966c04fSmrg# ----------------------- 1009a966c04fSmrg# Minimum version: 1.0.0 1010a966c04fSmrg# 1011a966c04fSmrg# Determine which sections man pages go in for the different man page types 1012a966c04fSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1013a966c04fSmrg# Not sure if there's any better way than just hardcoding by OS name. 1014a966c04fSmrg# Override default settings by setting environment variables 1015a966c04fSmrg 1016a966c04fSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1017a966c04fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1018a966c04fSmrg 1019a966c04fSmrgif test x$APP_MAN_SUFFIX = x ; then 1020a966c04fSmrg APP_MAN_SUFFIX=1 1021a966c04fSmrgfi 1022a966c04fSmrgif test x$APP_MAN_DIR = x ; then 1023a966c04fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1024a966c04fSmrgfi 1025a966c04fSmrg 1026a966c04fSmrgif test x$LIB_MAN_SUFFIX = x ; then 1027a966c04fSmrg LIB_MAN_SUFFIX=3 1028a966c04fSmrgfi 1029a966c04fSmrgif test x$LIB_MAN_DIR = x ; then 1030a966c04fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1031a966c04fSmrgfi 1032a966c04fSmrg 1033a966c04fSmrgif test x$FILE_MAN_SUFFIX = x ; then 1034a966c04fSmrg case $host_os in 1035a966c04fSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 1036a966c04fSmrg *) FILE_MAN_SUFFIX=5 ;; 1037a966c04fSmrg esac 1038a966c04fSmrgfi 1039a966c04fSmrgif test x$FILE_MAN_DIR = x ; then 1040a966c04fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1041a966c04fSmrgfi 1042a966c04fSmrg 1043a966c04fSmrgif test x$MISC_MAN_SUFFIX = x ; then 1044a966c04fSmrg case $host_os in 1045a966c04fSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 1046a966c04fSmrg *) MISC_MAN_SUFFIX=7 ;; 1047a966c04fSmrg esac 1048a966c04fSmrgfi 1049a966c04fSmrgif test x$MISC_MAN_DIR = x ; then 1050a966c04fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1051a966c04fSmrgfi 1052a966c04fSmrg 1053a966c04fSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1054a966c04fSmrg case $host_os in 1055a966c04fSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1056a966c04fSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1057a966c04fSmrg esac 1058a966c04fSmrgfi 1059a966c04fSmrgif test x$DRIVER_MAN_DIR = x ; then 1060a966c04fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1061a966c04fSmrgfi 1062a966c04fSmrg 1063a966c04fSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1064a966c04fSmrg case $host_os in 1065a966c04fSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1066a966c04fSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1067a966c04fSmrg esac 1068a966c04fSmrgfi 1069a966c04fSmrgif test x$ADMIN_MAN_DIR = x ; then 1070a966c04fSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1071a966c04fSmrgfi 1072a966c04fSmrg 1073a966c04fSmrg 1074a966c04fSmrgAC_SUBST([APP_MAN_SUFFIX]) 1075a966c04fSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1076a966c04fSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1077a966c04fSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1078a966c04fSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1079a966c04fSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1080a966c04fSmrgAC_SUBST([APP_MAN_DIR]) 1081a966c04fSmrgAC_SUBST([LIB_MAN_DIR]) 1082a966c04fSmrgAC_SUBST([FILE_MAN_DIR]) 1083a966c04fSmrgAC_SUBST([MISC_MAN_DIR]) 1084a966c04fSmrgAC_SUBST([DRIVER_MAN_DIR]) 1085a966c04fSmrgAC_SUBST([ADMIN_MAN_DIR]) 1086a966c04fSmrg]) # XORG_MANPAGE_SECTIONS 1087a966c04fSmrg 1088a966c04fSmrg# XORG_CHECK_LINUXDOC 1089a966c04fSmrg# ------------------- 1090a966c04fSmrg# Minimum version: 1.0.0 1091a966c04fSmrg# 1092a966c04fSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1093a966c04fSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1094a966c04fSmrg# Whether or not the necessary tools and files are found can be checked 1095a966c04fSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1096a966c04fSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1097a966c04fSmrgXORG_SGML_PATH=$prefix/share/sgml 1098a966c04fSmrgHAVE_DEFS_ENT= 1099a966c04fSmrg 1100a966c04fSmrgif test x"$cross_compiling" = x"yes" ; then 1101a966c04fSmrg HAVE_DEFS_ENT=no 1102a966c04fSmrgelse 1103a966c04fSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1104a966c04fSmrgfi 1105a966c04fSmrg 1106a966c04fSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1107a966c04fSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1108a966c04fSmrg 1109a966c04fSmrgAC_MSG_CHECKING([Whether to build documentation]) 1110a966c04fSmrg 1111a966c04fSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 1112a966c04fSmrg BUILDDOC=yes 1113a966c04fSmrgelse 1114a966c04fSmrg BUILDDOC=no 1115a966c04fSmrgfi 1116a966c04fSmrg 1117a966c04fSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1118a966c04fSmrg 1119a966c04fSmrgAC_MSG_RESULT([$BUILDDOC]) 1120a966c04fSmrg 1121a966c04fSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 1122a966c04fSmrg 1123a966c04fSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 1124a966c04fSmrg BUILDPDFDOC=yes 1125a966c04fSmrgelse 1126a966c04fSmrg BUILDPDFDOC=no 1127a966c04fSmrgfi 1128a966c04fSmrg 1129a966c04fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1130a966c04fSmrg 1131a966c04fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1132a966c04fSmrg 1133a966c04fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 1134a966c04fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1135a966c04fSmrgMAKE_PDF="$PS2PDF" 1136a966c04fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1137a966c04fSmrg 1138a966c04fSmrgAC_SUBST(MAKE_TEXT) 1139a966c04fSmrgAC_SUBST(MAKE_PS) 1140a966c04fSmrgAC_SUBST(MAKE_PDF) 1141a966c04fSmrgAC_SUBST(MAKE_HTML) 1142a966c04fSmrg]) # XORG_CHECK_LINUXDOC 1143a966c04fSmrg 1144a966c04fSmrg# XORG_CHECK_DOCBOOK 1145a966c04fSmrg# ------------------- 1146a966c04fSmrg# Minimum version: 1.0.0 1147a966c04fSmrg# 1148a966c04fSmrg# Checks for the ability to build output formats from SGML DocBook source. 1149a966c04fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1150a966c04fSmrg# indicates whether the necessary tools and files are found and, if set, 1151a966c04fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1152a966c04fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1153a966c04fSmrgXORG_SGML_PATH=$prefix/share/sgml 1154a966c04fSmrgHAVE_DEFS_ENT= 1155a966c04fSmrgBUILDTXTDOC=no 1156a966c04fSmrgBUILDPDFDOC=no 1157a966c04fSmrgBUILDPSDOC=no 1158a966c04fSmrgBUILDHTMLDOC=no 1159a966c04fSmrg 1160a966c04fSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1161a966c04fSmrg 1162a966c04fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1163a966c04fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1164a966c04fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1165a966c04fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1166a966c04fSmrg 1167a966c04fSmrgAC_MSG_CHECKING([Whether to build text documentation]) 1168a966c04fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 1169a966c04fSmrg test x$BUILD_TXTDOC != xno; then 1170a966c04fSmrg BUILDTXTDOC=yes 1171a966c04fSmrgfi 1172a966c04fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1173a966c04fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1174a966c04fSmrg 1175a966c04fSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 1176a966c04fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 1177a966c04fSmrg test x$BUILD_PDFDOC != xno; then 1178a966c04fSmrg BUILDPDFDOC=yes 1179a966c04fSmrgfi 1180a966c04fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1181a966c04fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1182a966c04fSmrg 1183a966c04fSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 1184a966c04fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 1185a966c04fSmrg test x$BUILD_PSDOC != xno; then 1186a966c04fSmrg BUILDPSDOC=yes 1187a966c04fSmrgfi 1188a966c04fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1189a966c04fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1190a966c04fSmrg 1191a966c04fSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 1192a966c04fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 1193a966c04fSmrg test x$BUILD_HTMLDOC != xno; then 1194a966c04fSmrg BUILDHTMLDOC=yes 1195a966c04fSmrgfi 1196a966c04fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1197a966c04fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1198a966c04fSmrg 1199a966c04fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1200a966c04fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1201a966c04fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1202a966c04fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1203a966c04fSmrg 1204a966c04fSmrgAC_SUBST(MAKE_TEXT) 1205a966c04fSmrgAC_SUBST(MAKE_PS) 1206a966c04fSmrgAC_SUBST(MAKE_PDF) 1207a966c04fSmrgAC_SUBST(MAKE_HTML) 1208a966c04fSmrg]) # XORG_CHECK_DOCBOOK 1209a966c04fSmrg 1210a966c04fSmrg# XORG_CHECK_MALLOC_ZERO 1211a966c04fSmrg# ---------------------- 1212a966c04fSmrg# Minimum version: 1.0.0 1213a966c04fSmrg# 1214a966c04fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1215a966c04fSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1216a966c04fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1217a966c04fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1218a966c04fSmrgAC_ARG_ENABLE(malloc0returnsnull, 1219a966c04fSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 1220a966c04fSmrg [malloc(0) returns NULL (default: auto)]), 1221a966c04fSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1222a966c04fSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1223a966c04fSmrg 1224a966c04fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1225a966c04fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1226a966c04fSmrg AC_RUN_IFELSE([ 1227a966c04fSmrgchar *malloc(); 1228a966c04fSmrgchar *realloc(); 1229a966c04fSmrgchar *calloc(); 1230a966c04fSmrgmain() { 1231a966c04fSmrg char *m0, *r0, *c0, *p; 1232a966c04fSmrg m0 = malloc(0); 1233a966c04fSmrg p = malloc(10); 1234a966c04fSmrg r0 = realloc(p,0); 1235a966c04fSmrg c0 = calloc(0); 1236a966c04fSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1237a966c04fSmrg}], 1238a966c04fSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 1239a966c04fSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 1240a966c04fSmrgfi 1241a966c04fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1242a966c04fSmrg 1243a966c04fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1244a966c04fSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1245a966c04fSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1246a966c04fSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1247a966c04fSmrgelse 1248a966c04fSmrg MALLOC_ZERO_CFLAGS="" 1249a966c04fSmrg XMALLOC_ZERO_CFLAGS="" 1250a966c04fSmrg XTMALLOC_ZERO_CFLAGS="" 1251a966c04fSmrgfi 1252a966c04fSmrg 1253a966c04fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1254a966c04fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1255a966c04fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1256a966c04fSmrg]) # XORG_CHECK_MALLOC_ZERO 1257a966c04fSmrg 1258a966c04fSmrg# XORG_WITH_LINT() 1259a966c04fSmrg# ---------------- 1260a966c04fSmrg# Minimum version: 1.1.0 1261a966c04fSmrg# 1262a966c04fSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 1263a966c04fSmrg# is specified. (Use --with-lint=sparse for sparse.) 1264a966c04fSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 1265a966c04fSmrg# Sets $LINT_FLAGS to flags to pass to source checker 1266a966c04fSmrg# Sets LINT automake conditional if enabled (default: disabled) 1267a966c04fSmrg# 1268a966c04fSmrgAC_DEFUN([XORG_WITH_LINT],[ 1269a966c04fSmrg 1270a966c04fSmrg# Allow checking code with lint, sparse, etc. 1271a966c04fSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 1272a966c04fSmrg [Use a lint-style source code checker (default: disabled)])], 1273a966c04fSmrg [use_lint=$withval], [use_lint=no]) 1274a966c04fSmrgif test "x$use_lint" = "xyes" ; then 1275a966c04fSmrg LINT="lint" 1276a966c04fSmrgelse 1277a966c04fSmrg LINT="$use_lint" 1278a966c04fSmrgfi 1279a966c04fSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 1280a966c04fSmrg case $LINT in 1281a966c04fSmrg lint|*/lint) 1282a966c04fSmrg case $host_os in 1283a966c04fSmrg solaris*) 1284a966c04fSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1285a966c04fSmrg ;; 1286a966c04fSmrg esac 1287a966c04fSmrg ;; 1288a966c04fSmrg esac 1289a966c04fSmrgfi 1290a966c04fSmrg 1291a966c04fSmrgAC_SUBST(LINT) 1292a966c04fSmrgAC_SUBST(LINT_FLAGS) 1293a966c04fSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 1294a966c04fSmrg 1295a966c04fSmrg]) # XORG_WITH_LINT 1296a966c04fSmrg 1297a966c04fSmrg# XORG_LINT_LIBRARY(LIBNAME) 1298a966c04fSmrg# -------------------------- 1299a966c04fSmrg# Minimum version: 1.1.0 1300a966c04fSmrg# 1301a966c04fSmrg# Sets up flags for building lint libraries for checking programs that call 1302a966c04fSmrg# functions in the library. 1303a966c04fSmrg# Disabled by default, enable with --enable-lint-library 1304a966c04fSmrg# Sets: 1305a966c04fSmrg# @LINTLIB@ - name of lint library file to make 1306a966c04fSmrg# MAKE_LINT_LIB - automake conditional 1307a966c04fSmrg# 1308a966c04fSmrg 1309a966c04fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1310a966c04fSmrgAC_REQUIRE([XORG_WITH_LINT]) 1311a966c04fSmrg# Build lint "library" for more indepth checks of programs calling this library 1312a966c04fSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 1313a966c04fSmrg [Create lint library (default: disabled)])], 1314a966c04fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1315a966c04fSmrgif test "x$make_lint_lib" != "xno" ; then 1316a966c04fSmrg if test "x$LINT" = "xno" ; then 1317a966c04fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1318a966c04fSmrg fi 1319a966c04fSmrg if test "x$make_lint_lib" = "xyes" ; then 1320a966c04fSmrg LINTLIB=llib-l$1.ln 1321a966c04fSmrg else 1322a966c04fSmrg LINTLIB=$make_lint_lib 1323a966c04fSmrg fi 1324a966c04fSmrgfi 1325a966c04fSmrgAC_SUBST(LINTLIB) 1326a966c04fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1327a966c04fSmrg 1328a966c04fSmrg]) # XORG_LINT_LIBRARY 1329a966c04fSmrg 1330a966c04fSmrgdnl Copyright 2005 Red Hat, Inc 1331a966c04fSmrgdnl 1332a966c04fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1333a966c04fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 1334a966c04fSmrgdnl the above copyright notice appear in all copies and that both that 1335a966c04fSmrgdnl copyright notice and this permission notice appear in supporting 1336a966c04fSmrgdnl documentation. 1337a966c04fSmrgdnl 1338a966c04fSmrgdnl The above copyright notice and this permission notice shall be included 1339a966c04fSmrgdnl in all copies or substantial portions of the Software. 1340a966c04fSmrgdnl 1341a966c04fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1342a966c04fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1343a966c04fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1344a966c04fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1345a966c04fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1346a966c04fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1347a966c04fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 1348a966c04fSmrgdnl 1349a966c04fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 1350a966c04fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 1351a966c04fSmrgdnl other dealings in this Software without prior written authorization 1352a966c04fSmrgdnl from the copyright holders. 1353a966c04fSmrgdnl 1354a966c04fSmrg 1355a966c04fSmrg# XORG_RELEASE_VERSION 1356a966c04fSmrg# -------------------- 1357a966c04fSmrg# Adds --with/without-release-string and changes the PACKAGE and 1358a966c04fSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 1359a966c04fSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 1360a966c04fSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1361a966c04fSmrg 1362a966c04fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1363a966c04fSmrg AC_ARG_WITH(release-version, 1364a966c04fSmrg AC_HELP_STRING([--with-release-version=STRING], 1365a966c04fSmrg [Use release version string in package name]), 1366a966c04fSmrg [RELEASE_VERSION="$withval"], 1367a966c04fSmrg [RELEASE_VERSION=""]) 1368a966c04fSmrg if test "x$RELEASE_VERSION" != "x"; then 1369a966c04fSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 1370a966c04fSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1371a966c04fSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1372a966c04fSmrg fi 1373a966c04fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1374a966c04fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1375a966c04fSmrg [Major version of this package]) 1376a966c04fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` 1377a966c04fSmrg if test "x$PVM" = "x"; then 1378a966c04fSmrg PVM="0" 1379a966c04fSmrg fi 1380a966c04fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1381a966c04fSmrg [$PVM], 1382a966c04fSmrg [Minor version of this package]) 1383a966c04fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` 1384a966c04fSmrg if test "x$PVP" = "x"; then 1385a966c04fSmrg PVP="0" 1386a966c04fSmrg fi 1387a966c04fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1388a966c04fSmrg [$PVP], 1389a966c04fSmrg [Patch version of this package]) 1390a966c04fSmrg]) 1391a966c04fSmrg 1392a966c04fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1393a966c04fSmrg 1394a966c04fSmrg# serial 48 AC_PROG_LIBTOOL 1395a966c04fSmrg 1396a966c04fSmrg 1397a966c04fSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 1398a966c04fSmrg# ----------------------------------------------------------- 1399a966c04fSmrg# If this macro is not defined by Autoconf, define it here. 1400a966c04fSmrgm4_ifdef([AC_PROVIDE_IFELSE], 1401a966c04fSmrg [], 1402a966c04fSmrg [m4_define([AC_PROVIDE_IFELSE], 1403a966c04fSmrg [m4_ifdef([AC_PROVIDE_$1], 1404a966c04fSmrg [$2], [$3])])]) 1405a966c04fSmrg 1406a966c04fSmrg 1407a966c04fSmrg# AC_PROG_LIBTOOL 1408a966c04fSmrg# --------------- 1409a966c04fSmrgAC_DEFUN([AC_PROG_LIBTOOL], 1410a966c04fSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 1411a966c04fSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 1412a966c04fSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 1413a966c04fSmrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 1414a966c04fSmrg [AC_LIBTOOL_CXX], 1415a966c04fSmrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 1416a966c04fSmrg ])]) 1417a966c04fSmrgdnl And a similar setup for Fortran 77 support 1418a966c04fSmrg AC_PROVIDE_IFELSE([AC_PROG_F77], 1419a966c04fSmrg [AC_LIBTOOL_F77], 1420a966c04fSmrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 1421a966c04fSmrg])]) 1422a966c04fSmrg 1423a966c04fSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 1424a966c04fSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 1425a966c04fSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 1426a966c04fSmrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 1427a966c04fSmrg [AC_LIBTOOL_GCJ], 1428a966c04fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 1429a966c04fSmrg [AC_LIBTOOL_GCJ], 1430a966c04fSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 1431a966c04fSmrg [AC_LIBTOOL_GCJ], 1432a966c04fSmrg [ifdef([AC_PROG_GCJ], 1433a966c04fSmrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 1434a966c04fSmrg ifdef([A][M_PROG_GCJ], 1435a966c04fSmrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 1436a966c04fSmrg ifdef([LT_AC_PROG_GCJ], 1437a966c04fSmrg [define([LT_AC_PROG_GCJ], 1438a966c04fSmrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 1439a966c04fSmrg])])# AC_PROG_LIBTOOL 1440a966c04fSmrg 1441a966c04fSmrg 1442a966c04fSmrg# _AC_PROG_LIBTOOL 1443a966c04fSmrg# ---------------- 1444a966c04fSmrgAC_DEFUN([_AC_PROG_LIBTOOL], 1445a966c04fSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 1446a966c04fSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 1447a966c04fSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 1448a966c04fSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 1449a966c04fSmrg 1450a966c04fSmrg# This can be used to rebuild libtool when needed 1451a966c04fSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 1452a966c04fSmrg 1453a966c04fSmrg# Always use our own libtool. 1454a966c04fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1455a966c04fSmrgAC_SUBST(LIBTOOL)dnl 1456a966c04fSmrg 1457a966c04fSmrg# Prevent multiple expansion 1458a966c04fSmrgdefine([AC_PROG_LIBTOOL], []) 1459a966c04fSmrg])# _AC_PROG_LIBTOOL 1460a966c04fSmrg 1461a966c04fSmrg 1462a966c04fSmrg# AC_LIBTOOL_SETUP 1463a966c04fSmrg# ---------------- 1464a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SETUP], 1465a966c04fSmrg[AC_PREREQ(2.50)dnl 1466a966c04fSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 1467a966c04fSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 1468a966c04fSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 1469a966c04fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 1470a966c04fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1471a966c04fSmrgAC_REQUIRE([AC_PROG_CC])dnl 1472a966c04fSmrgAC_REQUIRE([AC_PROG_LD])dnl 1473a966c04fSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 1474a966c04fSmrgAC_REQUIRE([AC_PROG_NM])dnl 1475a966c04fSmrg 1476a966c04fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1477a966c04fSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 1478a966c04fSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 1479a966c04fSmrgAC_REQUIRE([AC_OBJEXT])dnl 1480a966c04fSmrgAC_REQUIRE([AC_EXEEXT])dnl 1481a966c04fSmrgdnl 1482a966c04fSmrg 1483a966c04fSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 1484a966c04fSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1485a966c04fSmrgAC_LIBTOOL_OBJDIR 1486a966c04fSmrg 1487a966c04fSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1488a966c04fSmrg_LT_AC_PROG_ECHO_BACKSLASH 1489a966c04fSmrg 1490a966c04fSmrgcase $host_os in 1491a966c04fSmrgaix3*) 1492a966c04fSmrg # AIX sometimes has problems with the GCC collect2 program. For some 1493a966c04fSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 1494a966c04fSmrg # vanish in a puff of smoke. 1495a966c04fSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 1496a966c04fSmrg COLLECT_NAMES= 1497a966c04fSmrg export COLLECT_NAMES 1498a966c04fSmrg fi 1499a966c04fSmrg ;; 1500a966c04fSmrgesac 1501a966c04fSmrg 1502a966c04fSmrg# Sed substitution that helps us do robust quoting. It backslashifies 1503a966c04fSmrg# metacharacters that are still active within double-quoted strings. 1504a966c04fSmrgXsed='sed -e 1s/^X//' 1505a966c04fSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 1506a966c04fSmrg 1507a966c04fSmrg# Same as above, but do not quote variable references. 1508a966c04fSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 1509a966c04fSmrg 1510a966c04fSmrg# Sed substitution to delay expansion of an escaped shell variable in a 1511a966c04fSmrg# double_quote_subst'ed string. 1512a966c04fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1513a966c04fSmrg 1514a966c04fSmrg# Sed substitution to avoid accidental globbing in evaled expressions 1515a966c04fSmrgno_glob_subst='s/\*/\\\*/g' 1516a966c04fSmrg 1517a966c04fSmrg# Constants: 1518a966c04fSmrgrm="rm -f" 1519a966c04fSmrg 1520a966c04fSmrg# Global variables: 1521a966c04fSmrgdefault_ofile=libtool 1522a966c04fSmrgcan_build_shared=yes 1523a966c04fSmrg 1524a966c04fSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 1525a966c04fSmrg# which needs '.lib'). 1526a966c04fSmrglibext=a 1527a966c04fSmrgltmain="$ac_aux_dir/ltmain.sh" 1528a966c04fSmrgofile="$default_ofile" 1529a966c04fSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1530a966c04fSmrg 1531a966c04fSmrgAC_CHECK_TOOL(AR, ar, false) 1532a966c04fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1533a966c04fSmrgAC_CHECK_TOOL(STRIP, strip, :) 1534a966c04fSmrg 1535a966c04fSmrgold_CC="$CC" 1536a966c04fSmrgold_CFLAGS="$CFLAGS" 1537a966c04fSmrg 1538a966c04fSmrg# Set sane defaults for various variables 1539a966c04fSmrgtest -z "$AR" && AR=ar 1540a966c04fSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1541a966c04fSmrgtest -z "$AS" && AS=as 1542a966c04fSmrgtest -z "$CC" && CC=cc 1543a966c04fSmrgtest -z "$LTCC" && LTCC=$CC 1544a966c04fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1545a966c04fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1546a966c04fSmrgtest -z "$LD" && LD=ld 1547a966c04fSmrgtest -z "$LN_S" && LN_S="ln -s" 1548a966c04fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 1549a966c04fSmrgtest -z "$NM" && NM=nm 1550a966c04fSmrgtest -z "$SED" && SED=sed 1551a966c04fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1552a966c04fSmrgtest -z "$RANLIB" && RANLIB=: 1553a966c04fSmrgtest -z "$STRIP" && STRIP=: 1554a966c04fSmrgtest -z "$ac_objext" && ac_objext=o 1555a966c04fSmrg 1556a966c04fSmrg# Determine commands to create old-style static archives. 1557a966c04fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 1558a966c04fSmrgold_postinstall_cmds='chmod 644 $oldlib' 1559a966c04fSmrgold_postuninstall_cmds= 1560a966c04fSmrg 1561a966c04fSmrgif test -n "$RANLIB"; then 1562a966c04fSmrg case $host_os in 1563a966c04fSmrg openbsd*) 1564a966c04fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1565a966c04fSmrg ;; 1566a966c04fSmrg *) 1567a966c04fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1568a966c04fSmrg ;; 1569a966c04fSmrg esac 1570a966c04fSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1571a966c04fSmrgfi 1572a966c04fSmrg 1573a966c04fSmrg_LT_CC_BASENAME([$compiler]) 1574a966c04fSmrg 1575a966c04fSmrg# Only perform the check for file, if the check method requires it 1576a966c04fSmrgcase $deplibs_check_method in 1577a966c04fSmrgfile_magic*) 1578a966c04fSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1579a966c04fSmrg AC_PATH_MAGIC 1580a966c04fSmrg fi 1581a966c04fSmrg ;; 1582a966c04fSmrgesac 1583a966c04fSmrg 1584a966c04fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 1585a966c04fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 1586a966c04fSmrgenable_win32_dll=yes, enable_win32_dll=no) 1587a966c04fSmrg 1588a966c04fSmrgAC_ARG_ENABLE([libtool-lock], 1589a966c04fSmrg [AC_HELP_STRING([--disable-libtool-lock], 1590a966c04fSmrg [avoid locking (might break parallel builds)])]) 1591a966c04fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1592a966c04fSmrg 1593a966c04fSmrgAC_ARG_WITH([pic], 1594a966c04fSmrg [AC_HELP_STRING([--with-pic], 1595a966c04fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 1596a966c04fSmrg [pic_mode="$withval"], 1597a966c04fSmrg [pic_mode=default]) 1598a966c04fSmrgtest -z "$pic_mode" && pic_mode=default 1599a966c04fSmrg 1600a966c04fSmrg# Use C for the default configuration in the libtool script 1601a966c04fSmrgtagname= 1602a966c04fSmrgAC_LIBTOOL_LANG_C_CONFIG 1603a966c04fSmrg_LT_AC_TAGCONFIG 1604a966c04fSmrg])# AC_LIBTOOL_SETUP 1605a966c04fSmrg 1606a966c04fSmrg 1607a966c04fSmrg# _LT_AC_SYS_COMPILER 1608a966c04fSmrg# ------------------- 1609a966c04fSmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 1610a966c04fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 1611a966c04fSmrg 1612a966c04fSmrg# If no C compiler was specified, use CC. 1613a966c04fSmrgLTCC=${LTCC-"$CC"} 1614a966c04fSmrg 1615a966c04fSmrg# If no C compiler flags were specified, use CFLAGS. 1616a966c04fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1617a966c04fSmrg 1618a966c04fSmrg# Allow CC to be a program name with arguments. 1619a966c04fSmrgcompiler=$CC 1620a966c04fSmrg])# _LT_AC_SYS_COMPILER 1621a966c04fSmrg 1622a966c04fSmrg 1623a966c04fSmrg# _LT_CC_BASENAME(CC) 1624a966c04fSmrg# ------------------- 1625a966c04fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1626a966c04fSmrgAC_DEFUN([_LT_CC_BASENAME], 1627a966c04fSmrg[for cc_temp in $1""; do 1628a966c04fSmrg case $cc_temp in 1629a966c04fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1630a966c04fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1631a966c04fSmrg \-*) ;; 1632a966c04fSmrg *) break;; 1633a966c04fSmrg esac 1634a966c04fSmrgdone 1635a966c04fSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 1636a966c04fSmrg]) 1637a966c04fSmrg 1638a966c04fSmrg 1639a966c04fSmrg# _LT_COMPILER_BOILERPLATE 1640a966c04fSmrg# ------------------------ 1641a966c04fSmrg# Check for compiler boilerplate output or warnings with 1642a966c04fSmrg# the simple compiler test code. 1643a966c04fSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 1644a966c04fSmrg[ac_outfile=conftest.$ac_objext 1645a966c04fSmrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext 1646a966c04fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1647a966c04fSmrg_lt_compiler_boilerplate=`cat conftest.err` 1648a966c04fSmrg$rm conftest* 1649a966c04fSmrg])# _LT_COMPILER_BOILERPLATE 1650a966c04fSmrg 1651a966c04fSmrg 1652a966c04fSmrg# _LT_LINKER_BOILERPLATE 1653a966c04fSmrg# ---------------------- 1654a966c04fSmrg# Check for linker boilerplate output or warnings with 1655a966c04fSmrg# the simple link test code. 1656a966c04fSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 1657a966c04fSmrg[ac_outfile=conftest.$ac_objext 1658a966c04fSmrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext 1659a966c04fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 1660a966c04fSmrg_lt_linker_boilerplate=`cat conftest.err` 1661a966c04fSmrg$rm conftest* 1662a966c04fSmrg])# _LT_LINKER_BOILERPLATE 1663a966c04fSmrg 1664a966c04fSmrg 1665a966c04fSmrg# _LT_AC_SYS_LIBPATH_AIX 1666a966c04fSmrg# ---------------------- 1667a966c04fSmrg# Links a minimal program and checks the executable 1668a966c04fSmrg# for the system default hardcoded library path. In most cases, 1669a966c04fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1670a966c04fSmrg# the location of the communication and MPI libs are included too. 1671a966c04fSmrg# If we don't find anything, use the default library path according 1672a966c04fSmrg# to the aix ld manual. 1673a966c04fSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 1674a966c04fSmrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 1675a966c04fSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 1676a966c04fSmrg}'` 1677a966c04fSmrg# Check for a 64-bit object if we didn't find anything. 1678a966c04fSmrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 1679a966c04fSmrg}'`; fi],[]) 1680a966c04fSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1681a966c04fSmrg])# _LT_AC_SYS_LIBPATH_AIX 1682a966c04fSmrg 1683a966c04fSmrg 1684a966c04fSmrg# _LT_AC_SHELL_INIT(ARG) 1685a966c04fSmrg# ---------------------- 1686a966c04fSmrgAC_DEFUN([_LT_AC_SHELL_INIT], 1687a966c04fSmrg[ifdef([AC_DIVERSION_NOTICE], 1688a966c04fSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1689a966c04fSmrg [AC_DIVERT_PUSH(NOTICE)]) 1690a966c04fSmrg$1 1691a966c04fSmrgAC_DIVERT_POP 1692a966c04fSmrg])# _LT_AC_SHELL_INIT 1693a966c04fSmrg 1694a966c04fSmrg 1695a966c04fSmrg# _LT_AC_PROG_ECHO_BACKSLASH 1696a966c04fSmrg# -------------------------- 1697a966c04fSmrg# Add some code to the start of the generated configure script which 1698a966c04fSmrg# will find an echo command which doesn't interpret backslashes. 1699a966c04fSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 1700a966c04fSmrg[_LT_AC_SHELL_INIT([ 1701a966c04fSmrg# Check that we are running under the correct shell. 1702a966c04fSmrgSHELL=${CONFIG_SHELL-/bin/sh} 1703a966c04fSmrg 1704a966c04fSmrgcase X$ECHO in 1705a966c04fSmrgX*--fallback-echo) 1706a966c04fSmrg # Remove one level of quotation (which was required for Make). 1707a966c04fSmrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1708a966c04fSmrg ;; 1709a966c04fSmrgesac 1710a966c04fSmrg 1711a966c04fSmrgecho=${ECHO-echo} 1712a966c04fSmrgif test "X[$]1" = X--no-reexec; then 1713a966c04fSmrg # Discard the --no-reexec flag, and continue. 1714a966c04fSmrg shift 1715a966c04fSmrgelif test "X[$]1" = X--fallback-echo; then 1716a966c04fSmrg # Avoid inline document here, it may be left over 1717a966c04fSmrg : 1718a966c04fSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 1719a966c04fSmrg # Yippee, $echo works! 1720a966c04fSmrg : 1721a966c04fSmrgelse 1722a966c04fSmrg # Restart under the correct shell. 1723a966c04fSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1724a966c04fSmrgfi 1725a966c04fSmrg 1726a966c04fSmrgif test "X[$]1" = X--fallback-echo; then 1727a966c04fSmrg # used as fallback echo 1728a966c04fSmrg shift 1729a966c04fSmrg cat <<EOF 1730a966c04fSmrg[$]* 1731a966c04fSmrgEOF 1732a966c04fSmrg exit 0 1733a966c04fSmrgfi 1734a966c04fSmrg 1735a966c04fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1736a966c04fSmrg# if CDPATH is set. 1737a966c04fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1738a966c04fSmrg 1739a966c04fSmrgif test -z "$ECHO"; then 1740a966c04fSmrgif test "X${echo_test_string+set}" != Xset; then 1741a966c04fSmrg# find a string as large as possible, as long as the shell can cope with it 1742a966c04fSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1743a966c04fSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1744a966c04fSmrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 1745a966c04fSmrg echo_test_string=`eval $cmd` && 1746a966c04fSmrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 1747a966c04fSmrg then 1748a966c04fSmrg break 1749a966c04fSmrg fi 1750a966c04fSmrg done 1751a966c04fSmrgfi 1752a966c04fSmrg 1753a966c04fSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 1754a966c04fSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 1755a966c04fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1756a966c04fSmrg : 1757a966c04fSmrgelse 1758a966c04fSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 1759a966c04fSmrg # backslashes. This makes it impossible to quote backslashes using 1760a966c04fSmrg # echo "$something" | sed 's/\\/\\\\/g' 1761a966c04fSmrg # 1762a966c04fSmrg # So, first we look for a working echo in the user's PATH. 1763a966c04fSmrg 1764a966c04fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1765a966c04fSmrg for dir in $PATH /usr/ucb; do 1766a966c04fSmrg IFS="$lt_save_ifs" 1767a966c04fSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1768a966c04fSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1769a966c04fSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1770a966c04fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1771a966c04fSmrg echo="$dir/echo" 1772a966c04fSmrg break 1773a966c04fSmrg fi 1774a966c04fSmrg done 1775a966c04fSmrg IFS="$lt_save_ifs" 1776a966c04fSmrg 1777a966c04fSmrg if test "X$echo" = Xecho; then 1778a966c04fSmrg # We didn't find a better echo, so look for alternatives. 1779a966c04fSmrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 1780a966c04fSmrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 1781a966c04fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1782a966c04fSmrg # This shell has a builtin print -r that does the trick. 1783a966c04fSmrg echo='print -r' 1784a966c04fSmrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 1785a966c04fSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 1786a966c04fSmrg # If we have ksh, try running configure again with it. 1787a966c04fSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1788a966c04fSmrg export ORIGINAL_CONFIG_SHELL 1789a966c04fSmrg CONFIG_SHELL=/bin/ksh 1790a966c04fSmrg export CONFIG_SHELL 1791a966c04fSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1792a966c04fSmrg else 1793a966c04fSmrg # Try using printf. 1794a966c04fSmrg echo='printf %s\n' 1795a966c04fSmrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 1796a966c04fSmrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 1797a966c04fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1798a966c04fSmrg # Cool, printf works 1799a966c04fSmrg : 1800a966c04fSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1801a966c04fSmrg test "X$echo_testing_string" = 'X\t' && 1802a966c04fSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1803a966c04fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1804a966c04fSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1805a966c04fSmrg export CONFIG_SHELL 1806a966c04fSmrg SHELL="$CONFIG_SHELL" 1807a966c04fSmrg export SHELL 1808a966c04fSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 1809a966c04fSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1810a966c04fSmrg test "X$echo_testing_string" = 'X\t' && 1811a966c04fSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1812a966c04fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1813a966c04fSmrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 1814a966c04fSmrg else 1815a966c04fSmrg # maybe with a smaller string... 1816a966c04fSmrg prev=: 1817a966c04fSmrg 1818a966c04fSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1819a966c04fSmrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 1820a966c04fSmrg then 1821a966c04fSmrg break 1822a966c04fSmrg fi 1823a966c04fSmrg prev="$cmd" 1824a966c04fSmrg done 1825a966c04fSmrg 1826a966c04fSmrg if test "$prev" != 'sed 50q "[$]0"'; then 1827a966c04fSmrg echo_test_string=`eval $prev` 1828a966c04fSmrg export echo_test_string 1829a966c04fSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1830a966c04fSmrg else 1831a966c04fSmrg # Oops. We lost completely, so just stick with echo. 1832a966c04fSmrg echo=echo 1833a966c04fSmrg fi 1834a966c04fSmrg fi 1835a966c04fSmrg fi 1836a966c04fSmrg fi 1837a966c04fSmrgfi 1838a966c04fSmrgfi 1839a966c04fSmrg 1840a966c04fSmrg# Copy echo and quote the copy suitably for passing to libtool from 1841a966c04fSmrg# the Makefile, instead of quoting the original, which is used later. 1842a966c04fSmrgECHO=$echo 1843a966c04fSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1844a966c04fSmrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1845a966c04fSmrgfi 1846a966c04fSmrg 1847a966c04fSmrgAC_SUBST(ECHO) 1848a966c04fSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH 1849a966c04fSmrg 1850a966c04fSmrg 1851a966c04fSmrg# _LT_AC_LOCK 1852a966c04fSmrg# ----------- 1853a966c04fSmrgAC_DEFUN([_LT_AC_LOCK], 1854a966c04fSmrg[AC_ARG_ENABLE([libtool-lock], 1855a966c04fSmrg [AC_HELP_STRING([--disable-libtool-lock], 1856a966c04fSmrg [avoid locking (might break parallel builds)])]) 1857a966c04fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1858a966c04fSmrg 1859a966c04fSmrg# Some flags need to be propagated to the compiler or linker for good 1860a966c04fSmrg# libtool support. 1861a966c04fSmrgcase $host in 1862a966c04fSmrgia64-*-hpux*) 1863a966c04fSmrg # Find out which ABI we are using. 1864a966c04fSmrg echo 'int i;' > conftest.$ac_ext 1865a966c04fSmrg if AC_TRY_EVAL(ac_compile); then 1866a966c04fSmrg case `/usr/bin/file conftest.$ac_objext` in 1867a966c04fSmrg *ELF-32*) 1868a966c04fSmrg HPUX_IA64_MODE="32" 1869a966c04fSmrg ;; 1870a966c04fSmrg *ELF-64*) 1871a966c04fSmrg HPUX_IA64_MODE="64" 1872a966c04fSmrg ;; 1873a966c04fSmrg esac 1874a966c04fSmrg fi 1875a966c04fSmrg rm -rf conftest* 1876a966c04fSmrg ;; 1877a966c04fSmrg*-*-irix6*) 1878a966c04fSmrg # Find out which ABI we are using. 1879a966c04fSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1880a966c04fSmrg if AC_TRY_EVAL(ac_compile); then 1881a966c04fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1882a966c04fSmrg case `/usr/bin/file conftest.$ac_objext` in 1883a966c04fSmrg *32-bit*) 1884a966c04fSmrg LD="${LD-ld} -melf32bsmip" 1885a966c04fSmrg ;; 1886a966c04fSmrg *N32*) 1887a966c04fSmrg LD="${LD-ld} -melf32bmipn32" 1888a966c04fSmrg ;; 1889a966c04fSmrg *64-bit*) 1890a966c04fSmrg LD="${LD-ld} -melf64bmip" 1891a966c04fSmrg ;; 1892a966c04fSmrg esac 1893a966c04fSmrg else 1894a966c04fSmrg case `/usr/bin/file conftest.$ac_objext` in 1895a966c04fSmrg *32-bit*) 1896a966c04fSmrg LD="${LD-ld} -32" 1897a966c04fSmrg ;; 1898a966c04fSmrg *N32*) 1899a966c04fSmrg LD="${LD-ld} -n32" 1900a966c04fSmrg ;; 1901a966c04fSmrg *64-bit*) 1902a966c04fSmrg LD="${LD-ld} -64" 1903a966c04fSmrg ;; 1904a966c04fSmrg esac 1905a966c04fSmrg fi 1906a966c04fSmrg fi 1907a966c04fSmrg rm -rf conftest* 1908a966c04fSmrg ;; 1909a966c04fSmrg 1910a966c04fSmrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 1911a966c04fSmrg # Find out which ABI we are using. 1912a966c04fSmrg echo 'int i;' > conftest.$ac_ext 1913a966c04fSmrg if AC_TRY_EVAL(ac_compile); then 1914a966c04fSmrg case `/usr/bin/file conftest.o` in 1915a966c04fSmrg *32-bit*) 1916a966c04fSmrg case $host in 1917a966c04fSmrg x86_64-*linux*) 1918a966c04fSmrg LD="${LD-ld} -m elf_i386" 1919a966c04fSmrg ;; 1920a966c04fSmrg ppc64-*linux*|powerpc64-*linux*) 1921a966c04fSmrg LD="${LD-ld} -m elf32ppclinux" 1922a966c04fSmrg ;; 1923a966c04fSmrg s390x-*linux*) 1924a966c04fSmrg LD="${LD-ld} -m elf_s390" 1925a966c04fSmrg ;; 1926a966c04fSmrg sparc64-*linux*) 1927a966c04fSmrg LD="${LD-ld} -m elf32_sparc" 1928a966c04fSmrg ;; 1929a966c04fSmrg esac 1930a966c04fSmrg ;; 1931a966c04fSmrg *64-bit*) 1932a966c04fSmrg case $host in 1933a966c04fSmrg x86_64-*linux*) 1934a966c04fSmrg LD="${LD-ld} -m elf_x86_64" 1935a966c04fSmrg ;; 1936a966c04fSmrg ppc*-*linux*|powerpc*-*linux*) 1937a966c04fSmrg LD="${LD-ld} -m elf64ppc" 1938a966c04fSmrg ;; 1939a966c04fSmrg s390*-*linux*) 1940a966c04fSmrg LD="${LD-ld} -m elf64_s390" 1941a966c04fSmrg ;; 1942a966c04fSmrg sparc*-*linux*) 1943a966c04fSmrg LD="${LD-ld} -m elf64_sparc" 1944a966c04fSmrg ;; 1945a966c04fSmrg esac 1946a966c04fSmrg ;; 1947a966c04fSmrg esac 1948a966c04fSmrg fi 1949a966c04fSmrg rm -rf conftest* 1950a966c04fSmrg ;; 1951a966c04fSmrg 1952a966c04fSmrg*-*-sco3.2v5*) 1953a966c04fSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1954a966c04fSmrg SAVE_CFLAGS="$CFLAGS" 1955a966c04fSmrg CFLAGS="$CFLAGS -belf" 1956a966c04fSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1957a966c04fSmrg [AC_LANG_PUSH(C) 1958a966c04fSmrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1959a966c04fSmrg AC_LANG_POP]) 1960a966c04fSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1961a966c04fSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1962a966c04fSmrg CFLAGS="$SAVE_CFLAGS" 1963a966c04fSmrg fi 1964a966c04fSmrg ;; 1965a966c04fSmrgsparc*-*solaris*) 1966a966c04fSmrg # Find out which ABI we are using. 1967a966c04fSmrg echo 'int i;' > conftest.$ac_ext 1968a966c04fSmrg if AC_TRY_EVAL(ac_compile); then 1969a966c04fSmrg case `/usr/bin/file conftest.o` in 1970a966c04fSmrg *64-bit*) 1971a966c04fSmrg case $lt_cv_prog_gnu_ld in 1972a966c04fSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1973a966c04fSmrg *) LD="${LD-ld} -64" ;; 1974a966c04fSmrg esac 1975a966c04fSmrg ;; 1976a966c04fSmrg esac 1977a966c04fSmrg fi 1978a966c04fSmrg rm -rf conftest* 1979a966c04fSmrg ;; 1980a966c04fSmrg 1981a966c04fSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 1982a966c04fSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 1983a966c04fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1984a966c04fSmrg AC_CHECK_TOOL(AS, as, false) 1985a966c04fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 1986a966c04fSmrg ;; 1987a966c04fSmrg ]) 1988a966c04fSmrgesac 1989a966c04fSmrg 1990a966c04fSmrgneed_locks="$enable_libtool_lock" 1991a966c04fSmrg 1992a966c04fSmrg])# _LT_AC_LOCK 1993a966c04fSmrg 1994a966c04fSmrg 1995a966c04fSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1996a966c04fSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1997a966c04fSmrg# ---------------------------------------------------------------- 1998a966c04fSmrg# Check whether the given compiler option works 1999a966c04fSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 2000a966c04fSmrg[AC_REQUIRE([LT_AC_PROG_SED]) 2001a966c04fSmrgAC_CACHE_CHECK([$1], [$2], 2002a966c04fSmrg [$2=no 2003a966c04fSmrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2004a966c04fSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 2005a966c04fSmrg lt_compiler_flag="$3" 2006a966c04fSmrg # Insert the option either (1) after the last *FLAGS variable, or 2007a966c04fSmrg # (2) before a word containing "conftest.", or (3) at the end. 2008a966c04fSmrg # Note that $ac_compile itself does not contain backslashes and begins 2009a966c04fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2010a966c04fSmrg # The option is referenced via a variable to avoid confusing sed. 2011a966c04fSmrg lt_compile=`echo "$ac_compile" | $SED \ 2012a966c04fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2013a966c04fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2014a966c04fSmrg -e 's:$: $lt_compiler_flag:'` 2015a966c04fSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2016a966c04fSmrg (eval "$lt_compile" 2>conftest.err) 2017a966c04fSmrg ac_status=$? 2018a966c04fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2019a966c04fSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2020a966c04fSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 2021a966c04fSmrg # The compiler can only warn and ignore the option if not recognized 2022a966c04fSmrg # So say no if there are warnings other than the usual output. 2023a966c04fSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 2024a966c04fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2025a966c04fSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2026a966c04fSmrg $2=yes 2027a966c04fSmrg fi 2028a966c04fSmrg fi 2029a966c04fSmrg $rm conftest* 2030a966c04fSmrg]) 2031a966c04fSmrg 2032a966c04fSmrgif test x"[$]$2" = xyes; then 2033a966c04fSmrg ifelse([$5], , :, [$5]) 2034a966c04fSmrgelse 2035a966c04fSmrg ifelse([$6], , :, [$6]) 2036a966c04fSmrgfi 2037a966c04fSmrg])# AC_LIBTOOL_COMPILER_OPTION 2038a966c04fSmrg 2039a966c04fSmrg 2040a966c04fSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2041a966c04fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 2042a966c04fSmrg# ------------------------------------------------------------ 2043a966c04fSmrg# Check whether the given compiler option works 2044a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 2045a966c04fSmrg[AC_CACHE_CHECK([$1], [$2], 2046a966c04fSmrg [$2=no 2047a966c04fSmrg save_LDFLAGS="$LDFLAGS" 2048a966c04fSmrg LDFLAGS="$LDFLAGS $3" 2049a966c04fSmrg printf "$lt_simple_link_test_code" > conftest.$ac_ext 2050a966c04fSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2051a966c04fSmrg # The linker can only warn and ignore the option if not recognized 2052a966c04fSmrg # So say no if there are warnings 2053a966c04fSmrg if test -s conftest.err; then 2054a966c04fSmrg # Append any errors to the config.log. 2055a966c04fSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 2056a966c04fSmrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 2057a966c04fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2058a966c04fSmrg if diff conftest.exp conftest.er2 >/dev/null; then 2059a966c04fSmrg $2=yes 2060a966c04fSmrg fi 2061a966c04fSmrg else 2062a966c04fSmrg $2=yes 2063a966c04fSmrg fi 2064a966c04fSmrg fi 2065a966c04fSmrg $rm conftest* 2066a966c04fSmrg LDFLAGS="$save_LDFLAGS" 2067a966c04fSmrg]) 2068a966c04fSmrg 2069a966c04fSmrgif test x"[$]$2" = xyes; then 2070a966c04fSmrg ifelse([$4], , :, [$4]) 2071a966c04fSmrgelse 2072a966c04fSmrg ifelse([$5], , :, [$5]) 2073a966c04fSmrgfi 2074a966c04fSmrg])# AC_LIBTOOL_LINKER_OPTION 2075a966c04fSmrg 2076a966c04fSmrg 2077a966c04fSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 2078a966c04fSmrg# -------------------------- 2079a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 2080a966c04fSmrg[# find the maximum length of command line arguments 2081a966c04fSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 2082a966c04fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2083a966c04fSmrg i=0 2084a966c04fSmrg teststring="ABCD" 2085a966c04fSmrg 2086a966c04fSmrg case $build_os in 2087a966c04fSmrg msdosdjgpp*) 2088a966c04fSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 2089a966c04fSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 2090a966c04fSmrg # during glob expansion). Even if it were fixed, the result of this 2091a966c04fSmrg # check would be larger than it should be. 2092a966c04fSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 2093a966c04fSmrg ;; 2094a966c04fSmrg 2095a966c04fSmrg gnu*) 2096a966c04fSmrg # Under GNU Hurd, this test is not required because there is 2097a966c04fSmrg # no limit to the length of command line arguments. 2098a966c04fSmrg # Libtool will interpret -1 as no limit whatsoever 2099a966c04fSmrg lt_cv_sys_max_cmd_len=-1; 2100a966c04fSmrg ;; 2101a966c04fSmrg 2102a966c04fSmrg cygwin* | mingw*) 2103a966c04fSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 2104a966c04fSmrg # about 5 minutes as the teststring grows exponentially. 2105a966c04fSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 2106a966c04fSmrg # you end up with a "frozen" computer, even though with patience 2107a966c04fSmrg # the test eventually succeeds (with a max line length of 256k). 2108a966c04fSmrg # Instead, let's just punt: use the minimum linelength reported by 2109a966c04fSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 2110a966c04fSmrg lt_cv_sys_max_cmd_len=8192; 2111a966c04fSmrg ;; 2112a966c04fSmrg 2113a966c04fSmrg amigaos*) 2114a966c04fSmrg # On AmigaOS with pdksh, this test takes hours, literally. 2115a966c04fSmrg # So we just punt and use a minimum line length of 8192. 2116a966c04fSmrg lt_cv_sys_max_cmd_len=8192; 2117a966c04fSmrg ;; 2118a966c04fSmrg 2119a966c04fSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2120a966c04fSmrg # This has been around since 386BSD, at least. Likely further. 2121a966c04fSmrg if test -x /sbin/sysctl; then 2122a966c04fSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2123a966c04fSmrg elif test -x /usr/sbin/sysctl; then 2124a966c04fSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2125a966c04fSmrg else 2126a966c04fSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2127a966c04fSmrg fi 2128a966c04fSmrg # And add a safety zone 2129a966c04fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2130a966c04fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2131a966c04fSmrg ;; 2132a966c04fSmrg 2133a966c04fSmrg interix*) 2134a966c04fSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 2135a966c04fSmrg lt_cv_sys_max_cmd_len=196608 2136a966c04fSmrg ;; 2137a966c04fSmrg 2138a966c04fSmrg osf*) 2139a966c04fSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2140a966c04fSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2141a966c04fSmrg # nice to cause kernel panics so lets avoid the loop below. 2142a966c04fSmrg # First set a reasonable default. 2143a966c04fSmrg lt_cv_sys_max_cmd_len=16384 2144a966c04fSmrg # 2145a966c04fSmrg if test -x /sbin/sysconfig; then 2146a966c04fSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2147a966c04fSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 2148a966c04fSmrg esac 2149a966c04fSmrg fi 2150a966c04fSmrg ;; 2151a966c04fSmrg sco3.2v5*) 2152a966c04fSmrg lt_cv_sys_max_cmd_len=102400 2153a966c04fSmrg ;; 2154a966c04fSmrg sysv5* | sco5v6* | sysv4.2uw2*) 2155a966c04fSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2156a966c04fSmrg if test -n "$kargmax"; then 2157a966c04fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2158a966c04fSmrg else 2159a966c04fSmrg lt_cv_sys_max_cmd_len=32768 2160a966c04fSmrg fi 2161a966c04fSmrg ;; 2162a966c04fSmrg *) 2163a966c04fSmrg # If test is not a shell built-in, we'll probably end up computing a 2164a966c04fSmrg # maximum length that is only half of the actual maximum length, but 2165a966c04fSmrg # we can't tell. 2166a966c04fSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2167a966c04fSmrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 2168a966c04fSmrg = "XX$teststring") >/dev/null 2>&1 && 2169a966c04fSmrg new_result=`expr "X$teststring" : ".*" 2>&1` && 2170a966c04fSmrg lt_cv_sys_max_cmd_len=$new_result && 2171a966c04fSmrg test $i != 17 # 1/2 MB should be enough 2172a966c04fSmrg do 2173a966c04fSmrg i=`expr $i + 1` 2174a966c04fSmrg teststring=$teststring$teststring 2175a966c04fSmrg done 2176a966c04fSmrg teststring= 2177a966c04fSmrg # Add a significant safety factor because C++ compilers can tack on massive 2178a966c04fSmrg # amounts of additional arguments before passing them to the linker. 2179a966c04fSmrg # It appears as though 1/2 is a usable value. 2180a966c04fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2181a966c04fSmrg ;; 2182a966c04fSmrg esac 2183a966c04fSmrg]) 2184a966c04fSmrgif test -n $lt_cv_sys_max_cmd_len ; then 2185a966c04fSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2186a966c04fSmrgelse 2187a966c04fSmrg AC_MSG_RESULT(none) 2188a966c04fSmrgfi 2189a966c04fSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 2190a966c04fSmrg 2191a966c04fSmrg 2192a966c04fSmrg# _LT_AC_CHECK_DLFCN 2193a966c04fSmrg# ------------------ 2194a966c04fSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 2195a966c04fSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl 2196a966c04fSmrg])# _LT_AC_CHECK_DLFCN 2197a966c04fSmrg 2198a966c04fSmrg 2199a966c04fSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2200a966c04fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2201a966c04fSmrg# --------------------------------------------------------------------- 2202a966c04fSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 2203a966c04fSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 2204a966c04fSmrgif test "$cross_compiling" = yes; then : 2205a966c04fSmrg [$4] 2206a966c04fSmrgelse 2207a966c04fSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2208a966c04fSmrg lt_status=$lt_dlunknown 2209a966c04fSmrg cat > conftest.$ac_ext <<EOF 2210a966c04fSmrg[#line __oline__ "configure" 2211a966c04fSmrg#include "confdefs.h" 2212a966c04fSmrg 2213a966c04fSmrg#if HAVE_DLFCN_H 2214a966c04fSmrg#include <dlfcn.h> 2215a966c04fSmrg#endif 2216a966c04fSmrg 2217a966c04fSmrg#include <stdio.h> 2218a966c04fSmrg 2219a966c04fSmrg#ifdef RTLD_GLOBAL 2220a966c04fSmrg# define LT_DLGLOBAL RTLD_GLOBAL 2221a966c04fSmrg#else 2222a966c04fSmrg# ifdef DL_GLOBAL 2223a966c04fSmrg# define LT_DLGLOBAL DL_GLOBAL 2224a966c04fSmrg# else 2225a966c04fSmrg# define LT_DLGLOBAL 0 2226a966c04fSmrg# endif 2227a966c04fSmrg#endif 2228a966c04fSmrg 2229a966c04fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2230a966c04fSmrg find out it does not work in some platform. */ 2231a966c04fSmrg#ifndef LT_DLLAZY_OR_NOW 2232a966c04fSmrg# ifdef RTLD_LAZY 2233a966c04fSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 2234a966c04fSmrg# else 2235a966c04fSmrg# ifdef DL_LAZY 2236a966c04fSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 2237a966c04fSmrg# else 2238a966c04fSmrg# ifdef RTLD_NOW 2239a966c04fSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 2240a966c04fSmrg# else 2241a966c04fSmrg# ifdef DL_NOW 2242a966c04fSmrg# define LT_DLLAZY_OR_NOW DL_NOW 2243a966c04fSmrg# else 2244a966c04fSmrg# define LT_DLLAZY_OR_NOW 0 2245a966c04fSmrg# endif 2246a966c04fSmrg# endif 2247a966c04fSmrg# endif 2248a966c04fSmrg# endif 2249a966c04fSmrg#endif 2250a966c04fSmrg 2251a966c04fSmrg#ifdef __cplusplus 2252a966c04fSmrgextern "C" void exit (int); 2253a966c04fSmrg#endif 2254a966c04fSmrg 2255a966c04fSmrgvoid fnord() { int i=42;} 2256a966c04fSmrgint main () 2257a966c04fSmrg{ 2258a966c04fSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2259a966c04fSmrg int status = $lt_dlunknown; 2260a966c04fSmrg 2261a966c04fSmrg if (self) 2262a966c04fSmrg { 2263a966c04fSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2264a966c04fSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2265a966c04fSmrg /* dlclose (self); */ 2266a966c04fSmrg } 2267a966c04fSmrg else 2268a966c04fSmrg puts (dlerror ()); 2269a966c04fSmrg 2270a966c04fSmrg exit (status); 2271a966c04fSmrg}] 2272a966c04fSmrgEOF 2273a966c04fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2274a966c04fSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2275a966c04fSmrg lt_status=$? 2276a966c04fSmrg case x$lt_status in 2277a966c04fSmrg x$lt_dlno_uscore) $1 ;; 2278a966c04fSmrg x$lt_dlneed_uscore) $2 ;; 2279a966c04fSmrg x$lt_dlunknown|x*) $3 ;; 2280a966c04fSmrg esac 2281a966c04fSmrg else : 2282a966c04fSmrg # compilation failed 2283a966c04fSmrg $3 2284a966c04fSmrg fi 2285a966c04fSmrgfi 2286a966c04fSmrgrm -fr conftest* 2287a966c04fSmrg])# _LT_AC_TRY_DLOPEN_SELF 2288a966c04fSmrg 2289a966c04fSmrg 2290a966c04fSmrg# AC_LIBTOOL_DLOPEN_SELF 2291a966c04fSmrg# ---------------------- 2292a966c04fSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 2293a966c04fSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 2294a966c04fSmrgif test "x$enable_dlopen" != xyes; then 2295a966c04fSmrg enable_dlopen=unknown 2296a966c04fSmrg enable_dlopen_self=unknown 2297a966c04fSmrg enable_dlopen_self_static=unknown 2298a966c04fSmrgelse 2299a966c04fSmrg lt_cv_dlopen=no 2300a966c04fSmrg lt_cv_dlopen_libs= 2301a966c04fSmrg 2302a966c04fSmrg case $host_os in 2303a966c04fSmrg beos*) 2304a966c04fSmrg lt_cv_dlopen="load_add_on" 2305a966c04fSmrg lt_cv_dlopen_libs= 2306a966c04fSmrg lt_cv_dlopen_self=yes 2307a966c04fSmrg ;; 2308a966c04fSmrg 2309a966c04fSmrg mingw* | pw32*) 2310a966c04fSmrg lt_cv_dlopen="LoadLibrary" 2311a966c04fSmrg lt_cv_dlopen_libs= 2312a966c04fSmrg ;; 2313a966c04fSmrg 2314a966c04fSmrg cygwin*) 2315a966c04fSmrg lt_cv_dlopen="dlopen" 2316a966c04fSmrg lt_cv_dlopen_libs= 2317a966c04fSmrg ;; 2318a966c04fSmrg 2319a966c04fSmrg darwin*) 2320a966c04fSmrg # if libdl is installed we need to link against it 2321a966c04fSmrg AC_CHECK_LIB([dl], [dlopen], 2322a966c04fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 2323a966c04fSmrg lt_cv_dlopen="dyld" 2324a966c04fSmrg lt_cv_dlopen_libs= 2325a966c04fSmrg lt_cv_dlopen_self=yes 2326a966c04fSmrg ]) 2327a966c04fSmrg ;; 2328a966c04fSmrg 2329a966c04fSmrg *) 2330a966c04fSmrg AC_CHECK_FUNC([shl_load], 2331a966c04fSmrg [lt_cv_dlopen="shl_load"], 2332a966c04fSmrg [AC_CHECK_LIB([dld], [shl_load], 2333a966c04fSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 2334a966c04fSmrg [AC_CHECK_FUNC([dlopen], 2335a966c04fSmrg [lt_cv_dlopen="dlopen"], 2336a966c04fSmrg [AC_CHECK_LIB([dl], [dlopen], 2337a966c04fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 2338a966c04fSmrg [AC_CHECK_LIB([svld], [dlopen], 2339a966c04fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 2340a966c04fSmrg [AC_CHECK_LIB([dld], [dld_link], 2341a966c04fSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 2342a966c04fSmrg ]) 2343a966c04fSmrg ]) 2344a966c04fSmrg ]) 2345a966c04fSmrg ]) 2346a966c04fSmrg ]) 2347a966c04fSmrg ;; 2348a966c04fSmrg esac 2349a966c04fSmrg 2350a966c04fSmrg if test "x$lt_cv_dlopen" != xno; then 2351a966c04fSmrg enable_dlopen=yes 2352a966c04fSmrg else 2353a966c04fSmrg enable_dlopen=no 2354a966c04fSmrg fi 2355a966c04fSmrg 2356a966c04fSmrg case $lt_cv_dlopen in 2357a966c04fSmrg dlopen) 2358a966c04fSmrg save_CPPFLAGS="$CPPFLAGS" 2359a966c04fSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2360a966c04fSmrg 2361a966c04fSmrg save_LDFLAGS="$LDFLAGS" 2362a966c04fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2363a966c04fSmrg 2364a966c04fSmrg save_LIBS="$LIBS" 2365a966c04fSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2366a966c04fSmrg 2367a966c04fSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 2368a966c04fSmrg lt_cv_dlopen_self, [dnl 2369a966c04fSmrg _LT_AC_TRY_DLOPEN_SELF( 2370a966c04fSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2371a966c04fSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2372a966c04fSmrg ]) 2373a966c04fSmrg 2374a966c04fSmrg if test "x$lt_cv_dlopen_self" = xyes; then 2375a966c04fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2376a966c04fSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2377a966c04fSmrg lt_cv_dlopen_self_static, [dnl 2378a966c04fSmrg _LT_AC_TRY_DLOPEN_SELF( 2379a966c04fSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2380a966c04fSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2381a966c04fSmrg ]) 2382a966c04fSmrg fi 2383a966c04fSmrg 2384a966c04fSmrg CPPFLAGS="$save_CPPFLAGS" 2385a966c04fSmrg LDFLAGS="$save_LDFLAGS" 2386a966c04fSmrg LIBS="$save_LIBS" 2387a966c04fSmrg ;; 2388a966c04fSmrg esac 2389a966c04fSmrg 2390a966c04fSmrg case $lt_cv_dlopen_self in 2391a966c04fSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2392a966c04fSmrg *) enable_dlopen_self=unknown ;; 2393a966c04fSmrg esac 2394a966c04fSmrg 2395a966c04fSmrg case $lt_cv_dlopen_self_static in 2396a966c04fSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2397a966c04fSmrg *) enable_dlopen_self_static=unknown ;; 2398a966c04fSmrg esac 2399a966c04fSmrgfi 2400a966c04fSmrg])# AC_LIBTOOL_DLOPEN_SELF 2401a966c04fSmrg 2402a966c04fSmrg 2403a966c04fSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 2404a966c04fSmrg# --------------------------------- 2405a966c04fSmrg# Check to see if options -c and -o are simultaneously supported by compiler 2406a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 2407a966c04fSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 2408a966c04fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2409a966c04fSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2410a966c04fSmrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2411a966c04fSmrg $rm -r conftest 2>/dev/null 2412a966c04fSmrg mkdir conftest 2413a966c04fSmrg cd conftest 2414a966c04fSmrg mkdir out 2415a966c04fSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 2416a966c04fSmrg 2417a966c04fSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2418a966c04fSmrg # Insert the option either (1) after the last *FLAGS variable, or 2419a966c04fSmrg # (2) before a word containing "conftest.", or (3) at the end. 2420a966c04fSmrg # Note that $ac_compile itself does not contain backslashes and begins 2421a966c04fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2422a966c04fSmrg lt_compile=`echo "$ac_compile" | $SED \ 2423a966c04fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2424a966c04fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2425a966c04fSmrg -e 's:$: $lt_compiler_flag:'` 2426a966c04fSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2427a966c04fSmrg (eval "$lt_compile" 2>out/conftest.err) 2428a966c04fSmrg ac_status=$? 2429a966c04fSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2430a966c04fSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2431a966c04fSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2432a966c04fSmrg then 2433a966c04fSmrg # The compiler can only warn and ignore the option if not recognized 2434a966c04fSmrg # So say no if there are warnings 2435a966c04fSmrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 2436a966c04fSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2437a966c04fSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2438a966c04fSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2439a966c04fSmrg fi 2440a966c04fSmrg fi 2441a966c04fSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2442a966c04fSmrg $rm conftest* 2443a966c04fSmrg # SGI C++ compiler will create directory out/ii_files/ for 2444a966c04fSmrg # template instantiation 2445a966c04fSmrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 2446a966c04fSmrg $rm out/* && rmdir out 2447a966c04fSmrg cd .. 2448a966c04fSmrg rmdir conftest 2449a966c04fSmrg $rm conftest* 2450a966c04fSmrg]) 2451a966c04fSmrg])# AC_LIBTOOL_PROG_CC_C_O 2452a966c04fSmrg 2453a966c04fSmrg 2454a966c04fSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 2455a966c04fSmrg# ----------------------------------------- 2456a966c04fSmrg# Check to see if we can do hard links to lock some files if needed 2457a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 2458a966c04fSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl 2459a966c04fSmrg 2460a966c04fSmrghard_links="nottested" 2461a966c04fSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2462a966c04fSmrg # do not overwrite the value of need_locks provided by the user 2463a966c04fSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2464a966c04fSmrg hard_links=yes 2465a966c04fSmrg $rm conftest* 2466a966c04fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2467a966c04fSmrg touch conftest.a 2468a966c04fSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2469a966c04fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2470a966c04fSmrg AC_MSG_RESULT([$hard_links]) 2471a966c04fSmrg if test "$hard_links" = no; then 2472a966c04fSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2473a966c04fSmrg need_locks=warn 2474a966c04fSmrg fi 2475a966c04fSmrgelse 2476a966c04fSmrg need_locks=no 2477a966c04fSmrgfi 2478a966c04fSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 2479a966c04fSmrg 2480a966c04fSmrg 2481a966c04fSmrg# AC_LIBTOOL_OBJDIR 2482a966c04fSmrg# ----------------- 2483a966c04fSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 2484a966c04fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2485a966c04fSmrg[rm -f .libs 2>/dev/null 2486a966c04fSmrgmkdir .libs 2>/dev/null 2487a966c04fSmrgif test -d .libs; then 2488a966c04fSmrg lt_cv_objdir=.libs 2489a966c04fSmrgelse 2490a966c04fSmrg # MS-DOS does not allow filenames that begin with a dot. 2491a966c04fSmrg lt_cv_objdir=_libs 2492a966c04fSmrgfi 2493a966c04fSmrgrmdir .libs 2>/dev/null]) 2494a966c04fSmrgobjdir=$lt_cv_objdir 2495a966c04fSmrg])# AC_LIBTOOL_OBJDIR 2496a966c04fSmrg 2497a966c04fSmrg 2498a966c04fSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 2499a966c04fSmrg# ---------------------------------------------- 2500a966c04fSmrg# Check hardcoding attributes. 2501a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 2502a966c04fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2503a966c04fSmrg_LT_AC_TAGVAR(hardcode_action, $1)= 2504a966c04fSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 2505a966c04fSmrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 2506a966c04fSmrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2507a966c04fSmrg 2508a966c04fSmrg # We can hardcode non-existant directories. 2509a966c04fSmrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 2510a966c04fSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2511a966c04fSmrg # have to relink, otherwise we might link with an installed library 2512a966c04fSmrg # when we should be linking with a yet-to-be-installed one 2513a966c04fSmrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2514a966c04fSmrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 2515a966c04fSmrg # Linking always hardcodes the temporary library directory. 2516a966c04fSmrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 2517a966c04fSmrg else 2518a966c04fSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2519a966c04fSmrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 2520a966c04fSmrg fi 2521a966c04fSmrgelse 2522a966c04fSmrg # We cannot hardcode anything, or else we can only hardcode existing 2523a966c04fSmrg # directories. 2524a966c04fSmrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 2525a966c04fSmrgfi 2526a966c04fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 2527a966c04fSmrg 2528a966c04fSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 2529a966c04fSmrg # Fast installation is not supported 2530a966c04fSmrg enable_fast_install=no 2531a966c04fSmrgelif test "$shlibpath_overrides_runpath" = yes || 2532a966c04fSmrg test "$enable_shared" = no; then 2533a966c04fSmrg # Fast installation is not necessary 2534a966c04fSmrg enable_fast_install=needless 2535a966c04fSmrgfi 2536a966c04fSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 2537a966c04fSmrg 2538a966c04fSmrg 2539a966c04fSmrg# AC_LIBTOOL_SYS_LIB_STRIP 2540a966c04fSmrg# ------------------------ 2541a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 2542a966c04fSmrg[striplib= 2543a966c04fSmrgold_striplib= 2544a966c04fSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2545a966c04fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 2546a966c04fSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2547a966c04fSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2548a966c04fSmrg AC_MSG_RESULT([yes]) 2549a966c04fSmrgelse 2550a966c04fSmrg# FIXME - insert some real tests, host_os isn't really good enough 2551a966c04fSmrg case $host_os in 2552a966c04fSmrg darwin*) 2553a966c04fSmrg if test -n "$STRIP" ; then 2554a966c04fSmrg striplib="$STRIP -x" 2555a966c04fSmrg AC_MSG_RESULT([yes]) 2556a966c04fSmrg else 2557a966c04fSmrg AC_MSG_RESULT([no]) 2558a966c04fSmrgfi 2559a966c04fSmrg ;; 2560a966c04fSmrg *) 2561a966c04fSmrg AC_MSG_RESULT([no]) 2562a966c04fSmrg ;; 2563a966c04fSmrg esac 2564a966c04fSmrgfi 2565a966c04fSmrg])# AC_LIBTOOL_SYS_LIB_STRIP 2566a966c04fSmrg 2567a966c04fSmrg 2568a966c04fSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 2569a966c04fSmrg# ----------------------------- 2570a966c04fSmrg# PORTME Fill in your ld.so characteristics 2571a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 2572a966c04fSmrg[AC_MSG_CHECKING([dynamic linker characteristics]) 2573a966c04fSmrglibrary_names_spec= 2574a966c04fSmrglibname_spec='lib$name' 2575a966c04fSmrgsoname_spec= 2576a966c04fSmrgshrext_cmds=".so" 2577a966c04fSmrgpostinstall_cmds= 2578a966c04fSmrgpostuninstall_cmds= 2579a966c04fSmrgfinish_cmds= 2580a966c04fSmrgfinish_eval= 2581a966c04fSmrgshlibpath_var= 2582a966c04fSmrgshlibpath_overrides_runpath=unknown 2583a966c04fSmrgversion_type=none 2584a966c04fSmrgdynamic_linker="$host_os ld.so" 2585a966c04fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2586a966c04fSmrgif test "$GCC" = yes; then 2587a966c04fSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2588a966c04fSmrg if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 2589a966c04fSmrg # if the path contains ";" then we assume it to be the separator 2590a966c04fSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2591a966c04fSmrg # assumed that no part of a normal pathname contains ";" but that should 2592a966c04fSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2593a966c04fSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2594a966c04fSmrg else 2595a966c04fSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2596a966c04fSmrg fi 2597a966c04fSmrgelse 2598a966c04fSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2599a966c04fSmrgfi 2600a966c04fSmrgneed_lib_prefix=unknown 2601a966c04fSmrghardcode_into_libs=no 2602a966c04fSmrg 2603a966c04fSmrg# when you set need_version to no, make sure it does not cause -set_version 2604a966c04fSmrg# flags to be left without arguments 2605a966c04fSmrgneed_version=unknown 2606a966c04fSmrg 2607a966c04fSmrgcase $host_os in 2608a966c04fSmrgaix3*) 2609a966c04fSmrg version_type=linux 2610a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2611a966c04fSmrg shlibpath_var=LIBPATH 2612a966c04fSmrg 2613a966c04fSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2614a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2615a966c04fSmrg ;; 2616a966c04fSmrg 2617a966c04fSmrgaix4* | aix5*) 2618a966c04fSmrg version_type=linux 2619a966c04fSmrg need_lib_prefix=no 2620a966c04fSmrg need_version=no 2621a966c04fSmrg hardcode_into_libs=yes 2622a966c04fSmrg if test "$host_cpu" = ia64; then 2623a966c04fSmrg # AIX 5 supports IA64 2624a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2625a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 2626a966c04fSmrg else 2627a966c04fSmrg # With GCC up to 2.95.x, collect2 would create an import file 2628a966c04fSmrg # for dependence libraries. The import file would start with 2629a966c04fSmrg # the line `#! .'. This would cause the generated library to 2630a966c04fSmrg # depend on `.', always an invalid library. This was fixed in 2631a966c04fSmrg # development snapshots of GCC prior to 3.0. 2632a966c04fSmrg case $host_os in 2633a966c04fSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2634a966c04fSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2635a966c04fSmrg echo ' yes ' 2636a966c04fSmrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 2637a966c04fSmrg : 2638a966c04fSmrg else 2639a966c04fSmrg can_build_shared=no 2640a966c04fSmrg fi 2641a966c04fSmrg ;; 2642a966c04fSmrg esac 2643a966c04fSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2644a966c04fSmrg # soname into executable. Probably we can add versioning support to 2645a966c04fSmrg # collect2, so additional links can be useful in future. 2646a966c04fSmrg if test "$aix_use_runtimelinking" = yes; then 2647a966c04fSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2648a966c04fSmrg # instead of lib<name>.a to let people know that these are not 2649a966c04fSmrg # typical AIX shared libraries. 2650a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2651a966c04fSmrg else 2652a966c04fSmrg # We preserve .a as extension for shared libraries through AIX4.2 2653a966c04fSmrg # and later when we are not doing run time linking. 2654a966c04fSmrg library_names_spec='${libname}${release}.a $libname.a' 2655a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2656a966c04fSmrg fi 2657a966c04fSmrg shlibpath_var=LIBPATH 2658a966c04fSmrg fi 2659a966c04fSmrg ;; 2660a966c04fSmrg 2661a966c04fSmrgamigaos*) 2662a966c04fSmrg library_names_spec='$libname.ixlibrary $libname.a' 2663a966c04fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2664a966c04fSmrg 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' 2665a966c04fSmrg ;; 2666a966c04fSmrg 2667a966c04fSmrgbeos*) 2668a966c04fSmrg library_names_spec='${libname}${shared_ext}' 2669a966c04fSmrg dynamic_linker="$host_os ld.so" 2670a966c04fSmrg shlibpath_var=LIBRARY_PATH 2671a966c04fSmrg ;; 2672a966c04fSmrg 2673a966c04fSmrgbsdi[[45]]*) 2674a966c04fSmrg version_type=linux 2675a966c04fSmrg need_version=no 2676a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2677a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2678a966c04fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2679a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 2680a966c04fSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2681a966c04fSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2682a966c04fSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2683a966c04fSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2684a966c04fSmrg # libtool to hard-code these into programs 2685a966c04fSmrg ;; 2686a966c04fSmrg 2687a966c04fSmrgcygwin* | mingw* | pw32*) 2688a966c04fSmrg version_type=windows 2689a966c04fSmrg shrext_cmds=".dll" 2690a966c04fSmrg need_version=no 2691a966c04fSmrg need_lib_prefix=no 2692a966c04fSmrg 2693a966c04fSmrg case $GCC,$host_os in 2694a966c04fSmrg yes,cygwin* | yes,mingw* | yes,pw32*) 2695a966c04fSmrg library_names_spec='$libname.dll.a' 2696a966c04fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2697a966c04fSmrg postinstall_cmds='base_file=`basename \${file}`~ 2698a966c04fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 2699a966c04fSmrg dldir=$destdir/`dirname \$dlpath`~ 2700a966c04fSmrg test -d \$dldir || mkdir -p \$dldir~ 2701a966c04fSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2702a966c04fSmrg chmod a+x \$dldir/$dlname' 2703a966c04fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2704a966c04fSmrg dlpath=$dir/\$dldll~ 2705a966c04fSmrg $rm \$dlpath' 2706a966c04fSmrg shlibpath_overrides_runpath=yes 2707a966c04fSmrg 2708a966c04fSmrg case $host_os in 2709a966c04fSmrg cygwin*) 2710a966c04fSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2711a966c04fSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2712a966c04fSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2713a966c04fSmrg ;; 2714a966c04fSmrg mingw*) 2715a966c04fSmrg # MinGW DLLs use traditional 'lib' prefix 2716a966c04fSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2717a966c04fSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2718a966c04fSmrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 2719a966c04fSmrg # It is most probably a Windows format PATH printed by 2720a966c04fSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 2721a966c04fSmrg # path with ; separators, and with drive letters. We can handle the 2722a966c04fSmrg # drive letters (cygwin fileutils understands them), so leave them, 2723a966c04fSmrg # especially as we might pass files found there to a mingw objdump, 2724a966c04fSmrg # which wouldn't understand a cygwinified path. Ahh. 2725a966c04fSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2726a966c04fSmrg else 2727a966c04fSmrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2728a966c04fSmrg fi 2729a966c04fSmrg ;; 2730a966c04fSmrg pw32*) 2731a966c04fSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2732a966c04fSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2733a966c04fSmrg ;; 2734a966c04fSmrg esac 2735a966c04fSmrg ;; 2736a966c04fSmrg 2737a966c04fSmrg *) 2738a966c04fSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2739a966c04fSmrg ;; 2740a966c04fSmrg esac 2741a966c04fSmrg dynamic_linker='Win32 ld.exe' 2742a966c04fSmrg # FIXME: first we should search . and the directory the executable is in 2743a966c04fSmrg shlibpath_var=PATH 2744a966c04fSmrg ;; 2745a966c04fSmrg 2746a966c04fSmrgdarwin* | rhapsody*) 2747a966c04fSmrg dynamic_linker="$host_os dyld" 2748a966c04fSmrg version_type=darwin 2749a966c04fSmrg need_lib_prefix=no 2750a966c04fSmrg need_version=no 2751a966c04fSmrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2752a966c04fSmrg soname_spec='${libname}${release}${major}$shared_ext' 2753a966c04fSmrg shlibpath_overrides_runpath=yes 2754a966c04fSmrg shlibpath_var=DYLD_LIBRARY_PATH 2755a966c04fSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2756a966c04fSmrg # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 2757a966c04fSmrg if test "$GCC" = yes; then 2758a966c04fSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` 2759a966c04fSmrg else 2760a966c04fSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 2761a966c04fSmrg fi 2762a966c04fSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2763a966c04fSmrg ;; 2764a966c04fSmrg 2765a966c04fSmrgdgux*) 2766a966c04fSmrg version_type=linux 2767a966c04fSmrg need_lib_prefix=no 2768a966c04fSmrg need_version=no 2769a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2770a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2771a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 2772a966c04fSmrg ;; 2773a966c04fSmrg 2774a966c04fSmrgfreebsd1*) 2775a966c04fSmrg dynamic_linker=no 2776a966c04fSmrg ;; 2777a966c04fSmrg 2778a966c04fSmrgkfreebsd*-gnu) 2779a966c04fSmrg version_type=linux 2780a966c04fSmrg need_lib_prefix=no 2781a966c04fSmrg need_version=no 2782a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2783a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2784a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 2785a966c04fSmrg shlibpath_overrides_runpath=no 2786a966c04fSmrg hardcode_into_libs=yes 2787a966c04fSmrg dynamic_linker='GNU ld.so' 2788a966c04fSmrg ;; 2789a966c04fSmrg 2790a966c04fSmrgfreebsd* | dragonfly*) 2791a966c04fSmrg # DragonFly does not have aout. When/if they implement a new 2792a966c04fSmrg # versioning mechanism, adjust this. 2793a966c04fSmrg if test -x /usr/bin/objformat; then 2794a966c04fSmrg objformat=`/usr/bin/objformat` 2795a966c04fSmrg else 2796a966c04fSmrg case $host_os in 2797a966c04fSmrg freebsd[[123]]*) objformat=aout ;; 2798a966c04fSmrg *) objformat=elf ;; 2799a966c04fSmrg esac 2800a966c04fSmrg fi 2801a966c04fSmrg version_type=freebsd-$objformat 2802a966c04fSmrg case $version_type in 2803a966c04fSmrg freebsd-elf*) 2804a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2805a966c04fSmrg need_version=no 2806a966c04fSmrg need_lib_prefix=no 2807a966c04fSmrg ;; 2808a966c04fSmrg freebsd-*) 2809a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2810a966c04fSmrg need_version=yes 2811a966c04fSmrg ;; 2812a966c04fSmrg esac 2813a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 2814a966c04fSmrg case $host_os in 2815a966c04fSmrg freebsd2*) 2816a966c04fSmrg shlibpath_overrides_runpath=yes 2817a966c04fSmrg ;; 2818a966c04fSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2819a966c04fSmrg shlibpath_overrides_runpath=yes 2820a966c04fSmrg hardcode_into_libs=yes 2821a966c04fSmrg ;; 2822a966c04fSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2823a966c04fSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2824a966c04fSmrg shlibpath_overrides_runpath=no 2825a966c04fSmrg hardcode_into_libs=yes 2826a966c04fSmrg ;; 2827a966c04fSmrg freebsd*) # from 4.6 on 2828a966c04fSmrg shlibpath_overrides_runpath=yes 2829a966c04fSmrg hardcode_into_libs=yes 2830a966c04fSmrg ;; 2831a966c04fSmrg esac 2832a966c04fSmrg ;; 2833a966c04fSmrg 2834a966c04fSmrggnu*) 2835a966c04fSmrg version_type=linux 2836a966c04fSmrg need_lib_prefix=no 2837a966c04fSmrg need_version=no 2838a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2839a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2840a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 2841a966c04fSmrg hardcode_into_libs=yes 2842a966c04fSmrg ;; 2843a966c04fSmrg 2844a966c04fSmrghpux9* | hpux10* | hpux11*) 2845a966c04fSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2846a966c04fSmrg # link against other versions. 2847a966c04fSmrg version_type=sunos 2848a966c04fSmrg need_lib_prefix=no 2849a966c04fSmrg need_version=no 2850a966c04fSmrg case $host_cpu in 2851a966c04fSmrg ia64*) 2852a966c04fSmrg shrext_cmds='.so' 2853a966c04fSmrg hardcode_into_libs=yes 2854a966c04fSmrg dynamic_linker="$host_os dld.so" 2855a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 2856a966c04fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2857a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2858a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2859a966c04fSmrg if test "X$HPUX_IA64_MODE" = X32; then 2860a966c04fSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2861a966c04fSmrg else 2862a966c04fSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2863a966c04fSmrg fi 2864a966c04fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2865a966c04fSmrg ;; 2866a966c04fSmrg hppa*64*) 2867a966c04fSmrg shrext_cmds='.sl' 2868a966c04fSmrg hardcode_into_libs=yes 2869a966c04fSmrg dynamic_linker="$host_os dld.sl" 2870a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2871a966c04fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2872a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2873a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2874a966c04fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2875a966c04fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2876a966c04fSmrg ;; 2877a966c04fSmrg *) 2878a966c04fSmrg shrext_cmds='.sl' 2879a966c04fSmrg dynamic_linker="$host_os dld.sl" 2880a966c04fSmrg shlibpath_var=SHLIB_PATH 2881a966c04fSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2882a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2883a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2884a966c04fSmrg ;; 2885a966c04fSmrg esac 2886a966c04fSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 2887a966c04fSmrg postinstall_cmds='chmod 555 $lib' 2888a966c04fSmrg ;; 2889a966c04fSmrg 2890a966c04fSmrginterix3*) 2891a966c04fSmrg version_type=linux 2892a966c04fSmrg need_lib_prefix=no 2893a966c04fSmrg need_version=no 2894a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2895a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2896a966c04fSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2897a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 2898a966c04fSmrg shlibpath_overrides_runpath=no 2899a966c04fSmrg hardcode_into_libs=yes 2900a966c04fSmrg ;; 2901a966c04fSmrg 2902a966c04fSmrgirix5* | irix6* | nonstopux*) 2903a966c04fSmrg case $host_os in 2904a966c04fSmrg nonstopux*) version_type=nonstopux ;; 2905a966c04fSmrg *) 2906a966c04fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2907a966c04fSmrg version_type=linux 2908a966c04fSmrg else 2909a966c04fSmrg version_type=irix 2910a966c04fSmrg fi ;; 2911a966c04fSmrg esac 2912a966c04fSmrg need_lib_prefix=no 2913a966c04fSmrg need_version=no 2914a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2915a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2916a966c04fSmrg case $host_os in 2917a966c04fSmrg irix5* | nonstopux*) 2918a966c04fSmrg libsuff= shlibsuff= 2919a966c04fSmrg ;; 2920a966c04fSmrg *) 2921a966c04fSmrg case $LD in # libtool.m4 will add one of these switches to LD 2922a966c04fSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2923a966c04fSmrg libsuff= shlibsuff= libmagic=32-bit;; 2924a966c04fSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2925a966c04fSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2926a966c04fSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2927a966c04fSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2928a966c04fSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2929a966c04fSmrg esac 2930a966c04fSmrg ;; 2931a966c04fSmrg esac 2932a966c04fSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2933a966c04fSmrg shlibpath_overrides_runpath=no 2934a966c04fSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2935a966c04fSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2936a966c04fSmrg hardcode_into_libs=yes 2937a966c04fSmrg ;; 2938a966c04fSmrg 2939a966c04fSmrg# No shared lib support for Linux oldld, aout, or coff. 2940a966c04fSmrglinux*oldld* | linux*aout* | linux*coff*) 2941a966c04fSmrg dynamic_linker=no 2942a966c04fSmrg ;; 2943a966c04fSmrg 2944a966c04fSmrg# This must be Linux ELF. 2945a966c04fSmrglinux*) 2946a966c04fSmrg version_type=linux 2947a966c04fSmrg need_lib_prefix=no 2948a966c04fSmrg need_version=no 2949a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2950a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2951a966c04fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2952a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 2953a966c04fSmrg shlibpath_overrides_runpath=no 2954a966c04fSmrg # This implies no fast_install, which is unacceptable. 2955a966c04fSmrg # Some rework will be needed to allow for fast_install 2956a966c04fSmrg # before this can be enabled. 2957a966c04fSmrg hardcode_into_libs=yes 2958a966c04fSmrg 2959a966c04fSmrg # Append ld.so.conf contents to the search path 2960a966c04fSmrg if test -f /etc/ld.so.conf; then 2961a966c04fSmrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 2962a966c04fSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2963a966c04fSmrg fi 2964a966c04fSmrg 2965a966c04fSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2966a966c04fSmrg # powerpc, because MkLinux only supported shared libraries with the 2967a966c04fSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2968a966c04fSmrg # most powerpc-linux boxes support dynamic linking these days and 2969a966c04fSmrg # people can always --disable-shared, the test was removed, and we 2970a966c04fSmrg # assume the GNU/Linux dynamic linker is in use. 2971a966c04fSmrg dynamic_linker='GNU/Linux ld.so' 2972a966c04fSmrg ;; 2973a966c04fSmrg 2974a966c04fSmrgknetbsd*-gnu) 2975a966c04fSmrg version_type=linux 2976a966c04fSmrg need_lib_prefix=no 2977a966c04fSmrg need_version=no 2978a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2979a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2980a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 2981a966c04fSmrg shlibpath_overrides_runpath=no 2982a966c04fSmrg hardcode_into_libs=yes 2983a966c04fSmrg dynamic_linker='GNU ld.so' 2984a966c04fSmrg ;; 2985a966c04fSmrg 2986a966c04fSmrgnetbsd*) 2987a966c04fSmrg version_type=sunos 2988a966c04fSmrg need_lib_prefix=no 2989a966c04fSmrg need_version=no 2990a966c04fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 2991a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2992a966c04fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2993a966c04fSmrg dynamic_linker='NetBSD (a.out) ld.so' 2994a966c04fSmrg else 2995a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2996a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2997a966c04fSmrg dynamic_linker='NetBSD ld.elf_so' 2998a966c04fSmrg fi 2999a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3000a966c04fSmrg shlibpath_overrides_runpath=yes 3001a966c04fSmrg hardcode_into_libs=yes 3002a966c04fSmrg ;; 3003a966c04fSmrg 3004a966c04fSmrgnewsos6) 3005a966c04fSmrg version_type=linux 3006a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3007a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3008a966c04fSmrg shlibpath_overrides_runpath=yes 3009a966c04fSmrg ;; 3010a966c04fSmrg 3011a966c04fSmrgnto-qnx*) 3012a966c04fSmrg version_type=linux 3013a966c04fSmrg need_lib_prefix=no 3014a966c04fSmrg need_version=no 3015a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3016a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 3017a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3018a966c04fSmrg shlibpath_overrides_runpath=yes 3019a966c04fSmrg ;; 3020a966c04fSmrg 3021a966c04fSmrgopenbsd*) 3022a966c04fSmrg version_type=sunos 3023a966c04fSmrg sys_lib_dlsearch_path_spec="/usr/lib" 3024a966c04fSmrg need_lib_prefix=no 3025a966c04fSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3026a966c04fSmrg case $host_os in 3027a966c04fSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3028a966c04fSmrg *) need_version=no ;; 3029a966c04fSmrg esac 3030a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3031a966c04fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3032a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3033a966c04fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3034a966c04fSmrg case $host_os in 3035a966c04fSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 3036a966c04fSmrg shlibpath_overrides_runpath=no 3037a966c04fSmrg ;; 3038a966c04fSmrg *) 3039a966c04fSmrg shlibpath_overrides_runpath=yes 3040a966c04fSmrg ;; 3041a966c04fSmrg esac 3042a966c04fSmrg else 3043a966c04fSmrg shlibpath_overrides_runpath=yes 3044a966c04fSmrg fi 3045a966c04fSmrg ;; 3046a966c04fSmrg 3047a966c04fSmrgos2*) 3048a966c04fSmrg libname_spec='$name' 3049a966c04fSmrg shrext_cmds=".dll" 3050a966c04fSmrg need_lib_prefix=no 3051a966c04fSmrg library_names_spec='$libname${shared_ext} $libname.a' 3052a966c04fSmrg dynamic_linker='OS/2 ld.exe' 3053a966c04fSmrg shlibpath_var=LIBPATH 3054a966c04fSmrg ;; 3055a966c04fSmrg 3056a966c04fSmrgosf3* | osf4* | osf5*) 3057a966c04fSmrg version_type=osf 3058a966c04fSmrg need_lib_prefix=no 3059a966c04fSmrg need_version=no 3060a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 3061a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3062a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3063a966c04fSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3064a966c04fSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3065a966c04fSmrg ;; 3066a966c04fSmrg 3067a966c04fSmrgsolaris*) 3068a966c04fSmrg version_type=linux 3069a966c04fSmrg need_lib_prefix=no 3070a966c04fSmrg need_version=no 3071a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3072a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 3073a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3074a966c04fSmrg shlibpath_overrides_runpath=yes 3075a966c04fSmrg hardcode_into_libs=yes 3076a966c04fSmrg # ldd complains unless libraries are executable 3077a966c04fSmrg postinstall_cmds='chmod +x $lib' 3078a966c04fSmrg ;; 3079a966c04fSmrg 3080a966c04fSmrgsunos4*) 3081a966c04fSmrg version_type=sunos 3082a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3083a966c04fSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3084a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3085a966c04fSmrg shlibpath_overrides_runpath=yes 3086a966c04fSmrg if test "$with_gnu_ld" = yes; then 3087a966c04fSmrg need_lib_prefix=no 3088a966c04fSmrg fi 3089a966c04fSmrg need_version=yes 3090a966c04fSmrg ;; 3091a966c04fSmrg 3092a966c04fSmrgsysv4 | sysv4.3*) 3093a966c04fSmrg version_type=linux 3094a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3095a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 3096a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3097a966c04fSmrg case $host_vendor in 3098a966c04fSmrg sni) 3099a966c04fSmrg shlibpath_overrides_runpath=no 3100a966c04fSmrg need_lib_prefix=no 3101a966c04fSmrg export_dynamic_flag_spec='${wl}-Blargedynsym' 3102a966c04fSmrg runpath_var=LD_RUN_PATH 3103a966c04fSmrg ;; 3104a966c04fSmrg siemens) 3105a966c04fSmrg need_lib_prefix=no 3106a966c04fSmrg ;; 3107a966c04fSmrg motorola) 3108a966c04fSmrg need_lib_prefix=no 3109a966c04fSmrg need_version=no 3110a966c04fSmrg shlibpath_overrides_runpath=no 3111a966c04fSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3112a966c04fSmrg ;; 3113a966c04fSmrg esac 3114a966c04fSmrg ;; 3115a966c04fSmrg 3116a966c04fSmrgsysv4*MP*) 3117a966c04fSmrg if test -d /usr/nec ;then 3118a966c04fSmrg version_type=linux 3119a966c04fSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3120a966c04fSmrg soname_spec='$libname${shared_ext}.$major' 3121a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3122a966c04fSmrg fi 3123a966c04fSmrg ;; 3124a966c04fSmrg 3125a966c04fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3126a966c04fSmrg version_type=freebsd-elf 3127a966c04fSmrg need_lib_prefix=no 3128a966c04fSmrg need_version=no 3129a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3130a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 3131a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3132a966c04fSmrg hardcode_into_libs=yes 3133a966c04fSmrg if test "$with_gnu_ld" = yes; then 3134a966c04fSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3135a966c04fSmrg shlibpath_overrides_runpath=no 3136a966c04fSmrg else 3137a966c04fSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3138a966c04fSmrg shlibpath_overrides_runpath=yes 3139a966c04fSmrg case $host_os in 3140a966c04fSmrg sco3.2v5*) 3141a966c04fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3142a966c04fSmrg ;; 3143a966c04fSmrg esac 3144a966c04fSmrg fi 3145a966c04fSmrg sys_lib_dlsearch_path_spec='/usr/lib' 3146a966c04fSmrg ;; 3147a966c04fSmrg 3148a966c04fSmrguts4*) 3149a966c04fSmrg version_type=linux 3150a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3151a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 3152a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3153a966c04fSmrg ;; 3154a966c04fSmrg 3155a966c04fSmrg*) 3156a966c04fSmrg dynamic_linker=no 3157a966c04fSmrg ;; 3158a966c04fSmrgesac 3159a966c04fSmrgAC_MSG_RESULT([$dynamic_linker]) 3160a966c04fSmrgtest "$dynamic_linker" = no && can_build_shared=no 3161a966c04fSmrg 3162a966c04fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3163a966c04fSmrgif test "$GCC" = yes; then 3164a966c04fSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3165a966c04fSmrgfi 3166a966c04fSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 3167a966c04fSmrg 3168a966c04fSmrg 3169a966c04fSmrg# _LT_AC_TAGCONFIG 3170a966c04fSmrg# ---------------- 3171a966c04fSmrgAC_DEFUN([_LT_AC_TAGCONFIG], 3172a966c04fSmrg[AC_ARG_WITH([tags], 3173a966c04fSmrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 3174a966c04fSmrg [include additional configurations @<:@automatic@:>@])], 3175a966c04fSmrg [tagnames="$withval"]) 3176a966c04fSmrg 3177a966c04fSmrgif test -f "$ltmain" && test -n "$tagnames"; then 3178a966c04fSmrg if test ! -f "${ofile}"; then 3179a966c04fSmrg AC_MSG_WARN([output file `$ofile' does not exist]) 3180a966c04fSmrg fi 3181a966c04fSmrg 3182a966c04fSmrg if test -z "$LTCC"; then 3183a966c04fSmrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 3184a966c04fSmrg if test -z "$LTCC"; then 3185a966c04fSmrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 3186a966c04fSmrg else 3187a966c04fSmrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 3188a966c04fSmrg fi 3189a966c04fSmrg fi 3190a966c04fSmrg if test -z "$LTCFLAGS"; then 3191a966c04fSmrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 3192a966c04fSmrg fi 3193a966c04fSmrg 3194a966c04fSmrg # Extract list of available tagged configurations in $ofile. 3195a966c04fSmrg # Note that this assumes the entire list is on one line. 3196a966c04fSmrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 3197a966c04fSmrg 3198a966c04fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3199a966c04fSmrg for tagname in $tagnames; do 3200a966c04fSmrg IFS="$lt_save_ifs" 3201a966c04fSmrg # Check whether tagname contains only valid characters 3202a966c04fSmrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 3203a966c04fSmrg "") ;; 3204a966c04fSmrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 3205a966c04fSmrg ;; 3206a966c04fSmrg esac 3207a966c04fSmrg 3208a966c04fSmrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 3209a966c04fSmrg then 3210a966c04fSmrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 3211a966c04fSmrg fi 3212a966c04fSmrg 3213a966c04fSmrg # Update the list of available tags. 3214a966c04fSmrg if test -n "$tagname"; then 3215a966c04fSmrg echo appending configuration tag \"$tagname\" to $ofile 3216a966c04fSmrg 3217a966c04fSmrg case $tagname in 3218a966c04fSmrg CXX) 3219a966c04fSmrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 3220a966c04fSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 3221a966c04fSmrg (test "X$CXX" != "Xg++"))) ; then 3222a966c04fSmrg AC_LIBTOOL_LANG_CXX_CONFIG 3223a966c04fSmrg else 3224a966c04fSmrg tagname="" 3225a966c04fSmrg fi 3226a966c04fSmrg ;; 3227a966c04fSmrg 3228a966c04fSmrg F77) 3229a966c04fSmrg if test -n "$F77" && test "X$F77" != "Xno"; then 3230a966c04fSmrg AC_LIBTOOL_LANG_F77_CONFIG 3231a966c04fSmrg else 3232a966c04fSmrg tagname="" 3233a966c04fSmrg fi 3234a966c04fSmrg ;; 3235a966c04fSmrg 3236a966c04fSmrg GCJ) 3237a966c04fSmrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 3238a966c04fSmrg AC_LIBTOOL_LANG_GCJ_CONFIG 3239a966c04fSmrg else 3240a966c04fSmrg tagname="" 3241a966c04fSmrg fi 3242a966c04fSmrg ;; 3243a966c04fSmrg 3244a966c04fSmrg RC) 3245a966c04fSmrg AC_LIBTOOL_LANG_RC_CONFIG 3246a966c04fSmrg ;; 3247a966c04fSmrg 3248a966c04fSmrg *) 3249a966c04fSmrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 3250a966c04fSmrg ;; 3251a966c04fSmrg esac 3252a966c04fSmrg 3253a966c04fSmrg # Append the new tag name to the list of available tags. 3254a966c04fSmrg if test -n "$tagname" ; then 3255a966c04fSmrg available_tags="$available_tags $tagname" 3256a966c04fSmrg fi 3257a966c04fSmrg fi 3258a966c04fSmrg done 3259a966c04fSmrg IFS="$lt_save_ifs" 3260a966c04fSmrg 3261a966c04fSmrg # Now substitute the updated list of available tags. 3262a966c04fSmrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 3263a966c04fSmrg mv "${ofile}T" "$ofile" 3264a966c04fSmrg chmod +x "$ofile" 3265a966c04fSmrg else 3266a966c04fSmrg rm -f "${ofile}T" 3267a966c04fSmrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 3268a966c04fSmrg fi 3269a966c04fSmrgfi 3270a966c04fSmrg])# _LT_AC_TAGCONFIG 3271a966c04fSmrg 3272a966c04fSmrg 3273a966c04fSmrg# AC_LIBTOOL_DLOPEN 3274a966c04fSmrg# ----------------- 3275a966c04fSmrg# enable checks for dlopen support 3276a966c04fSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 3277a966c04fSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 3278a966c04fSmrg])# AC_LIBTOOL_DLOPEN 3279a966c04fSmrg 3280a966c04fSmrg 3281a966c04fSmrg# AC_LIBTOOL_WIN32_DLL 3282a966c04fSmrg# -------------------- 3283a966c04fSmrg# declare package support for building win32 DLLs 3284a966c04fSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 3285a966c04fSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 3286a966c04fSmrg])# AC_LIBTOOL_WIN32_DLL 3287a966c04fSmrg 3288a966c04fSmrg 3289a966c04fSmrg# AC_ENABLE_SHARED([DEFAULT]) 3290a966c04fSmrg# --------------------------- 3291a966c04fSmrg# implement the --enable-shared flag 3292a966c04fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 3293a966c04fSmrgAC_DEFUN([AC_ENABLE_SHARED], 3294a966c04fSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 3295a966c04fSmrgAC_ARG_ENABLE([shared], 3296a966c04fSmrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 3297a966c04fSmrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 3298a966c04fSmrg [p=${PACKAGE-default} 3299a966c04fSmrg case $enableval in 3300a966c04fSmrg yes) enable_shared=yes ;; 3301a966c04fSmrg no) enable_shared=no ;; 3302a966c04fSmrg *) 3303a966c04fSmrg enable_shared=no 3304a966c04fSmrg # Look at the argument we got. We use all the common list separators. 3305a966c04fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3306a966c04fSmrg for pkg in $enableval; do 3307a966c04fSmrg IFS="$lt_save_ifs" 3308a966c04fSmrg if test "X$pkg" = "X$p"; then 3309a966c04fSmrg enable_shared=yes 3310a966c04fSmrg fi 3311a966c04fSmrg done 3312a966c04fSmrg IFS="$lt_save_ifs" 3313a966c04fSmrg ;; 3314a966c04fSmrg esac], 3315a966c04fSmrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 3316a966c04fSmrg])# AC_ENABLE_SHARED 3317a966c04fSmrg 3318a966c04fSmrg 3319a966c04fSmrg# AC_DISABLE_SHARED 3320a966c04fSmrg# ----------------- 3321a966c04fSmrg# set the default shared flag to --disable-shared 3322a966c04fSmrgAC_DEFUN([AC_DISABLE_SHARED], 3323a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3324a966c04fSmrgAC_ENABLE_SHARED(no) 3325a966c04fSmrg])# AC_DISABLE_SHARED 3326a966c04fSmrg 3327a966c04fSmrg 3328a966c04fSmrg# AC_ENABLE_STATIC([DEFAULT]) 3329a966c04fSmrg# --------------------------- 3330a966c04fSmrg# implement the --enable-static flag 3331a966c04fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 3332a966c04fSmrgAC_DEFUN([AC_ENABLE_STATIC], 3333a966c04fSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 3334a966c04fSmrgAC_ARG_ENABLE([static], 3335a966c04fSmrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 3336a966c04fSmrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 3337a966c04fSmrg [p=${PACKAGE-default} 3338a966c04fSmrg case $enableval in 3339a966c04fSmrg yes) enable_static=yes ;; 3340a966c04fSmrg no) enable_static=no ;; 3341a966c04fSmrg *) 3342a966c04fSmrg enable_static=no 3343a966c04fSmrg # Look at the argument we got. We use all the common list separators. 3344a966c04fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3345a966c04fSmrg for pkg in $enableval; do 3346a966c04fSmrg IFS="$lt_save_ifs" 3347a966c04fSmrg if test "X$pkg" = "X$p"; then 3348a966c04fSmrg enable_static=yes 3349a966c04fSmrg fi 3350a966c04fSmrg done 3351a966c04fSmrg IFS="$lt_save_ifs" 3352a966c04fSmrg ;; 3353a966c04fSmrg esac], 3354a966c04fSmrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 3355a966c04fSmrg])# AC_ENABLE_STATIC 3356a966c04fSmrg 3357a966c04fSmrg 3358a966c04fSmrg# AC_DISABLE_STATIC 3359a966c04fSmrg# ----------------- 3360a966c04fSmrg# set the default static flag to --disable-static 3361a966c04fSmrgAC_DEFUN([AC_DISABLE_STATIC], 3362a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3363a966c04fSmrgAC_ENABLE_STATIC(no) 3364a966c04fSmrg])# AC_DISABLE_STATIC 3365a966c04fSmrg 3366a966c04fSmrg 3367a966c04fSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 3368a966c04fSmrg# --------------------------------- 3369a966c04fSmrg# implement the --enable-fast-install flag 3370a966c04fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 3371a966c04fSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 3372a966c04fSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 3373a966c04fSmrgAC_ARG_ENABLE([fast-install], 3374a966c04fSmrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 3375a966c04fSmrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 3376a966c04fSmrg [p=${PACKAGE-default} 3377a966c04fSmrg case $enableval in 3378a966c04fSmrg yes) enable_fast_install=yes ;; 3379a966c04fSmrg no) enable_fast_install=no ;; 3380a966c04fSmrg *) 3381a966c04fSmrg enable_fast_install=no 3382a966c04fSmrg # Look at the argument we got. We use all the common list separators. 3383a966c04fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3384a966c04fSmrg for pkg in $enableval; do 3385a966c04fSmrg IFS="$lt_save_ifs" 3386a966c04fSmrg if test "X$pkg" = "X$p"; then 3387a966c04fSmrg enable_fast_install=yes 3388a966c04fSmrg fi 3389a966c04fSmrg done 3390a966c04fSmrg IFS="$lt_save_ifs" 3391a966c04fSmrg ;; 3392a966c04fSmrg esac], 3393a966c04fSmrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 3394a966c04fSmrg])# AC_ENABLE_FAST_INSTALL 3395a966c04fSmrg 3396a966c04fSmrg 3397a966c04fSmrg# AC_DISABLE_FAST_INSTALL 3398a966c04fSmrg# ----------------------- 3399a966c04fSmrg# set the default to --disable-fast-install 3400a966c04fSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 3401a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3402a966c04fSmrgAC_ENABLE_FAST_INSTALL(no) 3403a966c04fSmrg])# AC_DISABLE_FAST_INSTALL 3404a966c04fSmrg 3405a966c04fSmrg 3406a966c04fSmrg# AC_LIBTOOL_PICMODE([MODE]) 3407a966c04fSmrg# -------------------------- 3408a966c04fSmrg# implement the --with-pic flag 3409a966c04fSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 3410a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 3411a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3412a966c04fSmrgpic_mode=ifelse($#,1,$1,default) 3413a966c04fSmrg])# AC_LIBTOOL_PICMODE 3414a966c04fSmrg 3415a966c04fSmrg 3416a966c04fSmrg# AC_PROG_EGREP 3417a966c04fSmrg# ------------- 3418a966c04fSmrg# This is predefined starting with Autoconf 2.54, so this conditional 3419a966c04fSmrg# definition can be removed once we require Autoconf 2.54 or later. 3420a966c04fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 3421a966c04fSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 3422a966c04fSmrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 3423a966c04fSmrg then ac_cv_prog_egrep='grep -E' 3424a966c04fSmrg else ac_cv_prog_egrep='egrep' 3425a966c04fSmrg fi]) 3426a966c04fSmrg EGREP=$ac_cv_prog_egrep 3427a966c04fSmrg AC_SUBST([EGREP]) 3428a966c04fSmrg])]) 3429a966c04fSmrg 3430a966c04fSmrg 3431a966c04fSmrg# AC_PATH_TOOL_PREFIX 3432a966c04fSmrg# ------------------- 3433a966c04fSmrg# find a file program which can recognise shared library 3434a966c04fSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 3435a966c04fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 3436a966c04fSmrgAC_MSG_CHECKING([for $1]) 3437a966c04fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3438a966c04fSmrg[case $MAGIC_CMD in 3439a966c04fSmrg[[\\/*] | ?:[\\/]*]) 3440a966c04fSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 3441a966c04fSmrg ;; 3442a966c04fSmrg*) 3443a966c04fSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 3444a966c04fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3445a966c04fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3446a966c04fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3447a966c04fSmrgdnl not every word. This closes a longstanding sh security hole. 3448a966c04fSmrg ac_dummy="ifelse([$2], , $PATH, [$2])" 3449a966c04fSmrg for ac_dir in $ac_dummy; do 3450a966c04fSmrg IFS="$lt_save_ifs" 3451a966c04fSmrg test -z "$ac_dir" && ac_dir=. 3452a966c04fSmrg if test -f $ac_dir/$1; then 3453a966c04fSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 3454a966c04fSmrg if test -n "$file_magic_test_file"; then 3455a966c04fSmrg case $deplibs_check_method in 3456a966c04fSmrg "file_magic "*) 3457a966c04fSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3458a966c04fSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3459a966c04fSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3460a966c04fSmrg $EGREP "$file_magic_regex" > /dev/null; then 3461a966c04fSmrg : 3462a966c04fSmrg else 3463a966c04fSmrg cat <<EOF 1>&2 3464a966c04fSmrg 3465a966c04fSmrg*** Warning: the command libtool uses to detect shared libraries, 3466a966c04fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3467a966c04fSmrg*** The result is that libtool may fail to recognize shared libraries 3468a966c04fSmrg*** as such. This will affect the creation of libtool libraries that 3469a966c04fSmrg*** depend on shared libraries, but programs linked with such libtool 3470a966c04fSmrg*** libraries will work regardless of this problem. Nevertheless, you 3471a966c04fSmrg*** may want to report the problem to your system manager and/or to 3472a966c04fSmrg*** bug-libtool@gnu.org 3473a966c04fSmrg 3474a966c04fSmrgEOF 3475a966c04fSmrg fi ;; 3476a966c04fSmrg esac 3477a966c04fSmrg fi 3478a966c04fSmrg break 3479a966c04fSmrg fi 3480a966c04fSmrg done 3481a966c04fSmrg IFS="$lt_save_ifs" 3482a966c04fSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 3483a966c04fSmrg ;; 3484a966c04fSmrgesac]) 3485a966c04fSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3486a966c04fSmrgif test -n "$MAGIC_CMD"; then 3487a966c04fSmrg AC_MSG_RESULT($MAGIC_CMD) 3488a966c04fSmrgelse 3489a966c04fSmrg AC_MSG_RESULT(no) 3490a966c04fSmrgfi 3491a966c04fSmrg])# AC_PATH_TOOL_PREFIX 3492a966c04fSmrg 3493a966c04fSmrg 3494a966c04fSmrg# AC_PATH_MAGIC 3495a966c04fSmrg# ------------- 3496a966c04fSmrg# find a file program which can recognise a shared library 3497a966c04fSmrgAC_DEFUN([AC_PATH_MAGIC], 3498a966c04fSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3499a966c04fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3500a966c04fSmrg if test -n "$ac_tool_prefix"; then 3501a966c04fSmrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3502a966c04fSmrg else 3503a966c04fSmrg MAGIC_CMD=: 3504a966c04fSmrg fi 3505a966c04fSmrgfi 3506a966c04fSmrg])# AC_PATH_MAGIC 3507a966c04fSmrg 3508a966c04fSmrg 3509a966c04fSmrg# AC_PROG_LD 3510a966c04fSmrg# ---------- 3511a966c04fSmrg# find the pathname to the GNU or non-GNU linker 3512a966c04fSmrgAC_DEFUN([AC_PROG_LD], 3513a966c04fSmrg[AC_ARG_WITH([gnu-ld], 3514a966c04fSmrg [AC_HELP_STRING([--with-gnu-ld], 3515a966c04fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3516a966c04fSmrg [test "$withval" = no || with_gnu_ld=yes], 3517a966c04fSmrg [with_gnu_ld=no]) 3518a966c04fSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 3519a966c04fSmrgAC_REQUIRE([AC_PROG_CC])dnl 3520a966c04fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3521a966c04fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3522a966c04fSmrgac_prog=ld 3523a966c04fSmrgif test "$GCC" = yes; then 3524a966c04fSmrg # Check if gcc -print-prog-name=ld gives a path. 3525a966c04fSmrg AC_MSG_CHECKING([for ld used by $CC]) 3526a966c04fSmrg case $host in 3527a966c04fSmrg *-*-mingw*) 3528a966c04fSmrg # gcc leaves a trailing carriage return which upsets mingw 3529a966c04fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3530a966c04fSmrg *) 3531a966c04fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3532a966c04fSmrg esac 3533a966c04fSmrg case $ac_prog in 3534a966c04fSmrg # Accept absolute paths. 3535a966c04fSmrg [[\\/]]* | ?:[[\\/]]*) 3536a966c04fSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3537a966c04fSmrg # Canonicalize the pathname of ld 3538a966c04fSmrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 3539a966c04fSmrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 3540a966c04fSmrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 3541a966c04fSmrg done 3542a966c04fSmrg test -z "$LD" && LD="$ac_prog" 3543a966c04fSmrg ;; 3544a966c04fSmrg "") 3545a966c04fSmrg # If it fails, then pretend we aren't using GCC. 3546a966c04fSmrg ac_prog=ld 3547a966c04fSmrg ;; 3548a966c04fSmrg *) 3549a966c04fSmrg # If it is relative, then search for the first ld in PATH. 3550a966c04fSmrg with_gnu_ld=unknown 3551a966c04fSmrg ;; 3552a966c04fSmrg esac 3553a966c04fSmrgelif test "$with_gnu_ld" = yes; then 3554a966c04fSmrg AC_MSG_CHECKING([for GNU ld]) 3555a966c04fSmrgelse 3556a966c04fSmrg AC_MSG_CHECKING([for non-GNU ld]) 3557a966c04fSmrgfi 3558a966c04fSmrgAC_CACHE_VAL(lt_cv_path_LD, 3559a966c04fSmrg[if test -z "$LD"; then 3560a966c04fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3561a966c04fSmrg for ac_dir in $PATH; do 3562a966c04fSmrg IFS="$lt_save_ifs" 3563a966c04fSmrg test -z "$ac_dir" && ac_dir=. 3564a966c04fSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3565a966c04fSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 3566a966c04fSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3567a966c04fSmrg # but apparently some variants of GNU ld only accept -v. 3568a966c04fSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3569a966c04fSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3570a966c04fSmrg *GNU* | *'with BFD'*) 3571a966c04fSmrg test "$with_gnu_ld" != no && break 3572a966c04fSmrg ;; 3573a966c04fSmrg *) 3574a966c04fSmrg test "$with_gnu_ld" != yes && break 3575a966c04fSmrg ;; 3576a966c04fSmrg esac 3577a966c04fSmrg fi 3578a966c04fSmrg done 3579a966c04fSmrg IFS="$lt_save_ifs" 3580a966c04fSmrgelse 3581a966c04fSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3582a966c04fSmrgfi]) 3583a966c04fSmrgLD="$lt_cv_path_LD" 3584a966c04fSmrgif test -n "$LD"; then 3585a966c04fSmrg AC_MSG_RESULT($LD) 3586a966c04fSmrgelse 3587a966c04fSmrg AC_MSG_RESULT(no) 3588a966c04fSmrgfi 3589a966c04fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3590a966c04fSmrgAC_PROG_LD_GNU 3591a966c04fSmrg])# AC_PROG_LD 3592a966c04fSmrg 3593a966c04fSmrg 3594a966c04fSmrg# AC_PROG_LD_GNU 3595a966c04fSmrg# -------------- 3596a966c04fSmrgAC_DEFUN([AC_PROG_LD_GNU], 3597a966c04fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 3598a966c04fSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3599a966c04fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3600a966c04fSmrgcase `$LD -v 2>&1 </dev/null` in 3601a966c04fSmrg*GNU* | *'with BFD'*) 3602a966c04fSmrg lt_cv_prog_gnu_ld=yes 3603a966c04fSmrg ;; 3604a966c04fSmrg*) 3605a966c04fSmrg lt_cv_prog_gnu_ld=no 3606a966c04fSmrg ;; 3607a966c04fSmrgesac]) 3608a966c04fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3609a966c04fSmrg])# AC_PROG_LD_GNU 3610a966c04fSmrg 3611a966c04fSmrg 3612a966c04fSmrg# AC_PROG_LD_RELOAD_FLAG 3613a966c04fSmrg# ---------------------- 3614a966c04fSmrg# find reload flag for linker 3615a966c04fSmrg# -- PORTME Some linkers may need a different reload flag. 3616a966c04fSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 3617a966c04fSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3618a966c04fSmrg lt_cv_ld_reload_flag, 3619a966c04fSmrg [lt_cv_ld_reload_flag='-r']) 3620a966c04fSmrgreload_flag=$lt_cv_ld_reload_flag 3621a966c04fSmrgcase $reload_flag in 3622a966c04fSmrg"" | " "*) ;; 3623a966c04fSmrg*) reload_flag=" $reload_flag" ;; 3624a966c04fSmrgesac 3625a966c04fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3626a966c04fSmrgcase $host_os in 3627a966c04fSmrg darwin*) 3628a966c04fSmrg if test "$GCC" = yes; then 3629a966c04fSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3630a966c04fSmrg else 3631a966c04fSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3632a966c04fSmrg fi 3633a966c04fSmrg ;; 3634a966c04fSmrgesac 3635a966c04fSmrg])# AC_PROG_LD_RELOAD_FLAG 3636a966c04fSmrg 3637a966c04fSmrg 3638a966c04fSmrg# AC_DEPLIBS_CHECK_METHOD 3639a966c04fSmrg# ----------------------- 3640a966c04fSmrg# how to check for library dependencies 3641a966c04fSmrg# -- PORTME fill in with the dynamic library characteristics 3642a966c04fSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 3643a966c04fSmrg[AC_CACHE_CHECK([how to recognise dependent libraries], 3644a966c04fSmrglt_cv_deplibs_check_method, 3645a966c04fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3646a966c04fSmrglt_cv_file_magic_test_file= 3647a966c04fSmrglt_cv_deplibs_check_method='unknown' 3648a966c04fSmrg# Need to set the preceding variable on all platforms that support 3649a966c04fSmrg# interlibrary dependencies. 3650a966c04fSmrg# 'none' -- dependencies not supported. 3651a966c04fSmrg# `unknown' -- same as none, but documents that we really don't know. 3652a966c04fSmrg# 'pass_all' -- all dependencies passed with no checks. 3653a966c04fSmrg# 'test_compile' -- check by making test program. 3654a966c04fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3655a966c04fSmrg# which responds to the $file_magic_cmd with a given extended regex. 3656a966c04fSmrg# If you have `file' or equivalent on your system and you're not sure 3657a966c04fSmrg# whether `pass_all' will *always* work, you probably want this one. 3658a966c04fSmrg 3659a966c04fSmrgcase $host_os in 3660a966c04fSmrgaix4* | aix5*) 3661a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3662a966c04fSmrg ;; 3663a966c04fSmrg 3664a966c04fSmrgbeos*) 3665a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3666a966c04fSmrg ;; 3667a966c04fSmrg 3668a966c04fSmrgbsdi[[45]]*) 3669a966c04fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3670a966c04fSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3671a966c04fSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3672a966c04fSmrg ;; 3673a966c04fSmrg 3674a966c04fSmrgcygwin*) 3675a966c04fSmrg # func_win32_libid is a shell function defined in ltmain.sh 3676a966c04fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3677a966c04fSmrg lt_cv_file_magic_cmd='func_win32_libid' 3678a966c04fSmrg ;; 3679a966c04fSmrg 3680a966c04fSmrgmingw* | pw32*) 3681a966c04fSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3682a966c04fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump'. 3683a966c04fSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 3684a966c04fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3685a966c04fSmrg ;; 3686a966c04fSmrg 3687a966c04fSmrgdarwin* | rhapsody*) 3688a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3689a966c04fSmrg ;; 3690a966c04fSmrg 3691a966c04fSmrgfreebsd* | kfreebsd*-gnu | dragonfly*) 3692a966c04fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 3693a966c04fSmrg case $host_cpu in 3694a966c04fSmrg i*86 ) 3695a966c04fSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3696a966c04fSmrg # Let's accept both of them until this is cleared up. 3697a966c04fSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3698a966c04fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3699a966c04fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3700a966c04fSmrg ;; 3701a966c04fSmrg esac 3702a966c04fSmrg else 3703a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3704a966c04fSmrg fi 3705a966c04fSmrg ;; 3706a966c04fSmrg 3707a966c04fSmrggnu*) 3708a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3709a966c04fSmrg ;; 3710a966c04fSmrg 3711a966c04fSmrghpux10.20* | hpux11*) 3712a966c04fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3713a966c04fSmrg case $host_cpu in 3714a966c04fSmrg ia64*) 3715a966c04fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3716a966c04fSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3717a966c04fSmrg ;; 3718a966c04fSmrg hppa*64*) 3719a966c04fSmrg [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]'] 3720a966c04fSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3721a966c04fSmrg ;; 3722a966c04fSmrg *) 3723a966c04fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 3724a966c04fSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3725a966c04fSmrg ;; 3726a966c04fSmrg esac 3727a966c04fSmrg ;; 3728a966c04fSmrg 3729a966c04fSmrginterix3*) 3730a966c04fSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3731a966c04fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3732a966c04fSmrg ;; 3733a966c04fSmrg 3734a966c04fSmrgirix5* | irix6* | nonstopux*) 3735a966c04fSmrg case $LD in 3736a966c04fSmrg *-32|*"-32 ") libmagic=32-bit;; 3737a966c04fSmrg *-n32|*"-n32 ") libmagic=N32;; 3738a966c04fSmrg *-64|*"-64 ") libmagic=64-bit;; 3739a966c04fSmrg *) libmagic=never-match;; 3740a966c04fSmrg esac 3741a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3742a966c04fSmrg ;; 3743a966c04fSmrg 3744a966c04fSmrg# This must be Linux ELF. 3745a966c04fSmrglinux*) 3746a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3747a966c04fSmrg ;; 3748a966c04fSmrg 3749a966c04fSmrgnetbsd*) 3750a966c04fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 3751a966c04fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3752a966c04fSmrg else 3753a966c04fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3754a966c04fSmrg fi 3755a966c04fSmrg ;; 3756a966c04fSmrg 3757a966c04fSmrgnewos6*) 3758a966c04fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3759a966c04fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3760a966c04fSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3761a966c04fSmrg ;; 3762a966c04fSmrg 3763a966c04fSmrgnto-qnx*) 3764a966c04fSmrg lt_cv_deplibs_check_method=unknown 3765a966c04fSmrg ;; 3766a966c04fSmrg 3767a966c04fSmrgopenbsd*) 3768a966c04fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3769a966c04fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3770a966c04fSmrg else 3771a966c04fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3772a966c04fSmrg fi 3773a966c04fSmrg ;; 3774a966c04fSmrg 3775a966c04fSmrgosf3* | osf4* | osf5*) 3776a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3777a966c04fSmrg ;; 3778a966c04fSmrg 3779a966c04fSmrgsolaris*) 3780a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3781a966c04fSmrg ;; 3782a966c04fSmrg 3783a966c04fSmrgsysv4 | sysv4.3*) 3784a966c04fSmrg case $host_vendor in 3785a966c04fSmrg motorola) 3786a966c04fSmrg 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]]' 3787a966c04fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3788a966c04fSmrg ;; 3789a966c04fSmrg ncr) 3790a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3791a966c04fSmrg ;; 3792a966c04fSmrg sequent) 3793a966c04fSmrg lt_cv_file_magic_cmd='/bin/file' 3794a966c04fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3795a966c04fSmrg ;; 3796a966c04fSmrg sni) 3797a966c04fSmrg lt_cv_file_magic_cmd='/bin/file' 3798a966c04fSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3799a966c04fSmrg lt_cv_file_magic_test_file=/lib/libc.so 3800a966c04fSmrg ;; 3801a966c04fSmrg siemens) 3802a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3803a966c04fSmrg ;; 3804a966c04fSmrg pc) 3805a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3806a966c04fSmrg ;; 3807a966c04fSmrg esac 3808a966c04fSmrg ;; 3809a966c04fSmrg 3810a966c04fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3811a966c04fSmrg lt_cv_deplibs_check_method=pass_all 3812a966c04fSmrg ;; 3813a966c04fSmrgesac 3814a966c04fSmrg]) 3815a966c04fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3816a966c04fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3817a966c04fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3818a966c04fSmrg])# AC_DEPLIBS_CHECK_METHOD 3819a966c04fSmrg 3820a966c04fSmrg 3821a966c04fSmrg# AC_PROG_NM 3822a966c04fSmrg# ---------- 3823a966c04fSmrg# find the pathname to a BSD-compatible name lister 3824a966c04fSmrgAC_DEFUN([AC_PROG_NM], 3825a966c04fSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 3826a966c04fSmrg[if test -n "$NM"; then 3827a966c04fSmrg # Let the user override the test. 3828a966c04fSmrg lt_cv_path_NM="$NM" 3829a966c04fSmrgelse 3830a966c04fSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3831a966c04fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3832a966c04fSmrg lt_nm_to_check="$lt_nm_to_check nm" 3833a966c04fSmrg fi 3834a966c04fSmrg for lt_tmp_nm in $lt_nm_to_check; do 3835a966c04fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3836a966c04fSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3837a966c04fSmrg IFS="$lt_save_ifs" 3838a966c04fSmrg test -z "$ac_dir" && ac_dir=. 3839a966c04fSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3840a966c04fSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3841a966c04fSmrg # Check to see if the nm accepts a BSD-compat flag. 3842a966c04fSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3843a966c04fSmrg # nm: unknown option "B" ignored 3844a966c04fSmrg # Tru64's nm complains that /dev/null is an invalid object file 3845a966c04fSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3846a966c04fSmrg */dev/null* | *'Invalid file or object type'*) 3847a966c04fSmrg lt_cv_path_NM="$tmp_nm -B" 3848a966c04fSmrg break 3849a966c04fSmrg ;; 3850a966c04fSmrg *) 3851a966c04fSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3852a966c04fSmrg */dev/null*) 3853a966c04fSmrg lt_cv_path_NM="$tmp_nm -p" 3854a966c04fSmrg break 3855a966c04fSmrg ;; 3856a966c04fSmrg *) 3857a966c04fSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3858a966c04fSmrg continue # so that we can try to find one that supports BSD flags 3859a966c04fSmrg ;; 3860a966c04fSmrg esac 3861a966c04fSmrg ;; 3862a966c04fSmrg esac 3863a966c04fSmrg fi 3864a966c04fSmrg done 3865a966c04fSmrg IFS="$lt_save_ifs" 3866a966c04fSmrg done 3867a966c04fSmrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 3868a966c04fSmrgfi]) 3869a966c04fSmrgNM="$lt_cv_path_NM" 3870a966c04fSmrg])# AC_PROG_NM 3871a966c04fSmrg 3872a966c04fSmrg 3873a966c04fSmrg# AC_CHECK_LIBM 3874a966c04fSmrg# ------------- 3875a966c04fSmrg# check for math library 3876a966c04fSmrgAC_DEFUN([AC_CHECK_LIBM], 3877a966c04fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3878a966c04fSmrgLIBM= 3879a966c04fSmrgcase $host in 3880a966c04fSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3881a966c04fSmrg # These system don't have libm, or don't need it 3882a966c04fSmrg ;; 3883a966c04fSmrg*-ncr-sysv4.3*) 3884a966c04fSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3885a966c04fSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3886a966c04fSmrg ;; 3887a966c04fSmrg*) 3888a966c04fSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3889a966c04fSmrg ;; 3890a966c04fSmrgesac 3891a966c04fSmrg])# AC_CHECK_LIBM 3892a966c04fSmrg 3893a966c04fSmrg 3894a966c04fSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 3895a966c04fSmrg# ----------------------------------- 3896a966c04fSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and 3897a966c04fSmrg# LTDLINCL to the include flags for the libltdl header and adds 3898a966c04fSmrg# --enable-ltdl-convenience to the configure arguments. Note that 3899a966c04fSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 3900a966c04fSmrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 3901a966c04fSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 3902a966c04fSmrg# (note the single quotes!). If your package is not flat and you're not 3903a966c04fSmrg# using automake, define top_builddir and top_srcdir appropriately in 3904a966c04fSmrg# the Makefiles. 3905a966c04fSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 3906a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3907a966c04fSmrg case $enable_ltdl_convenience in 3908a966c04fSmrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 3909a966c04fSmrg "") enable_ltdl_convenience=yes 3910a966c04fSmrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 3911a966c04fSmrg esac 3912a966c04fSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 3913a966c04fSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 3914a966c04fSmrg # For backwards non-gettext consistent compatibility... 3915a966c04fSmrg INCLTDL="$LTDLINCL" 3916a966c04fSmrg])# AC_LIBLTDL_CONVENIENCE 3917a966c04fSmrg 3918a966c04fSmrg 3919a966c04fSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 3920a966c04fSmrg# ----------------------------------- 3921a966c04fSmrg# sets LIBLTDL to the link flags for the libltdl installable library and 3922a966c04fSmrg# LTDLINCL to the include flags for the libltdl header and adds 3923a966c04fSmrg# --enable-ltdl-install to the configure arguments. Note that 3924a966c04fSmrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 3925a966c04fSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 3926a966c04fSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 3927a966c04fSmrg# '${top_srcdir}/' (note the single quotes!). If your package is not 3928a966c04fSmrg# flat and you're not using automake, define top_builddir and top_srcdir 3929a966c04fSmrg# appropriately in the Makefiles. 3930a966c04fSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 3931a966c04fSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 3932a966c04fSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3933a966c04fSmrg AC_CHECK_LIB(ltdl, lt_dlinit, 3934a966c04fSmrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 3935a966c04fSmrg [if test x"$enable_ltdl_install" = xno; then 3936a966c04fSmrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 3937a966c04fSmrg else 3938a966c04fSmrg enable_ltdl_install=yes 3939a966c04fSmrg fi 3940a966c04fSmrg ]) 3941a966c04fSmrg if test x"$enable_ltdl_install" = x"yes"; then 3942a966c04fSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 3943a966c04fSmrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 3944a966c04fSmrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 3945a966c04fSmrg else 3946a966c04fSmrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 3947a966c04fSmrg LIBLTDL="-lltdl" 3948a966c04fSmrg LTDLINCL= 3949a966c04fSmrg fi 3950a966c04fSmrg # For backwards non-gettext consistent compatibility... 3951a966c04fSmrg INCLTDL="$LTDLINCL" 3952a966c04fSmrg])# AC_LIBLTDL_INSTALLABLE 3953a966c04fSmrg 3954a966c04fSmrg 3955a966c04fSmrg# AC_LIBTOOL_CXX 3956a966c04fSmrg# -------------- 3957a966c04fSmrg# enable support for C++ libraries 3958a966c04fSmrgAC_DEFUN([AC_LIBTOOL_CXX], 3959a966c04fSmrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 3960a966c04fSmrg])# AC_LIBTOOL_CXX 3961a966c04fSmrg 3962a966c04fSmrg 3963a966c04fSmrg# _LT_AC_LANG_CXX 3964a966c04fSmrg# --------------- 3965a966c04fSmrgAC_DEFUN([_LT_AC_LANG_CXX], 3966a966c04fSmrg[AC_REQUIRE([AC_PROG_CXX]) 3967a966c04fSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 3968a966c04fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 3969a966c04fSmrg])# _LT_AC_LANG_CXX 3970a966c04fSmrg 3971a966c04fSmrg# _LT_AC_PROG_CXXCPP 3972a966c04fSmrg# ------------------ 3973a966c04fSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 3974a966c04fSmrg[ 3975a966c04fSmrgAC_REQUIRE([AC_PROG_CXX]) 3976a966c04fSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 3977a966c04fSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 3978a966c04fSmrg (test "X$CXX" != "Xg++"))) ; then 3979a966c04fSmrg AC_PROG_CXXCPP 3980a966c04fSmrgfi 3981a966c04fSmrg])# _LT_AC_PROG_CXXCPP 3982a966c04fSmrg 3983a966c04fSmrg# AC_LIBTOOL_F77 3984a966c04fSmrg# -------------- 3985a966c04fSmrg# enable support for Fortran 77 libraries 3986a966c04fSmrgAC_DEFUN([AC_LIBTOOL_F77], 3987a966c04fSmrg[AC_REQUIRE([_LT_AC_LANG_F77]) 3988a966c04fSmrg])# AC_LIBTOOL_F77 3989a966c04fSmrg 3990a966c04fSmrg 3991a966c04fSmrg# _LT_AC_LANG_F77 3992a966c04fSmrg# --------------- 3993a966c04fSmrgAC_DEFUN([_LT_AC_LANG_F77], 3994a966c04fSmrg[AC_REQUIRE([AC_PROG_F77]) 3995a966c04fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 3996a966c04fSmrg])# _LT_AC_LANG_F77 3997a966c04fSmrg 3998a966c04fSmrg 3999a966c04fSmrg# AC_LIBTOOL_GCJ 4000a966c04fSmrg# -------------- 4001a966c04fSmrg# enable support for GCJ libraries 4002a966c04fSmrgAC_DEFUN([AC_LIBTOOL_GCJ], 4003a966c04fSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 4004a966c04fSmrg])# AC_LIBTOOL_GCJ 4005a966c04fSmrg 4006a966c04fSmrg 4007a966c04fSmrg# _LT_AC_LANG_GCJ 4008a966c04fSmrg# --------------- 4009a966c04fSmrgAC_DEFUN([_LT_AC_LANG_GCJ], 4010a966c04fSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 4011a966c04fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 4012a966c04fSmrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 4013a966c04fSmrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 4014a966c04fSmrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 4015a966c04fSmrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 4016a966c04fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 4017a966c04fSmrg])# _LT_AC_LANG_GCJ 4018a966c04fSmrg 4019a966c04fSmrg 4020a966c04fSmrg# AC_LIBTOOL_RC 4021a966c04fSmrg# ------------- 4022a966c04fSmrg# enable support for Windows resource files 4023a966c04fSmrgAC_DEFUN([AC_LIBTOOL_RC], 4024a966c04fSmrg[AC_REQUIRE([LT_AC_PROG_RC]) 4025a966c04fSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 4026a966c04fSmrg])# AC_LIBTOOL_RC 4027a966c04fSmrg 4028a966c04fSmrg 4029a966c04fSmrg# AC_LIBTOOL_LANG_C_CONFIG 4030a966c04fSmrg# ------------------------ 4031a966c04fSmrg# Ensure that the configuration vars for the C compiler are 4032a966c04fSmrg# suitably defined. Those variables are subsequently used by 4033a966c04fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4034a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 4035a966c04fSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 4036a966c04fSmrg[lt_save_CC="$CC" 4037a966c04fSmrgAC_LANG_PUSH(C) 4038a966c04fSmrg 4039a966c04fSmrg# Source file extension for C test sources. 4040a966c04fSmrgac_ext=c 4041a966c04fSmrg 4042a966c04fSmrg# Object file extension for compiled C test sources. 4043a966c04fSmrgobjext=o 4044a966c04fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4045a966c04fSmrg 4046a966c04fSmrg# Code to be used in simple compile tests 4047a966c04fSmrglt_simple_compile_test_code="int some_variable = 0;\n" 4048a966c04fSmrg 4049a966c04fSmrg# Code to be used in simple link tests 4050a966c04fSmrglt_simple_link_test_code='int main(){return(0);}\n' 4051a966c04fSmrg 4052a966c04fSmrg_LT_AC_SYS_COMPILER 4053a966c04fSmrg 4054a966c04fSmrg# save warnings/boilerplate of simple test code 4055a966c04fSmrg_LT_COMPILER_BOILERPLATE 4056a966c04fSmrg_LT_LINKER_BOILERPLATE 4057a966c04fSmrg 4058a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4059a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 4060a966c04fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 4061a966c04fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4062a966c04fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 4063a966c04fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4064a966c04fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4065a966c04fSmrgAC_LIBTOOL_SYS_LIB_STRIP 4066a966c04fSmrgAC_LIBTOOL_DLOPEN_SELF 4067a966c04fSmrg 4068a966c04fSmrg# Report which library types will actually be built 4069a966c04fSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 4070a966c04fSmrgAC_MSG_RESULT([$can_build_shared]) 4071a966c04fSmrg 4072a966c04fSmrgAC_MSG_CHECKING([whether to build shared libraries]) 4073a966c04fSmrgtest "$can_build_shared" = "no" && enable_shared=no 4074a966c04fSmrg 4075a966c04fSmrg# On AIX, shared libraries and static libraries use the same namespace, and 4076a966c04fSmrg# are all built from PIC. 4077a966c04fSmrgcase $host_os in 4078a966c04fSmrgaix3*) 4079a966c04fSmrg test "$enable_shared" = yes && enable_static=no 4080a966c04fSmrg if test -n "$RANLIB"; then 4081a966c04fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 4082a966c04fSmrg postinstall_cmds='$RANLIB $lib' 4083a966c04fSmrg fi 4084a966c04fSmrg ;; 4085a966c04fSmrg 4086a966c04fSmrgaix4* | aix5*) 4087a966c04fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4088a966c04fSmrg test "$enable_shared" = yes && enable_static=no 4089a966c04fSmrg fi 4090a966c04fSmrg ;; 4091a966c04fSmrgesac 4092a966c04fSmrgAC_MSG_RESULT([$enable_shared]) 4093a966c04fSmrg 4094a966c04fSmrgAC_MSG_CHECKING([whether to build static libraries]) 4095a966c04fSmrg# Make sure either enable_shared or enable_static is yes. 4096a966c04fSmrgtest "$enable_shared" = yes || enable_static=yes 4097a966c04fSmrgAC_MSG_RESULT([$enable_static]) 4098a966c04fSmrg 4099a966c04fSmrgAC_LIBTOOL_CONFIG($1) 4100a966c04fSmrg 4101a966c04fSmrgAC_LANG_POP 4102a966c04fSmrgCC="$lt_save_CC" 4103a966c04fSmrg])# AC_LIBTOOL_LANG_C_CONFIG 4104a966c04fSmrg 4105a966c04fSmrg 4106a966c04fSmrg# AC_LIBTOOL_LANG_CXX_CONFIG 4107a966c04fSmrg# -------------------------- 4108a966c04fSmrg# Ensure that the configuration vars for the C compiler are 4109a966c04fSmrg# suitably defined. Those variables are subsequently used by 4110a966c04fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4111a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 4112a966c04fSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 4113a966c04fSmrg[AC_LANG_PUSH(C++) 4114a966c04fSmrgAC_REQUIRE([AC_PROG_CXX]) 4115a966c04fSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 4116a966c04fSmrg 4117a966c04fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4118a966c04fSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4119a966c04fSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 4120a966c04fSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4121a966c04fSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4122a966c04fSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 4123a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4124a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4125a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4126a966c04fSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4127a966c04fSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4128a966c04fSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4129a966c04fSmrg_LT_AC_TAGVAR(module_cmds, $1)= 4130a966c04fSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4131a966c04fSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4132a966c04fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4133a966c04fSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 4134a966c04fSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4135a966c04fSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4136a966c04fSmrg 4137a966c04fSmrg# Dependencies to place before and after the object being linked: 4138a966c04fSmrg_LT_AC_TAGVAR(predep_objects, $1)= 4139a966c04fSmrg_LT_AC_TAGVAR(postdep_objects, $1)= 4140a966c04fSmrg_LT_AC_TAGVAR(predeps, $1)= 4141a966c04fSmrg_LT_AC_TAGVAR(postdeps, $1)= 4142a966c04fSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 4143a966c04fSmrg 4144a966c04fSmrg# Source file extension for C++ test sources. 4145a966c04fSmrgac_ext=cpp 4146a966c04fSmrg 4147a966c04fSmrg# Object file extension for compiled C++ test sources. 4148a966c04fSmrgobjext=o 4149a966c04fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 4150a966c04fSmrg 4151a966c04fSmrg# Code to be used in simple compile tests 4152a966c04fSmrglt_simple_compile_test_code="int some_variable = 0;\n" 4153a966c04fSmrg 4154a966c04fSmrg# Code to be used in simple link tests 4155a966c04fSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 4156a966c04fSmrg 4157a966c04fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4158a966c04fSmrg_LT_AC_SYS_COMPILER 4159a966c04fSmrg 4160a966c04fSmrg# save warnings/boilerplate of simple test code 4161a966c04fSmrg_LT_COMPILER_BOILERPLATE 4162a966c04fSmrg_LT_LINKER_BOILERPLATE 4163a966c04fSmrg 4164a966c04fSmrg# Allow CC to be a program name with arguments. 4165a966c04fSmrglt_save_CC=$CC 4166a966c04fSmrglt_save_LD=$LD 4167a966c04fSmrglt_save_GCC=$GCC 4168a966c04fSmrgGCC=$GXX 4169a966c04fSmrglt_save_with_gnu_ld=$with_gnu_ld 4170a966c04fSmrglt_save_path_LD=$lt_cv_path_LD 4171a966c04fSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 4172a966c04fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 4173a966c04fSmrgelse 4174a966c04fSmrg $as_unset lt_cv_prog_gnu_ld 4175a966c04fSmrgfi 4176a966c04fSmrgif test -n "${lt_cv_path_LDCXX+set}"; then 4177a966c04fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 4178a966c04fSmrgelse 4179a966c04fSmrg $as_unset lt_cv_path_LD 4180a966c04fSmrgfi 4181a966c04fSmrgtest -z "${LDCXX+set}" || LD=$LDCXX 4182a966c04fSmrgCC=${CXX-"c++"} 4183a966c04fSmrgcompiler=$CC 4184a966c04fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 4185a966c04fSmrg_LT_CC_BASENAME([$compiler]) 4186a966c04fSmrg 4187a966c04fSmrg# We don't want -fno-exception wen compiling C++ code, so set the 4188a966c04fSmrg# no_builtin_flag separately 4189a966c04fSmrgif test "$GXX" = yes; then 4190a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4191a966c04fSmrgelse 4192a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4193a966c04fSmrgfi 4194a966c04fSmrg 4195a966c04fSmrgif test "$GXX" = yes; then 4196a966c04fSmrg # Set up default GNU C++ configuration 4197a966c04fSmrg 4198a966c04fSmrg AC_PROG_LD 4199a966c04fSmrg 4200a966c04fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 4201a966c04fSmrg # archiving commands below assume that GNU ld is being used. 4202a966c04fSmrg if test "$with_gnu_ld" = yes; then 4203a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4204a966c04fSmrg _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' 4205a966c04fSmrg 4206a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 4207a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4208a966c04fSmrg 4209a966c04fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4210a966c04fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 4211a966c04fSmrg # investigate it a little bit more. (MM) 4212a966c04fSmrg wlarc='${wl}' 4213a966c04fSmrg 4214a966c04fSmrg # ancient GNU ld didn't support --whole-archive et. al. 4215a966c04fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 4216a966c04fSmrg grep 'no-whole-archive' > /dev/null; then 4217a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4218a966c04fSmrg else 4219a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4220a966c04fSmrg fi 4221a966c04fSmrg else 4222a966c04fSmrg with_gnu_ld=no 4223a966c04fSmrg wlarc= 4224a966c04fSmrg 4225a966c04fSmrg # A generic and very simple default shared library creation 4226a966c04fSmrg # command for GNU C++ for the case where it uses the native 4227a966c04fSmrg # linker, instead of GNU ld. If possible, this setting should 4228a966c04fSmrg # overridden to take advantage of the native linker features on 4229a966c04fSmrg # the platform it is being used on. 4230a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 4231a966c04fSmrg fi 4232a966c04fSmrg 4233a966c04fSmrg # Commands to make compiler produce verbose output that lists 4234a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4235a966c04fSmrg # linking a shared library. 4236a966c04fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4237a966c04fSmrg 4238a966c04fSmrgelse 4239a966c04fSmrg GXX=no 4240a966c04fSmrg with_gnu_ld=no 4241a966c04fSmrg wlarc= 4242a966c04fSmrgfi 4243a966c04fSmrg 4244a966c04fSmrg# PORTME: fill in a description of your system's C++ link characteristics 4245a966c04fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4246a966c04fSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 4247a966c04fSmrgcase $host_os in 4248a966c04fSmrg aix3*) 4249a966c04fSmrg # FIXME: insert proper C++ library support 4250a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4251a966c04fSmrg ;; 4252a966c04fSmrg aix4* | aix5*) 4253a966c04fSmrg if test "$host_cpu" = ia64; then 4254a966c04fSmrg # On IA64, the linker does run time linking by default, so we don't 4255a966c04fSmrg # have to do anything special. 4256a966c04fSmrg aix_use_runtimelinking=no 4257a966c04fSmrg exp_sym_flag='-Bexport' 4258a966c04fSmrg no_entry_flag="" 4259a966c04fSmrg else 4260a966c04fSmrg aix_use_runtimelinking=no 4261a966c04fSmrg 4262a966c04fSmrg # Test if we are trying to use run time linking or normal 4263a966c04fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4264a966c04fSmrg # need to do runtime linking. 4265a966c04fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 4266a966c04fSmrg for ld_flag in $LDFLAGS; do 4267a966c04fSmrg case $ld_flag in 4268a966c04fSmrg *-brtl*) 4269a966c04fSmrg aix_use_runtimelinking=yes 4270a966c04fSmrg break 4271a966c04fSmrg ;; 4272a966c04fSmrg esac 4273a966c04fSmrg done 4274a966c04fSmrg ;; 4275a966c04fSmrg esac 4276a966c04fSmrg 4277a966c04fSmrg exp_sym_flag='-bexport' 4278a966c04fSmrg no_entry_flag='-bnoentry' 4279a966c04fSmrg fi 4280a966c04fSmrg 4281a966c04fSmrg # When large executables or shared objects are built, AIX ld can 4282a966c04fSmrg # have problems creating the table of contents. If linking a library 4283a966c04fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 4284a966c04fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4285a966c04fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4286a966c04fSmrg 4287a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 4288a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4289a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 4290a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4291a966c04fSmrg 4292a966c04fSmrg if test "$GXX" = yes; then 4293a966c04fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4294a966c04fSmrg # We only want to do this on AIX 4.2 and lower, the check 4295a966c04fSmrg # below for broken collect2 doesn't work under 4.3+ 4296a966c04fSmrg collect2name=`${CC} -print-prog-name=collect2` 4297a966c04fSmrg if test -f "$collect2name" && \ 4298a966c04fSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 4299a966c04fSmrg then 4300a966c04fSmrg # We have reworked collect2 4301a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4302a966c04fSmrg else 4303a966c04fSmrg # We have old collect2 4304a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 4305a966c04fSmrg # It fails to find uninstalled libraries when the uninstalled 4306a966c04fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 4307a966c04fSmrg # to unsupported forces relinking 4308a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 4309a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4310a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4311a966c04fSmrg fi 4312a966c04fSmrg ;; 4313a966c04fSmrg esac 4314a966c04fSmrg shared_flag='-shared' 4315a966c04fSmrg if test "$aix_use_runtimelinking" = yes; then 4316a966c04fSmrg shared_flag="$shared_flag "'${wl}-G' 4317a966c04fSmrg fi 4318a966c04fSmrg else 4319a966c04fSmrg # not using gcc 4320a966c04fSmrg if test "$host_cpu" = ia64; then 4321a966c04fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4322a966c04fSmrg # chokes on -Wl,-G. The following line is correct: 4323a966c04fSmrg shared_flag='-G' 4324a966c04fSmrg else 4325a966c04fSmrg if test "$aix_use_runtimelinking" = yes; then 4326a966c04fSmrg shared_flag='${wl}-G' 4327a966c04fSmrg else 4328a966c04fSmrg shared_flag='${wl}-bM:SRE' 4329a966c04fSmrg fi 4330a966c04fSmrg fi 4331a966c04fSmrg fi 4332a966c04fSmrg 4333a966c04fSmrg # It seems that -bexpall does not export symbols beginning with 4334a966c04fSmrg # underscore (_), so it is better to generate a list of symbols to export. 4335a966c04fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 4336a966c04fSmrg if test "$aix_use_runtimelinking" = yes; then 4337a966c04fSmrg # Warning - without using the other runtime loading flags (-brtl), 4338a966c04fSmrg # -berok will link without error, but may produce a broken library. 4339a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 4340a966c04fSmrg # Determine the default libpath from the value encoded in an empty executable. 4341a966c04fSmrg _LT_AC_SYS_LIBPATH_AIX 4342a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4343a966c04fSmrg 4344a966c04fSmrg _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" 4345a966c04fSmrg else 4346a966c04fSmrg if test "$host_cpu" = ia64; then 4347a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4348a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4349a966c04fSmrg _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" 4350a966c04fSmrg else 4351a966c04fSmrg # Determine the default libpath from the value encoded in an empty executable. 4352a966c04fSmrg _LT_AC_SYS_LIBPATH_AIX 4353a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4354a966c04fSmrg # Warning - without using the other run time loading flags, 4355a966c04fSmrg # -berok will link without error, but may produce a broken library. 4356a966c04fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4357a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4358a966c04fSmrg # Exported symbols can be pulled into shared objects from archives 4359a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4360a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 4361a966c04fSmrg # This is similar to how AIX traditionally builds its shared libraries. 4362a966c04fSmrg _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' 4363a966c04fSmrg fi 4364a966c04fSmrg fi 4365a966c04fSmrg ;; 4366a966c04fSmrg 4367a966c04fSmrg beos*) 4368a966c04fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 4369a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 4370a966c04fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4371a966c04fSmrg # support --undefined. This deserves some investigation. FIXME 4372a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4373a966c04fSmrg else 4374a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4375a966c04fSmrg fi 4376a966c04fSmrg ;; 4377a966c04fSmrg 4378a966c04fSmrg chorus*) 4379a966c04fSmrg case $cc_basename in 4380a966c04fSmrg *) 4381a966c04fSmrg # FIXME: insert proper C++ library support 4382a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4383a966c04fSmrg ;; 4384a966c04fSmrg esac 4385a966c04fSmrg ;; 4386a966c04fSmrg 4387a966c04fSmrg cygwin* | mingw* | pw32*) 4388a966c04fSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4389a966c04fSmrg # as there is no search path for DLLs. 4390a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4391a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 4392a966c04fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 4393a966c04fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4394a966c04fSmrg 4395a966c04fSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 4396a966c04fSmrg _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' 4397a966c04fSmrg # If the export-symbols file already is a .def file (1st line 4398a966c04fSmrg # is EXPORTS), use it as is; otherwise, prepend... 4399a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4400a966c04fSmrg cp $export_symbols $output_objdir/$soname.def; 4401a966c04fSmrg else 4402a966c04fSmrg echo EXPORTS > $output_objdir/$soname.def; 4403a966c04fSmrg cat $export_symbols >> $output_objdir/$soname.def; 4404a966c04fSmrg fi~ 4405a966c04fSmrg $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' 4406a966c04fSmrg else 4407a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4408a966c04fSmrg fi 4409a966c04fSmrg ;; 4410a966c04fSmrg darwin* | rhapsody*) 4411a966c04fSmrg case $host_os in 4412a966c04fSmrg rhapsody* | darwin1.[[012]]) 4413a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 4414a966c04fSmrg ;; 4415a966c04fSmrg *) # Darwin 1.3 on 4416a966c04fSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 4417a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 4418a966c04fSmrg else 4419a966c04fSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 4420a966c04fSmrg 10.[[012]]) 4421a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 4422a966c04fSmrg ;; 4423a966c04fSmrg 10.*) 4424a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 4425a966c04fSmrg ;; 4426a966c04fSmrg esac 4427a966c04fSmrg fi 4428a966c04fSmrg ;; 4429a966c04fSmrg esac 4430a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4431a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 4432a966c04fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 4433a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4434a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 4435a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4436a966c04fSmrg 4437a966c04fSmrg if test "$GXX" = yes ; then 4438a966c04fSmrg lt_int_apple_cc_single_mod=no 4439a966c04fSmrg output_verbose_link_cmd='echo' 4440a966c04fSmrg if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 4441a966c04fSmrg lt_int_apple_cc_single_mod=yes 4442a966c04fSmrg fi 4443a966c04fSmrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 4444a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 4445a966c04fSmrg else 4446a966c04fSmrg _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' 4447a966c04fSmrg fi 4448a966c04fSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 4449a966c04fSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 4450a966c04fSmrg if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 4451a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 4452a966c04fSmrg else 4453a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 4454a966c04fSmrg fi 4455a966c04fSmrg _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}' 4456a966c04fSmrg else 4457a966c04fSmrg case $cc_basename in 4458a966c04fSmrg xlc*) 4459a966c04fSmrg output_verbose_link_cmd='echo' 4460a966c04fSmrg _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` $verstring' 4461a966c04fSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 4462a966c04fSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 4463a966c04fSmrg _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 4464a966c04fSmrg _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}' 4465a966c04fSmrg ;; 4466a966c04fSmrg *) 4467a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4468a966c04fSmrg ;; 4469a966c04fSmrg esac 4470a966c04fSmrg fi 4471a966c04fSmrg ;; 4472a966c04fSmrg 4473a966c04fSmrg dgux*) 4474a966c04fSmrg case $cc_basename in 4475a966c04fSmrg ec++*) 4476a966c04fSmrg # FIXME: insert proper C++ library support 4477a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4478a966c04fSmrg ;; 4479a966c04fSmrg ghcx*) 4480a966c04fSmrg # Green Hills C++ Compiler 4481a966c04fSmrg # FIXME: insert proper C++ library support 4482a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4483a966c04fSmrg ;; 4484a966c04fSmrg *) 4485a966c04fSmrg # FIXME: insert proper C++ library support 4486a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4487a966c04fSmrg ;; 4488a966c04fSmrg esac 4489a966c04fSmrg ;; 4490a966c04fSmrg freebsd[[12]]*) 4491a966c04fSmrg # C++ shared libraries reported to be fairly broken before switch to ELF 4492a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4493a966c04fSmrg ;; 4494a966c04fSmrg freebsd-elf*) 4495a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4496a966c04fSmrg ;; 4497a966c04fSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 4498a966c04fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 4499a966c04fSmrg # conventions 4500a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 4501a966c04fSmrg ;; 4502a966c04fSmrg gnu*) 4503a966c04fSmrg ;; 4504a966c04fSmrg hpux9*) 4505a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4506a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4507a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4508a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4509a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 4510a966c04fSmrg # but as the default 4511a966c04fSmrg # location of the library. 4512a966c04fSmrg 4513a966c04fSmrg case $cc_basename in 4514a966c04fSmrg CC*) 4515a966c04fSmrg # FIXME: insert proper C++ library support 4516a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4517a966c04fSmrg ;; 4518a966c04fSmrg aCC*) 4519a966c04fSmrg _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' 4520a966c04fSmrg # Commands to make compiler produce verbose output that lists 4521a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4522a966c04fSmrg # linking a shared library. 4523a966c04fSmrg # 4524a966c04fSmrg # There doesn't appear to be a way to prevent this compiler from 4525a966c04fSmrg # explicitly linking system object files so we need to strip them 4526a966c04fSmrg # from the output so that they don't get included in the library 4527a966c04fSmrg # dependencies. 4528a966c04fSmrg 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' 4529a966c04fSmrg ;; 4530a966c04fSmrg *) 4531a966c04fSmrg if test "$GXX" = yes; then 4532a966c04fSmrg _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' 4533a966c04fSmrg else 4534a966c04fSmrg # FIXME: insert proper C++ library support 4535a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4536a966c04fSmrg fi 4537a966c04fSmrg ;; 4538a966c04fSmrg esac 4539a966c04fSmrg ;; 4540a966c04fSmrg hpux10*|hpux11*) 4541a966c04fSmrg if test $with_gnu_ld = no; then 4542a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4543a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4544a966c04fSmrg 4545a966c04fSmrg case $host_cpu in 4546a966c04fSmrg hppa*64*|ia64*) 4547a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4548a966c04fSmrg ;; 4549a966c04fSmrg *) 4550a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4551a966c04fSmrg ;; 4552a966c04fSmrg esac 4553a966c04fSmrg fi 4554a966c04fSmrg case $host_cpu in 4555a966c04fSmrg hppa*64*|ia64*) 4556a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 4557a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4558a966c04fSmrg ;; 4559a966c04fSmrg *) 4560a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4561a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 4562a966c04fSmrg # but as the default 4563a966c04fSmrg # location of the library. 4564a966c04fSmrg ;; 4565a966c04fSmrg esac 4566a966c04fSmrg 4567a966c04fSmrg case $cc_basename in 4568a966c04fSmrg CC*) 4569a966c04fSmrg # FIXME: insert proper C++ library support 4570a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4571a966c04fSmrg ;; 4572a966c04fSmrg aCC*) 4573a966c04fSmrg case $host_cpu in 4574a966c04fSmrg hppa*64*) 4575a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4576a966c04fSmrg ;; 4577a966c04fSmrg ia64*) 4578a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4579a966c04fSmrg ;; 4580a966c04fSmrg *) 4581a966c04fSmrg _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' 4582a966c04fSmrg ;; 4583a966c04fSmrg esac 4584a966c04fSmrg # Commands to make compiler produce verbose output that lists 4585a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4586a966c04fSmrg # linking a shared library. 4587a966c04fSmrg # 4588a966c04fSmrg # There doesn't appear to be a way to prevent this compiler from 4589a966c04fSmrg # explicitly linking system object files so we need to strip them 4590a966c04fSmrg # from the output so that they don't get included in the library 4591a966c04fSmrg # dependencies. 4592a966c04fSmrg 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' 4593a966c04fSmrg ;; 4594a966c04fSmrg *) 4595a966c04fSmrg if test "$GXX" = yes; then 4596a966c04fSmrg if test $with_gnu_ld = no; then 4597a966c04fSmrg case $host_cpu in 4598a966c04fSmrg hppa*64*) 4599a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4600a966c04fSmrg ;; 4601a966c04fSmrg ia64*) 4602a966c04fSmrg _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' 4603a966c04fSmrg ;; 4604a966c04fSmrg *) 4605a966c04fSmrg _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' 4606a966c04fSmrg ;; 4607a966c04fSmrg esac 4608a966c04fSmrg fi 4609a966c04fSmrg else 4610a966c04fSmrg # FIXME: insert proper C++ library support 4611a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4612a966c04fSmrg fi 4613a966c04fSmrg ;; 4614a966c04fSmrg esac 4615a966c04fSmrg ;; 4616a966c04fSmrg interix3*) 4617a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 4618a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4619a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4620a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4621a966c04fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4622a966c04fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4623a966c04fSmrg # default) and relocated if they conflict, which is a slow very memory 4624a966c04fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4625a966c04fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4626a966c04fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4627a966c04fSmrg _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' 4628a966c04fSmrg _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' 4629a966c04fSmrg ;; 4630a966c04fSmrg irix5* | irix6*) 4631a966c04fSmrg case $cc_basename in 4632a966c04fSmrg CC*) 4633a966c04fSmrg # SGI C++ 4634a966c04fSmrg _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' 4635a966c04fSmrg 4636a966c04fSmrg # Archives containing C++ object files must be created using 4637a966c04fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 4638a966c04fSmrg # necessary to make sure instantiated templates are included 4639a966c04fSmrg # in the archive. 4640a966c04fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 4641a966c04fSmrg ;; 4642a966c04fSmrg *) 4643a966c04fSmrg if test "$GXX" = yes; then 4644a966c04fSmrg if test "$with_gnu_ld" = no; then 4645a966c04fSmrg _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' 4646a966c04fSmrg else 4647a966c04fSmrg _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' 4648a966c04fSmrg fi 4649a966c04fSmrg fi 4650a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4651a966c04fSmrg ;; 4652a966c04fSmrg esac 4653a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4654a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4655a966c04fSmrg ;; 4656a966c04fSmrg linux*) 4657a966c04fSmrg case $cc_basename in 4658a966c04fSmrg KCC*) 4659a966c04fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4660a966c04fSmrg 4661a966c04fSmrg # KCC will only create a shared library if the output file 4662a966c04fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 4663a966c04fSmrg # to its proper name (with version) after linking. 4664a966c04fSmrg _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' 4665a966c04fSmrg _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' 4666a966c04fSmrg # Commands to make compiler produce verbose output that lists 4667a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4668a966c04fSmrg # linking a shared library. 4669a966c04fSmrg # 4670a966c04fSmrg # There doesn't appear to be a way to prevent this compiler from 4671a966c04fSmrg # explicitly linking system object files so we need to strip them 4672a966c04fSmrg # from the output so that they don't get included in the library 4673a966c04fSmrg # dependencies. 4674a966c04fSmrg 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' 4675a966c04fSmrg 4676a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 4677a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4678a966c04fSmrg 4679a966c04fSmrg # Archives containing C++ object files must be created using 4680a966c04fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 4681a966c04fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 4682a966c04fSmrg ;; 4683a966c04fSmrg icpc*) 4684a966c04fSmrg # Intel C++ 4685a966c04fSmrg with_gnu_ld=yes 4686a966c04fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 4687a966c04fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 4688a966c04fSmrg # earlier do not add the objects themselves. 4689a966c04fSmrg case `$CC -V 2>&1` in 4690a966c04fSmrg *"Version 7."*) 4691a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4692a966c04fSmrg _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' 4693a966c04fSmrg ;; 4694a966c04fSmrg *) # Version 8.0 or newer 4695a966c04fSmrg tmp_idyn= 4696a966c04fSmrg case $host_cpu in 4697a966c04fSmrg ia64*) tmp_idyn=' -i_dynamic';; 4698a966c04fSmrg esac 4699a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4700a966c04fSmrg _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' 4701a966c04fSmrg ;; 4702a966c04fSmrg esac 4703a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4704a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4705a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4706a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 4707a966c04fSmrg ;; 4708a966c04fSmrg pgCC*) 4709a966c04fSmrg # Portland Group C++ compiler 4710a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 4711a966c04fSmrg _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' 4712a966c04fSmrg 4713a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 4714a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4715a966c04fSmrg _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' 4716a966c04fSmrg ;; 4717a966c04fSmrg cxx*) 4718a966c04fSmrg # Compaq C++ 4719a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4720a966c04fSmrg _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' 4721a966c04fSmrg 4722a966c04fSmrg runpath_var=LD_RUN_PATH 4723a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4724a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4725a966c04fSmrg 4726a966c04fSmrg # Commands to make compiler produce verbose output that lists 4727a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4728a966c04fSmrg # linking a shared library. 4729a966c04fSmrg # 4730a966c04fSmrg # There doesn't appear to be a way to prevent this compiler from 4731a966c04fSmrg # explicitly linking system object files so we need to strip them 4732a966c04fSmrg # from the output so that they don't get included in the library 4733a966c04fSmrg # dependencies. 4734a966c04fSmrg 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' 4735a966c04fSmrg ;; 4736a966c04fSmrg esac 4737a966c04fSmrg ;; 4738a966c04fSmrg lynxos*) 4739a966c04fSmrg # FIXME: insert proper C++ library support 4740a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4741a966c04fSmrg ;; 4742a966c04fSmrg m88k*) 4743a966c04fSmrg # FIXME: insert proper C++ library support 4744a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4745a966c04fSmrg ;; 4746a966c04fSmrg mvs*) 4747a966c04fSmrg case $cc_basename in 4748a966c04fSmrg cxx*) 4749a966c04fSmrg # FIXME: insert proper C++ library support 4750a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4751a966c04fSmrg ;; 4752a966c04fSmrg *) 4753a966c04fSmrg # FIXME: insert proper C++ library support 4754a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4755a966c04fSmrg ;; 4756a966c04fSmrg esac 4757a966c04fSmrg ;; 4758a966c04fSmrg netbsd*) 4759a966c04fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 4760a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 4761a966c04fSmrg wlarc= 4762a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4763a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4764a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4765a966c04fSmrg fi 4766a966c04fSmrg # Workaround some broken pre-1.5 toolchains 4767a966c04fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 4768a966c04fSmrg ;; 4769a966c04fSmrg openbsd2*) 4770a966c04fSmrg # C++ shared libraries are fairly broken 4771a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4772a966c04fSmrg ;; 4773a966c04fSmrg openbsd*) 4774a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4775a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4776a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 4777a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4778a966c04fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4779a966c04fSmrg _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' 4780a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4781a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4782a966c04fSmrg fi 4783a966c04fSmrg output_verbose_link_cmd='echo' 4784a966c04fSmrg ;; 4785a966c04fSmrg osf3*) 4786a966c04fSmrg case $cc_basename in 4787a966c04fSmrg KCC*) 4788a966c04fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4789a966c04fSmrg 4790a966c04fSmrg # KCC will only create a shared library if the output file 4791a966c04fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 4792a966c04fSmrg # to its proper name (with version) after linking. 4793a966c04fSmrg _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' 4794a966c04fSmrg 4795a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4796a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4797a966c04fSmrg 4798a966c04fSmrg # Archives containing C++ object files must be created using 4799a966c04fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 4800a966c04fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 4801a966c04fSmrg 4802a966c04fSmrg ;; 4803a966c04fSmrg RCC*) 4804a966c04fSmrg # Rational C++ 2.4.1 4805a966c04fSmrg # FIXME: insert proper C++ library support 4806a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4807a966c04fSmrg ;; 4808a966c04fSmrg cxx*) 4809a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4810a966c04fSmrg _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' 4811a966c04fSmrg 4812a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4813a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4814a966c04fSmrg 4815a966c04fSmrg # Commands to make compiler produce verbose output that lists 4816a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4817a966c04fSmrg # linking a shared library. 4818a966c04fSmrg # 4819a966c04fSmrg # There doesn't appear to be a way to prevent this compiler from 4820a966c04fSmrg # explicitly linking system object files so we need to strip them 4821a966c04fSmrg # from the output so that they don't get included in the library 4822a966c04fSmrg # dependencies. 4823a966c04fSmrg 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' 4824a966c04fSmrg ;; 4825a966c04fSmrg *) 4826a966c04fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4827a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4828a966c04fSmrg _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' 4829a966c04fSmrg 4830a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4831a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4832a966c04fSmrg 4833a966c04fSmrg # Commands to make compiler produce verbose output that lists 4834a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4835a966c04fSmrg # linking a shared library. 4836a966c04fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4837a966c04fSmrg 4838a966c04fSmrg else 4839a966c04fSmrg # FIXME: insert proper C++ library support 4840a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4841a966c04fSmrg fi 4842a966c04fSmrg ;; 4843a966c04fSmrg esac 4844a966c04fSmrg ;; 4845a966c04fSmrg osf4* | osf5*) 4846a966c04fSmrg case $cc_basename in 4847a966c04fSmrg KCC*) 4848a966c04fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 4849a966c04fSmrg 4850a966c04fSmrg # KCC will only create a shared library if the output file 4851a966c04fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 4852a966c04fSmrg # to its proper name (with version) after linking. 4853a966c04fSmrg _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' 4854a966c04fSmrg 4855a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4856a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4857a966c04fSmrg 4858a966c04fSmrg # Archives containing C++ object files must be created using 4859a966c04fSmrg # the KAI C++ compiler. 4860a966c04fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 4861a966c04fSmrg ;; 4862a966c04fSmrg RCC*) 4863a966c04fSmrg # Rational C++ 2.4.1 4864a966c04fSmrg # FIXME: insert proper C++ library support 4865a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4866a966c04fSmrg ;; 4867a966c04fSmrg cxx*) 4868a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4869a966c04fSmrg _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' 4870a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 4871a966c04fSmrg echo "-hidden">> $lib.exp~ 4872a966c04fSmrg $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~ 4873a966c04fSmrg $rm $lib.exp' 4874a966c04fSmrg 4875a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4876a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4877a966c04fSmrg 4878a966c04fSmrg # Commands to make compiler produce verbose output that lists 4879a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4880a966c04fSmrg # linking a shared library. 4881a966c04fSmrg # 4882a966c04fSmrg # There doesn't appear to be a way to prevent this compiler from 4883a966c04fSmrg # explicitly linking system object files so we need to strip them 4884a966c04fSmrg # from the output so that they don't get included in the library 4885a966c04fSmrg # dependencies. 4886a966c04fSmrg 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' 4887a966c04fSmrg ;; 4888a966c04fSmrg *) 4889a966c04fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4890a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4891a966c04fSmrg _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' 4892a966c04fSmrg 4893a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4894a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4895a966c04fSmrg 4896a966c04fSmrg # Commands to make compiler produce verbose output that lists 4897a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4898a966c04fSmrg # linking a shared library. 4899a966c04fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4900a966c04fSmrg 4901a966c04fSmrg else 4902a966c04fSmrg # FIXME: insert proper C++ library support 4903a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4904a966c04fSmrg fi 4905a966c04fSmrg ;; 4906a966c04fSmrg esac 4907a966c04fSmrg ;; 4908a966c04fSmrg psos*) 4909a966c04fSmrg # FIXME: insert proper C++ library support 4910a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4911a966c04fSmrg ;; 4912a966c04fSmrg sunos4*) 4913a966c04fSmrg case $cc_basename in 4914a966c04fSmrg CC*) 4915a966c04fSmrg # Sun C++ 4.x 4916a966c04fSmrg # FIXME: insert proper C++ library support 4917a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4918a966c04fSmrg ;; 4919a966c04fSmrg lcc*) 4920a966c04fSmrg # Lucid 4921a966c04fSmrg # FIXME: insert proper C++ library support 4922a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4923a966c04fSmrg ;; 4924a966c04fSmrg *) 4925a966c04fSmrg # FIXME: insert proper C++ library support 4926a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 4927a966c04fSmrg ;; 4928a966c04fSmrg esac 4929a966c04fSmrg ;; 4930a966c04fSmrg solaris*) 4931a966c04fSmrg case $cc_basename in 4932a966c04fSmrg CC*) 4933a966c04fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4934a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 4935a966c04fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 4936a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4937a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4938a966c04fSmrg $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' 4939a966c04fSmrg 4940a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4941a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4942a966c04fSmrg case $host_os in 4943a966c04fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4944a966c04fSmrg *) 4945a966c04fSmrg # The C++ compiler is used as linker so we must use $wl 4946a966c04fSmrg # flag to pass the commands to the underlying system 4947a966c04fSmrg # linker. We must also pass each convience library through 4948a966c04fSmrg # to the system linker between allextract/defaultextract. 4949a966c04fSmrg # The C++ compiler will combine linker options so we 4950a966c04fSmrg # cannot just pass the convience library names through 4951a966c04fSmrg # without $wl. 4952a966c04fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 4953a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' 4954a966c04fSmrg ;; 4955a966c04fSmrg esac 4956a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4957a966c04fSmrg 4958a966c04fSmrg output_verbose_link_cmd='echo' 4959a966c04fSmrg 4960a966c04fSmrg # Archives containing C++ object files must be created using 4961a966c04fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 4962a966c04fSmrg # necessary to make sure instantiated templates are included 4963a966c04fSmrg # in the archive. 4964a966c04fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 4965a966c04fSmrg ;; 4966a966c04fSmrg gcx*) 4967a966c04fSmrg # Green Hills C++ Compiler 4968a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4969a966c04fSmrg 4970a966c04fSmrg # The C++ compiler must be used to create the archive. 4971a966c04fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 4972a966c04fSmrg ;; 4973a966c04fSmrg *) 4974a966c04fSmrg # GNU C++ compiler with Solaris linker 4975a966c04fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4976a966c04fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 4977a966c04fSmrg if $CC --version | grep -v '^2\.7' > /dev/null; then 4978a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4979a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4980a966c04fSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 4981a966c04fSmrg 4982a966c04fSmrg # Commands to make compiler produce verbose output that lists 4983a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4984a966c04fSmrg # linking a shared library. 4985a966c04fSmrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 4986a966c04fSmrg else 4987a966c04fSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 4988a966c04fSmrg # platform. 4989a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4990a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4991a966c04fSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 4992a966c04fSmrg 4993a966c04fSmrg # Commands to make compiler produce verbose output that lists 4994a966c04fSmrg # what "hidden" libraries, object files and flags are used when 4995a966c04fSmrg # linking a shared library. 4996a966c04fSmrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 4997a966c04fSmrg fi 4998a966c04fSmrg 4999a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 5000a966c04fSmrg fi 5001a966c04fSmrg ;; 5002a966c04fSmrg esac 5003a966c04fSmrg ;; 5004a966c04fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5005a966c04fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5006a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5007a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5008a966c04fSmrg runpath_var='LD_RUN_PATH' 5009a966c04fSmrg 5010a966c04fSmrg case $cc_basename in 5011a966c04fSmrg CC*) 5012a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5013a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5014a966c04fSmrg ;; 5015a966c04fSmrg *) 5016a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5017a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5018a966c04fSmrg ;; 5019a966c04fSmrg esac 5020a966c04fSmrg ;; 5021a966c04fSmrg sysv5* | sco3.2v5* | sco5v6*) 5022a966c04fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 5023a966c04fSmrg # link with -lc, and that would cause any symbols used from libc to 5024a966c04fSmrg # always be unresolved, which means just about no library would 5025a966c04fSmrg # ever link correctly. If we're not using GNU ld we use -z text 5026a966c04fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 5027a966c04fSmrg # as -z defs. 5028a966c04fSmrg # For security reasons, it is highly recommended that you always 5029a966c04fSmrg # use absolute paths for naming shared libraries, and exclude the 5030a966c04fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 5031a966c04fSmrg # requires that you compile everything twice, which is a pain. 5032a966c04fSmrg # So that behaviour is only enabled if SCOABSPATH is set to a 5033a966c04fSmrg # non-empty value in the environment. Most likely only useful for 5034a966c04fSmrg # creating official distributions of packages. 5035a966c04fSmrg # This is a hack until libtool officially supports absolute path 5036a966c04fSmrg # names for shared libraries. 5037a966c04fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5038a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5039a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5040a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5041a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 5042a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5043a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5044a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5045a966c04fSmrg runpath_var='LD_RUN_PATH' 5046a966c04fSmrg 5047a966c04fSmrg case $cc_basename in 5048a966c04fSmrg CC*) 5049a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5050a966c04fSmrg _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' 5051a966c04fSmrg ;; 5052a966c04fSmrg *) 5053a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5054a966c04fSmrg _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' 5055a966c04fSmrg ;; 5056a966c04fSmrg esac 5057a966c04fSmrg ;; 5058a966c04fSmrg tandem*) 5059a966c04fSmrg case $cc_basename in 5060a966c04fSmrg NCC*) 5061a966c04fSmrg # NonStop-UX NCC 3.20 5062a966c04fSmrg # FIXME: insert proper C++ library support 5063a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5064a966c04fSmrg ;; 5065a966c04fSmrg *) 5066a966c04fSmrg # FIXME: insert proper C++ library support 5067a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5068a966c04fSmrg ;; 5069a966c04fSmrg esac 5070a966c04fSmrg ;; 5071a966c04fSmrg vxworks*) 5072a966c04fSmrg # FIXME: insert proper C++ library support 5073a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5074a966c04fSmrg ;; 5075a966c04fSmrg *) 5076a966c04fSmrg # FIXME: insert proper C++ library support 5077a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 5078a966c04fSmrg ;; 5079a966c04fSmrgesac 5080a966c04fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 5081a966c04fSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5082a966c04fSmrg 5083a966c04fSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 5084a966c04fSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 5085a966c04fSmrg 5086a966c04fSmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 5087a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 5088a966c04fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 5089a966c04fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 5090a966c04fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 5091a966c04fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 5092a966c04fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5093a966c04fSmrg 5094a966c04fSmrgAC_LIBTOOL_CONFIG($1) 5095a966c04fSmrg 5096a966c04fSmrgAC_LANG_POP 5097a966c04fSmrgCC=$lt_save_CC 5098a966c04fSmrgLDCXX=$LD 5099a966c04fSmrgLD=$lt_save_LD 5100a966c04fSmrgGCC=$lt_save_GCC 5101a966c04fSmrgwith_gnu_ldcxx=$with_gnu_ld 5102a966c04fSmrgwith_gnu_ld=$lt_save_with_gnu_ld 5103a966c04fSmrglt_cv_path_LDCXX=$lt_cv_path_LD 5104a966c04fSmrglt_cv_path_LD=$lt_save_path_LD 5105a966c04fSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 5106a966c04fSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 5107a966c04fSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG 5108a966c04fSmrg 5109a966c04fSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 5110a966c04fSmrg# ------------------------------------ 5111a966c04fSmrg# Figure out "hidden" library dependencies from verbose 5112a966c04fSmrg# compiler output when linking a shared library. 5113a966c04fSmrg# Parse the compiler output and extract the necessary 5114a966c04fSmrg# objects, libraries and library flags. 5115a966c04fSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 5116a966c04fSmrgdnl we can't use the lt_simple_compile_test_code here, 5117a966c04fSmrgdnl because it contains code intended for an executable, 5118a966c04fSmrgdnl not a library. It's possible we should let each 5119a966c04fSmrgdnl tag define a new lt_????_link_test_code variable, 5120a966c04fSmrgdnl but it's only used here... 5121a966c04fSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 5122a966c04fSmrgint a; 5123a966c04fSmrgvoid foo (void) { a = 0; } 5124a966c04fSmrgEOF 5125a966c04fSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 5126a966c04fSmrgclass Foo 5127a966c04fSmrg{ 5128a966c04fSmrgpublic: 5129a966c04fSmrg Foo (void) { a = 0; } 5130a966c04fSmrgprivate: 5131a966c04fSmrg int a; 5132a966c04fSmrg}; 5133a966c04fSmrgEOF 5134a966c04fSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 5135a966c04fSmrg subroutine foo 5136a966c04fSmrg implicit none 5137a966c04fSmrg integer*4 a 5138a966c04fSmrg a=0 5139a966c04fSmrg return 5140a966c04fSmrg end 5141a966c04fSmrgEOF 5142a966c04fSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 5143a966c04fSmrgpublic class foo { 5144a966c04fSmrg private int a; 5145a966c04fSmrg public void bar (void) { 5146a966c04fSmrg a = 0; 5147a966c04fSmrg } 5148a966c04fSmrg}; 5149a966c04fSmrgEOF 5150a966c04fSmrg]) 5151a966c04fSmrgdnl Parse the compiler output and extract the necessary 5152a966c04fSmrgdnl objects, libraries and library flags. 5153a966c04fSmrgif AC_TRY_EVAL(ac_compile); then 5154a966c04fSmrg # Parse the compiler output and extract the necessary 5155a966c04fSmrg # objects, libraries and library flags. 5156a966c04fSmrg 5157a966c04fSmrg # Sentinel used to keep track of whether or not we are before 5158a966c04fSmrg # the conftest object file. 5159a966c04fSmrg pre_test_object_deps_done=no 5160a966c04fSmrg 5161a966c04fSmrg # The `*' in the case matches for architectures that use `case' in 5162a966c04fSmrg # $output_verbose_cmd can trigger glob expansion during the loop 5163a966c04fSmrg # eval without this substitution. 5164a966c04fSmrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 5165a966c04fSmrg 5166a966c04fSmrg for p in `eval $output_verbose_link_cmd`; do 5167a966c04fSmrg case $p in 5168a966c04fSmrg 5169a966c04fSmrg -L* | -R* | -l*) 5170a966c04fSmrg # Some compilers place space between "-{L,R}" and the path. 5171a966c04fSmrg # Remove the space. 5172a966c04fSmrg if test $p = "-L" \ 5173a966c04fSmrg || test $p = "-R"; then 5174a966c04fSmrg prev=$p 5175a966c04fSmrg continue 5176a966c04fSmrg else 5177a966c04fSmrg prev= 5178a966c04fSmrg fi 5179a966c04fSmrg 5180a966c04fSmrg if test "$pre_test_object_deps_done" = no; then 5181a966c04fSmrg case $p in 5182a966c04fSmrg -L* | -R*) 5183a966c04fSmrg # Internal compiler library paths should come after those 5184a966c04fSmrg # provided the user. The postdeps already come after the 5185a966c04fSmrg # user supplied libs so there is no need to process them. 5186a966c04fSmrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 5187a966c04fSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 5188a966c04fSmrg else 5189a966c04fSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 5190a966c04fSmrg fi 5191a966c04fSmrg ;; 5192a966c04fSmrg # The "-l" case would never come before the object being 5193a966c04fSmrg # linked, so don't bother handling this case. 5194a966c04fSmrg esac 5195a966c04fSmrg else 5196a966c04fSmrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 5197a966c04fSmrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 5198a966c04fSmrg else 5199a966c04fSmrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 5200a966c04fSmrg fi 5201a966c04fSmrg fi 5202a966c04fSmrg ;; 5203a966c04fSmrg 5204a966c04fSmrg *.$objext) 5205a966c04fSmrg # This assumes that the test object file only shows up 5206a966c04fSmrg # once in the compiler output. 5207a966c04fSmrg if test "$p" = "conftest.$objext"; then 5208a966c04fSmrg pre_test_object_deps_done=yes 5209a966c04fSmrg continue 5210a966c04fSmrg fi 5211a966c04fSmrg 5212a966c04fSmrg if test "$pre_test_object_deps_done" = no; then 5213a966c04fSmrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 5214a966c04fSmrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 5215a966c04fSmrg else 5216a966c04fSmrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 5217a966c04fSmrg fi 5218a966c04fSmrg else 5219a966c04fSmrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 5220a966c04fSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 5221a966c04fSmrg else 5222a966c04fSmrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 5223a966c04fSmrg fi 5224a966c04fSmrg fi 5225a966c04fSmrg ;; 5226a966c04fSmrg 5227a966c04fSmrg *) ;; # Ignore the rest. 5228a966c04fSmrg 5229a966c04fSmrg esac 5230a966c04fSmrg done 5231a966c04fSmrg 5232a966c04fSmrg # Clean up. 5233a966c04fSmrg rm -f a.out a.exe 5234a966c04fSmrgelse 5235a966c04fSmrg echo "libtool.m4: error: problem compiling $1 test program" 5236a966c04fSmrgfi 5237a966c04fSmrg 5238a966c04fSmrg$rm -f confest.$objext 5239a966c04fSmrg 5240a966c04fSmrg# PORTME: override above test on systems where it is broken 5241a966c04fSmrgifelse([$1],[CXX], 5242a966c04fSmrg[case $host_os in 5243a966c04fSmrginterix3*) 5244a966c04fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 5245a966c04fSmrg # hack all around it, let's just trust "g++" to DTRT. 5246a966c04fSmrg _LT_AC_TAGVAR(predep_objects,$1)= 5247a966c04fSmrg _LT_AC_TAGVAR(postdep_objects,$1)= 5248a966c04fSmrg _LT_AC_TAGVAR(postdeps,$1)= 5249a966c04fSmrg ;; 5250a966c04fSmrg 5251a966c04fSmrgsolaris*) 5252a966c04fSmrg case $cc_basename in 5253a966c04fSmrg CC*) 5254a966c04fSmrg # Adding this requires a known-good setup of shared libraries for 5255a966c04fSmrg # Sun compiler versions before 5.6, else PIC objects from an old 5256a966c04fSmrg # archive will be linked into the output, leading to subtle bugs. 5257a966c04fSmrg _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 5258a966c04fSmrg ;; 5259a966c04fSmrg esac 5260a966c04fSmrg ;; 5261a966c04fSmrgesac 5262a966c04fSmrg]) 5263a966c04fSmrg 5264a966c04fSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 5265a966c04fSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 5266a966c04fSmrgesac 5267a966c04fSmrg])# AC_LIBTOOL_POSTDEP_PREDEP 5268a966c04fSmrg 5269a966c04fSmrg# AC_LIBTOOL_LANG_F77_CONFIG 5270a966c04fSmrg# -------------------------- 5271a966c04fSmrg# Ensure that the configuration vars for the C compiler are 5272a966c04fSmrg# suitably defined. Those variables are subsequently used by 5273a966c04fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 5274a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 5275a966c04fSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 5276a966c04fSmrg[AC_REQUIRE([AC_PROG_F77]) 5277a966c04fSmrgAC_LANG_PUSH(Fortran 77) 5278a966c04fSmrg 5279a966c04fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5280a966c04fSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 5281a966c04fSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 5282a966c04fSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 5283a966c04fSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 5284a966c04fSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 5285a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 5286a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5287a966c04fSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5288a966c04fSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 5289a966c04fSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 5290a966c04fSmrg_LT_AC_TAGVAR(module_cmds, $1)= 5291a966c04fSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 5292a966c04fSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 5293a966c04fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5294a966c04fSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 5295a966c04fSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 5296a966c04fSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5297a966c04fSmrg 5298a966c04fSmrg# Source file extension for f77 test sources. 5299a966c04fSmrgac_ext=f 5300a966c04fSmrg 5301a966c04fSmrg# Object file extension for compiled f77 test sources. 5302a966c04fSmrgobjext=o 5303a966c04fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 5304a966c04fSmrg 5305a966c04fSmrg# Code to be used in simple compile tests 5306a966c04fSmrglt_simple_compile_test_code=" subroutine t\n return\n end\n" 5307a966c04fSmrg 5308a966c04fSmrg# Code to be used in simple link tests 5309a966c04fSmrglt_simple_link_test_code=" program t\n end\n" 5310a966c04fSmrg 5311a966c04fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 5312a966c04fSmrg_LT_AC_SYS_COMPILER 5313a966c04fSmrg 5314a966c04fSmrg# save warnings/boilerplate of simple test code 5315a966c04fSmrg_LT_COMPILER_BOILERPLATE 5316a966c04fSmrg_LT_LINKER_BOILERPLATE 5317a966c04fSmrg 5318a966c04fSmrg# Allow CC to be a program name with arguments. 5319a966c04fSmrglt_save_CC="$CC" 5320a966c04fSmrgCC=${F77-"f77"} 5321a966c04fSmrgcompiler=$CC 5322a966c04fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 5323a966c04fSmrg_LT_CC_BASENAME([$compiler]) 5324a966c04fSmrg 5325a966c04fSmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 5326a966c04fSmrgAC_MSG_RESULT([$can_build_shared]) 5327a966c04fSmrg 5328a966c04fSmrgAC_MSG_CHECKING([whether to build shared libraries]) 5329a966c04fSmrgtest "$can_build_shared" = "no" && enable_shared=no 5330a966c04fSmrg 5331a966c04fSmrg# On AIX, shared libraries and static libraries use the same namespace, and 5332a966c04fSmrg# are all built from PIC. 5333a966c04fSmrgcase $host_os in 5334a966c04fSmrgaix3*) 5335a966c04fSmrg test "$enable_shared" = yes && enable_static=no 5336a966c04fSmrg if test -n "$RANLIB"; then 5337a966c04fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5338a966c04fSmrg postinstall_cmds='$RANLIB $lib' 5339a966c04fSmrg fi 5340a966c04fSmrg ;; 5341a966c04fSmrgaix4* | aix5*) 5342a966c04fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5343a966c04fSmrg test "$enable_shared" = yes && enable_static=no 5344a966c04fSmrg fi 5345a966c04fSmrg ;; 5346a966c04fSmrgesac 5347a966c04fSmrgAC_MSG_RESULT([$enable_shared]) 5348a966c04fSmrg 5349a966c04fSmrgAC_MSG_CHECKING([whether to build static libraries]) 5350a966c04fSmrg# Make sure either enable_shared or enable_static is yes. 5351a966c04fSmrgtest "$enable_shared" = yes || enable_static=yes 5352a966c04fSmrgAC_MSG_RESULT([$enable_static]) 5353a966c04fSmrg 5354a966c04fSmrg_LT_AC_TAGVAR(GCC, $1)="$G77" 5355a966c04fSmrg_LT_AC_TAGVAR(LD, $1)="$LD" 5356a966c04fSmrg 5357a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 5358a966c04fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 5359a966c04fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 5360a966c04fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 5361a966c04fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 5362a966c04fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5363a966c04fSmrg 5364a966c04fSmrgAC_LIBTOOL_CONFIG($1) 5365a966c04fSmrg 5366a966c04fSmrgAC_LANG_POP 5367a966c04fSmrgCC="$lt_save_CC" 5368a966c04fSmrg])# AC_LIBTOOL_LANG_F77_CONFIG 5369a966c04fSmrg 5370a966c04fSmrg 5371a966c04fSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG 5372a966c04fSmrg# -------------------------- 5373a966c04fSmrg# Ensure that the configuration vars for the C compiler are 5374a966c04fSmrg# suitably defined. Those variables are subsequently used by 5375a966c04fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 5376a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 5377a966c04fSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 5378a966c04fSmrg[AC_LANG_SAVE 5379a966c04fSmrg 5380a966c04fSmrg# Source file extension for Java test sources. 5381a966c04fSmrgac_ext=java 5382a966c04fSmrg 5383a966c04fSmrg# Object file extension for compiled Java test sources. 5384a966c04fSmrgobjext=o 5385a966c04fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 5386a966c04fSmrg 5387a966c04fSmrg# Code to be used in simple compile tests 5388a966c04fSmrglt_simple_compile_test_code="class foo {}\n" 5389a966c04fSmrg 5390a966c04fSmrg# Code to be used in simple link tests 5391a966c04fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 5392a966c04fSmrg 5393a966c04fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 5394a966c04fSmrg_LT_AC_SYS_COMPILER 5395a966c04fSmrg 5396a966c04fSmrg# save warnings/boilerplate of simple test code 5397a966c04fSmrg_LT_COMPILER_BOILERPLATE 5398a966c04fSmrg_LT_LINKER_BOILERPLATE 5399a966c04fSmrg 5400a966c04fSmrg# Allow CC to be a program name with arguments. 5401a966c04fSmrglt_save_CC="$CC" 5402a966c04fSmrgCC=${GCJ-"gcj"} 5403a966c04fSmrgcompiler=$CC 5404a966c04fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 5405a966c04fSmrg_LT_CC_BASENAME([$compiler]) 5406a966c04fSmrg 5407a966c04fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 5408a966c04fSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5409a966c04fSmrg 5410a966c04fSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5411a966c04fSmrg 5412a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 5413a966c04fSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 5414a966c04fSmrgAC_LIBTOOL_PROG_CC_C_O($1) 5415a966c04fSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 5416a966c04fSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 5417a966c04fSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 5418a966c04fSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5419a966c04fSmrg 5420a966c04fSmrgAC_LIBTOOL_CONFIG($1) 5421a966c04fSmrg 5422a966c04fSmrgAC_LANG_RESTORE 5423a966c04fSmrgCC="$lt_save_CC" 5424a966c04fSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 5425a966c04fSmrg 5426a966c04fSmrg 5427a966c04fSmrg# AC_LIBTOOL_LANG_RC_CONFIG 5428a966c04fSmrg# ------------------------- 5429a966c04fSmrg# Ensure that the configuration vars for the Windows resource compiler are 5430a966c04fSmrg# suitably defined. Those variables are subsequently used by 5431a966c04fSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 5432a966c04fSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 5433a966c04fSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 5434a966c04fSmrg[AC_LANG_SAVE 5435a966c04fSmrg 5436a966c04fSmrg# Source file extension for RC test sources. 5437a966c04fSmrgac_ext=rc 5438a966c04fSmrg 5439a966c04fSmrg# Object file extension for compiled RC test sources. 5440a966c04fSmrgobjext=o 5441a966c04fSmrg_LT_AC_TAGVAR(objext, $1)=$objext 5442a966c04fSmrg 5443a966c04fSmrg# Code to be used in simple compile tests 5444a966c04fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 5445a966c04fSmrg 5446a966c04fSmrg# Code to be used in simple link tests 5447a966c04fSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 5448a966c04fSmrg 5449a966c04fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 5450a966c04fSmrg_LT_AC_SYS_COMPILER 5451a966c04fSmrg 5452a966c04fSmrg# save warnings/boilerplate of simple test code 5453a966c04fSmrg_LT_COMPILER_BOILERPLATE 5454a966c04fSmrg_LT_LINKER_BOILERPLATE 5455a966c04fSmrg 5456a966c04fSmrg# Allow CC to be a program name with arguments. 5457a966c04fSmrglt_save_CC="$CC" 5458a966c04fSmrgCC=${RC-"windres"} 5459a966c04fSmrgcompiler=$CC 5460a966c04fSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 5461a966c04fSmrg_LT_CC_BASENAME([$compiler]) 5462a966c04fSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5463a966c04fSmrg 5464a966c04fSmrgAC_LIBTOOL_CONFIG($1) 5465a966c04fSmrg 5466a966c04fSmrgAC_LANG_RESTORE 5467a966c04fSmrgCC="$lt_save_CC" 5468a966c04fSmrg])# AC_LIBTOOL_LANG_RC_CONFIG 5469a966c04fSmrg 5470a966c04fSmrg 5471a966c04fSmrg# AC_LIBTOOL_CONFIG([TAGNAME]) 5472a966c04fSmrg# ---------------------------- 5473a966c04fSmrg# If TAGNAME is not passed, then create an initial libtool script 5474a966c04fSmrg# with a default configuration from the untagged config vars. Otherwise 5475a966c04fSmrg# add code to config.status for appending the configuration named by 5476a966c04fSmrg# TAGNAME from the matching tagged config vars. 5477a966c04fSmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 5478a966c04fSmrg[# The else clause should only fire when bootstrapping the 5479a966c04fSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh 5480a966c04fSmrg# with your package, and you will get complaints that there are 5481a966c04fSmrg# no rules to generate ltmain.sh. 5482a966c04fSmrgif test -f "$ltmain"; then 5483a966c04fSmrg # See if we are running on zsh, and set the options which allow our commands through 5484a966c04fSmrg # without removal of \ escapes. 5485a966c04fSmrg if test -n "${ZSH_VERSION+set}" ; then 5486a966c04fSmrg setopt NO_GLOB_SUBST 5487a966c04fSmrg fi 5488a966c04fSmrg # Now quote all the things that may contain metacharacters while being 5489a966c04fSmrg # careful not to overquote the AC_SUBSTed values. We take copies of the 5490a966c04fSmrg # variables and quote the copies for generation of the libtool script. 5491a966c04fSmrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 5492a966c04fSmrg SED SHELL STRIP \ 5493a966c04fSmrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 5494a966c04fSmrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 5495a966c04fSmrg deplibs_check_method reload_flag reload_cmds need_locks \ 5496a966c04fSmrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 5497a966c04fSmrg lt_cv_sys_global_symbol_to_c_name_address \ 5498a966c04fSmrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 5499a966c04fSmrg old_postinstall_cmds old_postuninstall_cmds \ 5500a966c04fSmrg _LT_AC_TAGVAR(compiler, $1) \ 5501a966c04fSmrg _LT_AC_TAGVAR(CC, $1) \ 5502a966c04fSmrg _LT_AC_TAGVAR(LD, $1) \ 5503a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 5504a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 5505a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 5506a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 5507a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 5508a966c04fSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 5509a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 5510a966c04fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 5511a966c04fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 5512a966c04fSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 5513a966c04fSmrg _LT_AC_TAGVAR(predep_objects, $1) \ 5514a966c04fSmrg _LT_AC_TAGVAR(postdep_objects, $1) \ 5515a966c04fSmrg _LT_AC_TAGVAR(predeps, $1) \ 5516a966c04fSmrg _LT_AC_TAGVAR(postdeps, $1) \ 5517a966c04fSmrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 5518a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1) \ 5519a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 5520a966c04fSmrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 5521a966c04fSmrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 5522a966c04fSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 5523a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 5524a966c04fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 5525a966c04fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 5526a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 5527a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 5528a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 5529a966c04fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 5530a966c04fSmrg _LT_AC_TAGVAR(module_cmds, $1) \ 5531a966c04fSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 5532a966c04fSmrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 5533a966c04fSmrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 5534a966c04fSmrg _LT_AC_TAGVAR(include_expsyms, $1); do 5535a966c04fSmrg 5536a966c04fSmrg case $var in 5537a966c04fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 5538a966c04fSmrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 5539a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 5540a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 5541a966c04fSmrg _LT_AC_TAGVAR(module_cmds, $1) | \ 5542a966c04fSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 5543a966c04fSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 5544a966c04fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 5545a966c04fSmrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 5546a966c04fSmrg postinstall_cmds | postuninstall_cmds | \ 5547a966c04fSmrg old_postinstall_cmds | old_postuninstall_cmds | \ 5548a966c04fSmrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 5549a966c04fSmrg # Double-quote double-evaled strings. 5550a966c04fSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 5551a966c04fSmrg ;; 5552a966c04fSmrg *) 5553a966c04fSmrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 5554a966c04fSmrg ;; 5555a966c04fSmrg esac 5556a966c04fSmrg done 5557a966c04fSmrg 5558a966c04fSmrg case $lt_echo in 5559a966c04fSmrg *'\[$]0 --fallback-echo"') 5560a966c04fSmrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 5561a966c04fSmrg ;; 5562a966c04fSmrg esac 5563a966c04fSmrg 5564a966c04fSmrgifelse([$1], [], 5565a966c04fSmrg [cfgfile="${ofile}T" 5566a966c04fSmrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 5567a966c04fSmrg $rm -f "$cfgfile" 5568a966c04fSmrg AC_MSG_NOTICE([creating $ofile])], 5569a966c04fSmrg [cfgfile="$ofile"]) 5570a966c04fSmrg 5571a966c04fSmrg cat <<__EOF__ >> "$cfgfile" 5572a966c04fSmrgifelse([$1], [], 5573a966c04fSmrg[#! $SHELL 5574a966c04fSmrg 5575a966c04fSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 5576a966c04fSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 5577a966c04fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 5578a966c04fSmrg# 5579a966c04fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 5580a966c04fSmrg# Free Software Foundation, Inc. 5581a966c04fSmrg# 5582a966c04fSmrg# This file is part of GNU Libtool: 5583a966c04fSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 5584a966c04fSmrg# 5585a966c04fSmrg# This program is free software; you can redistribute it and/or modify 5586a966c04fSmrg# it under the terms of the GNU General Public License as published by 5587a966c04fSmrg# the Free Software Foundation; either version 2 of the License, or 5588a966c04fSmrg# (at your option) any later version. 5589a966c04fSmrg# 5590a966c04fSmrg# This program is distributed in the hope that it will be useful, but 5591a966c04fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 5592a966c04fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5593a966c04fSmrg# General Public License for more details. 5594a966c04fSmrg# 5595a966c04fSmrg# You should have received a copy of the GNU General Public License 5596a966c04fSmrg# along with this program; if not, write to the Free Software 5597a966c04fSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 5598a966c04fSmrg# 5599a966c04fSmrg# As a special exception to the GNU General Public License, if you 5600a966c04fSmrg# distribute this file as part of a program that contains a 5601a966c04fSmrg# configuration script generated by Autoconf, you may include it under 5602a966c04fSmrg# the same distribution terms that you use for the rest of that program. 5603a966c04fSmrg 5604a966c04fSmrg# A sed program that does not truncate output. 5605a966c04fSmrgSED=$lt_SED 5606a966c04fSmrg 5607a966c04fSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 5608a966c04fSmrgXsed="$SED -e 1s/^X//" 5609a966c04fSmrg 5610a966c04fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5611a966c04fSmrg# if CDPATH is set. 5612a966c04fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5613a966c04fSmrg 5614a966c04fSmrg# The names of the tagged configurations supported by this script. 5615a966c04fSmrgavailable_tags= 5616a966c04fSmrg 5617a966c04fSmrg# ### BEGIN LIBTOOL CONFIG], 5618a966c04fSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 5619a966c04fSmrg 5620a966c04fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 5621a966c04fSmrg 5622a966c04fSmrg# Shell to use when invoking shell scripts. 5623a966c04fSmrgSHELL=$lt_SHELL 5624a966c04fSmrg 5625a966c04fSmrg# Whether or not to build shared libraries. 5626a966c04fSmrgbuild_libtool_libs=$enable_shared 5627a966c04fSmrg 5628a966c04fSmrg# Whether or not to build static libraries. 5629a966c04fSmrgbuild_old_libs=$enable_static 5630a966c04fSmrg 5631a966c04fSmrg# Whether or not to add -lc for building shared libraries. 5632a966c04fSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 5633a966c04fSmrg 5634a966c04fSmrg# Whether or not to disallow shared libs when runtime libs are static 5635a966c04fSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 5636a966c04fSmrg 5637a966c04fSmrg# Whether or not to optimize for fast installation. 5638a966c04fSmrgfast_install=$enable_fast_install 5639a966c04fSmrg 5640a966c04fSmrg# The host system. 5641a966c04fSmrghost_alias=$host_alias 5642a966c04fSmrghost=$host 5643a966c04fSmrghost_os=$host_os 5644a966c04fSmrg 5645a966c04fSmrg# The build system. 5646a966c04fSmrgbuild_alias=$build_alias 5647a966c04fSmrgbuild=$build 5648a966c04fSmrgbuild_os=$build_os 5649a966c04fSmrg 5650a966c04fSmrg# An echo program that does not interpret backslashes. 5651a966c04fSmrgecho=$lt_echo 5652a966c04fSmrg 5653a966c04fSmrg# The archiver. 5654a966c04fSmrgAR=$lt_AR 5655a966c04fSmrgAR_FLAGS=$lt_AR_FLAGS 5656a966c04fSmrg 5657a966c04fSmrg# A C compiler. 5658a966c04fSmrgLTCC=$lt_LTCC 5659a966c04fSmrg 5660a966c04fSmrg# LTCC compiler flags. 5661a966c04fSmrgLTCFLAGS=$lt_LTCFLAGS 5662a966c04fSmrg 5663a966c04fSmrg# A language-specific compiler. 5664a966c04fSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 5665a966c04fSmrg 5666a966c04fSmrg# Is the compiler the GNU C compiler? 5667a966c04fSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 5668a966c04fSmrg 5669a966c04fSmrg# An ERE matcher. 5670a966c04fSmrgEGREP=$lt_EGREP 5671a966c04fSmrg 5672a966c04fSmrg# The linker used to build libraries. 5673a966c04fSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 5674a966c04fSmrg 5675a966c04fSmrg# Whether we need hard or soft links. 5676a966c04fSmrgLN_S=$lt_LN_S 5677a966c04fSmrg 5678a966c04fSmrg# A BSD-compatible nm program. 5679a966c04fSmrgNM=$lt_NM 5680a966c04fSmrg 5681a966c04fSmrg# A symbol stripping program 5682a966c04fSmrgSTRIP=$lt_STRIP 5683a966c04fSmrg 5684a966c04fSmrg# Used to examine libraries when file_magic_cmd begins "file" 5685a966c04fSmrgMAGIC_CMD=$MAGIC_CMD 5686a966c04fSmrg 5687a966c04fSmrg# Used on cygwin: DLL creation program. 5688a966c04fSmrgDLLTOOL="$DLLTOOL" 5689a966c04fSmrg 5690a966c04fSmrg# Used on cygwin: object dumper. 5691a966c04fSmrgOBJDUMP="$OBJDUMP" 5692a966c04fSmrg 5693a966c04fSmrg# Used on cygwin: assembler. 5694a966c04fSmrgAS="$AS" 5695a966c04fSmrg 5696a966c04fSmrg# The name of the directory that contains temporary libtool files. 5697a966c04fSmrgobjdir=$objdir 5698a966c04fSmrg 5699a966c04fSmrg# How to create reloadable object files. 5700a966c04fSmrgreload_flag=$lt_reload_flag 5701a966c04fSmrgreload_cmds=$lt_reload_cmds 5702a966c04fSmrg 5703a966c04fSmrg# How to pass a linker flag through the compiler. 5704a966c04fSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 5705a966c04fSmrg 5706a966c04fSmrg# Object file suffix (normally "o"). 5707a966c04fSmrgobjext="$ac_objext" 5708a966c04fSmrg 5709a966c04fSmrg# Old archive suffix (normally "a"). 5710a966c04fSmrglibext="$libext" 5711a966c04fSmrg 5712a966c04fSmrg# Shared library suffix (normally ".so"). 5713a966c04fSmrgshrext_cmds='$shrext_cmds' 5714a966c04fSmrg 5715a966c04fSmrg# Executable file suffix (normally ""). 5716a966c04fSmrgexeext="$exeext" 5717a966c04fSmrg 5718a966c04fSmrg# Additional compiler flags for building library objects. 5719a966c04fSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 5720a966c04fSmrgpic_mode=$pic_mode 5721a966c04fSmrg 5722a966c04fSmrg# What is the maximum length of a command? 5723a966c04fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5724a966c04fSmrg 5725a966c04fSmrg# Does compiler simultaneously support -c and -o options? 5726a966c04fSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 5727a966c04fSmrg 5728a966c04fSmrg# Must we lock files when doing compilation? 5729a966c04fSmrgneed_locks=$lt_need_locks 5730a966c04fSmrg 5731a966c04fSmrg# Do we need the lib prefix for modules? 5732a966c04fSmrgneed_lib_prefix=$need_lib_prefix 5733a966c04fSmrg 5734a966c04fSmrg# Do we need a version for libraries? 5735a966c04fSmrgneed_version=$need_version 5736a966c04fSmrg 5737a966c04fSmrg# Whether dlopen is supported. 5738a966c04fSmrgdlopen_support=$enable_dlopen 5739a966c04fSmrg 5740a966c04fSmrg# Whether dlopen of programs is supported. 5741a966c04fSmrgdlopen_self=$enable_dlopen_self 5742a966c04fSmrg 5743a966c04fSmrg# Whether dlopen of statically linked programs is supported. 5744a966c04fSmrgdlopen_self_static=$enable_dlopen_self_static 5745a966c04fSmrg 5746a966c04fSmrg# Compiler flag to prevent dynamic linking. 5747a966c04fSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 5748a966c04fSmrg 5749a966c04fSmrg# Compiler flag to turn off builtin functions. 5750a966c04fSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 5751a966c04fSmrg 5752a966c04fSmrg# Compiler flag to allow reflexive dlopens. 5753a966c04fSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 5754a966c04fSmrg 5755a966c04fSmrg# Compiler flag to generate shared objects directly from archives. 5756a966c04fSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 5757a966c04fSmrg 5758a966c04fSmrg# Compiler flag to generate thread-safe objects. 5759a966c04fSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 5760a966c04fSmrg 5761a966c04fSmrg# Library versioning type. 5762a966c04fSmrgversion_type=$version_type 5763a966c04fSmrg 5764a966c04fSmrg# Format of library name prefix. 5765a966c04fSmrglibname_spec=$lt_libname_spec 5766a966c04fSmrg 5767a966c04fSmrg# List of archive names. First name is the real one, the rest are links. 5768a966c04fSmrg# The last name is the one that the linker finds with -lNAME. 5769a966c04fSmrglibrary_names_spec=$lt_library_names_spec 5770a966c04fSmrg 5771a966c04fSmrg# The coded name of the library, if different from the real name. 5772a966c04fSmrgsoname_spec=$lt_soname_spec 5773a966c04fSmrg 5774a966c04fSmrg# Commands used to build and install an old-style archive. 5775a966c04fSmrgRANLIB=$lt_RANLIB 5776a966c04fSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 5777a966c04fSmrgold_postinstall_cmds=$lt_old_postinstall_cmds 5778a966c04fSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 5779a966c04fSmrg 5780a966c04fSmrg# Create an old-style archive from a shared archive. 5781a966c04fSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 5782a966c04fSmrg 5783a966c04fSmrg# Create a temporary old-style archive to link instead of a shared archive. 5784a966c04fSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 5785a966c04fSmrg 5786a966c04fSmrg# Commands used to build and install a shared archive. 5787a966c04fSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 5788a966c04fSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 5789a966c04fSmrgpostinstall_cmds=$lt_postinstall_cmds 5790a966c04fSmrgpostuninstall_cmds=$lt_postuninstall_cmds 5791a966c04fSmrg 5792a966c04fSmrg# Commands used to build a loadable module (assumed same as above if empty) 5793a966c04fSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 5794a966c04fSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 5795a966c04fSmrg 5796a966c04fSmrg# Commands to strip libraries. 5797a966c04fSmrgold_striplib=$lt_old_striplib 5798a966c04fSmrgstriplib=$lt_striplib 5799a966c04fSmrg 5800a966c04fSmrg# Dependencies to place before the objects being linked to create a 5801a966c04fSmrg# shared library. 5802a966c04fSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 5803a966c04fSmrg 5804a966c04fSmrg# Dependencies to place after the objects being linked to create a 5805a966c04fSmrg# shared library. 5806a966c04fSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 5807a966c04fSmrg 5808a966c04fSmrg# Dependencies to place before the objects being linked to create a 5809a966c04fSmrg# shared library. 5810a966c04fSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 5811a966c04fSmrg 5812a966c04fSmrg# Dependencies to place after the objects being linked to create a 5813a966c04fSmrg# shared library. 5814a966c04fSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 5815a966c04fSmrg 5816a966c04fSmrg# The library search path used internally by the compiler when linking 5817a966c04fSmrg# a shared library. 5818a966c04fSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 5819a966c04fSmrg 5820a966c04fSmrg# Method to check whether dependent libraries are shared objects. 5821a966c04fSmrgdeplibs_check_method=$lt_deplibs_check_method 5822a966c04fSmrg 5823a966c04fSmrg# Command to use when deplibs_check_method == file_magic. 5824a966c04fSmrgfile_magic_cmd=$lt_file_magic_cmd 5825a966c04fSmrg 5826a966c04fSmrg# Flag that allows shared libraries with undefined symbols to be built. 5827a966c04fSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 5828a966c04fSmrg 5829a966c04fSmrg# Flag that forces no undefined symbols. 5830a966c04fSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 5831a966c04fSmrg 5832a966c04fSmrg# Commands used to finish a libtool library installation in a directory. 5833a966c04fSmrgfinish_cmds=$lt_finish_cmds 5834a966c04fSmrg 5835a966c04fSmrg# Same as above, but a single script fragment to be evaled but not shown. 5836a966c04fSmrgfinish_eval=$lt_finish_eval 5837a966c04fSmrg 5838a966c04fSmrg# Take the output of nm and produce a listing of raw symbols and C names. 5839a966c04fSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 5840a966c04fSmrg 5841a966c04fSmrg# Transform the output of nm in a proper C declaration 5842a966c04fSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 5843a966c04fSmrg 5844a966c04fSmrg# Transform the output of nm in a C name address pair 5845a966c04fSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 5846a966c04fSmrg 5847a966c04fSmrg# This is the shared library runtime path variable. 5848a966c04fSmrgrunpath_var=$runpath_var 5849a966c04fSmrg 5850a966c04fSmrg# This is the shared library path variable. 5851a966c04fSmrgshlibpath_var=$shlibpath_var 5852a966c04fSmrg 5853a966c04fSmrg# Is shlibpath searched before the hard-coded library search path? 5854a966c04fSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 5855a966c04fSmrg 5856a966c04fSmrg# How to hardcode a shared library path into an executable. 5857a966c04fSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 5858a966c04fSmrg 5859a966c04fSmrg# Whether we should hardcode library paths into libraries. 5860a966c04fSmrghardcode_into_libs=$hardcode_into_libs 5861a966c04fSmrg 5862a966c04fSmrg# Flag to hardcode \$libdir into a binary during linking. 5863a966c04fSmrg# This must work even if \$libdir does not exist. 5864a966c04fSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 5865a966c04fSmrg 5866a966c04fSmrg# If ld is used when linking, flag to hardcode \$libdir into 5867a966c04fSmrg# a binary during linking. This must work even if \$libdir does 5868a966c04fSmrg# not exist. 5869a966c04fSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 5870a966c04fSmrg 5871a966c04fSmrg# Whether we need a single -rpath flag with a separated argument. 5872a966c04fSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 5873a966c04fSmrg 5874a966c04fSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 5875a966c04fSmrg# resulting binary. 5876a966c04fSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 5877a966c04fSmrg 5878a966c04fSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 5879a966c04fSmrg# resulting binary. 5880a966c04fSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 5881a966c04fSmrg 5882a966c04fSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 5883a966c04fSmrg# the resulting binary. 5884a966c04fSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 5885a966c04fSmrg 5886a966c04fSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library 5887a966c04fSmrg# and all subsequent libraries and executables linked against it. 5888a966c04fSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 5889a966c04fSmrg 5890a966c04fSmrg# Variables whose values should be saved in libtool wrapper scripts and 5891a966c04fSmrg# restored at relink time. 5892a966c04fSmrgvariables_saved_for_relink="$variables_saved_for_relink" 5893a966c04fSmrg 5894a966c04fSmrg# Whether libtool must link a program against all its dependency libraries. 5895a966c04fSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 5896a966c04fSmrg 5897a966c04fSmrg# Compile-time system search path for libraries 5898a966c04fSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 5899a966c04fSmrg 5900a966c04fSmrg# Run-time system search path for libraries 5901a966c04fSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 5902a966c04fSmrg 5903a966c04fSmrg# Fix the shell variable \$srcfile for the compiler. 5904a966c04fSmrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 5905a966c04fSmrg 5906a966c04fSmrg# Set to yes if exported symbols are required. 5907a966c04fSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 5908a966c04fSmrg 5909a966c04fSmrg# The commands to list exported symbols. 5910a966c04fSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 5911a966c04fSmrg 5912a966c04fSmrg# The commands to extract the exported symbol list from a shared archive. 5913a966c04fSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 5914a966c04fSmrg 5915a966c04fSmrg# Symbols that should not be listed in the preloaded symbols. 5916a966c04fSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 5917a966c04fSmrg 5918a966c04fSmrg# Symbols that must always be exported. 5919a966c04fSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 5920a966c04fSmrg 5921a966c04fSmrgifelse([$1],[], 5922a966c04fSmrg[# ### END LIBTOOL CONFIG], 5923a966c04fSmrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 5924a966c04fSmrg 5925a966c04fSmrg__EOF__ 5926a966c04fSmrg 5927a966c04fSmrgifelse([$1],[], [ 5928a966c04fSmrg case $host_os in 5929a966c04fSmrg aix3*) 5930a966c04fSmrg cat <<\EOF >> "$cfgfile" 5931a966c04fSmrg 5932a966c04fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 5933a966c04fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 5934a966c04fSmrg# vanish in a puff of smoke. 5935a966c04fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 5936a966c04fSmrg COLLECT_NAMES= 5937a966c04fSmrg export COLLECT_NAMES 5938a966c04fSmrgfi 5939a966c04fSmrgEOF 5940a966c04fSmrg ;; 5941a966c04fSmrg esac 5942a966c04fSmrg 5943a966c04fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 5944a966c04fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 5945a966c04fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 5946a966c04fSmrg # is reportedly fixed, but why not run on old versions too? 5947a966c04fSmrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 5948a966c04fSmrg 5949a966c04fSmrg mv -f "$cfgfile" "$ofile" || \ 5950a966c04fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 5951a966c04fSmrg chmod +x "$ofile" 5952a966c04fSmrg]) 5953a966c04fSmrgelse 5954a966c04fSmrg # If there is no Makefile yet, we rely on a make rule to execute 5955a966c04fSmrg # `config.status --recheck' to rerun these tests and create the 5956a966c04fSmrg # libtool script then. 5957a966c04fSmrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 5958a966c04fSmrg if test -f "$ltmain_in"; then 5959a966c04fSmrg test -f Makefile && make "$ltmain" 5960a966c04fSmrg fi 5961a966c04fSmrgfi 5962a966c04fSmrg])# AC_LIBTOOL_CONFIG 5963a966c04fSmrg 5964a966c04fSmrg 5965a966c04fSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 5966a966c04fSmrg# ------------------------------------------- 5967a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 5968a966c04fSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 5969a966c04fSmrg 5970a966c04fSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5971a966c04fSmrg 5972a966c04fSmrgif test "$GCC" = yes; then 5973a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5974a966c04fSmrg 5975a966c04fSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5976a966c04fSmrg lt_cv_prog_compiler_rtti_exceptions, 5977a966c04fSmrg [-fno-rtti -fno-exceptions], [], 5978a966c04fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 5979a966c04fSmrgfi 5980a966c04fSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 5981a966c04fSmrg 5982a966c04fSmrg 5983a966c04fSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 5984a966c04fSmrg# --------------------------------- 5985a966c04fSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 5986a966c04fSmrg[AC_REQUIRE([AC_CANONICAL_HOST]) 5987a966c04fSmrgAC_REQUIRE([AC_PROG_NM]) 5988a966c04fSmrgAC_REQUIRE([AC_OBJEXT]) 5989a966c04fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 5990a966c04fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5991a966c04fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 5992a966c04fSmrg[ 5993a966c04fSmrg# These are sane defaults that work on at least a few old systems. 5994a966c04fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 5995a966c04fSmrg 5996a966c04fSmrg# Character class describing NM global symbol codes. 5997a966c04fSmrgsymcode='[[BCDEGRST]]' 5998a966c04fSmrg 5999a966c04fSmrg# Regexp to match symbols that can be accessed directly from C. 6000a966c04fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 6001a966c04fSmrg 6002a966c04fSmrg# Transform an extracted symbol line into a proper C declaration 6003a966c04fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 6004a966c04fSmrg 6005a966c04fSmrg# Transform an extracted symbol line into symbol name and symbol address 6006a966c04fSmrglt_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'" 6007a966c04fSmrg 6008a966c04fSmrg# Define system-specific variables. 6009a966c04fSmrgcase $host_os in 6010a966c04fSmrgaix*) 6011a966c04fSmrg symcode='[[BCDT]]' 6012a966c04fSmrg ;; 6013a966c04fSmrgcygwin* | mingw* | pw32*) 6014a966c04fSmrg symcode='[[ABCDGISTW]]' 6015a966c04fSmrg ;; 6016a966c04fSmrghpux*) # Its linker distinguishes data from code symbols 6017a966c04fSmrg if test "$host_cpu" = ia64; then 6018a966c04fSmrg symcode='[[ABCDEGRST]]' 6019a966c04fSmrg fi 6020a966c04fSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6021a966c04fSmrg 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'" 6022a966c04fSmrg ;; 6023a966c04fSmrglinux*) 6024a966c04fSmrg if test "$host_cpu" = ia64; then 6025a966c04fSmrg symcode='[[ABCDGIRSTW]]' 6026a966c04fSmrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6027a966c04fSmrg 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'" 6028a966c04fSmrg fi 6029a966c04fSmrg ;; 6030a966c04fSmrgirix* | nonstopux*) 6031a966c04fSmrg symcode='[[BCDEGRST]]' 6032a966c04fSmrg ;; 6033a966c04fSmrgosf*) 6034a966c04fSmrg symcode='[[BCDEGQRST]]' 6035a966c04fSmrg ;; 6036a966c04fSmrgsolaris*) 6037a966c04fSmrg symcode='[[BDRT]]' 6038a966c04fSmrg ;; 6039a966c04fSmrgsco3.2v5*) 6040a966c04fSmrg symcode='[[DT]]' 6041a966c04fSmrg ;; 6042a966c04fSmrgsysv4.2uw2*) 6043a966c04fSmrg symcode='[[DT]]' 6044a966c04fSmrg ;; 6045a966c04fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 6046a966c04fSmrg symcode='[[ABDT]]' 6047a966c04fSmrg ;; 6048a966c04fSmrgsysv4) 6049a966c04fSmrg symcode='[[DFNSTU]]' 6050a966c04fSmrg ;; 6051a966c04fSmrgesac 6052a966c04fSmrg 6053a966c04fSmrg# Handle CRLF in mingw tool chain 6054a966c04fSmrgopt_cr= 6055a966c04fSmrgcase $build_os in 6056a966c04fSmrgmingw*) 6057a966c04fSmrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 6058a966c04fSmrg ;; 6059a966c04fSmrgesac 6060a966c04fSmrg 6061a966c04fSmrg# If we're using GNU nm, then use its standard symbol codes. 6062a966c04fSmrgcase `$NM -V 2>&1` in 6063a966c04fSmrg*GNU* | *'with BFD'*) 6064a966c04fSmrg symcode='[[ABCDGIRSTW]]' ;; 6065a966c04fSmrgesac 6066a966c04fSmrg 6067a966c04fSmrg# Try without a prefix undercore, then with it. 6068a966c04fSmrgfor ac_symprfx in "" "_"; do 6069a966c04fSmrg 6070a966c04fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 6071a966c04fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 6072a966c04fSmrg 6073a966c04fSmrg # Write the raw and C identifiers. 6074a966c04fSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 6075a966c04fSmrg 6076a966c04fSmrg # Check to see that the pipe works correctly. 6077a966c04fSmrg pipe_works=no 6078a966c04fSmrg 6079a966c04fSmrg rm -f conftest* 6080a966c04fSmrg cat > conftest.$ac_ext <<EOF 6081a966c04fSmrg#ifdef __cplusplus 6082a966c04fSmrgextern "C" { 6083a966c04fSmrg#endif 6084a966c04fSmrgchar nm_test_var; 6085a966c04fSmrgvoid nm_test_func(){} 6086a966c04fSmrg#ifdef __cplusplus 6087a966c04fSmrg} 6088a966c04fSmrg#endif 6089a966c04fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 6090a966c04fSmrgEOF 6091a966c04fSmrg 6092a966c04fSmrg if AC_TRY_EVAL(ac_compile); then 6093a966c04fSmrg # Now try to grab the symbols. 6094a966c04fSmrg nlist=conftest.nm 6095a966c04fSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 6096a966c04fSmrg # Try sorting and uniquifying the output. 6097a966c04fSmrg if sort "$nlist" | uniq > "$nlist"T; then 6098a966c04fSmrg mv -f "$nlist"T "$nlist" 6099a966c04fSmrg else 6100a966c04fSmrg rm -f "$nlist"T 6101a966c04fSmrg fi 6102a966c04fSmrg 6103a966c04fSmrg # Make sure that we snagged all the symbols we need. 6104a966c04fSmrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 6105a966c04fSmrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 6106a966c04fSmrg cat <<EOF > conftest.$ac_ext 6107a966c04fSmrg#ifdef __cplusplus 6108a966c04fSmrgextern "C" { 6109a966c04fSmrg#endif 6110a966c04fSmrg 6111a966c04fSmrgEOF 6112a966c04fSmrg # Now generate the symbol file. 6113a966c04fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 6114a966c04fSmrg 6115a966c04fSmrg cat <<EOF >> conftest.$ac_ext 6116a966c04fSmrg#if defined (__STDC__) && __STDC__ 6117a966c04fSmrg# define lt_ptr_t void * 6118a966c04fSmrg#else 6119a966c04fSmrg# define lt_ptr_t char * 6120a966c04fSmrg# define const 6121a966c04fSmrg#endif 6122a966c04fSmrg 6123a966c04fSmrg/* The mapping between symbol names and symbols. */ 6124a966c04fSmrgconst struct { 6125a966c04fSmrg const char *name; 6126a966c04fSmrg lt_ptr_t address; 6127a966c04fSmrg} 6128a966c04fSmrglt_preloaded_symbols[[]] = 6129a966c04fSmrg{ 6130a966c04fSmrgEOF 6131a966c04fSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 6132a966c04fSmrg cat <<\EOF >> conftest.$ac_ext 6133a966c04fSmrg {0, (lt_ptr_t) 0} 6134a966c04fSmrg}; 6135a966c04fSmrg 6136a966c04fSmrg#ifdef __cplusplus 6137a966c04fSmrg} 6138a966c04fSmrg#endif 6139a966c04fSmrgEOF 6140a966c04fSmrg # Now try linking the two files. 6141a966c04fSmrg mv conftest.$ac_objext conftstm.$ac_objext 6142a966c04fSmrg lt_save_LIBS="$LIBS" 6143a966c04fSmrg lt_save_CFLAGS="$CFLAGS" 6144a966c04fSmrg LIBS="conftstm.$ac_objext" 6145a966c04fSmrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 6146a966c04fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 6147a966c04fSmrg pipe_works=yes 6148a966c04fSmrg fi 6149a966c04fSmrg LIBS="$lt_save_LIBS" 6150a966c04fSmrg CFLAGS="$lt_save_CFLAGS" 6151a966c04fSmrg else 6152a966c04fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 6153a966c04fSmrg fi 6154a966c04fSmrg else 6155a966c04fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 6156a966c04fSmrg fi 6157a966c04fSmrg else 6158a966c04fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 6159a966c04fSmrg fi 6160a966c04fSmrg else 6161a966c04fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 6162a966c04fSmrg cat conftest.$ac_ext >&5 6163a966c04fSmrg fi 6164a966c04fSmrg rm -f conftest* conftst* 6165a966c04fSmrg 6166a966c04fSmrg # Do not use the global_symbol_pipe unless it works. 6167a966c04fSmrg if test "$pipe_works" = yes; then 6168a966c04fSmrg break 6169a966c04fSmrg else 6170a966c04fSmrg lt_cv_sys_global_symbol_pipe= 6171a966c04fSmrg fi 6172a966c04fSmrgdone 6173a966c04fSmrg]) 6174a966c04fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 6175a966c04fSmrg lt_cv_sys_global_symbol_to_cdecl= 6176a966c04fSmrgfi 6177a966c04fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 6178a966c04fSmrg AC_MSG_RESULT(failed) 6179a966c04fSmrgelse 6180a966c04fSmrg AC_MSG_RESULT(ok) 6181a966c04fSmrgfi 6182a966c04fSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 6183a966c04fSmrg 6184a966c04fSmrg 6185a966c04fSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 6186a966c04fSmrg# --------------------------------------- 6187a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 6188a966c04fSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 6189a966c04fSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6190a966c04fSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 6191a966c04fSmrg 6192a966c04fSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 6193a966c04fSmrg ifelse([$1],[CXX],[ 6194a966c04fSmrg # C++ specific cases for pic, static, wl, etc. 6195a966c04fSmrg if test "$GXX" = yes; then 6196a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6197a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6198a966c04fSmrg 6199a966c04fSmrg case $host_os in 6200a966c04fSmrg aix*) 6201a966c04fSmrg # All AIX code is PIC. 6202a966c04fSmrg if test "$host_cpu" = ia64; then 6203a966c04fSmrg # AIX 5 now supports IA64 processor 6204a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6205a966c04fSmrg fi 6206a966c04fSmrg ;; 6207a966c04fSmrg amigaos*) 6208a966c04fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 6209a966c04fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 6210a966c04fSmrg # like `-m68040'. 6211a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6212a966c04fSmrg ;; 6213a966c04fSmrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6214a966c04fSmrg # PIC is the default for these OSes. 6215a966c04fSmrg ;; 6216a966c04fSmrg mingw* | os2* | pw32*) 6217a966c04fSmrg # This hack is so that the source file can tell whether it is being 6218a966c04fSmrg # built for inclusion in a dll (and should export symbols for example). 6219a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6220a966c04fSmrg ;; 6221a966c04fSmrg darwin* | rhapsody*) 6222a966c04fSmrg # PIC is the default on this platform 6223a966c04fSmrg # Common symbols not allowed in MH_DYLIB files 6224a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6225a966c04fSmrg ;; 6226a966c04fSmrg *djgpp*) 6227a966c04fSmrg # DJGPP does not support shared libraries at all 6228a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6229a966c04fSmrg ;; 6230a966c04fSmrg interix3*) 6231a966c04fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6232a966c04fSmrg # Instead, we relocate shared libraries at runtime. 6233a966c04fSmrg ;; 6234a966c04fSmrg sysv4*MP*) 6235a966c04fSmrg if test -d /usr/nec; then 6236a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6237a966c04fSmrg fi 6238a966c04fSmrg ;; 6239a966c04fSmrg hpux*) 6240a966c04fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6241a966c04fSmrg # not for PA HP-UX. 6242a966c04fSmrg case $host_cpu in 6243a966c04fSmrg hppa*64*|ia64*) 6244a966c04fSmrg ;; 6245a966c04fSmrg *) 6246a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6247a966c04fSmrg ;; 6248a966c04fSmrg esac 6249a966c04fSmrg ;; 6250a966c04fSmrg *) 6251a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6252a966c04fSmrg ;; 6253a966c04fSmrg esac 6254a966c04fSmrg else 6255a966c04fSmrg case $host_os in 6256a966c04fSmrg aix4* | aix5*) 6257a966c04fSmrg # All AIX code is PIC. 6258a966c04fSmrg if test "$host_cpu" = ia64; then 6259a966c04fSmrg # AIX 5 now supports IA64 processor 6260a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6261a966c04fSmrg else 6262a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6263a966c04fSmrg fi 6264a966c04fSmrg ;; 6265a966c04fSmrg chorus*) 6266a966c04fSmrg case $cc_basename in 6267a966c04fSmrg cxch68*) 6268a966c04fSmrg # Green Hills C++ Compiler 6269a966c04fSmrg # _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" 6270a966c04fSmrg ;; 6271a966c04fSmrg esac 6272a966c04fSmrg ;; 6273a966c04fSmrg darwin*) 6274a966c04fSmrg # PIC is the default on this platform 6275a966c04fSmrg # Common symbols not allowed in MH_DYLIB files 6276a966c04fSmrg case $cc_basename in 6277a966c04fSmrg xlc*) 6278a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 6279a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6280a966c04fSmrg ;; 6281a966c04fSmrg esac 6282a966c04fSmrg ;; 6283a966c04fSmrg dgux*) 6284a966c04fSmrg case $cc_basename in 6285a966c04fSmrg ec++*) 6286a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6287a966c04fSmrg ;; 6288a966c04fSmrg ghcx*) 6289a966c04fSmrg # Green Hills C++ Compiler 6290a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6291a966c04fSmrg ;; 6292a966c04fSmrg *) 6293a966c04fSmrg ;; 6294a966c04fSmrg esac 6295a966c04fSmrg ;; 6296a966c04fSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 6297a966c04fSmrg # FreeBSD uses GNU C++ 6298a966c04fSmrg ;; 6299a966c04fSmrg hpux9* | hpux10* | hpux11*) 6300a966c04fSmrg case $cc_basename in 6301a966c04fSmrg CC*) 6302a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6303a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6304a966c04fSmrg if test "$host_cpu" != ia64; then 6305a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6306a966c04fSmrg fi 6307a966c04fSmrg ;; 6308a966c04fSmrg aCC*) 6309a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6310a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6311a966c04fSmrg case $host_cpu in 6312a966c04fSmrg hppa*64*|ia64*) 6313a966c04fSmrg # +Z the default 6314a966c04fSmrg ;; 6315a966c04fSmrg *) 6316a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6317a966c04fSmrg ;; 6318a966c04fSmrg esac 6319a966c04fSmrg ;; 6320a966c04fSmrg *) 6321a966c04fSmrg ;; 6322a966c04fSmrg esac 6323a966c04fSmrg ;; 6324a966c04fSmrg interix*) 6325a966c04fSmrg # This is c89, which is MS Visual C++ (no shared libs) 6326a966c04fSmrg # Anyone wants to do a port? 6327a966c04fSmrg ;; 6328a966c04fSmrg irix5* | irix6* | nonstopux*) 6329a966c04fSmrg case $cc_basename in 6330a966c04fSmrg CC*) 6331a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6332a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6333a966c04fSmrg # CC pic flag -KPIC is the default. 6334a966c04fSmrg ;; 6335a966c04fSmrg *) 6336a966c04fSmrg ;; 6337a966c04fSmrg esac 6338a966c04fSmrg ;; 6339a966c04fSmrg linux*) 6340a966c04fSmrg case $cc_basename in 6341a966c04fSmrg KCC*) 6342a966c04fSmrg # KAI C++ Compiler 6343a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6344a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6345a966c04fSmrg ;; 6346a966c04fSmrg icpc* | ecpc*) 6347a966c04fSmrg # Intel C++ 6348a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6349a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6350a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6351a966c04fSmrg ;; 6352a966c04fSmrg pgCC*) 6353a966c04fSmrg # Portland Group C++ compiler. 6354a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6355a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6356a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6357a966c04fSmrg ;; 6358a966c04fSmrg cxx*) 6359a966c04fSmrg # Compaq C++ 6360a966c04fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 6361a966c04fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 6362a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6363a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6364a966c04fSmrg ;; 6365a966c04fSmrg *) 6366a966c04fSmrg ;; 6367a966c04fSmrg esac 6368a966c04fSmrg ;; 6369a966c04fSmrg lynxos*) 6370a966c04fSmrg ;; 6371a966c04fSmrg m88k*) 6372a966c04fSmrg ;; 6373a966c04fSmrg mvs*) 6374a966c04fSmrg case $cc_basename in 6375a966c04fSmrg cxx*) 6376a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6377a966c04fSmrg ;; 6378a966c04fSmrg *) 6379a966c04fSmrg ;; 6380a966c04fSmrg esac 6381a966c04fSmrg ;; 6382a966c04fSmrg netbsd*) 6383a966c04fSmrg ;; 6384a966c04fSmrg osf3* | osf4* | osf5*) 6385a966c04fSmrg case $cc_basename in 6386a966c04fSmrg KCC*) 6387a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6388a966c04fSmrg ;; 6389a966c04fSmrg RCC*) 6390a966c04fSmrg # Rational C++ 2.4.1 6391a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6392a966c04fSmrg ;; 6393a966c04fSmrg cxx*) 6394a966c04fSmrg # Digital/Compaq C++ 6395a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6396a966c04fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 6397a966c04fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 6398a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6399a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6400a966c04fSmrg ;; 6401a966c04fSmrg *) 6402a966c04fSmrg ;; 6403a966c04fSmrg esac 6404a966c04fSmrg ;; 6405a966c04fSmrg psos*) 6406a966c04fSmrg ;; 6407a966c04fSmrg solaris*) 6408a966c04fSmrg case $cc_basename in 6409a966c04fSmrg CC*) 6410a966c04fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6411a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6412a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6413a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6414a966c04fSmrg ;; 6415a966c04fSmrg gcx*) 6416a966c04fSmrg # Green Hills C++ Compiler 6417a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6418a966c04fSmrg ;; 6419a966c04fSmrg *) 6420a966c04fSmrg ;; 6421a966c04fSmrg esac 6422a966c04fSmrg ;; 6423a966c04fSmrg sunos4*) 6424a966c04fSmrg case $cc_basename in 6425a966c04fSmrg CC*) 6426a966c04fSmrg # Sun C++ 4.x 6427a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6428a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6429a966c04fSmrg ;; 6430a966c04fSmrg lcc*) 6431a966c04fSmrg # Lucid 6432a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6433a966c04fSmrg ;; 6434a966c04fSmrg *) 6435a966c04fSmrg ;; 6436a966c04fSmrg esac 6437a966c04fSmrg ;; 6438a966c04fSmrg tandem*) 6439a966c04fSmrg case $cc_basename in 6440a966c04fSmrg NCC*) 6441a966c04fSmrg # NonStop-UX NCC 3.20 6442a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6443a966c04fSmrg ;; 6444a966c04fSmrg *) 6445a966c04fSmrg ;; 6446a966c04fSmrg esac 6447a966c04fSmrg ;; 6448a966c04fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6449a966c04fSmrg case $cc_basename in 6450a966c04fSmrg CC*) 6451a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6452a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6453a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6454a966c04fSmrg ;; 6455a966c04fSmrg esac 6456a966c04fSmrg ;; 6457a966c04fSmrg vxworks*) 6458a966c04fSmrg ;; 6459a966c04fSmrg *) 6460a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6461a966c04fSmrg ;; 6462a966c04fSmrg esac 6463a966c04fSmrg fi 6464a966c04fSmrg], 6465a966c04fSmrg[ 6466a966c04fSmrg if test "$GCC" = yes; then 6467a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6468a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6469a966c04fSmrg 6470a966c04fSmrg case $host_os in 6471a966c04fSmrg aix*) 6472a966c04fSmrg # All AIX code is PIC. 6473a966c04fSmrg if test "$host_cpu" = ia64; then 6474a966c04fSmrg # AIX 5 now supports IA64 processor 6475a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6476a966c04fSmrg fi 6477a966c04fSmrg ;; 6478a966c04fSmrg 6479a966c04fSmrg amigaos*) 6480a966c04fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 6481a966c04fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 6482a966c04fSmrg # like `-m68040'. 6483a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6484a966c04fSmrg ;; 6485a966c04fSmrg 6486a966c04fSmrg beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6487a966c04fSmrg # PIC is the default for these OSes. 6488a966c04fSmrg ;; 6489a966c04fSmrg 6490a966c04fSmrg mingw* | pw32* | os2*) 6491a966c04fSmrg # This hack is so that the source file can tell whether it is being 6492a966c04fSmrg # built for inclusion in a dll (and should export symbols for example). 6493a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6494a966c04fSmrg ;; 6495a966c04fSmrg 6496a966c04fSmrg darwin* | rhapsody*) 6497a966c04fSmrg # PIC is the default on this platform 6498a966c04fSmrg # Common symbols not allowed in MH_DYLIB files 6499a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6500a966c04fSmrg ;; 6501a966c04fSmrg 6502a966c04fSmrg interix3*) 6503a966c04fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6504a966c04fSmrg # Instead, we relocate shared libraries at runtime. 6505a966c04fSmrg ;; 6506a966c04fSmrg 6507a966c04fSmrg msdosdjgpp*) 6508a966c04fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 6509a966c04fSmrg # on systems that don't support them. 6510a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6511a966c04fSmrg enable_shared=no 6512a966c04fSmrg ;; 6513a966c04fSmrg 6514a966c04fSmrg sysv4*MP*) 6515a966c04fSmrg if test -d /usr/nec; then 6516a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6517a966c04fSmrg fi 6518a966c04fSmrg ;; 6519a966c04fSmrg 6520a966c04fSmrg hpux*) 6521a966c04fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6522a966c04fSmrg # not for PA HP-UX. 6523a966c04fSmrg case $host_cpu in 6524a966c04fSmrg hppa*64*|ia64*) 6525a966c04fSmrg # +Z the default 6526a966c04fSmrg ;; 6527a966c04fSmrg *) 6528a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6529a966c04fSmrg ;; 6530a966c04fSmrg esac 6531a966c04fSmrg ;; 6532a966c04fSmrg 6533a966c04fSmrg *) 6534a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6535a966c04fSmrg ;; 6536a966c04fSmrg esac 6537a966c04fSmrg else 6538a966c04fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 6539a966c04fSmrg case $host_os in 6540a966c04fSmrg aix*) 6541a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6542a966c04fSmrg if test "$host_cpu" = ia64; then 6543a966c04fSmrg # AIX 5 now supports IA64 processor 6544a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6545a966c04fSmrg else 6546a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6547a966c04fSmrg fi 6548a966c04fSmrg ;; 6549a966c04fSmrg darwin*) 6550a966c04fSmrg # PIC is the default on this platform 6551a966c04fSmrg # Common symbols not allowed in MH_DYLIB files 6552a966c04fSmrg case $cc_basename in 6553a966c04fSmrg xlc*) 6554a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 6555a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6556a966c04fSmrg ;; 6557a966c04fSmrg esac 6558a966c04fSmrg ;; 6559a966c04fSmrg 6560a966c04fSmrg mingw* | pw32* | os2*) 6561a966c04fSmrg # This hack is so that the source file can tell whether it is being 6562a966c04fSmrg # built for inclusion in a dll (and should export symbols for example). 6563a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6564a966c04fSmrg ;; 6565a966c04fSmrg 6566a966c04fSmrg hpux9* | hpux10* | hpux11*) 6567a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6568a966c04fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6569a966c04fSmrg # not for PA HP-UX. 6570a966c04fSmrg case $host_cpu in 6571a966c04fSmrg hppa*64*|ia64*) 6572a966c04fSmrg # +Z the default 6573a966c04fSmrg ;; 6574a966c04fSmrg *) 6575a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6576a966c04fSmrg ;; 6577a966c04fSmrg esac 6578a966c04fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 6579a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6580a966c04fSmrg ;; 6581a966c04fSmrg 6582a966c04fSmrg irix5* | irix6* | nonstopux*) 6583a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6584a966c04fSmrg # PIC (with -KPIC) is the default. 6585a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6586a966c04fSmrg ;; 6587a966c04fSmrg 6588a966c04fSmrg newsos6) 6589a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6590a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6591a966c04fSmrg ;; 6592a966c04fSmrg 6593a966c04fSmrg linux*) 6594a966c04fSmrg case $cc_basename in 6595a966c04fSmrg icc* | ecc*) 6596a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6597a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6598a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6599a966c04fSmrg ;; 6600a966c04fSmrg pgcc* | pgf77* | pgf90* | pgf95*) 6601a966c04fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 6602a966c04fSmrg # which looks to be a dead project) 6603a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6604a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6605a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6606a966c04fSmrg ;; 6607a966c04fSmrg ccc*) 6608a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6609a966c04fSmrg # All Alpha code is PIC. 6610a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6611a966c04fSmrg ;; 6612a966c04fSmrg esac 6613a966c04fSmrg ;; 6614a966c04fSmrg 6615a966c04fSmrg osf3* | osf4* | osf5*) 6616a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6617a966c04fSmrg # All OSF/1 code is PIC. 6618a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6619a966c04fSmrg ;; 6620a966c04fSmrg 6621a966c04fSmrg solaris*) 6622a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6623a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6624a966c04fSmrg case $cc_basename in 6625a966c04fSmrg f77* | f90* | f95*) 6626a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6627a966c04fSmrg *) 6628a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6629a966c04fSmrg esac 6630a966c04fSmrg ;; 6631a966c04fSmrg 6632a966c04fSmrg sunos4*) 6633a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6634a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6635a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6636a966c04fSmrg ;; 6637a966c04fSmrg 6638a966c04fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 6639a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6640a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6641a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6642a966c04fSmrg ;; 6643a966c04fSmrg 6644a966c04fSmrg sysv4*MP*) 6645a966c04fSmrg if test -d /usr/nec ;then 6646a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6647a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6648a966c04fSmrg fi 6649a966c04fSmrg ;; 6650a966c04fSmrg 6651a966c04fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6652a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6653a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6654a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6655a966c04fSmrg ;; 6656a966c04fSmrg 6657a966c04fSmrg unicos*) 6658a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6659a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6660a966c04fSmrg ;; 6661a966c04fSmrg 6662a966c04fSmrg uts4*) 6663a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6664a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6665a966c04fSmrg ;; 6666a966c04fSmrg 6667a966c04fSmrg *) 6668a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6669a966c04fSmrg ;; 6670a966c04fSmrg esac 6671a966c04fSmrg fi 6672a966c04fSmrg]) 6673a966c04fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 6674a966c04fSmrg 6675a966c04fSmrg# 6676a966c04fSmrg# Check to make sure the PIC flag actually works. 6677a966c04fSmrg# 6678a966c04fSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 6679a966c04fSmrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 6680a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 6681a966c04fSmrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 6682a966c04fSmrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 6683a966c04fSmrg "" | " "*) ;; 6684a966c04fSmrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6685a966c04fSmrg esac], 6686a966c04fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6687a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 6688a966c04fSmrgfi 6689a966c04fSmrgcase $host_os in 6690a966c04fSmrg # For platforms which do not support PIC, -DPIC is meaningless: 6691a966c04fSmrg *djgpp*) 6692a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6693a966c04fSmrg ;; 6694a966c04fSmrg *) 6695a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 6696a966c04fSmrg ;; 6697a966c04fSmrgesac 6698a966c04fSmrg 6699a966c04fSmrg# 6700a966c04fSmrg# Check to make sure the static flag actually works. 6701a966c04fSmrg# 6702a966c04fSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 6703a966c04fSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 6704a966c04fSmrg _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 6705a966c04fSmrg $lt_tmp_static_flag, 6706a966c04fSmrg [], 6707a966c04fSmrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 6708a966c04fSmrg]) 6709a966c04fSmrg 6710a966c04fSmrg 6711a966c04fSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 6712a966c04fSmrg# ------------------------------------ 6713a966c04fSmrg# See if the linker supports building shared libraries. 6714a966c04fSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 6715a966c04fSmrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6716a966c04fSmrgifelse([$1],[CXX],[ 6717a966c04fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6718a966c04fSmrg case $host_os in 6719a966c04fSmrg aix4* | aix5*) 6720a966c04fSmrg # If we're using GNU nm, then we don't want the "-C" option. 6721a966c04fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6722a966c04fSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 6723a966c04fSmrg _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' 6724a966c04fSmrg else 6725a966c04fSmrg _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' 6726a966c04fSmrg fi 6727a966c04fSmrg ;; 6728a966c04fSmrg pw32*) 6729a966c04fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 6730a966c04fSmrg ;; 6731a966c04fSmrg cygwin* | mingw*) 6732a966c04fSmrg _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' 6733a966c04fSmrg ;; 6734a966c04fSmrg *) 6735a966c04fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6736a966c04fSmrg ;; 6737a966c04fSmrg esac 6738a966c04fSmrg],[ 6739a966c04fSmrg runpath_var= 6740a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6741a966c04fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6742a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)= 6743a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 6744a966c04fSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 6745a966c04fSmrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6746a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 6747a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6748a966c04fSmrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 6749a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6750a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6751a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 6752a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6753a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 6754a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6755a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 6756a966c04fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 6757a966c04fSmrg _LT_AC_TAGVAR(module_cmds, $1)= 6758a966c04fSmrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 6759a966c04fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 6760a966c04fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6761a966c04fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 6762a966c04fSmrg # included in the symbol list 6763a966c04fSmrg _LT_AC_TAGVAR(include_expsyms, $1)= 6764a966c04fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 6765a966c04fSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 6766a966c04fSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6767a966c04fSmrg # as well as any symbol that contains `d'. 6768a966c04fSmrg _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 6769a966c04fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6770a966c04fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 6771a966c04fSmrg # the symbol is explicitly referenced. Since portable code cannot 6772a966c04fSmrg # rely on this symbol name, it's probably fine to never include it in 6773a966c04fSmrg # preloaded symbol tables. 6774a966c04fSmrg extract_expsyms_cmds= 6775a966c04fSmrg # Just being paranoid about ensuring that cc_basename is set. 6776a966c04fSmrg _LT_CC_BASENAME([$compiler]) 6777a966c04fSmrg case $host_os in 6778a966c04fSmrg cygwin* | mingw* | pw32*) 6779a966c04fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 6780a966c04fSmrg # When not using gcc, we currently assume that we are using 6781a966c04fSmrg # Microsoft Visual C++. 6782a966c04fSmrg if test "$GCC" != yes; then 6783a966c04fSmrg with_gnu_ld=no 6784a966c04fSmrg fi 6785a966c04fSmrg ;; 6786a966c04fSmrg interix*) 6787a966c04fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 6788a966c04fSmrg with_gnu_ld=yes 6789a966c04fSmrg ;; 6790a966c04fSmrg openbsd*) 6791a966c04fSmrg with_gnu_ld=no 6792a966c04fSmrg ;; 6793a966c04fSmrg esac 6794a966c04fSmrg 6795a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6796a966c04fSmrg if test "$with_gnu_ld" = yes; then 6797a966c04fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 6798a966c04fSmrg wlarc='${wl}' 6799a966c04fSmrg 6800a966c04fSmrg # Set some defaults for GNU ld with shared library support. These 6801a966c04fSmrg # are reset later if shared libraries are not supported. Putting them 6802a966c04fSmrg # here allows them to be overridden if necessary. 6803a966c04fSmrg runpath_var=LD_RUN_PATH 6804a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6805a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6806a966c04fSmrg # ancient GNU ld didn't support --whole-archive et. al. 6807a966c04fSmrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 6808a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6809a966c04fSmrg else 6810a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6811a966c04fSmrg fi 6812a966c04fSmrg supports_anon_versioning=no 6813a966c04fSmrg case `$LD -v 2>/dev/null` in 6814a966c04fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6815a966c04fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6816a966c04fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6817a966c04fSmrg *\ 2.11.*) ;; # other 2.11 versions 6818a966c04fSmrg *) supports_anon_versioning=yes ;; 6819a966c04fSmrg esac 6820a966c04fSmrg 6821a966c04fSmrg # See if GNU ld supports shared libraries. 6822a966c04fSmrg case $host_os in 6823a966c04fSmrg aix3* | aix4* | aix5*) 6824a966c04fSmrg # On AIX/PPC, the GNU linker is very broken 6825a966c04fSmrg if test "$host_cpu" != ia64; then 6826a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6827a966c04fSmrg cat <<EOF 1>&2 6828a966c04fSmrg 6829a966c04fSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 6830a966c04fSmrg*** to be unable to reliably create shared libraries on AIX. 6831a966c04fSmrg*** Therefore, libtool is disabling shared libraries support. If you 6832a966c04fSmrg*** really care for shared libraries, you may want to modify your PATH 6833a966c04fSmrg*** so that a non-GNU linker is found, and then restart. 6834a966c04fSmrg 6835a966c04fSmrgEOF 6836a966c04fSmrg fi 6837a966c04fSmrg ;; 6838a966c04fSmrg 6839a966c04fSmrg amigaos*) 6840a966c04fSmrg _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)' 6841a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6842a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6843a966c04fSmrg 6844a966c04fSmrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 6845a966c04fSmrg # that the semantics of dynamic libraries on AmigaOS, at least up 6846a966c04fSmrg # to version 4, is to share data among multiple programs linked 6847a966c04fSmrg # with the same dynamic library. Since this doesn't match the 6848a966c04fSmrg # behavior of shared libraries on other platforms, we can't use 6849a966c04fSmrg # them. 6850a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6851a966c04fSmrg ;; 6852a966c04fSmrg 6853a966c04fSmrg beos*) 6854a966c04fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6855a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6856a966c04fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6857a966c04fSmrg # support --undefined. This deserves some investigation. FIXME 6858a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6859a966c04fSmrg else 6860a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6861a966c04fSmrg fi 6862a966c04fSmrg ;; 6863a966c04fSmrg 6864a966c04fSmrg cygwin* | mingw* | pw32*) 6865a966c04fSmrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6866a966c04fSmrg # as there is no search path for DLLs. 6867a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6868a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6869a966c04fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 6870a966c04fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6871a966c04fSmrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 6872a966c04fSmrg 6873a966c04fSmrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 6874a966c04fSmrg _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' 6875a966c04fSmrg # If the export-symbols file already is a .def file (1st line 6876a966c04fSmrg # is EXPORTS), use it as is; otherwise, prepend... 6877a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6878a966c04fSmrg cp $export_symbols $output_objdir/$soname.def; 6879a966c04fSmrg else 6880a966c04fSmrg echo EXPORTS > $output_objdir/$soname.def; 6881a966c04fSmrg cat $export_symbols >> $output_objdir/$soname.def; 6882a966c04fSmrg fi~ 6883a966c04fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6884a966c04fSmrg else 6885a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6886a966c04fSmrg fi 6887a966c04fSmrg ;; 6888a966c04fSmrg 6889a966c04fSmrg interix3*) 6890a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 6891a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6892a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6893a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6894a966c04fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6895a966c04fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6896a966c04fSmrg # default) and relocated if they conflict, which is a slow very memory 6897a966c04fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6898a966c04fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6899a966c04fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6900a966c04fSmrg _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' 6901a966c04fSmrg _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' 6902a966c04fSmrg ;; 6903a966c04fSmrg 6904a966c04fSmrg linux*) 6905a966c04fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6906a966c04fSmrg tmp_addflag= 6907a966c04fSmrg case $cc_basename,$host_cpu in 6908a966c04fSmrg pgcc*) # Portland Group C compiler 6909a966c04fSmrg _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' 6910a966c04fSmrg tmp_addflag=' $pic_flag' 6911a966c04fSmrg ;; 6912a966c04fSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 6913a966c04fSmrg _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' 6914a966c04fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 6915a966c04fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6916a966c04fSmrg tmp_addflag=' -i_dynamic' ;; 6917a966c04fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6918a966c04fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 6919a966c04fSmrg ifc* | ifort*) # Intel Fortran compiler 6920a966c04fSmrg tmp_addflag=' -nofor_main' ;; 6921a966c04fSmrg esac 6922a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6923a966c04fSmrg 6924a966c04fSmrg if test $supports_anon_versioning = yes; then 6925a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 6926a966c04fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6927a966c04fSmrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 6928a966c04fSmrg $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6929a966c04fSmrg fi 6930a966c04fSmrg else 6931a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6932a966c04fSmrg fi 6933a966c04fSmrg ;; 6934a966c04fSmrg 6935a966c04fSmrg netbsd*) 6936a966c04fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6937a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6938a966c04fSmrg wlarc= 6939a966c04fSmrg else 6940a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6941a966c04fSmrg _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' 6942a966c04fSmrg fi 6943a966c04fSmrg ;; 6944a966c04fSmrg 6945a966c04fSmrg solaris*) 6946a966c04fSmrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 6947a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6948a966c04fSmrg cat <<EOF 1>&2 6949a966c04fSmrg 6950a966c04fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6951a966c04fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 6952a966c04fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 6953a966c04fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 6954a966c04fSmrg*** your PATH or compiler configuration so that the native linker is 6955a966c04fSmrg*** used, and then restart. 6956a966c04fSmrg 6957a966c04fSmrgEOF 6958a966c04fSmrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6959a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6960a966c04fSmrg _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' 6961a966c04fSmrg else 6962a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6963a966c04fSmrg fi 6964a966c04fSmrg ;; 6965a966c04fSmrg 6966a966c04fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6967a966c04fSmrg case `$LD -v 2>&1` in 6968a966c04fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6969a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6970a966c04fSmrg cat <<_LT_EOF 1>&2 6971a966c04fSmrg 6972a966c04fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6973a966c04fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 6974a966c04fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 6975a966c04fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6976a966c04fSmrg*** your PATH or compiler configuration so that the native linker is 6977a966c04fSmrg*** used, and then restart. 6978a966c04fSmrg 6979a966c04fSmrg_LT_EOF 6980a966c04fSmrg ;; 6981a966c04fSmrg *) 6982a966c04fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6983a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 6984a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 6985a966c04fSmrg _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' 6986a966c04fSmrg else 6987a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 6988a966c04fSmrg fi 6989a966c04fSmrg ;; 6990a966c04fSmrg esac 6991a966c04fSmrg ;; 6992a966c04fSmrg 6993a966c04fSmrg sunos4*) 6994a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6995a966c04fSmrg wlarc= 6996a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6997a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6998a966c04fSmrg ;; 6999a966c04fSmrg 7000a966c04fSmrg *) 7001a966c04fSmrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7002a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7003a966c04fSmrg _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' 7004a966c04fSmrg else 7005a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7006a966c04fSmrg fi 7007a966c04fSmrg ;; 7008a966c04fSmrg esac 7009a966c04fSmrg 7010a966c04fSmrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 7011a966c04fSmrg runpath_var= 7012a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 7013a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 7014a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 7015a966c04fSmrg fi 7016a966c04fSmrg else 7017a966c04fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 7018a966c04fSmrg case $host_os in 7019a966c04fSmrg aix3*) 7020a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7021a966c04fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 7022a966c04fSmrg _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' 7023a966c04fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 7024a966c04fSmrg # are no directories specified by -L. 7025a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7026a966c04fSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 7027a966c04fSmrg # Neither direct hardcoding nor static linking is supported with a 7028a966c04fSmrg # broken collect2. 7029a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 7030a966c04fSmrg fi 7031a966c04fSmrg ;; 7032a966c04fSmrg 7033a966c04fSmrg aix4* | aix5*) 7034a966c04fSmrg if test "$host_cpu" = ia64; then 7035a966c04fSmrg # On IA64, the linker does run time linking by default, so we don't 7036a966c04fSmrg # have to do anything special. 7037a966c04fSmrg aix_use_runtimelinking=no 7038a966c04fSmrg exp_sym_flag='-Bexport' 7039a966c04fSmrg no_entry_flag="" 7040a966c04fSmrg else 7041a966c04fSmrg # If we're using GNU nm, then we don't want the "-C" option. 7042a966c04fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 7043a966c04fSmrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 7044a966c04fSmrg _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' 7045a966c04fSmrg else 7046a966c04fSmrg _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' 7047a966c04fSmrg fi 7048a966c04fSmrg aix_use_runtimelinking=no 7049a966c04fSmrg 7050a966c04fSmrg # Test if we are trying to use run time linking or normal 7051a966c04fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7052a966c04fSmrg # need to do runtime linking. 7053a966c04fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 7054a966c04fSmrg for ld_flag in $LDFLAGS; do 7055a966c04fSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 7056a966c04fSmrg aix_use_runtimelinking=yes 7057a966c04fSmrg break 7058a966c04fSmrg fi 7059a966c04fSmrg done 7060a966c04fSmrg ;; 7061a966c04fSmrg esac 7062a966c04fSmrg 7063a966c04fSmrg exp_sym_flag='-bexport' 7064a966c04fSmrg no_entry_flag='-bnoentry' 7065a966c04fSmrg fi 7066a966c04fSmrg 7067a966c04fSmrg # When large executables or shared objects are built, AIX ld can 7068a966c04fSmrg # have problems creating the table of contents. If linking a library 7069a966c04fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 7070a966c04fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7071a966c04fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7072a966c04fSmrg 7073a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='' 7074a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7075a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 7076a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7077a966c04fSmrg 7078a966c04fSmrg if test "$GCC" = yes; then 7079a966c04fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7080a966c04fSmrg # We only want to do this on AIX 4.2 and lower, the check 7081a966c04fSmrg # below for broken collect2 doesn't work under 4.3+ 7082a966c04fSmrg collect2name=`${CC} -print-prog-name=collect2` 7083a966c04fSmrg if test -f "$collect2name" && \ 7084a966c04fSmrg strings "$collect2name" | grep resolve_lib_name >/dev/null 7085a966c04fSmrg then 7086a966c04fSmrg # We have reworked collect2 7087a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7088a966c04fSmrg else 7089a966c04fSmrg # We have old collect2 7090a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 7091a966c04fSmrg # It fails to find uninstalled libraries when the uninstalled 7092a966c04fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 7093a966c04fSmrg # to unsupported forces relinking 7094a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7095a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7096a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 7097a966c04fSmrg fi 7098a966c04fSmrg ;; 7099a966c04fSmrg esac 7100a966c04fSmrg shared_flag='-shared' 7101a966c04fSmrg if test "$aix_use_runtimelinking" = yes; then 7102a966c04fSmrg shared_flag="$shared_flag "'${wl}-G' 7103a966c04fSmrg fi 7104a966c04fSmrg else 7105a966c04fSmrg # not using gcc 7106a966c04fSmrg if test "$host_cpu" = ia64; then 7107a966c04fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7108a966c04fSmrg # chokes on -Wl,-G. The following line is correct: 7109a966c04fSmrg shared_flag='-G' 7110a966c04fSmrg else 7111a966c04fSmrg if test "$aix_use_runtimelinking" = yes; then 7112a966c04fSmrg shared_flag='${wl}-G' 7113a966c04fSmrg else 7114a966c04fSmrg shared_flag='${wl}-bM:SRE' 7115a966c04fSmrg fi 7116a966c04fSmrg fi 7117a966c04fSmrg fi 7118a966c04fSmrg 7119a966c04fSmrg # It seems that -bexpall does not export symbols beginning with 7120a966c04fSmrg # underscore (_), so it is better to generate a list of symbols to export. 7121a966c04fSmrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 7122a966c04fSmrg if test "$aix_use_runtimelinking" = yes; then 7123a966c04fSmrg # Warning - without using the other runtime loading flags (-brtl), 7124a966c04fSmrg # -berok will link without error, but may produce a broken library. 7125a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 7126a966c04fSmrg # Determine the default libpath from the value encoded in an empty executable. 7127a966c04fSmrg _LT_AC_SYS_LIBPATH_AIX 7128a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7129a966c04fSmrg _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" 7130a966c04fSmrg else 7131a966c04fSmrg if test "$host_cpu" = ia64; then 7132a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7133a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7134a966c04fSmrg _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" 7135a966c04fSmrg else 7136a966c04fSmrg # Determine the default libpath from the value encoded in an empty executable. 7137a966c04fSmrg _LT_AC_SYS_LIBPATH_AIX 7138a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7139a966c04fSmrg # Warning - without using the other run time loading flags, 7140a966c04fSmrg # -berok will link without error, but may produce a broken library. 7141a966c04fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7142a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7143a966c04fSmrg # Exported symbols can be pulled into shared objects from archives 7144a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7145a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7146a966c04fSmrg # This is similar to how AIX traditionally builds its shared libraries. 7147a966c04fSmrg _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' 7148a966c04fSmrg fi 7149a966c04fSmrg fi 7150a966c04fSmrg ;; 7151a966c04fSmrg 7152a966c04fSmrg amigaos*) 7153a966c04fSmrg _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)' 7154a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7155a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7156a966c04fSmrg # see comment about different semantics on the GNU ld section 7157a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7158a966c04fSmrg ;; 7159a966c04fSmrg 7160a966c04fSmrg bsdi[[45]]*) 7161a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7162a966c04fSmrg ;; 7163a966c04fSmrg 7164a966c04fSmrg cygwin* | mingw* | pw32*) 7165a966c04fSmrg # When not using gcc, we currently assume that we are using 7166a966c04fSmrg # Microsoft Visual C++. 7167a966c04fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 7168a966c04fSmrg # no search path for DLLs. 7169a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7170a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7171a966c04fSmrg # Tell ltmain to make .lib files, not .a files. 7172a966c04fSmrg libext=lib 7173a966c04fSmrg # Tell ltmain to make .dll files, not .so files. 7174a966c04fSmrg shrext_cmds=".dll" 7175a966c04fSmrg # FIXME: Setting linknames here is a bad hack. 7176a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 7177a966c04fSmrg # The linker will automatically build a .lib file if we build a DLL. 7178a966c04fSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 7179a966c04fSmrg # FIXME: Should let the user specify the lib program. 7180a966c04fSmrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 7181a966c04fSmrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7182a966c04fSmrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7183a966c04fSmrg ;; 7184a966c04fSmrg 7185a966c04fSmrg darwin* | rhapsody*) 7186a966c04fSmrg case $host_os in 7187a966c04fSmrg rhapsody* | darwin1.[[012]]) 7188a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 7189a966c04fSmrg ;; 7190a966c04fSmrg *) # Darwin 1.3 on 7191a966c04fSmrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 7192a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 7193a966c04fSmrg else 7194a966c04fSmrg case ${MACOSX_DEPLOYMENT_TARGET} in 7195a966c04fSmrg 10.[[012]]) 7196a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 7197a966c04fSmrg ;; 7198a966c04fSmrg 10.*) 7199a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 7200a966c04fSmrg ;; 7201a966c04fSmrg esac 7202a966c04fSmrg fi 7203a966c04fSmrg ;; 7204a966c04fSmrg esac 7205a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7206a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7207a966c04fSmrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 7208a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7209a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 7210a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7211a966c04fSmrg if test "$GCC" = yes ; then 7212a966c04fSmrg output_verbose_link_cmd='echo' 7213a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 7214a966c04fSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 7215a966c04fSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 7216a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 7217a966c04fSmrg _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}' 7218a966c04fSmrg else 7219a966c04fSmrg case $cc_basename in 7220a966c04fSmrg xlc*) 7221a966c04fSmrg output_verbose_link_cmd='echo' 7222a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 7223a966c04fSmrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 7224a966c04fSmrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 7225a966c04fSmrg _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 7226a966c04fSmrg _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}' 7227a966c04fSmrg ;; 7228a966c04fSmrg *) 7229a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7230a966c04fSmrg ;; 7231a966c04fSmrg esac 7232a966c04fSmrg fi 7233a966c04fSmrg ;; 7234a966c04fSmrg 7235a966c04fSmrg dgux*) 7236a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7237a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7238a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7239a966c04fSmrg ;; 7240a966c04fSmrg 7241a966c04fSmrg freebsd1*) 7242a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7243a966c04fSmrg ;; 7244a966c04fSmrg 7245a966c04fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7246a966c04fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 7247a966c04fSmrg # does not break anything, and helps significantly (at the cost of a little 7248a966c04fSmrg # extra space). 7249a966c04fSmrg freebsd2.2*) 7250a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7251a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7252a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7253a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7254a966c04fSmrg ;; 7255a966c04fSmrg 7256a966c04fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7257a966c04fSmrg freebsd2*) 7258a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7259a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7260a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7261a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7262a966c04fSmrg ;; 7263a966c04fSmrg 7264a966c04fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7265a966c04fSmrg freebsd* | kfreebsd*-gnu | dragonfly*) 7266a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7267a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7268a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7269a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7270a966c04fSmrg ;; 7271a966c04fSmrg 7272a966c04fSmrg hpux9*) 7273a966c04fSmrg if test "$GCC" = yes; then 7274a966c04fSmrg _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' 7275a966c04fSmrg else 7276a966c04fSmrg _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' 7277a966c04fSmrg fi 7278a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7279a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7280a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7281a966c04fSmrg 7282a966c04fSmrg # hardcode_minus_L: Not really in the search PATH, 7283a966c04fSmrg # but as the default location of the library. 7284a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7285a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7286a966c04fSmrg ;; 7287a966c04fSmrg 7288a966c04fSmrg hpux10*) 7289a966c04fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7290a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7291a966c04fSmrg else 7292a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7293a966c04fSmrg fi 7294a966c04fSmrg if test "$with_gnu_ld" = no; then 7295a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7296a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7297a966c04fSmrg 7298a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7299a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7300a966c04fSmrg 7301a966c04fSmrg # hardcode_minus_L: Not really in the search PATH, 7302a966c04fSmrg # but as the default location of the library. 7303a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7304a966c04fSmrg fi 7305a966c04fSmrg ;; 7306a966c04fSmrg 7307a966c04fSmrg hpux11*) 7308a966c04fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7309a966c04fSmrg case $host_cpu in 7310a966c04fSmrg hppa*64*) 7311a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7312a966c04fSmrg ;; 7313a966c04fSmrg ia64*) 7314a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7315a966c04fSmrg ;; 7316a966c04fSmrg *) 7317a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7318a966c04fSmrg ;; 7319a966c04fSmrg esac 7320a966c04fSmrg else 7321a966c04fSmrg case $host_cpu in 7322a966c04fSmrg hppa*64*) 7323a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7324a966c04fSmrg ;; 7325a966c04fSmrg ia64*) 7326a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7327a966c04fSmrg ;; 7328a966c04fSmrg *) 7329a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7330a966c04fSmrg ;; 7331a966c04fSmrg esac 7332a966c04fSmrg fi 7333a966c04fSmrg if test "$with_gnu_ld" = no; then 7334a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7335a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7336a966c04fSmrg 7337a966c04fSmrg case $host_cpu in 7338a966c04fSmrg hppa*64*|ia64*) 7339a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7340a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7341a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7342a966c04fSmrg ;; 7343a966c04fSmrg *) 7344a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7345a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7346a966c04fSmrg 7347a966c04fSmrg # hardcode_minus_L: Not really in the search PATH, 7348a966c04fSmrg # but as the default location of the library. 7349a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7350a966c04fSmrg ;; 7351a966c04fSmrg esac 7352a966c04fSmrg fi 7353a966c04fSmrg ;; 7354a966c04fSmrg 7355a966c04fSmrg irix5* | irix6* | nonstopux*) 7356a966c04fSmrg if test "$GCC" = yes; then 7357a966c04fSmrg _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' 7358a966c04fSmrg else 7359a966c04fSmrg _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' 7360a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 7361a966c04fSmrg fi 7362a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7363a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7364a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7365a966c04fSmrg ;; 7366a966c04fSmrg 7367a966c04fSmrg netbsd*) 7368a966c04fSmrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 7369a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7370a966c04fSmrg else 7371a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7372a966c04fSmrg fi 7373a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7374a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7375a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7376a966c04fSmrg ;; 7377a966c04fSmrg 7378a966c04fSmrg newsos6) 7379a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7380a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7381a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7382a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7383a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7384a966c04fSmrg ;; 7385a966c04fSmrg 7386a966c04fSmrg openbsd*) 7387a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7388a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7389a966c04fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7390a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7391a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7392a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7393a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7394a966c04fSmrg else 7395a966c04fSmrg case $host_os in 7396a966c04fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7397a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7398a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7399a966c04fSmrg ;; 7400a966c04fSmrg *) 7401a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7402a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7403a966c04fSmrg ;; 7404a966c04fSmrg esac 7405a966c04fSmrg fi 7406a966c04fSmrg ;; 7407a966c04fSmrg 7408a966c04fSmrg os2*) 7409a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7410a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7411a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7412a966c04fSmrg _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' 7413a966c04fSmrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7414a966c04fSmrg ;; 7415a966c04fSmrg 7416a966c04fSmrg osf3*) 7417a966c04fSmrg if test "$GCC" = yes; then 7418a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7419a966c04fSmrg _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' 7420a966c04fSmrg else 7421a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7422a966c04fSmrg _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' 7423a966c04fSmrg fi 7424a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7425a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7426a966c04fSmrg ;; 7427a966c04fSmrg 7428a966c04fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 7429a966c04fSmrg if test "$GCC" = yes; then 7430a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7431a966c04fSmrg _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' 7432a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7433a966c04fSmrg else 7434a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7435a966c04fSmrg _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' 7436a966c04fSmrg _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~ 7437a966c04fSmrg $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' 7438a966c04fSmrg 7439a966c04fSmrg # Both c and cxx compiler support -rpath directly 7440a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7441a966c04fSmrg fi 7442a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 7443a966c04fSmrg ;; 7444a966c04fSmrg 7445a966c04fSmrg solaris*) 7446a966c04fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 7447a966c04fSmrg if test "$GCC" = yes; then 7448a966c04fSmrg wlarc='${wl}' 7449a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7450a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 7451a966c04fSmrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 7452a966c04fSmrg else 7453a966c04fSmrg wlarc='' 7454a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7455a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 7456a966c04fSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 7457a966c04fSmrg fi 7458a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7459a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7460a966c04fSmrg case $host_os in 7461a966c04fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7462a966c04fSmrg *) 7463a966c04fSmrg # The compiler driver will combine linker options so we 7464a966c04fSmrg # cannot just pass the convience library names through 7465a966c04fSmrg # without $wl, iff we do not link with $LD. 7466a966c04fSmrg # Luckily, gcc supports the same syntax we need for Sun Studio. 7467a966c04fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7468a966c04fSmrg case $wlarc in 7469a966c04fSmrg '') 7470a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 7471a966c04fSmrg *) 7472a966c04fSmrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; 7473a966c04fSmrg esac ;; 7474a966c04fSmrg esac 7475a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7476a966c04fSmrg ;; 7477a966c04fSmrg 7478a966c04fSmrg sunos4*) 7479a966c04fSmrg if test "x$host_vendor" = xsequent; then 7480a966c04fSmrg # Use $CC to link under sequent, because it throws in some extra .o 7481a966c04fSmrg # files that make .init and .fini sections work. 7482a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7483a966c04fSmrg else 7484a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7485a966c04fSmrg fi 7486a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7487a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7488a966c04fSmrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7489a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7490a966c04fSmrg ;; 7491a966c04fSmrg 7492a966c04fSmrg sysv4) 7493a966c04fSmrg case $host_vendor in 7494a966c04fSmrg sni) 7495a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7496a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7497a966c04fSmrg ;; 7498a966c04fSmrg siemens) 7499a966c04fSmrg ## LD is ld it makes a PLAMLIB 7500a966c04fSmrg ## CC just makes a GrossModule. 7501a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7502a966c04fSmrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7503a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 7504a966c04fSmrg ;; 7505a966c04fSmrg motorola) 7506a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7507a966c04fSmrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7508a966c04fSmrg ;; 7509a966c04fSmrg esac 7510a966c04fSmrg runpath_var='LD_RUN_PATH' 7511a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7512a966c04fSmrg ;; 7513a966c04fSmrg 7514a966c04fSmrg sysv4.3*) 7515a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7516a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7517a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 7518a966c04fSmrg ;; 7519a966c04fSmrg 7520a966c04fSmrg sysv4*MP*) 7521a966c04fSmrg if test -d /usr/nec; then 7522a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7523a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7524a966c04fSmrg runpath_var=LD_RUN_PATH 7525a966c04fSmrg hardcode_runpath_var=yes 7526a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 7527a966c04fSmrg fi 7528a966c04fSmrg ;; 7529a966c04fSmrg 7530a966c04fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 7531a966c04fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7532a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7533a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7534a966c04fSmrg runpath_var='LD_RUN_PATH' 7535a966c04fSmrg 7536a966c04fSmrg if test "$GCC" = yes; then 7537a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7538a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7539a966c04fSmrg else 7540a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7541a966c04fSmrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7542a966c04fSmrg fi 7543a966c04fSmrg ;; 7544a966c04fSmrg 7545a966c04fSmrg sysv5* | sco3.2v5* | sco5v6*) 7546a966c04fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 7547a966c04fSmrg # link with -lc, and that would cause any symbols used from libc to 7548a966c04fSmrg # always be unresolved, which means just about no library would 7549a966c04fSmrg # ever link correctly. If we're not using GNU ld we use -z text 7550a966c04fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 7551a966c04fSmrg # as -z defs. 7552a966c04fSmrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7553a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7554a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7555a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7556a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 7557a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 7558a966c04fSmrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7559a966c04fSmrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7560a966c04fSmrg runpath_var='LD_RUN_PATH' 7561a966c04fSmrg 7562a966c04fSmrg if test "$GCC" = yes; then 7563a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 7564a966c04fSmrg _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' 7565a966c04fSmrg else 7566a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 7567a966c04fSmrg _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' 7568a966c04fSmrg fi 7569a966c04fSmrg ;; 7570a966c04fSmrg 7571a966c04fSmrg uts4*) 7572a966c04fSmrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7573a966c04fSmrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7574a966c04fSmrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7575a966c04fSmrg ;; 7576a966c04fSmrg 7577a966c04fSmrg *) 7578a966c04fSmrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 7579a966c04fSmrg ;; 7580a966c04fSmrg esac 7581a966c04fSmrg fi 7582a966c04fSmrg]) 7583a966c04fSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 7584a966c04fSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7585a966c04fSmrg 7586a966c04fSmrg# 7587a966c04fSmrg# Do we need to explicitly link libc? 7588a966c04fSmrg# 7589a966c04fSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 7590a966c04fSmrgx|xyes) 7591a966c04fSmrg # Assume -lc should be added 7592a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7593a966c04fSmrg 7594a966c04fSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 7595a966c04fSmrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 7596a966c04fSmrg *'~'*) 7597a966c04fSmrg # FIXME: we may have to deal with multi-command sequences. 7598a966c04fSmrg ;; 7599a966c04fSmrg '$CC '*) 7600a966c04fSmrg # Test whether the compiler implicitly links with -lc since on some 7601a966c04fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 7602a966c04fSmrg # to ld, don't add -lc before -lgcc. 7603a966c04fSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 7604a966c04fSmrg $rm conftest* 7605a966c04fSmrg printf "$lt_simple_compile_test_code" > conftest.$ac_ext 7606a966c04fSmrg 7607a966c04fSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 7608a966c04fSmrg soname=conftest 7609a966c04fSmrg lib=conftest 7610a966c04fSmrg libobjs=conftest.$ac_objext 7611a966c04fSmrg deplibs= 7612a966c04fSmrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 7613a966c04fSmrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 7614a966c04fSmrg compiler_flags=-v 7615a966c04fSmrg linker_flags=-v 7616a966c04fSmrg verstring= 7617a966c04fSmrg output_objdir=. 7618a966c04fSmrg libname=conftest 7619a966c04fSmrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 7620a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 7621a966c04fSmrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 7622a966c04fSmrg then 7623a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7624a966c04fSmrg else 7625a966c04fSmrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7626a966c04fSmrg fi 7627a966c04fSmrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7628a966c04fSmrg else 7629a966c04fSmrg cat conftest.err 1>&5 7630a966c04fSmrg fi 7631a966c04fSmrg $rm conftest* 7632a966c04fSmrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 7633a966c04fSmrg ;; 7634a966c04fSmrg esac 7635a966c04fSmrg fi 7636a966c04fSmrg ;; 7637a966c04fSmrgesac 7638a966c04fSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS 7639a966c04fSmrg 7640a966c04fSmrg 7641a966c04fSmrg# _LT_AC_FILE_LTDLL_C 7642a966c04fSmrg# ------------------- 7643a966c04fSmrg# Be careful that the start marker always follows a newline. 7644a966c04fSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 7645a966c04fSmrg# /* ltdll.c starts here */ 7646a966c04fSmrg# #define WIN32_LEAN_AND_MEAN 7647a966c04fSmrg# #include <windows.h> 7648a966c04fSmrg# #undef WIN32_LEAN_AND_MEAN 7649a966c04fSmrg# #include <stdio.h> 7650a966c04fSmrg# 7651a966c04fSmrg# #ifndef __CYGWIN__ 7652a966c04fSmrg# # ifdef __CYGWIN32__ 7653a966c04fSmrg# # define __CYGWIN__ __CYGWIN32__ 7654a966c04fSmrg# # endif 7655a966c04fSmrg# #endif 7656a966c04fSmrg# 7657a966c04fSmrg# #ifdef __cplusplus 7658a966c04fSmrg# extern "C" { 7659a966c04fSmrg# #endif 7660a966c04fSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 7661a966c04fSmrg# #ifdef __cplusplus 7662a966c04fSmrg# } 7663a966c04fSmrg# #endif 7664a966c04fSmrg# 7665a966c04fSmrg# #ifdef __CYGWIN__ 7666a966c04fSmrg# #include <cygwin/cygwin_dll.h> 7667a966c04fSmrg# DECLARE_CYGWIN_DLL( DllMain ); 7668a966c04fSmrg# #endif 7669a966c04fSmrg# HINSTANCE __hDllInstance_base; 7670a966c04fSmrg# 7671a966c04fSmrg# BOOL APIENTRY 7672a966c04fSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 7673a966c04fSmrg# { 7674a966c04fSmrg# __hDllInstance_base = hInst; 7675a966c04fSmrg# return TRUE; 7676a966c04fSmrg# } 7677a966c04fSmrg# /* ltdll.c ends here */ 7678a966c04fSmrg])# _LT_AC_FILE_LTDLL_C 7679a966c04fSmrg 7680a966c04fSmrg 7681a966c04fSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 7682a966c04fSmrg# --------------------------------- 7683a966c04fSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 7684a966c04fSmrg 7685a966c04fSmrg 7686a966c04fSmrg# old names 7687a966c04fSmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 7688a966c04fSmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7689a966c04fSmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7690a966c04fSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7691a966c04fSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7692a966c04fSmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 7693a966c04fSmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 7694a966c04fSmrg 7695a966c04fSmrg# This is just to silence aclocal about the macro not being used 7696a966c04fSmrgifelse([AC_DISABLE_FAST_INSTALL]) 7697a966c04fSmrg 7698a966c04fSmrgAC_DEFUN([LT_AC_PROG_GCJ], 7699a966c04fSmrg[AC_CHECK_TOOL(GCJ, gcj, no) 7700a966c04fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7701a966c04fSmrg AC_SUBST(GCJFLAGS) 7702a966c04fSmrg]) 7703a966c04fSmrg 7704a966c04fSmrgAC_DEFUN([LT_AC_PROG_RC], 7705a966c04fSmrg[AC_CHECK_TOOL(RC, windres, no) 7706a966c04fSmrg]) 7707a966c04fSmrg 7708a966c04fSmrg# NOTE: This macro has been submitted for inclusion into # 7709a966c04fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7710a966c04fSmrg# a released version of Autoconf we should remove this # 7711a966c04fSmrg# macro and use it instead. # 7712a966c04fSmrg# LT_AC_PROG_SED 7713a966c04fSmrg# -------------- 7714a966c04fSmrg# Check for a fully-functional sed program, that truncates 7715a966c04fSmrg# as few characters as possible. Prefer GNU sed if found. 7716a966c04fSmrgAC_DEFUN([LT_AC_PROG_SED], 7717a966c04fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7718a966c04fSmrgAC_CACHE_VAL(lt_cv_path_SED, 7719a966c04fSmrg[# Loop through the user's path and test for sed and gsed. 7720a966c04fSmrg# Then use that list of sed's as ones to test for truncation. 7721a966c04fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7722a966c04fSmrgfor as_dir in $PATH 7723a966c04fSmrgdo 7724a966c04fSmrg IFS=$as_save_IFS 7725a966c04fSmrg test -z "$as_dir" && as_dir=. 7726a966c04fSmrg for lt_ac_prog in sed gsed; do 7727a966c04fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7728a966c04fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7729a966c04fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7730a966c04fSmrg fi 7731a966c04fSmrg done 7732a966c04fSmrg done 7733a966c04fSmrgdone 7734a966c04fSmrglt_ac_max=0 7735a966c04fSmrglt_ac_count=0 7736a966c04fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7737a966c04fSmrg# along with /bin/sed that truncates output. 7738a966c04fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7739a966c04fSmrg test ! -f $lt_ac_sed && continue 7740a966c04fSmrg cat /dev/null > conftest.in 7741a966c04fSmrg lt_ac_count=0 7742a966c04fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7743a966c04fSmrg # Check for GNU sed and select it if it is found. 7744a966c04fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7745a966c04fSmrg lt_cv_path_SED=$lt_ac_sed 7746a966c04fSmrg break 7747a966c04fSmrg fi 7748a966c04fSmrg while true; do 7749a966c04fSmrg cat conftest.in conftest.in >conftest.tmp 7750a966c04fSmrg mv conftest.tmp conftest.in 7751a966c04fSmrg cp conftest.in conftest.nl 7752a966c04fSmrg echo >>conftest.nl 7753a966c04fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7754a966c04fSmrg cmp -s conftest.out conftest.nl || break 7755a966c04fSmrg # 10000 chars as input seems more than enough 7756a966c04fSmrg test $lt_ac_count -gt 10 && break 7757a966c04fSmrg lt_ac_count=`expr $lt_ac_count + 1` 7758a966c04fSmrg if test $lt_ac_count -gt $lt_ac_max; then 7759a966c04fSmrg lt_ac_max=$lt_ac_count 7760a966c04fSmrg lt_cv_path_SED=$lt_ac_sed 7761a966c04fSmrg fi 7762a966c04fSmrg done 7763a966c04fSmrgdone 7764a966c04fSmrg]) 7765a966c04fSmrgSED=$lt_cv_path_SED 7766a966c04fSmrgAC_MSG_RESULT([$SED]) 7767a966c04fSmrg]) 7768a966c04fSmrg 7769a966c04fSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 7770a966c04fSmrg# 7771a966c04fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 7772a966c04fSmrg# 7773a966c04fSmrg# This program is free software; you can redistribute it and/or modify 7774a966c04fSmrg# it under the terms of the GNU General Public License as published by 7775a966c04fSmrg# the Free Software Foundation; either version 2 of the License, or 7776a966c04fSmrg# (at your option) any later version. 7777a966c04fSmrg# 7778a966c04fSmrg# This program is distributed in the hope that it will be useful, but 7779a966c04fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 7780a966c04fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 7781a966c04fSmrg# General Public License for more details. 7782a966c04fSmrg# 7783a966c04fSmrg# You should have received a copy of the GNU General Public License 7784a966c04fSmrg# along with this program; if not, write to the Free Software 7785a966c04fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 7786a966c04fSmrg# 7787a966c04fSmrg# As a special exception to the GNU General Public License, if you 7788a966c04fSmrg# distribute this file as part of a program that contains a 7789a966c04fSmrg# configuration script generated by Autoconf, you may include it under 7790a966c04fSmrg# the same distribution terms that you use for the rest of that program. 7791a966c04fSmrg 7792a966c04fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 7793a966c04fSmrg# ---------------------------------- 7794a966c04fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 7795a966c04fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 7796a966c04fSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 7797a966c04fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 7798a966c04fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 7799a966c04fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 7800a966c04fSmrgfi 7801a966c04fSmrgif test -n "$PKG_CONFIG"; then 7802a966c04fSmrg _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) 7803a966c04fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 7804a966c04fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 7805a966c04fSmrg AC_MSG_RESULT([yes]) 7806a966c04fSmrg else 7807a966c04fSmrg AC_MSG_RESULT([no]) 7808a966c04fSmrg PKG_CONFIG="" 7809a966c04fSmrg fi 7810a966c04fSmrg 7811a966c04fSmrgfi[]dnl 7812a966c04fSmrg])# PKG_PROG_PKG_CONFIG 7813a966c04fSmrg 7814a966c04fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 7815a966c04fSmrg# 7816a966c04fSmrg# Check to see whether a particular set of modules exists. Similar 7817a966c04fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 7818a966c04fSmrg# 7819a966c04fSmrg# 7820a966c04fSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 7821a966c04fSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 7822a966c04fSmrg# PKG_CHECK_EXISTS manually 7823a966c04fSmrg# -------------------------------------------------------------- 7824a966c04fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 7825a966c04fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 7826a966c04fSmrgif test -n "$PKG_CONFIG" && \ 7827a966c04fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 7828a966c04fSmrg m4_ifval([$2], [$2], [:]) 7829a966c04fSmrgm4_ifvaln([$3], [else 7830a966c04fSmrg $3])dnl 7831a966c04fSmrgfi]) 7832a966c04fSmrg 7833a966c04fSmrg 7834a966c04fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 7835a966c04fSmrg# --------------------------------------------- 7836a966c04fSmrgm4_define([_PKG_CONFIG], 7837a966c04fSmrg[if test -n "$PKG_CONFIG"; then 7838a966c04fSmrg PKG_CHECK_EXISTS([$3], 7839a966c04fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 7840a966c04fSmrg [pkg_failed=yes]) 7841a966c04fSmrgelse 7842a966c04fSmrg pkg_failed=untried 7843a966c04fSmrgfi[]dnl 7844a966c04fSmrg])# _PKG_CONFIG 7845a966c04fSmrg 7846a966c04fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 7847a966c04fSmrg# [ACTION-IF-NOT-FOUND]) 7848a966c04fSmrg# 7849a966c04fSmrg# 7850a966c04fSmrg# Note that if there is a possibility the first call to 7851a966c04fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 7852a966c04fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 7853a966c04fSmrg# 7854a966c04fSmrg# 7855a966c04fSmrg# -------------------------------------------------------------- 7856a966c04fSmrgAC_DEFUN([PKG_CHECK_MODULES], 7857a966c04fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 7858a966c04fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 7859a966c04fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 7860a966c04fSmrg 7861a966c04fSmrgpkg_failed=no 7862a966c04fSmrgAC_MSG_CHECKING([for $1]) 7863a966c04fSmrg 7864a966c04fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 7865a966c04fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 7866a966c04fSmrg 7867a966c04fSmrgif test $pkg_failed = yes; then 7868a966c04fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 7869a966c04fSmrg # Put the nasty error message in config.log where it belongs 7870a966c04fSmrg echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD 7871a966c04fSmrg 7872a966c04fSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 7873a966c04fSmrg[Package requirements ($2) were not met. 7874a966c04fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 7875a966c04fSmrginstalled software in a non-standard prefix. 7876a966c04fSmrg 7877a966c04fSmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables 7878a966c04fSmrgto avoid the need to call pkg-config. See the pkg-config man page for 7879a966c04fSmrgmore details.])], 7880a966c04fSmrg [$4]) 7881a966c04fSmrgelif test $pkg_failed = untried; then 7882a966c04fSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 7883a966c04fSmrg[The pkg-config script could not be found or is too old. Make sure it 7884a966c04fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 7885a966c04fSmrgpath to pkg-config. 7886a966c04fSmrg 7887a966c04fSmrgAlternatively you may set the $1_CFLAGS and $1_LIBS environment variables 7888a966c04fSmrgto avoid the need to call pkg-config. See the pkg-config man page for 7889a966c04fSmrgmore details. 7890a966c04fSmrg 7891a966c04fSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 7892a966c04fSmrg [$4]) 7893a966c04fSmrgelse 7894a966c04fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 7895a966c04fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 7896a966c04fSmrg AC_MSG_RESULT([yes]) 7897a966c04fSmrg ifelse([$3], , :, [$3]) 7898a966c04fSmrgfi[]dnl 7899a966c04fSmrg])# PKG_CHECK_MODULES 7900a966c04fSmrg 7901a966c04fSmrgm4_include([acinclude.m4]) 7902