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