aclocal.m4 revision d21ab8bc
1d21ab8bcSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 289c04b6cSmrg 3d21ab8bcSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 41f0ac6a5Smrg 51f0ac6a5Smrg# This file is free software; the Free Software Foundation 61f0ac6a5Smrg# gives unlimited permission to copy and/or distribute it, 71f0ac6a5Smrg# with or without modifications, as long as this notice is preserved. 81f0ac6a5Smrg 91f0ac6a5Smrg# This program is distributed in the hope that it will be useful, 101f0ac6a5Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 111f0ac6a5Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 121f0ac6a5Smrg# PARTICULAR PURPOSE. 131f0ac6a5Smrg 1489c04b6cSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15e5410a46Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16e5410a46Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17d21ab8bcSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18d21ab8bcSmrg[m4_warning([this file was generated for autoconf 2.71. 19e5410a46SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20e5410a46SmrgIf you have problems, you may need to regenerate the build system entirely. 2189c04b6cSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 221f0ac6a5Smrg 23d21ab8bcSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 241f0ac6a5Smrg# 25d21ab8bcSmrg# This file is free software; the Free Software Foundation 26d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 27d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 28d21ab8bcSmrg 29d21ab8bcSmrg# AM_AUTOMAKE_VERSION(VERSION) 30d21ab8bcSmrg# ---------------------------- 31d21ab8bcSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32d21ab8bcSmrg# generated from the m4 files accompanying Automake X.Y. 33d21ab8bcSmrg# (This private macro should not be called outside this file.) 34d21ab8bcSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35d21ab8bcSmrg[am__api_version='1.16' 36d21ab8bcSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37d21ab8bcSmrgdnl require some minimum version. Point them to the right macro. 38d21ab8bcSmrgm4_if([$1], [1.16.5], [], 39d21ab8bcSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40d21ab8bcSmrg]) 41d21ab8bcSmrg 42d21ab8bcSmrg# _AM_AUTOCONF_VERSION(VERSION) 43d21ab8bcSmrg# ----------------------------- 44d21ab8bcSmrg# aclocal traces this macro to find the Autoconf version. 45d21ab8bcSmrg# This is a private macro too. Using m4_define simplifies 46d21ab8bcSmrg# the logic in aclocal, which can simply ignore this definition. 47d21ab8bcSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48d21ab8bcSmrg 49d21ab8bcSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50d21ab8bcSmrg# ------------------------------- 51d21ab8bcSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52d21ab8bcSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53d21ab8bcSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54d21ab8bcSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 55d21ab8bcSmrgm4_ifndef([AC_AUTOCONF_VERSION], 56d21ab8bcSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57d21ab8bcSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58d21ab8bcSmrg 59d21ab8bcSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60d21ab8bcSmrg 61d21ab8bcSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62e5410a46Smrg# 63d21ab8bcSmrg# This file is free software; the Free Software Foundation 64d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 65d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 661f0ac6a5Smrg 67d21ab8bcSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68d21ab8bcSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69d21ab8bcSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 701f0ac6a5Smrg# 71d21ab8bcSmrg# Of course, Automake must honor this variable whenever it calls a 72d21ab8bcSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 73d21ab8bcSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74d21ab8bcSmrg# depending on how configure is run. This is pretty annoying, since 75d21ab8bcSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76d21ab8bcSmrg# source directory, any form will work fine, but in subdirectories a 77d21ab8bcSmrg# relative path needs to be adjusted first. 781f0ac6a5Smrg# 79d21ab8bcSmrg# $ac_aux_dir/missing 80d21ab8bcSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 81d21ab8bcSmrg# $top_srcdir/$ac_aux_dir/missing 82d21ab8bcSmrg# fails if $ac_aux_dir is absolute, 83d21ab8bcSmrg# fails when called from a subdirectory in a VPATH build with 84d21ab8bcSmrg# a relative $ac_aux_dir 851f0ac6a5Smrg# 86d21ab8bcSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87d21ab8bcSmrg# are both prefixed by $srcdir. In an in-source build this is usually 88d21ab8bcSmrg# harmless because $srcdir is '.', but things will broke when you 89d21ab8bcSmrg# start a VPATH build or use an absolute $srcdir. 901f0ac6a5Smrg# 91d21ab8bcSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92d21ab8bcSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93d21ab8bcSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94d21ab8bcSmrg# and then we would define $MISSING as 95d21ab8bcSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 96d21ab8bcSmrg# This will work as long as MISSING is not called from configure, because 97d21ab8bcSmrg# unfortunately $(top_srcdir) has no meaning in configure. 98d21ab8bcSmrg# However there are other variables, like CC, which are often used in 99d21ab8bcSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100e5410a46Smrg# 101d21ab8bcSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 102d21ab8bcSmrg# absolute PATH. The drawback is that using absolute paths prevent a 103d21ab8bcSmrg# configured tree to be moved without reconfiguration. 1042fd96bc7Smrg 105d21ab8bcSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106d21ab8bcSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107d21ab8bcSmrg# Expand $ac_aux_dir to an absolute path. 108d21ab8bcSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 109e5410a46Smrg]) 1101f0ac6a5Smrg 111d21ab8bcSmrg# AM_CONDITIONAL -*- Autoconf -*- 1121f0ac6a5Smrg 113d21ab8bcSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114d21ab8bcSmrg# 115d21ab8bcSmrg# This file is free software; the Free Software Foundation 116d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 117d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 1181f0ac6a5Smrg 119d21ab8bcSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120d21ab8bcSmrg# ------------------------------------- 121d21ab8bcSmrg# Define a conditional. 122d21ab8bcSmrgAC_DEFUN([AM_CONDITIONAL], 123d21ab8bcSmrg[AC_PREREQ([2.52])dnl 124d21ab8bcSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125d21ab8bcSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126d21ab8bcSmrgAC_SUBST([$1_TRUE])dnl 127d21ab8bcSmrgAC_SUBST([$1_FALSE])dnl 128d21ab8bcSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129d21ab8bcSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130d21ab8bcSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131d21ab8bcSmrgif $2; then 132d21ab8bcSmrg $1_TRUE= 133d21ab8bcSmrg $1_FALSE='#' 134d21ab8bcSmrgelse 135d21ab8bcSmrg $1_TRUE='#' 136d21ab8bcSmrg $1_FALSE= 137d21ab8bcSmrgfi 138d21ab8bcSmrgAC_CONFIG_COMMANDS_PRE( 139d21ab8bcSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140d21ab8bcSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 141d21ab8bcSmrgUsually this means the macro was only invoked conditionally.]]) 142d21ab8bcSmrgfi])]) 1431f0ac6a5Smrg 144d21ab8bcSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145d21ab8bcSmrg# 146d21ab8bcSmrg# This file is free software; the Free Software Foundation 147d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 148d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 1491f0ac6a5Smrg 1501f0ac6a5Smrg 151d21ab8bcSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152d21ab8bcSmrg# written in clear, in which case automake, when reading aclocal.m4, 153d21ab8bcSmrg# will think it sees a *use*, and therefore will trigger all it's 154d21ab8bcSmrg# C support machinery. Also note that it means that autoscan, seeing 155d21ab8bcSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1561f0ac6a5Smrg 1571f0ac6a5Smrg 158d21ab8bcSmrg# _AM_DEPENDENCIES(NAME) 159d21ab8bcSmrg# ---------------------- 160d21ab8bcSmrg# See how the compiler implements dependency checking. 161d21ab8bcSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162d21ab8bcSmrg# We try a few techniques and use that to set a single cache variable. 163d21ab8bcSmrg# 164d21ab8bcSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165d21ab8bcSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166d21ab8bcSmrg# dependency, and given that the user is not expected to run this macro, 167d21ab8bcSmrg# just rely on AC_PROG_CC. 168d21ab8bcSmrgAC_DEFUN([_AM_DEPENDENCIES], 169d21ab8bcSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170d21ab8bcSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171d21ab8bcSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172d21ab8bcSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1731f0ac6a5Smrg 174d21ab8bcSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175d21ab8bcSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176d21ab8bcSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177d21ab8bcSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178d21ab8bcSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179d21ab8bcSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180d21ab8bcSmrg [depcc="$$1" am_compiler_list=]) 1811f0ac6a5Smrg 182d21ab8bcSmrgAC_CACHE_CHECK([dependency style of $depcc], 183d21ab8bcSmrg [am_cv_$1_dependencies_compiler_type], 184d21ab8bcSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185d21ab8bcSmrg # We make a subdir and do the tests there. Otherwise we can end up 186d21ab8bcSmrg # making bogus files that we don't know about and never remove. For 187d21ab8bcSmrg # instance it was reported that on HP-UX the gcc test will end up 188d21ab8bcSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 189d21ab8bcSmrg # in D". 190d21ab8bcSmrg rm -rf conftest.dir 191d21ab8bcSmrg mkdir conftest.dir 192d21ab8bcSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 193d21ab8bcSmrg # using a relative directory. 194d21ab8bcSmrg cp "$am_depcomp" conftest.dir 195d21ab8bcSmrg cd conftest.dir 196d21ab8bcSmrg # We will build objects and dependencies in a subdirectory because 197d21ab8bcSmrg # it helps to detect inapplicable dependency modes. For instance 198d21ab8bcSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 199d21ab8bcSmrg # side effect of compilation, but ICC will put the dependencies in 200d21ab8bcSmrg # the current directory while Tru64 will put them in the object 201d21ab8bcSmrg # directory. 202d21ab8bcSmrg mkdir sub 2031f0ac6a5Smrg 204d21ab8bcSmrg am_cv_$1_dependencies_compiler_type=none 205d21ab8bcSmrg if test "$am_compiler_list" = ""; then 206d21ab8bcSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207d21ab8bcSmrg fi 208d21ab8bcSmrg am__universal=false 209d21ab8bcSmrg m4_case([$1], [CC], 210d21ab8bcSmrg [case " $depcc " in #( 211d21ab8bcSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212d21ab8bcSmrg esac], 213d21ab8bcSmrg [CXX], 214d21ab8bcSmrg [case " $depcc " in #( 215d21ab8bcSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216d21ab8bcSmrg esac]) 217e5410a46Smrg 218d21ab8bcSmrg for depmode in $am_compiler_list; do 219d21ab8bcSmrg # Setup a source with many dependencies, because some compilers 220d21ab8bcSmrg # like to wrap large dependency lists on column 80 (with \), and 221d21ab8bcSmrg # we should not choose a depcomp mode which is confused by this. 222d21ab8bcSmrg # 223d21ab8bcSmrg # We need to recreate these files for each test, as the compiler may 224d21ab8bcSmrg # overwrite some of them when testing with obscure command lines. 225d21ab8bcSmrg # This happens at least with the AIX C compiler. 226d21ab8bcSmrg : > sub/conftest.c 227d21ab8bcSmrg for i in 1 2 3 4 5 6; do 228d21ab8bcSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229d21ab8bcSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230d21ab8bcSmrg # Solaris 10 /bin/sh. 231d21ab8bcSmrg echo '/* dummy */' > sub/conftst$i.h 232d21ab8bcSmrg done 233d21ab8bcSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234e5410a46Smrg 235d21ab8bcSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236d21ab8bcSmrg # mode. It turns out that the SunPro C++ compiler does not properly 237d21ab8bcSmrg # handle '-M -o', and we need to detect this. Also, some Intel 238d21ab8bcSmrg # versions had trouble with output in subdirs. 239d21ab8bcSmrg am__obj=sub/conftest.${OBJEXT-o} 240d21ab8bcSmrg am__minus_obj="-o $am__obj" 241d21ab8bcSmrg case $depmode in 242d21ab8bcSmrg gcc) 243d21ab8bcSmrg # This depmode causes a compiler race in universal mode. 244d21ab8bcSmrg test "$am__universal" = false || continue 245d21ab8bcSmrg ;; 246d21ab8bcSmrg nosideeffect) 247d21ab8bcSmrg # After this tag, mechanisms are not by side-effect, so they'll 248d21ab8bcSmrg # only be used when explicitly requested. 249d21ab8bcSmrg if test "x$enable_dependency_tracking" = xyes; then 250d21ab8bcSmrg continue 251d21ab8bcSmrg else 252d21ab8bcSmrg break 253d21ab8bcSmrg fi 254d21ab8bcSmrg ;; 255d21ab8bcSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256d21ab8bcSmrg # This compiler won't grok '-c -o', but also, the minuso test has 257d21ab8bcSmrg # not run yet. These depmodes are late enough in the game, and 258d21ab8bcSmrg # so weak that their functioning should not be impacted. 259d21ab8bcSmrg am__obj=conftest.${OBJEXT-o} 260d21ab8bcSmrg am__minus_obj= 261d21ab8bcSmrg ;; 262d21ab8bcSmrg none) break ;; 263d21ab8bcSmrg esac 264d21ab8bcSmrg if depmode=$depmode \ 265d21ab8bcSmrg source=sub/conftest.c object=$am__obj \ 266d21ab8bcSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267d21ab8bcSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268d21ab8bcSmrg >/dev/null 2>conftest.err && 269d21ab8bcSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270d21ab8bcSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271d21ab8bcSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272d21ab8bcSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273d21ab8bcSmrg # icc doesn't choke on unknown options, it will just issue warnings 274d21ab8bcSmrg # or remarks (even with -Werror). So we grep stderr for any message 275d21ab8bcSmrg # that says an option was ignored or not supported. 276d21ab8bcSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277d21ab8bcSmrg # icc: Command line warning: ignoring option '-M'; no argument required 278d21ab8bcSmrg # The diagnosis changed in icc 8.0: 279d21ab8bcSmrg # icc: Command line remark: option '-MP' not supported 280d21ab8bcSmrg if (grep 'ignoring option' conftest.err || 281d21ab8bcSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282d21ab8bcSmrg am_cv_$1_dependencies_compiler_type=$depmode 283d21ab8bcSmrg break 284d21ab8bcSmrg fi 285d21ab8bcSmrg fi 286d21ab8bcSmrg done 287d21ab8bcSmrg 288d21ab8bcSmrg cd .. 289d21ab8bcSmrg rm -rf conftest.dir 290d21ab8bcSmrgelse 291d21ab8bcSmrg am_cv_$1_dependencies_compiler_type=none 292d21ab8bcSmrgfi 293d21ab8bcSmrg]) 294d21ab8bcSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295d21ab8bcSmrgAM_CONDITIONAL([am__fastdep$1], [ 296d21ab8bcSmrg test "x$enable_dependency_tracking" != xno \ 297d21ab8bcSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298d21ab8bcSmrg]) 2991f0ac6a5Smrg 300e5410a46Smrg 301d21ab8bcSmrg# AM_SET_DEPDIR 302d21ab8bcSmrg# ------------- 303d21ab8bcSmrg# Choose a directory name for dependency files. 304d21ab8bcSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305d21ab8bcSmrgAC_DEFUN([AM_SET_DEPDIR], 306d21ab8bcSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307d21ab8bcSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308d21ab8bcSmrg]) 309e5410a46Smrg 310e5410a46Smrg 311d21ab8bcSmrg# AM_DEP_TRACK 312d21ab8bcSmrg# ------------ 313d21ab8bcSmrgAC_DEFUN([AM_DEP_TRACK], 314d21ab8bcSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 315d21ab8bcSmrgAS_HELP_STRING( 316d21ab8bcSmrg [--enable-dependency-tracking], 317d21ab8bcSmrg [do not reject slow dependency extractors]) 318d21ab8bcSmrgAS_HELP_STRING( 319d21ab8bcSmrg [--disable-dependency-tracking], 320d21ab8bcSmrg [speeds up one-time build])]) 321d21ab8bcSmrgif test "x$enable_dependency_tracking" != xno; then 322d21ab8bcSmrg am_depcomp="$ac_aux_dir/depcomp" 323d21ab8bcSmrg AMDEPBACKSLASH='\' 324d21ab8bcSmrg am__nodep='_no' 3251f0ac6a5Smrgfi 326d21ab8bcSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327d21ab8bcSmrgAC_SUBST([AMDEPBACKSLASH])dnl 328d21ab8bcSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329d21ab8bcSmrgAC_SUBST([am__nodep])dnl 330d21ab8bcSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 331e5410a46Smrg]) 3321f0ac6a5Smrg 333d21ab8bcSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 334e5410a46Smrg 335d21ab8bcSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 336d21ab8bcSmrg# 337d21ab8bcSmrg# This file is free software; the Free Software Foundation 338d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 339d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 3401f0ac6a5Smrg 341d21ab8bcSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 342d21ab8bcSmrg# ------------------------------ 343d21ab8bcSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344d21ab8bcSmrg[{ 345d21ab8bcSmrg # Older Autoconf quotes --file arguments for eval, but not when files 346d21ab8bcSmrg # are listed without --file. Let's play safe and only enable the eval 347d21ab8bcSmrg # if we detect the quoting. 348d21ab8bcSmrg # TODO: see whether this extra hack can be removed once we start 349d21ab8bcSmrg # requiring Autoconf 2.70 or later. 350d21ab8bcSmrg AS_CASE([$CONFIG_FILES], 351d21ab8bcSmrg [*\'*], [eval set x "$CONFIG_FILES"], 352d21ab8bcSmrg [*], [set x $CONFIG_FILES]) 353d21ab8bcSmrg shift 354d21ab8bcSmrg # Used to flag and report bootstrapping failures. 355d21ab8bcSmrg am_rc=0 356d21ab8bcSmrg for am_mf 357d21ab8bcSmrg do 358d21ab8bcSmrg # Strip MF so we end up with the name of the file. 359d21ab8bcSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360d21ab8bcSmrg # Check whether this is an Automake generated Makefile which includes 361d21ab8bcSmrg # dependency-tracking related rules and includes. 362d21ab8bcSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 363d21ab8bcSmrg # limit of 2048, but all sed's we know have understand at least 4000. 364d21ab8bcSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365d21ab8bcSmrg || continue 366d21ab8bcSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 367d21ab8bcSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 368d21ab8bcSmrg AM_RUN_LOG([cd "$am_dirpart" \ 369d21ab8bcSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 370d21ab8bcSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 371d21ab8bcSmrg done 372d21ab8bcSmrg if test $am_rc -ne 0; then 373d21ab8bcSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374d21ab8bcSmrg for automatic dependency tracking. If GNU make was not used, consider 375d21ab8bcSmrg re-running the configure script with MAKE="gmake" (or whatever is 376d21ab8bcSmrg necessary). You can also try re-running configure with the 377d21ab8bcSmrg '--disable-dependency-tracking' option to at least be able to build 378d21ab8bcSmrg the package (albeit without support for automatic dependency tracking).]) 3792fd96bc7Smrg fi 380d21ab8bcSmrg AS_UNSET([am_dirpart]) 381d21ab8bcSmrg AS_UNSET([am_filepart]) 382d21ab8bcSmrg AS_UNSET([am_mf]) 383d21ab8bcSmrg AS_UNSET([am_rc]) 384d21ab8bcSmrg rm -f conftest-deps.mk 385d21ab8bcSmrg} 386d21ab8bcSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3871f0ac6a5Smrg 3881f0ac6a5Smrg 389d21ab8bcSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 390d21ab8bcSmrg# ----------------------------- 391d21ab8bcSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 392d21ab8bcSmrg# 393d21ab8bcSmrg# This code is only required when automatic dependency tracking is enabled. 394d21ab8bcSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395d21ab8bcSmrg# order to bootstrap the dependency handling code. 396d21ab8bcSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397d21ab8bcSmrg[AC_CONFIG_COMMANDS([depfiles], 398d21ab8bcSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399d21ab8bcSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 4001f0ac6a5Smrg 401d21ab8bcSmrg# Do all the work for Automake. -*- Autoconf -*- 402e5410a46Smrg 403d21ab8bcSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 404d21ab8bcSmrg# 405d21ab8bcSmrg# This file is free software; the Free Software Foundation 406d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 407d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 408e5410a46Smrg 409d21ab8bcSmrg# This macro actually does too much. Some checks are only needed if 410d21ab8bcSmrg# your package does certain things. But this isn't really a big deal. 411e5410a46Smrg 412d21ab8bcSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 413d21ab8bcSmrgm4_define([AC_PROG_CC], 414d21ab8bcSmrgm4_defn([AC_PROG_CC]) 415d21ab8bcSmrg[_AM_PROG_CC_C_O 416d21ab8bcSmrg]) 417b9867631Smrg 418d21ab8bcSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419d21ab8bcSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 420d21ab8bcSmrg# ----------------------------------------------- 421d21ab8bcSmrg# The call with PACKAGE and VERSION arguments is the old style 422d21ab8bcSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 423d21ab8bcSmrg# and VERSION should now be passed to AC_INIT and removed from 424d21ab8bcSmrg# the call to AM_INIT_AUTOMAKE. 425d21ab8bcSmrg# We support both call styles for the transition. After 426d21ab8bcSmrg# the next Automake release, Autoconf can make the AC_INIT 427d21ab8bcSmrg# arguments mandatory, and then we can depend on a new Autoconf 428d21ab8bcSmrg# release and drop the old call support. 429d21ab8bcSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 430d21ab8bcSmrg[AC_PREREQ([2.65])dnl 431d21ab8bcSmrgm4_ifdef([_$0_ALREADY_INIT], 432d21ab8bcSmrg [m4_fatal([$0 expanded multiple times 433d21ab8bcSmrg]m4_defn([_$0_ALREADY_INIT]))], 434d21ab8bcSmrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435d21ab8bcSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 436d21ab8bcSmrgdnl the ones we care about. 437d21ab8bcSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438d21ab8bcSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439d21ab8bcSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 440d21ab8bcSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 441d21ab8bcSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442d21ab8bcSmrg # is not polluted with repeated "-I." 443d21ab8bcSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444d21ab8bcSmrg # test to see if srcdir already configured 445d21ab8bcSmrg if test -f $srcdir/config.status; then 446d21ab8bcSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 447e5410a46Smrg fi 448d21ab8bcSmrgfi 449e5410a46Smrg 450d21ab8bcSmrg# test whether we have cygpath 451d21ab8bcSmrgif test -z "$CYGPATH_W"; then 452d21ab8bcSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 453d21ab8bcSmrg CYGPATH_W='cygpath -w' 454d21ab8bcSmrg else 455d21ab8bcSmrg CYGPATH_W=echo 456d21ab8bcSmrg fi 457d21ab8bcSmrgfi 458d21ab8bcSmrgAC_SUBST([CYGPATH_W]) 459e5410a46Smrg 460d21ab8bcSmrg# Define the identity of the package. 461d21ab8bcSmrgdnl Distinguish between old-style and new-style calls. 462d21ab8bcSmrgm4_ifval([$2], 463d21ab8bcSmrg[AC_DIAGNOSE([obsolete], 464d21ab8bcSmrg [$0: two- and three-arguments forms are deprecated.]) 465d21ab8bcSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466d21ab8bcSmrg AC_SUBST([PACKAGE], [$1])dnl 467d21ab8bcSmrg AC_SUBST([VERSION], [$2])], 468d21ab8bcSmrg[_AM_SET_OPTIONS([$1])dnl 469d21ab8bcSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 470d21ab8bcSmrgm4_if( 471d21ab8bcSmrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 472d21ab8bcSmrg [ok:ok],, 473d21ab8bcSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474d21ab8bcSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475d21ab8bcSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476b9867631Smrg 477d21ab8bcSmrg_AM_IF_OPTION([no-define],, 478d21ab8bcSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 479d21ab8bcSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 480b9867631Smrg 481d21ab8bcSmrg# Some tools Automake needs. 482d21ab8bcSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 483d21ab8bcSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 484d21ab8bcSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 485d21ab8bcSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 486d21ab8bcSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 487d21ab8bcSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 488d21ab8bcSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 489d21ab8bcSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490d21ab8bcSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 491d21ab8bcSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 492d21ab8bcSmrg# For better backward compatibility. To be removed once Automake 1.9.x 493d21ab8bcSmrg# dies out for good. For more background, see: 494d21ab8bcSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495d21ab8bcSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 496d21ab8bcSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497d21ab8bcSmrg# We need awk for the "check" target (and possibly the TAP driver). The 498d21ab8bcSmrg# system "awk" is bad on some platforms. 499d21ab8bcSmrgAC_REQUIRE([AC_PROG_AWK])dnl 500d21ab8bcSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 501d21ab8bcSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 502d21ab8bcSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503d21ab8bcSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504d21ab8bcSmrg [_AM_PROG_TAR([v7])])]) 505d21ab8bcSmrg_AM_IF_OPTION([no-dependencies],, 506d21ab8bcSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 507d21ab8bcSmrg [_AM_DEPENDENCIES([CC])], 508d21ab8bcSmrg [m4_define([AC_PROG_CC], 509d21ab8bcSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510d21ab8bcSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 511d21ab8bcSmrg [_AM_DEPENDENCIES([CXX])], 512d21ab8bcSmrg [m4_define([AC_PROG_CXX], 513d21ab8bcSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514d21ab8bcSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 515d21ab8bcSmrg [_AM_DEPENDENCIES([OBJC])], 516d21ab8bcSmrg [m4_define([AC_PROG_OBJC], 517d21ab8bcSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 518d21ab8bcSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 519d21ab8bcSmrg [_AM_DEPENDENCIES([OBJCXX])], 520d21ab8bcSmrg [m4_define([AC_PROG_OBJCXX], 521d21ab8bcSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 5222fd96bc7Smrg]) 523d21ab8bcSmrg# Variables for tags utilities; see am/tags.am 524d21ab8bcSmrgif test -z "$CTAGS"; then 525d21ab8bcSmrg CTAGS=ctags 526d21ab8bcSmrgfi 527d21ab8bcSmrgAC_SUBST([CTAGS]) 528d21ab8bcSmrgif test -z "$ETAGS"; then 529d21ab8bcSmrg ETAGS=etags 530d21ab8bcSmrgfi 531d21ab8bcSmrgAC_SUBST([ETAGS]) 532d21ab8bcSmrgif test -z "$CSCOPE"; then 533d21ab8bcSmrg CSCOPE=cscope 534d21ab8bcSmrgfi 535d21ab8bcSmrgAC_SUBST([CSCOPE]) 536b9867631Smrg 537d21ab8bcSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 538d21ab8bcSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 539d21ab8bcSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 540d21ab8bcSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541d21ab8bcSmrgAC_CONFIG_COMMANDS_PRE(dnl 542d21ab8bcSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 543d21ab8bcSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544b9867631Smrg 545d21ab8bcSmrg# POSIX will say in a future version that running "rm -f" with no argument 546d21ab8bcSmrg# is OK; and we want to be able to make that assumption in our Makefile 547d21ab8bcSmrg# recipes. So use an aggressive probe to check that the usage we want is 548d21ab8bcSmrg# actually supported "in the wild" to an acceptable degree. 549d21ab8bcSmrg# See automake bug#10828. 550d21ab8bcSmrg# To make any issue more visible, cause the running configure to be aborted 551d21ab8bcSmrg# by default if the 'rm' program in use doesn't match our expectations; the 552d21ab8bcSmrg# user can still override this though. 553d21ab8bcSmrgif rm -f && rm -fr && rm -rf; then : OK; else 554d21ab8bcSmrg cat >&2 <<'END' 555d21ab8bcSmrgOops! 556b9867631Smrg 557d21ab8bcSmrgYour 'rm' program seems unable to run without file operands specified 558d21ab8bcSmrgon the command line, even when the '-f' option is present. This is contrary 559d21ab8bcSmrgto the behaviour of most rm programs out there, and not conforming with 560d21ab8bcSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 5611f0ac6a5Smrg 562d21ab8bcSmrgPlease tell bug-automake@gnu.org about your system, including the value 563d21ab8bcSmrgof your $PATH and any error possibly output before this message. This 564d21ab8bcSmrgcan help us improve future automake versions. 5651f0ac6a5Smrg 566d21ab8bcSmrgEND 567d21ab8bcSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 568d21ab8bcSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 569d21ab8bcSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 570d21ab8bcSmrg echo >&2 571d21ab8bcSmrg else 572d21ab8bcSmrg cat >&2 <<'END' 573d21ab8bcSmrgAborting the configuration process, to ensure you take notice of the issue. 5741f0ac6a5Smrg 575d21ab8bcSmrgYou can download and install GNU coreutils to get an 'rm' implementation 576d21ab8bcSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 5771f0ac6a5Smrg 578d21ab8bcSmrgIf you want to complete the configuration process using your problematic 579d21ab8bcSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 580d21ab8bcSmrgto "yes", and re-run configure. 5811f0ac6a5Smrg 582d21ab8bcSmrgEND 583d21ab8bcSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 584d21ab8bcSmrg fi 585d21ab8bcSmrgfi 586d21ab8bcSmrgdnl The trailing newline in this macro's definition is deliberate, for 587d21ab8bcSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 588d21ab8bcSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 589d21ab8bcSmrg]) 5901f0ac6a5Smrg 591d21ab8bcSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592d21ab8bcSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593d21ab8bcSmrgdnl mangled by Autoconf and run in a shell conditional statement. 594d21ab8bcSmrgm4_define([_AC_COMPILER_EXEEXT], 595d21ab8bcSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5961f0ac6a5Smrg 597d21ab8bcSmrg# When config.status generates a header, we must update the stamp-h file. 598d21ab8bcSmrg# This file resides in the same directory as the config header 599d21ab8bcSmrg# that is generated. The stamp files are numbered to have different names. 6001f0ac6a5Smrg 601d21ab8bcSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602d21ab8bcSmrg# loop where config.status creates the headers, so we can generate 603d21ab8bcSmrg# our stamp files there. 604d21ab8bcSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605d21ab8bcSmrg[# Compute $1's index in $config_headers. 606d21ab8bcSmrg_am_arg=$1 607d21ab8bcSmrg_am_stamp_count=1 608d21ab8bcSmrgfor _am_header in $config_headers :; do 609d21ab8bcSmrg case $_am_header in 610d21ab8bcSmrg $_am_arg | $_am_arg:* ) 611d21ab8bcSmrg break ;; 612d21ab8bcSmrg * ) 613d21ab8bcSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614d21ab8bcSmrg esac 615d21ab8bcSmrgdone 616d21ab8bcSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617e5410a46Smrg 618d21ab8bcSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 619d21ab8bcSmrg# 620d21ab8bcSmrg# This file is free software; the Free Software Foundation 621d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 622d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 623e5410a46Smrg 624d21ab8bcSmrg# AM_PROG_INSTALL_SH 625d21ab8bcSmrg# ------------------ 626d21ab8bcSmrg# Define $install_sh. 627d21ab8bcSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 628d21ab8bcSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629d21ab8bcSmrgif test x"${install_sh+set}" != xset; then 630d21ab8bcSmrg case $am_aux_dir in 631d21ab8bcSmrg *\ * | *\ *) 632d21ab8bcSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633d21ab8bcSmrg *) 634d21ab8bcSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 635d21ab8bcSmrg esac 636d21ab8bcSmrgfi 637d21ab8bcSmrgAC_SUBST([install_sh])]) 6381f0ac6a5Smrg 639d21ab8bcSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 640d21ab8bcSmrg# 641d21ab8bcSmrg# This file is free software; the Free Software Foundation 642d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 643d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 6441f0ac6a5Smrg 645d21ab8bcSmrg# Check whether the underlying file-system supports filenames 646d21ab8bcSmrg# with a leading dot. For instance MS-DOS doesn't. 647d21ab8bcSmrgAC_DEFUN([AM_SET_LEADING_DOT], 648d21ab8bcSmrg[rm -rf .tst 2>/dev/null 649d21ab8bcSmrgmkdir .tst 2>/dev/null 650d21ab8bcSmrgif test -d .tst; then 651d21ab8bcSmrg am__leading_dot=. 652d21ab8bcSmrgelse 653d21ab8bcSmrg am__leading_dot=_ 654d21ab8bcSmrgfi 655d21ab8bcSmrgrmdir .tst 2>/dev/null 656d21ab8bcSmrgAC_SUBST([am__leading_dot])]) 657e5410a46Smrg 658d21ab8bcSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6591f0ac6a5Smrg 660d21ab8bcSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661d21ab8bcSmrg# 662d21ab8bcSmrg# This file is free software; the Free Software Foundation 663d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 664d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 6651f0ac6a5Smrg 666d21ab8bcSmrg# AM_MAKE_INCLUDE() 667d21ab8bcSmrg# ----------------- 668d21ab8bcSmrg# Check whether make has an 'include' directive that can support all 669d21ab8bcSmrg# the idioms we need for our automatic dependency tracking code. 670d21ab8bcSmrgAC_DEFUN([AM_MAKE_INCLUDE], 671d21ab8bcSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672d21ab8bcSmrgcat > confinc.mk << 'END' 673d21ab8bcSmrgam__doit: 674d21ab8bcSmrg @echo this is the am__doit target >confinc.out 675d21ab8bcSmrg.PHONY: am__doit 676d21ab8bcSmrgEND 677d21ab8bcSmrgam__include="#" 678d21ab8bcSmrgam__quote= 679d21ab8bcSmrg# BSD make does it like this. 680d21ab8bcSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 681d21ab8bcSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682d21ab8bcSmrgecho 'include confinc.mk # ignored' > confmf.GNU 683d21ab8bcSmrg_am_result=no 684d21ab8bcSmrgfor s in GNU BSD; do 685d21ab8bcSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686d21ab8bcSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687d21ab8bcSmrg ['0:this is the am__doit target'], 688d21ab8bcSmrg [AS_CASE([$s], 689d21ab8bcSmrg [BSD], [am__include='.include' am__quote='"'], 690d21ab8bcSmrg [am__include='include' am__quote=''])]) 691d21ab8bcSmrg if test "$am__include" != "#"; then 692d21ab8bcSmrg _am_result="yes ($s style)" 693d21ab8bcSmrg break 694d21ab8bcSmrg fi 695d21ab8bcSmrgdone 696d21ab8bcSmrgrm -f confinc.* confmf.* 697d21ab8bcSmrgAC_MSG_RESULT([${_am_result}]) 698d21ab8bcSmrgAC_SUBST([am__include])]) 699d21ab8bcSmrgAC_SUBST([am__quote])]) 7001f0ac6a5Smrg 701d21ab8bcSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7021f0ac6a5Smrg 703d21ab8bcSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704d21ab8bcSmrg# 705d21ab8bcSmrg# This file is free software; the Free Software Foundation 706d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 707d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 708b9867631Smrg 709d21ab8bcSmrg# AM_MISSING_PROG(NAME, PROGRAM) 710d21ab8bcSmrg# ------------------------------ 711d21ab8bcSmrgAC_DEFUN([AM_MISSING_PROG], 712d21ab8bcSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713d21ab8bcSmrg$1=${$1-"${am_missing_run}$2"} 714d21ab8bcSmrgAC_SUBST($1)]) 715b9867631Smrg 716d21ab8bcSmrg# AM_MISSING_HAS_RUN 717d21ab8bcSmrg# ------------------ 718d21ab8bcSmrg# Define MISSING if not defined so far and test if it is modern enough. 719d21ab8bcSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 720d21ab8bcSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 721d21ab8bcSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722d21ab8bcSmrgAC_REQUIRE_AUX_FILE([missing])dnl 723d21ab8bcSmrgif test x"${MISSING+set}" != xset; then 724d21ab8bcSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 725d21ab8bcSmrgfi 726d21ab8bcSmrg# Use eval to expand $SHELL 727d21ab8bcSmrgif eval "$MISSING --is-lightweight"; then 728d21ab8bcSmrg am_missing_run="$MISSING " 729d21ab8bcSmrgelse 730d21ab8bcSmrg am_missing_run= 731d21ab8bcSmrg AC_MSG_WARN(['missing' script is too old or missing]) 732d21ab8bcSmrgfi 7332fd96bc7Smrg]) 734b9867631Smrg 735d21ab8bcSmrg# Helper functions for option handling. -*- Autoconf -*- 736b9867631Smrg 737d21ab8bcSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738d21ab8bcSmrg# 739d21ab8bcSmrg# This file is free software; the Free Software Foundation 740d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 741d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 7421f0ac6a5Smrg 743d21ab8bcSmrg# _AM_MANGLE_OPTION(NAME) 744d21ab8bcSmrg# ----------------------- 745d21ab8bcSmrgAC_DEFUN([_AM_MANGLE_OPTION], 746d21ab8bcSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7471f0ac6a5Smrg 748d21ab8bcSmrg# _AM_SET_OPTION(NAME) 749d21ab8bcSmrg# -------------------- 750d21ab8bcSmrg# Set option NAME. Presently that only means defining a flag for this option. 751d21ab8bcSmrgAC_DEFUN([_AM_SET_OPTION], 752d21ab8bcSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753e5410a46Smrg 754d21ab8bcSmrg# _AM_SET_OPTIONS(OPTIONS) 755d21ab8bcSmrg# ------------------------ 756d21ab8bcSmrg# OPTIONS is a space-separated list of Automake options. 757d21ab8bcSmrgAC_DEFUN([_AM_SET_OPTIONS], 758d21ab8bcSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759e5410a46Smrg 760d21ab8bcSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761d21ab8bcSmrg# ------------------------------------------- 762d21ab8bcSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763d21ab8bcSmrgAC_DEFUN([_AM_IF_OPTION], 764d21ab8bcSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7651f0ac6a5Smrg 766d21ab8bcSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 7672fd96bc7Smrg# 768d21ab8bcSmrg# This file is free software; the Free Software Foundation 769d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 770d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 7711f0ac6a5Smrg 772d21ab8bcSmrg# _AM_PROG_CC_C_O 773d21ab8bcSmrg# --------------- 774d21ab8bcSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 775d21ab8bcSmrg# to automatically call this. 776d21ab8bcSmrgAC_DEFUN([_AM_PROG_CC_C_O], 777d21ab8bcSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778d21ab8bcSmrgAC_REQUIRE_AUX_FILE([compile])dnl 779d21ab8bcSmrgAC_LANG_PUSH([C])dnl 780d21ab8bcSmrgAC_CACHE_CHECK( 781d21ab8bcSmrg [whether $CC understands -c and -o together], 782d21ab8bcSmrg [am_cv_prog_cc_c_o], 783d21ab8bcSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 784d21ab8bcSmrg # Make sure it works both with $CC and with simple cc. 785d21ab8bcSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 786d21ab8bcSmrg # compilers refuse to overwrite an existing .o file with -o, 787d21ab8bcSmrg # though they will create one. 788d21ab8bcSmrg am_cv_prog_cc_c_o=yes 789d21ab8bcSmrg for am_i in 1 2; do 790d21ab8bcSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 791d21ab8bcSmrg && test -f conftest2.$ac_objext; then 792d21ab8bcSmrg : OK 793d21ab8bcSmrg else 794d21ab8bcSmrg am_cv_prog_cc_c_o=no 795d21ab8bcSmrg break 796d21ab8bcSmrg fi 797d21ab8bcSmrg done 798d21ab8bcSmrg rm -f core conftest* 799d21ab8bcSmrg unset am_i]) 800d21ab8bcSmrgif test "$am_cv_prog_cc_c_o" != yes; then 801d21ab8bcSmrg # Losing compiler, so override with the script. 802d21ab8bcSmrg # FIXME: It is wrong to rewrite CC. 803d21ab8bcSmrg # But if we don't then we get into trouble of one sort or another. 804d21ab8bcSmrg # A longer-term fix would be to have automake use am__CC in this case, 805d21ab8bcSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 806d21ab8bcSmrg CC="$am_aux_dir/compile $CC" 807d21ab8bcSmrgfi 808d21ab8bcSmrgAC_LANG_POP([C])]) 8091f0ac6a5Smrg 810d21ab8bcSmrg# For backward compatibility. 811d21ab8bcSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 8121f0ac6a5Smrg 813d21ab8bcSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 8146fae4e5dSmrg# 815d21ab8bcSmrg# This file is free software; the Free Software Foundation 816d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 817d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 8189c9ff80cSmrg 819d21ab8bcSmrg# AM_RUN_LOG(COMMAND) 820d21ab8bcSmrg# ------------------- 821d21ab8bcSmrg# Run COMMAND, save the exit status in ac_status, and log it. 822d21ab8bcSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 823d21ab8bcSmrgAC_DEFUN([AM_RUN_LOG], 824d21ab8bcSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 825d21ab8bcSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 826d21ab8bcSmrg ac_status=$? 827d21ab8bcSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 828d21ab8bcSmrg (exit $ac_status); }]) 8299c9ff80cSmrg 830d21ab8bcSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8311f0ac6a5Smrg 832d21ab8bcSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833d21ab8bcSmrg# 834d21ab8bcSmrg# This file is free software; the Free Software Foundation 835d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 836d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 8379c9ff80cSmrg 838d21ab8bcSmrg# AM_SANITY_CHECK 839d21ab8bcSmrg# --------------- 840d21ab8bcSmrgAC_DEFUN([AM_SANITY_CHECK], 841d21ab8bcSmrg[AC_MSG_CHECKING([whether build environment is sane]) 842d21ab8bcSmrg# Reject unsafe characters in $srcdir or the absolute working directory 843d21ab8bcSmrg# name. Accept space and tab only in the latter. 844d21ab8bcSmrgam_lf=' 845d21ab8bcSmrg' 846d21ab8bcSmrgcase `pwd` in 847d21ab8bcSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 848d21ab8bcSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 849d21ab8bcSmrgesac 850d21ab8bcSmrgcase $srcdir in 851d21ab8bcSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 852d21ab8bcSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853d21ab8bcSmrgesac 85489c04b6cSmrg 855d21ab8bcSmrg# Do 'set' in a subshell so we don't clobber the current shell's 856d21ab8bcSmrg# arguments. Must try -L first in case configure is actually a 857d21ab8bcSmrg# symlink; some systems play weird games with the mod time of symlinks 858d21ab8bcSmrg# (eg FreeBSD returns the mod time of the symlink's containing 859d21ab8bcSmrg# directory). 860d21ab8bcSmrgif ( 861d21ab8bcSmrg am_has_slept=no 862d21ab8bcSmrg for am_try in 1 2; do 863d21ab8bcSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 864d21ab8bcSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 865d21ab8bcSmrg if test "$[*]" = "X"; then 866d21ab8bcSmrg # -L didn't work. 867d21ab8bcSmrg set X `ls -t "$srcdir/configure" conftest.file` 868d21ab8bcSmrg fi 869d21ab8bcSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 870d21ab8bcSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8716fae4e5dSmrg 872d21ab8bcSmrg # If neither matched, then we have a broken ls. This can happen 873d21ab8bcSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 874d21ab8bcSmrg # broken ls alias from the environment. This has actually 875d21ab8bcSmrg # happened. Such a system could not be considered "sane". 876d21ab8bcSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 877d21ab8bcSmrg alias in your environment]) 878d21ab8bcSmrg fi 879d21ab8bcSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 880d21ab8bcSmrg break 881d21ab8bcSmrg fi 882d21ab8bcSmrg # Just in case. 883d21ab8bcSmrg sleep 1 884d21ab8bcSmrg am_has_slept=yes 885d21ab8bcSmrg done 886d21ab8bcSmrg test "$[2]" = conftest.file 887d21ab8bcSmrg ) 888d21ab8bcSmrgthen 889d21ab8bcSmrg # Ok. 890d21ab8bcSmrg : 891d21ab8bcSmrgelse 892d21ab8bcSmrg AC_MSG_ERROR([newly created file is older than distributed files! 893d21ab8bcSmrgCheck your system clock]) 894d21ab8bcSmrgfi 895d21ab8bcSmrgAC_MSG_RESULT([yes]) 896d21ab8bcSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 897d21ab8bcSmrg# generated files are strictly newer. 898d21ab8bcSmrgam_sleep_pid= 899d21ab8bcSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 900d21ab8bcSmrg ( sleep 1 ) & 901d21ab8bcSmrg am_sleep_pid=$! 902d21ab8bcSmrgfi 903d21ab8bcSmrgAC_CONFIG_COMMANDS_PRE( 904d21ab8bcSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 905d21ab8bcSmrg if test -n "$am_sleep_pid"; then 906d21ab8bcSmrg # Hide warnings about reused PIDs. 907d21ab8bcSmrg wait $am_sleep_pid 2>/dev/null 908d21ab8bcSmrg fi 909d21ab8bcSmrg AC_MSG_RESULT([done])]) 910d21ab8bcSmrgrm -f conftest.file 911d21ab8bcSmrg]) 9121f0ac6a5Smrg 913d21ab8bcSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914d21ab8bcSmrg# 915d21ab8bcSmrg# This file is free software; the Free Software Foundation 916d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 917d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 918e5410a46Smrg 919d21ab8bcSmrg# AM_SILENT_RULES([DEFAULT]) 920d21ab8bcSmrg# -------------------------- 921d21ab8bcSmrg# Enable less verbose build rules; with the default set to DEFAULT 922d21ab8bcSmrg# ("yes" being less verbose, "no" or empty being verbose). 923d21ab8bcSmrgAC_DEFUN([AM_SILENT_RULES], 924d21ab8bcSmrg[AC_ARG_ENABLE([silent-rules], [dnl 925d21ab8bcSmrgAS_HELP_STRING( 926d21ab8bcSmrg [--enable-silent-rules], 927d21ab8bcSmrg [less verbose build output (undo: "make V=1")]) 928d21ab8bcSmrgAS_HELP_STRING( 929d21ab8bcSmrg [--disable-silent-rules], 930d21ab8bcSmrg [verbose build output (undo: "make V=0")])dnl 931d21ab8bcSmrg]) 932d21ab8bcSmrgcase $enable_silent_rules in @%:@ ((( 933d21ab8bcSmrg yes) AM_DEFAULT_VERBOSITY=0;; 934d21ab8bcSmrg no) AM_DEFAULT_VERBOSITY=1;; 935d21ab8bcSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936d21ab8bcSmrgesac 937d21ab8bcSmrgdnl 938d21ab8bcSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 939d21ab8bcSmrgdnl do not support nested variable expansions. 940d21ab8bcSmrgdnl See automake bug#9928 and bug#10237. 941d21ab8bcSmrgam_make=${MAKE-make} 942d21ab8bcSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 943d21ab8bcSmrg [am_cv_make_support_nested_variables], 944d21ab8bcSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 945d21ab8bcSmrgBAR0=false 946d21ab8bcSmrgBAR1=true 947d21ab8bcSmrgV=1 948d21ab8bcSmrgam__doit: 949d21ab8bcSmrg @$(TRUE) 950d21ab8bcSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 951d21ab8bcSmrg am_cv_make_support_nested_variables=yes 952d21ab8bcSmrgelse 953d21ab8bcSmrg am_cv_make_support_nested_variables=no 954d21ab8bcSmrgfi]) 955d21ab8bcSmrgif test $am_cv_make_support_nested_variables = yes; then 956d21ab8bcSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 957d21ab8bcSmrg AM_V='$(V)' 958d21ab8bcSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 959d21ab8bcSmrgelse 960d21ab8bcSmrg AM_V=$AM_DEFAULT_VERBOSITY 961d21ab8bcSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 962d21ab8bcSmrgfi 963d21ab8bcSmrgAC_SUBST([AM_V])dnl 964d21ab8bcSmrgAM_SUBST_NOTMAKE([AM_V])dnl 965d21ab8bcSmrgAC_SUBST([AM_DEFAULT_V])dnl 966d21ab8bcSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967d21ab8bcSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968d21ab8bcSmrgAM_BACKSLASH='\' 969d21ab8bcSmrgAC_SUBST([AM_BACKSLASH])dnl 970d21ab8bcSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9716fae4e5dSmrg]) 972e5410a46Smrg 973d21ab8bcSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974d21ab8bcSmrg# 975d21ab8bcSmrg# This file is free software; the Free Software Foundation 976d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 977d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 9789c9ff80cSmrg 979d21ab8bcSmrg# AM_PROG_INSTALL_STRIP 980d21ab8bcSmrg# --------------------- 981d21ab8bcSmrg# One issue with vendor 'install' (even GNU) is that you can't 982d21ab8bcSmrg# specify the program used to strip binaries. This is especially 983d21ab8bcSmrg# annoying in cross-compiling environments, where the build's strip 984d21ab8bcSmrg# is unlikely to handle the host's binaries. 985d21ab8bcSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 986d21ab8bcSmrg# always use install-sh in "make install-strip", and initialize 987d21ab8bcSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 988d21ab8bcSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 989d21ab8bcSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 990d21ab8bcSmrg# Installed binaries are usually stripped using 'strip' when the user 991d21ab8bcSmrg# run "make install-strip". However 'strip' might not be the right 992d21ab8bcSmrg# tool to use in cross-compilation environments, therefore Automake 993d21ab8bcSmrg# will honor the 'STRIP' environment variable to overrule this program. 994d21ab8bcSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995d21ab8bcSmrgif test "$cross_compiling" != no; then 996d21ab8bcSmrg AC_CHECK_TOOL([STRIP], [strip], :) 997d21ab8bcSmrgfi 998d21ab8bcSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999d21ab8bcSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10001f0ac6a5Smrg 1001d21ab8bcSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002d21ab8bcSmrg# 1003d21ab8bcSmrg# This file is free software; the Free Software Foundation 1004d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 1005d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 10061f0ac6a5Smrg 1007d21ab8bcSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1008d21ab8bcSmrg# --------------------------- 1009d21ab8bcSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010d21ab8bcSmrg# This macro is traced by Automake. 1011d21ab8bcSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10121f0ac6a5Smrg 1013d21ab8bcSmrg# AM_SUBST_NOTMAKE(VARIABLE) 1014d21ab8bcSmrg# -------------------------- 1015d21ab8bcSmrg# Public sister of _AM_SUBST_NOTMAKE. 1016d21ab8bcSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10171f0ac6a5Smrg 1018d21ab8bcSmrg# Check how to create a tarball. -*- Autoconf -*- 10191f0ac6a5Smrg 1020d21ab8bcSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021d21ab8bcSmrg# 1022d21ab8bcSmrg# This file is free software; the Free Software Foundation 1023d21ab8bcSmrg# gives unlimited permission to copy and/or distribute it, 1024d21ab8bcSmrg# with or without modifications, as long as this notice is preserved. 10251f0ac6a5Smrg 1026d21ab8bcSmrg# _AM_PROG_TAR(FORMAT) 1027d21ab8bcSmrg# -------------------- 1028d21ab8bcSmrg# Check how to create a tarball in format FORMAT. 1029d21ab8bcSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030d21ab8bcSmrg# 1031d21ab8bcSmrg# Substitute a variable $(am__tar) that is a command 1032d21ab8bcSmrg# writing to stdout a FORMAT-tarball containing the directory 1033d21ab8bcSmrg# $tardir. 1034d21ab8bcSmrg# tardir=directory && $(am__tar) > result.tar 1035d21ab8bcSmrg# 1036d21ab8bcSmrg# Substitute a variable $(am__untar) that extract such 1037d21ab8bcSmrg# a tarball read from stdin. 1038d21ab8bcSmrg# $(am__untar) < result.tar 1039d21ab8bcSmrg# 1040d21ab8bcSmrgAC_DEFUN([_AM_PROG_TAR], 1041d21ab8bcSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1042d21ab8bcSmrg# in the wild :-( We should find a proper way to deprecate it ... 1043d21ab8bcSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1044e5410a46Smrg 1045d21ab8bcSmrg# We'll loop over all known methods to create a tar archive until one works. 1046d21ab8bcSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10479c9ff80cSmrg 1048d21ab8bcSmrgm4_if([$1], [v7], 1049d21ab8bcSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10506fae4e5dSmrg 1051d21ab8bcSmrg [m4_case([$1], 1052d21ab8bcSmrg [ustar], 1053d21ab8bcSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1054d21ab8bcSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1055d21ab8bcSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1056d21ab8bcSmrg # and bug#13588). 1057d21ab8bcSmrg am_max_uid=2097151 # 2^21 - 1 1058d21ab8bcSmrg am_max_gid=$am_max_uid 1059d21ab8bcSmrg # The $UID and $GID variables are not portable, so we need to resort 1060d21ab8bcSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1061d21ab8bcSmrg # below are definitely unexpected, so allow the users to see them 1062d21ab8bcSmrg # (that is, avoid stderr redirection). 1063d21ab8bcSmrg am_uid=`id -u || echo unknown` 1064d21ab8bcSmrg am_gid=`id -g || echo unknown` 1065d21ab8bcSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1066d21ab8bcSmrg if test $am_uid -le $am_max_uid; then 1067d21ab8bcSmrg AC_MSG_RESULT([yes]) 1068d21ab8bcSmrg else 1069d21ab8bcSmrg AC_MSG_RESULT([no]) 1070d21ab8bcSmrg _am_tools=none 1071d21ab8bcSmrg fi 1072d21ab8bcSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1073d21ab8bcSmrg if test $am_gid -le $am_max_gid; then 1074d21ab8bcSmrg AC_MSG_RESULT([yes]) 1075d21ab8bcSmrg else 1076d21ab8bcSmrg AC_MSG_RESULT([no]) 1077d21ab8bcSmrg _am_tools=none 1078d21ab8bcSmrg fi], 10799c9ff80cSmrg 1080d21ab8bcSmrg [pax], 1081d21ab8bcSmrg [], 10829c9ff80cSmrg 1083d21ab8bcSmrg [m4_fatal([Unknown tar format])]) 10849c9ff80cSmrg 1085d21ab8bcSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10869c9ff80cSmrg 1087d21ab8bcSmrg # Go ahead even if we have the value already cached. We do so because we 1088d21ab8bcSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1089d21ab8bcSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10909c9ff80cSmrg 1091d21ab8bcSmrg for _am_tool in $_am_tools; do 1092d21ab8bcSmrg case $_am_tool in 1093d21ab8bcSmrg gnutar) 1094d21ab8bcSmrg for _am_tar in tar gnutar gtar; do 1095d21ab8bcSmrg AM_RUN_LOG([$_am_tar --version]) && break 1096d21ab8bcSmrg done 1097d21ab8bcSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1098d21ab8bcSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1099d21ab8bcSmrg am__untar="$_am_tar -xf -" 1100d21ab8bcSmrg ;; 1101d21ab8bcSmrg plaintar) 1102d21ab8bcSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 1103d21ab8bcSmrg # ustar tarball either. 1104d21ab8bcSmrg (tar --version) >/dev/null 2>&1 && continue 1105d21ab8bcSmrg am__tar='tar chf - "$$tardir"' 1106d21ab8bcSmrg am__tar_='tar chf - "$tardir"' 1107d21ab8bcSmrg am__untar='tar xf -' 1108d21ab8bcSmrg ;; 1109d21ab8bcSmrg pax) 1110d21ab8bcSmrg am__tar='pax -L -x $1 -w "$$tardir"' 1111d21ab8bcSmrg am__tar_='pax -L -x $1 -w "$tardir"' 1112d21ab8bcSmrg am__untar='pax -r' 1113d21ab8bcSmrg ;; 1114d21ab8bcSmrg cpio) 1115d21ab8bcSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1116d21ab8bcSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1117d21ab8bcSmrg am__untar='cpio -i -H $1 -d' 1118d21ab8bcSmrg ;; 1119d21ab8bcSmrg none) 1120d21ab8bcSmrg am__tar=false 1121d21ab8bcSmrg am__tar_=false 1122d21ab8bcSmrg am__untar=false 1123d21ab8bcSmrg ;; 1124d21ab8bcSmrg esac 11259c9ff80cSmrg 1126d21ab8bcSmrg # If the value was cached, stop now. We just wanted to have am__tar 1127d21ab8bcSmrg # and am__untar set. 1128d21ab8bcSmrg test -n "${am_cv_prog_tar_$1}" && break 11299c9ff80cSmrg 1130d21ab8bcSmrg # tar/untar a dummy directory, and stop if the command works. 1131d21ab8bcSmrg rm -rf conftest.dir 1132d21ab8bcSmrg mkdir conftest.dir 1133d21ab8bcSmrg echo GrepMe > conftest.dir/file 1134d21ab8bcSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1135d21ab8bcSmrg rm -rf conftest.dir 1136d21ab8bcSmrg if test -s conftest.tar; then 1137d21ab8bcSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1138d21ab8bcSmrg AM_RUN_LOG([cat conftest.dir/file]) 1139d21ab8bcSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1140d21ab8bcSmrg fi 1141d21ab8bcSmrg done 1142d21ab8bcSmrg rm -rf conftest.dir 11439c9ff80cSmrg 1144d21ab8bcSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1145d21ab8bcSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11469c9ff80cSmrg 1147d21ab8bcSmrgAC_SUBST([am__tar]) 1148d21ab8bcSmrgAC_SUBST([am__untar]) 1149d21ab8bcSmrg]) # _AM_PROG_TAR 11509c9ff80cSmrg 1151d21ab8bcSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1152d21ab8bcSmrgdnl serial 11 (pkg-config-0.29) 1153d21ab8bcSmrgdnl 1154d21ab8bcSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1155d21ab8bcSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1156d21ab8bcSmrgdnl 1157d21ab8bcSmrgdnl This program is free software; you can redistribute it and/or modify 1158d21ab8bcSmrgdnl it under the terms of the GNU General Public License as published by 1159d21ab8bcSmrgdnl the Free Software Foundation; either version 2 of the License, or 1160d21ab8bcSmrgdnl (at your option) any later version. 1161d21ab8bcSmrgdnl 1162d21ab8bcSmrgdnl This program is distributed in the hope that it will be useful, but 1163d21ab8bcSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 1164d21ab8bcSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1165d21ab8bcSmrgdnl General Public License for more details. 1166d21ab8bcSmrgdnl 1167d21ab8bcSmrgdnl You should have received a copy of the GNU General Public License 1168d21ab8bcSmrgdnl along with this program; if not, write to the Free Software 1169d21ab8bcSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1170d21ab8bcSmrgdnl 02111-1307, USA. 1171d21ab8bcSmrgdnl 1172d21ab8bcSmrgdnl As a special exception to the GNU General Public License, if you 1173d21ab8bcSmrgdnl distribute this file as part of a program that contains a 1174d21ab8bcSmrgdnl configuration script generated by Autoconf, you may include it under 1175d21ab8bcSmrgdnl the same distribution terms that you use for the rest of that 1176d21ab8bcSmrgdnl program. 1177d21ab8bcSmrg 1178d21ab8bcSmrgdnl PKG_PREREQ(MIN-VERSION) 1179d21ab8bcSmrgdnl ----------------------- 1180d21ab8bcSmrgdnl Since: 0.29 1181d21ab8bcSmrgdnl 1182d21ab8bcSmrgdnl Verify that the version of the pkg-config macros are at least 1183d21ab8bcSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1184d21ab8bcSmrgdnl installed version of pkg-config, this checks the developer's version 1185d21ab8bcSmrgdnl of pkg.m4 when generating configure. 1186d21ab8bcSmrgdnl 1187d21ab8bcSmrgdnl To ensure that this macro is defined, also add: 1188d21ab8bcSmrgdnl m4_ifndef([PKG_PREREQ], 1189d21ab8bcSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1190d21ab8bcSmrgdnl 1191d21ab8bcSmrgdnl See the "Since" comment for each macro you use to see what version 1192d21ab8bcSmrgdnl of the macros you require. 1193d21ab8bcSmrgm4_defun([PKG_PREREQ], 1194d21ab8bcSmrg[m4_define([PKG_MACROS_VERSION], [0.29]) 1195d21ab8bcSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1196d21ab8bcSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1197d21ab8bcSmrg])dnl PKG_PREREQ 1198d21ab8bcSmrg 1199d21ab8bcSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1200d21ab8bcSmrgdnl ---------------------------------- 1201d21ab8bcSmrgdnl Since: 0.16 1202d21ab8bcSmrgdnl 1203d21ab8bcSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1204d21ab8bcSmrgdnl first found in the path. Checks that the version of pkg-config found 1205d21ab8bcSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1206d21ab8bcSmrgdnl used since that's the first version where most current features of 1207d21ab8bcSmrgdnl pkg-config existed. 1208d21ab8bcSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1209d21ab8bcSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1210d21ab8bcSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1211d21ab8bcSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1212d21ab8bcSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1213d21ab8bcSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1214d21ab8bcSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 12159c9ff80cSmrg 1216d21ab8bcSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1217d21ab8bcSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 12182fd96bc7Smrgfi 1219d21ab8bcSmrgif test -n "$PKG_CONFIG"; then 1220d21ab8bcSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 1221d21ab8bcSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1222d21ab8bcSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1223d21ab8bcSmrg AC_MSG_RESULT([yes]) 1224d21ab8bcSmrg else 1225d21ab8bcSmrg AC_MSG_RESULT([no]) 1226d21ab8bcSmrg PKG_CONFIG="" 1227d21ab8bcSmrg fi 1228d21ab8bcSmrgfi[]dnl 1229d21ab8bcSmrg])dnl PKG_PROG_PKG_CONFIG 12309c9ff80cSmrg 1231d21ab8bcSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1232d21ab8bcSmrgdnl ------------------------------------------------------------------- 1233d21ab8bcSmrgdnl Since: 0.18 1234d21ab8bcSmrgdnl 1235d21ab8bcSmrgdnl Check to see whether a particular set of modules exists. Similar to 1236d21ab8bcSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1237d21ab8bcSmrgdnl 1238d21ab8bcSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1239d21ab8bcSmrgdnl only at the first occurence in configure.ac, so if the first place 1240d21ab8bcSmrgdnl it's called might be skipped (such as if it is within an "if", you 1241d21ab8bcSmrgdnl have to call PKG_CHECK_EXISTS manually 1242d21ab8bcSmrgAC_DEFUN([PKG_CHECK_EXISTS], 1243d21ab8bcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1244d21ab8bcSmrgif test -n "$PKG_CONFIG" && \ 1245d21ab8bcSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1246d21ab8bcSmrg m4_default([$2], [:]) 1247d21ab8bcSmrgm4_ifvaln([$3], [else 1248d21ab8bcSmrg $3])dnl 1249d21ab8bcSmrgfi]) 12509c9ff80cSmrg 1251d21ab8bcSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1252d21ab8bcSmrgdnl --------------------------------------------- 1253d21ab8bcSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1254d21ab8bcSmrgdnl pkg_failed based on the result. 1255d21ab8bcSmrgm4_define([_PKG_CONFIG], 1256d21ab8bcSmrg[if test -n "$$1"; then 1257d21ab8bcSmrg pkg_cv_[]$1="$$1" 1258d21ab8bcSmrg elif test -n "$PKG_CONFIG"; then 1259d21ab8bcSmrg PKG_CHECK_EXISTS([$3], 1260d21ab8bcSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1261d21ab8bcSmrg test "x$?" != "x0" && pkg_failed=yes ], 1262d21ab8bcSmrg [pkg_failed=yes]) 1263d21ab8bcSmrg else 1264d21ab8bcSmrg pkg_failed=untried 1265d21ab8bcSmrgfi[]dnl 1266d21ab8bcSmrg])dnl _PKG_CONFIG 12679c9ff80cSmrg 1268d21ab8bcSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 1269d21ab8bcSmrgdnl --------------------------- 1270d21ab8bcSmrgdnl Internal check to see if pkg-config supports short errors. 1271d21ab8bcSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1272d21ab8bcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1273d21ab8bcSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1274d21ab8bcSmrg _pkg_short_errors_supported=yes 1275d21ab8bcSmrgelse 1276d21ab8bcSmrg _pkg_short_errors_supported=no 1277d21ab8bcSmrgfi[]dnl 1278d21ab8bcSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1279e5410a46Smrg 12801f0ac6a5Smrg 1281d21ab8bcSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1282d21ab8bcSmrgdnl [ACTION-IF-NOT-FOUND]) 1283d21ab8bcSmrgdnl -------------------------------------------------------------- 1284d21ab8bcSmrgdnl Since: 0.4.0 1285d21ab8bcSmrgdnl 1286d21ab8bcSmrgdnl Note that if there is a possibility the first call to 1287d21ab8bcSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1288d21ab8bcSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1289d21ab8bcSmrgAC_DEFUN([PKG_CHECK_MODULES], 1290d21ab8bcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1291d21ab8bcSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1292d21ab8bcSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 12931f0ac6a5Smrg 1294d21ab8bcSmrgpkg_failed=no 1295d21ab8bcSmrgAC_MSG_CHECKING([for $1]) 12961f0ac6a5Smrg 1297d21ab8bcSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1298d21ab8bcSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 12991f0ac6a5Smrg 1300d21ab8bcSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1301d21ab8bcSmrgand $1[]_LIBS to avoid the need to call pkg-config. 1302d21ab8bcSmrgSee the pkg-config man page for more details.]) 13039c9ff80cSmrg 1304d21ab8bcSmrgif test $pkg_failed = yes; then 1305d21ab8bcSmrg AC_MSG_RESULT([no]) 1306d21ab8bcSmrg _PKG_SHORT_ERRORS_SUPPORTED 1307d21ab8bcSmrg if test $_pkg_short_errors_supported = yes; then 1308d21ab8bcSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1309d21ab8bcSmrg else 1310d21ab8bcSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1311d21ab8bcSmrg fi 1312d21ab8bcSmrg # Put the nasty error message in config.log where it belongs 1313d21ab8bcSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 13149c9ff80cSmrg 1315d21ab8bcSmrg m4_default([$4], [AC_MSG_ERROR( 1316d21ab8bcSmrg[Package requirements ($2) were not met: 13179c9ff80cSmrg 1318d21ab8bcSmrg$$1_PKG_ERRORS 13191f0ac6a5Smrg 1320d21ab8bcSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1321d21ab8bcSmrginstalled software in a non-standard prefix. 13221f0ac6a5Smrg 1323d21ab8bcSmrg_PKG_TEXT])[]dnl 1324d21ab8bcSmrg ]) 1325d21ab8bcSmrgelif test $pkg_failed = untried; then 1326d21ab8bcSmrg AC_MSG_RESULT([no]) 1327d21ab8bcSmrg m4_default([$4], [AC_MSG_FAILURE( 1328d21ab8bcSmrg[The pkg-config script could not be found or is too old. Make sure it 1329d21ab8bcSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 1330d21ab8bcSmrgpath to pkg-config. 13311f0ac6a5Smrg 1332d21ab8bcSmrg_PKG_TEXT 13331f0ac6a5Smrg 1334d21ab8bcSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1335d21ab8bcSmrg ]) 1336d21ab8bcSmrgelse 1337d21ab8bcSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1338d21ab8bcSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1339d21ab8bcSmrg AC_MSG_RESULT([yes]) 1340d21ab8bcSmrg $3 1341d21ab8bcSmrgfi[]dnl 1342d21ab8bcSmrg])dnl PKG_CHECK_MODULES 13439c9ff80cSmrg 13449c9ff80cSmrg 1345d21ab8bcSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1346d21ab8bcSmrgdnl [ACTION-IF-NOT-FOUND]) 1347d21ab8bcSmrgdnl --------------------------------------------------------------------- 1348d21ab8bcSmrgdnl Since: 0.29 1349d21ab8bcSmrgdnl 1350d21ab8bcSmrgdnl Checks for existence of MODULES and gathers its build flags with 1351d21ab8bcSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1352d21ab8bcSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 1353d21ab8bcSmrgdnl 1354d21ab8bcSmrgdnl Note that if there is a possibility the first call to 1355d21ab8bcSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1356d21ab8bcSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1357d21ab8bcSmrgdnl configure.ac. 1358d21ab8bcSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 1359d21ab8bcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1360d21ab8bcSmrg_save_PKG_CONFIG=$PKG_CONFIG 1361d21ab8bcSmrgPKG_CONFIG="$PKG_CONFIG --static" 1362d21ab8bcSmrgPKG_CHECK_MODULES($@) 1363d21ab8bcSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 1364d21ab8bcSmrg])dnl PKG_CHECK_MODULES_STATIC 1365e5410a46Smrg 1366e5410a46Smrg 1367d21ab8bcSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 1368d21ab8bcSmrgdnl ------------------------- 1369d21ab8bcSmrgdnl Since: 0.27 1370d21ab8bcSmrgdnl 1371d21ab8bcSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 1372d21ab8bcSmrgdnl should install pkg-config .pc files. By default the directory is 1373d21ab8bcSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 1374d21ab8bcSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 1375d21ab8bcSmrgdnl parameter. 1376d21ab8bcSmrgAC_DEFUN([PKG_INSTALLDIR], 1377d21ab8bcSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1378d21ab8bcSmrgm4_pushdef([pkg_description], 1379d21ab8bcSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 1380d21ab8bcSmrgAC_ARG_WITH([pkgconfigdir], 1381d21ab8bcSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1382d21ab8bcSmrg [with_pkgconfigdir=]pkg_default) 1383d21ab8bcSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1384d21ab8bcSmrgm4_popdef([pkg_default]) 1385d21ab8bcSmrgm4_popdef([pkg_description]) 1386d21ab8bcSmrg])dnl PKG_INSTALLDIR 1387d21ab8bcSmrg 1388d21ab8bcSmrg 1389d21ab8bcSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1390d21ab8bcSmrgdnl -------------------------------- 1391d21ab8bcSmrgdnl Since: 0.27 1392d21ab8bcSmrgdnl 1393d21ab8bcSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 1394d21ab8bcSmrgdnl module should install arch-independent pkg-config .pc files. By 1395d21ab8bcSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 1396d21ab8bcSmrgdnl changed by passing DIRECTORY. The user can override through the 1397d21ab8bcSmrgdnl --with-noarch-pkgconfigdir parameter. 1398d21ab8bcSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 1399d21ab8bcSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1400d21ab8bcSmrgm4_pushdef([pkg_description], 1401d21ab8bcSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1402d21ab8bcSmrgAC_ARG_WITH([noarch-pkgconfigdir], 1403d21ab8bcSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1404d21ab8bcSmrg [with_noarch_pkgconfigdir=]pkg_default) 1405d21ab8bcSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1406d21ab8bcSmrgm4_popdef([pkg_default]) 1407d21ab8bcSmrgm4_popdef([pkg_description]) 1408d21ab8bcSmrg])dnl PKG_NOARCH_INSTALLDIR 1409d21ab8bcSmrg 1410d21ab8bcSmrg 1411d21ab8bcSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1412d21ab8bcSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1413d21ab8bcSmrgdnl ------------------------------------------- 1414d21ab8bcSmrgdnl Since: 0.28 1415d21ab8bcSmrgdnl 1416d21ab8bcSmrgdnl Retrieves the value of the pkg-config variable for the given module. 1417d21ab8bcSmrgAC_DEFUN([PKG_CHECK_VAR], 1418d21ab8bcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1419d21ab8bcSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 14201f0ac6a5Smrg 1421d21ab8bcSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1422d21ab8bcSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 1423e5410a46Smrg 1424d21ab8bcSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 1425d21ab8bcSmrg])dnl PKG_CHECK_VAR 14261f0ac6a5Smrg 1427d21ab8bcSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1428d21ab8bcSmrgdnl 1429d21ab8bcSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 1430d21ab8bcSmrgdnl 1431d21ab8bcSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1432d21ab8bcSmrgdnl copy of this software and associated documentation files (the "Software"), 1433d21ab8bcSmrgdnl to deal in the Software without restriction, including without limitation 1434d21ab8bcSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1435d21ab8bcSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 1436d21ab8bcSmrgdnl Software is furnished to do so, subject to the following conditions: 1437d21ab8bcSmrgdnl 1438d21ab8bcSmrgdnl The above copyright notice and this permission notice (including the next 1439d21ab8bcSmrgdnl paragraph) shall be included in all copies or substantial portions of the 1440d21ab8bcSmrgdnl Software. 1441d21ab8bcSmrgdnl 1442d21ab8bcSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1443d21ab8bcSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1444d21ab8bcSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1445d21ab8bcSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1446d21ab8bcSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1447d21ab8bcSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1448d21ab8bcSmrgdnl DEALINGS IN THE SOFTWARE. 14491f0ac6a5Smrg 1450d21ab8bcSmrg# XORG_MACROS_VERSION(required-version) 1451d21ab8bcSmrg# ------------------------------------- 1452d21ab8bcSmrg# Minimum version: 1.1.0 1453d21ab8bcSmrg# 1454d21ab8bcSmrg# If you're using a macro added in Version 1.1 or newer, include this in 1455d21ab8bcSmrg# your configure.ac with the minimum required version, such as: 1456d21ab8bcSmrg# XORG_MACROS_VERSION(1.1) 1457d21ab8bcSmrg# 1458d21ab8bcSmrg# To ensure that this macro is defined, also add: 1459d21ab8bcSmrg# m4_ifndef([XORG_MACROS_VERSION], 1460d21ab8bcSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1461d21ab8bcSmrg# 1462d21ab8bcSmrg# 1463d21ab8bcSmrg# See the "minimum version" comment for each macro you use to see what 1464d21ab8bcSmrg# version you require. 1465d21ab8bcSmrgm4_defun([XORG_MACROS_VERSION],[ 1466d21ab8bcSmrgm4_define([vers_have], [1.19.3]) 1467d21ab8bcSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1468d21ab8bcSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1469d21ab8bcSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1470d21ab8bcSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1471d21ab8bcSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1472d21ab8bcSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1473d21ab8bcSmrgm4_undefine([vers_have]) 1474d21ab8bcSmrgm4_undefine([maj_have]) 1475d21ab8bcSmrgm4_undefine([maj_needed]) 1476d21ab8bcSmrg]) # XORG_MACROS_VERSION 14771f0ac6a5Smrg 1478d21ab8bcSmrg# XORG_PROG_RAWCPP() 1479d21ab8bcSmrg# ------------------ 1480d21ab8bcSmrg# Minimum version: 1.0.0 1481d21ab8bcSmrg# 1482d21ab8bcSmrg# Find cpp program and necessary flags for use in pre-processing text files 1483d21ab8bcSmrg# such as man pages and config files 1484d21ab8bcSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1485d21ab8bcSmrgAC_REQUIRE([AC_PROG_CPP]) 1486d21ab8bcSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1487d21ab8bcSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 14881f0ac6a5Smrg 1489d21ab8bcSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1490d21ab8bcSmrg# which is not the best choice for supporting other OS'es, but covers most 1491d21ab8bcSmrg# of the ones we need for now. 1492d21ab8bcSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1493d21ab8bcSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1494d21ab8bcSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1495d21ab8bcSmrg AC_MSG_RESULT([no]) 1496d21ab8bcSmrgelse 1497d21ab8bcSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1498d21ab8bcSmrg RAWCPPFLAGS=-undef 1499d21ab8bcSmrg AC_MSG_RESULT([yes]) 1500d21ab8bcSmrg # under Cygwin unix is still defined even with -undef 1501d21ab8bcSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1502d21ab8bcSmrg RAWCPPFLAGS="-undef -ansi" 1503d21ab8bcSmrg AC_MSG_RESULT([yes, with -ansi]) 1504d21ab8bcSmrg else 1505d21ab8bcSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1506d21ab8bcSmrg fi 1507d21ab8bcSmrgfi 1508d21ab8bcSmrgrm -f conftest.$ac_ext 15091f0ac6a5Smrg 1510d21ab8bcSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1511d21ab8bcSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1512d21ab8bcSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1513d21ab8bcSmrg AC_MSG_RESULT([no]) 1514d21ab8bcSmrgelse 1515d21ab8bcSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1516d21ab8bcSmrg TRADITIONALCPPFLAGS="-traditional" 1517d21ab8bcSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1518d21ab8bcSmrg AC_MSG_RESULT([yes]) 1519d21ab8bcSmrg else 1520d21ab8bcSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1521d21ab8bcSmrg fi 1522d21ab8bcSmrgfi 1523d21ab8bcSmrgrm -f conftest.$ac_ext 1524d21ab8bcSmrgAC_SUBST(RAWCPPFLAGS) 1525d21ab8bcSmrgAC_SUBST(TRADITIONALCPPFLAGS) 1526d21ab8bcSmrg]) # XORG_PROG_RAWCPP 15271f0ac6a5Smrg 1528d21ab8bcSmrg# XORG_MANPAGE_SECTIONS() 1529d21ab8bcSmrg# ----------------------- 1530d21ab8bcSmrg# Minimum version: 1.0.0 1531d21ab8bcSmrg# 1532d21ab8bcSmrg# Determine which sections man pages go in for the different man page types 1533d21ab8bcSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1534d21ab8bcSmrg# Not sure if there's any better way than just hardcoding by OS name. 1535d21ab8bcSmrg# Override default settings by setting environment variables 1536d21ab8bcSmrg# Added MAN_SUBSTS in version 1.8 1537d21ab8bcSmrg# Added AC_PROG_SED in version 1.8 15381f0ac6a5Smrg 1539d21ab8bcSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1540d21ab8bcSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1541d21ab8bcSmrgAC_REQUIRE([AC_PROG_SED]) 15421f0ac6a5Smrg 1543d21ab8bcSmrgcase $host_os in 1544d21ab8bcSmrg solaris*) 1545d21ab8bcSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1546d21ab8bcSmrg # check for a man page file found in later versions that use 1547d21ab8bcSmrg # traditional section numbers instead 1548d21ab8bcSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1549d21ab8bcSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1550d21ab8bcSmrg ;; 1551d21ab8bcSmrg *) SYSV_MAN_SECTIONS=false ;; 1552d21ab8bcSmrgesac 15531f0ac6a5Smrg 1554d21ab8bcSmrgif test x$APP_MAN_SUFFIX = x ; then 1555d21ab8bcSmrg APP_MAN_SUFFIX=1 1556d21ab8bcSmrgfi 1557d21ab8bcSmrgif test x$APP_MAN_DIR = x ; then 1558d21ab8bcSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1559d21ab8bcSmrgfi 15601f0ac6a5Smrg 1561d21ab8bcSmrgif test x$LIB_MAN_SUFFIX = x ; then 1562d21ab8bcSmrg LIB_MAN_SUFFIX=3 1563d21ab8bcSmrgfi 1564d21ab8bcSmrgif test x$LIB_MAN_DIR = x ; then 1565d21ab8bcSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1566d21ab8bcSmrgfi 15671f0ac6a5Smrg 1568d21ab8bcSmrgif test x$FILE_MAN_SUFFIX = x ; then 1569d21ab8bcSmrg case $SYSV_MAN_SECTIONS in 1570d21ab8bcSmrg true) FILE_MAN_SUFFIX=4 ;; 1571d21ab8bcSmrg *) FILE_MAN_SUFFIX=5 ;; 1572d21ab8bcSmrg esac 1573d21ab8bcSmrgfi 1574d21ab8bcSmrgif test x$FILE_MAN_DIR = x ; then 1575d21ab8bcSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1576d21ab8bcSmrgfi 15779c9ff80cSmrg 1578d21ab8bcSmrgif test x$MISC_MAN_SUFFIX = x ; then 1579d21ab8bcSmrg case $SYSV_MAN_SECTIONS in 1580d21ab8bcSmrg true) MISC_MAN_SUFFIX=5 ;; 1581d21ab8bcSmrg *) MISC_MAN_SUFFIX=7 ;; 1582d21ab8bcSmrg esac 1583d21ab8bcSmrgfi 1584d21ab8bcSmrgif test x$MISC_MAN_DIR = x ; then 1585d21ab8bcSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1586d21ab8bcSmrgfi 15879c9ff80cSmrg 1588d21ab8bcSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1589d21ab8bcSmrg case $SYSV_MAN_SECTIONS in 1590d21ab8bcSmrg true) DRIVER_MAN_SUFFIX=7 ;; 1591d21ab8bcSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1592d21ab8bcSmrg esac 1593d21ab8bcSmrgfi 1594d21ab8bcSmrgif test x$DRIVER_MAN_DIR = x ; then 1595d21ab8bcSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1596d21ab8bcSmrgfi 15979c9ff80cSmrg 1598d21ab8bcSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1599d21ab8bcSmrg case $SYSV_MAN_SECTIONS in 1600d21ab8bcSmrg true) ADMIN_MAN_SUFFIX=1m ;; 1601d21ab8bcSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1602d21ab8bcSmrg esac 1603d21ab8bcSmrgfi 1604d21ab8bcSmrgif test x$ADMIN_MAN_DIR = x ; then 1605d21ab8bcSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1606d21ab8bcSmrgfi 16079c9ff80cSmrg 16089c9ff80cSmrg 1609d21ab8bcSmrgAC_SUBST([APP_MAN_SUFFIX]) 1610d21ab8bcSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1611d21ab8bcSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1612d21ab8bcSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1613d21ab8bcSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1614d21ab8bcSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1615d21ab8bcSmrgAC_SUBST([APP_MAN_DIR]) 1616d21ab8bcSmrgAC_SUBST([LIB_MAN_DIR]) 1617d21ab8bcSmrgAC_SUBST([FILE_MAN_DIR]) 1618d21ab8bcSmrgAC_SUBST([MISC_MAN_DIR]) 1619d21ab8bcSmrgAC_SUBST([DRIVER_MAN_DIR]) 1620d21ab8bcSmrgAC_SUBST([ADMIN_MAN_DIR]) 16219c9ff80cSmrg 1622d21ab8bcSmrgXORG_MAN_PAGE="X Version 11" 1623d21ab8bcSmrgAC_SUBST([XORG_MAN_PAGE]) 1624d21ab8bcSmrgMAN_SUBSTS="\ 1625d21ab8bcSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1626d21ab8bcSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1627d21ab8bcSmrg -e 's|__xservername__|Xorg|g' \ 1628d21ab8bcSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 1629d21ab8bcSmrg -e 's|__projectroot__|\$(prefix)|g' \ 1630d21ab8bcSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1631d21ab8bcSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1632d21ab8bcSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1633d21ab8bcSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1634d21ab8bcSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1635d21ab8bcSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1636d21ab8bcSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1637d21ab8bcSmrgAC_SUBST([MAN_SUBSTS]) 16389c9ff80cSmrg 1639d21ab8bcSmrg]) # XORG_MANPAGE_SECTIONS 16409c9ff80cSmrg 1641d21ab8bcSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1642d21ab8bcSmrg# ------------------------ 1643d21ab8bcSmrg# Minimum version: 1.7.0 1644d21ab8bcSmrg# 1645d21ab8bcSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1646d21ab8bcSmrg# provided by xorg-sgml-doctools, if installed. 1647d21ab8bcSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1648d21ab8bcSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1649d21ab8bcSmrgXORG_SGML_PATH= 1650d21ab8bcSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1651d21ab8bcSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1652d21ab8bcSmrg [m4_ifval([$1],[:], 1653d21ab8bcSmrg [if test x"$cross_compiling" != x"yes" ; then 1654d21ab8bcSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1655d21ab8bcSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 1656d21ab8bcSmrg fi]) 1657d21ab8bcSmrg ]) 1658d21ab8bcSmrg 1659d21ab8bcSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1660d21ab8bcSmrg# the path and the name of the doc stylesheet 1661d21ab8bcSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1662d21ab8bcSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1663d21ab8bcSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1664d21ab8bcSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 16652fd96bc7Smrgelse 1666d21ab8bcSmrg AC_MSG_RESULT([no]) 16672fd96bc7Smrgfi 16689c9ff80cSmrg 1669d21ab8bcSmrgAC_SUBST(XORG_SGML_PATH) 1670d21ab8bcSmrgAC_SUBST(STYLESHEET_SRCDIR) 1671d21ab8bcSmrgAC_SUBST(XSL_STYLESHEET) 1672d21ab8bcSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1673d21ab8bcSmrg]) # XORG_CHECK_SGML_DOCTOOLS 16749c9ff80cSmrg 1675d21ab8bcSmrg# XORG_CHECK_LINUXDOC 16766fae4e5dSmrg# ------------------- 1677d21ab8bcSmrg# Minimum version: 1.0.0 1678d21ab8bcSmrg# 1679d21ab8bcSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1680d21ab8bcSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1681d21ab8bcSmrg# Whether or not the necessary tools and files are found can be checked 1682d21ab8bcSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1683d21ab8bcSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1684d21ab8bcSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1685d21ab8bcSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 16869c9ff80cSmrg 1687d21ab8bcSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 16889c9ff80cSmrg 1689d21ab8bcSmrgAC_MSG_CHECKING([whether to build documentation]) 16909c9ff80cSmrg 1691d21ab8bcSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1692d21ab8bcSmrg BUILDDOC=yes 16932fd96bc7Smrgelse 1694d21ab8bcSmrg BUILDDOC=no 16952fd96bc7Smrgfi 16969c9ff80cSmrg 1697d21ab8bcSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 16989c9ff80cSmrg 1699d21ab8bcSmrgAC_MSG_RESULT([$BUILDDOC]) 17001f0ac6a5Smrg 1701d21ab8bcSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 17021f0ac6a5Smrg 1703d21ab8bcSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1704d21ab8bcSmrg BUILDPDFDOC=yes 1705d21ab8bcSmrgelse 1706d21ab8bcSmrg BUILDPDFDOC=no 1707d21ab8bcSmrgfi 17081f0ac6a5Smrg 1709d21ab8bcSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17101f0ac6a5Smrg 1711d21ab8bcSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 17121f0ac6a5Smrg 1713d21ab8bcSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1714d21ab8bcSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1715d21ab8bcSmrgMAKE_PDF="$PS2PDF" 1716d21ab8bcSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 17171f0ac6a5Smrg 1718d21ab8bcSmrgAC_SUBST(MAKE_TEXT) 1719d21ab8bcSmrgAC_SUBST(MAKE_PS) 1720d21ab8bcSmrgAC_SUBST(MAKE_PDF) 1721d21ab8bcSmrgAC_SUBST(MAKE_HTML) 1722d21ab8bcSmrg]) # XORG_CHECK_LINUXDOC 17239c9ff80cSmrg 1724d21ab8bcSmrg# XORG_CHECK_DOCBOOK 1725d21ab8bcSmrg# ------------------- 1726d21ab8bcSmrg# Minimum version: 1.0.0 1727d21ab8bcSmrg# 1728d21ab8bcSmrg# Checks for the ability to build output formats from SGML DocBook source. 1729d21ab8bcSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1730d21ab8bcSmrg# indicates whether the necessary tools and files are found and, if set, 1731d21ab8bcSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1732d21ab8bcSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1733d21ab8bcSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 17341f0ac6a5Smrg 1735d21ab8bcSmrgBUILDTXTDOC=no 1736d21ab8bcSmrgBUILDPDFDOC=no 1737d21ab8bcSmrgBUILDPSDOC=no 1738d21ab8bcSmrgBUILDHTMLDOC=no 17391f0ac6a5Smrg 1740d21ab8bcSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1741d21ab8bcSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1742d21ab8bcSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1743d21ab8bcSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 17441f0ac6a5Smrg 1745d21ab8bcSmrgAC_MSG_CHECKING([whether to build text documentation]) 1746d21ab8bcSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1747d21ab8bcSmrg test x$BUILD_TXTDOC != xno; then 1748d21ab8bcSmrg BUILDTXTDOC=yes 1749d21ab8bcSmrgfi 1750d21ab8bcSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1751d21ab8bcSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 17521f0ac6a5Smrg 1753d21ab8bcSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1754d21ab8bcSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1755d21ab8bcSmrg test x$BUILD_PDFDOC != xno; then 1756d21ab8bcSmrg BUILDPDFDOC=yes 17572fd96bc7Smrgfi 1758d21ab8bcSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1759d21ab8bcSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 17601f0ac6a5Smrg 1761d21ab8bcSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1762d21ab8bcSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1763d21ab8bcSmrg test x$BUILD_PSDOC != xno; then 1764d21ab8bcSmrg BUILDPSDOC=yes 1765d21ab8bcSmrgfi 1766d21ab8bcSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1767d21ab8bcSmrgAC_MSG_RESULT([$BUILDPSDOC]) 17681f0ac6a5Smrg 1769d21ab8bcSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1770d21ab8bcSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1771d21ab8bcSmrg test x$BUILD_HTMLDOC != xno; then 1772d21ab8bcSmrg BUILDHTMLDOC=yes 1773d21ab8bcSmrgfi 1774d21ab8bcSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1775d21ab8bcSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 17761f0ac6a5Smrg 1777d21ab8bcSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1778d21ab8bcSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1779d21ab8bcSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1780d21ab8bcSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 17811f0ac6a5Smrg 1782d21ab8bcSmrgAC_SUBST(MAKE_TEXT) 1783d21ab8bcSmrgAC_SUBST(MAKE_PS) 1784d21ab8bcSmrgAC_SUBST(MAKE_PDF) 1785d21ab8bcSmrgAC_SUBST(MAKE_HTML) 1786d21ab8bcSmrg]) # XORG_CHECK_DOCBOOK 17871f0ac6a5Smrg 1788d21ab8bcSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1789d21ab8bcSmrg# ---------------- 1790d21ab8bcSmrg# Minimum version: 1.5.0 1791d21ab8bcSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1792d21ab8bcSmrg# 1793d21ab8bcSmrg# Documentation tools are not always available on all platforms and sometimes 1794d21ab8bcSmrg# not at the appropriate level. This macro enables a module to test for the 1795d21ab8bcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1796d21ab8bcSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1797d21ab8bcSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1798d21ab8bcSmrg# --with-xmlto assumes 'auto'. 1799d21ab8bcSmrg# 1800d21ab8bcSmrg# Interface to module: 1801d21ab8bcSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1802d21ab8bcSmrg# XMLTO: returns the path of the xmlto program found 1803d21ab8bcSmrg# returns the path set by the user in the environment 1804d21ab8bcSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1805d21ab8bcSmrg# 'no' user instructs the module not to use xmlto 1806d21ab8bcSmrg# 1807d21ab8bcSmrg# Added in version 1.10.0 1808d21ab8bcSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1809d21ab8bcSmrg# xmlto for text output requires either lynx, links, or w3m browsers 1810d21ab8bcSmrg# 1811d21ab8bcSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1812d21ab8bcSmrg# 1813d21ab8bcSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1814d21ab8bcSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1815d21ab8bcSmrgm4_define([_defopt], m4_default([$2], [auto])) 1816d21ab8bcSmrgAC_ARG_WITH(xmlto, 1817d21ab8bcSmrg AS_HELP_STRING([--with-xmlto], 1818d21ab8bcSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1819d21ab8bcSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1820d21ab8bcSmrgm4_undefine([_defopt]) 18211f0ac6a5Smrg 1822d21ab8bcSmrgif test "x$use_xmlto" = x"auto"; then 1823d21ab8bcSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1824d21ab8bcSmrg if test "x$XMLTO" = "x"; then 1825d21ab8bcSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1826d21ab8bcSmrg have_xmlto=no 1827d21ab8bcSmrg else 1828d21ab8bcSmrg have_xmlto=yes 1829d21ab8bcSmrg fi 1830d21ab8bcSmrgelif test "x$use_xmlto" = x"yes" ; then 1831d21ab8bcSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1832d21ab8bcSmrg if test "x$XMLTO" = "x"; then 1833d21ab8bcSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1834d21ab8bcSmrg fi 1835d21ab8bcSmrg have_xmlto=yes 1836d21ab8bcSmrgelif test "x$use_xmlto" = x"no" ; then 1837d21ab8bcSmrg if test "x$XMLTO" != "x"; then 1838d21ab8bcSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1839d21ab8bcSmrg fi 1840d21ab8bcSmrg have_xmlto=no 1841d21ab8bcSmrgelse 1842d21ab8bcSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 18432fd96bc7Smrgfi 18441f0ac6a5Smrg 1845d21ab8bcSmrg# Test for a minimum version of xmlto, if provided. 1846d21ab8bcSmrgm4_ifval([$1], 1847d21ab8bcSmrg[if test "$have_xmlto" = yes; then 1848d21ab8bcSmrg # scrape the xmlto version 1849d21ab8bcSmrg AC_MSG_CHECKING([the xmlto version]) 1850d21ab8bcSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1851d21ab8bcSmrg AC_MSG_RESULT([$xmlto_version]) 1852d21ab8bcSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1853d21ab8bcSmrg [if test "x$use_xmlto" = xauto; then 1854d21ab8bcSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1855d21ab8bcSmrg have_xmlto=no 1856d21ab8bcSmrg else 1857d21ab8bcSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1858d21ab8bcSmrg fi]) 1859d21ab8bcSmrgfi]) 18609c9ff80cSmrg 1861d21ab8bcSmrg# Test for the ability of xmlto to generate a text target 1862d21ab8bcSmrg# 1863d21ab8bcSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1864d21ab8bcSmrg# following test for empty XML docbook files. 1865d21ab8bcSmrg# For compatibility reasons use the following empty XML docbook file and if 1866d21ab8bcSmrg# it fails try it again with a non-empty XML file. 1867d21ab8bcSmrghave_xmlto_text=no 1868d21ab8bcSmrgcat > conftest.xml << "EOF" 1869d21ab8bcSmrgEOF 1870d21ab8bcSmrgAS_IF([test "$have_xmlto" = yes], 1871d21ab8bcSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1872d21ab8bcSmrg [have_xmlto_text=yes], 1873d21ab8bcSmrg [# Try it again with a non-empty XML file. 1874d21ab8bcSmrg cat > conftest.xml << "EOF" 1875d21ab8bcSmrg<x></x> 1876d21ab8bcSmrgEOF 1877d21ab8bcSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1878d21ab8bcSmrg [have_xmlto_text=yes], 1879d21ab8bcSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1880d21ab8bcSmrgrm -f conftest.xml 1881d21ab8bcSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1882d21ab8bcSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1883d21ab8bcSmrg]) # XORG_WITH_XMLTO 18849c9ff80cSmrg 1885d21ab8bcSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1886d21ab8bcSmrg# -------------------------------------------- 1887d21ab8bcSmrg# Minimum version: 1.12.0 1888d21ab8bcSmrg# Minimum version for optional DEFAULT argument: 1.12.0 1889d21ab8bcSmrg# 1890d21ab8bcSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1891d21ab8bcSmrg# XML-based language used for the transformation of XML documents. 1892d21ab8bcSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1893d21ab8bcSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1894d21ab8bcSmrg# The XSLT processor is often used as a standalone tool for transformations. 1895d21ab8bcSmrg# It should not be assumed that this tool is used only to work with documnetation. 1896d21ab8bcSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1897d21ab8bcSmrg# 1898d21ab8bcSmrg# Interface to module: 1899d21ab8bcSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1900d21ab8bcSmrg# XSLTPROC: returns the path of the xsltproc program found 1901d21ab8bcSmrg# returns the path set by the user in the environment 1902d21ab8bcSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1903d21ab8bcSmrg# 'no' user instructs the module not to use xsltproc 1904d21ab8bcSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1905d21ab8bcSmrg# 1906d21ab8bcSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1907d21ab8bcSmrg# 1908d21ab8bcSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1909d21ab8bcSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1910d21ab8bcSmrg# Preserves the interface, should it be implemented later 1911d21ab8bcSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1912d21ab8bcSmrgm4_define([_defopt], m4_default([$2], [auto])) 1913d21ab8bcSmrgAC_ARG_WITH(xsltproc, 1914d21ab8bcSmrg AS_HELP_STRING([--with-xsltproc], 1915d21ab8bcSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1916d21ab8bcSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1917d21ab8bcSmrgm4_undefine([_defopt]) 1918d21ab8bcSmrg 1919d21ab8bcSmrgif test "x$use_xsltproc" = x"auto"; then 1920d21ab8bcSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1921d21ab8bcSmrg if test "x$XSLTPROC" = "x"; then 1922d21ab8bcSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1923d21ab8bcSmrg have_xsltproc=no 1924d21ab8bcSmrg else 1925d21ab8bcSmrg have_xsltproc=yes 1926d21ab8bcSmrg fi 1927d21ab8bcSmrgelif test "x$use_xsltproc" = x"yes" ; then 1928d21ab8bcSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1929d21ab8bcSmrg if test "x$XSLTPROC" = "x"; then 1930d21ab8bcSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1931d21ab8bcSmrg fi 1932d21ab8bcSmrg have_xsltproc=yes 1933d21ab8bcSmrgelif test "x$use_xsltproc" = x"no" ; then 1934d21ab8bcSmrg if test "x$XSLTPROC" != "x"; then 1935d21ab8bcSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1936d21ab8bcSmrg fi 1937d21ab8bcSmrg have_xsltproc=no 19382fd96bc7Smrgelse 1939d21ab8bcSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 19402fd96bc7Smrgfi 19419c9ff80cSmrg 1942d21ab8bcSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1943d21ab8bcSmrg]) # XORG_WITH_XSLTPROC 19449c9ff80cSmrg 1945d21ab8bcSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1946d21ab8bcSmrg# ---------------------------------------- 1947d21ab8bcSmrg# Minimum version: 1.15.0 1948d21ab8bcSmrg# 1949d21ab8bcSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 1950d21ab8bcSmrg# scanning arbitrary text files, extracting information from those text files, 1951d21ab8bcSmrg# and printing reports based on that information. 1952d21ab8bcSmrg# 1953d21ab8bcSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1954d21ab8bcSmrg# 1955d21ab8bcSmrg# Interface to module: 1956d21ab8bcSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 1957d21ab8bcSmrg# PERL: returns the path of the perl program found 1958d21ab8bcSmrg# returns the path set by the user in the environment 1959d21ab8bcSmrg# --with-perl: 'yes' user instructs the module to use perl 1960d21ab8bcSmrg# 'no' user instructs the module not to use perl 1961d21ab8bcSmrg# have_perl: returns yes if perl found in PATH or no 1962d21ab8bcSmrg# 1963d21ab8bcSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1964d21ab8bcSmrg# 1965d21ab8bcSmrgAC_DEFUN([XORG_WITH_PERL],[ 1966d21ab8bcSmrgAC_ARG_VAR([PERL], [Path to perl command]) 1967d21ab8bcSmrg# Preserves the interface, should it be implemented later 1968d21ab8bcSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1969d21ab8bcSmrgm4_define([_defopt], m4_default([$2], [auto])) 1970d21ab8bcSmrgAC_ARG_WITH(perl, 1971d21ab8bcSmrg AS_HELP_STRING([--with-perl], 1972d21ab8bcSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 1973d21ab8bcSmrg [use_perl=$withval], [use_perl=]_defopt) 1974d21ab8bcSmrgm4_undefine([_defopt]) 19759c9ff80cSmrg 1976d21ab8bcSmrgif test "x$use_perl" = x"auto"; then 1977d21ab8bcSmrg AC_PATH_PROG([PERL], [perl]) 1978d21ab8bcSmrg if test "x$PERL" = "x"; then 1979d21ab8bcSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1980d21ab8bcSmrg have_perl=no 1981d21ab8bcSmrg else 1982d21ab8bcSmrg have_perl=yes 19832fd96bc7Smrg fi 1984d21ab8bcSmrgelif test "x$use_perl" = x"yes" ; then 1985d21ab8bcSmrg AC_PATH_PROG([PERL], [perl]) 1986d21ab8bcSmrg if test "x$PERL" = "x"; then 1987d21ab8bcSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1988d21ab8bcSmrg fi 1989d21ab8bcSmrg have_perl=yes 1990d21ab8bcSmrgelif test "x$use_perl" = x"no" ; then 1991d21ab8bcSmrg if test "x$PERL" != "x"; then 1992d21ab8bcSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1993d21ab8bcSmrg fi 1994d21ab8bcSmrg have_perl=no 19952fd96bc7Smrgelse 1996d21ab8bcSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 19972fd96bc7Smrgfi 19981f0ac6a5Smrg 1999d21ab8bcSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2000d21ab8bcSmrg]) # XORG_WITH_PERL 20011f0ac6a5Smrg 2002d21ab8bcSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2003d21ab8bcSmrg# ---------------- 2004d21ab8bcSmrg# Minimum version: 1.5.0 2005d21ab8bcSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2006d21ab8bcSmrg# 2007d21ab8bcSmrg# Documentation tools are not always available on all platforms and sometimes 2008d21ab8bcSmrg# not at the appropriate level. This macro enables a module to test for the 2009d21ab8bcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2010d21ab8bcSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 2011d21ab8bcSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2012d21ab8bcSmrg# --with-asciidoc assumes 'auto'. 2013d21ab8bcSmrg# 2014d21ab8bcSmrg# Interface to module: 2015d21ab8bcSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2016d21ab8bcSmrg# ASCIIDOC: returns the path of the asciidoc program found 2017d21ab8bcSmrg# returns the path set by the user in the environment 2018d21ab8bcSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2019d21ab8bcSmrg# 'no' user instructs the module not to use asciidoc 2020d21ab8bcSmrg# 2021d21ab8bcSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2022d21ab8bcSmrg# 2023d21ab8bcSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 2024d21ab8bcSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2025d21ab8bcSmrgm4_define([_defopt], m4_default([$2], [auto])) 2026d21ab8bcSmrgAC_ARG_WITH(asciidoc, 2027d21ab8bcSmrg AS_HELP_STRING([--with-asciidoc], 2028d21ab8bcSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2029d21ab8bcSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2030d21ab8bcSmrgm4_undefine([_defopt]) 203189c04b6cSmrg 2032d21ab8bcSmrgif test "x$use_asciidoc" = x"auto"; then 2033d21ab8bcSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2034d21ab8bcSmrg if test "x$ASCIIDOC" = "x"; then 2035d21ab8bcSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2036d21ab8bcSmrg have_asciidoc=no 2037d21ab8bcSmrg else 2038d21ab8bcSmrg have_asciidoc=yes 2039d21ab8bcSmrg fi 2040d21ab8bcSmrgelif test "x$use_asciidoc" = x"yes" ; then 2041d21ab8bcSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2042d21ab8bcSmrg if test "x$ASCIIDOC" = "x"; then 2043d21ab8bcSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2044d21ab8bcSmrg fi 2045d21ab8bcSmrg have_asciidoc=yes 2046d21ab8bcSmrgelif test "x$use_asciidoc" = x"no" ; then 2047d21ab8bcSmrg if test "x$ASCIIDOC" != "x"; then 2048d21ab8bcSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2049d21ab8bcSmrg fi 2050d21ab8bcSmrg have_asciidoc=no 2051d21ab8bcSmrgelse 2052d21ab8bcSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2053d21ab8bcSmrgfi 2054d21ab8bcSmrgm4_ifval([$1], 2055d21ab8bcSmrg[if test "$have_asciidoc" = yes; then 2056d21ab8bcSmrg # scrape the asciidoc version 2057d21ab8bcSmrg AC_MSG_CHECKING([the asciidoc version]) 2058d21ab8bcSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2059d21ab8bcSmrg AC_MSG_RESULT([$asciidoc_version]) 2060d21ab8bcSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 2061d21ab8bcSmrg [if test "x$use_asciidoc" = xauto; then 2062d21ab8bcSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2063d21ab8bcSmrg have_asciidoc=no 2064d21ab8bcSmrg else 2065d21ab8bcSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2066d21ab8bcSmrg fi]) 2067d21ab8bcSmrgfi]) 2068d21ab8bcSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2069d21ab8bcSmrg]) # XORG_WITH_ASCIIDOC 207089c04b6cSmrg 2071d21ab8bcSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2072d21ab8bcSmrg# ------------------------------------------- 2073d21ab8bcSmrg# Minimum version: 1.5.0 2074d21ab8bcSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2075d21ab8bcSmrg# Minimum version for optional DOT checking: 1.18.0 2076d21ab8bcSmrg# 2077d21ab8bcSmrg# Documentation tools are not always available on all platforms and sometimes 2078d21ab8bcSmrg# not at the appropriate level. This macro enables a module to test for the 2079d21ab8bcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2080d21ab8bcSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 2081d21ab8bcSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 2082d21ab8bcSmrg# --with-doxygen assumes 'auto'. 2083d21ab8bcSmrg# 2084d21ab8bcSmrg# Interface to module: 2085d21ab8bcSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2086d21ab8bcSmrg# DOXYGEN: returns the path of the doxygen program found 2087d21ab8bcSmrg# returns the path set by the user in the environment 2088d21ab8bcSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 2089d21ab8bcSmrg# 'no' user instructs the module not to use doxygen 2090d21ab8bcSmrg# 2091d21ab8bcSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2092d21ab8bcSmrg# 2093d21ab8bcSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 2094d21ab8bcSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2095d21ab8bcSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2096d21ab8bcSmrgm4_define([_defopt], m4_default([$2], [auto])) 2097d21ab8bcSmrgAC_ARG_WITH(doxygen, 2098d21ab8bcSmrg AS_HELP_STRING([--with-doxygen], 2099d21ab8bcSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2100d21ab8bcSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 2101d21ab8bcSmrgm4_undefine([_defopt]) 2102e5410a46Smrg 2103d21ab8bcSmrgif test "x$use_doxygen" = x"auto"; then 2104d21ab8bcSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2105d21ab8bcSmrg if test "x$DOXYGEN" = "x"; then 2106d21ab8bcSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2107d21ab8bcSmrg have_doxygen=no 2108d21ab8bcSmrg else 2109d21ab8bcSmrg have_doxygen=yes 2110d21ab8bcSmrg fi 2111d21ab8bcSmrgelif test "x$use_doxygen" = x"yes" ; then 2112d21ab8bcSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2113d21ab8bcSmrg if test "x$DOXYGEN" = "x"; then 2114d21ab8bcSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2115d21ab8bcSmrg fi 2116d21ab8bcSmrg have_doxygen=yes 2117d21ab8bcSmrgelif test "x$use_doxygen" = x"no" ; then 2118d21ab8bcSmrg if test "x$DOXYGEN" != "x"; then 2119d21ab8bcSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2120d21ab8bcSmrg fi 2121d21ab8bcSmrg have_doxygen=no 2122d21ab8bcSmrgelse 2123d21ab8bcSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2124d21ab8bcSmrgfi 2125d21ab8bcSmrgm4_ifval([$1], 2126d21ab8bcSmrg[if test "$have_doxygen" = yes; then 2127d21ab8bcSmrg # scrape the doxygen version 2128d21ab8bcSmrg AC_MSG_CHECKING([the doxygen version]) 2129d21ab8bcSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 2130d21ab8bcSmrg AC_MSG_RESULT([$doxygen_version]) 2131d21ab8bcSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 2132d21ab8bcSmrg [if test "x$use_doxygen" = xauto; then 2133d21ab8bcSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2134d21ab8bcSmrg have_doxygen=no 2135d21ab8bcSmrg else 2136d21ab8bcSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2137d21ab8bcSmrg fi]) 2138d21ab8bcSmrgfi]) 21391f0ac6a5Smrg 2140d21ab8bcSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2141d21ab8bcSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2142d21ab8bcSmrgdnl HAVE_DOT = @HAVE_DOT@ 2143d21ab8bcSmrgHAVE_DOT=no 2144d21ab8bcSmrgif test "x$have_doxygen" = "xyes"; then 2145d21ab8bcSmrg AC_PATH_PROG([DOT], [dot]) 2146d21ab8bcSmrg if test "x$DOT" != "x"; then 2147d21ab8bcSmrg HAVE_DOT=yes 21482fd96bc7Smrg fi 2149d21ab8bcSmrgfi 21501f0ac6a5Smrg 2151d21ab8bcSmrgAC_SUBST([HAVE_DOT]) 2152d21ab8bcSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2153d21ab8bcSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2154d21ab8bcSmrg]) # XORG_WITH_DOXYGEN 21559c9ff80cSmrg 2156d21ab8bcSmrg# XORG_WITH_GROFF([DEFAULT]) 2157d21ab8bcSmrg# ---------------- 2158d21ab8bcSmrg# Minimum version: 1.6.0 2159d21ab8bcSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2160d21ab8bcSmrg# 2161d21ab8bcSmrg# Documentation tools are not always available on all platforms and sometimes 2162d21ab8bcSmrg# not at the appropriate level. This macro enables a module to test for the 2163d21ab8bcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2164d21ab8bcSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 2165d21ab8bcSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 2166d21ab8bcSmrg# --with-groff assumes 'auto'. 2167d21ab8bcSmrg# 2168d21ab8bcSmrg# Interface to module: 2169d21ab8bcSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2170d21ab8bcSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2171d21ab8bcSmrg# HAVE_GROFF_MS: the -ms macros package 2172d21ab8bcSmrg# GROFF: returns the path of the groff program found 2173d21ab8bcSmrg# returns the path set by the user in the environment 2174d21ab8bcSmrg# --with-groff: 'yes' user instructs the module to use groff 2175d21ab8bcSmrg# 'no' user instructs the module not to use groff 2176d21ab8bcSmrg# 2177d21ab8bcSmrg# Added in version 1.9.0: 2178d21ab8bcSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2179d21ab8bcSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2180d21ab8bcSmrg# psselect from the psutils package. 2181d21ab8bcSmrg# the ghostcript package. Refer to the grohtml man pages 2182d21ab8bcSmrg# 2183d21ab8bcSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2184d21ab8bcSmrg# 2185d21ab8bcSmrg# OS and distros often splits groff in a basic and full package, the former 2186d21ab8bcSmrg# having the groff program and the later having devices, fonts and macros 2187d21ab8bcSmrg# Checking for the groff executable is not enough. 2188d21ab8bcSmrg# 2189d21ab8bcSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 2190d21ab8bcSmrg# unset HAVE_GROFF or GROFF env variables. 2191d21ab8bcSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2192d21ab8bcSmrg# 2193d21ab8bcSmrgAC_DEFUN([XORG_WITH_GROFF],[ 2194d21ab8bcSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2195d21ab8bcSmrgm4_define([_defopt], m4_default([$1], [auto])) 2196d21ab8bcSmrgAC_ARG_WITH(groff, 2197d21ab8bcSmrg AS_HELP_STRING([--with-groff], 2198d21ab8bcSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2199d21ab8bcSmrg [use_groff=$withval], [use_groff=]_defopt) 2200d21ab8bcSmrgm4_undefine([_defopt]) 220189c04b6cSmrg 2202d21ab8bcSmrgif test "x$use_groff" = x"auto"; then 2203d21ab8bcSmrg AC_PATH_PROG([GROFF], [groff]) 2204d21ab8bcSmrg if test "x$GROFF" = "x"; then 2205d21ab8bcSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2206d21ab8bcSmrg have_groff=no 2207d21ab8bcSmrg else 2208d21ab8bcSmrg have_groff=yes 2209d21ab8bcSmrg fi 2210d21ab8bcSmrgelif test "x$use_groff" = x"yes" ; then 2211d21ab8bcSmrg AC_PATH_PROG([GROFF], [groff]) 2212d21ab8bcSmrg if test "x$GROFF" = "x"; then 2213d21ab8bcSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2214d21ab8bcSmrg fi 2215d21ab8bcSmrg have_groff=yes 2216d21ab8bcSmrgelif test "x$use_groff" = x"no" ; then 2217d21ab8bcSmrg if test "x$GROFF" != "x"; then 2218d21ab8bcSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2219d21ab8bcSmrg fi 2220d21ab8bcSmrg have_groff=no 2221d21ab8bcSmrgelse 2222d21ab8bcSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2223d21ab8bcSmrgfi 2224d21ab8bcSmrg 2225d21ab8bcSmrg# We have groff, test for the presence of the macro packages 2226d21ab8bcSmrgif test "x$have_groff" = x"yes"; then 2227d21ab8bcSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2228d21ab8bcSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2229d21ab8bcSmrg groff_ms_works=yes 2230d21ab8bcSmrg else 2231d21ab8bcSmrg groff_ms_works=no 22322fd96bc7Smrg fi 2233d21ab8bcSmrg AC_MSG_RESULT([$groff_ms_works]) 2234d21ab8bcSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2235d21ab8bcSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2236d21ab8bcSmrg groff_mm_works=yes 22372fd96bc7Smrg else 2238d21ab8bcSmrg groff_mm_works=no 22392fd96bc7Smrg fi 2240d21ab8bcSmrg AC_MSG_RESULT([$groff_mm_works]) 22412fd96bc7Smrgfi 22429c9ff80cSmrg 2243d21ab8bcSmrg# We have groff, test for HTML dependencies, one command per package 2244d21ab8bcSmrgif test "x$have_groff" = x"yes"; then 2245d21ab8bcSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2246d21ab8bcSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2247d21ab8bcSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2248d21ab8bcSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2249d21ab8bcSmrg have_groff_html=yes 2250d21ab8bcSmrg else 2251d21ab8bcSmrg have_groff_html=no 2252d21ab8bcSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2253d21ab8bcSmrg fi 2254d21ab8bcSmrgfi 22559c9ff80cSmrg 2256d21ab8bcSmrg# Set Automake conditionals for Makefiles 2257d21ab8bcSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2258d21ab8bcSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2259d21ab8bcSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2260d21ab8bcSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2261d21ab8bcSmrg]) # XORG_WITH_GROFF 22629c9ff80cSmrg 2263d21ab8bcSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2264d21ab8bcSmrg# --------------------------------------- 2265d21ab8bcSmrg# Minimum version: 1.6.0 2266d21ab8bcSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2267d21ab8bcSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2268d21ab8bcSmrg# 2269d21ab8bcSmrg# Documentation tools are not always available on all platforms and sometimes 2270d21ab8bcSmrg# not at the appropriate level. This macro enables a module to test for the 2271d21ab8bcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2272d21ab8bcSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 2273d21ab8bcSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 2274d21ab8bcSmrg# --with-fop assumes 'auto'. 2275d21ab8bcSmrg# 2276d21ab8bcSmrg# Interface to module: 2277d21ab8bcSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2278d21ab8bcSmrg# FOP: returns the path of the fop program found 2279d21ab8bcSmrg# returns the path set by the user in the environment 2280d21ab8bcSmrg# --with-fop: 'yes' user instructs the module to use fop 2281d21ab8bcSmrg# 'no' user instructs the module not to use fop 2282d21ab8bcSmrg# 2283d21ab8bcSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2284d21ab8bcSmrg# 2285d21ab8bcSmrgAC_DEFUN([XORG_WITH_FOP],[ 2286d21ab8bcSmrgAC_ARG_VAR([FOP], [Path to fop command]) 2287d21ab8bcSmrgm4_define([_defopt], m4_default([$2], [auto])) 2288d21ab8bcSmrgAC_ARG_WITH(fop, 2289d21ab8bcSmrg AS_HELP_STRING([--with-fop], 2290d21ab8bcSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2291d21ab8bcSmrg [use_fop=$withval], [use_fop=]_defopt) 2292d21ab8bcSmrgm4_undefine([_defopt]) 22939c9ff80cSmrg 2294d21ab8bcSmrgif test "x$use_fop" = x"auto"; then 2295d21ab8bcSmrg AC_PATH_PROG([FOP], [fop]) 2296d21ab8bcSmrg if test "x$FOP" = "x"; then 2297d21ab8bcSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2298d21ab8bcSmrg have_fop=no 2299d21ab8bcSmrg else 2300d21ab8bcSmrg have_fop=yes 2301d21ab8bcSmrg fi 2302d21ab8bcSmrgelif test "x$use_fop" = x"yes" ; then 2303d21ab8bcSmrg AC_PATH_PROG([FOP], [fop]) 2304d21ab8bcSmrg if test "x$FOP" = "x"; then 2305d21ab8bcSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2306d21ab8bcSmrg fi 2307d21ab8bcSmrg have_fop=yes 2308d21ab8bcSmrgelif test "x$use_fop" = x"no" ; then 2309d21ab8bcSmrg if test "x$FOP" != "x"; then 2310d21ab8bcSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2311d21ab8bcSmrg fi 2312d21ab8bcSmrg have_fop=no 23132fd96bc7Smrgelse 2314d21ab8bcSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2315d21ab8bcSmrgfi 23169c9ff80cSmrg 2317d21ab8bcSmrg# Test for a minimum version of fop, if provided. 2318d21ab8bcSmrgm4_ifval([$1], 2319d21ab8bcSmrg[if test "$have_fop" = yes; then 2320d21ab8bcSmrg # scrape the fop version 2321d21ab8bcSmrg AC_MSG_CHECKING([for fop minimum version]) 2322d21ab8bcSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2323d21ab8bcSmrg AC_MSG_RESULT([$fop_version]) 2324d21ab8bcSmrg AS_VERSION_COMPARE([$fop_version], [$1], 2325d21ab8bcSmrg [if test "x$use_fop" = xauto; then 2326d21ab8bcSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2327d21ab8bcSmrg have_fop=no 2328d21ab8bcSmrg else 2329d21ab8bcSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2330d21ab8bcSmrg fi]) 2331d21ab8bcSmrgfi]) 2332d21ab8bcSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2333d21ab8bcSmrg]) # XORG_WITH_FOP 23349c9ff80cSmrg 2335d21ab8bcSmrg# XORG_WITH_M4([MIN-VERSION]) 2336d21ab8bcSmrg# --------------------------- 2337d21ab8bcSmrg# Minimum version: 1.19.0 2338d21ab8bcSmrg# 2339d21ab8bcSmrg# This macro attempts to locate an m4 macro processor which supports 2340d21ab8bcSmrg# -I option and is only useful for modules relying on M4 in order to 2341d21ab8bcSmrg# expand macros in source code files. 2342d21ab8bcSmrg# 2343d21ab8bcSmrg# Interface to module: 2344d21ab8bcSmrg# M4: returns the path of the m4 program found 2345d21ab8bcSmrg# returns the path set by the user in the environment 2346d21ab8bcSmrg# 2347d21ab8bcSmrgAC_DEFUN([XORG_WITH_M4], [ 2348d21ab8bcSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2349d21ab8bcSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2350d21ab8bcSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2351d21ab8bcSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2352d21ab8bcSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 2353d21ab8bcSmrg [$PATH:/usr/gnu/bin])]) 23549c9ff80cSmrg 2355d21ab8bcSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 2356d21ab8bcSmrg]) # XORG_WITH_M4 23579c9ff80cSmrg 2358d21ab8bcSmrg# XORG_WITH_PS2PDF([DEFAULT]) 2359d21ab8bcSmrg# ---------------- 2360d21ab8bcSmrg# Minimum version: 1.6.0 2361d21ab8bcSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2362d21ab8bcSmrg# 2363d21ab8bcSmrg# Documentation tools are not always available on all platforms and sometimes 2364d21ab8bcSmrg# not at the appropriate level. This macro enables a module to test for the 2365d21ab8bcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2366d21ab8bcSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 2367d21ab8bcSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2368d21ab8bcSmrg# --with-ps2pdf assumes 'auto'. 2369d21ab8bcSmrg# 2370d21ab8bcSmrg# Interface to module: 2371d21ab8bcSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2372d21ab8bcSmrg# PS2PDF: returns the path of the ps2pdf program found 2373d21ab8bcSmrg# returns the path set by the user in the environment 2374d21ab8bcSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2375d21ab8bcSmrg# 'no' user instructs the module not to use ps2pdf 2376d21ab8bcSmrg# 2377d21ab8bcSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2378d21ab8bcSmrg# 2379d21ab8bcSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2380d21ab8bcSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2381d21ab8bcSmrgm4_define([_defopt], m4_default([$1], [auto])) 2382d21ab8bcSmrgAC_ARG_WITH(ps2pdf, 2383d21ab8bcSmrg AS_HELP_STRING([--with-ps2pdf], 2384d21ab8bcSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2385d21ab8bcSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2386d21ab8bcSmrgm4_undefine([_defopt]) 23879c9ff80cSmrg 2388d21ab8bcSmrgif test "x$use_ps2pdf" = x"auto"; then 2389d21ab8bcSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2390d21ab8bcSmrg if test "x$PS2PDF" = "x"; then 2391d21ab8bcSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2392d21ab8bcSmrg have_ps2pdf=no 2393d21ab8bcSmrg else 2394d21ab8bcSmrg have_ps2pdf=yes 2395d21ab8bcSmrg fi 2396d21ab8bcSmrgelif test "x$use_ps2pdf" = x"yes" ; then 2397d21ab8bcSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2398d21ab8bcSmrg if test "x$PS2PDF" = "x"; then 2399d21ab8bcSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2400d21ab8bcSmrg fi 2401d21ab8bcSmrg have_ps2pdf=yes 2402d21ab8bcSmrgelif test "x$use_ps2pdf" = x"no" ; then 2403d21ab8bcSmrg if test "x$PS2PDF" != "x"; then 2404d21ab8bcSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2405d21ab8bcSmrg fi 2406d21ab8bcSmrg have_ps2pdf=no 2407d21ab8bcSmrgelse 2408d21ab8bcSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2409d21ab8bcSmrgfi 2410d21ab8bcSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2411d21ab8bcSmrg]) # XORG_WITH_PS2PDF 241289c04b6cSmrg 2413d21ab8bcSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 2414d21ab8bcSmrg# ---------------- 2415d21ab8bcSmrg# Minimum version: 1.6.0 2416d21ab8bcSmrg# 2417d21ab8bcSmrg# Documentation tools are not always available on all platforms and sometimes 2418d21ab8bcSmrg# not at the appropriate level. This macro enables a builder to skip all 2419d21ab8bcSmrg# documentation targets except traditional man pages. 2420d21ab8bcSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2421d21ab8bcSmrg# maximum flexibilty in controlling documentation building. 2422d21ab8bcSmrg# Refer to: 2423d21ab8bcSmrg# XORG_WITH_XMLTO --with-xmlto 2424d21ab8bcSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2425d21ab8bcSmrg# XORG_WITH_DOXYGEN --with-doxygen 2426d21ab8bcSmrg# XORG_WITH_FOP --with-fop 2427d21ab8bcSmrg# XORG_WITH_GROFF --with-groff 2428d21ab8bcSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2429d21ab8bcSmrg# 2430d21ab8bcSmrg# Interface to module: 2431d21ab8bcSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2432d21ab8bcSmrg# --enable-docs: 'yes' user instructs the module to generate docs 2433d21ab8bcSmrg# 'no' user instructs the module not to generate docs 2434d21ab8bcSmrg# parm1: specify the default value, yes or no. 2435d21ab8bcSmrg# 2436d21ab8bcSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2437d21ab8bcSmrgm4_define([docs_default], m4_default([$1], [yes])) 2438d21ab8bcSmrgAC_ARG_ENABLE(docs, 2439d21ab8bcSmrg AS_HELP_STRING([--enable-docs], 2440d21ab8bcSmrg [Enable building the documentation (default: ]docs_default[)]), 2441d21ab8bcSmrg [build_docs=$enableval], [build_docs=]docs_default) 2442d21ab8bcSmrgm4_undefine([docs_default]) 2443d21ab8bcSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2444d21ab8bcSmrgAC_MSG_CHECKING([whether to build documentation]) 2445d21ab8bcSmrgAC_MSG_RESULT([$build_docs]) 2446d21ab8bcSmrg]) # XORG_ENABLE_DOCS 24472fd96bc7Smrg 2448d21ab8bcSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2449d21ab8bcSmrg# ---------------- 2450d21ab8bcSmrg# Minimum version: 1.6.0 2451d21ab8bcSmrg# 2452d21ab8bcSmrg# This macro enables a builder to skip all developer documentation. 2453d21ab8bcSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2454d21ab8bcSmrg# maximum flexibilty in controlling documentation building. 2455d21ab8bcSmrg# Refer to: 2456d21ab8bcSmrg# XORG_WITH_XMLTO --with-xmlto 2457d21ab8bcSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2458d21ab8bcSmrg# XORG_WITH_DOXYGEN --with-doxygen 2459d21ab8bcSmrg# XORG_WITH_FOP --with-fop 2460d21ab8bcSmrg# XORG_WITH_GROFF --with-groff 2461d21ab8bcSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2462d21ab8bcSmrg# 2463d21ab8bcSmrg# Interface to module: 2464d21ab8bcSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2465d21ab8bcSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2466d21ab8bcSmrg# 'no' user instructs the module not to generate developer docs 2467d21ab8bcSmrg# parm1: specify the default value, yes or no. 2468d21ab8bcSmrg# 2469d21ab8bcSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2470d21ab8bcSmrgm4_define([devel_default], m4_default([$1], [yes])) 2471d21ab8bcSmrgAC_ARG_ENABLE(devel-docs, 2472d21ab8bcSmrg AS_HELP_STRING([--enable-devel-docs], 2473d21ab8bcSmrg [Enable building the developer documentation (default: ]devel_default[)]), 2474d21ab8bcSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2475d21ab8bcSmrgm4_undefine([devel_default]) 2476d21ab8bcSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2477d21ab8bcSmrgAC_MSG_CHECKING([whether to build developer documentation]) 2478d21ab8bcSmrgAC_MSG_RESULT([$build_devel_docs]) 2479d21ab8bcSmrg]) # XORG_ENABLE_DEVEL_DOCS 24802fd96bc7Smrg 2481d21ab8bcSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 2482d21ab8bcSmrg# ---------------- 2483d21ab8bcSmrg# Minimum version: 1.6.0 2484d21ab8bcSmrg# 2485d21ab8bcSmrg# This macro enables a builder to skip all functional specification targets. 2486d21ab8bcSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2487d21ab8bcSmrg# maximum flexibilty in controlling documentation building. 2488d21ab8bcSmrg# Refer to: 2489d21ab8bcSmrg# XORG_WITH_XMLTO --with-xmlto 2490d21ab8bcSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2491d21ab8bcSmrg# XORG_WITH_DOXYGEN --with-doxygen 2492d21ab8bcSmrg# XORG_WITH_FOP --with-fop 2493d21ab8bcSmrg# XORG_WITH_GROFF --with-groff 2494d21ab8bcSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2495d21ab8bcSmrg# 2496d21ab8bcSmrg# Interface to module: 2497d21ab8bcSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2498d21ab8bcSmrg# --enable-specs: 'yes' user instructs the module to generate specs 2499d21ab8bcSmrg# 'no' user instructs the module not to generate specs 2500d21ab8bcSmrg# parm1: specify the default value, yes or no. 2501d21ab8bcSmrg# 2502d21ab8bcSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2503d21ab8bcSmrgm4_define([spec_default], m4_default([$1], [yes])) 2504d21ab8bcSmrgAC_ARG_ENABLE(specs, 2505d21ab8bcSmrg AS_HELP_STRING([--enable-specs], 2506d21ab8bcSmrg [Enable building the specs (default: ]spec_default[)]), 2507d21ab8bcSmrg [build_specs=$enableval], [build_specs=]spec_default) 2508d21ab8bcSmrgm4_undefine([spec_default]) 2509d21ab8bcSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2510d21ab8bcSmrgAC_MSG_CHECKING([whether to build functional specifications]) 2511d21ab8bcSmrgAC_MSG_RESULT([$build_specs]) 2512d21ab8bcSmrg]) # XORG_ENABLE_SPECS 25132fd96bc7Smrg 2514d21ab8bcSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2515d21ab8bcSmrg# ---------------------------------------------- 2516d21ab8bcSmrg# Minimum version: 1.13.0 2517d21ab8bcSmrg# 2518d21ab8bcSmrg# This macro enables a builder to enable/disable unit testing 2519d21ab8bcSmrg# It makes no assumption about the test cases implementation 2520d21ab8bcSmrg# Test cases may or may not use Automake "Support for test suites" 2521d21ab8bcSmrg# They may or may not use the software utility library GLib 2522d21ab8bcSmrg# 2523d21ab8bcSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2524d21ab8bcSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2525d21ab8bcSmrg# The variable enable_unit_tests is used by other macros in this file. 2526d21ab8bcSmrg# 2527d21ab8bcSmrg# Interface to module: 2528d21ab8bcSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2529d21ab8bcSmrg# enable_unit_tests: used in configure.ac for additional configuration 2530d21ab8bcSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2531d21ab8bcSmrg# 'no' user instructs the module not to build tests 2532d21ab8bcSmrg# parm1: specify the default value, yes or no. 2533d21ab8bcSmrg# 2534d21ab8bcSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2535d21ab8bcSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2536d21ab8bcSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2537d21ab8bcSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2538d21ab8bcSmrgm4_define([_defopt], m4_default([$1], [auto])) 2539d21ab8bcSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2540d21ab8bcSmrg [Enable building unit test cases (default: ]_defopt[)]), 2541d21ab8bcSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2542d21ab8bcSmrgm4_undefine([_defopt]) 2543d21ab8bcSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2544d21ab8bcSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2545d21ab8bcSmrgAC_MSG_RESULT([$enable_unit_tests]) 2546d21ab8bcSmrg]) # XORG_ENABLE_UNIT_TESTS 25472fd96bc7Smrg 2548d21ab8bcSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2549d21ab8bcSmrg# ------------------------------------------------------ 2550d21ab8bcSmrg# Minimum version: 1.17.0 2551d21ab8bcSmrg# 2552d21ab8bcSmrg# This macro enables a builder to enable/disable integration testing 2553d21ab8bcSmrg# It makes no assumption about the test cases' implementation 2554d21ab8bcSmrg# Test cases may or may not use Automake "Support for test suites" 2555d21ab8bcSmrg# 2556d21ab8bcSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2557d21ab8bcSmrg# usually requires less dependencies and may be built and run under less 2558d21ab8bcSmrg# stringent environments than integration tests. 2559d21ab8bcSmrg# 2560d21ab8bcSmrg# Interface to module: 2561d21ab8bcSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2562d21ab8bcSmrg# enable_integration_tests: used in configure.ac for additional configuration 2563d21ab8bcSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2564d21ab8bcSmrg# 'no' user instructs the module not to build tests 2565d21ab8bcSmrg# parm1: specify the default value, yes or no. 2566d21ab8bcSmrg# 2567d21ab8bcSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2568d21ab8bcSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2569d21ab8bcSmrgm4_define([_defopt], m4_default([$1], [auto])) 2570d21ab8bcSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2571d21ab8bcSmrg [Enable building integration test cases (default: ]_defopt[)]), 2572d21ab8bcSmrg [enable_integration_tests=$enableval], 2573d21ab8bcSmrg [enable_integration_tests=]_defopt) 2574d21ab8bcSmrgm4_undefine([_defopt]) 2575d21ab8bcSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2576d21ab8bcSmrg [test "x$enable_integration_tests" != xno]) 2577d21ab8bcSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2578d21ab8bcSmrgAC_MSG_RESULT([$enable_integration_tests]) 2579d21ab8bcSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 25802fd96bc7Smrg 2581d21ab8bcSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2582d21ab8bcSmrg# ---------------------------------------- 2583d21ab8bcSmrg# Minimum version: 1.13.0 2584d21ab8bcSmrg# 2585d21ab8bcSmrg# GLib is a library which provides advanced data structures and functions. 2586d21ab8bcSmrg# This macro enables a module to test for the presence of Glib. 2587d21ab8bcSmrg# 2588d21ab8bcSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2589d21ab8bcSmrg# Otherwise the value of $enable_unit_tests is blank. 2590d21ab8bcSmrg# 2591d21ab8bcSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2592d21ab8bcSmrg# test support usually requires less dependencies and may be built and run under 2593d21ab8bcSmrg# less stringent environments than integration tests. 2594d21ab8bcSmrg# 2595d21ab8bcSmrg# Interface to module: 2596d21ab8bcSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 2597d21ab8bcSmrg# with_glib: used in configure.ac to know if GLib has been found 2598d21ab8bcSmrg# --with-glib: 'yes' user instructs the module to use glib 2599d21ab8bcSmrg# 'no' user instructs the module not to use glib 2600d21ab8bcSmrg# 2601d21ab8bcSmrgAC_DEFUN([XORG_WITH_GLIB],[ 2602d21ab8bcSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2603d21ab8bcSmrgm4_define([_defopt], m4_default([$2], [auto])) 2604d21ab8bcSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2605d21ab8bcSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 2606d21ab8bcSmrg [with_glib=$withval], [with_glib=]_defopt) 2607d21ab8bcSmrgm4_undefine([_defopt]) 26082fd96bc7Smrg 2609d21ab8bcSmrghave_glib=no 2610d21ab8bcSmrg# Do not probe GLib if user explicitly disabled unit testing 2611d21ab8bcSmrgif test "x$enable_unit_tests" != x"no"; then 2612d21ab8bcSmrg # Do not probe GLib if user explicitly disabled it 2613d21ab8bcSmrg if test "x$with_glib" != x"no"; then 2614d21ab8bcSmrg m4_ifval( 2615d21ab8bcSmrg [$1], 2616d21ab8bcSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2617d21ab8bcSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2618d21ab8bcSmrg ) 2619d21ab8bcSmrg fi 2620d21ab8bcSmrgfi 26212fd96bc7Smrg 2622d21ab8bcSmrg# Not having GLib when unit testing has been explicitly requested is an error 2623d21ab8bcSmrgif test "x$enable_unit_tests" = x"yes"; then 2624d21ab8bcSmrg if test "x$have_glib" = x"no"; then 2625d21ab8bcSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2626d21ab8bcSmrg fi 2627d21ab8bcSmrgfi 26289c9ff80cSmrg 2629d21ab8bcSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 2630d21ab8bcSmrgif test "x$enable_unit_tests" = x"no"; then 2631d21ab8bcSmrg if test "x$with_glib" = x"yes"; then 2632d21ab8bcSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 26336fae4e5dSmrg fi 2634d21ab8bcSmrgfi 26359c9ff80cSmrg 2636d21ab8bcSmrg# Not having GLib when it has been explicitly requested is an error 2637d21ab8bcSmrgif test "x$with_glib" = x"yes"; then 2638d21ab8bcSmrg if test "x$have_glib" = x"no"; then 2639d21ab8bcSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2640d21ab8bcSmrg fi 2641d21ab8bcSmrgfi 26429c9ff80cSmrg 2643d21ab8bcSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2644d21ab8bcSmrg]) # XORG_WITH_GLIB 26459c9ff80cSmrg 2646d21ab8bcSmrg# XORG_LD_WRAP([required|optional]) 2647d21ab8bcSmrg# --------------------------------- 2648d21ab8bcSmrg# Minimum version: 1.13.0 2649d21ab8bcSmrg# 2650d21ab8bcSmrg# Check if linker supports -wrap, passed via compiler flags 2651d21ab8bcSmrg# 2652d21ab8bcSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2653d21ab8bcSmrg# Otherwise the value of $enable_unit_tests is blank. 2654d21ab8bcSmrg# 2655d21ab8bcSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2656d21ab8bcSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2657d21ab8bcSmrg# available, an argument of "optional" allows use when some unit tests require 2658d21ab8bcSmrg# ld -wrap and others do not. 2659d21ab8bcSmrg# 2660d21ab8bcSmrgAC_DEFUN([XORG_LD_WRAP],[ 2661d21ab8bcSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2662d21ab8bcSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 2663d21ab8bcSmrg void __wrap_exit(int status) { return; }], 2664d21ab8bcSmrg [exit(0);])]) 2665d21ab8bcSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 2666d21ab8bcSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2667d21ab8bcSmrg if test "x$have_ld_wrap" = x"no"; then 2668d21ab8bcSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2669d21ab8bcSmrg fi 2670d21ab8bcSmrgfi 2671d21ab8bcSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2672d21ab8bcSmrg# 2673d21ab8bcSmrg]) # XORG_LD_WRAP 26749c9ff80cSmrg 2675d21ab8bcSmrg# XORG_CHECK_LINKER_FLAGS 2676d21ab8bcSmrg# ----------------------- 2677d21ab8bcSmrg# SYNOPSIS 2678d21ab8bcSmrg# 2679d21ab8bcSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2680d21ab8bcSmrg# 2681d21ab8bcSmrg# DESCRIPTION 2682d21ab8bcSmrg# 2683d21ab8bcSmrg# Check whether the given linker FLAGS work with the current language's 2684d21ab8bcSmrg# linker, or whether they give an error. 2685d21ab8bcSmrg# 2686d21ab8bcSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2687d21ab8bcSmrg# success/failure. 2688d21ab8bcSmrg# 2689d21ab8bcSmrg# PROGRAM-SOURCE is the program source to link with, if needed 2690d21ab8bcSmrg# 2691d21ab8bcSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2692d21ab8bcSmrg# 2693d21ab8bcSmrg# LICENSE 2694d21ab8bcSmrg# 2695d21ab8bcSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2696d21ab8bcSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2697d21ab8bcSmrg# Copyright (c) 2009 Matteo Frigo 2698d21ab8bcSmrg# 2699d21ab8bcSmrg# This program is free software: you can redistribute it and/or modify it 2700d21ab8bcSmrg# under the terms of the GNU General Public License as published by the 2701d21ab8bcSmrg# Free Software Foundation, either version 3 of the License, or (at your 2702d21ab8bcSmrg# option) any later version. 2703d21ab8bcSmrg# 2704d21ab8bcSmrg# This program is distributed in the hope that it will be useful, but 2705d21ab8bcSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2706d21ab8bcSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2707d21ab8bcSmrg# Public License for more details. 2708d21ab8bcSmrg# 2709d21ab8bcSmrg# You should have received a copy of the GNU General Public License along 2710d21ab8bcSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2711d21ab8bcSmrg# 2712d21ab8bcSmrg# As a special exception, the respective Autoconf Macro's copyright owner 2713d21ab8bcSmrg# gives unlimited permission to copy, distribute and modify the configure 2714d21ab8bcSmrg# scripts that are the output of Autoconf when processing the Macro. You 2715d21ab8bcSmrg# need not follow the terms of the GNU General Public License when using 2716d21ab8bcSmrg# or distributing such scripts, even though portions of the text of the 2717d21ab8bcSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 2718d21ab8bcSmrg# all other use of the material that constitutes the Autoconf Macro. 2719d21ab8bcSmrg# 2720d21ab8bcSmrg# This special exception to the GPL applies to versions of the Autoconf 2721d21ab8bcSmrg# Macro released by the Autoconf Archive. When you make and distribute a 2722d21ab8bcSmrg# modified version of the Autoconf Macro, you may extend this special 2723d21ab8bcSmrg# exception to the GPL to apply to your modified version as well.# 2724d21ab8bcSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2725d21ab8bcSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2726d21ab8bcSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2727d21ab8bcSmrgAS_LITERAL_IF([$1], 2728d21ab8bcSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2729d21ab8bcSmrg ax_save_FLAGS=$LDFLAGS 2730d21ab8bcSmrg LDFLAGS="$1" 2731d21ab8bcSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2732d21ab8bcSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2733d21ab8bcSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2734d21ab8bcSmrg LDFLAGS=$ax_save_FLAGS])], 2735d21ab8bcSmrg [ax_save_FLAGS=$LDFLAGS 2736d21ab8bcSmrg LDFLAGS="$1" 2737d21ab8bcSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2738d21ab8bcSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2739d21ab8bcSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2740d21ab8bcSmrg LDFLAGS=$ax_save_FLAGS]) 2741d21ab8bcSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2742d21ab8bcSmrgAC_MSG_RESULT($xorg_check_linker_flags) 2743d21ab8bcSmrgif test "x$xorg_check_linker_flags" = xyes; then 2744d21ab8bcSmrg m4_default([$2], :) 2745d21ab8bcSmrgelse 2746d21ab8bcSmrg m4_default([$3], :) 2747d21ab8bcSmrgfi 2748d21ab8bcSmrg]) # XORG_CHECK_LINKER_FLAGS 27496fae4e5dSmrg 2750d21ab8bcSmrg# XORG_MEMORY_CHECK_FLAGS 2751d21ab8bcSmrg# ----------------------- 2752d21ab8bcSmrg# Minimum version: 1.16.0 2753d21ab8bcSmrg# 2754d21ab8bcSmrg# This macro attempts to find appropriate memory checking functionality 2755d21ab8bcSmrg# for various platforms which unit testing code may use to catch various 2756d21ab8bcSmrg# forms of memory allocation and access errors in testing. 2757d21ab8bcSmrg# 2758d21ab8bcSmrg# Interface to module: 2759d21ab8bcSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2760d21ab8bcSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2761d21ab8bcSmrg# 2762d21ab8bcSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2763d21ab8bcSmrg# 2764d21ab8bcSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 27659c9ff80cSmrg 2766d21ab8bcSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2767d21ab8bcSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2768d21ab8bcSmrg [Environment variables to enable memory checking in tests]) 27699c9ff80cSmrg 2770d21ab8bcSmrg# Check for different types of support on different platforms 2771d21ab8bcSmrgcase $host_os in 2772d21ab8bcSmrg solaris*) 2773d21ab8bcSmrg AC_CHECK_LIB([umem], [umem_alloc], 2774d21ab8bcSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2775d21ab8bcSmrg ;; 2776d21ab8bcSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2777d21ab8bcSmrg # both directly and inverted, so should not be 0 or 255. 2778d21ab8bcSmrg malloc_debug_env='MALLOC_PERTURB_=15' 2779d21ab8bcSmrg ;; 2780d21ab8bcSmrg darwin*) 2781d21ab8bcSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2782d21ab8bcSmrg ;; 2783d21ab8bcSmrg *bsd*) 2784d21ab8bcSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2785d21ab8bcSmrg ;; 2786d21ab8bcSmrgesac 27879c9ff80cSmrg 2788d21ab8bcSmrg# User supplied flags override default flags 2789d21ab8bcSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2790d21ab8bcSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 27912fd96bc7Smrgfi 27929c9ff80cSmrg 2793d21ab8bcSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2794d21ab8bcSmrg]) # XORG_WITH_LINT 27959c9ff80cSmrg 2796d21ab8bcSmrg# XORG_CHECK_MALLOC_ZERO 2797d21ab8bcSmrg# ---------------------- 2798d21ab8bcSmrg# Minimum version: 1.0.0 2799d21ab8bcSmrg# 2800d21ab8bcSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2801d21ab8bcSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 2802d21ab8bcSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2803d21ab8bcSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2804d21ab8bcSmrgAC_ARG_ENABLE(malloc0returnsnull, 2805d21ab8bcSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 2806d21ab8bcSmrg [malloc(0) returns NULL (default: auto)]), 2807d21ab8bcSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2808d21ab8bcSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 28096fae4e5dSmrg 2810d21ab8bcSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2811d21ab8bcSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2812d21ab8bcSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2813d21ab8bcSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2814d21ab8bcSmrg#include <stdlib.h> 2815d21ab8bcSmrg],[ 2816d21ab8bcSmrg char *m0, *r0, *c0, *p; 2817d21ab8bcSmrg m0 = malloc(0); 2818d21ab8bcSmrg p = malloc(10); 2819d21ab8bcSmrg r0 = realloc(p,0); 2820d21ab8bcSmrg c0 = calloc(0,10); 2821d21ab8bcSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2822d21ab8bcSmrg])], 2823d21ab8bcSmrg [xorg_cv_malloc0_returns_null=yes], 2824d21ab8bcSmrg [xorg_cv_malloc0_returns_null=no])]) 2825d21ab8bcSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2826d21ab8bcSmrgfi 2827d21ab8bcSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 28289c9ff80cSmrg 2829d21ab8bcSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2830d21ab8bcSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2831d21ab8bcSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2832d21ab8bcSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 28332fd96bc7Smrgelse 2834d21ab8bcSmrg MALLOC_ZERO_CFLAGS="" 2835d21ab8bcSmrg XMALLOC_ZERO_CFLAGS="" 2836d21ab8bcSmrg XTMALLOC_ZERO_CFLAGS="" 28372fd96bc7Smrgfi 28389c9ff80cSmrg 2839d21ab8bcSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2840d21ab8bcSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2841d21ab8bcSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2842d21ab8bcSmrg]) # XORG_CHECK_MALLOC_ZERO 28439c9ff80cSmrg 2844d21ab8bcSmrg# XORG_WITH_LINT() 28452fd96bc7Smrg# ---------------- 2846d21ab8bcSmrg# Minimum version: 1.1.0 2847d21ab8bcSmrg# 2848d21ab8bcSmrg# This macro enables the use of a tool that flags some suspicious and 2849d21ab8bcSmrg# non-portable constructs (likely to be bugs) in C language source code. 2850d21ab8bcSmrg# It will attempt to locate the tool and use appropriate options. 2851d21ab8bcSmrg# There are various lint type tools on different platforms. 2852d21ab8bcSmrg# 2853d21ab8bcSmrg# Interface to module: 2854d21ab8bcSmrg# LINT: returns the path to the tool found on the platform 2855d21ab8bcSmrg# or the value set to LINT on the configure cmd line 2856d21ab8bcSmrg# also an Automake conditional 2857d21ab8bcSmrg# LINT_FLAGS: an Automake variable with appropriate flags 2858d21ab8bcSmrg# 2859d21ab8bcSmrg# --with-lint: 'yes' user instructs the module to use lint 2860d21ab8bcSmrg# 'no' user instructs the module not to use lint (default) 2861d21ab8bcSmrg# 2862d21ab8bcSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2863d21ab8bcSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2864d21ab8bcSmrg# 2865d21ab8bcSmrgAC_DEFUN([XORG_WITH_LINT],[ 28669c9ff80cSmrg 2867d21ab8bcSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2868d21ab8bcSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2869d21ab8bcSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2870d21ab8bcSmrg [Use a lint-style source code checker (default: disabled)])], 2871d21ab8bcSmrg [use_lint=$withval], [use_lint=no]) 28726fae4e5dSmrg 2873d21ab8bcSmrg# Obtain platform specific info like program name and options 2874d21ab8bcSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2875d21ab8bcSmrgcase $host_os in 2876d21ab8bcSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2877d21ab8bcSmrg lint_name=splint 2878d21ab8bcSmrg lint_options="-badflag" 2879d21ab8bcSmrg ;; 2880d21ab8bcSmrg *freebsd* | *netbsd*) 2881d21ab8bcSmrg lint_name=lint 2882d21ab8bcSmrg lint_options="-u -b" 2883d21ab8bcSmrg ;; 2884d21ab8bcSmrg *solaris*) 2885d21ab8bcSmrg lint_name=lint 2886d21ab8bcSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2887d21ab8bcSmrg ;; 2888d21ab8bcSmrgesac 28899c9ff80cSmrg 2890d21ab8bcSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2891d21ab8bcSmrgif test "x$use_lint" = x"yes" ; then 2892d21ab8bcSmrg AC_PATH_PROG([LINT], [$lint_name]) 2893d21ab8bcSmrg if test "x$LINT" = "x"; then 2894d21ab8bcSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2895d21ab8bcSmrg fi 2896d21ab8bcSmrgelif test "x$use_lint" = x"no" ; then 2897d21ab8bcSmrg if test "x$LINT" != "x"; then 2898d21ab8bcSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2899d21ab8bcSmrg fi 29006fae4e5dSmrgelse 2901d21ab8bcSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 29029c9ff80cSmrgfi 29039c9ff80cSmrg 2904d21ab8bcSmrg# User supplied flags override default flags 2905d21ab8bcSmrgif test "x$LINT_FLAGS" != "x"; then 2906d21ab8bcSmrg lint_options=$LINT_FLAGS 29072fd96bc7Smrgfi 29089c9ff80cSmrg 2909d21ab8bcSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2910d21ab8bcSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 29119c9ff80cSmrg 2912d21ab8bcSmrg]) # XORG_WITH_LINT 2913d21ab8bcSmrg 2914d21ab8bcSmrg# XORG_LINT_LIBRARY(LIBNAME) 2915d21ab8bcSmrg# -------------------------- 2916d21ab8bcSmrg# Minimum version: 1.1.0 2917d21ab8bcSmrg# 2918d21ab8bcSmrg# Sets up flags for building lint libraries for checking programs that call 2919d21ab8bcSmrg# functions in the library. 2920d21ab8bcSmrg# 2921d21ab8bcSmrg# Interface to module: 2922d21ab8bcSmrg# LINTLIB - Automake variable with the name of lint library file to make 2923d21ab8bcSmrg# MAKE_LINT_LIB - Automake conditional 2924d21ab8bcSmrg# 2925d21ab8bcSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2926d21ab8bcSmrg# - 'no' user instructs the module not to create a lint library (default) 2927d21ab8bcSmrg 2928d21ab8bcSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2929d21ab8bcSmrgAC_REQUIRE([XORG_WITH_LINT]) 2930d21ab8bcSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2931d21ab8bcSmrg [Create lint library (default: disabled)])], 2932d21ab8bcSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2933d21ab8bcSmrg 2934d21ab8bcSmrgif test "x$make_lint_lib" = x"yes" ; then 2935d21ab8bcSmrg LINTLIB=llib-l$1.ln 2936d21ab8bcSmrg if test "x$LINT" = "x"; then 2937d21ab8bcSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2938d21ab8bcSmrg fi 2939d21ab8bcSmrgelif test "x$make_lint_lib" != x"no" ; then 2940d21ab8bcSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 29419c9ff80cSmrgfi 29429c9ff80cSmrg 2943d21ab8bcSmrgAC_SUBST(LINTLIB) 2944d21ab8bcSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 29459c9ff80cSmrg 2946d21ab8bcSmrg]) # XORG_LINT_LIBRARY 29479c9ff80cSmrg 2948d21ab8bcSmrg# XORG_COMPILER_BRAND 2949d21ab8bcSmrg# ------------------- 2950d21ab8bcSmrg# Minimum version: 1.14.0 2951d21ab8bcSmrg# 2952d21ab8bcSmrg# Checks for various brands of compilers and sets flags as appropriate: 2953d21ab8bcSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2954d21ab8bcSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 2955d21ab8bcSmrg# clang compiler - sets CLANGCC to "yes" 2956d21ab8bcSmrg# Intel compiler - sets INTELCC to "yes" 2957d21ab8bcSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2958d21ab8bcSmrg# 2959d21ab8bcSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 2960d21ab8bcSmrgAC_LANG_CASE( 2961d21ab8bcSmrg [C], [ 2962d21ab8bcSmrg AC_REQUIRE([AC_PROG_CC_C99]) 2963d21ab8bcSmrg ], 2964d21ab8bcSmrg [C++], [ 2965d21ab8bcSmrg AC_REQUIRE([AC_PROG_CXX]) 2966d21ab8bcSmrg ] 2967d21ab8bcSmrg) 2968d21ab8bcSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2969d21ab8bcSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2970d21ab8bcSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2971d21ab8bcSmrg]) # XORG_COMPILER_BRAND 29729c9ff80cSmrg 2973d21ab8bcSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2974d21ab8bcSmrg# --------------- 2975d21ab8bcSmrg# Minimum version: 1.16.0 2976d21ab8bcSmrg# 2977d21ab8bcSmrg# Test if the compiler works when passed the given flag as a command line argument. 2978d21ab8bcSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 2979d21ab8bcSmrg# next flag in the list until there are no more options. 2980d21ab8bcSmrg# 2981d21ab8bcSmrg# Note that this does not guarantee that the compiler supports the flag as some 2982d21ab8bcSmrg# compilers will simply ignore arguments that they do not understand, but we do 2983d21ab8bcSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 2984d21ab8bcSmrg# -Werror=unused-command-line-argument 2985d21ab8bcSmrg# 2986d21ab8bcSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 2987d21ab8bcSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2988d21ab8bcSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 29899c9ff80cSmrg 2990d21ab8bcSmrgAC_LANG_COMPILER_REQUIRE 29919c9ff80cSmrg 2992d21ab8bcSmrgAC_LANG_CASE( 2993d21ab8bcSmrg [C], [ 2994d21ab8bcSmrg AC_REQUIRE([AC_PROG_CC_C99]) 2995d21ab8bcSmrg define([PREFIX], [C]) 2996d21ab8bcSmrg define([CACHE_PREFIX], [cc]) 2997d21ab8bcSmrg define([COMPILER], [$CC]) 2998d21ab8bcSmrg ], 2999d21ab8bcSmrg [C++], [ 3000d21ab8bcSmrg define([PREFIX], [CXX]) 3001d21ab8bcSmrg define([CACHE_PREFIX], [cxx]) 3002d21ab8bcSmrg define([COMPILER], [$CXX]) 3003d21ab8bcSmrg ] 3004d21ab8bcSmrg) 300589c04b6cSmrg 3006d21ab8bcSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 30079c9ff80cSmrg 3008d21ab8bcSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3009d21ab8bcSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3010d21ab8bcSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3011d21ab8bcSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3012d21ab8bcSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3013d21ab8bcSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3014d21ab8bcSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3015d21ab8bcSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3016d21ab8bcSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3017d21ab8bcSmrgfi 30189c9ff80cSmrg 3019d21ab8bcSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3020d21ab8bcSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3021d21ab8bcSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3022d21ab8bcSmrg fi 3023d21ab8bcSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3024d21ab8bcSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3025d21ab8bcSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3026d21ab8bcSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3027d21ab8bcSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3028d21ab8bcSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3029d21ab8bcSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3030d21ab8bcSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3031d21ab8bcSmrgfi 30329c9ff80cSmrg 3033d21ab8bcSmrgfound="no" 3034d21ab8bcSmrgm4_foreach([flag], m4_cdr($@), [ 3035d21ab8bcSmrg if test $found = "no" ; then 3036d21ab8bcSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3037d21ab8bcSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3038d21ab8bcSmrg fi 30399c9ff80cSmrg 3040d21ab8bcSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3041d21ab8bcSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3042d21ab8bcSmrg fi 30431f0ac6a5Smrg 3044d21ab8bcSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 30451f0ac6a5Smrg 3046d21ab8bcSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3047d21ab8bcSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3048d21ab8bcSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3049d21ab8bcSmrg AC_CACHE_VAL($cacheid, 3050d21ab8bcSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3051d21ab8bcSmrg [eval $cacheid=yes], 3052d21ab8bcSmrg [eval $cacheid=no])]) 30531f0ac6a5Smrg 3054d21ab8bcSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 30551f0ac6a5Smrg 3056d21ab8bcSmrg eval supported=\$$cacheid 3057d21ab8bcSmrg AC_MSG_RESULT([$supported]) 3058d21ab8bcSmrg if test "$supported" = "yes" ; then 3059d21ab8bcSmrg $1="$$1 ]flag[" 3060d21ab8bcSmrg found="yes" 3061d21ab8bcSmrg fi 3062d21ab8bcSmrg fi 3063d21ab8bcSmrg]) 3064d21ab8bcSmrg]) # XORG_TESTSET_CFLAG 30656fae4e5dSmrg 3066d21ab8bcSmrg# XORG_COMPILER_FLAGS 3067d21ab8bcSmrg# --------------- 3068d21ab8bcSmrg# Minimum version: 1.16.0 3069d21ab8bcSmrg# 3070d21ab8bcSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3071d21ab8bcSmrg# arguments supported by the selected compiler which do NOT alter the generated 3072d21ab8bcSmrg# code. These arguments will cause the compiler to print various warnings 3073d21ab8bcSmrg# during compilation AND turn a conservative set of warnings into errors. 3074d21ab8bcSmrg# 3075d21ab8bcSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3076d21ab8bcSmrg# future versions of util-macros as options are added to new compilers. 3077d21ab8bcSmrg# 3078d21ab8bcSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 3079d21ab8bcSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 30806fae4e5dSmrg 3081d21ab8bcSmrgAC_ARG_ENABLE(selective-werror, 3082d21ab8bcSmrg AS_HELP_STRING([--disable-selective-werror], 3083d21ab8bcSmrg [Turn off selective compiler errors. (default: enabled)]), 3084d21ab8bcSmrg [SELECTIVE_WERROR=$enableval], 3085d21ab8bcSmrg [SELECTIVE_WERROR=yes]) 30866fae4e5dSmrg 3087d21ab8bcSmrgAC_LANG_CASE( 3088d21ab8bcSmrg [C], [ 3089d21ab8bcSmrg define([PREFIX], [C]) 3090d21ab8bcSmrg ], 3091d21ab8bcSmrg [C++], [ 3092d21ab8bcSmrg define([PREFIX], [CXX]) 3093d21ab8bcSmrg ] 3094d21ab8bcSmrg) 3095d21ab8bcSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 3096d21ab8bcSmrgif test "x$SUNCC" = "xyes"; then 3097d21ab8bcSmrg [BASE_]PREFIX[FLAGS]="-v" 3098d21ab8bcSmrgelse 3099d21ab8bcSmrg [BASE_]PREFIX[FLAGS]="" 3100d21ab8bcSmrgfi 31016fae4e5dSmrg 3102d21ab8bcSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3103d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3104d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3105d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3106d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 31076fae4e5dSmrg 3108d21ab8bcSmrgAC_LANG_CASE( 3109d21ab8bcSmrg [C], [ 3110d21ab8bcSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3111d21ab8bcSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3112d21ab8bcSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3113d21ab8bcSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3114d21ab8bcSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3115d21ab8bcSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3116d21ab8bcSmrg ] 3117d21ab8bcSmrg) 31181f0ac6a5Smrg 3119d21ab8bcSmrg# This chunk adds additional warnings that could catch undesired effects. 3120d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3121d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3122d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3123d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3124d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3125d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3126d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 31279c9ff80cSmrg 3128d21ab8bcSmrg# These are currently disabled because they are noisy. They will be enabled 3129d21ab8bcSmrg# in the future once the codebase is sufficiently modernized to silence 3130d21ab8bcSmrg# them. For now, I don't want them to drown out the other warnings. 3131d21ab8bcSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3132d21ab8bcSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3133d21ab8bcSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 31341f0ac6a5Smrg 3135d21ab8bcSmrg# Turn some warnings into errors, so we don't accidently get successful builds 3136d21ab8bcSmrg# when there are problems that should be fixed. 31371f0ac6a5Smrg 3138d21ab8bcSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 3139d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3140d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3141d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3142d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3143d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3144d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3145d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3146d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3147d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3148d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3149d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3150d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3151d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3152d21ab8bcSmrgelse 3153d21ab8bcSmrgAC_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]) 3154d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3155d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3156d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3157d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3158d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3159d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3160d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3161d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3162d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3163d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3164d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3165d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3166d21ab8bcSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3167d21ab8bcSmrgfi 31689c9ff80cSmrg 3169d21ab8bcSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3170d21ab8bcSmrg]) # XORG_COMPILER_FLAGS 31711f0ac6a5Smrg 3172d21ab8bcSmrg# XORG_CWARNFLAGS 3173d21ab8bcSmrg# --------------- 3174d21ab8bcSmrg# Minimum version: 1.2.0 3175d21ab8bcSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3176d21ab8bcSmrg# 3177d21ab8bcSmrg# Defines CWARNFLAGS to enable C compiler warnings. 3178d21ab8bcSmrg# 3179d21ab8bcSmrg# This function is deprecated because it defines -fno-strict-aliasing 3180d21ab8bcSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3181d21ab8bcSmrg# is needed, then it should be added explicitly in the module when 3182d21ab8bcSmrg# it is updated to use BASE_CFLAGS. 3183d21ab8bcSmrg# 3184d21ab8bcSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3185d21ab8bcSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3186d21ab8bcSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3187d21ab8bcSmrgAC_LANG_CASE( 3188d21ab8bcSmrg [C], [ 3189d21ab8bcSmrg CWARNFLAGS="$BASE_CFLAGS" 3190d21ab8bcSmrg if test "x$GCC" = xyes ; then 3191d21ab8bcSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3192d21ab8bcSmrg fi 3193d21ab8bcSmrg AC_SUBST(CWARNFLAGS) 3194d21ab8bcSmrg ] 3195d21ab8bcSmrg) 3196d21ab8bcSmrg]) # XORG_CWARNFLAGS 31971f0ac6a5Smrg 3198d21ab8bcSmrg# XORG_STRICT_OPTION 3199d21ab8bcSmrg# ----------------------- 3200d21ab8bcSmrg# Minimum version: 1.3.0 3201d21ab8bcSmrg# 3202d21ab8bcSmrg# Add configure option to enable strict compilation flags, such as treating 3203d21ab8bcSmrg# warnings as fatal errors. 3204d21ab8bcSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3205d21ab8bcSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3206d21ab8bcSmrg# 3207d21ab8bcSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3208d21ab8bcSmrg# when strict compilation is unconditionally desired. 3209d21ab8bcSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3210d21ab8bcSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3211d21ab8bcSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 32129c9ff80cSmrg 3213d21ab8bcSmrgAC_ARG_ENABLE(strict-compilation, 3214d21ab8bcSmrg AS_HELP_STRING([--enable-strict-compilation], 3215d21ab8bcSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3216d21ab8bcSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 32171f0ac6a5Smrg 3218d21ab8bcSmrgAC_LANG_CASE( 3219d21ab8bcSmrg [C], [ 3220d21ab8bcSmrg define([PREFIX], [C]) 3221d21ab8bcSmrg ], 3222d21ab8bcSmrg [C++], [ 3223d21ab8bcSmrg define([PREFIX], [CXX]) 3224d21ab8bcSmrg ] 3225d21ab8bcSmrg) 32261f0ac6a5Smrg 3227d21ab8bcSmrg[STRICT_]PREFIX[FLAGS]="" 3228d21ab8bcSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3229d21ab8bcSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 32301f0ac6a5Smrg 3231d21ab8bcSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3232d21ab8bcSmrg# activate it with -Werror, so we add it here explicitly. 3233d21ab8bcSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 32341f0ac6a5Smrg 3235d21ab8bcSmrgif test "x$STRICT_COMPILE" = "xyes"; then 3236d21ab8bcSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3237d21ab8bcSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3238d21ab8bcSmrgfi 3239d21ab8bcSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3240d21ab8bcSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3241d21ab8bcSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3242d21ab8bcSmrg]) # XORG_STRICT_OPTION 32431f0ac6a5Smrg 3244d21ab8bcSmrg# XORG_DEFAULT_OPTIONS 3245d21ab8bcSmrg# -------------------- 3246d21ab8bcSmrg# Minimum version: 1.3.0 3247d21ab8bcSmrg# 3248d21ab8bcSmrg# Defines default options for X.Org modules. 3249d21ab8bcSmrg# 3250d21ab8bcSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3251d21ab8bcSmrgAC_REQUIRE([AC_PROG_INSTALL]) 3252d21ab8bcSmrgXORG_COMPILER_FLAGS 3253d21ab8bcSmrgXORG_CWARNFLAGS 3254d21ab8bcSmrgXORG_STRICT_OPTION 3255d21ab8bcSmrgXORG_RELEASE_VERSION 3256d21ab8bcSmrgXORG_CHANGELOG 3257d21ab8bcSmrgXORG_INSTALL 3258d21ab8bcSmrgXORG_MANPAGE_SECTIONS 3259d21ab8bcSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3260d21ab8bcSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3261d21ab8bcSmrg]) # XORG_DEFAULT_OPTIONS 32622fd96bc7Smrg 3263d21ab8bcSmrg# XORG_INSTALL() 3264d21ab8bcSmrg# ---------------- 3265d21ab8bcSmrg# Minimum version: 1.4.0 3266d21ab8bcSmrg# 3267d21ab8bcSmrg# Defines the variable INSTALL_CMD as the command to copy 3268d21ab8bcSmrg# INSTALL from $prefix/share/util-macros. 3269d21ab8bcSmrg# 3270d21ab8bcSmrgAC_DEFUN([XORG_INSTALL], [ 3271d21ab8bcSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3272d21ab8bcSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3273d21ab8bcSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3274d21ab8bcSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3275d21ab8bcSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3276d21ab8bcSmrgtouch \$(top_srcdir)/INSTALL; \ 3277d21ab8bcSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3278d21ab8bcSmrgAC_SUBST([INSTALL_CMD]) 3279d21ab8bcSmrg]) # XORG_INSTALL 3280d21ab8bcSmrgdnl Copyright 2005 Red Hat, Inc 3281d21ab8bcSmrgdnl 3282d21ab8bcSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3283d21ab8bcSmrgdnl documentation for any purpose is hereby granted without fee, provided that 3284d21ab8bcSmrgdnl the above copyright notice appear in all copies and that both that 3285d21ab8bcSmrgdnl copyright notice and this permission notice appear in supporting 3286d21ab8bcSmrgdnl documentation. 3287d21ab8bcSmrgdnl 3288d21ab8bcSmrgdnl The above copyright notice and this permission notice shall be included 3289d21ab8bcSmrgdnl in all copies or substantial portions of the Software. 3290d21ab8bcSmrgdnl 3291d21ab8bcSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3292d21ab8bcSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3293d21ab8bcSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3294d21ab8bcSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3295d21ab8bcSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3296d21ab8bcSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3297d21ab8bcSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 3298d21ab8bcSmrgdnl 3299d21ab8bcSmrgdnl Except as contained in this notice, the name of the copyright holders shall 3300d21ab8bcSmrgdnl not be used in advertising or otherwise to promote the sale, use or 3301d21ab8bcSmrgdnl other dealings in this Software without prior written authorization 3302d21ab8bcSmrgdnl from the copyright holders. 3303d21ab8bcSmrgdnl 33041f0ac6a5Smrg 3305d21ab8bcSmrg# XORG_RELEASE_VERSION 3306d21ab8bcSmrg# -------------------- 3307d21ab8bcSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 33086fae4e5dSmrg 3309d21ab8bcSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3310d21ab8bcSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3311d21ab8bcSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3312d21ab8bcSmrg [Major version of this package]) 3313d21ab8bcSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3314d21ab8bcSmrg if test "x$PVM" = "x"; then 3315d21ab8bcSmrg PVM="0" 3316d21ab8bcSmrg fi 3317d21ab8bcSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3318d21ab8bcSmrg [$PVM], 3319d21ab8bcSmrg [Minor version of this package]) 3320d21ab8bcSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3321d21ab8bcSmrg if test "x$PVP" = "x"; then 3322d21ab8bcSmrg PVP="0" 3323d21ab8bcSmrg fi 3324d21ab8bcSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3325d21ab8bcSmrg [$PVP], 3326d21ab8bcSmrg [Patch version of this package]) 3327d21ab8bcSmrg]) 33281f0ac6a5Smrg 3329d21ab8bcSmrg# XORG_CHANGELOG() 3330d21ab8bcSmrg# ---------------- 3331d21ab8bcSmrg# Minimum version: 1.2.0 3332d21ab8bcSmrg# 3333d21ab8bcSmrg# Defines the variable CHANGELOG_CMD as the command to generate 3334d21ab8bcSmrg# ChangeLog from git. 3335d21ab8bcSmrg# 3336d21ab8bcSmrg# 3337d21ab8bcSmrgAC_DEFUN([XORG_CHANGELOG], [ 3338d21ab8bcSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3339d21ab8bcSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3340d21ab8bcSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3341d21ab8bcSmrgtouch \$(top_srcdir)/ChangeLog; \ 3342d21ab8bcSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3343d21ab8bcSmrgAC_SUBST([CHANGELOG_CMD]) 3344d21ab8bcSmrg]) # XORG_CHANGELOG 33451f0ac6a5Smrg 3346d21ab8bcSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3347d21ab8bcSmrg# 3348d21ab8bcSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3349d21ab8bcSmrg# Foundation, Inc. 3350d21ab8bcSmrg# Written by Gordon Matzigkeit, 1996 3351d21ab8bcSmrg# 3352d21ab8bcSmrg# This file is free software; the Free Software Foundation gives 3353d21ab8bcSmrg# unlimited permission to copy and/or distribute it, with or without 3354d21ab8bcSmrg# modifications, as long as this notice is preserved. 33551f0ac6a5Smrg 3356d21ab8bcSmrgm4_define([_LT_COPYING], [dnl 3357d21ab8bcSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 3358d21ab8bcSmrg# This is free software; see the source for copying conditions. There is NO 3359d21ab8bcSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 33601f0ac6a5Smrg 3361d21ab8bcSmrg# GNU Libtool is free software; you can redistribute it and/or modify 3362d21ab8bcSmrg# it under the terms of the GNU General Public License as published by 3363d21ab8bcSmrg# the Free Software Foundation; either version 2 of of the License, or 3364d21ab8bcSmrg# (at your option) any later version. 3365d21ab8bcSmrg# 3366d21ab8bcSmrg# As a special exception to the GNU General Public License, if you 3367d21ab8bcSmrg# distribute this file as part of a program or library that is built 3368d21ab8bcSmrg# using GNU Libtool, you may include this file under the same 3369d21ab8bcSmrg# distribution terms that you use for the rest of that program. 3370d21ab8bcSmrg# 3371d21ab8bcSmrg# GNU Libtool is distributed in the hope that it will be useful, but 3372d21ab8bcSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3373d21ab8bcSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3374d21ab8bcSmrg# GNU General Public License for more details. 3375d21ab8bcSmrg# 3376d21ab8bcSmrg# You should have received a copy of the GNU General Public License 3377d21ab8bcSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3378d21ab8bcSmrg]) 33791f0ac6a5Smrg 3380d21ab8bcSmrg# serial 59 LT_INIT 33811f0ac6a5Smrg 33826fae4e5dSmrg 3383d21ab8bcSmrg# LT_PREREQ(VERSION) 3384d21ab8bcSmrg# ------------------ 3385d21ab8bcSmrg# Complain and exit if this libtool version is less that VERSION. 3386d21ab8bcSmrgm4_defun([LT_PREREQ], 3387d21ab8bcSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3388d21ab8bcSmrg [m4_default([$3], 3389d21ab8bcSmrg [m4_fatal([Libtool version $1 or higher is required], 3390d21ab8bcSmrg 63)])], 3391d21ab8bcSmrg [$2])]) 33926fae4e5dSmrg 33936fae4e5dSmrg 3394d21ab8bcSmrg# _LT_CHECK_BUILDDIR 3395d21ab8bcSmrg# ------------------ 3396d21ab8bcSmrg# Complain if the absolute build directory name contains unusual characters 3397d21ab8bcSmrgm4_defun([_LT_CHECK_BUILDDIR], 3398d21ab8bcSmrg[case `pwd` in 3399d21ab8bcSmrg *\ * | *\ *) 3400d21ab8bcSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3401d21ab8bcSmrgesac 3402d21ab8bcSmrg]) 34031f0ac6a5Smrg 34041f0ac6a5Smrg 3405d21ab8bcSmrg# LT_INIT([OPTIONS]) 3406d21ab8bcSmrg# ------------------ 3407d21ab8bcSmrgAC_DEFUN([LT_INIT], 3408d21ab8bcSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3409d21ab8bcSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3410d21ab8bcSmrgAC_BEFORE([$0], [LT_LANG])dnl 3411d21ab8bcSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 3412d21ab8bcSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 3413d21ab8bcSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 34142fd96bc7Smrg 3415d21ab8bcSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 3416d21ab8bcSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3417d21ab8bcSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3418d21ab8bcSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3419d21ab8bcSmrgdnl unless we require an AC_DEFUNed macro: 3420d21ab8bcSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 3421d21ab8bcSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 3422d21ab8bcSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 3423d21ab8bcSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 3424d21ab8bcSmrgm4_require([_LT_PROG_LTMAIN])dnl 34252fd96bc7Smrg 3426d21ab8bcSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 34272fd96bc7Smrg 3428d21ab8bcSmrgdnl Parse OPTIONS 3429d21ab8bcSmrg_LT_SET_OPTIONS([$0], [$1]) 34302fd96bc7Smrg 3431d21ab8bcSmrg# This can be used to rebuild libtool when needed 3432d21ab8bcSmrgLIBTOOL_DEPS=$ltmain 34332fd96bc7Smrg 3434d21ab8bcSmrg# Always use our own libtool. 3435d21ab8bcSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 3436d21ab8bcSmrgAC_SUBST(LIBTOOL)dnl 34372fd96bc7Smrg 3438d21ab8bcSmrg_LT_SETUP 34392fd96bc7Smrg 3440d21ab8bcSmrg# Only expand once: 3441d21ab8bcSmrgm4_define([LT_INIT]) 3442d21ab8bcSmrg])# LT_INIT 34432fd96bc7Smrg 34442fd96bc7Smrg# Old names: 3445d21ab8bcSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3446d21ab8bcSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 34472fd96bc7Smrgdnl aclocal-1.4 backwards compatibility: 3448d21ab8bcSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3449d21ab8bcSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 34502fd96bc7Smrg 34512fd96bc7Smrg 3452d21ab8bcSmrg# _LT_PREPARE_CC_BASENAME 3453d21ab8bcSmrg# ----------------------- 3454d21ab8bcSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 3455d21ab8bcSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3456d21ab8bcSmrgfunc_cc_basename () 3457d21ab8bcSmrg{ 3458d21ab8bcSmrg for cc_temp in @S|@*""; do 3459d21ab8bcSmrg case $cc_temp in 3460d21ab8bcSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3461d21ab8bcSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3462d21ab8bcSmrg \-*) ;; 3463d21ab8bcSmrg *) break;; 3464d21ab8bcSmrg esac 3465d21ab8bcSmrg done 3466d21ab8bcSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3467d21ab8bcSmrg} 3468d21ab8bcSmrg])# _LT_PREPARE_CC_BASENAME 34692fd96bc7Smrg 34702fd96bc7Smrg 3471d21ab8bcSmrg# _LT_CC_BASENAME(CC) 3472d21ab8bcSmrg# ------------------- 3473d21ab8bcSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3474d21ab8bcSmrg# but that macro is also expanded into generated libtool script, which 3475d21ab8bcSmrg# arranges for $SED and $ECHO to be set by different means. 3476d21ab8bcSmrgm4_defun([_LT_CC_BASENAME], 3477d21ab8bcSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3478d21ab8bcSmrgAC_REQUIRE([_LT_DECL_SED])dnl 3479d21ab8bcSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3480d21ab8bcSmrgfunc_cc_basename $1 3481d21ab8bcSmrgcc_basename=$func_cc_basename_result 3482d21ab8bcSmrg]) 34832fd96bc7Smrg 34842fd96bc7Smrg 3485d21ab8bcSmrg# _LT_FILEUTILS_DEFAULTS 34862fd96bc7Smrg# ---------------------- 3487d21ab8bcSmrg# It is okay to use these file commands and assume they have been set 3488d21ab8bcSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3489d21ab8bcSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 3490d21ab8bcSmrg[: ${CP="cp -f"} 3491d21ab8bcSmrg: ${MV="mv -f"} 3492d21ab8bcSmrg: ${RM="rm -f"} 3493d21ab8bcSmrg])# _LT_FILEUTILS_DEFAULTS 34942fd96bc7Smrg 34952fd96bc7Smrg 3496d21ab8bcSmrg# _LT_SETUP 3497d21ab8bcSmrg# --------- 3498d21ab8bcSmrgm4_defun([_LT_SETUP], 3499d21ab8bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3500d21ab8bcSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3501d21ab8bcSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3502d21ab8bcSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 35032fd96bc7Smrg 3504d21ab8bcSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3505d21ab8bcSmrgdnl 3506d21ab8bcSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 3507d21ab8bcSmrg_LT_DECL([], [host], [0])dnl 3508d21ab8bcSmrg_LT_DECL([], [host_os], [0])dnl 3509d21ab8bcSmrgdnl 3510d21ab8bcSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 3511d21ab8bcSmrg_LT_DECL([], [build], [0])dnl 3512d21ab8bcSmrg_LT_DECL([], [build_os], [0])dnl 3513d21ab8bcSmrgdnl 3514d21ab8bcSmrgAC_REQUIRE([AC_PROG_CC])dnl 3515d21ab8bcSmrgAC_REQUIRE([LT_PATH_LD])dnl 3516d21ab8bcSmrgAC_REQUIRE([LT_PATH_NM])dnl 3517d21ab8bcSmrgdnl 3518d21ab8bcSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 3519d21ab8bcSmrgtest -z "$LN_S" && LN_S="ln -s" 3520d21ab8bcSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3521d21ab8bcSmrgdnl 3522d21ab8bcSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 3523d21ab8bcSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3524d21ab8bcSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3525d21ab8bcSmrgdnl 3526d21ab8bcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3527d21ab8bcSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3528d21ab8bcSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3529d21ab8bcSmrgm4_require([_LT_CMD_RELOAD])dnl 3530d21ab8bcSmrgm4_require([_LT_DECL_FILECMD])dnl 3531d21ab8bcSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 3532d21ab8bcSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3533d21ab8bcSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 3534d21ab8bcSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3535d21ab8bcSmrgm4_require([_LT_WITH_SYSROOT])dnl 3536d21ab8bcSmrgm4_require([_LT_CMD_TRUNCATE])dnl 35372fd96bc7Smrg 3538d21ab8bcSmrg_LT_CONFIG_LIBTOOL_INIT([ 3539d21ab8bcSmrg# See if we are running on zsh, and set the options that allow our 3540d21ab8bcSmrg# commands through without removal of \ escapes INIT. 3541d21ab8bcSmrgif test -n "\${ZSH_VERSION+set}"; then 3542d21ab8bcSmrg setopt NO_GLOB_SUBST 3543d21ab8bcSmrgfi 3544d21ab8bcSmrg]) 3545d21ab8bcSmrgif test -n "${ZSH_VERSION+set}"; then 3546d21ab8bcSmrg setopt NO_GLOB_SUBST 3547d21ab8bcSmrgfi 35482fd96bc7Smrg 3549d21ab8bcSmrg_LT_CHECK_OBJDIR 35502fd96bc7Smrg 3551d21ab8bcSmrgm4_require([_LT_TAG_COMPILER])dnl 3552d21ab8bcSmrg 3553d21ab8bcSmrgcase $host_os in 3554d21ab8bcSmrgaix3*) 3555d21ab8bcSmrg # AIX sometimes has problems with the GCC collect2 program. For some 3556d21ab8bcSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 3557d21ab8bcSmrg # vanish in a puff of smoke. 3558d21ab8bcSmrg if test set != "${COLLECT_NAMES+set}"; then 3559d21ab8bcSmrg COLLECT_NAMES= 3560d21ab8bcSmrg export COLLECT_NAMES 35612fd96bc7Smrg fi 35626fae4e5dSmrg ;; 3563d21ab8bcSmrgesac 35641f0ac6a5Smrg 3565d21ab8bcSmrg# Global variables: 3566d21ab8bcSmrgofile=libtool 3567d21ab8bcSmrgcan_build_shared=yes 35681f0ac6a5Smrg 3569d21ab8bcSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 3570d21ab8bcSmrg# ICC, which need '.lib'). 3571d21ab8bcSmrglibext=a 35721f0ac6a5Smrg 3573d21ab8bcSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 35741f0ac6a5Smrg 3575d21ab8bcSmrgold_CC=$CC 3576d21ab8bcSmrgold_CFLAGS=$CFLAGS 35771f0ac6a5Smrg 3578d21ab8bcSmrg# Set sane defaults for various variables 3579d21ab8bcSmrgtest -z "$CC" && CC=cc 3580d21ab8bcSmrgtest -z "$LTCC" && LTCC=$CC 3581d21ab8bcSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3582d21ab8bcSmrgtest -z "$LD" && LD=ld 3583d21ab8bcSmrgtest -z "$ac_objext" && ac_objext=o 35841f0ac6a5Smrg 3585d21ab8bcSmrg_LT_CC_BASENAME([$compiler]) 3586d21ab8bcSmrg 3587d21ab8bcSmrg# Only perform the check for file, if the check method requires it 3588d21ab8bcSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 3589d21ab8bcSmrgcase $deplibs_check_method in 3590d21ab8bcSmrgfile_magic*) 3591d21ab8bcSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3592d21ab8bcSmrg _LT_PATH_MAGIC 35936fae4e5dSmrg fi 35946fae4e5dSmrg ;; 3595d21ab8bcSmrgesac 35961f0ac6a5Smrg 3597d21ab8bcSmrg# Use C for the default configuration in the libtool script 3598d21ab8bcSmrgLT_SUPPORTED_TAG([CC]) 3599d21ab8bcSmrg_LT_LANG_C_CONFIG 3600d21ab8bcSmrg_LT_LANG_DEFAULT_CONFIG 3601d21ab8bcSmrg_LT_CONFIG_COMMANDS 3602d21ab8bcSmrg])# _LT_SETUP 36031f0ac6a5Smrg 36041f0ac6a5Smrg 3605d21ab8bcSmrg# _LT_PREPARE_SED_QUOTE_VARS 3606d21ab8bcSmrg# -------------------------- 3607d21ab8bcSmrg# Define a few sed substitution that help us do robust quoting. 3608d21ab8bcSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3609d21ab8bcSmrg[# Backslashify metacharacters that are still active within 3610d21ab8bcSmrg# double-quoted strings. 3611d21ab8bcSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 36121f0ac6a5Smrg 3613d21ab8bcSmrg# Same as above, but do not quote variable references. 3614d21ab8bcSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 36151f0ac6a5Smrg 3616d21ab8bcSmrg# Sed substitution to delay expansion of an escaped shell variable in a 3617d21ab8bcSmrg# double_quote_subst'ed string. 3618d21ab8bcSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 36191f0ac6a5Smrg 3620d21ab8bcSmrg# Sed substitution to delay expansion of an escaped single quote. 3621d21ab8bcSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 36221f0ac6a5Smrg 3623d21ab8bcSmrg# Sed substitution to avoid accidental globbing in evaled expressions 3624d21ab8bcSmrgno_glob_subst='s/\*/\\\*/g' 3625d21ab8bcSmrg]) 36261f0ac6a5Smrg 3627d21ab8bcSmrg# _LT_PROG_LTMAIN 3628d21ab8bcSmrg# --------------- 3629d21ab8bcSmrg# Note that this code is called both from 'configure', and 'config.status' 3630d21ab8bcSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3631d21ab8bcSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3632d21ab8bcSmrg# so we pass a copy along to make sure it has a sensible value anyway. 3633d21ab8bcSmrgm4_defun([_LT_PROG_LTMAIN], 3634d21ab8bcSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3635d21ab8bcSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3636d21ab8bcSmrgltmain=$ac_aux_dir/ltmain.sh 3637d21ab8bcSmrg])# _LT_PROG_LTMAIN 36381f0ac6a5Smrg 36396fae4e5dSmrg 36401f0ac6a5Smrg 3641d21ab8bcSmrg# So that we can recreate a full libtool script including additional 3642d21ab8bcSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3643d21ab8bcSmrg# in macros and then make a single call at the end using the 'libtool' 3644d21ab8bcSmrg# label. 36456fae4e5dSmrg 36461f0ac6a5Smrg 3647d21ab8bcSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3648d21ab8bcSmrg# ---------------------------------------- 3649d21ab8bcSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3650d21ab8bcSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3651d21ab8bcSmrg[m4_ifval([$1], 3652d21ab8bcSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3653d21ab8bcSmrg [$1 3654d21ab8bcSmrg])])]) 36556fae4e5dSmrg 3656d21ab8bcSmrg# Initialize. 3657d21ab8bcSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 36581f0ac6a5Smrg 36591f0ac6a5Smrg 3660d21ab8bcSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3661d21ab8bcSmrg# ------------------------------ 3662d21ab8bcSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3663d21ab8bcSmrgm4_define([_LT_CONFIG_LIBTOOL], 3664d21ab8bcSmrg[m4_ifval([$1], 3665d21ab8bcSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3666d21ab8bcSmrg [$1 3667d21ab8bcSmrg])])]) 36681f0ac6a5Smrg 3669d21ab8bcSmrg# Initialize. 3670d21ab8bcSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 36711f0ac6a5Smrg 3672d21ab8bcSmrg 3673d21ab8bcSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3674d21ab8bcSmrg# ----------------------------------------------------- 3675d21ab8bcSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3676d21ab8bcSmrg[_LT_CONFIG_LIBTOOL([$1]) 3677d21ab8bcSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 36782fd96bc7Smrg]) 36792fd96bc7Smrg 36806fae4e5dSmrg 3681d21ab8bcSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3682d21ab8bcSmrg# ----------------------------- 3683d21ab8bcSmrg# Add leading comment marks to the start of each line, and a trailing 3684d21ab8bcSmrg# full-stop to the whole comment if one is not present already. 3685d21ab8bcSmrgm4_define([_LT_FORMAT_COMMENT], 3686d21ab8bcSmrg[m4_ifval([$1], [ 3687d21ab8bcSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3688d21ab8bcSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3689d21ab8bcSmrg)]) 36906fae4e5dSmrg 36916fae4e5dSmrg 36926fae4e5dSmrg 36936fae4e5dSmrg 36941f0ac6a5Smrg 3695d21ab8bcSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3696d21ab8bcSmrg# ------------------------------------------------------------------- 3697d21ab8bcSmrg# CONFIGNAME is the name given to the value in the libtool script. 3698d21ab8bcSmrg# VARNAME is the (base) name used in the configure script. 3699d21ab8bcSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3700d21ab8bcSmrg# VARNAME. Any other value will be used directly. 3701d21ab8bcSmrgm4_define([_LT_DECL], 3702d21ab8bcSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3703d21ab8bcSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3704d21ab8bcSmrg [m4_ifval([$1], [$1], [$2])]) 3705d21ab8bcSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3706d21ab8bcSmrg m4_ifval([$4], 3707d21ab8bcSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3708d21ab8bcSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3709d21ab8bcSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3710d21ab8bcSmrg]) 3711e5410a46Smrg 37121f0ac6a5Smrg 3713d21ab8bcSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3714d21ab8bcSmrg# -------------------------------------------------------- 3715d21ab8bcSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 37161f0ac6a5Smrg 37171f0ac6a5Smrg 3718d21ab8bcSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3719d21ab8bcSmrg# ------------------------------------------------ 3720d21ab8bcSmrgm4_define([lt_decl_tag_varnames], 3721d21ab8bcSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 37221f0ac6a5Smrg 37236fae4e5dSmrg 3724d21ab8bcSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3725d21ab8bcSmrg# --------------------------------------------------------- 3726d21ab8bcSmrgm4_define([_lt_decl_filter], 3727d21ab8bcSmrg[m4_case([$#], 3728d21ab8bcSmrg [0], [m4_fatal([$0: too few arguments: $#])], 3729d21ab8bcSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3730d21ab8bcSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3731d21ab8bcSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3732d21ab8bcSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3733d21ab8bcSmrg]) 37346fae4e5dSmrg 37351f0ac6a5Smrg 3736d21ab8bcSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3737d21ab8bcSmrg# -------------------------------------------------- 3738d21ab8bcSmrgm4_define([lt_decl_quote_varnames], 3739d21ab8bcSmrg[_lt_decl_filter([value], [1], $@)]) 37409c9ff80cSmrg 37411f0ac6a5Smrg 3742d21ab8bcSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3743d21ab8bcSmrg# --------------------------------------------------- 3744d21ab8bcSmrgm4_define([lt_decl_dquote_varnames], 3745d21ab8bcSmrg[_lt_decl_filter([value], [2], $@)]) 37461f0ac6a5Smrg 37471f0ac6a5Smrg 3748d21ab8bcSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3749d21ab8bcSmrg# --------------------------------------------------- 3750d21ab8bcSmrgm4_define([lt_decl_varnames_tagged], 3751d21ab8bcSmrg[m4_assert([$# <= 2])dnl 3752d21ab8bcSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 3753d21ab8bcSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3754d21ab8bcSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3755d21ab8bcSmrgm4_define([_lt_decl_varnames_tagged], 3756d21ab8bcSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 37571f0ac6a5Smrg 37589c9ff80cSmrg 3759d21ab8bcSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3760d21ab8bcSmrg# ------------------------------------------------ 3761d21ab8bcSmrgm4_define([lt_decl_all_varnames], 3762d21ab8bcSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3763d21ab8bcSmrg m4_if([$2], [], 3764d21ab8bcSmrg m4_quote(lt_decl_varnames), 3765d21ab8bcSmrg m4_quote(m4_shift($@))))[]dnl 3766d21ab8bcSmrg]) 3767d21ab8bcSmrgm4_define([_lt_decl_all_varnames], 3768d21ab8bcSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 3769d21ab8bcSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3770d21ab8bcSmrg]) 37716fae4e5dSmrg 37729c9ff80cSmrg 3773d21ab8bcSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3774d21ab8bcSmrg# ------------------------------------ 3775d21ab8bcSmrg# Quote a variable value, and forward it to 'config.status' so that its 3776d21ab8bcSmrg# declaration there will have the same value as in 'configure'. VARNAME 3777d21ab8bcSmrg# must have a single quote delimited value for this to work. 3778d21ab8bcSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3779d21ab8bcSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 37806fae4e5dSmrg 37811f0ac6a5Smrg 3782d21ab8bcSmrg# _LT_CONFIG_STATUS_DECLARATIONS 3783d21ab8bcSmrg# ------------------------------ 3784d21ab8bcSmrg# We delimit libtool config variables with single quotes, so when 3785d21ab8bcSmrg# we write them to config.status, we have to be sure to quote all 3786d21ab8bcSmrg# embedded single quotes properly. In configure, this macro expands 3787d21ab8bcSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3788d21ab8bcSmrg# 3789d21ab8bcSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3790d21ab8bcSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3791d21ab8bcSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3792d21ab8bcSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 37931f0ac6a5Smrg 37941f0ac6a5Smrg 3795d21ab8bcSmrg# _LT_LIBTOOL_TAGS 3796d21ab8bcSmrg# ---------------- 3797d21ab8bcSmrg# Output comment and list of tags supported by the script 3798d21ab8bcSmrgm4_defun([_LT_LIBTOOL_TAGS], 3799d21ab8bcSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3800d21ab8bcSmrgavailable_tags='_LT_TAGS'dnl 3801d21ab8bcSmrg]) 38021f0ac6a5Smrg 38031f0ac6a5Smrg 3804d21ab8bcSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3805d21ab8bcSmrg# ----------------------------------- 3806d21ab8bcSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3807d21ab8bcSmrg# expand to a commented shell variable setting: 3808d21ab8bcSmrg# 3809d21ab8bcSmrg# # Some comment about what VAR is for. 3810d21ab8bcSmrg# visible_name=$lt_internal_name 3811d21ab8bcSmrgm4_define([_LT_LIBTOOL_DECLARE], 3812d21ab8bcSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3813d21ab8bcSmrg [description])))[]dnl 3814d21ab8bcSmrgm4_pushdef([_libtool_name], 3815d21ab8bcSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3816d21ab8bcSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3817d21ab8bcSmrg [0], [_libtool_name=[$]$1], 3818d21ab8bcSmrg [1], [_libtool_name=$lt_[]$1], 3819d21ab8bcSmrg [2], [_libtool_name=$lt_[]$1], 3820d21ab8bcSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3821d21ab8bcSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3822d21ab8bcSmrg]) 38231f0ac6a5Smrg 38249c9ff80cSmrg 3825d21ab8bcSmrg# _LT_LIBTOOL_CONFIG_VARS 3826d21ab8bcSmrg# ----------------------- 3827d21ab8bcSmrg# Produce commented declarations of non-tagged libtool config variables 3828d21ab8bcSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3829d21ab8bcSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3830d21ab8bcSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 3831d21ab8bcSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 3832d21ab8bcSmrg[m4_foreach([_lt_var], 3833d21ab8bcSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3834d21ab8bcSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 38351f0ac6a5Smrg 38361f0ac6a5Smrg 3837d21ab8bcSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 3838d21ab8bcSmrg# ------------------------- 3839d21ab8bcSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 3840d21ab8bcSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3841d21ab8bcSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 38421f0ac6a5Smrg 38431f0ac6a5Smrg 3844d21ab8bcSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 3845d21ab8bcSmrg# ------------------------------ 3846d21ab8bcSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 38476fae4e5dSmrg 38486fae4e5dSmrg 3849d21ab8bcSmrg# _LT_CONFIG_COMMANDS 3850d21ab8bcSmrg# ------------------- 3851d21ab8bcSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3852d21ab8bcSmrg# variables for single and double quote escaping we saved from calls 3853d21ab8bcSmrg# to _LT_DECL, we can put quote escaped variables declarations 3854d21ab8bcSmrg# into 'config.status', and then the shell code to quote escape them in 3855d21ab8bcSmrg# for loops in 'config.status'. Finally, any additional code accumulated 3856d21ab8bcSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3857d21ab8bcSmrgm4_defun([_LT_CONFIG_COMMANDS], 3858d21ab8bcSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3859d21ab8bcSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3860d21ab8bcSmrg dnl instead of duplicating it all over again into config.status, 3861d21ab8bcSmrg dnl then we will have config.status run $CONFIG_LT later, so it 3862d21ab8bcSmrg dnl needs to know what name is stored there: 3863d21ab8bcSmrg [AC_CONFIG_COMMANDS([libtool], 3864d21ab8bcSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3865d21ab8bcSmrg dnl If the libtool generation code is destined for config.status, 3866d21ab8bcSmrg dnl expand the accumulated commands and init code now: 3867d21ab8bcSmrg [AC_CONFIG_COMMANDS([libtool], 3868d21ab8bcSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3869d21ab8bcSmrg])#_LT_CONFIG_COMMANDS 38706fae4e5dSmrg 38716fae4e5dSmrg 3872d21ab8bcSmrg# Initialize. 3873d21ab8bcSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3874d21ab8bcSmrg[ 38756fae4e5dSmrg 3876d21ab8bcSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3877d21ab8bcSmrg# if CDPATH is set. 3878d21ab8bcSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 38796fae4e5dSmrg 3880d21ab8bcSmrgsed_quote_subst='$sed_quote_subst' 3881d21ab8bcSmrgdouble_quote_subst='$double_quote_subst' 3882d21ab8bcSmrgdelay_variable_subst='$delay_variable_subst' 3883d21ab8bcSmrg_LT_CONFIG_STATUS_DECLARATIONS 3884d21ab8bcSmrgLTCC='$LTCC' 3885d21ab8bcSmrgLTCFLAGS='$LTCFLAGS' 3886d21ab8bcSmrgcompiler='$compiler_DEFAULT' 38876fae4e5dSmrg 3888d21ab8bcSmrg# A function that is used when there is no print builtin or printf. 3889d21ab8bcSmrgfunc_fallback_echo () 3890d21ab8bcSmrg{ 3891d21ab8bcSmrg eval 'cat <<_LTECHO_EOF 3892d21ab8bcSmrg\$[]1 3893d21ab8bcSmrg_LTECHO_EOF' 3894d21ab8bcSmrg} 38956fae4e5dSmrg 3896d21ab8bcSmrg# Quote evaled strings. 3897d21ab8bcSmrgfor var in lt_decl_all_varnames([[ \ 3898d21ab8bcSmrg]], lt_decl_quote_varnames); do 3899d21ab8bcSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3900d21ab8bcSmrg *[[\\\\\\\`\\"\\\$]]*) 3901d21ab8bcSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 39026fae4e5dSmrg ;; 3903d21ab8bcSmrg *) 3904d21ab8bcSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 39056fae4e5dSmrg ;; 3906d21ab8bcSmrg esac 3907d21ab8bcSmrgdone 3908d21ab8bcSmrg 3909d21ab8bcSmrg# Double-quote double-evaled strings. 3910d21ab8bcSmrgfor var in lt_decl_all_varnames([[ \ 3911d21ab8bcSmrg]], lt_decl_dquote_varnames); do 3912d21ab8bcSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3913d21ab8bcSmrg *[[\\\\\\\`\\"\\\$]]*) 3914d21ab8bcSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 39156fae4e5dSmrg ;; 39166fae4e5dSmrg *) 3917d21ab8bcSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 39186fae4e5dSmrg ;; 39196fae4e5dSmrg esac 3920d21ab8bcSmrgdone 39211f0ac6a5Smrg 3922d21ab8bcSmrg_LT_OUTPUT_LIBTOOL_INIT 3923d21ab8bcSmrg]) 39241f0ac6a5Smrg 3925d21ab8bcSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3926d21ab8bcSmrg# ------------------------------------ 3927d21ab8bcSmrg# Generate a child script FILE with all initialization necessary to 3928d21ab8bcSmrg# reuse the environment learned by the parent script, and make the 3929d21ab8bcSmrg# file executable. If COMMENT is supplied, it is inserted after the 3930d21ab8bcSmrg# '#!' sequence but before initialization text begins. After this 3931d21ab8bcSmrg# macro, additional text can be appended to FILE to form the body of 3932d21ab8bcSmrg# the child script. The macro ends with non-zero status if the 3933d21ab8bcSmrg# file could not be fully written (such as if the disk is full). 3934d21ab8bcSmrgm4_ifdef([AS_INIT_GENERATED], 3935d21ab8bcSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3936d21ab8bcSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 3937d21ab8bcSmrg[m4_require([AS_PREPARE])]dnl 3938d21ab8bcSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3939d21ab8bcSmrg[lt_write_fail=0 3940d21ab8bcSmrgcat >$1 <<_ASEOF || lt_write_fail=1 3941d21ab8bcSmrg#! $SHELL 3942d21ab8bcSmrg# Generated by $as_me. 3943d21ab8bcSmrg$2 3944d21ab8bcSmrgSHELL=\${CONFIG_SHELL-$SHELL} 3945d21ab8bcSmrgexport SHELL 3946d21ab8bcSmrg_ASEOF 3947d21ab8bcSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 3948d21ab8bcSmrgAS_SHELL_SANITIZE 3949d21ab8bcSmrg_AS_PREPARE 3950d21ab8bcSmrgexec AS_MESSAGE_FD>&1 3951d21ab8bcSmrg_ASEOF 3952d21ab8bcSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 3953d21ab8bcSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 39541f0ac6a5Smrg 3955d21ab8bcSmrg# LT_OUTPUT 3956d21ab8bcSmrg# --------- 3957d21ab8bcSmrg# This macro allows early generation of the libtool script (before 3958d21ab8bcSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 3959d21ab8bcSmrg# tests. 3960d21ab8bcSmrgAC_DEFUN([LT_OUTPUT], 3961d21ab8bcSmrg[: ${CONFIG_LT=./config.lt} 3962d21ab8bcSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 3963d21ab8bcSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3964d21ab8bcSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 39656fae4e5dSmrg 3966d21ab8bcSmrgcat >>"$CONFIG_LT" <<\_LTEOF 3967d21ab8bcSmrglt_cl_silent=false 3968d21ab8bcSmrgexec AS_MESSAGE_LOG_FD>>config.log 3969d21ab8bcSmrg{ 3970d21ab8bcSmrg echo 3971d21ab8bcSmrg AS_BOX([Running $as_me.]) 3972d21ab8bcSmrg} >&AS_MESSAGE_LOG_FD 39736fae4e5dSmrg 3974d21ab8bcSmrglt_cl_help="\ 3975d21ab8bcSmrg'$as_me' creates a local libtool stub from the current configuration, 3976d21ab8bcSmrgfor use in further configure time tests before the real libtool is 3977d21ab8bcSmrggenerated. 39786fae4e5dSmrg 3979d21ab8bcSmrgUsage: $[0] [[OPTIONS]] 39806fae4e5dSmrg 3981d21ab8bcSmrg -h, --help print this help, then exit 3982d21ab8bcSmrg -V, --version print version number, then exit 3983d21ab8bcSmrg -q, --quiet do not print progress messages 3984d21ab8bcSmrg -d, --debug don't remove temporary files 39856fae4e5dSmrg 3986d21ab8bcSmrgReport bugs to <bug-libtool@gnu.org>." 39876fae4e5dSmrg 3988d21ab8bcSmrglt_cl_version="\ 3989d21ab8bcSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3990d21ab8bcSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3991d21ab8bcSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 39926fae4e5dSmrg 3993d21ab8bcSmrgCopyright (C) 2011 Free Software Foundation, Inc. 3994d21ab8bcSmrgThis config.lt script is free software; the Free Software Foundation 3995d21ab8bcSmrggives unlimited permision to copy, distribute and modify it." 39966fae4e5dSmrg 3997d21ab8bcSmrgwhile test 0 != $[#] 3998d21ab8bcSmrgdo 3999d21ab8bcSmrg case $[1] in 4000d21ab8bcSmrg --version | --v* | -V ) 4001d21ab8bcSmrg echo "$lt_cl_version"; exit 0 ;; 4002d21ab8bcSmrg --help | --h* | -h ) 4003d21ab8bcSmrg echo "$lt_cl_help"; exit 0 ;; 4004d21ab8bcSmrg --debug | --d* | -d ) 4005d21ab8bcSmrg debug=: ;; 4006d21ab8bcSmrg --quiet | --q* | --silent | --s* | -q ) 4007d21ab8bcSmrg lt_cl_silent=: ;; 40086fae4e5dSmrg 4009d21ab8bcSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4010d21ab8bcSmrgTry '$[0] --help' for more information.]) ;; 40116fae4e5dSmrg 4012d21ab8bcSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4013d21ab8bcSmrgTry '$[0] --help' for more information.]) ;; 4014d21ab8bcSmrg esac 4015d21ab8bcSmrg shift 4016d21ab8bcSmrgdone 40176fae4e5dSmrg 4018d21ab8bcSmrgif $lt_cl_silent; then 4019d21ab8bcSmrg exec AS_MESSAGE_FD>/dev/null 4020d21ab8bcSmrgfi 4021d21ab8bcSmrg_LTEOF 40226fae4e5dSmrg 4023d21ab8bcSmrgcat >>"$CONFIG_LT" <<_LTEOF 4024d21ab8bcSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4025d21ab8bcSmrg_LTEOF 40266fae4e5dSmrg 4027d21ab8bcSmrgcat >>"$CONFIG_LT" <<\_LTEOF 4028d21ab8bcSmrgAC_MSG_NOTICE([creating $ofile]) 4029d21ab8bcSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 4030d21ab8bcSmrgAS_EXIT(0) 4031d21ab8bcSmrg_LTEOF 4032d21ab8bcSmrgchmod +x "$CONFIG_LT" 40336fae4e5dSmrg 4034d21ab8bcSmrg# configure is writing to config.log, but config.lt does its own redirection, 4035d21ab8bcSmrg# appending to config.log, which fails on DOS, as config.log is still kept 4036d21ab8bcSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4037d21ab8bcSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4038d21ab8bcSmrglt_cl_success=: 4039d21ab8bcSmrgtest yes = "$silent" && 4040d21ab8bcSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 4041d21ab8bcSmrgexec AS_MESSAGE_LOG_FD>/dev/null 4042d21ab8bcSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4043d21ab8bcSmrgexec AS_MESSAGE_LOG_FD>>config.log 4044d21ab8bcSmrg$lt_cl_success || AS_EXIT(1) 4045d21ab8bcSmrg])# LT_OUTPUT 40466fae4e5dSmrg 40476fae4e5dSmrg 4048d21ab8bcSmrg# _LT_CONFIG(TAG) 4049d21ab8bcSmrg# --------------- 4050d21ab8bcSmrg# If TAG is the built-in tag, create an initial libtool script with a 4051d21ab8bcSmrg# default configuration from the untagged config vars. Otherwise add code 4052d21ab8bcSmrg# to config.status for appending the configuration named by TAG from the 4053d21ab8bcSmrg# matching tagged config vars. 4054d21ab8bcSmrgm4_defun([_LT_CONFIG], 4055d21ab8bcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4056d21ab8bcSmrg_LT_CONFIG_SAVE_COMMANDS([ 4057d21ab8bcSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4058d21ab8bcSmrg m4_if(_LT_TAG, [C], [ 4059d21ab8bcSmrg # See if we are running on zsh, and set the options that allow our 4060d21ab8bcSmrg # commands through without removal of \ escapes. 4061d21ab8bcSmrg if test -n "${ZSH_VERSION+set}"; then 4062d21ab8bcSmrg setopt NO_GLOB_SUBST 4063d21ab8bcSmrg fi 40646fae4e5dSmrg 4065d21ab8bcSmrg cfgfile=${ofile}T 4066d21ab8bcSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4067d21ab8bcSmrg $RM "$cfgfile" 40686fae4e5dSmrg 4069d21ab8bcSmrg cat <<_LT_EOF >> "$cfgfile" 4070d21ab8bcSmrg#! $SHELL 4071d21ab8bcSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4072d21ab8bcSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4073d21ab8bcSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 40746fae4e5dSmrg 4075d21ab8bcSmrg# Provide generalized library-building support services. 4076d21ab8bcSmrg# Written by Gordon Matzigkeit, 1996 40776fae4e5dSmrg 4078d21ab8bcSmrg_LT_COPYING 4079d21ab8bcSmrg_LT_LIBTOOL_TAGS 40806fae4e5dSmrg 4081d21ab8bcSmrg# Configured defaults for sys_lib_dlsearch_path munging. 4082d21ab8bcSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 40836fae4e5dSmrg 4084d21ab8bcSmrg# ### BEGIN LIBTOOL CONFIG 4085d21ab8bcSmrg_LT_LIBTOOL_CONFIG_VARS 4086d21ab8bcSmrg_LT_LIBTOOL_TAG_VARS 4087d21ab8bcSmrg# ### END LIBTOOL CONFIG 40886fae4e5dSmrg 4089d21ab8bcSmrg_LT_EOF 40906fae4e5dSmrg 4091d21ab8bcSmrg cat <<'_LT_EOF' >> "$cfgfile" 40926fae4e5dSmrg 4093d21ab8bcSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 40946fae4e5dSmrg 4095d21ab8bcSmrg_LT_PREPARE_MUNGE_PATH_LIST 4096d21ab8bcSmrg_LT_PREPARE_CC_BASENAME 40976fae4e5dSmrg 4098d21ab8bcSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 40996fae4e5dSmrg 4100d21ab8bcSmrg_LT_EOF 41016fae4e5dSmrg 41026fae4e5dSmrg case $host_os in 4103d21ab8bcSmrg aix3*) 4104d21ab8bcSmrg cat <<\_LT_EOF >> "$cfgfile" 4105d21ab8bcSmrg# AIX sometimes has problems with the GCC collect2 program. For some 4106d21ab8bcSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4107d21ab8bcSmrg# vanish in a puff of smoke. 4108d21ab8bcSmrgif test set != "${COLLECT_NAMES+set}"; then 4109d21ab8bcSmrg COLLECT_NAMES= 4110d21ab8bcSmrg export COLLECT_NAMES 4111d21ab8bcSmrgfi 4112d21ab8bcSmrg_LT_EOF 41132fd96bc7Smrg ;; 41146fae4e5dSmrg esac 41156fae4e5dSmrg 4116d21ab8bcSmrg _LT_PROG_LTMAIN 41176fae4e5dSmrg 4118d21ab8bcSmrg # We use sed instead of cat because bash on DJGPP gets confused if 4119d21ab8bcSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4120d21ab8bcSmrg # text mode, it properly converts lines to CR/LF. This bash problem 4121d21ab8bcSmrg # is reportedly fixed, but why not run on old versions too? 4122d21ab8bcSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4123d21ab8bcSmrg || (rm -f "$cfgfile"; exit 1) 41246fae4e5dSmrg 4125d21ab8bcSmrg mv -f "$cfgfile" "$ofile" || 4126d21ab8bcSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4127d21ab8bcSmrg chmod +x "$ofile" 4128d21ab8bcSmrg], 4129d21ab8bcSmrg[cat <<_LT_EOF >> "$ofile" 41306fae4e5dSmrg 4131d21ab8bcSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4132d21ab8bcSmrgdnl in a comment (ie after a #). 4133d21ab8bcSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4134d21ab8bcSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4135d21ab8bcSmrg# ### END LIBTOOL TAG CONFIG: $1 4136d21ab8bcSmrg_LT_EOF 4137d21ab8bcSmrg])dnl /m4_if 4138d21ab8bcSmrg], 4139d21ab8bcSmrg[m4_if([$1], [], [ 4140d21ab8bcSmrg PACKAGE='$PACKAGE' 4141d21ab8bcSmrg VERSION='$VERSION' 4142d21ab8bcSmrg RM='$RM' 4143d21ab8bcSmrg ofile='$ofile'], []) 4144d21ab8bcSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4145d21ab8bcSmrg])# _LT_CONFIG 41466fae4e5dSmrg 41476fae4e5dSmrg 4148d21ab8bcSmrg# LT_SUPPORTED_TAG(TAG) 4149d21ab8bcSmrg# --------------------- 4150d21ab8bcSmrg# Trace this macro to discover what tags are supported by the libtool 4151d21ab8bcSmrg# --tag option, using: 4152d21ab8bcSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4153d21ab8bcSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 41546fae4e5dSmrg 41556fae4e5dSmrg 4156d21ab8bcSmrg# C support is built-in for now 4157d21ab8bcSmrgm4_define([_LT_LANG_C_enabled], []) 4158d21ab8bcSmrgm4_define([_LT_TAGS], []) 41596fae4e5dSmrg 41606fae4e5dSmrg 4161d21ab8bcSmrg# LT_LANG(LANG) 4162d21ab8bcSmrg# ------------- 4163d21ab8bcSmrg# Enable libtool support for the given language if not already enabled. 4164d21ab8bcSmrgAC_DEFUN([LT_LANG], 4165d21ab8bcSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4166d21ab8bcSmrgm4_case([$1], 4167d21ab8bcSmrg [C], [_LT_LANG(C)], 4168d21ab8bcSmrg [C++], [_LT_LANG(CXX)], 4169d21ab8bcSmrg [Go], [_LT_LANG(GO)], 4170d21ab8bcSmrg [Java], [_LT_LANG(GCJ)], 4171d21ab8bcSmrg [Fortran 77], [_LT_LANG(F77)], 4172d21ab8bcSmrg [Fortran], [_LT_LANG(FC)], 4173d21ab8bcSmrg [Windows Resource], [_LT_LANG(RC)], 4174d21ab8bcSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4175d21ab8bcSmrg [_LT_LANG($1)], 4176d21ab8bcSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4177d21ab8bcSmrg])# LT_LANG 41786fae4e5dSmrg 41796fae4e5dSmrg 4180d21ab8bcSmrg# _LT_LANG(LANGNAME) 4181d21ab8bcSmrg# ------------------ 4182d21ab8bcSmrgm4_defun([_LT_LANG], 4183d21ab8bcSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4184d21ab8bcSmrg [LT_SUPPORTED_TAG([$1])dnl 4185d21ab8bcSmrg m4_append([_LT_TAGS], [$1 ])dnl 4186d21ab8bcSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4187d21ab8bcSmrg _LT_LANG_$1_CONFIG($1)])dnl 4188d21ab8bcSmrg])# _LT_LANG 41896fae4e5dSmrg 41906fae4e5dSmrg 4191d21ab8bcSmrgm4_ifndef([AC_PROG_GO], [ 4192d21ab8bcSmrg# NOTE: This macro has been submitted for inclusion into # 4193d21ab8bcSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4194d21ab8bcSmrg# a released version of Autoconf we should remove this # 4195d21ab8bcSmrg# macro and use it instead. # 4196d21ab8bcSmrgm4_defun([AC_PROG_GO], 4197d21ab8bcSmrg[AC_LANG_PUSH(Go)dnl 4198d21ab8bcSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4199d21ab8bcSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4200d21ab8bcSmrg_AC_ARG_VAR_LDFLAGS()dnl 4201d21ab8bcSmrgAC_CHECK_TOOL(GOC, gccgo) 4202d21ab8bcSmrgif test -z "$GOC"; then 4203d21ab8bcSmrg if test -n "$ac_tool_prefix"; then 4204d21ab8bcSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4205d21ab8bcSmrg fi 4206d21ab8bcSmrgfi 4207d21ab8bcSmrgif test -z "$GOC"; then 4208d21ab8bcSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4209d21ab8bcSmrgfi 4210d21ab8bcSmrg])#m4_defun 4211d21ab8bcSmrg])#m4_ifndef 42126fae4e5dSmrg 42136fae4e5dSmrg 4214d21ab8bcSmrg# _LT_LANG_DEFAULT_CONFIG 4215d21ab8bcSmrg# ----------------------- 4216d21ab8bcSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4217d21ab8bcSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4218d21ab8bcSmrg [LT_LANG(CXX)], 4219d21ab8bcSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 42206fae4e5dSmrg 4221d21ab8bcSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4222d21ab8bcSmrg [LT_LANG(F77)], 4223d21ab8bcSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 42246fae4e5dSmrg 4225d21ab8bcSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4226d21ab8bcSmrg [LT_LANG(FC)], 4227d21ab8bcSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 42286fae4e5dSmrg 4229d21ab8bcSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4230d21ab8bcSmrgdnl pulling things in needlessly. 4231d21ab8bcSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4232d21ab8bcSmrg [LT_LANG(GCJ)], 4233d21ab8bcSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4234d21ab8bcSmrg [LT_LANG(GCJ)], 4235d21ab8bcSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4236d21ab8bcSmrg [LT_LANG(GCJ)], 4237d21ab8bcSmrg [m4_ifdef([AC_PROG_GCJ], 4238d21ab8bcSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4239d21ab8bcSmrg m4_ifdef([A][M_PROG_GCJ], 4240d21ab8bcSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4241d21ab8bcSmrg m4_ifdef([LT_PROG_GCJ], 4242d21ab8bcSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 42436fae4e5dSmrg 4244d21ab8bcSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4245d21ab8bcSmrg [LT_LANG(GO)], 4246d21ab8bcSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 42476fae4e5dSmrg 4248d21ab8bcSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4249d21ab8bcSmrg [LT_LANG(RC)], 4250d21ab8bcSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4251d21ab8bcSmrg])# _LT_LANG_DEFAULT_CONFIG 42526fae4e5dSmrg 4253d21ab8bcSmrg# Obsolete macros: 4254d21ab8bcSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4255d21ab8bcSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4256d21ab8bcSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4257d21ab8bcSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4258d21ab8bcSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4259d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 4260d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4261d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4262d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4263d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4264d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 42656fae4e5dSmrg 42666fae4e5dSmrg 4267d21ab8bcSmrg# _LT_TAG_COMPILER 4268d21ab8bcSmrg# ---------------- 4269d21ab8bcSmrgm4_defun([_LT_TAG_COMPILER], 4270d21ab8bcSmrg[AC_REQUIRE([AC_PROG_CC])dnl 42716fae4e5dSmrg 4272d21ab8bcSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4273d21ab8bcSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4274d21ab8bcSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4275d21ab8bcSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 42761f0ac6a5Smrg 4277d21ab8bcSmrg# If no C compiler was specified, use CC. 4278d21ab8bcSmrgLTCC=${LTCC-"$CC"} 42796fae4e5dSmrg 4280d21ab8bcSmrg# If no C compiler flags were specified, use CFLAGS. 4281d21ab8bcSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 42826fae4e5dSmrg 4283d21ab8bcSmrg# Allow CC to be a program name with arguments. 4284d21ab8bcSmrgcompiler=$CC 4285d21ab8bcSmrg])# _LT_TAG_COMPILER 42866fae4e5dSmrg 42876fae4e5dSmrg 4288d21ab8bcSmrg# _LT_COMPILER_BOILERPLATE 4289d21ab8bcSmrg# ------------------------ 4290d21ab8bcSmrg# Check for compiler boilerplate output or warnings with 4291d21ab8bcSmrg# the simple compiler test code. 4292d21ab8bcSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 4293d21ab8bcSmrg[m4_require([_LT_DECL_SED])dnl 4294d21ab8bcSmrgac_outfile=conftest.$ac_objext 4295d21ab8bcSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4296d21ab8bcSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4297d21ab8bcSmrg_lt_compiler_boilerplate=`cat conftest.err` 4298d21ab8bcSmrg$RM conftest* 4299d21ab8bcSmrg])# _LT_COMPILER_BOILERPLATE 43006fae4e5dSmrg 43016fae4e5dSmrg 4302d21ab8bcSmrg# _LT_LINKER_BOILERPLATE 4303d21ab8bcSmrg# ---------------------- 4304d21ab8bcSmrg# Check for linker boilerplate output or warnings with 4305d21ab8bcSmrg# the simple link test code. 4306d21ab8bcSmrgm4_defun([_LT_LINKER_BOILERPLATE], 4307d21ab8bcSmrg[m4_require([_LT_DECL_SED])dnl 4308d21ab8bcSmrgac_outfile=conftest.$ac_objext 4309d21ab8bcSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4310d21ab8bcSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4311d21ab8bcSmrg_lt_linker_boilerplate=`cat conftest.err` 4312d21ab8bcSmrg$RM -r conftest* 4313d21ab8bcSmrg])# _LT_LINKER_BOILERPLATE 4314d21ab8bcSmrg 4315d21ab8bcSmrg# _LT_REQUIRED_DARWIN_CHECKS 4316d21ab8bcSmrg# ------------------------- 4317d21ab8bcSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4318d21ab8bcSmrg case $host_os in 4319d21ab8bcSmrg rhapsody* | darwin*) 4320d21ab8bcSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4321d21ab8bcSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4322d21ab8bcSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4323d21ab8bcSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4324d21ab8bcSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4325d21ab8bcSmrg _LT_DECL([], [DSYMUTIL], [1], 4326d21ab8bcSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4327d21ab8bcSmrg _LT_DECL([], [NMEDIT], [1], 4328d21ab8bcSmrg [Tool to change global to local symbols on Mac OS X]) 4329d21ab8bcSmrg _LT_DECL([], [LIPO], [1], 4330d21ab8bcSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 4331d21ab8bcSmrg _LT_DECL([], [OTOOL], [1], 4332d21ab8bcSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4333d21ab8bcSmrg _LT_DECL([], [OTOOL64], [1], 4334d21ab8bcSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4335d21ab8bcSmrg 4336d21ab8bcSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4337d21ab8bcSmrg [lt_cv_apple_cc_single_mod=no 4338d21ab8bcSmrg if test -z "$LT_MULTI_MODULE"; then 4339d21ab8bcSmrg # By default we will add the -single_module flag. You can override 4340d21ab8bcSmrg # by either setting the environment variable LT_MULTI_MODULE 4341d21ab8bcSmrg # non-empty at configure time, or by adding -multi_module to the 4342d21ab8bcSmrg # link flags. 4343d21ab8bcSmrg rm -rf libconftest.dylib* 4344d21ab8bcSmrg echo "int foo(void){return 1;}" > conftest.c 4345d21ab8bcSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4346d21ab8bcSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4347d21ab8bcSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4348d21ab8bcSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4349d21ab8bcSmrg _lt_result=$? 4350d21ab8bcSmrg # If there is a non-empty error log, and "single_module" 4351d21ab8bcSmrg # appears in it, assume the flag caused a linker warning 4352d21ab8bcSmrg if test -s conftest.err && $GREP single_module conftest.err; then 4353d21ab8bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4354d21ab8bcSmrg # Otherwise, if the output was created with a 0 exit code from 4355d21ab8bcSmrg # the compiler, it worked. 4356d21ab8bcSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4357d21ab8bcSmrg lt_cv_apple_cc_single_mod=yes 43586fae4e5dSmrg else 4359d21ab8bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 43606fae4e5dSmrg fi 4361d21ab8bcSmrg rm -rf libconftest.dylib* 4362d21ab8bcSmrg rm -f conftest.* 4363d21ab8bcSmrg fi]) 43646fae4e5dSmrg 4365d21ab8bcSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4366d21ab8bcSmrg [lt_cv_ld_exported_symbols_list], 4367d21ab8bcSmrg [lt_cv_ld_exported_symbols_list=no 4368d21ab8bcSmrg save_LDFLAGS=$LDFLAGS 4369d21ab8bcSmrg echo "_main" > conftest.sym 4370d21ab8bcSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4371d21ab8bcSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4372d21ab8bcSmrg [lt_cv_ld_exported_symbols_list=yes], 4373d21ab8bcSmrg [lt_cv_ld_exported_symbols_list=no]) 4374d21ab8bcSmrg LDFLAGS=$save_LDFLAGS 4375d21ab8bcSmrg ]) 4376d21ab8bcSmrg 4377d21ab8bcSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4378d21ab8bcSmrg [lt_cv_ld_force_load=no 4379d21ab8bcSmrg cat > conftest.c << _LT_EOF 4380d21ab8bcSmrgint forced_loaded() { return 2;} 4381d21ab8bcSmrg_LT_EOF 4382d21ab8bcSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4383d21ab8bcSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4384d21ab8bcSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4385d21ab8bcSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4386d21ab8bcSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4387d21ab8bcSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4388d21ab8bcSmrg cat > conftest.c << _LT_EOF 4389d21ab8bcSmrgint main() { return 0;} 4390d21ab8bcSmrg_LT_EOF 4391d21ab8bcSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4392d21ab8bcSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4393d21ab8bcSmrg _lt_result=$? 4394d21ab8bcSmrg if test -s conftest.err && $GREP force_load conftest.err; then 4395d21ab8bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4396d21ab8bcSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4397d21ab8bcSmrg lt_cv_ld_force_load=yes 43986fae4e5dSmrg else 4399d21ab8bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 44009c9ff80cSmrg fi 4401d21ab8bcSmrg rm -f conftest.err libconftest.a conftest conftest.c 4402d21ab8bcSmrg rm -rf conftest.dSYM 4403d21ab8bcSmrg ]) 4404d21ab8bcSmrg case $host_os in 4405d21ab8bcSmrg rhapsody* | darwin1.[[012]]) 4406d21ab8bcSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4407d21ab8bcSmrg darwin1.*) 4408d21ab8bcSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4409d21ab8bcSmrg darwin*) 4410d21ab8bcSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 4411d21ab8bcSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4412d21ab8bcSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4413d21ab8bcSmrg *) 4414d21ab8bcSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 44159c9ff80cSmrg esac 4416d21ab8bcSmrg ;; 4417d21ab8bcSmrg esac 4418d21ab8bcSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 4419d21ab8bcSmrg _lt_dar_single_mod='$single_module' 4420d21ab8bcSmrg fi 4421d21ab8bcSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 4422d21ab8bcSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4423d21ab8bcSmrg else 4424d21ab8bcSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4425d21ab8bcSmrg fi 4426d21ab8bcSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4427d21ab8bcSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 4428d21ab8bcSmrg else 4429d21ab8bcSmrg _lt_dsymutil= 4430d21ab8bcSmrg fi 4431d21ab8bcSmrg ;; 4432d21ab8bcSmrg esac 4433d21ab8bcSmrg]) 44341f0ac6a5Smrg 44351f0ac6a5Smrg 4436d21ab8bcSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 4437d21ab8bcSmrg# --------------------------------- 4438d21ab8bcSmrg# Checks for linker and compiler features on darwin 4439d21ab8bcSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 4440d21ab8bcSmrg[ 4441d21ab8bcSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4442d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4443d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4444d21ab8bcSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 4445d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4446d21ab8bcSmrg if test yes = "$lt_cv_ld_force_load"; then 4447d21ab8bcSmrg _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\"`' 4448d21ab8bcSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4449d21ab8bcSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4450d21ab8bcSmrg else 4451d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4452d21ab8bcSmrg fi 4453d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4454d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4455d21ab8bcSmrg case $cc_basename in 4456d21ab8bcSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4457d21ab8bcSmrg *) _lt_dar_can_shared=$GCC ;; 4458d21ab8bcSmrg esac 4459d21ab8bcSmrg if test yes = "$_lt_dar_can_shared"; then 4460d21ab8bcSmrg output_verbose_link_cmd=func_echo_all 4461d21ab8bcSmrg _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" 4462d21ab8bcSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4463d21ab8bcSmrg _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" 4464d21ab8bcSmrg _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" 4465d21ab8bcSmrg m4_if([$1], [CXX], 4466d21ab8bcSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4467d21ab8bcSmrg _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" 4468d21ab8bcSmrg _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" 4469d21ab8bcSmrg fi 4470d21ab8bcSmrg],[]) 4471d21ab8bcSmrg else 4472d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4473d21ab8bcSmrg fi 4474d21ab8bcSmrg]) 44751f0ac6a5Smrg 4476d21ab8bcSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4477d21ab8bcSmrg# ---------------------------------- 4478d21ab8bcSmrg# Links a minimal program and checks the executable 4479d21ab8bcSmrg# for the system default hardcoded library path. In most cases, 4480d21ab8bcSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 4481d21ab8bcSmrg# the location of the communication and MPI libs are included too. 4482d21ab8bcSmrg# If we don't find anything, use the default library path according 4483d21ab8bcSmrg# to the aix ld manual. 4484d21ab8bcSmrg# Store the results from the different compilers for each TAGNAME. 4485d21ab8bcSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 4486d21ab8bcSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 4487d21ab8bcSmrg[m4_require([_LT_DECL_SED])dnl 4488d21ab8bcSmrgif test set = "${lt_cv_aix_libpath+set}"; then 4489d21ab8bcSmrg aix_libpath=$lt_cv_aix_libpath 4490d21ab8bcSmrgelse 4491d21ab8bcSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4492d21ab8bcSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4493d21ab8bcSmrg lt_aix_libpath_sed='[ 4494d21ab8bcSmrg /Import File Strings/,/^$/ { 4495d21ab8bcSmrg /^0/ { 4496d21ab8bcSmrg s/^0 *\([^ ]*\) *$/\1/ 4497d21ab8bcSmrg p 4498d21ab8bcSmrg } 4499d21ab8bcSmrg }]' 4500d21ab8bcSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4501d21ab8bcSmrg # Check for a 64-bit object if we didn't find anything. 4502d21ab8bcSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4503d21ab8bcSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4504d21ab8bcSmrg fi],[]) 4505d21ab8bcSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4506d21ab8bcSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4507d21ab8bcSmrg fi 4508d21ab8bcSmrg ]) 4509d21ab8bcSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4510d21ab8bcSmrgfi 4511d21ab8bcSmrg])# _LT_SYS_MODULE_PATH_AIX 45121f0ac6a5Smrg 45131f0ac6a5Smrg 4514d21ab8bcSmrg# _LT_SHELL_INIT(ARG) 4515d21ab8bcSmrg# ------------------- 4516d21ab8bcSmrgm4_define([_LT_SHELL_INIT], 4517d21ab8bcSmrg[m4_divert_text([M4SH-INIT], [$1 4518d21ab8bcSmrg])])# _LT_SHELL_INIT 45191f0ac6a5Smrg 45201f0ac6a5Smrg 45211f0ac6a5Smrg 4522d21ab8bcSmrg# _LT_PROG_ECHO_BACKSLASH 4523d21ab8bcSmrg# ----------------------- 4524d21ab8bcSmrg# Find how we can fake an echo command that does not interpret backslash. 4525d21ab8bcSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 4526d21ab8bcSmrg# of the generated configure script that will find a shell with a builtin 4527d21ab8bcSmrg# printf (that we can use as an echo command). 4528d21ab8bcSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 4529d21ab8bcSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4530d21ab8bcSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4531d21ab8bcSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 45326fae4e5dSmrg 4533d21ab8bcSmrgAC_MSG_CHECKING([how to print strings]) 4534d21ab8bcSmrg# Test print first, because it will be a builtin if present. 4535d21ab8bcSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4536d21ab8bcSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4537d21ab8bcSmrg ECHO='print -r --' 4538d21ab8bcSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4539d21ab8bcSmrg ECHO='printf %s\n' 4540d21ab8bcSmrgelse 4541d21ab8bcSmrg # Use this function as a fallback that always works. 4542d21ab8bcSmrg func_fallback_echo () 4543d21ab8bcSmrg { 4544d21ab8bcSmrg eval 'cat <<_LTECHO_EOF 4545d21ab8bcSmrg$[]1 4546d21ab8bcSmrg_LTECHO_EOF' 4547d21ab8bcSmrg } 4548d21ab8bcSmrg ECHO='func_fallback_echo' 4549d21ab8bcSmrgfi 45501f0ac6a5Smrg 4551d21ab8bcSmrg# func_echo_all arg... 4552d21ab8bcSmrg# Invoke $ECHO with all args, space-separated. 4553d21ab8bcSmrgfunc_echo_all () 4554d21ab8bcSmrg{ 4555d21ab8bcSmrg $ECHO "$*" 4556d21ab8bcSmrg} 45571f0ac6a5Smrg 4558d21ab8bcSmrgcase $ECHO in 4559d21ab8bcSmrg printf*) AC_MSG_RESULT([printf]) ;; 4560d21ab8bcSmrg print*) AC_MSG_RESULT([print -r]) ;; 4561d21ab8bcSmrg *) AC_MSG_RESULT([cat]) ;; 4562d21ab8bcSmrgesac 45636fae4e5dSmrg 4564d21ab8bcSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 4565d21ab8bcSmrg[_AS_DETECT_SUGGESTED([ 4566d21ab8bcSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4567d21ab8bcSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4568d21ab8bcSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4569d21ab8bcSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4570d21ab8bcSmrg PATH=/empty FPATH=/empty; export PATH FPATH 4571d21ab8bcSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 4572d21ab8bcSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 45736fae4e5dSmrg 4574d21ab8bcSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4575d21ab8bcSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4576d21ab8bcSmrg])# _LT_PROG_ECHO_BACKSLASH 45776fae4e5dSmrg 45786fae4e5dSmrg 4579d21ab8bcSmrg# _LT_WITH_SYSROOT 4580d21ab8bcSmrg# ---------------- 4581d21ab8bcSmrgAC_DEFUN([_LT_WITH_SYSROOT], 4582d21ab8bcSmrg[m4_require([_LT_DECL_SED])dnl 4583d21ab8bcSmrgAC_MSG_CHECKING([for sysroot]) 4584d21ab8bcSmrgAC_ARG_WITH([sysroot], 4585d21ab8bcSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4586d21ab8bcSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 4587d21ab8bcSmrg if not specified).])], 4588d21ab8bcSmrg[], [with_sysroot=no]) 45896fae4e5dSmrg 4590d21ab8bcSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 4591d21ab8bcSmrgdnl in case the user passed a directory name. 4592d21ab8bcSmrglt_sysroot= 4593d21ab8bcSmrgcase $with_sysroot in #( 4594d21ab8bcSmrg yes) 4595d21ab8bcSmrg if test yes = "$GCC"; then 4596d21ab8bcSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4597d21ab8bcSmrg fi 4598d21ab8bcSmrg ;; #( 4599d21ab8bcSmrg /*) 4600d21ab8bcSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4601d21ab8bcSmrg ;; #( 4602d21ab8bcSmrg no|'') 4603d21ab8bcSmrg ;; #( 4604d21ab8bcSmrg *) 4605d21ab8bcSmrg AC_MSG_RESULT([$with_sysroot]) 4606d21ab8bcSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 4607d21ab8bcSmrg ;; 4608d21ab8bcSmrgesac 46096fae4e5dSmrg 4610d21ab8bcSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 4611d21ab8bcSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4612d21ab8bcSmrg[dependent libraries, and where our libraries should be installed.])]) 46136fae4e5dSmrg 4614d21ab8bcSmrg# _LT_ENABLE_LOCK 4615d21ab8bcSmrg# --------------- 4616d21ab8bcSmrgm4_defun([_LT_ENABLE_LOCK], 4617d21ab8bcSmrg[AC_ARG_ENABLE([libtool-lock], 4618d21ab8bcSmrg [AS_HELP_STRING([--disable-libtool-lock], 4619d21ab8bcSmrg [avoid locking (might break parallel builds)])]) 4620d21ab8bcSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 4621e5410a46Smrg 4622d21ab8bcSmrg# Some flags need to be propagated to the compiler or linker for good 4623d21ab8bcSmrg# libtool support. 4624d21ab8bcSmrgcase $host in 4625d21ab8bcSmrgia64-*-hpux*) 4626d21ab8bcSmrg # Find out what ABI is being produced by ac_compile, and set mode 4627d21ab8bcSmrg # options accordingly. 4628d21ab8bcSmrg echo 'int i;' > conftest.$ac_ext 4629d21ab8bcSmrg if AC_TRY_EVAL(ac_compile); then 4630d21ab8bcSmrg case `$FILECMD conftest.$ac_objext` in 4631d21ab8bcSmrg *ELF-32*) 4632d21ab8bcSmrg HPUX_IA64_MODE=32 4633d21ab8bcSmrg ;; 4634d21ab8bcSmrg *ELF-64*) 4635d21ab8bcSmrg HPUX_IA64_MODE=64 4636d21ab8bcSmrg ;; 4637d21ab8bcSmrg esac 4638d21ab8bcSmrg fi 4639d21ab8bcSmrg rm -rf conftest* 4640d21ab8bcSmrg ;; 4641d21ab8bcSmrg*-*-irix6*) 4642d21ab8bcSmrg # Find out what ABI is being produced by ac_compile, and set linker 4643d21ab8bcSmrg # options accordingly. 4644d21ab8bcSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4645d21ab8bcSmrg if AC_TRY_EVAL(ac_compile); then 4646d21ab8bcSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 4647d21ab8bcSmrg case `$FILECMD conftest.$ac_objext` in 4648d21ab8bcSmrg *32-bit*) 4649d21ab8bcSmrg LD="${LD-ld} -melf32bsmip" 46506fae4e5dSmrg ;; 4651d21ab8bcSmrg *N32*) 4652d21ab8bcSmrg LD="${LD-ld} -melf32bmipn32" 46536fae4e5dSmrg ;; 4654d21ab8bcSmrg *64-bit*) 4655d21ab8bcSmrg LD="${LD-ld} -melf64bmip" 46566fae4e5dSmrg ;; 46579c9ff80cSmrg esac 4658d21ab8bcSmrg else 4659d21ab8bcSmrg case `$FILECMD conftest.$ac_objext` in 4660d21ab8bcSmrg *32-bit*) 4661d21ab8bcSmrg LD="${LD-ld} -32" 4662d21ab8bcSmrg ;; 4663d21ab8bcSmrg *N32*) 4664d21ab8bcSmrg LD="${LD-ld} -n32" 4665d21ab8bcSmrg ;; 4666d21ab8bcSmrg *64-bit*) 4667d21ab8bcSmrg LD="${LD-ld} -64" 4668d21ab8bcSmrg ;; 4669d21ab8bcSmrg esac 4670d21ab8bcSmrg fi 4671d21ab8bcSmrg fi 4672d21ab8bcSmrg rm -rf conftest* 4673d21ab8bcSmrg ;; 46741f0ac6a5Smrg 4675d21ab8bcSmrgmips64*-*linux*) 4676d21ab8bcSmrg # Find out what ABI is being produced by ac_compile, and set linker 4677d21ab8bcSmrg # options accordingly. 4678d21ab8bcSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4679d21ab8bcSmrg if AC_TRY_EVAL(ac_compile); then 4680d21ab8bcSmrg emul=elf 4681d21ab8bcSmrg case `$FILECMD conftest.$ac_objext` in 4682d21ab8bcSmrg *32-bit*) 4683d21ab8bcSmrg emul="${emul}32" 46846fae4e5dSmrg ;; 4685d21ab8bcSmrg *64-bit*) 4686d21ab8bcSmrg emul="${emul}64" 46876fae4e5dSmrg ;; 46889c9ff80cSmrg esac 4689d21ab8bcSmrg case `$FILECMD conftest.$ac_objext` in 4690d21ab8bcSmrg *MSB*) 4691d21ab8bcSmrg emul="${emul}btsmip" 46926fae4e5dSmrg ;; 4693d21ab8bcSmrg *LSB*) 4694d21ab8bcSmrg emul="${emul}ltsmip" 4695d21ab8bcSmrg ;; 4696d21ab8bcSmrg esac 4697d21ab8bcSmrg case `$FILECMD conftest.$ac_objext` in 4698d21ab8bcSmrg *N32*) 4699d21ab8bcSmrg emul="${emul}n32" 4700d21ab8bcSmrg ;; 4701d21ab8bcSmrg esac 4702d21ab8bcSmrg LD="${LD-ld} -m $emul" 47039c9ff80cSmrg fi 4704d21ab8bcSmrg rm -rf conftest* 4705d21ab8bcSmrg ;; 47061f0ac6a5Smrg 4707d21ab8bcSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4708d21ab8bcSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4709d21ab8bcSmrg # Find out what ABI is being produced by ac_compile, and set linker 4710d21ab8bcSmrg # options accordingly. Note that the listed cases only cover the 4711d21ab8bcSmrg # situations where additional linker options are needed (such as when 4712d21ab8bcSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4713d21ab8bcSmrg # vice versa); the common cases where no linker options are needed do 4714d21ab8bcSmrg # not appear in the list. 4715d21ab8bcSmrg echo 'int i;' > conftest.$ac_ext 4716d21ab8bcSmrg if AC_TRY_EVAL(ac_compile); then 4717d21ab8bcSmrg case `$FILECMD conftest.o` in 4718d21ab8bcSmrg *32-bit*) 4719d21ab8bcSmrg case $host in 4720d21ab8bcSmrg x86_64-*kfreebsd*-gnu) 4721d21ab8bcSmrg LD="${LD-ld} -m elf_i386_fbsd" 4722d21ab8bcSmrg ;; 4723d21ab8bcSmrg x86_64-*linux*) 4724d21ab8bcSmrg case `$FILECMD conftest.o` in 4725d21ab8bcSmrg *x86-64*) 4726d21ab8bcSmrg LD="${LD-ld} -m elf32_x86_64" 4727d21ab8bcSmrg ;; 4728d21ab8bcSmrg *) 4729d21ab8bcSmrg LD="${LD-ld} -m elf_i386" 4730d21ab8bcSmrg ;; 4731d21ab8bcSmrg esac 4732d21ab8bcSmrg ;; 4733d21ab8bcSmrg powerpc64le-*linux*) 4734d21ab8bcSmrg LD="${LD-ld} -m elf32lppclinux" 4735d21ab8bcSmrg ;; 4736d21ab8bcSmrg powerpc64-*linux*) 4737d21ab8bcSmrg LD="${LD-ld} -m elf32ppclinux" 4738d21ab8bcSmrg ;; 4739d21ab8bcSmrg s390x-*linux*) 4740d21ab8bcSmrg LD="${LD-ld} -m elf_s390" 4741d21ab8bcSmrg ;; 4742d21ab8bcSmrg sparc64-*linux*) 4743d21ab8bcSmrg LD="${LD-ld} -m elf32_sparc" 4744d21ab8bcSmrg ;; 4745d21ab8bcSmrg esac 4746d21ab8bcSmrg ;; 4747d21ab8bcSmrg *64-bit*) 4748d21ab8bcSmrg case $host in 4749d21ab8bcSmrg x86_64-*kfreebsd*-gnu) 4750d21ab8bcSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 4751d21ab8bcSmrg ;; 4752d21ab8bcSmrg x86_64-*linux*) 4753d21ab8bcSmrg LD="${LD-ld} -m elf_x86_64" 4754d21ab8bcSmrg ;; 4755d21ab8bcSmrg powerpcle-*linux*) 4756d21ab8bcSmrg LD="${LD-ld} -m elf64lppc" 4757d21ab8bcSmrg ;; 4758d21ab8bcSmrg powerpc-*linux*) 4759d21ab8bcSmrg LD="${LD-ld} -m elf64ppc" 4760d21ab8bcSmrg ;; 4761d21ab8bcSmrg s390*-*linux*|s390*-*tpf*) 4762d21ab8bcSmrg LD="${LD-ld} -m elf64_s390" 4763d21ab8bcSmrg ;; 4764d21ab8bcSmrg sparc*-*linux*) 4765d21ab8bcSmrg LD="${LD-ld} -m elf64_sparc" 4766d21ab8bcSmrg ;; 4767d21ab8bcSmrg esac 4768d21ab8bcSmrg ;; 4769d21ab8bcSmrg esac 4770d21ab8bcSmrg fi 4771d21ab8bcSmrg rm -rf conftest* 4772d21ab8bcSmrg ;; 47736fae4e5dSmrg 4774d21ab8bcSmrg*-*-sco3.2v5*) 4775d21ab8bcSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4776d21ab8bcSmrg SAVE_CFLAGS=$CFLAGS 4777d21ab8bcSmrg CFLAGS="$CFLAGS -belf" 4778d21ab8bcSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4779d21ab8bcSmrg [AC_LANG_PUSH(C) 4780d21ab8bcSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4781d21ab8bcSmrg AC_LANG_POP]) 4782d21ab8bcSmrg if test yes != "$lt_cv_cc_needs_belf"; then 4783d21ab8bcSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4784d21ab8bcSmrg CFLAGS=$SAVE_CFLAGS 4785d21ab8bcSmrg fi 4786d21ab8bcSmrg ;; 4787d21ab8bcSmrg*-*solaris*) 4788d21ab8bcSmrg # Find out what ABI is being produced by ac_compile, and set linker 4789d21ab8bcSmrg # options accordingly. 4790d21ab8bcSmrg echo 'int i;' > conftest.$ac_ext 4791d21ab8bcSmrg if AC_TRY_EVAL(ac_compile); then 4792d21ab8bcSmrg case `$FILECMD conftest.o` in 4793d21ab8bcSmrg *64-bit*) 4794d21ab8bcSmrg case $lt_cv_prog_gnu_ld in 4795d21ab8bcSmrg yes*) 4796d21ab8bcSmrg case $host in 4797d21ab8bcSmrg i?86-*-solaris*|x86_64-*-solaris*) 4798d21ab8bcSmrg LD="${LD-ld} -m elf_x86_64" 4799d21ab8bcSmrg ;; 4800d21ab8bcSmrg sparc*-*-solaris*) 4801d21ab8bcSmrg LD="${LD-ld} -m elf64_sparc" 4802d21ab8bcSmrg ;; 4803d21ab8bcSmrg esac 4804d21ab8bcSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4805d21ab8bcSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4806d21ab8bcSmrg LD=${LD-ld}_sol2 4807d21ab8bcSmrg fi 4808d21ab8bcSmrg ;; 4809d21ab8bcSmrg *) 4810d21ab8bcSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4811d21ab8bcSmrg LD="${LD-ld} -64" 48126fae4e5dSmrg fi 4813d21ab8bcSmrg ;; 4814d21ab8bcSmrg esac 48156fae4e5dSmrg ;; 48166fae4e5dSmrg esac 48176fae4e5dSmrg fi 4818d21ab8bcSmrg rm -rf conftest* 48199c9ff80cSmrg ;; 48206fae4e5dSmrgesac 48211f0ac6a5Smrg 4822d21ab8bcSmrgneed_locks=$enable_libtool_lock 4823d21ab8bcSmrg])# _LT_ENABLE_LOCK 48241f0ac6a5Smrg 48251f0ac6a5Smrg 4826d21ab8bcSmrg# _LT_PROG_AR 4827d21ab8bcSmrg# ----------- 4828d21ab8bcSmrgm4_defun([_LT_PROG_AR], 4829d21ab8bcSmrg[AC_CHECK_TOOLS(AR, [ar], false) 4830d21ab8bcSmrg: ${AR=ar} 4831d21ab8bcSmrg_LT_DECL([], [AR], [1], [The archiver]) 48321f0ac6a5Smrg 4833d21ab8bcSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4834d21ab8bcSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4835d21ab8bcSmrg# higher priority because thats what people were doing historically (setting 4836d21ab8bcSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4837d21ab8bcSmrg# variable obsoleted/removed. 48381f0ac6a5Smrg 4839d21ab8bcSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4840d21ab8bcSmrglt_ar_flags=$AR_FLAGS 4841d21ab8bcSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 48421f0ac6a5Smrg 4843d21ab8bcSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4844d21ab8bcSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4845d21ab8bcSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4846d21ab8bcSmrg [Flags to create an archive]) 48471f0ac6a5Smrg 4848d21ab8bcSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4849d21ab8bcSmrg [lt_cv_ar_at_file=no 4850d21ab8bcSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4851d21ab8bcSmrg [echo conftest.$ac_objext > conftest.lst 4852d21ab8bcSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4853d21ab8bcSmrg AC_TRY_EVAL([lt_ar_try]) 4854d21ab8bcSmrg if test 0 -eq "$ac_status"; then 4855d21ab8bcSmrg # Ensure the archiver fails upon bogus file names. 4856d21ab8bcSmrg rm -f conftest.$ac_objext libconftest.a 4857d21ab8bcSmrg AC_TRY_EVAL([lt_ar_try]) 4858d21ab8bcSmrg if test 0 -ne "$ac_status"; then 4859d21ab8bcSmrg lt_cv_ar_at_file=@ 4860d21ab8bcSmrg fi 4861d21ab8bcSmrg fi 4862d21ab8bcSmrg rm -f conftest.* libconftest.a 4863d21ab8bcSmrg ]) 4864d21ab8bcSmrg ]) 48651f0ac6a5Smrg 4866d21ab8bcSmrgif test no = "$lt_cv_ar_at_file"; then 4867d21ab8bcSmrg archiver_list_spec= 4868d21ab8bcSmrgelse 4869d21ab8bcSmrg archiver_list_spec=$lt_cv_ar_at_file 4870d21ab8bcSmrgfi 4871d21ab8bcSmrg_LT_DECL([], [archiver_list_spec], [1], 4872d21ab8bcSmrg [How to feed a file listing to the archiver]) 4873d21ab8bcSmrg])# _LT_PROG_AR 48741f0ac6a5Smrg 48759c9ff80cSmrg 4876d21ab8bcSmrg# _LT_CMD_OLD_ARCHIVE 4877d21ab8bcSmrg# ------------------- 4878d21ab8bcSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 4879d21ab8bcSmrg[_LT_PROG_AR 48801f0ac6a5Smrg 4881d21ab8bcSmrgAC_CHECK_TOOL(STRIP, strip, :) 4882d21ab8bcSmrgtest -z "$STRIP" && STRIP=: 4883d21ab8bcSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 48841f0ac6a5Smrg 4885d21ab8bcSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 4886d21ab8bcSmrgtest -z "$RANLIB" && RANLIB=: 4887d21ab8bcSmrg_LT_DECL([], [RANLIB], [1], 4888d21ab8bcSmrg [Commands used to install an old-style archive]) 48891f0ac6a5Smrg 4890d21ab8bcSmrg# Determine commands to create old-style static archives. 4891d21ab8bcSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4892d21ab8bcSmrgold_postinstall_cmds='chmod 644 $oldlib' 4893d21ab8bcSmrgold_postuninstall_cmds= 4894d21ab8bcSmrg 4895d21ab8bcSmrgif test -n "$RANLIB"; then 48966fae4e5dSmrg case $host_os in 4897d21ab8bcSmrg bitrig* | openbsd*) 4898d21ab8bcSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 48996fae4e5dSmrg ;; 4900d21ab8bcSmrg *) 4901d21ab8bcSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 49026fae4e5dSmrg ;; 49036fae4e5dSmrg esac 4904d21ab8bcSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 49056fae4e5dSmrgfi 4906d21ab8bcSmrg 4907d21ab8bcSmrgcase $host_os in 4908d21ab8bcSmrg darwin*) 4909d21ab8bcSmrg lock_old_archive_extraction=yes ;; 4910d21ab8bcSmrg *) 4911d21ab8bcSmrg lock_old_archive_extraction=no ;; 4912d21ab8bcSmrgesac 4913d21ab8bcSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 4914d21ab8bcSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 4915d21ab8bcSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 4916d21ab8bcSmrg [Commands used to build an old-style archive]) 4917d21ab8bcSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 4918d21ab8bcSmrg [Whether to use a lock for old archive extraction]) 4919d21ab8bcSmrg])# _LT_CMD_OLD_ARCHIVE 49201f0ac6a5Smrg 49211f0ac6a5Smrg 4922d21ab8bcSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4923d21ab8bcSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4924d21ab8bcSmrg# ---------------------------------------------------------------- 4925d21ab8bcSmrg# Check whether the given compiler option works 4926d21ab8bcSmrgAC_DEFUN([_LT_COMPILER_OPTION], 49276fae4e5dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4928d21ab8bcSmrgm4_require([_LT_DECL_SED])dnl 4929d21ab8bcSmrgAC_CACHE_CHECK([$1], [$2], 4930d21ab8bcSmrg [$2=no 4931d21ab8bcSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 4932d21ab8bcSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4933d21ab8bcSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 4934d21ab8bcSmrg # Insert the option either (1) after the last *FLAGS variable, or 4935d21ab8bcSmrg # (2) before a word containing "conftest.", or (3) at the end. 4936d21ab8bcSmrg # Note that $ac_compile itself does not contain backslashes and begins 4937d21ab8bcSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4938d21ab8bcSmrg # The option is referenced via a variable to avoid confusing sed. 4939d21ab8bcSmrg lt_compile=`echo "$ac_compile" | $SED \ 4940d21ab8bcSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4941d21ab8bcSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4942d21ab8bcSmrg -e 's:$: $lt_compiler_flag:'` 4943d21ab8bcSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4944d21ab8bcSmrg (eval "$lt_compile" 2>conftest.err) 4945d21ab8bcSmrg ac_status=$? 4946d21ab8bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4947d21ab8bcSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4948d21ab8bcSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 4949d21ab8bcSmrg # The compiler can only warn and ignore the option if not recognized 4950d21ab8bcSmrg # So say no if there are warnings other than the usual output. 4951d21ab8bcSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 4952d21ab8bcSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4953d21ab8bcSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 4954d21ab8bcSmrg $2=yes 4955d21ab8bcSmrg fi 4956d21ab8bcSmrg fi 4957d21ab8bcSmrg $RM conftest* 4958d21ab8bcSmrg]) 4959d21ab8bcSmrg 4960d21ab8bcSmrgif test yes = "[$]$2"; then 4961d21ab8bcSmrg m4_if([$5], , :, [$5]) 49626fae4e5dSmrgelse 4963d21ab8bcSmrg m4_if([$6], , :, [$6]) 49646fae4e5dSmrgfi 4965d21ab8bcSmrg])# _LT_COMPILER_OPTION 49661f0ac6a5Smrg 4967d21ab8bcSmrg# Old name: 4968d21ab8bcSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 4969d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 4970d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 49711f0ac6a5Smrg 49721f0ac6a5Smrg 4973d21ab8bcSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4974d21ab8bcSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 4975d21ab8bcSmrg# ---------------------------------------------------- 4976d21ab8bcSmrg# Check whether the given linker option works 4977d21ab8bcSmrgAC_DEFUN([_LT_LINKER_OPTION], 4978d21ab8bcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4979d21ab8bcSmrgm4_require([_LT_DECL_SED])dnl 4980d21ab8bcSmrgAC_CACHE_CHECK([$1], [$2], 4981d21ab8bcSmrg [$2=no 4982d21ab8bcSmrg save_LDFLAGS=$LDFLAGS 4983d21ab8bcSmrg LDFLAGS="$LDFLAGS $3" 4984d21ab8bcSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 4985d21ab8bcSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 4986d21ab8bcSmrg # The linker can only warn and ignore the option if not recognized 4987d21ab8bcSmrg # So say no if there are warnings 4988d21ab8bcSmrg if test -s conftest.err; then 4989d21ab8bcSmrg # Append any errors to the config.log. 4990d21ab8bcSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 4991d21ab8bcSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 4992d21ab8bcSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4993d21ab8bcSmrg if diff conftest.exp conftest.er2 >/dev/null; then 4994d21ab8bcSmrg $2=yes 4995d21ab8bcSmrg fi 4996d21ab8bcSmrg else 4997d21ab8bcSmrg $2=yes 4998d21ab8bcSmrg fi 4999d21ab8bcSmrg fi 5000d21ab8bcSmrg $RM -r conftest* 5001d21ab8bcSmrg LDFLAGS=$save_LDFLAGS 5002d21ab8bcSmrg]) 50039c9ff80cSmrg 5004d21ab8bcSmrgif test yes = "[$]$2"; then 5005d21ab8bcSmrg m4_if([$4], , :, [$4]) 5006d21ab8bcSmrgelse 5007d21ab8bcSmrg m4_if([$5], , :, [$5]) 5008d21ab8bcSmrgfi 5009d21ab8bcSmrg])# _LT_LINKER_OPTION 50101f0ac6a5Smrg 5011d21ab8bcSmrg# Old name: 5012d21ab8bcSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5013d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 5014d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 50151f0ac6a5Smrg 50161f0ac6a5Smrg 5017d21ab8bcSmrg# LT_CMD_MAX_LEN 5018d21ab8bcSmrg#--------------- 5019d21ab8bcSmrgAC_DEFUN([LT_CMD_MAX_LEN], 5020d21ab8bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5021d21ab8bcSmrg# find the maximum length of command line arguments 5022d21ab8bcSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5023d21ab8bcSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5024d21ab8bcSmrg i=0 5025d21ab8bcSmrg teststring=ABCD 50261f0ac6a5Smrg 5027d21ab8bcSmrg case $build_os in 5028d21ab8bcSmrg msdosdjgpp*) 5029d21ab8bcSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5030d21ab8bcSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5031d21ab8bcSmrg # during glob expansion). Even if it were fixed, the result of this 5032d21ab8bcSmrg # check would be larger than it should be. 5033d21ab8bcSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5034d21ab8bcSmrg ;; 50351f0ac6a5Smrg 5036d21ab8bcSmrg gnu*) 5037d21ab8bcSmrg # Under GNU Hurd, this test is not required because there is 5038d21ab8bcSmrg # no limit to the length of command line arguments. 5039d21ab8bcSmrg # Libtool will interpret -1 as no limit whatsoever 5040d21ab8bcSmrg lt_cv_sys_max_cmd_len=-1; 5041d21ab8bcSmrg ;; 50421f0ac6a5Smrg 5043d21ab8bcSmrg cygwin* | mingw* | cegcc*) 5044d21ab8bcSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5045d21ab8bcSmrg # about 5 minutes as the teststring grows exponentially. 5046d21ab8bcSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 5047d21ab8bcSmrg # you end up with a "frozen" computer, even though with patience 5048d21ab8bcSmrg # the test eventually succeeds (with a max line length of 256k). 5049d21ab8bcSmrg # Instead, let's just punt: use the minimum linelength reported by 5050d21ab8bcSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 5051d21ab8bcSmrg lt_cv_sys_max_cmd_len=8192; 5052d21ab8bcSmrg ;; 50531f0ac6a5Smrg 5054d21ab8bcSmrg mint*) 5055d21ab8bcSmrg # On MiNT this can take a long time and run out of memory. 5056d21ab8bcSmrg lt_cv_sys_max_cmd_len=8192; 5057d21ab8bcSmrg ;; 50581f0ac6a5Smrg 5059d21ab8bcSmrg amigaos*) 5060d21ab8bcSmrg # On AmigaOS with pdksh, this test takes hours, literally. 5061d21ab8bcSmrg # So we just punt and use a minimum line length of 8192. 5062d21ab8bcSmrg lt_cv_sys_max_cmd_len=8192; 5063d21ab8bcSmrg ;; 50641f0ac6a5Smrg 5065d21ab8bcSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5066d21ab8bcSmrg # This has been around since 386BSD, at least. Likely further. 5067d21ab8bcSmrg if test -x /sbin/sysctl; then 5068d21ab8bcSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5069d21ab8bcSmrg elif test -x /usr/sbin/sysctl; then 5070d21ab8bcSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5071d21ab8bcSmrg else 5072d21ab8bcSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5073d21ab8bcSmrg fi 5074d21ab8bcSmrg # And add a safety zone 5075d21ab8bcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5076d21ab8bcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5077d21ab8bcSmrg ;; 50781f0ac6a5Smrg 5079d21ab8bcSmrg interix*) 5080d21ab8bcSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5081d21ab8bcSmrg lt_cv_sys_max_cmd_len=196608 5082d21ab8bcSmrg ;; 50831f0ac6a5Smrg 5084d21ab8bcSmrg os2*) 5085d21ab8bcSmrg # The test takes a long time on OS/2. 5086d21ab8bcSmrg lt_cv_sys_max_cmd_len=8192 5087d21ab8bcSmrg ;; 50881f0ac6a5Smrg 5089d21ab8bcSmrg osf*) 5090d21ab8bcSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5091d21ab8bcSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5092d21ab8bcSmrg # nice to cause kernel panics so lets avoid the loop below. 5093d21ab8bcSmrg # First set a reasonable default. 5094d21ab8bcSmrg lt_cv_sys_max_cmd_len=16384 5095d21ab8bcSmrg # 5096d21ab8bcSmrg if test -x /sbin/sysconfig; then 5097d21ab8bcSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5098d21ab8bcSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5099d21ab8bcSmrg esac 5100d21ab8bcSmrg fi 5101d21ab8bcSmrg ;; 5102d21ab8bcSmrg sco3.2v5*) 5103d21ab8bcSmrg lt_cv_sys_max_cmd_len=102400 5104d21ab8bcSmrg ;; 5105d21ab8bcSmrg sysv5* | sco5v6* | sysv4.2uw2*) 5106d21ab8bcSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5107d21ab8bcSmrg if test -n "$kargmax"; then 5108d21ab8bcSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 51096fae4e5dSmrg else 5110d21ab8bcSmrg lt_cv_sys_max_cmd_len=32768 5111d21ab8bcSmrg fi 5112d21ab8bcSmrg ;; 5113d21ab8bcSmrg *) 5114d21ab8bcSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5115d21ab8bcSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5116d21ab8bcSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5117d21ab8bcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5118d21ab8bcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5119d21ab8bcSmrg else 5120d21ab8bcSmrg # Make teststring a little bigger before we do anything with it. 5121d21ab8bcSmrg # a 1K string should be a reasonable start. 5122d21ab8bcSmrg for i in 1 2 3 4 5 6 7 8; do 5123d21ab8bcSmrg teststring=$teststring$teststring 5124d21ab8bcSmrg done 5125d21ab8bcSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5126d21ab8bcSmrg # If test is not a shell built-in, we'll probably end up computing a 5127d21ab8bcSmrg # maximum length that is only half of the actual maximum length, but 5128d21ab8bcSmrg # we can't tell. 5129d21ab8bcSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5130d21ab8bcSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5131d21ab8bcSmrg test 17 != "$i" # 1/2 MB should be enough 5132d21ab8bcSmrg do 5133d21ab8bcSmrg i=`expr $i + 1` 5134d21ab8bcSmrg teststring=$teststring$teststring 5135d21ab8bcSmrg done 5136d21ab8bcSmrg # Only check the string length outside the loop. 5137d21ab8bcSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5138d21ab8bcSmrg teststring= 5139d21ab8bcSmrg # Add a significant safety factor because C++ compilers can tack on 5140d21ab8bcSmrg # massive amounts of additional arguments before passing them to the 5141d21ab8bcSmrg # linker. It appears as though 1/2 is a usable value. 5142d21ab8bcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 51436fae4e5dSmrg fi 5144d21ab8bcSmrg ;; 5145d21ab8bcSmrg esac 5146d21ab8bcSmrg]) 5147d21ab8bcSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 5148d21ab8bcSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5149d21ab8bcSmrgelse 5150d21ab8bcSmrg AC_MSG_RESULT(none) 5151d21ab8bcSmrgfi 5152d21ab8bcSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5153d21ab8bcSmrg_LT_DECL([], [max_cmd_len], [0], 5154d21ab8bcSmrg [What is the maximum length of a command?]) 5155d21ab8bcSmrg])# LT_CMD_MAX_LEN 51561f0ac6a5Smrg 5157d21ab8bcSmrg# Old name: 5158d21ab8bcSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5159d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 5160d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 51611f0ac6a5Smrg 51621f0ac6a5Smrg 5163d21ab8bcSmrg# _LT_HEADER_DLFCN 5164d21ab8bcSmrg# ---------------- 5165d21ab8bcSmrgm4_defun([_LT_HEADER_DLFCN], 5166d21ab8bcSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5167d21ab8bcSmrg])# _LT_HEADER_DLFCN 51681f0ac6a5Smrg 51691f0ac6a5Smrg 5170d21ab8bcSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5171d21ab8bcSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5172d21ab8bcSmrg# ---------------------------------------------------------------- 5173d21ab8bcSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 5174d21ab8bcSmrg[m4_require([_LT_HEADER_DLFCN])dnl 5175d21ab8bcSmrgif test yes = "$cross_compiling"; then : 5176d21ab8bcSmrg [$4] 5177d21ab8bcSmrgelse 5178d21ab8bcSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5179d21ab8bcSmrg lt_status=$lt_dlunknown 5180d21ab8bcSmrg cat > conftest.$ac_ext <<_LT_EOF 5181d21ab8bcSmrg[#line $LINENO "configure" 5182d21ab8bcSmrg#include "confdefs.h" 51831f0ac6a5Smrg 5184d21ab8bcSmrg#if HAVE_DLFCN_H 5185d21ab8bcSmrg#include <dlfcn.h> 5186d21ab8bcSmrg#endif 51871f0ac6a5Smrg 5188d21ab8bcSmrg#include <stdio.h> 51891f0ac6a5Smrg 5190d21ab8bcSmrg#ifdef RTLD_GLOBAL 5191d21ab8bcSmrg# define LT_DLGLOBAL RTLD_GLOBAL 5192d21ab8bcSmrg#else 5193d21ab8bcSmrg# ifdef DL_GLOBAL 5194d21ab8bcSmrg# define LT_DLGLOBAL DL_GLOBAL 5195d21ab8bcSmrg# else 5196d21ab8bcSmrg# define LT_DLGLOBAL 0 5197d21ab8bcSmrg# endif 5198d21ab8bcSmrg#endif 51996fae4e5dSmrg 5200d21ab8bcSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5201d21ab8bcSmrg find out it does not work in some platform. */ 5202d21ab8bcSmrg#ifndef LT_DLLAZY_OR_NOW 5203d21ab8bcSmrg# ifdef RTLD_LAZY 5204d21ab8bcSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5205d21ab8bcSmrg# else 5206d21ab8bcSmrg# ifdef DL_LAZY 5207d21ab8bcSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 5208d21ab8bcSmrg# else 5209d21ab8bcSmrg# ifdef RTLD_NOW 5210d21ab8bcSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5211d21ab8bcSmrg# else 5212d21ab8bcSmrg# ifdef DL_NOW 5213d21ab8bcSmrg# define LT_DLLAZY_OR_NOW DL_NOW 5214d21ab8bcSmrg# else 5215d21ab8bcSmrg# define LT_DLLAZY_OR_NOW 0 5216d21ab8bcSmrg# endif 5217d21ab8bcSmrg# endif 5218d21ab8bcSmrg# endif 5219d21ab8bcSmrg# endif 5220d21ab8bcSmrg#endif 52216fae4e5dSmrg 5222d21ab8bcSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 5223d21ab8bcSmrg correspondingly for the symbols needed. */ 5224d21ab8bcSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5225d21ab8bcSmrgint fnord () __attribute__((visibility("default"))); 5226d21ab8bcSmrg#endif 52276fae4e5dSmrg 5228d21ab8bcSmrgint fnord () { return 42; } 5229d21ab8bcSmrgint main () 5230d21ab8bcSmrg{ 5231d21ab8bcSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5232d21ab8bcSmrg int status = $lt_dlunknown; 52336fae4e5dSmrg 5234d21ab8bcSmrg if (self) 5235d21ab8bcSmrg { 5236d21ab8bcSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5237d21ab8bcSmrg else 5238d21ab8bcSmrg { 5239d21ab8bcSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5240d21ab8bcSmrg else puts (dlerror ()); 5241d21ab8bcSmrg } 5242d21ab8bcSmrg /* dlclose (self); */ 5243d21ab8bcSmrg } 5244d21ab8bcSmrg else 5245d21ab8bcSmrg puts (dlerror ()); 52461f0ac6a5Smrg 5247d21ab8bcSmrg return status; 5248d21ab8bcSmrg}] 5249d21ab8bcSmrg_LT_EOF 5250d21ab8bcSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5251d21ab8bcSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5252d21ab8bcSmrg lt_status=$? 5253d21ab8bcSmrg case x$lt_status in 5254d21ab8bcSmrg x$lt_dlno_uscore) $1 ;; 5255d21ab8bcSmrg x$lt_dlneed_uscore) $2 ;; 5256d21ab8bcSmrg x$lt_dlunknown|x*) $3 ;; 5257d21ab8bcSmrg esac 5258d21ab8bcSmrg else : 5259d21ab8bcSmrg # compilation failed 5260d21ab8bcSmrg $3 5261d21ab8bcSmrg fi 5262d21ab8bcSmrgfi 5263d21ab8bcSmrgrm -fr conftest* 5264d21ab8bcSmrg])# _LT_TRY_DLOPEN_SELF 52651f0ac6a5Smrg 52661f0ac6a5Smrg 5267d21ab8bcSmrg# LT_SYS_DLOPEN_SELF 5268d21ab8bcSmrg# ------------------ 5269d21ab8bcSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5270d21ab8bcSmrg[m4_require([_LT_HEADER_DLFCN])dnl 5271d21ab8bcSmrgif test yes != "$enable_dlopen"; then 5272d21ab8bcSmrg enable_dlopen=unknown 5273d21ab8bcSmrg enable_dlopen_self=unknown 5274d21ab8bcSmrg enable_dlopen_self_static=unknown 5275d21ab8bcSmrgelse 5276d21ab8bcSmrg lt_cv_dlopen=no 5277d21ab8bcSmrg lt_cv_dlopen_libs= 52781f0ac6a5Smrg 5279d21ab8bcSmrg case $host_os in 5280d21ab8bcSmrg beos*) 5281d21ab8bcSmrg lt_cv_dlopen=load_add_on 5282d21ab8bcSmrg lt_cv_dlopen_libs= 5283d21ab8bcSmrg lt_cv_dlopen_self=yes 5284d21ab8bcSmrg ;; 52851f0ac6a5Smrg 5286d21ab8bcSmrg mingw* | pw32* | cegcc*) 5287d21ab8bcSmrg lt_cv_dlopen=LoadLibrary 5288d21ab8bcSmrg lt_cv_dlopen_libs= 5289d21ab8bcSmrg ;; 52901f0ac6a5Smrg 5291d21ab8bcSmrg cygwin*) 5292d21ab8bcSmrg lt_cv_dlopen=dlopen 5293d21ab8bcSmrg lt_cv_dlopen_libs= 5294d21ab8bcSmrg ;; 52956fae4e5dSmrg 5296d21ab8bcSmrg darwin*) 5297d21ab8bcSmrg # if libdl is installed we need to link against it 5298d21ab8bcSmrg AC_CHECK_LIB([dl], [dlopen], 5299d21ab8bcSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5300d21ab8bcSmrg lt_cv_dlopen=dyld 5301d21ab8bcSmrg lt_cv_dlopen_libs= 5302d21ab8bcSmrg lt_cv_dlopen_self=yes 5303d21ab8bcSmrg ]) 5304d21ab8bcSmrg ;; 53056fae4e5dSmrg 5306d21ab8bcSmrg tpf*) 5307d21ab8bcSmrg # Don't try to run any link tests for TPF. We know it's impossible 5308d21ab8bcSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 5309d21ab8bcSmrg lt_cv_dlopen=dlopen 5310d21ab8bcSmrg lt_cv_dlopen_libs= 5311d21ab8bcSmrg lt_cv_dlopen_self=no 5312d21ab8bcSmrg ;; 53136fae4e5dSmrg 5314d21ab8bcSmrg *) 5315d21ab8bcSmrg AC_CHECK_FUNC([shl_load], 5316d21ab8bcSmrg [lt_cv_dlopen=shl_load], 5317d21ab8bcSmrg [AC_CHECK_LIB([dld], [shl_load], 5318d21ab8bcSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5319d21ab8bcSmrg [AC_CHECK_FUNC([dlopen], 5320d21ab8bcSmrg [lt_cv_dlopen=dlopen], 5321d21ab8bcSmrg [AC_CHECK_LIB([dl], [dlopen], 5322d21ab8bcSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5323d21ab8bcSmrg [AC_CHECK_LIB([svld], [dlopen], 5324d21ab8bcSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5325d21ab8bcSmrg [AC_CHECK_LIB([dld], [dld_link], 5326d21ab8bcSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5327d21ab8bcSmrg ]) 5328d21ab8bcSmrg ]) 5329d21ab8bcSmrg ]) 5330d21ab8bcSmrg ]) 5331d21ab8bcSmrg ]) 5332d21ab8bcSmrg ;; 5333d21ab8bcSmrg esac 53346fae4e5dSmrg 5335d21ab8bcSmrg if test no = "$lt_cv_dlopen"; then 5336d21ab8bcSmrg enable_dlopen=no 5337d21ab8bcSmrg else 5338d21ab8bcSmrg enable_dlopen=yes 5339d21ab8bcSmrg fi 53406fae4e5dSmrg 5341d21ab8bcSmrg case $lt_cv_dlopen in 5342d21ab8bcSmrg dlopen) 5343d21ab8bcSmrg save_CPPFLAGS=$CPPFLAGS 5344d21ab8bcSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 53451f0ac6a5Smrg 5346d21ab8bcSmrg save_LDFLAGS=$LDFLAGS 5347d21ab8bcSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 53481f0ac6a5Smrg 5349d21ab8bcSmrg save_LIBS=$LIBS 5350d21ab8bcSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 53511f0ac6a5Smrg 5352d21ab8bcSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 5353d21ab8bcSmrg lt_cv_dlopen_self, [dnl 5354d21ab8bcSmrg _LT_TRY_DLOPEN_SELF( 5355d21ab8bcSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5356d21ab8bcSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5357d21ab8bcSmrg ]) 53581f0ac6a5Smrg 5359d21ab8bcSmrg if test yes = "$lt_cv_dlopen_self"; then 5360d21ab8bcSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5361d21ab8bcSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5362d21ab8bcSmrg lt_cv_dlopen_self_static, [dnl 5363d21ab8bcSmrg _LT_TRY_DLOPEN_SELF( 5364d21ab8bcSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5365d21ab8bcSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5366d21ab8bcSmrg ]) 5367d21ab8bcSmrg fi 53681f0ac6a5Smrg 5369d21ab8bcSmrg CPPFLAGS=$save_CPPFLAGS 5370d21ab8bcSmrg LDFLAGS=$save_LDFLAGS 5371d21ab8bcSmrg LIBS=$save_LIBS 5372d21ab8bcSmrg ;; 5373d21ab8bcSmrg esac 53741f0ac6a5Smrg 5375d21ab8bcSmrg case $lt_cv_dlopen_self in 5376d21ab8bcSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5377d21ab8bcSmrg *) enable_dlopen_self=unknown ;; 5378d21ab8bcSmrg esac 53791f0ac6a5Smrg 5380d21ab8bcSmrg case $lt_cv_dlopen_self_static in 5381d21ab8bcSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5382d21ab8bcSmrg *) enable_dlopen_self_static=unknown ;; 5383d21ab8bcSmrg esac 5384d21ab8bcSmrgfi 5385d21ab8bcSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 5386d21ab8bcSmrg [Whether dlopen is supported]) 5387d21ab8bcSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5388d21ab8bcSmrg [Whether dlopen of programs is supported]) 5389d21ab8bcSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5390d21ab8bcSmrg [Whether dlopen of statically linked programs is supported]) 5391d21ab8bcSmrg])# LT_SYS_DLOPEN_SELF 53921f0ac6a5Smrg 5393d21ab8bcSmrg# Old name: 5394d21ab8bcSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5395d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 5396d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 53971f0ac6a5Smrg 53981f0ac6a5Smrg 5399d21ab8bcSmrg# _LT_COMPILER_C_O([TAGNAME]) 5400d21ab8bcSmrg# --------------------------- 5401d21ab8bcSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 5402d21ab8bcSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5403d21ab8bcSmrgm4_defun([_LT_COMPILER_C_O], 5404d21ab8bcSmrg[m4_require([_LT_DECL_SED])dnl 5405d21ab8bcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5406d21ab8bcSmrgm4_require([_LT_TAG_COMPILER])dnl 5407d21ab8bcSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5408d21ab8bcSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5409d21ab8bcSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5410d21ab8bcSmrg $RM -r conftest 2>/dev/null 5411d21ab8bcSmrg mkdir conftest 5412d21ab8bcSmrg cd conftest 5413d21ab8bcSmrg mkdir out 5414d21ab8bcSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 54151f0ac6a5Smrg 5416d21ab8bcSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 5417d21ab8bcSmrg # Insert the option either (1) after the last *FLAGS variable, or 5418d21ab8bcSmrg # (2) before a word containing "conftest.", or (3) at the end. 5419d21ab8bcSmrg # Note that $ac_compile itself does not contain backslashes and begins 5420d21ab8bcSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5421d21ab8bcSmrg lt_compile=`echo "$ac_compile" | $SED \ 5422d21ab8bcSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5423d21ab8bcSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5424d21ab8bcSmrg -e 's:$: $lt_compiler_flag:'` 5425d21ab8bcSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5426d21ab8bcSmrg (eval "$lt_compile" 2>out/conftest.err) 5427d21ab8bcSmrg ac_status=$? 5428d21ab8bcSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 5429d21ab8bcSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5430d21ab8bcSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 5431d21ab8bcSmrg then 5432d21ab8bcSmrg # The compiler can only warn and ignore the option if not recognized 5433d21ab8bcSmrg # So say no if there are warnings 5434d21ab8bcSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5435d21ab8bcSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5436d21ab8bcSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5437d21ab8bcSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5438d21ab8bcSmrg fi 5439d21ab8bcSmrg fi 5440d21ab8bcSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 5441d21ab8bcSmrg $RM conftest* 5442d21ab8bcSmrg # SGI C++ compiler will create directory out/ii_files/ for 5443d21ab8bcSmrg # template instantiation 5444d21ab8bcSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5445d21ab8bcSmrg $RM out/* && rmdir out 5446d21ab8bcSmrg cd .. 5447d21ab8bcSmrg $RM -r conftest 5448d21ab8bcSmrg $RM conftest* 5449d21ab8bcSmrg]) 5450d21ab8bcSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5451d21ab8bcSmrg [Does compiler simultaneously support -c and -o options?]) 5452d21ab8bcSmrg])# _LT_COMPILER_C_O 54531f0ac6a5Smrg 54541f0ac6a5Smrg 5455d21ab8bcSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5456d21ab8bcSmrg# ---------------------------------- 5457d21ab8bcSmrg# Check to see if we can do hard links to lock some files if needed 5458d21ab8bcSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 5459d21ab8bcSmrg[m4_require([_LT_ENABLE_LOCK])dnl 5460d21ab8bcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5461d21ab8bcSmrg_LT_COMPILER_C_O([$1]) 54621f0ac6a5Smrg 5463d21ab8bcSmrghard_links=nottested 5464d21ab8bcSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5465d21ab8bcSmrg # do not overwrite the value of need_locks provided by the user 5466d21ab8bcSmrg AC_MSG_CHECKING([if we can lock with hard links]) 5467d21ab8bcSmrg hard_links=yes 5468d21ab8bcSmrg $RM conftest* 5469d21ab8bcSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5470d21ab8bcSmrg touch conftest.a 5471d21ab8bcSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 5472d21ab8bcSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5473d21ab8bcSmrg AC_MSG_RESULT([$hard_links]) 5474d21ab8bcSmrg if test no = "$hard_links"; then 5475d21ab8bcSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5476d21ab8bcSmrg need_locks=warn 5477d21ab8bcSmrg fi 5478d21ab8bcSmrgelse 5479d21ab8bcSmrg need_locks=no 5480d21ab8bcSmrgfi 5481d21ab8bcSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5482d21ab8bcSmrg])# _LT_COMPILER_FILE_LOCKS 54831f0ac6a5Smrg 54841f0ac6a5Smrg 5485d21ab8bcSmrg# _LT_CHECK_OBJDIR 5486d21ab8bcSmrg# ---------------- 5487d21ab8bcSmrgm4_defun([_LT_CHECK_OBJDIR], 5488d21ab8bcSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5489d21ab8bcSmrg[rm -f .libs 2>/dev/null 5490d21ab8bcSmrgmkdir .libs 2>/dev/null 5491d21ab8bcSmrgif test -d .libs; then 5492d21ab8bcSmrg lt_cv_objdir=.libs 5493d21ab8bcSmrgelse 5494d21ab8bcSmrg # MS-DOS does not allow filenames that begin with a dot. 5495d21ab8bcSmrg lt_cv_objdir=_libs 5496d21ab8bcSmrgfi 5497d21ab8bcSmrgrmdir .libs 2>/dev/null]) 5498d21ab8bcSmrgobjdir=$lt_cv_objdir 5499d21ab8bcSmrg_LT_DECL([], [objdir], [0], 5500d21ab8bcSmrg [The name of the directory that contains temporary libtool files])dnl 5501d21ab8bcSmrgm4_pattern_allow([LT_OBJDIR])dnl 5502d21ab8bcSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5503d21ab8bcSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 5504d21ab8bcSmrg])# _LT_CHECK_OBJDIR 55051f0ac6a5Smrg 55061f0ac6a5Smrg 5507d21ab8bcSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5508d21ab8bcSmrg# -------------------------------------- 5509d21ab8bcSmrg# Check hardcoding attributes. 5510d21ab8bcSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5511d21ab8bcSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5512d21ab8bcSmrg_LT_TAGVAR(hardcode_action, $1)= 5513d21ab8bcSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5514d21ab8bcSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 5515d21ab8bcSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 55161f0ac6a5Smrg 5517d21ab8bcSmrg # We can hardcode non-existent directories. 5518d21ab8bcSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5519d21ab8bcSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 5520d21ab8bcSmrg # have to relink, otherwise we might link with an installed library 5521d21ab8bcSmrg # when we should be linking with a yet-to-be-installed one 5522d21ab8bcSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5523d21ab8bcSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5524d21ab8bcSmrg # Linking always hardcodes the temporary library directory. 5525d21ab8bcSmrg _LT_TAGVAR(hardcode_action, $1)=relink 5526d21ab8bcSmrg else 5527d21ab8bcSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 5528d21ab8bcSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 5529d21ab8bcSmrg fi 5530d21ab8bcSmrgelse 5531d21ab8bcSmrg # We cannot hardcode anything, or else we can only hardcode existing 5532d21ab8bcSmrg # directories. 5533d21ab8bcSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 5534d21ab8bcSmrgfi 5535d21ab8bcSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 55369c9ff80cSmrg 5537d21ab8bcSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5538d21ab8bcSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5539d21ab8bcSmrg # Fast installation is not supported 5540d21ab8bcSmrg enable_fast_install=no 5541d21ab8bcSmrgelif test yes = "$shlibpath_overrides_runpath" || 5542d21ab8bcSmrg test no = "$enable_shared"; then 5543d21ab8bcSmrg # Fast installation is not necessary 5544d21ab8bcSmrg enable_fast_install=needless 5545d21ab8bcSmrgfi 5546d21ab8bcSmrg_LT_TAGDECL([], [hardcode_action], [0], 5547d21ab8bcSmrg [How to hardcode a shared library path into an executable]) 5548d21ab8bcSmrg])# _LT_LINKER_HARDCODE_LIBPATH 55499c9ff80cSmrg 55501f0ac6a5Smrg 5551d21ab8bcSmrg# _LT_CMD_STRIPLIB 5552d21ab8bcSmrg# ---------------- 5553d21ab8bcSmrgm4_defun([_LT_CMD_STRIPLIB], 5554d21ab8bcSmrg[m4_require([_LT_DECL_EGREP]) 5555d21ab8bcSmrgstriplib= 5556d21ab8bcSmrgold_striplib= 5557d21ab8bcSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 5558d21ab8bcSmrgif test -z "$STRIP"; then 5559d21ab8bcSmrg AC_MSG_RESULT([no]) 5560d21ab8bcSmrgelse 5561d21ab8bcSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5562d21ab8bcSmrg old_striplib="$STRIP --strip-debug" 5563d21ab8bcSmrg striplib="$STRIP --strip-unneeded" 5564d21ab8bcSmrg AC_MSG_RESULT([yes]) 5565d21ab8bcSmrg else 5566d21ab8bcSmrg case $host_os in 5567d21ab8bcSmrg darwin*) 5568d21ab8bcSmrg # FIXME - insert some real tests, host_os isn't really good enough 5569d21ab8bcSmrg striplib="$STRIP -x" 5570d21ab8bcSmrg old_striplib="$STRIP -S" 5571d21ab8bcSmrg AC_MSG_RESULT([yes]) 5572d21ab8bcSmrg ;; 5573d21ab8bcSmrg freebsd*) 5574d21ab8bcSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5575d21ab8bcSmrg old_striplib="$STRIP --strip-debug" 5576d21ab8bcSmrg striplib="$STRIP --strip-unneeded" 5577d21ab8bcSmrg AC_MSG_RESULT([yes]) 5578d21ab8bcSmrg else 5579d21ab8bcSmrg AC_MSG_RESULT([no]) 5580d21ab8bcSmrg fi 5581d21ab8bcSmrg ;; 5582d21ab8bcSmrg *) 5583d21ab8bcSmrg AC_MSG_RESULT([no]) 5584d21ab8bcSmrg ;; 5585d21ab8bcSmrg esac 5586d21ab8bcSmrg fi 5587d21ab8bcSmrgfi 5588d21ab8bcSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5589d21ab8bcSmrg_LT_DECL([], [striplib], [1]) 5590d21ab8bcSmrg])# _LT_CMD_STRIPLIB 55911f0ac6a5Smrg 55921f0ac6a5Smrg 5593d21ab8bcSmrg# _LT_PREPARE_MUNGE_PATH_LIST 5594d21ab8bcSmrg# --------------------------- 5595d21ab8bcSmrg# Make sure func_munge_path_list() is defined correctly. 5596d21ab8bcSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5597d21ab8bcSmrg[[# func_munge_path_list VARIABLE PATH 5598d21ab8bcSmrg# ----------------------------------- 5599d21ab8bcSmrg# VARIABLE is name of variable containing _space_ separated list of 5600d21ab8bcSmrg# directories to be munged by the contents of PATH, which is string 5601d21ab8bcSmrg# having a format: 5602d21ab8bcSmrg# "DIR[:DIR]:" 5603d21ab8bcSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 5604d21ab8bcSmrg# ":DIR[:DIR]" 5605d21ab8bcSmrg# string "DIR[ DIR]" will be appended to VARIABLE 5606d21ab8bcSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 5607d21ab8bcSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5608d21ab8bcSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 5609d21ab8bcSmrg# "DIR[:DIR]" 5610d21ab8bcSmrg# VARIABLE will be replaced by "DIR[ DIR]" 5611d21ab8bcSmrgfunc_munge_path_list () 5612d21ab8bcSmrg{ 5613d21ab8bcSmrg case x@S|@2 in 5614d21ab8bcSmrg x) 56156fae4e5dSmrg ;; 5616d21ab8bcSmrg *:) 5617d21ab8bcSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 56186fae4e5dSmrg ;; 5619d21ab8bcSmrg x:*) 5620d21ab8bcSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 56216fae4e5dSmrg ;; 5622d21ab8bcSmrg *::*) 5623d21ab8bcSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5624d21ab8bcSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5625d21ab8bcSmrg ;; 5626d21ab8bcSmrg *) 5627d21ab8bcSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5628d21ab8bcSmrg ;; 5629d21ab8bcSmrg esac 5630d21ab8bcSmrg} 5631d21ab8bcSmrg]])# _LT_PREPARE_PATH_LIST 56321f0ac6a5Smrg 56339c9ff80cSmrg 5634d21ab8bcSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 5635d21ab8bcSmrg# ----------------------------- 5636d21ab8bcSmrg# PORTME Fill in your ld.so characteristics 5637d21ab8bcSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 5638d21ab8bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5639d21ab8bcSmrgm4_require([_LT_DECL_EGREP])dnl 5640d21ab8bcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5641d21ab8bcSmrgm4_require([_LT_DECL_OBJDUMP])dnl 5642d21ab8bcSmrgm4_require([_LT_DECL_SED])dnl 5643d21ab8bcSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 5644d21ab8bcSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5645d21ab8bcSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 5646d21ab8bcSmrgm4_if([$1], 5647d21ab8bcSmrg [], [ 5648d21ab8bcSmrgif test yes = "$GCC"; then 5649d21ab8bcSmrg case $host_os in 5650d21ab8bcSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5651d21ab8bcSmrg *) lt_awk_arg='/^libraries:/' ;; 5652d21ab8bcSmrg esac 5653d21ab8bcSmrg case $host_os in 5654d21ab8bcSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5655d21ab8bcSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 5656d21ab8bcSmrg esac 5657d21ab8bcSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5658d21ab8bcSmrg case $lt_search_path_spec in 5659d21ab8bcSmrg *\;*) 5660d21ab8bcSmrg # if the path contains ";" then we assume it to be the separator 5661d21ab8bcSmrg # otherwise default to the standard path separator (i.e. ":") - it is 5662d21ab8bcSmrg # assumed that no part of a normal pathname contains ";" but that should 5663d21ab8bcSmrg # okay in the real world where ";" in dirpaths is itself problematic. 5664d21ab8bcSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5665d21ab8bcSmrg ;; 5666d21ab8bcSmrg *) 5667d21ab8bcSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5668d21ab8bcSmrg ;; 5669d21ab8bcSmrg esac 5670d21ab8bcSmrg # Ok, now we have the path, separated by spaces, we can step through it 5671d21ab8bcSmrg # and add multilib dir if necessary... 5672d21ab8bcSmrg lt_tmp_lt_search_path_spec= 5673d21ab8bcSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5674d21ab8bcSmrg # ...but if some path component already ends with the multilib dir we assume 5675d21ab8bcSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5676d21ab8bcSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 5677d21ab8bcSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5678d21ab8bcSmrg lt_multi_os_dir= 5679d21ab8bcSmrg ;; 5680d21ab8bcSmrg esac 5681d21ab8bcSmrg for lt_sys_path in $lt_search_path_spec; do 5682d21ab8bcSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 5683d21ab8bcSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5684d21ab8bcSmrg elif test -n "$lt_multi_os_dir"; then 5685d21ab8bcSmrg test -d "$lt_sys_path" && \ 5686d21ab8bcSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5687d21ab8bcSmrg fi 5688d21ab8bcSmrg done 5689d21ab8bcSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5690d21ab8bcSmrgBEGIN {RS = " "; FS = "/|\n";} { 5691d21ab8bcSmrg lt_foo = ""; 5692d21ab8bcSmrg lt_count = 0; 5693d21ab8bcSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 5694d21ab8bcSmrg if ($lt_i != "" && $lt_i != ".") { 5695d21ab8bcSmrg if ($lt_i == "..") { 5696d21ab8bcSmrg lt_count++; 5697d21ab8bcSmrg } else { 5698d21ab8bcSmrg if (lt_count == 0) { 5699d21ab8bcSmrg lt_foo = "/" $lt_i lt_foo; 5700d21ab8bcSmrg } else { 5701d21ab8bcSmrg lt_count--; 5702d21ab8bcSmrg } 5703d21ab8bcSmrg } 5704d21ab8bcSmrg } 5705d21ab8bcSmrg } 5706d21ab8bcSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5707d21ab8bcSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5708d21ab8bcSmrg}'` 5709d21ab8bcSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 5710d21ab8bcSmrg # for these hosts. 5711d21ab8bcSmrg case $host_os in 5712d21ab8bcSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5713d21ab8bcSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5714d21ab8bcSmrg esac 5715d21ab8bcSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5716d21ab8bcSmrgelse 5717d21ab8bcSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5718d21ab8bcSmrgfi]) 5719d21ab8bcSmrglibrary_names_spec= 5720d21ab8bcSmrglibname_spec='lib$name' 5721d21ab8bcSmrgsoname_spec= 5722d21ab8bcSmrgshrext_cmds=.so 5723d21ab8bcSmrgpostinstall_cmds= 5724d21ab8bcSmrgpostuninstall_cmds= 5725d21ab8bcSmrgfinish_cmds= 5726d21ab8bcSmrgfinish_eval= 5727d21ab8bcSmrgshlibpath_var= 5728d21ab8bcSmrgshlibpath_overrides_runpath=unknown 5729d21ab8bcSmrgversion_type=none 5730d21ab8bcSmrgdynamic_linker="$host_os ld.so" 5731d21ab8bcSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 5732d21ab8bcSmrgneed_lib_prefix=unknown 5733d21ab8bcSmrghardcode_into_libs=no 57341f0ac6a5Smrg 5735d21ab8bcSmrg# when you set need_version to no, make sure it does not cause -set_version 5736d21ab8bcSmrg# flags to be left without arguments 5737d21ab8bcSmrgneed_version=unknown 57381f0ac6a5Smrg 5739d21ab8bcSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5740d21ab8bcSmrg[User-defined run-time library search path.]) 57411f0ac6a5Smrg 5742d21ab8bcSmrgcase $host_os in 5743d21ab8bcSmrgaix3*) 5744d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 5745d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5746d21ab8bcSmrg shlibpath_var=LIBPATH 57471f0ac6a5Smrg 5748d21ab8bcSmrg # AIX 3 has no versioning support, so we append a major version to the name. 5749d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 5750d21ab8bcSmrg ;; 57511f0ac6a5Smrg 5752d21ab8bcSmrgaix[[4-9]]*) 5753d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 5754d21ab8bcSmrg need_lib_prefix=no 5755d21ab8bcSmrg need_version=no 5756d21ab8bcSmrg hardcode_into_libs=yes 5757d21ab8bcSmrg if test ia64 = "$host_cpu"; then 5758d21ab8bcSmrg # AIX 5 supports IA64 5759d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5760d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 5761d21ab8bcSmrg else 5762d21ab8bcSmrg # With GCC up to 2.95.x, collect2 would create an import file 5763d21ab8bcSmrg # for dependence libraries. The import file would start with 5764d21ab8bcSmrg # the line '#! .'. This would cause the generated library to 5765d21ab8bcSmrg # depend on '.', always an invalid library. This was fixed in 5766d21ab8bcSmrg # development snapshots of GCC prior to 3.0. 5767d21ab8bcSmrg case $host_os in 5768d21ab8bcSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 5769d21ab8bcSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5770d21ab8bcSmrg echo ' yes ' 5771d21ab8bcSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5772d21ab8bcSmrg : 5773d21ab8bcSmrg else 5774d21ab8bcSmrg can_build_shared=no 5775d21ab8bcSmrg fi 57766fae4e5dSmrg ;; 5777d21ab8bcSmrg esac 5778d21ab8bcSmrg # Using Import Files as archive members, it is possible to support 5779d21ab8bcSmrg # filename-based versioning of shared library archives on AIX. While 5780d21ab8bcSmrg # this would work for both with and without runtime linking, it will 5781d21ab8bcSmrg # prevent static linking of such archives. So we do filename-based 5782d21ab8bcSmrg # shared library versioning with .so extension only, which is used 5783d21ab8bcSmrg # when both runtime linking and shared linking is enabled. 5784d21ab8bcSmrg # Unfortunately, runtime linking may impact performance, so we do 5785d21ab8bcSmrg # not want this to be the default eventually. Also, we use the 5786d21ab8bcSmrg # versioned .so libs for executables only if there is the -brtl 5787d21ab8bcSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5788d21ab8bcSmrg # To allow for filename-based versioning support, we need to create 5789d21ab8bcSmrg # libNAME.so.V as an archive file, containing: 5790d21ab8bcSmrg # *) an Import File, referring to the versioned filename of the 5791d21ab8bcSmrg # archive as well as the shared archive member, telling the 5792d21ab8bcSmrg # bitwidth (32 or 64) of that shared object, and providing the 5793d21ab8bcSmrg # list of exported symbols of that shared object, eventually 5794d21ab8bcSmrg # decorated with the 'weak' keyword 5795d21ab8bcSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 5796d21ab8bcSmrg # it being seen by the linker. 5797d21ab8bcSmrg # At run time we better use the real file rather than another symlink, 5798d21ab8bcSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5799d21ab8bcSmrg 5800d21ab8bcSmrg case $with_aix_soname,$aix_use_runtimelinking in 5801d21ab8bcSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5802d21ab8bcSmrg # soname into executable. Probably we can add versioning support to 5803d21ab8bcSmrg # collect2, so additional links can be useful in future. 5804d21ab8bcSmrg aix,yes) # traditional libtool 5805d21ab8bcSmrg dynamic_linker='AIX unversionable lib.so' 5806d21ab8bcSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5807d21ab8bcSmrg # instead of lib<name>.a to let people know that these are not 5808d21ab8bcSmrg # typical AIX shared libraries. 5809d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5810d21ab8bcSmrg ;; 5811d21ab8bcSmrg aix,no) # traditional AIX only 5812d21ab8bcSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5813d21ab8bcSmrg # We preserve .a as extension for shared libraries through AIX4.2 5814d21ab8bcSmrg # and later when we are not doing run time linking. 5815d21ab8bcSmrg library_names_spec='$libname$release.a $libname.a' 5816d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 5817d21ab8bcSmrg ;; 5818d21ab8bcSmrg svr4,*) # full svr4 only 5819d21ab8bcSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5820d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5821d21ab8bcSmrg # We do not specify a path in Import Files, so LIBPATH fires. 5822d21ab8bcSmrg shlibpath_overrides_runpath=yes 5823d21ab8bcSmrg ;; 5824d21ab8bcSmrg *,yes) # both, prefer svr4 5825d21ab8bcSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5826d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5827d21ab8bcSmrg # unpreferred sharedlib libNAME.a needs extra handling 5828d21ab8bcSmrg 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"' 5829d21ab8bcSmrg 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"' 5830d21ab8bcSmrg # We do not specify a path in Import Files, so LIBPATH fires. 5831d21ab8bcSmrg shlibpath_overrides_runpath=yes 5832d21ab8bcSmrg ;; 5833d21ab8bcSmrg *,no) # both, prefer aix 5834d21ab8bcSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5835d21ab8bcSmrg library_names_spec='$libname$release.a $libname.a' 5836d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 5837d21ab8bcSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5838d21ab8bcSmrg 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)' 5839d21ab8bcSmrg 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"' 58406fae4e5dSmrg ;; 58416fae4e5dSmrg esac 5842d21ab8bcSmrg shlibpath_var=LIBPATH 5843d21ab8bcSmrg fi 5844d21ab8bcSmrg ;; 58451f0ac6a5Smrg 5846d21ab8bcSmrgamigaos*) 5847d21ab8bcSmrg case $host_cpu in 5848d21ab8bcSmrg powerpc) 5849d21ab8bcSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 5850d21ab8bcSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5851d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5852d21ab8bcSmrg ;; 5853d21ab8bcSmrg m68k) 5854d21ab8bcSmrg library_names_spec='$libname.ixlibrary $libname.a' 5855d21ab8bcSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 5856d21ab8bcSmrg 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' 5857d21ab8bcSmrg ;; 5858d21ab8bcSmrg esac 5859d21ab8bcSmrg ;; 58601f0ac6a5Smrg 5861d21ab8bcSmrgbeos*) 5862d21ab8bcSmrg library_names_spec='$libname$shared_ext' 5863d21ab8bcSmrg dynamic_linker="$host_os ld.so" 5864d21ab8bcSmrg shlibpath_var=LIBRARY_PATH 5865d21ab8bcSmrg ;; 5866e5410a46Smrg 5867d21ab8bcSmrgbsdi[[45]]*) 5868d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 5869d21ab8bcSmrg need_version=no 5870d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5871d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 5872d21ab8bcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5873d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 5874d21ab8bcSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5875d21ab8bcSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5876d21ab8bcSmrg # the default ld.so.conf also contains /usr/contrib/lib and 5877d21ab8bcSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5878d21ab8bcSmrg # libtool to hard-code these into programs 5879d21ab8bcSmrg ;; 58809c9ff80cSmrg 5881d21ab8bcSmrgcygwin* | mingw* | pw32* | cegcc*) 5882d21ab8bcSmrg version_type=windows 5883d21ab8bcSmrg shrext_cmds=.dll 5884d21ab8bcSmrg need_version=no 5885d21ab8bcSmrg need_lib_prefix=no 58869c9ff80cSmrg 5887d21ab8bcSmrg case $GCC,$cc_basename in 5888d21ab8bcSmrg yes,*) 5889d21ab8bcSmrg # gcc 5890d21ab8bcSmrg library_names_spec='$libname.dll.a' 5891d21ab8bcSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5892d21ab8bcSmrg postinstall_cmds='base_file=`basename \$file`~ 5893d21ab8bcSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5894d21ab8bcSmrg dldir=$destdir/`dirname \$dlpath`~ 5895d21ab8bcSmrg test -d \$dldir || mkdir -p \$dldir~ 5896d21ab8bcSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 5897d21ab8bcSmrg chmod a+x \$dldir/$dlname~ 5898d21ab8bcSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5899d21ab8bcSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5900d21ab8bcSmrg fi' 5901d21ab8bcSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5902d21ab8bcSmrg dlpath=$dir/\$dldll~ 5903d21ab8bcSmrg $RM \$dlpath' 5904d21ab8bcSmrg shlibpath_overrides_runpath=yes 59059c9ff80cSmrg 5906d21ab8bcSmrg case $host_os in 5907d21ab8bcSmrg cygwin*) 5908d21ab8bcSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5909d21ab8bcSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5910d21ab8bcSmrgm4_if([$1], [],[ 5911d21ab8bcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5912d21ab8bcSmrg ;; 5913d21ab8bcSmrg mingw* | cegcc*) 5914d21ab8bcSmrg # MinGW DLLs use traditional 'lib' prefix 5915d21ab8bcSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5916d21ab8bcSmrg ;; 5917d21ab8bcSmrg pw32*) 5918d21ab8bcSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 5919d21ab8bcSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5920d21ab8bcSmrg ;; 5921d21ab8bcSmrg esac 5922d21ab8bcSmrg dynamic_linker='Win32 ld.exe' 5923d21ab8bcSmrg ;; 59249c9ff80cSmrg 5925d21ab8bcSmrg *,cl* | *,icl*) 5926d21ab8bcSmrg # Native MSVC or ICC 5927d21ab8bcSmrg libname_spec='$name' 5928d21ab8bcSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5929d21ab8bcSmrg library_names_spec='$libname.dll.lib' 59309c9ff80cSmrg 5931d21ab8bcSmrg case $build_os in 5932d21ab8bcSmrg mingw*) 5933d21ab8bcSmrg sys_lib_search_path_spec= 5934d21ab8bcSmrg lt_save_ifs=$IFS 5935d21ab8bcSmrg IFS=';' 5936d21ab8bcSmrg for lt_path in $LIB 5937d21ab8bcSmrg do 5938d21ab8bcSmrg IFS=$lt_save_ifs 5939d21ab8bcSmrg # Let DOS variable expansion print the short 8.3 style file name. 5940d21ab8bcSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 5941d21ab8bcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 5942d21ab8bcSmrg done 5943d21ab8bcSmrg IFS=$lt_save_ifs 5944d21ab8bcSmrg # Convert to MSYS style. 5945d21ab8bcSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 5946d21ab8bcSmrg ;; 5947d21ab8bcSmrg cygwin*) 5948d21ab8bcSmrg # Convert to unix form, then to dos form, then back to unix form 5949d21ab8bcSmrg # but this time dos style (no spaces!) so that the unix form looks 5950d21ab8bcSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 5951d21ab8bcSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 5952d21ab8bcSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 5953d21ab8bcSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5954d21ab8bcSmrg ;; 5955d21ab8bcSmrg *) 5956d21ab8bcSmrg sys_lib_search_path_spec=$LIB 5957d21ab8bcSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 5958d21ab8bcSmrg # It is most probably a Windows format PATH. 5959d21ab8bcSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 5960d21ab8bcSmrg else 5961d21ab8bcSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5962d21ab8bcSmrg fi 5963d21ab8bcSmrg # FIXME: find the short name or the path components, as spaces are 5964d21ab8bcSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 5965d21ab8bcSmrg ;; 5966d21ab8bcSmrg esac 59671f0ac6a5Smrg 5968d21ab8bcSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5969d21ab8bcSmrg postinstall_cmds='base_file=`basename \$file`~ 5970d21ab8bcSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5971d21ab8bcSmrg dldir=$destdir/`dirname \$dlpath`~ 5972d21ab8bcSmrg test -d \$dldir || mkdir -p \$dldir~ 5973d21ab8bcSmrg $install_prog $dir/$dlname \$dldir/$dlname' 5974d21ab8bcSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5975d21ab8bcSmrg dlpath=$dir/\$dldll~ 5976d21ab8bcSmrg $RM \$dlpath' 5977d21ab8bcSmrg shlibpath_overrides_runpath=yes 5978d21ab8bcSmrg dynamic_linker='Win32 link.exe' 5979d21ab8bcSmrg ;; 59801f0ac6a5Smrg 5981d21ab8bcSmrg *) 5982d21ab8bcSmrg # Assume MSVC and ICC wrapper 5983d21ab8bcSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 5984d21ab8bcSmrg dynamic_linker='Win32 ld.exe' 5985d21ab8bcSmrg ;; 5986d21ab8bcSmrg esac 5987d21ab8bcSmrg # FIXME: first we should search . and the directory the executable is in 5988d21ab8bcSmrg shlibpath_var=PATH 5989d21ab8bcSmrg ;; 59901f0ac6a5Smrg 5991d21ab8bcSmrgdarwin* | rhapsody*) 5992d21ab8bcSmrg dynamic_linker="$host_os dyld" 5993d21ab8bcSmrg version_type=darwin 5994d21ab8bcSmrg need_lib_prefix=no 5995d21ab8bcSmrg need_version=no 5996d21ab8bcSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 5997d21ab8bcSmrg soname_spec='$libname$release$major$shared_ext' 5998d21ab8bcSmrg shlibpath_overrides_runpath=yes 5999d21ab8bcSmrg shlibpath_var=DYLD_LIBRARY_PATH 6000d21ab8bcSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6001d21ab8bcSmrgm4_if([$1], [],[ 6002d21ab8bcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6003d21ab8bcSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6004d21ab8bcSmrg ;; 60051f0ac6a5Smrg 6006d21ab8bcSmrgdgux*) 6007d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6008d21ab8bcSmrg need_lib_prefix=no 6009d21ab8bcSmrg need_version=no 6010d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6011d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6012d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6013d21ab8bcSmrg ;; 60141f0ac6a5Smrg 6015d21ab8bcSmrgfreebsd* | dragonfly* | midnightbsd*) 6016d21ab8bcSmrg # DragonFly does not have aout. When/if they implement a new 6017d21ab8bcSmrg # versioning mechanism, adjust this. 6018d21ab8bcSmrg if test -x /usr/bin/objformat; then 6019d21ab8bcSmrg objformat=`/usr/bin/objformat` 6020d21ab8bcSmrg else 6021d21ab8bcSmrg case $host_os in 6022d21ab8bcSmrg freebsd[[23]].*) objformat=aout ;; 6023d21ab8bcSmrg *) objformat=elf ;; 6024d21ab8bcSmrg esac 6025d21ab8bcSmrg fi 6026d21ab8bcSmrg version_type=freebsd-$objformat 6027d21ab8bcSmrg case $version_type in 6028d21ab8bcSmrg freebsd-elf*) 6029d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6030d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6031d21ab8bcSmrg need_version=no 6032d21ab8bcSmrg need_lib_prefix=no 6033d21ab8bcSmrg ;; 6034d21ab8bcSmrg freebsd-*) 6035d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6036d21ab8bcSmrg need_version=yes 6037d21ab8bcSmrg ;; 6038d21ab8bcSmrg esac 6039d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6040d21ab8bcSmrg case $host_os in 6041d21ab8bcSmrg freebsd2.*) 6042d21ab8bcSmrg shlibpath_overrides_runpath=yes 6043d21ab8bcSmrg ;; 6044d21ab8bcSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6045d21ab8bcSmrg shlibpath_overrides_runpath=yes 6046d21ab8bcSmrg hardcode_into_libs=yes 6047d21ab8bcSmrg ;; 6048d21ab8bcSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6049d21ab8bcSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6050d21ab8bcSmrg shlibpath_overrides_runpath=no 6051d21ab8bcSmrg hardcode_into_libs=yes 6052d21ab8bcSmrg ;; 6053d21ab8bcSmrg *) # from 4.6 on, and DragonFly 6054d21ab8bcSmrg shlibpath_overrides_runpath=yes 6055d21ab8bcSmrg hardcode_into_libs=yes 6056d21ab8bcSmrg ;; 6057d21ab8bcSmrg esac 6058d21ab8bcSmrg ;; 60591f0ac6a5Smrg 6060d21ab8bcSmrghaiku*) 6061d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6062d21ab8bcSmrg need_lib_prefix=no 6063d21ab8bcSmrg need_version=no 6064d21ab8bcSmrg dynamic_linker="$host_os runtime_loader" 6065d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6066d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6067d21ab8bcSmrg shlibpath_var=LIBRARY_PATH 6068d21ab8bcSmrg shlibpath_overrides_runpath=no 6069d21ab8bcSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6070d21ab8bcSmrg hardcode_into_libs=yes 6071d21ab8bcSmrg ;; 60721f0ac6a5Smrg 6073d21ab8bcSmrghpux9* | hpux10* | hpux11*) 6074d21ab8bcSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 6075d21ab8bcSmrg # link against other versions. 6076d21ab8bcSmrg version_type=sunos 6077d21ab8bcSmrg need_lib_prefix=no 6078d21ab8bcSmrg need_version=no 6079d21ab8bcSmrg case $host_cpu in 6080d21ab8bcSmrg ia64*) 6081d21ab8bcSmrg shrext_cmds='.so' 6082d21ab8bcSmrg hardcode_into_libs=yes 6083d21ab8bcSmrg dynamic_linker="$host_os dld.so" 6084d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6085d21ab8bcSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6086d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6087d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6088d21ab8bcSmrg if test 32 = "$HPUX_IA64_MODE"; then 6089d21ab8bcSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6090d21ab8bcSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6091d21ab8bcSmrg else 6092d21ab8bcSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6093d21ab8bcSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6094d21ab8bcSmrg fi 6095d21ab8bcSmrg ;; 6096d21ab8bcSmrg hppa*64*) 6097d21ab8bcSmrg shrext_cmds='.sl' 6098d21ab8bcSmrg hardcode_into_libs=yes 6099d21ab8bcSmrg dynamic_linker="$host_os dld.sl" 6100d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6101d21ab8bcSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6102d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6103d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6104d21ab8bcSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6105d21ab8bcSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6106d21ab8bcSmrg ;; 6107d21ab8bcSmrg *) 6108d21ab8bcSmrg shrext_cmds='.sl' 6109d21ab8bcSmrg dynamic_linker="$host_os dld.sl" 6110d21ab8bcSmrg shlibpath_var=SHLIB_PATH 6111d21ab8bcSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6112d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6113d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6114d21ab8bcSmrg ;; 6115d21ab8bcSmrg esac 6116d21ab8bcSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6117d21ab8bcSmrg postinstall_cmds='chmod 555 $lib' 6118d21ab8bcSmrg # or fails outright, so override atomically: 6119d21ab8bcSmrg install_override_mode=555 6120d21ab8bcSmrg ;; 61211f0ac6a5Smrg 61226fae4e5dSmrginterix[[3-9]]*) 6123d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6124d21ab8bcSmrg need_lib_prefix=no 6125d21ab8bcSmrg need_version=no 6126d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6127d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6128d21ab8bcSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6129d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6130d21ab8bcSmrg shlibpath_overrides_runpath=no 6131d21ab8bcSmrg hardcode_into_libs=yes 61326fae4e5dSmrg ;; 61339c9ff80cSmrg 6134d21ab8bcSmrgirix5* | irix6* | nonstopux*) 6135d21ab8bcSmrg case $host_os in 6136d21ab8bcSmrg nonstopux*) version_type=nonstopux ;; 6137d21ab8bcSmrg *) 6138d21ab8bcSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 6139d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6140d21ab8bcSmrg else 6141d21ab8bcSmrg version_type=irix 6142d21ab8bcSmrg fi ;; 6143d21ab8bcSmrg esac 6144d21ab8bcSmrg need_lib_prefix=no 6145d21ab8bcSmrg need_version=no 6146d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6147d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6148d21ab8bcSmrg case $host_os in 6149d21ab8bcSmrg irix5* | nonstopux*) 6150d21ab8bcSmrg libsuff= shlibsuff= 6151d21ab8bcSmrg ;; 6152d21ab8bcSmrg *) 6153d21ab8bcSmrg case $LD in # libtool.m4 will add one of these switches to LD 6154d21ab8bcSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6155d21ab8bcSmrg libsuff= shlibsuff= libmagic=32-bit;; 6156d21ab8bcSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6157d21ab8bcSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6158d21ab8bcSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6159d21ab8bcSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6160d21ab8bcSmrg *) libsuff= shlibsuff= libmagic=never-match;; 61616fae4e5dSmrg esac 61626fae4e5dSmrg ;; 61636fae4e5dSmrg esac 6164d21ab8bcSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6165d21ab8bcSmrg shlibpath_overrides_runpath=no 6166d21ab8bcSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6167d21ab8bcSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6168d21ab8bcSmrg hardcode_into_libs=yes 61696fae4e5dSmrg ;; 61709c9ff80cSmrg 6171d21ab8bcSmrg# No shared lib support for Linux oldld, aout, or coff. 6172d21ab8bcSmrglinux*oldld* | linux*aout* | linux*coff*) 6173d21ab8bcSmrg dynamic_linker=no 61746fae4e5dSmrg ;; 61751f0ac6a5Smrg 6176d21ab8bcSmrglinux*android*) 6177d21ab8bcSmrg version_type=none # Android doesn't support versioned libraries. 6178d21ab8bcSmrg need_lib_prefix=no 6179d21ab8bcSmrg need_version=no 6180d21ab8bcSmrg library_names_spec='$libname$release$shared_ext' 6181d21ab8bcSmrg soname_spec='$libname$release$shared_ext' 6182d21ab8bcSmrg finish_cmds= 6183d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6184d21ab8bcSmrg shlibpath_overrides_runpath=yes 61851f0ac6a5Smrg 6186d21ab8bcSmrg # This implies no fast_install, which is unacceptable. 6187d21ab8bcSmrg # Some rework will be needed to allow for fast_install 6188d21ab8bcSmrg # before this can be enabled. 6189d21ab8bcSmrg hardcode_into_libs=yes 61901f0ac6a5Smrg 6191d21ab8bcSmrg dynamic_linker='Android linker' 6192d21ab8bcSmrg # Don't embed -rpath directories since the linker doesn't support them. 6193d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6194d21ab8bcSmrg ;; 61956fae4e5dSmrg 6196d21ab8bcSmrg# This must be glibc/ELF. 6197d21ab8bcSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6198d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6199d21ab8bcSmrg need_lib_prefix=no 6200d21ab8bcSmrg need_version=no 6201d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6202d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6203d21ab8bcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6204d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6205d21ab8bcSmrg shlibpath_overrides_runpath=no 62061f0ac6a5Smrg 6207d21ab8bcSmrg # Some binutils ld are patched to set DT_RUNPATH 6208d21ab8bcSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6209d21ab8bcSmrg [lt_cv_shlibpath_overrides_runpath=no 6210d21ab8bcSmrg save_LDFLAGS=$LDFLAGS 6211d21ab8bcSmrg save_libdir=$libdir 6212d21ab8bcSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6213d21ab8bcSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6214d21ab8bcSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6215d21ab8bcSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6216d21ab8bcSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6217d21ab8bcSmrg LDFLAGS=$save_LDFLAGS 6218d21ab8bcSmrg libdir=$save_libdir 6219d21ab8bcSmrg ]) 6220d21ab8bcSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 62211f0ac6a5Smrg 6222d21ab8bcSmrg # This implies no fast_install, which is unacceptable. 6223d21ab8bcSmrg # Some rework will be needed to allow for fast_install 6224d21ab8bcSmrg # before this can be enabled. 6225d21ab8bcSmrg hardcode_into_libs=yes 62261f0ac6a5Smrg 6227d21ab8bcSmrg # Ideally, we could use ldconfig to report *all* directores which are 6228d21ab8bcSmrg # searched for libraries, however this is still not possible. Aside from not 6229d21ab8bcSmrg # being certain /sbin/ldconfig is available, command 6230d21ab8bcSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6231d21ab8bcSmrg # even though it is searched at run-time. Try to do the best guess by 6232d21ab8bcSmrg # appending ld.so.conf contents (and includes) to the search path. 6233d21ab8bcSmrg if test -f /etc/ld.so.conf; then 6234d21ab8bcSmrg 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' ' '` 6235d21ab8bcSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6236d21ab8bcSmrg fi 62371f0ac6a5Smrg 6238d21ab8bcSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6239d21ab8bcSmrg # powerpc, because MkLinux only supported shared libraries with the 6240d21ab8bcSmrg # GNU dynamic linker. Since this was broken with cross compilers, 6241d21ab8bcSmrg # most powerpc-linux boxes support dynamic linking these days and 6242d21ab8bcSmrg # people can always --disable-shared, the test was removed, and we 6243d21ab8bcSmrg # assume the GNU/Linux dynamic linker is in use. 6244d21ab8bcSmrg dynamic_linker='GNU/Linux ld.so' 6245d21ab8bcSmrg ;; 62461f0ac6a5Smrg 6247d21ab8bcSmrgnetbsd*) 6248d21ab8bcSmrg version_type=sunos 6249d21ab8bcSmrg need_lib_prefix=no 6250d21ab8bcSmrg need_version=no 6251d21ab8bcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6252d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6253d21ab8bcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6254d21ab8bcSmrg dynamic_linker='NetBSD (a.out) ld.so' 6255d21ab8bcSmrg else 6256d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6257d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6258d21ab8bcSmrg dynamic_linker='NetBSD ld.elf_so' 6259d21ab8bcSmrg fi 6260d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6261d21ab8bcSmrg shlibpath_overrides_runpath=yes 6262d21ab8bcSmrg hardcode_into_libs=yes 6263d21ab8bcSmrg ;; 62649c9ff80cSmrg 6265d21ab8bcSmrgnewsos6) 6266d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6267d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6268d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6269d21ab8bcSmrg shlibpath_overrides_runpath=yes 6270d21ab8bcSmrg ;; 62711f0ac6a5Smrg 6272d21ab8bcSmrg*nto* | *qnx*) 6273d21ab8bcSmrg version_type=qnx 6274d21ab8bcSmrg need_lib_prefix=no 6275d21ab8bcSmrg need_version=no 6276d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6277d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6278d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6279d21ab8bcSmrg shlibpath_overrides_runpath=no 6280d21ab8bcSmrg hardcode_into_libs=yes 6281d21ab8bcSmrg dynamic_linker='ldqnx.so' 6282d21ab8bcSmrg ;; 62839c9ff80cSmrg 6284d21ab8bcSmrgopenbsd* | bitrig*) 6285d21ab8bcSmrg version_type=sunos 6286d21ab8bcSmrg sys_lib_dlsearch_path_spec=/usr/lib 6287d21ab8bcSmrg need_lib_prefix=no 6288d21ab8bcSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6289d21ab8bcSmrg need_version=no 6290d21ab8bcSmrg else 6291d21ab8bcSmrg need_version=yes 6292d21ab8bcSmrg fi 6293d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6294d21ab8bcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6295d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6296d21ab8bcSmrg shlibpath_overrides_runpath=yes 6297d21ab8bcSmrg ;; 62989c9ff80cSmrg 6299d21ab8bcSmrgos2*) 6300d21ab8bcSmrg libname_spec='$name' 6301d21ab8bcSmrg version_type=windows 6302d21ab8bcSmrg shrext_cmds=.dll 6303d21ab8bcSmrg need_version=no 6304d21ab8bcSmrg need_lib_prefix=no 6305d21ab8bcSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6306d21ab8bcSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6307d21ab8bcSmrg v=$($ECHO $release$versuffix | tr -d .-); 6308d21ab8bcSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6309d21ab8bcSmrg $ECHO $n$v`$shared_ext' 6310d21ab8bcSmrg library_names_spec='${libname}_dll.$libext' 6311d21ab8bcSmrg dynamic_linker='OS/2 ld.exe' 6312d21ab8bcSmrg shlibpath_var=BEGINLIBPATH 6313d21ab8bcSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6314d21ab8bcSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6315d21ab8bcSmrg postinstall_cmds='base_file=`basename \$file`~ 6316d21ab8bcSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6317d21ab8bcSmrg dldir=$destdir/`dirname \$dlpath`~ 6318d21ab8bcSmrg test -d \$dldir || mkdir -p \$dldir~ 6319d21ab8bcSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 6320d21ab8bcSmrg chmod a+x \$dldir/$dlname~ 6321d21ab8bcSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6322d21ab8bcSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6323d21ab8bcSmrg fi' 6324d21ab8bcSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6325d21ab8bcSmrg dlpath=$dir/\$dldll~ 6326d21ab8bcSmrg $RM \$dlpath' 6327d21ab8bcSmrg ;; 63281f0ac6a5Smrg 6329d21ab8bcSmrgosf3* | osf4* | osf5*) 6330d21ab8bcSmrg version_type=osf 6331d21ab8bcSmrg need_lib_prefix=no 6332d21ab8bcSmrg need_version=no 6333d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6334d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6335d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6336d21ab8bcSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6337d21ab8bcSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6338d21ab8bcSmrg ;; 63399c9ff80cSmrg 6340d21ab8bcSmrgrdos*) 6341d21ab8bcSmrg dynamic_linker=no 6342d21ab8bcSmrg ;; 63436fae4e5dSmrg 6344d21ab8bcSmrgsolaris*) 6345d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6346d21ab8bcSmrg need_lib_prefix=no 6347d21ab8bcSmrg need_version=no 6348d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6349d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6350d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6351d21ab8bcSmrg shlibpath_overrides_runpath=yes 6352d21ab8bcSmrg hardcode_into_libs=yes 6353d21ab8bcSmrg # ldd complains unless libraries are executable 6354d21ab8bcSmrg postinstall_cmds='chmod +x $lib' 6355d21ab8bcSmrg ;; 63561f0ac6a5Smrg 6357d21ab8bcSmrgsunos4*) 6358d21ab8bcSmrg version_type=sunos 6359d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6360d21ab8bcSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6361d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6362d21ab8bcSmrg shlibpath_overrides_runpath=yes 6363d21ab8bcSmrg if test yes = "$with_gnu_ld"; then 6364d21ab8bcSmrg need_lib_prefix=no 6365d21ab8bcSmrg fi 6366d21ab8bcSmrg need_version=yes 6367d21ab8bcSmrg ;; 63689c9ff80cSmrg 6369d21ab8bcSmrgsysv4 | sysv4.3*) 6370d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6371d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6372d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6373d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6374d21ab8bcSmrg case $host_vendor in 6375d21ab8bcSmrg sni) 6376d21ab8bcSmrg shlibpath_overrides_runpath=no 6377d21ab8bcSmrg need_lib_prefix=no 6378d21ab8bcSmrg runpath_var=LD_RUN_PATH 6379d21ab8bcSmrg ;; 6380d21ab8bcSmrg siemens) 6381d21ab8bcSmrg need_lib_prefix=no 6382d21ab8bcSmrg ;; 6383d21ab8bcSmrg motorola) 6384d21ab8bcSmrg need_lib_prefix=no 6385d21ab8bcSmrg need_version=no 6386d21ab8bcSmrg shlibpath_overrides_runpath=no 6387d21ab8bcSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6388d21ab8bcSmrg ;; 6389d21ab8bcSmrg esac 6390d21ab8bcSmrg ;; 63919c9ff80cSmrg 6392d21ab8bcSmrgsysv4*MP*) 6393d21ab8bcSmrg if test -d /usr/nec; then 6394d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6395d21ab8bcSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6396d21ab8bcSmrg soname_spec='$libname$shared_ext.$major' 6397d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6398d21ab8bcSmrg fi 6399d21ab8bcSmrg ;; 64009c9ff80cSmrg 6401d21ab8bcSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6402d21ab8bcSmrg version_type=sco 6403d21ab8bcSmrg need_lib_prefix=no 6404d21ab8bcSmrg need_version=no 6405d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6406d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6407d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6408d21ab8bcSmrg shlibpath_overrides_runpath=yes 6409d21ab8bcSmrg hardcode_into_libs=yes 6410d21ab8bcSmrg if test yes = "$with_gnu_ld"; then 6411d21ab8bcSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6412d21ab8bcSmrg else 6413d21ab8bcSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6414d21ab8bcSmrg case $host_os in 6415d21ab8bcSmrg sco3.2v5*) 6416d21ab8bcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6417d21ab8bcSmrg ;; 6418d21ab8bcSmrg esac 6419d21ab8bcSmrg fi 6420d21ab8bcSmrg sys_lib_dlsearch_path_spec='/usr/lib' 6421d21ab8bcSmrg ;; 64221f0ac6a5Smrg 6423d21ab8bcSmrgtpf*) 6424d21ab8bcSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6425d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6426d21ab8bcSmrg need_lib_prefix=no 6427d21ab8bcSmrg need_version=no 6428d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6429d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6430d21ab8bcSmrg shlibpath_overrides_runpath=no 6431d21ab8bcSmrg hardcode_into_libs=yes 6432d21ab8bcSmrg ;; 64331f0ac6a5Smrg 6434d21ab8bcSmrguts4*) 6435d21ab8bcSmrg version_type=linux # correct to gnu/linux during the next big refactor 6436d21ab8bcSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6437d21ab8bcSmrg soname_spec='$libname$release$shared_ext$major' 6438d21ab8bcSmrg shlibpath_var=LD_LIBRARY_PATH 6439d21ab8bcSmrg ;; 6440d21ab8bcSmrg 6441d21ab8bcSmrg*) 6442d21ab8bcSmrg dynamic_linker=no 6443d21ab8bcSmrg ;; 6444d21ab8bcSmrgesac 6445d21ab8bcSmrgAC_MSG_RESULT([$dynamic_linker]) 6446d21ab8bcSmrgtest no = "$dynamic_linker" && can_build_shared=no 6447d21ab8bcSmrg 6448d21ab8bcSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6449d21ab8bcSmrgif test yes = "$GCC"; then 6450d21ab8bcSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 64516fae4e5dSmrgfi 64521f0ac6a5Smrg 6453d21ab8bcSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6454d21ab8bcSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6455d21ab8bcSmrgfi 64569c9ff80cSmrg 6457d21ab8bcSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6458d21ab8bcSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6459d21ab8bcSmrgfi 64609c9ff80cSmrg 6461d21ab8bcSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6462d21ab8bcSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 64631f0ac6a5Smrg 6464d21ab8bcSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6465d21ab8bcSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 64661f0ac6a5Smrg 6467d21ab8bcSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6468d21ab8bcSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 64691f0ac6a5Smrg 6470d21ab8bcSmrg_LT_DECL([], [variables_saved_for_relink], [1], 6471d21ab8bcSmrg [Variables whose values should be saved in libtool wrapper scripts and 6472d21ab8bcSmrg restored at link time]) 6473d21ab8bcSmrg_LT_DECL([], [need_lib_prefix], [0], 6474d21ab8bcSmrg [Do we need the "lib" prefix for modules?]) 6475d21ab8bcSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6476d21ab8bcSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 6477d21ab8bcSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6478d21ab8bcSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6479d21ab8bcSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 6480d21ab8bcSmrg [Is shlibpath searched before the hard-coded library search path?]) 6481d21ab8bcSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6482d21ab8bcSmrg_LT_DECL([], [library_names_spec], [1], 6483d21ab8bcSmrg [[List of archive names. First name is the real one, the rest are links. 6484d21ab8bcSmrg The last name is the one that the linker finds with -lNAME]]) 6485d21ab8bcSmrg_LT_DECL([], [soname_spec], [1], 6486d21ab8bcSmrg [[The coded name of the library, if different from the real name]]) 6487d21ab8bcSmrg_LT_DECL([], [install_override_mode], [1], 6488d21ab8bcSmrg [Permission mode override for installation of shared libraries]) 6489d21ab8bcSmrg_LT_DECL([], [postinstall_cmds], [2], 6490d21ab8bcSmrg [Command to use after installation of a shared archive]) 6491d21ab8bcSmrg_LT_DECL([], [postuninstall_cmds], [2], 6492d21ab8bcSmrg [Command to use after uninstallation of a shared archive]) 6493d21ab8bcSmrg_LT_DECL([], [finish_cmds], [2], 6494d21ab8bcSmrg [Commands used to finish a libtool library installation in a directory]) 6495d21ab8bcSmrg_LT_DECL([], [finish_eval], [1], 6496d21ab8bcSmrg [[As "finish_cmds", except a single script fragment to be evaled but 6497d21ab8bcSmrg not shown]]) 6498d21ab8bcSmrg_LT_DECL([], [hardcode_into_libs], [0], 6499d21ab8bcSmrg [Whether we should hardcode library paths into libraries]) 6500d21ab8bcSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 6501d21ab8bcSmrg [Compile-time system search path for libraries]) 6502d21ab8bcSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6503d21ab8bcSmrg [Detected run-time system search path for libraries]) 6504d21ab8bcSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6505d21ab8bcSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6506d21ab8bcSmrg])# _LT_SYS_DYNAMIC_LINKER 65071f0ac6a5Smrg 65081f0ac6a5Smrg 6509d21ab8bcSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 6510d21ab8bcSmrg# -------------------------- 6511d21ab8bcSmrg# find a file program that can recognize shared library 6512d21ab8bcSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 6513d21ab8bcSmrg[m4_require([_LT_DECL_EGREP])dnl 6514d21ab8bcSmrgAC_MSG_CHECKING([for $1]) 6515d21ab8bcSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6516d21ab8bcSmrg[case $MAGIC_CMD in 6517d21ab8bcSmrg[[\\/*] | ?:[\\/]*]) 6518d21ab8bcSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6519d21ab8bcSmrg ;; 6520d21ab8bcSmrg*) 6521d21ab8bcSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 6522d21ab8bcSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6523d21ab8bcSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 6524d21ab8bcSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 6525d21ab8bcSmrgdnl not every word. This closes a longstanding sh security hole. 6526d21ab8bcSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 6527d21ab8bcSmrg for ac_dir in $ac_dummy; do 6528d21ab8bcSmrg IFS=$lt_save_ifs 6529d21ab8bcSmrg test -z "$ac_dir" && ac_dir=. 6530d21ab8bcSmrg if test -f "$ac_dir/$1"; then 6531d21ab8bcSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6532d21ab8bcSmrg if test -n "$file_magic_test_file"; then 6533d21ab8bcSmrg case $deplibs_check_method in 6534d21ab8bcSmrg "file_magic "*) 6535d21ab8bcSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6536d21ab8bcSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6537d21ab8bcSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6538d21ab8bcSmrg $EGREP "$file_magic_regex" > /dev/null; then 6539d21ab8bcSmrg : 6540d21ab8bcSmrg else 6541d21ab8bcSmrg cat <<_LT_EOF 1>&2 65421f0ac6a5Smrg 6543d21ab8bcSmrg*** Warning: the command libtool uses to detect shared libraries, 6544d21ab8bcSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 6545d21ab8bcSmrg*** The result is that libtool may fail to recognize shared libraries 6546d21ab8bcSmrg*** as such. This will affect the creation of libtool libraries that 6547d21ab8bcSmrg*** depend on shared libraries, but programs linked with such libtool 6548d21ab8bcSmrg*** libraries will work regardless of this problem. Nevertheless, you 6549d21ab8bcSmrg*** may want to report the problem to your system manager and/or to 6550d21ab8bcSmrg*** bug-libtool@gnu.org 65511f0ac6a5Smrg 6552d21ab8bcSmrg_LT_EOF 6553d21ab8bcSmrg fi ;; 6554d21ab8bcSmrg esac 6555d21ab8bcSmrg fi 6556d21ab8bcSmrg break 6557d21ab8bcSmrg fi 6558d21ab8bcSmrg done 6559d21ab8bcSmrg IFS=$lt_save_ifs 6560d21ab8bcSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 6561d21ab8bcSmrg ;; 6562d21ab8bcSmrgesac]) 6563d21ab8bcSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 6564d21ab8bcSmrgif test -n "$MAGIC_CMD"; then 6565d21ab8bcSmrg AC_MSG_RESULT($MAGIC_CMD) 6566d21ab8bcSmrgelse 6567d21ab8bcSmrg AC_MSG_RESULT(no) 6568d21ab8bcSmrgfi 6569d21ab8bcSmrg_LT_DECL([], [MAGIC_CMD], [0], 6570d21ab8bcSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6571d21ab8bcSmrg])# _LT_PATH_TOOL_PREFIX 65726fae4e5dSmrg 6573d21ab8bcSmrg# Old name: 6574d21ab8bcSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6575d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 6576d21ab8bcSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 65776fae4e5dSmrg 65781f0ac6a5Smrg 6579d21ab8bcSmrg# _LT_PATH_MAGIC 6580d21ab8bcSmrg# -------------- 6581d21ab8bcSmrg# find a file program that can recognize a shared library 6582d21ab8bcSmrgm4_defun([_LT_PATH_MAGIC], 6583d21ab8bcSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6584d21ab8bcSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 6585d21ab8bcSmrg if test -n "$ac_tool_prefix"; then 6586d21ab8bcSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6587d21ab8bcSmrg else 6588d21ab8bcSmrg MAGIC_CMD=: 6589d21ab8bcSmrg fi 6590d21ab8bcSmrgfi 6591d21ab8bcSmrg])# _LT_PATH_MAGIC 65929c9ff80cSmrg 65939c9ff80cSmrg 6594d21ab8bcSmrg# LT_PATH_LD 6595d21ab8bcSmrg# ---------- 6596d21ab8bcSmrg# find the pathname to the GNU or non-GNU linker 6597d21ab8bcSmrgAC_DEFUN([LT_PATH_LD], 6598d21ab8bcSmrg[AC_REQUIRE([AC_PROG_CC])dnl 6599d21ab8bcSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 6600d21ab8bcSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 6601d21ab8bcSmrgm4_require([_LT_DECL_SED])dnl 6602d21ab8bcSmrgm4_require([_LT_DECL_EGREP])dnl 6603d21ab8bcSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 66049c9ff80cSmrg 6605d21ab8bcSmrgAC_ARG_WITH([gnu-ld], 6606d21ab8bcSmrg [AS_HELP_STRING([--with-gnu-ld], 6607d21ab8bcSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6608d21ab8bcSmrg [test no = "$withval" || with_gnu_ld=yes], 6609d21ab8bcSmrg [with_gnu_ld=no])dnl 66101f0ac6a5Smrg 6611d21ab8bcSmrgac_prog=ld 6612d21ab8bcSmrgif test yes = "$GCC"; then 6613d21ab8bcSmrg # Check if gcc -print-prog-name=ld gives a path. 6614d21ab8bcSmrg AC_MSG_CHECKING([for ld used by $CC]) 6615d21ab8bcSmrg case $host in 6616d21ab8bcSmrg *-*-mingw*) 6617d21ab8bcSmrg # gcc leaves a trailing carriage return, which upsets mingw 6618d21ab8bcSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6619d21ab8bcSmrg *) 6620d21ab8bcSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6621d21ab8bcSmrg esac 6622d21ab8bcSmrg case $ac_prog in 6623d21ab8bcSmrg # Accept absolute paths. 6624d21ab8bcSmrg [[\\/]]* | ?:[[\\/]]*) 6625d21ab8bcSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 6626d21ab8bcSmrg # Canonicalize the pathname of ld 6627d21ab8bcSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6628d21ab8bcSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6629d21ab8bcSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6630d21ab8bcSmrg done 6631d21ab8bcSmrg test -z "$LD" && LD=$ac_prog 6632d21ab8bcSmrg ;; 6633d21ab8bcSmrg "") 6634d21ab8bcSmrg # If it fails, then pretend we aren't using GCC. 6635d21ab8bcSmrg ac_prog=ld 6636d21ab8bcSmrg ;; 6637d21ab8bcSmrg *) 6638d21ab8bcSmrg # If it is relative, then search for the first ld in PATH. 6639d21ab8bcSmrg with_gnu_ld=unknown 6640d21ab8bcSmrg ;; 6641d21ab8bcSmrg esac 6642d21ab8bcSmrgelif test yes = "$with_gnu_ld"; then 6643d21ab8bcSmrg AC_MSG_CHECKING([for GNU ld]) 6644d21ab8bcSmrgelse 6645d21ab8bcSmrg AC_MSG_CHECKING([for non-GNU ld]) 6646d21ab8bcSmrgfi 6647d21ab8bcSmrgAC_CACHE_VAL(lt_cv_path_LD, 6648d21ab8bcSmrg[if test -z "$LD"; then 6649d21ab8bcSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6650d21ab8bcSmrg for ac_dir in $PATH; do 6651d21ab8bcSmrg IFS=$lt_save_ifs 6652d21ab8bcSmrg test -z "$ac_dir" && ac_dir=. 6653d21ab8bcSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6654d21ab8bcSmrg lt_cv_path_LD=$ac_dir/$ac_prog 6655d21ab8bcSmrg # Check to see if the program is GNU ld. I'd rather use --version, 6656d21ab8bcSmrg # but apparently some variants of GNU ld only accept -v. 6657d21ab8bcSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 6658d21ab8bcSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6659d21ab8bcSmrg *GNU* | *'with BFD'*) 6660d21ab8bcSmrg test no != "$with_gnu_ld" && break 6661d21ab8bcSmrg ;; 6662d21ab8bcSmrg *) 6663d21ab8bcSmrg test yes != "$with_gnu_ld" && break 6664d21ab8bcSmrg ;; 6665d21ab8bcSmrg esac 6666d21ab8bcSmrg fi 6667d21ab8bcSmrg done 6668d21ab8bcSmrg IFS=$lt_save_ifs 6669d21ab8bcSmrgelse 6670d21ab8bcSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 6671d21ab8bcSmrgfi]) 6672d21ab8bcSmrgLD=$lt_cv_path_LD 6673d21ab8bcSmrgif test -n "$LD"; then 6674d21ab8bcSmrg AC_MSG_RESULT($LD) 6675d21ab8bcSmrgelse 6676d21ab8bcSmrg AC_MSG_RESULT(no) 6677d21ab8bcSmrgfi 6678d21ab8bcSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6679d21ab8bcSmrg_LT_PATH_LD_GNU 6680d21ab8bcSmrgAC_SUBST([LD]) 66811f0ac6a5Smrg 6682d21ab8bcSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6683d21ab8bcSmrg])# LT_PATH_LD 66849c9ff80cSmrg 6685d21ab8bcSmrg# Old names: 6686d21ab8bcSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6687d21ab8bcSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6688d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 6689d21ab8bcSmrgdnl AC_DEFUN([AM_PROG_LD], []) 6690d21ab8bcSmrgdnl AC_DEFUN([AC_PROG_LD], []) 66919c9ff80cSmrg 66929c9ff80cSmrg 6693d21ab8bcSmrg# _LT_PATH_LD_GNU 6694d21ab8bcSmrg#- -------------- 6695d21ab8bcSmrgm4_defun([_LT_PATH_LD_GNU], 6696d21ab8bcSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6697d21ab8bcSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6698d21ab8bcSmrgcase `$LD -v 2>&1 </dev/null` in 6699d21ab8bcSmrg*GNU* | *'with BFD'*) 6700d21ab8bcSmrg lt_cv_prog_gnu_ld=yes 6701d21ab8bcSmrg ;; 6702d21ab8bcSmrg*) 6703d21ab8bcSmrg lt_cv_prog_gnu_ld=no 6704d21ab8bcSmrg ;; 6705d21ab8bcSmrgesac]) 6706d21ab8bcSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 6707d21ab8bcSmrg])# _LT_PATH_LD_GNU 67081f0ac6a5Smrg 67091f0ac6a5Smrg 6710d21ab8bcSmrg# _LT_CMD_RELOAD 6711d21ab8bcSmrg# -------------- 6712d21ab8bcSmrg# find reload flag for linker 6713d21ab8bcSmrg# -- PORTME Some linkers may need a different reload flag. 6714d21ab8bcSmrgm4_defun([_LT_CMD_RELOAD], 6715d21ab8bcSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 6716d21ab8bcSmrg lt_cv_ld_reload_flag, 6717d21ab8bcSmrg [lt_cv_ld_reload_flag='-r']) 6718d21ab8bcSmrgreload_flag=$lt_cv_ld_reload_flag 6719d21ab8bcSmrgcase $reload_flag in 6720d21ab8bcSmrg"" | " "*) ;; 6721d21ab8bcSmrg*) reload_flag=" $reload_flag" ;; 6722d21ab8bcSmrgesac 6723d21ab8bcSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 6724d21ab8bcSmrgcase $host_os in 6725d21ab8bcSmrg cygwin* | mingw* | pw32* | cegcc*) 6726d21ab8bcSmrg if test yes != "$GCC"; then 6727d21ab8bcSmrg reload_cmds=false 6728d21ab8bcSmrg fi 6729d21ab8bcSmrg ;; 6730d21ab8bcSmrg darwin*) 6731d21ab8bcSmrg if test yes = "$GCC"; then 6732d21ab8bcSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6733d21ab8bcSmrg else 6734d21ab8bcSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 6735d21ab8bcSmrg fi 6736d21ab8bcSmrg ;; 6737d21ab8bcSmrgesac 6738d21ab8bcSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6739d21ab8bcSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 6740d21ab8bcSmrg])# _LT_CMD_RELOAD 67411f0ac6a5Smrg 67429c9ff80cSmrg 6743d21ab8bcSmrg# _LT_PATH_DD 6744d21ab8bcSmrg# ----------- 6745d21ab8bcSmrg# find a working dd 6746d21ab8bcSmrgm4_defun([_LT_PATH_DD], 6747d21ab8bcSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6748d21ab8bcSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6749d21ab8bcSmrgcat conftest.i conftest.i >conftest2.i 6750d21ab8bcSmrg: ${lt_DD:=$DD} 6751d21ab8bcSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6752d21ab8bcSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6753d21ab8bcSmrg cmp -s conftest.i conftest.out \ 6754d21ab8bcSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6755d21ab8bcSmrgfi]) 6756d21ab8bcSmrgrm -f conftest.i conftest2.i conftest.out]) 6757d21ab8bcSmrg])# _LT_PATH_DD 67581f0ac6a5Smrg 67591f0ac6a5Smrg 6760d21ab8bcSmrg# _LT_CMD_TRUNCATE 6761d21ab8bcSmrg# ---------------- 6762d21ab8bcSmrg# find command to truncate a binary pipe 6763d21ab8bcSmrgm4_defun([_LT_CMD_TRUNCATE], 6764d21ab8bcSmrg[m4_require([_LT_PATH_DD]) 6765d21ab8bcSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6766d21ab8bcSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6767d21ab8bcSmrgcat conftest.i conftest.i >conftest2.i 6768d21ab8bcSmrglt_cv_truncate_bin= 6769d21ab8bcSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6770d21ab8bcSmrg cmp -s conftest.i conftest.out \ 6771d21ab8bcSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6772d21ab8bcSmrgfi 6773d21ab8bcSmrgrm -f conftest.i conftest2.i conftest.out 6774d21ab8bcSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6775d21ab8bcSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6776d21ab8bcSmrg [Command to truncate a binary pipe]) 6777d21ab8bcSmrg])# _LT_CMD_TRUNCATE 67781f0ac6a5Smrg 67799c9ff80cSmrg 6780d21ab8bcSmrg# _LT_CHECK_MAGIC_METHOD 6781d21ab8bcSmrg# ---------------------- 6782d21ab8bcSmrg# how to check for library dependencies 6783d21ab8bcSmrg# -- PORTME fill in with the dynamic library characteristics 6784d21ab8bcSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 6785d21ab8bcSmrg[m4_require([_LT_DECL_EGREP]) 6786d21ab8bcSmrgm4_require([_LT_DECL_OBJDUMP]) 6787d21ab8bcSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 6788d21ab8bcSmrglt_cv_deplibs_check_method, 6789d21ab8bcSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 6790d21ab8bcSmrglt_cv_file_magic_test_file= 6791d21ab8bcSmrglt_cv_deplibs_check_method='unknown' 6792d21ab8bcSmrg# Need to set the preceding variable on all platforms that support 6793d21ab8bcSmrg# interlibrary dependencies. 6794d21ab8bcSmrg# 'none' -- dependencies not supported. 6795d21ab8bcSmrg# 'unknown' -- same as none, but documents that we really don't know. 6796d21ab8bcSmrg# 'pass_all' -- all dependencies passed with no checks. 6797d21ab8bcSmrg# 'test_compile' -- check by making test program. 6798d21ab8bcSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 6799d21ab8bcSmrg# that responds to the $file_magic_cmd with a given extended regex. 6800d21ab8bcSmrg# If you have 'file' or equivalent on your system and you're not sure 6801d21ab8bcSmrg# whether 'pass_all' will *always* work, you probably want this one. 68029c9ff80cSmrg 6803d21ab8bcSmrgcase $host_os in 6804d21ab8bcSmrgaix[[4-9]]*) 6805d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6806d21ab8bcSmrg ;; 68079c9ff80cSmrg 6808d21ab8bcSmrgbeos*) 6809d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6810d21ab8bcSmrg ;; 68111f0ac6a5Smrg 6812d21ab8bcSmrgbsdi[[45]]*) 6813d21ab8bcSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6814d21ab8bcSmrg lt_cv_file_magic_cmd='$FILECMD -L' 6815d21ab8bcSmrg lt_cv_file_magic_test_file=/shlib/libc.so 6816d21ab8bcSmrg ;; 68171f0ac6a5Smrg 6818d21ab8bcSmrgcygwin*) 6819d21ab8bcSmrg # func_win32_libid is a shell function defined in ltmain.sh 6820d21ab8bcSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6821d21ab8bcSmrg lt_cv_file_magic_cmd='func_win32_libid' 6822d21ab8bcSmrg ;; 68231f0ac6a5Smrg 6824d21ab8bcSmrgmingw* | pw32*) 6825d21ab8bcSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 6826d21ab8bcSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 6827d21ab8bcSmrg # unless we find 'file', for example because we are cross-compiling. 6828d21ab8bcSmrg if ( file / ) >/dev/null 2>&1; then 6829d21ab8bcSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6830d21ab8bcSmrg lt_cv_file_magic_cmd='func_win32_libid' 6831d21ab8bcSmrg else 6832d21ab8bcSmrg # Keep this pattern in sync with the one in func_win32_libid. 6833d21ab8bcSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6834d21ab8bcSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6835d21ab8bcSmrg fi 6836d21ab8bcSmrg ;; 68371f0ac6a5Smrg 6838d21ab8bcSmrgcegcc*) 6839d21ab8bcSmrg # use the weaker test based on 'objdump'. See mingw*. 6840d21ab8bcSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6841d21ab8bcSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6842d21ab8bcSmrg ;; 684389c04b6cSmrg 6844d21ab8bcSmrgdarwin* | rhapsody*) 6845d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6846d21ab8bcSmrg ;; 684789c04b6cSmrg 6848d21ab8bcSmrgfreebsd* | dragonfly* | midnightbsd*) 6849d21ab8bcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6850d21ab8bcSmrg case $host_cpu in 6851d21ab8bcSmrg i*86 ) 6852d21ab8bcSmrg # Not sure whether the presence of OpenBSD here was a mistake. 6853d21ab8bcSmrg # Let's accept both of them until this is cleared up. 6854d21ab8bcSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6855d21ab8bcSmrg lt_cv_file_magic_cmd=$FILECMD 6856d21ab8bcSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6857d21ab8bcSmrg ;; 6858d21ab8bcSmrg esac 6859d21ab8bcSmrg else 6860d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6861d21ab8bcSmrg fi 6862d21ab8bcSmrg ;; 686389c04b6cSmrg 6864d21ab8bcSmrghaiku*) 6865d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6866d21ab8bcSmrg ;; 686789c04b6cSmrg 6868d21ab8bcSmrghpux10.20* | hpux11*) 6869d21ab8bcSmrg lt_cv_file_magic_cmd=$FILECMD 6870d21ab8bcSmrg case $host_cpu in 6871d21ab8bcSmrg ia64*) 6872d21ab8bcSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6873d21ab8bcSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6874d21ab8bcSmrg ;; 6875d21ab8bcSmrg hppa*64*) 6876d21ab8bcSmrg [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]'] 6877d21ab8bcSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6878d21ab8bcSmrg ;; 6879d21ab8bcSmrg *) 6880d21ab8bcSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6881d21ab8bcSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 6882d21ab8bcSmrg ;; 6883d21ab8bcSmrg esac 6884d21ab8bcSmrg ;; 688589c04b6cSmrg 6886d21ab8bcSmrginterix[[3-9]]*) 6887d21ab8bcSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6888d21ab8bcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6889d21ab8bcSmrg ;; 689089c04b6cSmrg 6891d21ab8bcSmrgirix5* | irix6* | nonstopux*) 6892d21ab8bcSmrg case $LD in 6893d21ab8bcSmrg *-32|*"-32 ") libmagic=32-bit;; 6894d21ab8bcSmrg *-n32|*"-n32 ") libmagic=N32;; 6895d21ab8bcSmrg *-64|*"-64 ") libmagic=64-bit;; 6896d21ab8bcSmrg *) libmagic=never-match;; 6897d21ab8bcSmrg esac 6898d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6899d21ab8bcSmrg ;; 690089c04b6cSmrg 6901d21ab8bcSmrg# This must be glibc/ELF. 6902d21ab8bcSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6903d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6904d21ab8bcSmrg ;; 690589c04b6cSmrg 6906d21ab8bcSmrgnetbsd*) 6907d21ab8bcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6908d21ab8bcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6909d21ab8bcSmrg else 6910d21ab8bcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 6911d21ab8bcSmrg fi 6912d21ab8bcSmrg ;; 691389c04b6cSmrg 6914d21ab8bcSmrgnewos6*) 6915d21ab8bcSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 6916d21ab8bcSmrg lt_cv_file_magic_cmd=$FILECMD 6917d21ab8bcSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 6918d21ab8bcSmrg ;; 691989c04b6cSmrg 6920d21ab8bcSmrg*nto* | *qnx*) 6921d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6922d21ab8bcSmrg ;; 692389c04b6cSmrg 6924d21ab8bcSmrgopenbsd* | bitrig*) 6925d21ab8bcSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6926d21ab8bcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6927d21ab8bcSmrg else 6928d21ab8bcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6929d21ab8bcSmrg fi 6930d21ab8bcSmrg ;; 693189c04b6cSmrg 6932d21ab8bcSmrgosf3* | osf4* | osf5*) 6933d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6934d21ab8bcSmrg ;; 693589c04b6cSmrg 6936d21ab8bcSmrgrdos*) 6937d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6938d21ab8bcSmrg ;; 693989c04b6cSmrg 6940d21ab8bcSmrgsolaris*) 6941d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6942d21ab8bcSmrg ;; 694389c04b6cSmrg 6944d21ab8bcSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6945d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6946d21ab8bcSmrg ;; 69471f0ac6a5Smrg 6948d21ab8bcSmrgsysv4 | sysv4.3*) 6949d21ab8bcSmrg case $host_vendor in 6950d21ab8bcSmrg motorola) 6951d21ab8bcSmrg 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]]' 6952d21ab8bcSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 6953d21ab8bcSmrg ;; 6954d21ab8bcSmrg ncr) 6955d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6956d21ab8bcSmrg ;; 6957d21ab8bcSmrg sequent) 6958d21ab8bcSmrg lt_cv_file_magic_cmd='/bin/file' 6959d21ab8bcSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 6960d21ab8bcSmrg ;; 6961d21ab8bcSmrg sni) 6962d21ab8bcSmrg lt_cv_file_magic_cmd='/bin/file' 6963d21ab8bcSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 6964d21ab8bcSmrg lt_cv_file_magic_test_file=/lib/libc.so 6965d21ab8bcSmrg ;; 6966d21ab8bcSmrg siemens) 6967d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6968d21ab8bcSmrg ;; 6969d21ab8bcSmrg pc) 6970d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6971d21ab8bcSmrg ;; 6972d21ab8bcSmrg esac 6973d21ab8bcSmrg ;; 69741f0ac6a5Smrg 6975d21ab8bcSmrgtpf*) 6976d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6977d21ab8bcSmrg ;; 6978d21ab8bcSmrgos2*) 6979d21ab8bcSmrg lt_cv_deplibs_check_method=pass_all 6980d21ab8bcSmrg ;; 6981d21ab8bcSmrgesac 6982d21ab8bcSmrg]) 69831f0ac6a5Smrg 6984d21ab8bcSmrgfile_magic_glob= 6985d21ab8bcSmrgwant_nocaseglob=no 6986d21ab8bcSmrgif test "$build" = "$host"; then 6987d21ab8bcSmrg case $host_os in 6988d21ab8bcSmrg mingw* | pw32*) 6989d21ab8bcSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 6990d21ab8bcSmrg want_nocaseglob=yes 6991d21ab8bcSmrg else 6992d21ab8bcSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 6993d21ab8bcSmrg fi 6994d21ab8bcSmrg ;; 6995d21ab8bcSmrg esac 6996d21ab8bcSmrgfi 69979c9ff80cSmrg 6998d21ab8bcSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 6999d21ab8bcSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 7000d21ab8bcSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 70019c9ff80cSmrg 7002d21ab8bcSmrg_LT_DECL([], [deplibs_check_method], [1], 7003d21ab8bcSmrg [Method to check whether dependent libraries are shared objects]) 7004d21ab8bcSmrg_LT_DECL([], [file_magic_cmd], [1], 7005d21ab8bcSmrg [Command to use when deplibs_check_method = "file_magic"]) 7006d21ab8bcSmrg_LT_DECL([], [file_magic_glob], [1], 7007d21ab8bcSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 7008d21ab8bcSmrg_LT_DECL([], [want_nocaseglob], [1], 7009d21ab8bcSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7010d21ab8bcSmrg])# _LT_CHECK_MAGIC_METHOD 70119c9ff80cSmrg 70129c9ff80cSmrg 7013d21ab8bcSmrg# LT_PATH_NM 7014d21ab8bcSmrg# ---------- 7015d21ab8bcSmrg# find the pathname to a BSD- or MS-compatible name lister 7016d21ab8bcSmrgAC_DEFUN([LT_PATH_NM], 7017d21ab8bcSmrg[AC_REQUIRE([AC_PROG_CC])dnl 7018d21ab8bcSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7019d21ab8bcSmrg[if test -n "$NM"; then 7020d21ab8bcSmrg # Let the user override the test. 7021d21ab8bcSmrg lt_cv_path_NM=$NM 7022d21ab8bcSmrgelse 7023d21ab8bcSmrg lt_nm_to_check=${ac_tool_prefix}nm 7024d21ab8bcSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7025d21ab8bcSmrg lt_nm_to_check="$lt_nm_to_check nm" 7026d21ab8bcSmrg fi 7027d21ab8bcSmrg for lt_tmp_nm in $lt_nm_to_check; do 7028d21ab8bcSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7029d21ab8bcSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7030d21ab8bcSmrg IFS=$lt_save_ifs 7031d21ab8bcSmrg test -z "$ac_dir" && ac_dir=. 7032d21ab8bcSmrg tmp_nm=$ac_dir/$lt_tmp_nm 7033d21ab8bcSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7034d21ab8bcSmrg # Check to see if the nm accepts a BSD-compat flag. 7035d21ab8bcSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7036d21ab8bcSmrg # nm: unknown option "B" ignored 7037d21ab8bcSmrg # Tru64's nm complains that /dev/null is an invalid object file 7038d21ab8bcSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7039d21ab8bcSmrg case $build_os in 7040d21ab8bcSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7041d21ab8bcSmrg *) lt_bad_file=/dev/null ;; 7042d21ab8bcSmrg esac 7043d21ab8bcSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7044d21ab8bcSmrg *$lt_bad_file* | *'Invalid file or object type'*) 7045d21ab8bcSmrg lt_cv_path_NM="$tmp_nm -B" 7046d21ab8bcSmrg break 2 7047d21ab8bcSmrg ;; 7048d21ab8bcSmrg *) 7049d21ab8bcSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7050d21ab8bcSmrg */dev/null*) 7051d21ab8bcSmrg lt_cv_path_NM="$tmp_nm -p" 7052d21ab8bcSmrg break 2 7053d21ab8bcSmrg ;; 7054d21ab8bcSmrg *) 7055d21ab8bcSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7056d21ab8bcSmrg continue # so that we can try to find one that supports BSD flags 7057d21ab8bcSmrg ;; 7058d21ab8bcSmrg esac 7059d21ab8bcSmrg ;; 7060d21ab8bcSmrg esac 7061d21ab8bcSmrg fi 7062d21ab8bcSmrg done 7063d21ab8bcSmrg IFS=$lt_save_ifs 7064d21ab8bcSmrg done 7065d21ab8bcSmrg : ${lt_cv_path_NM=no} 7066d21ab8bcSmrgfi]) 7067d21ab8bcSmrgif test no != "$lt_cv_path_NM"; then 7068d21ab8bcSmrg NM=$lt_cv_path_NM 7069d21ab8bcSmrgelse 7070d21ab8bcSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 7071d21ab8bcSmrg if test -n "$DUMPBIN"; then : 7072d21ab8bcSmrg # Let the user override the test. 7073d21ab8bcSmrg else 7074d21ab8bcSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7075d21ab8bcSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7076d21ab8bcSmrg *COFF*) 7077d21ab8bcSmrg DUMPBIN="$DUMPBIN -symbols -headers" 7078d21ab8bcSmrg ;; 7079d21ab8bcSmrg *) 7080d21ab8bcSmrg DUMPBIN=: 7081d21ab8bcSmrg ;; 7082d21ab8bcSmrg esac 7083d21ab8bcSmrg fi 7084d21ab8bcSmrg AC_SUBST([DUMPBIN]) 7085d21ab8bcSmrg if test : != "$DUMPBIN"; then 7086d21ab8bcSmrg NM=$DUMPBIN 7087d21ab8bcSmrg fi 70886fae4e5dSmrgfi 7089d21ab8bcSmrgtest -z "$NM" && NM=nm 7090d21ab8bcSmrgAC_SUBST([NM]) 7091d21ab8bcSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 70921f0ac6a5Smrg 7093d21ab8bcSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7094d21ab8bcSmrg [lt_cv_nm_interface="BSD nm" 7095d21ab8bcSmrg echo "int some_variable = 0;" > conftest.$ac_ext 7096d21ab8bcSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7097d21ab8bcSmrg (eval "$ac_compile" 2>conftest.err) 7098d21ab8bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7099d21ab8bcSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7100d21ab8bcSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7101d21ab8bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7102d21ab8bcSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7103d21ab8bcSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 7104d21ab8bcSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7105d21ab8bcSmrg lt_cv_nm_interface="MS dumpbin" 7106d21ab8bcSmrg fi 7107d21ab8bcSmrg rm -f conftest*]) 7108d21ab8bcSmrg])# LT_PATH_NM 71091f0ac6a5Smrg 7110d21ab8bcSmrg# Old names: 7111d21ab8bcSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7112d21ab8bcSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 71136fae4e5dSmrgdnl aclocal-1.4 backwards compatibility: 7114d21ab8bcSmrgdnl AC_DEFUN([AM_PROG_NM], []) 7115d21ab8bcSmrgdnl AC_DEFUN([AC_PROG_NM], []) 71166fae4e5dSmrg 7117d21ab8bcSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7118d21ab8bcSmrg# -------------------------------- 7119d21ab8bcSmrg# how to determine the name of the shared library 7120d21ab8bcSmrg# associated with a specific link library. 7121d21ab8bcSmrg# -- PORTME fill in with the dynamic library characteristics 7122d21ab8bcSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7123d21ab8bcSmrg[m4_require([_LT_DECL_EGREP]) 7124d21ab8bcSmrgm4_require([_LT_DECL_OBJDUMP]) 7125d21ab8bcSmrgm4_require([_LT_DECL_DLLTOOL]) 7126d21ab8bcSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7127d21ab8bcSmrglt_cv_sharedlib_from_linklib_cmd, 7128d21ab8bcSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 71296fae4e5dSmrg 7130d21ab8bcSmrgcase $host_os in 7131d21ab8bcSmrgcygwin* | mingw* | pw32* | cegcc*) 7132d21ab8bcSmrg # two different shell functions defined in ltmain.sh; 7133d21ab8bcSmrg # decide which one to use based on capabilities of $DLLTOOL 7134d21ab8bcSmrg case `$DLLTOOL --help 2>&1` in 7135d21ab8bcSmrg *--identify-strict*) 7136d21ab8bcSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7137d21ab8bcSmrg ;; 7138d21ab8bcSmrg *) 7139d21ab8bcSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7140d21ab8bcSmrg ;; 7141d21ab8bcSmrg esac 7142d21ab8bcSmrg ;; 7143d21ab8bcSmrg*) 7144d21ab8bcSmrg # fallback: assume linklib IS sharedlib 7145d21ab8bcSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7146d21ab8bcSmrg ;; 7147d21ab8bcSmrgesac 714889c04b6cSmrg]) 7149d21ab8bcSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7150d21ab8bcSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 715189c04b6cSmrg 7152d21ab8bcSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7153d21ab8bcSmrg [Command to associate shared and link libraries]) 7154d21ab8bcSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 715589c04b6cSmrg 71561f0ac6a5Smrg 7157d21ab8bcSmrg# _LT_PATH_MANIFEST_TOOL 7158d21ab8bcSmrg# ---------------------- 7159d21ab8bcSmrg# locate the manifest tool 7160d21ab8bcSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7161d21ab8bcSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7162d21ab8bcSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7163d21ab8bcSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7164d21ab8bcSmrg [lt_cv_path_mainfest_tool=no 7165d21ab8bcSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7166d21ab8bcSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7167d21ab8bcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7168d21ab8bcSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7169d21ab8bcSmrg lt_cv_path_mainfest_tool=yes 7170d21ab8bcSmrg fi 7171d21ab8bcSmrg rm -f conftest*]) 7172d21ab8bcSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 7173d21ab8bcSmrg MANIFEST_TOOL=: 7174d21ab8bcSmrgfi 7175d21ab8bcSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7176d21ab8bcSmrg])# _LT_PATH_MANIFEST_TOOL 71771f0ac6a5Smrg 71781f0ac6a5Smrg 7179d21ab8bcSmrg# _LT_DLL_DEF_P([FILE]) 7180d21ab8bcSmrg# --------------------- 7181d21ab8bcSmrg# True iff FILE is a Windows DLL '.def' file. 7182d21ab8bcSmrg# Keep in sync with func_dll_def_p in the libtool script 7183d21ab8bcSmrgAC_DEFUN([_LT_DLL_DEF_P], 7184d21ab8bcSmrg[dnl 7185d21ab8bcSmrg test DEF = "`$SED -n dnl 7186d21ab8bcSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7187d21ab8bcSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7188d21ab8bcSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7189d21ab8bcSmrg -e q dnl Only consider the first "real" line 7190d21ab8bcSmrg $1`" dnl 7191d21ab8bcSmrg])# _LT_DLL_DEF_P 71921f0ac6a5Smrg 71931f0ac6a5Smrg 7194d21ab8bcSmrg# LT_LIB_M 7195d21ab8bcSmrg# -------- 7196d21ab8bcSmrg# check for math library 7197d21ab8bcSmrgAC_DEFUN([LT_LIB_M], 7198d21ab8bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7199d21ab8bcSmrgLIBM= 7200d21ab8bcSmrgcase $host in 7201d21ab8bcSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7202d21ab8bcSmrg # These system don't have libm, or don't need it 7203d21ab8bcSmrg ;; 7204d21ab8bcSmrg*-ncr-sysv4.3*) 7205d21ab8bcSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7206d21ab8bcSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7207d21ab8bcSmrg ;; 7208d21ab8bcSmrg*) 7209d21ab8bcSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7210d21ab8bcSmrg ;; 7211d21ab8bcSmrgesac 7212d21ab8bcSmrgAC_SUBST([LIBM]) 7213d21ab8bcSmrg])# LT_LIB_M 72146fae4e5dSmrg 7215d21ab8bcSmrg# Old name: 7216d21ab8bcSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7217d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 7218d21ab8bcSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 72199c9ff80cSmrg 72201f0ac6a5Smrg 7221d21ab8bcSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7222d21ab8bcSmrg# ------------------------------- 7223d21ab8bcSmrgm4_defun([_LT_COMPILER_NO_RTTI], 7224d21ab8bcSmrg[m4_require([_LT_TAG_COMPILER])dnl 72251f0ac6a5Smrg 7226d21ab8bcSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 72271f0ac6a5Smrg 7228d21ab8bcSmrgif test yes = "$GCC"; then 7229d21ab8bcSmrg case $cc_basename in 7230d21ab8bcSmrg nvcc*) 7231d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7232d21ab8bcSmrg *) 7233d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7234d21ab8bcSmrg esac 7235d21ab8bcSmrg 7236d21ab8bcSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7237d21ab8bcSmrg lt_cv_prog_compiler_rtti_exceptions, 7238d21ab8bcSmrg [-fno-rtti -fno-exceptions], [], 7239d21ab8bcSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7240d21ab8bcSmrgfi 7241d21ab8bcSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7242d21ab8bcSmrg [Compiler flag to turn off builtin functions]) 7243d21ab8bcSmrg])# _LT_COMPILER_NO_RTTI 72441f0ac6a5Smrg 72451f0ac6a5Smrg 7246d21ab8bcSmrg# _LT_CMD_GLOBAL_SYMBOLS 7247d21ab8bcSmrg# ---------------------- 7248d21ab8bcSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7249d21ab8bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7250d21ab8bcSmrgAC_REQUIRE([AC_PROG_CC])dnl 7251d21ab8bcSmrgAC_REQUIRE([AC_PROG_AWK])dnl 7252d21ab8bcSmrgAC_REQUIRE([LT_PATH_NM])dnl 7253d21ab8bcSmrgAC_REQUIRE([LT_PATH_LD])dnl 7254d21ab8bcSmrgm4_require([_LT_DECL_SED])dnl 7255d21ab8bcSmrgm4_require([_LT_DECL_EGREP])dnl 7256d21ab8bcSmrgm4_require([_LT_TAG_COMPILER])dnl 7257d21ab8bcSmrg 7258d21ab8bcSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7259d21ab8bcSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7260d21ab8bcSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7261d21ab8bcSmrg[ 7262d21ab8bcSmrg# These are sane defaults that work on at least a few old systems. 7263d21ab8bcSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7264d21ab8bcSmrg 7265d21ab8bcSmrg# Character class describing NM global symbol codes. 7266d21ab8bcSmrgsymcode='[[BCDEGRST]]' 7267d21ab8bcSmrg 7268d21ab8bcSmrg# Regexp to match symbols that can be accessed directly from C. 7269d21ab8bcSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7270d21ab8bcSmrg 7271d21ab8bcSmrg# Define system-specific variables. 7272d21ab8bcSmrgcase $host_os in 7273d21ab8bcSmrgaix*) 7274d21ab8bcSmrg symcode='[[BCDT]]' 7275d21ab8bcSmrg ;; 7276d21ab8bcSmrgcygwin* | mingw* | pw32* | cegcc*) 7277d21ab8bcSmrg symcode='[[ABCDGISTW]]' 7278d21ab8bcSmrg ;; 7279d21ab8bcSmrghpux*) 7280d21ab8bcSmrg if test ia64 = "$host_cpu"; then 7281d21ab8bcSmrg symcode='[[ABCDEGRST]]' 7282d21ab8bcSmrg fi 7283d21ab8bcSmrg ;; 7284d21ab8bcSmrgirix* | nonstopux*) 7285d21ab8bcSmrg symcode='[[BCDEGRST]]' 7286d21ab8bcSmrg ;; 7287d21ab8bcSmrgosf*) 7288d21ab8bcSmrg symcode='[[BCDEGQRST]]' 7289d21ab8bcSmrg ;; 7290d21ab8bcSmrgsolaris*) 7291d21ab8bcSmrg symcode='[[BDRT]]' 7292d21ab8bcSmrg ;; 7293d21ab8bcSmrgsco3.2v5*) 7294d21ab8bcSmrg symcode='[[DT]]' 7295d21ab8bcSmrg ;; 7296d21ab8bcSmrgsysv4.2uw2*) 7297d21ab8bcSmrg symcode='[[DT]]' 7298d21ab8bcSmrg ;; 7299d21ab8bcSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7300d21ab8bcSmrg symcode='[[ABDT]]' 7301d21ab8bcSmrg ;; 7302d21ab8bcSmrgsysv4) 7303d21ab8bcSmrg symcode='[[DFNSTU]]' 7304d21ab8bcSmrg ;; 7305d21ab8bcSmrgesac 7306d21ab8bcSmrg 7307d21ab8bcSmrg# If we're using GNU nm, then use its standard symbol codes. 7308d21ab8bcSmrgcase `$NM -V 2>&1` in 7309d21ab8bcSmrg*GNU* | *'with BFD'*) 7310d21ab8bcSmrg symcode='[[ABCDGIRSTW]]' ;; 7311d21ab8bcSmrgesac 7312d21ab8bcSmrg 7313d21ab8bcSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7314d21ab8bcSmrg # Gets list of data symbols to import. 7315d21ab8bcSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7316d21ab8bcSmrg # Adjust the below global symbol transforms to fixup imported variables. 7317d21ab8bcSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7318d21ab8bcSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7319d21ab8bcSmrg lt_c_name_lib_hook="\ 7320d21ab8bcSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7321d21ab8bcSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 73226fae4e5dSmrgelse 7323d21ab8bcSmrg # Disable hooks by default. 7324d21ab8bcSmrg lt_cv_sys_global_symbol_to_import= 7325d21ab8bcSmrg lt_cdecl_hook= 7326d21ab8bcSmrg lt_c_name_hook= 7327d21ab8bcSmrg lt_c_name_lib_hook= 73286fae4e5dSmrgfi 73291f0ac6a5Smrg 7330d21ab8bcSmrg# Transform an extracted symbol line into a proper C declaration. 7331d21ab8bcSmrg# Some systems (esp. on ia64) link data and code symbols differently, 7332d21ab8bcSmrg# so use this general approach. 7333d21ab8bcSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7334d21ab8bcSmrg$lt_cdecl_hook\ 7335d21ab8bcSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7336d21ab8bcSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7337d21ab8bcSmrg 7338d21ab8bcSmrg# Transform an extracted symbol line into symbol name and symbol address 7339d21ab8bcSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7340d21ab8bcSmrg$lt_c_name_hook\ 7341d21ab8bcSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7342d21ab8bcSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7343d21ab8bcSmrg 7344d21ab8bcSmrg# Transform an extracted symbol line into symbol name with lib prefix and 7345d21ab8bcSmrg# symbol address. 7346d21ab8bcSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7347d21ab8bcSmrg$lt_c_name_lib_hook\ 7348d21ab8bcSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7349d21ab8bcSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7350d21ab8bcSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7351d21ab8bcSmrg 7352d21ab8bcSmrg# Handle CRLF in mingw tool chain 7353d21ab8bcSmrgopt_cr= 7354d21ab8bcSmrgcase $build_os in 7355d21ab8bcSmrgmingw*) 7356d21ab8bcSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 73579c9ff80cSmrg ;; 73589c9ff80cSmrgesac 73599c9ff80cSmrg 7360d21ab8bcSmrg# Try without a prefix underscore, then with it. 7361d21ab8bcSmrgfor ac_symprfx in "" "_"; do 73629c9ff80cSmrg 7363d21ab8bcSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7364d21ab8bcSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 7365d21ab8bcSmrg 7366d21ab8bcSmrg # Write the raw and C identifiers. 7367d21ab8bcSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7368d21ab8bcSmrg # Fake it for dumpbin and say T for any non-static function, 7369d21ab8bcSmrg # D for any global variable and I for any imported variable. 7370d21ab8bcSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7371d21ab8bcSmrg # which start with @ or ?. 7372d21ab8bcSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7373d21ab8bcSmrg" {last_section=section; section=\$ 3};"\ 7374d21ab8bcSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7375d21ab8bcSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7376d21ab8bcSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7377d21ab8bcSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7378d21ab8bcSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7379d21ab8bcSmrg" \$ 0!~/External *\|/{next};"\ 7380d21ab8bcSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7381d21ab8bcSmrg" {if(hide[section]) next};"\ 7382d21ab8bcSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7383d21ab8bcSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7384d21ab8bcSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7385d21ab8bcSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7386d21ab8bcSmrg" ' prfx=^$ac_symprfx]" 7387d21ab8bcSmrg else 7388d21ab8bcSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7389d21ab8bcSmrg fi 7390d21ab8bcSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7391d21ab8bcSmrg 7392d21ab8bcSmrg # Check to see that the pipe works correctly. 7393d21ab8bcSmrg pipe_works=no 7394d21ab8bcSmrg 7395d21ab8bcSmrg rm -f conftest* 7396d21ab8bcSmrg cat > conftest.$ac_ext <<_LT_EOF 7397d21ab8bcSmrg#ifdef __cplusplus 7398d21ab8bcSmrgextern "C" { 7399d21ab8bcSmrg#endif 7400d21ab8bcSmrgchar nm_test_var; 7401d21ab8bcSmrgvoid nm_test_func(void); 7402d21ab8bcSmrgvoid nm_test_func(void){} 7403d21ab8bcSmrg#ifdef __cplusplus 7404d21ab8bcSmrg} 7405d21ab8bcSmrg#endif 7406d21ab8bcSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 7407d21ab8bcSmrg_LT_EOF 7408d21ab8bcSmrg 7409d21ab8bcSmrg if AC_TRY_EVAL(ac_compile); then 7410d21ab8bcSmrg # Now try to grab the symbols. 7411d21ab8bcSmrg nlist=conftest.nm 7412d21ab8bcSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7413d21ab8bcSmrg # Try sorting and uniquifying the output. 7414d21ab8bcSmrg if sort "$nlist" | uniq > "$nlist"T; then 7415d21ab8bcSmrg mv -f "$nlist"T "$nlist" 7416d21ab8bcSmrg else 7417d21ab8bcSmrg rm -f "$nlist"T 7418d21ab8bcSmrg fi 7419d21ab8bcSmrg 7420d21ab8bcSmrg # Make sure that we snagged all the symbols we need. 7421d21ab8bcSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7422d21ab8bcSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7423d21ab8bcSmrg cat <<_LT_EOF > conftest.$ac_ext 7424d21ab8bcSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7425d21ab8bcSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7426d21ab8bcSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 7427d21ab8bcSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 7428d21ab8bcSmrg# define LT@&t@_DLSYM_CONST 7429d21ab8bcSmrg#elif defined __osf__ 7430d21ab8bcSmrg/* This system does not cope well with relocations in const data. */ 7431d21ab8bcSmrg# define LT@&t@_DLSYM_CONST 7432d21ab8bcSmrg#else 7433d21ab8bcSmrg# define LT@&t@_DLSYM_CONST const 7434d21ab8bcSmrg#endif 7435d21ab8bcSmrg 7436d21ab8bcSmrg#ifdef __cplusplus 7437d21ab8bcSmrgextern "C" { 7438d21ab8bcSmrg#endif 7439d21ab8bcSmrg 7440d21ab8bcSmrg_LT_EOF 7441d21ab8bcSmrg # Now generate the symbol file. 7442d21ab8bcSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7443d21ab8bcSmrg 7444d21ab8bcSmrg cat <<_LT_EOF >> conftest.$ac_ext 7445d21ab8bcSmrg 7446d21ab8bcSmrg/* The mapping between symbol names and symbols. */ 7447d21ab8bcSmrgLT@&t@_DLSYM_CONST struct { 7448d21ab8bcSmrg const char *name; 7449d21ab8bcSmrg void *address; 7450d21ab8bcSmrg} 7451d21ab8bcSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 7452d21ab8bcSmrg{ 7453d21ab8bcSmrg { "@PROGRAM@", (void *) 0 }, 7454d21ab8bcSmrg_LT_EOF 7455d21ab8bcSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7456d21ab8bcSmrg cat <<\_LT_EOF >> conftest.$ac_ext 7457d21ab8bcSmrg {0, (void *) 0} 7458d21ab8bcSmrg}; 7459d21ab8bcSmrg 7460d21ab8bcSmrg/* This works around a problem in FreeBSD linker */ 7461d21ab8bcSmrg#ifdef FREEBSD_WORKAROUND 7462d21ab8bcSmrgstatic const void *lt_preloaded_setup() { 7463d21ab8bcSmrg return lt__PROGRAM__LTX_preloaded_symbols; 7464d21ab8bcSmrg} 7465d21ab8bcSmrg#endif 7466d21ab8bcSmrg 7467d21ab8bcSmrg#ifdef __cplusplus 7468d21ab8bcSmrg} 7469d21ab8bcSmrg#endif 7470d21ab8bcSmrg_LT_EOF 7471d21ab8bcSmrg # Now try linking the two files. 7472d21ab8bcSmrg mv conftest.$ac_objext conftstm.$ac_objext 7473d21ab8bcSmrg lt_globsym_save_LIBS=$LIBS 7474d21ab8bcSmrg lt_globsym_save_CFLAGS=$CFLAGS 7475d21ab8bcSmrg LIBS=conftstm.$ac_objext 7476d21ab8bcSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7477d21ab8bcSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7478d21ab8bcSmrg pipe_works=yes 7479d21ab8bcSmrg fi 7480d21ab8bcSmrg LIBS=$lt_globsym_save_LIBS 7481d21ab8bcSmrg CFLAGS=$lt_globsym_save_CFLAGS 7482d21ab8bcSmrg else 7483d21ab8bcSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7484d21ab8bcSmrg fi 7485d21ab8bcSmrg else 7486d21ab8bcSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7487d21ab8bcSmrg fi 7488d21ab8bcSmrg else 7489d21ab8bcSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7490d21ab8bcSmrg fi 7491d21ab8bcSmrg else 7492d21ab8bcSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7493d21ab8bcSmrg cat conftest.$ac_ext >&5 7494d21ab8bcSmrg fi 7495d21ab8bcSmrg rm -rf conftest* conftst* 7496d21ab8bcSmrg 7497d21ab8bcSmrg # Do not use the global_symbol_pipe unless it works. 7498d21ab8bcSmrg if test yes = "$pipe_works"; then 7499d21ab8bcSmrg break 7500d21ab8bcSmrg else 7501d21ab8bcSmrg lt_cv_sys_global_symbol_pipe= 7502d21ab8bcSmrg fi 7503d21ab8bcSmrgdone 7504d21ab8bcSmrg]) 7505d21ab8bcSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 7506d21ab8bcSmrg lt_cv_sys_global_symbol_to_cdecl= 7507d21ab8bcSmrgfi 7508d21ab8bcSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7509d21ab8bcSmrg AC_MSG_RESULT(failed) 7510d21ab8bcSmrgelse 7511d21ab8bcSmrg AC_MSG_RESULT(ok) 7512d21ab8bcSmrgfi 7513d21ab8bcSmrg 7514d21ab8bcSmrg# Response file support. 7515d21ab8bcSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7516d21ab8bcSmrg nm_file_list_spec='@' 7517d21ab8bcSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7518d21ab8bcSmrg nm_file_list_spec='@' 7519d21ab8bcSmrgfi 7520d21ab8bcSmrg 7521d21ab8bcSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7522d21ab8bcSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 7523d21ab8bcSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7524d21ab8bcSmrg [Transform the output of nm in a proper C declaration]) 7525d21ab8bcSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7526d21ab8bcSmrg [Transform the output of nm into a list of symbols to manually relocate]) 7527d21ab8bcSmrg_LT_DECL([global_symbol_to_c_name_address], 7528d21ab8bcSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 7529d21ab8bcSmrg [Transform the output of nm in a C name address pair]) 7530d21ab8bcSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7531d21ab8bcSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7532d21ab8bcSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 7533d21ab8bcSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7534d21ab8bcSmrg [The name lister interface]) 7535d21ab8bcSmrg_LT_DECL([], [nm_file_list_spec], [1], 7536d21ab8bcSmrg [Specify filename containing input files for $NM]) 7537d21ab8bcSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 7538d21ab8bcSmrg 7539d21ab8bcSmrg 7540d21ab8bcSmrg# _LT_COMPILER_PIC([TAGNAME]) 7541d21ab8bcSmrg# --------------------------- 7542d21ab8bcSmrgm4_defun([_LT_COMPILER_PIC], 7543d21ab8bcSmrg[m4_require([_LT_TAG_COMPILER])dnl 7544d21ab8bcSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7545d21ab8bcSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7546d21ab8bcSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 7547d21ab8bcSmrg 7548d21ab8bcSmrgm4_if([$1], [CXX], [ 7549d21ab8bcSmrg # C++ specific cases for pic, static, wl, etc. 7550d21ab8bcSmrg if test yes = "$GXX"; then 7551d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7552d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7553d21ab8bcSmrg 7554d21ab8bcSmrg case $host_os in 7555d21ab8bcSmrg aix*) 7556d21ab8bcSmrg # All AIX code is PIC. 7557d21ab8bcSmrg if test ia64 = "$host_cpu"; then 7558d21ab8bcSmrg # AIX 5 now supports IA64 processor 7559d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7560d21ab8bcSmrg fi 7561d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7562d21ab8bcSmrg ;; 7563d21ab8bcSmrg 7564d21ab8bcSmrg amigaos*) 7565d21ab8bcSmrg case $host_cpu in 7566d21ab8bcSmrg powerpc) 7567d21ab8bcSmrg # see comment about AmigaOS4 .so support 7568d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7569d21ab8bcSmrg ;; 7570d21ab8bcSmrg m68k) 7571d21ab8bcSmrg # FIXME: we need at least 68020 code to build shared libraries, but 7572d21ab8bcSmrg # adding the '-m68020' flag to GCC prevents building anything better, 7573d21ab8bcSmrg # like '-m68040'. 7574d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7575d21ab8bcSmrg ;; 7576d21ab8bcSmrg esac 7577d21ab8bcSmrg ;; 7578d21ab8bcSmrg 7579d21ab8bcSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7580d21ab8bcSmrg # PIC is the default for these OSes. 7581d21ab8bcSmrg ;; 7582d21ab8bcSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7583d21ab8bcSmrg # This hack is so that the source file can tell whether it is being 7584d21ab8bcSmrg # built for inclusion in a dll (and should export symbols for example). 7585d21ab8bcSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7586d21ab8bcSmrg # (--disable-auto-import) libraries 7587d21ab8bcSmrg m4_if([$1], [GCJ], [], 7588d21ab8bcSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7589d21ab8bcSmrg case $host_os in 7590d21ab8bcSmrg os2*) 7591d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7592d21ab8bcSmrg ;; 7593d21ab8bcSmrg esac 7594d21ab8bcSmrg ;; 7595d21ab8bcSmrg darwin* | rhapsody*) 7596d21ab8bcSmrg # PIC is the default on this platform 7597d21ab8bcSmrg # Common symbols not allowed in MH_DYLIB files 7598d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7599d21ab8bcSmrg ;; 7600d21ab8bcSmrg *djgpp*) 7601d21ab8bcSmrg # DJGPP does not support shared libraries at all 7602d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7603d21ab8bcSmrg ;; 7604d21ab8bcSmrg haiku*) 7605d21ab8bcSmrg # PIC is the default for Haiku. 7606d21ab8bcSmrg # The "-static" flag exists, but is broken. 7607d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7608d21ab8bcSmrg ;; 7609d21ab8bcSmrg interix[[3-9]]*) 7610d21ab8bcSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7611d21ab8bcSmrg # Instead, we relocate shared libraries at runtime. 7612d21ab8bcSmrg ;; 7613d21ab8bcSmrg sysv4*MP*) 7614d21ab8bcSmrg if test -d /usr/nec; then 7615d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7616d21ab8bcSmrg fi 7617d21ab8bcSmrg ;; 7618d21ab8bcSmrg hpux*) 7619d21ab8bcSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7620d21ab8bcSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7621d21ab8bcSmrg # sets the default TLS model and affects inlining. 7622d21ab8bcSmrg case $host_cpu in 7623d21ab8bcSmrg hppa*64*) 7624d21ab8bcSmrg ;; 7625d21ab8bcSmrg *) 7626d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7627d21ab8bcSmrg ;; 7628d21ab8bcSmrg esac 7629d21ab8bcSmrg ;; 7630d21ab8bcSmrg *qnx* | *nto*) 7631d21ab8bcSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7632d21ab8bcSmrg # it will coredump. 7633d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7634d21ab8bcSmrg ;; 7635d21ab8bcSmrg *) 7636d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7637d21ab8bcSmrg ;; 7638d21ab8bcSmrg esac 7639d21ab8bcSmrg else 7640d21ab8bcSmrg case $host_os in 7641d21ab8bcSmrg aix[[4-9]]*) 7642d21ab8bcSmrg # All AIX code is PIC. 7643d21ab8bcSmrg if test ia64 = "$host_cpu"; then 7644d21ab8bcSmrg # AIX 5 now supports IA64 processor 7645d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7646d21ab8bcSmrg else 7647d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7648d21ab8bcSmrg fi 7649d21ab8bcSmrg ;; 7650d21ab8bcSmrg chorus*) 7651d21ab8bcSmrg case $cc_basename in 7652d21ab8bcSmrg cxch68*) 7653d21ab8bcSmrg # Green Hills C++ Compiler 7654d21ab8bcSmrg # _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" 7655d21ab8bcSmrg ;; 7656d21ab8bcSmrg esac 7657d21ab8bcSmrg ;; 7658d21ab8bcSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7659d21ab8bcSmrg # This hack is so that the source file can tell whether it is being 7660d21ab8bcSmrg # built for inclusion in a dll (and should export symbols for example). 7661d21ab8bcSmrg m4_if([$1], [GCJ], [], 7662d21ab8bcSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7663d21ab8bcSmrg ;; 7664d21ab8bcSmrg dgux*) 7665d21ab8bcSmrg case $cc_basename in 7666d21ab8bcSmrg ec++*) 7667d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7668d21ab8bcSmrg ;; 7669d21ab8bcSmrg ghcx*) 7670d21ab8bcSmrg # Green Hills C++ Compiler 7671d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7672d21ab8bcSmrg ;; 7673d21ab8bcSmrg *) 7674d21ab8bcSmrg ;; 7675d21ab8bcSmrg esac 7676d21ab8bcSmrg ;; 7677d21ab8bcSmrg freebsd* | dragonfly* | midnightbsd*) 7678d21ab8bcSmrg # FreeBSD uses GNU C++ 7679d21ab8bcSmrg ;; 7680d21ab8bcSmrg hpux9* | hpux10* | hpux11*) 7681d21ab8bcSmrg case $cc_basename in 7682d21ab8bcSmrg CC*) 7683d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7684d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7685d21ab8bcSmrg if test ia64 != "$host_cpu"; then 7686d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7687d21ab8bcSmrg fi 7688d21ab8bcSmrg ;; 7689d21ab8bcSmrg aCC*) 7690d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7691d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7692d21ab8bcSmrg case $host_cpu in 7693d21ab8bcSmrg hppa*64*|ia64*) 7694d21ab8bcSmrg # +Z the default 7695d21ab8bcSmrg ;; 7696d21ab8bcSmrg *) 7697d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7698d21ab8bcSmrg ;; 7699d21ab8bcSmrg esac 7700d21ab8bcSmrg ;; 7701d21ab8bcSmrg *) 7702d21ab8bcSmrg ;; 7703d21ab8bcSmrg esac 7704d21ab8bcSmrg ;; 7705d21ab8bcSmrg interix*) 7706d21ab8bcSmrg # This is c89, which is MS Visual C++ (no shared libs) 7707d21ab8bcSmrg # Anyone wants to do a port? 7708d21ab8bcSmrg ;; 7709d21ab8bcSmrg irix5* | irix6* | nonstopux*) 7710d21ab8bcSmrg case $cc_basename in 7711d21ab8bcSmrg CC*) 7712d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7713d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7714d21ab8bcSmrg # CC pic flag -KPIC is the default. 7715d21ab8bcSmrg ;; 7716d21ab8bcSmrg *) 7717d21ab8bcSmrg ;; 7718d21ab8bcSmrg esac 7719d21ab8bcSmrg ;; 7720d21ab8bcSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7721d21ab8bcSmrg case $cc_basename in 7722d21ab8bcSmrg KCC*) 7723d21ab8bcSmrg # KAI C++ Compiler 7724d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7725d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7726d21ab8bcSmrg ;; 7727d21ab8bcSmrg ecpc* ) 7728d21ab8bcSmrg # old Intel C++ for x86_64, which still supported -KPIC. 7729d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7730d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7731d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7732d21ab8bcSmrg ;; 7733d21ab8bcSmrg icpc* ) 7734d21ab8bcSmrg # Intel C++, used to be incompatible with GCC. 7735d21ab8bcSmrg # ICC 10 doesn't accept -KPIC any more. 7736d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7737d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7738d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7739d21ab8bcSmrg ;; 7740d21ab8bcSmrg pgCC* | pgcpp*) 7741d21ab8bcSmrg # Portland Group C++ compiler 7742d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7743d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7744d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7745d21ab8bcSmrg ;; 7746d21ab8bcSmrg cxx*) 7747d21ab8bcSmrg # Compaq C++ 7748d21ab8bcSmrg # Make sure the PIC flag is empty. It appears that all Alpha 7749d21ab8bcSmrg # Linux and Compaq Tru64 Unix objects are PIC. 7750d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7751d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7752d21ab8bcSmrg ;; 7753d21ab8bcSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7754d21ab8bcSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 7755d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7756d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7757d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7758d21ab8bcSmrg ;; 7759d21ab8bcSmrg *) 7760d21ab8bcSmrg case `$CC -V 2>&1 | $SED 5q` in 7761d21ab8bcSmrg *Sun\ C*) 7762d21ab8bcSmrg # Sun C++ 5.9 7763d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7764d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7765d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7766d21ab8bcSmrg ;; 7767d21ab8bcSmrg esac 7768d21ab8bcSmrg ;; 7769d21ab8bcSmrg esac 7770d21ab8bcSmrg ;; 7771d21ab8bcSmrg lynxos*) 7772d21ab8bcSmrg ;; 7773d21ab8bcSmrg m88k*) 7774d21ab8bcSmrg ;; 7775d21ab8bcSmrg mvs*) 7776d21ab8bcSmrg case $cc_basename in 7777d21ab8bcSmrg cxx*) 7778d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7779d21ab8bcSmrg ;; 7780d21ab8bcSmrg *) 7781d21ab8bcSmrg ;; 7782d21ab8bcSmrg esac 7783d21ab8bcSmrg ;; 7784d21ab8bcSmrg netbsd*) 7785d21ab8bcSmrg ;; 7786d21ab8bcSmrg *qnx* | *nto*) 7787d21ab8bcSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7788d21ab8bcSmrg # it will coredump. 7789d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7790d21ab8bcSmrg ;; 7791d21ab8bcSmrg osf3* | osf4* | osf5*) 7792d21ab8bcSmrg case $cc_basename in 7793d21ab8bcSmrg KCC*) 7794d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7795d21ab8bcSmrg ;; 7796d21ab8bcSmrg RCC*) 7797d21ab8bcSmrg # Rational C++ 2.4.1 7798d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7799d21ab8bcSmrg ;; 7800d21ab8bcSmrg cxx*) 7801d21ab8bcSmrg # Digital/Compaq C++ 7802d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7803d21ab8bcSmrg # Make sure the PIC flag is empty. It appears that all Alpha 7804d21ab8bcSmrg # Linux and Compaq Tru64 Unix objects are PIC. 7805d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7806d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7807d21ab8bcSmrg ;; 7808d21ab8bcSmrg *) 7809d21ab8bcSmrg ;; 7810d21ab8bcSmrg esac 7811d21ab8bcSmrg ;; 7812d21ab8bcSmrg psos*) 7813d21ab8bcSmrg ;; 7814d21ab8bcSmrg solaris*) 7815d21ab8bcSmrg case $cc_basename in 7816d21ab8bcSmrg CC* | sunCC*) 7817d21ab8bcSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7818d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7819d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7820d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7821d21ab8bcSmrg ;; 7822d21ab8bcSmrg gcx*) 7823d21ab8bcSmrg # Green Hills C++ Compiler 7824d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7825d21ab8bcSmrg ;; 7826d21ab8bcSmrg *) 7827d21ab8bcSmrg ;; 7828d21ab8bcSmrg esac 7829d21ab8bcSmrg ;; 7830d21ab8bcSmrg sunos4*) 7831d21ab8bcSmrg case $cc_basename in 7832d21ab8bcSmrg CC*) 7833d21ab8bcSmrg # Sun C++ 4.x 7834d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7835d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7836d21ab8bcSmrg ;; 7837d21ab8bcSmrg lcc*) 7838d21ab8bcSmrg # Lucid 7839d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7840d21ab8bcSmrg ;; 7841d21ab8bcSmrg *) 7842d21ab8bcSmrg ;; 7843d21ab8bcSmrg esac 7844d21ab8bcSmrg ;; 7845d21ab8bcSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7846d21ab8bcSmrg case $cc_basename in 7847d21ab8bcSmrg CC*) 7848d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7849d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7850d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7851d21ab8bcSmrg ;; 7852d21ab8bcSmrg esac 7853d21ab8bcSmrg ;; 7854d21ab8bcSmrg tandem*) 7855d21ab8bcSmrg case $cc_basename in 7856d21ab8bcSmrg NCC*) 7857d21ab8bcSmrg # NonStop-UX NCC 3.20 7858d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7859d21ab8bcSmrg ;; 7860d21ab8bcSmrg *) 7861d21ab8bcSmrg ;; 7862d21ab8bcSmrg esac 7863d21ab8bcSmrg ;; 7864d21ab8bcSmrg vxworks*) 7865d21ab8bcSmrg ;; 7866d21ab8bcSmrg *) 7867d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7868d21ab8bcSmrg ;; 7869d21ab8bcSmrg esac 7870d21ab8bcSmrg fi 7871d21ab8bcSmrg], 7872d21ab8bcSmrg[ 7873d21ab8bcSmrg if test yes = "$GCC"; then 7874d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7875d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7876d21ab8bcSmrg 7877d21ab8bcSmrg case $host_os in 7878d21ab8bcSmrg aix*) 7879d21ab8bcSmrg # All AIX code is PIC. 7880d21ab8bcSmrg if test ia64 = "$host_cpu"; then 7881d21ab8bcSmrg # AIX 5 now supports IA64 processor 7882d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7883d21ab8bcSmrg fi 7884d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7885d21ab8bcSmrg ;; 7886d21ab8bcSmrg 7887d21ab8bcSmrg amigaos*) 7888d21ab8bcSmrg case $host_cpu in 7889d21ab8bcSmrg powerpc) 7890d21ab8bcSmrg # see comment about AmigaOS4 .so support 7891d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7892d21ab8bcSmrg ;; 7893d21ab8bcSmrg m68k) 7894d21ab8bcSmrg # FIXME: we need at least 68020 code to build shared libraries, but 7895d21ab8bcSmrg # adding the '-m68020' flag to GCC prevents building anything better, 7896d21ab8bcSmrg # like '-m68040'. 7897d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7898d21ab8bcSmrg ;; 7899d21ab8bcSmrg esac 7900d21ab8bcSmrg ;; 7901d21ab8bcSmrg 7902d21ab8bcSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7903d21ab8bcSmrg # PIC is the default for these OSes. 7904d21ab8bcSmrg ;; 7905d21ab8bcSmrg 7906d21ab8bcSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 7907d21ab8bcSmrg # This hack is so that the source file can tell whether it is being 7908d21ab8bcSmrg # built for inclusion in a dll (and should export symbols for example). 7909d21ab8bcSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7910d21ab8bcSmrg # (--disable-auto-import) libraries 7911d21ab8bcSmrg m4_if([$1], [GCJ], [], 7912d21ab8bcSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7913d21ab8bcSmrg case $host_os in 7914d21ab8bcSmrg os2*) 7915d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7916d21ab8bcSmrg ;; 7917d21ab8bcSmrg esac 7918d21ab8bcSmrg ;; 79191f0ac6a5Smrg 7920d21ab8bcSmrg darwin* | rhapsody*) 7921d21ab8bcSmrg # PIC is the default on this platform 7922d21ab8bcSmrg # Common symbols not allowed in MH_DYLIB files 7923d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7924d21ab8bcSmrg ;; 79251f0ac6a5Smrg 7926d21ab8bcSmrg haiku*) 7927d21ab8bcSmrg # PIC is the default for Haiku. 7928d21ab8bcSmrg # The "-static" flag exists, but is broken. 7929d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7930d21ab8bcSmrg ;; 79311f0ac6a5Smrg 7932d21ab8bcSmrg hpux*) 7933d21ab8bcSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7934d21ab8bcSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7935d21ab8bcSmrg # sets the default TLS model and affects inlining. 7936d21ab8bcSmrg case $host_cpu in 7937d21ab8bcSmrg hppa*64*) 7938d21ab8bcSmrg # +Z the default 7939d21ab8bcSmrg ;; 7940d21ab8bcSmrg *) 7941d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7942d21ab8bcSmrg ;; 7943d21ab8bcSmrg esac 7944d21ab8bcSmrg ;; 79459c9ff80cSmrg 7946d21ab8bcSmrg interix[[3-9]]*) 7947d21ab8bcSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7948d21ab8bcSmrg # Instead, we relocate shared libraries at runtime. 7949d21ab8bcSmrg ;; 79509c9ff80cSmrg 7951d21ab8bcSmrg msdosdjgpp*) 7952d21ab8bcSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 7953d21ab8bcSmrg # on systems that don't support them. 7954d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7955d21ab8bcSmrg enable_shared=no 7956d21ab8bcSmrg ;; 79579c9ff80cSmrg 7958d21ab8bcSmrg *nto* | *qnx*) 7959d21ab8bcSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7960d21ab8bcSmrg # it will coredump. 7961d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7962d21ab8bcSmrg ;; 79639c9ff80cSmrg 7964d21ab8bcSmrg sysv4*MP*) 7965d21ab8bcSmrg if test -d /usr/nec; then 7966d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7967d21ab8bcSmrg fi 7968d21ab8bcSmrg ;; 79699c9ff80cSmrg 7970d21ab8bcSmrg *) 7971d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7972d21ab8bcSmrg ;; 7973d21ab8bcSmrg esac 79749c9ff80cSmrg 7975d21ab8bcSmrg case $cc_basename in 7976d21ab8bcSmrg nvcc*) # Cuda Compiler Driver 2.2 7977d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 7978d21ab8bcSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 7979d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 7980d21ab8bcSmrg fi 7981d21ab8bcSmrg ;; 7982d21ab8bcSmrg esac 7983d21ab8bcSmrg else 7984d21ab8bcSmrg # PORTME Check for flag to pass linker flags through the system compiler. 7985d21ab8bcSmrg case $host_os in 7986d21ab8bcSmrg aix*) 7987d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7988d21ab8bcSmrg if test ia64 = "$host_cpu"; then 7989d21ab8bcSmrg # AIX 5 now supports IA64 processor 7990d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7991d21ab8bcSmrg else 7992d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7993d21ab8bcSmrg fi 7994d21ab8bcSmrg ;; 79959c9ff80cSmrg 7996d21ab8bcSmrg darwin* | rhapsody*) 7997d21ab8bcSmrg # PIC is the default on this platform 7998d21ab8bcSmrg # Common symbols not allowed in MH_DYLIB files 7999d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8000d21ab8bcSmrg case $cc_basename in 8001d21ab8bcSmrg nagfor*) 8002d21ab8bcSmrg # NAG Fortran compiler 8003d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8004d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8005d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8006d21ab8bcSmrg ;; 8007d21ab8bcSmrg esac 8008d21ab8bcSmrg ;; 80099c9ff80cSmrg 8010d21ab8bcSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8011d21ab8bcSmrg # This hack is so that the source file can tell whether it is being 8012d21ab8bcSmrg # built for inclusion in a dll (and should export symbols for example). 8013d21ab8bcSmrg m4_if([$1], [GCJ], [], 8014d21ab8bcSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8015d21ab8bcSmrg case $host_os in 8016d21ab8bcSmrg os2*) 8017d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8018d21ab8bcSmrg ;; 8019d21ab8bcSmrg esac 8020d21ab8bcSmrg ;; 80219c9ff80cSmrg 8022d21ab8bcSmrg hpux9* | hpux10* | hpux11*) 8023d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8024d21ab8bcSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8025d21ab8bcSmrg # not for PA HP-UX. 8026d21ab8bcSmrg case $host_cpu in 8027d21ab8bcSmrg hppa*64*|ia64*) 8028d21ab8bcSmrg # +Z the default 8029d21ab8bcSmrg ;; 8030d21ab8bcSmrg *) 8031d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8032d21ab8bcSmrg ;; 8033d21ab8bcSmrg esac 8034d21ab8bcSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8035d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8036d21ab8bcSmrg ;; 80379c9ff80cSmrg 8038d21ab8bcSmrg irix5* | irix6* | nonstopux*) 8039d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8040d21ab8bcSmrg # PIC (with -KPIC) is the default. 8041d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8042d21ab8bcSmrg ;; 80436fae4e5dSmrg 8044d21ab8bcSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8045d21ab8bcSmrg case $cc_basename in 8046d21ab8bcSmrg # old Intel for x86_64, which still supported -KPIC. 8047d21ab8bcSmrg ecc*) 8048d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8049d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8050d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 80511f0ac6a5Smrg ;; 8052d21ab8bcSmrg # icc used to be incompatible with GCC. 8053d21ab8bcSmrg # ICC 10 doesn't accept -KPIC any more. 8054d21ab8bcSmrg icc* | ifort*) 8055d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8056d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8057d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 80586fae4e5dSmrg ;; 8059d21ab8bcSmrg # Lahey Fortran 8.1. 8060d21ab8bcSmrg lf95*) 8061d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8062d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8063d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8064d21ab8bcSmrg ;; 8065d21ab8bcSmrg nagfor*) 8066d21ab8bcSmrg # NAG Fortran compiler 8067d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8068d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8069d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8070d21ab8bcSmrg ;; 8071d21ab8bcSmrg tcc*) 8072d21ab8bcSmrg # Fabrice Bellard et al's Tiny C Compiler 8073d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8074d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8075d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8076d21ab8bcSmrg ;; 8077d21ab8bcSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8078d21ab8bcSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 8079d21ab8bcSmrg # which looks to be a dead project) 8080d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8081d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8082d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 80836fae4e5dSmrg ;; 8084d21ab8bcSmrg ccc*) 8085d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8086d21ab8bcSmrg # All Alpha code is PIC. 8087d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 80886fae4e5dSmrg ;; 8089d21ab8bcSmrg xl* | bgxl* | bgf* | mpixl*) 8090d21ab8bcSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8091d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8092d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8093d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8094d21ab8bcSmrg ;; 8095d21ab8bcSmrg *) 8096d21ab8bcSmrg case `$CC -V 2>&1 | $SED 5q` in 8097d21ab8bcSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8098d21ab8bcSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8099d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8100d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8101d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8102d21ab8bcSmrg ;; 8103d21ab8bcSmrg *Sun\ F* | *Sun*Fortran*) 8104d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8105d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8106d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8107d21ab8bcSmrg ;; 8108d21ab8bcSmrg *Sun\ C*) 8109d21ab8bcSmrg # Sun C 5.9 8110d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8111d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8112d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8113d21ab8bcSmrg ;; 8114d21ab8bcSmrg *Intel*\ [[CF]]*Compiler*) 8115d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8116d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8117d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8118d21ab8bcSmrg ;; 8119d21ab8bcSmrg *Portland\ Group*) 8120d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8121d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8122d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8123d21ab8bcSmrg ;; 8124d21ab8bcSmrg esac 8125d21ab8bcSmrg ;; 8126d21ab8bcSmrg esac 8127d21ab8bcSmrg ;; 8128d21ab8bcSmrg 8129d21ab8bcSmrg newsos6) 8130d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8131d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8132d21ab8bcSmrg ;; 8133d21ab8bcSmrg 8134d21ab8bcSmrg *nto* | *qnx*) 8135d21ab8bcSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8136d21ab8bcSmrg # it will coredump. 8137d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8138d21ab8bcSmrg ;; 8139d21ab8bcSmrg 8140d21ab8bcSmrg osf3* | osf4* | osf5*) 8141d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8142d21ab8bcSmrg # All OSF/1 code is PIC. 8143d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8144d21ab8bcSmrg ;; 8145d21ab8bcSmrg 8146d21ab8bcSmrg rdos*) 8147d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8148d21ab8bcSmrg ;; 8149d21ab8bcSmrg 8150d21ab8bcSmrg solaris*) 8151d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8152d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8153d21ab8bcSmrg case $cc_basename in 8154d21ab8bcSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8155d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8156d21ab8bcSmrg *) 8157d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8158d21ab8bcSmrg esac 8159d21ab8bcSmrg ;; 8160d21ab8bcSmrg 8161d21ab8bcSmrg sunos4*) 8162d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8163d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8164d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8165d21ab8bcSmrg ;; 8166d21ab8bcSmrg 8167d21ab8bcSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 8168d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8169d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8170d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8171d21ab8bcSmrg ;; 8172d21ab8bcSmrg 8173d21ab8bcSmrg sysv4*MP*) 8174d21ab8bcSmrg if test -d /usr/nec; then 8175d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8176d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8177d21ab8bcSmrg fi 8178d21ab8bcSmrg ;; 8179d21ab8bcSmrg 8180d21ab8bcSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8181d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8182d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8183d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8184d21ab8bcSmrg ;; 8185d21ab8bcSmrg 8186d21ab8bcSmrg unicos*) 8187d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8188d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8189d21ab8bcSmrg ;; 8190d21ab8bcSmrg 8191d21ab8bcSmrg uts4*) 8192d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8193d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8194d21ab8bcSmrg ;; 8195d21ab8bcSmrg 8196d21ab8bcSmrg *) 8197d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8198d21ab8bcSmrg ;; 81996fae4e5dSmrg esac 8200d21ab8bcSmrg fi 8201d21ab8bcSmrg]) 8202d21ab8bcSmrgcase $host_os in 8203d21ab8bcSmrg # For platforms that do not support PIC, -DPIC is meaningless: 8204d21ab8bcSmrg *djgpp*) 8205d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 82066fae4e5dSmrg ;; 8207d21ab8bcSmrg *) 8208d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 82096fae4e5dSmrg ;; 82106fae4e5dSmrgesac 82116fae4e5dSmrg 8212d21ab8bcSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8213d21ab8bcSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8214d21ab8bcSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8215d21ab8bcSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 82169c9ff80cSmrg 82176fae4e5dSmrg# 8218d21ab8bcSmrg# Check to make sure the PIC flag actually works. 82196fae4e5dSmrg# 8220d21ab8bcSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8221d21ab8bcSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8222d21ab8bcSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8223d21ab8bcSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8224d21ab8bcSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8225d21ab8bcSmrg "" | " "*) ;; 8226d21ab8bcSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8227d21ab8bcSmrg esac], 8228d21ab8bcSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8229d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8230d21ab8bcSmrgfi 8231d21ab8bcSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8232d21ab8bcSmrg [Additional compiler flags for building library objects]) 82339c9ff80cSmrg 8234d21ab8bcSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8235d21ab8bcSmrg [How to pass a linker flag through the compiler]) 8236d21ab8bcSmrg# 8237d21ab8bcSmrg# Check to make sure the static flag actually works. 8238d21ab8bcSmrg# 8239d21ab8bcSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8240d21ab8bcSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8241d21ab8bcSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8242d21ab8bcSmrg $lt_tmp_static_flag, 8243d21ab8bcSmrg [], 8244d21ab8bcSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8245d21ab8bcSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8246d21ab8bcSmrg [Compiler flag to prevent dynamic linking]) 8247d21ab8bcSmrg])# _LT_COMPILER_PIC 82489c9ff80cSmrg 82499c9ff80cSmrg 8250d21ab8bcSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 8251d21ab8bcSmrg# ---------------------------- 8252d21ab8bcSmrg# See if the linker supports building shared libraries. 8253d21ab8bcSmrgm4_defun([_LT_LINKER_SHLIBS], 8254d21ab8bcSmrg[AC_REQUIRE([LT_PATH_LD])dnl 8255d21ab8bcSmrgAC_REQUIRE([LT_PATH_NM])dnl 8256d21ab8bcSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8257d21ab8bcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8258d21ab8bcSmrgm4_require([_LT_DECL_EGREP])dnl 8259d21ab8bcSmrgm4_require([_LT_DECL_SED])dnl 8260d21ab8bcSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8261d21ab8bcSmrgm4_require([_LT_TAG_COMPILER])dnl 8262d21ab8bcSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8263d21ab8bcSmrgm4_if([$1], [CXX], [ 8264d21ab8bcSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8265d21ab8bcSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8266d21ab8bcSmrg case $host_os in 8267d21ab8bcSmrg aix[[4-9]]*) 8268d21ab8bcSmrg # If we're using GNU nm, then we don't want the "-C" option. 8269d21ab8bcSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8270d21ab8bcSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8271d21ab8bcSmrg # weak defined symbols like other global defined symbols, whereas 8272d21ab8bcSmrg # GNU nm marks them as "W". 8273d21ab8bcSmrg # While the 'weak' keyword is ignored in the Export File, we need 8274d21ab8bcSmrg # it in the Import File for the 'aix-soname' feature, so we have 8275d21ab8bcSmrg # to replace the "-B" option with "-P" for AIX nm. 8276d21ab8bcSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8277d21ab8bcSmrg _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' 8278d21ab8bcSmrg else 8279d21ab8bcSmrg _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' 8280d21ab8bcSmrg fi 8281d21ab8bcSmrg ;; 8282d21ab8bcSmrg pw32*) 8283d21ab8bcSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8284d21ab8bcSmrg ;; 8285d21ab8bcSmrg cygwin* | mingw* | cegcc*) 8286d21ab8bcSmrg case $cc_basename in 8287d21ab8bcSmrg cl* | icl*) 8288d21ab8bcSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8289d21ab8bcSmrg ;; 8290d21ab8bcSmrg *) 8291d21ab8bcSmrg _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' 8292d21ab8bcSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8293d21ab8bcSmrg ;; 8294d21ab8bcSmrg esac 8295d21ab8bcSmrg ;; 8296d21ab8bcSmrg *) 8297d21ab8bcSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8298d21ab8bcSmrg ;; 8299d21ab8bcSmrg esac 8300d21ab8bcSmrg], [ 8301d21ab8bcSmrg runpath_var= 8302d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 8303d21ab8bcSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8304d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)= 8305d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8306d21ab8bcSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 8307d21ab8bcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8308d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8309d21ab8bcSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8310d21ab8bcSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 8311d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8312d21ab8bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8313d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8314d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8315d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8316d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8317d21ab8bcSmrg _LT_TAGVAR(inherit_rpath, $1)=no 8318d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8319d21ab8bcSmrg _LT_TAGVAR(module_cmds, $1)= 8320d21ab8bcSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 8321d21ab8bcSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8322d21ab8bcSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8323d21ab8bcSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8324d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8325d21ab8bcSmrg # include_expsyms should be a list of space-separated symbols to be *always* 8326d21ab8bcSmrg # included in the symbol list 8327d21ab8bcSmrg _LT_TAGVAR(include_expsyms, $1)= 8328d21ab8bcSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 8329d21ab8bcSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8330d21ab8bcSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8331d21ab8bcSmrg # as well as any symbol that contains 'd'. 8332d21ab8bcSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8333d21ab8bcSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8334d21ab8bcSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 8335d21ab8bcSmrg # the symbol is explicitly referenced. Since portable code cannot 8336d21ab8bcSmrg # rely on this symbol name, it's probably fine to never include it in 8337d21ab8bcSmrg # preloaded symbol tables. 8338d21ab8bcSmrg # Exclude shared library initialization/finalization symbols. 8339d21ab8bcSmrgdnl Note also adjust exclude_expsyms for C++ above. 8340d21ab8bcSmrg extract_expsyms_cmds= 83419c9ff80cSmrg 8342d21ab8bcSmrg case $host_os in 8343d21ab8bcSmrg cygwin* | mingw* | pw32* | cegcc*) 8344d21ab8bcSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8345d21ab8bcSmrg # When not using gcc, we currently assume that we are using 8346d21ab8bcSmrg # Microsoft Visual C++ or Intel C++ Compiler. 8347d21ab8bcSmrg if test yes != "$GCC"; then 8348d21ab8bcSmrg with_gnu_ld=no 8349d21ab8bcSmrg fi 8350d21ab8bcSmrg ;; 8351d21ab8bcSmrg interix*) 8352d21ab8bcSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8353d21ab8bcSmrg with_gnu_ld=yes 8354d21ab8bcSmrg ;; 8355d21ab8bcSmrg openbsd* | bitrig*) 8356d21ab8bcSmrg with_gnu_ld=no 8357d21ab8bcSmrg ;; 8358d21ab8bcSmrg esac 83599c9ff80cSmrg 8360d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 83619c9ff80cSmrg 8362d21ab8bcSmrg # On some targets, GNU ld is compatible enough with the native linker 8363d21ab8bcSmrg # that we're better off using the native interface for both. 8364d21ab8bcSmrg lt_use_gnu_ld_interface=no 8365d21ab8bcSmrg if test yes = "$with_gnu_ld"; then 8366d21ab8bcSmrg case $host_os in 8367d21ab8bcSmrg aix*) 8368d21ab8bcSmrg # The AIX port of GNU ld has always aspired to compatibility 8369d21ab8bcSmrg # with the native linker. However, as the warning in the GNU ld 8370d21ab8bcSmrg # block says, versions before 2.19.5* couldn't really create working 8371d21ab8bcSmrg # shared libraries, regardless of the interface used. 8372d21ab8bcSmrg case `$LD -v 2>&1` in 8373d21ab8bcSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8374d21ab8bcSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8375d21ab8bcSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8376d21ab8bcSmrg *) 8377d21ab8bcSmrg lt_use_gnu_ld_interface=yes 8378d21ab8bcSmrg ;; 8379d21ab8bcSmrg esac 8380d21ab8bcSmrg ;; 8381d21ab8bcSmrg *) 8382d21ab8bcSmrg lt_use_gnu_ld_interface=yes 8383d21ab8bcSmrg ;; 8384d21ab8bcSmrg esac 8385d21ab8bcSmrg fi 83869c9ff80cSmrg 8387d21ab8bcSmrg if test yes = "$lt_use_gnu_ld_interface"; then 8388d21ab8bcSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 8389d21ab8bcSmrg wlarc='$wl' 83909c9ff80cSmrg 8391d21ab8bcSmrg # Set some defaults for GNU ld with shared library support. These 8392d21ab8bcSmrg # are reset later if shared libraries are not supported. Putting them 8393d21ab8bcSmrg # here allows them to be overridden if necessary. 8394d21ab8bcSmrg runpath_var=LD_RUN_PATH 8395d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8396d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8397d21ab8bcSmrg # ancient GNU ld didn't support --whole-archive et. al. 8398d21ab8bcSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8399d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8400d21ab8bcSmrg else 8401d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8402d21ab8bcSmrg fi 8403d21ab8bcSmrg supports_anon_versioning=no 8404d21ab8bcSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8405d21ab8bcSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 8406d21ab8bcSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8407d21ab8bcSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8408d21ab8bcSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8409d21ab8bcSmrg *\ 2.11.*) ;; # other 2.11 versions 8410d21ab8bcSmrg *) supports_anon_versioning=yes ;; 8411d21ab8bcSmrg esac 84129c9ff80cSmrg 8413d21ab8bcSmrg # See if GNU ld supports shared libraries. 8414d21ab8bcSmrg case $host_os in 8415d21ab8bcSmrg aix[[3-9]]*) 8416d21ab8bcSmrg # On AIX/PPC, the GNU linker is very broken 8417d21ab8bcSmrg if test ia64 != "$host_cpu"; then 8418d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8419d21ab8bcSmrg cat <<_LT_EOF 1>&2 84209c9ff80cSmrg 8421d21ab8bcSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 8422d21ab8bcSmrg*** to be unable to reliably create shared libraries on AIX. 8423d21ab8bcSmrg*** Therefore, libtool is disabling shared libraries support. If you 8424d21ab8bcSmrg*** really care for shared libraries, you may want to install binutils 8425d21ab8bcSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8426d21ab8bcSmrg*** You will then need to restart the configuration process. 84279c9ff80cSmrg 8428d21ab8bcSmrg_LT_EOF 8429d21ab8bcSmrg fi 8430d21ab8bcSmrg ;; 84319c9ff80cSmrg 8432d21ab8bcSmrg amigaos*) 8433d21ab8bcSmrg case $host_cpu in 8434d21ab8bcSmrg powerpc) 8435d21ab8bcSmrg # see comment about AmigaOS4 .so support 8436d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8437d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8438d21ab8bcSmrg ;; 8439d21ab8bcSmrg m68k) 8440d21ab8bcSmrg _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)' 8441d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8442d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8443d21ab8bcSmrg ;; 8444d21ab8bcSmrg esac 8445d21ab8bcSmrg ;; 84469c9ff80cSmrg 8447d21ab8bcSmrg beos*) 8448d21ab8bcSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8449d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8450d21ab8bcSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8451d21ab8bcSmrg # support --undefined. This deserves some investigation. FIXME 8452d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8453d21ab8bcSmrg else 8454d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8455d21ab8bcSmrg fi 8456d21ab8bcSmrg ;; 84579c9ff80cSmrg 8458d21ab8bcSmrg cygwin* | mingw* | pw32* | cegcc*) 8459d21ab8bcSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8460d21ab8bcSmrg # as there is no search path for DLLs. 8461d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8462d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8463d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8464d21ab8bcSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8465d21ab8bcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8466d21ab8bcSmrg _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' 8467d21ab8bcSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 84689c9ff80cSmrg 8469d21ab8bcSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8470d21ab8bcSmrg _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' 8471d21ab8bcSmrg # If the export-symbols file already is a .def file, use it as 8472d21ab8bcSmrg # is; otherwise, prepend EXPORTS... 8473d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8474d21ab8bcSmrg cp $export_symbols $output_objdir/$soname.def; 8475d21ab8bcSmrg else 8476d21ab8bcSmrg echo EXPORTS > $output_objdir/$soname.def; 8477d21ab8bcSmrg cat $export_symbols >> $output_objdir/$soname.def; 8478d21ab8bcSmrg fi~ 8479d21ab8bcSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8480d21ab8bcSmrg else 8481d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8482d21ab8bcSmrg fi 8483d21ab8bcSmrg ;; 84849c9ff80cSmrg 8485d21ab8bcSmrg haiku*) 8486d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8487d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8488d21ab8bcSmrg ;; 84896fae4e5dSmrg 8490d21ab8bcSmrg os2*) 8491d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8492d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8493d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8494d21ab8bcSmrg shrext_cmds=.dll 8495d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8496d21ab8bcSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8497d21ab8bcSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8498d21ab8bcSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8499d21ab8bcSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8500d21ab8bcSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8501d21ab8bcSmrg emximp -o $lib $output_objdir/$libname.def' 8502d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8503d21ab8bcSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8504d21ab8bcSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8505d21ab8bcSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8506d21ab8bcSmrg prefix_cmds="$SED"~ 8507d21ab8bcSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 8508d21ab8bcSmrg prefix_cmds="$prefix_cmds -e 1d"; 8509d21ab8bcSmrg fi~ 8510d21ab8bcSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8511d21ab8bcSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8512d21ab8bcSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8513d21ab8bcSmrg emximp -o $lib $output_objdir/$libname.def' 8514d21ab8bcSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8515d21ab8bcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8516d21ab8bcSmrg _LT_TAGVAR(file_list_spec, $1)='@' 8517d21ab8bcSmrg ;; 85186fae4e5dSmrg 8519d21ab8bcSmrg interix[[3-9]]*) 8520d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8521d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8522d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8523d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8524d21ab8bcSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8525d21ab8bcSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8526d21ab8bcSmrg # default) and relocated if they conflict, which is a slow very memory 8527d21ab8bcSmrg # consuming and fragmenting process. To avoid this, we pick a random, 8528d21ab8bcSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8529d21ab8bcSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8530d21ab8bcSmrg _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' 8531d21ab8bcSmrg _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' 8532d21ab8bcSmrg ;; 85339c9ff80cSmrg 8534d21ab8bcSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8535d21ab8bcSmrg tmp_diet=no 8536d21ab8bcSmrg if test linux-dietlibc = "$host_os"; then 8537d21ab8bcSmrg case $cc_basename in 8538d21ab8bcSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8539d21ab8bcSmrg esac 8540d21ab8bcSmrg fi 8541d21ab8bcSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8542d21ab8bcSmrg && test no = "$tmp_diet" 8543d21ab8bcSmrg then 8544d21ab8bcSmrg tmp_addflag=' $pic_flag' 8545d21ab8bcSmrg tmp_sharedflag='-shared' 8546d21ab8bcSmrg case $cc_basename,$host_cpu in 8547d21ab8bcSmrg pgcc*) # Portland Group C compiler 8548d21ab8bcSmrg _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' 8549d21ab8bcSmrg tmp_addflag=' $pic_flag' 8550d21ab8bcSmrg ;; 8551d21ab8bcSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 8552d21ab8bcSmrg # Portland Group f77 and f90 compilers 8553d21ab8bcSmrg _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' 8554d21ab8bcSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 8555d21ab8bcSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8556d21ab8bcSmrg tmp_addflag=' -i_dynamic' ;; 8557d21ab8bcSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8558d21ab8bcSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 8559d21ab8bcSmrg ifc* | ifort*) # Intel Fortran compiler 8560d21ab8bcSmrg tmp_addflag=' -nofor_main' ;; 8561d21ab8bcSmrg lf95*) # Lahey Fortran 8.1 8562d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8563d21ab8bcSmrg tmp_sharedflag='--shared' ;; 8564d21ab8bcSmrg nagfor*) # NAGFOR 5.3 8565d21ab8bcSmrg tmp_sharedflag='-Wl,-shared' ;; 8566d21ab8bcSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8567d21ab8bcSmrg tmp_sharedflag='-qmkshrobj' 8568d21ab8bcSmrg tmp_addflag= ;; 8569d21ab8bcSmrg nvcc*) # Cuda Compiler Driver 2.2 8570d21ab8bcSmrg _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' 8571d21ab8bcSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8572d21ab8bcSmrg ;; 8573d21ab8bcSmrg esac 8574d21ab8bcSmrg case `$CC -V 2>&1 | $SED 5q` in 8575d21ab8bcSmrg *Sun\ C*) # Sun C 5.9 8576d21ab8bcSmrg _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' 8577d21ab8bcSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8578d21ab8bcSmrg tmp_sharedflag='-G' ;; 8579d21ab8bcSmrg *Sun\ F*) # Sun Fortran 8.3 8580d21ab8bcSmrg tmp_sharedflag='-G' ;; 8581d21ab8bcSmrg esac 8582d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 85839c9ff80cSmrg 8584d21ab8bcSmrg if test yes = "$supports_anon_versioning"; then 8585d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8586d21ab8bcSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8587d21ab8bcSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8588d21ab8bcSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8589d21ab8bcSmrg fi 85909c9ff80cSmrg 8591d21ab8bcSmrg case $cc_basename in 8592d21ab8bcSmrg tcc*) 8593d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8594d21ab8bcSmrg ;; 8595d21ab8bcSmrg xlf* | bgf* | bgxlf* | mpixlf*) 8596d21ab8bcSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8597d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8598d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8599d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8600d21ab8bcSmrg if test yes = "$supports_anon_versioning"; then 8601d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8602d21ab8bcSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8603d21ab8bcSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8604d21ab8bcSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8605d21ab8bcSmrg fi 8606d21ab8bcSmrg ;; 8607d21ab8bcSmrg esac 8608d21ab8bcSmrg else 8609d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8610d21ab8bcSmrg fi 8611d21ab8bcSmrg ;; 86129c9ff80cSmrg 8613d21ab8bcSmrg netbsd*) 8614d21ab8bcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8615d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8616d21ab8bcSmrg wlarc= 8617d21ab8bcSmrg else 8618d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8619d21ab8bcSmrg _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' 8620d21ab8bcSmrg fi 8621d21ab8bcSmrg ;; 86229c9ff80cSmrg 8623d21ab8bcSmrg solaris*) 8624d21ab8bcSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8625d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8626d21ab8bcSmrg cat <<_LT_EOF 1>&2 86279c9ff80cSmrg 8628d21ab8bcSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8629d21ab8bcSmrg*** create shared libraries on Solaris systems. Therefore, libtool 8630d21ab8bcSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 8631d21ab8bcSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 8632d21ab8bcSmrg*** your PATH or compiler configuration so that the native linker is 8633d21ab8bcSmrg*** used, and then restart. 86349c9ff80cSmrg 8635d21ab8bcSmrg_LT_EOF 8636d21ab8bcSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8637d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8638d21ab8bcSmrg _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' 8639d21ab8bcSmrg else 8640d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8641d21ab8bcSmrg fi 8642d21ab8bcSmrg ;; 86439c9ff80cSmrg 8644d21ab8bcSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8645d21ab8bcSmrg case `$LD -v 2>&1` in 8646d21ab8bcSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8647d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8648d21ab8bcSmrg cat <<_LT_EOF 1>&2 8649d21ab8bcSmrg 8650d21ab8bcSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8651d21ab8bcSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 8652d21ab8bcSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 8653d21ab8bcSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8654d21ab8bcSmrg*** your PATH or compiler configuration so that the native linker is 8655d21ab8bcSmrg*** used, and then restart. 8656d21ab8bcSmrg 8657d21ab8bcSmrg_LT_EOF 8658d21ab8bcSmrg ;; 8659d21ab8bcSmrg *) 8660d21ab8bcSmrg # For security reasons, it is highly recommended that you always 8661d21ab8bcSmrg # use absolute paths for naming shared libraries, and exclude the 8662d21ab8bcSmrg # DT_RUNPATH tag from executables and libraries. But doing so 8663d21ab8bcSmrg # requires that you compile everything twice, which is a pain. 8664d21ab8bcSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8665d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8666d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8667d21ab8bcSmrg _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' 8668d21ab8bcSmrg else 8669d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8670d21ab8bcSmrg fi 8671d21ab8bcSmrg ;; 8672d21ab8bcSmrg esac 8673d21ab8bcSmrg ;; 86749c9ff80cSmrg 8675d21ab8bcSmrg sunos4*) 8676d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8677d21ab8bcSmrg wlarc= 8678d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8679d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8680d21ab8bcSmrg ;; 86819c9ff80cSmrg 86826fae4e5dSmrg *) 8683d21ab8bcSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8684d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8685d21ab8bcSmrg _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' 8686d21ab8bcSmrg else 8687d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8688d21ab8bcSmrg fi 86896fae4e5dSmrg ;; 8690d21ab8bcSmrg esac 86919c9ff80cSmrg 8692d21ab8bcSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8693d21ab8bcSmrg runpath_var= 8694d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8695d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8696d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8697d21ab8bcSmrg fi 8698d21ab8bcSmrg else 8699d21ab8bcSmrg # PORTME fill in a description of your system's linker (not GNU ld) 8700d21ab8bcSmrg case $host_os in 8701d21ab8bcSmrg aix3*) 8702d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8703d21ab8bcSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8704d21ab8bcSmrg _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' 8705d21ab8bcSmrg # Note: this linker hardcodes the directories in LIBPATH if there 8706d21ab8bcSmrg # are no directories specified by -L. 8707d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8708d21ab8bcSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8709d21ab8bcSmrg # Neither direct hardcoding nor static linking is supported with a 8710d21ab8bcSmrg # broken collect2. 8711d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8712d21ab8bcSmrg fi 8713d21ab8bcSmrg ;; 87149c9ff80cSmrg 8715d21ab8bcSmrg aix[[4-9]]*) 8716d21ab8bcSmrg if test ia64 = "$host_cpu"; then 8717d21ab8bcSmrg # On IA64, the linker does run time linking by default, so we don't 8718d21ab8bcSmrg # have to do anything special. 8719d21ab8bcSmrg aix_use_runtimelinking=no 8720d21ab8bcSmrg exp_sym_flag='-Bexport' 8721d21ab8bcSmrg no_entry_flag= 8722d21ab8bcSmrg else 8723d21ab8bcSmrg # If we're using GNU nm, then we don't want the "-C" option. 8724d21ab8bcSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8725d21ab8bcSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8726d21ab8bcSmrg # weak defined symbols like other global defined symbols, whereas 8727d21ab8bcSmrg # GNU nm marks them as "W". 8728d21ab8bcSmrg # While the 'weak' keyword is ignored in the Export File, we need 8729d21ab8bcSmrg # it in the Import File for the 'aix-soname' feature, so we have 8730d21ab8bcSmrg # to replace the "-B" option with "-P" for AIX nm. 8731d21ab8bcSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8732d21ab8bcSmrg _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' 8733d21ab8bcSmrg else 8734d21ab8bcSmrg _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' 8735d21ab8bcSmrg fi 8736d21ab8bcSmrg aix_use_runtimelinking=no 87379c9ff80cSmrg 8738d21ab8bcSmrg # Test if we are trying to use run time linking or normal 8739d21ab8bcSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8740d21ab8bcSmrg # have runtime linking enabled, and use it for executables. 8741d21ab8bcSmrg # For shared libraries, we enable/disable runtime linking 8742d21ab8bcSmrg # depending on the kind of the shared library created - 8743d21ab8bcSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 8744d21ab8bcSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8745d21ab8bcSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 8746d21ab8bcSmrg # lib.a static archive 8747d21ab8bcSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 8748d21ab8bcSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 8749d21ab8bcSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8750d21ab8bcSmrg # lib.a(lib.so.V) shared, rtl:no 8751d21ab8bcSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8752d21ab8bcSmrg # lib.a static archive 8753d21ab8bcSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8754d21ab8bcSmrg for ld_flag in $LDFLAGS; do 8755d21ab8bcSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8756d21ab8bcSmrg aix_use_runtimelinking=yes 8757d21ab8bcSmrg break 8758d21ab8bcSmrg fi 8759d21ab8bcSmrg done 8760d21ab8bcSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8761d21ab8bcSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 8762d21ab8bcSmrg # so we don't have lib.a shared libs to link our executables. 8763d21ab8bcSmrg # We have to force runtime linking in this case. 8764d21ab8bcSmrg aix_use_runtimelinking=yes 8765d21ab8bcSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 8766d21ab8bcSmrg fi 8767d21ab8bcSmrg ;; 8768d21ab8bcSmrg esac 87699c9ff80cSmrg 8770d21ab8bcSmrg exp_sym_flag='-bexport' 8771d21ab8bcSmrg no_entry_flag='-bnoentry' 8772d21ab8bcSmrg fi 87739c9ff80cSmrg 8774d21ab8bcSmrg # When large executables or shared objects are built, AIX ld can 8775d21ab8bcSmrg # have problems creating the table of contents. If linking a library 8776d21ab8bcSmrg # or program results in "error TOC overflow" add -mminimal-toc to 8777d21ab8bcSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8778d21ab8bcSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 87799c9ff80cSmrg 8780d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='' 8781d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8782d21ab8bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8783d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8784d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8785d21ab8bcSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8786d21ab8bcSmrg case $with_aix_soname,$aix_use_runtimelinking in 8787d21ab8bcSmrg aix,*) ;; # traditional, no import file 8788d21ab8bcSmrg svr4,* | *,yes) # use import file 8789d21ab8bcSmrg # The Import File defines what to hardcode. 8790d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8791d21ab8bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8792d21ab8bcSmrg ;; 8793d21ab8bcSmrg esac 87941f0ac6a5Smrg 8795d21ab8bcSmrg if test yes = "$GCC"; then 8796d21ab8bcSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8797d21ab8bcSmrg # We only want to do this on AIX 4.2 and lower, the check 8798d21ab8bcSmrg # below for broken collect2 doesn't work under 4.3+ 8799d21ab8bcSmrg collect2name=`$CC -print-prog-name=collect2` 8800d21ab8bcSmrg if test -f "$collect2name" && 8801d21ab8bcSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8802d21ab8bcSmrg then 8803d21ab8bcSmrg # We have reworked collect2 8804d21ab8bcSmrg : 8805d21ab8bcSmrg else 8806d21ab8bcSmrg # We have old collect2 8807d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8808d21ab8bcSmrg # It fails to find uninstalled libraries when the uninstalled 8809d21ab8bcSmrg # path is not listed in the libpath. Setting hardcode_minus_L 8810d21ab8bcSmrg # to unsupported forces relinking 8811d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8812d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8813d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8814d21ab8bcSmrg fi 8815d21ab8bcSmrg ;; 8816d21ab8bcSmrg esac 8817d21ab8bcSmrg shared_flag='-shared' 8818d21ab8bcSmrg if test yes = "$aix_use_runtimelinking"; then 8819d21ab8bcSmrg shared_flag="$shared_flag "'$wl-G' 8820d21ab8bcSmrg fi 8821d21ab8bcSmrg # Need to ensure runtime linking is disabled for the traditional 8822d21ab8bcSmrg # shared library, or the linker may eventually find shared libraries 8823d21ab8bcSmrg # /with/ Import File - we do not want to mix them. 8824d21ab8bcSmrg shared_flag_aix='-shared' 8825d21ab8bcSmrg shared_flag_svr4='-shared $wl-G' 8826d21ab8bcSmrg else 8827d21ab8bcSmrg # not using gcc 8828d21ab8bcSmrg if test ia64 = "$host_cpu"; then 8829d21ab8bcSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8830d21ab8bcSmrg # chokes on -Wl,-G. The following line is correct: 8831d21ab8bcSmrg shared_flag='-G' 8832d21ab8bcSmrg else 8833d21ab8bcSmrg if test yes = "$aix_use_runtimelinking"; then 8834d21ab8bcSmrg shared_flag='$wl-G' 8835d21ab8bcSmrg else 8836d21ab8bcSmrg shared_flag='$wl-bM:SRE' 8837d21ab8bcSmrg fi 8838d21ab8bcSmrg shared_flag_aix='$wl-bM:SRE' 8839d21ab8bcSmrg shared_flag_svr4='$wl-G' 8840d21ab8bcSmrg fi 8841d21ab8bcSmrg fi 88421f0ac6a5Smrg 8843d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8844d21ab8bcSmrg # It seems that -bexpall does not export symbols beginning with 8845d21ab8bcSmrg # underscore (_), so it is better to generate a list of symbols to export. 8846d21ab8bcSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8847d21ab8bcSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8848d21ab8bcSmrg # Warning - without using the other runtime loading flags (-brtl), 8849d21ab8bcSmrg # -berok will link without error, but may produce a broken library. 8850d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8851d21ab8bcSmrg # Determine the default libpath from the value encoded in an 8852d21ab8bcSmrg # empty executable. 8853d21ab8bcSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 8854d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8855d21ab8bcSmrg _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 8856d21ab8bcSmrg else 8857d21ab8bcSmrg if test ia64 = "$host_cpu"; then 8858d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8859d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8860d21ab8bcSmrg _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" 8861d21ab8bcSmrg else 8862d21ab8bcSmrg # Determine the default libpath from the value encoded in an 8863d21ab8bcSmrg # empty executable. 8864d21ab8bcSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 8865d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8866d21ab8bcSmrg # Warning - without using the other run time loading flags, 8867d21ab8bcSmrg # -berok will link without error, but may produce a broken library. 8868d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8869d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8870d21ab8bcSmrg if test yes = "$with_gnu_ld"; then 8871d21ab8bcSmrg # We only use this code for GNU lds that support --whole-archive. 8872d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8873d21ab8bcSmrg else 8874d21ab8bcSmrg # Exported symbols can be pulled into shared objects from archives 8875d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8876d21ab8bcSmrg fi 8877d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8878d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8879d21ab8bcSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 8880d21ab8bcSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8881d21ab8bcSmrg if test svr4 != "$with_aix_soname"; then 8882d21ab8bcSmrg # This is similar to how AIX traditionally builds its shared libraries. 8883d21ab8bcSmrg _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' 8884d21ab8bcSmrg fi 8885d21ab8bcSmrg if test aix != "$with_aix_soname"; then 8886d21ab8bcSmrg _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' 8887d21ab8bcSmrg else 8888d21ab8bcSmrg # used by -dlpreopen to get the symbols 8889d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8890d21ab8bcSmrg fi 8891d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 88926fae4e5dSmrg fi 8893d21ab8bcSmrg fi 88946fae4e5dSmrg ;; 88951f0ac6a5Smrg 8896d21ab8bcSmrg amigaos*) 8897d21ab8bcSmrg case $host_cpu in 8898d21ab8bcSmrg powerpc) 8899d21ab8bcSmrg # see comment about AmigaOS4 .so support 8900d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8901d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8902d21ab8bcSmrg ;; 8903d21ab8bcSmrg m68k) 8904d21ab8bcSmrg _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)' 8905d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8906d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8907d21ab8bcSmrg ;; 8908d21ab8bcSmrg esac 8909d21ab8bcSmrg ;; 89101f0ac6a5Smrg 8911d21ab8bcSmrg bsdi[[45]]*) 8912d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 8913d21ab8bcSmrg ;; 89141f0ac6a5Smrg 8915d21ab8bcSmrg cygwin* | mingw* | pw32* | cegcc*) 8916d21ab8bcSmrg # When not using gcc, we currently assume that we are using 8917d21ab8bcSmrg # Microsoft Visual C++ or Intel C++ Compiler. 8918d21ab8bcSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 8919d21ab8bcSmrg # no search path for DLLs. 8920d21ab8bcSmrg case $cc_basename in 8921d21ab8bcSmrg cl* | icl*) 8922d21ab8bcSmrg # Native MSVC or ICC 8923d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8924d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8925d21ab8bcSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8926d21ab8bcSmrg _LT_TAGVAR(file_list_spec, $1)='@' 8927d21ab8bcSmrg # Tell ltmain to make .lib files, not .a files. 8928d21ab8bcSmrg libext=lib 8929d21ab8bcSmrg # Tell ltmain to make .dll files, not .so files. 8930d21ab8bcSmrg shrext_cmds=.dll 8931d21ab8bcSmrg # FIXME: Setting linknames here is a bad hack. 8932d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 8933d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8934d21ab8bcSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 8935d21ab8bcSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 8936d21ab8bcSmrg else 8937d21ab8bcSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 8938d21ab8bcSmrg fi~ 8939d21ab8bcSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 8940d21ab8bcSmrg linknames=' 8941d21ab8bcSmrg # The linker will not automatically build a static lib if we build a DLL. 8942d21ab8bcSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8943d21ab8bcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8944d21ab8bcSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8945d21ab8bcSmrg _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' 8946d21ab8bcSmrg # Don't use ranlib 8947d21ab8bcSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 8948d21ab8bcSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 8949d21ab8bcSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 8950d21ab8bcSmrg case $lt_outputfile in 8951d21ab8bcSmrg *.exe|*.EXE) ;; 8952d21ab8bcSmrg *) 8953d21ab8bcSmrg lt_outputfile=$lt_outputfile.exe 8954d21ab8bcSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 8955d21ab8bcSmrg ;; 8956d21ab8bcSmrg esac~ 8957d21ab8bcSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 8958d21ab8bcSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 8959d21ab8bcSmrg $RM "$lt_outputfile.manifest"; 8960d21ab8bcSmrg fi' 8961d21ab8bcSmrg ;; 8962d21ab8bcSmrg *) 8963d21ab8bcSmrg # Assume MSVC and ICC wrapper 8964d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8965d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8966d21ab8bcSmrg # Tell ltmain to make .lib files, not .a files. 8967d21ab8bcSmrg libext=lib 8968d21ab8bcSmrg # Tell ltmain to make .dll files, not .so files. 8969d21ab8bcSmrg shrext_cmds=.dll 8970d21ab8bcSmrg # FIXME: Setting linknames here is a bad hack. 8971d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 8972d21ab8bcSmrg # The linker will automatically build a .lib file if we build a DLL. 8973d21ab8bcSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8974d21ab8bcSmrg # FIXME: Should let the user specify the lib program. 8975d21ab8bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 8976d21ab8bcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8977d21ab8bcSmrg ;; 8978d21ab8bcSmrg esac 8979d21ab8bcSmrg ;; 89801f0ac6a5Smrg 8981d21ab8bcSmrg darwin* | rhapsody*) 8982d21ab8bcSmrg _LT_DARWIN_LINKER_FEATURES($1) 8983d21ab8bcSmrg ;; 89841f0ac6a5Smrg 8985d21ab8bcSmrg dgux*) 8986d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8987d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8988d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8989d21ab8bcSmrg ;; 89901f0ac6a5Smrg 8991d21ab8bcSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 8992d21ab8bcSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 8993d21ab8bcSmrg # does not break anything, and helps significantly (at the cost of a little 8994d21ab8bcSmrg # extra space). 8995d21ab8bcSmrg freebsd2.2*) 8996d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 8997d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8998d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8999d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9000d21ab8bcSmrg ;; 90011f0ac6a5Smrg 9002d21ab8bcSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9003d21ab8bcSmrg freebsd2.*) 9004d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9005d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9006d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9007d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9008d21ab8bcSmrg ;; 90091f0ac6a5Smrg 9010d21ab8bcSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9011d21ab8bcSmrg freebsd* | dragonfly* | midnightbsd*) 9012d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9013d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9014d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9015d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90166fae4e5dSmrg ;; 90179c9ff80cSmrg 9018d21ab8bcSmrg hpux9*) 9019d21ab8bcSmrg if test yes = "$GCC"; then 9020d21ab8bcSmrg _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' 9021d21ab8bcSmrg else 9022d21ab8bcSmrg _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' 9023d21ab8bcSmrg fi 9024d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9025d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9026d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90279c9ff80cSmrg 9028d21ab8bcSmrg # hardcode_minus_L: Not really in the search PATH, 9029d21ab8bcSmrg # but as the default location of the library. 9030d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9031d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9032d21ab8bcSmrg ;; 90339c9ff80cSmrg 9034d21ab8bcSmrg hpux10*) 9035d21ab8bcSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 9036d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9037d21ab8bcSmrg else 9038d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9039d21ab8bcSmrg fi 9040d21ab8bcSmrg if test no = "$with_gnu_ld"; then 9041d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9042d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9043d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9044d21ab8bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9045d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9046d21ab8bcSmrg # hardcode_minus_L: Not really in the search PATH, 9047d21ab8bcSmrg # but as the default location of the library. 9048d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9049d21ab8bcSmrg fi 9050d21ab8bcSmrg ;; 90519c9ff80cSmrg 9052d21ab8bcSmrg hpux11*) 9053d21ab8bcSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 9054d21ab8bcSmrg case $host_cpu in 9055d21ab8bcSmrg hppa*64*) 9056d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9057d21ab8bcSmrg ;; 9058d21ab8bcSmrg ia64*) 9059d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9060d21ab8bcSmrg ;; 9061d21ab8bcSmrg *) 9062d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9063d21ab8bcSmrg ;; 9064d21ab8bcSmrg esac 9065d21ab8bcSmrg else 9066d21ab8bcSmrg case $host_cpu in 9067d21ab8bcSmrg hppa*64*) 9068d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9069d21ab8bcSmrg ;; 9070d21ab8bcSmrg ia64*) 9071d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9072d21ab8bcSmrg ;; 9073d21ab8bcSmrg *) 9074d21ab8bcSmrg m4_if($1, [], [ 9075d21ab8bcSmrg # Older versions of the 11.00 compiler do not understand -b yet 9076d21ab8bcSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9077d21ab8bcSmrg _LT_LINKER_OPTION([if $CC understands -b], 9078d21ab8bcSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9079d21ab8bcSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9080d21ab8bcSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9081d21ab8bcSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9082d21ab8bcSmrg ;; 9083d21ab8bcSmrg esac 9084d21ab8bcSmrg fi 9085d21ab8bcSmrg if test no = "$with_gnu_ld"; then 9086d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9087d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 90889c9ff80cSmrg 9089d21ab8bcSmrg case $host_cpu in 9090d21ab8bcSmrg hppa*64*|ia64*) 9091d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9092d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9093d21ab8bcSmrg ;; 9094d21ab8bcSmrg *) 9095d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9096d21ab8bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9097d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 90981f0ac6a5Smrg 9099d21ab8bcSmrg # hardcode_minus_L: Not really in the search PATH, 9100d21ab8bcSmrg # but as the default location of the library. 9101d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9102d21ab8bcSmrg ;; 9103d21ab8bcSmrg esac 9104d21ab8bcSmrg fi 9105d21ab8bcSmrg ;; 91069c9ff80cSmrg 9107d21ab8bcSmrg irix5* | irix6* | nonstopux*) 9108d21ab8bcSmrg if test yes = "$GCC"; then 9109d21ab8bcSmrg _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' 9110d21ab8bcSmrg # Try to use the -exported_symbol ld option, if it does not 9111d21ab8bcSmrg # work, assume that -exports_file does not work either and 9112d21ab8bcSmrg # implicitly export all symbols. 9113d21ab8bcSmrg # This should be the same for all languages, so no per-tag cache variable. 9114d21ab8bcSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9115d21ab8bcSmrg [lt_cv_irix_exported_symbol], 9116d21ab8bcSmrg [save_LDFLAGS=$LDFLAGS 9117d21ab8bcSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9118d21ab8bcSmrg AC_LINK_IFELSE( 9119d21ab8bcSmrg [AC_LANG_SOURCE( 9120d21ab8bcSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9121d21ab8bcSmrg [C++], [[int foo (void) { return 0; }]], 9122d21ab8bcSmrg [Fortran 77], [[ 9123d21ab8bcSmrg subroutine foo 9124d21ab8bcSmrg end]], 9125d21ab8bcSmrg [Fortran], [[ 9126d21ab8bcSmrg subroutine foo 9127d21ab8bcSmrg end]])])], 9128d21ab8bcSmrg [lt_cv_irix_exported_symbol=yes], 9129d21ab8bcSmrg [lt_cv_irix_exported_symbol=no]) 9130d21ab8bcSmrg LDFLAGS=$save_LDFLAGS]) 9131d21ab8bcSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 9132d21ab8bcSmrg _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' 913389c04b6cSmrg fi 9134d21ab8bcSmrg else 9135d21ab8bcSmrg _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' 9136d21ab8bcSmrg _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' 9137d21ab8bcSmrg fi 9138d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9139d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9140d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9141d21ab8bcSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 9142d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 914389c04b6cSmrg ;; 91441f0ac6a5Smrg 9145d21ab8bcSmrg linux*) 9146d21ab8bcSmrg case $cc_basename in 9147d21ab8bcSmrg tcc*) 9148d21ab8bcSmrg # Fabrice Bellard et al's Tiny C Compiler 9149d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9150d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9151d21ab8bcSmrg ;; 9152d21ab8bcSmrg esac 9153d21ab8bcSmrg ;; 91541f0ac6a5Smrg 9155d21ab8bcSmrg netbsd*) 9156d21ab8bcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9157d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9158d21ab8bcSmrg else 9159d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9160d21ab8bcSmrg fi 9161d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9162d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9163d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9164d21ab8bcSmrg ;; 91651f0ac6a5Smrg 9166d21ab8bcSmrg newsos6) 9167d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9168d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9169d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9170d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9171d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9172d21ab8bcSmrg ;; 91731f0ac6a5Smrg 9174d21ab8bcSmrg *nto* | *qnx*) 9175d21ab8bcSmrg ;; 91761f0ac6a5Smrg 9177d21ab8bcSmrg openbsd* | bitrig*) 9178d21ab8bcSmrg if test -f /usr/libexec/ld.so; then 9179d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9180d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9181d21ab8bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9182d21ab8bcSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9183d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9184d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9185d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9186d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9187d21ab8bcSmrg else 9188d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9189d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9190d21ab8bcSmrg fi 9191d21ab8bcSmrg else 9192d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9193d21ab8bcSmrg fi 9194d21ab8bcSmrg ;; 91951f0ac6a5Smrg 9196d21ab8bcSmrg os2*) 9197d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9198d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9199d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9200d21ab8bcSmrg shrext_cmds=.dll 9201d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9202d21ab8bcSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9203d21ab8bcSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9204d21ab8bcSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9205d21ab8bcSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9206d21ab8bcSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9207d21ab8bcSmrg emximp -o $lib $output_objdir/$libname.def' 9208d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9209d21ab8bcSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9210d21ab8bcSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9211d21ab8bcSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9212d21ab8bcSmrg prefix_cmds="$SED"~ 9213d21ab8bcSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9214d21ab8bcSmrg prefix_cmds="$prefix_cmds -e 1d"; 9215d21ab8bcSmrg fi~ 9216d21ab8bcSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9217d21ab8bcSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9218d21ab8bcSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9219d21ab8bcSmrg emximp -o $lib $output_objdir/$libname.def' 9220d21ab8bcSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9221d21ab8bcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9222d21ab8bcSmrg _LT_TAGVAR(file_list_spec, $1)='@' 9223d21ab8bcSmrg ;; 92241f0ac6a5Smrg 9225d21ab8bcSmrg osf3*) 9226d21ab8bcSmrg if test yes = "$GCC"; then 9227d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9228d21ab8bcSmrg _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' 9229d21ab8bcSmrg else 9230d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9231d21ab8bcSmrg _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' 9232d21ab8bcSmrg fi 9233d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9234d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9235d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9236d21ab8bcSmrg ;; 92371f0ac6a5Smrg 9238d21ab8bcSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9239d21ab8bcSmrg if test yes = "$GCC"; then 9240d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9241d21ab8bcSmrg _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' 9242d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9243d21ab8bcSmrg else 9244d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9245d21ab8bcSmrg _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' 9246d21ab8bcSmrg _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~ 9247d21ab8bcSmrg $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' 92481f0ac6a5Smrg 9249d21ab8bcSmrg # Both c and cxx compiler support -rpath directly 9250d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9251d21ab8bcSmrg fi 9252d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9253d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9254d21ab8bcSmrg ;; 92559c9ff80cSmrg 9256d21ab8bcSmrg solaris*) 9257d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9258d21ab8bcSmrg if test yes = "$GCC"; then 9259d21ab8bcSmrg wlarc='$wl' 9260d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9261d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9262d21ab8bcSmrg $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' 9263d21ab8bcSmrg else 9264d21ab8bcSmrg case `$CC -V 2>&1` in 9265d21ab8bcSmrg *"Compilers 5.0"*) 9266d21ab8bcSmrg wlarc='' 9267d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9268d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9269d21ab8bcSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9270d21ab8bcSmrg ;; 9271d21ab8bcSmrg *) 9272d21ab8bcSmrg wlarc='$wl' 9273d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9274d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9275d21ab8bcSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9276d21ab8bcSmrg ;; 9277d21ab8bcSmrg esac 9278d21ab8bcSmrg fi 9279d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9280d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9281d21ab8bcSmrg case $host_os in 9282d21ab8bcSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9283d21ab8bcSmrg *) 9284d21ab8bcSmrg # The compiler driver will combine and reorder linker options, 9285d21ab8bcSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9286d21ab8bcSmrg # but is careful enough not to reorder. 9287d21ab8bcSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9288d21ab8bcSmrg if test yes = "$GCC"; then 9289d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9290d21ab8bcSmrg else 9291d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9292d21ab8bcSmrg fi 9293d21ab8bcSmrg ;; 9294d21ab8bcSmrg esac 9295d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9296d21ab8bcSmrg ;; 92979c9ff80cSmrg 9298d21ab8bcSmrg sunos4*) 9299d21ab8bcSmrg if test sequent = "$host_vendor"; then 9300d21ab8bcSmrg # Use $CC to link under sequent, because it throws in some extra .o 9301d21ab8bcSmrg # files that make .init and .fini sections work. 9302d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9303d21ab8bcSmrg else 9304d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9305d21ab8bcSmrg fi 9306d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9307d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9308d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9309d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9310d21ab8bcSmrg ;; 93119c9ff80cSmrg 9312d21ab8bcSmrg sysv4) 9313d21ab8bcSmrg case $host_vendor in 9314d21ab8bcSmrg sni) 9315d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9316d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9317d21ab8bcSmrg ;; 9318d21ab8bcSmrg siemens) 9319d21ab8bcSmrg ## LD is ld it makes a PLAMLIB 9320d21ab8bcSmrg ## CC just makes a GrossModule. 9321d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9322d21ab8bcSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9323d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9324d21ab8bcSmrg ;; 9325d21ab8bcSmrg motorola) 9326d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9327d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9328d21ab8bcSmrg ;; 9329d21ab8bcSmrg esac 9330d21ab8bcSmrg runpath_var='LD_RUN_PATH' 9331d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9332d21ab8bcSmrg ;; 93336fae4e5dSmrg 9334d21ab8bcSmrg sysv4.3*) 9335d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9336d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9337d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9338d21ab8bcSmrg ;; 93399c9ff80cSmrg 9340d21ab8bcSmrg sysv4*MP*) 9341d21ab8bcSmrg if test -d /usr/nec; then 9342d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9343d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9344d21ab8bcSmrg runpath_var=LD_RUN_PATH 9345d21ab8bcSmrg hardcode_runpath_var=yes 9346d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9347d21ab8bcSmrg fi 9348d21ab8bcSmrg ;; 93499c9ff80cSmrg 9350d21ab8bcSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9351d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9352d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9353d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9354d21ab8bcSmrg runpath_var='LD_RUN_PATH' 93559c9ff80cSmrg 9356d21ab8bcSmrg if test yes = "$GCC"; then 9357d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9358d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9359d21ab8bcSmrg else 9360d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9361d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9362d21ab8bcSmrg fi 9363d21ab8bcSmrg ;; 93649c9ff80cSmrg 9365d21ab8bcSmrg sysv5* | sco3.2v5* | sco5v6*) 9366d21ab8bcSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 9367d21ab8bcSmrg # link with -lc, and that would cause any symbols used from libc to 9368d21ab8bcSmrg # always be unresolved, which means just about no library would 9369d21ab8bcSmrg # ever link correctly. If we're not using GNU ld we use -z text 9370d21ab8bcSmrg # though, which does catch some bad symbols but isn't as heavy-handed 9371d21ab8bcSmrg # as -z defs. 9372d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9373d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9374d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9375d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9376d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9377d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9378d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9379d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9380d21ab8bcSmrg runpath_var='LD_RUN_PATH' 93819c9ff80cSmrg 9382d21ab8bcSmrg if test yes = "$GCC"; then 9383d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9384d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9385d21ab8bcSmrg else 9386d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9387d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9388d21ab8bcSmrg fi 9389d21ab8bcSmrg ;; 93901f0ac6a5Smrg 9391d21ab8bcSmrg uts4*) 9392d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9393d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9394d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9395d21ab8bcSmrg ;; 93961f0ac6a5Smrg 9397d21ab8bcSmrg *) 9398d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9399d21ab8bcSmrg ;; 9400d21ab8bcSmrg esac 94011f0ac6a5Smrg 9402d21ab8bcSmrg if test sni = "$host_vendor"; then 9403d21ab8bcSmrg case $host in 9404d21ab8bcSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9405d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9406d21ab8bcSmrg ;; 9407d21ab8bcSmrg esac 9408d21ab8bcSmrg fi 9409d21ab8bcSmrg fi 9410d21ab8bcSmrg]) 9411d21ab8bcSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9412d21ab8bcSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 94131f0ac6a5Smrg 9414d21ab8bcSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 94151f0ac6a5Smrg 9416d21ab8bcSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9417d21ab8bcSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9418d21ab8bcSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 9419d21ab8bcSmrg [The commands to extract the exported symbol list from a shared archive]) 94201f0ac6a5Smrg 9421d21ab8bcSmrg# 9422d21ab8bcSmrg# Do we need to explicitly link libc? 9423d21ab8bcSmrg# 9424d21ab8bcSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9425d21ab8bcSmrgx|xyes) 9426d21ab8bcSmrg # Assume -lc should be added 9427d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 94281f0ac6a5Smrg 9429d21ab8bcSmrg if test yes,yes = "$GCC,$enable_shared"; then 9430d21ab8bcSmrg case $_LT_TAGVAR(archive_cmds, $1) in 9431d21ab8bcSmrg *'~'*) 9432d21ab8bcSmrg # FIXME: we may have to deal with multi-command sequences. 9433d21ab8bcSmrg ;; 9434d21ab8bcSmrg '$CC '*) 9435d21ab8bcSmrg # Test whether the compiler implicitly links with -lc since on some 9436d21ab8bcSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 9437d21ab8bcSmrg # to ld, don't add -lc before -lgcc. 9438d21ab8bcSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9439d21ab8bcSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9440d21ab8bcSmrg [$RM conftest* 9441d21ab8bcSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 94421f0ac6a5Smrg 9443d21ab8bcSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9444d21ab8bcSmrg soname=conftest 9445d21ab8bcSmrg lib=conftest 9446d21ab8bcSmrg libobjs=conftest.$ac_objext 9447d21ab8bcSmrg deplibs= 9448d21ab8bcSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9449d21ab8bcSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9450d21ab8bcSmrg compiler_flags=-v 9451d21ab8bcSmrg linker_flags=-v 9452d21ab8bcSmrg verstring= 9453d21ab8bcSmrg output_objdir=. 9454d21ab8bcSmrg libname=conftest 9455d21ab8bcSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9456d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 9457d21ab8bcSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9458d21ab8bcSmrg then 9459d21ab8bcSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9460d21ab8bcSmrg else 9461d21ab8bcSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9462d21ab8bcSmrg fi 9463d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9464d21ab8bcSmrg else 9465d21ab8bcSmrg cat conftest.err 1>&5 9466d21ab8bcSmrg fi 9467d21ab8bcSmrg $RM conftest* 9468d21ab8bcSmrg ]) 9469d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9470d21ab8bcSmrg ;; 9471d21ab8bcSmrg esac 9472d21ab8bcSmrg fi 9473d21ab8bcSmrg ;; 9474d21ab8bcSmrgesac 94751f0ac6a5Smrg 9476d21ab8bcSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9477d21ab8bcSmrg [Whether or not to add -lc for building shared libraries]) 9478d21ab8bcSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9479d21ab8bcSmrg [enable_shared_with_static_runtimes], [0], 9480d21ab8bcSmrg [Whether or not to disallow shared libs when runtime libs are static]) 9481d21ab8bcSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9482d21ab8bcSmrg [Compiler flag to allow reflexive dlopens]) 9483d21ab8bcSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9484d21ab8bcSmrg [Compiler flag to generate shared objects directly from archives]) 9485d21ab8bcSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 9486d21ab8bcSmrg [Whether the compiler copes with passing no objects directly]) 9487d21ab8bcSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9488d21ab8bcSmrg [Create an old-style archive from a shared archive]) 9489d21ab8bcSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9490d21ab8bcSmrg [Create a temporary old-style archive to link instead of a shared archive]) 9491d21ab8bcSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9492d21ab8bcSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9493d21ab8bcSmrg_LT_TAGDECL([], [module_cmds], [2], 9494d21ab8bcSmrg [Commands used to build a loadable module if different from building 9495d21ab8bcSmrg a shared archive.]) 9496d21ab8bcSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 9497d21ab8bcSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 9498d21ab8bcSmrg [Whether we are building with GNU ld or not]) 9499d21ab8bcSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 9500d21ab8bcSmrg [Flag that allows shared libraries with undefined symbols to be built]) 9501d21ab8bcSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 9502d21ab8bcSmrg [Flag that enforces no undefined symbols]) 9503d21ab8bcSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9504d21ab8bcSmrg [Flag to hardcode $libdir into a binary during linking. 9505d21ab8bcSmrg This must work even if $libdir does not exist]) 9506d21ab8bcSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9507d21ab8bcSmrg [Whether we need a single "-rpath" flag with a separated argument]) 9508d21ab8bcSmrg_LT_TAGDECL([], [hardcode_direct], [0], 9509d21ab8bcSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9510d21ab8bcSmrg DIR into the resulting binary]) 9511d21ab8bcSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9512d21ab8bcSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9513d21ab8bcSmrg DIR into the resulting binary and the resulting library dependency is 9514d21ab8bcSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 9515d21ab8bcSmrg library is relocated]) 9516d21ab8bcSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 9517d21ab8bcSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9518d21ab8bcSmrg into the resulting binary]) 9519d21ab8bcSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9520d21ab8bcSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9521d21ab8bcSmrg into the resulting binary]) 9522d21ab8bcSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 9523d21ab8bcSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 9524d21ab8bcSmrg into the library and all subsequent libraries and executables linked 9525d21ab8bcSmrg against it]) 9526d21ab8bcSmrg_LT_TAGDECL([], [inherit_rpath], [0], 9527d21ab8bcSmrg [Set to yes if linker adds runtime paths of dependent libraries 9528d21ab8bcSmrg to runtime path list]) 9529d21ab8bcSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 9530d21ab8bcSmrg [Whether libtool must link a program against all its dependency libraries]) 9531d21ab8bcSmrg_LT_TAGDECL([], [always_export_symbols], [0], 9532d21ab8bcSmrg [Set to "yes" if exported symbols are required]) 9533d21ab8bcSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 9534d21ab8bcSmrg [The commands to list exported symbols]) 9535d21ab8bcSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 9536d21ab8bcSmrg [Symbols that should not be listed in the preloaded symbols]) 9537d21ab8bcSmrg_LT_TAGDECL([], [include_expsyms], [1], 9538d21ab8bcSmrg [Symbols that must always be exported]) 9539d21ab8bcSmrg_LT_TAGDECL([], [prelink_cmds], [2], 9540d21ab8bcSmrg [Commands necessary for linking programs (against libraries) with templates]) 9541d21ab8bcSmrg_LT_TAGDECL([], [postlink_cmds], [2], 9542d21ab8bcSmrg [Commands necessary for finishing linking programs]) 9543d21ab8bcSmrg_LT_TAGDECL([], [file_list_spec], [1], 9544d21ab8bcSmrg [Specify filename containing input files]) 9545d21ab8bcSmrgdnl FIXME: Not yet implemented 9546d21ab8bcSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9547d21ab8bcSmrgdnl [Compiler flag to generate thread safe objects]) 9548d21ab8bcSmrg])# _LT_LINKER_SHLIBS 95499c9ff80cSmrg 95501f0ac6a5Smrg 9551d21ab8bcSmrg# _LT_LANG_C_CONFIG([TAG]) 9552d21ab8bcSmrg# ------------------------ 9553d21ab8bcSmrg# Ensure that the configuration variables for a C compiler are suitably 9554d21ab8bcSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 9555d21ab8bcSmrg# the compiler configuration to 'libtool'. 9556d21ab8bcSmrgm4_defun([_LT_LANG_C_CONFIG], 9557d21ab8bcSmrg[m4_require([_LT_DECL_EGREP])dnl 9558d21ab8bcSmrglt_save_CC=$CC 9559d21ab8bcSmrgAC_LANG_PUSH(C) 95601f0ac6a5Smrg 9561d21ab8bcSmrg# Source file extension for C test sources. 9562d21ab8bcSmrgac_ext=c 95631f0ac6a5Smrg 9564d21ab8bcSmrg# Object file extension for compiled C test sources. 9565d21ab8bcSmrgobjext=o 9566d21ab8bcSmrg_LT_TAGVAR(objext, $1)=$objext 95671f0ac6a5Smrg 9568d21ab8bcSmrg# Code to be used in simple compile tests 9569d21ab8bcSmrglt_simple_compile_test_code="int some_variable = 0;" 95709c9ff80cSmrg 9571d21ab8bcSmrg# Code to be used in simple link tests 9572d21ab8bcSmrglt_simple_link_test_code='int main(){return(0);}' 95731f0ac6a5Smrg 9574d21ab8bcSmrg_LT_TAG_COMPILER 9575d21ab8bcSmrg# Save the default compiler, since it gets overwritten when the other 9576d21ab8bcSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9577d21ab8bcSmrgcompiler_DEFAULT=$CC 95781f0ac6a5Smrg 9579d21ab8bcSmrg# save warnings/boilerplate of simple test code 9580d21ab8bcSmrg_LT_COMPILER_BOILERPLATE 9581d21ab8bcSmrg_LT_LINKER_BOILERPLATE 95821f0ac6a5Smrg 9583d21ab8bcSmrgif test -n "$compiler"; then 9584d21ab8bcSmrg _LT_COMPILER_NO_RTTI($1) 9585d21ab8bcSmrg _LT_COMPILER_PIC($1) 9586d21ab8bcSmrg _LT_COMPILER_C_O($1) 9587d21ab8bcSmrg _LT_COMPILER_FILE_LOCKS($1) 9588d21ab8bcSmrg _LT_LINKER_SHLIBS($1) 9589d21ab8bcSmrg _LT_SYS_DYNAMIC_LINKER($1) 9590d21ab8bcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9591d21ab8bcSmrg LT_SYS_DLOPEN_SELF 9592d21ab8bcSmrg _LT_CMD_STRIPLIB 95931f0ac6a5Smrg 9594d21ab8bcSmrg # Report what library types will actually be built 9595d21ab8bcSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9596d21ab8bcSmrg AC_MSG_RESULT([$can_build_shared]) 95971f0ac6a5Smrg 9598d21ab8bcSmrg AC_MSG_CHECKING([whether to build shared libraries]) 9599d21ab8bcSmrg test no = "$can_build_shared" && enable_shared=no 96001f0ac6a5Smrg 9601d21ab8bcSmrg # On AIX, shared libraries and static libraries use the same namespace, and 9602d21ab8bcSmrg # are all built from PIC. 9603d21ab8bcSmrg case $host_os in 9604d21ab8bcSmrg aix3*) 9605d21ab8bcSmrg test yes = "$enable_shared" && enable_static=no 9606d21ab8bcSmrg if test -n "$RANLIB"; then 9607d21ab8bcSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9608d21ab8bcSmrg postinstall_cmds='$RANLIB $lib' 9609d21ab8bcSmrg fi 9610d21ab8bcSmrg ;; 96111f0ac6a5Smrg 9612d21ab8bcSmrg aix[[4-9]]*) 9613d21ab8bcSmrg if test ia64 != "$host_cpu"; then 9614d21ab8bcSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9615d21ab8bcSmrg yes,aix,yes) ;; # shared object as lib.so file only 9616d21ab8bcSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 9617d21ab8bcSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 9618d21ab8bcSmrg esac 9619d21ab8bcSmrg fi 9620d21ab8bcSmrg ;; 9621d21ab8bcSmrg esac 9622d21ab8bcSmrg AC_MSG_RESULT([$enable_shared]) 96236fae4e5dSmrg 9624d21ab8bcSmrg AC_MSG_CHECKING([whether to build static libraries]) 9625d21ab8bcSmrg # Make sure either enable_shared or enable_static is yes. 9626d21ab8bcSmrg test yes = "$enable_shared" || enable_static=yes 9627d21ab8bcSmrg AC_MSG_RESULT([$enable_static]) 96282fd96bc7Smrg 9629d21ab8bcSmrg _LT_CONFIG($1) 9630d21ab8bcSmrgfi 9631d21ab8bcSmrgAC_LANG_POP 9632d21ab8bcSmrgCC=$lt_save_CC 9633d21ab8bcSmrg])# _LT_LANG_C_CONFIG 96342fd96bc7Smrg 9635d21ab8bcSmrg 9636d21ab8bcSmrg# _LT_LANG_CXX_CONFIG([TAG]) 9637d21ab8bcSmrg# -------------------------- 9638d21ab8bcSmrg# Ensure that the configuration variables for a C++ compiler are suitably 9639d21ab8bcSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 9640d21ab8bcSmrg# the compiler configuration to 'libtool'. 9641d21ab8bcSmrgm4_defun([_LT_LANG_CXX_CONFIG], 9642d21ab8bcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9643d21ab8bcSmrgm4_require([_LT_DECL_EGREP])dnl 9644d21ab8bcSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9645d21ab8bcSmrgif test -n "$CXX" && ( test no != "$CXX" && 9646d21ab8bcSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9647d21ab8bcSmrg (test g++ != "$CXX"))); then 9648d21ab8bcSmrg AC_PROG_CXXCPP 9649d21ab8bcSmrgelse 9650d21ab8bcSmrg _lt_caught_CXX_error=yes 96512fd96bc7Smrgfi 96522fd96bc7Smrg 9653d21ab8bcSmrgAC_LANG_PUSH(C++) 9654d21ab8bcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9655d21ab8bcSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 9656d21ab8bcSmrg_LT_TAGVAR(always_export_symbols, $1)=no 9657d21ab8bcSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9658d21ab8bcSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 9659d21ab8bcSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9660d21ab8bcSmrg_LT_TAGVAR(hardcode_direct, $1)=no 9661d21ab8bcSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9662d21ab8bcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9663d21ab8bcSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9664d21ab8bcSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9665d21ab8bcSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9666d21ab8bcSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 9667d21ab8bcSmrg_LT_TAGVAR(inherit_rpath, $1)=no 9668d21ab8bcSmrg_LT_TAGVAR(module_cmds, $1)= 9669d21ab8bcSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 9670d21ab8bcSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9671d21ab8bcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9672d21ab8bcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9673d21ab8bcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9674d21ab8bcSmrg_LT_TAGVAR(no_undefined_flag, $1)= 9675d21ab8bcSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9676d21ab8bcSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 96772fd96bc7Smrg 9678d21ab8bcSmrg# Source file extension for C++ test sources. 9679d21ab8bcSmrgac_ext=cpp 96802fd96bc7Smrg 9681d21ab8bcSmrg# Object file extension for compiled C++ test sources. 9682d21ab8bcSmrgobjext=o 9683d21ab8bcSmrg_LT_TAGVAR(objext, $1)=$objext 96842fd96bc7Smrg 9685d21ab8bcSmrg# No sense in running all these tests if we already determined that 9686d21ab8bcSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 9687d21ab8bcSmrg# are currently assumed to apply to all compilers on this platform, 9688d21ab8bcSmrg# and will be corrupted by setting them based on a non-working compiler. 9689d21ab8bcSmrgif test yes != "$_lt_caught_CXX_error"; then 9690d21ab8bcSmrg # Code to be used in simple compile tests 9691d21ab8bcSmrg lt_simple_compile_test_code="int some_variable = 0;" 96922fd96bc7Smrg 9693d21ab8bcSmrg # Code to be used in simple link tests 9694d21ab8bcSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 96952fd96bc7Smrg 9696d21ab8bcSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9697d21ab8bcSmrg _LT_TAG_COMPILER 96982fd96bc7Smrg 9699d21ab8bcSmrg # save warnings/boilerplate of simple test code 9700d21ab8bcSmrg _LT_COMPILER_BOILERPLATE 9701d21ab8bcSmrg _LT_LINKER_BOILERPLATE 97022fd96bc7Smrg 9703d21ab8bcSmrg # Allow CC to be a program name with arguments. 9704d21ab8bcSmrg lt_save_CC=$CC 9705d21ab8bcSmrg lt_save_CFLAGS=$CFLAGS 9706d21ab8bcSmrg lt_save_LD=$LD 9707d21ab8bcSmrg lt_save_GCC=$GCC 9708d21ab8bcSmrg GCC=$GXX 9709d21ab8bcSmrg lt_save_with_gnu_ld=$with_gnu_ld 9710d21ab8bcSmrg lt_save_path_LD=$lt_cv_path_LD 9711d21ab8bcSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9712d21ab8bcSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9713d21ab8bcSmrg else 9714d21ab8bcSmrg $as_unset lt_cv_prog_gnu_ld 9715d21ab8bcSmrg fi 9716d21ab8bcSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 9717d21ab8bcSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 9718d21ab8bcSmrg else 9719d21ab8bcSmrg $as_unset lt_cv_path_LD 9720d21ab8bcSmrg fi 9721d21ab8bcSmrg test -z "${LDCXX+set}" || LD=$LDCXX 9722d21ab8bcSmrg CC=${CXX-"c++"} 9723d21ab8bcSmrg CFLAGS=$CXXFLAGS 9724d21ab8bcSmrg compiler=$CC 9725d21ab8bcSmrg _LT_TAGVAR(compiler, $1)=$CC 9726d21ab8bcSmrg _LT_CC_BASENAME([$compiler]) 97272fd96bc7Smrg 9728d21ab8bcSmrg if test -n "$compiler"; then 9729d21ab8bcSmrg # We don't want -fno-exception when compiling C++ code, so set the 9730d21ab8bcSmrg # no_builtin_flag separately 9731d21ab8bcSmrg if test yes = "$GXX"; then 9732d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9733d21ab8bcSmrg else 9734d21ab8bcSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9735d21ab8bcSmrg fi 97362fd96bc7Smrg 9737d21ab8bcSmrg if test yes = "$GXX"; then 9738d21ab8bcSmrg # Set up default GNU C++ configuration 97392fd96bc7Smrg 9740d21ab8bcSmrg LT_PATH_LD 97412fd96bc7Smrg 9742d21ab8bcSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 9743d21ab8bcSmrg # archiving commands below assume that GNU ld is being used. 9744d21ab8bcSmrg if test yes = "$with_gnu_ld"; then 9745d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9746d21ab8bcSmrg _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' 97472fd96bc7Smrg 9748d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9749d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 97502fd96bc7Smrg 9751d21ab8bcSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 9752d21ab8bcSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9753d21ab8bcSmrg # investigate it a little bit more. (MM) 9754d21ab8bcSmrg wlarc='$wl' 97552fd96bc7Smrg 9756d21ab8bcSmrg # ancient GNU ld didn't support --whole-archive et. al. 9757d21ab8bcSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9758d21ab8bcSmrg $GREP 'no-whole-archive' > /dev/null; then 9759d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9760d21ab8bcSmrg else 9761d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9762d21ab8bcSmrg fi 9763d21ab8bcSmrg else 9764d21ab8bcSmrg with_gnu_ld=no 9765d21ab8bcSmrg wlarc= 97662fd96bc7Smrg 9767d21ab8bcSmrg # A generic and very simple default shared library creation 9768d21ab8bcSmrg # command for GNU C++ for the case where it uses the native 9769d21ab8bcSmrg # linker, instead of GNU ld. If possible, this setting should 9770d21ab8bcSmrg # overridden to take advantage of the native linker features on 9771d21ab8bcSmrg # the platform it is being used on. 9772d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9773d21ab8bcSmrg fi 97742fd96bc7Smrg 9775d21ab8bcSmrg # Commands to make compiler produce verbose output that lists 9776d21ab8bcSmrg # what "hidden" libraries, object files and flags are used when 9777d21ab8bcSmrg # linking a shared library. 9778d21ab8bcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9779d21ab8bcSmrg 9780d21ab8bcSmrg else 9781d21ab8bcSmrg GXX=no 9782d21ab8bcSmrg with_gnu_ld=no 9783d21ab8bcSmrg wlarc= 9784d21ab8bcSmrg fi 9785d21ab8bcSmrg 9786d21ab8bcSmrg # PORTME: fill in a description of your system's C++ link characteristics 9787d21ab8bcSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9788d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9789d21ab8bcSmrg case $host_os in 9790d21ab8bcSmrg aix3*) 9791d21ab8bcSmrg # FIXME: insert proper C++ library support 9792d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9793d21ab8bcSmrg ;; 9794d21ab8bcSmrg aix[[4-9]]*) 9795d21ab8bcSmrg if test ia64 = "$host_cpu"; then 9796d21ab8bcSmrg # On IA64, the linker does run time linking by default, so we don't 9797d21ab8bcSmrg # have to do anything special. 9798d21ab8bcSmrg aix_use_runtimelinking=no 9799d21ab8bcSmrg exp_sym_flag='-Bexport' 9800d21ab8bcSmrg no_entry_flag= 9801d21ab8bcSmrg else 9802d21ab8bcSmrg aix_use_runtimelinking=no 98032fd96bc7Smrg 9804d21ab8bcSmrg # Test if we are trying to use run time linking or normal 9805d21ab8bcSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9806d21ab8bcSmrg # have runtime linking enabled, and use it for executables. 9807d21ab8bcSmrg # For shared libraries, we enable/disable runtime linking 9808d21ab8bcSmrg # depending on the kind of the shared library created - 9809d21ab8bcSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 9810d21ab8bcSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9811d21ab8bcSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 9812d21ab8bcSmrg # lib.a static archive 9813d21ab8bcSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9814d21ab8bcSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 9815d21ab8bcSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9816d21ab8bcSmrg # lib.a(lib.so.V) shared, rtl:no 9817d21ab8bcSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9818d21ab8bcSmrg # lib.a static archive 9819d21ab8bcSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9820d21ab8bcSmrg for ld_flag in $LDFLAGS; do 9821d21ab8bcSmrg case $ld_flag in 9822d21ab8bcSmrg *-brtl*) 9823d21ab8bcSmrg aix_use_runtimelinking=yes 9824d21ab8bcSmrg break 9825d21ab8bcSmrg ;; 9826d21ab8bcSmrg esac 9827d21ab8bcSmrg done 9828d21ab8bcSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9829d21ab8bcSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9830d21ab8bcSmrg # so we don't have lib.a shared libs to link our executables. 9831d21ab8bcSmrg # We have to force runtime linking in this case. 9832d21ab8bcSmrg aix_use_runtimelinking=yes 9833d21ab8bcSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9834d21ab8bcSmrg fi 9835d21ab8bcSmrg ;; 9836d21ab8bcSmrg esac 98372fd96bc7Smrg 9838d21ab8bcSmrg exp_sym_flag='-bexport' 9839d21ab8bcSmrg no_entry_flag='-bnoentry' 9840d21ab8bcSmrg fi 98412fd96bc7Smrg 9842d21ab8bcSmrg # When large executables or shared objects are built, AIX ld can 9843d21ab8bcSmrg # have problems creating the table of contents. If linking a library 9844d21ab8bcSmrg # or program results in "error TOC overflow" add -mminimal-toc to 9845d21ab8bcSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9846d21ab8bcSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 98472fd96bc7Smrg 9848d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='' 9849d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9850d21ab8bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9851d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9852d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9853d21ab8bcSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9854d21ab8bcSmrg case $with_aix_soname,$aix_use_runtimelinking in 9855d21ab8bcSmrg aix,*) ;; # no import file 9856d21ab8bcSmrg svr4,* | *,yes) # use import file 9857d21ab8bcSmrg # The Import File defines what to hardcode. 9858d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9859d21ab8bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9860d21ab8bcSmrg ;; 9861d21ab8bcSmrg esac 98622fd96bc7Smrg 9863d21ab8bcSmrg if test yes = "$GXX"; then 9864d21ab8bcSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9865d21ab8bcSmrg # We only want to do this on AIX 4.2 and lower, the check 9866d21ab8bcSmrg # below for broken collect2 doesn't work under 4.3+ 9867d21ab8bcSmrg collect2name=`$CC -print-prog-name=collect2` 9868d21ab8bcSmrg if test -f "$collect2name" && 9869d21ab8bcSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9870d21ab8bcSmrg then 9871d21ab8bcSmrg # We have reworked collect2 9872d21ab8bcSmrg : 9873d21ab8bcSmrg else 9874d21ab8bcSmrg # We have old collect2 9875d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9876d21ab8bcSmrg # It fails to find uninstalled libraries when the uninstalled 9877d21ab8bcSmrg # path is not listed in the libpath. Setting hardcode_minus_L 9878d21ab8bcSmrg # to unsupported forces relinking 9879d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9880d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9881d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9882d21ab8bcSmrg fi 9883d21ab8bcSmrg esac 9884d21ab8bcSmrg shared_flag='-shared' 9885d21ab8bcSmrg if test yes = "$aix_use_runtimelinking"; then 9886d21ab8bcSmrg shared_flag=$shared_flag' $wl-G' 9887d21ab8bcSmrg fi 9888d21ab8bcSmrg # Need to ensure runtime linking is disabled for the traditional 9889d21ab8bcSmrg # shared library, or the linker may eventually find shared libraries 9890d21ab8bcSmrg # /with/ Import File - we do not want to mix them. 9891d21ab8bcSmrg shared_flag_aix='-shared' 9892d21ab8bcSmrg shared_flag_svr4='-shared $wl-G' 9893d21ab8bcSmrg else 9894d21ab8bcSmrg # not using gcc 9895d21ab8bcSmrg if test ia64 = "$host_cpu"; then 9896d21ab8bcSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9897d21ab8bcSmrg # chokes on -Wl,-G. The following line is correct: 9898d21ab8bcSmrg shared_flag='-G' 9899d21ab8bcSmrg else 9900d21ab8bcSmrg if test yes = "$aix_use_runtimelinking"; then 9901d21ab8bcSmrg shared_flag='$wl-G' 9902d21ab8bcSmrg else 9903d21ab8bcSmrg shared_flag='$wl-bM:SRE' 9904d21ab8bcSmrg fi 9905d21ab8bcSmrg shared_flag_aix='$wl-bM:SRE' 9906d21ab8bcSmrg shared_flag_svr4='$wl-G' 9907d21ab8bcSmrg fi 9908d21ab8bcSmrg fi 99092fd96bc7Smrg 9910d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9911d21ab8bcSmrg # It seems that -bexpall does not export symbols beginning with 9912d21ab8bcSmrg # underscore (_), so it is better to generate a list of symbols to 9913d21ab8bcSmrg # export. 9914d21ab8bcSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 9915d21ab8bcSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9916d21ab8bcSmrg # Warning - without using the other runtime loading flags (-brtl), 9917d21ab8bcSmrg # -berok will link without error, but may produce a broken library. 9918d21ab8bcSmrg # The "-G" linker flag allows undefined symbols. 9919d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 9920d21ab8bcSmrg # Determine the default libpath from the value encoded in an empty 9921d21ab8bcSmrg # executable. 9922d21ab8bcSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 9923d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 99242fd96bc7Smrg 9925d21ab8bcSmrg _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 9926d21ab8bcSmrg else 9927d21ab8bcSmrg if test ia64 = "$host_cpu"; then 9928d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9929d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 9930d21ab8bcSmrg _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" 9931d21ab8bcSmrg else 9932d21ab8bcSmrg # Determine the default libpath from the value encoded in an 9933d21ab8bcSmrg # empty executable. 9934d21ab8bcSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 9935d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9936d21ab8bcSmrg # Warning - without using the other run time loading flags, 9937d21ab8bcSmrg # -berok will link without error, but may produce a broken library. 9938d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 9939d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 9940d21ab8bcSmrg if test yes = "$with_gnu_ld"; then 9941d21ab8bcSmrg # We only use this code for GNU lds that support --whole-archive. 9942d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9943d21ab8bcSmrg else 9944d21ab8bcSmrg # Exported symbols can be pulled into shared objects from archives 9945d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 9946d21ab8bcSmrg fi 9947d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9948d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 9949d21ab8bcSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 9950d21ab8bcSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 9951d21ab8bcSmrg if test svr4 != "$with_aix_soname"; then 9952d21ab8bcSmrg # This is similar to how AIX traditionally builds its shared 9953d21ab8bcSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 9954d21ab8bcSmrg _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' 9955d21ab8bcSmrg fi 9956d21ab8bcSmrg if test aix != "$with_aix_soname"; then 9957d21ab8bcSmrg _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' 9958d21ab8bcSmrg else 9959d21ab8bcSmrg # used by -dlpreopen to get the symbols 9960d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 9961d21ab8bcSmrg fi 9962d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 9963d21ab8bcSmrg fi 9964d21ab8bcSmrg fi 9965d21ab8bcSmrg ;; 99662fd96bc7Smrg 9967d21ab8bcSmrg beos*) 9968d21ab8bcSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9969d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9970d21ab8bcSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 9971d21ab8bcSmrg # support --undefined. This deserves some investigation. FIXME 9972d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9973d21ab8bcSmrg else 9974d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9975d21ab8bcSmrg fi 9976d21ab8bcSmrg ;; 99772fd96bc7Smrg 9978d21ab8bcSmrg chorus*) 9979d21ab8bcSmrg case $cc_basename in 9980d21ab8bcSmrg *) 9981d21ab8bcSmrg # FIXME: insert proper C++ library support 9982d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9983d21ab8bcSmrg ;; 9984d21ab8bcSmrg esac 9985d21ab8bcSmrg ;; 99862fd96bc7Smrg 9987d21ab8bcSmrg cygwin* | mingw* | pw32* | cegcc*) 9988d21ab8bcSmrg case $GXX,$cc_basename in 9989d21ab8bcSmrg ,cl* | no,cl* | ,icl* | no,icl*) 9990d21ab8bcSmrg # Native MSVC or ICC 9991d21ab8bcSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 9992d21ab8bcSmrg # no search path for DLLs. 9993d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9994d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9995d21ab8bcSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 9996d21ab8bcSmrg _LT_TAGVAR(file_list_spec, $1)='@' 9997d21ab8bcSmrg # Tell ltmain to make .lib files, not .a files. 9998d21ab8bcSmrg libext=lib 9999d21ab8bcSmrg # Tell ltmain to make .dll files, not .so files. 10000d21ab8bcSmrg shrext_cmds=.dll 10001d21ab8bcSmrg # FIXME: Setting linknames here is a bad hack. 10002d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10003d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10004d21ab8bcSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 10005d21ab8bcSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10006d21ab8bcSmrg else 10007d21ab8bcSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10008d21ab8bcSmrg fi~ 10009d21ab8bcSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10010d21ab8bcSmrg linknames=' 10011d21ab8bcSmrg # The linker will not automatically build a static lib if we build a DLL. 10012d21ab8bcSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10013d21ab8bcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10014d21ab8bcSmrg # Don't use ranlib 10015d21ab8bcSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10016d21ab8bcSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10017d21ab8bcSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10018d21ab8bcSmrg case $lt_outputfile in 10019d21ab8bcSmrg *.exe|*.EXE) ;; 10020d21ab8bcSmrg *) 10021d21ab8bcSmrg lt_outputfile=$lt_outputfile.exe 10022d21ab8bcSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 10023d21ab8bcSmrg ;; 10024d21ab8bcSmrg esac~ 10025d21ab8bcSmrg func_to_tool_file "$lt_outputfile"~ 10026d21ab8bcSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10027d21ab8bcSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10028d21ab8bcSmrg $RM "$lt_outputfile.manifest"; 10029d21ab8bcSmrg fi' 10030d21ab8bcSmrg ;; 10031d21ab8bcSmrg *) 10032d21ab8bcSmrg # g++ 10033d21ab8bcSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10034d21ab8bcSmrg # as there is no search path for DLLs. 10035d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10036d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10037d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10038d21ab8bcSmrg _LT_TAGVAR(always_export_symbols, $1)=no 10039d21ab8bcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10040d21ab8bcSmrg 10041d21ab8bcSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10042d21ab8bcSmrg _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' 10043d21ab8bcSmrg # If the export-symbols file already is a .def file, use it as 10044d21ab8bcSmrg # is; otherwise, prepend EXPORTS... 10045d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10046d21ab8bcSmrg cp $export_symbols $output_objdir/$soname.def; 10047d21ab8bcSmrg else 10048d21ab8bcSmrg echo EXPORTS > $output_objdir/$soname.def; 10049d21ab8bcSmrg cat $export_symbols >> $output_objdir/$soname.def; 10050d21ab8bcSmrg fi~ 10051d21ab8bcSmrg $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' 10052d21ab8bcSmrg else 10053d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10054d21ab8bcSmrg fi 10055d21ab8bcSmrg ;; 10056d21ab8bcSmrg esac 10057d21ab8bcSmrg ;; 10058d21ab8bcSmrg darwin* | rhapsody*) 10059d21ab8bcSmrg _LT_DARWIN_LINKER_FEATURES($1) 10060d21ab8bcSmrg ;; 100612fd96bc7Smrg 10062d21ab8bcSmrg os2*) 10063d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10064d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10065d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10066d21ab8bcSmrg shrext_cmds=.dll 10067d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10068d21ab8bcSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10069d21ab8bcSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10070d21ab8bcSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10071d21ab8bcSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10072d21ab8bcSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10073d21ab8bcSmrg emximp -o $lib $output_objdir/$libname.def' 10074d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10075d21ab8bcSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10076d21ab8bcSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10077d21ab8bcSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10078d21ab8bcSmrg prefix_cmds="$SED"~ 10079d21ab8bcSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10080d21ab8bcSmrg prefix_cmds="$prefix_cmds -e 1d"; 10081d21ab8bcSmrg fi~ 10082d21ab8bcSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10083d21ab8bcSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10084d21ab8bcSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10085d21ab8bcSmrg emximp -o $lib $output_objdir/$libname.def' 10086d21ab8bcSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10087d21ab8bcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10088d21ab8bcSmrg _LT_TAGVAR(file_list_spec, $1)='@' 10089d21ab8bcSmrg ;; 100902fd96bc7Smrg 10091d21ab8bcSmrg dgux*) 10092d21ab8bcSmrg case $cc_basename in 10093d21ab8bcSmrg ec++*) 10094d21ab8bcSmrg # FIXME: insert proper C++ library support 10095d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10096d21ab8bcSmrg ;; 10097d21ab8bcSmrg ghcx*) 10098d21ab8bcSmrg # Green Hills C++ Compiler 10099d21ab8bcSmrg # FIXME: insert proper C++ library support 10100d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10101d21ab8bcSmrg ;; 10102d21ab8bcSmrg *) 10103d21ab8bcSmrg # FIXME: insert proper C++ library support 10104d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10105d21ab8bcSmrg ;; 10106d21ab8bcSmrg esac 10107d21ab8bcSmrg ;; 101082fd96bc7Smrg 10109d21ab8bcSmrg freebsd2.*) 10110d21ab8bcSmrg # C++ shared libraries reported to be fairly broken before 10111d21ab8bcSmrg # switch to ELF 10112d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10113d21ab8bcSmrg ;; 101142fd96bc7Smrg 10115d21ab8bcSmrg freebsd-elf*) 10116d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10117d21ab8bcSmrg ;; 101182fd96bc7Smrg 10119d21ab8bcSmrg freebsd* | dragonfly* | midnightbsd*) 10120d21ab8bcSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10121d21ab8bcSmrg # conventions 10122d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 10123d21ab8bcSmrg ;; 101242fd96bc7Smrg 10125d21ab8bcSmrg haiku*) 10126d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10127d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10128d21ab8bcSmrg ;; 101292fd96bc7Smrg 10130d21ab8bcSmrg hpux9*) 10131d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10132d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10133d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10134d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10135d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10136d21ab8bcSmrg # but as the default 10137d21ab8bcSmrg # location of the library. 101382fd96bc7Smrg 10139d21ab8bcSmrg case $cc_basename in 10140d21ab8bcSmrg CC*) 10141d21ab8bcSmrg # FIXME: insert proper C++ library support 10142d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10143d21ab8bcSmrg ;; 10144d21ab8bcSmrg aCC*) 10145d21ab8bcSmrg _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' 10146d21ab8bcSmrg # Commands to make compiler produce verbose output that lists 10147d21ab8bcSmrg # what "hidden" libraries, object files and flags are used when 10148d21ab8bcSmrg # linking a shared library. 10149d21ab8bcSmrg # 10150d21ab8bcSmrg # There doesn't appear to be a way to prevent this compiler from 10151d21ab8bcSmrg # explicitly linking system object files so we need to strip them 10152d21ab8bcSmrg # from the output so that they don't get included in the library 10153d21ab8bcSmrg # dependencies. 10154d21ab8bcSmrg 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"' 10155d21ab8bcSmrg ;; 10156d21ab8bcSmrg *) 10157d21ab8bcSmrg if test yes = "$GXX"; then 10158d21ab8bcSmrg _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' 10159d21ab8bcSmrg else 10160d21ab8bcSmrg # FIXME: insert proper C++ library support 10161d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10162d21ab8bcSmrg fi 10163d21ab8bcSmrg ;; 10164d21ab8bcSmrg esac 10165d21ab8bcSmrg ;; 101662fd96bc7Smrg 10167d21ab8bcSmrg hpux10*|hpux11*) 10168d21ab8bcSmrg if test no = "$with_gnu_ld"; then 10169d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10170d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 101712fd96bc7Smrg 10172d21ab8bcSmrg case $host_cpu in 10173d21ab8bcSmrg hppa*64*|ia64*) 10174d21ab8bcSmrg ;; 10175d21ab8bcSmrg *) 10176d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10177d21ab8bcSmrg ;; 10178d21ab8bcSmrg esac 10179d21ab8bcSmrg fi 10180d21ab8bcSmrg case $host_cpu in 10181d21ab8bcSmrg hppa*64*|ia64*) 10182d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10183d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10184d21ab8bcSmrg ;; 10185d21ab8bcSmrg *) 10186d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10187d21ab8bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10188d21ab8bcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10189d21ab8bcSmrg # but as the default 10190d21ab8bcSmrg # location of the library. 10191d21ab8bcSmrg ;; 10192d21ab8bcSmrg esac 101932fd96bc7Smrg 10194d21ab8bcSmrg case $cc_basename in 10195d21ab8bcSmrg CC*) 10196d21ab8bcSmrg # FIXME: insert proper C++ library support 10197d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10198d21ab8bcSmrg ;; 10199d21ab8bcSmrg aCC*) 10200d21ab8bcSmrg case $host_cpu in 10201d21ab8bcSmrg hppa*64*) 10202d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10203d21ab8bcSmrg ;; 10204d21ab8bcSmrg ia64*) 10205d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10206d21ab8bcSmrg ;; 10207d21ab8bcSmrg *) 10208d21ab8bcSmrg _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' 10209d21ab8bcSmrg ;; 10210d21ab8bcSmrg esac 10211d21ab8bcSmrg # Commands to make compiler produce verbose output that lists 10212d21ab8bcSmrg # what "hidden" libraries, object files and flags are used when 10213d21ab8bcSmrg # linking a shared library. 10214d21ab8bcSmrg # 10215d21ab8bcSmrg # There doesn't appear to be a way to prevent this compiler from 10216d21ab8bcSmrg # explicitly linking system object files so we need to strip them 10217d21ab8bcSmrg # from the output so that they don't get included in the library 10218d21ab8bcSmrg # dependencies. 10219d21ab8bcSmrg 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"' 10220d21ab8bcSmrg ;; 10221d21ab8bcSmrg *) 10222d21ab8bcSmrg if test yes = "$GXX"; then 10223d21ab8bcSmrg if test no = "$with_gnu_ld"; then 10224d21ab8bcSmrg case $host_cpu in 10225d21ab8bcSmrg hppa*64*) 10226d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10227d21ab8bcSmrg ;; 10228d21ab8bcSmrg ia64*) 10229d21ab8bcSmrg _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' 10230d21ab8bcSmrg ;; 10231d21ab8bcSmrg *) 10232d21ab8bcSmrg _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' 10233d21ab8bcSmrg ;; 10234d21ab8bcSmrg esac 10235d21ab8bcSmrg fi 10236d21ab8bcSmrg else 10237d21ab8bcSmrg # FIXME: insert proper C++ library support 10238d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10239d21ab8bcSmrg fi 10240d21ab8bcSmrg ;; 10241d21ab8bcSmrg esac 10242d21ab8bcSmrg ;; 102432fd96bc7Smrg 10244d21ab8bcSmrg interix[[3-9]]*) 10245d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10246d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10247d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10248d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10249d21ab8bcSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10250d21ab8bcSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10251d21ab8bcSmrg # default) and relocated if they conflict, which is a slow very memory 10252d21ab8bcSmrg # consuming and fragmenting process. To avoid this, we pick a random, 10253d21ab8bcSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10254d21ab8bcSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10255d21ab8bcSmrg _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' 10256d21ab8bcSmrg _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' 10257d21ab8bcSmrg ;; 10258d21ab8bcSmrg irix5* | irix6*) 10259d21ab8bcSmrg case $cc_basename in 10260d21ab8bcSmrg CC*) 10261d21ab8bcSmrg # SGI C++ 10262d21ab8bcSmrg _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' 102632fd96bc7Smrg 10264d21ab8bcSmrg # Archives containing C++ object files must be created using 10265d21ab8bcSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10266d21ab8bcSmrg # necessary to make sure instantiated templates are included 10267d21ab8bcSmrg # in the archive. 10268d21ab8bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10269d21ab8bcSmrg ;; 10270d21ab8bcSmrg *) 10271d21ab8bcSmrg if test yes = "$GXX"; then 10272d21ab8bcSmrg if test no = "$with_gnu_ld"; then 10273d21ab8bcSmrg _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' 10274d21ab8bcSmrg else 10275d21ab8bcSmrg _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' 10276d21ab8bcSmrg fi 10277d21ab8bcSmrg fi 10278d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10279d21ab8bcSmrg ;; 10280d21ab8bcSmrg esac 10281d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10282d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10283d21ab8bcSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 10284d21ab8bcSmrg ;; 102852fd96bc7Smrg 10286d21ab8bcSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10287d21ab8bcSmrg case $cc_basename in 10288d21ab8bcSmrg KCC*) 10289d21ab8bcSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 102902fd96bc7Smrg 10291d21ab8bcSmrg # KCC will only create a shared library if the output file 10292d21ab8bcSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10293d21ab8bcSmrg # to its proper name (with version) after linking. 10294d21ab8bcSmrg _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' 10295d21ab8bcSmrg _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' 10296d21ab8bcSmrg # Commands to make compiler produce verbose output that lists 10297d21ab8bcSmrg # what "hidden" libraries, object files and flags are used when 10298d21ab8bcSmrg # linking a shared library. 10299d21ab8bcSmrg # 10300d21ab8bcSmrg # There doesn't appear to be a way to prevent this compiler from 10301d21ab8bcSmrg # explicitly linking system object files so we need to strip them 10302d21ab8bcSmrg # from the output so that they don't get included in the library 10303d21ab8bcSmrg # dependencies. 10304d21ab8bcSmrg 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"' 103052fd96bc7Smrg 10306d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10307d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 103082fd96bc7Smrg 10309d21ab8bcSmrg # Archives containing C++ object files must be created using 10310d21ab8bcSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10311d21ab8bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10312d21ab8bcSmrg ;; 10313d21ab8bcSmrg icpc* | ecpc* ) 10314d21ab8bcSmrg # Intel C++ 10315d21ab8bcSmrg with_gnu_ld=yes 10316d21ab8bcSmrg # version 8.0 and above of icpc choke on multiply defined symbols 10317d21ab8bcSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10318d21ab8bcSmrg # earlier do not add the objects themselves. 10319d21ab8bcSmrg case `$CC -V 2>&1` in 10320d21ab8bcSmrg *"Version 7."*) 10321d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10322d21ab8bcSmrg _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' 10323d21ab8bcSmrg ;; 10324d21ab8bcSmrg *) # Version 8.0 or newer 10325d21ab8bcSmrg tmp_idyn= 10326d21ab8bcSmrg case $host_cpu in 10327d21ab8bcSmrg ia64*) tmp_idyn=' -i_dynamic';; 10328d21ab8bcSmrg esac 10329d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10330d21ab8bcSmrg _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' 10331d21ab8bcSmrg ;; 10332d21ab8bcSmrg esac 10333d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10334d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10335d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10336d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10337d21ab8bcSmrg ;; 10338d21ab8bcSmrg pgCC* | pgcpp*) 10339d21ab8bcSmrg # Portland Group C++ compiler 10340d21ab8bcSmrg case `$CC -V` in 10341d21ab8bcSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10342d21ab8bcSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10343d21ab8bcSmrg rm -rf $tpldir~ 10344d21ab8bcSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10345d21ab8bcSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10346d21ab8bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10347d21ab8bcSmrg rm -rf $tpldir~ 10348d21ab8bcSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10349d21ab8bcSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10350d21ab8bcSmrg $RANLIB $oldlib' 10351d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10352d21ab8bcSmrg rm -rf $tpldir~ 10353d21ab8bcSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10354d21ab8bcSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10355d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10356d21ab8bcSmrg rm -rf $tpldir~ 10357d21ab8bcSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10358d21ab8bcSmrg $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' 10359d21ab8bcSmrg ;; 10360d21ab8bcSmrg *) # Version 6 and above use weak symbols 10361d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10362d21ab8bcSmrg _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' 10363d21ab8bcSmrg ;; 10364d21ab8bcSmrg esac 103652fd96bc7Smrg 10366d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10367d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10368d21ab8bcSmrg _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' 10369d21ab8bcSmrg ;; 10370d21ab8bcSmrg cxx*) 10371d21ab8bcSmrg # Compaq C++ 10372d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10373d21ab8bcSmrg _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' 103742fd96bc7Smrg 10375d21ab8bcSmrg runpath_var=LD_RUN_PATH 10376d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10377d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 103782fd96bc7Smrg 10379d21ab8bcSmrg # Commands to make compiler produce verbose output that lists 10380d21ab8bcSmrg # what "hidden" libraries, object files and flags are used when 10381d21ab8bcSmrg # linking a shared library. 10382d21ab8bcSmrg # 10383d21ab8bcSmrg # There doesn't appear to be a way to prevent this compiler from 10384d21ab8bcSmrg # explicitly linking system object files so we need to strip them 10385d21ab8bcSmrg # from the output so that they don't get included in the library 10386d21ab8bcSmrg # dependencies. 10387d21ab8bcSmrg 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' 10388d21ab8bcSmrg ;; 10389d21ab8bcSmrg xl* | mpixl* | bgxl*) 10390d21ab8bcSmrg # IBM XL 8.0 on PPC, with GNU ld 10391d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10392d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10393d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10394d21ab8bcSmrg if test yes = "$supports_anon_versioning"; then 10395d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10396d21ab8bcSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10397d21ab8bcSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 10398d21ab8bcSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10399d21ab8bcSmrg fi 10400d21ab8bcSmrg ;; 10401d21ab8bcSmrg *) 10402d21ab8bcSmrg case `$CC -V 2>&1 | $SED 5q` in 10403d21ab8bcSmrg *Sun\ C*) 10404d21ab8bcSmrg # Sun C++ 5.9 10405d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10406d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10407d21ab8bcSmrg _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' 10408d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10409d21ab8bcSmrg _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' 10410d21ab8bcSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 104112fd96bc7Smrg 10412d21ab8bcSmrg # Not sure whether something based on 10413d21ab8bcSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10414d21ab8bcSmrg # would be better. 10415d21ab8bcSmrg output_verbose_link_cmd='func_echo_all' 104162fd96bc7Smrg 10417d21ab8bcSmrg # Archives containing C++ object files must be created using 10418d21ab8bcSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10419d21ab8bcSmrg # necessary to make sure instantiated templates are included 10420d21ab8bcSmrg # in the archive. 10421d21ab8bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10422d21ab8bcSmrg ;; 10423d21ab8bcSmrg esac 10424d21ab8bcSmrg ;; 10425d21ab8bcSmrg esac 10426d21ab8bcSmrg ;; 104272fd96bc7Smrg 10428d21ab8bcSmrg lynxos*) 10429d21ab8bcSmrg # FIXME: insert proper C++ library support 10430d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10431d21ab8bcSmrg ;; 104322fd96bc7Smrg 10433d21ab8bcSmrg m88k*) 10434d21ab8bcSmrg # FIXME: insert proper C++ library support 10435d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10436d21ab8bcSmrg ;; 104372fd96bc7Smrg 10438d21ab8bcSmrg mvs*) 10439d21ab8bcSmrg case $cc_basename in 10440d21ab8bcSmrg cxx*) 10441d21ab8bcSmrg # FIXME: insert proper C++ library support 10442d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10443d21ab8bcSmrg ;; 10444d21ab8bcSmrg *) 10445d21ab8bcSmrg # FIXME: insert proper C++ library support 10446d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10447d21ab8bcSmrg ;; 10448d21ab8bcSmrg esac 10449d21ab8bcSmrg ;; 104502fd96bc7Smrg 10451d21ab8bcSmrg netbsd*) 10452d21ab8bcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10453d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10454d21ab8bcSmrg wlarc= 10455d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10456d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10457d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10458d21ab8bcSmrg fi 10459d21ab8bcSmrg # Workaround some broken pre-1.5 toolchains 10460d21ab8bcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10461d21ab8bcSmrg ;; 104622fd96bc7Smrg 10463d21ab8bcSmrg *nto* | *qnx*) 10464d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 10465d21ab8bcSmrg ;; 104662fd96bc7Smrg 10467d21ab8bcSmrg openbsd* | bitrig*) 10468d21ab8bcSmrg if test -f /usr/libexec/ld.so; then 10469d21ab8bcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10470d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10471d21ab8bcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10472d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10473d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10474d21ab8bcSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10475d21ab8bcSmrg _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' 10476d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10477d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10478d21ab8bcSmrg fi 10479d21ab8bcSmrg output_verbose_link_cmd=func_echo_all 10480d21ab8bcSmrg else 10481d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10482d21ab8bcSmrg fi 10483d21ab8bcSmrg ;; 104842fd96bc7Smrg 10485d21ab8bcSmrg osf3* | osf4* | osf5*) 10486d21ab8bcSmrg case $cc_basename in 10487d21ab8bcSmrg KCC*) 10488d21ab8bcSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 104892fd96bc7Smrg 10490d21ab8bcSmrg # KCC will only create a shared library if the output file 10491d21ab8bcSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10492d21ab8bcSmrg # to its proper name (with version) after linking. 10493d21ab8bcSmrg _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' 104942fd96bc7Smrg 10495d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10496d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 104972fd96bc7Smrg 10498d21ab8bcSmrg # Archives containing C++ object files must be created using 10499d21ab8bcSmrg # the KAI C++ compiler. 10500d21ab8bcSmrg case $host in 10501d21ab8bcSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10502d21ab8bcSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10503d21ab8bcSmrg esac 10504d21ab8bcSmrg ;; 10505d21ab8bcSmrg RCC*) 10506d21ab8bcSmrg # Rational C++ 2.4.1 10507d21ab8bcSmrg # FIXME: insert proper C++ library support 10508d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10509d21ab8bcSmrg ;; 10510d21ab8bcSmrg cxx*) 10511d21ab8bcSmrg case $host in 10512d21ab8bcSmrg osf3*) 10513d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10514d21ab8bcSmrg _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' 10515d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10516d21ab8bcSmrg ;; 10517d21ab8bcSmrg *) 10518d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10519d21ab8bcSmrg _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' 10520d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10521d21ab8bcSmrg echo "-hidden">> $lib.exp~ 10522d21ab8bcSmrg $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~ 10523d21ab8bcSmrg $RM $lib.exp' 10524d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10525d21ab8bcSmrg ;; 10526d21ab8bcSmrg esac 105272fd96bc7Smrg 10528d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105292fd96bc7Smrg 10530d21ab8bcSmrg # Commands to make compiler produce verbose output that lists 10531d21ab8bcSmrg # what "hidden" libraries, object files and flags are used when 10532d21ab8bcSmrg # linking a shared library. 10533d21ab8bcSmrg # 10534d21ab8bcSmrg # There doesn't appear to be a way to prevent this compiler from 10535d21ab8bcSmrg # explicitly linking system object files so we need to strip them 10536d21ab8bcSmrg # from the output so that they don't get included in the library 10537d21ab8bcSmrg # dependencies. 10538d21ab8bcSmrg 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"' 10539d21ab8bcSmrg ;; 10540d21ab8bcSmrg *) 10541d21ab8bcSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 10542d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10543d21ab8bcSmrg case $host in 10544d21ab8bcSmrg osf3*) 10545d21ab8bcSmrg _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' 10546d21ab8bcSmrg ;; 10547d21ab8bcSmrg *) 10548d21ab8bcSmrg _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' 10549d21ab8bcSmrg ;; 10550d21ab8bcSmrg esac 105512fd96bc7Smrg 10552d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10553d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105542fd96bc7Smrg 10555d21ab8bcSmrg # Commands to make compiler produce verbose output that lists 10556d21ab8bcSmrg # what "hidden" libraries, object files and flags are used when 10557d21ab8bcSmrg # linking a shared library. 10558d21ab8bcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 105592fd96bc7Smrg 10560d21ab8bcSmrg else 10561d21ab8bcSmrg # FIXME: insert proper C++ library support 10562d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10563d21ab8bcSmrg fi 10564d21ab8bcSmrg ;; 10565d21ab8bcSmrg esac 10566d21ab8bcSmrg ;; 105672fd96bc7Smrg 10568d21ab8bcSmrg psos*) 10569d21ab8bcSmrg # FIXME: insert proper C++ library support 10570d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10571d21ab8bcSmrg ;; 105722fd96bc7Smrg 10573d21ab8bcSmrg sunos4*) 10574d21ab8bcSmrg case $cc_basename in 10575d21ab8bcSmrg CC*) 10576d21ab8bcSmrg # Sun C++ 4.x 10577d21ab8bcSmrg # FIXME: insert proper C++ library support 10578d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10579d21ab8bcSmrg ;; 10580d21ab8bcSmrg lcc*) 10581d21ab8bcSmrg # Lucid 10582d21ab8bcSmrg # FIXME: insert proper C++ library support 10583d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10584d21ab8bcSmrg ;; 10585d21ab8bcSmrg *) 10586d21ab8bcSmrg # FIXME: insert proper C++ library support 10587d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10588d21ab8bcSmrg ;; 10589d21ab8bcSmrg esac 10590d21ab8bcSmrg ;; 105912fd96bc7Smrg 10592d21ab8bcSmrg solaris*) 10593d21ab8bcSmrg case $cc_basename in 10594d21ab8bcSmrg CC* | sunCC*) 10595d21ab8bcSmrg # Sun C++ 4.2, 5.x and Centerline C++ 10596d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10597d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10598d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10599d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10600d21ab8bcSmrg $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' 106012fd96bc7Smrg 10602d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10603d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10604d21ab8bcSmrg case $host_os in 10605d21ab8bcSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10606d21ab8bcSmrg *) 10607d21ab8bcSmrg # The compiler driver will combine and reorder linker options, 10608d21ab8bcSmrg # but understands '-z linker_flag'. 10609d21ab8bcSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10610d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10611d21ab8bcSmrg ;; 10612d21ab8bcSmrg esac 10613d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10614d21ab8bcSmrg 10615d21ab8bcSmrg output_verbose_link_cmd='func_echo_all' 106162fd96bc7Smrg 10617d21ab8bcSmrg # Archives containing C++ object files must be created using 10618d21ab8bcSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10619d21ab8bcSmrg # necessary to make sure instantiated templates are included 10620d21ab8bcSmrg # in the archive. 10621d21ab8bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10622d21ab8bcSmrg ;; 10623d21ab8bcSmrg gcx*) 10624d21ab8bcSmrg # Green Hills C++ Compiler 10625d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 106262fd96bc7Smrg 10627d21ab8bcSmrg # The C++ compiler must be used to create the archive. 10628d21ab8bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10629d21ab8bcSmrg ;; 10630d21ab8bcSmrg *) 10631d21ab8bcSmrg # GNU C++ compiler with Solaris linker 10632d21ab8bcSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 10633d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10634d21ab8bcSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10635d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10636d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10637d21ab8bcSmrg $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' 106382fd96bc7Smrg 10639d21ab8bcSmrg # Commands to make compiler produce verbose output that lists 10640d21ab8bcSmrg # what "hidden" libraries, object files and flags are used when 10641d21ab8bcSmrg # linking a shared library. 10642d21ab8bcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10643d21ab8bcSmrg else 10644d21ab8bcSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 10645d21ab8bcSmrg # platform. 10646d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10647d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10648d21ab8bcSmrg $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' 106492fd96bc7Smrg 10650d21ab8bcSmrg # Commands to make compiler produce verbose output that lists 10651d21ab8bcSmrg # what "hidden" libraries, object files and flags are used when 10652d21ab8bcSmrg # linking a shared library. 10653d21ab8bcSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10654d21ab8bcSmrg fi 106552fd96bc7Smrg 10656d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10657d21ab8bcSmrg case $host_os in 10658d21ab8bcSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10659d21ab8bcSmrg *) 10660d21ab8bcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10661d21ab8bcSmrg ;; 10662d21ab8bcSmrg esac 10663d21ab8bcSmrg fi 10664d21ab8bcSmrg ;; 10665d21ab8bcSmrg esac 10666d21ab8bcSmrg ;; 106672fd96bc7Smrg 10668d21ab8bcSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10669d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10670d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10671d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10672d21ab8bcSmrg runpath_var='LD_RUN_PATH' 106732fd96bc7Smrg 10674d21ab8bcSmrg case $cc_basename in 10675d21ab8bcSmrg CC*) 10676d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10677d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10678d21ab8bcSmrg ;; 10679d21ab8bcSmrg *) 10680d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10681d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10682d21ab8bcSmrg ;; 10683d21ab8bcSmrg esac 10684d21ab8bcSmrg ;; 106852fd96bc7Smrg 10686d21ab8bcSmrg sysv5* | sco3.2v5* | sco5v6*) 10687d21ab8bcSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 10688d21ab8bcSmrg # link with -lc, and that would cause any symbols used from libc to 10689d21ab8bcSmrg # always be unresolved, which means just about no library would 10690d21ab8bcSmrg # ever link correctly. If we're not using GNU ld we use -z text 10691d21ab8bcSmrg # though, which does catch some bad symbols but isn't as heavy-handed 10692d21ab8bcSmrg # as -z defs. 10693d21ab8bcSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10694d21ab8bcSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10695d21ab8bcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10696d21ab8bcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10697d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10698d21ab8bcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10699d21ab8bcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10700d21ab8bcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10701d21ab8bcSmrg runpath_var='LD_RUN_PATH' 107022fd96bc7Smrg 10703d21ab8bcSmrg case $cc_basename in 10704d21ab8bcSmrg CC*) 10705d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10706d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10707d21ab8bcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10708d21ab8bcSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 10709d21ab8bcSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10710d21ab8bcSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 10711d21ab8bcSmrg ;; 10712d21ab8bcSmrg *) 10713d21ab8bcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10714d21ab8bcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10715d21ab8bcSmrg ;; 10716d21ab8bcSmrg esac 10717d21ab8bcSmrg ;; 107182fd96bc7Smrg 10719d21ab8bcSmrg tandem*) 10720d21ab8bcSmrg case $cc_basename in 10721d21ab8bcSmrg NCC*) 10722d21ab8bcSmrg # NonStop-UX NCC 3.20 10723d21ab8bcSmrg # FIXME: insert proper C++ library support 10724d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10725d21ab8bcSmrg ;; 10726d21ab8bcSmrg *) 10727d21ab8bcSmrg # FIXME: insert proper C++ library support 10728d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10729d21ab8bcSmrg ;; 10730d21ab8bcSmrg esac 10731d21ab8bcSmrg ;; 107322fd96bc7Smrg 10733d21ab8bcSmrg vxworks*) 10734d21ab8bcSmrg # FIXME: insert proper C++ library support 10735d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10736d21ab8bcSmrg ;; 107372fd96bc7Smrg 10738d21ab8bcSmrg *) 10739d21ab8bcSmrg # FIXME: insert proper C++ library support 10740d21ab8bcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10741d21ab8bcSmrg ;; 10742d21ab8bcSmrg esac 107432fd96bc7Smrg 10744d21ab8bcSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10745d21ab8bcSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 107462fd96bc7Smrg 10747d21ab8bcSmrg _LT_TAGVAR(GCC, $1)=$GXX 10748d21ab8bcSmrg _LT_TAGVAR(LD, $1)=$LD 107492fd96bc7Smrg 10750d21ab8bcSmrg ## CAVEAT EMPTOR: 10751d21ab8bcSmrg ## There is no encapsulation within the following macros, do not change 10752d21ab8bcSmrg ## the running order or otherwise move them around unless you know exactly 10753d21ab8bcSmrg ## what you are doing... 10754d21ab8bcSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 10755d21ab8bcSmrg _LT_COMPILER_PIC($1) 10756d21ab8bcSmrg _LT_COMPILER_C_O($1) 10757d21ab8bcSmrg _LT_COMPILER_FILE_LOCKS($1) 10758d21ab8bcSmrg _LT_LINKER_SHLIBS($1) 10759d21ab8bcSmrg _LT_SYS_DYNAMIC_LINKER($1) 10760d21ab8bcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 107612fd96bc7Smrg 10762d21ab8bcSmrg _LT_CONFIG($1) 10763d21ab8bcSmrg fi # test -n "$compiler" 107642fd96bc7Smrg 10765d21ab8bcSmrg CC=$lt_save_CC 10766d21ab8bcSmrg CFLAGS=$lt_save_CFLAGS 10767d21ab8bcSmrg LDCXX=$LD 10768d21ab8bcSmrg LD=$lt_save_LD 10769d21ab8bcSmrg GCC=$lt_save_GCC 10770d21ab8bcSmrg with_gnu_ld=$lt_save_with_gnu_ld 10771d21ab8bcSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 10772d21ab8bcSmrg lt_cv_path_LD=$lt_save_path_LD 10773d21ab8bcSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10774d21ab8bcSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10775d21ab8bcSmrgfi # test yes != "$_lt_caught_CXX_error" 107762fd96bc7Smrg 10777d21ab8bcSmrgAC_LANG_POP 10778d21ab8bcSmrg])# _LT_LANG_CXX_CONFIG 107792fd96bc7Smrg 10780d21ab8bcSmrg 10781d21ab8bcSmrg# _LT_FUNC_STRIPNAME_CNF 10782d21ab8bcSmrg# ---------------------- 10783d21ab8bcSmrg# func_stripname_cnf prefix suffix name 10784d21ab8bcSmrg# strip PREFIX and SUFFIX off of NAME. 10785d21ab8bcSmrg# PREFIX and SUFFIX must not contain globbing or regex special 10786d21ab8bcSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 10787d21ab8bcSmrg# dot (in which case that matches only a dot). 107882fd96bc7Smrg# 10789d21ab8bcSmrg# This function is identical to the (non-XSI) version of func_stripname, 10790d21ab8bcSmrg# except this one can be used by m4 code that may be executed by configure, 10791d21ab8bcSmrg# rather than the libtool script. 10792d21ab8bcSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10793d21ab8bcSmrgAC_REQUIRE([_LT_DECL_SED]) 10794d21ab8bcSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10795d21ab8bcSmrgfunc_stripname_cnf () 10796d21ab8bcSmrg{ 10797d21ab8bcSmrg case @S|@2 in 10798d21ab8bcSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10799d21ab8bcSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10800d21ab8bcSmrg esac 10801d21ab8bcSmrg} # func_stripname_cnf 10802d21ab8bcSmrg])# _LT_FUNC_STRIPNAME_CNF 108032fd96bc7Smrg 108042fd96bc7Smrg 10805d21ab8bcSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10806d21ab8bcSmrg# --------------------------------- 10807d21ab8bcSmrg# Figure out "hidden" library dependencies from verbose 10808d21ab8bcSmrg# compiler output when linking a shared library. 10809d21ab8bcSmrg# Parse the compiler output and extract the necessary 10810d21ab8bcSmrg# objects, libraries and library flags. 10811d21ab8bcSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10812d21ab8bcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10813d21ab8bcSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10814d21ab8bcSmrg# Dependencies to place before and after the object being linked: 10815d21ab8bcSmrg_LT_TAGVAR(predep_objects, $1)= 10816d21ab8bcSmrg_LT_TAGVAR(postdep_objects, $1)= 10817d21ab8bcSmrg_LT_TAGVAR(predeps, $1)= 10818d21ab8bcSmrg_LT_TAGVAR(postdeps, $1)= 10819d21ab8bcSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 108202fd96bc7Smrg 10821d21ab8bcSmrgdnl we can't use the lt_simple_compile_test_code here, 10822d21ab8bcSmrgdnl because it contains code intended for an executable, 10823d21ab8bcSmrgdnl not a library. It's possible we should let each 10824d21ab8bcSmrgdnl tag define a new lt_????_link_test_code variable, 10825d21ab8bcSmrgdnl but it's only used here... 10826d21ab8bcSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10827d21ab8bcSmrgint a; 10828d21ab8bcSmrgvoid foo (void) { a = 0; } 10829d21ab8bcSmrg_LT_EOF 10830d21ab8bcSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10831d21ab8bcSmrgclass Foo 10832d21ab8bcSmrg{ 10833d21ab8bcSmrgpublic: 10834d21ab8bcSmrg Foo (void) { a = 0; } 10835d21ab8bcSmrgprivate: 10836d21ab8bcSmrg int a; 10837d21ab8bcSmrg}; 10838d21ab8bcSmrg_LT_EOF 10839d21ab8bcSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10840d21ab8bcSmrg subroutine foo 10841d21ab8bcSmrg implicit none 10842d21ab8bcSmrg integer*4 a 10843d21ab8bcSmrg a=0 10844d21ab8bcSmrg return 10845d21ab8bcSmrg end 10846d21ab8bcSmrg_LT_EOF 10847d21ab8bcSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10848d21ab8bcSmrg subroutine foo 10849d21ab8bcSmrg implicit none 10850d21ab8bcSmrg integer a 10851d21ab8bcSmrg a=0 10852d21ab8bcSmrg return 10853d21ab8bcSmrg end 10854d21ab8bcSmrg_LT_EOF 10855d21ab8bcSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10856d21ab8bcSmrgpublic class foo { 10857d21ab8bcSmrg private int a; 10858d21ab8bcSmrg public void bar (void) { 10859d21ab8bcSmrg a = 0; 10860d21ab8bcSmrg } 10861d21ab8bcSmrg}; 10862d21ab8bcSmrg_LT_EOF 10863d21ab8bcSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10864d21ab8bcSmrgpackage foo 10865d21ab8bcSmrgfunc foo() { 10866d21ab8bcSmrg} 10867d21ab8bcSmrg_LT_EOF 10868d21ab8bcSmrg]) 108692fd96bc7Smrg 10870d21ab8bcSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 10871d21ab8bcSmrgcase "$CC $CFLAGS " in #( 10872d21ab8bcSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10873d21ab8bcSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10874d21ab8bcSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 108752fd96bc7Smrgesac 108762fd96bc7Smrg 10877d21ab8bcSmrgdnl Parse the compiler output and extract the necessary 10878d21ab8bcSmrgdnl objects, libraries and library flags. 10879d21ab8bcSmrgif AC_TRY_EVAL(ac_compile); then 10880d21ab8bcSmrg # Parse the compiler output and extract the necessary 10881d21ab8bcSmrg # objects, libraries and library flags. 108822fd96bc7Smrg 10883d21ab8bcSmrg # Sentinel used to keep track of whether or not we are before 10884d21ab8bcSmrg # the conftest object file. 10885d21ab8bcSmrg pre_test_object_deps_done=no 108862fd96bc7Smrg 10887d21ab8bcSmrg for p in `eval "$output_verbose_link_cmd"`; do 10888d21ab8bcSmrg case $prev$p in 108892fd96bc7Smrg 10890d21ab8bcSmrg -L* | -R* | -l*) 10891d21ab8bcSmrg # Some compilers place space between "-{L,R}" and the path. 10892d21ab8bcSmrg # Remove the space. 10893d21ab8bcSmrg if test x-L = "$p" || 10894d21ab8bcSmrg test x-R = "$p"; then 10895d21ab8bcSmrg prev=$p 10896d21ab8bcSmrg continue 10897d21ab8bcSmrg fi 10898d21ab8bcSmrg 10899d21ab8bcSmrg # Expand the sysroot to ease extracting the directories later. 10900d21ab8bcSmrg if test -z "$prev"; then 10901d21ab8bcSmrg case $p in 10902d21ab8bcSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 10903d21ab8bcSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 10904d21ab8bcSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 10905d21ab8bcSmrg esac 10906d21ab8bcSmrg fi 10907d21ab8bcSmrg case $p in 10908d21ab8bcSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 10909d21ab8bcSmrg esac 10910d21ab8bcSmrg if test no = "$pre_test_object_deps_done"; then 10911d21ab8bcSmrg case $prev in 10912d21ab8bcSmrg -L | -R) 10913d21ab8bcSmrg # Internal compiler library paths should come after those 10914d21ab8bcSmrg # provided the user. The postdeps already come after the 10915d21ab8bcSmrg # user supplied libs so there is no need to process them. 10916d21ab8bcSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 10917d21ab8bcSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 10918d21ab8bcSmrg else 10919d21ab8bcSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 10920d21ab8bcSmrg fi 10921d21ab8bcSmrg ;; 10922d21ab8bcSmrg # The "-l" case would never come before the object being 10923d21ab8bcSmrg # linked, so don't bother handling this case. 10924d21ab8bcSmrg esac 10925d21ab8bcSmrg else 10926d21ab8bcSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 10927d21ab8bcSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 10928d21ab8bcSmrg else 10929d21ab8bcSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 10930d21ab8bcSmrg fi 10931d21ab8bcSmrg fi 10932d21ab8bcSmrg prev= 10933d21ab8bcSmrg ;; 109342fd96bc7Smrg 10935d21ab8bcSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 10936d21ab8bcSmrg *.$objext) 10937d21ab8bcSmrg # This assumes that the test object file only shows up 10938d21ab8bcSmrg # once in the compiler output. 10939d21ab8bcSmrg if test "$p" = "conftest.$objext"; then 10940d21ab8bcSmrg pre_test_object_deps_done=yes 10941d21ab8bcSmrg continue 10942d21ab8bcSmrg fi 1094389c04b6cSmrg 10944d21ab8bcSmrg if test no = "$pre_test_object_deps_done"; then 10945d21ab8bcSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 10946d21ab8bcSmrg _LT_TAGVAR(predep_objects, $1)=$p 10947d21ab8bcSmrg else 10948d21ab8bcSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 10949d21ab8bcSmrg fi 10950d21ab8bcSmrg else 10951d21ab8bcSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 10952d21ab8bcSmrg _LT_TAGVAR(postdep_objects, $1)=$p 10953d21ab8bcSmrg else 10954d21ab8bcSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 10955d21ab8bcSmrg fi 10956d21ab8bcSmrg fi 10957d21ab8bcSmrg ;; 1095889c04b6cSmrg 10959d21ab8bcSmrg *) ;; # Ignore the rest. 1096089c04b6cSmrg 10961d21ab8bcSmrg esac 10962d21ab8bcSmrg done 1096389c04b6cSmrg 10964d21ab8bcSmrg # Clean up. 10965d21ab8bcSmrg rm -f a.out a.exe 10966d21ab8bcSmrgelse 10967d21ab8bcSmrg echo "libtool.m4: error: problem compiling $1 test program" 10968d21ab8bcSmrgfi 1096989c04b6cSmrg 10970d21ab8bcSmrg$RM -f confest.$objext 10971d21ab8bcSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 1097289c04b6cSmrg 10973d21ab8bcSmrg# PORTME: override above test on systems where it is broken 10974d21ab8bcSmrgm4_if([$1], [CXX], 10975d21ab8bcSmrg[case $host_os in 10976d21ab8bcSmrginterix[[3-9]]*) 10977d21ab8bcSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 10978d21ab8bcSmrg # hack all around it, let's just trust "g++" to DTRT. 10979d21ab8bcSmrg _LT_TAGVAR(predep_objects,$1)= 10980d21ab8bcSmrg _LT_TAGVAR(postdep_objects,$1)= 10981d21ab8bcSmrg _LT_TAGVAR(postdeps,$1)= 10982d21ab8bcSmrg ;; 10983d21ab8bcSmrgesac 10984d21ab8bcSmrg]) 109852fd96bc7Smrg 10986d21ab8bcSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 10987d21ab8bcSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 10988d21ab8bcSmrgesac 10989d21ab8bcSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 10990d21ab8bcSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 10991d21ab8bcSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 10992d21ab8bcSmrgfi 10993d21ab8bcSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 10994d21ab8bcSmrg [The directories searched by this compiler when creating a shared library]) 10995d21ab8bcSmrg_LT_TAGDECL([], [predep_objects], [1], 10996d21ab8bcSmrg [Dependencies to place before and after the objects being linked to 10997d21ab8bcSmrg create a shared library]) 10998d21ab8bcSmrg_LT_TAGDECL([], [postdep_objects], [1]) 10999d21ab8bcSmrg_LT_TAGDECL([], [predeps], [1]) 11000d21ab8bcSmrg_LT_TAGDECL([], [postdeps], [1]) 11001d21ab8bcSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11002d21ab8bcSmrg [The library search path used internally by the compiler when linking 11003d21ab8bcSmrg a shared library]) 11004d21ab8bcSmrg])# _LT_SYS_HIDDEN_LIBDEPS 1100589c04b6cSmrg 1100689c04b6cSmrg 11007d21ab8bcSmrg# _LT_LANG_F77_CONFIG([TAG]) 11008d21ab8bcSmrg# -------------------------- 11009d21ab8bcSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 11010d21ab8bcSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11011d21ab8bcSmrg# to write the compiler configuration to 'libtool'. 11012d21ab8bcSmrgm4_defun([_LT_LANG_F77_CONFIG], 11013d21ab8bcSmrg[AC_LANG_PUSH(Fortran 77) 11014d21ab8bcSmrgif test -z "$F77" || test no = "$F77"; then 11015d21ab8bcSmrg _lt_disable_F77=yes 11016d21ab8bcSmrgfi 1101789c04b6cSmrg 11018d21ab8bcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11019d21ab8bcSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 11020d21ab8bcSmrg_LT_TAGVAR(always_export_symbols, $1)=no 11021d21ab8bcSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11022d21ab8bcSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11023d21ab8bcSmrg_LT_TAGVAR(hardcode_direct, $1)=no 11024d21ab8bcSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11025d21ab8bcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11026d21ab8bcSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11027d21ab8bcSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11028d21ab8bcSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 11029d21ab8bcSmrg_LT_TAGVAR(inherit_rpath, $1)=no 11030d21ab8bcSmrg_LT_TAGVAR(module_cmds, $1)= 11031d21ab8bcSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 11032d21ab8bcSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11033d21ab8bcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11034d21ab8bcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11035d21ab8bcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11036d21ab8bcSmrg_LT_TAGVAR(no_undefined_flag, $1)= 11037d21ab8bcSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11038d21ab8bcSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 1103989c04b6cSmrg 11040d21ab8bcSmrg# Source file extension for f77 test sources. 11041d21ab8bcSmrgac_ext=f 1104289c04b6cSmrg 11043d21ab8bcSmrg# Object file extension for compiled f77 test sources. 11044d21ab8bcSmrgobjext=o 11045d21ab8bcSmrg_LT_TAGVAR(objext, $1)=$objext 1104689c04b6cSmrg 11047d21ab8bcSmrg# No sense in running all these tests if we already determined that 11048d21ab8bcSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 11049d21ab8bcSmrg# are currently assumed to apply to all compilers on this platform, 11050d21ab8bcSmrg# and will be corrupted by setting them based on a non-working compiler. 11051d21ab8bcSmrgif test yes != "$_lt_disable_F77"; then 11052d21ab8bcSmrg # Code to be used in simple compile tests 11053d21ab8bcSmrg lt_simple_compile_test_code="\ 11054d21ab8bcSmrg subroutine t 11055d21ab8bcSmrg return 11056d21ab8bcSmrg end 11057d21ab8bcSmrg" 1105889c04b6cSmrg 11059d21ab8bcSmrg # Code to be used in simple link tests 11060d21ab8bcSmrg lt_simple_link_test_code="\ 11061d21ab8bcSmrg program t 11062d21ab8bcSmrg end 11063d21ab8bcSmrg" 1106489c04b6cSmrg 11065d21ab8bcSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11066d21ab8bcSmrg _LT_TAG_COMPILER 1106789c04b6cSmrg 11068d21ab8bcSmrg # save warnings/boilerplate of simple test code 11069d21ab8bcSmrg _LT_COMPILER_BOILERPLATE 11070d21ab8bcSmrg _LT_LINKER_BOILERPLATE 1107189c04b6cSmrg 11072d21ab8bcSmrg # Allow CC to be a program name with arguments. 11073d21ab8bcSmrg lt_save_CC=$CC 11074d21ab8bcSmrg lt_save_GCC=$GCC 11075d21ab8bcSmrg lt_save_CFLAGS=$CFLAGS 11076d21ab8bcSmrg CC=${F77-"f77"} 11077d21ab8bcSmrg CFLAGS=$FFLAGS 11078d21ab8bcSmrg compiler=$CC 11079d21ab8bcSmrg _LT_TAGVAR(compiler, $1)=$CC 11080d21ab8bcSmrg _LT_CC_BASENAME([$compiler]) 11081d21ab8bcSmrg GCC=$G77 11082d21ab8bcSmrg if test -n "$compiler"; then 11083d21ab8bcSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11084d21ab8bcSmrg AC_MSG_RESULT([$can_build_shared]) 110852fd96bc7Smrg 11086d21ab8bcSmrg AC_MSG_CHECKING([whether to build shared libraries]) 11087d21ab8bcSmrg test no = "$can_build_shared" && enable_shared=no 110882fd96bc7Smrg 11089d21ab8bcSmrg # On AIX, shared libraries and static libraries use the same namespace, and 11090d21ab8bcSmrg # are all built from PIC. 11091d21ab8bcSmrg case $host_os in 11092d21ab8bcSmrg aix3*) 11093d21ab8bcSmrg test yes = "$enable_shared" && enable_static=no 11094d21ab8bcSmrg if test -n "$RANLIB"; then 11095d21ab8bcSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11096d21ab8bcSmrg postinstall_cmds='$RANLIB $lib' 11097d21ab8bcSmrg fi 11098d21ab8bcSmrg ;; 11099d21ab8bcSmrg aix[[4-9]]*) 11100d21ab8bcSmrg if test ia64 != "$host_cpu"; then 11101d21ab8bcSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11102d21ab8bcSmrg yes,aix,yes) ;; # shared object as lib.so file only 11103d21ab8bcSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 11104d21ab8bcSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11105d21ab8bcSmrg esac 11106d21ab8bcSmrg fi 11107d21ab8bcSmrg ;; 11108d21ab8bcSmrg esac 11109d21ab8bcSmrg AC_MSG_RESULT([$enable_shared]) 1111089c04b6cSmrg 11111d21ab8bcSmrg AC_MSG_CHECKING([whether to build static libraries]) 11112d21ab8bcSmrg # Make sure either enable_shared or enable_static is yes. 11113d21ab8bcSmrg test yes = "$enable_shared" || enable_static=yes 11114d21ab8bcSmrg AC_MSG_RESULT([$enable_static]) 111151f0ac6a5Smrg 11116d21ab8bcSmrg _LT_TAGVAR(GCC, $1)=$G77 11117d21ab8bcSmrg _LT_TAGVAR(LD, $1)=$LD 111181f0ac6a5Smrg 11119d21ab8bcSmrg ## CAVEAT EMPTOR: 11120d21ab8bcSmrg ## There is no encapsulation within the following macros, do not change 11121d21ab8bcSmrg ## the running order or otherwise move them around unless you know exactly 11122d21ab8bcSmrg ## what you are doing... 11123d21ab8bcSmrg _LT_COMPILER_PIC($1) 11124d21ab8bcSmrg _LT_COMPILER_C_O($1) 11125d21ab8bcSmrg _LT_COMPILER_FILE_LOCKS($1) 11126d21ab8bcSmrg _LT_LINKER_SHLIBS($1) 11127d21ab8bcSmrg _LT_SYS_DYNAMIC_LINKER($1) 11128d21ab8bcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 111291f0ac6a5Smrg 11130d21ab8bcSmrg _LT_CONFIG($1) 11131d21ab8bcSmrg fi # test -n "$compiler" 111321f0ac6a5Smrg 11133d21ab8bcSmrg GCC=$lt_save_GCC 11134d21ab8bcSmrg CC=$lt_save_CC 11135d21ab8bcSmrg CFLAGS=$lt_save_CFLAGS 11136d21ab8bcSmrgfi # test yes != "$_lt_disable_F77" 111371f0ac6a5Smrg 11138d21ab8bcSmrgAC_LANG_POP 11139d21ab8bcSmrg])# _LT_LANG_F77_CONFIG 111401f0ac6a5Smrg 111419c9ff80cSmrg 11142d21ab8bcSmrg# _LT_LANG_FC_CONFIG([TAG]) 11143d21ab8bcSmrg# ------------------------- 11144d21ab8bcSmrg# Ensure that the configuration variables for a Fortran compiler are 11145d21ab8bcSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11146d21ab8bcSmrg# to write the compiler configuration to 'libtool'. 11147d21ab8bcSmrgm4_defun([_LT_LANG_FC_CONFIG], 11148d21ab8bcSmrg[AC_LANG_PUSH(Fortran) 111499c9ff80cSmrg 11150d21ab8bcSmrgif test -z "$FC" || test no = "$FC"; then 11151d21ab8bcSmrg _lt_disable_FC=yes 111526fae4e5dSmrgfi 111539c9ff80cSmrg 11154d21ab8bcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11155d21ab8bcSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 11156d21ab8bcSmrg_LT_TAGVAR(always_export_symbols, $1)=no 11157d21ab8bcSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11158d21ab8bcSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11159d21ab8bcSmrg_LT_TAGVAR(hardcode_direct, $1)=no 11160d21ab8bcSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11161d21ab8bcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11162d21ab8bcSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11163d21ab8bcSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11164d21ab8bcSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 11165d21ab8bcSmrg_LT_TAGVAR(inherit_rpath, $1)=no 11166d21ab8bcSmrg_LT_TAGVAR(module_cmds, $1)= 11167d21ab8bcSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 11168d21ab8bcSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11169d21ab8bcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11170d21ab8bcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11171d21ab8bcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11172d21ab8bcSmrg_LT_TAGVAR(no_undefined_flag, $1)= 11173d21ab8bcSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11174d21ab8bcSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 111759c9ff80cSmrg 11176d21ab8bcSmrg# Source file extension for fc test sources. 11177d21ab8bcSmrgac_ext=${ac_fc_srcext-f} 111789c9ff80cSmrg 11179d21ab8bcSmrg# Object file extension for compiled fc test sources. 11180d21ab8bcSmrgobjext=o 11181d21ab8bcSmrg_LT_TAGVAR(objext, $1)=$objext 11182d21ab8bcSmrg 11183d21ab8bcSmrg# No sense in running all these tests if we already determined that 11184d21ab8bcSmrg# the FC compiler isn't working. Some variables (like enable_shared) 11185d21ab8bcSmrg# are currently assumed to apply to all compilers on this platform, 11186d21ab8bcSmrg# and will be corrupted by setting them based on a non-working compiler. 11187d21ab8bcSmrgif test yes != "$_lt_disable_FC"; then 11188d21ab8bcSmrg # Code to be used in simple compile tests 11189d21ab8bcSmrg lt_simple_compile_test_code="\ 11190d21ab8bcSmrg subroutine t 11191d21ab8bcSmrg return 11192d21ab8bcSmrg end 11193d21ab8bcSmrg" 111949c9ff80cSmrg 11195d21ab8bcSmrg # Code to be used in simple link tests 11196d21ab8bcSmrg lt_simple_link_test_code="\ 11197d21ab8bcSmrg program t 11198d21ab8bcSmrg end 11199d21ab8bcSmrg" 112009c9ff80cSmrg 11201d21ab8bcSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11202d21ab8bcSmrg _LT_TAG_COMPILER 112039c9ff80cSmrg 11204d21ab8bcSmrg # save warnings/boilerplate of simple test code 11205d21ab8bcSmrg _LT_COMPILER_BOILERPLATE 11206d21ab8bcSmrg _LT_LINKER_BOILERPLATE 112071f0ac6a5Smrg 11208d21ab8bcSmrg # Allow CC to be a program name with arguments. 11209d21ab8bcSmrg lt_save_CC=$CC 11210d21ab8bcSmrg lt_save_GCC=$GCC 11211d21ab8bcSmrg lt_save_CFLAGS=$CFLAGS 11212d21ab8bcSmrg CC=${FC-"f95"} 11213d21ab8bcSmrg CFLAGS=$FCFLAGS 11214d21ab8bcSmrg compiler=$CC 11215d21ab8bcSmrg GCC=$ac_cv_fc_compiler_gnu 112161f0ac6a5Smrg 11217d21ab8bcSmrg _LT_TAGVAR(compiler, $1)=$CC 11218d21ab8bcSmrg _LT_CC_BASENAME([$compiler]) 112199c9ff80cSmrg 11220d21ab8bcSmrg if test -n "$compiler"; then 11221d21ab8bcSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11222d21ab8bcSmrg AC_MSG_RESULT([$can_build_shared]) 112231f0ac6a5Smrg 11224d21ab8bcSmrg AC_MSG_CHECKING([whether to build shared libraries]) 11225d21ab8bcSmrg test no = "$can_build_shared" && enable_shared=no 112261f0ac6a5Smrg 11227d21ab8bcSmrg # On AIX, shared libraries and static libraries use the same namespace, and 11228d21ab8bcSmrg # are all built from PIC. 11229d21ab8bcSmrg case $host_os in 11230d21ab8bcSmrg aix3*) 11231d21ab8bcSmrg test yes = "$enable_shared" && enable_static=no 11232d21ab8bcSmrg if test -n "$RANLIB"; then 11233d21ab8bcSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11234d21ab8bcSmrg postinstall_cmds='$RANLIB $lib' 11235d21ab8bcSmrg fi 11236d21ab8bcSmrg ;; 11237d21ab8bcSmrg aix[[4-9]]*) 11238d21ab8bcSmrg if test ia64 != "$host_cpu"; then 11239d21ab8bcSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11240d21ab8bcSmrg yes,aix,yes) ;; # shared object as lib.so file only 11241d21ab8bcSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 11242d21ab8bcSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11243d21ab8bcSmrg esac 11244d21ab8bcSmrg fi 11245d21ab8bcSmrg ;; 11246d21ab8bcSmrg esac 11247d21ab8bcSmrg AC_MSG_RESULT([$enable_shared]) 112481f0ac6a5Smrg 11249d21ab8bcSmrg AC_MSG_CHECKING([whether to build static libraries]) 11250d21ab8bcSmrg # Make sure either enable_shared or enable_static is yes. 11251d21ab8bcSmrg test yes = "$enable_shared" || enable_static=yes 11252d21ab8bcSmrg AC_MSG_RESULT([$enable_static]) 112531f0ac6a5Smrg 11254d21ab8bcSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11255d21ab8bcSmrg _LT_TAGVAR(LD, $1)=$LD 112561f0ac6a5Smrg 11257d21ab8bcSmrg ## CAVEAT EMPTOR: 11258d21ab8bcSmrg ## There is no encapsulation within the following macros, do not change 11259d21ab8bcSmrg ## the running order or otherwise move them around unless you know exactly 11260d21ab8bcSmrg ## what you are doing... 11261d21ab8bcSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 11262d21ab8bcSmrg _LT_COMPILER_PIC($1) 11263d21ab8bcSmrg _LT_COMPILER_C_O($1) 11264d21ab8bcSmrg _LT_COMPILER_FILE_LOCKS($1) 11265d21ab8bcSmrg _LT_LINKER_SHLIBS($1) 11266d21ab8bcSmrg _LT_SYS_DYNAMIC_LINKER($1) 11267d21ab8bcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 112681f0ac6a5Smrg 11269d21ab8bcSmrg _LT_CONFIG($1) 11270d21ab8bcSmrg fi # test -n "$compiler" 112711f0ac6a5Smrg 11272d21ab8bcSmrg GCC=$lt_save_GCC 11273d21ab8bcSmrg CC=$lt_save_CC 11274d21ab8bcSmrg CFLAGS=$lt_save_CFLAGS 11275d21ab8bcSmrgfi # test yes != "$_lt_disable_FC" 112761f0ac6a5Smrg 11277d21ab8bcSmrgAC_LANG_POP 11278d21ab8bcSmrg])# _LT_LANG_FC_CONFIG 112791f0ac6a5Smrg 112801f0ac6a5Smrg 11281d21ab8bcSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 11282d21ab8bcSmrg# -------------------------- 11283d21ab8bcSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11284d21ab8bcSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11285d21ab8bcSmrg# to write the compiler configuration to 'libtool'. 11286d21ab8bcSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 11287d21ab8bcSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11288d21ab8bcSmrgAC_LANG_SAVE 112891f0ac6a5Smrg 11290d21ab8bcSmrg# Source file extension for Java test sources. 11291d21ab8bcSmrgac_ext=java 112921f0ac6a5Smrg 11293d21ab8bcSmrg# Object file extension for compiled Java test sources. 11294d21ab8bcSmrgobjext=o 11295d21ab8bcSmrg_LT_TAGVAR(objext, $1)=$objext 112961f0ac6a5Smrg 11297d21ab8bcSmrg# Code to be used in simple compile tests 11298d21ab8bcSmrglt_simple_compile_test_code="class foo {}" 112991f0ac6a5Smrg 11300d21ab8bcSmrg# Code to be used in simple link tests 11301d21ab8bcSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 113021f0ac6a5Smrg 11303d21ab8bcSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11304d21ab8bcSmrg_LT_TAG_COMPILER 113051f0ac6a5Smrg 11306d21ab8bcSmrg# save warnings/boilerplate of simple test code 11307d21ab8bcSmrg_LT_COMPILER_BOILERPLATE 11308d21ab8bcSmrg_LT_LINKER_BOILERPLATE 113091f0ac6a5Smrg 11310d21ab8bcSmrg# Allow CC to be a program name with arguments. 11311d21ab8bcSmrglt_save_CC=$CC 11312d21ab8bcSmrglt_save_CFLAGS=$CFLAGS 11313d21ab8bcSmrglt_save_GCC=$GCC 11314d21ab8bcSmrgGCC=yes 11315d21ab8bcSmrgCC=${GCJ-"gcj"} 11316d21ab8bcSmrgCFLAGS=$GCJFLAGS 11317d21ab8bcSmrgcompiler=$CC 11318d21ab8bcSmrg_LT_TAGVAR(compiler, $1)=$CC 11319d21ab8bcSmrg_LT_TAGVAR(LD, $1)=$LD 11320d21ab8bcSmrg_LT_CC_BASENAME([$compiler]) 113211f0ac6a5Smrg 11322d21ab8bcSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11323d21ab8bcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 113241f0ac6a5Smrg 11325d21ab8bcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11326d21ab8bcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11327d21ab8bcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 113281f0ac6a5Smrg 11329d21ab8bcSmrgif test -n "$compiler"; then 11330d21ab8bcSmrg _LT_COMPILER_NO_RTTI($1) 11331d21ab8bcSmrg _LT_COMPILER_PIC($1) 11332d21ab8bcSmrg _LT_COMPILER_C_O($1) 11333d21ab8bcSmrg _LT_COMPILER_FILE_LOCKS($1) 11334d21ab8bcSmrg _LT_LINKER_SHLIBS($1) 11335d21ab8bcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 113361f0ac6a5Smrg 11337d21ab8bcSmrg _LT_CONFIG($1) 113386fae4e5dSmrgfi 113391f0ac6a5Smrg 11340d21ab8bcSmrgAC_LANG_RESTORE 113411f0ac6a5Smrg 11342d21ab8bcSmrgGCC=$lt_save_GCC 11343d21ab8bcSmrgCC=$lt_save_CC 11344d21ab8bcSmrgCFLAGS=$lt_save_CFLAGS 11345d21ab8bcSmrg])# _LT_LANG_GCJ_CONFIG 113461f0ac6a5Smrg 113479c9ff80cSmrg 11348d21ab8bcSmrg# _LT_LANG_GO_CONFIG([TAG]) 11349d21ab8bcSmrg# -------------------------- 11350d21ab8bcSmrg# Ensure that the configuration variables for the GNU Go compiler 11351d21ab8bcSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11352d21ab8bcSmrg# to write the compiler configuration to 'libtool'. 11353d21ab8bcSmrgm4_defun([_LT_LANG_GO_CONFIG], 11354d21ab8bcSmrg[AC_REQUIRE([LT_PROG_GO])dnl 11355d21ab8bcSmrgAC_LANG_SAVE 113566fae4e5dSmrg 11357d21ab8bcSmrg# Source file extension for Go test sources. 11358d21ab8bcSmrgac_ext=go 113596fae4e5dSmrg 11360d21ab8bcSmrg# Object file extension for compiled Go test sources. 11361d21ab8bcSmrgobjext=o 11362d21ab8bcSmrg_LT_TAGVAR(objext, $1)=$objext 113636fae4e5dSmrg 11364d21ab8bcSmrg# Code to be used in simple compile tests 11365d21ab8bcSmrglt_simple_compile_test_code="package main; func main() { }" 113666fae4e5dSmrg 11367d21ab8bcSmrg# Code to be used in simple link tests 11368d21ab8bcSmrglt_simple_link_test_code='package main; func main() { }' 113691f0ac6a5Smrg 11370d21ab8bcSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11371d21ab8bcSmrg_LT_TAG_COMPILER 113721f0ac6a5Smrg 11373d21ab8bcSmrg# save warnings/boilerplate of simple test code 11374d21ab8bcSmrg_LT_COMPILER_BOILERPLATE 11375d21ab8bcSmrg_LT_LINKER_BOILERPLATE 113766fae4e5dSmrg 11377d21ab8bcSmrg# Allow CC to be a program name with arguments. 11378d21ab8bcSmrglt_save_CC=$CC 11379d21ab8bcSmrglt_save_CFLAGS=$CFLAGS 11380d21ab8bcSmrglt_save_GCC=$GCC 11381d21ab8bcSmrgGCC=yes 11382d21ab8bcSmrgCC=${GOC-"gccgo"} 11383d21ab8bcSmrgCFLAGS=$GOFLAGS 11384d21ab8bcSmrgcompiler=$CC 11385d21ab8bcSmrg_LT_TAGVAR(compiler, $1)=$CC 11386d21ab8bcSmrg_LT_TAGVAR(LD, $1)=$LD 11387d21ab8bcSmrg_LT_CC_BASENAME([$compiler]) 11388d21ab8bcSmrg 11389d21ab8bcSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 11390d21ab8bcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11391d21ab8bcSmrg 11392d21ab8bcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11393d21ab8bcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11394d21ab8bcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11395d21ab8bcSmrg 11396d21ab8bcSmrgif test -n "$compiler"; then 11397d21ab8bcSmrg _LT_COMPILER_NO_RTTI($1) 11398d21ab8bcSmrg _LT_COMPILER_PIC($1) 11399d21ab8bcSmrg _LT_COMPILER_C_O($1) 11400d21ab8bcSmrg _LT_COMPILER_FILE_LOCKS($1) 11401d21ab8bcSmrg _LT_LINKER_SHLIBS($1) 11402d21ab8bcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11403d21ab8bcSmrg 11404d21ab8bcSmrg _LT_CONFIG($1) 114056fae4e5dSmrgfi 114061f0ac6a5Smrg 11407d21ab8bcSmrgAC_LANG_RESTORE 114081f0ac6a5Smrg 11409d21ab8bcSmrgGCC=$lt_save_GCC 11410d21ab8bcSmrgCC=$lt_save_CC 11411d21ab8bcSmrgCFLAGS=$lt_save_CFLAGS 11412d21ab8bcSmrg])# _LT_LANG_GO_CONFIG 114131f0ac6a5Smrg 114141f0ac6a5Smrg 11415d21ab8bcSmrg# _LT_LANG_RC_CONFIG([TAG]) 11416d21ab8bcSmrg# ------------------------- 11417d21ab8bcSmrg# Ensure that the configuration variables for the Windows resource compiler 11418d21ab8bcSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11419d21ab8bcSmrg# to write the compiler configuration to 'libtool'. 11420d21ab8bcSmrgm4_defun([_LT_LANG_RC_CONFIG], 11421d21ab8bcSmrg[AC_REQUIRE([LT_PROG_RC])dnl 11422d21ab8bcSmrgAC_LANG_SAVE 114231f0ac6a5Smrg 11424d21ab8bcSmrg# Source file extension for RC test sources. 11425d21ab8bcSmrgac_ext=rc 11426b9867631Smrg 11427d21ab8bcSmrg# Object file extension for compiled RC test sources. 11428d21ab8bcSmrgobjext=o 11429d21ab8bcSmrg_LT_TAGVAR(objext, $1)=$objext 11430b9867631Smrg 11431d21ab8bcSmrg# Code to be used in simple compile tests 11432d21ab8bcSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 114339c9ff80cSmrg 11434d21ab8bcSmrg# Code to be used in simple link tests 11435d21ab8bcSmrglt_simple_link_test_code=$lt_simple_compile_test_code 114369c9ff80cSmrg 11437d21ab8bcSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11438d21ab8bcSmrg_LT_TAG_COMPILER 11439d21ab8bcSmrg 11440d21ab8bcSmrg# save warnings/boilerplate of simple test code 11441d21ab8bcSmrg_LT_COMPILER_BOILERPLATE 11442d21ab8bcSmrg_LT_LINKER_BOILERPLATE 11443d21ab8bcSmrg 11444d21ab8bcSmrg# Allow CC to be a program name with arguments. 11445d21ab8bcSmrglt_save_CC=$CC 11446d21ab8bcSmrglt_save_CFLAGS=$CFLAGS 11447d21ab8bcSmrglt_save_GCC=$GCC 11448d21ab8bcSmrgGCC= 11449d21ab8bcSmrgCC=${RC-"windres"} 11450d21ab8bcSmrgCFLAGS= 11451d21ab8bcSmrgcompiler=$CC 11452d21ab8bcSmrg_LT_TAGVAR(compiler, $1)=$CC 11453d21ab8bcSmrg_LT_CC_BASENAME([$compiler]) 11454d21ab8bcSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 114551f0ac6a5Smrg 11456d21ab8bcSmrgif test -n "$compiler"; then 11457d21ab8bcSmrg : 11458d21ab8bcSmrg _LT_CONFIG($1) 114596fae4e5dSmrgfi 114601f0ac6a5Smrg 11461d21ab8bcSmrgGCC=$lt_save_GCC 11462d21ab8bcSmrgAC_LANG_RESTORE 11463d21ab8bcSmrgCC=$lt_save_CC 11464d21ab8bcSmrgCFLAGS=$lt_save_CFLAGS 11465d21ab8bcSmrg])# _LT_LANG_RC_CONFIG 114661f0ac6a5Smrg 114679c9ff80cSmrg 11468d21ab8bcSmrg# LT_PROG_GCJ 11469d21ab8bcSmrg# ----------- 11470d21ab8bcSmrgAC_DEFUN([LT_PROG_GCJ], 11471d21ab8bcSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11472d21ab8bcSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11473d21ab8bcSmrg [AC_CHECK_TOOL(GCJ, gcj,) 11474d21ab8bcSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11475d21ab8bcSmrg AC_SUBST(GCJFLAGS)])])[]dnl 11476d21ab8bcSmrg]) 114779c9ff80cSmrg 11478d21ab8bcSmrg# Old name: 11479d21ab8bcSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11480d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 11481d21ab8bcSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 114821f0ac6a5Smrg 114831f0ac6a5Smrg 11484d21ab8bcSmrg# LT_PROG_GO 11485d21ab8bcSmrg# ---------- 11486d21ab8bcSmrgAC_DEFUN([LT_PROG_GO], 11487d21ab8bcSmrg[AC_CHECK_TOOL(GOC, gccgo,) 11488d21ab8bcSmrg]) 11489d21ab8bcSmrg 11490d21ab8bcSmrg 11491d21ab8bcSmrg# LT_PROG_RC 11492d21ab8bcSmrg# ---------- 11493d21ab8bcSmrgAC_DEFUN([LT_PROG_RC], 11494d21ab8bcSmrg[AC_CHECK_TOOL(RC, windres,) 11495d21ab8bcSmrg]) 11496d21ab8bcSmrg 11497d21ab8bcSmrg# Old name: 11498d21ab8bcSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11499d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 11500d21ab8bcSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 11501d21ab8bcSmrg 11502d21ab8bcSmrg 11503d21ab8bcSmrg# _LT_DECL_EGREP 11504d21ab8bcSmrg# -------------- 11505d21ab8bcSmrg# If we don't have a new enough Autoconf to choose the best grep 11506d21ab8bcSmrg# available, choose the one first in the user's PATH. 11507d21ab8bcSmrgm4_defun([_LT_DECL_EGREP], 11508d21ab8bcSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 11509d21ab8bcSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 11510d21ab8bcSmrgtest -z "$GREP" && GREP=grep 11511d21ab8bcSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11512d21ab8bcSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11513d21ab8bcSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11514d21ab8bcSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11515d21ab8bcSmrgAC_SUBST([GREP]) 11516d21ab8bcSmrg]) 11517d21ab8bcSmrg 11518d21ab8bcSmrg 11519d21ab8bcSmrg# _LT_DECL_OBJDUMP 11520d21ab8bcSmrg# -------------- 11521d21ab8bcSmrg# If we don't have a new enough Autoconf to choose the best objdump 11522d21ab8bcSmrg# available, choose the one first in the user's PATH. 11523d21ab8bcSmrgm4_defun([_LT_DECL_OBJDUMP], 11524d21ab8bcSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11525d21ab8bcSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11526d21ab8bcSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11527d21ab8bcSmrgAC_SUBST([OBJDUMP]) 11528d21ab8bcSmrg]) 11529d21ab8bcSmrg 11530d21ab8bcSmrg# _LT_DECL_DLLTOOL 11531d21ab8bcSmrg# ---------------- 11532d21ab8bcSmrg# Ensure DLLTOOL variable is set. 11533d21ab8bcSmrgm4_defun([_LT_DECL_DLLTOOL], 11534d21ab8bcSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11535d21ab8bcSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11536d21ab8bcSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11537d21ab8bcSmrgAC_SUBST([DLLTOOL]) 11538d21ab8bcSmrg]) 11539d21ab8bcSmrg 11540d21ab8bcSmrg# _LT_DECL_FILECMD 11541d21ab8bcSmrg# ---------------- 11542d21ab8bcSmrg# Check for a file(cmd) program that can be used to detect file type and magic 11543d21ab8bcSmrgm4_defun([_LT_DECL_FILECMD], 11544d21ab8bcSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 11545d21ab8bcSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11546d21ab8bcSmrg])# _LD_DECL_FILECMD 11547d21ab8bcSmrg 11548d21ab8bcSmrg# _LT_DECL_SED 11549d21ab8bcSmrg# ------------ 11550d21ab8bcSmrg# Check for a fully-functional sed program, that truncates 11551d21ab8bcSmrg# as few characters as possible. Prefer GNU sed if found. 11552d21ab8bcSmrgm4_defun([_LT_DECL_SED], 11553d21ab8bcSmrg[AC_PROG_SED 11554d21ab8bcSmrgtest -z "$SED" && SED=sed 11555d21ab8bcSmrgXsed="$SED -e 1s/^X//" 11556d21ab8bcSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11557d21ab8bcSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11558d21ab8bcSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11559d21ab8bcSmrg])# _LT_DECL_SED 11560d21ab8bcSmrg 11561d21ab8bcSmrgm4_ifndef([AC_PROG_SED], [ 11562d21ab8bcSmrg# NOTE: This macro has been submitted for inclusion into # 11563d21ab8bcSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 11564d21ab8bcSmrg# a released version of Autoconf we should remove this # 11565d21ab8bcSmrg# macro and use it instead. # 11566d21ab8bcSmrg 11567d21ab8bcSmrgm4_defun([AC_PROG_SED], 11568d21ab8bcSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 11569d21ab8bcSmrgAC_CACHE_VAL(lt_cv_path_SED, 11570d21ab8bcSmrg[# Loop through the user's path and test for sed and gsed. 11571d21ab8bcSmrg# Then use that list of sed's as ones to test for truncation. 11572d21ab8bcSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11573d21ab8bcSmrgfor as_dir in $PATH 11574d21ab8bcSmrgdo 11575d21ab8bcSmrg IFS=$as_save_IFS 11576d21ab8bcSmrg test -z "$as_dir" && as_dir=. 11577d21ab8bcSmrg for lt_ac_prog in sed gsed; do 11578d21ab8bcSmrg for ac_exec_ext in '' $ac_executable_extensions; do 11579d21ab8bcSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11580d21ab8bcSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11581d21ab8bcSmrg fi 11582d21ab8bcSmrg done 11583d21ab8bcSmrg done 11584d21ab8bcSmrgdone 11585d21ab8bcSmrgIFS=$as_save_IFS 11586d21ab8bcSmrglt_ac_max=0 11587d21ab8bcSmrglt_ac_count=0 11588d21ab8bcSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11589d21ab8bcSmrg# along with /bin/sed that truncates output. 11590d21ab8bcSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11591d21ab8bcSmrg test ! -f "$lt_ac_sed" && continue 11592d21ab8bcSmrg cat /dev/null > conftest.in 11593d21ab8bcSmrg lt_ac_count=0 11594d21ab8bcSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11595d21ab8bcSmrg # Check for GNU sed and select it if it is found. 11596d21ab8bcSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11597d21ab8bcSmrg lt_cv_path_SED=$lt_ac_sed 11598d21ab8bcSmrg break 11599d21ab8bcSmrg fi 11600d21ab8bcSmrg while true; do 11601d21ab8bcSmrg cat conftest.in conftest.in >conftest.tmp 11602d21ab8bcSmrg mv conftest.tmp conftest.in 11603d21ab8bcSmrg cp conftest.in conftest.nl 11604d21ab8bcSmrg echo >>conftest.nl 11605d21ab8bcSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11606d21ab8bcSmrg cmp -s conftest.out conftest.nl || break 11607d21ab8bcSmrg # 10000 chars as input seems more than enough 11608d21ab8bcSmrg test 10 -lt "$lt_ac_count" && break 11609d21ab8bcSmrg lt_ac_count=`expr $lt_ac_count + 1` 11610d21ab8bcSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 11611d21ab8bcSmrg lt_ac_max=$lt_ac_count 11612d21ab8bcSmrg lt_cv_path_SED=$lt_ac_sed 11613d21ab8bcSmrg fi 11614d21ab8bcSmrg done 11615d21ab8bcSmrgdone 11616d21ab8bcSmrg]) 11617d21ab8bcSmrgSED=$lt_cv_path_SED 11618d21ab8bcSmrgAC_SUBST([SED]) 11619d21ab8bcSmrgAC_MSG_RESULT([$SED]) 11620d21ab8bcSmrg])#AC_PROG_SED 11621d21ab8bcSmrg])#m4_ifndef 11622b9867631Smrg 11623d21ab8bcSmrg# Old name: 11624d21ab8bcSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11625d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 11626d21ab8bcSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 11627b9867631Smrg 116281f0ac6a5Smrg 11629d21ab8bcSmrg# _LT_CHECK_SHELL_FEATURES 11630d21ab8bcSmrg# ------------------------ 11631d21ab8bcSmrg# Find out whether the shell is Bourne or XSI compatible, 11632d21ab8bcSmrg# or has some other useful features. 11633d21ab8bcSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 11634d21ab8bcSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11635d21ab8bcSmrg lt_unset=unset 116366fae4e5dSmrgelse 11637d21ab8bcSmrg lt_unset=false 116386fae4e5dSmrgfi 11639d21ab8bcSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11640e5410a46Smrg 11641d21ab8bcSmrg# test EBCDIC or ASCII 11642d21ab8bcSmrgcase `echo X|tr X '\101'` in 11643d21ab8bcSmrg A) # ASCII based system 11644d21ab8bcSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11645d21ab8bcSmrg lt_SP2NL='tr \040 \012' 11646d21ab8bcSmrg lt_NL2SP='tr \015\012 \040\040' 11647d21ab8bcSmrg ;; 11648d21ab8bcSmrg *) # EBCDIC based system 11649d21ab8bcSmrg lt_SP2NL='tr \100 \n' 11650d21ab8bcSmrg lt_NL2SP='tr \r\n \100\100' 11651d21ab8bcSmrg ;; 11652d21ab8bcSmrgesac 11653d21ab8bcSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11654d21ab8bcSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11655d21ab8bcSmrg])# _LT_CHECK_SHELL_FEATURES 11656e5410a46Smrg 11657e5410a46Smrg 11658d21ab8bcSmrg# _LT_PATH_CONVERSION_FUNCTIONS 11659d21ab8bcSmrg# ----------------------------- 11660d21ab8bcSmrg# Determine what file name conversion functions should be used by 11661d21ab8bcSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11662d21ab8bcSmrg# for certain cross-compile configurations and native mingw. 11663d21ab8bcSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11664d21ab8bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11665d21ab8bcSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11666d21ab8bcSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 11667d21ab8bcSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 11668d21ab8bcSmrg[case $host in 11669d21ab8bcSmrg *-*-mingw* ) 11670d21ab8bcSmrg case $build in 11671d21ab8bcSmrg *-*-mingw* ) # actually msys 11672d21ab8bcSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11673d21ab8bcSmrg ;; 11674d21ab8bcSmrg *-*-cygwin* ) 11675d21ab8bcSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11676d21ab8bcSmrg ;; 11677d21ab8bcSmrg * ) # otherwise, assume *nix 11678d21ab8bcSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11679d21ab8bcSmrg ;; 11680d21ab8bcSmrg esac 11681d21ab8bcSmrg ;; 11682d21ab8bcSmrg *-*-cygwin* ) 11683d21ab8bcSmrg case $build in 11684d21ab8bcSmrg *-*-mingw* ) # actually msys 11685d21ab8bcSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11686d21ab8bcSmrg ;; 11687d21ab8bcSmrg *-*-cygwin* ) 11688d21ab8bcSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 11689d21ab8bcSmrg ;; 11690d21ab8bcSmrg * ) # otherwise, assume *nix 11691d21ab8bcSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11692d21ab8bcSmrg ;; 11693d21ab8bcSmrg esac 11694d21ab8bcSmrg ;; 11695d21ab8bcSmrg * ) # unhandled hosts (and "normal" native builds) 11696d21ab8bcSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 11697d21ab8bcSmrg ;; 11698d21ab8bcSmrgesac 11699d21ab8bcSmrg]) 11700d21ab8bcSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 11701d21ab8bcSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11702d21ab8bcSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11703d21ab8bcSmrg [0], [convert $build file names to $host format])dnl 11704d21ab8bcSmrg 11705d21ab8bcSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11706d21ab8bcSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11707d21ab8bcSmrg[#assume ordinary cross tools, or native build. 11708d21ab8bcSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 11709d21ab8bcSmrgcase $host in 11710d21ab8bcSmrg *-*-mingw* ) 11711d21ab8bcSmrg case $build in 11712d21ab8bcSmrg *-*-mingw* ) # actually msys 11713d21ab8bcSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11714d21ab8bcSmrg ;; 11715d21ab8bcSmrg esac 11716d21ab8bcSmrg ;; 11717d21ab8bcSmrgesac 11718d21ab8bcSmrg]) 11719d21ab8bcSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 11720d21ab8bcSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11721d21ab8bcSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11722d21ab8bcSmrg [0], [convert $build files to toolchain format])dnl 11723d21ab8bcSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 11724e5410a46Smrg 11725d21ab8bcSmrg# Helper functions for option handling. -*- Autoconf -*- 117266fae4e5dSmrg# 11727d21ab8bcSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11728d21ab8bcSmrg# Software Foundation, Inc. 11729d21ab8bcSmrg# Written by Gary V. Vaughan, 2004 117306fae4e5dSmrg# 11731d21ab8bcSmrg# This file is free software; the Free Software Foundation gives 11732d21ab8bcSmrg# unlimited permission to copy and/or distribute it, with or without 11733d21ab8bcSmrg# modifications, as long as this notice is preserved. 117346fae4e5dSmrg 11735d21ab8bcSmrg# serial 8 ltoptions.m4 1173689c04b6cSmrg 11737d21ab8bcSmrg# This is to help aclocal find these macros, as it can't see m4_define. 11738d21ab8bcSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11739d21ab8bcSmrg 11740d21ab8bcSmrg 11741d21ab8bcSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11742d21ab8bcSmrg# ------------------------------------------ 11743d21ab8bcSmrgm4_define([_LT_MANGLE_OPTION], 11744d21ab8bcSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11745d21ab8bcSmrg 11746d21ab8bcSmrg 11747d21ab8bcSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11748d21ab8bcSmrg# --------------------------------------- 11749d21ab8bcSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11750d21ab8bcSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11751d21ab8bcSmrg# saved as a flag. 11752d21ab8bcSmrgm4_define([_LT_SET_OPTION], 11753d21ab8bcSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11754d21ab8bcSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11755d21ab8bcSmrg _LT_MANGLE_DEFUN([$1], [$2]), 11756d21ab8bcSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 11757d21ab8bcSmrg]) 11758d21ab8bcSmrg 11759d21ab8bcSmrg 11760d21ab8bcSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11761d21ab8bcSmrg# ------------------------------------------------------------ 11762d21ab8bcSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11763d21ab8bcSmrgm4_define([_LT_IF_OPTION], 11764d21ab8bcSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11765d21ab8bcSmrg 11766d21ab8bcSmrg 11767d21ab8bcSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11768d21ab8bcSmrg# ------------------------------------------------------- 11769d21ab8bcSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11770d21ab8bcSmrg# are set. 11771d21ab8bcSmrgm4_define([_LT_UNLESS_OPTIONS], 11772d21ab8bcSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11773d21ab8bcSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11774d21ab8bcSmrg [m4_define([$0_found])])])[]dnl 11775d21ab8bcSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11776d21ab8bcSmrg])[]dnl 11777d21ab8bcSmrg]) 11778d21ab8bcSmrg 11779d21ab8bcSmrg 11780d21ab8bcSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 117816fae4e5dSmrg# ---------------------------------------- 11782d21ab8bcSmrg# OPTION-LIST is a space-separated list of Libtool options associated 11783d21ab8bcSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 11784d21ab8bcSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11785d21ab8bcSmrg# the unknown option and exit. 11786d21ab8bcSmrgm4_defun([_LT_SET_OPTIONS], 11787d21ab8bcSmrg[# Set options 11788d21ab8bcSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11789d21ab8bcSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 117906fae4e5dSmrg 11791d21ab8bcSmrgm4_if([$1],[LT_INIT],[ 11792d21ab8bcSmrg dnl 11793d21ab8bcSmrg dnl Simply set some default values (i.e off) if boolean options were not 11794d21ab8bcSmrg dnl specified: 11795d21ab8bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11796d21ab8bcSmrg ]) 11797d21ab8bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11798d21ab8bcSmrg ]) 11799d21ab8bcSmrg dnl 11800d21ab8bcSmrg dnl If no reference was made to various pairs of opposing options, then 11801d21ab8bcSmrg dnl we run the default mode handler for the pair. For example, if neither 11802d21ab8bcSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11803d21ab8bcSmrg dnl archives by default: 11804d21ab8bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11805d21ab8bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11806d21ab8bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11807d21ab8bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11808d21ab8bcSmrg [_LT_ENABLE_FAST_INSTALL]) 11809d21ab8bcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11810d21ab8bcSmrg [_LT_WITH_AIX_SONAME([aix])]) 11811d21ab8bcSmrg ]) 11812d21ab8bcSmrg])# _LT_SET_OPTIONS 118139c9ff80cSmrg 118149c9ff80cSmrg 118151f0ac6a5Smrg 11816d21ab8bcSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11817d21ab8bcSmrg# ----------------------------------------- 11818d21ab8bcSmrgm4_define([_LT_MANGLE_DEFUN], 11819d21ab8bcSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11820d21ab8bcSmrg 11821d21ab8bcSmrg 11822d21ab8bcSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11823d21ab8bcSmrg# ----------------------------------------------- 11824d21ab8bcSmrgm4_define([LT_OPTION_DEFINE], 11825d21ab8bcSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11826d21ab8bcSmrg])# LT_OPTION_DEFINE 11827d21ab8bcSmrg 11828d21ab8bcSmrg 11829d21ab8bcSmrg# dlopen 11830d21ab8bcSmrg# ------ 11831d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 11832d21ab8bcSmrg]) 11833d21ab8bcSmrg 11834d21ab8bcSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 11835d21ab8bcSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 11836d21ab8bcSmrgAC_DIAGNOSE([obsolete], 11837d21ab8bcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11838d21ab8bcSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 11839d21ab8bcSmrg]) 11840d21ab8bcSmrg 11841d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 11842d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11843d21ab8bcSmrg 11844d21ab8bcSmrg 11845d21ab8bcSmrg# win32-dll 11846d21ab8bcSmrg# --------- 11847d21ab8bcSmrg# Declare package support for building win32 dll's. 11848d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 11849d21ab8bcSmrg[enable_win32_dll=yes 11850d21ab8bcSmrg 11851d21ab8bcSmrgcase $host in 11852d21ab8bcSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11853d21ab8bcSmrg AC_CHECK_TOOL(AS, as, false) 11854d21ab8bcSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11855d21ab8bcSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 11856d21ab8bcSmrg ;; 11857d21ab8bcSmrgesac 11858d21ab8bcSmrg 11859d21ab8bcSmrgtest -z "$AS" && AS=as 11860d21ab8bcSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 11861d21ab8bcSmrg 11862d21ab8bcSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11863d21ab8bcSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11864d21ab8bcSmrg 11865d21ab8bcSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11866d21ab8bcSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11867d21ab8bcSmrg])# win32-dll 11868d21ab8bcSmrg 11869d21ab8bcSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11870d21ab8bcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11871d21ab8bcSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 11872d21ab8bcSmrgAC_DIAGNOSE([obsolete], 11873d21ab8bcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11874d21ab8bcSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 11875d21ab8bcSmrg]) 11876d21ab8bcSmrg 11877d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 11878d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 118791f0ac6a5Smrg 118801f0ac6a5Smrg 11881d21ab8bcSmrg# _LT_ENABLE_SHARED([DEFAULT]) 11882d21ab8bcSmrg# ---------------------------- 11883d21ab8bcSmrg# implement the --enable-shared flag, and supports the 'shared' and 11884d21ab8bcSmrg# 'disable-shared' LT_INIT options. 11885d21ab8bcSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11886d21ab8bcSmrgm4_define([_LT_ENABLE_SHARED], 11887d21ab8bcSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11888d21ab8bcSmrgAC_ARG_ENABLE([shared], 11889d21ab8bcSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11890d21ab8bcSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11891d21ab8bcSmrg [p=${PACKAGE-default} 11892d21ab8bcSmrg case $enableval in 11893d21ab8bcSmrg yes) enable_shared=yes ;; 11894d21ab8bcSmrg no) enable_shared=no ;; 11895d21ab8bcSmrg *) 11896d21ab8bcSmrg enable_shared=no 11897d21ab8bcSmrg # Look at the argument we got. We use all the common list separators. 11898d21ab8bcSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11899d21ab8bcSmrg for pkg in $enableval; do 11900d21ab8bcSmrg IFS=$lt_save_ifs 11901d21ab8bcSmrg if test "X$pkg" = "X$p"; then 11902d21ab8bcSmrg enable_shared=yes 11903d21ab8bcSmrg fi 11904d21ab8bcSmrg done 11905d21ab8bcSmrg IFS=$lt_save_ifs 11906d21ab8bcSmrg ;; 11907d21ab8bcSmrg esac], 11908d21ab8bcSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 119099c9ff80cSmrg 11910d21ab8bcSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 11911d21ab8bcSmrg [Whether or not to build shared libraries]) 11912d21ab8bcSmrg])# _LT_ENABLE_SHARED 119139c9ff80cSmrg 11914d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 11915d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 119161f0ac6a5Smrg 11917d21ab8bcSmrg# Old names: 11918d21ab8bcSmrgAC_DEFUN([AC_ENABLE_SHARED], 11919d21ab8bcSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 11920d21ab8bcSmrg]) 119211f0ac6a5Smrg 11922d21ab8bcSmrgAC_DEFUN([AC_DISABLE_SHARED], 11923d21ab8bcSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 11924d21ab8bcSmrg]) 119251f0ac6a5Smrg 11926d21ab8bcSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 11927d21ab8bcSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 119289c9ff80cSmrg 11929d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 11930d21ab8bcSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 11931d21ab8bcSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 119329c9ff80cSmrg 119339c9ff80cSmrg 119349c9ff80cSmrg 11935d21ab8bcSmrg# _LT_ENABLE_STATIC([DEFAULT]) 11936d21ab8bcSmrg# ---------------------------- 11937d21ab8bcSmrg# implement the --enable-static flag, and support the 'static' and 11938d21ab8bcSmrg# 'disable-static' LT_INIT options. 11939d21ab8bcSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11940d21ab8bcSmrgm4_define([_LT_ENABLE_STATIC], 11941d21ab8bcSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 11942d21ab8bcSmrgAC_ARG_ENABLE([static], 11943d21ab8bcSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 11944d21ab8bcSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 11945d21ab8bcSmrg [p=${PACKAGE-default} 11946d21ab8bcSmrg case $enableval in 11947d21ab8bcSmrg yes) enable_static=yes ;; 11948d21ab8bcSmrg no) enable_static=no ;; 11949d21ab8bcSmrg *) 11950d21ab8bcSmrg enable_static=no 11951d21ab8bcSmrg # Look at the argument we got. We use all the common list separators. 11952d21ab8bcSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11953d21ab8bcSmrg for pkg in $enableval; do 11954d21ab8bcSmrg IFS=$lt_save_ifs 11955d21ab8bcSmrg if test "X$pkg" = "X$p"; then 11956d21ab8bcSmrg enable_static=yes 11957d21ab8bcSmrg fi 11958d21ab8bcSmrg done 11959d21ab8bcSmrg IFS=$lt_save_ifs 11960d21ab8bcSmrg ;; 11961d21ab8bcSmrg esac], 11962d21ab8bcSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 119639c9ff80cSmrg 11964d21ab8bcSmrg _LT_DECL([build_old_libs], [enable_static], [0], 11965d21ab8bcSmrg [Whether or not to build static libraries]) 11966d21ab8bcSmrg])# _LT_ENABLE_STATIC 119676fae4e5dSmrg 11968d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 11969d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 119709c9ff80cSmrg 11971d21ab8bcSmrg# Old names: 11972d21ab8bcSmrgAC_DEFUN([AC_ENABLE_STATIC], 11973d21ab8bcSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 11974d21ab8bcSmrg]) 119759c9ff80cSmrg 11976d21ab8bcSmrgAC_DEFUN([AC_DISABLE_STATIC], 11977d21ab8bcSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 11978d21ab8bcSmrg]) 119799c9ff80cSmrg 11980d21ab8bcSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 11981d21ab8bcSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 119829c9ff80cSmrg 11983d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 11984d21ab8bcSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 11985d21ab8bcSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 119869c9ff80cSmrg 119876fae4e5dSmrg 119886fae4e5dSmrg 11989d21ab8bcSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 11990d21ab8bcSmrg# ---------------------------------- 11991d21ab8bcSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 11992d21ab8bcSmrg# and 'disable-fast-install' LT_INIT options. 11993d21ab8bcSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11994d21ab8bcSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 11995d21ab8bcSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 11996d21ab8bcSmrgAC_ARG_ENABLE([fast-install], 11997d21ab8bcSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 11998d21ab8bcSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 11999d21ab8bcSmrg [p=${PACKAGE-default} 12000d21ab8bcSmrg case $enableval in 12001d21ab8bcSmrg yes) enable_fast_install=yes ;; 12002d21ab8bcSmrg no) enable_fast_install=no ;; 12003d21ab8bcSmrg *) 12004d21ab8bcSmrg enable_fast_install=no 12005d21ab8bcSmrg # Look at the argument we got. We use all the common list separators. 12006d21ab8bcSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12007d21ab8bcSmrg for pkg in $enableval; do 12008d21ab8bcSmrg IFS=$lt_save_ifs 12009d21ab8bcSmrg if test "X$pkg" = "X$p"; then 12010d21ab8bcSmrg enable_fast_install=yes 12011d21ab8bcSmrg fi 12012d21ab8bcSmrg done 12013d21ab8bcSmrg IFS=$lt_save_ifs 12014d21ab8bcSmrg ;; 12015d21ab8bcSmrg esac], 12016d21ab8bcSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 120176fae4e5dSmrg 12018d21ab8bcSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 12019d21ab8bcSmrg [Whether or not to optimize for fast installation])dnl 12020d21ab8bcSmrg])# _LT_ENABLE_FAST_INSTALL 120216fae4e5dSmrg 12022d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12023d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 120249c9ff80cSmrg 12025d21ab8bcSmrg# Old names: 12026d21ab8bcSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 12027d21ab8bcSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12028d21ab8bcSmrgAC_DIAGNOSE([obsolete], 12029d21ab8bcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12030d21ab8bcSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 12031d21ab8bcSmrg]) 120329c9ff80cSmrg 12033d21ab8bcSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 12034d21ab8bcSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12035d21ab8bcSmrgAC_DIAGNOSE([obsolete], 12036d21ab8bcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12037d21ab8bcSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 12038d21ab8bcSmrg]) 120391f0ac6a5Smrg 12040d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 12041d21ab8bcSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12042d21ab8bcSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12043e5410a46Smrg 120446fae4e5dSmrg 12045d21ab8bcSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 12046d21ab8bcSmrg# ---------------------------------- 12047d21ab8bcSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12048d21ab8bcSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12049d21ab8bcSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12050d21ab8bcSmrgm4_define([_LT_WITH_AIX_SONAME], 12051d21ab8bcSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12052d21ab8bcSmrgshared_archive_member_spec= 12053d21ab8bcSmrgcase $host,$enable_shared in 12054d21ab8bcSmrgpower*-*-aix[[5-9]]*,yes) 12055d21ab8bcSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12056d21ab8bcSmrg AC_ARG_WITH([aix-soname], 12057d21ab8bcSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12058d21ab8bcSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12059d21ab8bcSmrg [case $withval in 12060d21ab8bcSmrg aix|svr4|both) 12061d21ab8bcSmrg ;; 12062d21ab8bcSmrg *) 12063d21ab8bcSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12064d21ab8bcSmrg ;; 12065d21ab8bcSmrg esac 12066d21ab8bcSmrg lt_cv_with_aix_soname=$with_aix_soname], 12067d21ab8bcSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 12068d21ab8bcSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12069d21ab8bcSmrg with_aix_soname=$lt_cv_with_aix_soname]) 12070d21ab8bcSmrg AC_MSG_RESULT([$with_aix_soname]) 12071d21ab8bcSmrg if test aix != "$with_aix_soname"; then 12072d21ab8bcSmrg # For the AIX way of multilib, we name the shared archive member 12073d21ab8bcSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12074d21ab8bcSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12075d21ab8bcSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12076d21ab8bcSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 12077d21ab8bcSmrg if test 64 = "${OBJECT_MODE-32}"; then 12078d21ab8bcSmrg shared_archive_member_spec=shr_64 12079d21ab8bcSmrg else 12080d21ab8bcSmrg shared_archive_member_spec=shr 12081d21ab8bcSmrg fi 12082d21ab8bcSmrg fi 12083d21ab8bcSmrg ;; 12084d21ab8bcSmrg*) 12085d21ab8bcSmrg with_aix_soname=aix 12086d21ab8bcSmrg ;; 12087d21ab8bcSmrgesac 120886fae4e5dSmrg 12089d21ab8bcSmrg_LT_DECL([], [shared_archive_member_spec], [0], 12090d21ab8bcSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12091d21ab8bcSmrg])# _LT_WITH_AIX_SONAME 120921f0ac6a5Smrg 12093d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12094d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12095d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 120966fae4e5dSmrg 120971f0ac6a5Smrg 12098d21ab8bcSmrg# _LT_WITH_PIC([MODE]) 12099d21ab8bcSmrg# -------------------- 12100d21ab8bcSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12101d21ab8bcSmrg# LT_INIT options. 12102d21ab8bcSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12103d21ab8bcSmrgm4_define([_LT_WITH_PIC], 12104d21ab8bcSmrg[AC_ARG_WITH([pic], 12105d21ab8bcSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12106d21ab8bcSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12107d21ab8bcSmrg [lt_p=${PACKAGE-default} 12108d21ab8bcSmrg case $withval in 12109d21ab8bcSmrg yes|no) pic_mode=$withval ;; 12110d21ab8bcSmrg *) 12111d21ab8bcSmrg pic_mode=default 12112d21ab8bcSmrg # Look at the argument we got. We use all the common list separators. 12113d21ab8bcSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12114d21ab8bcSmrg for lt_pkg in $withval; do 12115d21ab8bcSmrg IFS=$lt_save_ifs 12116d21ab8bcSmrg if test "X$lt_pkg" = "X$lt_p"; then 12117d21ab8bcSmrg pic_mode=yes 12118d21ab8bcSmrg fi 12119d21ab8bcSmrg done 12120d21ab8bcSmrg IFS=$lt_save_ifs 12121d21ab8bcSmrg ;; 12122d21ab8bcSmrg esac], 12123d21ab8bcSmrg [pic_mode=m4_default([$1], [default])]) 121241f0ac6a5Smrg 12125d21ab8bcSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12126d21ab8bcSmrg])# _LT_WITH_PIC 121276fae4e5dSmrg 12128d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12129d21ab8bcSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 121306fae4e5dSmrg 12131d21ab8bcSmrg# Old name: 12132d21ab8bcSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 12133d21ab8bcSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 12134d21ab8bcSmrgAC_DIAGNOSE([obsolete], 12135d21ab8bcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12136d21ab8bcSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 12137d21ab8bcSmrg]) 121386fae4e5dSmrg 12139d21ab8bcSmrgdnl aclocal-1.4 backwards compatibility: 12140d21ab8bcSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 121416fae4e5dSmrg 121426fae4e5dSmrg 12143d21ab8bcSmrgm4_define([_LTDL_MODE], []) 12144d21ab8bcSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12145d21ab8bcSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 12146d21ab8bcSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 12147d21ab8bcSmrg [m4_define([_LTDL_MODE], [recursive])]) 12148d21ab8bcSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 12149d21ab8bcSmrg [m4_define([_LTDL_MODE], [subproject])]) 121501f0ac6a5Smrg 12151d21ab8bcSmrgm4_define([_LTDL_TYPE], []) 12152d21ab8bcSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 12153d21ab8bcSmrg [m4_define([_LTDL_TYPE], [installable])]) 12154d21ab8bcSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 12155d21ab8bcSmrg [m4_define([_LTDL_TYPE], [convenience])]) 12156d21ab8bcSmrg 12157d21ab8bcSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 121586fae4e5dSmrg# 12159d21ab8bcSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12160d21ab8bcSmrg# Foundation, Inc. 12161d21ab8bcSmrg# Written by Gary V. Vaughan, 2004 121626fae4e5dSmrg# 12163d21ab8bcSmrg# This file is free software; the Free Software Foundation gives 12164d21ab8bcSmrg# unlimited permission to copy and/or distribute it, with or without 12165d21ab8bcSmrg# modifications, as long as this notice is preserved. 121666fae4e5dSmrg 12167d21ab8bcSmrg# serial 6 ltsugar.m4 121686fae4e5dSmrg 12169d21ab8bcSmrg# This is to help aclocal find these macros, as it can't see m4_define. 12170d21ab8bcSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 121711f0ac6a5Smrg 121726fae4e5dSmrg 12173d21ab8bcSmrg# lt_join(SEP, ARG1, [ARG2...]) 12174d21ab8bcSmrg# ----------------------------- 12175d21ab8bcSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12176d21ab8bcSmrg# associated separator. 12177d21ab8bcSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12178d21ab8bcSmrg# versions in m4sugar had bugs. 12179d21ab8bcSmrgm4_define([lt_join], 12180d21ab8bcSmrg[m4_if([$#], [1], [], 12181d21ab8bcSmrg [$#], [2], [[$2]], 12182d21ab8bcSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12183d21ab8bcSmrgm4_define([_lt_join], 12184d21ab8bcSmrg[m4_if([$#$2], [2], [], 12185d21ab8bcSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 121861f0ac6a5Smrg 121876fae4e5dSmrg 12188d21ab8bcSmrg# lt_car(LIST) 12189d21ab8bcSmrg# lt_cdr(LIST) 12190d21ab8bcSmrg# ------------ 12191d21ab8bcSmrg# Manipulate m4 lists. 12192d21ab8bcSmrg# These macros are necessary as long as will still need to support 12193d21ab8bcSmrg# Autoconf-2.59, which quotes differently. 12194d21ab8bcSmrgm4_define([lt_car], [[$1]]) 12195d21ab8bcSmrgm4_define([lt_cdr], 12196d21ab8bcSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12197d21ab8bcSmrg [$#], 1, [], 12198d21ab8bcSmrg [m4_dquote(m4_shift($@))])]) 12199d21ab8bcSmrgm4_define([lt_unquote], $1) 122006fae4e5dSmrg 122016fae4e5dSmrg 12202d21ab8bcSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12203d21ab8bcSmrg# ------------------------------------------ 12204d21ab8bcSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12205d21ab8bcSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 12206d21ab8bcSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12207d21ab8bcSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12208d21ab8bcSmrg# than defined and empty). 12209d21ab8bcSmrg# 12210d21ab8bcSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 12211d21ab8bcSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12212d21ab8bcSmrgm4_define([lt_append], 12213d21ab8bcSmrg[m4_define([$1], 12214d21ab8bcSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 122151f0ac6a5Smrg 122166fae4e5dSmrg 122171f0ac6a5Smrg 12218d21ab8bcSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12219d21ab8bcSmrg# ---------------------------------------------------------- 12220d21ab8bcSmrg# Produce a SEP delimited list of all paired combinations of elements of 12221d21ab8bcSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12222d21ab8bcSmrg# has the form PREFIXmINFIXSUFFIXn. 12223d21ab8bcSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 12224d21ab8bcSmrgm4_define([lt_combine], 12225d21ab8bcSmrg[m4_if(m4_eval([$# > 3]), [1], 12226d21ab8bcSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12227d21ab8bcSmrg[[m4_foreach([_Lt_prefix], [$2], 12228d21ab8bcSmrg [m4_foreach([_Lt_suffix], 12229d21ab8bcSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12230d21ab8bcSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12231d21ab8bcSmrg 12232d21ab8bcSmrg 12233d21ab8bcSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12234d21ab8bcSmrg# ----------------------------------------------------------------------- 12235d21ab8bcSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12236d21ab8bcSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12237d21ab8bcSmrgm4_define([lt_if_append_uniq], 12238d21ab8bcSmrg[m4_ifdef([$1], 12239d21ab8bcSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12240d21ab8bcSmrg [lt_append([$1], [$2], [$3])$4], 12241d21ab8bcSmrg [$5])], 12242d21ab8bcSmrg [lt_append([$1], [$2], [$3])$4])]) 12243d21ab8bcSmrg 12244d21ab8bcSmrg 12245d21ab8bcSmrg# lt_dict_add(DICT, KEY, VALUE) 12246d21ab8bcSmrg# ----------------------------- 12247d21ab8bcSmrgm4_define([lt_dict_add], 12248d21ab8bcSmrg[m4_define([$1($2)], [$3])]) 12249d21ab8bcSmrg 122501f0ac6a5Smrg 12251d21ab8bcSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12252d21ab8bcSmrg# -------------------------------------------- 12253d21ab8bcSmrgm4_define([lt_dict_add_subkey], 12254d21ab8bcSmrg[m4_define([$1($2:$3)], [$4])]) 122551f0ac6a5Smrg 122569c9ff80cSmrg 12257d21ab8bcSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12258d21ab8bcSmrg# ---------------------------------- 12259d21ab8bcSmrgm4_define([lt_dict_fetch], 12260d21ab8bcSmrg[m4_ifval([$3], 12261d21ab8bcSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12262d21ab8bcSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 122639c9ff80cSmrg 122649c9ff80cSmrg 12265d21ab8bcSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12266d21ab8bcSmrg# ----------------------------------------------------------------- 12267d21ab8bcSmrgm4_define([lt_if_dict_fetch], 12268d21ab8bcSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12269d21ab8bcSmrg [$5], 12270d21ab8bcSmrg [$6])]) 122719c9ff80cSmrg 122726fae4e5dSmrg 12273d21ab8bcSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12274d21ab8bcSmrg# -------------------------------------------------------------- 12275d21ab8bcSmrgm4_define([lt_dict_filter], 12276d21ab8bcSmrg[m4_if([$5], [], [], 12277d21ab8bcSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 12278d21ab8bcSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12279d21ab8bcSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12280d21ab8bcSmrg]) 12281d21ab8bcSmrg 12282d21ab8bcSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 122839c9ff80cSmrg# 12284d21ab8bcSmrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12285d21ab8bcSmrg# Inc. 12286d21ab8bcSmrg# Written by Scott James Remnant, 2004 122879c9ff80cSmrg# 12288d21ab8bcSmrg# This file is free software; the Free Software Foundation gives 12289d21ab8bcSmrg# unlimited permission to copy and/or distribute it, with or without 12290d21ab8bcSmrg# modifications, as long as this notice is preserved. 122919c9ff80cSmrg 12292d21ab8bcSmrg# @configure_input@ 12293b9867631Smrg 12294d21ab8bcSmrg# serial 4245 ltversion.m4 12295d21ab8bcSmrg# This file is part of GNU Libtool 12296d21ab8bcSmrg 12297d21ab8bcSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12298d21ab8bcSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 12299d21ab8bcSmrg 12300d21ab8bcSmrgAC_DEFUN([LTVERSION_VERSION], 12301d21ab8bcSmrg[macro_version='2.4.7' 12302d21ab8bcSmrgmacro_revision='2.4.7' 12303d21ab8bcSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12304d21ab8bcSmrg_LT_DECL(, macro_revision, 0) 123056fae4e5dSmrg]) 123069c9ff80cSmrg 12307d21ab8bcSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 123086fae4e5dSmrg# 12309d21ab8bcSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12310d21ab8bcSmrg# Software Foundation, Inc. 12311d21ab8bcSmrg# Written by Scott James Remnant, 2004. 12312d21ab8bcSmrg# 12313d21ab8bcSmrg# This file is free software; the Free Software Foundation gives 12314d21ab8bcSmrg# unlimited permission to copy and/or distribute it, with or without 12315d21ab8bcSmrg# modifications, as long as this notice is preserved. 12316d21ab8bcSmrg 12317d21ab8bcSmrg# serial 5 lt~obsolete.m4 12318d21ab8bcSmrg 12319d21ab8bcSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 123206fae4e5dSmrg# 12321d21ab8bcSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12322d21ab8bcSmrg# which have later been changed to m4_define as they aren't part of the 12323d21ab8bcSmrg# exported API, or moved to Autoconf or Automake where they belong. 123246fae4e5dSmrg# 12325d21ab8bcSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12326d21ab8bcSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12327d21ab8bcSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 12328d21ab8bcSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12329d21ab8bcSmrg# and doesn't know about Autoconf macros at all.) 12330d21ab8bcSmrg# 12331d21ab8bcSmrg# So we provide this file, which has a silly filename so it's always 12332d21ab8bcSmrg# included after everything else. This provides aclocal with the 12333d21ab8bcSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12334d21ab8bcSmrg# because those macros already exist, or will be overwritten later. 12335d21ab8bcSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12336d21ab8bcSmrg# 12337d21ab8bcSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12338d21ab8bcSmrg# Yes, that means every name once taken will need to remain here until 12339d21ab8bcSmrg# we give up compatibility with versions before 1.7, at which point 12340d21ab8bcSmrg# we need to keep only those names which we still refer to. 12341d21ab8bcSmrg 12342d21ab8bcSmrg# This is to help aclocal find these macros, as it can't see m4_define. 12343d21ab8bcSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12344d21ab8bcSmrg 12345d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12346d21ab8bcSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12347d21ab8bcSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12348d21ab8bcSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12349d21ab8bcSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12350d21ab8bcSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12351d21ab8bcSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12352d21ab8bcSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12353d21ab8bcSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12354d21ab8bcSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12355d21ab8bcSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12356d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12357d21ab8bcSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12358d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12359d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12360d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12361d21ab8bcSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12362d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12363d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12364d21ab8bcSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12365d21ab8bcSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12366d21ab8bcSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12367d21ab8bcSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12368d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12369d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12370d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12371d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12372d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12373d21ab8bcSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12374d21ab8bcSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12375d21ab8bcSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12376d21ab8bcSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12377d21ab8bcSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12378d21ab8bcSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12379d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12380d21ab8bcSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12381d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12382d21ab8bcSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12383d21ab8bcSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12384d21ab8bcSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12385d21ab8bcSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12386d21ab8bcSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12387d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12388d21ab8bcSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12389d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12390d21ab8bcSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12391d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12392d21ab8bcSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12393d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12394d21ab8bcSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12395d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12396d21ab8bcSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12397d21ab8bcSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12398d21ab8bcSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12399d21ab8bcSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12400d21ab8bcSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12401d21ab8bcSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12402d21ab8bcSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12403d21ab8bcSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12404d21ab8bcSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12405d21ab8bcSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 124061f0ac6a5Smrg 12407