aclocal.m4 revision b41a30aa
1b41a30aaSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 257ee1794Smrg 3b41a30aaSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4a253d6aeSmrg 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 1457ee1794Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15ea133fd7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16ea133fd7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17b41a30aaSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18b41a30aaSmrg[m4_warning([this file was generated for autoconf 2.71. 19ea133fd7SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20ea133fd7SmrgIf you have problems, you may need to regenerate the build system entirely. 2157ee1794SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22a253d6aeSmrg 23b41a30aaSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24a253d6aeSmrg# 25b41a30aaSmrg# This file is free software; the Free Software Foundation 26b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 27b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 28b41a30aaSmrg 29b41a30aaSmrg# AM_AUTOMAKE_VERSION(VERSION) 30b41a30aaSmrg# ---------------------------- 31b41a30aaSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32b41a30aaSmrg# generated from the m4 files accompanying Automake X.Y. 33b41a30aaSmrg# (This private macro should not be called outside this file.) 34b41a30aaSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35b41a30aaSmrg[am__api_version='1.16' 36b41a30aaSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37b41a30aaSmrgdnl require some minimum version. Point them to the right macro. 38b41a30aaSmrgm4_if([$1], [1.16.5], [], 39b41a30aaSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40b41a30aaSmrg]) 41b41a30aaSmrg 42b41a30aaSmrg# _AM_AUTOCONF_VERSION(VERSION) 43b41a30aaSmrg# ----------------------------- 44b41a30aaSmrg# aclocal traces this macro to find the Autoconf version. 45b41a30aaSmrg# This is a private macro too. Using m4_define simplifies 46b41a30aaSmrg# the logic in aclocal, which can simply ignore this definition. 47b41a30aaSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48b41a30aaSmrg 49b41a30aaSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50b41a30aaSmrg# ------------------------------- 51b41a30aaSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52b41a30aaSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53b41a30aaSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54b41a30aaSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 55b41a30aaSmrgm4_ifndef([AC_AUTOCONF_VERSION], 56b41a30aaSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57b41a30aaSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58b41a30aaSmrg 59b41a30aaSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60b41a30aaSmrg 61b41a30aaSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62a253d6aeSmrg# 63b41a30aaSmrg# This file is free software; the Free Software Foundation 64b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 65b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 66ea133fd7Smrg 67b41a30aaSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68b41a30aaSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69b41a30aaSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70a253d6aeSmrg# 71b41a30aaSmrg# Of course, Automake must honor this variable whenever it calls a 72b41a30aaSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 73b41a30aaSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74b41a30aaSmrg# depending on how configure is run. This is pretty annoying, since 75b41a30aaSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76b41a30aaSmrg# source directory, any form will work fine, but in subdirectories a 77b41a30aaSmrg# relative path needs to be adjusted first. 78a253d6aeSmrg# 79b41a30aaSmrg# $ac_aux_dir/missing 80b41a30aaSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 81b41a30aaSmrg# $top_srcdir/$ac_aux_dir/missing 82b41a30aaSmrg# fails if $ac_aux_dir is absolute, 83b41a30aaSmrg# fails when called from a subdirectory in a VPATH build with 84b41a30aaSmrg# a relative $ac_aux_dir 85a253d6aeSmrg# 86b41a30aaSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87b41a30aaSmrg# are both prefixed by $srcdir. In an in-source build this is usually 88b41a30aaSmrg# harmless because $srcdir is '.', but things will broke when you 89b41a30aaSmrg# start a VPATH build or use an absolute $srcdir. 90a253d6aeSmrg# 91b41a30aaSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92b41a30aaSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93b41a30aaSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94b41a30aaSmrg# and then we would define $MISSING as 95b41a30aaSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 96b41a30aaSmrg# This will work as long as MISSING is not called from configure, because 97b41a30aaSmrg# unfortunately $(top_srcdir) has no meaning in configure. 98b41a30aaSmrg# However there are other variables, like CC, which are often used in 99b41a30aaSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100a253d6aeSmrg# 101b41a30aaSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 102b41a30aaSmrg# absolute PATH. The drawback is that using absolute paths prevent a 103b41a30aaSmrg# configured tree to be moved without reconfiguration. 104a253d6aeSmrg 105b41a30aaSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106b41a30aaSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107b41a30aaSmrg# Expand $ac_aux_dir to an absolute path. 108b41a30aaSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 10931637056Smrg]) 110a253d6aeSmrg 111b41a30aaSmrg# AM_CONDITIONAL -*- Autoconf -*- 112ea133fd7Smrg 113b41a30aaSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114b41a30aaSmrg# 115b41a30aaSmrg# This file is free software; the Free Software Foundation 116b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 117b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 118ea133fd7Smrg 119b41a30aaSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120b41a30aaSmrg# ------------------------------------- 121b41a30aaSmrg# Define a conditional. 122b41a30aaSmrgAC_DEFUN([AM_CONDITIONAL], 123b41a30aaSmrg[AC_PREREQ([2.52])dnl 124b41a30aaSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125b41a30aaSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126b41a30aaSmrgAC_SUBST([$1_TRUE])dnl 127b41a30aaSmrgAC_SUBST([$1_FALSE])dnl 128b41a30aaSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129b41a30aaSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130b41a30aaSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131b41a30aaSmrgif $2; then 132b41a30aaSmrg $1_TRUE= 133b41a30aaSmrg $1_FALSE='#' 134b41a30aaSmrgelse 135b41a30aaSmrg $1_TRUE='#' 136b41a30aaSmrg $1_FALSE= 137b41a30aaSmrgfi 138b41a30aaSmrgAC_CONFIG_COMMANDS_PRE( 139b41a30aaSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140b41a30aaSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 141b41a30aaSmrgUsually this means the macro was only invoked conditionally.]]) 142b41a30aaSmrgfi])]) 143ea133fd7Smrg 144b41a30aaSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145b41a30aaSmrg# 146b41a30aaSmrg# This file is free software; the Free Software Foundation 147b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 148b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 149a253d6aeSmrg 150a253d6aeSmrg 151b41a30aaSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152b41a30aaSmrg# written in clear, in which case automake, when reading aclocal.m4, 153b41a30aaSmrg# will think it sees a *use*, and therefore will trigger all it's 154b41a30aaSmrg# C support machinery. Also note that it means that autoscan, seeing 155b41a30aaSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156a253d6aeSmrg 157a253d6aeSmrg 158b41a30aaSmrg# _AM_DEPENDENCIES(NAME) 159b41a30aaSmrg# ---------------------- 160b41a30aaSmrg# See how the compiler implements dependency checking. 161b41a30aaSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162b41a30aaSmrg# We try a few techniques and use that to set a single cache variable. 163b41a30aaSmrg# 164b41a30aaSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165b41a30aaSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166b41a30aaSmrg# dependency, and given that the user is not expected to run this macro, 167b41a30aaSmrg# just rely on AC_PROG_CC. 168b41a30aaSmrgAC_DEFUN([_AM_DEPENDENCIES], 169b41a30aaSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170b41a30aaSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171b41a30aaSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172b41a30aaSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 173a253d6aeSmrg 174b41a30aaSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175b41a30aaSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176b41a30aaSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177b41a30aaSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178b41a30aaSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179b41a30aaSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180b41a30aaSmrg [depcc="$$1" am_compiler_list=]) 181a253d6aeSmrg 182b41a30aaSmrgAC_CACHE_CHECK([dependency style of $depcc], 183b41a30aaSmrg [am_cv_$1_dependencies_compiler_type], 184b41a30aaSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185b41a30aaSmrg # We make a subdir and do the tests there. Otherwise we can end up 186b41a30aaSmrg # making bogus files that we don't know about and never remove. For 187b41a30aaSmrg # instance it was reported that on HP-UX the gcc test will end up 188b41a30aaSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 189b41a30aaSmrg # in D". 190b41a30aaSmrg rm -rf conftest.dir 191b41a30aaSmrg mkdir conftest.dir 192b41a30aaSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 193b41a30aaSmrg # using a relative directory. 194b41a30aaSmrg cp "$am_depcomp" conftest.dir 195b41a30aaSmrg cd conftest.dir 196b41a30aaSmrg # We will build objects and dependencies in a subdirectory because 197b41a30aaSmrg # it helps to detect inapplicable dependency modes. For instance 198b41a30aaSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 199b41a30aaSmrg # side effect of compilation, but ICC will put the dependencies in 200b41a30aaSmrg # the current directory while Tru64 will put them in the object 201b41a30aaSmrg # directory. 202b41a30aaSmrg mkdir sub 203a253d6aeSmrg 204b41a30aaSmrg am_cv_$1_dependencies_compiler_type=none 205b41a30aaSmrg if test "$am_compiler_list" = ""; then 206b41a30aaSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207b41a30aaSmrg fi 208b41a30aaSmrg am__universal=false 209b41a30aaSmrg m4_case([$1], [CC], 210b41a30aaSmrg [case " $depcc " in #( 211b41a30aaSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212b41a30aaSmrg esac], 213b41a30aaSmrg [CXX], 214b41a30aaSmrg [case " $depcc " in #( 215b41a30aaSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216b41a30aaSmrg esac]) 217a253d6aeSmrg 218b41a30aaSmrg for depmode in $am_compiler_list; do 219b41a30aaSmrg # Setup a source with many dependencies, because some compilers 220b41a30aaSmrg # like to wrap large dependency lists on column 80 (with \), and 221b41a30aaSmrg # we should not choose a depcomp mode which is confused by this. 222b41a30aaSmrg # 223b41a30aaSmrg # We need to recreate these files for each test, as the compiler may 224b41a30aaSmrg # overwrite some of them when testing with obscure command lines. 225b41a30aaSmrg # This happens at least with the AIX C compiler. 226b41a30aaSmrg : > sub/conftest.c 227b41a30aaSmrg for i in 1 2 3 4 5 6; do 228b41a30aaSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229b41a30aaSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230b41a30aaSmrg # Solaris 10 /bin/sh. 231b41a30aaSmrg echo '/* dummy */' > sub/conftst$i.h 232b41a30aaSmrg done 233b41a30aaSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234a253d6aeSmrg 235b41a30aaSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236b41a30aaSmrg # mode. It turns out that the SunPro C++ compiler does not properly 237b41a30aaSmrg # handle '-M -o', and we need to detect this. Also, some Intel 238b41a30aaSmrg # versions had trouble with output in subdirs. 239b41a30aaSmrg am__obj=sub/conftest.${OBJEXT-o} 240b41a30aaSmrg am__minus_obj="-o $am__obj" 241b41a30aaSmrg case $depmode in 242b41a30aaSmrg gcc) 243b41a30aaSmrg # This depmode causes a compiler race in universal mode. 244b41a30aaSmrg test "$am__universal" = false || continue 245b41a30aaSmrg ;; 246b41a30aaSmrg nosideeffect) 247b41a30aaSmrg # After this tag, mechanisms are not by side-effect, so they'll 248b41a30aaSmrg # only be used when explicitly requested. 249b41a30aaSmrg if test "x$enable_dependency_tracking" = xyes; then 250b41a30aaSmrg continue 251b41a30aaSmrg else 252b41a30aaSmrg break 253b41a30aaSmrg fi 254b41a30aaSmrg ;; 255b41a30aaSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256b41a30aaSmrg # This compiler won't grok '-c -o', but also, the minuso test has 257b41a30aaSmrg # not run yet. These depmodes are late enough in the game, and 258b41a30aaSmrg # so weak that their functioning should not be impacted. 259b41a30aaSmrg am__obj=conftest.${OBJEXT-o} 260b41a30aaSmrg am__minus_obj= 261b41a30aaSmrg ;; 262b41a30aaSmrg none) break ;; 263b41a30aaSmrg esac 264b41a30aaSmrg if depmode=$depmode \ 265b41a30aaSmrg source=sub/conftest.c object=$am__obj \ 266b41a30aaSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267b41a30aaSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268b41a30aaSmrg >/dev/null 2>conftest.err && 269b41a30aaSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270b41a30aaSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271b41a30aaSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272b41a30aaSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273b41a30aaSmrg # icc doesn't choke on unknown options, it will just issue warnings 274b41a30aaSmrg # or remarks (even with -Werror). So we grep stderr for any message 275b41a30aaSmrg # that says an option was ignored or not supported. 276b41a30aaSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277b41a30aaSmrg # icc: Command line warning: ignoring option '-M'; no argument required 278b41a30aaSmrg # The diagnosis changed in icc 8.0: 279b41a30aaSmrg # icc: Command line remark: option '-MP' not supported 280b41a30aaSmrg if (grep 'ignoring option' conftest.err || 281b41a30aaSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282b41a30aaSmrg am_cv_$1_dependencies_compiler_type=$depmode 283b41a30aaSmrg break 284b41a30aaSmrg fi 285b41a30aaSmrg fi 286b41a30aaSmrg done 287b41a30aaSmrg 288b41a30aaSmrg cd .. 289b41a30aaSmrg rm -rf conftest.dir 290b41a30aaSmrgelse 291b41a30aaSmrg am_cv_$1_dependencies_compiler_type=none 292b41a30aaSmrgfi 293b41a30aaSmrg]) 294b41a30aaSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295b41a30aaSmrgAM_CONDITIONAL([am__fastdep$1], [ 296b41a30aaSmrg test "x$enable_dependency_tracking" != xno \ 297b41a30aaSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298b41a30aaSmrg]) 299a253d6aeSmrg 300ea133fd7Smrg 301b41a30aaSmrg# AM_SET_DEPDIR 302b41a30aaSmrg# ------------- 303b41a30aaSmrg# Choose a directory name for dependency files. 304b41a30aaSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305b41a30aaSmrgAC_DEFUN([AM_SET_DEPDIR], 306b41a30aaSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307b41a30aaSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308b41a30aaSmrg]) 309ea133fd7Smrg 310ea133fd7Smrg 311b41a30aaSmrg# AM_DEP_TRACK 312b41a30aaSmrg# ------------ 313b41a30aaSmrgAC_DEFUN([AM_DEP_TRACK], 314b41a30aaSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 315b41a30aaSmrgAS_HELP_STRING( 316b41a30aaSmrg [--enable-dependency-tracking], 317b41a30aaSmrg [do not reject slow dependency extractors]) 318b41a30aaSmrgAS_HELP_STRING( 319b41a30aaSmrg [--disable-dependency-tracking], 320b41a30aaSmrg [speeds up one-time build])]) 321b41a30aaSmrgif test "x$enable_dependency_tracking" != xno; then 322b41a30aaSmrg am_depcomp="$ac_aux_dir/depcomp" 323b41a30aaSmrg AMDEPBACKSLASH='\' 324b41a30aaSmrg am__nodep='_no' 32531637056Smrgfi 326b41a30aaSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327b41a30aaSmrgAC_SUBST([AMDEPBACKSLASH])dnl 328b41a30aaSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329b41a30aaSmrgAC_SUBST([am__nodep])dnl 330b41a30aaSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 331a253d6aeSmrg]) 332ea133fd7Smrg 333b41a30aaSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 334ea133fd7Smrg 335b41a30aaSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 336b41a30aaSmrg# 337b41a30aaSmrg# This file is free software; the Free Software Foundation 338b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 339b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 340a253d6aeSmrg 341b41a30aaSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 342b41a30aaSmrg# ------------------------------ 343b41a30aaSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344b41a30aaSmrg[{ 345b41a30aaSmrg # Older Autoconf quotes --file arguments for eval, but not when files 346b41a30aaSmrg # are listed without --file. Let's play safe and only enable the eval 347b41a30aaSmrg # if we detect the quoting. 348b41a30aaSmrg # TODO: see whether this extra hack can be removed once we start 349b41a30aaSmrg # requiring Autoconf 2.70 or later. 350b41a30aaSmrg AS_CASE([$CONFIG_FILES], 351b41a30aaSmrg [*\'*], [eval set x "$CONFIG_FILES"], 352b41a30aaSmrg [*], [set x $CONFIG_FILES]) 353b41a30aaSmrg shift 354b41a30aaSmrg # Used to flag and report bootstrapping failures. 355b41a30aaSmrg am_rc=0 356b41a30aaSmrg for am_mf 357b41a30aaSmrg do 358b41a30aaSmrg # Strip MF so we end up with the name of the file. 359b41a30aaSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360b41a30aaSmrg # Check whether this is an Automake generated Makefile which includes 361b41a30aaSmrg # dependency-tracking related rules and includes. 362b41a30aaSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 363b41a30aaSmrg # limit of 2048, but all sed's we know have understand at least 4000. 364b41a30aaSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365b41a30aaSmrg || continue 366b41a30aaSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 367b41a30aaSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 368b41a30aaSmrg AM_RUN_LOG([cd "$am_dirpart" \ 369b41a30aaSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 370b41a30aaSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 371b41a30aaSmrg done 372b41a30aaSmrg if test $am_rc -ne 0; then 373b41a30aaSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374b41a30aaSmrg for automatic dependency tracking. If GNU make was not used, consider 375b41a30aaSmrg re-running the configure script with MAKE="gmake" (or whatever is 376b41a30aaSmrg necessary). You can also try re-running configure with the 377b41a30aaSmrg '--disable-dependency-tracking' option to at least be able to build 378b41a30aaSmrg the package (albeit without support for automatic dependency tracking).]) 37925b89263Smrg fi 380b41a30aaSmrg AS_UNSET([am_dirpart]) 381b41a30aaSmrg AS_UNSET([am_filepart]) 382b41a30aaSmrg AS_UNSET([am_mf]) 383b41a30aaSmrg AS_UNSET([am_rc]) 384b41a30aaSmrg rm -f conftest-deps.mk 385b41a30aaSmrg} 386b41a30aaSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 387a253d6aeSmrg 388a253d6aeSmrg 389b41a30aaSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 390b41a30aaSmrg# ----------------------------- 391b41a30aaSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 392b41a30aaSmrg# 393b41a30aaSmrg# This code is only required when automatic dependency tracking is enabled. 394b41a30aaSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395b41a30aaSmrg# order to bootstrap the dependency handling code. 396b41a30aaSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397b41a30aaSmrg[AC_CONFIG_COMMANDS([depfiles], 398b41a30aaSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399b41a30aaSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 400a253d6aeSmrg 401b41a30aaSmrg# Do all the work for Automake. -*- Autoconf -*- 402a253d6aeSmrg 403b41a30aaSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 404b41a30aaSmrg# 405b41a30aaSmrg# This file is free software; the Free Software Foundation 406b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 407b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 408a253d6aeSmrg 409b41a30aaSmrg# This macro actually does too much. Some checks are only needed if 410b41a30aaSmrg# your package does certain things. But this isn't really a big deal. 411a253d6aeSmrg 412b41a30aaSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 413b41a30aaSmrgm4_define([AC_PROG_CC], 414b41a30aaSmrgm4_defn([AC_PROG_CC]) 415b41a30aaSmrg[_AM_PROG_CC_C_O 416b41a30aaSmrg]) 417a253d6aeSmrg 418b41a30aaSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419b41a30aaSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 420b41a30aaSmrg# ----------------------------------------------- 421b41a30aaSmrg# The call with PACKAGE and VERSION arguments is the old style 422b41a30aaSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 423b41a30aaSmrg# and VERSION should now be passed to AC_INIT and removed from 424b41a30aaSmrg# the call to AM_INIT_AUTOMAKE. 425b41a30aaSmrg# We support both call styles for the transition. After 426b41a30aaSmrg# the next Automake release, Autoconf can make the AC_INIT 427b41a30aaSmrg# arguments mandatory, and then we can depend on a new Autoconf 428b41a30aaSmrg# release and drop the old call support. 429b41a30aaSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 430b41a30aaSmrg[AC_PREREQ([2.65])dnl 431b41a30aaSmrgm4_ifdef([_$0_ALREADY_INIT], 432b41a30aaSmrg [m4_fatal([$0 expanded multiple times 433b41a30aaSmrg]m4_defn([_$0_ALREADY_INIT]))], 434b41a30aaSmrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435b41a30aaSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 436b41a30aaSmrgdnl the ones we care about. 437b41a30aaSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438b41a30aaSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439b41a30aaSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 440b41a30aaSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 441b41a30aaSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442b41a30aaSmrg # is not polluted with repeated "-I." 443b41a30aaSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444b41a30aaSmrg # test to see if srcdir already configured 445b41a30aaSmrg if test -f $srcdir/config.status; then 446b41a30aaSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 44731637056Smrg fi 448b41a30aaSmrgfi 449a253d6aeSmrg 450b41a30aaSmrg# test whether we have cygpath 451b41a30aaSmrgif test -z "$CYGPATH_W"; then 452b41a30aaSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 453b41a30aaSmrg CYGPATH_W='cygpath -w' 454b41a30aaSmrg else 455b41a30aaSmrg CYGPATH_W=echo 456b41a30aaSmrg fi 457b41a30aaSmrgfi 458b41a30aaSmrgAC_SUBST([CYGPATH_W]) 459a253d6aeSmrg 460b41a30aaSmrg# Define the identity of the package. 461b41a30aaSmrgdnl Distinguish between old-style and new-style calls. 462b41a30aaSmrgm4_ifval([$2], 463b41a30aaSmrg[AC_DIAGNOSE([obsolete], 464b41a30aaSmrg [$0: two- and three-arguments forms are deprecated.]) 465b41a30aaSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466b41a30aaSmrg AC_SUBST([PACKAGE], [$1])dnl 467b41a30aaSmrg AC_SUBST([VERSION], [$2])], 468b41a30aaSmrg[_AM_SET_OPTIONS([$1])dnl 469b41a30aaSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 470b41a30aaSmrgm4_if( 471b41a30aaSmrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 472b41a30aaSmrg [ok:ok],, 473b41a30aaSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474b41a30aaSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475b41a30aaSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476a253d6aeSmrg 477b41a30aaSmrg_AM_IF_OPTION([no-define],, 478b41a30aaSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 479b41a30aaSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 48025b89263Smrg 481b41a30aaSmrg# Some tools Automake needs. 482b41a30aaSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 483b41a30aaSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 484b41a30aaSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 485b41a30aaSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 486b41a30aaSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 487b41a30aaSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 488b41a30aaSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 489b41a30aaSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490b41a30aaSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 491b41a30aaSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 492b41a30aaSmrg# For better backward compatibility. To be removed once Automake 1.9.x 493b41a30aaSmrg# dies out for good. For more background, see: 494b41a30aaSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495b41a30aaSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 496b41a30aaSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497b41a30aaSmrg# We need awk for the "check" target (and possibly the TAP driver). The 498b41a30aaSmrg# system "awk" is bad on some platforms. 499b41a30aaSmrgAC_REQUIRE([AC_PROG_AWK])dnl 500b41a30aaSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 501b41a30aaSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 502b41a30aaSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503b41a30aaSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504b41a30aaSmrg [_AM_PROG_TAR([v7])])]) 505b41a30aaSmrg_AM_IF_OPTION([no-dependencies],, 506b41a30aaSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 507b41a30aaSmrg [_AM_DEPENDENCIES([CC])], 508b41a30aaSmrg [m4_define([AC_PROG_CC], 509b41a30aaSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510b41a30aaSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 511b41a30aaSmrg [_AM_DEPENDENCIES([CXX])], 512b41a30aaSmrg [m4_define([AC_PROG_CXX], 513b41a30aaSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514b41a30aaSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 515b41a30aaSmrg [_AM_DEPENDENCIES([OBJC])], 516b41a30aaSmrg [m4_define([AC_PROG_OBJC], 517b41a30aaSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 518b41a30aaSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 519b41a30aaSmrg [_AM_DEPENDENCIES([OBJCXX])], 520b41a30aaSmrg [m4_define([AC_PROG_OBJCXX], 521b41a30aaSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 52231637056Smrg]) 523b41a30aaSmrg# Variables for tags utilities; see am/tags.am 524b41a30aaSmrgif test -z "$CTAGS"; then 525b41a30aaSmrg CTAGS=ctags 526b41a30aaSmrgfi 527b41a30aaSmrgAC_SUBST([CTAGS]) 528b41a30aaSmrgif test -z "$ETAGS"; then 529b41a30aaSmrg ETAGS=etags 530b41a30aaSmrgfi 531b41a30aaSmrgAC_SUBST([ETAGS]) 532b41a30aaSmrgif test -z "$CSCOPE"; then 533b41a30aaSmrg CSCOPE=cscope 534b41a30aaSmrgfi 535b41a30aaSmrgAC_SUBST([CSCOPE]) 536a253d6aeSmrg 537b41a30aaSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 538b41a30aaSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 539b41a30aaSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 540b41a30aaSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541b41a30aaSmrgAC_CONFIG_COMMANDS_PRE(dnl 542b41a30aaSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 543b41a30aaSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544ea133fd7Smrg 545b41a30aaSmrg# POSIX will say in a future version that running "rm -f" with no argument 546b41a30aaSmrg# is OK; and we want to be able to make that assumption in our Makefile 547b41a30aaSmrg# recipes. So use an aggressive probe to check that the usage we want is 548b41a30aaSmrg# actually supported "in the wild" to an acceptable degree. 549b41a30aaSmrg# See automake bug#10828. 550b41a30aaSmrg# To make any issue more visible, cause the running configure to be aborted 551b41a30aaSmrg# by default if the 'rm' program in use doesn't match our expectations; the 552b41a30aaSmrg# user can still override this though. 553b41a30aaSmrgif rm -f && rm -fr && rm -rf; then : OK; else 554b41a30aaSmrg cat >&2 <<'END' 555b41a30aaSmrgOops! 556ea133fd7Smrg 557b41a30aaSmrgYour 'rm' program seems unable to run without file operands specified 558b41a30aaSmrgon the command line, even when the '-f' option is present. This is contrary 559b41a30aaSmrgto the behaviour of most rm programs out there, and not conforming with 560b41a30aaSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 56131637056Smrg 562b41a30aaSmrgPlease tell bug-automake@gnu.org about your system, including the value 563b41a30aaSmrgof your $PATH and any error possibly output before this message. This 564b41a30aaSmrgcan help us improve future automake versions. 56531637056Smrg 566b41a30aaSmrgEND 567b41a30aaSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 568b41a30aaSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 569b41a30aaSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 570b41a30aaSmrg echo >&2 571b41a30aaSmrg else 572b41a30aaSmrg cat >&2 <<'END' 573b41a30aaSmrgAborting the configuration process, to ensure you take notice of the issue. 57431637056Smrg 575b41a30aaSmrgYou can download and install GNU coreutils to get an 'rm' implementation 576b41a30aaSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 57731637056Smrg 578b41a30aaSmrgIf you want to complete the configuration process using your problematic 579b41a30aaSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 580b41a30aaSmrgto "yes", and re-run configure. 58131637056Smrg 582b41a30aaSmrgEND 583b41a30aaSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 584b41a30aaSmrg fi 585b41a30aaSmrgfi 586b41a30aaSmrgdnl The trailing newline in this macro's definition is deliberate, for 587b41a30aaSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 588b41a30aaSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 589b41a30aaSmrg]) 590ea133fd7Smrg 591b41a30aaSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592b41a30aaSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593b41a30aaSmrgdnl mangled by Autoconf and run in a shell conditional statement. 594b41a30aaSmrgm4_define([_AC_COMPILER_EXEEXT], 595b41a30aaSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 59631637056Smrg 597b41a30aaSmrg# When config.status generates a header, we must update the stamp-h file. 598b41a30aaSmrg# This file resides in the same directory as the config header 599b41a30aaSmrg# that is generated. The stamp files are numbered to have different names. 60031637056Smrg 601b41a30aaSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602b41a30aaSmrg# loop where config.status creates the headers, so we can generate 603b41a30aaSmrg# our stamp files there. 604b41a30aaSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605b41a30aaSmrg[# Compute $1's index in $config_headers. 606b41a30aaSmrg_am_arg=$1 607b41a30aaSmrg_am_stamp_count=1 608b41a30aaSmrgfor _am_header in $config_headers :; do 609b41a30aaSmrg case $_am_header in 610b41a30aaSmrg $_am_arg | $_am_arg:* ) 611b41a30aaSmrg break ;; 612b41a30aaSmrg * ) 613b41a30aaSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614b41a30aaSmrg esac 615b41a30aaSmrgdone 616b41a30aaSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617ea133fd7Smrg 618b41a30aaSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 619b41a30aaSmrg# 620b41a30aaSmrg# This file is free software; the Free Software Foundation 621b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 622b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 623a253d6aeSmrg 624b41a30aaSmrg# AM_PROG_INSTALL_SH 625b41a30aaSmrg# ------------------ 626b41a30aaSmrg# Define $install_sh. 627b41a30aaSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 628b41a30aaSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629b41a30aaSmrgif test x"${install_sh+set}" != xset; then 630b41a30aaSmrg case $am_aux_dir in 631b41a30aaSmrg *\ * | *\ *) 632b41a30aaSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633b41a30aaSmrg *) 634b41a30aaSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 635b41a30aaSmrg esac 636b41a30aaSmrgfi 637b41a30aaSmrgAC_SUBST([install_sh])]) 638ea133fd7Smrg 639b41a30aaSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 640b41a30aaSmrg# 641b41a30aaSmrg# This file is free software; the Free Software Foundation 642b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 643b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 644a253d6aeSmrg 645b41a30aaSmrg# Check whether the underlying file-system supports filenames 646b41a30aaSmrg# with a leading dot. For instance MS-DOS doesn't. 647b41a30aaSmrgAC_DEFUN([AM_SET_LEADING_DOT], 648b41a30aaSmrg[rm -rf .tst 2>/dev/null 649b41a30aaSmrgmkdir .tst 2>/dev/null 650b41a30aaSmrgif test -d .tst; then 651b41a30aaSmrg am__leading_dot=. 652b41a30aaSmrgelse 653b41a30aaSmrg am__leading_dot=_ 654b41a30aaSmrgfi 655b41a30aaSmrgrmdir .tst 2>/dev/null 656b41a30aaSmrgAC_SUBST([am__leading_dot])]) 657a253d6aeSmrg 658b41a30aaSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 659a253d6aeSmrg 660b41a30aaSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661b41a30aaSmrg# 662b41a30aaSmrg# This file is free software; the Free Software Foundation 663b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 664b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 665a253d6aeSmrg 666b41a30aaSmrg# AM_MAKE_INCLUDE() 667b41a30aaSmrg# ----------------- 668b41a30aaSmrg# Check whether make has an 'include' directive that can support all 669b41a30aaSmrg# the idioms we need for our automatic dependency tracking code. 670b41a30aaSmrgAC_DEFUN([AM_MAKE_INCLUDE], 671b41a30aaSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672b41a30aaSmrgcat > confinc.mk << 'END' 673b41a30aaSmrgam__doit: 674b41a30aaSmrg @echo this is the am__doit target >confinc.out 675b41a30aaSmrg.PHONY: am__doit 676b41a30aaSmrgEND 677b41a30aaSmrgam__include="#" 678b41a30aaSmrgam__quote= 679b41a30aaSmrg# BSD make does it like this. 680b41a30aaSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 681b41a30aaSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682b41a30aaSmrgecho 'include confinc.mk # ignored' > confmf.GNU 683b41a30aaSmrg_am_result=no 684b41a30aaSmrgfor s in GNU BSD; do 685b41a30aaSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686b41a30aaSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687b41a30aaSmrg ['0:this is the am__doit target'], 688b41a30aaSmrg [AS_CASE([$s], 689b41a30aaSmrg [BSD], [am__include='.include' am__quote='"'], 690b41a30aaSmrg [am__include='include' am__quote=''])]) 691b41a30aaSmrg if test "$am__include" != "#"; then 692b41a30aaSmrg _am_result="yes ($s style)" 693b41a30aaSmrg break 694b41a30aaSmrg fi 695b41a30aaSmrgdone 696b41a30aaSmrgrm -f confinc.* confmf.* 697b41a30aaSmrgAC_MSG_RESULT([${_am_result}]) 698b41a30aaSmrgAC_SUBST([am__include])]) 699b41a30aaSmrgAC_SUBST([am__quote])]) 700a253d6aeSmrg 701b41a30aaSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702a253d6aeSmrg 703b41a30aaSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704b41a30aaSmrg# 705b41a30aaSmrg# This file is free software; the Free Software Foundation 706b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 707b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 70831637056Smrg 709b41a30aaSmrg# AM_MISSING_PROG(NAME, PROGRAM) 710b41a30aaSmrg# ------------------------------ 711b41a30aaSmrgAC_DEFUN([AM_MISSING_PROG], 712b41a30aaSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713b41a30aaSmrg$1=${$1-"${am_missing_run}$2"} 714b41a30aaSmrgAC_SUBST($1)]) 71531637056Smrg 716b41a30aaSmrg# AM_MISSING_HAS_RUN 717b41a30aaSmrg# ------------------ 718b41a30aaSmrg# Define MISSING if not defined so far and test if it is modern enough. 719b41a30aaSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 720b41a30aaSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 721b41a30aaSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722b41a30aaSmrgAC_REQUIRE_AUX_FILE([missing])dnl 723b41a30aaSmrgif test x"${MISSING+set}" != xset; then 724b41a30aaSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 725b41a30aaSmrgfi 726b41a30aaSmrg# Use eval to expand $SHELL 727b41a30aaSmrgif eval "$MISSING --is-lightweight"; then 728b41a30aaSmrg am_missing_run="$MISSING " 729b41a30aaSmrgelse 730b41a30aaSmrg am_missing_run= 731b41a30aaSmrg AC_MSG_WARN(['missing' script is too old or missing]) 732b41a30aaSmrgfi 73357ee1794Smrg]) 734ea133fd7Smrg 735b41a30aaSmrg# Helper functions for option handling. -*- Autoconf -*- 736a253d6aeSmrg 737b41a30aaSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738b41a30aaSmrg# 739b41a30aaSmrg# This file is free software; the Free Software Foundation 740b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 741b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 74231637056Smrg 743b41a30aaSmrg# _AM_MANGLE_OPTION(NAME) 744b41a30aaSmrg# ----------------------- 745b41a30aaSmrgAC_DEFUN([_AM_MANGLE_OPTION], 746b41a30aaSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747a253d6aeSmrg 748b41a30aaSmrg# _AM_SET_OPTION(NAME) 749b41a30aaSmrg# -------------------- 750b41a30aaSmrg# Set option NAME. Presently that only means defining a flag for this option. 751b41a30aaSmrgAC_DEFUN([_AM_SET_OPTION], 752b41a30aaSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753ea133fd7Smrg 754b41a30aaSmrg# _AM_SET_OPTIONS(OPTIONS) 755b41a30aaSmrg# ------------------------ 756b41a30aaSmrg# OPTIONS is a space-separated list of Automake options. 757b41a30aaSmrgAC_DEFUN([_AM_SET_OPTIONS], 758b41a30aaSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759a253d6aeSmrg 760b41a30aaSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761b41a30aaSmrg# ------------------------------------------- 762b41a30aaSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763b41a30aaSmrgAC_DEFUN([_AM_IF_OPTION], 764b41a30aaSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 765a253d6aeSmrg 766b41a30aaSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 76731637056Smrg# 768b41a30aaSmrg# This file is free software; the Free Software Foundation 769b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 770b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 771a253d6aeSmrg 772b41a30aaSmrg# _AM_PROG_CC_C_O 773b41a30aaSmrg# --------------- 774b41a30aaSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 775b41a30aaSmrg# to automatically call this. 776b41a30aaSmrgAC_DEFUN([_AM_PROG_CC_C_O], 777b41a30aaSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778b41a30aaSmrgAC_REQUIRE_AUX_FILE([compile])dnl 779b41a30aaSmrgAC_LANG_PUSH([C])dnl 780b41a30aaSmrgAC_CACHE_CHECK( 781b41a30aaSmrg [whether $CC understands -c and -o together], 782b41a30aaSmrg [am_cv_prog_cc_c_o], 783b41a30aaSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 784b41a30aaSmrg # Make sure it works both with $CC and with simple cc. 785b41a30aaSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 786b41a30aaSmrg # compilers refuse to overwrite an existing .o file with -o, 787b41a30aaSmrg # though they will create one. 788b41a30aaSmrg am_cv_prog_cc_c_o=yes 789b41a30aaSmrg for am_i in 1 2; do 790b41a30aaSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 791b41a30aaSmrg && test -f conftest2.$ac_objext; then 792b41a30aaSmrg : OK 793b41a30aaSmrg else 794b41a30aaSmrg am_cv_prog_cc_c_o=no 795b41a30aaSmrg break 796b41a30aaSmrg fi 797b41a30aaSmrg done 798b41a30aaSmrg rm -f core conftest* 799b41a30aaSmrg unset am_i]) 800b41a30aaSmrgif test "$am_cv_prog_cc_c_o" != yes; then 801b41a30aaSmrg # Losing compiler, so override with the script. 802b41a30aaSmrg # FIXME: It is wrong to rewrite CC. 803b41a30aaSmrg # But if we don't then we get into trouble of one sort or another. 804b41a30aaSmrg # A longer-term fix would be to have automake use am__CC in this case, 805b41a30aaSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 806b41a30aaSmrg CC="$am_aux_dir/compile $CC" 807b41a30aaSmrgfi 808b41a30aaSmrgAC_LANG_POP([C])]) 809a253d6aeSmrg 810b41a30aaSmrg# For backward compatibility. 811b41a30aaSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 812a253d6aeSmrg 813b41a30aaSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 81406f32fbeSmrg# 815b41a30aaSmrg# This file is free software; the Free Software Foundation 816b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 817b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 81857ee1794Smrg 819b41a30aaSmrg# AM_RUN_LOG(COMMAND) 820b41a30aaSmrg# ------------------- 821b41a30aaSmrg# Run COMMAND, save the exit status in ac_status, and log it. 822b41a30aaSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 823b41a30aaSmrgAC_DEFUN([AM_RUN_LOG], 824b41a30aaSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 825b41a30aaSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 826b41a30aaSmrg ac_status=$? 827b41a30aaSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 828b41a30aaSmrg (exit $ac_status); }]) 829a253d6aeSmrg 830b41a30aaSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 831a253d6aeSmrg 832b41a30aaSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833b41a30aaSmrg# 834b41a30aaSmrg# This file is free software; the Free Software Foundation 835b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 836b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 837a253d6aeSmrg 838b41a30aaSmrg# AM_SANITY_CHECK 839b41a30aaSmrg# --------------- 840b41a30aaSmrgAC_DEFUN([AM_SANITY_CHECK], 841b41a30aaSmrg[AC_MSG_CHECKING([whether build environment is sane]) 842b41a30aaSmrg# Reject unsafe characters in $srcdir or the absolute working directory 843b41a30aaSmrg# name. Accept space and tab only in the latter. 844b41a30aaSmrgam_lf=' 845b41a30aaSmrg' 846b41a30aaSmrgcase `pwd` in 847b41a30aaSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 848b41a30aaSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 849b41a30aaSmrgesac 850b41a30aaSmrgcase $srcdir in 851b41a30aaSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 852b41a30aaSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853b41a30aaSmrgesac 854a253d6aeSmrg 855b41a30aaSmrg# Do 'set' in a subshell so we don't clobber the current shell's 856b41a30aaSmrg# arguments. Must try -L first in case configure is actually a 857b41a30aaSmrg# symlink; some systems play weird games with the mod time of symlinks 858b41a30aaSmrg# (eg FreeBSD returns the mod time of the symlink's containing 859b41a30aaSmrg# directory). 860b41a30aaSmrgif ( 861b41a30aaSmrg am_has_slept=no 862b41a30aaSmrg for am_try in 1 2; do 863b41a30aaSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 864b41a30aaSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 865b41a30aaSmrg if test "$[*]" = "X"; then 866b41a30aaSmrg # -L didn't work. 867b41a30aaSmrg set X `ls -t "$srcdir/configure" conftest.file` 868b41a30aaSmrg fi 869b41a30aaSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 870b41a30aaSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 87125b89263Smrg 872b41a30aaSmrg # If neither matched, then we have a broken ls. This can happen 873b41a30aaSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 874b41a30aaSmrg # broken ls alias from the environment. This has actually 875b41a30aaSmrg # happened. Such a system could not be considered "sane". 876b41a30aaSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 877b41a30aaSmrg alias in your environment]) 878b41a30aaSmrg fi 879b41a30aaSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 880b41a30aaSmrg break 881b41a30aaSmrg fi 882b41a30aaSmrg # Just in case. 883b41a30aaSmrg sleep 1 884b41a30aaSmrg am_has_slept=yes 885b41a30aaSmrg done 886b41a30aaSmrg test "$[2]" = conftest.file 887b41a30aaSmrg ) 888b41a30aaSmrgthen 889b41a30aaSmrg # Ok. 890b41a30aaSmrg : 891b41a30aaSmrgelse 892b41a30aaSmrg AC_MSG_ERROR([newly created file is older than distributed files! 893b41a30aaSmrgCheck your system clock]) 894b41a30aaSmrgfi 895b41a30aaSmrgAC_MSG_RESULT([yes]) 896b41a30aaSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 897b41a30aaSmrg# generated files are strictly newer. 898b41a30aaSmrgam_sleep_pid= 899b41a30aaSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 900b41a30aaSmrg ( sleep 1 ) & 901b41a30aaSmrg am_sleep_pid=$! 902b41a30aaSmrgfi 903b41a30aaSmrgAC_CONFIG_COMMANDS_PRE( 904b41a30aaSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 905b41a30aaSmrg if test -n "$am_sleep_pid"; then 906b41a30aaSmrg # Hide warnings about reused PIDs. 907b41a30aaSmrg wait $am_sleep_pid 2>/dev/null 908b41a30aaSmrg fi 909b41a30aaSmrg AC_MSG_RESULT([done])]) 910b41a30aaSmrgrm -f conftest.file 911b41a30aaSmrg]) 912a253d6aeSmrg 913b41a30aaSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914b41a30aaSmrg# 915b41a30aaSmrg# This file is free software; the Free Software Foundation 916b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 917b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 918a253d6aeSmrg 919b41a30aaSmrg# AM_SILENT_RULES([DEFAULT]) 920b41a30aaSmrg# -------------------------- 921b41a30aaSmrg# Enable less verbose build rules; with the default set to DEFAULT 922b41a30aaSmrg# ("yes" being less verbose, "no" or empty being verbose). 923b41a30aaSmrgAC_DEFUN([AM_SILENT_RULES], 924b41a30aaSmrg[AC_ARG_ENABLE([silent-rules], [dnl 925b41a30aaSmrgAS_HELP_STRING( 926b41a30aaSmrg [--enable-silent-rules], 927b41a30aaSmrg [less verbose build output (undo: "make V=1")]) 928b41a30aaSmrgAS_HELP_STRING( 929b41a30aaSmrg [--disable-silent-rules], 930b41a30aaSmrg [verbose build output (undo: "make V=0")])dnl 931b41a30aaSmrg]) 932b41a30aaSmrgcase $enable_silent_rules in @%:@ ((( 933b41a30aaSmrg yes) AM_DEFAULT_VERBOSITY=0;; 934b41a30aaSmrg no) AM_DEFAULT_VERBOSITY=1;; 935b41a30aaSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936b41a30aaSmrgesac 937b41a30aaSmrgdnl 938b41a30aaSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 939b41a30aaSmrgdnl do not support nested variable expansions. 940b41a30aaSmrgdnl See automake bug#9928 and bug#10237. 941b41a30aaSmrgam_make=${MAKE-make} 942b41a30aaSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 943b41a30aaSmrg [am_cv_make_support_nested_variables], 944b41a30aaSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 945b41a30aaSmrgBAR0=false 946b41a30aaSmrgBAR1=true 947b41a30aaSmrgV=1 948b41a30aaSmrgam__doit: 949b41a30aaSmrg @$(TRUE) 950b41a30aaSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 951b41a30aaSmrg am_cv_make_support_nested_variables=yes 952b41a30aaSmrgelse 953b41a30aaSmrg am_cv_make_support_nested_variables=no 954b41a30aaSmrgfi]) 955b41a30aaSmrgif test $am_cv_make_support_nested_variables = yes; then 956b41a30aaSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 957b41a30aaSmrg AM_V='$(V)' 958b41a30aaSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 959b41a30aaSmrgelse 960b41a30aaSmrg AM_V=$AM_DEFAULT_VERBOSITY 961b41a30aaSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 962b41a30aaSmrgfi 963b41a30aaSmrgAC_SUBST([AM_V])dnl 964b41a30aaSmrgAM_SUBST_NOTMAKE([AM_V])dnl 965b41a30aaSmrgAC_SUBST([AM_DEFAULT_V])dnl 966b41a30aaSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967b41a30aaSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968b41a30aaSmrgAM_BACKSLASH='\' 969b41a30aaSmrgAC_SUBST([AM_BACKSLASH])dnl 970b41a30aaSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 97106f32fbeSmrg]) 972a253d6aeSmrg 973b41a30aaSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974b41a30aaSmrg# 975b41a30aaSmrg# This file is free software; the Free Software Foundation 976b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 977b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 978a253d6aeSmrg 979b41a30aaSmrg# AM_PROG_INSTALL_STRIP 980b41a30aaSmrg# --------------------- 981b41a30aaSmrg# One issue with vendor 'install' (even GNU) is that you can't 982b41a30aaSmrg# specify the program used to strip binaries. This is especially 983b41a30aaSmrg# annoying in cross-compiling environments, where the build's strip 984b41a30aaSmrg# is unlikely to handle the host's binaries. 985b41a30aaSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 986b41a30aaSmrg# always use install-sh in "make install-strip", and initialize 987b41a30aaSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 988b41a30aaSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 989b41a30aaSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 990b41a30aaSmrg# Installed binaries are usually stripped using 'strip' when the user 991b41a30aaSmrg# run "make install-strip". However 'strip' might not be the right 992b41a30aaSmrg# tool to use in cross-compilation environments, therefore Automake 993b41a30aaSmrg# will honor the 'STRIP' environment variable to overrule this program. 994b41a30aaSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995b41a30aaSmrgif test "$cross_compiling" != no; then 996b41a30aaSmrg AC_CHECK_TOOL([STRIP], [strip], :) 997b41a30aaSmrgfi 998b41a30aaSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999b41a30aaSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000a253d6aeSmrg 1001b41a30aaSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002b41a30aaSmrg# 1003b41a30aaSmrg# This file is free software; the Free Software Foundation 1004b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 1005b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 1006a253d6aeSmrg 1007b41a30aaSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1008b41a30aaSmrg# --------------------------- 1009b41a30aaSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010b41a30aaSmrg# This macro is traced by Automake. 1011b41a30aaSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1012a253d6aeSmrg 1013b41a30aaSmrg# AM_SUBST_NOTMAKE(VARIABLE) 1014b41a30aaSmrg# -------------------------- 1015b41a30aaSmrg# Public sister of _AM_SUBST_NOTMAKE. 1016b41a30aaSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017a253d6aeSmrg 1018b41a30aaSmrg# Check how to create a tarball. -*- Autoconf -*- 1019a253d6aeSmrg 1020b41a30aaSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021b41a30aaSmrg# 1022b41a30aaSmrg# This file is free software; the Free Software Foundation 1023b41a30aaSmrg# gives unlimited permission to copy and/or distribute it, 1024b41a30aaSmrg# with or without modifications, as long as this notice is preserved. 1025a253d6aeSmrg 1026b41a30aaSmrg# _AM_PROG_TAR(FORMAT) 1027b41a30aaSmrg# -------------------- 1028b41a30aaSmrg# Check how to create a tarball in format FORMAT. 1029b41a30aaSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030b41a30aaSmrg# 1031b41a30aaSmrg# Substitute a variable $(am__tar) that is a command 1032b41a30aaSmrg# writing to stdout a FORMAT-tarball containing the directory 1033b41a30aaSmrg# $tardir. 1034b41a30aaSmrg# tardir=directory && $(am__tar) > result.tar 1035b41a30aaSmrg# 1036b41a30aaSmrg# Substitute a variable $(am__untar) that extract such 1037b41a30aaSmrg# a tarball read from stdin. 1038b41a30aaSmrg# $(am__untar) < result.tar 1039b41a30aaSmrg# 1040b41a30aaSmrgAC_DEFUN([_AM_PROG_TAR], 1041b41a30aaSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1042b41a30aaSmrg# in the wild :-( We should find a proper way to deprecate it ... 1043b41a30aaSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1044a253d6aeSmrg 1045b41a30aaSmrg# We'll loop over all known methods to create a tar archive until one works. 1046b41a30aaSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047a253d6aeSmrg 1048b41a30aaSmrgm4_if([$1], [v7], 1049b41a30aaSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1050a253d6aeSmrg 1051b41a30aaSmrg [m4_case([$1], 1052b41a30aaSmrg [ustar], 1053b41a30aaSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1054b41a30aaSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1055b41a30aaSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1056b41a30aaSmrg # and bug#13588). 1057b41a30aaSmrg am_max_uid=2097151 # 2^21 - 1 1058b41a30aaSmrg am_max_gid=$am_max_uid 1059b41a30aaSmrg # The $UID and $GID variables are not portable, so we need to resort 1060b41a30aaSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1061b41a30aaSmrg # below are definitely unexpected, so allow the users to see them 1062b41a30aaSmrg # (that is, avoid stderr redirection). 1063b41a30aaSmrg am_uid=`id -u || echo unknown` 1064b41a30aaSmrg am_gid=`id -g || echo unknown` 1065b41a30aaSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1066b41a30aaSmrg if test $am_uid -le $am_max_uid; then 1067b41a30aaSmrg AC_MSG_RESULT([yes]) 1068b41a30aaSmrg else 1069b41a30aaSmrg AC_MSG_RESULT([no]) 1070b41a30aaSmrg _am_tools=none 1071b41a30aaSmrg fi 1072b41a30aaSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1073b41a30aaSmrg if test $am_gid -le $am_max_gid; then 1074b41a30aaSmrg AC_MSG_RESULT([yes]) 1075b41a30aaSmrg else 1076b41a30aaSmrg AC_MSG_RESULT([no]) 1077b41a30aaSmrg _am_tools=none 1078b41a30aaSmrg fi], 1079a253d6aeSmrg 1080b41a30aaSmrg [pax], 1081b41a30aaSmrg [], 1082a253d6aeSmrg 1083b41a30aaSmrg [m4_fatal([Unknown tar format])]) 1084a253d6aeSmrg 1085b41a30aaSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 108625b89263Smrg 1087b41a30aaSmrg # Go ahead even if we have the value already cached. We do so because we 1088b41a30aaSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1089b41a30aaSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 109006f32fbeSmrg 1091b41a30aaSmrg for _am_tool in $_am_tools; do 1092b41a30aaSmrg case $_am_tool in 1093b41a30aaSmrg gnutar) 1094b41a30aaSmrg for _am_tar in tar gnutar gtar; do 1095b41a30aaSmrg AM_RUN_LOG([$_am_tar --version]) && break 1096b41a30aaSmrg done 1097b41a30aaSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1098b41a30aaSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1099b41a30aaSmrg am__untar="$_am_tar -xf -" 1100b41a30aaSmrg ;; 1101b41a30aaSmrg plaintar) 1102b41a30aaSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 1103b41a30aaSmrg # ustar tarball either. 1104b41a30aaSmrg (tar --version) >/dev/null 2>&1 && continue 1105b41a30aaSmrg am__tar='tar chf - "$$tardir"' 1106b41a30aaSmrg am__tar_='tar chf - "$tardir"' 1107b41a30aaSmrg am__untar='tar xf -' 1108b41a30aaSmrg ;; 1109b41a30aaSmrg pax) 1110b41a30aaSmrg am__tar='pax -L -x $1 -w "$$tardir"' 1111b41a30aaSmrg am__tar_='pax -L -x $1 -w "$tardir"' 1112b41a30aaSmrg am__untar='pax -r' 1113b41a30aaSmrg ;; 1114b41a30aaSmrg cpio) 1115b41a30aaSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1116b41a30aaSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1117b41a30aaSmrg am__untar='cpio -i -H $1 -d' 1118b41a30aaSmrg ;; 1119b41a30aaSmrg none) 1120b41a30aaSmrg am__tar=false 1121b41a30aaSmrg am__tar_=false 1122b41a30aaSmrg am__untar=false 1123b41a30aaSmrg ;; 1124b41a30aaSmrg esac 1125a253d6aeSmrg 1126b41a30aaSmrg # If the value was cached, stop now. We just wanted to have am__tar 1127b41a30aaSmrg # and am__untar set. 1128b41a30aaSmrg test -n "${am_cv_prog_tar_$1}" && break 1129a253d6aeSmrg 1130b41a30aaSmrg # tar/untar a dummy directory, and stop if the command works. 1131b41a30aaSmrg rm -rf conftest.dir 1132b41a30aaSmrg mkdir conftest.dir 1133b41a30aaSmrg echo GrepMe > conftest.dir/file 1134b41a30aaSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1135b41a30aaSmrg rm -rf conftest.dir 1136b41a30aaSmrg if test -s conftest.tar; then 1137b41a30aaSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1138b41a30aaSmrg AM_RUN_LOG([cat conftest.dir/file]) 1139b41a30aaSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1140b41a30aaSmrg fi 1141b41a30aaSmrg done 1142b41a30aaSmrg rm -rf conftest.dir 114325b89263Smrg 1144b41a30aaSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1145b41a30aaSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 114625b89263Smrg 1147b41a30aaSmrgAC_SUBST([am__tar]) 1148b41a30aaSmrgAC_SUBST([am__untar]) 1149b41a30aaSmrg]) # _AM_PROG_TAR 1150a253d6aeSmrg 1151b41a30aaSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1152b41a30aaSmrgdnl serial 11 (pkg-config-0.29) 1153b41a30aaSmrgdnl 1154b41a30aaSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1155b41a30aaSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1156b41a30aaSmrgdnl 1157b41a30aaSmrgdnl This program is free software; you can redistribute it and/or modify 1158b41a30aaSmrgdnl it under the terms of the GNU General Public License as published by 1159b41a30aaSmrgdnl the Free Software Foundation; either version 2 of the License, or 1160b41a30aaSmrgdnl (at your option) any later version. 1161b41a30aaSmrgdnl 1162b41a30aaSmrgdnl This program is distributed in the hope that it will be useful, but 1163b41a30aaSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 1164b41a30aaSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1165b41a30aaSmrgdnl General Public License for more details. 1166b41a30aaSmrgdnl 1167b41a30aaSmrgdnl You should have received a copy of the GNU General Public License 1168b41a30aaSmrgdnl along with this program; if not, write to the Free Software 1169b41a30aaSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1170b41a30aaSmrgdnl 02111-1307, USA. 1171b41a30aaSmrgdnl 1172b41a30aaSmrgdnl As a special exception to the GNU General Public License, if you 1173b41a30aaSmrgdnl distribute this file as part of a program that contains a 1174b41a30aaSmrgdnl configuration script generated by Autoconf, you may include it under 1175b41a30aaSmrgdnl the same distribution terms that you use for the rest of that 1176b41a30aaSmrgdnl program. 1177b41a30aaSmrg 1178b41a30aaSmrgdnl PKG_PREREQ(MIN-VERSION) 1179b41a30aaSmrgdnl ----------------------- 1180b41a30aaSmrgdnl Since: 0.29 1181b41a30aaSmrgdnl 1182b41a30aaSmrgdnl Verify that the version of the pkg-config macros are at least 1183b41a30aaSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1184b41a30aaSmrgdnl installed version of pkg-config, this checks the developer's version 1185b41a30aaSmrgdnl of pkg.m4 when generating configure. 1186b41a30aaSmrgdnl 1187b41a30aaSmrgdnl To ensure that this macro is defined, also add: 1188b41a30aaSmrgdnl m4_ifndef([PKG_PREREQ], 1189b41a30aaSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1190b41a30aaSmrgdnl 1191b41a30aaSmrgdnl See the "Since" comment for each macro you use to see what version 1192b41a30aaSmrgdnl of the macros you require. 1193b41a30aaSmrgm4_defun([PKG_PREREQ], 1194b41a30aaSmrg[m4_define([PKG_MACROS_VERSION], [0.29]) 1195b41a30aaSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1196b41a30aaSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1197b41a30aaSmrg])dnl PKG_PREREQ 1198b41a30aaSmrg 1199b41a30aaSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1200b41a30aaSmrgdnl ---------------------------------- 1201b41a30aaSmrgdnl Since: 0.16 1202b41a30aaSmrgdnl 1203b41a30aaSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1204b41a30aaSmrgdnl first found in the path. Checks that the version of pkg-config found 1205b41a30aaSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1206b41a30aaSmrgdnl used since that's the first version where most current features of 1207b41a30aaSmrgdnl pkg-config existed. 1208b41a30aaSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1209b41a30aaSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1210b41a30aaSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1211b41a30aaSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1212b41a30aaSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1213b41a30aaSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1214b41a30aaSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 121525b89263Smrg 1216b41a30aaSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1217b41a30aaSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 121831637056Smrgfi 1219b41a30aaSmrgif test -n "$PKG_CONFIG"; then 1220b41a30aaSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 1221b41a30aaSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1222b41a30aaSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1223b41a30aaSmrg AC_MSG_RESULT([yes]) 1224b41a30aaSmrg else 1225b41a30aaSmrg AC_MSG_RESULT([no]) 1226b41a30aaSmrg PKG_CONFIG="" 1227b41a30aaSmrg fi 1228b41a30aaSmrgfi[]dnl 1229b41a30aaSmrg])dnl PKG_PROG_PKG_CONFIG 1230a253d6aeSmrg 1231b41a30aaSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1232b41a30aaSmrgdnl ------------------------------------------------------------------- 1233b41a30aaSmrgdnl Since: 0.18 1234b41a30aaSmrgdnl 1235b41a30aaSmrgdnl Check to see whether a particular set of modules exists. Similar to 1236b41a30aaSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1237b41a30aaSmrgdnl 1238b41a30aaSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1239b41a30aaSmrgdnl only at the first occurence in configure.ac, so if the first place 1240b41a30aaSmrgdnl it's called might be skipped (such as if it is within an "if", you 1241b41a30aaSmrgdnl have to call PKG_CHECK_EXISTS manually 1242b41a30aaSmrgAC_DEFUN([PKG_CHECK_EXISTS], 1243b41a30aaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1244b41a30aaSmrgif test -n "$PKG_CONFIG" && \ 1245b41a30aaSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1246b41a30aaSmrg m4_default([$2], [:]) 1247b41a30aaSmrgm4_ifvaln([$3], [else 1248b41a30aaSmrg $3])dnl 1249b41a30aaSmrgfi]) 125025b89263Smrg 1251b41a30aaSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1252b41a30aaSmrgdnl --------------------------------------------- 1253b41a30aaSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1254b41a30aaSmrgdnl pkg_failed based on the result. 1255b41a30aaSmrgm4_define([_PKG_CONFIG], 1256b41a30aaSmrg[if test -n "$$1"; then 1257b41a30aaSmrg pkg_cv_[]$1="$$1" 1258b41a30aaSmrg elif test -n "$PKG_CONFIG"; then 1259b41a30aaSmrg PKG_CHECK_EXISTS([$3], 1260b41a30aaSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1261b41a30aaSmrg test "x$?" != "x0" && pkg_failed=yes ], 1262b41a30aaSmrg [pkg_failed=yes]) 1263b41a30aaSmrg else 1264b41a30aaSmrg pkg_failed=untried 1265b41a30aaSmrgfi[]dnl 1266b41a30aaSmrg])dnl _PKG_CONFIG 1267a253d6aeSmrg 1268b41a30aaSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 1269b41a30aaSmrgdnl --------------------------- 1270b41a30aaSmrgdnl Internal check to see if pkg-config supports short errors. 1271b41a30aaSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1272b41a30aaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1273b41a30aaSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1274b41a30aaSmrg _pkg_short_errors_supported=yes 1275b41a30aaSmrgelse 1276b41a30aaSmrg _pkg_short_errors_supported=no 1277b41a30aaSmrgfi[]dnl 1278b41a30aaSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1279a253d6aeSmrg 1280a253d6aeSmrg 1281b41a30aaSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1282b41a30aaSmrgdnl [ACTION-IF-NOT-FOUND]) 1283b41a30aaSmrgdnl -------------------------------------------------------------- 1284b41a30aaSmrgdnl Since: 0.4.0 1285b41a30aaSmrgdnl 1286b41a30aaSmrgdnl Note that if there is a possibility the first call to 1287b41a30aaSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1288b41a30aaSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1289b41a30aaSmrgAC_DEFUN([PKG_CHECK_MODULES], 1290b41a30aaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1291b41a30aaSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1292b41a30aaSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1293a253d6aeSmrg 1294b41a30aaSmrgpkg_failed=no 1295b41a30aaSmrgAC_MSG_CHECKING([for $1]) 129625b89263Smrg 1297b41a30aaSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1298b41a30aaSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1299a253d6aeSmrg 1300b41a30aaSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1301b41a30aaSmrgand $1[]_LIBS to avoid the need to call pkg-config. 1302b41a30aaSmrgSee the pkg-config man page for more details.]) 130325b89263Smrg 1304b41a30aaSmrgif test $pkg_failed = yes; then 1305b41a30aaSmrg AC_MSG_RESULT([no]) 1306b41a30aaSmrg _PKG_SHORT_ERRORS_SUPPORTED 1307b41a30aaSmrg if test $_pkg_short_errors_supported = yes; then 1308b41a30aaSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1309b41a30aaSmrg else 1310b41a30aaSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1311b41a30aaSmrg fi 1312b41a30aaSmrg # Put the nasty error message in config.log where it belongs 1313b41a30aaSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1314a253d6aeSmrg 1315b41a30aaSmrg m4_default([$4], [AC_MSG_ERROR( 1316b41a30aaSmrg[Package requirements ($2) were not met: 1317a253d6aeSmrg 1318b41a30aaSmrg$$1_PKG_ERRORS 1319a253d6aeSmrg 1320b41a30aaSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1321b41a30aaSmrginstalled software in a non-standard prefix. 1322a253d6aeSmrg 1323b41a30aaSmrg_PKG_TEXT])[]dnl 1324b41a30aaSmrg ]) 1325b41a30aaSmrgelif test $pkg_failed = untried; then 1326b41a30aaSmrg AC_MSG_RESULT([no]) 1327b41a30aaSmrg m4_default([$4], [AC_MSG_FAILURE( 1328b41a30aaSmrg[The pkg-config script could not be found or is too old. Make sure it 1329b41a30aaSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 1330b41a30aaSmrgpath to pkg-config. 1331a253d6aeSmrg 1332b41a30aaSmrg_PKG_TEXT 1333a253d6aeSmrg 1334b41a30aaSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1335b41a30aaSmrg ]) 1336b41a30aaSmrgelse 1337b41a30aaSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1338b41a30aaSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1339b41a30aaSmrg AC_MSG_RESULT([yes]) 1340b41a30aaSmrg $3 1341b41a30aaSmrgfi[]dnl 1342b41a30aaSmrg])dnl PKG_CHECK_MODULES 1343a253d6aeSmrg 1344a253d6aeSmrg 1345b41a30aaSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1346b41a30aaSmrgdnl [ACTION-IF-NOT-FOUND]) 1347b41a30aaSmrgdnl --------------------------------------------------------------------- 1348b41a30aaSmrgdnl Since: 0.29 1349b41a30aaSmrgdnl 1350b41a30aaSmrgdnl Checks for existence of MODULES and gathers its build flags with 1351b41a30aaSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1352b41a30aaSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 1353b41a30aaSmrgdnl 1354b41a30aaSmrgdnl Note that if there is a possibility the first call to 1355b41a30aaSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1356b41a30aaSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1357b41a30aaSmrgdnl configure.ac. 1358b41a30aaSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 1359b41a30aaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1360b41a30aaSmrg_save_PKG_CONFIG=$PKG_CONFIG 1361b41a30aaSmrgPKG_CONFIG="$PKG_CONFIG --static" 1362b41a30aaSmrgPKG_CHECK_MODULES($@) 1363b41a30aaSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 1364b41a30aaSmrg])dnl PKG_CHECK_MODULES_STATIC 1365a253d6aeSmrg 1366a253d6aeSmrg 1367b41a30aaSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 1368b41a30aaSmrgdnl ------------------------- 1369b41a30aaSmrgdnl Since: 0.27 1370b41a30aaSmrgdnl 1371b41a30aaSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 1372b41a30aaSmrgdnl should install pkg-config .pc files. By default the directory is 1373b41a30aaSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 1374b41a30aaSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 1375b41a30aaSmrgdnl parameter. 1376b41a30aaSmrgAC_DEFUN([PKG_INSTALLDIR], 1377b41a30aaSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1378b41a30aaSmrgm4_pushdef([pkg_description], 1379b41a30aaSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 1380b41a30aaSmrgAC_ARG_WITH([pkgconfigdir], 1381b41a30aaSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1382b41a30aaSmrg [with_pkgconfigdir=]pkg_default) 1383b41a30aaSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1384b41a30aaSmrgm4_popdef([pkg_default]) 1385b41a30aaSmrgm4_popdef([pkg_description]) 1386b41a30aaSmrg])dnl PKG_INSTALLDIR 1387b41a30aaSmrg 1388b41a30aaSmrg 1389b41a30aaSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1390b41a30aaSmrgdnl -------------------------------- 1391b41a30aaSmrgdnl Since: 0.27 1392b41a30aaSmrgdnl 1393b41a30aaSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 1394b41a30aaSmrgdnl module should install arch-independent pkg-config .pc files. By 1395b41a30aaSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 1396b41a30aaSmrgdnl changed by passing DIRECTORY. The user can override through the 1397b41a30aaSmrgdnl --with-noarch-pkgconfigdir parameter. 1398b41a30aaSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 1399b41a30aaSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1400b41a30aaSmrgm4_pushdef([pkg_description], 1401b41a30aaSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1402b41a30aaSmrgAC_ARG_WITH([noarch-pkgconfigdir], 1403b41a30aaSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1404b41a30aaSmrg [with_noarch_pkgconfigdir=]pkg_default) 1405b41a30aaSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1406b41a30aaSmrgm4_popdef([pkg_default]) 1407b41a30aaSmrgm4_popdef([pkg_description]) 1408b41a30aaSmrg])dnl PKG_NOARCH_INSTALLDIR 1409b41a30aaSmrg 1410b41a30aaSmrg 1411b41a30aaSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1412b41a30aaSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1413b41a30aaSmrgdnl ------------------------------------------- 1414b41a30aaSmrgdnl Since: 0.28 1415b41a30aaSmrgdnl 1416b41a30aaSmrgdnl Retrieves the value of the pkg-config variable for the given module. 1417b41a30aaSmrgAC_DEFUN([PKG_CHECK_VAR], 1418b41a30aaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1419b41a30aaSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1420a253d6aeSmrg 1421b41a30aaSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1422b41a30aaSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 1423a253d6aeSmrg 1424b41a30aaSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 1425b41a30aaSmrg])dnl PKG_CHECK_VAR 1426a253d6aeSmrg 1427b41a30aaSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1428b41a30aaSmrgdnl 1429b41a30aaSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 1430b41a30aaSmrgdnl 1431b41a30aaSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1432b41a30aaSmrgdnl copy of this software and associated documentation files (the "Software"), 1433b41a30aaSmrgdnl to deal in the Software without restriction, including without limitation 1434b41a30aaSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1435b41a30aaSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 1436b41a30aaSmrgdnl Software is furnished to do so, subject to the following conditions: 1437b41a30aaSmrgdnl 1438b41a30aaSmrgdnl The above copyright notice and this permission notice (including the next 1439b41a30aaSmrgdnl paragraph) shall be included in all copies or substantial portions of the 1440b41a30aaSmrgdnl Software. 1441b41a30aaSmrgdnl 1442b41a30aaSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1443b41a30aaSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1444b41a30aaSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1445b41a30aaSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1446b41a30aaSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1447b41a30aaSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1448b41a30aaSmrgdnl DEALINGS IN THE SOFTWARE. 1449a253d6aeSmrg 1450b41a30aaSmrg# XORG_MACROS_VERSION(required-version) 1451b41a30aaSmrg# ------------------------------------- 1452b41a30aaSmrg# Minimum version: 1.1.0 1453b41a30aaSmrg# 1454b41a30aaSmrg# If you're using a macro added in Version 1.1 or newer, include this in 1455b41a30aaSmrg# your configure.ac with the minimum required version, such as: 1456b41a30aaSmrg# XORG_MACROS_VERSION(1.1) 1457b41a30aaSmrg# 1458b41a30aaSmrg# To ensure that this macro is defined, also add: 1459b41a30aaSmrg# m4_ifndef([XORG_MACROS_VERSION], 1460b41a30aaSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1461b41a30aaSmrg# 1462b41a30aaSmrg# 1463b41a30aaSmrg# See the "minimum version" comment for each macro you use to see what 1464b41a30aaSmrg# version you require. 1465b41a30aaSmrgm4_defun([XORG_MACROS_VERSION],[ 1466b41a30aaSmrgm4_define([vers_have], [1.19.3]) 1467b41a30aaSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1468b41a30aaSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1469b41a30aaSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1470b41a30aaSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1471b41a30aaSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1472b41a30aaSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1473b41a30aaSmrgm4_undefine([vers_have]) 1474b41a30aaSmrgm4_undefine([maj_have]) 1475b41a30aaSmrgm4_undefine([maj_needed]) 1476b41a30aaSmrg]) # XORG_MACROS_VERSION 1477a253d6aeSmrg 1478b41a30aaSmrg# XORG_PROG_RAWCPP() 1479b41a30aaSmrg# ------------------ 1480b41a30aaSmrg# Minimum version: 1.0.0 1481b41a30aaSmrg# 1482b41a30aaSmrg# Find cpp program and necessary flags for use in pre-processing text files 1483b41a30aaSmrg# such as man pages and config files 1484b41a30aaSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1485b41a30aaSmrgAC_REQUIRE([AC_PROG_CPP]) 1486b41a30aaSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1487b41a30aaSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1488a253d6aeSmrg 1489b41a30aaSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1490b41a30aaSmrg# which is not the best choice for supporting other OS'es, but covers most 1491b41a30aaSmrg# of the ones we need for now. 1492b41a30aaSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1493b41a30aaSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1494b41a30aaSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1495b41a30aaSmrg AC_MSG_RESULT([no]) 1496b41a30aaSmrgelse 1497b41a30aaSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1498b41a30aaSmrg RAWCPPFLAGS=-undef 1499b41a30aaSmrg AC_MSG_RESULT([yes]) 1500b41a30aaSmrg # under Cygwin unix is still defined even with -undef 1501b41a30aaSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1502b41a30aaSmrg RAWCPPFLAGS="-undef -ansi" 1503b41a30aaSmrg AC_MSG_RESULT([yes, with -ansi]) 1504b41a30aaSmrg else 1505b41a30aaSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1506b41a30aaSmrg fi 1507b41a30aaSmrgfi 1508b41a30aaSmrgrm -f conftest.$ac_ext 1509a253d6aeSmrg 1510b41a30aaSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1511b41a30aaSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1512b41a30aaSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1513b41a30aaSmrg AC_MSG_RESULT([no]) 1514b41a30aaSmrgelse 1515b41a30aaSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1516b41a30aaSmrg TRADITIONALCPPFLAGS="-traditional" 1517b41a30aaSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1518b41a30aaSmrg AC_MSG_RESULT([yes]) 1519b41a30aaSmrg else 1520b41a30aaSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1521b41a30aaSmrg fi 1522b41a30aaSmrgfi 1523b41a30aaSmrgrm -f conftest.$ac_ext 1524b41a30aaSmrgAC_SUBST(RAWCPPFLAGS) 1525b41a30aaSmrgAC_SUBST(TRADITIONALCPPFLAGS) 1526b41a30aaSmrg]) # XORG_PROG_RAWCPP 1527a253d6aeSmrg 1528b41a30aaSmrg# XORG_MANPAGE_SECTIONS() 1529b41a30aaSmrg# ----------------------- 1530b41a30aaSmrg# Minimum version: 1.0.0 1531b41a30aaSmrg# 1532b41a30aaSmrg# Determine which sections man pages go in for the different man page types 1533b41a30aaSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1534b41a30aaSmrg# Not sure if there's any better way than just hardcoding by OS name. 1535b41a30aaSmrg# Override default settings by setting environment variables 1536b41a30aaSmrg# Added MAN_SUBSTS in version 1.8 1537b41a30aaSmrg# Added AC_PROG_SED in version 1.8 153806f32fbeSmrg 1539b41a30aaSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1540b41a30aaSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1541b41a30aaSmrgAC_REQUIRE([AC_PROG_SED]) 154206f32fbeSmrg 1543b41a30aaSmrgcase $host_os in 1544b41a30aaSmrg solaris*) 1545b41a30aaSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1546b41a30aaSmrg # check for a man page file found in later versions that use 1547b41a30aaSmrg # traditional section numbers instead 1548b41a30aaSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1549b41a30aaSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1550b41a30aaSmrg ;; 1551b41a30aaSmrg *) SYSV_MAN_SECTIONS=false ;; 1552b41a30aaSmrgesac 1553a253d6aeSmrg 1554b41a30aaSmrgif test x$APP_MAN_SUFFIX = x ; then 1555b41a30aaSmrg APP_MAN_SUFFIX=1 1556b41a30aaSmrgfi 1557b41a30aaSmrgif test x$APP_MAN_DIR = x ; then 1558b41a30aaSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1559b41a30aaSmrgfi 1560a253d6aeSmrg 1561b41a30aaSmrgif test x$LIB_MAN_SUFFIX = x ; then 1562b41a30aaSmrg LIB_MAN_SUFFIX=3 1563b41a30aaSmrgfi 1564b41a30aaSmrgif test x$LIB_MAN_DIR = x ; then 1565b41a30aaSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1566b41a30aaSmrgfi 1567a253d6aeSmrg 1568b41a30aaSmrgif test x$FILE_MAN_SUFFIX = x ; then 1569b41a30aaSmrg case $SYSV_MAN_SECTIONS in 1570b41a30aaSmrg true) FILE_MAN_SUFFIX=4 ;; 1571b41a30aaSmrg *) FILE_MAN_SUFFIX=5 ;; 1572b41a30aaSmrg esac 1573b41a30aaSmrgfi 1574b41a30aaSmrgif test x$FILE_MAN_DIR = x ; then 1575b41a30aaSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1576b41a30aaSmrgfi 1577a253d6aeSmrg 1578b41a30aaSmrgif test x$MISC_MAN_SUFFIX = x ; then 1579b41a30aaSmrg case $SYSV_MAN_SECTIONS in 1580b41a30aaSmrg true) MISC_MAN_SUFFIX=5 ;; 1581b41a30aaSmrg *) MISC_MAN_SUFFIX=7 ;; 1582b41a30aaSmrg esac 1583b41a30aaSmrgfi 1584b41a30aaSmrgif test x$MISC_MAN_DIR = x ; then 1585b41a30aaSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1586b41a30aaSmrgfi 1587a253d6aeSmrg 1588b41a30aaSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1589b41a30aaSmrg case $SYSV_MAN_SECTIONS in 1590b41a30aaSmrg true) DRIVER_MAN_SUFFIX=7 ;; 1591b41a30aaSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1592b41a30aaSmrg esac 1593b41a30aaSmrgfi 1594b41a30aaSmrgif test x$DRIVER_MAN_DIR = x ; then 1595b41a30aaSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1596b41a30aaSmrgfi 1597a253d6aeSmrg 1598b41a30aaSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1599b41a30aaSmrg case $SYSV_MAN_SECTIONS in 1600b41a30aaSmrg true) ADMIN_MAN_SUFFIX=1m ;; 1601b41a30aaSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1602b41a30aaSmrg esac 1603b41a30aaSmrgfi 1604b41a30aaSmrgif test x$ADMIN_MAN_DIR = x ; then 1605b41a30aaSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1606b41a30aaSmrgfi 1607a253d6aeSmrg 1608a253d6aeSmrg 1609b41a30aaSmrgAC_SUBST([APP_MAN_SUFFIX]) 1610b41a30aaSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1611b41a30aaSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1612b41a30aaSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1613b41a30aaSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1614b41a30aaSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1615b41a30aaSmrgAC_SUBST([APP_MAN_DIR]) 1616b41a30aaSmrgAC_SUBST([LIB_MAN_DIR]) 1617b41a30aaSmrgAC_SUBST([FILE_MAN_DIR]) 1618b41a30aaSmrgAC_SUBST([MISC_MAN_DIR]) 1619b41a30aaSmrgAC_SUBST([DRIVER_MAN_DIR]) 1620b41a30aaSmrgAC_SUBST([ADMIN_MAN_DIR]) 1621a253d6aeSmrg 1622b41a30aaSmrgXORG_MAN_PAGE="X Version 11" 1623b41a30aaSmrgAC_SUBST([XORG_MAN_PAGE]) 1624b41a30aaSmrgMAN_SUBSTS="\ 1625b41a30aaSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1626b41a30aaSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1627b41a30aaSmrg -e 's|__xservername__|Xorg|g' \ 1628b41a30aaSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 1629b41a30aaSmrg -e 's|__projectroot__|\$(prefix)|g' \ 1630b41a30aaSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1631b41a30aaSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1632b41a30aaSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1633b41a30aaSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1634b41a30aaSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1635b41a30aaSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1636b41a30aaSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1637b41a30aaSmrgAC_SUBST([MAN_SUBSTS]) 1638a253d6aeSmrg 1639b41a30aaSmrg]) # XORG_MANPAGE_SECTIONS 1640a253d6aeSmrg 1641b41a30aaSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1642b41a30aaSmrg# ------------------------ 1643b41a30aaSmrg# Minimum version: 1.7.0 1644b41a30aaSmrg# 1645b41a30aaSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1646b41a30aaSmrg# provided by xorg-sgml-doctools, if installed. 1647b41a30aaSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1648b41a30aaSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1649b41a30aaSmrgXORG_SGML_PATH= 1650b41a30aaSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1651b41a30aaSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1652b41a30aaSmrg [m4_ifval([$1],[:], 1653b41a30aaSmrg [if test x"$cross_compiling" != x"yes" ; then 1654b41a30aaSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1655b41a30aaSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 1656b41a30aaSmrg fi]) 1657b41a30aaSmrg ]) 1658b41a30aaSmrg 1659b41a30aaSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1660b41a30aaSmrg# the path and the name of the doc stylesheet 1661b41a30aaSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1662b41a30aaSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1663b41a30aaSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1664b41a30aaSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 166531637056Smrgelse 1666b41a30aaSmrg AC_MSG_RESULT([no]) 166731637056Smrgfi 1668ea133fd7Smrg 1669b41a30aaSmrgAC_SUBST(XORG_SGML_PATH) 1670b41a30aaSmrgAC_SUBST(STYLESHEET_SRCDIR) 1671b41a30aaSmrgAC_SUBST(XSL_STYLESHEET) 1672b41a30aaSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1673b41a30aaSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1674a253d6aeSmrg 1675b41a30aaSmrg# XORG_CHECK_LINUXDOC 167631637056Smrg# ------------------- 1677b41a30aaSmrg# Minimum version: 1.0.0 1678b41a30aaSmrg# 1679b41a30aaSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1680b41a30aaSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1681b41a30aaSmrg# Whether or not the necessary tools and files are found can be checked 1682b41a30aaSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1683b41a30aaSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1684b41a30aaSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1685b41a30aaSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1686a253d6aeSmrg 1687b41a30aaSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1688a253d6aeSmrg 1689b41a30aaSmrgAC_MSG_CHECKING([whether to build documentation]) 1690ea133fd7Smrg 1691b41a30aaSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1692b41a30aaSmrg BUILDDOC=yes 169331637056Smrgelse 1694b41a30aaSmrg BUILDDOC=no 169531637056Smrgfi 1696ea133fd7Smrg 1697b41a30aaSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1698ea133fd7Smrg 1699b41a30aaSmrgAC_MSG_RESULT([$BUILDDOC]) 1700ea133fd7Smrg 1701b41a30aaSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1702a253d6aeSmrg 1703b41a30aaSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1704b41a30aaSmrg BUILDPDFDOC=yes 1705b41a30aaSmrgelse 1706b41a30aaSmrg BUILDPDFDOC=no 1707b41a30aaSmrgfi 1708a253d6aeSmrg 1709b41a30aaSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 171025b89263Smrg 1711b41a30aaSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 171225b89263Smrg 1713b41a30aaSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1714b41a30aaSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1715b41a30aaSmrgMAKE_PDF="$PS2PDF" 1716b41a30aaSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 171725b89263Smrg 1718b41a30aaSmrgAC_SUBST(MAKE_TEXT) 1719b41a30aaSmrgAC_SUBST(MAKE_PS) 1720b41a30aaSmrgAC_SUBST(MAKE_PDF) 1721b41a30aaSmrgAC_SUBST(MAKE_HTML) 1722b41a30aaSmrg]) # XORG_CHECK_LINUXDOC 172325b89263Smrg 1724b41a30aaSmrg# XORG_CHECK_DOCBOOK 1725b41a30aaSmrg# ------------------- 1726b41a30aaSmrg# Minimum version: 1.0.0 1727b41a30aaSmrg# 1728b41a30aaSmrg# Checks for the ability to build output formats from SGML DocBook source. 1729b41a30aaSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1730b41a30aaSmrg# indicates whether the necessary tools and files are found and, if set, 1731b41a30aaSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1732b41a30aaSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1733b41a30aaSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 173431637056Smrg 1735b41a30aaSmrgBUILDTXTDOC=no 1736b41a30aaSmrgBUILDPDFDOC=no 1737b41a30aaSmrgBUILDPSDOC=no 1738b41a30aaSmrgBUILDHTMLDOC=no 1739ea133fd7Smrg 1740b41a30aaSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1741b41a30aaSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1742b41a30aaSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1743b41a30aaSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1744a253d6aeSmrg 1745b41a30aaSmrgAC_MSG_CHECKING([whether to build text documentation]) 1746b41a30aaSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1747b41a30aaSmrg test x$BUILD_TXTDOC != xno; then 1748b41a30aaSmrg BUILDTXTDOC=yes 1749b41a30aaSmrgfi 1750b41a30aaSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1751b41a30aaSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1752a253d6aeSmrg 1753b41a30aaSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1754b41a30aaSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1755b41a30aaSmrg test x$BUILD_PDFDOC != xno; then 1756b41a30aaSmrg BUILDPDFDOC=yes 175731637056Smrgfi 1758b41a30aaSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1759b41a30aaSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1760a253d6aeSmrg 1761b41a30aaSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1762b41a30aaSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1763b41a30aaSmrg test x$BUILD_PSDOC != xno; then 1764b41a30aaSmrg BUILDPSDOC=yes 1765b41a30aaSmrgfi 1766b41a30aaSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1767b41a30aaSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1768a253d6aeSmrg 1769b41a30aaSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1770b41a30aaSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1771b41a30aaSmrg test x$BUILD_HTMLDOC != xno; then 1772b41a30aaSmrg BUILDHTMLDOC=yes 1773b41a30aaSmrgfi 1774b41a30aaSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1775b41a30aaSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1776a253d6aeSmrg 1777b41a30aaSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1778b41a30aaSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1779b41a30aaSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1780b41a30aaSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1781a253d6aeSmrg 1782b41a30aaSmrgAC_SUBST(MAKE_TEXT) 1783b41a30aaSmrgAC_SUBST(MAKE_PS) 1784b41a30aaSmrgAC_SUBST(MAKE_PDF) 1785b41a30aaSmrgAC_SUBST(MAKE_HTML) 1786b41a30aaSmrg]) # XORG_CHECK_DOCBOOK 1787a253d6aeSmrg 1788b41a30aaSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1789b41a30aaSmrg# ---------------- 1790b41a30aaSmrg# Minimum version: 1.5.0 1791b41a30aaSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1792b41a30aaSmrg# 1793b41a30aaSmrg# Documentation tools are not always available on all platforms and sometimes 1794b41a30aaSmrg# not at the appropriate level. This macro enables a module to test for the 1795b41a30aaSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1796b41a30aaSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1797b41a30aaSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1798b41a30aaSmrg# --with-xmlto assumes 'auto'. 1799b41a30aaSmrg# 1800b41a30aaSmrg# Interface to module: 1801b41a30aaSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1802b41a30aaSmrg# XMLTO: returns the path of the xmlto program found 1803b41a30aaSmrg# returns the path set by the user in the environment 1804b41a30aaSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1805b41a30aaSmrg# 'no' user instructs the module not to use xmlto 1806b41a30aaSmrg# 1807b41a30aaSmrg# Added in version 1.10.0 1808b41a30aaSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1809b41a30aaSmrg# xmlto for text output requires either lynx, links, or w3m browsers 1810b41a30aaSmrg# 1811b41a30aaSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1812b41a30aaSmrg# 1813b41a30aaSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1814b41a30aaSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1815b41a30aaSmrgm4_define([_defopt], m4_default([$2], [auto])) 1816b41a30aaSmrgAC_ARG_WITH(xmlto, 1817b41a30aaSmrg AS_HELP_STRING([--with-xmlto], 1818b41a30aaSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1819b41a30aaSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1820b41a30aaSmrgm4_undefine([_defopt]) 1821a253d6aeSmrg 1822b41a30aaSmrgif test "x$use_xmlto" = x"auto"; then 1823b41a30aaSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1824b41a30aaSmrg if test "x$XMLTO" = "x"; then 1825b41a30aaSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1826b41a30aaSmrg have_xmlto=no 1827b41a30aaSmrg else 1828b41a30aaSmrg have_xmlto=yes 1829b41a30aaSmrg fi 1830b41a30aaSmrgelif test "x$use_xmlto" = x"yes" ; then 1831b41a30aaSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1832b41a30aaSmrg if test "x$XMLTO" = "x"; then 1833b41a30aaSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1834b41a30aaSmrg fi 1835b41a30aaSmrg have_xmlto=yes 1836b41a30aaSmrgelif test "x$use_xmlto" = x"no" ; then 1837b41a30aaSmrg if test "x$XMLTO" != "x"; then 1838b41a30aaSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1839b41a30aaSmrg fi 1840b41a30aaSmrg have_xmlto=no 1841b41a30aaSmrgelse 1842b41a30aaSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 184306f32fbeSmrgfi 1844a253d6aeSmrg 1845b41a30aaSmrg# Test for a minimum version of xmlto, if provided. 1846b41a30aaSmrgm4_ifval([$1], 1847b41a30aaSmrg[if test "$have_xmlto" = yes; then 1848b41a30aaSmrg # scrape the xmlto version 1849b41a30aaSmrg AC_MSG_CHECKING([the xmlto version]) 1850b41a30aaSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1851b41a30aaSmrg AC_MSG_RESULT([$xmlto_version]) 1852b41a30aaSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1853b41a30aaSmrg [if test "x$use_xmlto" = xauto; then 1854b41a30aaSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1855b41a30aaSmrg have_xmlto=no 1856b41a30aaSmrg else 1857b41a30aaSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1858b41a30aaSmrg fi]) 1859b41a30aaSmrgfi]) 1860a253d6aeSmrg 1861b41a30aaSmrg# Test for the ability of xmlto to generate a text target 1862b41a30aaSmrg# 1863b41a30aaSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1864b41a30aaSmrg# following test for empty XML docbook files. 1865b41a30aaSmrg# For compatibility reasons use the following empty XML docbook file and if 1866b41a30aaSmrg# it fails try it again with a non-empty XML file. 1867b41a30aaSmrghave_xmlto_text=no 1868b41a30aaSmrgcat > conftest.xml << "EOF" 1869b41a30aaSmrgEOF 1870b41a30aaSmrgAS_IF([test "$have_xmlto" = yes], 1871b41a30aaSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1872b41a30aaSmrg [have_xmlto_text=yes], 1873b41a30aaSmrg [# Try it again with a non-empty XML file. 1874b41a30aaSmrg cat > conftest.xml << "EOF" 1875b41a30aaSmrg<x></x> 1876b41a30aaSmrgEOF 1877b41a30aaSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1878b41a30aaSmrg [have_xmlto_text=yes], 1879b41a30aaSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1880b41a30aaSmrgrm -f conftest.xml 1881b41a30aaSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1882b41a30aaSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1883b41a30aaSmrg]) # XORG_WITH_XMLTO 1884a253d6aeSmrg 1885b41a30aaSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1886b41a30aaSmrg# -------------------------------------------- 1887b41a30aaSmrg# Minimum version: 1.12.0 1888b41a30aaSmrg# Minimum version for optional DEFAULT argument: 1.12.0 1889b41a30aaSmrg# 1890b41a30aaSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1891b41a30aaSmrg# XML-based language used for the transformation of XML documents. 1892b41a30aaSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1893b41a30aaSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1894b41a30aaSmrg# The XSLT processor is often used as a standalone tool for transformations. 1895b41a30aaSmrg# It should not be assumed that this tool is used only to work with documnetation. 1896b41a30aaSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1897b41a30aaSmrg# 1898b41a30aaSmrg# Interface to module: 1899b41a30aaSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1900b41a30aaSmrg# XSLTPROC: returns the path of the xsltproc program found 1901b41a30aaSmrg# returns the path set by the user in the environment 1902b41a30aaSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1903b41a30aaSmrg# 'no' user instructs the module not to use xsltproc 1904b41a30aaSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1905b41a30aaSmrg# 1906b41a30aaSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1907b41a30aaSmrg# 1908b41a30aaSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1909b41a30aaSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1910b41a30aaSmrg# Preserves the interface, should it be implemented later 1911b41a30aaSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1912b41a30aaSmrgm4_define([_defopt], m4_default([$2], [auto])) 1913b41a30aaSmrgAC_ARG_WITH(xsltproc, 1914b41a30aaSmrg AS_HELP_STRING([--with-xsltproc], 1915b41a30aaSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1916b41a30aaSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1917b41a30aaSmrgm4_undefine([_defopt]) 1918b41a30aaSmrg 1919b41a30aaSmrgif test "x$use_xsltproc" = x"auto"; then 1920b41a30aaSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1921b41a30aaSmrg if test "x$XSLTPROC" = "x"; then 1922b41a30aaSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1923b41a30aaSmrg have_xsltproc=no 1924b41a30aaSmrg else 1925b41a30aaSmrg have_xsltproc=yes 1926b41a30aaSmrg fi 1927b41a30aaSmrgelif test "x$use_xsltproc" = x"yes" ; then 1928b41a30aaSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1929b41a30aaSmrg if test "x$XSLTPROC" = "x"; then 1930b41a30aaSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1931b41a30aaSmrg fi 1932b41a30aaSmrg have_xsltproc=yes 1933b41a30aaSmrgelif test "x$use_xsltproc" = x"no" ; then 1934b41a30aaSmrg if test "x$XSLTPROC" != "x"; then 1935b41a30aaSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1936b41a30aaSmrg fi 1937b41a30aaSmrg have_xsltproc=no 193831637056Smrgelse 1939b41a30aaSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 194006f32fbeSmrgfi 1941a253d6aeSmrg 1942b41a30aaSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1943b41a30aaSmrg]) # XORG_WITH_XSLTPROC 1944a253d6aeSmrg 1945b41a30aaSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1946b41a30aaSmrg# ---------------------------------------- 1947b41a30aaSmrg# Minimum version: 1.15.0 1948b41a30aaSmrg# 1949b41a30aaSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 1950b41a30aaSmrg# scanning arbitrary text files, extracting information from those text files, 1951b41a30aaSmrg# and printing reports based on that information. 1952b41a30aaSmrg# 1953b41a30aaSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1954b41a30aaSmrg# 1955b41a30aaSmrg# Interface to module: 1956b41a30aaSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 1957b41a30aaSmrg# PERL: returns the path of the perl program found 1958b41a30aaSmrg# returns the path set by the user in the environment 1959b41a30aaSmrg# --with-perl: 'yes' user instructs the module to use perl 1960b41a30aaSmrg# 'no' user instructs the module not to use perl 1961b41a30aaSmrg# have_perl: returns yes if perl found in PATH or no 1962b41a30aaSmrg# 1963b41a30aaSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1964b41a30aaSmrg# 1965b41a30aaSmrgAC_DEFUN([XORG_WITH_PERL],[ 1966b41a30aaSmrgAC_ARG_VAR([PERL], [Path to perl command]) 1967b41a30aaSmrg# Preserves the interface, should it be implemented later 1968b41a30aaSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1969b41a30aaSmrgm4_define([_defopt], m4_default([$2], [auto])) 1970b41a30aaSmrgAC_ARG_WITH(perl, 1971b41a30aaSmrg AS_HELP_STRING([--with-perl], 1972b41a30aaSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 1973b41a30aaSmrg [use_perl=$withval], [use_perl=]_defopt) 1974b41a30aaSmrgm4_undefine([_defopt]) 1975a253d6aeSmrg 1976b41a30aaSmrgif test "x$use_perl" = x"auto"; then 1977b41a30aaSmrg AC_PATH_PROG([PERL], [perl]) 1978b41a30aaSmrg if test "x$PERL" = "x"; then 1979b41a30aaSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1980b41a30aaSmrg have_perl=no 1981b41a30aaSmrg else 1982b41a30aaSmrg have_perl=yes 198331637056Smrg fi 1984b41a30aaSmrgelif test "x$use_perl" = x"yes" ; then 1985b41a30aaSmrg AC_PATH_PROG([PERL], [perl]) 1986b41a30aaSmrg if test "x$PERL" = "x"; then 1987b41a30aaSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1988b41a30aaSmrg fi 1989b41a30aaSmrg have_perl=yes 1990b41a30aaSmrgelif test "x$use_perl" = x"no" ; then 1991b41a30aaSmrg if test "x$PERL" != "x"; then 1992b41a30aaSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1993b41a30aaSmrg fi 1994b41a30aaSmrg have_perl=no 199531637056Smrgelse 1996b41a30aaSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 199731637056Smrgfi 1998ea133fd7Smrg 1999b41a30aaSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2000b41a30aaSmrg]) # XORG_WITH_PERL 2001ea133fd7Smrg 2002b41a30aaSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2003b41a30aaSmrg# ---------------- 2004b41a30aaSmrg# Minimum version: 1.5.0 2005b41a30aaSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2006b41a30aaSmrg# 2007b41a30aaSmrg# Documentation tools are not always available on all platforms and sometimes 2008b41a30aaSmrg# not at the appropriate level. This macro enables a module to test for the 2009b41a30aaSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2010b41a30aaSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 2011b41a30aaSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2012b41a30aaSmrg# --with-asciidoc assumes 'auto'. 2013b41a30aaSmrg# 2014b41a30aaSmrg# Interface to module: 2015b41a30aaSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2016b41a30aaSmrg# ASCIIDOC: returns the path of the asciidoc program found 2017b41a30aaSmrg# returns the path set by the user in the environment 2018b41a30aaSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2019b41a30aaSmrg# 'no' user instructs the module not to use asciidoc 2020b41a30aaSmrg# 2021b41a30aaSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2022b41a30aaSmrg# 2023b41a30aaSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 2024b41a30aaSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2025b41a30aaSmrgm4_define([_defopt], m4_default([$2], [auto])) 2026b41a30aaSmrgAC_ARG_WITH(asciidoc, 2027b41a30aaSmrg AS_HELP_STRING([--with-asciidoc], 2028b41a30aaSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2029b41a30aaSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2030b41a30aaSmrgm4_undefine([_defopt]) 2031a253d6aeSmrg 2032b41a30aaSmrgif test "x$use_asciidoc" = x"auto"; then 2033b41a30aaSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2034b41a30aaSmrg if test "x$ASCIIDOC" = "x"; then 2035b41a30aaSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2036b41a30aaSmrg have_asciidoc=no 2037b41a30aaSmrg else 2038b41a30aaSmrg have_asciidoc=yes 2039b41a30aaSmrg fi 2040b41a30aaSmrgelif test "x$use_asciidoc" = x"yes" ; then 2041b41a30aaSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2042b41a30aaSmrg if test "x$ASCIIDOC" = "x"; then 2043b41a30aaSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2044b41a30aaSmrg fi 2045b41a30aaSmrg have_asciidoc=yes 2046b41a30aaSmrgelif test "x$use_asciidoc" = x"no" ; then 2047b41a30aaSmrg if test "x$ASCIIDOC" != "x"; then 2048b41a30aaSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2049b41a30aaSmrg fi 2050b41a30aaSmrg have_asciidoc=no 2051b41a30aaSmrgelse 2052b41a30aaSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2053b41a30aaSmrgfi 2054b41a30aaSmrgm4_ifval([$1], 2055b41a30aaSmrg[if test "$have_asciidoc" = yes; then 2056b41a30aaSmrg # scrape the asciidoc version 2057b41a30aaSmrg AC_MSG_CHECKING([the asciidoc version]) 2058b41a30aaSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2059b41a30aaSmrg AC_MSG_RESULT([$asciidoc_version]) 2060b41a30aaSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 2061b41a30aaSmrg [if test "x$use_asciidoc" = xauto; then 2062b41a30aaSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2063b41a30aaSmrg have_asciidoc=no 2064b41a30aaSmrg else 2065b41a30aaSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2066b41a30aaSmrg fi]) 2067b41a30aaSmrgfi]) 2068b41a30aaSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2069b41a30aaSmrg]) # XORG_WITH_ASCIIDOC 2070a253d6aeSmrg 2071b41a30aaSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2072b41a30aaSmrg# ------------------------------------------- 2073b41a30aaSmrg# Minimum version: 1.5.0 2074b41a30aaSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2075b41a30aaSmrg# Minimum version for optional DOT checking: 1.18.0 2076b41a30aaSmrg# 2077b41a30aaSmrg# Documentation tools are not always available on all platforms and sometimes 2078b41a30aaSmrg# not at the appropriate level. This macro enables a module to test for the 2079b41a30aaSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2080b41a30aaSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 2081b41a30aaSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 2082b41a30aaSmrg# --with-doxygen assumes 'auto'. 2083b41a30aaSmrg# 2084b41a30aaSmrg# Interface to module: 2085b41a30aaSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2086b41a30aaSmrg# DOXYGEN: returns the path of the doxygen program found 2087b41a30aaSmrg# returns the path set by the user in the environment 2088b41a30aaSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 2089b41a30aaSmrg# 'no' user instructs the module not to use doxygen 2090b41a30aaSmrg# 2091b41a30aaSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2092b41a30aaSmrg# 2093b41a30aaSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 2094b41a30aaSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2095b41a30aaSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2096b41a30aaSmrgm4_define([_defopt], m4_default([$2], [auto])) 2097b41a30aaSmrgAC_ARG_WITH(doxygen, 2098b41a30aaSmrg AS_HELP_STRING([--with-doxygen], 2099b41a30aaSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2100b41a30aaSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 2101b41a30aaSmrgm4_undefine([_defopt]) 2102a253d6aeSmrg 2103b41a30aaSmrgif test "x$use_doxygen" = x"auto"; then 2104b41a30aaSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2105b41a30aaSmrg if test "x$DOXYGEN" = "x"; then 2106b41a30aaSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2107b41a30aaSmrg have_doxygen=no 2108b41a30aaSmrg else 2109b41a30aaSmrg have_doxygen=yes 2110b41a30aaSmrg fi 2111b41a30aaSmrgelif test "x$use_doxygen" = x"yes" ; then 2112b41a30aaSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2113b41a30aaSmrg if test "x$DOXYGEN" = "x"; then 2114b41a30aaSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2115b41a30aaSmrg fi 2116b41a30aaSmrg have_doxygen=yes 2117b41a30aaSmrgelif test "x$use_doxygen" = x"no" ; then 2118b41a30aaSmrg if test "x$DOXYGEN" != "x"; then 2119b41a30aaSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2120b41a30aaSmrg fi 2121b41a30aaSmrg have_doxygen=no 2122b41a30aaSmrgelse 2123b41a30aaSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2124b41a30aaSmrgfi 2125b41a30aaSmrgm4_ifval([$1], 2126b41a30aaSmrg[if test "$have_doxygen" = yes; then 2127b41a30aaSmrg # scrape the doxygen version 2128b41a30aaSmrg AC_MSG_CHECKING([the doxygen version]) 2129b41a30aaSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 2130b41a30aaSmrg AC_MSG_RESULT([$doxygen_version]) 2131b41a30aaSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 2132b41a30aaSmrg [if test "x$use_doxygen" = xauto; then 2133b41a30aaSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2134b41a30aaSmrg have_doxygen=no 2135b41a30aaSmrg else 2136b41a30aaSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2137b41a30aaSmrg fi]) 2138b41a30aaSmrgfi]) 2139a253d6aeSmrg 2140b41a30aaSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2141b41a30aaSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2142b41a30aaSmrgdnl HAVE_DOT = @HAVE_DOT@ 2143b41a30aaSmrgHAVE_DOT=no 2144b41a30aaSmrgif test "x$have_doxygen" = "xyes"; then 2145b41a30aaSmrg AC_PATH_PROG([DOT], [dot]) 2146b41a30aaSmrg if test "x$DOT" != "x"; then 2147b41a30aaSmrg HAVE_DOT=yes 214831637056Smrg fi 2149b41a30aaSmrgfi 2150a253d6aeSmrg 2151b41a30aaSmrgAC_SUBST([HAVE_DOT]) 2152b41a30aaSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2153b41a30aaSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2154b41a30aaSmrg]) # XORG_WITH_DOXYGEN 215557ee1794Smrg 2156b41a30aaSmrg# XORG_WITH_GROFF([DEFAULT]) 2157b41a30aaSmrg# ---------------- 2158b41a30aaSmrg# Minimum version: 1.6.0 2159b41a30aaSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2160b41a30aaSmrg# 2161b41a30aaSmrg# Documentation tools are not always available on all platforms and sometimes 2162b41a30aaSmrg# not at the appropriate level. This macro enables a module to test for the 2163b41a30aaSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2164b41a30aaSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 2165b41a30aaSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 2166b41a30aaSmrg# --with-groff assumes 'auto'. 2167b41a30aaSmrg# 2168b41a30aaSmrg# Interface to module: 2169b41a30aaSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2170b41a30aaSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2171b41a30aaSmrg# HAVE_GROFF_MS: the -ms macros package 2172b41a30aaSmrg# GROFF: returns the path of the groff program found 2173b41a30aaSmrg# returns the path set by the user in the environment 2174b41a30aaSmrg# --with-groff: 'yes' user instructs the module to use groff 2175b41a30aaSmrg# 'no' user instructs the module not to use groff 2176b41a30aaSmrg# 2177b41a30aaSmrg# Added in version 1.9.0: 2178b41a30aaSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2179b41a30aaSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2180b41a30aaSmrg# psselect from the psutils package. 2181b41a30aaSmrg# the ghostcript package. Refer to the grohtml man pages 2182b41a30aaSmrg# 2183b41a30aaSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2184b41a30aaSmrg# 2185b41a30aaSmrg# OS and distros often splits groff in a basic and full package, the former 2186b41a30aaSmrg# having the groff program and the later having devices, fonts and macros 2187b41a30aaSmrg# Checking for the groff executable is not enough. 2188b41a30aaSmrg# 2189b41a30aaSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 2190b41a30aaSmrg# unset HAVE_GROFF or GROFF env variables. 2191b41a30aaSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2192b41a30aaSmrg# 2193b41a30aaSmrgAC_DEFUN([XORG_WITH_GROFF],[ 2194b41a30aaSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2195b41a30aaSmrgm4_define([_defopt], m4_default([$1], [auto])) 2196b41a30aaSmrgAC_ARG_WITH(groff, 2197b41a30aaSmrg AS_HELP_STRING([--with-groff], 2198b41a30aaSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2199b41a30aaSmrg [use_groff=$withval], [use_groff=]_defopt) 2200b41a30aaSmrgm4_undefine([_defopt]) 220157ee1794Smrg 2202b41a30aaSmrgif test "x$use_groff" = x"auto"; then 2203b41a30aaSmrg AC_PATH_PROG([GROFF], [groff]) 2204b41a30aaSmrg if test "x$GROFF" = "x"; then 2205b41a30aaSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2206b41a30aaSmrg have_groff=no 2207b41a30aaSmrg else 2208b41a30aaSmrg have_groff=yes 2209b41a30aaSmrg fi 2210b41a30aaSmrgelif test "x$use_groff" = x"yes" ; then 2211b41a30aaSmrg AC_PATH_PROG([GROFF], [groff]) 2212b41a30aaSmrg if test "x$GROFF" = "x"; then 2213b41a30aaSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2214b41a30aaSmrg fi 2215b41a30aaSmrg have_groff=yes 2216b41a30aaSmrgelif test "x$use_groff" = x"no" ; then 2217b41a30aaSmrg if test "x$GROFF" != "x"; then 2218b41a30aaSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2219b41a30aaSmrg fi 2220b41a30aaSmrg have_groff=no 2221b41a30aaSmrgelse 2222b41a30aaSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2223b41a30aaSmrgfi 2224b41a30aaSmrg 2225b41a30aaSmrg# We have groff, test for the presence of the macro packages 2226b41a30aaSmrgif test "x$have_groff" = x"yes"; then 2227b41a30aaSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2228b41a30aaSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2229b41a30aaSmrg groff_ms_works=yes 2230b41a30aaSmrg else 2231b41a30aaSmrg groff_ms_works=no 223231637056Smrg fi 2233b41a30aaSmrg AC_MSG_RESULT([$groff_ms_works]) 2234b41a30aaSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2235b41a30aaSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2236b41a30aaSmrg groff_mm_works=yes 223731637056Smrg else 2238b41a30aaSmrg groff_mm_works=no 223931637056Smrg fi 2240b41a30aaSmrg AC_MSG_RESULT([$groff_mm_works]) 224131637056Smrgfi 2242ea133fd7Smrg 2243b41a30aaSmrg# We have groff, test for HTML dependencies, one command per package 2244b41a30aaSmrgif test "x$have_groff" = x"yes"; then 2245b41a30aaSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2246b41a30aaSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2247b41a30aaSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2248b41a30aaSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2249b41a30aaSmrg have_groff_html=yes 2250b41a30aaSmrg else 2251b41a30aaSmrg have_groff_html=no 2252b41a30aaSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2253b41a30aaSmrg fi 2254b41a30aaSmrgfi 2255a253d6aeSmrg 2256b41a30aaSmrg# Set Automake conditionals for Makefiles 2257b41a30aaSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2258b41a30aaSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2259b41a30aaSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2260b41a30aaSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2261b41a30aaSmrg]) # XORG_WITH_GROFF 226257ee1794Smrg 2263b41a30aaSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2264b41a30aaSmrg# --------------------------------------- 2265b41a30aaSmrg# Minimum version: 1.6.0 2266b41a30aaSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2267b41a30aaSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2268b41a30aaSmrg# 2269b41a30aaSmrg# Documentation tools are not always available on all platforms and sometimes 2270b41a30aaSmrg# not at the appropriate level. This macro enables a module to test for the 2271b41a30aaSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2272b41a30aaSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 2273b41a30aaSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 2274b41a30aaSmrg# --with-fop assumes 'auto'. 2275b41a30aaSmrg# 2276b41a30aaSmrg# Interface to module: 2277b41a30aaSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2278b41a30aaSmrg# FOP: returns the path of the fop program found 2279b41a30aaSmrg# returns the path set by the user in the environment 2280b41a30aaSmrg# --with-fop: 'yes' user instructs the module to use fop 2281b41a30aaSmrg# 'no' user instructs the module not to use fop 2282b41a30aaSmrg# 2283b41a30aaSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2284b41a30aaSmrg# 2285b41a30aaSmrgAC_DEFUN([XORG_WITH_FOP],[ 2286b41a30aaSmrgAC_ARG_VAR([FOP], [Path to fop command]) 2287b41a30aaSmrgm4_define([_defopt], m4_default([$2], [auto])) 2288b41a30aaSmrgAC_ARG_WITH(fop, 2289b41a30aaSmrg AS_HELP_STRING([--with-fop], 2290b41a30aaSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2291b41a30aaSmrg [use_fop=$withval], [use_fop=]_defopt) 2292b41a30aaSmrgm4_undefine([_defopt]) 2293a253d6aeSmrg 2294b41a30aaSmrgif test "x$use_fop" = x"auto"; then 2295b41a30aaSmrg AC_PATH_PROG([FOP], [fop]) 2296b41a30aaSmrg if test "x$FOP" = "x"; then 2297b41a30aaSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2298b41a30aaSmrg have_fop=no 2299b41a30aaSmrg else 2300b41a30aaSmrg have_fop=yes 2301b41a30aaSmrg fi 2302b41a30aaSmrgelif test "x$use_fop" = x"yes" ; then 2303b41a30aaSmrg AC_PATH_PROG([FOP], [fop]) 2304b41a30aaSmrg if test "x$FOP" = "x"; then 2305b41a30aaSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2306b41a30aaSmrg fi 2307b41a30aaSmrg have_fop=yes 2308b41a30aaSmrgelif test "x$use_fop" = x"no" ; then 2309b41a30aaSmrg if test "x$FOP" != "x"; then 2310b41a30aaSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2311b41a30aaSmrg fi 2312b41a30aaSmrg have_fop=no 231331637056Smrgelse 2314b41a30aaSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2315b41a30aaSmrgfi 2316a253d6aeSmrg 2317b41a30aaSmrg# Test for a minimum version of fop, if provided. 2318b41a30aaSmrgm4_ifval([$1], 2319b41a30aaSmrg[if test "$have_fop" = yes; then 2320b41a30aaSmrg # scrape the fop version 2321b41a30aaSmrg AC_MSG_CHECKING([for fop minimum version]) 2322b41a30aaSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2323b41a30aaSmrg AC_MSG_RESULT([$fop_version]) 2324b41a30aaSmrg AS_VERSION_COMPARE([$fop_version], [$1], 2325b41a30aaSmrg [if test "x$use_fop" = xauto; then 2326b41a30aaSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2327b41a30aaSmrg have_fop=no 2328b41a30aaSmrg else 2329b41a30aaSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2330b41a30aaSmrg fi]) 2331b41a30aaSmrgfi]) 2332b41a30aaSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2333b41a30aaSmrg]) # XORG_WITH_FOP 2334a253d6aeSmrg 2335b41a30aaSmrg# XORG_WITH_M4([MIN-VERSION]) 2336b41a30aaSmrg# --------------------------- 2337b41a30aaSmrg# Minimum version: 1.19.0 2338b41a30aaSmrg# 2339b41a30aaSmrg# This macro attempts to locate an m4 macro processor which supports 2340b41a30aaSmrg# -I option and is only useful for modules relying on M4 in order to 2341b41a30aaSmrg# expand macros in source code files. 2342b41a30aaSmrg# 2343b41a30aaSmrg# Interface to module: 2344b41a30aaSmrg# M4: returns the path of the m4 program found 2345b41a30aaSmrg# returns the path set by the user in the environment 2346b41a30aaSmrg# 2347b41a30aaSmrgAC_DEFUN([XORG_WITH_M4], [ 2348b41a30aaSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2349b41a30aaSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2350b41a30aaSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2351b41a30aaSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2352b41a30aaSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 2353b41a30aaSmrg [$PATH:/usr/gnu/bin])]) 2354a253d6aeSmrg 2355b41a30aaSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 2356b41a30aaSmrg]) # XORG_WITH_M4 2357a253d6aeSmrg 2358b41a30aaSmrg# XORG_WITH_PS2PDF([DEFAULT]) 2359b41a30aaSmrg# ---------------- 2360b41a30aaSmrg# Minimum version: 1.6.0 2361b41a30aaSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2362b41a30aaSmrg# 2363b41a30aaSmrg# Documentation tools are not always available on all platforms and sometimes 2364b41a30aaSmrg# not at the appropriate level. This macro enables a module to test for the 2365b41a30aaSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2366b41a30aaSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 2367b41a30aaSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2368b41a30aaSmrg# --with-ps2pdf assumes 'auto'. 2369b41a30aaSmrg# 2370b41a30aaSmrg# Interface to module: 2371b41a30aaSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2372b41a30aaSmrg# PS2PDF: returns the path of the ps2pdf program found 2373b41a30aaSmrg# returns the path set by the user in the environment 2374b41a30aaSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2375b41a30aaSmrg# 'no' user instructs the module not to use ps2pdf 2376b41a30aaSmrg# 2377b41a30aaSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2378b41a30aaSmrg# 2379b41a30aaSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2380b41a30aaSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2381b41a30aaSmrgm4_define([_defopt], m4_default([$1], [auto])) 2382b41a30aaSmrgAC_ARG_WITH(ps2pdf, 2383b41a30aaSmrg AS_HELP_STRING([--with-ps2pdf], 2384b41a30aaSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2385b41a30aaSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2386b41a30aaSmrgm4_undefine([_defopt]) 2387a253d6aeSmrg 2388b41a30aaSmrgif test "x$use_ps2pdf" = x"auto"; then 2389b41a30aaSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2390b41a30aaSmrg if test "x$PS2PDF" = "x"; then 2391b41a30aaSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2392b41a30aaSmrg have_ps2pdf=no 2393b41a30aaSmrg else 2394b41a30aaSmrg have_ps2pdf=yes 2395b41a30aaSmrg fi 2396b41a30aaSmrgelif test "x$use_ps2pdf" = x"yes" ; then 2397b41a30aaSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2398b41a30aaSmrg if test "x$PS2PDF" = "x"; then 2399b41a30aaSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2400b41a30aaSmrg fi 2401b41a30aaSmrg have_ps2pdf=yes 2402b41a30aaSmrgelif test "x$use_ps2pdf" = x"no" ; then 2403b41a30aaSmrg if test "x$PS2PDF" != "x"; then 2404b41a30aaSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2405b41a30aaSmrg fi 2406b41a30aaSmrg have_ps2pdf=no 2407b41a30aaSmrgelse 2408b41a30aaSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2409b41a30aaSmrgfi 2410b41a30aaSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2411b41a30aaSmrg]) # XORG_WITH_PS2PDF 2412a253d6aeSmrg 2413b41a30aaSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 2414b41a30aaSmrg# ---------------- 2415b41a30aaSmrg# Minimum version: 1.6.0 2416b41a30aaSmrg# 2417b41a30aaSmrg# Documentation tools are not always available on all platforms and sometimes 2418b41a30aaSmrg# not at the appropriate level. This macro enables a builder to skip all 2419b41a30aaSmrg# documentation targets except traditional man pages. 2420b41a30aaSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2421b41a30aaSmrg# maximum flexibilty in controlling documentation building. 2422b41a30aaSmrg# Refer to: 2423b41a30aaSmrg# XORG_WITH_XMLTO --with-xmlto 2424b41a30aaSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2425b41a30aaSmrg# XORG_WITH_DOXYGEN --with-doxygen 2426b41a30aaSmrg# XORG_WITH_FOP --with-fop 2427b41a30aaSmrg# XORG_WITH_GROFF --with-groff 2428b41a30aaSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2429b41a30aaSmrg# 2430b41a30aaSmrg# Interface to module: 2431b41a30aaSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2432b41a30aaSmrg# --enable-docs: 'yes' user instructs the module to generate docs 2433b41a30aaSmrg# 'no' user instructs the module not to generate docs 2434b41a30aaSmrg# parm1: specify the default value, yes or no. 2435b41a30aaSmrg# 2436b41a30aaSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2437b41a30aaSmrgm4_define([docs_default], m4_default([$1], [yes])) 2438b41a30aaSmrgAC_ARG_ENABLE(docs, 2439b41a30aaSmrg AS_HELP_STRING([--enable-docs], 2440b41a30aaSmrg [Enable building the documentation (default: ]docs_default[)]), 2441b41a30aaSmrg [build_docs=$enableval], [build_docs=]docs_default) 2442b41a30aaSmrgm4_undefine([docs_default]) 2443b41a30aaSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2444b41a30aaSmrgAC_MSG_CHECKING([whether to build documentation]) 2445b41a30aaSmrgAC_MSG_RESULT([$build_docs]) 2446b41a30aaSmrg]) # XORG_ENABLE_DOCS 2447a253d6aeSmrg 2448b41a30aaSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2449b41a30aaSmrg# ---------------- 2450b41a30aaSmrg# Minimum version: 1.6.0 2451b41a30aaSmrg# 2452b41a30aaSmrg# This macro enables a builder to skip all developer documentation. 2453b41a30aaSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2454b41a30aaSmrg# maximum flexibilty in controlling documentation building. 2455b41a30aaSmrg# Refer to: 2456b41a30aaSmrg# XORG_WITH_XMLTO --with-xmlto 2457b41a30aaSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2458b41a30aaSmrg# XORG_WITH_DOXYGEN --with-doxygen 2459b41a30aaSmrg# XORG_WITH_FOP --with-fop 2460b41a30aaSmrg# XORG_WITH_GROFF --with-groff 2461b41a30aaSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2462b41a30aaSmrg# 2463b41a30aaSmrg# Interface to module: 2464b41a30aaSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2465b41a30aaSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2466b41a30aaSmrg# 'no' user instructs the module not to generate developer docs 2467b41a30aaSmrg# parm1: specify the default value, yes or no. 2468b41a30aaSmrg# 2469b41a30aaSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2470b41a30aaSmrgm4_define([devel_default], m4_default([$1], [yes])) 2471b41a30aaSmrgAC_ARG_ENABLE(devel-docs, 2472b41a30aaSmrg AS_HELP_STRING([--enable-devel-docs], 2473b41a30aaSmrg [Enable building the developer documentation (default: ]devel_default[)]), 2474b41a30aaSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2475b41a30aaSmrgm4_undefine([devel_default]) 2476b41a30aaSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2477b41a30aaSmrgAC_MSG_CHECKING([whether to build developer documentation]) 2478b41a30aaSmrgAC_MSG_RESULT([$build_devel_docs]) 2479b41a30aaSmrg]) # XORG_ENABLE_DEVEL_DOCS 2480a253d6aeSmrg 2481b41a30aaSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 2482b41a30aaSmrg# ---------------- 2483b41a30aaSmrg# Minimum version: 1.6.0 2484b41a30aaSmrg# 2485b41a30aaSmrg# This macro enables a builder to skip all functional specification targets. 2486b41a30aaSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2487b41a30aaSmrg# maximum flexibilty in controlling documentation building. 2488b41a30aaSmrg# Refer to: 2489b41a30aaSmrg# XORG_WITH_XMLTO --with-xmlto 2490b41a30aaSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2491b41a30aaSmrg# XORG_WITH_DOXYGEN --with-doxygen 2492b41a30aaSmrg# XORG_WITH_FOP --with-fop 2493b41a30aaSmrg# XORG_WITH_GROFF --with-groff 2494b41a30aaSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2495b41a30aaSmrg# 2496b41a30aaSmrg# Interface to module: 2497b41a30aaSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2498b41a30aaSmrg# --enable-specs: 'yes' user instructs the module to generate specs 2499b41a30aaSmrg# 'no' user instructs the module not to generate specs 2500b41a30aaSmrg# parm1: specify the default value, yes or no. 2501b41a30aaSmrg# 2502b41a30aaSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2503b41a30aaSmrgm4_define([spec_default], m4_default([$1], [yes])) 2504b41a30aaSmrgAC_ARG_ENABLE(specs, 2505b41a30aaSmrg AS_HELP_STRING([--enable-specs], 2506b41a30aaSmrg [Enable building the specs (default: ]spec_default[)]), 2507b41a30aaSmrg [build_specs=$enableval], [build_specs=]spec_default) 2508b41a30aaSmrgm4_undefine([spec_default]) 2509b41a30aaSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2510b41a30aaSmrgAC_MSG_CHECKING([whether to build functional specifications]) 2511b41a30aaSmrgAC_MSG_RESULT([$build_specs]) 2512b41a30aaSmrg]) # XORG_ENABLE_SPECS 2513a253d6aeSmrg 2514b41a30aaSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2515b41a30aaSmrg# ---------------------------------------------- 2516b41a30aaSmrg# Minimum version: 1.13.0 2517b41a30aaSmrg# 2518b41a30aaSmrg# This macro enables a builder to enable/disable unit testing 2519b41a30aaSmrg# It makes no assumption about the test cases implementation 2520b41a30aaSmrg# Test cases may or may not use Automake "Support for test suites" 2521b41a30aaSmrg# They may or may not use the software utility library GLib 2522b41a30aaSmrg# 2523b41a30aaSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2524b41a30aaSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2525b41a30aaSmrg# The variable enable_unit_tests is used by other macros in this file. 2526b41a30aaSmrg# 2527b41a30aaSmrg# Interface to module: 2528b41a30aaSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2529b41a30aaSmrg# enable_unit_tests: used in configure.ac for additional configuration 2530b41a30aaSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2531b41a30aaSmrg# 'no' user instructs the module not to build tests 2532b41a30aaSmrg# parm1: specify the default value, yes or no. 2533b41a30aaSmrg# 2534b41a30aaSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2535b41a30aaSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2536b41a30aaSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2537b41a30aaSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2538b41a30aaSmrgm4_define([_defopt], m4_default([$1], [auto])) 2539b41a30aaSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2540b41a30aaSmrg [Enable building unit test cases (default: ]_defopt[)]), 2541b41a30aaSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2542b41a30aaSmrgm4_undefine([_defopt]) 2543b41a30aaSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2544b41a30aaSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2545b41a30aaSmrgAC_MSG_RESULT([$enable_unit_tests]) 2546b41a30aaSmrg]) # XORG_ENABLE_UNIT_TESTS 2547a253d6aeSmrg 2548b41a30aaSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2549b41a30aaSmrg# ------------------------------------------------------ 2550b41a30aaSmrg# Minimum version: 1.17.0 2551b41a30aaSmrg# 2552b41a30aaSmrg# This macro enables a builder to enable/disable integration testing 2553b41a30aaSmrg# It makes no assumption about the test cases' implementation 2554b41a30aaSmrg# Test cases may or may not use Automake "Support for test suites" 2555b41a30aaSmrg# 2556b41a30aaSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2557b41a30aaSmrg# usually requires less dependencies and may be built and run under less 2558b41a30aaSmrg# stringent environments than integration tests. 2559b41a30aaSmrg# 2560b41a30aaSmrg# Interface to module: 2561b41a30aaSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2562b41a30aaSmrg# enable_integration_tests: used in configure.ac for additional configuration 2563b41a30aaSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2564b41a30aaSmrg# 'no' user instructs the module not to build tests 2565b41a30aaSmrg# parm1: specify the default value, yes or no. 2566b41a30aaSmrg# 2567b41a30aaSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2568b41a30aaSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2569b41a30aaSmrgm4_define([_defopt], m4_default([$1], [auto])) 2570b41a30aaSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2571b41a30aaSmrg [Enable building integration test cases (default: ]_defopt[)]), 2572b41a30aaSmrg [enable_integration_tests=$enableval], 2573b41a30aaSmrg [enable_integration_tests=]_defopt) 2574b41a30aaSmrgm4_undefine([_defopt]) 2575b41a30aaSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2576b41a30aaSmrg [test "x$enable_integration_tests" != xno]) 2577b41a30aaSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2578b41a30aaSmrgAC_MSG_RESULT([$enable_integration_tests]) 2579b41a30aaSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 2580a253d6aeSmrg 2581b41a30aaSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2582b41a30aaSmrg# ---------------------------------------- 2583b41a30aaSmrg# Minimum version: 1.13.0 2584b41a30aaSmrg# 2585b41a30aaSmrg# GLib is a library which provides advanced data structures and functions. 2586b41a30aaSmrg# This macro enables a module to test for the presence of Glib. 2587b41a30aaSmrg# 2588b41a30aaSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2589b41a30aaSmrg# Otherwise the value of $enable_unit_tests is blank. 2590b41a30aaSmrg# 2591b41a30aaSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2592b41a30aaSmrg# test support usually requires less dependencies and may be built and run under 2593b41a30aaSmrg# less stringent environments than integration tests. 2594b41a30aaSmrg# 2595b41a30aaSmrg# Interface to module: 2596b41a30aaSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 2597b41a30aaSmrg# with_glib: used in configure.ac to know if GLib has been found 2598b41a30aaSmrg# --with-glib: 'yes' user instructs the module to use glib 2599b41a30aaSmrg# 'no' user instructs the module not to use glib 2600b41a30aaSmrg# 2601b41a30aaSmrgAC_DEFUN([XORG_WITH_GLIB],[ 2602b41a30aaSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2603b41a30aaSmrgm4_define([_defopt], m4_default([$2], [auto])) 2604b41a30aaSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2605b41a30aaSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 2606b41a30aaSmrg [with_glib=$withval], [with_glib=]_defopt) 2607b41a30aaSmrgm4_undefine([_defopt]) 260857ee1794Smrg 2609b41a30aaSmrghave_glib=no 2610b41a30aaSmrg# Do not probe GLib if user explicitly disabled unit testing 2611b41a30aaSmrgif test "x$enable_unit_tests" != x"no"; then 2612b41a30aaSmrg # Do not probe GLib if user explicitly disabled it 2613b41a30aaSmrg if test "x$with_glib" != x"no"; then 2614b41a30aaSmrg m4_ifval( 2615b41a30aaSmrg [$1], 2616b41a30aaSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2617b41a30aaSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2618b41a30aaSmrg ) 2619b41a30aaSmrg fi 2620b41a30aaSmrgfi 262157ee1794Smrg 2622b41a30aaSmrg# Not having GLib when unit testing has been explicitly requested is an error 2623b41a30aaSmrgif test "x$enable_unit_tests" = x"yes"; then 2624b41a30aaSmrg if test "x$have_glib" = x"no"; then 2625b41a30aaSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2626b41a30aaSmrg fi 2627b41a30aaSmrgfi 2628a253d6aeSmrg 2629b41a30aaSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 2630b41a30aaSmrgif test "x$enable_unit_tests" = x"no"; then 2631b41a30aaSmrg if test "x$with_glib" = x"yes"; then 2632b41a30aaSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 263306f32fbeSmrg fi 2634b41a30aaSmrgfi 2635ea133fd7Smrg 2636b41a30aaSmrg# Not having GLib when it has been explicitly requested is an error 2637b41a30aaSmrgif test "x$with_glib" = x"yes"; then 2638b41a30aaSmrg if test "x$have_glib" = x"no"; then 2639b41a30aaSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2640b41a30aaSmrg fi 2641b41a30aaSmrgfi 2642ea133fd7Smrg 2643b41a30aaSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2644b41a30aaSmrg]) # XORG_WITH_GLIB 2645ea133fd7Smrg 2646b41a30aaSmrg# XORG_LD_WRAP([required|optional]) 2647b41a30aaSmrg# --------------------------------- 2648b41a30aaSmrg# Minimum version: 1.13.0 2649b41a30aaSmrg# 2650b41a30aaSmrg# Check if linker supports -wrap, passed via compiler flags 2651b41a30aaSmrg# 2652b41a30aaSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2653b41a30aaSmrg# Otherwise the value of $enable_unit_tests is blank. 2654b41a30aaSmrg# 2655b41a30aaSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2656b41a30aaSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2657b41a30aaSmrg# available, an argument of "optional" allows use when some unit tests require 2658b41a30aaSmrg# ld -wrap and others do not. 2659b41a30aaSmrg# 2660b41a30aaSmrgAC_DEFUN([XORG_LD_WRAP],[ 2661b41a30aaSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2662b41a30aaSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 2663b41a30aaSmrg void __wrap_exit(int status) { return; }], 2664b41a30aaSmrg [exit(0);])]) 2665b41a30aaSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 2666b41a30aaSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2667b41a30aaSmrg if test "x$have_ld_wrap" = x"no"; then 2668b41a30aaSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2669b41a30aaSmrg fi 2670b41a30aaSmrgfi 2671b41a30aaSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2672b41a30aaSmrg# 2673b41a30aaSmrg]) # XORG_LD_WRAP 2674ea133fd7Smrg 2675b41a30aaSmrg# XORG_CHECK_LINKER_FLAGS 2676b41a30aaSmrg# ----------------------- 2677b41a30aaSmrg# SYNOPSIS 2678b41a30aaSmrg# 2679b41a30aaSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2680b41a30aaSmrg# 2681b41a30aaSmrg# DESCRIPTION 2682b41a30aaSmrg# 2683b41a30aaSmrg# Check whether the given linker FLAGS work with the current language's 2684b41a30aaSmrg# linker, or whether they give an error. 2685b41a30aaSmrg# 2686b41a30aaSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2687b41a30aaSmrg# success/failure. 2688b41a30aaSmrg# 2689b41a30aaSmrg# PROGRAM-SOURCE is the program source to link with, if needed 2690b41a30aaSmrg# 2691b41a30aaSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2692b41a30aaSmrg# 2693b41a30aaSmrg# LICENSE 2694b41a30aaSmrg# 2695b41a30aaSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2696b41a30aaSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2697b41a30aaSmrg# Copyright (c) 2009 Matteo Frigo 2698b41a30aaSmrg# 2699b41a30aaSmrg# This program is free software: you can redistribute it and/or modify it 2700b41a30aaSmrg# under the terms of the GNU General Public License as published by the 2701b41a30aaSmrg# Free Software Foundation, either version 3 of the License, or (at your 2702b41a30aaSmrg# option) any later version. 2703b41a30aaSmrg# 2704b41a30aaSmrg# This program is distributed in the hope that it will be useful, but 2705b41a30aaSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2706b41a30aaSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2707b41a30aaSmrg# Public License for more details. 2708b41a30aaSmrg# 2709b41a30aaSmrg# You should have received a copy of the GNU General Public License along 2710b41a30aaSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2711b41a30aaSmrg# 2712b41a30aaSmrg# As a special exception, the respective Autoconf Macro's copyright owner 2713b41a30aaSmrg# gives unlimited permission to copy, distribute and modify the configure 2714b41a30aaSmrg# scripts that are the output of Autoconf when processing the Macro. You 2715b41a30aaSmrg# need not follow the terms of the GNU General Public License when using 2716b41a30aaSmrg# or distributing such scripts, even though portions of the text of the 2717b41a30aaSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 2718b41a30aaSmrg# all other use of the material that constitutes the Autoconf Macro. 2719b41a30aaSmrg# 2720b41a30aaSmrg# This special exception to the GPL applies to versions of the Autoconf 2721b41a30aaSmrg# Macro released by the Autoconf Archive. When you make and distribute a 2722b41a30aaSmrg# modified version of the Autoconf Macro, you may extend this special 2723b41a30aaSmrg# exception to the GPL to apply to your modified version as well.# 2724b41a30aaSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2725b41a30aaSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2726b41a30aaSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2727b41a30aaSmrgAS_LITERAL_IF([$1], 2728b41a30aaSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2729b41a30aaSmrg ax_save_FLAGS=$LDFLAGS 2730b41a30aaSmrg LDFLAGS="$1" 2731b41a30aaSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2732b41a30aaSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2733b41a30aaSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2734b41a30aaSmrg LDFLAGS=$ax_save_FLAGS])], 2735b41a30aaSmrg [ax_save_FLAGS=$LDFLAGS 2736b41a30aaSmrg LDFLAGS="$1" 2737b41a30aaSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2738b41a30aaSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2739b41a30aaSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2740b41a30aaSmrg LDFLAGS=$ax_save_FLAGS]) 2741b41a30aaSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2742b41a30aaSmrgAC_MSG_RESULT($xorg_check_linker_flags) 2743b41a30aaSmrgif test "x$xorg_check_linker_flags" = xyes; then 2744b41a30aaSmrg m4_default([$2], :) 2745b41a30aaSmrgelse 2746b41a30aaSmrg m4_default([$3], :) 2747b41a30aaSmrgfi 2748b41a30aaSmrg]) # XORG_CHECK_LINKER_FLAGS 2749a253d6aeSmrg 2750b41a30aaSmrg# XORG_MEMORY_CHECK_FLAGS 2751b41a30aaSmrg# ----------------------- 2752b41a30aaSmrg# Minimum version: 1.16.0 2753b41a30aaSmrg# 2754b41a30aaSmrg# This macro attempts to find appropriate memory checking functionality 2755b41a30aaSmrg# for various platforms which unit testing code may use to catch various 2756b41a30aaSmrg# forms of memory allocation and access errors in testing. 2757b41a30aaSmrg# 2758b41a30aaSmrg# Interface to module: 2759b41a30aaSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2760b41a30aaSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2761b41a30aaSmrg# 2762b41a30aaSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2763b41a30aaSmrg# 2764b41a30aaSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2765a253d6aeSmrg 2766b41a30aaSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2767b41a30aaSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2768b41a30aaSmrg [Environment variables to enable memory checking in tests]) 2769a253d6aeSmrg 2770b41a30aaSmrg# Check for different types of support on different platforms 2771b41a30aaSmrgcase $host_os in 2772b41a30aaSmrg solaris*) 2773b41a30aaSmrg AC_CHECK_LIB([umem], [umem_alloc], 2774b41a30aaSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2775b41a30aaSmrg ;; 2776b41a30aaSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2777b41a30aaSmrg # both directly and inverted, so should not be 0 or 255. 2778b41a30aaSmrg malloc_debug_env='MALLOC_PERTURB_=15' 2779b41a30aaSmrg ;; 2780b41a30aaSmrg darwin*) 2781b41a30aaSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2782b41a30aaSmrg ;; 2783b41a30aaSmrg *bsd*) 2784b41a30aaSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2785b41a30aaSmrg ;; 2786b41a30aaSmrgesac 2787a253d6aeSmrg 2788b41a30aaSmrg# User supplied flags override default flags 2789b41a30aaSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2790b41a30aaSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 279131637056Smrgfi 2792a253d6aeSmrg 2793b41a30aaSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2794b41a30aaSmrg]) # XORG_WITH_LINT 2795a253d6aeSmrg 2796b41a30aaSmrg# XORG_CHECK_MALLOC_ZERO 2797b41a30aaSmrg# ---------------------- 2798b41a30aaSmrg# Minimum version: 1.0.0 2799b41a30aaSmrg# 2800b41a30aaSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2801b41a30aaSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 2802b41a30aaSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2803b41a30aaSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2804b41a30aaSmrgAC_ARG_ENABLE(malloc0returnsnull, 2805b41a30aaSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 2806b41a30aaSmrg [malloc(0) returns NULL (default: auto)]), 2807b41a30aaSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2808b41a30aaSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 280906f32fbeSmrg 2810b41a30aaSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2811b41a30aaSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2812b41a30aaSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2813b41a30aaSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2814b41a30aaSmrg#include <stdlib.h> 2815b41a30aaSmrg],[ 2816b41a30aaSmrg char *m0, *r0, *c0, *p; 2817b41a30aaSmrg m0 = malloc(0); 2818b41a30aaSmrg p = malloc(10); 2819b41a30aaSmrg r0 = realloc(p,0); 2820b41a30aaSmrg c0 = calloc(0,10); 2821b41a30aaSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2822b41a30aaSmrg])], 2823b41a30aaSmrg [xorg_cv_malloc0_returns_null=yes], 2824b41a30aaSmrg [xorg_cv_malloc0_returns_null=no])]) 2825b41a30aaSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2826b41a30aaSmrgfi 2827b41a30aaSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2828a253d6aeSmrg 2829b41a30aaSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2830b41a30aaSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2831b41a30aaSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2832b41a30aaSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 283331637056Smrgelse 2834b41a30aaSmrg MALLOC_ZERO_CFLAGS="" 2835b41a30aaSmrg XMALLOC_ZERO_CFLAGS="" 2836b41a30aaSmrg XTMALLOC_ZERO_CFLAGS="" 283731637056Smrgfi 2838a253d6aeSmrg 2839b41a30aaSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2840b41a30aaSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2841b41a30aaSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2842b41a30aaSmrg]) # XORG_CHECK_MALLOC_ZERO 2843a253d6aeSmrg 2844b41a30aaSmrg# XORG_WITH_LINT() 284531637056Smrg# ---------------- 2846b41a30aaSmrg# Minimum version: 1.1.0 2847b41a30aaSmrg# 2848b41a30aaSmrg# This macro enables the use of a tool that flags some suspicious and 2849b41a30aaSmrg# non-portable constructs (likely to be bugs) in C language source code. 2850b41a30aaSmrg# It will attempt to locate the tool and use appropriate options. 2851b41a30aaSmrg# There are various lint type tools on different platforms. 2852b41a30aaSmrg# 2853b41a30aaSmrg# Interface to module: 2854b41a30aaSmrg# LINT: returns the path to the tool found on the platform 2855b41a30aaSmrg# or the value set to LINT on the configure cmd line 2856b41a30aaSmrg# also an Automake conditional 2857b41a30aaSmrg# LINT_FLAGS: an Automake variable with appropriate flags 2858b41a30aaSmrg# 2859b41a30aaSmrg# --with-lint: 'yes' user instructs the module to use lint 2860b41a30aaSmrg# 'no' user instructs the module not to use lint (default) 2861b41a30aaSmrg# 2862b41a30aaSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2863b41a30aaSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2864b41a30aaSmrg# 2865b41a30aaSmrgAC_DEFUN([XORG_WITH_LINT],[ 2866a253d6aeSmrg 2867b41a30aaSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2868b41a30aaSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2869b41a30aaSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2870b41a30aaSmrg [Use a lint-style source code checker (default: disabled)])], 2871b41a30aaSmrg [use_lint=$withval], [use_lint=no]) 2872a253d6aeSmrg 2873b41a30aaSmrg# Obtain platform specific info like program name and options 2874b41a30aaSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2875b41a30aaSmrgcase $host_os in 2876b41a30aaSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2877b41a30aaSmrg lint_name=splint 2878b41a30aaSmrg lint_options="-badflag" 2879b41a30aaSmrg ;; 2880b41a30aaSmrg *freebsd* | *netbsd*) 2881b41a30aaSmrg lint_name=lint 2882b41a30aaSmrg lint_options="-u -b" 2883b41a30aaSmrg ;; 2884b41a30aaSmrg *solaris*) 2885b41a30aaSmrg lint_name=lint 2886b41a30aaSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2887b41a30aaSmrg ;; 2888b41a30aaSmrgesac 2889a253d6aeSmrg 2890b41a30aaSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2891b41a30aaSmrgif test "x$use_lint" = x"yes" ; then 2892b41a30aaSmrg AC_PATH_PROG([LINT], [$lint_name]) 2893b41a30aaSmrg if test "x$LINT" = "x"; then 2894b41a30aaSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2895b41a30aaSmrg fi 2896b41a30aaSmrgelif test "x$use_lint" = x"no" ; then 2897b41a30aaSmrg if test "x$LINT" != "x"; then 2898b41a30aaSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2899b41a30aaSmrg fi 290031637056Smrgelse 2901b41a30aaSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 290231637056Smrgfi 2903a253d6aeSmrg 2904b41a30aaSmrg# User supplied flags override default flags 2905b41a30aaSmrgif test "x$LINT_FLAGS" != "x"; then 2906b41a30aaSmrg lint_options=$LINT_FLAGS 290731637056Smrgfi 2908a253d6aeSmrg 2909b41a30aaSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2910b41a30aaSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2911a253d6aeSmrg 2912b41a30aaSmrg]) # XORG_WITH_LINT 2913b41a30aaSmrg 2914b41a30aaSmrg# XORG_LINT_LIBRARY(LIBNAME) 2915b41a30aaSmrg# -------------------------- 2916b41a30aaSmrg# Minimum version: 1.1.0 2917b41a30aaSmrg# 2918b41a30aaSmrg# Sets up flags for building lint libraries for checking programs that call 2919b41a30aaSmrg# functions in the library. 2920b41a30aaSmrg# 2921b41a30aaSmrg# Interface to module: 2922b41a30aaSmrg# LINTLIB - Automake variable with the name of lint library file to make 2923b41a30aaSmrg# MAKE_LINT_LIB - Automake conditional 2924b41a30aaSmrg# 2925b41a30aaSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2926b41a30aaSmrg# - 'no' user instructs the module not to create a lint library (default) 2927b41a30aaSmrg 2928b41a30aaSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2929b41a30aaSmrgAC_REQUIRE([XORG_WITH_LINT]) 2930b41a30aaSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2931b41a30aaSmrg [Create lint library (default: disabled)])], 2932b41a30aaSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2933b41a30aaSmrg 2934b41a30aaSmrgif test "x$make_lint_lib" = x"yes" ; then 2935b41a30aaSmrg LINTLIB=llib-l$1.ln 2936b41a30aaSmrg if test "x$LINT" = "x"; then 2937b41a30aaSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2938b41a30aaSmrg fi 2939b41a30aaSmrgelif test "x$make_lint_lib" != x"no" ; then 2940b41a30aaSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 294106f32fbeSmrgfi 2942a253d6aeSmrg 2943b41a30aaSmrgAC_SUBST(LINTLIB) 2944b41a30aaSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2945a253d6aeSmrg 2946b41a30aaSmrg]) # XORG_LINT_LIBRARY 2947a253d6aeSmrg 2948b41a30aaSmrg# XORG_COMPILER_BRAND 2949b41a30aaSmrg# ------------------- 2950b41a30aaSmrg# Minimum version: 1.14.0 2951b41a30aaSmrg# 2952b41a30aaSmrg# Checks for various brands of compilers and sets flags as appropriate: 2953b41a30aaSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2954b41a30aaSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 2955b41a30aaSmrg# clang compiler - sets CLANGCC to "yes" 2956b41a30aaSmrg# Intel compiler - sets INTELCC to "yes" 2957b41a30aaSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2958b41a30aaSmrg# 2959b41a30aaSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 2960b41a30aaSmrgAC_LANG_CASE( 2961b41a30aaSmrg [C], [ 2962b41a30aaSmrg AC_REQUIRE([AC_PROG_CC_C99]) 2963b41a30aaSmrg ], 2964b41a30aaSmrg [C++], [ 2965b41a30aaSmrg AC_REQUIRE([AC_PROG_CXX]) 2966b41a30aaSmrg ] 2967b41a30aaSmrg) 2968b41a30aaSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2969b41a30aaSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2970b41a30aaSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2971b41a30aaSmrg]) # XORG_COMPILER_BRAND 2972a253d6aeSmrg 2973b41a30aaSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2974b41a30aaSmrg# --------------- 2975b41a30aaSmrg# Minimum version: 1.16.0 2976b41a30aaSmrg# 2977b41a30aaSmrg# Test if the compiler works when passed the given flag as a command line argument. 2978b41a30aaSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 2979b41a30aaSmrg# next flag in the list until there are no more options. 2980b41a30aaSmrg# 2981b41a30aaSmrg# Note that this does not guarantee that the compiler supports the flag as some 2982b41a30aaSmrg# compilers will simply ignore arguments that they do not understand, but we do 2983b41a30aaSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 2984b41a30aaSmrg# -Werror=unused-command-line-argument 2985b41a30aaSmrg# 2986b41a30aaSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 2987b41a30aaSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2988b41a30aaSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2989a253d6aeSmrg 2990b41a30aaSmrgAC_LANG_COMPILER_REQUIRE 2991a253d6aeSmrg 2992b41a30aaSmrgAC_LANG_CASE( 2993b41a30aaSmrg [C], [ 2994b41a30aaSmrg AC_REQUIRE([AC_PROG_CC_C99]) 2995b41a30aaSmrg define([PREFIX], [C]) 2996b41a30aaSmrg define([CACHE_PREFIX], [cc]) 2997b41a30aaSmrg define([COMPILER], [$CC]) 2998b41a30aaSmrg ], 2999b41a30aaSmrg [C++], [ 3000b41a30aaSmrg define([PREFIX], [CXX]) 3001b41a30aaSmrg define([CACHE_PREFIX], [cxx]) 3002b41a30aaSmrg define([COMPILER], [$CXX]) 3003b41a30aaSmrg ] 3004b41a30aaSmrg) 3005a253d6aeSmrg 3006b41a30aaSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 300725b89263Smrg 3008b41a30aaSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3009b41a30aaSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3010b41a30aaSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3011b41a30aaSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3012b41a30aaSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3013b41a30aaSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3014b41a30aaSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3015b41a30aaSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3016b41a30aaSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3017b41a30aaSmrgfi 301825b89263Smrg 3019b41a30aaSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3020b41a30aaSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3021b41a30aaSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3022b41a30aaSmrg fi 3023b41a30aaSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3024b41a30aaSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3025b41a30aaSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3026b41a30aaSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3027b41a30aaSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3028b41a30aaSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3029b41a30aaSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3030b41a30aaSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3031b41a30aaSmrgfi 303225b89263Smrg 3033b41a30aaSmrgfound="no" 3034b41a30aaSmrgm4_foreach([flag], m4_cdr($@), [ 3035b41a30aaSmrg if test $found = "no" ; then 3036b41a30aaSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3037b41a30aaSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3038b41a30aaSmrg fi 303925b89263Smrg 3040b41a30aaSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3041b41a30aaSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3042b41a30aaSmrg fi 304325b89263Smrg 3044b41a30aaSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 304557ee1794Smrg 3046b41a30aaSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3047b41a30aaSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3048b41a30aaSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3049b41a30aaSmrg AC_CACHE_VAL($cacheid, 3050b41a30aaSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3051b41a30aaSmrg [eval $cacheid=yes], 3052b41a30aaSmrg [eval $cacheid=no])]) 305331637056Smrg 3054b41a30aaSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 305525b89263Smrg 3056b41a30aaSmrg eval supported=\$$cacheid 3057b41a30aaSmrg AC_MSG_RESULT([$supported]) 3058b41a30aaSmrg if test "$supported" = "yes" ; then 3059b41a30aaSmrg $1="$$1 ]flag[" 3060b41a30aaSmrg found="yes" 3061b41a30aaSmrg fi 3062b41a30aaSmrg fi 3063b41a30aaSmrg]) 3064b41a30aaSmrg]) # XORG_TESTSET_CFLAG 306525b89263Smrg 3066b41a30aaSmrg# XORG_COMPILER_FLAGS 3067b41a30aaSmrg# --------------- 3068b41a30aaSmrg# Minimum version: 1.16.0 3069b41a30aaSmrg# 3070b41a30aaSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3071b41a30aaSmrg# arguments supported by the selected compiler which do NOT alter the generated 3072b41a30aaSmrg# code. These arguments will cause the compiler to print various warnings 3073b41a30aaSmrg# during compilation AND turn a conservative set of warnings into errors. 3074b41a30aaSmrg# 3075b41a30aaSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3076b41a30aaSmrg# future versions of util-macros as options are added to new compilers. 3077b41a30aaSmrg# 3078b41a30aaSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 3079b41a30aaSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 308025b89263Smrg 3081b41a30aaSmrgAC_ARG_ENABLE(selective-werror, 3082b41a30aaSmrg AS_HELP_STRING([--disable-selective-werror], 3083b41a30aaSmrg [Turn off selective compiler errors. (default: enabled)]), 3084b41a30aaSmrg [SELECTIVE_WERROR=$enableval], 3085b41a30aaSmrg [SELECTIVE_WERROR=yes]) 308625b89263Smrg 3087b41a30aaSmrgAC_LANG_CASE( 3088b41a30aaSmrg [C], [ 3089b41a30aaSmrg define([PREFIX], [C]) 3090b41a30aaSmrg ], 3091b41a30aaSmrg [C++], [ 3092b41a30aaSmrg define([PREFIX], [CXX]) 3093b41a30aaSmrg ] 3094b41a30aaSmrg) 3095b41a30aaSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 3096b41a30aaSmrgif test "x$SUNCC" = "xyes"; then 3097b41a30aaSmrg [BASE_]PREFIX[FLAGS]="-v" 3098b41a30aaSmrgelse 3099b41a30aaSmrg [BASE_]PREFIX[FLAGS]="" 3100b41a30aaSmrgfi 310125b89263Smrg 3102b41a30aaSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3103b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3104b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3105b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3106b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 310725b89263Smrg 3108b41a30aaSmrgAC_LANG_CASE( 3109b41a30aaSmrg [C], [ 3110b41a30aaSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3111b41a30aaSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3112b41a30aaSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3113b41a30aaSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3114b41a30aaSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3115b41a30aaSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3116b41a30aaSmrg ] 3117b41a30aaSmrg) 311825b89263Smrg 3119b41a30aaSmrg# This chunk adds additional warnings that could catch undesired effects. 3120b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3121b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3122b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3123b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3124b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3125b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3126b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 312706f32fbeSmrg 3128b41a30aaSmrg# These are currently disabled because they are noisy. They will be enabled 3129b41a30aaSmrg# in the future once the codebase is sufficiently modernized to silence 3130b41a30aaSmrg# them. For now, I don't want them to drown out the other warnings. 3131b41a30aaSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3132b41a30aaSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3133b41a30aaSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 313406f32fbeSmrg 3135b41a30aaSmrg# Turn some warnings into errors, so we don't accidently get successful builds 3136b41a30aaSmrg# when there are problems that should be fixed. 313725b89263Smrg 3138b41a30aaSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 3139b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3140b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3141b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3142b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3143b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3144b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3145b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3146b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3147b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3148b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3149b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3150b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3151b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3152b41a30aaSmrgelse 3153b41a30aaSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 3154b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3155b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3156b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3157b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3158b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3159b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3160b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3161b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3162b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3163b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3164b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3165b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3166b41a30aaSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3167b41a30aaSmrgfi 316825b89263Smrg 3169b41a30aaSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3170b41a30aaSmrg]) # XORG_COMPILER_FLAGS 317125b89263Smrg 3172b41a30aaSmrg# XORG_CWARNFLAGS 3173b41a30aaSmrg# --------------- 3174b41a30aaSmrg# Minimum version: 1.2.0 3175b41a30aaSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3176b41a30aaSmrg# 3177b41a30aaSmrg# Defines CWARNFLAGS to enable C compiler warnings. 3178b41a30aaSmrg# 3179b41a30aaSmrg# This function is deprecated because it defines -fno-strict-aliasing 3180b41a30aaSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3181b41a30aaSmrg# is needed, then it should be added explicitly in the module when 3182b41a30aaSmrg# it is updated to use BASE_CFLAGS. 3183b41a30aaSmrg# 3184b41a30aaSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3185b41a30aaSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3186b41a30aaSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3187b41a30aaSmrgAC_LANG_CASE( 3188b41a30aaSmrg [C], [ 3189b41a30aaSmrg CWARNFLAGS="$BASE_CFLAGS" 3190b41a30aaSmrg if test "x$GCC" = xyes ; then 3191b41a30aaSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3192b41a30aaSmrg fi 3193b41a30aaSmrg AC_SUBST(CWARNFLAGS) 3194b41a30aaSmrg ] 3195b41a30aaSmrg) 3196b41a30aaSmrg]) # XORG_CWARNFLAGS 319725b89263Smrg 3198b41a30aaSmrg# XORG_STRICT_OPTION 3199b41a30aaSmrg# ----------------------- 3200b41a30aaSmrg# Minimum version: 1.3.0 3201b41a30aaSmrg# 3202b41a30aaSmrg# Add configure option to enable strict compilation flags, such as treating 3203b41a30aaSmrg# warnings as fatal errors. 3204b41a30aaSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3205b41a30aaSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3206b41a30aaSmrg# 3207b41a30aaSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3208b41a30aaSmrg# when strict compilation is unconditionally desired. 3209b41a30aaSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3210b41a30aaSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3211b41a30aaSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 321225b89263Smrg 3213b41a30aaSmrgAC_ARG_ENABLE(strict-compilation, 3214b41a30aaSmrg AS_HELP_STRING([--enable-strict-compilation], 3215b41a30aaSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3216b41a30aaSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 321725b89263Smrg 3218b41a30aaSmrgAC_LANG_CASE( 3219b41a30aaSmrg [C], [ 3220b41a30aaSmrg define([PREFIX], [C]) 3221b41a30aaSmrg ], 3222b41a30aaSmrg [C++], [ 3223b41a30aaSmrg define([PREFIX], [CXX]) 3224b41a30aaSmrg ] 3225b41a30aaSmrg) 322606f32fbeSmrg 3227b41a30aaSmrg[STRICT_]PREFIX[FLAGS]="" 3228b41a30aaSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3229b41a30aaSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 323025b89263Smrg 3231b41a30aaSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3232b41a30aaSmrg# activate it with -Werror, so we add it here explicitly. 3233b41a30aaSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 323425b89263Smrg 3235b41a30aaSmrgif test "x$STRICT_COMPILE" = "xyes"; then 3236b41a30aaSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3237b41a30aaSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3238b41a30aaSmrgfi 3239b41a30aaSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3240b41a30aaSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3241b41a30aaSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3242b41a30aaSmrg]) # XORG_STRICT_OPTION 324325b89263Smrg 3244b41a30aaSmrg# XORG_DEFAULT_OPTIONS 3245b41a30aaSmrg# -------------------- 3246b41a30aaSmrg# Minimum version: 1.3.0 3247b41a30aaSmrg# 3248b41a30aaSmrg# Defines default options for X.Org modules. 3249b41a30aaSmrg# 3250b41a30aaSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3251b41a30aaSmrgAC_REQUIRE([AC_PROG_INSTALL]) 3252b41a30aaSmrgXORG_COMPILER_FLAGS 3253b41a30aaSmrgXORG_CWARNFLAGS 3254b41a30aaSmrgXORG_STRICT_OPTION 3255b41a30aaSmrgXORG_RELEASE_VERSION 3256b41a30aaSmrgXORG_CHANGELOG 3257b41a30aaSmrgXORG_INSTALL 3258b41a30aaSmrgXORG_MANPAGE_SECTIONS 3259b41a30aaSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3260b41a30aaSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3261b41a30aaSmrg]) # XORG_DEFAULT_OPTIONS 326231637056Smrg 3263b41a30aaSmrg# XORG_INSTALL() 3264b41a30aaSmrg# ---------------- 3265b41a30aaSmrg# Minimum version: 1.4.0 3266b41a30aaSmrg# 3267b41a30aaSmrg# Defines the variable INSTALL_CMD as the command to copy 3268b41a30aaSmrg# INSTALL from $prefix/share/util-macros. 3269b41a30aaSmrg# 3270b41a30aaSmrgAC_DEFUN([XORG_INSTALL], [ 3271b41a30aaSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3272b41a30aaSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3273b41a30aaSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3274b41a30aaSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3275b41a30aaSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3276b41a30aaSmrgtouch \$(top_srcdir)/INSTALL; \ 3277b41a30aaSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3278b41a30aaSmrgAC_SUBST([INSTALL_CMD]) 3279b41a30aaSmrg]) # XORG_INSTALL 3280b41a30aaSmrgdnl Copyright 2005 Red Hat, Inc 3281b41a30aaSmrgdnl 3282b41a30aaSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3283b41a30aaSmrgdnl documentation for any purpose is hereby granted without fee, provided that 3284b41a30aaSmrgdnl the above copyright notice appear in all copies and that both that 3285b41a30aaSmrgdnl copyright notice and this permission notice appear in supporting 3286b41a30aaSmrgdnl documentation. 3287b41a30aaSmrgdnl 3288b41a30aaSmrgdnl The above copyright notice and this permission notice shall be included 3289b41a30aaSmrgdnl in all copies or substantial portions of the Software. 3290b41a30aaSmrgdnl 3291b41a30aaSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3292b41a30aaSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3293b41a30aaSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3294b41a30aaSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3295b41a30aaSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3296b41a30aaSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3297b41a30aaSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 3298b41a30aaSmrgdnl 3299b41a30aaSmrgdnl Except as contained in this notice, the name of the copyright holders shall 3300b41a30aaSmrgdnl not be used in advertising or otherwise to promote the sale, use or 3301b41a30aaSmrgdnl other dealings in this Software without prior written authorization 3302b41a30aaSmrgdnl from the copyright holders. 3303b41a30aaSmrgdnl 330425b89263Smrg 3305b41a30aaSmrg# XORG_RELEASE_VERSION 3306b41a30aaSmrg# -------------------- 3307b41a30aaSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 330825b89263Smrg 3309b41a30aaSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3310b41a30aaSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3311b41a30aaSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3312b41a30aaSmrg [Major version of this package]) 3313b41a30aaSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3314b41a30aaSmrg if test "x$PVM" = "x"; then 3315b41a30aaSmrg PVM="0" 3316b41a30aaSmrg fi 3317b41a30aaSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3318b41a30aaSmrg [$PVM], 3319b41a30aaSmrg [Minor version of this package]) 3320b41a30aaSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3321b41a30aaSmrg if test "x$PVP" = "x"; then 3322b41a30aaSmrg PVP="0" 3323b41a30aaSmrg fi 3324b41a30aaSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3325b41a30aaSmrg [$PVP], 3326b41a30aaSmrg [Patch version of this package]) 3327b41a30aaSmrg]) 3328a253d6aeSmrg 3329b41a30aaSmrg# XORG_CHANGELOG() 3330b41a30aaSmrg# ---------------- 3331b41a30aaSmrg# Minimum version: 1.2.0 3332b41a30aaSmrg# 3333b41a30aaSmrg# Defines the variable CHANGELOG_CMD as the command to generate 3334b41a30aaSmrg# ChangeLog from git. 3335b41a30aaSmrg# 3336b41a30aaSmrg# 3337b41a30aaSmrgAC_DEFUN([XORG_CHANGELOG], [ 3338b41a30aaSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3339b41a30aaSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3340b41a30aaSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3341b41a30aaSmrgtouch \$(top_srcdir)/ChangeLog; \ 3342b41a30aaSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3343b41a30aaSmrgAC_SUBST([CHANGELOG_CMD]) 3344b41a30aaSmrg]) # XORG_CHANGELOG 3345a253d6aeSmrg 3346b41a30aaSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3347b41a30aaSmrg# 3348b41a30aaSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3349b41a30aaSmrg# Foundation, Inc. 3350b41a30aaSmrg# Written by Gordon Matzigkeit, 1996 3351b41a30aaSmrg# 3352b41a30aaSmrg# This file is free software; the Free Software Foundation gives 3353b41a30aaSmrg# unlimited permission to copy and/or distribute it, with or without 3354b41a30aaSmrg# modifications, as long as this notice is preserved. 3355a253d6aeSmrg 3356b41a30aaSmrgm4_define([_LT_COPYING], [dnl 3357b41a30aaSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 3358b41a30aaSmrg# This is free software; see the source for copying conditions. There is NO 3359b41a30aaSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3360a253d6aeSmrg 3361b41a30aaSmrg# GNU Libtool is free software; you can redistribute it and/or modify 3362b41a30aaSmrg# it under the terms of the GNU General Public License as published by 3363b41a30aaSmrg# the Free Software Foundation; either version 2 of of the License, or 3364b41a30aaSmrg# (at your option) any later version. 3365b41a30aaSmrg# 3366b41a30aaSmrg# As a special exception to the GNU General Public License, if you 3367b41a30aaSmrg# distribute this file as part of a program or library that is built 3368b41a30aaSmrg# using GNU Libtool, you may include this file under the same 3369b41a30aaSmrg# distribution terms that you use for the rest of that program. 3370b41a30aaSmrg# 3371b41a30aaSmrg# GNU Libtool is distributed in the hope that it will be useful, but 3372b41a30aaSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3373b41a30aaSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3374b41a30aaSmrg# GNU General Public License for more details. 3375b41a30aaSmrg# 3376b41a30aaSmrg# You should have received a copy of the GNU General Public License 3377b41a30aaSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3378b41a30aaSmrg]) 3379a253d6aeSmrg 3380b41a30aaSmrg# serial 59 LT_INIT 3381a253d6aeSmrg 3382a253d6aeSmrg 3383b41a30aaSmrg# LT_PREREQ(VERSION) 3384b41a30aaSmrg# ------------------ 3385b41a30aaSmrg# Complain and exit if this libtool version is less that VERSION. 3386b41a30aaSmrgm4_defun([LT_PREREQ], 3387b41a30aaSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3388b41a30aaSmrg [m4_default([$3], 3389b41a30aaSmrg [m4_fatal([Libtool version $1 or higher is required], 3390b41a30aaSmrg 63)])], 3391b41a30aaSmrg [$2])]) 3392a253d6aeSmrg 3393a253d6aeSmrg 3394b41a30aaSmrg# _LT_CHECK_BUILDDIR 3395b41a30aaSmrg# ------------------ 3396b41a30aaSmrg# Complain if the absolute build directory name contains unusual characters 3397b41a30aaSmrgm4_defun([_LT_CHECK_BUILDDIR], 3398b41a30aaSmrg[case `pwd` in 3399b41a30aaSmrg *\ * | *\ *) 3400b41a30aaSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3401b41a30aaSmrgesac 3402b41a30aaSmrg]) 3403a253d6aeSmrg 3404a253d6aeSmrg 3405b41a30aaSmrg# LT_INIT([OPTIONS]) 3406b41a30aaSmrg# ------------------ 3407b41a30aaSmrgAC_DEFUN([LT_INIT], 3408b41a30aaSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3409b41a30aaSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3410b41a30aaSmrgAC_BEFORE([$0], [LT_LANG])dnl 3411b41a30aaSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 3412b41a30aaSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 3413b41a30aaSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 3414a253d6aeSmrg 3415b41a30aaSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 3416b41a30aaSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3417b41a30aaSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3418b41a30aaSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3419b41a30aaSmrgdnl unless we require an AC_DEFUNed macro: 3420b41a30aaSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 3421b41a30aaSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 3422b41a30aaSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 3423b41a30aaSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 3424b41a30aaSmrgm4_require([_LT_PROG_LTMAIN])dnl 342531637056Smrg 3426b41a30aaSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 342731637056Smrg 3428b41a30aaSmrgdnl Parse OPTIONS 3429b41a30aaSmrg_LT_SET_OPTIONS([$0], [$1]) 343031637056Smrg 3431b41a30aaSmrg# This can be used to rebuild libtool when needed 3432b41a30aaSmrgLIBTOOL_DEPS=$ltmain 343331637056Smrg 3434b41a30aaSmrg# Always use our own libtool. 3435b41a30aaSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 3436b41a30aaSmrgAC_SUBST(LIBTOOL)dnl 343731637056Smrg 3438b41a30aaSmrg_LT_SETUP 3439a253d6aeSmrg 3440b41a30aaSmrg# Only expand once: 3441b41a30aaSmrgm4_define([LT_INIT]) 3442b41a30aaSmrg])# LT_INIT 344331637056Smrg 344431637056Smrg# Old names: 3445b41a30aaSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3446b41a30aaSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 344731637056Smrgdnl aclocal-1.4 backwards compatibility: 3448b41a30aaSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3449b41a30aaSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 345031637056Smrg 345131637056Smrg 3452b41a30aaSmrg# _LT_PREPARE_CC_BASENAME 3453b41a30aaSmrg# ----------------------- 3454b41a30aaSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 3455b41a30aaSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3456b41a30aaSmrgfunc_cc_basename () 3457b41a30aaSmrg{ 3458b41a30aaSmrg for cc_temp in @S|@*""; do 3459b41a30aaSmrg case $cc_temp in 3460b41a30aaSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3461b41a30aaSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3462b41a30aaSmrg \-*) ;; 3463b41a30aaSmrg *) break;; 3464b41a30aaSmrg esac 3465b41a30aaSmrg done 3466b41a30aaSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3467b41a30aaSmrg} 3468b41a30aaSmrg])# _LT_PREPARE_CC_BASENAME 3469a253d6aeSmrg 347031637056Smrg 3471b41a30aaSmrg# _LT_CC_BASENAME(CC) 3472b41a30aaSmrg# ------------------- 3473b41a30aaSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3474b41a30aaSmrg# but that macro is also expanded into generated libtool script, which 3475b41a30aaSmrg# arranges for $SED and $ECHO to be set by different means. 3476b41a30aaSmrgm4_defun([_LT_CC_BASENAME], 3477b41a30aaSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3478b41a30aaSmrgAC_REQUIRE([_LT_DECL_SED])dnl 3479b41a30aaSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3480b41a30aaSmrgfunc_cc_basename $1 3481b41a30aaSmrgcc_basename=$func_cc_basename_result 3482b41a30aaSmrg]) 348331637056Smrg 348431637056Smrg 3485b41a30aaSmrg# _LT_FILEUTILS_DEFAULTS 348631637056Smrg# ---------------------- 3487b41a30aaSmrg# It is okay to use these file commands and assume they have been set 3488b41a30aaSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3489b41a30aaSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 3490b41a30aaSmrg[: ${CP="cp -f"} 3491b41a30aaSmrg: ${MV="mv -f"} 3492b41a30aaSmrg: ${RM="rm -f"} 3493b41a30aaSmrg])# _LT_FILEUTILS_DEFAULTS 349406f32fbeSmrg 349506f32fbeSmrg 3496b41a30aaSmrg# _LT_SETUP 3497b41a30aaSmrg# --------- 3498b41a30aaSmrgm4_defun([_LT_SETUP], 3499b41a30aaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3500b41a30aaSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3501b41a30aaSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3502b41a30aaSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 350331637056Smrg 3504b41a30aaSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3505b41a30aaSmrgdnl 3506b41a30aaSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 3507b41a30aaSmrg_LT_DECL([], [host], [0])dnl 3508b41a30aaSmrg_LT_DECL([], [host_os], [0])dnl 3509b41a30aaSmrgdnl 3510b41a30aaSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 3511b41a30aaSmrg_LT_DECL([], [build], [0])dnl 3512b41a30aaSmrg_LT_DECL([], [build_os], [0])dnl 3513b41a30aaSmrgdnl 3514b41a30aaSmrgAC_REQUIRE([AC_PROG_CC])dnl 3515b41a30aaSmrgAC_REQUIRE([LT_PATH_LD])dnl 3516b41a30aaSmrgAC_REQUIRE([LT_PATH_NM])dnl 3517b41a30aaSmrgdnl 3518b41a30aaSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 3519b41a30aaSmrgtest -z "$LN_S" && LN_S="ln -s" 3520b41a30aaSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3521b41a30aaSmrgdnl 3522b41a30aaSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 3523b41a30aaSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3524b41a30aaSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3525b41a30aaSmrgdnl 3526b41a30aaSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3527b41a30aaSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3528b41a30aaSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3529b41a30aaSmrgm4_require([_LT_CMD_RELOAD])dnl 3530b41a30aaSmrgm4_require([_LT_DECL_FILECMD])dnl 3531b41a30aaSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 3532b41a30aaSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3533b41a30aaSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 3534b41a30aaSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3535b41a30aaSmrgm4_require([_LT_WITH_SYSROOT])dnl 3536b41a30aaSmrgm4_require([_LT_CMD_TRUNCATE])dnl 353706f32fbeSmrg 3538b41a30aaSmrg_LT_CONFIG_LIBTOOL_INIT([ 3539b41a30aaSmrg# See if we are running on zsh, and set the options that allow our 3540b41a30aaSmrg# commands through without removal of \ escapes INIT. 3541b41a30aaSmrgif test -n "\${ZSH_VERSION+set}"; then 3542b41a30aaSmrg setopt NO_GLOB_SUBST 3543b41a30aaSmrgfi 3544b41a30aaSmrg]) 3545b41a30aaSmrgif test -n "${ZSH_VERSION+set}"; then 3546b41a30aaSmrg setopt NO_GLOB_SUBST 3547b41a30aaSmrgfi 354825b89263Smrg 3549b41a30aaSmrg_LT_CHECK_OBJDIR 355025b89263Smrg 3551b41a30aaSmrgm4_require([_LT_TAG_COMPILER])dnl 3552b41a30aaSmrg 3553b41a30aaSmrgcase $host_os in 3554b41a30aaSmrgaix3*) 3555b41a30aaSmrg # AIX sometimes has problems with the GCC collect2 program. For some 3556b41a30aaSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 3557b41a30aaSmrg # vanish in a puff of smoke. 3558b41a30aaSmrg if test set != "${COLLECT_NAMES+set}"; then 3559b41a30aaSmrg COLLECT_NAMES= 3560b41a30aaSmrg export COLLECT_NAMES 356125b89263Smrg fi 356225b89263Smrg ;; 3563b41a30aaSmrgesac 3564a253d6aeSmrg 3565b41a30aaSmrg# Global variables: 3566b41a30aaSmrgofile=libtool 3567b41a30aaSmrgcan_build_shared=yes 3568ea133fd7Smrg 3569b41a30aaSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 3570b41a30aaSmrg# ICC, which need '.lib'). 3571b41a30aaSmrglibext=a 357225b89263Smrg 3573b41a30aaSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 357425b89263Smrg 3575b41a30aaSmrgold_CC=$CC 3576b41a30aaSmrgold_CFLAGS=$CFLAGS 357725b89263Smrg 3578b41a30aaSmrg# Set sane defaults for various variables 3579b41a30aaSmrgtest -z "$CC" && CC=cc 3580b41a30aaSmrgtest -z "$LTCC" && LTCC=$CC 3581b41a30aaSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3582b41a30aaSmrgtest -z "$LD" && LD=ld 3583b41a30aaSmrgtest -z "$ac_objext" && ac_objext=o 3584ea133fd7Smrg 3585b41a30aaSmrg_LT_CC_BASENAME([$compiler]) 3586b41a30aaSmrg 3587b41a30aaSmrg# Only perform the check for file, if the check method requires it 3588b41a30aaSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 3589b41a30aaSmrgcase $deplibs_check_method in 3590b41a30aaSmrgfile_magic*) 3591b41a30aaSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3592b41a30aaSmrg _LT_PATH_MAGIC 359331637056Smrg fi 359431637056Smrg ;; 3595b41a30aaSmrgesac 359625b89263Smrg 3597b41a30aaSmrg# Use C for the default configuration in the libtool script 3598b41a30aaSmrgLT_SUPPORTED_TAG([CC]) 3599b41a30aaSmrg_LT_LANG_C_CONFIG 3600b41a30aaSmrg_LT_LANG_DEFAULT_CONFIG 3601b41a30aaSmrg_LT_CONFIG_COMMANDS 3602b41a30aaSmrg])# _LT_SETUP 360325b89263Smrg 3604ea133fd7Smrg 3605b41a30aaSmrg# _LT_PREPARE_SED_QUOTE_VARS 3606b41a30aaSmrg# -------------------------- 3607b41a30aaSmrg# Define a few sed substitution that help us do robust quoting. 3608b41a30aaSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3609b41a30aaSmrg[# Backslashify metacharacters that are still active within 3610b41a30aaSmrg# double-quoted strings. 3611b41a30aaSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3612a253d6aeSmrg 3613b41a30aaSmrg# Same as above, but do not quote variable references. 3614b41a30aaSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 3615a253d6aeSmrg 3616b41a30aaSmrg# Sed substitution to delay expansion of an escaped shell variable in a 3617b41a30aaSmrg# double_quote_subst'ed string. 3618b41a30aaSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3619a253d6aeSmrg 3620b41a30aaSmrg# Sed substitution to delay expansion of an escaped single quote. 3621b41a30aaSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 362225b89263Smrg 3623b41a30aaSmrg# Sed substitution to avoid accidental globbing in evaled expressions 3624b41a30aaSmrgno_glob_subst='s/\*/\\\*/g' 3625b41a30aaSmrg]) 362606f32fbeSmrg 3627b41a30aaSmrg# _LT_PROG_LTMAIN 3628b41a30aaSmrg# --------------- 3629b41a30aaSmrg# Note that this code is called both from 'configure', and 'config.status' 3630b41a30aaSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3631b41a30aaSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3632b41a30aaSmrg# so we pass a copy along to make sure it has a sensible value anyway. 3633b41a30aaSmrgm4_defun([_LT_PROG_LTMAIN], 3634b41a30aaSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3635b41a30aaSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3636b41a30aaSmrgltmain=$ac_aux_dir/ltmain.sh 3637b41a30aaSmrg])# _LT_PROG_LTMAIN 363806f32fbeSmrg 363931637056Smrg 364006f32fbeSmrg 3641b41a30aaSmrg# So that we can recreate a full libtool script including additional 3642b41a30aaSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3643b41a30aaSmrg# in macros and then make a single call at the end using the 'libtool' 3644b41a30aaSmrg# label. 364506f32fbeSmrg 3646a253d6aeSmrg 3647b41a30aaSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3648b41a30aaSmrg# ---------------------------------------- 3649b41a30aaSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3650b41a30aaSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3651b41a30aaSmrg[m4_ifval([$1], 3652b41a30aaSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3653b41a30aaSmrg [$1 3654b41a30aaSmrg])])]) 3655a253d6aeSmrg 3656b41a30aaSmrg# Initialize. 3657b41a30aaSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 365825b89263Smrg 3659a253d6aeSmrg 3660b41a30aaSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3661b41a30aaSmrg# ------------------------------ 3662b41a30aaSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3663b41a30aaSmrgm4_define([_LT_CONFIG_LIBTOOL], 3664b41a30aaSmrg[m4_ifval([$1], 3665b41a30aaSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3666b41a30aaSmrg [$1 3667b41a30aaSmrg])])]) 3668a253d6aeSmrg 3669b41a30aaSmrg# Initialize. 3670b41a30aaSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 367106f32fbeSmrg 3672b41a30aaSmrg 3673b41a30aaSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3674b41a30aaSmrg# ----------------------------------------------------- 3675b41a30aaSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3676b41a30aaSmrg[_LT_CONFIG_LIBTOOL([$1]) 3677b41a30aaSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 367806f32fbeSmrg]) 367906f32fbeSmrg 368006f32fbeSmrg 3681b41a30aaSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3682b41a30aaSmrg# ----------------------------- 3683b41a30aaSmrg# Add leading comment marks to the start of each line, and a trailing 3684b41a30aaSmrg# full-stop to the whole comment if one is not present already. 3685b41a30aaSmrgm4_define([_LT_FORMAT_COMMENT], 3686b41a30aaSmrg[m4_ifval([$1], [ 3687b41a30aaSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3688b41a30aaSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3689b41a30aaSmrg)]) 369006f32fbeSmrg 369106f32fbeSmrg 3692a253d6aeSmrg 369325b89263Smrg 3694ea133fd7Smrg 3695b41a30aaSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3696b41a30aaSmrg# ------------------------------------------------------------------- 3697b41a30aaSmrg# CONFIGNAME is the name given to the value in the libtool script. 3698b41a30aaSmrg# VARNAME is the (base) name used in the configure script. 3699b41a30aaSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3700b41a30aaSmrg# VARNAME. Any other value will be used directly. 3701b41a30aaSmrgm4_define([_LT_DECL], 3702b41a30aaSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3703b41a30aaSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3704b41a30aaSmrg [m4_ifval([$1], [$1], [$2])]) 3705b41a30aaSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3706b41a30aaSmrg m4_ifval([$4], 3707b41a30aaSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3708b41a30aaSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3709b41a30aaSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3710b41a30aaSmrg]) 3711a253d6aeSmrg 3712a253d6aeSmrg 3713b41a30aaSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3714b41a30aaSmrg# -------------------------------------------------------- 3715b41a30aaSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3716ea133fd7Smrg 3717ea133fd7Smrg 3718b41a30aaSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3719b41a30aaSmrg# ------------------------------------------------ 3720b41a30aaSmrgm4_define([lt_decl_tag_varnames], 3721b41a30aaSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3722ea133fd7Smrg 3723ea133fd7Smrg 3724b41a30aaSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3725b41a30aaSmrg# --------------------------------------------------------- 3726b41a30aaSmrgm4_define([_lt_decl_filter], 3727b41a30aaSmrg[m4_case([$#], 3728b41a30aaSmrg [0], [m4_fatal([$0: too few arguments: $#])], 3729b41a30aaSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3730b41a30aaSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3731b41a30aaSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3732b41a30aaSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3733b41a30aaSmrg]) 3734ea133fd7Smrg 3735a253d6aeSmrg 3736b41a30aaSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3737b41a30aaSmrg# -------------------------------------------------- 3738b41a30aaSmrgm4_define([lt_decl_quote_varnames], 3739b41a30aaSmrg[_lt_decl_filter([value], [1], $@)]) 3740a253d6aeSmrg 3741a253d6aeSmrg 3742b41a30aaSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3743b41a30aaSmrg# --------------------------------------------------- 3744b41a30aaSmrgm4_define([lt_decl_dquote_varnames], 3745b41a30aaSmrg[_lt_decl_filter([value], [2], $@)]) 3746a253d6aeSmrg 3747a253d6aeSmrg 3748b41a30aaSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3749b41a30aaSmrg# --------------------------------------------------- 3750b41a30aaSmrgm4_define([lt_decl_varnames_tagged], 3751b41a30aaSmrg[m4_assert([$# <= 2])dnl 3752b41a30aaSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 3753b41a30aaSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3754b41a30aaSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3755b41a30aaSmrgm4_define([_lt_decl_varnames_tagged], 3756b41a30aaSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3757a253d6aeSmrg 3758a253d6aeSmrg 3759b41a30aaSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3760b41a30aaSmrg# ------------------------------------------------ 3761b41a30aaSmrgm4_define([lt_decl_all_varnames], 3762b41a30aaSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3763b41a30aaSmrg m4_if([$2], [], 3764b41a30aaSmrg m4_quote(lt_decl_varnames), 3765b41a30aaSmrg m4_quote(m4_shift($@))))[]dnl 3766b41a30aaSmrg]) 3767b41a30aaSmrgm4_define([_lt_decl_all_varnames], 3768b41a30aaSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 3769b41a30aaSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3770b41a30aaSmrg]) 3771ea133fd7Smrg 3772a253d6aeSmrg 3773b41a30aaSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3774b41a30aaSmrg# ------------------------------------ 3775b41a30aaSmrg# Quote a variable value, and forward it to 'config.status' so that its 3776b41a30aaSmrg# declaration there will have the same value as in 'configure'. VARNAME 3777b41a30aaSmrg# must have a single quote delimited value for this to work. 3778b41a30aaSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3779b41a30aaSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3780a253d6aeSmrg 3781a253d6aeSmrg 3782b41a30aaSmrg# _LT_CONFIG_STATUS_DECLARATIONS 3783b41a30aaSmrg# ------------------------------ 3784b41a30aaSmrg# We delimit libtool config variables with single quotes, so when 3785b41a30aaSmrg# we write them to config.status, we have to be sure to quote all 3786b41a30aaSmrg# embedded single quotes properly. In configure, this macro expands 3787b41a30aaSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3788b41a30aaSmrg# 3789b41a30aaSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3790b41a30aaSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3791b41a30aaSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3792b41a30aaSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3793ea133fd7Smrg 3794a253d6aeSmrg 3795b41a30aaSmrg# _LT_LIBTOOL_TAGS 3796b41a30aaSmrg# ---------------- 3797b41a30aaSmrg# Output comment and list of tags supported by the script 3798b41a30aaSmrgm4_defun([_LT_LIBTOOL_TAGS], 3799b41a30aaSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3800b41a30aaSmrgavailable_tags='_LT_TAGS'dnl 3801b41a30aaSmrg]) 3802a253d6aeSmrg 380306f32fbeSmrg 3804b41a30aaSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3805b41a30aaSmrg# ----------------------------------- 3806b41a30aaSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3807b41a30aaSmrg# expand to a commented shell variable setting: 3808b41a30aaSmrg# 3809b41a30aaSmrg# # Some comment about what VAR is for. 3810b41a30aaSmrg# visible_name=$lt_internal_name 3811b41a30aaSmrgm4_define([_LT_LIBTOOL_DECLARE], 3812b41a30aaSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3813b41a30aaSmrg [description])))[]dnl 3814b41a30aaSmrgm4_pushdef([_libtool_name], 3815b41a30aaSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3816b41a30aaSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3817b41a30aaSmrg [0], [_libtool_name=[$]$1], 3818b41a30aaSmrg [1], [_libtool_name=$lt_[]$1], 3819b41a30aaSmrg [2], [_libtool_name=$lt_[]$1], 3820b41a30aaSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3821b41a30aaSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3822b41a30aaSmrg]) 3823ea133fd7Smrg 3824ea133fd7Smrg 3825b41a30aaSmrg# _LT_LIBTOOL_CONFIG_VARS 3826b41a30aaSmrg# ----------------------- 3827b41a30aaSmrg# Produce commented declarations of non-tagged libtool config variables 3828b41a30aaSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3829b41a30aaSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3830b41a30aaSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 3831b41a30aaSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 3832b41a30aaSmrg[m4_foreach([_lt_var], 3833b41a30aaSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3834b41a30aaSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3835a253d6aeSmrg 3836ea133fd7Smrg 3837b41a30aaSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 3838b41a30aaSmrg# ------------------------- 3839b41a30aaSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 3840b41a30aaSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3841b41a30aaSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3842a253d6aeSmrg 3843a253d6aeSmrg 3844b41a30aaSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 3845b41a30aaSmrg# ------------------------------ 3846b41a30aaSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3847a253d6aeSmrg 384806f32fbeSmrg 3849b41a30aaSmrg# _LT_CONFIG_COMMANDS 3850b41a30aaSmrg# ------------------- 3851b41a30aaSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3852b41a30aaSmrg# variables for single and double quote escaping we saved from calls 3853b41a30aaSmrg# to _LT_DECL, we can put quote escaped variables declarations 3854b41a30aaSmrg# into 'config.status', and then the shell code to quote escape them in 3855b41a30aaSmrg# for loops in 'config.status'. Finally, any additional code accumulated 3856b41a30aaSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3857b41a30aaSmrgm4_defun([_LT_CONFIG_COMMANDS], 3858b41a30aaSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3859b41a30aaSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3860b41a30aaSmrg dnl instead of duplicating it all over again into config.status, 3861b41a30aaSmrg dnl then we will have config.status run $CONFIG_LT later, so it 3862b41a30aaSmrg dnl needs to know what name is stored there: 3863b41a30aaSmrg [AC_CONFIG_COMMANDS([libtool], 3864b41a30aaSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3865b41a30aaSmrg dnl If the libtool generation code is destined for config.status, 3866b41a30aaSmrg dnl expand the accumulated commands and init code now: 3867b41a30aaSmrg [AC_CONFIG_COMMANDS([libtool], 3868b41a30aaSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3869b41a30aaSmrg])#_LT_CONFIG_COMMANDS 3870a253d6aeSmrg 3871a253d6aeSmrg 3872b41a30aaSmrg# Initialize. 3873b41a30aaSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3874b41a30aaSmrg[ 3875a253d6aeSmrg 3876b41a30aaSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3877b41a30aaSmrg# if CDPATH is set. 3878b41a30aaSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3879a253d6aeSmrg 3880b41a30aaSmrgsed_quote_subst='$sed_quote_subst' 3881b41a30aaSmrgdouble_quote_subst='$double_quote_subst' 3882b41a30aaSmrgdelay_variable_subst='$delay_variable_subst' 3883b41a30aaSmrg_LT_CONFIG_STATUS_DECLARATIONS 3884b41a30aaSmrgLTCC='$LTCC' 3885b41a30aaSmrgLTCFLAGS='$LTCFLAGS' 3886b41a30aaSmrgcompiler='$compiler_DEFAULT' 3887ea133fd7Smrg 3888b41a30aaSmrg# A function that is used when there is no print builtin or printf. 3889b41a30aaSmrgfunc_fallback_echo () 3890b41a30aaSmrg{ 3891b41a30aaSmrg eval 'cat <<_LTECHO_EOF 3892b41a30aaSmrg\$[]1 3893b41a30aaSmrg_LTECHO_EOF' 3894b41a30aaSmrg} 3895a253d6aeSmrg 3896b41a30aaSmrg# Quote evaled strings. 3897b41a30aaSmrgfor var in lt_decl_all_varnames([[ \ 3898b41a30aaSmrg]], lt_decl_quote_varnames); do 3899b41a30aaSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3900b41a30aaSmrg *[[\\\\\\\`\\"\\\$]]*) 3901b41a30aaSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 390225b89263Smrg ;; 3903b41a30aaSmrg *) 3904b41a30aaSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 390525b89263Smrg ;; 3906b41a30aaSmrg esac 3907b41a30aaSmrgdone 3908b41a30aaSmrg 3909b41a30aaSmrg# Double-quote double-evaled strings. 3910b41a30aaSmrgfor var in lt_decl_all_varnames([[ \ 3911b41a30aaSmrg]], lt_decl_dquote_varnames); do 3912b41a30aaSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3913b41a30aaSmrg *[[\\\\\\\`\\"\\\$]]*) 3914b41a30aaSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 391525b89263Smrg ;; 391625b89263Smrg *) 3917b41a30aaSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 391825b89263Smrg ;; 391925b89263Smrg esac 3920b41a30aaSmrgdone 3921a253d6aeSmrg 3922b41a30aaSmrg_LT_OUTPUT_LIBTOOL_INIT 3923b41a30aaSmrg]) 3924a253d6aeSmrg 3925b41a30aaSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3926b41a30aaSmrg# ------------------------------------ 3927b41a30aaSmrg# Generate a child script FILE with all initialization necessary to 3928b41a30aaSmrg# reuse the environment learned by the parent script, and make the 3929b41a30aaSmrg# file executable. If COMMENT is supplied, it is inserted after the 3930b41a30aaSmrg# '#!' sequence but before initialization text begins. After this 3931b41a30aaSmrg# macro, additional text can be appended to FILE to form the body of 3932b41a30aaSmrg# the child script. The macro ends with non-zero status if the 3933b41a30aaSmrg# file could not be fully written (such as if the disk is full). 3934b41a30aaSmrgm4_ifdef([AS_INIT_GENERATED], 3935b41a30aaSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3936b41a30aaSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 3937b41a30aaSmrg[m4_require([AS_PREPARE])]dnl 3938b41a30aaSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3939b41a30aaSmrg[lt_write_fail=0 3940b41a30aaSmrgcat >$1 <<_ASEOF || lt_write_fail=1 3941b41a30aaSmrg#! $SHELL 3942b41a30aaSmrg# Generated by $as_me. 3943b41a30aaSmrg$2 3944b41a30aaSmrgSHELL=\${CONFIG_SHELL-$SHELL} 3945b41a30aaSmrgexport SHELL 3946b41a30aaSmrg_ASEOF 3947b41a30aaSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 3948b41a30aaSmrgAS_SHELL_SANITIZE 3949b41a30aaSmrg_AS_PREPARE 3950b41a30aaSmrgexec AS_MESSAGE_FD>&1 3951b41a30aaSmrg_ASEOF 3952b41a30aaSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 3953b41a30aaSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 3954ea133fd7Smrg 3955b41a30aaSmrg# LT_OUTPUT 3956b41a30aaSmrg# --------- 3957b41a30aaSmrg# This macro allows early generation of the libtool script (before 3958b41a30aaSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 3959b41a30aaSmrg# tests. 3960b41a30aaSmrgAC_DEFUN([LT_OUTPUT], 3961b41a30aaSmrg[: ${CONFIG_LT=./config.lt} 3962b41a30aaSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 3963b41a30aaSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3964b41a30aaSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 3965ea133fd7Smrg 3966b41a30aaSmrgcat >>"$CONFIG_LT" <<\_LTEOF 3967b41a30aaSmrglt_cl_silent=false 3968b41a30aaSmrgexec AS_MESSAGE_LOG_FD>>config.log 3969b41a30aaSmrg{ 3970b41a30aaSmrg echo 3971b41a30aaSmrg AS_BOX([Running $as_me.]) 3972b41a30aaSmrg} >&AS_MESSAGE_LOG_FD 3973ea133fd7Smrg 3974b41a30aaSmrglt_cl_help="\ 3975b41a30aaSmrg'$as_me' creates a local libtool stub from the current configuration, 3976b41a30aaSmrgfor use in further configure time tests before the real libtool is 3977b41a30aaSmrggenerated. 3978a253d6aeSmrg 3979b41a30aaSmrgUsage: $[0] [[OPTIONS]] 3980a253d6aeSmrg 3981b41a30aaSmrg -h, --help print this help, then exit 3982b41a30aaSmrg -V, --version print version number, then exit 3983b41a30aaSmrg -q, --quiet do not print progress messages 3984b41a30aaSmrg -d, --debug don't remove temporary files 3985a253d6aeSmrg 3986b41a30aaSmrgReport bugs to <bug-libtool@gnu.org>." 3987ea133fd7Smrg 3988b41a30aaSmrglt_cl_version="\ 3989b41a30aaSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3990b41a30aaSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3991b41a30aaSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 3992a253d6aeSmrg 3993b41a30aaSmrgCopyright (C) 2011 Free Software Foundation, Inc. 3994b41a30aaSmrgThis config.lt script is free software; the Free Software Foundation 3995b41a30aaSmrggives unlimited permision to copy, distribute and modify it." 3996a253d6aeSmrg 3997b41a30aaSmrgwhile test 0 != $[#] 3998b41a30aaSmrgdo 3999b41a30aaSmrg case $[1] in 4000b41a30aaSmrg --version | --v* | -V ) 4001b41a30aaSmrg echo "$lt_cl_version"; exit 0 ;; 4002b41a30aaSmrg --help | --h* | -h ) 4003b41a30aaSmrg echo "$lt_cl_help"; exit 0 ;; 4004b41a30aaSmrg --debug | --d* | -d ) 4005b41a30aaSmrg debug=: ;; 4006b41a30aaSmrg --quiet | --q* | --silent | --s* | -q ) 4007b41a30aaSmrg lt_cl_silent=: ;; 4008a253d6aeSmrg 4009b41a30aaSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4010b41a30aaSmrgTry '$[0] --help' for more information.]) ;; 4011ea133fd7Smrg 4012b41a30aaSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4013b41a30aaSmrgTry '$[0] --help' for more information.]) ;; 4014b41a30aaSmrg esac 4015b41a30aaSmrg shift 4016b41a30aaSmrgdone 4017ea133fd7Smrg 4018b41a30aaSmrgif $lt_cl_silent; then 4019b41a30aaSmrg exec AS_MESSAGE_FD>/dev/null 4020b41a30aaSmrgfi 4021b41a30aaSmrg_LTEOF 4022ea133fd7Smrg 4023b41a30aaSmrgcat >>"$CONFIG_LT" <<_LTEOF 4024b41a30aaSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4025b41a30aaSmrg_LTEOF 4026a253d6aeSmrg 4027b41a30aaSmrgcat >>"$CONFIG_LT" <<\_LTEOF 4028b41a30aaSmrgAC_MSG_NOTICE([creating $ofile]) 4029b41a30aaSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 4030b41a30aaSmrgAS_EXIT(0) 4031b41a30aaSmrg_LTEOF 4032b41a30aaSmrgchmod +x "$CONFIG_LT" 4033a253d6aeSmrg 4034b41a30aaSmrg# configure is writing to config.log, but config.lt does its own redirection, 4035b41a30aaSmrg# appending to config.log, which fails on DOS, as config.log is still kept 4036b41a30aaSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4037b41a30aaSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4038b41a30aaSmrglt_cl_success=: 4039b41a30aaSmrgtest yes = "$silent" && 4040b41a30aaSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 4041b41a30aaSmrgexec AS_MESSAGE_LOG_FD>/dev/null 4042b41a30aaSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4043b41a30aaSmrgexec AS_MESSAGE_LOG_FD>>config.log 4044b41a30aaSmrg$lt_cl_success || AS_EXIT(1) 4045b41a30aaSmrg])# LT_OUTPUT 4046a253d6aeSmrg 4047a253d6aeSmrg 4048b41a30aaSmrg# _LT_CONFIG(TAG) 4049b41a30aaSmrg# --------------- 4050b41a30aaSmrg# If TAG is the built-in tag, create an initial libtool script with a 4051b41a30aaSmrg# default configuration from the untagged config vars. Otherwise add code 4052b41a30aaSmrg# to config.status for appending the configuration named by TAG from the 4053b41a30aaSmrg# matching tagged config vars. 4054b41a30aaSmrgm4_defun([_LT_CONFIG], 4055b41a30aaSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4056b41a30aaSmrg_LT_CONFIG_SAVE_COMMANDS([ 4057b41a30aaSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4058b41a30aaSmrg m4_if(_LT_TAG, [C], [ 4059b41a30aaSmrg # See if we are running on zsh, and set the options that allow our 4060b41a30aaSmrg # commands through without removal of \ escapes. 4061b41a30aaSmrg if test -n "${ZSH_VERSION+set}"; then 4062b41a30aaSmrg setopt NO_GLOB_SUBST 4063b41a30aaSmrg fi 4064a253d6aeSmrg 4065b41a30aaSmrg cfgfile=${ofile}T 4066b41a30aaSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4067b41a30aaSmrg $RM "$cfgfile" 4068a253d6aeSmrg 4069b41a30aaSmrg cat <<_LT_EOF >> "$cfgfile" 4070b41a30aaSmrg#! $SHELL 4071b41a30aaSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4072b41a30aaSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4073b41a30aaSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4074a253d6aeSmrg 4075b41a30aaSmrg# Provide generalized library-building support services. 4076b41a30aaSmrg# Written by Gordon Matzigkeit, 1996 4077a253d6aeSmrg 4078b41a30aaSmrg_LT_COPYING 4079b41a30aaSmrg_LT_LIBTOOL_TAGS 4080ea133fd7Smrg 4081b41a30aaSmrg# Configured defaults for sys_lib_dlsearch_path munging. 4082b41a30aaSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4083ea133fd7Smrg 4084b41a30aaSmrg# ### BEGIN LIBTOOL CONFIG 4085b41a30aaSmrg_LT_LIBTOOL_CONFIG_VARS 4086b41a30aaSmrg_LT_LIBTOOL_TAG_VARS 4087b41a30aaSmrg# ### END LIBTOOL CONFIG 4088ea133fd7Smrg 4089b41a30aaSmrg_LT_EOF 4090ea133fd7Smrg 4091b41a30aaSmrg cat <<'_LT_EOF' >> "$cfgfile" 4092a253d6aeSmrg 4093b41a30aaSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4094a253d6aeSmrg 4095b41a30aaSmrg_LT_PREPARE_MUNGE_PATH_LIST 4096b41a30aaSmrg_LT_PREPARE_CC_BASENAME 4097a253d6aeSmrg 4098b41a30aaSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 4099a253d6aeSmrg 4100b41a30aaSmrg_LT_EOF 410125b89263Smrg 410225b89263Smrg case $host_os in 4103b41a30aaSmrg aix3*) 4104b41a30aaSmrg cat <<\_LT_EOF >> "$cfgfile" 4105b41a30aaSmrg# AIX sometimes has problems with the GCC collect2 program. For some 4106b41a30aaSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4107b41a30aaSmrg# vanish in a puff of smoke. 4108b41a30aaSmrgif test set != "${COLLECT_NAMES+set}"; then 4109b41a30aaSmrg COLLECT_NAMES= 4110b41a30aaSmrg export COLLECT_NAMES 4111b41a30aaSmrgfi 4112b41a30aaSmrg_LT_EOF 411331637056Smrg ;; 411425b89263Smrg esac 4115a253d6aeSmrg 4116b41a30aaSmrg _LT_PROG_LTMAIN 4117a253d6aeSmrg 4118b41a30aaSmrg # We use sed instead of cat because bash on DJGPP gets confused if 4119b41a30aaSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4120b41a30aaSmrg # text mode, it properly converts lines to CR/LF. This bash problem 4121b41a30aaSmrg # is reportedly fixed, but why not run on old versions too? 4122b41a30aaSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4123b41a30aaSmrg || (rm -f "$cfgfile"; exit 1) 4124a253d6aeSmrg 4125b41a30aaSmrg mv -f "$cfgfile" "$ofile" || 4126b41a30aaSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4127b41a30aaSmrg chmod +x "$ofile" 4128b41a30aaSmrg], 4129b41a30aaSmrg[cat <<_LT_EOF >> "$ofile" 4130a253d6aeSmrg 4131b41a30aaSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4132b41a30aaSmrgdnl in a comment (ie after a #). 4133b41a30aaSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4134b41a30aaSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4135b41a30aaSmrg# ### END LIBTOOL TAG CONFIG: $1 4136b41a30aaSmrg_LT_EOF 4137b41a30aaSmrg])dnl /m4_if 4138b41a30aaSmrg], 4139b41a30aaSmrg[m4_if([$1], [], [ 4140b41a30aaSmrg PACKAGE='$PACKAGE' 4141b41a30aaSmrg VERSION='$VERSION' 4142b41a30aaSmrg RM='$RM' 4143b41a30aaSmrg ofile='$ofile'], []) 4144b41a30aaSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4145b41a30aaSmrg])# _LT_CONFIG 4146a253d6aeSmrg 4147a253d6aeSmrg 4148b41a30aaSmrg# LT_SUPPORTED_TAG(TAG) 4149b41a30aaSmrg# --------------------- 4150b41a30aaSmrg# Trace this macro to discover what tags are supported by the libtool 4151b41a30aaSmrg# --tag option, using: 4152b41a30aaSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4153b41a30aaSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 4154a253d6aeSmrg 4155a253d6aeSmrg 4156b41a30aaSmrg# C support is built-in for now 4157b41a30aaSmrgm4_define([_LT_LANG_C_enabled], []) 4158b41a30aaSmrgm4_define([_LT_TAGS], []) 4159a253d6aeSmrg 4160a253d6aeSmrg 4161b41a30aaSmrg# LT_LANG(LANG) 4162b41a30aaSmrg# ------------- 4163b41a30aaSmrg# Enable libtool support for the given language if not already enabled. 4164b41a30aaSmrgAC_DEFUN([LT_LANG], 4165b41a30aaSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4166b41a30aaSmrgm4_case([$1], 4167b41a30aaSmrg [C], [_LT_LANG(C)], 4168b41a30aaSmrg [C++], [_LT_LANG(CXX)], 4169b41a30aaSmrg [Go], [_LT_LANG(GO)], 4170b41a30aaSmrg [Java], [_LT_LANG(GCJ)], 4171b41a30aaSmrg [Fortran 77], [_LT_LANG(F77)], 4172b41a30aaSmrg [Fortran], [_LT_LANG(FC)], 4173b41a30aaSmrg [Windows Resource], [_LT_LANG(RC)], 4174b41a30aaSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4175b41a30aaSmrg [_LT_LANG($1)], 4176b41a30aaSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4177b41a30aaSmrg])# LT_LANG 4178ea133fd7Smrg 4179a253d6aeSmrg 4180b41a30aaSmrg# _LT_LANG(LANGNAME) 4181b41a30aaSmrg# ------------------ 4182b41a30aaSmrgm4_defun([_LT_LANG], 4183b41a30aaSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4184b41a30aaSmrg [LT_SUPPORTED_TAG([$1])dnl 4185b41a30aaSmrg m4_append([_LT_TAGS], [$1 ])dnl 4186b41a30aaSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4187b41a30aaSmrg _LT_LANG_$1_CONFIG($1)])dnl 4188b41a30aaSmrg])# _LT_LANG 4189a253d6aeSmrg 4190a253d6aeSmrg 4191b41a30aaSmrgm4_ifndef([AC_PROG_GO], [ 4192b41a30aaSmrg# NOTE: This macro has been submitted for inclusion into # 4193b41a30aaSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4194b41a30aaSmrg# a released version of Autoconf we should remove this # 4195b41a30aaSmrg# macro and use it instead. # 4196b41a30aaSmrgm4_defun([AC_PROG_GO], 4197b41a30aaSmrg[AC_LANG_PUSH(Go)dnl 4198b41a30aaSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4199b41a30aaSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4200b41a30aaSmrg_AC_ARG_VAR_LDFLAGS()dnl 4201b41a30aaSmrgAC_CHECK_TOOL(GOC, gccgo) 4202b41a30aaSmrgif test -z "$GOC"; then 4203b41a30aaSmrg if test -n "$ac_tool_prefix"; then 4204b41a30aaSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4205b41a30aaSmrg fi 4206b41a30aaSmrgfi 4207b41a30aaSmrgif test -z "$GOC"; then 4208b41a30aaSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4209b41a30aaSmrgfi 4210b41a30aaSmrg])#m4_defun 4211b41a30aaSmrg])#m4_ifndef 4212a253d6aeSmrg 4213ea133fd7Smrg 4214b41a30aaSmrg# _LT_LANG_DEFAULT_CONFIG 4215b41a30aaSmrg# ----------------------- 4216b41a30aaSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4217b41a30aaSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4218b41a30aaSmrg [LT_LANG(CXX)], 4219b41a30aaSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4220ea133fd7Smrg 4221b41a30aaSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4222b41a30aaSmrg [LT_LANG(F77)], 4223b41a30aaSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4224a253d6aeSmrg 4225b41a30aaSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4226b41a30aaSmrg [LT_LANG(FC)], 4227b41a30aaSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4228a253d6aeSmrg 4229b41a30aaSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4230b41a30aaSmrgdnl pulling things in needlessly. 4231b41a30aaSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4232b41a30aaSmrg [LT_LANG(GCJ)], 4233b41a30aaSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4234b41a30aaSmrg [LT_LANG(GCJ)], 4235b41a30aaSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4236b41a30aaSmrg [LT_LANG(GCJ)], 4237b41a30aaSmrg [m4_ifdef([AC_PROG_GCJ], 4238b41a30aaSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4239b41a30aaSmrg m4_ifdef([A][M_PROG_GCJ], 4240b41a30aaSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4241b41a30aaSmrg m4_ifdef([LT_PROG_GCJ], 4242b41a30aaSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 4243a253d6aeSmrg 4244b41a30aaSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4245b41a30aaSmrg [LT_LANG(GO)], 4246b41a30aaSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4247a253d6aeSmrg 4248b41a30aaSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4249b41a30aaSmrg [LT_LANG(RC)], 4250b41a30aaSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4251b41a30aaSmrg])# _LT_LANG_DEFAULT_CONFIG 4252a253d6aeSmrg 4253b41a30aaSmrg# Obsolete macros: 4254b41a30aaSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4255b41a30aaSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4256b41a30aaSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4257b41a30aaSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4258b41a30aaSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4259b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 4260b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4261b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4262b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4263b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4264b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 4265a253d6aeSmrg 4266ea133fd7Smrg 4267b41a30aaSmrg# _LT_TAG_COMPILER 4268b41a30aaSmrg# ---------------- 4269b41a30aaSmrgm4_defun([_LT_TAG_COMPILER], 4270b41a30aaSmrg[AC_REQUIRE([AC_PROG_CC])dnl 4271a253d6aeSmrg 4272b41a30aaSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4273b41a30aaSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4274b41a30aaSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4275b41a30aaSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4276a253d6aeSmrg 4277b41a30aaSmrg# If no C compiler was specified, use CC. 4278b41a30aaSmrgLTCC=${LTCC-"$CC"} 4279a253d6aeSmrg 4280b41a30aaSmrg# If no C compiler flags were specified, use CFLAGS. 4281b41a30aaSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4282a253d6aeSmrg 4283b41a30aaSmrg# Allow CC to be a program name with arguments. 4284b41a30aaSmrgcompiler=$CC 4285b41a30aaSmrg])# _LT_TAG_COMPILER 4286a253d6aeSmrg 4287a253d6aeSmrg 4288b41a30aaSmrg# _LT_COMPILER_BOILERPLATE 4289b41a30aaSmrg# ------------------------ 4290b41a30aaSmrg# Check for compiler boilerplate output or warnings with 4291b41a30aaSmrg# the simple compiler test code. 4292b41a30aaSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 4293b41a30aaSmrg[m4_require([_LT_DECL_SED])dnl 4294b41a30aaSmrgac_outfile=conftest.$ac_objext 4295b41a30aaSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4296b41a30aaSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4297b41a30aaSmrg_lt_compiler_boilerplate=`cat conftest.err` 4298b41a30aaSmrg$RM conftest* 4299b41a30aaSmrg])# _LT_COMPILER_BOILERPLATE 4300ea133fd7Smrg 4301ea133fd7Smrg 4302b41a30aaSmrg# _LT_LINKER_BOILERPLATE 4303b41a30aaSmrg# ---------------------- 4304b41a30aaSmrg# Check for linker boilerplate output or warnings with 4305b41a30aaSmrg# the simple link test code. 4306b41a30aaSmrgm4_defun([_LT_LINKER_BOILERPLATE], 4307b41a30aaSmrg[m4_require([_LT_DECL_SED])dnl 4308b41a30aaSmrgac_outfile=conftest.$ac_objext 4309b41a30aaSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4310b41a30aaSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4311b41a30aaSmrg_lt_linker_boilerplate=`cat conftest.err` 4312b41a30aaSmrg$RM -r conftest* 4313b41a30aaSmrg])# _LT_LINKER_BOILERPLATE 4314b41a30aaSmrg 4315b41a30aaSmrg# _LT_REQUIRED_DARWIN_CHECKS 4316b41a30aaSmrg# ------------------------- 4317b41a30aaSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4318b41a30aaSmrg case $host_os in 4319b41a30aaSmrg rhapsody* | darwin*) 4320b41a30aaSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4321b41a30aaSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4322b41a30aaSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4323b41a30aaSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4324b41a30aaSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4325b41a30aaSmrg _LT_DECL([], [DSYMUTIL], [1], 4326b41a30aaSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4327b41a30aaSmrg _LT_DECL([], [NMEDIT], [1], 4328b41a30aaSmrg [Tool to change global to local symbols on Mac OS X]) 4329b41a30aaSmrg _LT_DECL([], [LIPO], [1], 4330b41a30aaSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 4331b41a30aaSmrg _LT_DECL([], [OTOOL], [1], 4332b41a30aaSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4333b41a30aaSmrg _LT_DECL([], [OTOOL64], [1], 4334b41a30aaSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4335b41a30aaSmrg 4336b41a30aaSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4337b41a30aaSmrg [lt_cv_apple_cc_single_mod=no 4338b41a30aaSmrg if test -z "$LT_MULTI_MODULE"; then 4339b41a30aaSmrg # By default we will add the -single_module flag. You can override 4340b41a30aaSmrg # by either setting the environment variable LT_MULTI_MODULE 4341b41a30aaSmrg # non-empty at configure time, or by adding -multi_module to the 4342b41a30aaSmrg # link flags. 4343b41a30aaSmrg rm -rf libconftest.dylib* 4344b41a30aaSmrg echo "int foo(void){return 1;}" > conftest.c 4345b41a30aaSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4346b41a30aaSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4347b41a30aaSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4348b41a30aaSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4349b41a30aaSmrg _lt_result=$? 4350b41a30aaSmrg # If there is a non-empty error log, and "single_module" 4351b41a30aaSmrg # appears in it, assume the flag caused a linker warning 4352b41a30aaSmrg if test -s conftest.err && $GREP single_module conftest.err; then 4353b41a30aaSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4354b41a30aaSmrg # Otherwise, if the output was created with a 0 exit code from 4355b41a30aaSmrg # the compiler, it worked. 4356b41a30aaSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4357b41a30aaSmrg lt_cv_apple_cc_single_mod=yes 435825b89263Smrg else 4359b41a30aaSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 436025b89263Smrg fi 4361b41a30aaSmrg rm -rf libconftest.dylib* 4362b41a30aaSmrg rm -f conftest.* 4363b41a30aaSmrg fi]) 4364ea133fd7Smrg 4365b41a30aaSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4366b41a30aaSmrg [lt_cv_ld_exported_symbols_list], 4367b41a30aaSmrg [lt_cv_ld_exported_symbols_list=no 4368b41a30aaSmrg save_LDFLAGS=$LDFLAGS 4369b41a30aaSmrg echo "_main" > conftest.sym 4370b41a30aaSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4371b41a30aaSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4372b41a30aaSmrg [lt_cv_ld_exported_symbols_list=yes], 4373b41a30aaSmrg [lt_cv_ld_exported_symbols_list=no]) 4374b41a30aaSmrg LDFLAGS=$save_LDFLAGS 4375b41a30aaSmrg ]) 4376b41a30aaSmrg 4377b41a30aaSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4378b41a30aaSmrg [lt_cv_ld_force_load=no 4379b41a30aaSmrg cat > conftest.c << _LT_EOF 4380b41a30aaSmrgint forced_loaded() { return 2;} 4381b41a30aaSmrg_LT_EOF 4382b41a30aaSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4383b41a30aaSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4384b41a30aaSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4385b41a30aaSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4386b41a30aaSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4387b41a30aaSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4388b41a30aaSmrg cat > conftest.c << _LT_EOF 4389b41a30aaSmrgint main() { return 0;} 4390b41a30aaSmrg_LT_EOF 4391b41a30aaSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4392b41a30aaSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4393b41a30aaSmrg _lt_result=$? 4394b41a30aaSmrg if test -s conftest.err && $GREP force_load conftest.err; then 4395b41a30aaSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4396b41a30aaSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4397b41a30aaSmrg lt_cv_ld_force_load=yes 439825b89263Smrg else 4399b41a30aaSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 440025b89263Smrg fi 4401b41a30aaSmrg rm -f conftest.err libconftest.a conftest conftest.c 4402b41a30aaSmrg rm -rf conftest.dSYM 4403b41a30aaSmrg ]) 4404b41a30aaSmrg case $host_os in 4405b41a30aaSmrg rhapsody* | darwin1.[[012]]) 4406b41a30aaSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4407b41a30aaSmrg darwin1.*) 4408b41a30aaSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4409b41a30aaSmrg darwin*) 4410b41a30aaSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 4411b41a30aaSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4412b41a30aaSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4413b41a30aaSmrg *) 4414b41a30aaSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 441525b89263Smrg esac 4416b41a30aaSmrg ;; 4417b41a30aaSmrg esac 4418b41a30aaSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 4419b41a30aaSmrg _lt_dar_single_mod='$single_module' 4420b41a30aaSmrg fi 4421b41a30aaSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 4422b41a30aaSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4423b41a30aaSmrg else 4424b41a30aaSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4425b41a30aaSmrg fi 4426b41a30aaSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4427b41a30aaSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 4428b41a30aaSmrg else 4429b41a30aaSmrg _lt_dsymutil= 4430b41a30aaSmrg fi 4431b41a30aaSmrg ;; 4432b41a30aaSmrg esac 4433b41a30aaSmrg]) 4434ea133fd7Smrg 4435a253d6aeSmrg 4436b41a30aaSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 4437b41a30aaSmrg# --------------------------------- 4438b41a30aaSmrg# Checks for linker and compiler features on darwin 4439b41a30aaSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 4440b41a30aaSmrg[ 4441b41a30aaSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4442b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4443b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4444b41a30aaSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 4445b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4446b41a30aaSmrg if test yes = "$lt_cv_ld_force_load"; then 4447b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 4448b41a30aaSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4449b41a30aaSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4450b41a30aaSmrg else 4451b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4452b41a30aaSmrg fi 4453b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4454b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4455b41a30aaSmrg case $cc_basename in 4456b41a30aaSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4457b41a30aaSmrg *) _lt_dar_can_shared=$GCC ;; 4458b41a30aaSmrg esac 4459b41a30aaSmrg if test yes = "$_lt_dar_can_shared"; then 4460b41a30aaSmrg output_verbose_link_cmd=func_echo_all 4461b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" 4462b41a30aaSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4463b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" 4464b41a30aaSmrg _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" 4465b41a30aaSmrg m4_if([$1], [CXX], 4466b41a30aaSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4467b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" 4468b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" 4469b41a30aaSmrg fi 4470b41a30aaSmrg],[]) 4471b41a30aaSmrg else 4472b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4473b41a30aaSmrg fi 4474b41a30aaSmrg]) 4475a253d6aeSmrg 4476b41a30aaSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4477b41a30aaSmrg# ---------------------------------- 4478b41a30aaSmrg# Links a minimal program and checks the executable 4479b41a30aaSmrg# for the system default hardcoded library path. In most cases, 4480b41a30aaSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 4481b41a30aaSmrg# the location of the communication and MPI libs are included too. 4482b41a30aaSmrg# If we don't find anything, use the default library path according 4483b41a30aaSmrg# to the aix ld manual. 4484b41a30aaSmrg# Store the results from the different compilers for each TAGNAME. 4485b41a30aaSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 4486b41a30aaSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 4487b41a30aaSmrg[m4_require([_LT_DECL_SED])dnl 4488b41a30aaSmrgif test set = "${lt_cv_aix_libpath+set}"; then 4489b41a30aaSmrg aix_libpath=$lt_cv_aix_libpath 4490b41a30aaSmrgelse 4491b41a30aaSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4492b41a30aaSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4493b41a30aaSmrg lt_aix_libpath_sed='[ 4494b41a30aaSmrg /Import File Strings/,/^$/ { 4495b41a30aaSmrg /^0/ { 4496b41a30aaSmrg s/^0 *\([^ ]*\) *$/\1/ 4497b41a30aaSmrg p 4498b41a30aaSmrg } 4499b41a30aaSmrg }]' 4500b41a30aaSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4501b41a30aaSmrg # Check for a 64-bit object if we didn't find anything. 4502b41a30aaSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4503b41a30aaSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4504b41a30aaSmrg fi],[]) 4505b41a30aaSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4506b41a30aaSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4507b41a30aaSmrg fi 4508b41a30aaSmrg ]) 4509b41a30aaSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4510b41a30aaSmrgfi 4511b41a30aaSmrg])# _LT_SYS_MODULE_PATH_AIX 4512a253d6aeSmrg 4513a253d6aeSmrg 4514b41a30aaSmrg# _LT_SHELL_INIT(ARG) 4515b41a30aaSmrg# ------------------- 4516b41a30aaSmrgm4_define([_LT_SHELL_INIT], 4517b41a30aaSmrg[m4_divert_text([M4SH-INIT], [$1 4518b41a30aaSmrg])])# _LT_SHELL_INIT 4519a253d6aeSmrg 4520ea133fd7Smrg 4521ea133fd7Smrg 4522b41a30aaSmrg# _LT_PROG_ECHO_BACKSLASH 4523b41a30aaSmrg# ----------------------- 4524b41a30aaSmrg# Find how we can fake an echo command that does not interpret backslash. 4525b41a30aaSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 4526b41a30aaSmrg# of the generated configure script that will find a shell with a builtin 4527b41a30aaSmrg# printf (that we can use as an echo command). 4528b41a30aaSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 4529b41a30aaSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4530b41a30aaSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4531b41a30aaSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4532ea133fd7Smrg 4533b41a30aaSmrgAC_MSG_CHECKING([how to print strings]) 4534b41a30aaSmrg# Test print first, because it will be a builtin if present. 4535b41a30aaSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4536b41a30aaSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4537b41a30aaSmrg ECHO='print -r --' 4538b41a30aaSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4539b41a30aaSmrg ECHO='printf %s\n' 4540b41a30aaSmrgelse 4541b41a30aaSmrg # Use this function as a fallback that always works. 4542b41a30aaSmrg func_fallback_echo () 4543b41a30aaSmrg { 4544b41a30aaSmrg eval 'cat <<_LTECHO_EOF 4545b41a30aaSmrg$[]1 4546b41a30aaSmrg_LTECHO_EOF' 4547b41a30aaSmrg } 4548b41a30aaSmrg ECHO='func_fallback_echo' 4549b41a30aaSmrgfi 4550ea133fd7Smrg 4551b41a30aaSmrg# func_echo_all arg... 4552b41a30aaSmrg# Invoke $ECHO with all args, space-separated. 4553b41a30aaSmrgfunc_echo_all () 4554b41a30aaSmrg{ 4555b41a30aaSmrg $ECHO "$*" 4556b41a30aaSmrg} 4557a253d6aeSmrg 4558b41a30aaSmrgcase $ECHO in 4559b41a30aaSmrg printf*) AC_MSG_RESULT([printf]) ;; 4560b41a30aaSmrg print*) AC_MSG_RESULT([print -r]) ;; 4561b41a30aaSmrg *) AC_MSG_RESULT([cat]) ;; 4562b41a30aaSmrgesac 4563a253d6aeSmrg 4564b41a30aaSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 4565b41a30aaSmrg[_AS_DETECT_SUGGESTED([ 4566b41a30aaSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4567b41a30aaSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4568b41a30aaSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4569b41a30aaSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4570b41a30aaSmrg PATH=/empty FPATH=/empty; export PATH FPATH 4571b41a30aaSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 4572b41a30aaSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4573a253d6aeSmrg 4574b41a30aaSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4575b41a30aaSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4576b41a30aaSmrg])# _LT_PROG_ECHO_BACKSLASH 4577a253d6aeSmrg 4578a253d6aeSmrg 4579b41a30aaSmrg# _LT_WITH_SYSROOT 4580b41a30aaSmrg# ---------------- 4581b41a30aaSmrgAC_DEFUN([_LT_WITH_SYSROOT], 4582b41a30aaSmrg[m4_require([_LT_DECL_SED])dnl 4583b41a30aaSmrgAC_MSG_CHECKING([for sysroot]) 4584b41a30aaSmrgAC_ARG_WITH([sysroot], 4585b41a30aaSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4586b41a30aaSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 4587b41a30aaSmrg if not specified).])], 4588b41a30aaSmrg[], [with_sysroot=no]) 4589ea133fd7Smrg 4590b41a30aaSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 4591b41a30aaSmrgdnl in case the user passed a directory name. 4592b41a30aaSmrglt_sysroot= 4593b41a30aaSmrgcase $with_sysroot in #( 4594b41a30aaSmrg yes) 4595b41a30aaSmrg if test yes = "$GCC"; then 4596b41a30aaSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4597b41a30aaSmrg fi 4598b41a30aaSmrg ;; #( 4599b41a30aaSmrg /*) 4600b41a30aaSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4601b41a30aaSmrg ;; #( 4602b41a30aaSmrg no|'') 4603b41a30aaSmrg ;; #( 4604b41a30aaSmrg *) 4605b41a30aaSmrg AC_MSG_RESULT([$with_sysroot]) 4606b41a30aaSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 4607b41a30aaSmrg ;; 4608b41a30aaSmrgesac 4609ea133fd7Smrg 4610b41a30aaSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 4611b41a30aaSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4612b41a30aaSmrg[dependent libraries, and where our libraries should be installed.])]) 4613ea133fd7Smrg 4614b41a30aaSmrg# _LT_ENABLE_LOCK 4615b41a30aaSmrg# --------------- 4616b41a30aaSmrgm4_defun([_LT_ENABLE_LOCK], 4617b41a30aaSmrg[AC_ARG_ENABLE([libtool-lock], 4618b41a30aaSmrg [AS_HELP_STRING([--disable-libtool-lock], 4619b41a30aaSmrg [avoid locking (might break parallel builds)])]) 4620b41a30aaSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 4621ea133fd7Smrg 4622b41a30aaSmrg# Some flags need to be propagated to the compiler or linker for good 4623b41a30aaSmrg# libtool support. 4624b41a30aaSmrgcase $host in 4625b41a30aaSmrgia64-*-hpux*) 4626b41a30aaSmrg # Find out what ABI is being produced by ac_compile, and set mode 4627b41a30aaSmrg # options accordingly. 4628b41a30aaSmrg echo 'int i;' > conftest.$ac_ext 4629b41a30aaSmrg if AC_TRY_EVAL(ac_compile); then 4630b41a30aaSmrg case `$FILECMD conftest.$ac_objext` in 4631b41a30aaSmrg *ELF-32*) 4632b41a30aaSmrg HPUX_IA64_MODE=32 4633b41a30aaSmrg ;; 4634b41a30aaSmrg *ELF-64*) 4635b41a30aaSmrg HPUX_IA64_MODE=64 4636b41a30aaSmrg ;; 4637b41a30aaSmrg esac 4638b41a30aaSmrg fi 4639b41a30aaSmrg rm -rf conftest* 4640b41a30aaSmrg ;; 4641b41a30aaSmrg*-*-irix6*) 4642b41a30aaSmrg # Find out what ABI is being produced by ac_compile, and set linker 4643b41a30aaSmrg # options accordingly. 4644b41a30aaSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4645b41a30aaSmrg if AC_TRY_EVAL(ac_compile); then 4646b41a30aaSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 4647b41a30aaSmrg case `$FILECMD conftest.$ac_objext` in 4648b41a30aaSmrg *32-bit*) 4649b41a30aaSmrg LD="${LD-ld} -melf32bsmip" 465025b89263Smrg ;; 4651b41a30aaSmrg *N32*) 4652b41a30aaSmrg LD="${LD-ld} -melf32bmipn32" 465325b89263Smrg ;; 4654b41a30aaSmrg *64-bit*) 4655b41a30aaSmrg LD="${LD-ld} -melf64bmip" 465625b89263Smrg ;; 465725b89263Smrg esac 4658b41a30aaSmrg else 4659b41a30aaSmrg case `$FILECMD conftest.$ac_objext` in 4660b41a30aaSmrg *32-bit*) 4661b41a30aaSmrg LD="${LD-ld} -32" 4662b41a30aaSmrg ;; 4663b41a30aaSmrg *N32*) 4664b41a30aaSmrg LD="${LD-ld} -n32" 4665b41a30aaSmrg ;; 4666b41a30aaSmrg *64-bit*) 4667b41a30aaSmrg LD="${LD-ld} -64" 4668b41a30aaSmrg ;; 4669b41a30aaSmrg esac 4670b41a30aaSmrg fi 4671b41a30aaSmrg fi 4672b41a30aaSmrg rm -rf conftest* 4673b41a30aaSmrg ;; 4674a253d6aeSmrg 4675b41a30aaSmrgmips64*-*linux*) 4676b41a30aaSmrg # Find out what ABI is being produced by ac_compile, and set linker 4677b41a30aaSmrg # options accordingly. 4678b41a30aaSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4679b41a30aaSmrg if AC_TRY_EVAL(ac_compile); then 4680b41a30aaSmrg emul=elf 4681b41a30aaSmrg case `$FILECMD conftest.$ac_objext` in 4682b41a30aaSmrg *32-bit*) 4683b41a30aaSmrg emul="${emul}32" 468425b89263Smrg ;; 4685b41a30aaSmrg *64-bit*) 4686b41a30aaSmrg emul="${emul}64" 468725b89263Smrg ;; 468825b89263Smrg esac 4689b41a30aaSmrg case `$FILECMD conftest.$ac_objext` in 4690b41a30aaSmrg *MSB*) 4691b41a30aaSmrg emul="${emul}btsmip" 469225b89263Smrg ;; 4693b41a30aaSmrg *LSB*) 4694b41a30aaSmrg emul="${emul}ltsmip" 4695b41a30aaSmrg ;; 4696b41a30aaSmrg esac 4697b41a30aaSmrg case `$FILECMD conftest.$ac_objext` in 4698b41a30aaSmrg *N32*) 4699b41a30aaSmrg emul="${emul}n32" 4700b41a30aaSmrg ;; 4701b41a30aaSmrg esac 4702b41a30aaSmrg LD="${LD-ld} -m $emul" 470325b89263Smrg fi 4704b41a30aaSmrg rm -rf conftest* 4705b41a30aaSmrg ;; 4706ea133fd7Smrg 4707b41a30aaSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4708b41a30aaSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4709b41a30aaSmrg # Find out what ABI is being produced by ac_compile, and set linker 4710b41a30aaSmrg # options accordingly. Note that the listed cases only cover the 4711b41a30aaSmrg # situations where additional linker options are needed (such as when 4712b41a30aaSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4713b41a30aaSmrg # vice versa); the common cases where no linker options are needed do 4714b41a30aaSmrg # not appear in the list. 4715b41a30aaSmrg echo 'int i;' > conftest.$ac_ext 4716b41a30aaSmrg if AC_TRY_EVAL(ac_compile); then 4717b41a30aaSmrg case `$FILECMD conftest.o` in 4718b41a30aaSmrg *32-bit*) 4719b41a30aaSmrg case $host in 4720b41a30aaSmrg x86_64-*kfreebsd*-gnu) 4721b41a30aaSmrg LD="${LD-ld} -m elf_i386_fbsd" 4722b41a30aaSmrg ;; 4723b41a30aaSmrg x86_64-*linux*) 4724b41a30aaSmrg case `$FILECMD conftest.o` in 4725b41a30aaSmrg *x86-64*) 4726b41a30aaSmrg LD="${LD-ld} -m elf32_x86_64" 4727b41a30aaSmrg ;; 4728b41a30aaSmrg *) 4729b41a30aaSmrg LD="${LD-ld} -m elf_i386" 4730b41a30aaSmrg ;; 4731b41a30aaSmrg esac 4732b41a30aaSmrg ;; 4733b41a30aaSmrg powerpc64le-*linux*) 4734b41a30aaSmrg LD="${LD-ld} -m elf32lppclinux" 4735b41a30aaSmrg ;; 4736b41a30aaSmrg powerpc64-*linux*) 4737b41a30aaSmrg LD="${LD-ld} -m elf32ppclinux" 4738b41a30aaSmrg ;; 4739b41a30aaSmrg s390x-*linux*) 4740b41a30aaSmrg LD="${LD-ld} -m elf_s390" 4741b41a30aaSmrg ;; 4742b41a30aaSmrg sparc64-*linux*) 4743b41a30aaSmrg LD="${LD-ld} -m elf32_sparc" 4744b41a30aaSmrg ;; 4745b41a30aaSmrg esac 4746b41a30aaSmrg ;; 4747b41a30aaSmrg *64-bit*) 4748b41a30aaSmrg case $host in 4749b41a30aaSmrg x86_64-*kfreebsd*-gnu) 4750b41a30aaSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 4751b41a30aaSmrg ;; 4752b41a30aaSmrg x86_64-*linux*) 4753b41a30aaSmrg LD="${LD-ld} -m elf_x86_64" 4754b41a30aaSmrg ;; 4755b41a30aaSmrg powerpcle-*linux*) 4756b41a30aaSmrg LD="${LD-ld} -m elf64lppc" 4757b41a30aaSmrg ;; 4758b41a30aaSmrg powerpc-*linux*) 4759b41a30aaSmrg LD="${LD-ld} -m elf64ppc" 4760b41a30aaSmrg ;; 4761b41a30aaSmrg s390*-*linux*|s390*-*tpf*) 4762b41a30aaSmrg LD="${LD-ld} -m elf64_s390" 4763b41a30aaSmrg ;; 4764b41a30aaSmrg sparc*-*linux*) 4765b41a30aaSmrg LD="${LD-ld} -m elf64_sparc" 4766b41a30aaSmrg ;; 4767b41a30aaSmrg esac 4768b41a30aaSmrg ;; 4769b41a30aaSmrg esac 4770b41a30aaSmrg fi 4771b41a30aaSmrg rm -rf conftest* 4772b41a30aaSmrg ;; 477325b89263Smrg 4774b41a30aaSmrg*-*-sco3.2v5*) 4775b41a30aaSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4776b41a30aaSmrg SAVE_CFLAGS=$CFLAGS 4777b41a30aaSmrg CFLAGS="$CFLAGS -belf" 4778b41a30aaSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4779b41a30aaSmrg [AC_LANG_PUSH(C) 4780b41a30aaSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4781b41a30aaSmrg AC_LANG_POP]) 4782b41a30aaSmrg if test yes != "$lt_cv_cc_needs_belf"; then 4783b41a30aaSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4784b41a30aaSmrg CFLAGS=$SAVE_CFLAGS 4785b41a30aaSmrg fi 4786b41a30aaSmrg ;; 4787b41a30aaSmrg*-*solaris*) 4788b41a30aaSmrg # Find out what ABI is being produced by ac_compile, and set linker 4789b41a30aaSmrg # options accordingly. 4790b41a30aaSmrg echo 'int i;' > conftest.$ac_ext 4791b41a30aaSmrg if AC_TRY_EVAL(ac_compile); then 4792b41a30aaSmrg case `$FILECMD conftest.o` in 4793b41a30aaSmrg *64-bit*) 4794b41a30aaSmrg case $lt_cv_prog_gnu_ld in 4795b41a30aaSmrg yes*) 4796b41a30aaSmrg case $host in 4797b41a30aaSmrg i?86-*-solaris*|x86_64-*-solaris*) 4798b41a30aaSmrg LD="${LD-ld} -m elf_x86_64" 4799b41a30aaSmrg ;; 4800b41a30aaSmrg sparc*-*-solaris*) 4801b41a30aaSmrg LD="${LD-ld} -m elf64_sparc" 4802b41a30aaSmrg ;; 4803b41a30aaSmrg esac 4804b41a30aaSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4805b41a30aaSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4806b41a30aaSmrg LD=${LD-ld}_sol2 4807b41a30aaSmrg fi 4808b41a30aaSmrg ;; 4809b41a30aaSmrg *) 4810b41a30aaSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4811b41a30aaSmrg LD="${LD-ld} -64" 481225b89263Smrg fi 4813b41a30aaSmrg ;; 4814b41a30aaSmrg esac 481525b89263Smrg ;; 481625b89263Smrg esac 481725b89263Smrg fi 4818b41a30aaSmrg rm -rf conftest* 481925b89263Smrg ;; 482025b89263Smrgesac 4821a253d6aeSmrg 4822b41a30aaSmrgneed_locks=$enable_libtool_lock 4823b41a30aaSmrg])# _LT_ENABLE_LOCK 4824a253d6aeSmrg 4825a253d6aeSmrg 4826b41a30aaSmrg# _LT_PROG_AR 4827b41a30aaSmrg# ----------- 4828b41a30aaSmrgm4_defun([_LT_PROG_AR], 4829b41a30aaSmrg[AC_CHECK_TOOLS(AR, [ar], false) 4830b41a30aaSmrg: ${AR=ar} 4831b41a30aaSmrg_LT_DECL([], [AR], [1], [The archiver]) 4832a253d6aeSmrg 4833b41a30aaSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4834b41a30aaSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4835b41a30aaSmrg# higher priority because thats what people were doing historically (setting 4836b41a30aaSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4837b41a30aaSmrg# variable obsoleted/removed. 4838a253d6aeSmrg 4839b41a30aaSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4840b41a30aaSmrglt_ar_flags=$AR_FLAGS 4841b41a30aaSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 4842a253d6aeSmrg 4843b41a30aaSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4844b41a30aaSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4845b41a30aaSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4846b41a30aaSmrg [Flags to create an archive]) 4847a253d6aeSmrg 4848b41a30aaSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4849b41a30aaSmrg [lt_cv_ar_at_file=no 4850b41a30aaSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4851b41a30aaSmrg [echo conftest.$ac_objext > conftest.lst 4852b41a30aaSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4853b41a30aaSmrg AC_TRY_EVAL([lt_ar_try]) 4854b41a30aaSmrg if test 0 -eq "$ac_status"; then 4855b41a30aaSmrg # Ensure the archiver fails upon bogus file names. 4856b41a30aaSmrg rm -f conftest.$ac_objext libconftest.a 4857b41a30aaSmrg AC_TRY_EVAL([lt_ar_try]) 4858b41a30aaSmrg if test 0 -ne "$ac_status"; then 4859b41a30aaSmrg lt_cv_ar_at_file=@ 4860b41a30aaSmrg fi 4861b41a30aaSmrg fi 4862b41a30aaSmrg rm -f conftest.* libconftest.a 4863b41a30aaSmrg ]) 4864b41a30aaSmrg ]) 4865a253d6aeSmrg 4866b41a30aaSmrgif test no = "$lt_cv_ar_at_file"; then 4867b41a30aaSmrg archiver_list_spec= 4868b41a30aaSmrgelse 4869b41a30aaSmrg archiver_list_spec=$lt_cv_ar_at_file 4870b41a30aaSmrgfi 4871b41a30aaSmrg_LT_DECL([], [archiver_list_spec], [1], 4872b41a30aaSmrg [How to feed a file listing to the archiver]) 4873b41a30aaSmrg])# _LT_PROG_AR 4874a253d6aeSmrg 4875a253d6aeSmrg 4876b41a30aaSmrg# _LT_CMD_OLD_ARCHIVE 4877b41a30aaSmrg# ------------------- 4878b41a30aaSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 4879b41a30aaSmrg[_LT_PROG_AR 4880ea133fd7Smrg 4881b41a30aaSmrgAC_CHECK_TOOL(STRIP, strip, :) 4882b41a30aaSmrgtest -z "$STRIP" && STRIP=: 4883b41a30aaSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4884ea133fd7Smrg 4885b41a30aaSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 4886b41a30aaSmrgtest -z "$RANLIB" && RANLIB=: 4887b41a30aaSmrg_LT_DECL([], [RANLIB], [1], 4888b41a30aaSmrg [Commands used to install an old-style archive]) 4889ea133fd7Smrg 4890b41a30aaSmrg# Determine commands to create old-style static archives. 4891b41a30aaSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4892b41a30aaSmrgold_postinstall_cmds='chmod 644 $oldlib' 4893b41a30aaSmrgold_postuninstall_cmds= 4894b41a30aaSmrg 4895b41a30aaSmrgif test -n "$RANLIB"; then 489625b89263Smrg case $host_os in 4897b41a30aaSmrg bitrig* | openbsd*) 4898b41a30aaSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 489925b89263Smrg ;; 4900b41a30aaSmrg *) 4901b41a30aaSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 490225b89263Smrg ;; 4903ea133fd7Smrg esac 4904b41a30aaSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 490525b89263Smrgfi 4906b41a30aaSmrg 4907b41a30aaSmrgcase $host_os in 4908b41a30aaSmrg darwin*) 4909b41a30aaSmrg lock_old_archive_extraction=yes ;; 4910b41a30aaSmrg *) 4911b41a30aaSmrg lock_old_archive_extraction=no ;; 4912b41a30aaSmrgesac 4913b41a30aaSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 4914b41a30aaSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 4915b41a30aaSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 4916b41a30aaSmrg [Commands used to build an old-style archive]) 4917b41a30aaSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 4918b41a30aaSmrg [Whether to use a lock for old archive extraction]) 4919b41a30aaSmrg])# _LT_CMD_OLD_ARCHIVE 4920ea133fd7Smrg 4921ea133fd7Smrg 4922b41a30aaSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4923b41a30aaSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4924b41a30aaSmrg# ---------------------------------------------------------------- 4925b41a30aaSmrg# Check whether the given compiler option works 4926b41a30aaSmrgAC_DEFUN([_LT_COMPILER_OPTION], 492725b89263Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4928b41a30aaSmrgm4_require([_LT_DECL_SED])dnl 4929b41a30aaSmrgAC_CACHE_CHECK([$1], [$2], 4930b41a30aaSmrg [$2=no 4931b41a30aaSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 4932b41a30aaSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4933b41a30aaSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 4934b41a30aaSmrg # Insert the option either (1) after the last *FLAGS variable, or 4935b41a30aaSmrg # (2) before a word containing "conftest.", or (3) at the end. 4936b41a30aaSmrg # Note that $ac_compile itself does not contain backslashes and begins 4937b41a30aaSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4938b41a30aaSmrg # The option is referenced via a variable to avoid confusing sed. 4939b41a30aaSmrg lt_compile=`echo "$ac_compile" | $SED \ 4940b41a30aaSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4941b41a30aaSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4942b41a30aaSmrg -e 's:$: $lt_compiler_flag:'` 4943b41a30aaSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4944b41a30aaSmrg (eval "$lt_compile" 2>conftest.err) 4945b41a30aaSmrg ac_status=$? 4946b41a30aaSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4947b41a30aaSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4948b41a30aaSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 4949b41a30aaSmrg # The compiler can only warn and ignore the option if not recognized 4950b41a30aaSmrg # So say no if there are warnings other than the usual output. 4951b41a30aaSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 4952b41a30aaSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4953b41a30aaSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 4954b41a30aaSmrg $2=yes 4955b41a30aaSmrg fi 4956b41a30aaSmrg fi 4957b41a30aaSmrg $RM conftest* 4958b41a30aaSmrg]) 4959b41a30aaSmrg 4960b41a30aaSmrgif test yes = "[$]$2"; then 4961b41a30aaSmrg m4_if([$5], , :, [$5]) 496225b89263Smrgelse 4963b41a30aaSmrg m4_if([$6], , :, [$6]) 496425b89263Smrgfi 4965b41a30aaSmrg])# _LT_COMPILER_OPTION 4966ea133fd7Smrg 4967b41a30aaSmrg# Old name: 4968b41a30aaSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 4969b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 4970b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 4971ea133fd7Smrg 4972ea133fd7Smrg 4973b41a30aaSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4974b41a30aaSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 4975b41a30aaSmrg# ---------------------------------------------------- 4976b41a30aaSmrg# Check whether the given linker option works 4977b41a30aaSmrgAC_DEFUN([_LT_LINKER_OPTION], 4978b41a30aaSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4979b41a30aaSmrgm4_require([_LT_DECL_SED])dnl 4980b41a30aaSmrgAC_CACHE_CHECK([$1], [$2], 4981b41a30aaSmrg [$2=no 4982b41a30aaSmrg save_LDFLAGS=$LDFLAGS 4983b41a30aaSmrg LDFLAGS="$LDFLAGS $3" 4984b41a30aaSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 4985b41a30aaSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 4986b41a30aaSmrg # The linker can only warn and ignore the option if not recognized 4987b41a30aaSmrg # So say no if there are warnings 4988b41a30aaSmrg if test -s conftest.err; then 4989b41a30aaSmrg # Append any errors to the config.log. 4990b41a30aaSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 4991b41a30aaSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 4992b41a30aaSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4993b41a30aaSmrg if diff conftest.exp conftest.er2 >/dev/null; then 4994b41a30aaSmrg $2=yes 4995b41a30aaSmrg fi 4996b41a30aaSmrg else 4997b41a30aaSmrg $2=yes 4998b41a30aaSmrg fi 4999b41a30aaSmrg fi 5000b41a30aaSmrg $RM -r conftest* 5001b41a30aaSmrg LDFLAGS=$save_LDFLAGS 5002b41a30aaSmrg]) 5003ea133fd7Smrg 5004b41a30aaSmrgif test yes = "[$]$2"; then 5005b41a30aaSmrg m4_if([$4], , :, [$4]) 5006b41a30aaSmrgelse 5007b41a30aaSmrg m4_if([$5], , :, [$5]) 5008b41a30aaSmrgfi 5009b41a30aaSmrg])# _LT_LINKER_OPTION 5010ea133fd7Smrg 5011b41a30aaSmrg# Old name: 5012b41a30aaSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5013b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 5014b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5015ea133fd7Smrg 5016ea133fd7Smrg 5017b41a30aaSmrg# LT_CMD_MAX_LEN 5018b41a30aaSmrg#--------------- 5019b41a30aaSmrgAC_DEFUN([LT_CMD_MAX_LEN], 5020b41a30aaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5021b41a30aaSmrg# find the maximum length of command line arguments 5022b41a30aaSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5023b41a30aaSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5024b41a30aaSmrg i=0 5025b41a30aaSmrg teststring=ABCD 5026ea133fd7Smrg 5027b41a30aaSmrg case $build_os in 5028b41a30aaSmrg msdosdjgpp*) 5029b41a30aaSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5030b41a30aaSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5031b41a30aaSmrg # during glob expansion). Even if it were fixed, the result of this 5032b41a30aaSmrg # check would be larger than it should be. 5033b41a30aaSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5034b41a30aaSmrg ;; 5035ea133fd7Smrg 5036b41a30aaSmrg gnu*) 5037b41a30aaSmrg # Under GNU Hurd, this test is not required because there is 5038b41a30aaSmrg # no limit to the length of command line arguments. 5039b41a30aaSmrg # Libtool will interpret -1 as no limit whatsoever 5040b41a30aaSmrg lt_cv_sys_max_cmd_len=-1; 5041b41a30aaSmrg ;; 5042ea133fd7Smrg 5043b41a30aaSmrg cygwin* | mingw* | cegcc*) 5044b41a30aaSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5045b41a30aaSmrg # about 5 minutes as the teststring grows exponentially. 5046b41a30aaSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 5047b41a30aaSmrg # you end up with a "frozen" computer, even though with patience 5048b41a30aaSmrg # the test eventually succeeds (with a max line length of 256k). 5049b41a30aaSmrg # Instead, let's just punt: use the minimum linelength reported by 5050b41a30aaSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 5051b41a30aaSmrg lt_cv_sys_max_cmd_len=8192; 5052b41a30aaSmrg ;; 5053ea133fd7Smrg 5054b41a30aaSmrg mint*) 5055b41a30aaSmrg # On MiNT this can take a long time and run out of memory. 5056b41a30aaSmrg lt_cv_sys_max_cmd_len=8192; 5057b41a30aaSmrg ;; 5058ea133fd7Smrg 5059b41a30aaSmrg amigaos*) 5060b41a30aaSmrg # On AmigaOS with pdksh, this test takes hours, literally. 5061b41a30aaSmrg # So we just punt and use a minimum line length of 8192. 5062b41a30aaSmrg lt_cv_sys_max_cmd_len=8192; 5063b41a30aaSmrg ;; 5064ea133fd7Smrg 5065b41a30aaSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5066b41a30aaSmrg # This has been around since 386BSD, at least. Likely further. 5067b41a30aaSmrg if test -x /sbin/sysctl; then 5068b41a30aaSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5069b41a30aaSmrg elif test -x /usr/sbin/sysctl; then 5070b41a30aaSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5071b41a30aaSmrg else 5072b41a30aaSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5073b41a30aaSmrg fi 5074b41a30aaSmrg # And add a safety zone 5075b41a30aaSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5076b41a30aaSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5077b41a30aaSmrg ;; 5078ea133fd7Smrg 5079b41a30aaSmrg interix*) 5080b41a30aaSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5081b41a30aaSmrg lt_cv_sys_max_cmd_len=196608 5082b41a30aaSmrg ;; 5083ea133fd7Smrg 5084b41a30aaSmrg os2*) 5085b41a30aaSmrg # The test takes a long time on OS/2. 5086b41a30aaSmrg lt_cv_sys_max_cmd_len=8192 5087b41a30aaSmrg ;; 5088ea133fd7Smrg 5089b41a30aaSmrg osf*) 5090b41a30aaSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5091b41a30aaSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5092b41a30aaSmrg # nice to cause kernel panics so lets avoid the loop below. 5093b41a30aaSmrg # First set a reasonable default. 5094b41a30aaSmrg lt_cv_sys_max_cmd_len=16384 5095b41a30aaSmrg # 5096b41a30aaSmrg if test -x /sbin/sysconfig; then 5097b41a30aaSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5098b41a30aaSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5099b41a30aaSmrg esac 5100b41a30aaSmrg fi 5101b41a30aaSmrg ;; 5102b41a30aaSmrg sco3.2v5*) 5103b41a30aaSmrg lt_cv_sys_max_cmd_len=102400 5104b41a30aaSmrg ;; 5105b41a30aaSmrg sysv5* | sco5v6* | sysv4.2uw2*) 5106b41a30aaSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5107b41a30aaSmrg if test -n "$kargmax"; then 5108b41a30aaSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 510925b89263Smrg else 5110b41a30aaSmrg lt_cv_sys_max_cmd_len=32768 5111b41a30aaSmrg fi 5112b41a30aaSmrg ;; 5113b41a30aaSmrg *) 5114b41a30aaSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5115b41a30aaSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5116b41a30aaSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5117b41a30aaSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5118b41a30aaSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5119b41a30aaSmrg else 5120b41a30aaSmrg # Make teststring a little bigger before we do anything with it. 5121b41a30aaSmrg # a 1K string should be a reasonable start. 5122b41a30aaSmrg for i in 1 2 3 4 5 6 7 8; do 5123b41a30aaSmrg teststring=$teststring$teststring 5124b41a30aaSmrg done 5125b41a30aaSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5126b41a30aaSmrg # If test is not a shell built-in, we'll probably end up computing a 5127b41a30aaSmrg # maximum length that is only half of the actual maximum length, but 5128b41a30aaSmrg # we can't tell. 5129b41a30aaSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5130b41a30aaSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5131b41a30aaSmrg test 17 != "$i" # 1/2 MB should be enough 5132b41a30aaSmrg do 5133b41a30aaSmrg i=`expr $i + 1` 5134b41a30aaSmrg teststring=$teststring$teststring 5135b41a30aaSmrg done 5136b41a30aaSmrg # Only check the string length outside the loop. 5137b41a30aaSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5138b41a30aaSmrg teststring= 5139b41a30aaSmrg # Add a significant safety factor because C++ compilers can tack on 5140b41a30aaSmrg # massive amounts of additional arguments before passing them to the 5141b41a30aaSmrg # linker. It appears as though 1/2 is a usable value. 5142b41a30aaSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 514325b89263Smrg fi 5144b41a30aaSmrg ;; 5145b41a30aaSmrg esac 5146b41a30aaSmrg]) 5147b41a30aaSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 5148b41a30aaSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5149b41a30aaSmrgelse 5150b41a30aaSmrg AC_MSG_RESULT(none) 5151b41a30aaSmrgfi 5152b41a30aaSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5153b41a30aaSmrg_LT_DECL([], [max_cmd_len], [0], 5154b41a30aaSmrg [What is the maximum length of a command?]) 5155b41a30aaSmrg])# LT_CMD_MAX_LEN 5156ea133fd7Smrg 5157b41a30aaSmrg# Old name: 5158b41a30aaSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5159b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 5160b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5161ea133fd7Smrg 5162ea133fd7Smrg 5163b41a30aaSmrg# _LT_HEADER_DLFCN 5164b41a30aaSmrg# ---------------- 5165b41a30aaSmrgm4_defun([_LT_HEADER_DLFCN], 5166b41a30aaSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5167b41a30aaSmrg])# _LT_HEADER_DLFCN 5168ea133fd7Smrg 5169ea133fd7Smrg 5170b41a30aaSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5171b41a30aaSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5172b41a30aaSmrg# ---------------------------------------------------------------- 5173b41a30aaSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 5174b41a30aaSmrg[m4_require([_LT_HEADER_DLFCN])dnl 5175b41a30aaSmrgif test yes = "$cross_compiling"; then : 5176b41a30aaSmrg [$4] 5177b41a30aaSmrgelse 5178b41a30aaSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5179b41a30aaSmrg lt_status=$lt_dlunknown 5180b41a30aaSmrg cat > conftest.$ac_ext <<_LT_EOF 5181b41a30aaSmrg[#line $LINENO "configure" 5182b41a30aaSmrg#include "confdefs.h" 5183ea133fd7Smrg 5184b41a30aaSmrg#if HAVE_DLFCN_H 5185b41a30aaSmrg#include <dlfcn.h> 5186b41a30aaSmrg#endif 5187ea133fd7Smrg 5188b41a30aaSmrg#include <stdio.h> 5189ea133fd7Smrg 5190b41a30aaSmrg#ifdef RTLD_GLOBAL 5191b41a30aaSmrg# define LT_DLGLOBAL RTLD_GLOBAL 5192b41a30aaSmrg#else 5193b41a30aaSmrg# ifdef DL_GLOBAL 5194b41a30aaSmrg# define LT_DLGLOBAL DL_GLOBAL 5195b41a30aaSmrg# else 5196b41a30aaSmrg# define LT_DLGLOBAL 0 5197b41a30aaSmrg# endif 5198b41a30aaSmrg#endif 5199ea133fd7Smrg 5200b41a30aaSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5201b41a30aaSmrg find out it does not work in some platform. */ 5202b41a30aaSmrg#ifndef LT_DLLAZY_OR_NOW 5203b41a30aaSmrg# ifdef RTLD_LAZY 5204b41a30aaSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5205b41a30aaSmrg# else 5206b41a30aaSmrg# ifdef DL_LAZY 5207b41a30aaSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 5208b41a30aaSmrg# else 5209b41a30aaSmrg# ifdef RTLD_NOW 5210b41a30aaSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5211b41a30aaSmrg# else 5212b41a30aaSmrg# ifdef DL_NOW 5213b41a30aaSmrg# define LT_DLLAZY_OR_NOW DL_NOW 5214b41a30aaSmrg# else 5215b41a30aaSmrg# define LT_DLLAZY_OR_NOW 0 5216b41a30aaSmrg# endif 5217b41a30aaSmrg# endif 5218b41a30aaSmrg# endif 5219b41a30aaSmrg# endif 5220b41a30aaSmrg#endif 5221ea133fd7Smrg 5222b41a30aaSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 5223b41a30aaSmrg correspondingly for the symbols needed. */ 5224b41a30aaSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5225b41a30aaSmrgint fnord () __attribute__((visibility("default"))); 5226b41a30aaSmrg#endif 5227ea133fd7Smrg 5228b41a30aaSmrgint fnord () { return 42; } 5229b41a30aaSmrgint main () 5230b41a30aaSmrg{ 5231b41a30aaSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5232b41a30aaSmrg int status = $lt_dlunknown; 523306f32fbeSmrg 5234b41a30aaSmrg if (self) 5235b41a30aaSmrg { 5236b41a30aaSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5237b41a30aaSmrg else 5238b41a30aaSmrg { 5239b41a30aaSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5240b41a30aaSmrg else puts (dlerror ()); 5241b41a30aaSmrg } 5242b41a30aaSmrg /* dlclose (self); */ 5243b41a30aaSmrg } 5244b41a30aaSmrg else 5245b41a30aaSmrg puts (dlerror ()); 5246ea133fd7Smrg 5247b41a30aaSmrg return status; 5248b41a30aaSmrg}] 5249b41a30aaSmrg_LT_EOF 5250b41a30aaSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5251b41a30aaSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5252b41a30aaSmrg lt_status=$? 5253b41a30aaSmrg case x$lt_status in 5254b41a30aaSmrg x$lt_dlno_uscore) $1 ;; 5255b41a30aaSmrg x$lt_dlneed_uscore) $2 ;; 5256b41a30aaSmrg x$lt_dlunknown|x*) $3 ;; 5257b41a30aaSmrg esac 5258b41a30aaSmrg else : 5259b41a30aaSmrg # compilation failed 5260b41a30aaSmrg $3 5261b41a30aaSmrg fi 5262b41a30aaSmrgfi 5263b41a30aaSmrgrm -fr conftest* 5264b41a30aaSmrg])# _LT_TRY_DLOPEN_SELF 5265ea133fd7Smrg 5266ea133fd7Smrg 5267b41a30aaSmrg# LT_SYS_DLOPEN_SELF 5268b41a30aaSmrg# ------------------ 5269b41a30aaSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5270b41a30aaSmrg[m4_require([_LT_HEADER_DLFCN])dnl 5271b41a30aaSmrgif test yes != "$enable_dlopen"; then 5272b41a30aaSmrg enable_dlopen=unknown 5273b41a30aaSmrg enable_dlopen_self=unknown 5274b41a30aaSmrg enable_dlopen_self_static=unknown 5275b41a30aaSmrgelse 5276b41a30aaSmrg lt_cv_dlopen=no 5277b41a30aaSmrg lt_cv_dlopen_libs= 5278ea133fd7Smrg 5279b41a30aaSmrg case $host_os in 5280b41a30aaSmrg beos*) 5281b41a30aaSmrg lt_cv_dlopen=load_add_on 5282b41a30aaSmrg lt_cv_dlopen_libs= 5283b41a30aaSmrg lt_cv_dlopen_self=yes 5284b41a30aaSmrg ;; 5285ea133fd7Smrg 5286b41a30aaSmrg mingw* | pw32* | cegcc*) 5287b41a30aaSmrg lt_cv_dlopen=LoadLibrary 5288b41a30aaSmrg lt_cv_dlopen_libs= 5289b41a30aaSmrg ;; 5290ea133fd7Smrg 5291b41a30aaSmrg cygwin*) 5292b41a30aaSmrg lt_cv_dlopen=dlopen 5293b41a30aaSmrg lt_cv_dlopen_libs= 5294b41a30aaSmrg ;; 5295ea133fd7Smrg 5296b41a30aaSmrg darwin*) 5297b41a30aaSmrg # if libdl is installed we need to link against it 5298b41a30aaSmrg AC_CHECK_LIB([dl], [dlopen], 5299b41a30aaSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5300b41a30aaSmrg lt_cv_dlopen=dyld 5301b41a30aaSmrg lt_cv_dlopen_libs= 5302b41a30aaSmrg lt_cv_dlopen_self=yes 5303b41a30aaSmrg ]) 5304b41a30aaSmrg ;; 5305ea133fd7Smrg 5306b41a30aaSmrg tpf*) 5307b41a30aaSmrg # Don't try to run any link tests for TPF. We know it's impossible 5308b41a30aaSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 5309b41a30aaSmrg lt_cv_dlopen=dlopen 5310b41a30aaSmrg lt_cv_dlopen_libs= 5311b41a30aaSmrg lt_cv_dlopen_self=no 5312b41a30aaSmrg ;; 5313ea133fd7Smrg 5314b41a30aaSmrg *) 5315b41a30aaSmrg AC_CHECK_FUNC([shl_load], 5316b41a30aaSmrg [lt_cv_dlopen=shl_load], 5317b41a30aaSmrg [AC_CHECK_LIB([dld], [shl_load], 5318b41a30aaSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5319b41a30aaSmrg [AC_CHECK_FUNC([dlopen], 5320b41a30aaSmrg [lt_cv_dlopen=dlopen], 5321b41a30aaSmrg [AC_CHECK_LIB([dl], [dlopen], 5322b41a30aaSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5323b41a30aaSmrg [AC_CHECK_LIB([svld], [dlopen], 5324b41a30aaSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5325b41a30aaSmrg [AC_CHECK_LIB([dld], [dld_link], 5326b41a30aaSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5327b41a30aaSmrg ]) 5328b41a30aaSmrg ]) 5329b41a30aaSmrg ]) 5330b41a30aaSmrg ]) 5331b41a30aaSmrg ]) 5332b41a30aaSmrg ;; 5333b41a30aaSmrg esac 5334ea133fd7Smrg 5335b41a30aaSmrg if test no = "$lt_cv_dlopen"; then 5336b41a30aaSmrg enable_dlopen=no 5337b41a30aaSmrg else 5338b41a30aaSmrg enable_dlopen=yes 5339b41a30aaSmrg fi 5340ea133fd7Smrg 5341b41a30aaSmrg case $lt_cv_dlopen in 5342b41a30aaSmrg dlopen) 5343b41a30aaSmrg save_CPPFLAGS=$CPPFLAGS 5344b41a30aaSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 5345ea133fd7Smrg 5346b41a30aaSmrg save_LDFLAGS=$LDFLAGS 5347b41a30aaSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5348ea133fd7Smrg 5349b41a30aaSmrg save_LIBS=$LIBS 5350b41a30aaSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 5351ea133fd7Smrg 5352b41a30aaSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 5353b41a30aaSmrg lt_cv_dlopen_self, [dnl 5354b41a30aaSmrg _LT_TRY_DLOPEN_SELF( 5355b41a30aaSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5356b41a30aaSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5357b41a30aaSmrg ]) 5358ea133fd7Smrg 5359b41a30aaSmrg if test yes = "$lt_cv_dlopen_self"; then 5360b41a30aaSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5361b41a30aaSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5362b41a30aaSmrg lt_cv_dlopen_self_static, [dnl 5363b41a30aaSmrg _LT_TRY_DLOPEN_SELF( 5364b41a30aaSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5365b41a30aaSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5366b41a30aaSmrg ]) 5367b41a30aaSmrg fi 5368ea133fd7Smrg 5369b41a30aaSmrg CPPFLAGS=$save_CPPFLAGS 5370b41a30aaSmrg LDFLAGS=$save_LDFLAGS 5371b41a30aaSmrg LIBS=$save_LIBS 5372b41a30aaSmrg ;; 5373b41a30aaSmrg esac 5374ea133fd7Smrg 5375b41a30aaSmrg case $lt_cv_dlopen_self in 5376b41a30aaSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5377b41a30aaSmrg *) enable_dlopen_self=unknown ;; 5378b41a30aaSmrg esac 537931637056Smrg 5380b41a30aaSmrg case $lt_cv_dlopen_self_static in 5381b41a30aaSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5382b41a30aaSmrg *) enable_dlopen_self_static=unknown ;; 5383b41a30aaSmrg esac 5384b41a30aaSmrgfi 5385b41a30aaSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 5386b41a30aaSmrg [Whether dlopen is supported]) 5387b41a30aaSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5388b41a30aaSmrg [Whether dlopen of programs is supported]) 5389b41a30aaSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5390b41a30aaSmrg [Whether dlopen of statically linked programs is supported]) 5391b41a30aaSmrg])# LT_SYS_DLOPEN_SELF 539231637056Smrg 5393b41a30aaSmrg# Old name: 5394b41a30aaSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5395b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 5396b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 539731637056Smrg 539831637056Smrg 5399b41a30aaSmrg# _LT_COMPILER_C_O([TAGNAME]) 5400b41a30aaSmrg# --------------------------- 5401b41a30aaSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 5402b41a30aaSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5403b41a30aaSmrgm4_defun([_LT_COMPILER_C_O], 5404b41a30aaSmrg[m4_require([_LT_DECL_SED])dnl 5405b41a30aaSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5406b41a30aaSmrgm4_require([_LT_TAG_COMPILER])dnl 5407b41a30aaSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5408b41a30aaSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5409b41a30aaSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5410b41a30aaSmrg $RM -r conftest 2>/dev/null 5411b41a30aaSmrg mkdir conftest 5412b41a30aaSmrg cd conftest 5413b41a30aaSmrg mkdir out 5414b41a30aaSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 541531637056Smrg 5416b41a30aaSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 5417b41a30aaSmrg # Insert the option either (1) after the last *FLAGS variable, or 5418b41a30aaSmrg # (2) before a word containing "conftest.", or (3) at the end. 5419b41a30aaSmrg # Note that $ac_compile itself does not contain backslashes and begins 5420b41a30aaSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5421b41a30aaSmrg lt_compile=`echo "$ac_compile" | $SED \ 5422b41a30aaSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5423b41a30aaSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5424b41a30aaSmrg -e 's:$: $lt_compiler_flag:'` 5425b41a30aaSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5426b41a30aaSmrg (eval "$lt_compile" 2>out/conftest.err) 5427b41a30aaSmrg ac_status=$? 5428b41a30aaSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 5429b41a30aaSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5430b41a30aaSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 5431b41a30aaSmrg then 5432b41a30aaSmrg # The compiler can only warn and ignore the option if not recognized 5433b41a30aaSmrg # So say no if there are warnings 5434b41a30aaSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5435b41a30aaSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5436b41a30aaSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5437b41a30aaSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5438b41a30aaSmrg fi 5439b41a30aaSmrg fi 5440b41a30aaSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 5441b41a30aaSmrg $RM conftest* 5442b41a30aaSmrg # SGI C++ compiler will create directory out/ii_files/ for 5443b41a30aaSmrg # template instantiation 5444b41a30aaSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5445b41a30aaSmrg $RM out/* && rmdir out 5446b41a30aaSmrg cd .. 5447b41a30aaSmrg $RM -r conftest 5448b41a30aaSmrg $RM conftest* 5449b41a30aaSmrg]) 5450b41a30aaSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5451b41a30aaSmrg [Does compiler simultaneously support -c and -o options?]) 5452b41a30aaSmrg])# _LT_COMPILER_C_O 545331637056Smrg 545431637056Smrg 5455b41a30aaSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5456b41a30aaSmrg# ---------------------------------- 5457b41a30aaSmrg# Check to see if we can do hard links to lock some files if needed 5458b41a30aaSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 5459b41a30aaSmrg[m4_require([_LT_ENABLE_LOCK])dnl 5460b41a30aaSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5461b41a30aaSmrg_LT_COMPILER_C_O([$1]) 546231637056Smrg 5463b41a30aaSmrghard_links=nottested 5464b41a30aaSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5465b41a30aaSmrg # do not overwrite the value of need_locks provided by the user 5466b41a30aaSmrg AC_MSG_CHECKING([if we can lock with hard links]) 5467b41a30aaSmrg hard_links=yes 5468b41a30aaSmrg $RM conftest* 5469b41a30aaSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5470b41a30aaSmrg touch conftest.a 5471b41a30aaSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 5472b41a30aaSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5473b41a30aaSmrg AC_MSG_RESULT([$hard_links]) 5474b41a30aaSmrg if test no = "$hard_links"; then 5475b41a30aaSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5476b41a30aaSmrg need_locks=warn 5477b41a30aaSmrg fi 5478b41a30aaSmrgelse 5479b41a30aaSmrg need_locks=no 5480b41a30aaSmrgfi 5481b41a30aaSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5482b41a30aaSmrg])# _LT_COMPILER_FILE_LOCKS 548331637056Smrg 548431637056Smrg 5485b41a30aaSmrg# _LT_CHECK_OBJDIR 5486b41a30aaSmrg# ---------------- 5487b41a30aaSmrgm4_defun([_LT_CHECK_OBJDIR], 5488b41a30aaSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5489b41a30aaSmrg[rm -f .libs 2>/dev/null 5490b41a30aaSmrgmkdir .libs 2>/dev/null 5491b41a30aaSmrgif test -d .libs; then 5492b41a30aaSmrg lt_cv_objdir=.libs 5493b41a30aaSmrgelse 5494b41a30aaSmrg # MS-DOS does not allow filenames that begin with a dot. 5495b41a30aaSmrg lt_cv_objdir=_libs 5496b41a30aaSmrgfi 5497b41a30aaSmrgrmdir .libs 2>/dev/null]) 5498b41a30aaSmrgobjdir=$lt_cv_objdir 5499b41a30aaSmrg_LT_DECL([], [objdir], [0], 5500b41a30aaSmrg [The name of the directory that contains temporary libtool files])dnl 5501b41a30aaSmrgm4_pattern_allow([LT_OBJDIR])dnl 5502b41a30aaSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5503b41a30aaSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 5504b41a30aaSmrg])# _LT_CHECK_OBJDIR 550531637056Smrg 550631637056Smrg 5507b41a30aaSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5508b41a30aaSmrg# -------------------------------------- 5509b41a30aaSmrg# Check hardcoding attributes. 5510b41a30aaSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5511b41a30aaSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5512b41a30aaSmrg_LT_TAGVAR(hardcode_action, $1)= 5513b41a30aaSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5514b41a30aaSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 5515b41a30aaSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 551631637056Smrg 5517b41a30aaSmrg # We can hardcode non-existent directories. 5518b41a30aaSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5519b41a30aaSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 5520b41a30aaSmrg # have to relink, otherwise we might link with an installed library 5521b41a30aaSmrg # when we should be linking with a yet-to-be-installed one 5522b41a30aaSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5523b41a30aaSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5524b41a30aaSmrg # Linking always hardcodes the temporary library directory. 5525b41a30aaSmrg _LT_TAGVAR(hardcode_action, $1)=relink 5526b41a30aaSmrg else 5527b41a30aaSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 5528b41a30aaSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 5529b41a30aaSmrg fi 5530b41a30aaSmrgelse 5531b41a30aaSmrg # We cannot hardcode anything, or else we can only hardcode existing 5532b41a30aaSmrg # directories. 5533b41a30aaSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 5534b41a30aaSmrgfi 5535b41a30aaSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 553631637056Smrg 5537b41a30aaSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5538b41a30aaSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5539b41a30aaSmrg # Fast installation is not supported 5540b41a30aaSmrg enable_fast_install=no 5541b41a30aaSmrgelif test yes = "$shlibpath_overrides_runpath" || 5542b41a30aaSmrg test no = "$enable_shared"; then 5543b41a30aaSmrg # Fast installation is not necessary 5544b41a30aaSmrg enable_fast_install=needless 5545b41a30aaSmrgfi 5546b41a30aaSmrg_LT_TAGDECL([], [hardcode_action], [0], 5547b41a30aaSmrg [How to hardcode a shared library path into an executable]) 5548b41a30aaSmrg])# _LT_LINKER_HARDCODE_LIBPATH 554931637056Smrg 555031637056Smrg 5551b41a30aaSmrg# _LT_CMD_STRIPLIB 5552b41a30aaSmrg# ---------------- 5553b41a30aaSmrgm4_defun([_LT_CMD_STRIPLIB], 5554b41a30aaSmrg[m4_require([_LT_DECL_EGREP]) 5555b41a30aaSmrgstriplib= 5556b41a30aaSmrgold_striplib= 5557b41a30aaSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 5558b41a30aaSmrgif test -z "$STRIP"; then 5559b41a30aaSmrg AC_MSG_RESULT([no]) 5560b41a30aaSmrgelse 5561b41a30aaSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5562b41a30aaSmrg old_striplib="$STRIP --strip-debug" 5563b41a30aaSmrg striplib="$STRIP --strip-unneeded" 5564b41a30aaSmrg AC_MSG_RESULT([yes]) 5565b41a30aaSmrg else 5566b41a30aaSmrg case $host_os in 5567b41a30aaSmrg darwin*) 5568b41a30aaSmrg # FIXME - insert some real tests, host_os isn't really good enough 5569b41a30aaSmrg striplib="$STRIP -x" 5570b41a30aaSmrg old_striplib="$STRIP -S" 5571b41a30aaSmrg AC_MSG_RESULT([yes]) 5572b41a30aaSmrg ;; 5573b41a30aaSmrg freebsd*) 5574b41a30aaSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5575b41a30aaSmrg old_striplib="$STRIP --strip-debug" 5576b41a30aaSmrg striplib="$STRIP --strip-unneeded" 5577b41a30aaSmrg AC_MSG_RESULT([yes]) 5578b41a30aaSmrg else 5579b41a30aaSmrg AC_MSG_RESULT([no]) 5580b41a30aaSmrg fi 5581b41a30aaSmrg ;; 5582b41a30aaSmrg *) 5583b41a30aaSmrg AC_MSG_RESULT([no]) 5584b41a30aaSmrg ;; 5585b41a30aaSmrg esac 5586b41a30aaSmrg fi 5587b41a30aaSmrgfi 5588b41a30aaSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5589b41a30aaSmrg_LT_DECL([], [striplib], [1]) 5590b41a30aaSmrg])# _LT_CMD_STRIPLIB 559131637056Smrg 559231637056Smrg 5593b41a30aaSmrg# _LT_PREPARE_MUNGE_PATH_LIST 5594b41a30aaSmrg# --------------------------- 5595b41a30aaSmrg# Make sure func_munge_path_list() is defined correctly. 5596b41a30aaSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5597b41a30aaSmrg[[# func_munge_path_list VARIABLE PATH 5598b41a30aaSmrg# ----------------------------------- 5599b41a30aaSmrg# VARIABLE is name of variable containing _space_ separated list of 5600b41a30aaSmrg# directories to be munged by the contents of PATH, which is string 5601b41a30aaSmrg# having a format: 5602b41a30aaSmrg# "DIR[:DIR]:" 5603b41a30aaSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 5604b41a30aaSmrg# ":DIR[:DIR]" 5605b41a30aaSmrg# string "DIR[ DIR]" will be appended to VARIABLE 5606b41a30aaSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 5607b41a30aaSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5608b41a30aaSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 5609b41a30aaSmrg# "DIR[:DIR]" 5610b41a30aaSmrg# VARIABLE will be replaced by "DIR[ DIR]" 5611b41a30aaSmrgfunc_munge_path_list () 5612b41a30aaSmrg{ 5613b41a30aaSmrg case x@S|@2 in 5614b41a30aaSmrg x) 561531637056Smrg ;; 5616b41a30aaSmrg *:) 5617b41a30aaSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 561831637056Smrg ;; 5619b41a30aaSmrg x:*) 5620b41a30aaSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 562131637056Smrg ;; 5622b41a30aaSmrg *::*) 5623b41a30aaSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5624b41a30aaSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5625b41a30aaSmrg ;; 5626b41a30aaSmrg *) 5627b41a30aaSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5628b41a30aaSmrg ;; 5629b41a30aaSmrg esac 5630b41a30aaSmrg} 5631b41a30aaSmrg]])# _LT_PREPARE_PATH_LIST 563231637056Smrg 563331637056Smrg 5634b41a30aaSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 5635b41a30aaSmrg# ----------------------------- 5636b41a30aaSmrg# PORTME Fill in your ld.so characteristics 5637b41a30aaSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 5638b41a30aaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5639b41a30aaSmrgm4_require([_LT_DECL_EGREP])dnl 5640b41a30aaSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5641b41a30aaSmrgm4_require([_LT_DECL_OBJDUMP])dnl 5642b41a30aaSmrgm4_require([_LT_DECL_SED])dnl 5643b41a30aaSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 5644b41a30aaSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5645b41a30aaSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 5646b41a30aaSmrgm4_if([$1], 5647b41a30aaSmrg [], [ 5648b41a30aaSmrgif test yes = "$GCC"; then 5649b41a30aaSmrg case $host_os in 5650b41a30aaSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5651b41a30aaSmrg *) lt_awk_arg='/^libraries:/' ;; 5652b41a30aaSmrg esac 5653b41a30aaSmrg case $host_os in 5654b41a30aaSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5655b41a30aaSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 5656b41a30aaSmrg esac 5657b41a30aaSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5658b41a30aaSmrg case $lt_search_path_spec in 5659b41a30aaSmrg *\;*) 5660b41a30aaSmrg # if the path contains ";" then we assume it to be the separator 5661b41a30aaSmrg # otherwise default to the standard path separator (i.e. ":") - it is 5662b41a30aaSmrg # assumed that no part of a normal pathname contains ";" but that should 5663b41a30aaSmrg # okay in the real world where ";" in dirpaths is itself problematic. 5664b41a30aaSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5665b41a30aaSmrg ;; 5666b41a30aaSmrg *) 5667b41a30aaSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5668b41a30aaSmrg ;; 5669b41a30aaSmrg esac 5670b41a30aaSmrg # Ok, now we have the path, separated by spaces, we can step through it 5671b41a30aaSmrg # and add multilib dir if necessary... 5672b41a30aaSmrg lt_tmp_lt_search_path_spec= 5673b41a30aaSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5674b41a30aaSmrg # ...but if some path component already ends with the multilib dir we assume 5675b41a30aaSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5676b41a30aaSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 5677b41a30aaSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5678b41a30aaSmrg lt_multi_os_dir= 5679b41a30aaSmrg ;; 5680b41a30aaSmrg esac 5681b41a30aaSmrg for lt_sys_path in $lt_search_path_spec; do 5682b41a30aaSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 5683b41a30aaSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5684b41a30aaSmrg elif test -n "$lt_multi_os_dir"; then 5685b41a30aaSmrg test -d "$lt_sys_path" && \ 5686b41a30aaSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5687b41a30aaSmrg fi 5688b41a30aaSmrg done 5689b41a30aaSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5690b41a30aaSmrgBEGIN {RS = " "; FS = "/|\n";} { 5691b41a30aaSmrg lt_foo = ""; 5692b41a30aaSmrg lt_count = 0; 5693b41a30aaSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 5694b41a30aaSmrg if ($lt_i != "" && $lt_i != ".") { 5695b41a30aaSmrg if ($lt_i == "..") { 5696b41a30aaSmrg lt_count++; 5697b41a30aaSmrg } else { 5698b41a30aaSmrg if (lt_count == 0) { 5699b41a30aaSmrg lt_foo = "/" $lt_i lt_foo; 5700b41a30aaSmrg } else { 5701b41a30aaSmrg lt_count--; 5702b41a30aaSmrg } 5703b41a30aaSmrg } 5704b41a30aaSmrg } 5705b41a30aaSmrg } 5706b41a30aaSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5707b41a30aaSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5708b41a30aaSmrg}'` 5709b41a30aaSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 5710b41a30aaSmrg # for these hosts. 5711b41a30aaSmrg case $host_os in 5712b41a30aaSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5713b41a30aaSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5714b41a30aaSmrg esac 5715b41a30aaSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5716b41a30aaSmrgelse 5717b41a30aaSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5718b41a30aaSmrgfi]) 5719b41a30aaSmrglibrary_names_spec= 5720b41a30aaSmrglibname_spec='lib$name' 5721b41a30aaSmrgsoname_spec= 5722b41a30aaSmrgshrext_cmds=.so 5723b41a30aaSmrgpostinstall_cmds= 5724b41a30aaSmrgpostuninstall_cmds= 5725b41a30aaSmrgfinish_cmds= 5726b41a30aaSmrgfinish_eval= 5727b41a30aaSmrgshlibpath_var= 5728b41a30aaSmrgshlibpath_overrides_runpath=unknown 5729b41a30aaSmrgversion_type=none 5730b41a30aaSmrgdynamic_linker="$host_os ld.so" 5731b41a30aaSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 5732b41a30aaSmrgneed_lib_prefix=unknown 5733b41a30aaSmrghardcode_into_libs=no 573431637056Smrg 5735b41a30aaSmrg# when you set need_version to no, make sure it does not cause -set_version 5736b41a30aaSmrg# flags to be left without arguments 5737b41a30aaSmrgneed_version=unknown 573831637056Smrg 5739b41a30aaSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5740b41a30aaSmrg[User-defined run-time library search path.]) 574131637056Smrg 5742b41a30aaSmrgcase $host_os in 5743b41a30aaSmrgaix3*) 5744b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 5745b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5746b41a30aaSmrg shlibpath_var=LIBPATH 574731637056Smrg 5748b41a30aaSmrg # AIX 3 has no versioning support, so we append a major version to the name. 5749b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 5750b41a30aaSmrg ;; 575131637056Smrg 5752b41a30aaSmrgaix[[4-9]]*) 5753b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 5754b41a30aaSmrg need_lib_prefix=no 5755b41a30aaSmrg need_version=no 5756b41a30aaSmrg hardcode_into_libs=yes 5757b41a30aaSmrg if test ia64 = "$host_cpu"; then 5758b41a30aaSmrg # AIX 5 supports IA64 5759b41a30aaSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5760b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 5761b41a30aaSmrg else 5762b41a30aaSmrg # With GCC up to 2.95.x, collect2 would create an import file 5763b41a30aaSmrg # for dependence libraries. The import file would start with 5764b41a30aaSmrg # the line '#! .'. This would cause the generated library to 5765b41a30aaSmrg # depend on '.', always an invalid library. This was fixed in 5766b41a30aaSmrg # development snapshots of GCC prior to 3.0. 5767b41a30aaSmrg case $host_os in 5768b41a30aaSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 5769b41a30aaSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5770b41a30aaSmrg echo ' yes ' 5771b41a30aaSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5772b41a30aaSmrg : 5773b41a30aaSmrg else 5774b41a30aaSmrg can_build_shared=no 5775b41a30aaSmrg fi 577631637056Smrg ;; 5777b41a30aaSmrg esac 5778b41a30aaSmrg # Using Import Files as archive members, it is possible to support 5779b41a30aaSmrg # filename-based versioning of shared library archives on AIX. While 5780b41a30aaSmrg # this would work for both with and without runtime linking, it will 5781b41a30aaSmrg # prevent static linking of such archives. So we do filename-based 5782b41a30aaSmrg # shared library versioning with .so extension only, which is used 5783b41a30aaSmrg # when both runtime linking and shared linking is enabled. 5784b41a30aaSmrg # Unfortunately, runtime linking may impact performance, so we do 5785b41a30aaSmrg # not want this to be the default eventually. Also, we use the 5786b41a30aaSmrg # versioned .so libs for executables only if there is the -brtl 5787b41a30aaSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5788b41a30aaSmrg # To allow for filename-based versioning support, we need to create 5789b41a30aaSmrg # libNAME.so.V as an archive file, containing: 5790b41a30aaSmrg # *) an Import File, referring to the versioned filename of the 5791b41a30aaSmrg # archive as well as the shared archive member, telling the 5792b41a30aaSmrg # bitwidth (32 or 64) of that shared object, and providing the 5793b41a30aaSmrg # list of exported symbols of that shared object, eventually 5794b41a30aaSmrg # decorated with the 'weak' keyword 5795b41a30aaSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 5796b41a30aaSmrg # it being seen by the linker. 5797b41a30aaSmrg # At run time we better use the real file rather than another symlink, 5798b41a30aaSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5799b41a30aaSmrg 5800b41a30aaSmrg case $with_aix_soname,$aix_use_runtimelinking in 5801b41a30aaSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5802b41a30aaSmrg # soname into executable. Probably we can add versioning support to 5803b41a30aaSmrg # collect2, so additional links can be useful in future. 5804b41a30aaSmrg aix,yes) # traditional libtool 5805b41a30aaSmrg dynamic_linker='AIX unversionable lib.so' 5806b41a30aaSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5807b41a30aaSmrg # instead of lib<name>.a to let people know that these are not 5808b41a30aaSmrg # typical AIX shared libraries. 5809b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5810b41a30aaSmrg ;; 5811b41a30aaSmrg aix,no) # traditional AIX only 5812b41a30aaSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5813b41a30aaSmrg # We preserve .a as extension for shared libraries through AIX4.2 5814b41a30aaSmrg # and later when we are not doing run time linking. 5815b41a30aaSmrg library_names_spec='$libname$release.a $libname.a' 5816b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 5817b41a30aaSmrg ;; 5818b41a30aaSmrg svr4,*) # full svr4 only 5819b41a30aaSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5820b41a30aaSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5821b41a30aaSmrg # We do not specify a path in Import Files, so LIBPATH fires. 5822b41a30aaSmrg shlibpath_overrides_runpath=yes 5823b41a30aaSmrg ;; 5824b41a30aaSmrg *,yes) # both, prefer svr4 5825b41a30aaSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5826b41a30aaSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5827b41a30aaSmrg # unpreferred sharedlib libNAME.a needs extra handling 5828b41a30aaSmrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 5829b41a30aaSmrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 5830b41a30aaSmrg # We do not specify a path in Import Files, so LIBPATH fires. 5831b41a30aaSmrg shlibpath_overrides_runpath=yes 5832b41a30aaSmrg ;; 5833b41a30aaSmrg *,no) # both, prefer aix 5834b41a30aaSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5835b41a30aaSmrg library_names_spec='$libname$release.a $libname.a' 5836b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 5837b41a30aaSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5838b41a30aaSmrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 5839b41a30aaSmrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 584031637056Smrg ;; 584131637056Smrg esac 5842b41a30aaSmrg shlibpath_var=LIBPATH 5843b41a30aaSmrg fi 5844b41a30aaSmrg ;; 584531637056Smrg 5846b41a30aaSmrgamigaos*) 5847b41a30aaSmrg case $host_cpu in 5848b41a30aaSmrg powerpc) 5849b41a30aaSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 5850b41a30aaSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5851b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5852b41a30aaSmrg ;; 5853b41a30aaSmrg m68k) 5854b41a30aaSmrg library_names_spec='$libname.ixlibrary $libname.a' 5855b41a30aaSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 5856b41a30aaSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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' 5857b41a30aaSmrg ;; 5858b41a30aaSmrg esac 5859b41a30aaSmrg ;; 586031637056Smrg 5861b41a30aaSmrgbeos*) 5862b41a30aaSmrg library_names_spec='$libname$shared_ext' 5863b41a30aaSmrg dynamic_linker="$host_os ld.so" 5864b41a30aaSmrg shlibpath_var=LIBRARY_PATH 5865b41a30aaSmrg ;; 586631637056Smrg 5867b41a30aaSmrgbsdi[[45]]*) 5868b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 5869b41a30aaSmrg need_version=no 5870b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5871b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 5872b41a30aaSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5873b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 5874b41a30aaSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5875b41a30aaSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5876b41a30aaSmrg # the default ld.so.conf also contains /usr/contrib/lib and 5877b41a30aaSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5878b41a30aaSmrg # libtool to hard-code these into programs 5879b41a30aaSmrg ;; 588031637056Smrg 5881b41a30aaSmrgcygwin* | mingw* | pw32* | cegcc*) 5882b41a30aaSmrg version_type=windows 5883b41a30aaSmrg shrext_cmds=.dll 5884b41a30aaSmrg need_version=no 5885b41a30aaSmrg need_lib_prefix=no 588631637056Smrg 5887b41a30aaSmrg case $GCC,$cc_basename in 5888b41a30aaSmrg yes,*) 5889b41a30aaSmrg # gcc 5890b41a30aaSmrg library_names_spec='$libname.dll.a' 5891b41a30aaSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5892b41a30aaSmrg postinstall_cmds='base_file=`basename \$file`~ 5893b41a30aaSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5894b41a30aaSmrg dldir=$destdir/`dirname \$dlpath`~ 5895b41a30aaSmrg test -d \$dldir || mkdir -p \$dldir~ 5896b41a30aaSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 5897b41a30aaSmrg chmod a+x \$dldir/$dlname~ 5898b41a30aaSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5899b41a30aaSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5900b41a30aaSmrg fi' 5901b41a30aaSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5902b41a30aaSmrg dlpath=$dir/\$dldll~ 5903b41a30aaSmrg $RM \$dlpath' 5904b41a30aaSmrg shlibpath_overrides_runpath=yes 590531637056Smrg 5906b41a30aaSmrg case $host_os in 5907b41a30aaSmrg cygwin*) 5908b41a30aaSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5909b41a30aaSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5910b41a30aaSmrgm4_if([$1], [],[ 5911b41a30aaSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5912b41a30aaSmrg ;; 5913b41a30aaSmrg mingw* | cegcc*) 5914b41a30aaSmrg # MinGW DLLs use traditional 'lib' prefix 5915b41a30aaSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5916b41a30aaSmrg ;; 5917b41a30aaSmrg pw32*) 5918b41a30aaSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 5919b41a30aaSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5920b41a30aaSmrg ;; 5921b41a30aaSmrg esac 5922b41a30aaSmrg dynamic_linker='Win32 ld.exe' 5923b41a30aaSmrg ;; 592431637056Smrg 5925b41a30aaSmrg *,cl* | *,icl*) 5926b41a30aaSmrg # Native MSVC or ICC 5927b41a30aaSmrg libname_spec='$name' 5928b41a30aaSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5929b41a30aaSmrg library_names_spec='$libname.dll.lib' 593031637056Smrg 5931b41a30aaSmrg case $build_os in 5932b41a30aaSmrg mingw*) 5933b41a30aaSmrg sys_lib_search_path_spec= 5934b41a30aaSmrg lt_save_ifs=$IFS 5935b41a30aaSmrg IFS=';' 5936b41a30aaSmrg for lt_path in $LIB 5937b41a30aaSmrg do 5938b41a30aaSmrg IFS=$lt_save_ifs 5939b41a30aaSmrg # Let DOS variable expansion print the short 8.3 style file name. 5940b41a30aaSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 5941b41a30aaSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 5942b41a30aaSmrg done 5943b41a30aaSmrg IFS=$lt_save_ifs 5944b41a30aaSmrg # Convert to MSYS style. 5945b41a30aaSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 5946b41a30aaSmrg ;; 5947b41a30aaSmrg cygwin*) 5948b41a30aaSmrg # Convert to unix form, then to dos form, then back to unix form 5949b41a30aaSmrg # but this time dos style (no spaces!) so that the unix form looks 5950b41a30aaSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 5951b41a30aaSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 5952b41a30aaSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 5953b41a30aaSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5954b41a30aaSmrg ;; 5955b41a30aaSmrg *) 5956b41a30aaSmrg sys_lib_search_path_spec=$LIB 5957b41a30aaSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 5958b41a30aaSmrg # It is most probably a Windows format PATH. 5959b41a30aaSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 5960b41a30aaSmrg else 5961b41a30aaSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5962b41a30aaSmrg fi 5963b41a30aaSmrg # FIXME: find the short name or the path components, as spaces are 5964b41a30aaSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 5965b41a30aaSmrg ;; 5966b41a30aaSmrg esac 596731637056Smrg 5968b41a30aaSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5969b41a30aaSmrg postinstall_cmds='base_file=`basename \$file`~ 5970b41a30aaSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5971b41a30aaSmrg dldir=$destdir/`dirname \$dlpath`~ 5972b41a30aaSmrg test -d \$dldir || mkdir -p \$dldir~ 5973b41a30aaSmrg $install_prog $dir/$dlname \$dldir/$dlname' 5974b41a30aaSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5975b41a30aaSmrg dlpath=$dir/\$dldll~ 5976b41a30aaSmrg $RM \$dlpath' 5977b41a30aaSmrg shlibpath_overrides_runpath=yes 5978b41a30aaSmrg dynamic_linker='Win32 link.exe' 5979b41a30aaSmrg ;; 598031637056Smrg 5981b41a30aaSmrg *) 5982b41a30aaSmrg # Assume MSVC and ICC wrapper 5983b41a30aaSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 5984b41a30aaSmrg dynamic_linker='Win32 ld.exe' 5985b41a30aaSmrg ;; 5986b41a30aaSmrg esac 5987b41a30aaSmrg # FIXME: first we should search . and the directory the executable is in 5988b41a30aaSmrg shlibpath_var=PATH 5989b41a30aaSmrg ;; 599031637056Smrg 5991b41a30aaSmrgdarwin* | rhapsody*) 5992b41a30aaSmrg dynamic_linker="$host_os dyld" 5993b41a30aaSmrg version_type=darwin 5994b41a30aaSmrg need_lib_prefix=no 5995b41a30aaSmrg need_version=no 5996b41a30aaSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 5997b41a30aaSmrg soname_spec='$libname$release$major$shared_ext' 5998b41a30aaSmrg shlibpath_overrides_runpath=yes 5999b41a30aaSmrg shlibpath_var=DYLD_LIBRARY_PATH 6000b41a30aaSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6001b41a30aaSmrgm4_if([$1], [],[ 6002b41a30aaSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6003b41a30aaSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6004b41a30aaSmrg ;; 600531637056Smrg 6006b41a30aaSmrgdgux*) 6007b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6008b41a30aaSmrg need_lib_prefix=no 6009b41a30aaSmrg need_version=no 6010b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6011b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6012b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6013b41a30aaSmrg ;; 601431637056Smrg 6015b41a30aaSmrgfreebsd* | dragonfly* | midnightbsd*) 6016b41a30aaSmrg # DragonFly does not have aout. When/if they implement a new 6017b41a30aaSmrg # versioning mechanism, adjust this. 6018b41a30aaSmrg if test -x /usr/bin/objformat; then 6019b41a30aaSmrg objformat=`/usr/bin/objformat` 6020b41a30aaSmrg else 6021b41a30aaSmrg case $host_os in 6022b41a30aaSmrg freebsd[[23]].*) objformat=aout ;; 6023b41a30aaSmrg *) objformat=elf ;; 6024b41a30aaSmrg esac 6025b41a30aaSmrg fi 6026b41a30aaSmrg version_type=freebsd-$objformat 6027b41a30aaSmrg case $version_type in 6028b41a30aaSmrg freebsd-elf*) 6029b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6030b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6031b41a30aaSmrg need_version=no 6032b41a30aaSmrg need_lib_prefix=no 6033b41a30aaSmrg ;; 6034b41a30aaSmrg freebsd-*) 6035b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6036b41a30aaSmrg need_version=yes 6037b41a30aaSmrg ;; 6038b41a30aaSmrg esac 6039b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6040b41a30aaSmrg case $host_os in 6041b41a30aaSmrg freebsd2.*) 6042b41a30aaSmrg shlibpath_overrides_runpath=yes 6043b41a30aaSmrg ;; 6044b41a30aaSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6045b41a30aaSmrg shlibpath_overrides_runpath=yes 6046b41a30aaSmrg hardcode_into_libs=yes 6047b41a30aaSmrg ;; 6048b41a30aaSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6049b41a30aaSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6050b41a30aaSmrg shlibpath_overrides_runpath=no 6051b41a30aaSmrg hardcode_into_libs=yes 6052b41a30aaSmrg ;; 6053b41a30aaSmrg *) # from 4.6 on, and DragonFly 6054b41a30aaSmrg shlibpath_overrides_runpath=yes 6055b41a30aaSmrg hardcode_into_libs=yes 6056b41a30aaSmrg ;; 6057b41a30aaSmrg esac 6058b41a30aaSmrg ;; 605931637056Smrg 6060b41a30aaSmrghaiku*) 6061b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6062b41a30aaSmrg need_lib_prefix=no 6063b41a30aaSmrg need_version=no 6064b41a30aaSmrg dynamic_linker="$host_os runtime_loader" 6065b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6066b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6067b41a30aaSmrg shlibpath_var=LIBRARY_PATH 6068b41a30aaSmrg shlibpath_overrides_runpath=no 6069b41a30aaSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6070b41a30aaSmrg hardcode_into_libs=yes 6071b41a30aaSmrg ;; 607231637056Smrg 6073b41a30aaSmrghpux9* | hpux10* | hpux11*) 6074b41a30aaSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 6075b41a30aaSmrg # link against other versions. 6076b41a30aaSmrg version_type=sunos 6077b41a30aaSmrg need_lib_prefix=no 6078b41a30aaSmrg need_version=no 6079b41a30aaSmrg case $host_cpu in 6080b41a30aaSmrg ia64*) 6081b41a30aaSmrg shrext_cmds='.so' 6082b41a30aaSmrg hardcode_into_libs=yes 6083b41a30aaSmrg dynamic_linker="$host_os dld.so" 6084b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6085b41a30aaSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6086b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6087b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6088b41a30aaSmrg if test 32 = "$HPUX_IA64_MODE"; then 6089b41a30aaSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6090b41a30aaSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6091b41a30aaSmrg else 6092b41a30aaSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6093b41a30aaSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6094b41a30aaSmrg fi 6095b41a30aaSmrg ;; 6096b41a30aaSmrg hppa*64*) 6097b41a30aaSmrg shrext_cmds='.sl' 6098b41a30aaSmrg hardcode_into_libs=yes 6099b41a30aaSmrg dynamic_linker="$host_os dld.sl" 6100b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6101b41a30aaSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6102b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6103b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6104b41a30aaSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6105b41a30aaSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6106b41a30aaSmrg ;; 6107b41a30aaSmrg *) 6108b41a30aaSmrg shrext_cmds='.sl' 6109b41a30aaSmrg dynamic_linker="$host_os dld.sl" 6110b41a30aaSmrg shlibpath_var=SHLIB_PATH 6111b41a30aaSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6112b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6113b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6114b41a30aaSmrg ;; 6115b41a30aaSmrg esac 6116b41a30aaSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6117b41a30aaSmrg postinstall_cmds='chmod 555 $lib' 6118b41a30aaSmrg # or fails outright, so override atomically: 6119b41a30aaSmrg install_override_mode=555 6120b41a30aaSmrg ;; 612106f32fbeSmrg 612231637056Smrginterix[[3-9]]*) 6123b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6124b41a30aaSmrg need_lib_prefix=no 6125b41a30aaSmrg need_version=no 6126b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6127b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6128b41a30aaSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6129b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6130b41a30aaSmrg shlibpath_overrides_runpath=no 6131b41a30aaSmrg hardcode_into_libs=yes 613231637056Smrg ;; 613306f32fbeSmrg 6134b41a30aaSmrgirix5* | irix6* | nonstopux*) 6135b41a30aaSmrg case $host_os in 6136b41a30aaSmrg nonstopux*) version_type=nonstopux ;; 6137b41a30aaSmrg *) 6138b41a30aaSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 6139b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6140b41a30aaSmrg else 6141b41a30aaSmrg version_type=irix 6142b41a30aaSmrg fi ;; 6143b41a30aaSmrg esac 6144b41a30aaSmrg need_lib_prefix=no 6145b41a30aaSmrg need_version=no 6146b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6147b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6148b41a30aaSmrg case $host_os in 6149b41a30aaSmrg irix5* | nonstopux*) 6150b41a30aaSmrg libsuff= shlibsuff= 6151b41a30aaSmrg ;; 6152b41a30aaSmrg *) 6153b41a30aaSmrg case $LD in # libtool.m4 will add one of these switches to LD 6154b41a30aaSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6155b41a30aaSmrg libsuff= shlibsuff= libmagic=32-bit;; 6156b41a30aaSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6157b41a30aaSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6158b41a30aaSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6159b41a30aaSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6160b41a30aaSmrg *) libsuff= shlibsuff= libmagic=never-match;; 616131637056Smrg esac 616231637056Smrg ;; 616331637056Smrg esac 6164b41a30aaSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6165b41a30aaSmrg shlibpath_overrides_runpath=no 6166b41a30aaSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6167b41a30aaSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6168b41a30aaSmrg hardcode_into_libs=yes 616931637056Smrg ;; 617006f32fbeSmrg 6171b41a30aaSmrg# No shared lib support for Linux oldld, aout, or coff. 6172b41a30aaSmrglinux*oldld* | linux*aout* | linux*coff*) 6173b41a30aaSmrg dynamic_linker=no 617431637056Smrg ;; 617531637056Smrg 6176b41a30aaSmrglinux*android*) 6177b41a30aaSmrg version_type=none # Android doesn't support versioned libraries. 6178b41a30aaSmrg need_lib_prefix=no 6179b41a30aaSmrg need_version=no 6180b41a30aaSmrg library_names_spec='$libname$release$shared_ext' 6181b41a30aaSmrg soname_spec='$libname$release$shared_ext' 6182b41a30aaSmrg finish_cmds= 6183b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6184b41a30aaSmrg shlibpath_overrides_runpath=yes 618531637056Smrg 6186b41a30aaSmrg # This implies no fast_install, which is unacceptable. 6187b41a30aaSmrg # Some rework will be needed to allow for fast_install 6188b41a30aaSmrg # before this can be enabled. 6189b41a30aaSmrg hardcode_into_libs=yes 619031637056Smrg 6191b41a30aaSmrg dynamic_linker='Android linker' 6192b41a30aaSmrg # Don't embed -rpath directories since the linker doesn't support them. 6193b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6194b41a30aaSmrg ;; 619531637056Smrg 6196b41a30aaSmrg# This must be glibc/ELF. 6197b41a30aaSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6198b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6199b41a30aaSmrg need_lib_prefix=no 6200b41a30aaSmrg need_version=no 6201b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6202b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6203b41a30aaSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6204b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6205b41a30aaSmrg shlibpath_overrides_runpath=no 620606f32fbeSmrg 6207b41a30aaSmrg # Some binutils ld are patched to set DT_RUNPATH 6208b41a30aaSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6209b41a30aaSmrg [lt_cv_shlibpath_overrides_runpath=no 6210b41a30aaSmrg save_LDFLAGS=$LDFLAGS 6211b41a30aaSmrg save_libdir=$libdir 6212b41a30aaSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6213b41a30aaSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6214b41a30aaSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6215b41a30aaSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6216b41a30aaSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6217b41a30aaSmrg LDFLAGS=$save_LDFLAGS 6218b41a30aaSmrg libdir=$save_libdir 6219b41a30aaSmrg ]) 6220b41a30aaSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 622106f32fbeSmrg 6222b41a30aaSmrg # This implies no fast_install, which is unacceptable. 6223b41a30aaSmrg # Some rework will be needed to allow for fast_install 6224b41a30aaSmrg # before this can be enabled. 6225b41a30aaSmrg hardcode_into_libs=yes 622606f32fbeSmrg 6227b41a30aaSmrg # Ideally, we could use ldconfig to report *all* directores which are 6228b41a30aaSmrg # searched for libraries, however this is still not possible. Aside from not 6229b41a30aaSmrg # being certain /sbin/ldconfig is available, command 6230b41a30aaSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6231b41a30aaSmrg # even though it is searched at run-time. Try to do the best guess by 6232b41a30aaSmrg # appending ld.so.conf contents (and includes) to the search path. 6233b41a30aaSmrg if test -f /etc/ld.so.conf; then 6234b41a30aaSmrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 6235b41a30aaSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6236b41a30aaSmrg fi 623706f32fbeSmrg 6238b41a30aaSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6239b41a30aaSmrg # powerpc, because MkLinux only supported shared libraries with the 6240b41a30aaSmrg # GNU dynamic linker. Since this was broken with cross compilers, 6241b41a30aaSmrg # most powerpc-linux boxes support dynamic linking these days and 6242b41a30aaSmrg # people can always --disable-shared, the test was removed, and we 6243b41a30aaSmrg # assume the GNU/Linux dynamic linker is in use. 6244b41a30aaSmrg dynamic_linker='GNU/Linux ld.so' 6245b41a30aaSmrg ;; 624606f32fbeSmrg 6247b41a30aaSmrgnetbsd*) 6248b41a30aaSmrg version_type=sunos 6249b41a30aaSmrg need_lib_prefix=no 6250b41a30aaSmrg need_version=no 6251b41a30aaSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6252b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6253b41a30aaSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6254b41a30aaSmrg dynamic_linker='NetBSD (a.out) ld.so' 6255b41a30aaSmrg else 6256b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6257b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6258b41a30aaSmrg dynamic_linker='NetBSD ld.elf_so' 6259b41a30aaSmrg fi 6260b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6261b41a30aaSmrg shlibpath_overrides_runpath=yes 6262b41a30aaSmrg hardcode_into_libs=yes 6263b41a30aaSmrg ;; 626406f32fbeSmrg 6265b41a30aaSmrgnewsos6) 6266b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6267b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6268b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6269b41a30aaSmrg shlibpath_overrides_runpath=yes 6270b41a30aaSmrg ;; 627106f32fbeSmrg 6272b41a30aaSmrg*nto* | *qnx*) 6273b41a30aaSmrg version_type=qnx 6274b41a30aaSmrg need_lib_prefix=no 6275b41a30aaSmrg need_version=no 6276b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6277b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6278b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6279b41a30aaSmrg shlibpath_overrides_runpath=no 6280b41a30aaSmrg hardcode_into_libs=yes 6281b41a30aaSmrg dynamic_linker='ldqnx.so' 6282b41a30aaSmrg ;; 628306f32fbeSmrg 6284b41a30aaSmrgopenbsd* | bitrig*) 6285b41a30aaSmrg version_type=sunos 6286b41a30aaSmrg sys_lib_dlsearch_path_spec=/usr/lib 6287b41a30aaSmrg need_lib_prefix=no 6288b41a30aaSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6289b41a30aaSmrg need_version=no 6290b41a30aaSmrg else 6291b41a30aaSmrg need_version=yes 6292b41a30aaSmrg fi 6293b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6294b41a30aaSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6295b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6296b41a30aaSmrg shlibpath_overrides_runpath=yes 6297b41a30aaSmrg ;; 629806f32fbeSmrg 6299b41a30aaSmrgos2*) 6300b41a30aaSmrg libname_spec='$name' 6301b41a30aaSmrg version_type=windows 6302b41a30aaSmrg shrext_cmds=.dll 6303b41a30aaSmrg need_version=no 6304b41a30aaSmrg need_lib_prefix=no 6305b41a30aaSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6306b41a30aaSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6307b41a30aaSmrg v=$($ECHO $release$versuffix | tr -d .-); 6308b41a30aaSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6309b41a30aaSmrg $ECHO $n$v`$shared_ext' 6310b41a30aaSmrg library_names_spec='${libname}_dll.$libext' 6311b41a30aaSmrg dynamic_linker='OS/2 ld.exe' 6312b41a30aaSmrg shlibpath_var=BEGINLIBPATH 6313b41a30aaSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6314b41a30aaSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6315b41a30aaSmrg postinstall_cmds='base_file=`basename \$file`~ 6316b41a30aaSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6317b41a30aaSmrg dldir=$destdir/`dirname \$dlpath`~ 6318b41a30aaSmrg test -d \$dldir || mkdir -p \$dldir~ 6319b41a30aaSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 6320b41a30aaSmrg chmod a+x \$dldir/$dlname~ 6321b41a30aaSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6322b41a30aaSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6323b41a30aaSmrg fi' 6324b41a30aaSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6325b41a30aaSmrg dlpath=$dir/\$dldll~ 6326b41a30aaSmrg $RM \$dlpath' 6327b41a30aaSmrg ;; 632806f32fbeSmrg 6329b41a30aaSmrgosf3* | osf4* | osf5*) 6330b41a30aaSmrg version_type=osf 6331b41a30aaSmrg need_lib_prefix=no 6332b41a30aaSmrg need_version=no 6333b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6334b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6335b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6336b41a30aaSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6337b41a30aaSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6338b41a30aaSmrg ;; 633906f32fbeSmrg 6340b41a30aaSmrgrdos*) 6341b41a30aaSmrg dynamic_linker=no 6342b41a30aaSmrg ;; 634306f32fbeSmrg 6344b41a30aaSmrgsolaris*) 6345b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6346b41a30aaSmrg need_lib_prefix=no 6347b41a30aaSmrg need_version=no 6348b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6349b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6350b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6351b41a30aaSmrg shlibpath_overrides_runpath=yes 6352b41a30aaSmrg hardcode_into_libs=yes 6353b41a30aaSmrg # ldd complains unless libraries are executable 6354b41a30aaSmrg postinstall_cmds='chmod +x $lib' 6355b41a30aaSmrg ;; 635606f32fbeSmrg 6357b41a30aaSmrgsunos4*) 6358b41a30aaSmrg version_type=sunos 6359b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6360b41a30aaSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6361b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6362b41a30aaSmrg shlibpath_overrides_runpath=yes 6363b41a30aaSmrg if test yes = "$with_gnu_ld"; then 6364b41a30aaSmrg need_lib_prefix=no 6365b41a30aaSmrg fi 6366b41a30aaSmrg need_version=yes 6367b41a30aaSmrg ;; 636806f32fbeSmrg 6369b41a30aaSmrgsysv4 | sysv4.3*) 6370b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6371b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6372b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6373b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6374b41a30aaSmrg case $host_vendor in 6375b41a30aaSmrg sni) 6376b41a30aaSmrg shlibpath_overrides_runpath=no 6377b41a30aaSmrg need_lib_prefix=no 6378b41a30aaSmrg runpath_var=LD_RUN_PATH 6379b41a30aaSmrg ;; 6380b41a30aaSmrg siemens) 6381b41a30aaSmrg need_lib_prefix=no 6382b41a30aaSmrg ;; 6383b41a30aaSmrg motorola) 6384b41a30aaSmrg need_lib_prefix=no 6385b41a30aaSmrg need_version=no 6386b41a30aaSmrg shlibpath_overrides_runpath=no 6387b41a30aaSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6388b41a30aaSmrg ;; 6389b41a30aaSmrg esac 6390b41a30aaSmrg ;; 639106f32fbeSmrg 6392b41a30aaSmrgsysv4*MP*) 6393b41a30aaSmrg if test -d /usr/nec; then 6394b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6395b41a30aaSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6396b41a30aaSmrg soname_spec='$libname$shared_ext.$major' 6397b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6398b41a30aaSmrg fi 6399b41a30aaSmrg ;; 640031637056Smrg 6401b41a30aaSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6402b41a30aaSmrg version_type=sco 6403b41a30aaSmrg need_lib_prefix=no 6404b41a30aaSmrg need_version=no 6405b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6406b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6407b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6408b41a30aaSmrg shlibpath_overrides_runpath=yes 6409b41a30aaSmrg hardcode_into_libs=yes 6410b41a30aaSmrg if test yes = "$with_gnu_ld"; then 6411b41a30aaSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6412b41a30aaSmrg else 6413b41a30aaSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6414b41a30aaSmrg case $host_os in 6415b41a30aaSmrg sco3.2v5*) 6416b41a30aaSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6417b41a30aaSmrg ;; 6418b41a30aaSmrg esac 6419b41a30aaSmrg fi 6420b41a30aaSmrg sys_lib_dlsearch_path_spec='/usr/lib' 6421b41a30aaSmrg ;; 642231637056Smrg 6423b41a30aaSmrgtpf*) 6424b41a30aaSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6425b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6426b41a30aaSmrg need_lib_prefix=no 6427b41a30aaSmrg need_version=no 6428b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6429b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6430b41a30aaSmrg shlibpath_overrides_runpath=no 6431b41a30aaSmrg hardcode_into_libs=yes 6432b41a30aaSmrg ;; 643331637056Smrg 6434b41a30aaSmrguts4*) 6435b41a30aaSmrg version_type=linux # correct to gnu/linux during the next big refactor 6436b41a30aaSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6437b41a30aaSmrg soname_spec='$libname$release$shared_ext$major' 6438b41a30aaSmrg shlibpath_var=LD_LIBRARY_PATH 6439b41a30aaSmrg ;; 6440b41a30aaSmrg 6441b41a30aaSmrg*) 6442b41a30aaSmrg dynamic_linker=no 6443b41a30aaSmrg ;; 6444b41a30aaSmrgesac 6445b41a30aaSmrgAC_MSG_RESULT([$dynamic_linker]) 6446b41a30aaSmrgtest no = "$dynamic_linker" && can_build_shared=no 6447b41a30aaSmrg 6448b41a30aaSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6449b41a30aaSmrgif test yes = "$GCC"; then 6450b41a30aaSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 645131637056Smrgfi 645231637056Smrg 6453b41a30aaSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6454b41a30aaSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6455b41a30aaSmrgfi 645631637056Smrg 6457b41a30aaSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6458b41a30aaSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6459b41a30aaSmrgfi 646006f32fbeSmrg 6461b41a30aaSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6462b41a30aaSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 646306f32fbeSmrg 6464b41a30aaSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6465b41a30aaSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 646606f32fbeSmrg 6467b41a30aaSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6468b41a30aaSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 646906f32fbeSmrg 6470b41a30aaSmrg_LT_DECL([], [variables_saved_for_relink], [1], 6471b41a30aaSmrg [Variables whose values should be saved in libtool wrapper scripts and 6472b41a30aaSmrg restored at link time]) 6473b41a30aaSmrg_LT_DECL([], [need_lib_prefix], [0], 6474b41a30aaSmrg [Do we need the "lib" prefix for modules?]) 6475b41a30aaSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6476b41a30aaSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 6477b41a30aaSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6478b41a30aaSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6479b41a30aaSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 6480b41a30aaSmrg [Is shlibpath searched before the hard-coded library search path?]) 6481b41a30aaSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6482b41a30aaSmrg_LT_DECL([], [library_names_spec], [1], 6483b41a30aaSmrg [[List of archive names. First name is the real one, the rest are links. 6484b41a30aaSmrg The last name is the one that the linker finds with -lNAME]]) 6485b41a30aaSmrg_LT_DECL([], [soname_spec], [1], 6486b41a30aaSmrg [[The coded name of the library, if different from the real name]]) 6487b41a30aaSmrg_LT_DECL([], [install_override_mode], [1], 6488b41a30aaSmrg [Permission mode override for installation of shared libraries]) 6489b41a30aaSmrg_LT_DECL([], [postinstall_cmds], [2], 6490b41a30aaSmrg [Command to use after installation of a shared archive]) 6491b41a30aaSmrg_LT_DECL([], [postuninstall_cmds], [2], 6492b41a30aaSmrg [Command to use after uninstallation of a shared archive]) 6493b41a30aaSmrg_LT_DECL([], [finish_cmds], [2], 6494b41a30aaSmrg [Commands used to finish a libtool library installation in a directory]) 6495b41a30aaSmrg_LT_DECL([], [finish_eval], [1], 6496b41a30aaSmrg [[As "finish_cmds", except a single script fragment to be evaled but 6497b41a30aaSmrg not shown]]) 6498b41a30aaSmrg_LT_DECL([], [hardcode_into_libs], [0], 6499b41a30aaSmrg [Whether we should hardcode library paths into libraries]) 6500b41a30aaSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 6501b41a30aaSmrg [Compile-time system search path for libraries]) 6502b41a30aaSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6503b41a30aaSmrg [Detected run-time system search path for libraries]) 6504b41a30aaSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6505b41a30aaSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6506b41a30aaSmrg])# _LT_SYS_DYNAMIC_LINKER 650706f32fbeSmrg 650806f32fbeSmrg 6509b41a30aaSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 6510b41a30aaSmrg# -------------------------- 6511b41a30aaSmrg# find a file program that can recognize shared library 6512b41a30aaSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 6513b41a30aaSmrg[m4_require([_LT_DECL_EGREP])dnl 6514b41a30aaSmrgAC_MSG_CHECKING([for $1]) 6515b41a30aaSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6516b41a30aaSmrg[case $MAGIC_CMD in 6517b41a30aaSmrg[[\\/*] | ?:[\\/]*]) 6518b41a30aaSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6519b41a30aaSmrg ;; 6520b41a30aaSmrg*) 6521b41a30aaSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 6522b41a30aaSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6523b41a30aaSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 6524b41a30aaSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 6525b41a30aaSmrgdnl not every word. This closes a longstanding sh security hole. 6526b41a30aaSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 6527b41a30aaSmrg for ac_dir in $ac_dummy; do 6528b41a30aaSmrg IFS=$lt_save_ifs 6529b41a30aaSmrg test -z "$ac_dir" && ac_dir=. 6530b41a30aaSmrg if test -f "$ac_dir/$1"; then 6531b41a30aaSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6532b41a30aaSmrg if test -n "$file_magic_test_file"; then 6533b41a30aaSmrg case $deplibs_check_method in 6534b41a30aaSmrg "file_magic "*) 6535b41a30aaSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6536b41a30aaSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6537b41a30aaSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6538b41a30aaSmrg $EGREP "$file_magic_regex" > /dev/null; then 6539b41a30aaSmrg : 6540b41a30aaSmrg else 6541b41a30aaSmrg cat <<_LT_EOF 1>&2 654206f32fbeSmrg 6543b41a30aaSmrg*** Warning: the command libtool uses to detect shared libraries, 6544b41a30aaSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 6545b41a30aaSmrg*** The result is that libtool may fail to recognize shared libraries 6546b41a30aaSmrg*** as such. This will affect the creation of libtool libraries that 6547b41a30aaSmrg*** depend on shared libraries, but programs linked with such libtool 6548b41a30aaSmrg*** libraries will work regardless of this problem. Nevertheless, you 6549b41a30aaSmrg*** may want to report the problem to your system manager and/or to 6550b41a30aaSmrg*** bug-libtool@gnu.org 655106f32fbeSmrg 6552b41a30aaSmrg_LT_EOF 6553b41a30aaSmrg fi ;; 6554b41a30aaSmrg esac 6555b41a30aaSmrg fi 6556b41a30aaSmrg break 6557b41a30aaSmrg fi 6558b41a30aaSmrg done 6559b41a30aaSmrg IFS=$lt_save_ifs 6560b41a30aaSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 6561b41a30aaSmrg ;; 6562b41a30aaSmrgesac]) 6563b41a30aaSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 6564b41a30aaSmrgif test -n "$MAGIC_CMD"; then 6565b41a30aaSmrg AC_MSG_RESULT($MAGIC_CMD) 6566b41a30aaSmrgelse 6567b41a30aaSmrg AC_MSG_RESULT(no) 6568b41a30aaSmrgfi 6569b41a30aaSmrg_LT_DECL([], [MAGIC_CMD], [0], 6570b41a30aaSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6571b41a30aaSmrg])# _LT_PATH_TOOL_PREFIX 657206f32fbeSmrg 6573b41a30aaSmrg# Old name: 6574b41a30aaSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6575b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 6576b41a30aaSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 657706f32fbeSmrg 657806f32fbeSmrg 6579b41a30aaSmrg# _LT_PATH_MAGIC 6580b41a30aaSmrg# -------------- 6581b41a30aaSmrg# find a file program that can recognize a shared library 6582b41a30aaSmrgm4_defun([_LT_PATH_MAGIC], 6583b41a30aaSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6584b41a30aaSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 6585b41a30aaSmrg if test -n "$ac_tool_prefix"; then 6586b41a30aaSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6587b41a30aaSmrg else 6588b41a30aaSmrg MAGIC_CMD=: 6589b41a30aaSmrg fi 6590b41a30aaSmrgfi 6591b41a30aaSmrg])# _LT_PATH_MAGIC 659206f32fbeSmrg 659306f32fbeSmrg 6594b41a30aaSmrg# LT_PATH_LD 6595b41a30aaSmrg# ---------- 6596b41a30aaSmrg# find the pathname to the GNU or non-GNU linker 6597b41a30aaSmrgAC_DEFUN([LT_PATH_LD], 6598b41a30aaSmrg[AC_REQUIRE([AC_PROG_CC])dnl 6599b41a30aaSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 6600b41a30aaSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 6601b41a30aaSmrgm4_require([_LT_DECL_SED])dnl 6602b41a30aaSmrgm4_require([_LT_DECL_EGREP])dnl 6603b41a30aaSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 660406f32fbeSmrg 6605b41a30aaSmrgAC_ARG_WITH([gnu-ld], 6606b41a30aaSmrg [AS_HELP_STRING([--with-gnu-ld], 6607b41a30aaSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6608b41a30aaSmrg [test no = "$withval" || with_gnu_ld=yes], 6609b41a30aaSmrg [with_gnu_ld=no])dnl 661006f32fbeSmrg 6611b41a30aaSmrgac_prog=ld 6612b41a30aaSmrgif test yes = "$GCC"; then 6613b41a30aaSmrg # Check if gcc -print-prog-name=ld gives a path. 6614b41a30aaSmrg AC_MSG_CHECKING([for ld used by $CC]) 6615b41a30aaSmrg case $host in 6616b41a30aaSmrg *-*-mingw*) 6617b41a30aaSmrg # gcc leaves a trailing carriage return, which upsets mingw 6618b41a30aaSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6619b41a30aaSmrg *) 6620b41a30aaSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6621b41a30aaSmrg esac 6622b41a30aaSmrg case $ac_prog in 6623b41a30aaSmrg # Accept absolute paths. 6624b41a30aaSmrg [[\\/]]* | ?:[[\\/]]*) 6625b41a30aaSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 6626b41a30aaSmrg # Canonicalize the pathname of ld 6627b41a30aaSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6628b41a30aaSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6629b41a30aaSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6630b41a30aaSmrg done 6631b41a30aaSmrg test -z "$LD" && LD=$ac_prog 6632b41a30aaSmrg ;; 6633b41a30aaSmrg "") 6634b41a30aaSmrg # If it fails, then pretend we aren't using GCC. 6635b41a30aaSmrg ac_prog=ld 6636b41a30aaSmrg ;; 6637b41a30aaSmrg *) 6638b41a30aaSmrg # If it is relative, then search for the first ld in PATH. 6639b41a30aaSmrg with_gnu_ld=unknown 6640b41a30aaSmrg ;; 6641b41a30aaSmrg esac 6642b41a30aaSmrgelif test yes = "$with_gnu_ld"; then 6643b41a30aaSmrg AC_MSG_CHECKING([for GNU ld]) 6644b41a30aaSmrgelse 6645b41a30aaSmrg AC_MSG_CHECKING([for non-GNU ld]) 6646b41a30aaSmrgfi 6647b41a30aaSmrgAC_CACHE_VAL(lt_cv_path_LD, 6648b41a30aaSmrg[if test -z "$LD"; then 6649b41a30aaSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6650b41a30aaSmrg for ac_dir in $PATH; do 6651b41a30aaSmrg IFS=$lt_save_ifs 6652b41a30aaSmrg test -z "$ac_dir" && ac_dir=. 6653b41a30aaSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6654b41a30aaSmrg lt_cv_path_LD=$ac_dir/$ac_prog 6655b41a30aaSmrg # Check to see if the program is GNU ld. I'd rather use --version, 6656b41a30aaSmrg # but apparently some variants of GNU ld only accept -v. 6657b41a30aaSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 6658b41a30aaSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6659b41a30aaSmrg *GNU* | *'with BFD'*) 6660b41a30aaSmrg test no != "$with_gnu_ld" && break 6661b41a30aaSmrg ;; 6662b41a30aaSmrg *) 6663b41a30aaSmrg test yes != "$with_gnu_ld" && break 6664b41a30aaSmrg ;; 6665b41a30aaSmrg esac 6666b41a30aaSmrg fi 6667b41a30aaSmrg done 6668b41a30aaSmrg IFS=$lt_save_ifs 6669b41a30aaSmrgelse 6670b41a30aaSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 6671b41a30aaSmrgfi]) 6672b41a30aaSmrgLD=$lt_cv_path_LD 6673b41a30aaSmrgif test -n "$LD"; then 6674b41a30aaSmrg AC_MSG_RESULT($LD) 6675b41a30aaSmrgelse 6676b41a30aaSmrg AC_MSG_RESULT(no) 6677b41a30aaSmrgfi 6678b41a30aaSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6679b41a30aaSmrg_LT_PATH_LD_GNU 6680b41a30aaSmrgAC_SUBST([LD]) 668131637056Smrg 6682b41a30aaSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6683b41a30aaSmrg])# LT_PATH_LD 668431637056Smrg 6685b41a30aaSmrg# Old names: 6686b41a30aaSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6687b41a30aaSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6688b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 6689b41a30aaSmrgdnl AC_DEFUN([AM_PROG_LD], []) 6690b41a30aaSmrgdnl AC_DEFUN([AC_PROG_LD], []) 669131637056Smrg 669231637056Smrg 6693b41a30aaSmrg# _LT_PATH_LD_GNU 6694b41a30aaSmrg#- -------------- 6695b41a30aaSmrgm4_defun([_LT_PATH_LD_GNU], 6696b41a30aaSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6697b41a30aaSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6698b41a30aaSmrgcase `$LD -v 2>&1 </dev/null` in 6699b41a30aaSmrg*GNU* | *'with BFD'*) 6700b41a30aaSmrg lt_cv_prog_gnu_ld=yes 6701b41a30aaSmrg ;; 6702b41a30aaSmrg*) 6703b41a30aaSmrg lt_cv_prog_gnu_ld=no 6704b41a30aaSmrg ;; 6705b41a30aaSmrgesac]) 6706b41a30aaSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 6707b41a30aaSmrg])# _LT_PATH_LD_GNU 670831637056Smrg 670931637056Smrg 6710b41a30aaSmrg# _LT_CMD_RELOAD 6711b41a30aaSmrg# -------------- 6712b41a30aaSmrg# find reload flag for linker 6713b41a30aaSmrg# -- PORTME Some linkers may need a different reload flag. 6714b41a30aaSmrgm4_defun([_LT_CMD_RELOAD], 6715b41a30aaSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 6716b41a30aaSmrg lt_cv_ld_reload_flag, 6717b41a30aaSmrg [lt_cv_ld_reload_flag='-r']) 6718b41a30aaSmrgreload_flag=$lt_cv_ld_reload_flag 6719b41a30aaSmrgcase $reload_flag in 6720b41a30aaSmrg"" | " "*) ;; 6721b41a30aaSmrg*) reload_flag=" $reload_flag" ;; 6722b41a30aaSmrgesac 6723b41a30aaSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 6724b41a30aaSmrgcase $host_os in 6725b41a30aaSmrg cygwin* | mingw* | pw32* | cegcc*) 6726b41a30aaSmrg if test yes != "$GCC"; then 6727b41a30aaSmrg reload_cmds=false 6728b41a30aaSmrg fi 6729b41a30aaSmrg ;; 6730b41a30aaSmrg darwin*) 6731b41a30aaSmrg if test yes = "$GCC"; then 6732b41a30aaSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6733b41a30aaSmrg else 6734b41a30aaSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 6735b41a30aaSmrg fi 6736b41a30aaSmrg ;; 6737b41a30aaSmrgesac 6738b41a30aaSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6739b41a30aaSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 6740b41a30aaSmrg])# _LT_CMD_RELOAD 674131637056Smrg 674231637056Smrg 6743b41a30aaSmrg# _LT_PATH_DD 6744b41a30aaSmrg# ----------- 6745b41a30aaSmrg# find a working dd 6746b41a30aaSmrgm4_defun([_LT_PATH_DD], 6747b41a30aaSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6748b41a30aaSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6749b41a30aaSmrgcat conftest.i conftest.i >conftest2.i 6750b41a30aaSmrg: ${lt_DD:=$DD} 6751b41a30aaSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6752b41a30aaSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6753b41a30aaSmrg cmp -s conftest.i conftest.out \ 6754b41a30aaSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6755b41a30aaSmrgfi]) 6756b41a30aaSmrgrm -f conftest.i conftest2.i conftest.out]) 6757b41a30aaSmrg])# _LT_PATH_DD 675831637056Smrg 675931637056Smrg 6760b41a30aaSmrg# _LT_CMD_TRUNCATE 6761b41a30aaSmrg# ---------------- 6762b41a30aaSmrg# find command to truncate a binary pipe 6763b41a30aaSmrgm4_defun([_LT_CMD_TRUNCATE], 6764b41a30aaSmrg[m4_require([_LT_PATH_DD]) 6765b41a30aaSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6766b41a30aaSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6767b41a30aaSmrgcat conftest.i conftest.i >conftest2.i 6768b41a30aaSmrglt_cv_truncate_bin= 6769b41a30aaSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6770b41a30aaSmrg cmp -s conftest.i conftest.out \ 6771b41a30aaSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6772b41a30aaSmrgfi 6773b41a30aaSmrgrm -f conftest.i conftest2.i conftest.out 6774b41a30aaSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6775b41a30aaSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6776b41a30aaSmrg [Command to truncate a binary pipe]) 6777b41a30aaSmrg])# _LT_CMD_TRUNCATE 677831637056Smrg 677931637056Smrg 6780b41a30aaSmrg# _LT_CHECK_MAGIC_METHOD 6781b41a30aaSmrg# ---------------------- 6782b41a30aaSmrg# how to check for library dependencies 6783b41a30aaSmrg# -- PORTME fill in with the dynamic library characteristics 6784b41a30aaSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 6785b41a30aaSmrg[m4_require([_LT_DECL_EGREP]) 6786b41a30aaSmrgm4_require([_LT_DECL_OBJDUMP]) 6787b41a30aaSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 6788b41a30aaSmrglt_cv_deplibs_check_method, 6789b41a30aaSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 6790b41a30aaSmrglt_cv_file_magic_test_file= 6791b41a30aaSmrglt_cv_deplibs_check_method='unknown' 6792b41a30aaSmrg# Need to set the preceding variable on all platforms that support 6793b41a30aaSmrg# interlibrary dependencies. 6794b41a30aaSmrg# 'none' -- dependencies not supported. 6795b41a30aaSmrg# 'unknown' -- same as none, but documents that we really don't know. 6796b41a30aaSmrg# 'pass_all' -- all dependencies passed with no checks. 6797b41a30aaSmrg# 'test_compile' -- check by making test program. 6798b41a30aaSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 6799b41a30aaSmrg# that responds to the $file_magic_cmd with a given extended regex. 6800b41a30aaSmrg# If you have 'file' or equivalent on your system and you're not sure 6801b41a30aaSmrg# whether 'pass_all' will *always* work, you probably want this one. 680231637056Smrg 6803b41a30aaSmrgcase $host_os in 6804b41a30aaSmrgaix[[4-9]]*) 6805b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6806b41a30aaSmrg ;; 680731637056Smrg 6808b41a30aaSmrgbeos*) 6809b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6810b41a30aaSmrg ;; 681131637056Smrg 6812b41a30aaSmrgbsdi[[45]]*) 6813b41a30aaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6814b41a30aaSmrg lt_cv_file_magic_cmd='$FILECMD -L' 6815b41a30aaSmrg lt_cv_file_magic_test_file=/shlib/libc.so 6816b41a30aaSmrg ;; 681731637056Smrg 6818b41a30aaSmrgcygwin*) 6819b41a30aaSmrg # func_win32_libid is a shell function defined in ltmain.sh 6820b41a30aaSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6821b41a30aaSmrg lt_cv_file_magic_cmd='func_win32_libid' 6822b41a30aaSmrg ;; 682331637056Smrg 6824b41a30aaSmrgmingw* | pw32*) 6825b41a30aaSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 6826b41a30aaSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 6827b41a30aaSmrg # unless we find 'file', for example because we are cross-compiling. 6828b41a30aaSmrg if ( file / ) >/dev/null 2>&1; then 6829b41a30aaSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6830b41a30aaSmrg lt_cv_file_magic_cmd='func_win32_libid' 6831b41a30aaSmrg else 6832b41a30aaSmrg # Keep this pattern in sync with the one in func_win32_libid. 6833b41a30aaSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6834b41a30aaSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6835b41a30aaSmrg fi 6836b41a30aaSmrg ;; 683731637056Smrg 6838b41a30aaSmrgcegcc*) 6839b41a30aaSmrg # use the weaker test based on 'objdump'. See mingw*. 6840b41a30aaSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6841b41a30aaSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6842b41a30aaSmrg ;; 684331637056Smrg 6844b41a30aaSmrgdarwin* | rhapsody*) 6845b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6846b41a30aaSmrg ;; 684731637056Smrg 6848b41a30aaSmrgfreebsd* | dragonfly* | midnightbsd*) 6849b41a30aaSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6850b41a30aaSmrg case $host_cpu in 6851b41a30aaSmrg i*86 ) 6852b41a30aaSmrg # Not sure whether the presence of OpenBSD here was a mistake. 6853b41a30aaSmrg # Let's accept both of them until this is cleared up. 6854b41a30aaSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6855b41a30aaSmrg lt_cv_file_magic_cmd=$FILECMD 6856b41a30aaSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6857b41a30aaSmrg ;; 6858b41a30aaSmrg esac 6859b41a30aaSmrg else 6860b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6861b41a30aaSmrg fi 6862b41a30aaSmrg ;; 686331637056Smrg 6864b41a30aaSmrghaiku*) 6865b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6866b41a30aaSmrg ;; 686731637056Smrg 6868b41a30aaSmrghpux10.20* | hpux11*) 6869b41a30aaSmrg lt_cv_file_magic_cmd=$FILECMD 6870b41a30aaSmrg case $host_cpu in 6871b41a30aaSmrg ia64*) 6872b41a30aaSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6873b41a30aaSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6874b41a30aaSmrg ;; 6875b41a30aaSmrg hppa*64*) 6876b41a30aaSmrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 6877b41a30aaSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6878b41a30aaSmrg ;; 6879b41a30aaSmrg *) 6880b41a30aaSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6881b41a30aaSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 6882b41a30aaSmrg ;; 6883b41a30aaSmrg esac 6884b41a30aaSmrg ;; 688531637056Smrg 6886b41a30aaSmrginterix[[3-9]]*) 6887b41a30aaSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6888b41a30aaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6889b41a30aaSmrg ;; 689031637056Smrg 6891b41a30aaSmrgirix5* | irix6* | nonstopux*) 6892b41a30aaSmrg case $LD in 6893b41a30aaSmrg *-32|*"-32 ") libmagic=32-bit;; 6894b41a30aaSmrg *-n32|*"-n32 ") libmagic=N32;; 6895b41a30aaSmrg *-64|*"-64 ") libmagic=64-bit;; 6896b41a30aaSmrg *) libmagic=never-match;; 6897b41a30aaSmrg esac 6898b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6899b41a30aaSmrg ;; 690006f32fbeSmrg 6901b41a30aaSmrg# This must be glibc/ELF. 6902b41a30aaSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6903b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6904b41a30aaSmrg ;; 690506f32fbeSmrg 6906b41a30aaSmrgnetbsd*) 6907b41a30aaSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6908b41a30aaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6909b41a30aaSmrg else 6910b41a30aaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 6911b41a30aaSmrg fi 6912b41a30aaSmrg ;; 691306f32fbeSmrg 6914b41a30aaSmrgnewos6*) 6915b41a30aaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 6916b41a30aaSmrg lt_cv_file_magic_cmd=$FILECMD 6917b41a30aaSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 6918b41a30aaSmrg ;; 691906f32fbeSmrg 6920b41a30aaSmrg*nto* | *qnx*) 6921b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6922b41a30aaSmrg ;; 692306f32fbeSmrg 6924b41a30aaSmrgopenbsd* | bitrig*) 6925b41a30aaSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6926b41a30aaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6927b41a30aaSmrg else 6928b41a30aaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6929b41a30aaSmrg fi 6930b41a30aaSmrg ;; 693106f32fbeSmrg 6932b41a30aaSmrgosf3* | osf4* | osf5*) 6933b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6934b41a30aaSmrg ;; 693506f32fbeSmrg 6936b41a30aaSmrgrdos*) 6937b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6938b41a30aaSmrg ;; 693906f32fbeSmrg 6940b41a30aaSmrgsolaris*) 6941b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6942b41a30aaSmrg ;; 694306f32fbeSmrg 6944b41a30aaSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6945b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6946b41a30aaSmrg ;; 694706f32fbeSmrg 6948b41a30aaSmrgsysv4 | sysv4.3*) 6949b41a30aaSmrg case $host_vendor in 6950b41a30aaSmrg motorola) 6951b41a30aaSmrg 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]]' 6952b41a30aaSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 6953b41a30aaSmrg ;; 6954b41a30aaSmrg ncr) 6955b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6956b41a30aaSmrg ;; 6957b41a30aaSmrg sequent) 6958b41a30aaSmrg lt_cv_file_magic_cmd='/bin/file' 6959b41a30aaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 6960b41a30aaSmrg ;; 6961b41a30aaSmrg sni) 6962b41a30aaSmrg lt_cv_file_magic_cmd='/bin/file' 6963b41a30aaSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 6964b41a30aaSmrg lt_cv_file_magic_test_file=/lib/libc.so 6965b41a30aaSmrg ;; 6966b41a30aaSmrg siemens) 6967b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6968b41a30aaSmrg ;; 6969b41a30aaSmrg pc) 6970b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6971b41a30aaSmrg ;; 6972b41a30aaSmrg esac 6973b41a30aaSmrg ;; 697406f32fbeSmrg 6975b41a30aaSmrgtpf*) 6976b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6977b41a30aaSmrg ;; 6978b41a30aaSmrgos2*) 6979b41a30aaSmrg lt_cv_deplibs_check_method=pass_all 6980b41a30aaSmrg ;; 6981b41a30aaSmrgesac 6982b41a30aaSmrg]) 698306f32fbeSmrg 6984b41a30aaSmrgfile_magic_glob= 6985b41a30aaSmrgwant_nocaseglob=no 6986b41a30aaSmrgif test "$build" = "$host"; then 6987b41a30aaSmrg case $host_os in 6988b41a30aaSmrg mingw* | pw32*) 6989b41a30aaSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 6990b41a30aaSmrg want_nocaseglob=yes 6991b41a30aaSmrg else 6992b41a30aaSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 6993b41a30aaSmrg fi 6994b41a30aaSmrg ;; 6995b41a30aaSmrg esac 6996b41a30aaSmrgfi 6997ea133fd7Smrg 6998b41a30aaSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 6999b41a30aaSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 7000b41a30aaSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 7001ea133fd7Smrg 7002b41a30aaSmrg_LT_DECL([], [deplibs_check_method], [1], 7003b41a30aaSmrg [Method to check whether dependent libraries are shared objects]) 7004b41a30aaSmrg_LT_DECL([], [file_magic_cmd], [1], 7005b41a30aaSmrg [Command to use when deplibs_check_method = "file_magic"]) 7006b41a30aaSmrg_LT_DECL([], [file_magic_glob], [1], 7007b41a30aaSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 7008b41a30aaSmrg_LT_DECL([], [want_nocaseglob], [1], 7009b41a30aaSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7010b41a30aaSmrg])# _LT_CHECK_MAGIC_METHOD 7011ea133fd7Smrg 701231637056Smrg 7013b41a30aaSmrg# LT_PATH_NM 7014b41a30aaSmrg# ---------- 7015b41a30aaSmrg# find the pathname to a BSD- or MS-compatible name lister 7016b41a30aaSmrgAC_DEFUN([LT_PATH_NM], 7017b41a30aaSmrg[AC_REQUIRE([AC_PROG_CC])dnl 7018b41a30aaSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7019b41a30aaSmrg[if test -n "$NM"; then 7020b41a30aaSmrg # Let the user override the test. 7021b41a30aaSmrg lt_cv_path_NM=$NM 7022b41a30aaSmrgelse 7023b41a30aaSmrg lt_nm_to_check=${ac_tool_prefix}nm 7024b41a30aaSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7025b41a30aaSmrg lt_nm_to_check="$lt_nm_to_check nm" 7026b41a30aaSmrg fi 7027b41a30aaSmrg for lt_tmp_nm in $lt_nm_to_check; do 7028b41a30aaSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7029b41a30aaSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7030b41a30aaSmrg IFS=$lt_save_ifs 7031b41a30aaSmrg test -z "$ac_dir" && ac_dir=. 7032b41a30aaSmrg tmp_nm=$ac_dir/$lt_tmp_nm 7033b41a30aaSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7034b41a30aaSmrg # Check to see if the nm accepts a BSD-compat flag. 7035b41a30aaSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7036b41a30aaSmrg # nm: unknown option "B" ignored 7037b41a30aaSmrg # Tru64's nm complains that /dev/null is an invalid object file 7038b41a30aaSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7039b41a30aaSmrg case $build_os in 7040b41a30aaSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7041b41a30aaSmrg *) lt_bad_file=/dev/null ;; 7042b41a30aaSmrg esac 7043b41a30aaSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7044b41a30aaSmrg *$lt_bad_file* | *'Invalid file or object type'*) 7045b41a30aaSmrg lt_cv_path_NM="$tmp_nm -B" 7046b41a30aaSmrg break 2 7047b41a30aaSmrg ;; 7048b41a30aaSmrg *) 7049b41a30aaSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7050b41a30aaSmrg */dev/null*) 7051b41a30aaSmrg lt_cv_path_NM="$tmp_nm -p" 7052b41a30aaSmrg break 2 7053b41a30aaSmrg ;; 7054b41a30aaSmrg *) 7055b41a30aaSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7056b41a30aaSmrg continue # so that we can try to find one that supports BSD flags 7057b41a30aaSmrg ;; 7058b41a30aaSmrg esac 7059b41a30aaSmrg ;; 7060b41a30aaSmrg esac 7061b41a30aaSmrg fi 7062b41a30aaSmrg done 7063b41a30aaSmrg IFS=$lt_save_ifs 7064b41a30aaSmrg done 7065b41a30aaSmrg : ${lt_cv_path_NM=no} 7066b41a30aaSmrgfi]) 7067b41a30aaSmrgif test no != "$lt_cv_path_NM"; then 7068b41a30aaSmrg NM=$lt_cv_path_NM 7069b41a30aaSmrgelse 7070b41a30aaSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 7071b41a30aaSmrg if test -n "$DUMPBIN"; then : 7072b41a30aaSmrg # Let the user override the test. 7073b41a30aaSmrg else 7074b41a30aaSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7075b41a30aaSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7076b41a30aaSmrg *COFF*) 7077b41a30aaSmrg DUMPBIN="$DUMPBIN -symbols -headers" 7078b41a30aaSmrg ;; 7079b41a30aaSmrg *) 7080b41a30aaSmrg DUMPBIN=: 7081b41a30aaSmrg ;; 7082b41a30aaSmrg esac 7083b41a30aaSmrg fi 7084b41a30aaSmrg AC_SUBST([DUMPBIN]) 7085b41a30aaSmrg if test : != "$DUMPBIN"; then 7086b41a30aaSmrg NM=$DUMPBIN 7087b41a30aaSmrg fi 708806f32fbeSmrgfi 7089b41a30aaSmrgtest -z "$NM" && NM=nm 7090b41a30aaSmrgAC_SUBST([NM]) 7091b41a30aaSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7092ea133fd7Smrg 7093b41a30aaSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7094b41a30aaSmrg [lt_cv_nm_interface="BSD nm" 7095b41a30aaSmrg echo "int some_variable = 0;" > conftest.$ac_ext 7096b41a30aaSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7097b41a30aaSmrg (eval "$ac_compile" 2>conftest.err) 7098b41a30aaSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7099b41a30aaSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7100b41a30aaSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7101b41a30aaSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7102b41a30aaSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7103b41a30aaSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 7104b41a30aaSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7105b41a30aaSmrg lt_cv_nm_interface="MS dumpbin" 7106b41a30aaSmrg fi 7107b41a30aaSmrg rm -f conftest*]) 7108b41a30aaSmrg])# LT_PATH_NM 7109ea133fd7Smrg 7110b41a30aaSmrg# Old names: 7111b41a30aaSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7112b41a30aaSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 711331637056Smrgdnl aclocal-1.4 backwards compatibility: 7114b41a30aaSmrgdnl AC_DEFUN([AM_PROG_NM], []) 7115b41a30aaSmrgdnl AC_DEFUN([AC_PROG_NM], []) 7116ea133fd7Smrg 7117b41a30aaSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7118b41a30aaSmrg# -------------------------------- 7119b41a30aaSmrg# how to determine the name of the shared library 7120b41a30aaSmrg# associated with a specific link library. 7121b41a30aaSmrg# -- PORTME fill in with the dynamic library characteristics 7122b41a30aaSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7123b41a30aaSmrg[m4_require([_LT_DECL_EGREP]) 7124b41a30aaSmrgm4_require([_LT_DECL_OBJDUMP]) 7125b41a30aaSmrgm4_require([_LT_DECL_DLLTOOL]) 7126b41a30aaSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7127b41a30aaSmrglt_cv_sharedlib_from_linklib_cmd, 7128b41a30aaSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7129ea133fd7Smrg 7130b41a30aaSmrgcase $host_os in 7131b41a30aaSmrgcygwin* | mingw* | pw32* | cegcc*) 7132b41a30aaSmrg # two different shell functions defined in ltmain.sh; 7133b41a30aaSmrg # decide which one to use based on capabilities of $DLLTOOL 7134b41a30aaSmrg case `$DLLTOOL --help 2>&1` in 7135b41a30aaSmrg *--identify-strict*) 7136b41a30aaSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7137b41a30aaSmrg ;; 7138b41a30aaSmrg *) 7139b41a30aaSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7140b41a30aaSmrg ;; 7141b41a30aaSmrg esac 7142b41a30aaSmrg ;; 7143b41a30aaSmrg*) 7144b41a30aaSmrg # fallback: assume linklib IS sharedlib 7145b41a30aaSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7146b41a30aaSmrg ;; 7147b41a30aaSmrgesac 714806f32fbeSmrg]) 7149b41a30aaSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7150b41a30aaSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7151ea133fd7Smrg 7152b41a30aaSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7153b41a30aaSmrg [Command to associate shared and link libraries]) 7154b41a30aaSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7155ea133fd7Smrg 7156ea133fd7Smrg 7157b41a30aaSmrg# _LT_PATH_MANIFEST_TOOL 7158b41a30aaSmrg# ---------------------- 7159b41a30aaSmrg# locate the manifest tool 7160b41a30aaSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7161b41a30aaSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7162b41a30aaSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7163b41a30aaSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7164b41a30aaSmrg [lt_cv_path_mainfest_tool=no 7165b41a30aaSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7166b41a30aaSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7167b41a30aaSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7168b41a30aaSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7169b41a30aaSmrg lt_cv_path_mainfest_tool=yes 7170b41a30aaSmrg fi 7171b41a30aaSmrg rm -f conftest*]) 7172b41a30aaSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 7173b41a30aaSmrg MANIFEST_TOOL=: 7174b41a30aaSmrgfi 7175b41a30aaSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7176b41a30aaSmrg])# _LT_PATH_MANIFEST_TOOL 717706f32fbeSmrg 717806f32fbeSmrg 7179b41a30aaSmrg# _LT_DLL_DEF_P([FILE]) 7180b41a30aaSmrg# --------------------- 7181b41a30aaSmrg# True iff FILE is a Windows DLL '.def' file. 7182b41a30aaSmrg# Keep in sync with func_dll_def_p in the libtool script 7183b41a30aaSmrgAC_DEFUN([_LT_DLL_DEF_P], 7184b41a30aaSmrg[dnl 7185b41a30aaSmrg test DEF = "`$SED -n dnl 7186b41a30aaSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7187b41a30aaSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7188b41a30aaSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7189b41a30aaSmrg -e q dnl Only consider the first "real" line 7190b41a30aaSmrg $1`" dnl 7191b41a30aaSmrg])# _LT_DLL_DEF_P 719206f32fbeSmrg 719306f32fbeSmrg 7194b41a30aaSmrg# LT_LIB_M 7195b41a30aaSmrg# -------- 7196b41a30aaSmrg# check for math library 7197b41a30aaSmrgAC_DEFUN([LT_LIB_M], 7198b41a30aaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7199b41a30aaSmrgLIBM= 7200b41a30aaSmrgcase $host in 7201b41a30aaSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7202b41a30aaSmrg # These system don't have libm, or don't need it 7203b41a30aaSmrg ;; 7204b41a30aaSmrg*-ncr-sysv4.3*) 7205b41a30aaSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7206b41a30aaSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7207b41a30aaSmrg ;; 7208b41a30aaSmrg*) 7209b41a30aaSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7210b41a30aaSmrg ;; 7211b41a30aaSmrgesac 7212b41a30aaSmrgAC_SUBST([LIBM]) 7213b41a30aaSmrg])# LT_LIB_M 721406f32fbeSmrg 7215b41a30aaSmrg# Old name: 7216b41a30aaSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7217b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 7218b41a30aaSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7219ea133fd7Smrg 7220ea133fd7Smrg 7221b41a30aaSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7222b41a30aaSmrg# ------------------------------- 7223b41a30aaSmrgm4_defun([_LT_COMPILER_NO_RTTI], 7224b41a30aaSmrg[m4_require([_LT_TAG_COMPILER])dnl 7225ea133fd7Smrg 7226b41a30aaSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7227ea133fd7Smrg 7228b41a30aaSmrgif test yes = "$GCC"; then 7229b41a30aaSmrg case $cc_basename in 7230b41a30aaSmrg nvcc*) 7231b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7232b41a30aaSmrg *) 7233b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7234b41a30aaSmrg esac 7235b41a30aaSmrg 7236b41a30aaSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7237b41a30aaSmrg lt_cv_prog_compiler_rtti_exceptions, 7238b41a30aaSmrg [-fno-rtti -fno-exceptions], [], 7239b41a30aaSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7240b41a30aaSmrgfi 7241b41a30aaSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7242b41a30aaSmrg [Compiler flag to turn off builtin functions]) 7243b41a30aaSmrg])# _LT_COMPILER_NO_RTTI 7244ea133fd7Smrg 7245ea133fd7Smrg 7246b41a30aaSmrg# _LT_CMD_GLOBAL_SYMBOLS 7247b41a30aaSmrg# ---------------------- 7248b41a30aaSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7249b41a30aaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7250b41a30aaSmrgAC_REQUIRE([AC_PROG_CC])dnl 7251b41a30aaSmrgAC_REQUIRE([AC_PROG_AWK])dnl 7252b41a30aaSmrgAC_REQUIRE([LT_PATH_NM])dnl 7253b41a30aaSmrgAC_REQUIRE([LT_PATH_LD])dnl 7254b41a30aaSmrgm4_require([_LT_DECL_SED])dnl 7255b41a30aaSmrgm4_require([_LT_DECL_EGREP])dnl 7256b41a30aaSmrgm4_require([_LT_TAG_COMPILER])dnl 7257b41a30aaSmrg 7258b41a30aaSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7259b41a30aaSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7260b41a30aaSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7261b41a30aaSmrg[ 7262b41a30aaSmrg# These are sane defaults that work on at least a few old systems. 7263b41a30aaSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7264b41a30aaSmrg 7265b41a30aaSmrg# Character class describing NM global symbol codes. 7266b41a30aaSmrgsymcode='[[BCDEGRST]]' 7267b41a30aaSmrg 7268b41a30aaSmrg# Regexp to match symbols that can be accessed directly from C. 7269b41a30aaSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7270b41a30aaSmrg 7271b41a30aaSmrg# Define system-specific variables. 7272b41a30aaSmrgcase $host_os in 7273b41a30aaSmrgaix*) 7274b41a30aaSmrg symcode='[[BCDT]]' 7275b41a30aaSmrg ;; 7276b41a30aaSmrgcygwin* | mingw* | pw32* | cegcc*) 7277b41a30aaSmrg symcode='[[ABCDGISTW]]' 7278b41a30aaSmrg ;; 7279b41a30aaSmrghpux*) 7280b41a30aaSmrg if test ia64 = "$host_cpu"; then 7281b41a30aaSmrg symcode='[[ABCDEGRST]]' 7282b41a30aaSmrg fi 7283b41a30aaSmrg ;; 7284b41a30aaSmrgirix* | nonstopux*) 7285b41a30aaSmrg symcode='[[BCDEGRST]]' 7286b41a30aaSmrg ;; 7287b41a30aaSmrgosf*) 7288b41a30aaSmrg symcode='[[BCDEGQRST]]' 7289b41a30aaSmrg ;; 7290b41a30aaSmrgsolaris*) 7291b41a30aaSmrg symcode='[[BDRT]]' 7292b41a30aaSmrg ;; 7293b41a30aaSmrgsco3.2v5*) 7294b41a30aaSmrg symcode='[[DT]]' 7295b41a30aaSmrg ;; 7296b41a30aaSmrgsysv4.2uw2*) 7297b41a30aaSmrg symcode='[[DT]]' 7298b41a30aaSmrg ;; 7299b41a30aaSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7300b41a30aaSmrg symcode='[[ABDT]]' 7301b41a30aaSmrg ;; 7302b41a30aaSmrgsysv4) 7303b41a30aaSmrg symcode='[[DFNSTU]]' 7304b41a30aaSmrg ;; 7305b41a30aaSmrgesac 7306b41a30aaSmrg 7307b41a30aaSmrg# If we're using GNU nm, then use its standard symbol codes. 7308b41a30aaSmrgcase `$NM -V 2>&1` in 7309b41a30aaSmrg*GNU* | *'with BFD'*) 7310b41a30aaSmrg symcode='[[ABCDGIRSTW]]' ;; 7311b41a30aaSmrgesac 7312b41a30aaSmrg 7313b41a30aaSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7314b41a30aaSmrg # Gets list of data symbols to import. 7315b41a30aaSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7316b41a30aaSmrg # Adjust the below global symbol transforms to fixup imported variables. 7317b41a30aaSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7318b41a30aaSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7319b41a30aaSmrg lt_c_name_lib_hook="\ 7320b41a30aaSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7321b41a30aaSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 732231637056Smrgelse 7323b41a30aaSmrg # Disable hooks by default. 7324b41a30aaSmrg lt_cv_sys_global_symbol_to_import= 7325b41a30aaSmrg lt_cdecl_hook= 7326b41a30aaSmrg lt_c_name_hook= 7327b41a30aaSmrg lt_c_name_lib_hook= 732831637056Smrgfi 7329ea133fd7Smrg 7330b41a30aaSmrg# Transform an extracted symbol line into a proper C declaration. 7331b41a30aaSmrg# Some systems (esp. on ia64) link data and code symbols differently, 7332b41a30aaSmrg# so use this general approach. 7333b41a30aaSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7334b41a30aaSmrg$lt_cdecl_hook\ 7335b41a30aaSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7336b41a30aaSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7337b41a30aaSmrg 7338b41a30aaSmrg# Transform an extracted symbol line into symbol name and symbol address 7339b41a30aaSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7340b41a30aaSmrg$lt_c_name_hook\ 7341b41a30aaSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7342b41a30aaSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7343b41a30aaSmrg 7344b41a30aaSmrg# Transform an extracted symbol line into symbol name with lib prefix and 7345b41a30aaSmrg# symbol address. 7346b41a30aaSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7347b41a30aaSmrg$lt_c_name_lib_hook\ 7348b41a30aaSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7349b41a30aaSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7350b41a30aaSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7351b41a30aaSmrg 7352b41a30aaSmrg# Handle CRLF in mingw tool chain 7353b41a30aaSmrgopt_cr= 7354b41a30aaSmrgcase $build_os in 7355b41a30aaSmrgmingw*) 7356b41a30aaSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 735731637056Smrg ;; 735831637056Smrgesac 7359ea133fd7Smrg 7360b41a30aaSmrg# Try without a prefix underscore, then with it. 7361b41a30aaSmrgfor ac_symprfx in "" "_"; do 7362ea133fd7Smrg 7363b41a30aaSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7364b41a30aaSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 7365b41a30aaSmrg 7366b41a30aaSmrg # Write the raw and C identifiers. 7367b41a30aaSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7368b41a30aaSmrg # Fake it for dumpbin and say T for any non-static function, 7369b41a30aaSmrg # D for any global variable and I for any imported variable. 7370b41a30aaSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7371b41a30aaSmrg # which start with @ or ?. 7372b41a30aaSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7373b41a30aaSmrg" {last_section=section; section=\$ 3};"\ 7374b41a30aaSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7375b41a30aaSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7376b41a30aaSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7377b41a30aaSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7378b41a30aaSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7379b41a30aaSmrg" \$ 0!~/External *\|/{next};"\ 7380b41a30aaSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7381b41a30aaSmrg" {if(hide[section]) next};"\ 7382b41a30aaSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7383b41a30aaSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7384b41a30aaSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7385b41a30aaSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7386b41a30aaSmrg" ' prfx=^$ac_symprfx]" 7387b41a30aaSmrg else 7388b41a30aaSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7389b41a30aaSmrg fi 7390b41a30aaSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7391b41a30aaSmrg 7392b41a30aaSmrg # Check to see that the pipe works correctly. 7393b41a30aaSmrg pipe_works=no 7394b41a30aaSmrg 7395b41a30aaSmrg rm -f conftest* 7396b41a30aaSmrg cat > conftest.$ac_ext <<_LT_EOF 7397b41a30aaSmrg#ifdef __cplusplus 7398b41a30aaSmrgextern "C" { 7399b41a30aaSmrg#endif 7400b41a30aaSmrgchar nm_test_var; 7401b41a30aaSmrgvoid nm_test_func(void); 7402b41a30aaSmrgvoid nm_test_func(void){} 7403b41a30aaSmrg#ifdef __cplusplus 7404b41a30aaSmrg} 7405b41a30aaSmrg#endif 7406b41a30aaSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 7407b41a30aaSmrg_LT_EOF 7408b41a30aaSmrg 7409b41a30aaSmrg if AC_TRY_EVAL(ac_compile); then 7410b41a30aaSmrg # Now try to grab the symbols. 7411b41a30aaSmrg nlist=conftest.nm 7412b41a30aaSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7413b41a30aaSmrg # Try sorting and uniquifying the output. 7414b41a30aaSmrg if sort "$nlist" | uniq > "$nlist"T; then 7415b41a30aaSmrg mv -f "$nlist"T "$nlist" 7416b41a30aaSmrg else 7417b41a30aaSmrg rm -f "$nlist"T 7418b41a30aaSmrg fi 7419b41a30aaSmrg 7420b41a30aaSmrg # Make sure that we snagged all the symbols we need. 7421b41a30aaSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7422b41a30aaSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7423b41a30aaSmrg cat <<_LT_EOF > conftest.$ac_ext 7424b41a30aaSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7425b41a30aaSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7426b41a30aaSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 7427b41a30aaSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 7428b41a30aaSmrg# define LT@&t@_DLSYM_CONST 7429b41a30aaSmrg#elif defined __osf__ 7430b41a30aaSmrg/* This system does not cope well with relocations in const data. */ 7431b41a30aaSmrg# define LT@&t@_DLSYM_CONST 7432b41a30aaSmrg#else 7433b41a30aaSmrg# define LT@&t@_DLSYM_CONST const 7434b41a30aaSmrg#endif 7435b41a30aaSmrg 7436b41a30aaSmrg#ifdef __cplusplus 7437b41a30aaSmrgextern "C" { 7438b41a30aaSmrg#endif 7439b41a30aaSmrg 7440b41a30aaSmrg_LT_EOF 7441b41a30aaSmrg # Now generate the symbol file. 7442b41a30aaSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7443b41a30aaSmrg 7444b41a30aaSmrg cat <<_LT_EOF >> conftest.$ac_ext 7445b41a30aaSmrg 7446b41a30aaSmrg/* The mapping between symbol names and symbols. */ 7447b41a30aaSmrgLT@&t@_DLSYM_CONST struct { 7448b41a30aaSmrg const char *name; 7449b41a30aaSmrg void *address; 7450b41a30aaSmrg} 7451b41a30aaSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 7452b41a30aaSmrg{ 7453b41a30aaSmrg { "@PROGRAM@", (void *) 0 }, 7454b41a30aaSmrg_LT_EOF 7455b41a30aaSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7456b41a30aaSmrg cat <<\_LT_EOF >> conftest.$ac_ext 7457b41a30aaSmrg {0, (void *) 0} 7458b41a30aaSmrg}; 7459b41a30aaSmrg 7460b41a30aaSmrg/* This works around a problem in FreeBSD linker */ 7461b41a30aaSmrg#ifdef FREEBSD_WORKAROUND 7462b41a30aaSmrgstatic const void *lt_preloaded_setup() { 7463b41a30aaSmrg return lt__PROGRAM__LTX_preloaded_symbols; 7464b41a30aaSmrg} 7465b41a30aaSmrg#endif 7466b41a30aaSmrg 7467b41a30aaSmrg#ifdef __cplusplus 7468b41a30aaSmrg} 7469b41a30aaSmrg#endif 7470b41a30aaSmrg_LT_EOF 7471b41a30aaSmrg # Now try linking the two files. 7472b41a30aaSmrg mv conftest.$ac_objext conftstm.$ac_objext 7473b41a30aaSmrg lt_globsym_save_LIBS=$LIBS 7474b41a30aaSmrg lt_globsym_save_CFLAGS=$CFLAGS 7475b41a30aaSmrg LIBS=conftstm.$ac_objext 7476b41a30aaSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7477b41a30aaSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7478b41a30aaSmrg pipe_works=yes 7479b41a30aaSmrg fi 7480b41a30aaSmrg LIBS=$lt_globsym_save_LIBS 7481b41a30aaSmrg CFLAGS=$lt_globsym_save_CFLAGS 7482b41a30aaSmrg else 7483b41a30aaSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7484b41a30aaSmrg fi 7485b41a30aaSmrg else 7486b41a30aaSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7487b41a30aaSmrg fi 7488b41a30aaSmrg else 7489b41a30aaSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7490b41a30aaSmrg fi 7491b41a30aaSmrg else 7492b41a30aaSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7493b41a30aaSmrg cat conftest.$ac_ext >&5 7494b41a30aaSmrg fi 7495b41a30aaSmrg rm -rf conftest* conftst* 7496b41a30aaSmrg 7497b41a30aaSmrg # Do not use the global_symbol_pipe unless it works. 7498b41a30aaSmrg if test yes = "$pipe_works"; then 7499b41a30aaSmrg break 7500b41a30aaSmrg else 7501b41a30aaSmrg lt_cv_sys_global_symbol_pipe= 7502b41a30aaSmrg fi 7503b41a30aaSmrgdone 7504b41a30aaSmrg]) 7505b41a30aaSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 7506b41a30aaSmrg lt_cv_sys_global_symbol_to_cdecl= 7507b41a30aaSmrgfi 7508b41a30aaSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7509b41a30aaSmrg AC_MSG_RESULT(failed) 7510b41a30aaSmrgelse 7511b41a30aaSmrg AC_MSG_RESULT(ok) 7512b41a30aaSmrgfi 7513b41a30aaSmrg 7514b41a30aaSmrg# Response file support. 7515b41a30aaSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7516b41a30aaSmrg nm_file_list_spec='@' 7517b41a30aaSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7518b41a30aaSmrg nm_file_list_spec='@' 7519b41a30aaSmrgfi 7520b41a30aaSmrg 7521b41a30aaSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7522b41a30aaSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 7523b41a30aaSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7524b41a30aaSmrg [Transform the output of nm in a proper C declaration]) 7525b41a30aaSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7526b41a30aaSmrg [Transform the output of nm into a list of symbols to manually relocate]) 7527b41a30aaSmrg_LT_DECL([global_symbol_to_c_name_address], 7528b41a30aaSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 7529b41a30aaSmrg [Transform the output of nm in a C name address pair]) 7530b41a30aaSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7531b41a30aaSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7532b41a30aaSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 7533b41a30aaSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7534b41a30aaSmrg [The name lister interface]) 7535b41a30aaSmrg_LT_DECL([], [nm_file_list_spec], [1], 7536b41a30aaSmrg [Specify filename containing input files for $NM]) 7537b41a30aaSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 7538b41a30aaSmrg 7539b41a30aaSmrg 7540b41a30aaSmrg# _LT_COMPILER_PIC([TAGNAME]) 7541b41a30aaSmrg# --------------------------- 7542b41a30aaSmrgm4_defun([_LT_COMPILER_PIC], 7543b41a30aaSmrg[m4_require([_LT_TAG_COMPILER])dnl 7544b41a30aaSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7545b41a30aaSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7546b41a30aaSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 7547b41a30aaSmrg 7548b41a30aaSmrgm4_if([$1], [CXX], [ 7549b41a30aaSmrg # C++ specific cases for pic, static, wl, etc. 7550b41a30aaSmrg if test yes = "$GXX"; then 7551b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7552b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7553b41a30aaSmrg 7554b41a30aaSmrg case $host_os in 7555b41a30aaSmrg aix*) 7556b41a30aaSmrg # All AIX code is PIC. 7557b41a30aaSmrg if test ia64 = "$host_cpu"; then 7558b41a30aaSmrg # AIX 5 now supports IA64 processor 7559b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7560b41a30aaSmrg fi 7561b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7562b41a30aaSmrg ;; 7563b41a30aaSmrg 7564b41a30aaSmrg amigaos*) 7565b41a30aaSmrg case $host_cpu in 7566b41a30aaSmrg powerpc) 7567b41a30aaSmrg # see comment about AmigaOS4 .so support 7568b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7569b41a30aaSmrg ;; 7570b41a30aaSmrg m68k) 7571b41a30aaSmrg # FIXME: we need at least 68020 code to build shared libraries, but 7572b41a30aaSmrg # adding the '-m68020' flag to GCC prevents building anything better, 7573b41a30aaSmrg # like '-m68040'. 7574b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7575b41a30aaSmrg ;; 7576b41a30aaSmrg esac 7577b41a30aaSmrg ;; 7578b41a30aaSmrg 7579b41a30aaSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7580b41a30aaSmrg # PIC is the default for these OSes. 7581b41a30aaSmrg ;; 7582b41a30aaSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7583b41a30aaSmrg # This hack is so that the source file can tell whether it is being 7584b41a30aaSmrg # built for inclusion in a dll (and should export symbols for example). 7585b41a30aaSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7586b41a30aaSmrg # (--disable-auto-import) libraries 7587b41a30aaSmrg m4_if([$1], [GCJ], [], 7588b41a30aaSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7589b41a30aaSmrg case $host_os in 7590b41a30aaSmrg os2*) 7591b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7592b41a30aaSmrg ;; 7593b41a30aaSmrg esac 7594b41a30aaSmrg ;; 7595b41a30aaSmrg darwin* | rhapsody*) 7596b41a30aaSmrg # PIC is the default on this platform 7597b41a30aaSmrg # Common symbols not allowed in MH_DYLIB files 7598b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7599b41a30aaSmrg ;; 7600b41a30aaSmrg *djgpp*) 7601b41a30aaSmrg # DJGPP does not support shared libraries at all 7602b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7603b41a30aaSmrg ;; 7604b41a30aaSmrg haiku*) 7605b41a30aaSmrg # PIC is the default for Haiku. 7606b41a30aaSmrg # The "-static" flag exists, but is broken. 7607b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7608b41a30aaSmrg ;; 7609b41a30aaSmrg interix[[3-9]]*) 7610b41a30aaSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7611b41a30aaSmrg # Instead, we relocate shared libraries at runtime. 7612b41a30aaSmrg ;; 7613b41a30aaSmrg sysv4*MP*) 7614b41a30aaSmrg if test -d /usr/nec; then 7615b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7616b41a30aaSmrg fi 7617b41a30aaSmrg ;; 7618b41a30aaSmrg hpux*) 7619b41a30aaSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7620b41a30aaSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7621b41a30aaSmrg # sets the default TLS model and affects inlining. 7622b41a30aaSmrg case $host_cpu in 7623b41a30aaSmrg hppa*64*) 7624b41a30aaSmrg ;; 7625b41a30aaSmrg *) 7626b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7627b41a30aaSmrg ;; 7628b41a30aaSmrg esac 7629b41a30aaSmrg ;; 7630b41a30aaSmrg *qnx* | *nto*) 7631b41a30aaSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7632b41a30aaSmrg # it will coredump. 7633b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7634b41a30aaSmrg ;; 7635b41a30aaSmrg *) 7636b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7637b41a30aaSmrg ;; 7638b41a30aaSmrg esac 7639b41a30aaSmrg else 7640b41a30aaSmrg case $host_os in 7641b41a30aaSmrg aix[[4-9]]*) 7642b41a30aaSmrg # All AIX code is PIC. 7643b41a30aaSmrg if test ia64 = "$host_cpu"; then 7644b41a30aaSmrg # AIX 5 now supports IA64 processor 7645b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7646b41a30aaSmrg else 7647b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7648b41a30aaSmrg fi 7649b41a30aaSmrg ;; 7650b41a30aaSmrg chorus*) 7651b41a30aaSmrg case $cc_basename in 7652b41a30aaSmrg cxch68*) 7653b41a30aaSmrg # Green Hills C++ Compiler 7654b41a30aaSmrg # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 7655b41a30aaSmrg ;; 7656b41a30aaSmrg esac 7657b41a30aaSmrg ;; 7658b41a30aaSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7659b41a30aaSmrg # This hack is so that the source file can tell whether it is being 7660b41a30aaSmrg # built for inclusion in a dll (and should export symbols for example). 7661b41a30aaSmrg m4_if([$1], [GCJ], [], 7662b41a30aaSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7663b41a30aaSmrg ;; 7664b41a30aaSmrg dgux*) 7665b41a30aaSmrg case $cc_basename in 7666b41a30aaSmrg ec++*) 7667b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7668b41a30aaSmrg ;; 7669b41a30aaSmrg ghcx*) 7670b41a30aaSmrg # Green Hills C++ Compiler 7671b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7672b41a30aaSmrg ;; 7673b41a30aaSmrg *) 7674b41a30aaSmrg ;; 7675b41a30aaSmrg esac 7676b41a30aaSmrg ;; 7677b41a30aaSmrg freebsd* | dragonfly* | midnightbsd*) 7678b41a30aaSmrg # FreeBSD uses GNU C++ 7679b41a30aaSmrg ;; 7680b41a30aaSmrg hpux9* | hpux10* | hpux11*) 7681b41a30aaSmrg case $cc_basename in 7682b41a30aaSmrg CC*) 7683b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7684b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7685b41a30aaSmrg if test ia64 != "$host_cpu"; then 7686b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7687b41a30aaSmrg fi 7688b41a30aaSmrg ;; 7689b41a30aaSmrg aCC*) 7690b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7691b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7692b41a30aaSmrg case $host_cpu in 7693b41a30aaSmrg hppa*64*|ia64*) 7694b41a30aaSmrg # +Z the default 7695b41a30aaSmrg ;; 7696b41a30aaSmrg *) 7697b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7698b41a30aaSmrg ;; 7699b41a30aaSmrg esac 7700b41a30aaSmrg ;; 7701b41a30aaSmrg *) 7702b41a30aaSmrg ;; 7703b41a30aaSmrg esac 7704b41a30aaSmrg ;; 7705b41a30aaSmrg interix*) 7706b41a30aaSmrg # This is c89, which is MS Visual C++ (no shared libs) 7707b41a30aaSmrg # Anyone wants to do a port? 7708b41a30aaSmrg ;; 7709b41a30aaSmrg irix5* | irix6* | nonstopux*) 7710b41a30aaSmrg case $cc_basename in 7711b41a30aaSmrg CC*) 7712b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7713b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7714b41a30aaSmrg # CC pic flag -KPIC is the default. 7715b41a30aaSmrg ;; 7716b41a30aaSmrg *) 7717b41a30aaSmrg ;; 7718b41a30aaSmrg esac 7719b41a30aaSmrg ;; 7720b41a30aaSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7721b41a30aaSmrg case $cc_basename in 7722b41a30aaSmrg KCC*) 7723b41a30aaSmrg # KAI C++ Compiler 7724b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7725b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7726b41a30aaSmrg ;; 7727b41a30aaSmrg ecpc* ) 7728b41a30aaSmrg # old Intel C++ for x86_64, which still supported -KPIC. 7729b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7730b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7731b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7732b41a30aaSmrg ;; 7733b41a30aaSmrg icpc* ) 7734b41a30aaSmrg # Intel C++, used to be incompatible with GCC. 7735b41a30aaSmrg # ICC 10 doesn't accept -KPIC any more. 7736b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7737b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7738b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7739b41a30aaSmrg ;; 7740b41a30aaSmrg pgCC* | pgcpp*) 7741b41a30aaSmrg # Portland Group C++ compiler 7742b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7743b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7744b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7745b41a30aaSmrg ;; 7746b41a30aaSmrg cxx*) 7747b41a30aaSmrg # Compaq C++ 7748b41a30aaSmrg # Make sure the PIC flag is empty. It appears that all Alpha 7749b41a30aaSmrg # Linux and Compaq Tru64 Unix objects are PIC. 7750b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7751b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7752b41a30aaSmrg ;; 7753b41a30aaSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7754b41a30aaSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 7755b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7756b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7757b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7758b41a30aaSmrg ;; 7759b41a30aaSmrg *) 7760b41a30aaSmrg case `$CC -V 2>&1 | $SED 5q` in 7761b41a30aaSmrg *Sun\ C*) 7762b41a30aaSmrg # Sun C++ 5.9 7763b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7764b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7765b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7766b41a30aaSmrg ;; 7767b41a30aaSmrg esac 7768b41a30aaSmrg ;; 7769b41a30aaSmrg esac 7770b41a30aaSmrg ;; 7771b41a30aaSmrg lynxos*) 7772b41a30aaSmrg ;; 7773b41a30aaSmrg m88k*) 7774b41a30aaSmrg ;; 7775b41a30aaSmrg mvs*) 7776b41a30aaSmrg case $cc_basename in 7777b41a30aaSmrg cxx*) 7778b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7779b41a30aaSmrg ;; 7780b41a30aaSmrg *) 7781b41a30aaSmrg ;; 7782b41a30aaSmrg esac 7783b41a30aaSmrg ;; 7784b41a30aaSmrg netbsd*) 7785b41a30aaSmrg ;; 7786b41a30aaSmrg *qnx* | *nto*) 7787b41a30aaSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7788b41a30aaSmrg # it will coredump. 7789b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7790b41a30aaSmrg ;; 7791b41a30aaSmrg osf3* | osf4* | osf5*) 7792b41a30aaSmrg case $cc_basename in 7793b41a30aaSmrg KCC*) 7794b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7795b41a30aaSmrg ;; 7796b41a30aaSmrg RCC*) 7797b41a30aaSmrg # Rational C++ 2.4.1 7798b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7799b41a30aaSmrg ;; 7800b41a30aaSmrg cxx*) 7801b41a30aaSmrg # Digital/Compaq C++ 7802b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7803b41a30aaSmrg # Make sure the PIC flag is empty. It appears that all Alpha 7804b41a30aaSmrg # Linux and Compaq Tru64 Unix objects are PIC. 7805b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7806b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7807b41a30aaSmrg ;; 7808b41a30aaSmrg *) 7809b41a30aaSmrg ;; 7810b41a30aaSmrg esac 7811b41a30aaSmrg ;; 7812b41a30aaSmrg psos*) 7813b41a30aaSmrg ;; 7814b41a30aaSmrg solaris*) 7815b41a30aaSmrg case $cc_basename in 7816b41a30aaSmrg CC* | sunCC*) 7817b41a30aaSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7818b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7819b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7820b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7821b41a30aaSmrg ;; 7822b41a30aaSmrg gcx*) 7823b41a30aaSmrg # Green Hills C++ Compiler 7824b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7825b41a30aaSmrg ;; 7826b41a30aaSmrg *) 7827b41a30aaSmrg ;; 7828b41a30aaSmrg esac 7829b41a30aaSmrg ;; 7830b41a30aaSmrg sunos4*) 7831b41a30aaSmrg case $cc_basename in 7832b41a30aaSmrg CC*) 7833b41a30aaSmrg # Sun C++ 4.x 7834b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7835b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7836b41a30aaSmrg ;; 7837b41a30aaSmrg lcc*) 7838b41a30aaSmrg # Lucid 7839b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7840b41a30aaSmrg ;; 7841b41a30aaSmrg *) 7842b41a30aaSmrg ;; 7843b41a30aaSmrg esac 7844b41a30aaSmrg ;; 7845b41a30aaSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7846b41a30aaSmrg case $cc_basename in 7847b41a30aaSmrg CC*) 7848b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7849b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7850b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7851b41a30aaSmrg ;; 7852b41a30aaSmrg esac 7853b41a30aaSmrg ;; 7854b41a30aaSmrg tandem*) 7855b41a30aaSmrg case $cc_basename in 7856b41a30aaSmrg NCC*) 7857b41a30aaSmrg # NonStop-UX NCC 3.20 7858b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7859b41a30aaSmrg ;; 7860b41a30aaSmrg *) 7861b41a30aaSmrg ;; 7862b41a30aaSmrg esac 7863b41a30aaSmrg ;; 7864b41a30aaSmrg vxworks*) 7865b41a30aaSmrg ;; 7866b41a30aaSmrg *) 7867b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7868b41a30aaSmrg ;; 7869b41a30aaSmrg esac 7870b41a30aaSmrg fi 7871b41a30aaSmrg], 7872b41a30aaSmrg[ 7873b41a30aaSmrg if test yes = "$GCC"; then 7874b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7875b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7876b41a30aaSmrg 7877b41a30aaSmrg case $host_os in 7878b41a30aaSmrg aix*) 7879b41a30aaSmrg # All AIX code is PIC. 7880b41a30aaSmrg if test ia64 = "$host_cpu"; then 7881b41a30aaSmrg # AIX 5 now supports IA64 processor 7882b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7883b41a30aaSmrg fi 7884b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7885b41a30aaSmrg ;; 7886b41a30aaSmrg 7887b41a30aaSmrg amigaos*) 7888b41a30aaSmrg case $host_cpu in 7889b41a30aaSmrg powerpc) 7890b41a30aaSmrg # see comment about AmigaOS4 .so support 7891b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7892b41a30aaSmrg ;; 7893b41a30aaSmrg m68k) 7894b41a30aaSmrg # FIXME: we need at least 68020 code to build shared libraries, but 7895b41a30aaSmrg # adding the '-m68020' flag to GCC prevents building anything better, 7896b41a30aaSmrg # like '-m68040'. 7897b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7898b41a30aaSmrg ;; 7899b41a30aaSmrg esac 7900b41a30aaSmrg ;; 7901b41a30aaSmrg 7902b41a30aaSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7903b41a30aaSmrg # PIC is the default for these OSes. 7904b41a30aaSmrg ;; 7905b41a30aaSmrg 7906b41a30aaSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 7907b41a30aaSmrg # This hack is so that the source file can tell whether it is being 7908b41a30aaSmrg # built for inclusion in a dll (and should export symbols for example). 7909b41a30aaSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7910b41a30aaSmrg # (--disable-auto-import) libraries 7911b41a30aaSmrg m4_if([$1], [GCJ], [], 7912b41a30aaSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7913b41a30aaSmrg case $host_os in 7914b41a30aaSmrg os2*) 7915b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7916b41a30aaSmrg ;; 7917b41a30aaSmrg esac 7918b41a30aaSmrg ;; 7919ea133fd7Smrg 7920b41a30aaSmrg darwin* | rhapsody*) 7921b41a30aaSmrg # PIC is the default on this platform 7922b41a30aaSmrg # Common symbols not allowed in MH_DYLIB files 7923b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7924b41a30aaSmrg ;; 7925ea133fd7Smrg 7926b41a30aaSmrg haiku*) 7927b41a30aaSmrg # PIC is the default for Haiku. 7928b41a30aaSmrg # The "-static" flag exists, but is broken. 7929b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7930b41a30aaSmrg ;; 793106f32fbeSmrg 7932b41a30aaSmrg hpux*) 7933b41a30aaSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7934b41a30aaSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7935b41a30aaSmrg # sets the default TLS model and affects inlining. 7936b41a30aaSmrg case $host_cpu in 7937b41a30aaSmrg hppa*64*) 7938b41a30aaSmrg # +Z the default 7939b41a30aaSmrg ;; 7940b41a30aaSmrg *) 7941b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7942b41a30aaSmrg ;; 7943b41a30aaSmrg esac 7944b41a30aaSmrg ;; 794506f32fbeSmrg 7946b41a30aaSmrg interix[[3-9]]*) 7947b41a30aaSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7948b41a30aaSmrg # Instead, we relocate shared libraries at runtime. 7949b41a30aaSmrg ;; 795006f32fbeSmrg 7951b41a30aaSmrg msdosdjgpp*) 7952b41a30aaSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 7953b41a30aaSmrg # on systems that don't support them. 7954b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7955b41a30aaSmrg enable_shared=no 7956b41a30aaSmrg ;; 795706f32fbeSmrg 7958b41a30aaSmrg *nto* | *qnx*) 7959b41a30aaSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7960b41a30aaSmrg # it will coredump. 7961b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7962b41a30aaSmrg ;; 796306f32fbeSmrg 7964b41a30aaSmrg sysv4*MP*) 7965b41a30aaSmrg if test -d /usr/nec; then 7966b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7967b41a30aaSmrg fi 7968b41a30aaSmrg ;; 7969ea133fd7Smrg 7970b41a30aaSmrg *) 7971b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7972b41a30aaSmrg ;; 7973b41a30aaSmrg esac 7974ea133fd7Smrg 7975b41a30aaSmrg case $cc_basename in 7976b41a30aaSmrg nvcc*) # Cuda Compiler Driver 2.2 7977b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 7978b41a30aaSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 7979b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 7980b41a30aaSmrg fi 7981b41a30aaSmrg ;; 7982b41a30aaSmrg esac 7983b41a30aaSmrg else 7984b41a30aaSmrg # PORTME Check for flag to pass linker flags through the system compiler. 7985b41a30aaSmrg case $host_os in 7986b41a30aaSmrg aix*) 7987b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7988b41a30aaSmrg if test ia64 = "$host_cpu"; then 7989b41a30aaSmrg # AIX 5 now supports IA64 processor 7990b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7991b41a30aaSmrg else 7992b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7993b41a30aaSmrg fi 7994b41a30aaSmrg ;; 7995ea133fd7Smrg 7996b41a30aaSmrg darwin* | rhapsody*) 7997b41a30aaSmrg # PIC is the default on this platform 7998b41a30aaSmrg # Common symbols not allowed in MH_DYLIB files 7999b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8000b41a30aaSmrg case $cc_basename in 8001b41a30aaSmrg nagfor*) 8002b41a30aaSmrg # NAG Fortran compiler 8003b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8004b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8005b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8006b41a30aaSmrg ;; 8007b41a30aaSmrg esac 8008b41a30aaSmrg ;; 8009ea133fd7Smrg 8010b41a30aaSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8011b41a30aaSmrg # This hack is so that the source file can tell whether it is being 8012b41a30aaSmrg # built for inclusion in a dll (and should export symbols for example). 8013b41a30aaSmrg m4_if([$1], [GCJ], [], 8014b41a30aaSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8015b41a30aaSmrg case $host_os in 8016b41a30aaSmrg os2*) 8017b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8018b41a30aaSmrg ;; 8019b41a30aaSmrg esac 8020b41a30aaSmrg ;; 802131637056Smrg 8022b41a30aaSmrg hpux9* | hpux10* | hpux11*) 8023b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8024b41a30aaSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8025b41a30aaSmrg # not for PA HP-UX. 8026b41a30aaSmrg case $host_cpu in 8027b41a30aaSmrg hppa*64*|ia64*) 8028b41a30aaSmrg # +Z the default 8029b41a30aaSmrg ;; 8030b41a30aaSmrg *) 8031b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8032b41a30aaSmrg ;; 8033b41a30aaSmrg esac 8034b41a30aaSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8035b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8036b41a30aaSmrg ;; 8037ea133fd7Smrg 8038b41a30aaSmrg irix5* | irix6* | nonstopux*) 8039b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8040b41a30aaSmrg # PIC (with -KPIC) is the default. 8041b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8042b41a30aaSmrg ;; 804306f32fbeSmrg 8044b41a30aaSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8045b41a30aaSmrg case $cc_basename in 8046b41a30aaSmrg # old Intel for x86_64, which still supported -KPIC. 8047b41a30aaSmrg ecc*) 8048b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8049b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8050b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 805125b89263Smrg ;; 8052b41a30aaSmrg # icc used to be incompatible with GCC. 8053b41a30aaSmrg # ICC 10 doesn't accept -KPIC any more. 8054b41a30aaSmrg icc* | ifort*) 8055b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8056b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8057b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 805831637056Smrg ;; 8059b41a30aaSmrg # Lahey Fortran 8.1. 8060b41a30aaSmrg lf95*) 8061b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8062b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8063b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8064b41a30aaSmrg ;; 8065b41a30aaSmrg nagfor*) 8066b41a30aaSmrg # NAG Fortran compiler 8067b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8068b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8069b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8070b41a30aaSmrg ;; 8071b41a30aaSmrg tcc*) 8072b41a30aaSmrg # Fabrice Bellard et al's Tiny C Compiler 8073b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8074b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8075b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8076b41a30aaSmrg ;; 8077b41a30aaSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8078b41a30aaSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 8079b41a30aaSmrg # which looks to be a dead project) 8080b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8081b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8082b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 808331637056Smrg ;; 8084b41a30aaSmrg ccc*) 8085b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8086b41a30aaSmrg # All Alpha code is PIC. 8087b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 808831637056Smrg ;; 8089b41a30aaSmrg xl* | bgxl* | bgf* | mpixl*) 8090b41a30aaSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8091b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8092b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8093b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8094b41a30aaSmrg ;; 8095b41a30aaSmrg *) 8096b41a30aaSmrg case `$CC -V 2>&1 | $SED 5q` in 8097b41a30aaSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8098b41a30aaSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8099b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8100b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8101b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8102b41a30aaSmrg ;; 8103b41a30aaSmrg *Sun\ F* | *Sun*Fortran*) 8104b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8105b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8106b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8107b41a30aaSmrg ;; 8108b41a30aaSmrg *Sun\ C*) 8109b41a30aaSmrg # Sun C 5.9 8110b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8111b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8112b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8113b41a30aaSmrg ;; 8114b41a30aaSmrg *Intel*\ [[CF]]*Compiler*) 8115b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8116b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8117b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8118b41a30aaSmrg ;; 8119b41a30aaSmrg *Portland\ Group*) 8120b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8121b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8122b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8123b41a30aaSmrg ;; 8124b41a30aaSmrg esac 8125b41a30aaSmrg ;; 8126b41a30aaSmrg esac 8127b41a30aaSmrg ;; 8128b41a30aaSmrg 8129b41a30aaSmrg newsos6) 8130b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8131b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8132b41a30aaSmrg ;; 8133b41a30aaSmrg 8134b41a30aaSmrg *nto* | *qnx*) 8135b41a30aaSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8136b41a30aaSmrg # it will coredump. 8137b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8138b41a30aaSmrg ;; 8139b41a30aaSmrg 8140b41a30aaSmrg osf3* | osf4* | osf5*) 8141b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8142b41a30aaSmrg # All OSF/1 code is PIC. 8143b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8144b41a30aaSmrg ;; 8145b41a30aaSmrg 8146b41a30aaSmrg rdos*) 8147b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8148b41a30aaSmrg ;; 8149b41a30aaSmrg 8150b41a30aaSmrg solaris*) 8151b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8152b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8153b41a30aaSmrg case $cc_basename in 8154b41a30aaSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8155b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8156b41a30aaSmrg *) 8157b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8158b41a30aaSmrg esac 8159b41a30aaSmrg ;; 8160b41a30aaSmrg 8161b41a30aaSmrg sunos4*) 8162b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8163b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8164b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8165b41a30aaSmrg ;; 8166b41a30aaSmrg 8167b41a30aaSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 8168b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8169b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8170b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8171b41a30aaSmrg ;; 8172b41a30aaSmrg 8173b41a30aaSmrg sysv4*MP*) 8174b41a30aaSmrg if test -d /usr/nec; then 8175b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8176b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8177b41a30aaSmrg fi 8178b41a30aaSmrg ;; 8179b41a30aaSmrg 8180b41a30aaSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8181b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8182b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8183b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8184b41a30aaSmrg ;; 8185b41a30aaSmrg 8186b41a30aaSmrg unicos*) 8187b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8188b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8189b41a30aaSmrg ;; 8190b41a30aaSmrg 8191b41a30aaSmrg uts4*) 8192b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8193b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8194b41a30aaSmrg ;; 8195b41a30aaSmrg 8196b41a30aaSmrg *) 8197b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8198b41a30aaSmrg ;; 819931637056Smrg esac 8200b41a30aaSmrg fi 8201b41a30aaSmrg]) 8202b41a30aaSmrgcase $host_os in 8203b41a30aaSmrg # For platforms that do not support PIC, -DPIC is meaningless: 8204b41a30aaSmrg *djgpp*) 8205b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 820631637056Smrg ;; 8207b41a30aaSmrg *) 8208b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 820931637056Smrg ;; 821031637056Smrgesac 8211ea133fd7Smrg 8212b41a30aaSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8213b41a30aaSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8214b41a30aaSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8215b41a30aaSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8216ea133fd7Smrg 821731637056Smrg# 8218b41a30aaSmrg# Check to make sure the PIC flag actually works. 821931637056Smrg# 8220b41a30aaSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8221b41a30aaSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8222b41a30aaSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8223b41a30aaSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8224b41a30aaSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8225b41a30aaSmrg "" | " "*) ;; 8226b41a30aaSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8227b41a30aaSmrg esac], 8228b41a30aaSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8229b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8230b41a30aaSmrgfi 8231b41a30aaSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8232b41a30aaSmrg [Additional compiler flags for building library objects]) 823306f32fbeSmrg 8234b41a30aaSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8235b41a30aaSmrg [How to pass a linker flag through the compiler]) 8236b41a30aaSmrg# 8237b41a30aaSmrg# Check to make sure the static flag actually works. 8238b41a30aaSmrg# 8239b41a30aaSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8240b41a30aaSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8241b41a30aaSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8242b41a30aaSmrg $lt_tmp_static_flag, 8243b41a30aaSmrg [], 8244b41a30aaSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8245b41a30aaSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8246b41a30aaSmrg [Compiler flag to prevent dynamic linking]) 8247b41a30aaSmrg])# _LT_COMPILER_PIC 824806f32fbeSmrg 824906f32fbeSmrg 8250b41a30aaSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 8251b41a30aaSmrg# ---------------------------- 8252b41a30aaSmrg# See if the linker supports building shared libraries. 8253b41a30aaSmrgm4_defun([_LT_LINKER_SHLIBS], 8254b41a30aaSmrg[AC_REQUIRE([LT_PATH_LD])dnl 8255b41a30aaSmrgAC_REQUIRE([LT_PATH_NM])dnl 8256b41a30aaSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8257b41a30aaSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8258b41a30aaSmrgm4_require([_LT_DECL_EGREP])dnl 8259b41a30aaSmrgm4_require([_LT_DECL_SED])dnl 8260b41a30aaSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8261b41a30aaSmrgm4_require([_LT_TAG_COMPILER])dnl 8262b41a30aaSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8263b41a30aaSmrgm4_if([$1], [CXX], [ 8264b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8265b41a30aaSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8266b41a30aaSmrg case $host_os in 8267b41a30aaSmrg aix[[4-9]]*) 8268b41a30aaSmrg # If we're using GNU nm, then we don't want the "-C" option. 8269b41a30aaSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8270b41a30aaSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8271b41a30aaSmrg # weak defined symbols like other global defined symbols, whereas 8272b41a30aaSmrg # GNU nm marks them as "W". 8273b41a30aaSmrg # While the 'weak' keyword is ignored in the Export File, we need 8274b41a30aaSmrg # it in the Import File for the 'aix-soname' feature, so we have 8275b41a30aaSmrg # to replace the "-B" option with "-P" for AIX nm. 8276b41a30aaSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8277b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 8278b41a30aaSmrg else 8279b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 8280b41a30aaSmrg fi 8281b41a30aaSmrg ;; 8282b41a30aaSmrg pw32*) 8283b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8284b41a30aaSmrg ;; 8285b41a30aaSmrg cygwin* | mingw* | cegcc*) 8286b41a30aaSmrg case $cc_basename in 8287b41a30aaSmrg cl* | icl*) 8288b41a30aaSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8289b41a30aaSmrg ;; 8290b41a30aaSmrg *) 8291b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 8292b41a30aaSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8293b41a30aaSmrg ;; 8294b41a30aaSmrg esac 8295b41a30aaSmrg ;; 8296b41a30aaSmrg *) 8297b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8298b41a30aaSmrg ;; 8299b41a30aaSmrg esac 8300b41a30aaSmrg], [ 8301b41a30aaSmrg runpath_var= 8302b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 8303b41a30aaSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8304b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)= 8305b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8306b41a30aaSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 8307b41a30aaSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8308b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8309b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8310b41a30aaSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 8311b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8312b41a30aaSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8313b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8314b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8315b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8316b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8317b41a30aaSmrg _LT_TAGVAR(inherit_rpath, $1)=no 8318b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8319b41a30aaSmrg _LT_TAGVAR(module_cmds, $1)= 8320b41a30aaSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 8321b41a30aaSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8322b41a30aaSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8323b41a30aaSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8324b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8325b41a30aaSmrg # include_expsyms should be a list of space-separated symbols to be *always* 8326b41a30aaSmrg # included in the symbol list 8327b41a30aaSmrg _LT_TAGVAR(include_expsyms, $1)= 8328b41a30aaSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 8329b41a30aaSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8330b41a30aaSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8331b41a30aaSmrg # as well as any symbol that contains 'd'. 8332b41a30aaSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8333b41a30aaSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8334b41a30aaSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 8335b41a30aaSmrg # the symbol is explicitly referenced. Since portable code cannot 8336b41a30aaSmrg # rely on this symbol name, it's probably fine to never include it in 8337b41a30aaSmrg # preloaded symbol tables. 8338b41a30aaSmrg # Exclude shared library initialization/finalization symbols. 8339b41a30aaSmrgdnl Note also adjust exclude_expsyms for C++ above. 8340b41a30aaSmrg extract_expsyms_cmds= 834106f32fbeSmrg 8342b41a30aaSmrg case $host_os in 8343b41a30aaSmrg cygwin* | mingw* | pw32* | cegcc*) 8344b41a30aaSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8345b41a30aaSmrg # When not using gcc, we currently assume that we are using 8346b41a30aaSmrg # Microsoft Visual C++ or Intel C++ Compiler. 8347b41a30aaSmrg if test yes != "$GCC"; then 8348b41a30aaSmrg with_gnu_ld=no 8349b41a30aaSmrg fi 8350b41a30aaSmrg ;; 8351b41a30aaSmrg interix*) 8352b41a30aaSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8353b41a30aaSmrg with_gnu_ld=yes 8354b41a30aaSmrg ;; 8355b41a30aaSmrg openbsd* | bitrig*) 8356b41a30aaSmrg with_gnu_ld=no 8357b41a30aaSmrg ;; 8358b41a30aaSmrg esac 835906f32fbeSmrg 8360b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 836106f32fbeSmrg 8362b41a30aaSmrg # On some targets, GNU ld is compatible enough with the native linker 8363b41a30aaSmrg # that we're better off using the native interface for both. 8364b41a30aaSmrg lt_use_gnu_ld_interface=no 8365b41a30aaSmrg if test yes = "$with_gnu_ld"; then 8366b41a30aaSmrg case $host_os in 8367b41a30aaSmrg aix*) 8368b41a30aaSmrg # The AIX port of GNU ld has always aspired to compatibility 8369b41a30aaSmrg # with the native linker. However, as the warning in the GNU ld 8370b41a30aaSmrg # block says, versions before 2.19.5* couldn't really create working 8371b41a30aaSmrg # shared libraries, regardless of the interface used. 8372b41a30aaSmrg case `$LD -v 2>&1` in 8373b41a30aaSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8374b41a30aaSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8375b41a30aaSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8376b41a30aaSmrg *) 8377b41a30aaSmrg lt_use_gnu_ld_interface=yes 8378b41a30aaSmrg ;; 8379b41a30aaSmrg esac 8380b41a30aaSmrg ;; 8381b41a30aaSmrg *) 8382b41a30aaSmrg lt_use_gnu_ld_interface=yes 8383b41a30aaSmrg ;; 8384b41a30aaSmrg esac 8385b41a30aaSmrg fi 838606f32fbeSmrg 8387b41a30aaSmrg if test yes = "$lt_use_gnu_ld_interface"; then 8388b41a30aaSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 8389b41a30aaSmrg wlarc='$wl' 839006f32fbeSmrg 8391b41a30aaSmrg # Set some defaults for GNU ld with shared library support. These 8392b41a30aaSmrg # are reset later if shared libraries are not supported. Putting them 8393b41a30aaSmrg # here allows them to be overridden if necessary. 8394b41a30aaSmrg runpath_var=LD_RUN_PATH 8395b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8396b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8397b41a30aaSmrg # ancient GNU ld didn't support --whole-archive et. al. 8398b41a30aaSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8399b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8400b41a30aaSmrg else 8401b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8402b41a30aaSmrg fi 8403b41a30aaSmrg supports_anon_versioning=no 8404b41a30aaSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8405b41a30aaSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 8406b41a30aaSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8407b41a30aaSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8408b41a30aaSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8409b41a30aaSmrg *\ 2.11.*) ;; # other 2.11 versions 8410b41a30aaSmrg *) supports_anon_versioning=yes ;; 8411b41a30aaSmrg esac 841206f32fbeSmrg 8413b41a30aaSmrg # See if GNU ld supports shared libraries. 8414b41a30aaSmrg case $host_os in 8415b41a30aaSmrg aix[[3-9]]*) 8416b41a30aaSmrg # On AIX/PPC, the GNU linker is very broken 8417b41a30aaSmrg if test ia64 != "$host_cpu"; then 8418b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8419b41a30aaSmrg cat <<_LT_EOF 1>&2 842006f32fbeSmrg 8421b41a30aaSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 8422b41a30aaSmrg*** to be unable to reliably create shared libraries on AIX. 8423b41a30aaSmrg*** Therefore, libtool is disabling shared libraries support. If you 8424b41a30aaSmrg*** really care for shared libraries, you may want to install binutils 8425b41a30aaSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8426b41a30aaSmrg*** You will then need to restart the configuration process. 842706f32fbeSmrg 8428b41a30aaSmrg_LT_EOF 8429b41a30aaSmrg fi 8430b41a30aaSmrg ;; 843106f32fbeSmrg 8432b41a30aaSmrg amigaos*) 8433b41a30aaSmrg case $host_cpu in 8434b41a30aaSmrg powerpc) 8435b41a30aaSmrg # see comment about AmigaOS4 .so support 8436b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8437b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8438b41a30aaSmrg ;; 8439b41a30aaSmrg m68k) 8440b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 8441b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8442b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8443b41a30aaSmrg ;; 8444b41a30aaSmrg esac 8445b41a30aaSmrg ;; 844606f32fbeSmrg 8447b41a30aaSmrg beos*) 8448b41a30aaSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8449b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8450b41a30aaSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8451b41a30aaSmrg # support --undefined. This deserves some investigation. FIXME 8452b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8453b41a30aaSmrg else 8454b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8455b41a30aaSmrg fi 8456b41a30aaSmrg ;; 845706f32fbeSmrg 8458b41a30aaSmrg cygwin* | mingw* | pw32* | cegcc*) 8459b41a30aaSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8460b41a30aaSmrg # as there is no search path for DLLs. 8461b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8462b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8463b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8464b41a30aaSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8465b41a30aaSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8466b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 8467b41a30aaSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 846806f32fbeSmrg 8469b41a30aaSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8470b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8471b41a30aaSmrg # If the export-symbols file already is a .def file, use it as 8472b41a30aaSmrg # is; otherwise, prepend EXPORTS... 8473b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8474b41a30aaSmrg cp $export_symbols $output_objdir/$soname.def; 8475b41a30aaSmrg else 8476b41a30aaSmrg echo EXPORTS > $output_objdir/$soname.def; 8477b41a30aaSmrg cat $export_symbols >> $output_objdir/$soname.def; 8478b41a30aaSmrg fi~ 8479b41a30aaSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8480b41a30aaSmrg else 8481b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8482b41a30aaSmrg fi 8483b41a30aaSmrg ;; 848431637056Smrg 8485b41a30aaSmrg haiku*) 8486b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8487b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8488b41a30aaSmrg ;; 848931637056Smrg 8490b41a30aaSmrg os2*) 8491b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8492b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8493b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8494b41a30aaSmrg shrext_cmds=.dll 8495b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8496b41a30aaSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8497b41a30aaSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8498b41a30aaSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8499b41a30aaSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8500b41a30aaSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8501b41a30aaSmrg emximp -o $lib $output_objdir/$libname.def' 8502b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8503b41a30aaSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8504b41a30aaSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8505b41a30aaSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8506b41a30aaSmrg prefix_cmds="$SED"~ 8507b41a30aaSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 8508b41a30aaSmrg prefix_cmds="$prefix_cmds -e 1d"; 8509b41a30aaSmrg fi~ 8510b41a30aaSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8511b41a30aaSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8512b41a30aaSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8513b41a30aaSmrg emximp -o $lib $output_objdir/$libname.def' 8514b41a30aaSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8515b41a30aaSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8516b41a30aaSmrg _LT_TAGVAR(file_list_spec, $1)='@' 8517b41a30aaSmrg ;; 851831637056Smrg 8519b41a30aaSmrg interix[[3-9]]*) 8520b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8521b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8522b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8523b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8524b41a30aaSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8525b41a30aaSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8526b41a30aaSmrg # default) and relocated if they conflict, which is a slow very memory 8527b41a30aaSmrg # consuming and fragmenting process. To avoid this, we pick a random, 8528b41a30aaSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8529b41a30aaSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8530b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 8531b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 8532b41a30aaSmrg ;; 853306f32fbeSmrg 8534b41a30aaSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8535b41a30aaSmrg tmp_diet=no 8536b41a30aaSmrg if test linux-dietlibc = "$host_os"; then 8537b41a30aaSmrg case $cc_basename in 8538b41a30aaSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8539b41a30aaSmrg esac 8540b41a30aaSmrg fi 8541b41a30aaSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8542b41a30aaSmrg && test no = "$tmp_diet" 8543b41a30aaSmrg then 8544b41a30aaSmrg tmp_addflag=' $pic_flag' 8545b41a30aaSmrg tmp_sharedflag='-shared' 8546b41a30aaSmrg case $cc_basename,$host_cpu in 8547b41a30aaSmrg pgcc*) # Portland Group C compiler 8548b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 8549b41a30aaSmrg tmp_addflag=' $pic_flag' 8550b41a30aaSmrg ;; 8551b41a30aaSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 8552b41a30aaSmrg # Portland Group f77 and f90 compilers 8553b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 8554b41a30aaSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 8555b41a30aaSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8556b41a30aaSmrg tmp_addflag=' -i_dynamic' ;; 8557b41a30aaSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8558b41a30aaSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 8559b41a30aaSmrg ifc* | ifort*) # Intel Fortran compiler 8560b41a30aaSmrg tmp_addflag=' -nofor_main' ;; 8561b41a30aaSmrg lf95*) # Lahey Fortran 8.1 8562b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8563b41a30aaSmrg tmp_sharedflag='--shared' ;; 8564b41a30aaSmrg nagfor*) # NAGFOR 5.3 8565b41a30aaSmrg tmp_sharedflag='-Wl,-shared' ;; 8566b41a30aaSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8567b41a30aaSmrg tmp_sharedflag='-qmkshrobj' 8568b41a30aaSmrg tmp_addflag= ;; 8569b41a30aaSmrg nvcc*) # Cuda Compiler Driver 2.2 8570b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 8571b41a30aaSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8572b41a30aaSmrg ;; 8573b41a30aaSmrg esac 8574b41a30aaSmrg case `$CC -V 2>&1 | $SED 5q` in 8575b41a30aaSmrg *Sun\ C*) # Sun C 5.9 8576b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 8577b41a30aaSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8578b41a30aaSmrg tmp_sharedflag='-G' ;; 8579b41a30aaSmrg *Sun\ F*) # Sun Fortran 8.3 8580b41a30aaSmrg tmp_sharedflag='-G' ;; 8581b41a30aaSmrg esac 8582b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 858306f32fbeSmrg 8584b41a30aaSmrg if test yes = "$supports_anon_versioning"; then 8585b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8586b41a30aaSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8587b41a30aaSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8588b41a30aaSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8589b41a30aaSmrg fi 859057ee1794Smrg 8591b41a30aaSmrg case $cc_basename in 8592b41a30aaSmrg tcc*) 8593b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8594b41a30aaSmrg ;; 8595b41a30aaSmrg xlf* | bgf* | bgxlf* | mpixlf*) 8596b41a30aaSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8597b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8598b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8599b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8600b41a30aaSmrg if test yes = "$supports_anon_versioning"; then 8601b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8602b41a30aaSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8603b41a30aaSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8604b41a30aaSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8605b41a30aaSmrg fi 8606b41a30aaSmrg ;; 8607b41a30aaSmrg esac 8608b41a30aaSmrg else 8609b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8610b41a30aaSmrg fi 8611b41a30aaSmrg ;; 861257ee1794Smrg 8613b41a30aaSmrg netbsd*) 8614b41a30aaSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8615b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8616b41a30aaSmrg wlarc= 8617b41a30aaSmrg else 8618b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8619b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 8620b41a30aaSmrg fi 8621b41a30aaSmrg ;; 862257ee1794Smrg 8623b41a30aaSmrg solaris*) 8624b41a30aaSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8625b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8626b41a30aaSmrg cat <<_LT_EOF 1>&2 862757ee1794Smrg 8628b41a30aaSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8629b41a30aaSmrg*** create shared libraries on Solaris systems. Therefore, libtool 8630b41a30aaSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 8631b41a30aaSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 8632b41a30aaSmrg*** your PATH or compiler configuration so that the native linker is 8633b41a30aaSmrg*** used, and then restart. 863457ee1794Smrg 8635b41a30aaSmrg_LT_EOF 8636b41a30aaSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8637b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8638b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 8639b41a30aaSmrg else 8640b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8641b41a30aaSmrg fi 8642b41a30aaSmrg ;; 864357ee1794Smrg 8644b41a30aaSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8645b41a30aaSmrg case `$LD -v 2>&1` in 8646b41a30aaSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8647b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8648b41a30aaSmrg cat <<_LT_EOF 1>&2 8649b41a30aaSmrg 8650b41a30aaSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8651b41a30aaSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 8652b41a30aaSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 8653b41a30aaSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8654b41a30aaSmrg*** your PATH or compiler configuration so that the native linker is 8655b41a30aaSmrg*** used, and then restart. 8656b41a30aaSmrg 8657b41a30aaSmrg_LT_EOF 8658b41a30aaSmrg ;; 8659b41a30aaSmrg *) 8660b41a30aaSmrg # For security reasons, it is highly recommended that you always 8661b41a30aaSmrg # use absolute paths for naming shared libraries, and exclude the 8662b41a30aaSmrg # DT_RUNPATH tag from executables and libraries. But doing so 8663b41a30aaSmrg # requires that you compile everything twice, which is a pain. 8664b41a30aaSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8665b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8666b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8667b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 8668b41a30aaSmrg else 8669b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8670b41a30aaSmrg fi 8671b41a30aaSmrg ;; 8672b41a30aaSmrg esac 8673b41a30aaSmrg ;; 867457ee1794Smrg 8675b41a30aaSmrg sunos4*) 8676b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8677b41a30aaSmrg wlarc= 8678b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8679b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8680b41a30aaSmrg ;; 868157ee1794Smrg 868231637056Smrg *) 8683b41a30aaSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8684b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8685b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 8686b41a30aaSmrg else 8687b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8688b41a30aaSmrg fi 868931637056Smrg ;; 8690b41a30aaSmrg esac 869157ee1794Smrg 8692b41a30aaSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8693b41a30aaSmrg runpath_var= 8694b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8695b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8696b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8697b41a30aaSmrg fi 8698b41a30aaSmrg else 8699b41a30aaSmrg # PORTME fill in a description of your system's linker (not GNU ld) 8700b41a30aaSmrg case $host_os in 8701b41a30aaSmrg aix3*) 8702b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8703b41a30aaSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8704b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' 8705b41a30aaSmrg # Note: this linker hardcodes the directories in LIBPATH if there 8706b41a30aaSmrg # are no directories specified by -L. 8707b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8708b41a30aaSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8709b41a30aaSmrg # Neither direct hardcoding nor static linking is supported with a 8710b41a30aaSmrg # broken collect2. 8711b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8712b41a30aaSmrg fi 8713b41a30aaSmrg ;; 871457ee1794Smrg 8715b41a30aaSmrg aix[[4-9]]*) 8716b41a30aaSmrg if test ia64 = "$host_cpu"; then 8717b41a30aaSmrg # On IA64, the linker does run time linking by default, so we don't 8718b41a30aaSmrg # have to do anything special. 8719b41a30aaSmrg aix_use_runtimelinking=no 8720b41a30aaSmrg exp_sym_flag='-Bexport' 8721b41a30aaSmrg no_entry_flag= 8722b41a30aaSmrg else 8723b41a30aaSmrg # If we're using GNU nm, then we don't want the "-C" option. 8724b41a30aaSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8725b41a30aaSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8726b41a30aaSmrg # weak defined symbols like other global defined symbols, whereas 8727b41a30aaSmrg # GNU nm marks them as "W". 8728b41a30aaSmrg # While the 'weak' keyword is ignored in the Export File, we need 8729b41a30aaSmrg # it in the Import File for the 'aix-soname' feature, so we have 8730b41a30aaSmrg # to replace the "-B" option with "-P" for AIX nm. 8731b41a30aaSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8732b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 8733b41a30aaSmrg else 8734b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 8735b41a30aaSmrg fi 8736b41a30aaSmrg aix_use_runtimelinking=no 873757ee1794Smrg 8738b41a30aaSmrg # Test if we are trying to use run time linking or normal 8739b41a30aaSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8740b41a30aaSmrg # have runtime linking enabled, and use it for executables. 8741b41a30aaSmrg # For shared libraries, we enable/disable runtime linking 8742b41a30aaSmrg # depending on the kind of the shared library created - 8743b41a30aaSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 8744b41a30aaSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8745b41a30aaSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 8746b41a30aaSmrg # lib.a static archive 8747b41a30aaSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 8748b41a30aaSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 8749b41a30aaSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8750b41a30aaSmrg # lib.a(lib.so.V) shared, rtl:no 8751b41a30aaSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8752b41a30aaSmrg # lib.a static archive 8753b41a30aaSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8754b41a30aaSmrg for ld_flag in $LDFLAGS; do 8755b41a30aaSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8756b41a30aaSmrg aix_use_runtimelinking=yes 8757b41a30aaSmrg break 8758b41a30aaSmrg fi 8759b41a30aaSmrg done 8760b41a30aaSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8761b41a30aaSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 8762b41a30aaSmrg # so we don't have lib.a shared libs to link our executables. 8763b41a30aaSmrg # We have to force runtime linking in this case. 8764b41a30aaSmrg aix_use_runtimelinking=yes 8765b41a30aaSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 8766b41a30aaSmrg fi 8767b41a30aaSmrg ;; 8768b41a30aaSmrg esac 876957ee1794Smrg 8770b41a30aaSmrg exp_sym_flag='-bexport' 8771b41a30aaSmrg no_entry_flag='-bnoentry' 8772b41a30aaSmrg fi 877357ee1794Smrg 8774b41a30aaSmrg # When large executables or shared objects are built, AIX ld can 8775b41a30aaSmrg # have problems creating the table of contents. If linking a library 8776b41a30aaSmrg # or program results in "error TOC overflow" add -mminimal-toc to 8777b41a30aaSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8778b41a30aaSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 877957ee1794Smrg 8780b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='' 8781b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8782b41a30aaSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8783b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8784b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8785b41a30aaSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8786b41a30aaSmrg case $with_aix_soname,$aix_use_runtimelinking in 8787b41a30aaSmrg aix,*) ;; # traditional, no import file 8788b41a30aaSmrg svr4,* | *,yes) # use import file 8789b41a30aaSmrg # The Import File defines what to hardcode. 8790b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8791b41a30aaSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8792b41a30aaSmrg ;; 8793b41a30aaSmrg esac 879406f32fbeSmrg 8795b41a30aaSmrg if test yes = "$GCC"; then 8796b41a30aaSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8797b41a30aaSmrg # We only want to do this on AIX 4.2 and lower, the check 8798b41a30aaSmrg # below for broken collect2 doesn't work under 4.3+ 8799b41a30aaSmrg collect2name=`$CC -print-prog-name=collect2` 8800b41a30aaSmrg if test -f "$collect2name" && 8801b41a30aaSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8802b41a30aaSmrg then 8803b41a30aaSmrg # We have reworked collect2 8804b41a30aaSmrg : 8805b41a30aaSmrg else 8806b41a30aaSmrg # We have old collect2 8807b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8808b41a30aaSmrg # It fails to find uninstalled libraries when the uninstalled 8809b41a30aaSmrg # path is not listed in the libpath. Setting hardcode_minus_L 8810b41a30aaSmrg # to unsupported forces relinking 8811b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8812b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8813b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8814b41a30aaSmrg fi 8815b41a30aaSmrg ;; 8816b41a30aaSmrg esac 8817b41a30aaSmrg shared_flag='-shared' 8818b41a30aaSmrg if test yes = "$aix_use_runtimelinking"; then 8819b41a30aaSmrg shared_flag="$shared_flag "'$wl-G' 8820b41a30aaSmrg fi 8821b41a30aaSmrg # Need to ensure runtime linking is disabled for the traditional 8822b41a30aaSmrg # shared library, or the linker may eventually find shared libraries 8823b41a30aaSmrg # /with/ Import File - we do not want to mix them. 8824b41a30aaSmrg shared_flag_aix='-shared' 8825b41a30aaSmrg shared_flag_svr4='-shared $wl-G' 8826b41a30aaSmrg else 8827b41a30aaSmrg # not using gcc 8828b41a30aaSmrg if test ia64 = "$host_cpu"; then 8829b41a30aaSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8830b41a30aaSmrg # chokes on -Wl,-G. The following line is correct: 8831b41a30aaSmrg shared_flag='-G' 8832b41a30aaSmrg else 8833b41a30aaSmrg if test yes = "$aix_use_runtimelinking"; then 8834b41a30aaSmrg shared_flag='$wl-G' 8835b41a30aaSmrg else 8836b41a30aaSmrg shared_flag='$wl-bM:SRE' 8837b41a30aaSmrg fi 8838b41a30aaSmrg shared_flag_aix='$wl-bM:SRE' 8839b41a30aaSmrg shared_flag_svr4='$wl-G' 8840b41a30aaSmrg fi 8841b41a30aaSmrg fi 884206f32fbeSmrg 8843b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8844b41a30aaSmrg # It seems that -bexpall does not export symbols beginning with 8845b41a30aaSmrg # underscore (_), so it is better to generate a list of symbols to export. 8846b41a30aaSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8847b41a30aaSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8848b41a30aaSmrg # Warning - without using the other runtime loading flags (-brtl), 8849b41a30aaSmrg # -berok will link without error, but may produce a broken library. 8850b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8851b41a30aaSmrg # Determine the default libpath from the value encoded in an 8852b41a30aaSmrg # empty executable. 8853b41a30aaSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 8854b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8855b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 8856b41a30aaSmrg else 8857b41a30aaSmrg if test ia64 = "$host_cpu"; then 8858b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8859b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8860b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 8861b41a30aaSmrg else 8862b41a30aaSmrg # Determine the default libpath from the value encoded in an 8863b41a30aaSmrg # empty executable. 8864b41a30aaSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 8865b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8866b41a30aaSmrg # Warning - without using the other run time loading flags, 8867b41a30aaSmrg # -berok will link without error, but may produce a broken library. 8868b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8869b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8870b41a30aaSmrg if test yes = "$with_gnu_ld"; then 8871b41a30aaSmrg # We only use this code for GNU lds that support --whole-archive. 8872b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8873b41a30aaSmrg else 8874b41a30aaSmrg # Exported symbols can be pulled into shared objects from archives 8875b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8876b41a30aaSmrg fi 8877b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8878b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8879b41a30aaSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 8880b41a30aaSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8881b41a30aaSmrg if test svr4 != "$with_aix_soname"; then 8882b41a30aaSmrg # This is similar to how AIX traditionally builds its shared libraries. 8883b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 8884b41a30aaSmrg fi 8885b41a30aaSmrg if test aix != "$with_aix_soname"; then 8886b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 8887b41a30aaSmrg else 8888b41a30aaSmrg # used by -dlpreopen to get the symbols 8889b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8890b41a30aaSmrg fi 8891b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 889231637056Smrg fi 8893b41a30aaSmrg fi 889431637056Smrg ;; 889506f32fbeSmrg 8896b41a30aaSmrg amigaos*) 8897b41a30aaSmrg case $host_cpu in 8898b41a30aaSmrg powerpc) 8899b41a30aaSmrg # see comment about AmigaOS4 .so support 8900b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8901b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8902b41a30aaSmrg ;; 8903b41a30aaSmrg m68k) 8904b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 8905b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8906b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8907b41a30aaSmrg ;; 8908b41a30aaSmrg esac 8909b41a30aaSmrg ;; 891006f32fbeSmrg 8911b41a30aaSmrg bsdi[[45]]*) 8912b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 8913b41a30aaSmrg ;; 891406f32fbeSmrg 8915b41a30aaSmrg cygwin* | mingw* | pw32* | cegcc*) 8916b41a30aaSmrg # When not using gcc, we currently assume that we are using 8917b41a30aaSmrg # Microsoft Visual C++ or Intel C++ Compiler. 8918b41a30aaSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 8919b41a30aaSmrg # no search path for DLLs. 8920b41a30aaSmrg case $cc_basename in 8921b41a30aaSmrg cl* | icl*) 8922b41a30aaSmrg # Native MSVC or ICC 8923b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8924b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8925b41a30aaSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8926b41a30aaSmrg _LT_TAGVAR(file_list_spec, $1)='@' 8927b41a30aaSmrg # Tell ltmain to make .lib files, not .a files. 8928b41a30aaSmrg libext=lib 8929b41a30aaSmrg # Tell ltmain to make .dll files, not .so files. 8930b41a30aaSmrg shrext_cmds=.dll 8931b41a30aaSmrg # FIXME: Setting linknames here is a bad hack. 8932b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 8933b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8934b41a30aaSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 8935b41a30aaSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 8936b41a30aaSmrg else 8937b41a30aaSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 8938b41a30aaSmrg fi~ 8939b41a30aaSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 8940b41a30aaSmrg linknames=' 8941b41a30aaSmrg # The linker will not automatically build a static lib if we build a DLL. 8942b41a30aaSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8943b41a30aaSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8944b41a30aaSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8945b41a30aaSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 8946b41a30aaSmrg # Don't use ranlib 8947b41a30aaSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 8948b41a30aaSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 8949b41a30aaSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 8950b41a30aaSmrg case $lt_outputfile in 8951b41a30aaSmrg *.exe|*.EXE) ;; 8952b41a30aaSmrg *) 8953b41a30aaSmrg lt_outputfile=$lt_outputfile.exe 8954b41a30aaSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 8955b41a30aaSmrg ;; 8956b41a30aaSmrg esac~ 8957b41a30aaSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 8958b41a30aaSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 8959b41a30aaSmrg $RM "$lt_outputfile.manifest"; 8960b41a30aaSmrg fi' 8961b41a30aaSmrg ;; 8962b41a30aaSmrg *) 8963b41a30aaSmrg # Assume MSVC and ICC wrapper 8964b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8965b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8966b41a30aaSmrg # Tell ltmain to make .lib files, not .a files. 8967b41a30aaSmrg libext=lib 8968b41a30aaSmrg # Tell ltmain to make .dll files, not .so files. 8969b41a30aaSmrg shrext_cmds=.dll 8970b41a30aaSmrg # FIXME: Setting linknames here is a bad hack. 8971b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 8972b41a30aaSmrg # The linker will automatically build a .lib file if we build a DLL. 8973b41a30aaSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8974b41a30aaSmrg # FIXME: Should let the user specify the lib program. 8975b41a30aaSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 8976b41a30aaSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8977b41a30aaSmrg ;; 8978b41a30aaSmrg esac 8979b41a30aaSmrg ;; 898006f32fbeSmrg 8981b41a30aaSmrg darwin* | rhapsody*) 8982b41a30aaSmrg _LT_DARWIN_LINKER_FEATURES($1) 8983b41a30aaSmrg ;; 898406f32fbeSmrg 8985b41a30aaSmrg dgux*) 8986b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8987b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8988b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8989b41a30aaSmrg ;; 899006f32fbeSmrg 8991b41a30aaSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 8992b41a30aaSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 8993b41a30aaSmrg # does not break anything, and helps significantly (at the cost of a little 8994b41a30aaSmrg # extra space). 8995b41a30aaSmrg freebsd2.2*) 8996b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 8997b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8998b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8999b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9000b41a30aaSmrg ;; 900106f32fbeSmrg 9002b41a30aaSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9003b41a30aaSmrg freebsd2.*) 9004b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9005b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9006b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9007b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9008b41a30aaSmrg ;; 900906f32fbeSmrg 9010b41a30aaSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9011b41a30aaSmrg freebsd* | dragonfly* | midnightbsd*) 9012b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9013b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9014b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9015b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 901631637056Smrg ;; 901706f32fbeSmrg 9018b41a30aaSmrg hpux9*) 9019b41a30aaSmrg if test yes = "$GCC"; then 9020b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9021b41a30aaSmrg else 9022b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9023b41a30aaSmrg fi 9024b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9025b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9026b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 902706f32fbeSmrg 9028b41a30aaSmrg # hardcode_minus_L: Not really in the search PATH, 9029b41a30aaSmrg # but as the default location of the library. 9030b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9031b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9032b41a30aaSmrg ;; 903306f32fbeSmrg 9034b41a30aaSmrg hpux10*) 9035b41a30aaSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 9036b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9037b41a30aaSmrg else 9038b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9039b41a30aaSmrg fi 9040b41a30aaSmrg if test no = "$with_gnu_ld"; then 9041b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9042b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9043b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9044b41a30aaSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9045b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9046b41a30aaSmrg # hardcode_minus_L: Not really in the search PATH, 9047b41a30aaSmrg # but as the default location of the library. 9048b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9049b41a30aaSmrg fi 9050b41a30aaSmrg ;; 905157ee1794Smrg 9052b41a30aaSmrg hpux11*) 9053b41a30aaSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 9054b41a30aaSmrg case $host_cpu in 9055b41a30aaSmrg hppa*64*) 9056b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9057b41a30aaSmrg ;; 9058b41a30aaSmrg ia64*) 9059b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9060b41a30aaSmrg ;; 9061b41a30aaSmrg *) 9062b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9063b41a30aaSmrg ;; 9064b41a30aaSmrg esac 9065b41a30aaSmrg else 9066b41a30aaSmrg case $host_cpu in 9067b41a30aaSmrg hppa*64*) 9068b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9069b41a30aaSmrg ;; 9070b41a30aaSmrg ia64*) 9071b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9072b41a30aaSmrg ;; 9073b41a30aaSmrg *) 9074b41a30aaSmrg m4_if($1, [], [ 9075b41a30aaSmrg # Older versions of the 11.00 compiler do not understand -b yet 9076b41a30aaSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9077b41a30aaSmrg _LT_LINKER_OPTION([if $CC understands -b], 9078b41a30aaSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9079b41a30aaSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9080b41a30aaSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9081b41a30aaSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9082b41a30aaSmrg ;; 9083b41a30aaSmrg esac 9084b41a30aaSmrg fi 9085b41a30aaSmrg if test no = "$with_gnu_ld"; then 9086b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9087b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 908806f32fbeSmrg 9089b41a30aaSmrg case $host_cpu in 9090b41a30aaSmrg hppa*64*|ia64*) 9091b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9092b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9093b41a30aaSmrg ;; 9094b41a30aaSmrg *) 9095b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9096b41a30aaSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9097b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 909806f32fbeSmrg 9099b41a30aaSmrg # hardcode_minus_L: Not really in the search PATH, 9100b41a30aaSmrg # but as the default location of the library. 9101b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9102b41a30aaSmrg ;; 9103b41a30aaSmrg esac 9104b41a30aaSmrg fi 9105b41a30aaSmrg ;; 9106ea133fd7Smrg 9107b41a30aaSmrg irix5* | irix6* | nonstopux*) 9108b41a30aaSmrg if test yes = "$GCC"; then 9109b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9110b41a30aaSmrg # Try to use the -exported_symbol ld option, if it does not 9111b41a30aaSmrg # work, assume that -exports_file does not work either and 9112b41a30aaSmrg # implicitly export all symbols. 9113b41a30aaSmrg # This should be the same for all languages, so no per-tag cache variable. 9114b41a30aaSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9115b41a30aaSmrg [lt_cv_irix_exported_symbol], 9116b41a30aaSmrg [save_LDFLAGS=$LDFLAGS 9117b41a30aaSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9118b41a30aaSmrg AC_LINK_IFELSE( 9119b41a30aaSmrg [AC_LANG_SOURCE( 9120b41a30aaSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9121b41a30aaSmrg [C++], [[int foo (void) { return 0; }]], 9122b41a30aaSmrg [Fortran 77], [[ 9123b41a30aaSmrg subroutine foo 9124b41a30aaSmrg end]], 9125b41a30aaSmrg [Fortran], [[ 9126b41a30aaSmrg subroutine foo 9127b41a30aaSmrg end]])])], 9128b41a30aaSmrg [lt_cv_irix_exported_symbol=yes], 9129b41a30aaSmrg [lt_cv_irix_exported_symbol=no]) 9130b41a30aaSmrg LDFLAGS=$save_LDFLAGS]) 9131b41a30aaSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 9132b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' 913331637056Smrg fi 9134b41a30aaSmrg else 9135b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9136b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' 9137b41a30aaSmrg fi 9138b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9139b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9140b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9141b41a30aaSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 9142b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 914331637056Smrg ;; 9144ea133fd7Smrg 9145b41a30aaSmrg linux*) 9146b41a30aaSmrg case $cc_basename in 9147b41a30aaSmrg tcc*) 9148b41a30aaSmrg # Fabrice Bellard et al's Tiny C Compiler 9149b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9150b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9151b41a30aaSmrg ;; 9152b41a30aaSmrg esac 9153b41a30aaSmrg ;; 9154ea133fd7Smrg 9155b41a30aaSmrg netbsd*) 9156b41a30aaSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9157b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9158b41a30aaSmrg else 9159b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9160b41a30aaSmrg fi 9161b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9162b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9163b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9164b41a30aaSmrg ;; 9165ea133fd7Smrg 9166b41a30aaSmrg newsos6) 9167b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9168b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9169b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9170b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9171b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9172b41a30aaSmrg ;; 9173ea133fd7Smrg 9174b41a30aaSmrg *nto* | *qnx*) 9175b41a30aaSmrg ;; 917606f32fbeSmrg 9177b41a30aaSmrg openbsd* | bitrig*) 9178b41a30aaSmrg if test -f /usr/libexec/ld.so; then 9179b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9180b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9181b41a30aaSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9182b41a30aaSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9183b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9184b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9185b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9186b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9187b41a30aaSmrg else 9188b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9189b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9190b41a30aaSmrg fi 9191b41a30aaSmrg else 9192b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9193b41a30aaSmrg fi 9194b41a30aaSmrg ;; 919506f32fbeSmrg 9196b41a30aaSmrg os2*) 9197b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9198b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9199b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9200b41a30aaSmrg shrext_cmds=.dll 9201b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9202b41a30aaSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9203b41a30aaSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9204b41a30aaSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9205b41a30aaSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9206b41a30aaSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9207b41a30aaSmrg emximp -o $lib $output_objdir/$libname.def' 9208b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9209b41a30aaSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9210b41a30aaSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9211b41a30aaSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9212b41a30aaSmrg prefix_cmds="$SED"~ 9213b41a30aaSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9214b41a30aaSmrg prefix_cmds="$prefix_cmds -e 1d"; 9215b41a30aaSmrg fi~ 9216b41a30aaSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9217b41a30aaSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9218b41a30aaSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9219b41a30aaSmrg emximp -o $lib $output_objdir/$libname.def' 9220b41a30aaSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9221b41a30aaSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9222b41a30aaSmrg _LT_TAGVAR(file_list_spec, $1)='@' 9223b41a30aaSmrg ;; 9224ea133fd7Smrg 9225b41a30aaSmrg osf3*) 9226b41a30aaSmrg if test yes = "$GCC"; then 9227b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9228b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9229b41a30aaSmrg else 9230b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9231b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9232b41a30aaSmrg fi 9233b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9234b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9235b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9236b41a30aaSmrg ;; 9237ea133fd7Smrg 9238b41a30aaSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9239b41a30aaSmrg if test yes = "$GCC"; then 9240b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9241b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9242b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9243b41a30aaSmrg else 9244b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9245b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9246b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ 9247b41a30aaSmrg $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' 924806f32fbeSmrg 9249b41a30aaSmrg # Both c and cxx compiler support -rpath directly 9250b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9251b41a30aaSmrg fi 9252b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9253b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9254b41a30aaSmrg ;; 925506f32fbeSmrg 9256b41a30aaSmrg solaris*) 9257b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9258b41a30aaSmrg if test yes = "$GCC"; then 9259b41a30aaSmrg wlarc='$wl' 9260b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9261b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9262b41a30aaSmrg $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9263b41a30aaSmrg else 9264b41a30aaSmrg case `$CC -V 2>&1` in 9265b41a30aaSmrg *"Compilers 5.0"*) 9266b41a30aaSmrg wlarc='' 9267b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9268b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9269b41a30aaSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9270b41a30aaSmrg ;; 9271b41a30aaSmrg *) 9272b41a30aaSmrg wlarc='$wl' 9273b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9274b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9275b41a30aaSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9276b41a30aaSmrg ;; 9277b41a30aaSmrg esac 9278b41a30aaSmrg fi 9279b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9280b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9281b41a30aaSmrg case $host_os in 9282b41a30aaSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9283b41a30aaSmrg *) 9284b41a30aaSmrg # The compiler driver will combine and reorder linker options, 9285b41a30aaSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9286b41a30aaSmrg # but is careful enough not to reorder. 9287b41a30aaSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9288b41a30aaSmrg if test yes = "$GCC"; then 9289b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9290b41a30aaSmrg else 9291b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9292b41a30aaSmrg fi 9293b41a30aaSmrg ;; 9294b41a30aaSmrg esac 9295b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9296b41a30aaSmrg ;; 9297ea133fd7Smrg 9298b41a30aaSmrg sunos4*) 9299b41a30aaSmrg if test sequent = "$host_vendor"; then 9300b41a30aaSmrg # Use $CC to link under sequent, because it throws in some extra .o 9301b41a30aaSmrg # files that make .init and .fini sections work. 9302b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9303b41a30aaSmrg else 9304b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9305b41a30aaSmrg fi 9306b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9307b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9308b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9309b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9310b41a30aaSmrg ;; 931106f32fbeSmrg 9312b41a30aaSmrg sysv4) 9313b41a30aaSmrg case $host_vendor in 9314b41a30aaSmrg sni) 9315b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9316b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9317b41a30aaSmrg ;; 9318b41a30aaSmrg siemens) 9319b41a30aaSmrg ## LD is ld it makes a PLAMLIB 9320b41a30aaSmrg ## CC just makes a GrossModule. 9321b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9322b41a30aaSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9323b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9324b41a30aaSmrg ;; 9325b41a30aaSmrg motorola) 9326b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9327b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9328b41a30aaSmrg ;; 9329b41a30aaSmrg esac 9330b41a30aaSmrg runpath_var='LD_RUN_PATH' 9331b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9332b41a30aaSmrg ;; 933306f32fbeSmrg 9334b41a30aaSmrg sysv4.3*) 9335b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9336b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9337b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9338b41a30aaSmrg ;; 933906f32fbeSmrg 9340b41a30aaSmrg sysv4*MP*) 9341b41a30aaSmrg if test -d /usr/nec; then 9342b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9343b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9344b41a30aaSmrg runpath_var=LD_RUN_PATH 9345b41a30aaSmrg hardcode_runpath_var=yes 9346b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9347b41a30aaSmrg fi 9348b41a30aaSmrg ;; 934906f32fbeSmrg 9350b41a30aaSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9351b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9352b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9353b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9354b41a30aaSmrg runpath_var='LD_RUN_PATH' 935506f32fbeSmrg 9356b41a30aaSmrg if test yes = "$GCC"; then 9357b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9358b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9359b41a30aaSmrg else 9360b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9361b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9362b41a30aaSmrg fi 9363b41a30aaSmrg ;; 936406f32fbeSmrg 9365b41a30aaSmrg sysv5* | sco3.2v5* | sco5v6*) 9366b41a30aaSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 9367b41a30aaSmrg # link with -lc, and that would cause any symbols used from libc to 9368b41a30aaSmrg # always be unresolved, which means just about no library would 9369b41a30aaSmrg # ever link correctly. If we're not using GNU ld we use -z text 9370b41a30aaSmrg # though, which does catch some bad symbols but isn't as heavy-handed 9371b41a30aaSmrg # as -z defs. 9372b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9373b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9374b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9375b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9376b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9377b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9378b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9379b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9380b41a30aaSmrg runpath_var='LD_RUN_PATH' 9381ea133fd7Smrg 9382b41a30aaSmrg if test yes = "$GCC"; then 9383b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9384b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9385b41a30aaSmrg else 9386b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9387b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9388b41a30aaSmrg fi 9389b41a30aaSmrg ;; 9390ea133fd7Smrg 9391b41a30aaSmrg uts4*) 9392b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9393b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9394b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9395b41a30aaSmrg ;; 9396ea133fd7Smrg 9397b41a30aaSmrg *) 9398b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9399b41a30aaSmrg ;; 9400b41a30aaSmrg esac 9401ea133fd7Smrg 9402b41a30aaSmrg if test sni = "$host_vendor"; then 9403b41a30aaSmrg case $host in 9404b41a30aaSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9405b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9406b41a30aaSmrg ;; 9407b41a30aaSmrg esac 9408b41a30aaSmrg fi 9409b41a30aaSmrg fi 9410b41a30aaSmrg]) 9411b41a30aaSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9412b41a30aaSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9413ea133fd7Smrg 9414b41a30aaSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 941506f32fbeSmrg 9416b41a30aaSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9417b41a30aaSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9418b41a30aaSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 9419b41a30aaSmrg [The commands to extract the exported symbol list from a shared archive]) 9420ea133fd7Smrg 9421b41a30aaSmrg# 9422b41a30aaSmrg# Do we need to explicitly link libc? 9423b41a30aaSmrg# 9424b41a30aaSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9425b41a30aaSmrgx|xyes) 9426b41a30aaSmrg # Assume -lc should be added 9427b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9428ea133fd7Smrg 9429b41a30aaSmrg if test yes,yes = "$GCC,$enable_shared"; then 9430b41a30aaSmrg case $_LT_TAGVAR(archive_cmds, $1) in 9431b41a30aaSmrg *'~'*) 9432b41a30aaSmrg # FIXME: we may have to deal with multi-command sequences. 9433b41a30aaSmrg ;; 9434b41a30aaSmrg '$CC '*) 9435b41a30aaSmrg # Test whether the compiler implicitly links with -lc since on some 9436b41a30aaSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 9437b41a30aaSmrg # to ld, don't add -lc before -lgcc. 9438b41a30aaSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9439b41a30aaSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9440b41a30aaSmrg [$RM conftest* 9441b41a30aaSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9442ea133fd7Smrg 9443b41a30aaSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9444b41a30aaSmrg soname=conftest 9445b41a30aaSmrg lib=conftest 9446b41a30aaSmrg libobjs=conftest.$ac_objext 9447b41a30aaSmrg deplibs= 9448b41a30aaSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9449b41a30aaSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9450b41a30aaSmrg compiler_flags=-v 9451b41a30aaSmrg linker_flags=-v 9452b41a30aaSmrg verstring= 9453b41a30aaSmrg output_objdir=. 9454b41a30aaSmrg libname=conftest 9455b41a30aaSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9456b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 9457b41a30aaSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9458b41a30aaSmrg then 9459b41a30aaSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9460b41a30aaSmrg else 9461b41a30aaSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9462b41a30aaSmrg fi 9463b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9464b41a30aaSmrg else 9465b41a30aaSmrg cat conftest.err 1>&5 9466b41a30aaSmrg fi 9467b41a30aaSmrg $RM conftest* 9468b41a30aaSmrg ]) 9469b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9470b41a30aaSmrg ;; 9471b41a30aaSmrg esac 9472b41a30aaSmrg fi 9473b41a30aaSmrg ;; 9474b41a30aaSmrgesac 9475ea133fd7Smrg 9476b41a30aaSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9477b41a30aaSmrg [Whether or not to add -lc for building shared libraries]) 9478b41a30aaSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9479b41a30aaSmrg [enable_shared_with_static_runtimes], [0], 9480b41a30aaSmrg [Whether or not to disallow shared libs when runtime libs are static]) 9481b41a30aaSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9482b41a30aaSmrg [Compiler flag to allow reflexive dlopens]) 9483b41a30aaSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9484b41a30aaSmrg [Compiler flag to generate shared objects directly from archives]) 9485b41a30aaSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 9486b41a30aaSmrg [Whether the compiler copes with passing no objects directly]) 9487b41a30aaSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9488b41a30aaSmrg [Create an old-style archive from a shared archive]) 9489b41a30aaSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9490b41a30aaSmrg [Create a temporary old-style archive to link instead of a shared archive]) 9491b41a30aaSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9492b41a30aaSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9493b41a30aaSmrg_LT_TAGDECL([], [module_cmds], [2], 9494b41a30aaSmrg [Commands used to build a loadable module if different from building 9495b41a30aaSmrg a shared archive.]) 9496b41a30aaSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 9497b41a30aaSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 9498b41a30aaSmrg [Whether we are building with GNU ld or not]) 9499b41a30aaSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 9500b41a30aaSmrg [Flag that allows shared libraries with undefined symbols to be built]) 9501b41a30aaSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 9502b41a30aaSmrg [Flag that enforces no undefined symbols]) 9503b41a30aaSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9504b41a30aaSmrg [Flag to hardcode $libdir into a binary during linking. 9505b41a30aaSmrg This must work even if $libdir does not exist]) 9506b41a30aaSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9507b41a30aaSmrg [Whether we need a single "-rpath" flag with a separated argument]) 9508b41a30aaSmrg_LT_TAGDECL([], [hardcode_direct], [0], 9509b41a30aaSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9510b41a30aaSmrg DIR into the resulting binary]) 9511b41a30aaSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9512b41a30aaSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9513b41a30aaSmrg DIR into the resulting binary and the resulting library dependency is 9514b41a30aaSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 9515b41a30aaSmrg library is relocated]) 9516b41a30aaSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 9517b41a30aaSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9518b41a30aaSmrg into the resulting binary]) 9519b41a30aaSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9520b41a30aaSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9521b41a30aaSmrg into the resulting binary]) 9522b41a30aaSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 9523b41a30aaSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 9524b41a30aaSmrg into the library and all subsequent libraries and executables linked 9525b41a30aaSmrg against it]) 9526b41a30aaSmrg_LT_TAGDECL([], [inherit_rpath], [0], 9527b41a30aaSmrg [Set to yes if linker adds runtime paths of dependent libraries 9528b41a30aaSmrg to runtime path list]) 9529b41a30aaSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 9530b41a30aaSmrg [Whether libtool must link a program against all its dependency libraries]) 9531b41a30aaSmrg_LT_TAGDECL([], [always_export_symbols], [0], 9532b41a30aaSmrg [Set to "yes" if exported symbols are required]) 9533b41a30aaSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 9534b41a30aaSmrg [The commands to list exported symbols]) 9535b41a30aaSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 9536b41a30aaSmrg [Symbols that should not be listed in the preloaded symbols]) 9537b41a30aaSmrg_LT_TAGDECL([], [include_expsyms], [1], 9538b41a30aaSmrg [Symbols that must always be exported]) 9539b41a30aaSmrg_LT_TAGDECL([], [prelink_cmds], [2], 9540b41a30aaSmrg [Commands necessary for linking programs (against libraries) with templates]) 9541b41a30aaSmrg_LT_TAGDECL([], [postlink_cmds], [2], 9542b41a30aaSmrg [Commands necessary for finishing linking programs]) 9543b41a30aaSmrg_LT_TAGDECL([], [file_list_spec], [1], 9544b41a30aaSmrg [Specify filename containing input files]) 9545b41a30aaSmrgdnl FIXME: Not yet implemented 9546b41a30aaSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9547b41a30aaSmrgdnl [Compiler flag to generate thread safe objects]) 9548b41a30aaSmrg])# _LT_LINKER_SHLIBS 9549ea133fd7Smrg 9550ea133fd7Smrg 9551b41a30aaSmrg# _LT_LANG_C_CONFIG([TAG]) 9552b41a30aaSmrg# ------------------------ 9553b41a30aaSmrg# Ensure that the configuration variables for a C compiler are suitably 9554b41a30aaSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 9555b41a30aaSmrg# the compiler configuration to 'libtool'. 9556b41a30aaSmrgm4_defun([_LT_LANG_C_CONFIG], 9557b41a30aaSmrg[m4_require([_LT_DECL_EGREP])dnl 9558b41a30aaSmrglt_save_CC=$CC 9559b41a30aaSmrgAC_LANG_PUSH(C) 9560ea133fd7Smrg 9561b41a30aaSmrg# Source file extension for C test sources. 9562b41a30aaSmrgac_ext=c 9563ea133fd7Smrg 9564b41a30aaSmrg# Object file extension for compiled C test sources. 9565b41a30aaSmrgobjext=o 9566b41a30aaSmrg_LT_TAGVAR(objext, $1)=$objext 956725b89263Smrg 9568b41a30aaSmrg# Code to be used in simple compile tests 9569b41a30aaSmrglt_simple_compile_test_code="int some_variable = 0;" 957025b89263Smrg 9571b41a30aaSmrg# Code to be used in simple link tests 9572b41a30aaSmrglt_simple_link_test_code='int main(){return(0);}' 957325b89263Smrg 9574b41a30aaSmrg_LT_TAG_COMPILER 9575b41a30aaSmrg# Save the default compiler, since it gets overwritten when the other 9576b41a30aaSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9577b41a30aaSmrgcompiler_DEFAULT=$CC 957806f32fbeSmrg 9579b41a30aaSmrg# save warnings/boilerplate of simple test code 9580b41a30aaSmrg_LT_COMPILER_BOILERPLATE 9581b41a30aaSmrg_LT_LINKER_BOILERPLATE 958206f32fbeSmrg 9583b41a30aaSmrgif test -n "$compiler"; then 9584b41a30aaSmrg _LT_COMPILER_NO_RTTI($1) 9585b41a30aaSmrg _LT_COMPILER_PIC($1) 9586b41a30aaSmrg _LT_COMPILER_C_O($1) 9587b41a30aaSmrg _LT_COMPILER_FILE_LOCKS($1) 9588b41a30aaSmrg _LT_LINKER_SHLIBS($1) 9589b41a30aaSmrg _LT_SYS_DYNAMIC_LINKER($1) 9590b41a30aaSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9591b41a30aaSmrg LT_SYS_DLOPEN_SELF 9592b41a30aaSmrg _LT_CMD_STRIPLIB 959306f32fbeSmrg 9594b41a30aaSmrg # Report what library types will actually be built 9595b41a30aaSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9596b41a30aaSmrg AC_MSG_RESULT([$can_build_shared]) 959706f32fbeSmrg 9598b41a30aaSmrg AC_MSG_CHECKING([whether to build shared libraries]) 9599b41a30aaSmrg test no = "$can_build_shared" && enable_shared=no 960025b89263Smrg 9601b41a30aaSmrg # On AIX, shared libraries and static libraries use the same namespace, and 9602b41a30aaSmrg # are all built from PIC. 9603b41a30aaSmrg case $host_os in 9604b41a30aaSmrg aix3*) 9605b41a30aaSmrg test yes = "$enable_shared" && enable_static=no 9606b41a30aaSmrg if test -n "$RANLIB"; then 9607b41a30aaSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9608b41a30aaSmrg postinstall_cmds='$RANLIB $lib' 9609b41a30aaSmrg fi 9610b41a30aaSmrg ;; 9611ea133fd7Smrg 9612b41a30aaSmrg aix[[4-9]]*) 9613b41a30aaSmrg if test ia64 != "$host_cpu"; then 9614b41a30aaSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9615b41a30aaSmrg yes,aix,yes) ;; # shared object as lib.so file only 9616b41a30aaSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 9617b41a30aaSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 9618b41a30aaSmrg esac 9619b41a30aaSmrg fi 9620b41a30aaSmrg ;; 9621b41a30aaSmrg esac 9622b41a30aaSmrg AC_MSG_RESULT([$enable_shared]) 9623ea133fd7Smrg 9624b41a30aaSmrg AC_MSG_CHECKING([whether to build static libraries]) 9625b41a30aaSmrg # Make sure either enable_shared or enable_static is yes. 9626b41a30aaSmrg test yes = "$enable_shared" || enable_static=yes 9627b41a30aaSmrg AC_MSG_RESULT([$enable_static]) 9628ea133fd7Smrg 9629b41a30aaSmrg _LT_CONFIG($1) 9630b41a30aaSmrgfi 9631b41a30aaSmrgAC_LANG_POP 9632b41a30aaSmrgCC=$lt_save_CC 9633b41a30aaSmrg])# _LT_LANG_C_CONFIG 9634ea133fd7Smrg 9635b41a30aaSmrg 9636b41a30aaSmrg# _LT_LANG_CXX_CONFIG([TAG]) 9637b41a30aaSmrg# -------------------------- 9638b41a30aaSmrg# Ensure that the configuration variables for a C++ compiler are suitably 9639b41a30aaSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 9640b41a30aaSmrg# the compiler configuration to 'libtool'. 9641b41a30aaSmrgm4_defun([_LT_LANG_CXX_CONFIG], 9642b41a30aaSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9643b41a30aaSmrgm4_require([_LT_DECL_EGREP])dnl 9644b41a30aaSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9645b41a30aaSmrgif test -n "$CXX" && ( test no != "$CXX" && 9646b41a30aaSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9647b41a30aaSmrg (test g++ != "$CXX"))); then 9648b41a30aaSmrg AC_PROG_CXXCPP 9649b41a30aaSmrgelse 9650b41a30aaSmrg _lt_caught_CXX_error=yes 965131637056Smrgfi 9652ea133fd7Smrg 9653b41a30aaSmrgAC_LANG_PUSH(C++) 9654b41a30aaSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9655b41a30aaSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 9656b41a30aaSmrg_LT_TAGVAR(always_export_symbols, $1)=no 9657b41a30aaSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9658b41a30aaSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 9659b41a30aaSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9660b41a30aaSmrg_LT_TAGVAR(hardcode_direct, $1)=no 9661b41a30aaSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9662b41a30aaSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9663b41a30aaSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9664b41a30aaSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9665b41a30aaSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9666b41a30aaSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 9667b41a30aaSmrg_LT_TAGVAR(inherit_rpath, $1)=no 9668b41a30aaSmrg_LT_TAGVAR(module_cmds, $1)= 9669b41a30aaSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 9670b41a30aaSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9671b41a30aaSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9672b41a30aaSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9673b41a30aaSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9674b41a30aaSmrg_LT_TAGVAR(no_undefined_flag, $1)= 9675b41a30aaSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9676b41a30aaSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9677ea133fd7Smrg 9678b41a30aaSmrg# Source file extension for C++ test sources. 9679b41a30aaSmrgac_ext=cpp 9680ea133fd7Smrg 9681b41a30aaSmrg# Object file extension for compiled C++ test sources. 9682b41a30aaSmrgobjext=o 9683b41a30aaSmrg_LT_TAGVAR(objext, $1)=$objext 9684ea133fd7Smrg 9685b41a30aaSmrg# No sense in running all these tests if we already determined that 9686b41a30aaSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 9687b41a30aaSmrg# are currently assumed to apply to all compilers on this platform, 9688b41a30aaSmrg# and will be corrupted by setting them based on a non-working compiler. 9689b41a30aaSmrgif test yes != "$_lt_caught_CXX_error"; then 9690b41a30aaSmrg # Code to be used in simple compile tests 9691b41a30aaSmrg lt_simple_compile_test_code="int some_variable = 0;" 9692ea133fd7Smrg 9693b41a30aaSmrg # Code to be used in simple link tests 9694b41a30aaSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9695ea133fd7Smrg 9696b41a30aaSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9697b41a30aaSmrg _LT_TAG_COMPILER 9698ea133fd7Smrg 9699b41a30aaSmrg # save warnings/boilerplate of simple test code 9700b41a30aaSmrg _LT_COMPILER_BOILERPLATE 9701b41a30aaSmrg _LT_LINKER_BOILERPLATE 9702ea133fd7Smrg 9703b41a30aaSmrg # Allow CC to be a program name with arguments. 9704b41a30aaSmrg lt_save_CC=$CC 9705b41a30aaSmrg lt_save_CFLAGS=$CFLAGS 9706b41a30aaSmrg lt_save_LD=$LD 9707b41a30aaSmrg lt_save_GCC=$GCC 9708b41a30aaSmrg GCC=$GXX 9709b41a30aaSmrg lt_save_with_gnu_ld=$with_gnu_ld 9710b41a30aaSmrg lt_save_path_LD=$lt_cv_path_LD 9711b41a30aaSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9712b41a30aaSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9713b41a30aaSmrg else 9714b41a30aaSmrg $as_unset lt_cv_prog_gnu_ld 9715b41a30aaSmrg fi 9716b41a30aaSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 9717b41a30aaSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 9718b41a30aaSmrg else 9719b41a30aaSmrg $as_unset lt_cv_path_LD 9720b41a30aaSmrg fi 9721b41a30aaSmrg test -z "${LDCXX+set}" || LD=$LDCXX 9722b41a30aaSmrg CC=${CXX-"c++"} 9723b41a30aaSmrg CFLAGS=$CXXFLAGS 9724b41a30aaSmrg compiler=$CC 9725b41a30aaSmrg _LT_TAGVAR(compiler, $1)=$CC 9726b41a30aaSmrg _LT_CC_BASENAME([$compiler]) 9727ea133fd7Smrg 9728b41a30aaSmrg if test -n "$compiler"; then 9729b41a30aaSmrg # We don't want -fno-exception when compiling C++ code, so set the 9730b41a30aaSmrg # no_builtin_flag separately 9731b41a30aaSmrg if test yes = "$GXX"; then 9732b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9733b41a30aaSmrg else 9734b41a30aaSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9735b41a30aaSmrg fi 9736ea133fd7Smrg 9737b41a30aaSmrg if test yes = "$GXX"; then 9738b41a30aaSmrg # Set up default GNU C++ configuration 9739ea133fd7Smrg 9740b41a30aaSmrg LT_PATH_LD 974125b89263Smrg 9742b41a30aaSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 9743b41a30aaSmrg # archiving commands below assume that GNU ld is being used. 9744b41a30aaSmrg if test yes = "$with_gnu_ld"; then 9745b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9746b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9747ea133fd7Smrg 9748b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9749b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9750ea133fd7Smrg 9751b41a30aaSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 9752b41a30aaSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9753b41a30aaSmrg # investigate it a little bit more. (MM) 9754b41a30aaSmrg wlarc='$wl' 9755ea133fd7Smrg 9756b41a30aaSmrg # ancient GNU ld didn't support --whole-archive et. al. 9757b41a30aaSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9758b41a30aaSmrg $GREP 'no-whole-archive' > /dev/null; then 9759b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9760b41a30aaSmrg else 9761b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9762b41a30aaSmrg fi 9763b41a30aaSmrg else 9764b41a30aaSmrg with_gnu_ld=no 9765b41a30aaSmrg wlarc= 9766ea133fd7Smrg 9767b41a30aaSmrg # A generic and very simple default shared library creation 9768b41a30aaSmrg # command for GNU C++ for the case where it uses the native 9769b41a30aaSmrg # linker, instead of GNU ld. If possible, this setting should 9770b41a30aaSmrg # overridden to take advantage of the native linker features on 9771b41a30aaSmrg # the platform it is being used on. 9772b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9773b41a30aaSmrg fi 9774ea133fd7Smrg 9775b41a30aaSmrg # Commands to make compiler produce verbose output that lists 9776b41a30aaSmrg # what "hidden" libraries, object files and flags are used when 9777b41a30aaSmrg # linking a shared library. 9778b41a30aaSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9779b41a30aaSmrg 9780b41a30aaSmrg else 9781b41a30aaSmrg GXX=no 9782b41a30aaSmrg with_gnu_ld=no 9783b41a30aaSmrg wlarc= 9784b41a30aaSmrg fi 9785b41a30aaSmrg 9786b41a30aaSmrg # PORTME: fill in a description of your system's C++ link characteristics 9787b41a30aaSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9788b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9789b41a30aaSmrg case $host_os in 9790b41a30aaSmrg aix3*) 9791b41a30aaSmrg # FIXME: insert proper C++ library support 9792b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9793b41a30aaSmrg ;; 9794b41a30aaSmrg aix[[4-9]]*) 9795b41a30aaSmrg if test ia64 = "$host_cpu"; then 9796b41a30aaSmrg # On IA64, the linker does run time linking by default, so we don't 9797b41a30aaSmrg # have to do anything special. 9798b41a30aaSmrg aix_use_runtimelinking=no 9799b41a30aaSmrg exp_sym_flag='-Bexport' 9800b41a30aaSmrg no_entry_flag= 9801b41a30aaSmrg else 9802b41a30aaSmrg aix_use_runtimelinking=no 9803ea133fd7Smrg 9804b41a30aaSmrg # Test if we are trying to use run time linking or normal 9805b41a30aaSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9806b41a30aaSmrg # have runtime linking enabled, and use it for executables. 9807b41a30aaSmrg # For shared libraries, we enable/disable runtime linking 9808b41a30aaSmrg # depending on the kind of the shared library created - 9809b41a30aaSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 9810b41a30aaSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9811b41a30aaSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 9812b41a30aaSmrg # lib.a static archive 9813b41a30aaSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9814b41a30aaSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 9815b41a30aaSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9816b41a30aaSmrg # lib.a(lib.so.V) shared, rtl:no 9817b41a30aaSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9818b41a30aaSmrg # lib.a static archive 9819b41a30aaSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9820b41a30aaSmrg for ld_flag in $LDFLAGS; do 9821b41a30aaSmrg case $ld_flag in 9822b41a30aaSmrg *-brtl*) 9823b41a30aaSmrg aix_use_runtimelinking=yes 9824b41a30aaSmrg break 9825b41a30aaSmrg ;; 9826b41a30aaSmrg esac 9827b41a30aaSmrg done 9828b41a30aaSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9829b41a30aaSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9830b41a30aaSmrg # so we don't have lib.a shared libs to link our executables. 9831b41a30aaSmrg # We have to force runtime linking in this case. 9832b41a30aaSmrg aix_use_runtimelinking=yes 9833b41a30aaSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9834b41a30aaSmrg fi 9835b41a30aaSmrg ;; 9836b41a30aaSmrg esac 9837ea133fd7Smrg 9838b41a30aaSmrg exp_sym_flag='-bexport' 9839b41a30aaSmrg no_entry_flag='-bnoentry' 9840b41a30aaSmrg fi 9841ea133fd7Smrg 9842b41a30aaSmrg # When large executables or shared objects are built, AIX ld can 9843b41a30aaSmrg # have problems creating the table of contents. If linking a library 9844b41a30aaSmrg # or program results in "error TOC overflow" add -mminimal-toc to 9845b41a30aaSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9846b41a30aaSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 984706f32fbeSmrg 9848b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='' 9849b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9850b41a30aaSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9851b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9852b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9853b41a30aaSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9854b41a30aaSmrg case $with_aix_soname,$aix_use_runtimelinking in 9855b41a30aaSmrg aix,*) ;; # no import file 9856b41a30aaSmrg svr4,* | *,yes) # use import file 9857b41a30aaSmrg # The Import File defines what to hardcode. 9858b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9859b41a30aaSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9860b41a30aaSmrg ;; 9861b41a30aaSmrg esac 986206f32fbeSmrg 9863b41a30aaSmrg if test yes = "$GXX"; then 9864b41a30aaSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9865b41a30aaSmrg # We only want to do this on AIX 4.2 and lower, the check 9866b41a30aaSmrg # below for broken collect2 doesn't work under 4.3+ 9867b41a30aaSmrg collect2name=`$CC -print-prog-name=collect2` 9868b41a30aaSmrg if test -f "$collect2name" && 9869b41a30aaSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9870b41a30aaSmrg then 9871b41a30aaSmrg # We have reworked collect2 9872b41a30aaSmrg : 9873b41a30aaSmrg else 9874b41a30aaSmrg # We have old collect2 9875b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9876b41a30aaSmrg # It fails to find uninstalled libraries when the uninstalled 9877b41a30aaSmrg # path is not listed in the libpath. Setting hardcode_minus_L 9878b41a30aaSmrg # to unsupported forces relinking 9879b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9880b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9881b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9882b41a30aaSmrg fi 9883b41a30aaSmrg esac 9884b41a30aaSmrg shared_flag='-shared' 9885b41a30aaSmrg if test yes = "$aix_use_runtimelinking"; then 9886b41a30aaSmrg shared_flag=$shared_flag' $wl-G' 9887b41a30aaSmrg fi 9888b41a30aaSmrg # Need to ensure runtime linking is disabled for the traditional 9889b41a30aaSmrg # shared library, or the linker may eventually find shared libraries 9890b41a30aaSmrg # /with/ Import File - we do not want to mix them. 9891b41a30aaSmrg shared_flag_aix='-shared' 9892b41a30aaSmrg shared_flag_svr4='-shared $wl-G' 9893b41a30aaSmrg else 9894b41a30aaSmrg # not using gcc 9895b41a30aaSmrg if test ia64 = "$host_cpu"; then 9896b41a30aaSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9897b41a30aaSmrg # chokes on -Wl,-G. The following line is correct: 9898b41a30aaSmrg shared_flag='-G' 9899b41a30aaSmrg else 9900b41a30aaSmrg if test yes = "$aix_use_runtimelinking"; then 9901b41a30aaSmrg shared_flag='$wl-G' 9902b41a30aaSmrg else 9903b41a30aaSmrg shared_flag='$wl-bM:SRE' 9904b41a30aaSmrg fi 9905b41a30aaSmrg shared_flag_aix='$wl-bM:SRE' 9906b41a30aaSmrg shared_flag_svr4='$wl-G' 9907b41a30aaSmrg fi 9908b41a30aaSmrg fi 9909ea133fd7Smrg 9910b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9911b41a30aaSmrg # It seems that -bexpall does not export symbols beginning with 9912b41a30aaSmrg # underscore (_), so it is better to generate a list of symbols to 9913b41a30aaSmrg # export. 9914b41a30aaSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 9915b41a30aaSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9916b41a30aaSmrg # Warning - without using the other runtime loading flags (-brtl), 9917b41a30aaSmrg # -berok will link without error, but may produce a broken library. 9918b41a30aaSmrg # The "-G" linker flag allows undefined symbols. 9919b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 9920b41a30aaSmrg # Determine the default libpath from the value encoded in an empty 9921b41a30aaSmrg # executable. 9922b41a30aaSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 9923b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9924ea133fd7Smrg 9925b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 9926b41a30aaSmrg else 9927b41a30aaSmrg if test ia64 = "$host_cpu"; then 9928b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9929b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 9930b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 9931b41a30aaSmrg else 9932b41a30aaSmrg # Determine the default libpath from the value encoded in an 9933b41a30aaSmrg # empty executable. 9934b41a30aaSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 9935b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9936b41a30aaSmrg # Warning - without using the other run time loading flags, 9937b41a30aaSmrg # -berok will link without error, but may produce a broken library. 9938b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 9939b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 9940b41a30aaSmrg if test yes = "$with_gnu_ld"; then 9941b41a30aaSmrg # We only use this code for GNU lds that support --whole-archive. 9942b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9943b41a30aaSmrg else 9944b41a30aaSmrg # Exported symbols can be pulled into shared objects from archives 9945b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 9946b41a30aaSmrg fi 9947b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9948b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 9949b41a30aaSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 9950b41a30aaSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 9951b41a30aaSmrg if test svr4 != "$with_aix_soname"; then 9952b41a30aaSmrg # This is similar to how AIX traditionally builds its shared 9953b41a30aaSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 9954b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 9955b41a30aaSmrg fi 9956b41a30aaSmrg if test aix != "$with_aix_soname"; then 9957b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 9958b41a30aaSmrg else 9959b41a30aaSmrg # used by -dlpreopen to get the symbols 9960b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 9961b41a30aaSmrg fi 9962b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 9963b41a30aaSmrg fi 9964b41a30aaSmrg fi 9965b41a30aaSmrg ;; 9966ea133fd7Smrg 9967b41a30aaSmrg beos*) 9968b41a30aaSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9969b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9970b41a30aaSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 9971b41a30aaSmrg # support --undefined. This deserves some investigation. FIXME 9972b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9973b41a30aaSmrg else 9974b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9975b41a30aaSmrg fi 9976b41a30aaSmrg ;; 9977a253d6aeSmrg 9978b41a30aaSmrg chorus*) 9979b41a30aaSmrg case $cc_basename in 9980b41a30aaSmrg *) 9981b41a30aaSmrg # FIXME: insert proper C++ library support 9982b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9983b41a30aaSmrg ;; 9984b41a30aaSmrg esac 9985b41a30aaSmrg ;; 9986a253d6aeSmrg 9987b41a30aaSmrg cygwin* | mingw* | pw32* | cegcc*) 9988b41a30aaSmrg case $GXX,$cc_basename in 9989b41a30aaSmrg ,cl* | no,cl* | ,icl* | no,icl*) 9990b41a30aaSmrg # Native MSVC or ICC 9991b41a30aaSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 9992b41a30aaSmrg # no search path for DLLs. 9993b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9994b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9995b41a30aaSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 9996b41a30aaSmrg _LT_TAGVAR(file_list_spec, $1)='@' 9997b41a30aaSmrg # Tell ltmain to make .lib files, not .a files. 9998b41a30aaSmrg libext=lib 9999b41a30aaSmrg # Tell ltmain to make .dll files, not .so files. 10000b41a30aaSmrg shrext_cmds=.dll 10001b41a30aaSmrg # FIXME: Setting linknames here is a bad hack. 10002b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10003b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10004b41a30aaSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 10005b41a30aaSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10006b41a30aaSmrg else 10007b41a30aaSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10008b41a30aaSmrg fi~ 10009b41a30aaSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10010b41a30aaSmrg linknames=' 10011b41a30aaSmrg # The linker will not automatically build a static lib if we build a DLL. 10012b41a30aaSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10013b41a30aaSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10014b41a30aaSmrg # Don't use ranlib 10015b41a30aaSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10016b41a30aaSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10017b41a30aaSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10018b41a30aaSmrg case $lt_outputfile in 10019b41a30aaSmrg *.exe|*.EXE) ;; 10020b41a30aaSmrg *) 10021b41a30aaSmrg lt_outputfile=$lt_outputfile.exe 10022b41a30aaSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 10023b41a30aaSmrg ;; 10024b41a30aaSmrg esac~ 10025b41a30aaSmrg func_to_tool_file "$lt_outputfile"~ 10026b41a30aaSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10027b41a30aaSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10028b41a30aaSmrg $RM "$lt_outputfile.manifest"; 10029b41a30aaSmrg fi' 10030b41a30aaSmrg ;; 10031b41a30aaSmrg *) 10032b41a30aaSmrg # g++ 10033b41a30aaSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10034b41a30aaSmrg # as there is no search path for DLLs. 10035b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10036b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10037b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10038b41a30aaSmrg _LT_TAGVAR(always_export_symbols, $1)=no 10039b41a30aaSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10040b41a30aaSmrg 10041b41a30aaSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10042b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 10043b41a30aaSmrg # If the export-symbols file already is a .def file, use it as 10044b41a30aaSmrg # is; otherwise, prepend EXPORTS... 10045b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10046b41a30aaSmrg cp $export_symbols $output_objdir/$soname.def; 10047b41a30aaSmrg else 10048b41a30aaSmrg echo EXPORTS > $output_objdir/$soname.def; 10049b41a30aaSmrg cat $export_symbols >> $output_objdir/$soname.def; 10050b41a30aaSmrg fi~ 10051b41a30aaSmrg $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' 10052b41a30aaSmrg else 10053b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10054b41a30aaSmrg fi 10055b41a30aaSmrg ;; 10056b41a30aaSmrg esac 10057b41a30aaSmrg ;; 10058b41a30aaSmrg darwin* | rhapsody*) 10059b41a30aaSmrg _LT_DARWIN_LINKER_FEATURES($1) 10060b41a30aaSmrg ;; 10061a253d6aeSmrg 10062b41a30aaSmrg os2*) 10063b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10064b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10065b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10066b41a30aaSmrg shrext_cmds=.dll 10067b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10068b41a30aaSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10069b41a30aaSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10070b41a30aaSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10071b41a30aaSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10072b41a30aaSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10073b41a30aaSmrg emximp -o $lib $output_objdir/$libname.def' 10074b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10075b41a30aaSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10076b41a30aaSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10077b41a30aaSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10078b41a30aaSmrg prefix_cmds="$SED"~ 10079b41a30aaSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10080b41a30aaSmrg prefix_cmds="$prefix_cmds -e 1d"; 10081b41a30aaSmrg fi~ 10082b41a30aaSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10083b41a30aaSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10084b41a30aaSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10085b41a30aaSmrg emximp -o $lib $output_objdir/$libname.def' 10086b41a30aaSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10087b41a30aaSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10088b41a30aaSmrg _LT_TAGVAR(file_list_spec, $1)='@' 10089b41a30aaSmrg ;; 10090a253d6aeSmrg 10091b41a30aaSmrg dgux*) 10092b41a30aaSmrg case $cc_basename in 10093b41a30aaSmrg ec++*) 10094b41a30aaSmrg # FIXME: insert proper C++ library support 10095b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10096b41a30aaSmrg ;; 10097b41a30aaSmrg ghcx*) 10098b41a30aaSmrg # Green Hills C++ Compiler 10099b41a30aaSmrg # FIXME: insert proper C++ library support 10100b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10101b41a30aaSmrg ;; 10102b41a30aaSmrg *) 10103b41a30aaSmrg # FIXME: insert proper C++ library support 10104b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10105b41a30aaSmrg ;; 10106b41a30aaSmrg esac 10107b41a30aaSmrg ;; 10108a253d6aeSmrg 10109b41a30aaSmrg freebsd2.*) 10110b41a30aaSmrg # C++ shared libraries reported to be fairly broken before 10111b41a30aaSmrg # switch to ELF 10112b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10113b41a30aaSmrg ;; 10114a253d6aeSmrg 10115b41a30aaSmrg freebsd-elf*) 10116b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10117b41a30aaSmrg ;; 10118a253d6aeSmrg 10119b41a30aaSmrg freebsd* | dragonfly* | midnightbsd*) 10120b41a30aaSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10121b41a30aaSmrg # conventions 10122b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 10123b41a30aaSmrg ;; 10124a253d6aeSmrg 10125b41a30aaSmrg haiku*) 10126b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10127b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10128b41a30aaSmrg ;; 10129a253d6aeSmrg 10130b41a30aaSmrg hpux9*) 10131b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10132b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10133b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10134b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10135b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10136b41a30aaSmrg # but as the default 10137b41a30aaSmrg # location of the library. 10138a253d6aeSmrg 10139b41a30aaSmrg case $cc_basename in 10140b41a30aaSmrg CC*) 10141b41a30aaSmrg # FIXME: insert proper C++ library support 10142b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10143b41a30aaSmrg ;; 10144b41a30aaSmrg aCC*) 10145b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 10146b41a30aaSmrg # Commands to make compiler produce verbose output that lists 10147b41a30aaSmrg # what "hidden" libraries, object files and flags are used when 10148b41a30aaSmrg # linking a shared library. 10149b41a30aaSmrg # 10150b41a30aaSmrg # There doesn't appear to be a way to prevent this compiler from 10151b41a30aaSmrg # explicitly linking system object files so we need to strip them 10152b41a30aaSmrg # from the output so that they don't get included in the library 10153b41a30aaSmrg # dependencies. 10154b41a30aaSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 10155b41a30aaSmrg ;; 10156b41a30aaSmrg *) 10157b41a30aaSmrg if test yes = "$GXX"; then 10158b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 10159b41a30aaSmrg else 10160b41a30aaSmrg # FIXME: insert proper C++ library support 10161b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10162b41a30aaSmrg fi 10163b41a30aaSmrg ;; 10164b41a30aaSmrg esac 10165b41a30aaSmrg ;; 10166a253d6aeSmrg 10167b41a30aaSmrg hpux10*|hpux11*) 10168b41a30aaSmrg if test no = "$with_gnu_ld"; then 10169b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10170b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10171a253d6aeSmrg 10172b41a30aaSmrg case $host_cpu in 10173b41a30aaSmrg hppa*64*|ia64*) 10174b41a30aaSmrg ;; 10175b41a30aaSmrg *) 10176b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10177b41a30aaSmrg ;; 10178b41a30aaSmrg esac 10179b41a30aaSmrg fi 10180b41a30aaSmrg case $host_cpu in 10181b41a30aaSmrg hppa*64*|ia64*) 10182b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10183b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10184b41a30aaSmrg ;; 10185b41a30aaSmrg *) 10186b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10187b41a30aaSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10188b41a30aaSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10189b41a30aaSmrg # but as the default 10190b41a30aaSmrg # location of the library. 10191b41a30aaSmrg ;; 10192b41a30aaSmrg esac 10193ea133fd7Smrg 10194b41a30aaSmrg case $cc_basename in 10195b41a30aaSmrg CC*) 10196b41a30aaSmrg # FIXME: insert proper C++ library support 10197b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10198b41a30aaSmrg ;; 10199b41a30aaSmrg aCC*) 10200b41a30aaSmrg case $host_cpu in 10201b41a30aaSmrg hppa*64*) 10202b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10203b41a30aaSmrg ;; 10204b41a30aaSmrg ia64*) 10205b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10206b41a30aaSmrg ;; 10207b41a30aaSmrg *) 10208b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10209b41a30aaSmrg ;; 10210b41a30aaSmrg esac 10211b41a30aaSmrg # Commands to make compiler produce verbose output that lists 10212b41a30aaSmrg # what "hidden" libraries, object files and flags are used when 10213b41a30aaSmrg # linking a shared library. 10214b41a30aaSmrg # 10215b41a30aaSmrg # There doesn't appear to be a way to prevent this compiler from 10216b41a30aaSmrg # explicitly linking system object files so we need to strip them 10217b41a30aaSmrg # from the output so that they don't get included in the library 10218b41a30aaSmrg # dependencies. 10219b41a30aaSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 10220b41a30aaSmrg ;; 10221b41a30aaSmrg *) 10222b41a30aaSmrg if test yes = "$GXX"; then 10223b41a30aaSmrg if test no = "$with_gnu_ld"; then 10224b41a30aaSmrg case $host_cpu in 10225b41a30aaSmrg hppa*64*) 10226b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10227b41a30aaSmrg ;; 10228b41a30aaSmrg ia64*) 10229b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10230b41a30aaSmrg ;; 10231b41a30aaSmrg *) 10232b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10233b41a30aaSmrg ;; 10234b41a30aaSmrg esac 10235b41a30aaSmrg fi 10236b41a30aaSmrg else 10237b41a30aaSmrg # FIXME: insert proper C++ library support 10238b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10239b41a30aaSmrg fi 10240b41a30aaSmrg ;; 10241b41a30aaSmrg esac 10242b41a30aaSmrg ;; 10243ea133fd7Smrg 10244b41a30aaSmrg interix[[3-9]]*) 10245b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10246b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10247b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10248b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10249b41a30aaSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10250b41a30aaSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10251b41a30aaSmrg # default) and relocated if they conflict, which is a slow very memory 10252b41a30aaSmrg # consuming and fragmenting process. To avoid this, we pick a random, 10253b41a30aaSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10254b41a30aaSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10255b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 10256b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 10257b41a30aaSmrg ;; 10258b41a30aaSmrg irix5* | irix6*) 10259b41a30aaSmrg case $cc_basename in 10260b41a30aaSmrg CC*) 10261b41a30aaSmrg # SGI C++ 10262b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 10263ea133fd7Smrg 10264b41a30aaSmrg # Archives containing C++ object files must be created using 10265b41a30aaSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10266b41a30aaSmrg # necessary to make sure instantiated templates are included 10267b41a30aaSmrg # in the archive. 10268b41a30aaSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10269b41a30aaSmrg ;; 10270b41a30aaSmrg *) 10271b41a30aaSmrg if test yes = "$GXX"; then 10272b41a30aaSmrg if test no = "$with_gnu_ld"; then 10273b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 10274b41a30aaSmrg else 10275b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' 10276b41a30aaSmrg fi 10277b41a30aaSmrg fi 10278b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10279b41a30aaSmrg ;; 10280b41a30aaSmrg esac 10281b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10282b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10283b41a30aaSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 10284b41a30aaSmrg ;; 10285ea133fd7Smrg 10286b41a30aaSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10287b41a30aaSmrg case $cc_basename in 10288b41a30aaSmrg KCC*) 10289b41a30aaSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10290ea133fd7Smrg 10291b41a30aaSmrg # KCC will only create a shared library if the output file 10292b41a30aaSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10293b41a30aaSmrg # to its proper name (with version) after linking. 10294b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 10295b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' 10296b41a30aaSmrg # Commands to make compiler produce verbose output that lists 10297b41a30aaSmrg # what "hidden" libraries, object files and flags are used when 10298b41a30aaSmrg # linking a shared library. 10299b41a30aaSmrg # 10300b41a30aaSmrg # There doesn't appear to be a way to prevent this compiler from 10301b41a30aaSmrg # explicitly linking system object files so we need to strip them 10302b41a30aaSmrg # from the output so that they don't get included in the library 10303b41a30aaSmrg # dependencies. 10304b41a30aaSmrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 10305ea133fd7Smrg 10306b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10307b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10308ea133fd7Smrg 10309b41a30aaSmrg # Archives containing C++ object files must be created using 10310b41a30aaSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10311b41a30aaSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10312b41a30aaSmrg ;; 10313b41a30aaSmrg icpc* | ecpc* ) 10314b41a30aaSmrg # Intel C++ 10315b41a30aaSmrg with_gnu_ld=yes 10316b41a30aaSmrg # version 8.0 and above of icpc choke on multiply defined symbols 10317b41a30aaSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10318b41a30aaSmrg # earlier do not add the objects themselves. 10319b41a30aaSmrg case `$CC -V 2>&1` in 10320b41a30aaSmrg *"Version 7."*) 10321b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10322b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10323b41a30aaSmrg ;; 10324b41a30aaSmrg *) # Version 8.0 or newer 10325b41a30aaSmrg tmp_idyn= 10326b41a30aaSmrg case $host_cpu in 10327b41a30aaSmrg ia64*) tmp_idyn=' -i_dynamic';; 10328b41a30aaSmrg esac 10329b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10330b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10331b41a30aaSmrg ;; 10332b41a30aaSmrg esac 10333b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10334b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10335b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10336b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10337b41a30aaSmrg ;; 10338b41a30aaSmrg pgCC* | pgcpp*) 10339b41a30aaSmrg # Portland Group C++ compiler 10340b41a30aaSmrg case `$CC -V` in 10341b41a30aaSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10342b41a30aaSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10343b41a30aaSmrg rm -rf $tpldir~ 10344b41a30aaSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10345b41a30aaSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10346b41a30aaSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10347b41a30aaSmrg rm -rf $tpldir~ 10348b41a30aaSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10349b41a30aaSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10350b41a30aaSmrg $RANLIB $oldlib' 10351b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10352b41a30aaSmrg rm -rf $tpldir~ 10353b41a30aaSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10354b41a30aaSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10355b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10356b41a30aaSmrg rm -rf $tpldir~ 10357b41a30aaSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10358b41a30aaSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10359b41a30aaSmrg ;; 10360b41a30aaSmrg *) # Version 6 and above use weak symbols 10361b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10362b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10363b41a30aaSmrg ;; 10364b41a30aaSmrg esac 1036525b89263Smrg 10366b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10367b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10368b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 10369b41a30aaSmrg ;; 10370b41a30aaSmrg cxx*) 10371b41a30aaSmrg # Compaq C++ 10372b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10373b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' 1037425b89263Smrg 10375b41a30aaSmrg runpath_var=LD_RUN_PATH 10376b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10377b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 1037825b89263Smrg 10379b41a30aaSmrg # Commands to make compiler produce verbose output that lists 10380b41a30aaSmrg # what "hidden" libraries, object files and flags are used when 10381b41a30aaSmrg # linking a shared library. 10382b41a30aaSmrg # 10383b41a30aaSmrg # There doesn't appear to be a way to prevent this compiler from 10384b41a30aaSmrg # explicitly linking system object files so we need to strip them 10385b41a30aaSmrg # from the output so that they don't get included in the library 10386b41a30aaSmrg # dependencies. 10387b41a30aaSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 10388b41a30aaSmrg ;; 10389b41a30aaSmrg xl* | mpixl* | bgxl*) 10390b41a30aaSmrg # IBM XL 8.0 on PPC, with GNU ld 10391b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10392b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10393b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10394b41a30aaSmrg if test yes = "$supports_anon_versioning"; then 10395b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10396b41a30aaSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10397b41a30aaSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 10398b41a30aaSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10399b41a30aaSmrg fi 10400b41a30aaSmrg ;; 10401b41a30aaSmrg *) 10402b41a30aaSmrg case `$CC -V 2>&1 | $SED 5q` in 10403b41a30aaSmrg *Sun\ C*) 10404b41a30aaSmrg # Sun C++ 5.9 10405b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10406b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10407b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' 10408b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10409b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 10410b41a30aaSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 1041125b89263Smrg 10412b41a30aaSmrg # Not sure whether something based on 10413b41a30aaSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10414b41a30aaSmrg # would be better. 10415b41a30aaSmrg output_verbose_link_cmd='func_echo_all' 1041625b89263Smrg 10417b41a30aaSmrg # Archives containing C++ object files must be created using 10418b41a30aaSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10419b41a30aaSmrg # necessary to make sure instantiated templates are included 10420b41a30aaSmrg # in the archive. 10421b41a30aaSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10422b41a30aaSmrg ;; 10423b41a30aaSmrg esac 10424b41a30aaSmrg ;; 10425b41a30aaSmrg esac 10426b41a30aaSmrg ;; 10427ea133fd7Smrg 10428b41a30aaSmrg lynxos*) 10429b41a30aaSmrg # FIXME: insert proper C++ library support 10430b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10431b41a30aaSmrg ;; 10432ea133fd7Smrg 10433b41a30aaSmrg m88k*) 10434b41a30aaSmrg # FIXME: insert proper C++ library support 10435b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10436b41a30aaSmrg ;; 10437a253d6aeSmrg 10438b41a30aaSmrg mvs*) 10439b41a30aaSmrg case $cc_basename in 10440b41a30aaSmrg cxx*) 10441b41a30aaSmrg # FIXME: insert proper C++ library support 10442b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10443b41a30aaSmrg ;; 10444b41a30aaSmrg *) 10445b41a30aaSmrg # FIXME: insert proper C++ library support 10446b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10447b41a30aaSmrg ;; 10448b41a30aaSmrg esac 10449b41a30aaSmrg ;; 10450a253d6aeSmrg 10451b41a30aaSmrg netbsd*) 10452b41a30aaSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10453b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10454b41a30aaSmrg wlarc= 10455b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10456b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10457b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10458b41a30aaSmrg fi 10459b41a30aaSmrg # Workaround some broken pre-1.5 toolchains 10460b41a30aaSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10461b41a30aaSmrg ;; 10462a253d6aeSmrg 10463b41a30aaSmrg *nto* | *qnx*) 10464b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 10465b41a30aaSmrg ;; 1046631637056Smrg 10467b41a30aaSmrg openbsd* | bitrig*) 10468b41a30aaSmrg if test -f /usr/libexec/ld.so; then 10469b41a30aaSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10470b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10471b41a30aaSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10472b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10473b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10474b41a30aaSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10475b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' 10476b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10477b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10478b41a30aaSmrg fi 10479b41a30aaSmrg output_verbose_link_cmd=func_echo_all 10480b41a30aaSmrg else 10481b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10482b41a30aaSmrg fi 10483b41a30aaSmrg ;; 1048431637056Smrg 10485b41a30aaSmrg osf3* | osf4* | osf5*) 10486b41a30aaSmrg case $cc_basename in 10487b41a30aaSmrg KCC*) 10488b41a30aaSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10489a253d6aeSmrg 10490b41a30aaSmrg # KCC will only create a shared library if the output file 10491b41a30aaSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10492b41a30aaSmrg # to its proper name (with version) after linking. 10493b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 1049431637056Smrg 10495b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10496b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 1049731637056Smrg 10498b41a30aaSmrg # Archives containing C++ object files must be created using 10499b41a30aaSmrg # the KAI C++ compiler. 10500b41a30aaSmrg case $host in 10501b41a30aaSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10502b41a30aaSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10503b41a30aaSmrg esac 10504b41a30aaSmrg ;; 10505b41a30aaSmrg RCC*) 10506b41a30aaSmrg # Rational C++ 2.4.1 10507b41a30aaSmrg # FIXME: insert proper C++ library support 10508b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10509b41a30aaSmrg ;; 10510b41a30aaSmrg cxx*) 10511b41a30aaSmrg case $host in 10512b41a30aaSmrg osf3*) 10513b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10514b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 10515b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10516b41a30aaSmrg ;; 10517b41a30aaSmrg *) 10518b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10519b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 10520b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10521b41a30aaSmrg echo "-hidden">> $lib.exp~ 10522b41a30aaSmrg $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~ 10523b41a30aaSmrg $RM $lib.exp' 10524b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10525b41a30aaSmrg ;; 10526b41a30aaSmrg esac 10527a253d6aeSmrg 10528b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10529a253d6aeSmrg 10530b41a30aaSmrg # Commands to make compiler produce verbose output that lists 10531b41a30aaSmrg # what "hidden" libraries, object files and flags are used when 10532b41a30aaSmrg # linking a shared library. 10533b41a30aaSmrg # 10534b41a30aaSmrg # There doesn't appear to be a way to prevent this compiler from 10535b41a30aaSmrg # explicitly linking system object files so we need to strip them 10536b41a30aaSmrg # from the output so that they don't get included in the library 10537b41a30aaSmrg # dependencies. 10538b41a30aaSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 10539b41a30aaSmrg ;; 10540b41a30aaSmrg *) 10541b41a30aaSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 10542b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10543b41a30aaSmrg case $host in 10544b41a30aaSmrg osf3*) 10545b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 10546b41a30aaSmrg ;; 10547b41a30aaSmrg *) 10548b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 10549b41a30aaSmrg ;; 10550b41a30aaSmrg esac 10551a253d6aeSmrg 10552b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10553b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10554a253d6aeSmrg 10555b41a30aaSmrg # Commands to make compiler produce verbose output that lists 10556b41a30aaSmrg # what "hidden" libraries, object files and flags are used when 10557b41a30aaSmrg # linking a shared library. 10558b41a30aaSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10559a253d6aeSmrg 10560b41a30aaSmrg else 10561b41a30aaSmrg # FIXME: insert proper C++ library support 10562b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10563b41a30aaSmrg fi 10564b41a30aaSmrg ;; 10565b41a30aaSmrg esac 10566b41a30aaSmrg ;; 10567a253d6aeSmrg 10568b41a30aaSmrg psos*) 10569b41a30aaSmrg # FIXME: insert proper C++ library support 10570b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10571b41a30aaSmrg ;; 10572a253d6aeSmrg 10573b41a30aaSmrg sunos4*) 10574b41a30aaSmrg case $cc_basename in 10575b41a30aaSmrg CC*) 10576b41a30aaSmrg # Sun C++ 4.x 10577b41a30aaSmrg # FIXME: insert proper C++ library support 10578b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10579b41a30aaSmrg ;; 10580b41a30aaSmrg lcc*) 10581b41a30aaSmrg # Lucid 10582b41a30aaSmrg # FIXME: insert proper C++ library support 10583b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10584b41a30aaSmrg ;; 10585b41a30aaSmrg *) 10586b41a30aaSmrg # FIXME: insert proper C++ library support 10587b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10588b41a30aaSmrg ;; 10589b41a30aaSmrg esac 10590b41a30aaSmrg ;; 10591ea133fd7Smrg 10592b41a30aaSmrg solaris*) 10593b41a30aaSmrg case $cc_basename in 10594b41a30aaSmrg CC* | sunCC*) 10595b41a30aaSmrg # Sun C++ 4.2, 5.x and Centerline C++ 10596b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10597b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10598b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10599b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10600b41a30aaSmrg $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' 10601ea133fd7Smrg 10602b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10603b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10604b41a30aaSmrg case $host_os in 10605b41a30aaSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10606b41a30aaSmrg *) 10607b41a30aaSmrg # The compiler driver will combine and reorder linker options, 10608b41a30aaSmrg # but understands '-z linker_flag'. 10609b41a30aaSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10610b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10611b41a30aaSmrg ;; 10612b41a30aaSmrg esac 10613b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10614b41a30aaSmrg 10615b41a30aaSmrg output_verbose_link_cmd='func_echo_all' 10616ea133fd7Smrg 10617b41a30aaSmrg # Archives containing C++ object files must be created using 10618b41a30aaSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10619b41a30aaSmrg # necessary to make sure instantiated templates are included 10620b41a30aaSmrg # in the archive. 10621b41a30aaSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10622b41a30aaSmrg ;; 10623b41a30aaSmrg gcx*) 10624b41a30aaSmrg # Green Hills C++ Compiler 10625b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10626ea133fd7Smrg 10627b41a30aaSmrg # The C++ compiler must be used to create the archive. 10628b41a30aaSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10629b41a30aaSmrg ;; 10630b41a30aaSmrg *) 10631b41a30aaSmrg # GNU C++ compiler with Solaris linker 10632b41a30aaSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 10633b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10634b41a30aaSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10635b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10636b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10637b41a30aaSmrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 10638a253d6aeSmrg 10639b41a30aaSmrg # Commands to make compiler produce verbose output that lists 10640b41a30aaSmrg # what "hidden" libraries, object files and flags are used when 10641b41a30aaSmrg # linking a shared library. 10642b41a30aaSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10643b41a30aaSmrg else 10644b41a30aaSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 10645b41a30aaSmrg # platform. 10646b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10647b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10648b41a30aaSmrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 1064931637056Smrg 10650b41a30aaSmrg # Commands to make compiler produce verbose output that lists 10651b41a30aaSmrg # what "hidden" libraries, object files and flags are used when 10652b41a30aaSmrg # linking a shared library. 10653b41a30aaSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10654b41a30aaSmrg fi 10655ea133fd7Smrg 10656b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10657b41a30aaSmrg case $host_os in 10658b41a30aaSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10659b41a30aaSmrg *) 10660b41a30aaSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10661b41a30aaSmrg ;; 10662b41a30aaSmrg esac 10663b41a30aaSmrg fi 10664b41a30aaSmrg ;; 10665b41a30aaSmrg esac 10666b41a30aaSmrg ;; 10667ea133fd7Smrg 10668b41a30aaSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10669b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10670b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10671b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10672b41a30aaSmrg runpath_var='LD_RUN_PATH' 10673ea133fd7Smrg 10674b41a30aaSmrg case $cc_basename in 10675b41a30aaSmrg CC*) 10676b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10677b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10678b41a30aaSmrg ;; 10679b41a30aaSmrg *) 10680b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10681b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10682b41a30aaSmrg ;; 10683b41a30aaSmrg esac 10684b41a30aaSmrg ;; 10685a253d6aeSmrg 10686b41a30aaSmrg sysv5* | sco3.2v5* | sco5v6*) 10687b41a30aaSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 10688b41a30aaSmrg # link with -lc, and that would cause any symbols used from libc to 10689b41a30aaSmrg # always be unresolved, which means just about no library would 10690b41a30aaSmrg # ever link correctly. If we're not using GNU ld we use -z text 10691b41a30aaSmrg # though, which does catch some bad symbols but isn't as heavy-handed 10692b41a30aaSmrg # as -z defs. 10693b41a30aaSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10694b41a30aaSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10695b41a30aaSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10696b41a30aaSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10697b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10698b41a30aaSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10699b41a30aaSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10700b41a30aaSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10701b41a30aaSmrg runpath_var='LD_RUN_PATH' 1070231637056Smrg 10703b41a30aaSmrg case $cc_basename in 10704b41a30aaSmrg CC*) 10705b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10706b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10707b41a30aaSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10708b41a30aaSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 10709b41a30aaSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10710b41a30aaSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 10711b41a30aaSmrg ;; 10712b41a30aaSmrg *) 10713b41a30aaSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10714b41a30aaSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10715b41a30aaSmrg ;; 10716b41a30aaSmrg esac 10717b41a30aaSmrg ;; 10718a253d6aeSmrg 10719b41a30aaSmrg tandem*) 10720b41a30aaSmrg case $cc_basename in 10721b41a30aaSmrg NCC*) 10722b41a30aaSmrg # NonStop-UX NCC 3.20 10723b41a30aaSmrg # FIXME: insert proper C++ library support 10724b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10725b41a30aaSmrg ;; 10726b41a30aaSmrg *) 10727b41a30aaSmrg # FIXME: insert proper C++ library support 10728b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10729b41a30aaSmrg ;; 10730b41a30aaSmrg esac 10731b41a30aaSmrg ;; 1073231637056Smrg 10733b41a30aaSmrg vxworks*) 10734b41a30aaSmrg # FIXME: insert proper C++ library support 10735b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10736b41a30aaSmrg ;; 10737a253d6aeSmrg 10738b41a30aaSmrg *) 10739b41a30aaSmrg # FIXME: insert proper C++ library support 10740b41a30aaSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10741b41a30aaSmrg ;; 10742b41a30aaSmrg esac 10743ea133fd7Smrg 10744b41a30aaSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10745b41a30aaSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 1074631637056Smrg 10747b41a30aaSmrg _LT_TAGVAR(GCC, $1)=$GXX 10748b41a30aaSmrg _LT_TAGVAR(LD, $1)=$LD 1074931637056Smrg 10750b41a30aaSmrg ## CAVEAT EMPTOR: 10751b41a30aaSmrg ## There is no encapsulation within the following macros, do not change 10752b41a30aaSmrg ## the running order or otherwise move them around unless you know exactly 10753b41a30aaSmrg ## what you are doing... 10754b41a30aaSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 10755b41a30aaSmrg _LT_COMPILER_PIC($1) 10756b41a30aaSmrg _LT_COMPILER_C_O($1) 10757b41a30aaSmrg _LT_COMPILER_FILE_LOCKS($1) 10758b41a30aaSmrg _LT_LINKER_SHLIBS($1) 10759b41a30aaSmrg _LT_SYS_DYNAMIC_LINKER($1) 10760b41a30aaSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 1076131637056Smrg 10762b41a30aaSmrg _LT_CONFIG($1) 10763b41a30aaSmrg fi # test -n "$compiler" 10764ea133fd7Smrg 10765b41a30aaSmrg CC=$lt_save_CC 10766b41a30aaSmrg CFLAGS=$lt_save_CFLAGS 10767b41a30aaSmrg LDCXX=$LD 10768b41a30aaSmrg LD=$lt_save_LD 10769b41a30aaSmrg GCC=$lt_save_GCC 10770b41a30aaSmrg with_gnu_ld=$lt_save_with_gnu_ld 10771b41a30aaSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 10772b41a30aaSmrg lt_cv_path_LD=$lt_save_path_LD 10773b41a30aaSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10774b41a30aaSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10775b41a30aaSmrgfi # test yes != "$_lt_caught_CXX_error" 10776a253d6aeSmrg 10777b41a30aaSmrgAC_LANG_POP 10778b41a30aaSmrg])# _LT_LANG_CXX_CONFIG 10779a253d6aeSmrg 10780b41a30aaSmrg 10781b41a30aaSmrg# _LT_FUNC_STRIPNAME_CNF 10782b41a30aaSmrg# ---------------------- 10783b41a30aaSmrg# func_stripname_cnf prefix suffix name 10784b41a30aaSmrg# strip PREFIX and SUFFIX off of NAME. 10785b41a30aaSmrg# PREFIX and SUFFIX must not contain globbing or regex special 10786b41a30aaSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 10787b41a30aaSmrg# dot (in which case that matches only a dot). 1078857ee1794Smrg# 10789b41a30aaSmrg# This function is identical to the (non-XSI) version of func_stripname, 10790b41a30aaSmrg# except this one can be used by m4 code that may be executed by configure, 10791b41a30aaSmrg# rather than the libtool script. 10792b41a30aaSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10793b41a30aaSmrgAC_REQUIRE([_LT_DECL_SED]) 10794b41a30aaSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10795b41a30aaSmrgfunc_stripname_cnf () 10796b41a30aaSmrg{ 10797b41a30aaSmrg case @S|@2 in 10798b41a30aaSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10799b41a30aaSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10800b41a30aaSmrg esac 10801b41a30aaSmrg} # func_stripname_cnf 10802b41a30aaSmrg])# _LT_FUNC_STRIPNAME_CNF 1080331637056Smrg 1080431637056Smrg 10805b41a30aaSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10806b41a30aaSmrg# --------------------------------- 10807b41a30aaSmrg# Figure out "hidden" library dependencies from verbose 10808b41a30aaSmrg# compiler output when linking a shared library. 10809b41a30aaSmrg# Parse the compiler output and extract the necessary 10810b41a30aaSmrg# objects, libraries and library flags. 10811b41a30aaSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10812b41a30aaSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10813b41a30aaSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10814b41a30aaSmrg# Dependencies to place before and after the object being linked: 10815b41a30aaSmrg_LT_TAGVAR(predep_objects, $1)= 10816b41a30aaSmrg_LT_TAGVAR(postdep_objects, $1)= 10817b41a30aaSmrg_LT_TAGVAR(predeps, $1)= 10818b41a30aaSmrg_LT_TAGVAR(postdeps, $1)= 10819b41a30aaSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 1082031637056Smrg 10821b41a30aaSmrgdnl we can't use the lt_simple_compile_test_code here, 10822b41a30aaSmrgdnl because it contains code intended for an executable, 10823b41a30aaSmrgdnl not a library. It's possible we should let each 10824b41a30aaSmrgdnl tag define a new lt_????_link_test_code variable, 10825b41a30aaSmrgdnl but it's only used here... 10826b41a30aaSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10827b41a30aaSmrgint a; 10828b41a30aaSmrgvoid foo (void) { a = 0; } 10829b41a30aaSmrg_LT_EOF 10830b41a30aaSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10831b41a30aaSmrgclass Foo 10832b41a30aaSmrg{ 10833b41a30aaSmrgpublic: 10834b41a30aaSmrg Foo (void) { a = 0; } 10835b41a30aaSmrgprivate: 10836b41a30aaSmrg int a; 10837b41a30aaSmrg}; 10838b41a30aaSmrg_LT_EOF 10839b41a30aaSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10840b41a30aaSmrg subroutine foo 10841b41a30aaSmrg implicit none 10842b41a30aaSmrg integer*4 a 10843b41a30aaSmrg a=0 10844b41a30aaSmrg return 10845b41a30aaSmrg end 10846b41a30aaSmrg_LT_EOF 10847b41a30aaSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10848b41a30aaSmrg subroutine foo 10849b41a30aaSmrg implicit none 10850b41a30aaSmrg integer a 10851b41a30aaSmrg a=0 10852b41a30aaSmrg return 10853b41a30aaSmrg end 10854b41a30aaSmrg_LT_EOF 10855b41a30aaSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10856b41a30aaSmrgpublic class foo { 10857b41a30aaSmrg private int a; 10858b41a30aaSmrg public void bar (void) { 10859b41a30aaSmrg a = 0; 10860b41a30aaSmrg } 10861b41a30aaSmrg}; 10862b41a30aaSmrg_LT_EOF 10863b41a30aaSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10864b41a30aaSmrgpackage foo 10865b41a30aaSmrgfunc foo() { 10866b41a30aaSmrg} 10867b41a30aaSmrg_LT_EOF 10868b41a30aaSmrg]) 1086931637056Smrg 10870b41a30aaSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 10871b41a30aaSmrgcase "$CC $CFLAGS " in #( 10872b41a30aaSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10873b41a30aaSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10874b41a30aaSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 1087531637056Smrgesac 1087631637056Smrg 10877b41a30aaSmrgdnl Parse the compiler output and extract the necessary 10878b41a30aaSmrgdnl objects, libraries and library flags. 10879b41a30aaSmrgif AC_TRY_EVAL(ac_compile); then 10880b41a30aaSmrg # Parse the compiler output and extract the necessary 10881b41a30aaSmrg # objects, libraries and library flags. 1088231637056Smrg 10883b41a30aaSmrg # Sentinel used to keep track of whether or not we are before 10884b41a30aaSmrg # the conftest object file. 10885b41a30aaSmrg pre_test_object_deps_done=no 1088631637056Smrg 10887b41a30aaSmrg for p in `eval "$output_verbose_link_cmd"`; do 10888b41a30aaSmrg case $prev$p in 1088957ee1794Smrg 10890b41a30aaSmrg -L* | -R* | -l*) 10891b41a30aaSmrg # Some compilers place space between "-{L,R}" and the path. 10892b41a30aaSmrg # Remove the space. 10893b41a30aaSmrg if test x-L = "$p" || 10894b41a30aaSmrg test x-R = "$p"; then 10895b41a30aaSmrg prev=$p 10896b41a30aaSmrg continue 10897b41a30aaSmrg fi 10898b41a30aaSmrg 10899b41a30aaSmrg # Expand the sysroot to ease extracting the directories later. 10900b41a30aaSmrg if test -z "$prev"; then 10901b41a30aaSmrg case $p in 10902b41a30aaSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 10903b41a30aaSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 10904b41a30aaSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 10905b41a30aaSmrg esac 10906b41a30aaSmrg fi 10907b41a30aaSmrg case $p in 10908b41a30aaSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 10909b41a30aaSmrg esac 10910b41a30aaSmrg if test no = "$pre_test_object_deps_done"; then 10911b41a30aaSmrg case $prev in 10912b41a30aaSmrg -L | -R) 10913b41a30aaSmrg # Internal compiler library paths should come after those 10914b41a30aaSmrg # provided the user. The postdeps already come after the 10915b41a30aaSmrg # user supplied libs so there is no need to process them. 10916b41a30aaSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 10917b41a30aaSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 10918b41a30aaSmrg else 10919b41a30aaSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 10920b41a30aaSmrg fi 10921b41a30aaSmrg ;; 10922b41a30aaSmrg # The "-l" case would never come before the object being 10923b41a30aaSmrg # linked, so don't bother handling this case. 10924b41a30aaSmrg esac 10925b41a30aaSmrg else 10926b41a30aaSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 10927b41a30aaSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 10928b41a30aaSmrg else 10929b41a30aaSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 10930b41a30aaSmrg fi 10931b41a30aaSmrg fi 10932b41a30aaSmrg prev= 10933b41a30aaSmrg ;; 1093457ee1794Smrg 10935b41a30aaSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 10936b41a30aaSmrg *.$objext) 10937b41a30aaSmrg # This assumes that the test object file only shows up 10938b41a30aaSmrg # once in the compiler output. 10939b41a30aaSmrg if test "$p" = "conftest.$objext"; then 10940b41a30aaSmrg pre_test_object_deps_done=yes 10941b41a30aaSmrg continue 10942b41a30aaSmrg fi 1094357ee1794Smrg 10944b41a30aaSmrg if test no = "$pre_test_object_deps_done"; then 10945b41a30aaSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 10946b41a30aaSmrg _LT_TAGVAR(predep_objects, $1)=$p 10947b41a30aaSmrg else 10948b41a30aaSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 10949b41a30aaSmrg fi 10950b41a30aaSmrg else 10951b41a30aaSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 10952b41a30aaSmrg _LT_TAGVAR(postdep_objects, $1)=$p 10953b41a30aaSmrg else 10954b41a30aaSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 10955b41a30aaSmrg fi 10956b41a30aaSmrg fi 10957b41a30aaSmrg ;; 1095857ee1794Smrg 10959b41a30aaSmrg *) ;; # Ignore the rest. 1096057ee1794Smrg 10961b41a30aaSmrg esac 10962b41a30aaSmrg done 1096357ee1794Smrg 10964b41a30aaSmrg # Clean up. 10965b41a30aaSmrg rm -f a.out a.exe 10966b41a30aaSmrgelse 10967b41a30aaSmrg echo "libtool.m4: error: problem compiling $1 test program" 10968b41a30aaSmrgfi 1096957ee1794Smrg 10970b41a30aaSmrg$RM -f confest.$objext 10971b41a30aaSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 1097231637056Smrg 10973b41a30aaSmrg# PORTME: override above test on systems where it is broken 10974b41a30aaSmrgm4_if([$1], [CXX], 10975b41a30aaSmrg[case $host_os in 10976b41a30aaSmrginterix[[3-9]]*) 10977b41a30aaSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 10978b41a30aaSmrg # hack all around it, let's just trust "g++" to DTRT. 10979b41a30aaSmrg _LT_TAGVAR(predep_objects,$1)= 10980b41a30aaSmrg _LT_TAGVAR(postdep_objects,$1)= 10981b41a30aaSmrg _LT_TAGVAR(postdeps,$1)= 10982b41a30aaSmrg ;; 10983b41a30aaSmrgesac 10984b41a30aaSmrg]) 1098531637056Smrg 10986b41a30aaSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 10987b41a30aaSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 10988b41a30aaSmrgesac 10989b41a30aaSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 10990b41a30aaSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 10991b41a30aaSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 10992b41a30aaSmrgfi 10993b41a30aaSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 10994b41a30aaSmrg [The directories searched by this compiler when creating a shared library]) 10995b41a30aaSmrg_LT_TAGDECL([], [predep_objects], [1], 10996b41a30aaSmrg [Dependencies to place before and after the objects being linked to 10997b41a30aaSmrg create a shared library]) 10998b41a30aaSmrg_LT_TAGDECL([], [postdep_objects], [1]) 10999b41a30aaSmrg_LT_TAGDECL([], [predeps], [1]) 11000b41a30aaSmrg_LT_TAGDECL([], [postdeps], [1]) 11001b41a30aaSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11002b41a30aaSmrg [The library search path used internally by the compiler when linking 11003b41a30aaSmrg a shared library]) 11004b41a30aaSmrg])# _LT_SYS_HIDDEN_LIBDEPS 1100557ee1794Smrg 1100657ee1794Smrg 11007b41a30aaSmrg# _LT_LANG_F77_CONFIG([TAG]) 11008b41a30aaSmrg# -------------------------- 11009b41a30aaSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 11010b41a30aaSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11011b41a30aaSmrg# to write the compiler configuration to 'libtool'. 11012b41a30aaSmrgm4_defun([_LT_LANG_F77_CONFIG], 11013b41a30aaSmrg[AC_LANG_PUSH(Fortran 77) 11014b41a30aaSmrgif test -z "$F77" || test no = "$F77"; then 11015b41a30aaSmrg _lt_disable_F77=yes 11016b41a30aaSmrgfi 1101757ee1794Smrg 11018b41a30aaSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11019b41a30aaSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 11020b41a30aaSmrg_LT_TAGVAR(always_export_symbols, $1)=no 11021b41a30aaSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11022b41a30aaSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11023b41a30aaSmrg_LT_TAGVAR(hardcode_direct, $1)=no 11024b41a30aaSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11025b41a30aaSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11026b41a30aaSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11027b41a30aaSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11028b41a30aaSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 11029b41a30aaSmrg_LT_TAGVAR(inherit_rpath, $1)=no 11030b41a30aaSmrg_LT_TAGVAR(module_cmds, $1)= 11031b41a30aaSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 11032b41a30aaSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11033b41a30aaSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11034b41a30aaSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11035b41a30aaSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11036b41a30aaSmrg_LT_TAGVAR(no_undefined_flag, $1)= 11037b41a30aaSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11038b41a30aaSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 1103957ee1794Smrg 11040b41a30aaSmrg# Source file extension for f77 test sources. 11041b41a30aaSmrgac_ext=f 1104257ee1794Smrg 11043b41a30aaSmrg# Object file extension for compiled f77 test sources. 11044b41a30aaSmrgobjext=o 11045b41a30aaSmrg_LT_TAGVAR(objext, $1)=$objext 1104657ee1794Smrg 11047b41a30aaSmrg# No sense in running all these tests if we already determined that 11048b41a30aaSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 11049b41a30aaSmrg# are currently assumed to apply to all compilers on this platform, 11050b41a30aaSmrg# and will be corrupted by setting them based on a non-working compiler. 11051b41a30aaSmrgif test yes != "$_lt_disable_F77"; then 11052b41a30aaSmrg # Code to be used in simple compile tests 11053b41a30aaSmrg lt_simple_compile_test_code="\ 11054b41a30aaSmrg subroutine t 11055b41a30aaSmrg return 11056b41a30aaSmrg end 11057b41a30aaSmrg" 1105857ee1794Smrg 11059b41a30aaSmrg # Code to be used in simple link tests 11060b41a30aaSmrg lt_simple_link_test_code="\ 11061b41a30aaSmrg program t 11062b41a30aaSmrg end 11063b41a30aaSmrg" 1106457ee1794Smrg 11065b41a30aaSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11066b41a30aaSmrg _LT_TAG_COMPILER 1106757ee1794Smrg 11068b41a30aaSmrg # save warnings/boilerplate of simple test code 11069b41a30aaSmrg _LT_COMPILER_BOILERPLATE 11070b41a30aaSmrg _LT_LINKER_BOILERPLATE 1107157ee1794Smrg 11072b41a30aaSmrg # Allow CC to be a program name with arguments. 11073b41a30aaSmrg lt_save_CC=$CC 11074b41a30aaSmrg lt_save_GCC=$GCC 11075b41a30aaSmrg lt_save_CFLAGS=$CFLAGS 11076b41a30aaSmrg CC=${F77-"f77"} 11077b41a30aaSmrg CFLAGS=$FFLAGS 11078b41a30aaSmrg compiler=$CC 11079b41a30aaSmrg _LT_TAGVAR(compiler, $1)=$CC 11080b41a30aaSmrg _LT_CC_BASENAME([$compiler]) 11081b41a30aaSmrg GCC=$G77 11082b41a30aaSmrg if test -n "$compiler"; then 11083b41a30aaSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11084b41a30aaSmrg AC_MSG_RESULT([$can_build_shared]) 1108531637056Smrg 11086b41a30aaSmrg AC_MSG_CHECKING([whether to build shared libraries]) 11087b41a30aaSmrg test no = "$can_build_shared" && enable_shared=no 1108831637056Smrg 11089b41a30aaSmrg # On AIX, shared libraries and static libraries use the same namespace, and 11090b41a30aaSmrg # are all built from PIC. 11091b41a30aaSmrg case $host_os in 11092b41a30aaSmrg aix3*) 11093b41a30aaSmrg test yes = "$enable_shared" && enable_static=no 11094b41a30aaSmrg if test -n "$RANLIB"; then 11095b41a30aaSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11096b41a30aaSmrg postinstall_cmds='$RANLIB $lib' 11097b41a30aaSmrg fi 11098b41a30aaSmrg ;; 11099b41a30aaSmrg aix[[4-9]]*) 11100b41a30aaSmrg if test ia64 != "$host_cpu"; then 11101b41a30aaSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11102b41a30aaSmrg yes,aix,yes) ;; # shared object as lib.so file only 11103b41a30aaSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 11104b41a30aaSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11105b41a30aaSmrg esac 11106b41a30aaSmrg fi 11107b41a30aaSmrg ;; 11108b41a30aaSmrg esac 11109b41a30aaSmrg AC_MSG_RESULT([$enable_shared]) 1111057ee1794Smrg 11111b41a30aaSmrg AC_MSG_CHECKING([whether to build static libraries]) 11112b41a30aaSmrg # Make sure either enable_shared or enable_static is yes. 11113b41a30aaSmrg test yes = "$enable_shared" || enable_static=yes 11114b41a30aaSmrg AC_MSG_RESULT([$enable_static]) 1111525b89263Smrg 11116b41a30aaSmrg _LT_TAGVAR(GCC, $1)=$G77 11117b41a30aaSmrg _LT_TAGVAR(LD, $1)=$LD 1111825b89263Smrg 11119b41a30aaSmrg ## CAVEAT EMPTOR: 11120b41a30aaSmrg ## There is no encapsulation within the following macros, do not change 11121b41a30aaSmrg ## the running order or otherwise move them around unless you know exactly 11122b41a30aaSmrg ## what you are doing... 11123b41a30aaSmrg _LT_COMPILER_PIC($1) 11124b41a30aaSmrg _LT_COMPILER_C_O($1) 11125b41a30aaSmrg _LT_COMPILER_FILE_LOCKS($1) 11126b41a30aaSmrg _LT_LINKER_SHLIBS($1) 11127b41a30aaSmrg _LT_SYS_DYNAMIC_LINKER($1) 11128b41a30aaSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11129a253d6aeSmrg 11130b41a30aaSmrg _LT_CONFIG($1) 11131b41a30aaSmrg fi # test -n "$compiler" 11132a253d6aeSmrg 11133b41a30aaSmrg GCC=$lt_save_GCC 11134b41a30aaSmrg CC=$lt_save_CC 11135b41a30aaSmrg CFLAGS=$lt_save_CFLAGS 11136b41a30aaSmrgfi # test yes != "$_lt_disable_F77" 11137a253d6aeSmrg 11138b41a30aaSmrgAC_LANG_POP 11139b41a30aaSmrg])# _LT_LANG_F77_CONFIG 11140a253d6aeSmrg 11141a253d6aeSmrg 11142b41a30aaSmrg# _LT_LANG_FC_CONFIG([TAG]) 11143b41a30aaSmrg# ------------------------- 11144b41a30aaSmrg# Ensure that the configuration variables for a Fortran compiler are 11145b41a30aaSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11146b41a30aaSmrg# to write the compiler configuration to 'libtool'. 11147b41a30aaSmrgm4_defun([_LT_LANG_FC_CONFIG], 11148b41a30aaSmrg[AC_LANG_PUSH(Fortran) 11149a253d6aeSmrg 11150b41a30aaSmrgif test -z "$FC" || test no = "$FC"; then 11151b41a30aaSmrg _lt_disable_FC=yes 1115206f32fbeSmrgfi 1115325b89263Smrg 11154b41a30aaSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11155b41a30aaSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 11156b41a30aaSmrg_LT_TAGVAR(always_export_symbols, $1)=no 11157b41a30aaSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11158b41a30aaSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11159b41a30aaSmrg_LT_TAGVAR(hardcode_direct, $1)=no 11160b41a30aaSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11161b41a30aaSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11162b41a30aaSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11163b41a30aaSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11164b41a30aaSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 11165b41a30aaSmrg_LT_TAGVAR(inherit_rpath, $1)=no 11166b41a30aaSmrg_LT_TAGVAR(module_cmds, $1)= 11167b41a30aaSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 11168b41a30aaSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11169b41a30aaSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11170b41a30aaSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11171b41a30aaSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11172b41a30aaSmrg_LT_TAGVAR(no_undefined_flag, $1)= 11173b41a30aaSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11174b41a30aaSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 1117525b89263Smrg 11176b41a30aaSmrg# Source file extension for fc test sources. 11177b41a30aaSmrgac_ext=${ac_fc_srcext-f} 1117825b89263Smrg 11179b41a30aaSmrg# Object file extension for compiled fc test sources. 11180b41a30aaSmrgobjext=o 11181b41a30aaSmrg_LT_TAGVAR(objext, $1)=$objext 11182b41a30aaSmrg 11183b41a30aaSmrg# No sense in running all these tests if we already determined that 11184b41a30aaSmrg# the FC compiler isn't working. Some variables (like enable_shared) 11185b41a30aaSmrg# are currently assumed to apply to all compilers on this platform, 11186b41a30aaSmrg# and will be corrupted by setting them based on a non-working compiler. 11187b41a30aaSmrgif test yes != "$_lt_disable_FC"; then 11188b41a30aaSmrg # Code to be used in simple compile tests 11189b41a30aaSmrg lt_simple_compile_test_code="\ 11190b41a30aaSmrg subroutine t 11191b41a30aaSmrg return 11192b41a30aaSmrg end 11193b41a30aaSmrg" 1119425b89263Smrg 11195b41a30aaSmrg # Code to be used in simple link tests 11196b41a30aaSmrg lt_simple_link_test_code="\ 11197b41a30aaSmrg program t 11198b41a30aaSmrg end 11199b41a30aaSmrg" 1120025b89263Smrg 11201b41a30aaSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11202b41a30aaSmrg _LT_TAG_COMPILER 1120325b89263Smrg 11204b41a30aaSmrg # save warnings/boilerplate of simple test code 11205b41a30aaSmrg _LT_COMPILER_BOILERPLATE 11206b41a30aaSmrg _LT_LINKER_BOILERPLATE 1120725b89263Smrg 11208b41a30aaSmrg # Allow CC to be a program name with arguments. 11209b41a30aaSmrg lt_save_CC=$CC 11210b41a30aaSmrg lt_save_GCC=$GCC 11211b41a30aaSmrg lt_save_CFLAGS=$CFLAGS 11212b41a30aaSmrg CC=${FC-"f95"} 11213b41a30aaSmrg CFLAGS=$FCFLAGS 11214b41a30aaSmrg compiler=$CC 11215b41a30aaSmrg GCC=$ac_cv_fc_compiler_gnu 1121625b89263Smrg 11217b41a30aaSmrg _LT_TAGVAR(compiler, $1)=$CC 11218b41a30aaSmrg _LT_CC_BASENAME([$compiler]) 11219a253d6aeSmrg 11220b41a30aaSmrg if test -n "$compiler"; then 11221b41a30aaSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11222b41a30aaSmrg AC_MSG_RESULT([$can_build_shared]) 11223a253d6aeSmrg 11224b41a30aaSmrg AC_MSG_CHECKING([whether to build shared libraries]) 11225b41a30aaSmrg test no = "$can_build_shared" && enable_shared=no 11226a253d6aeSmrg 11227b41a30aaSmrg # On AIX, shared libraries and static libraries use the same namespace, and 11228b41a30aaSmrg # are all built from PIC. 11229b41a30aaSmrg case $host_os in 11230b41a30aaSmrg aix3*) 11231b41a30aaSmrg test yes = "$enable_shared" && enable_static=no 11232b41a30aaSmrg if test -n "$RANLIB"; then 11233b41a30aaSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11234b41a30aaSmrg postinstall_cmds='$RANLIB $lib' 11235b41a30aaSmrg fi 11236b41a30aaSmrg ;; 11237b41a30aaSmrg aix[[4-9]]*) 11238b41a30aaSmrg if test ia64 != "$host_cpu"; then 11239b41a30aaSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11240b41a30aaSmrg yes,aix,yes) ;; # shared object as lib.so file only 11241b41a30aaSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 11242b41a30aaSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11243b41a30aaSmrg esac 11244b41a30aaSmrg fi 11245b41a30aaSmrg ;; 11246b41a30aaSmrg esac 11247b41a30aaSmrg AC_MSG_RESULT([$enable_shared]) 11248a253d6aeSmrg 11249b41a30aaSmrg AC_MSG_CHECKING([whether to build static libraries]) 11250b41a30aaSmrg # Make sure either enable_shared or enable_static is yes. 11251b41a30aaSmrg test yes = "$enable_shared" || enable_static=yes 11252b41a30aaSmrg AC_MSG_RESULT([$enable_static]) 11253a253d6aeSmrg 11254b41a30aaSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11255b41a30aaSmrg _LT_TAGVAR(LD, $1)=$LD 11256a253d6aeSmrg 11257b41a30aaSmrg ## CAVEAT EMPTOR: 11258b41a30aaSmrg ## There is no encapsulation within the following macros, do not change 11259b41a30aaSmrg ## the running order or otherwise move them around unless you know exactly 11260b41a30aaSmrg ## what you are doing... 11261b41a30aaSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 11262b41a30aaSmrg _LT_COMPILER_PIC($1) 11263b41a30aaSmrg _LT_COMPILER_C_O($1) 11264b41a30aaSmrg _LT_COMPILER_FILE_LOCKS($1) 11265b41a30aaSmrg _LT_LINKER_SHLIBS($1) 11266b41a30aaSmrg _LT_SYS_DYNAMIC_LINKER($1) 11267b41a30aaSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11268a253d6aeSmrg 11269b41a30aaSmrg _LT_CONFIG($1) 11270b41a30aaSmrg fi # test -n "$compiler" 11271a253d6aeSmrg 11272b41a30aaSmrg GCC=$lt_save_GCC 11273b41a30aaSmrg CC=$lt_save_CC 11274b41a30aaSmrg CFLAGS=$lt_save_CFLAGS 11275b41a30aaSmrgfi # test yes != "$_lt_disable_FC" 11276a253d6aeSmrg 11277b41a30aaSmrgAC_LANG_POP 11278b41a30aaSmrg])# _LT_LANG_FC_CONFIG 11279a253d6aeSmrg 11280a253d6aeSmrg 11281b41a30aaSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 11282b41a30aaSmrg# -------------------------- 11283b41a30aaSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11284b41a30aaSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11285b41a30aaSmrg# to write the compiler configuration to 'libtool'. 11286b41a30aaSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 11287b41a30aaSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11288b41a30aaSmrgAC_LANG_SAVE 11289a253d6aeSmrg 11290b41a30aaSmrg# Source file extension for Java test sources. 11291b41a30aaSmrgac_ext=java 11292a253d6aeSmrg 11293b41a30aaSmrg# Object file extension for compiled Java test sources. 11294b41a30aaSmrgobjext=o 11295b41a30aaSmrg_LT_TAGVAR(objext, $1)=$objext 11296a253d6aeSmrg 11297b41a30aaSmrg# Code to be used in simple compile tests 11298b41a30aaSmrglt_simple_compile_test_code="class foo {}" 11299a253d6aeSmrg 11300b41a30aaSmrg# Code to be used in simple link tests 11301b41a30aaSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11302a253d6aeSmrg 11303b41a30aaSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11304b41a30aaSmrg_LT_TAG_COMPILER 11305a253d6aeSmrg 11306b41a30aaSmrg# save warnings/boilerplate of simple test code 11307b41a30aaSmrg_LT_COMPILER_BOILERPLATE 11308b41a30aaSmrg_LT_LINKER_BOILERPLATE 11309a253d6aeSmrg 11310b41a30aaSmrg# Allow CC to be a program name with arguments. 11311b41a30aaSmrglt_save_CC=$CC 11312b41a30aaSmrglt_save_CFLAGS=$CFLAGS 11313b41a30aaSmrglt_save_GCC=$GCC 11314b41a30aaSmrgGCC=yes 11315b41a30aaSmrgCC=${GCJ-"gcj"} 11316b41a30aaSmrgCFLAGS=$GCJFLAGS 11317b41a30aaSmrgcompiler=$CC 11318b41a30aaSmrg_LT_TAGVAR(compiler, $1)=$CC 11319b41a30aaSmrg_LT_TAGVAR(LD, $1)=$LD 11320b41a30aaSmrg_LT_CC_BASENAME([$compiler]) 1132125b89263Smrg 11322b41a30aaSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11323b41a30aaSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 1132425b89263Smrg 11325b41a30aaSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11326b41a30aaSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11327b41a30aaSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11328a253d6aeSmrg 11329b41a30aaSmrgif test -n "$compiler"; then 11330b41a30aaSmrg _LT_COMPILER_NO_RTTI($1) 11331b41a30aaSmrg _LT_COMPILER_PIC($1) 11332b41a30aaSmrg _LT_COMPILER_C_O($1) 11333b41a30aaSmrg _LT_COMPILER_FILE_LOCKS($1) 11334b41a30aaSmrg _LT_LINKER_SHLIBS($1) 11335b41a30aaSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11336a253d6aeSmrg 11337b41a30aaSmrg _LT_CONFIG($1) 1133806f32fbeSmrgfi 11339a253d6aeSmrg 11340b41a30aaSmrgAC_LANG_RESTORE 11341a253d6aeSmrg 11342b41a30aaSmrgGCC=$lt_save_GCC 11343b41a30aaSmrgCC=$lt_save_CC 11344b41a30aaSmrgCFLAGS=$lt_save_CFLAGS 11345b41a30aaSmrg])# _LT_LANG_GCJ_CONFIG 11346a253d6aeSmrg 11347a253d6aeSmrg 11348b41a30aaSmrg# _LT_LANG_GO_CONFIG([TAG]) 11349b41a30aaSmrg# -------------------------- 11350b41a30aaSmrg# Ensure that the configuration variables for the GNU Go compiler 11351b41a30aaSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11352b41a30aaSmrg# to write the compiler configuration to 'libtool'. 11353b41a30aaSmrgm4_defun([_LT_LANG_GO_CONFIG], 11354b41a30aaSmrg[AC_REQUIRE([LT_PROG_GO])dnl 11355b41a30aaSmrgAC_LANG_SAVE 11356a253d6aeSmrg 11357b41a30aaSmrg# Source file extension for Go test sources. 11358b41a30aaSmrgac_ext=go 11359a253d6aeSmrg 11360b41a30aaSmrg# Object file extension for compiled Go test sources. 11361b41a30aaSmrgobjext=o 11362b41a30aaSmrg_LT_TAGVAR(objext, $1)=$objext 11363a253d6aeSmrg 11364b41a30aaSmrg# Code to be used in simple compile tests 11365b41a30aaSmrglt_simple_compile_test_code="package main; func main() { }" 11366a253d6aeSmrg 11367b41a30aaSmrg# Code to be used in simple link tests 11368b41a30aaSmrglt_simple_link_test_code='package main; func main() { }' 11369a253d6aeSmrg 11370b41a30aaSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11371b41a30aaSmrg_LT_TAG_COMPILER 11372a253d6aeSmrg 11373b41a30aaSmrg# save warnings/boilerplate of simple test code 11374b41a30aaSmrg_LT_COMPILER_BOILERPLATE 11375b41a30aaSmrg_LT_LINKER_BOILERPLATE 1137625b89263Smrg 11377b41a30aaSmrg# Allow CC to be a program name with arguments. 11378b41a30aaSmrglt_save_CC=$CC 11379b41a30aaSmrglt_save_CFLAGS=$CFLAGS 11380b41a30aaSmrglt_save_GCC=$GCC 11381b41a30aaSmrgGCC=yes 11382b41a30aaSmrgCC=${GOC-"gccgo"} 11383b41a30aaSmrgCFLAGS=$GOFLAGS 11384b41a30aaSmrgcompiler=$CC 11385b41a30aaSmrg_LT_TAGVAR(compiler, $1)=$CC 11386b41a30aaSmrg_LT_TAGVAR(LD, $1)=$LD 11387b41a30aaSmrg_LT_CC_BASENAME([$compiler]) 11388b41a30aaSmrg 11389b41a30aaSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 11390b41a30aaSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11391b41a30aaSmrg 11392b41a30aaSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11393b41a30aaSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11394b41a30aaSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11395b41a30aaSmrg 11396b41a30aaSmrgif test -n "$compiler"; then 11397b41a30aaSmrg _LT_COMPILER_NO_RTTI($1) 11398b41a30aaSmrg _LT_COMPILER_PIC($1) 11399b41a30aaSmrg _LT_COMPILER_C_O($1) 11400b41a30aaSmrg _LT_COMPILER_FILE_LOCKS($1) 11401b41a30aaSmrg _LT_LINKER_SHLIBS($1) 11402b41a30aaSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11403b41a30aaSmrg 11404b41a30aaSmrg _LT_CONFIG($1) 1140506f32fbeSmrgfi 1140625b89263Smrg 11407b41a30aaSmrgAC_LANG_RESTORE 1140825b89263Smrg 11409b41a30aaSmrgGCC=$lt_save_GCC 11410b41a30aaSmrgCC=$lt_save_CC 11411b41a30aaSmrgCFLAGS=$lt_save_CFLAGS 11412b41a30aaSmrg])# _LT_LANG_GO_CONFIG 11413a253d6aeSmrg 11414a253d6aeSmrg 11415b41a30aaSmrg# _LT_LANG_RC_CONFIG([TAG]) 11416b41a30aaSmrg# ------------------------- 11417b41a30aaSmrg# Ensure that the configuration variables for the Windows resource compiler 11418b41a30aaSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11419b41a30aaSmrg# to write the compiler configuration to 'libtool'. 11420b41a30aaSmrgm4_defun([_LT_LANG_RC_CONFIG], 11421b41a30aaSmrg[AC_REQUIRE([LT_PROG_RC])dnl 11422b41a30aaSmrgAC_LANG_SAVE 11423a253d6aeSmrg 11424b41a30aaSmrg# Source file extension for RC test sources. 11425b41a30aaSmrgac_ext=rc 1142631637056Smrg 11427b41a30aaSmrg# Object file extension for compiled RC test sources. 11428b41a30aaSmrgobjext=o 11429b41a30aaSmrg_LT_TAGVAR(objext, $1)=$objext 1143031637056Smrg 11431b41a30aaSmrg# Code to be used in simple compile tests 11432b41a30aaSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11433a253d6aeSmrg 11434b41a30aaSmrg# Code to be used in simple link tests 11435b41a30aaSmrglt_simple_link_test_code=$lt_simple_compile_test_code 11436a253d6aeSmrg 11437b41a30aaSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11438b41a30aaSmrg_LT_TAG_COMPILER 11439b41a30aaSmrg 11440b41a30aaSmrg# save warnings/boilerplate of simple test code 11441b41a30aaSmrg_LT_COMPILER_BOILERPLATE 11442b41a30aaSmrg_LT_LINKER_BOILERPLATE 11443b41a30aaSmrg 11444b41a30aaSmrg# Allow CC to be a program name with arguments. 11445b41a30aaSmrglt_save_CC=$CC 11446b41a30aaSmrglt_save_CFLAGS=$CFLAGS 11447b41a30aaSmrglt_save_GCC=$GCC 11448b41a30aaSmrgGCC= 11449b41a30aaSmrgCC=${RC-"windres"} 11450b41a30aaSmrgCFLAGS= 11451b41a30aaSmrgcompiler=$CC 11452b41a30aaSmrg_LT_TAGVAR(compiler, $1)=$CC 11453b41a30aaSmrg_LT_CC_BASENAME([$compiler]) 11454b41a30aaSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11455a253d6aeSmrg 11456b41a30aaSmrgif test -n "$compiler"; then 11457b41a30aaSmrg : 11458b41a30aaSmrg _LT_CONFIG($1) 1145906f32fbeSmrgfi 11460a253d6aeSmrg 11461b41a30aaSmrgGCC=$lt_save_GCC 11462b41a30aaSmrgAC_LANG_RESTORE 11463b41a30aaSmrgCC=$lt_save_CC 11464b41a30aaSmrgCFLAGS=$lt_save_CFLAGS 11465b41a30aaSmrg])# _LT_LANG_RC_CONFIG 11466a253d6aeSmrg 11467a253d6aeSmrg 11468b41a30aaSmrg# LT_PROG_GCJ 11469b41a30aaSmrg# ----------- 11470b41a30aaSmrgAC_DEFUN([LT_PROG_GCJ], 11471b41a30aaSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11472b41a30aaSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11473b41a30aaSmrg [AC_CHECK_TOOL(GCJ, gcj,) 11474b41a30aaSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11475b41a30aaSmrg AC_SUBST(GCJFLAGS)])])[]dnl 11476b41a30aaSmrg]) 11477a253d6aeSmrg 11478b41a30aaSmrg# Old name: 11479b41a30aaSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11480b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 11481b41a30aaSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11482a253d6aeSmrg 11483a253d6aeSmrg 11484b41a30aaSmrg# LT_PROG_GO 11485b41a30aaSmrg# ---------- 11486b41a30aaSmrgAC_DEFUN([LT_PROG_GO], 11487b41a30aaSmrg[AC_CHECK_TOOL(GOC, gccgo,) 11488b41a30aaSmrg]) 11489b41a30aaSmrg 11490b41a30aaSmrg 11491b41a30aaSmrg# LT_PROG_RC 11492b41a30aaSmrg# ---------- 11493b41a30aaSmrgAC_DEFUN([LT_PROG_RC], 11494b41a30aaSmrg[AC_CHECK_TOOL(RC, windres,) 11495b41a30aaSmrg]) 11496b41a30aaSmrg 11497b41a30aaSmrg# Old name: 11498b41a30aaSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11499b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 11500b41a30aaSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 11501b41a30aaSmrg 11502b41a30aaSmrg 11503b41a30aaSmrg# _LT_DECL_EGREP 11504b41a30aaSmrg# -------------- 11505b41a30aaSmrg# If we don't have a new enough Autoconf to choose the best grep 11506b41a30aaSmrg# available, choose the one first in the user's PATH. 11507b41a30aaSmrgm4_defun([_LT_DECL_EGREP], 11508b41a30aaSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 11509b41a30aaSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 11510b41a30aaSmrgtest -z "$GREP" && GREP=grep 11511b41a30aaSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11512b41a30aaSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11513b41a30aaSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11514b41a30aaSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11515b41a30aaSmrgAC_SUBST([GREP]) 11516b41a30aaSmrg]) 11517b41a30aaSmrg 11518b41a30aaSmrg 11519b41a30aaSmrg# _LT_DECL_OBJDUMP 11520b41a30aaSmrg# -------------- 11521b41a30aaSmrg# If we don't have a new enough Autoconf to choose the best objdump 11522b41a30aaSmrg# available, choose the one first in the user's PATH. 11523b41a30aaSmrgm4_defun([_LT_DECL_OBJDUMP], 11524b41a30aaSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11525b41a30aaSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11526b41a30aaSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11527b41a30aaSmrgAC_SUBST([OBJDUMP]) 11528b41a30aaSmrg]) 11529b41a30aaSmrg 11530b41a30aaSmrg# _LT_DECL_DLLTOOL 11531b41a30aaSmrg# ---------------- 11532b41a30aaSmrg# Ensure DLLTOOL variable is set. 11533b41a30aaSmrgm4_defun([_LT_DECL_DLLTOOL], 11534b41a30aaSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11535b41a30aaSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11536b41a30aaSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11537b41a30aaSmrgAC_SUBST([DLLTOOL]) 11538b41a30aaSmrg]) 11539b41a30aaSmrg 11540b41a30aaSmrg# _LT_DECL_FILECMD 11541b41a30aaSmrg# ---------------- 11542b41a30aaSmrg# Check for a file(cmd) program that can be used to detect file type and magic 11543b41a30aaSmrgm4_defun([_LT_DECL_FILECMD], 11544b41a30aaSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 11545b41a30aaSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11546b41a30aaSmrg])# _LD_DECL_FILECMD 11547b41a30aaSmrg 11548b41a30aaSmrg# _LT_DECL_SED 11549b41a30aaSmrg# ------------ 11550b41a30aaSmrg# Check for a fully-functional sed program, that truncates 11551b41a30aaSmrg# as few characters as possible. Prefer GNU sed if found. 11552b41a30aaSmrgm4_defun([_LT_DECL_SED], 11553b41a30aaSmrg[AC_PROG_SED 11554b41a30aaSmrgtest -z "$SED" && SED=sed 11555b41a30aaSmrgXsed="$SED -e 1s/^X//" 11556b41a30aaSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11557b41a30aaSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11558b41a30aaSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11559b41a30aaSmrg])# _LT_DECL_SED 11560b41a30aaSmrg 11561b41a30aaSmrgm4_ifndef([AC_PROG_SED], [ 11562b41a30aaSmrg# NOTE: This macro has been submitted for inclusion into # 11563b41a30aaSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 11564b41a30aaSmrg# a released version of Autoconf we should remove this # 11565b41a30aaSmrg# macro and use it instead. # 11566b41a30aaSmrg 11567b41a30aaSmrgm4_defun([AC_PROG_SED], 11568b41a30aaSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 11569b41a30aaSmrgAC_CACHE_VAL(lt_cv_path_SED, 11570b41a30aaSmrg[# Loop through the user's path and test for sed and gsed. 11571b41a30aaSmrg# Then use that list of sed's as ones to test for truncation. 11572b41a30aaSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11573b41a30aaSmrgfor as_dir in $PATH 11574b41a30aaSmrgdo 11575b41a30aaSmrg IFS=$as_save_IFS 11576b41a30aaSmrg test -z "$as_dir" && as_dir=. 11577b41a30aaSmrg for lt_ac_prog in sed gsed; do 11578b41a30aaSmrg for ac_exec_ext in '' $ac_executable_extensions; do 11579b41a30aaSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11580b41a30aaSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11581b41a30aaSmrg fi 11582b41a30aaSmrg done 11583b41a30aaSmrg done 11584b41a30aaSmrgdone 11585b41a30aaSmrgIFS=$as_save_IFS 11586b41a30aaSmrglt_ac_max=0 11587b41a30aaSmrglt_ac_count=0 11588b41a30aaSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11589b41a30aaSmrg# along with /bin/sed that truncates output. 11590b41a30aaSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11591b41a30aaSmrg test ! -f "$lt_ac_sed" && continue 11592b41a30aaSmrg cat /dev/null > conftest.in 11593b41a30aaSmrg lt_ac_count=0 11594b41a30aaSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11595b41a30aaSmrg # Check for GNU sed and select it if it is found. 11596b41a30aaSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11597b41a30aaSmrg lt_cv_path_SED=$lt_ac_sed 11598b41a30aaSmrg break 11599b41a30aaSmrg fi 11600b41a30aaSmrg while true; do 11601b41a30aaSmrg cat conftest.in conftest.in >conftest.tmp 11602b41a30aaSmrg mv conftest.tmp conftest.in 11603b41a30aaSmrg cp conftest.in conftest.nl 11604b41a30aaSmrg echo >>conftest.nl 11605b41a30aaSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11606b41a30aaSmrg cmp -s conftest.out conftest.nl || break 11607b41a30aaSmrg # 10000 chars as input seems more than enough 11608b41a30aaSmrg test 10 -lt "$lt_ac_count" && break 11609b41a30aaSmrg lt_ac_count=`expr $lt_ac_count + 1` 11610b41a30aaSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 11611b41a30aaSmrg lt_ac_max=$lt_ac_count 11612b41a30aaSmrg lt_cv_path_SED=$lt_ac_sed 11613b41a30aaSmrg fi 11614b41a30aaSmrg done 11615b41a30aaSmrgdone 11616b41a30aaSmrg]) 11617b41a30aaSmrgSED=$lt_cv_path_SED 11618b41a30aaSmrgAC_SUBST([SED]) 11619b41a30aaSmrgAC_MSG_RESULT([$SED]) 11620b41a30aaSmrg])#AC_PROG_SED 11621b41a30aaSmrg])#m4_ifndef 1162231637056Smrg 11623b41a30aaSmrg# Old name: 11624b41a30aaSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11625b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 11626b41a30aaSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 1162731637056Smrg 11628a253d6aeSmrg 11629b41a30aaSmrg# _LT_CHECK_SHELL_FEATURES 11630b41a30aaSmrg# ------------------------ 11631b41a30aaSmrg# Find out whether the shell is Bourne or XSI compatible, 11632b41a30aaSmrg# or has some other useful features. 11633b41a30aaSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 11634b41a30aaSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11635b41a30aaSmrg lt_unset=unset 1163606f32fbeSmrgelse 11637b41a30aaSmrg lt_unset=false 1163806f32fbeSmrgfi 11639b41a30aaSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11640a253d6aeSmrg 11641b41a30aaSmrg# test EBCDIC or ASCII 11642b41a30aaSmrgcase `echo X|tr X '\101'` in 11643b41a30aaSmrg A) # ASCII based system 11644b41a30aaSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11645b41a30aaSmrg lt_SP2NL='tr \040 \012' 11646b41a30aaSmrg lt_NL2SP='tr \015\012 \040\040' 11647b41a30aaSmrg ;; 11648b41a30aaSmrg *) # EBCDIC based system 11649b41a30aaSmrg lt_SP2NL='tr \100 \n' 11650b41a30aaSmrg lt_NL2SP='tr \r\n \100\100' 11651b41a30aaSmrg ;; 11652b41a30aaSmrgesac 11653b41a30aaSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11654b41a30aaSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11655b41a30aaSmrg])# _LT_CHECK_SHELL_FEATURES 11656a253d6aeSmrg 1165725b89263Smrg 11658b41a30aaSmrg# _LT_PATH_CONVERSION_FUNCTIONS 11659b41a30aaSmrg# ----------------------------- 11660b41a30aaSmrg# Determine what file name conversion functions should be used by 11661b41a30aaSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11662b41a30aaSmrg# for certain cross-compile configurations and native mingw. 11663b41a30aaSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11664b41a30aaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11665b41a30aaSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11666b41a30aaSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 11667b41a30aaSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 11668b41a30aaSmrg[case $host in 11669b41a30aaSmrg *-*-mingw* ) 11670b41a30aaSmrg case $build in 11671b41a30aaSmrg *-*-mingw* ) # actually msys 11672b41a30aaSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11673b41a30aaSmrg ;; 11674b41a30aaSmrg *-*-cygwin* ) 11675b41a30aaSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11676b41a30aaSmrg ;; 11677b41a30aaSmrg * ) # otherwise, assume *nix 11678b41a30aaSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11679b41a30aaSmrg ;; 11680b41a30aaSmrg esac 11681b41a30aaSmrg ;; 11682b41a30aaSmrg *-*-cygwin* ) 11683b41a30aaSmrg case $build in 11684b41a30aaSmrg *-*-mingw* ) # actually msys 11685b41a30aaSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11686b41a30aaSmrg ;; 11687b41a30aaSmrg *-*-cygwin* ) 11688b41a30aaSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 11689b41a30aaSmrg ;; 11690b41a30aaSmrg * ) # otherwise, assume *nix 11691b41a30aaSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11692b41a30aaSmrg ;; 11693b41a30aaSmrg esac 11694b41a30aaSmrg ;; 11695b41a30aaSmrg * ) # unhandled hosts (and "normal" native builds) 11696b41a30aaSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 11697b41a30aaSmrg ;; 11698b41a30aaSmrgesac 11699b41a30aaSmrg]) 11700b41a30aaSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 11701b41a30aaSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11702b41a30aaSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11703b41a30aaSmrg [0], [convert $build file names to $host format])dnl 11704b41a30aaSmrg 11705b41a30aaSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11706b41a30aaSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11707b41a30aaSmrg[#assume ordinary cross tools, or native build. 11708b41a30aaSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 11709b41a30aaSmrgcase $host in 11710b41a30aaSmrg *-*-mingw* ) 11711b41a30aaSmrg case $build in 11712b41a30aaSmrg *-*-mingw* ) # actually msys 11713b41a30aaSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11714b41a30aaSmrg ;; 11715b41a30aaSmrg esac 11716b41a30aaSmrg ;; 11717b41a30aaSmrgesac 11718b41a30aaSmrg]) 11719b41a30aaSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 11720b41a30aaSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11721b41a30aaSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11722b41a30aaSmrg [0], [convert $build files to toolchain format])dnl 11723b41a30aaSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 11724a253d6aeSmrg 11725b41a30aaSmrg# Helper functions for option handling. -*- Autoconf -*- 1172606f32fbeSmrg# 11727b41a30aaSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11728b41a30aaSmrg# Software Foundation, Inc. 11729b41a30aaSmrg# Written by Gary V. Vaughan, 2004 1173006f32fbeSmrg# 11731b41a30aaSmrg# This file is free software; the Free Software Foundation gives 11732b41a30aaSmrg# unlimited permission to copy and/or distribute it, with or without 11733b41a30aaSmrg# modifications, as long as this notice is preserved. 11734a253d6aeSmrg 11735b41a30aaSmrg# serial 8 ltoptions.m4 1173657ee1794Smrg 11737b41a30aaSmrg# This is to help aclocal find these macros, as it can't see m4_define. 11738b41a30aaSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11739b41a30aaSmrg 11740b41a30aaSmrg 11741b41a30aaSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11742b41a30aaSmrg# ------------------------------------------ 11743b41a30aaSmrgm4_define([_LT_MANGLE_OPTION], 11744b41a30aaSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11745b41a30aaSmrg 11746b41a30aaSmrg 11747b41a30aaSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11748b41a30aaSmrg# --------------------------------------- 11749b41a30aaSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11750b41a30aaSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11751b41a30aaSmrg# saved as a flag. 11752b41a30aaSmrgm4_define([_LT_SET_OPTION], 11753b41a30aaSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11754b41a30aaSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11755b41a30aaSmrg _LT_MANGLE_DEFUN([$1], [$2]), 11756b41a30aaSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 11757b41a30aaSmrg]) 11758b41a30aaSmrg 11759b41a30aaSmrg 11760b41a30aaSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11761b41a30aaSmrg# ------------------------------------------------------------ 11762b41a30aaSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11763b41a30aaSmrgm4_define([_LT_IF_OPTION], 11764b41a30aaSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11765b41a30aaSmrg 11766b41a30aaSmrg 11767b41a30aaSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11768b41a30aaSmrg# ------------------------------------------------------- 11769b41a30aaSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11770b41a30aaSmrg# are set. 11771b41a30aaSmrgm4_define([_LT_UNLESS_OPTIONS], 11772b41a30aaSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11773b41a30aaSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11774b41a30aaSmrg [m4_define([$0_found])])])[]dnl 11775b41a30aaSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11776b41a30aaSmrg])[]dnl 11777b41a30aaSmrg]) 11778b41a30aaSmrg 11779b41a30aaSmrg 11780b41a30aaSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 1178106f32fbeSmrg# ---------------------------------------- 11782b41a30aaSmrg# OPTION-LIST is a space-separated list of Libtool options associated 11783b41a30aaSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 11784b41a30aaSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11785b41a30aaSmrg# the unknown option and exit. 11786b41a30aaSmrgm4_defun([_LT_SET_OPTIONS], 11787b41a30aaSmrg[# Set options 11788b41a30aaSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11789b41a30aaSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 11790a253d6aeSmrg 11791b41a30aaSmrgm4_if([$1],[LT_INIT],[ 11792b41a30aaSmrg dnl 11793b41a30aaSmrg dnl Simply set some default values (i.e off) if boolean options were not 11794b41a30aaSmrg dnl specified: 11795b41a30aaSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11796b41a30aaSmrg ]) 11797b41a30aaSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11798b41a30aaSmrg ]) 11799b41a30aaSmrg dnl 11800b41a30aaSmrg dnl If no reference was made to various pairs of opposing options, then 11801b41a30aaSmrg dnl we run the default mode handler for the pair. For example, if neither 11802b41a30aaSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11803b41a30aaSmrg dnl archives by default: 11804b41a30aaSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11805b41a30aaSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11806b41a30aaSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11807b41a30aaSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11808b41a30aaSmrg [_LT_ENABLE_FAST_INSTALL]) 11809b41a30aaSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11810b41a30aaSmrg [_LT_WITH_AIX_SONAME([aix])]) 11811b41a30aaSmrg ]) 11812b41a30aaSmrg])# _LT_SET_OPTIONS 11813a253d6aeSmrg 11814a253d6aeSmrg 11815a253d6aeSmrg 11816b41a30aaSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11817b41a30aaSmrg# ----------------------------------------- 11818b41a30aaSmrgm4_define([_LT_MANGLE_DEFUN], 11819b41a30aaSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11820b41a30aaSmrg 11821b41a30aaSmrg 11822b41a30aaSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11823b41a30aaSmrg# ----------------------------------------------- 11824b41a30aaSmrgm4_define([LT_OPTION_DEFINE], 11825b41a30aaSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11826b41a30aaSmrg])# LT_OPTION_DEFINE 11827b41a30aaSmrg 11828b41a30aaSmrg 11829b41a30aaSmrg# dlopen 11830b41a30aaSmrg# ------ 11831b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 11832b41a30aaSmrg]) 11833b41a30aaSmrg 11834b41a30aaSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 11835b41a30aaSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 11836b41a30aaSmrgAC_DIAGNOSE([obsolete], 11837b41a30aaSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11838b41a30aaSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 11839b41a30aaSmrg]) 11840b41a30aaSmrg 11841b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 11842b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11843b41a30aaSmrg 11844b41a30aaSmrg 11845b41a30aaSmrg# win32-dll 11846b41a30aaSmrg# --------- 11847b41a30aaSmrg# Declare package support for building win32 dll's. 11848b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 11849b41a30aaSmrg[enable_win32_dll=yes 11850b41a30aaSmrg 11851b41a30aaSmrgcase $host in 11852b41a30aaSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11853b41a30aaSmrg AC_CHECK_TOOL(AS, as, false) 11854b41a30aaSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11855b41a30aaSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 11856b41a30aaSmrg ;; 11857b41a30aaSmrgesac 11858b41a30aaSmrg 11859b41a30aaSmrgtest -z "$AS" && AS=as 11860b41a30aaSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 11861b41a30aaSmrg 11862b41a30aaSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11863b41a30aaSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11864b41a30aaSmrg 11865b41a30aaSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11866b41a30aaSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11867b41a30aaSmrg])# win32-dll 11868b41a30aaSmrg 11869b41a30aaSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11870b41a30aaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11871b41a30aaSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 11872b41a30aaSmrgAC_DIAGNOSE([obsolete], 11873b41a30aaSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11874b41a30aaSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 11875b41a30aaSmrg]) 11876b41a30aaSmrg 11877b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 11878b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 11879a253d6aeSmrg 11880a253d6aeSmrg 11881b41a30aaSmrg# _LT_ENABLE_SHARED([DEFAULT]) 11882b41a30aaSmrg# ---------------------------- 11883b41a30aaSmrg# implement the --enable-shared flag, and supports the 'shared' and 11884b41a30aaSmrg# 'disable-shared' LT_INIT options. 11885b41a30aaSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11886b41a30aaSmrgm4_define([_LT_ENABLE_SHARED], 11887b41a30aaSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11888b41a30aaSmrgAC_ARG_ENABLE([shared], 11889b41a30aaSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11890b41a30aaSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11891b41a30aaSmrg [p=${PACKAGE-default} 11892b41a30aaSmrg case $enableval in 11893b41a30aaSmrg yes) enable_shared=yes ;; 11894b41a30aaSmrg no) enable_shared=no ;; 11895b41a30aaSmrg *) 11896b41a30aaSmrg enable_shared=no 11897b41a30aaSmrg # Look at the argument we got. We use all the common list separators. 11898b41a30aaSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11899b41a30aaSmrg for pkg in $enableval; do 11900b41a30aaSmrg IFS=$lt_save_ifs 11901b41a30aaSmrg if test "X$pkg" = "X$p"; then 11902b41a30aaSmrg enable_shared=yes 11903b41a30aaSmrg fi 11904b41a30aaSmrg done 11905b41a30aaSmrg IFS=$lt_save_ifs 11906b41a30aaSmrg ;; 11907b41a30aaSmrg esac], 11908b41a30aaSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 11909a253d6aeSmrg 11910b41a30aaSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 11911b41a30aaSmrg [Whether or not to build shared libraries]) 11912b41a30aaSmrg])# _LT_ENABLE_SHARED 11913a253d6aeSmrg 11914b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 11915b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 11916a253d6aeSmrg 11917b41a30aaSmrg# Old names: 11918b41a30aaSmrgAC_DEFUN([AC_ENABLE_SHARED], 11919b41a30aaSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 11920b41a30aaSmrg]) 11921a253d6aeSmrg 11922b41a30aaSmrgAC_DEFUN([AC_DISABLE_SHARED], 11923b41a30aaSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 11924b41a30aaSmrg]) 11925ea133fd7Smrg 11926b41a30aaSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 11927b41a30aaSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 11928a253d6aeSmrg 11929b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 11930b41a30aaSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 11931b41a30aaSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 11932a253d6aeSmrg 11933a253d6aeSmrg 11934a253d6aeSmrg 11935b41a30aaSmrg# _LT_ENABLE_STATIC([DEFAULT]) 11936b41a30aaSmrg# ---------------------------- 11937b41a30aaSmrg# implement the --enable-static flag, and support the 'static' and 11938b41a30aaSmrg# 'disable-static' LT_INIT options. 11939b41a30aaSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11940b41a30aaSmrgm4_define([_LT_ENABLE_STATIC], 11941b41a30aaSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 11942b41a30aaSmrgAC_ARG_ENABLE([static], 11943b41a30aaSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 11944b41a30aaSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 11945b41a30aaSmrg [p=${PACKAGE-default} 11946b41a30aaSmrg case $enableval in 11947b41a30aaSmrg yes) enable_static=yes ;; 11948b41a30aaSmrg no) enable_static=no ;; 11949b41a30aaSmrg *) 11950b41a30aaSmrg enable_static=no 11951b41a30aaSmrg # Look at the argument we got. We use all the common list separators. 11952b41a30aaSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11953b41a30aaSmrg for pkg in $enableval; do 11954b41a30aaSmrg IFS=$lt_save_ifs 11955b41a30aaSmrg if test "X$pkg" = "X$p"; then 11956b41a30aaSmrg enable_static=yes 11957b41a30aaSmrg fi 11958b41a30aaSmrg done 11959b41a30aaSmrg IFS=$lt_save_ifs 11960b41a30aaSmrg ;; 11961b41a30aaSmrg esac], 11962b41a30aaSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 11963a253d6aeSmrg 11964b41a30aaSmrg _LT_DECL([build_old_libs], [enable_static], [0], 11965b41a30aaSmrg [Whether or not to build static libraries]) 11966b41a30aaSmrg])# _LT_ENABLE_STATIC 11967a253d6aeSmrg 11968b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 11969b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 11970a253d6aeSmrg 11971b41a30aaSmrg# Old names: 11972b41a30aaSmrgAC_DEFUN([AC_ENABLE_STATIC], 11973b41a30aaSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 11974b41a30aaSmrg]) 11975a253d6aeSmrg 11976b41a30aaSmrgAC_DEFUN([AC_DISABLE_STATIC], 11977b41a30aaSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 11978b41a30aaSmrg]) 11979a253d6aeSmrg 11980b41a30aaSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 11981b41a30aaSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 11982a253d6aeSmrg 11983b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 11984b41a30aaSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 11985b41a30aaSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 11986a253d6aeSmrg 11987a253d6aeSmrg 11988ea133fd7Smrg 11989b41a30aaSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 11990b41a30aaSmrg# ---------------------------------- 11991b41a30aaSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 11992b41a30aaSmrg# and 'disable-fast-install' LT_INIT options. 11993b41a30aaSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11994b41a30aaSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 11995b41a30aaSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 11996b41a30aaSmrgAC_ARG_ENABLE([fast-install], 11997b41a30aaSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 11998b41a30aaSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 11999b41a30aaSmrg [p=${PACKAGE-default} 12000b41a30aaSmrg case $enableval in 12001b41a30aaSmrg yes) enable_fast_install=yes ;; 12002b41a30aaSmrg no) enable_fast_install=no ;; 12003b41a30aaSmrg *) 12004b41a30aaSmrg enable_fast_install=no 12005b41a30aaSmrg # Look at the argument we got. We use all the common list separators. 12006b41a30aaSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12007b41a30aaSmrg for pkg in $enableval; do 12008b41a30aaSmrg IFS=$lt_save_ifs 12009b41a30aaSmrg if test "X$pkg" = "X$p"; then 12010b41a30aaSmrg enable_fast_install=yes 12011b41a30aaSmrg fi 12012b41a30aaSmrg done 12013b41a30aaSmrg IFS=$lt_save_ifs 12014b41a30aaSmrg ;; 12015b41a30aaSmrg esac], 12016b41a30aaSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12017ea133fd7Smrg 12018b41a30aaSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 12019b41a30aaSmrg [Whether or not to optimize for fast installation])dnl 12020b41a30aaSmrg])# _LT_ENABLE_FAST_INSTALL 12021a253d6aeSmrg 12022b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12023b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 1202425b89263Smrg 12025b41a30aaSmrg# Old names: 12026b41a30aaSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 12027b41a30aaSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12028b41a30aaSmrgAC_DIAGNOSE([obsolete], 12029b41a30aaSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12030b41a30aaSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 12031b41a30aaSmrg]) 1203225b89263Smrg 12033b41a30aaSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 12034b41a30aaSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12035b41a30aaSmrgAC_DIAGNOSE([obsolete], 12036b41a30aaSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12037b41a30aaSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 12038b41a30aaSmrg]) 1203906f32fbeSmrg 12040b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 12041b41a30aaSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12042b41a30aaSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 1204325b89263Smrg 1204406f32fbeSmrg 12045b41a30aaSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 12046b41a30aaSmrg# ---------------------------------- 12047b41a30aaSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12048b41a30aaSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12049b41a30aaSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12050b41a30aaSmrgm4_define([_LT_WITH_AIX_SONAME], 12051b41a30aaSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12052b41a30aaSmrgshared_archive_member_spec= 12053b41a30aaSmrgcase $host,$enable_shared in 12054b41a30aaSmrgpower*-*-aix[[5-9]]*,yes) 12055b41a30aaSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12056b41a30aaSmrg AC_ARG_WITH([aix-soname], 12057b41a30aaSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12058b41a30aaSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12059b41a30aaSmrg [case $withval in 12060b41a30aaSmrg aix|svr4|both) 12061b41a30aaSmrg ;; 12062b41a30aaSmrg *) 12063b41a30aaSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12064b41a30aaSmrg ;; 12065b41a30aaSmrg esac 12066b41a30aaSmrg lt_cv_with_aix_soname=$with_aix_soname], 12067b41a30aaSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 12068b41a30aaSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12069b41a30aaSmrg with_aix_soname=$lt_cv_with_aix_soname]) 12070b41a30aaSmrg AC_MSG_RESULT([$with_aix_soname]) 12071b41a30aaSmrg if test aix != "$with_aix_soname"; then 12072b41a30aaSmrg # For the AIX way of multilib, we name the shared archive member 12073b41a30aaSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12074b41a30aaSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12075b41a30aaSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12076b41a30aaSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 12077b41a30aaSmrg if test 64 = "${OBJECT_MODE-32}"; then 12078b41a30aaSmrg shared_archive_member_spec=shr_64 12079b41a30aaSmrg else 12080b41a30aaSmrg shared_archive_member_spec=shr 12081b41a30aaSmrg fi 12082b41a30aaSmrg fi 12083b41a30aaSmrg ;; 12084b41a30aaSmrg*) 12085b41a30aaSmrg with_aix_soname=aix 12086b41a30aaSmrg ;; 12087b41a30aaSmrgesac 1208806f32fbeSmrg 12089b41a30aaSmrg_LT_DECL([], [shared_archive_member_spec], [0], 12090b41a30aaSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12091b41a30aaSmrg])# _LT_WITH_AIX_SONAME 12092a253d6aeSmrg 12093b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12094b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12095b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 1209606f32fbeSmrg 12097ea133fd7Smrg 12098b41a30aaSmrg# _LT_WITH_PIC([MODE]) 12099b41a30aaSmrg# -------------------- 12100b41a30aaSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12101b41a30aaSmrg# LT_INIT options. 12102b41a30aaSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12103b41a30aaSmrgm4_define([_LT_WITH_PIC], 12104b41a30aaSmrg[AC_ARG_WITH([pic], 12105b41a30aaSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12106b41a30aaSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12107b41a30aaSmrg [lt_p=${PACKAGE-default} 12108b41a30aaSmrg case $withval in 12109b41a30aaSmrg yes|no) pic_mode=$withval ;; 12110b41a30aaSmrg *) 12111b41a30aaSmrg pic_mode=default 12112b41a30aaSmrg # Look at the argument we got. We use all the common list separators. 12113b41a30aaSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12114b41a30aaSmrg for lt_pkg in $withval; do 12115b41a30aaSmrg IFS=$lt_save_ifs 12116b41a30aaSmrg if test "X$lt_pkg" = "X$lt_p"; then 12117b41a30aaSmrg pic_mode=yes 12118b41a30aaSmrg fi 12119b41a30aaSmrg done 12120b41a30aaSmrg IFS=$lt_save_ifs 12121b41a30aaSmrg ;; 12122b41a30aaSmrg esac], 12123b41a30aaSmrg [pic_mode=m4_default([$1], [default])]) 12124ea133fd7Smrg 12125b41a30aaSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12126b41a30aaSmrg])# _LT_WITH_PIC 1212706f32fbeSmrg 12128b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12129b41a30aaSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 1213006f32fbeSmrg 12131b41a30aaSmrg# Old name: 12132b41a30aaSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 12133b41a30aaSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 12134b41a30aaSmrgAC_DIAGNOSE([obsolete], 12135b41a30aaSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12136b41a30aaSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 12137b41a30aaSmrg]) 1213806f32fbeSmrg 12139b41a30aaSmrgdnl aclocal-1.4 backwards compatibility: 12140b41a30aaSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 1214106f32fbeSmrg 1214206f32fbeSmrg 12143b41a30aaSmrgm4_define([_LTDL_MODE], []) 12144b41a30aaSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12145b41a30aaSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 12146b41a30aaSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 12147b41a30aaSmrg [m4_define([_LTDL_MODE], [recursive])]) 12148b41a30aaSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 12149b41a30aaSmrg [m4_define([_LTDL_MODE], [subproject])]) 12150a253d6aeSmrg 12151b41a30aaSmrgm4_define([_LTDL_TYPE], []) 12152b41a30aaSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 12153b41a30aaSmrg [m4_define([_LTDL_TYPE], [installable])]) 12154b41a30aaSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 12155b41a30aaSmrg [m4_define([_LTDL_TYPE], [convenience])]) 12156b41a30aaSmrg 12157b41a30aaSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 1215806f32fbeSmrg# 12159b41a30aaSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12160b41a30aaSmrg# Foundation, Inc. 12161b41a30aaSmrg# Written by Gary V. Vaughan, 2004 1216206f32fbeSmrg# 12163b41a30aaSmrg# This file is free software; the Free Software Foundation gives 12164b41a30aaSmrg# unlimited permission to copy and/or distribute it, with or without 12165b41a30aaSmrg# modifications, as long as this notice is preserved. 1216606f32fbeSmrg 12167b41a30aaSmrg# serial 6 ltsugar.m4 1216806f32fbeSmrg 12169b41a30aaSmrg# This is to help aclocal find these macros, as it can't see m4_define. 12170b41a30aaSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12171a253d6aeSmrg 1217206f32fbeSmrg 12173b41a30aaSmrg# lt_join(SEP, ARG1, [ARG2...]) 12174b41a30aaSmrg# ----------------------------- 12175b41a30aaSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12176b41a30aaSmrg# associated separator. 12177b41a30aaSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12178b41a30aaSmrg# versions in m4sugar had bugs. 12179b41a30aaSmrgm4_define([lt_join], 12180b41a30aaSmrg[m4_if([$#], [1], [], 12181b41a30aaSmrg [$#], [2], [[$2]], 12182b41a30aaSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12183b41a30aaSmrgm4_define([_lt_join], 12184b41a30aaSmrg[m4_if([$#$2], [2], [], 12185b41a30aaSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12186a253d6aeSmrg 1218706f32fbeSmrg 12188b41a30aaSmrg# lt_car(LIST) 12189b41a30aaSmrg# lt_cdr(LIST) 12190b41a30aaSmrg# ------------ 12191b41a30aaSmrg# Manipulate m4 lists. 12192b41a30aaSmrg# These macros are necessary as long as will still need to support 12193b41a30aaSmrg# Autoconf-2.59, which quotes differently. 12194b41a30aaSmrgm4_define([lt_car], [[$1]]) 12195b41a30aaSmrgm4_define([lt_cdr], 12196b41a30aaSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12197b41a30aaSmrg [$#], 1, [], 12198b41a30aaSmrg [m4_dquote(m4_shift($@))])]) 12199b41a30aaSmrgm4_define([lt_unquote], $1) 1220006f32fbeSmrg 1220106f32fbeSmrg 12202b41a30aaSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12203b41a30aaSmrg# ------------------------------------------ 12204b41a30aaSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12205b41a30aaSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 12206b41a30aaSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12207b41a30aaSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12208b41a30aaSmrg# than defined and empty). 12209b41a30aaSmrg# 12210b41a30aaSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 12211b41a30aaSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12212b41a30aaSmrgm4_define([lt_append], 12213b41a30aaSmrg[m4_define([$1], 12214b41a30aaSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 1221525b89263Smrg 1221625b89263Smrg 12217a253d6aeSmrg 12218b41a30aaSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12219b41a30aaSmrg# ---------------------------------------------------------- 12220b41a30aaSmrg# Produce a SEP delimited list of all paired combinations of elements of 12221b41a30aaSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12222b41a30aaSmrg# has the form PREFIXmINFIXSUFFIXn. 12223b41a30aaSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 12224b41a30aaSmrgm4_define([lt_combine], 12225b41a30aaSmrg[m4_if(m4_eval([$# > 3]), [1], 12226b41a30aaSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12227b41a30aaSmrg[[m4_foreach([_Lt_prefix], [$2], 12228b41a30aaSmrg [m4_foreach([_Lt_suffix], 12229b41a30aaSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12230b41a30aaSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12231b41a30aaSmrg 12232b41a30aaSmrg 12233b41a30aaSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12234b41a30aaSmrg# ----------------------------------------------------------------------- 12235b41a30aaSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12236b41a30aaSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12237b41a30aaSmrgm4_define([lt_if_append_uniq], 12238b41a30aaSmrg[m4_ifdef([$1], 12239b41a30aaSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12240b41a30aaSmrg [lt_append([$1], [$2], [$3])$4], 12241b41a30aaSmrg [$5])], 12242b41a30aaSmrg [lt_append([$1], [$2], [$3])$4])]) 12243b41a30aaSmrg 12244b41a30aaSmrg 12245b41a30aaSmrg# lt_dict_add(DICT, KEY, VALUE) 12246b41a30aaSmrg# ----------------------------- 12247b41a30aaSmrgm4_define([lt_dict_add], 12248b41a30aaSmrg[m4_define([$1($2)], [$3])]) 12249b41a30aaSmrg 12250ea133fd7Smrg 12251b41a30aaSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12252b41a30aaSmrg# -------------------------------------------- 12253b41a30aaSmrgm4_define([lt_dict_add_subkey], 12254b41a30aaSmrg[m4_define([$1($2:$3)], [$4])]) 12255a253d6aeSmrg 1225625b89263Smrg 12257b41a30aaSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12258b41a30aaSmrg# ---------------------------------- 12259b41a30aaSmrgm4_define([lt_dict_fetch], 12260b41a30aaSmrg[m4_ifval([$3], 12261b41a30aaSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12262b41a30aaSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 1226325b89263Smrg 12264a253d6aeSmrg 12265b41a30aaSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12266b41a30aaSmrg# ----------------------------------------------------------------- 12267b41a30aaSmrgm4_define([lt_if_dict_fetch], 12268b41a30aaSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12269b41a30aaSmrg [$5], 12270b41a30aaSmrg [$6])]) 12271a253d6aeSmrg 1227206f32fbeSmrg 12273b41a30aaSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12274b41a30aaSmrg# -------------------------------------------------------------- 12275b41a30aaSmrgm4_define([lt_dict_filter], 12276b41a30aaSmrg[m4_if([$5], [], [], 12277b41a30aaSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 12278b41a30aaSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12279b41a30aaSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12280b41a30aaSmrg]) 12281b41a30aaSmrg 12282b41a30aaSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12283ea133fd7Smrg# 12284b41a30aaSmrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12285b41a30aaSmrg# Inc. 12286b41a30aaSmrg# Written by Scott James Remnant, 2004 1228725b89263Smrg# 12288b41a30aaSmrg# This file is free software; the Free Software Foundation gives 12289b41a30aaSmrg# unlimited permission to copy and/or distribute it, with or without 12290b41a30aaSmrg# modifications, as long as this notice is preserved. 1229125b89263Smrg 12292b41a30aaSmrg# @configure_input@ 1229331637056Smrg 12294b41a30aaSmrg# serial 4245 ltversion.m4 12295b41a30aaSmrg# This file is part of GNU Libtool 12296b41a30aaSmrg 12297b41a30aaSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12298b41a30aaSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 12299b41a30aaSmrg 12300b41a30aaSmrgAC_DEFUN([LTVERSION_VERSION], 12301b41a30aaSmrg[macro_version='2.4.7' 12302b41a30aaSmrgmacro_revision='2.4.7' 12303b41a30aaSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12304b41a30aaSmrg_LT_DECL(, macro_revision, 0) 1230506f32fbeSmrg]) 1230625b89263Smrg 12307b41a30aaSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 1230806f32fbeSmrg# 12309b41a30aaSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12310b41a30aaSmrg# Software Foundation, Inc. 12311b41a30aaSmrg# Written by Scott James Remnant, 2004. 12312b41a30aaSmrg# 12313b41a30aaSmrg# This file is free software; the Free Software Foundation gives 12314b41a30aaSmrg# unlimited permission to copy and/or distribute it, with or without 12315b41a30aaSmrg# modifications, as long as this notice is preserved. 12316b41a30aaSmrg 12317b41a30aaSmrg# serial 5 lt~obsolete.m4 12318b41a30aaSmrg 12319b41a30aaSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 1232006f32fbeSmrg# 12321b41a30aaSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12322b41a30aaSmrg# which have later been changed to m4_define as they aren't part of the 12323b41a30aaSmrg# exported API, or moved to Autoconf or Automake where they belong. 1232406f32fbeSmrg# 12325b41a30aaSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12326b41a30aaSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12327b41a30aaSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 12328b41a30aaSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12329b41a30aaSmrg# and doesn't know about Autoconf macros at all.) 12330b41a30aaSmrg# 12331b41a30aaSmrg# So we provide this file, which has a silly filename so it's always 12332b41a30aaSmrg# included after everything else. This provides aclocal with the 12333b41a30aaSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12334b41a30aaSmrg# because those macros already exist, or will be overwritten later. 12335b41a30aaSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12336b41a30aaSmrg# 12337b41a30aaSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12338b41a30aaSmrg# Yes, that means every name once taken will need to remain here until 12339b41a30aaSmrg# we give up compatibility with versions before 1.7, at which point 12340b41a30aaSmrg# we need to keep only those names which we still refer to. 12341b41a30aaSmrg 12342b41a30aaSmrg# This is to help aclocal find these macros, as it can't see m4_define. 12343b41a30aaSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12344b41a30aaSmrg 12345b41a30aaSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12346b41a30aaSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12347b41a30aaSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12348b41a30aaSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12349b41a30aaSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12350b41a30aaSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12351b41a30aaSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12352b41a30aaSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12353b41a30aaSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12354b41a30aaSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12355b41a30aaSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12356b41a30aaSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12357b41a30aaSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12358b41a30aaSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12359b41a30aaSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12360b41a30aaSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12361b41a30aaSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12362b41a30aaSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12363b41a30aaSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12364b41a30aaSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12365b41a30aaSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12366b41a30aaSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12367b41a30aaSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12368b41a30aaSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12369b41a30aaSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12370b41a30aaSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12371b41a30aaSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12372b41a30aaSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12373b41a30aaSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12374b41a30aaSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12375b41a30aaSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12376b41a30aaSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12377b41a30aaSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12378b41a30aaSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12379b41a30aaSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12380b41a30aaSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12381b41a30aaSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12382b41a30aaSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12383b41a30aaSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12384b41a30aaSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12385b41a30aaSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12386b41a30aaSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12387b41a30aaSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12388b41a30aaSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12389b41a30aaSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12390b41a30aaSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12391b41a30aaSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12392b41a30aaSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12393b41a30aaSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12394b41a30aaSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12395b41a30aaSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12396b41a30aaSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12397b41a30aaSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12398b41a30aaSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12399b41a30aaSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12400b41a30aaSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12401b41a30aaSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12402b41a30aaSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12403b41a30aaSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12404b41a30aaSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12405b41a30aaSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12406a253d6aeSmrg 12407