1c30f5000Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2e494fffdSmrg 3c30f5000Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4e0963edeSmrg 5e0963edeSmrg# This file is free software; the Free Software Foundation 6e0963edeSmrg# gives unlimited permission to copy and/or distribute it, 7e0963edeSmrg# with or without modifications, as long as this notice is preserved. 8e0963edeSmrg 9e0963edeSmrg# This program is distributed in the hope that it will be useful, 10e0963edeSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11e0963edeSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12e0963edeSmrg# PARTICULAR PURPOSE. 13e0963edeSmrg 14e494fffdSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15e0963edeSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16e0963edeSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17c30f5000Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18c30f5000Smrg[m4_warning([this file was generated for autoconf 2.71. 19e0963edeSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20e0963edeSmrgIf you have problems, you may need to regenerate the build system entirely. 21e494fffdSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22e0963edeSmrg 23c30f5000Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24b3a827e2Smrg# 25c30f5000Smrg# This file is free software; the Free Software Foundation 26c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 27c30f5000Smrg# with or without modifications, as long as this notice is preserved. 2849e108a1Smrg 29c30f5000Smrg# AM_AUTOMAKE_VERSION(VERSION) 30c30f5000Smrg# ---------------------------- 31c30f5000Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32c30f5000Smrg# generated from the m4 files accompanying Automake X.Y. 33c30f5000Smrg# (This private macro should not be called outside this file.) 34c30f5000SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35c30f5000Smrg[am__api_version='1.16' 36c30f5000Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37c30f5000Smrgdnl require some minimum version. Point them to the right macro. 38c30f5000Smrgm4_if([$1], [1.16.5], [], 39c30f5000Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40b3a827e2Smrg]) 4149e108a1Smrg 42c30f5000Smrg# _AM_AUTOCONF_VERSION(VERSION) 43c30f5000Smrg# ----------------------------- 44c30f5000Smrg# aclocal traces this macro to find the Autoconf version. 45c30f5000Smrg# This is a private macro too. Using m4_define simplifies 46c30f5000Smrg# the logic in aclocal, which can simply ignore this definition. 47c30f5000Smrgm4_define([_AM_AUTOCONF_VERSION], []) 4849e108a1Smrg 49c30f5000Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50c30f5000Smrg# ------------------------------- 51c30f5000Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52c30f5000Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53c30f5000SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54c30f5000Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 55c30f5000Smrgm4_ifndef([AC_AUTOCONF_VERSION], 56c30f5000Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57c30f5000Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5849e108a1Smrg 59c30f5000Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60f05b35a2Smrg 61c30f5000Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62c30f5000Smrg# 63c30f5000Smrg# This file is free software; the Free Software Foundation 64c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 65c30f5000Smrg# with or without modifications, as long as this notice is preserved. 66e0963edeSmrg 67c30f5000Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68c30f5000Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69c30f5000Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70c30f5000Smrg# 71c30f5000Smrg# Of course, Automake must honor this variable whenever it calls a 72c30f5000Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 73c30f5000Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74c30f5000Smrg# depending on how configure is run. This is pretty annoying, since 75c30f5000Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76c30f5000Smrg# source directory, any form will work fine, but in subdirectories a 77c30f5000Smrg# relative path needs to be adjusted first. 78c30f5000Smrg# 79c30f5000Smrg# $ac_aux_dir/missing 80c30f5000Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 81c30f5000Smrg# $top_srcdir/$ac_aux_dir/missing 82c30f5000Smrg# fails if $ac_aux_dir is absolute, 83c30f5000Smrg# fails when called from a subdirectory in a VPATH build with 84c30f5000Smrg# a relative $ac_aux_dir 85c30f5000Smrg# 86c30f5000Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87c30f5000Smrg# are both prefixed by $srcdir. In an in-source build this is usually 88c30f5000Smrg# harmless because $srcdir is '.', but things will broke when you 89c30f5000Smrg# start a VPATH build or use an absolute $srcdir. 90c30f5000Smrg# 91c30f5000Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92c30f5000Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93c30f5000Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94c30f5000Smrg# and then we would define $MISSING as 95c30f5000Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 96c30f5000Smrg# This will work as long as MISSING is not called from configure, because 97c30f5000Smrg# unfortunately $(top_srcdir) has no meaning in configure. 98c30f5000Smrg# However there are other variables, like CC, which are often used in 99c30f5000Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100c30f5000Smrg# 101c30f5000Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 102c30f5000Smrg# absolute PATH. The drawback is that using absolute paths prevent a 103c30f5000Smrg# configured tree to be moved without reconfiguration. 104c30f5000Smrg 105c30f5000SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106c30f5000Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107c30f5000Smrg# Expand $ac_aux_dir to an absolute path. 108c30f5000Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 109f05b35a2Smrg]) 110f05b35a2Smrg 111c30f5000Smrg# AM_CONDITIONAL -*- Autoconf -*- 112f05b35a2Smrg 113c30f5000Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114c30f5000Smrg# 115c30f5000Smrg# This file is free software; the Free Software Foundation 116c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 117c30f5000Smrg# with or without modifications, as long as this notice is preserved. 118e0963edeSmrg 119c30f5000Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120c30f5000Smrg# ------------------------------------- 121c30f5000Smrg# Define a conditional. 122c30f5000SmrgAC_DEFUN([AM_CONDITIONAL], 123c30f5000Smrg[AC_PREREQ([2.52])dnl 124c30f5000Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125c30f5000Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126c30f5000SmrgAC_SUBST([$1_TRUE])dnl 127c30f5000SmrgAC_SUBST([$1_FALSE])dnl 128c30f5000Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129c30f5000Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130c30f5000Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131c30f5000Smrgif $2; then 132c30f5000Smrg $1_TRUE= 133c30f5000Smrg $1_FALSE='#' 134c30f5000Smrgelse 135c30f5000Smrg $1_TRUE='#' 136c30f5000Smrg $1_FALSE= 137c30f5000Smrgfi 138c30f5000SmrgAC_CONFIG_COMMANDS_PRE( 139c30f5000Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140c30f5000Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 141c30f5000SmrgUsually this means the macro was only invoked conditionally.]]) 142c30f5000Smrgfi])]) 143e0963edeSmrg 144c30f5000Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145c30f5000Smrg# 146c30f5000Smrg# This file is free software; the Free Software Foundation 147c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 148c30f5000Smrg# with or without modifications, as long as this notice is preserved. 149f05b35a2Smrg 150f05b35a2Smrg 151c30f5000Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152c30f5000Smrg# written in clear, in which case automake, when reading aclocal.m4, 153c30f5000Smrg# will think it sees a *use*, and therefore will trigger all it's 154c30f5000Smrg# C support machinery. Also note that it means that autoscan, seeing 155c30f5000Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156f05b35a2Smrg 157f05b35a2Smrg 158c30f5000Smrg# _AM_DEPENDENCIES(NAME) 159c30f5000Smrg# ---------------------- 160c30f5000Smrg# See how the compiler implements dependency checking. 161c30f5000Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162c30f5000Smrg# We try a few techniques and use that to set a single cache variable. 163c30f5000Smrg# 164c30f5000Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165c30f5000Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166c30f5000Smrg# dependency, and given that the user is not expected to run this macro, 167c30f5000Smrg# just rely on AC_PROG_CC. 168c30f5000SmrgAC_DEFUN([_AM_DEPENDENCIES], 169c30f5000Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170c30f5000SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171c30f5000SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172c30f5000SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 173f05b35a2Smrg 174c30f5000Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175c30f5000Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176c30f5000Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177c30f5000Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178c30f5000Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179c30f5000Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180c30f5000Smrg [depcc="$$1" am_compiler_list=]) 181f05b35a2Smrg 182c30f5000SmrgAC_CACHE_CHECK([dependency style of $depcc], 183c30f5000Smrg [am_cv_$1_dependencies_compiler_type], 184c30f5000Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185c30f5000Smrg # We make a subdir and do the tests there. Otherwise we can end up 186c30f5000Smrg # making bogus files that we don't know about and never remove. For 187c30f5000Smrg # instance it was reported that on HP-UX the gcc test will end up 188c30f5000Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 189c30f5000Smrg # in D". 190c30f5000Smrg rm -rf conftest.dir 191c30f5000Smrg mkdir conftest.dir 192c30f5000Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 193c30f5000Smrg # using a relative directory. 194c30f5000Smrg cp "$am_depcomp" conftest.dir 195c30f5000Smrg cd conftest.dir 196c30f5000Smrg # We will build objects and dependencies in a subdirectory because 197c30f5000Smrg # it helps to detect inapplicable dependency modes. For instance 198c30f5000Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 199c30f5000Smrg # side effect of compilation, but ICC will put the dependencies in 200c30f5000Smrg # the current directory while Tru64 will put them in the object 201c30f5000Smrg # directory. 202c30f5000Smrg mkdir sub 203e0963edeSmrg 204c30f5000Smrg am_cv_$1_dependencies_compiler_type=none 205c30f5000Smrg if test "$am_compiler_list" = ""; then 206c30f5000Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207c30f5000Smrg fi 208c30f5000Smrg am__universal=false 209c30f5000Smrg m4_case([$1], [CC], 210c30f5000Smrg [case " $depcc " in #( 211c30f5000Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212c30f5000Smrg esac], 213c30f5000Smrg [CXX], 214c30f5000Smrg [case " $depcc " in #( 215c30f5000Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216c30f5000Smrg esac]) 217e0963edeSmrg 218c30f5000Smrg for depmode in $am_compiler_list; do 219c30f5000Smrg # Setup a source with many dependencies, because some compilers 220c30f5000Smrg # like to wrap large dependency lists on column 80 (with \), and 221c30f5000Smrg # we should not choose a depcomp mode which is confused by this. 222c30f5000Smrg # 223c30f5000Smrg # We need to recreate these files for each test, as the compiler may 224c30f5000Smrg # overwrite some of them when testing with obscure command lines. 225c30f5000Smrg # This happens at least with the AIX C compiler. 226c30f5000Smrg : > sub/conftest.c 227c30f5000Smrg for i in 1 2 3 4 5 6; do 228c30f5000Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229c30f5000Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230c30f5000Smrg # Solaris 10 /bin/sh. 231c30f5000Smrg echo '/* dummy */' > sub/conftst$i.h 23249e108a1Smrg done 233c30f5000Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234e0963edeSmrg 235c30f5000Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236c30f5000Smrg # mode. It turns out that the SunPro C++ compiler does not properly 237c30f5000Smrg # handle '-M -o', and we need to detect this. Also, some Intel 238c30f5000Smrg # versions had trouble with output in subdirs. 239c30f5000Smrg am__obj=sub/conftest.${OBJEXT-o} 240c30f5000Smrg am__minus_obj="-o $am__obj" 241c30f5000Smrg case $depmode in 242c30f5000Smrg gcc) 243c30f5000Smrg # This depmode causes a compiler race in universal mode. 244c30f5000Smrg test "$am__universal" = false || continue 245c30f5000Smrg ;; 246c30f5000Smrg nosideeffect) 247c30f5000Smrg # After this tag, mechanisms are not by side-effect, so they'll 248c30f5000Smrg # only be used when explicitly requested. 249c30f5000Smrg if test "x$enable_dependency_tracking" = xyes; then 250c30f5000Smrg continue 251c30f5000Smrg else 252c30f5000Smrg break 253c30f5000Smrg fi 254c30f5000Smrg ;; 255c30f5000Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256c30f5000Smrg # This compiler won't grok '-c -o', but also, the minuso test has 257c30f5000Smrg # not run yet. These depmodes are late enough in the game, and 258c30f5000Smrg # so weak that their functioning should not be impacted. 259c30f5000Smrg am__obj=conftest.${OBJEXT-o} 260c30f5000Smrg am__minus_obj= 261c30f5000Smrg ;; 262c30f5000Smrg none) break ;; 263c30f5000Smrg esac 264c30f5000Smrg if depmode=$depmode \ 265c30f5000Smrg source=sub/conftest.c object=$am__obj \ 266c30f5000Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267c30f5000Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268c30f5000Smrg >/dev/null 2>conftest.err && 269c30f5000Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270c30f5000Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271c30f5000Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272c30f5000Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273c30f5000Smrg # icc doesn't choke on unknown options, it will just issue warnings 274c30f5000Smrg # or remarks (even with -Werror). So we grep stderr for any message 275c30f5000Smrg # that says an option was ignored or not supported. 276c30f5000Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277c30f5000Smrg # icc: Command line warning: ignoring option '-M'; no argument required 278c30f5000Smrg # The diagnosis changed in icc 8.0: 279c30f5000Smrg # icc: Command line remark: option '-MP' not supported 280c30f5000Smrg if (grep 'ignoring option' conftest.err || 281c30f5000Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282c30f5000Smrg am_cv_$1_dependencies_compiler_type=$depmode 283c30f5000Smrg break 284c30f5000Smrg fi 285c30f5000Smrg fi 286c30f5000Smrg done 287e0963edeSmrg 288c30f5000Smrg cd .. 289c30f5000Smrg rm -rf conftest.dir 290c30f5000Smrgelse 291c30f5000Smrg am_cv_$1_dependencies_compiler_type=none 292c30f5000Smrgfi 293c30f5000Smrg]) 294c30f5000SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295c30f5000SmrgAM_CONDITIONAL([am__fastdep$1], [ 296c30f5000Smrg test "x$enable_dependency_tracking" != xno \ 297c30f5000Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 29849e108a1Smrg]) 299e0963edeSmrg 300e0963edeSmrg 301c30f5000Smrg# AM_SET_DEPDIR 302c30f5000Smrg# ------------- 303c30f5000Smrg# Choose a directory name for dependency files. 304c30f5000Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305c30f5000SmrgAC_DEFUN([AM_SET_DEPDIR], 306c30f5000Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307c30f5000SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308c30f5000Smrg]) 309b3a827e2Smrg 310b3a827e2Smrg 311c30f5000Smrg# AM_DEP_TRACK 312c30f5000Smrg# ------------ 313c30f5000SmrgAC_DEFUN([AM_DEP_TRACK], 314c30f5000Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 315c30f5000SmrgAS_HELP_STRING( 316c30f5000Smrg [--enable-dependency-tracking], 317c30f5000Smrg [do not reject slow dependency extractors]) 318c30f5000SmrgAS_HELP_STRING( 319c30f5000Smrg [--disable-dependency-tracking], 320c30f5000Smrg [speeds up one-time build])]) 321c30f5000Smrgif test "x$enable_dependency_tracking" != xno; then 322c30f5000Smrg am_depcomp="$ac_aux_dir/depcomp" 323c30f5000Smrg AMDEPBACKSLASH='\' 324c30f5000Smrg am__nodep='_no' 32549e108a1Smrgfi 326c30f5000SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327c30f5000SmrgAC_SUBST([AMDEPBACKSLASH])dnl 328c30f5000Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329c30f5000SmrgAC_SUBST([am__nodep])dnl 330c30f5000Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 33149e108a1Smrg]) 332e0963edeSmrg 333c30f5000Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 334e0963edeSmrg 335c30f5000Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 336c30f5000Smrg# 337c30f5000Smrg# This file is free software; the Free Software Foundation 338c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 339c30f5000Smrg# with or without modifications, as long as this notice is preserved. 340f05b35a2Smrg 341c30f5000Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 342c30f5000Smrg# ------------------------------ 343c30f5000SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344c30f5000Smrg[{ 345c30f5000Smrg # Older Autoconf quotes --file arguments for eval, but not when files 346c30f5000Smrg # are listed without --file. Let's play safe and only enable the eval 347c30f5000Smrg # if we detect the quoting. 348c30f5000Smrg # TODO: see whether this extra hack can be removed once we start 349c30f5000Smrg # requiring Autoconf 2.70 or later. 350c30f5000Smrg AS_CASE([$CONFIG_FILES], 351c30f5000Smrg [*\'*], [eval set x "$CONFIG_FILES"], 352c30f5000Smrg [*], [set x $CONFIG_FILES]) 353c30f5000Smrg shift 354c30f5000Smrg # Used to flag and report bootstrapping failures. 355c30f5000Smrg am_rc=0 356c30f5000Smrg for am_mf 357c30f5000Smrg do 358c30f5000Smrg # Strip MF so we end up with the name of the file. 359c30f5000Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360c30f5000Smrg # Check whether this is an Automake generated Makefile which includes 361c30f5000Smrg # dependency-tracking related rules and includes. 362c30f5000Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 363c30f5000Smrg # limit of 2048, but all sed's we know have understand at least 4000. 364c30f5000Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365c30f5000Smrg || continue 366c30f5000Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 367c30f5000Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 368c30f5000Smrg AM_RUN_LOG([cd "$am_dirpart" \ 369c30f5000Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 370c30f5000Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 371c30f5000Smrg done 372c30f5000Smrg if test $am_rc -ne 0; then 373c30f5000Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374c30f5000Smrg for automatic dependency tracking. If GNU make was not used, consider 375c30f5000Smrg re-running the configure script with MAKE="gmake" (or whatever is 376c30f5000Smrg necessary). You can also try re-running configure with the 377c30f5000Smrg '--disable-dependency-tracking' option to at least be able to build 378c30f5000Smrg the package (albeit without support for automatic dependency tracking).]) 379b3a827e2Smrg fi 380c30f5000Smrg AS_UNSET([am_dirpart]) 381c30f5000Smrg AS_UNSET([am_filepart]) 382c30f5000Smrg AS_UNSET([am_mf]) 383c30f5000Smrg AS_UNSET([am_rc]) 384c30f5000Smrg rm -f conftest-deps.mk 385c30f5000Smrg} 386c30f5000Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 387f05b35a2Smrg 388f05b35a2Smrg 389c30f5000Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 390c30f5000Smrg# ----------------------------- 391c30f5000Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 392c30f5000Smrg# 393c30f5000Smrg# This code is only required when automatic dependency tracking is enabled. 394c30f5000Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395c30f5000Smrg# order to bootstrap the dependency handling code. 396c30f5000SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397c30f5000Smrg[AC_CONFIG_COMMANDS([depfiles], 398c30f5000Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399c30f5000Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 400f05b35a2Smrg 401c30f5000Smrg# Do all the work for Automake. -*- Autoconf -*- 402f05b35a2Smrg 403c30f5000Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 404c30f5000Smrg# 405c30f5000Smrg# This file is free software; the Free Software Foundation 406c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 407c30f5000Smrg# with or without modifications, as long as this notice is preserved. 408f05b35a2Smrg 409c30f5000Smrg# This macro actually does too much. Some checks are only needed if 410c30f5000Smrg# your package does certain things. But this isn't really a big deal. 411f05b35a2Smrg 412c30f5000Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 413c30f5000Smrgm4_define([AC_PROG_CC], 414c30f5000Smrgm4_defn([AC_PROG_CC]) 415c30f5000Smrg[_AM_PROG_CC_C_O 416c30f5000Smrg]) 417f05b35a2Smrg 418c30f5000Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419c30f5000Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 420c30f5000Smrg# ----------------------------------------------- 421c30f5000Smrg# The call with PACKAGE and VERSION arguments is the old style 422c30f5000Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 423c30f5000Smrg# and VERSION should now be passed to AC_INIT and removed from 424c30f5000Smrg# the call to AM_INIT_AUTOMAKE. 425c30f5000Smrg# We support both call styles for the transition. After 426c30f5000Smrg# the next Automake release, Autoconf can make the AC_INIT 427c30f5000Smrg# arguments mandatory, and then we can depend on a new Autoconf 428c30f5000Smrg# release and drop the old call support. 429c30f5000SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 430c30f5000Smrg[AC_PREREQ([2.65])dnl 431c30f5000Smrgm4_ifdef([_$0_ALREADY_INIT], 432c30f5000Smrg [m4_fatal([$0 expanded multiple times 433c30f5000Smrg]m4_defn([_$0_ALREADY_INIT]))], 434c30f5000Smrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435c30f5000Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 436c30f5000Smrgdnl the ones we care about. 437c30f5000Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438c30f5000SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439c30f5000SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 440c30f5000Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 441c30f5000Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442c30f5000Smrg # is not polluted with repeated "-I." 443c30f5000Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444c30f5000Smrg # test to see if srcdir already configured 445c30f5000Smrg if test -f $srcdir/config.status; then 446c30f5000Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 447c30f5000Smrg fi 448c30f5000Smrgfi 449f05b35a2Smrg 450c30f5000Smrg# test whether we have cygpath 451c30f5000Smrgif test -z "$CYGPATH_W"; then 452c30f5000Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 453c30f5000Smrg CYGPATH_W='cygpath -w' 454c30f5000Smrg else 455c30f5000Smrg CYGPATH_W=echo 456c30f5000Smrg fi 457c30f5000Smrgfi 458c30f5000SmrgAC_SUBST([CYGPATH_W]) 459f05b35a2Smrg 460c30f5000Smrg# Define the identity of the package. 461c30f5000Smrgdnl Distinguish between old-style and new-style calls. 462c30f5000Smrgm4_ifval([$2], 463c30f5000Smrg[AC_DIAGNOSE([obsolete], 464c30f5000Smrg [$0: two- and three-arguments forms are deprecated.]) 465c30f5000Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466c30f5000Smrg AC_SUBST([PACKAGE], [$1])dnl 467c30f5000Smrg AC_SUBST([VERSION], [$2])], 468c30f5000Smrg[_AM_SET_OPTIONS([$1])dnl 469c30f5000Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 470c30f5000Smrgm4_if( 471c30f5000Smrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 472c30f5000Smrg [ok:ok],, 473c30f5000Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474c30f5000Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475c30f5000Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476f05b35a2Smrg 477c30f5000Smrg_AM_IF_OPTION([no-define],, 478c30f5000Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 479c30f5000Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 480f05b35a2Smrg 481c30f5000Smrg# Some tools Automake needs. 482c30f5000SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 483c30f5000SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 484c30f5000SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 485c30f5000SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 486c30f5000SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 487c30f5000SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 488c30f5000SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 489c30f5000SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490c30f5000SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 491c30f5000SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 492c30f5000Smrg# For better backward compatibility. To be removed once Automake 1.9.x 493c30f5000Smrg# dies out for good. For more background, see: 494c30f5000Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495c30f5000Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 496c30f5000SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497c30f5000Smrg# We need awk for the "check" target (and possibly the TAP driver). The 498c30f5000Smrg# system "awk" is bad on some platforms. 499c30f5000SmrgAC_REQUIRE([AC_PROG_AWK])dnl 500c30f5000SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 501c30f5000SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 502c30f5000Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503c30f5000Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504c30f5000Smrg [_AM_PROG_TAR([v7])])]) 505c30f5000Smrg_AM_IF_OPTION([no-dependencies],, 506c30f5000Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 507c30f5000Smrg [_AM_DEPENDENCIES([CC])], 508c30f5000Smrg [m4_define([AC_PROG_CC], 509c30f5000Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510c30f5000SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 511c30f5000Smrg [_AM_DEPENDENCIES([CXX])], 512c30f5000Smrg [m4_define([AC_PROG_CXX], 513c30f5000Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514c30f5000SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 515c30f5000Smrg [_AM_DEPENDENCIES([OBJC])], 516c30f5000Smrg [m4_define([AC_PROG_OBJC], 517c30f5000Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 518c30f5000SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 519c30f5000Smrg [_AM_DEPENDENCIES([OBJCXX])], 520c30f5000Smrg [m4_define([AC_PROG_OBJCXX], 521c30f5000Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 522b3a827e2Smrg]) 523c30f5000Smrg# Variables for tags utilities; see am/tags.am 524c30f5000Smrgif test -z "$CTAGS"; then 525c30f5000Smrg CTAGS=ctags 526c30f5000Smrgfi 527c30f5000SmrgAC_SUBST([CTAGS]) 528c30f5000Smrgif test -z "$ETAGS"; then 529c30f5000Smrg ETAGS=etags 530c30f5000Smrgfi 531c30f5000SmrgAC_SUBST([ETAGS]) 532c30f5000Smrgif test -z "$CSCOPE"; then 533c30f5000Smrg CSCOPE=cscope 534c30f5000Smrgfi 535c30f5000SmrgAC_SUBST([CSCOPE]) 536f05b35a2Smrg 537c30f5000SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 538c30f5000Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 539c30f5000Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 540c30f5000Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541c30f5000SmrgAC_CONFIG_COMMANDS_PRE(dnl 542c30f5000Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 543c30f5000Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544f05b35a2Smrg 545c30f5000Smrg# POSIX will say in a future version that running "rm -f" with no argument 546c30f5000Smrg# is OK; and we want to be able to make that assumption in our Makefile 547c30f5000Smrg# recipes. So use an aggressive probe to check that the usage we want is 548c30f5000Smrg# actually supported "in the wild" to an acceptable degree. 549c30f5000Smrg# See automake bug#10828. 550c30f5000Smrg# To make any issue more visible, cause the running configure to be aborted 551c30f5000Smrg# by default if the 'rm' program in use doesn't match our expectations; the 552c30f5000Smrg# user can still override this though. 553c30f5000Smrgif rm -f && rm -fr && rm -rf; then : OK; else 554c30f5000Smrg cat >&2 <<'END' 555c30f5000SmrgOops! 556f05b35a2Smrg 557c30f5000SmrgYour 'rm' program seems unable to run without file operands specified 558c30f5000Smrgon the command line, even when the '-f' option is present. This is contrary 559c30f5000Smrgto the behaviour of most rm programs out there, and not conforming with 560c30f5000Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 561f05b35a2Smrg 562c30f5000SmrgPlease tell bug-automake@gnu.org about your system, including the value 563c30f5000Smrgof your $PATH and any error possibly output before this message. This 564c30f5000Smrgcan help us improve future automake versions. 565f05b35a2Smrg 566c30f5000SmrgEND 567c30f5000Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 568c30f5000Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 569c30f5000Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 570c30f5000Smrg echo >&2 571c30f5000Smrg else 572c30f5000Smrg cat >&2 <<'END' 573c30f5000SmrgAborting the configuration process, to ensure you take notice of the issue. 574f05b35a2Smrg 575c30f5000SmrgYou can download and install GNU coreutils to get an 'rm' implementation 576c30f5000Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 577b3a827e2Smrg 578c30f5000SmrgIf you want to complete the configuration process using your problematic 579c30f5000Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 580c30f5000Smrgto "yes", and re-run configure. 581b3a827e2Smrg 582c30f5000SmrgEND 583c30f5000Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 584c30f5000Smrg fi 585c30f5000Smrgfi 586c30f5000Smrgdnl The trailing newline in this macro's definition is deliberate, for 587c30f5000Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 588c30f5000Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 58949e108a1Smrg]) 590f05b35a2Smrg 591c30f5000Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592c30f5000Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593c30f5000Smrgdnl mangled by Autoconf and run in a shell conditional statement. 594c30f5000Smrgm4_define([_AC_COMPILER_EXEEXT], 595c30f5000Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 596f05b35a2Smrg 597c30f5000Smrg# When config.status generates a header, we must update the stamp-h file. 598c30f5000Smrg# This file resides in the same directory as the config header 599c30f5000Smrg# that is generated. The stamp files are numbered to have different names. 600f05b35a2Smrg 601c30f5000Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602c30f5000Smrg# loop where config.status creates the headers, so we can generate 603c30f5000Smrg# our stamp files there. 604c30f5000SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605c30f5000Smrg[# Compute $1's index in $config_headers. 606c30f5000Smrg_am_arg=$1 607c30f5000Smrg_am_stamp_count=1 608c30f5000Smrgfor _am_header in $config_headers :; do 609c30f5000Smrg case $_am_header in 610c30f5000Smrg $_am_arg | $_am_arg:* ) 611c30f5000Smrg break ;; 612c30f5000Smrg * ) 613c30f5000Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614c30f5000Smrg esac 615c30f5000Smrgdone 616c30f5000Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617f05b35a2Smrg 618c30f5000Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 619c30f5000Smrg# 620c30f5000Smrg# This file is free software; the Free Software Foundation 621c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 622c30f5000Smrg# with or without modifications, as long as this notice is preserved. 623f05b35a2Smrg 624c30f5000Smrg# AM_PROG_INSTALL_SH 625c30f5000Smrg# ------------------ 626c30f5000Smrg# Define $install_sh. 627c30f5000SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 628c30f5000Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629c30f5000Smrgif test x"${install_sh+set}" != xset; then 630c30f5000Smrg case $am_aux_dir in 631c30f5000Smrg *\ * | *\ *) 632c30f5000Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633c30f5000Smrg *) 634c30f5000Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 635c30f5000Smrg esac 636c30f5000Smrgfi 637c30f5000SmrgAC_SUBST([install_sh])]) 638f05b35a2Smrg 639c30f5000Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 640c30f5000Smrg# 641c30f5000Smrg# This file is free software; the Free Software Foundation 642c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 643c30f5000Smrg# with or without modifications, as long as this notice is preserved. 644f05b35a2Smrg 645c30f5000Smrg# Check whether the underlying file-system supports filenames 646c30f5000Smrg# with a leading dot. For instance MS-DOS doesn't. 647c30f5000SmrgAC_DEFUN([AM_SET_LEADING_DOT], 648c30f5000Smrg[rm -rf .tst 2>/dev/null 649c30f5000Smrgmkdir .tst 2>/dev/null 650c30f5000Smrgif test -d .tst; then 651c30f5000Smrg am__leading_dot=. 652c30f5000Smrgelse 653c30f5000Smrg am__leading_dot=_ 654c30f5000Smrgfi 655c30f5000Smrgrmdir .tst 2>/dev/null 656c30f5000SmrgAC_SUBST([am__leading_dot])]) 657f05b35a2Smrg 658c30f5000Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 659e494fffdSmrg 660c30f5000Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661c30f5000Smrg# 662c30f5000Smrg# This file is free software; the Free Software Foundation 663c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 664c30f5000Smrg# with or without modifications, as long as this notice is preserved. 665f05b35a2Smrg 666c30f5000Smrg# AM_MAKE_INCLUDE() 667c30f5000Smrg# ----------------- 668c30f5000Smrg# Check whether make has an 'include' directive that can support all 669c30f5000Smrg# the idioms we need for our automatic dependency tracking code. 670c30f5000SmrgAC_DEFUN([AM_MAKE_INCLUDE], 671c30f5000Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672c30f5000Smrgcat > confinc.mk << 'END' 673c30f5000Smrgam__doit: 674c30f5000Smrg @echo this is the am__doit target >confinc.out 675c30f5000Smrg.PHONY: am__doit 676c30f5000SmrgEND 677c30f5000Smrgam__include="#" 678c30f5000Smrgam__quote= 679c30f5000Smrg# BSD make does it like this. 680c30f5000Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 681c30f5000Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682c30f5000Smrgecho 'include confinc.mk # ignored' > confmf.GNU 683c30f5000Smrg_am_result=no 684c30f5000Smrgfor s in GNU BSD; do 685c30f5000Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686c30f5000Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687c30f5000Smrg ['0:this is the am__doit target'], 688c30f5000Smrg [AS_CASE([$s], 689c30f5000Smrg [BSD], [am__include='.include' am__quote='"'], 690c30f5000Smrg [am__include='include' am__quote=''])]) 691c30f5000Smrg if test "$am__include" != "#"; then 692c30f5000Smrg _am_result="yes ($s style)" 693c30f5000Smrg break 694c30f5000Smrg fi 695c30f5000Smrgdone 696c30f5000Smrgrm -f confinc.* confmf.* 697c30f5000SmrgAC_MSG_RESULT([${_am_result}]) 698c30f5000SmrgAC_SUBST([am__include])]) 699c30f5000SmrgAC_SUBST([am__quote])]) 700f05b35a2Smrg 701c30f5000Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702f05b35a2Smrg 703c30f5000Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704c30f5000Smrg# 705c30f5000Smrg# This file is free software; the Free Software Foundation 706c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 707c30f5000Smrg# with or without modifications, as long as this notice is preserved. 708f05b35a2Smrg 709c30f5000Smrg# AM_MISSING_PROG(NAME, PROGRAM) 710c30f5000Smrg# ------------------------------ 711c30f5000SmrgAC_DEFUN([AM_MISSING_PROG], 712c30f5000Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713c30f5000Smrg$1=${$1-"${am_missing_run}$2"} 714c30f5000SmrgAC_SUBST($1)]) 715c30f5000Smrg 716c30f5000Smrg# AM_MISSING_HAS_RUN 717c30f5000Smrg# ------------------ 718c30f5000Smrg# Define MISSING if not defined so far and test if it is modern enough. 719c30f5000Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 720c30f5000SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 721c30f5000Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722c30f5000SmrgAC_REQUIRE_AUX_FILE([missing])dnl 723c30f5000Smrgif test x"${MISSING+set}" != xset; then 724c30f5000Smrg MISSING="\${SHELL} '$am_aux_dir/missing'" 725c30f5000Smrgfi 726c30f5000Smrg# Use eval to expand $SHELL 727c30f5000Smrgif eval "$MISSING --is-lightweight"; then 728c30f5000Smrg am_missing_run="$MISSING " 729c30f5000Smrgelse 730c30f5000Smrg am_missing_run= 731c30f5000Smrg AC_MSG_WARN(['missing' script is too old or missing]) 732c30f5000Smrgfi 733c30f5000Smrg]) 734f05b35a2Smrg 735c30f5000Smrg# Helper functions for option handling. -*- Autoconf -*- 736f05b35a2Smrg 737c30f5000Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738c30f5000Smrg# 739c30f5000Smrg# This file is free software; the Free Software Foundation 740c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 741c30f5000Smrg# with or without modifications, as long as this notice is preserved. 742f05b35a2Smrg 743c30f5000Smrg# _AM_MANGLE_OPTION(NAME) 744c30f5000Smrg# ----------------------- 745c30f5000SmrgAC_DEFUN([_AM_MANGLE_OPTION], 746c30f5000Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747e0963edeSmrg 748c30f5000Smrg# _AM_SET_OPTION(NAME) 749c30f5000Smrg# -------------------- 750c30f5000Smrg# Set option NAME. Presently that only means defining a flag for this option. 751c30f5000SmrgAC_DEFUN([_AM_SET_OPTION], 752c30f5000Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753f05b35a2Smrg 754c30f5000Smrg# _AM_SET_OPTIONS(OPTIONS) 755c30f5000Smrg# ------------------------ 756c30f5000Smrg# OPTIONS is a space-separated list of Automake options. 757c30f5000SmrgAC_DEFUN([_AM_SET_OPTIONS], 758c30f5000Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759e494fffdSmrg 760c30f5000Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761c30f5000Smrg# ------------------------------------------- 762c30f5000Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763c30f5000SmrgAC_DEFUN([_AM_IF_OPTION], 764c30f5000Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 765e0963edeSmrg 766c30f5000Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 767c30f5000Smrg# 768c30f5000Smrg# This file is free software; the Free Software Foundation 769c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 770c30f5000Smrg# with or without modifications, as long as this notice is preserved. 771e0963edeSmrg 772c30f5000Smrg# _AM_PROG_CC_C_O 773c30f5000Smrg# --------------- 774c30f5000Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 775c30f5000Smrg# to automatically call this. 776c30f5000SmrgAC_DEFUN([_AM_PROG_CC_C_O], 777c30f5000Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778c30f5000SmrgAC_REQUIRE_AUX_FILE([compile])dnl 779c30f5000SmrgAC_LANG_PUSH([C])dnl 780c30f5000SmrgAC_CACHE_CHECK( 781c30f5000Smrg [whether $CC understands -c and -o together], 782c30f5000Smrg [am_cv_prog_cc_c_o], 783c30f5000Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 784c30f5000Smrg # Make sure it works both with $CC and with simple cc. 785c30f5000Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 786c30f5000Smrg # compilers refuse to overwrite an existing .o file with -o, 787c30f5000Smrg # though they will create one. 788c30f5000Smrg am_cv_prog_cc_c_o=yes 789c30f5000Smrg for am_i in 1 2; do 790c30f5000Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 791c30f5000Smrg && test -f conftest2.$ac_objext; then 792c30f5000Smrg : OK 793c30f5000Smrg else 794c30f5000Smrg am_cv_prog_cc_c_o=no 795c30f5000Smrg break 796c30f5000Smrg fi 797c30f5000Smrg done 798c30f5000Smrg rm -f core conftest* 799c30f5000Smrg unset am_i]) 800c30f5000Smrgif test "$am_cv_prog_cc_c_o" != yes; then 801c30f5000Smrg # Losing compiler, so override with the script. 802c30f5000Smrg # FIXME: It is wrong to rewrite CC. 803c30f5000Smrg # But if we don't then we get into trouble of one sort or another. 804c30f5000Smrg # A longer-term fix would be to have automake use am__CC in this case, 805c30f5000Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 806c30f5000Smrg CC="$am_aux_dir/compile $CC" 807c30f5000Smrgfi 808c30f5000SmrgAC_LANG_POP([C])]) 809e0963edeSmrg 810c30f5000Smrg# For backward compatibility. 811c30f5000SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 812e0963edeSmrg 813c30f5000Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 814b3a827e2Smrg# 815c30f5000Smrg# This file is free software; the Free Software Foundation 816c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 817c30f5000Smrg# with or without modifications, as long as this notice is preserved. 818e0963edeSmrg 819c30f5000Smrg# AM_RUN_LOG(COMMAND) 820c30f5000Smrg# ------------------- 821c30f5000Smrg# Run COMMAND, save the exit status in ac_status, and log it. 822c30f5000Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 823c30f5000SmrgAC_DEFUN([AM_RUN_LOG], 824c30f5000Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 825c30f5000Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 826c30f5000Smrg ac_status=$? 827c30f5000Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 828c30f5000Smrg (exit $ac_status); }]) 829e494fffdSmrg 830c30f5000Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 83167ab2ff2Smrg 832c30f5000Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833b3a827e2Smrg# 834c30f5000Smrg# This file is free software; the Free Software Foundation 835c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 836c30f5000Smrg# with or without modifications, as long as this notice is preserved. 837e0963edeSmrg 838c30f5000Smrg# AM_SANITY_CHECK 839c30f5000Smrg# --------------- 840c30f5000SmrgAC_DEFUN([AM_SANITY_CHECK], 841c30f5000Smrg[AC_MSG_CHECKING([whether build environment is sane]) 842c30f5000Smrg# Reject unsafe characters in $srcdir or the absolute working directory 843c30f5000Smrg# name. Accept space and tab only in the latter. 844c30f5000Smrgam_lf=' 845c30f5000Smrg' 846c30f5000Smrgcase `pwd` in 847c30f5000Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 848c30f5000Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 849c30f5000Smrgesac 850c30f5000Smrgcase $srcdir in 851c30f5000Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 852c30f5000Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853c30f5000Smrgesac 854f05b35a2Smrg 855c30f5000Smrg# Do 'set' in a subshell so we don't clobber the current shell's 856c30f5000Smrg# arguments. Must try -L first in case configure is actually a 857c30f5000Smrg# symlink; some systems play weird games with the mod time of symlinks 858c30f5000Smrg# (eg FreeBSD returns the mod time of the symlink's containing 859c30f5000Smrg# directory). 860c30f5000Smrgif ( 861c30f5000Smrg am_has_slept=no 862c30f5000Smrg for am_try in 1 2; do 863c30f5000Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 864c30f5000Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 865c30f5000Smrg if test "$[*]" = "X"; then 866c30f5000Smrg # -L didn't work. 867c30f5000Smrg set X `ls -t "$srcdir/configure" conftest.file` 868c30f5000Smrg fi 869c30f5000Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 870c30f5000Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 871f05b35a2Smrg 872c30f5000Smrg # If neither matched, then we have a broken ls. This can happen 873c30f5000Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 874c30f5000Smrg # broken ls alias from the environment. This has actually 875c30f5000Smrg # happened. Such a system could not be considered "sane". 876c30f5000Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 877c30f5000Smrg alias in your environment]) 878c30f5000Smrg fi 879c30f5000Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 880c30f5000Smrg break 881c30f5000Smrg fi 882c30f5000Smrg # Just in case. 883c30f5000Smrg sleep 1 884c30f5000Smrg am_has_slept=yes 885c30f5000Smrg done 886c30f5000Smrg test "$[2]" = conftest.file 887c30f5000Smrg ) 888c30f5000Smrgthen 889c30f5000Smrg # Ok. 890c30f5000Smrg : 891c30f5000Smrgelse 892c30f5000Smrg AC_MSG_ERROR([newly created file is older than distributed files! 893c30f5000SmrgCheck your system clock]) 894c30f5000Smrgfi 895c30f5000SmrgAC_MSG_RESULT([yes]) 896c30f5000Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 897c30f5000Smrg# generated files are strictly newer. 898c30f5000Smrgam_sleep_pid= 899c30f5000Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 900c30f5000Smrg ( sleep 1 ) & 901c30f5000Smrg am_sleep_pid=$! 902c30f5000Smrgfi 903c30f5000SmrgAC_CONFIG_COMMANDS_PRE( 904c30f5000Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 905c30f5000Smrg if test -n "$am_sleep_pid"; then 906c30f5000Smrg # Hide warnings about reused PIDs. 907c30f5000Smrg wait $am_sleep_pid 2>/dev/null 908c30f5000Smrg fi 909c30f5000Smrg AC_MSG_RESULT([done])]) 910c30f5000Smrgrm -f conftest.file 911c30f5000Smrg]) 912e0963edeSmrg 913c30f5000Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914c30f5000Smrg# 915c30f5000Smrg# This file is free software; the Free Software Foundation 916c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 917c30f5000Smrg# with or without modifications, as long as this notice is preserved. 918e0963edeSmrg 919c30f5000Smrg# AM_SILENT_RULES([DEFAULT]) 920c30f5000Smrg# -------------------------- 921c30f5000Smrg# Enable less verbose build rules; with the default set to DEFAULT 922c30f5000Smrg# ("yes" being less verbose, "no" or empty being verbose). 923c30f5000SmrgAC_DEFUN([AM_SILENT_RULES], 924c30f5000Smrg[AC_ARG_ENABLE([silent-rules], [dnl 925c30f5000SmrgAS_HELP_STRING( 926c30f5000Smrg [--enable-silent-rules], 927c30f5000Smrg [less verbose build output (undo: "make V=1")]) 928c30f5000SmrgAS_HELP_STRING( 929c30f5000Smrg [--disable-silent-rules], 930c30f5000Smrg [verbose build output (undo: "make V=0")])dnl 931c30f5000Smrg]) 932c30f5000Smrgcase $enable_silent_rules in @%:@ ((( 933c30f5000Smrg yes) AM_DEFAULT_VERBOSITY=0;; 934c30f5000Smrg no) AM_DEFAULT_VERBOSITY=1;; 935c30f5000Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936c30f5000Smrgesac 937c30f5000Smrgdnl 938c30f5000Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 939c30f5000Smrgdnl do not support nested variable expansions. 940c30f5000Smrgdnl See automake bug#9928 and bug#10237. 941c30f5000Smrgam_make=${MAKE-make} 942c30f5000SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 943c30f5000Smrg [am_cv_make_support_nested_variables], 944c30f5000Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 945c30f5000SmrgBAR0=false 946c30f5000SmrgBAR1=true 947c30f5000SmrgV=1 948c30f5000Smrgam__doit: 949c30f5000Smrg @$(TRUE) 950c30f5000Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 951c30f5000Smrg am_cv_make_support_nested_variables=yes 952c30f5000Smrgelse 953c30f5000Smrg am_cv_make_support_nested_variables=no 954c30f5000Smrgfi]) 955c30f5000Smrgif test $am_cv_make_support_nested_variables = yes; then 956c30f5000Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 957c30f5000Smrg AM_V='$(V)' 958c30f5000Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 959c30f5000Smrgelse 960c30f5000Smrg AM_V=$AM_DEFAULT_VERBOSITY 961c30f5000Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 962c30f5000Smrgfi 963c30f5000SmrgAC_SUBST([AM_V])dnl 964c30f5000SmrgAM_SUBST_NOTMAKE([AM_V])dnl 965c30f5000SmrgAC_SUBST([AM_DEFAULT_V])dnl 966c30f5000SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967c30f5000SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968c30f5000SmrgAM_BACKSLASH='\' 969c30f5000SmrgAC_SUBST([AM_BACKSLASH])dnl 970c30f5000Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 971c30f5000Smrg]) 972e0963edeSmrg 973c30f5000Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974c30f5000Smrg# 975c30f5000Smrg# This file is free software; the Free Software Foundation 976c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 977c30f5000Smrg# with or without modifications, as long as this notice is preserved. 978e0963edeSmrg 979c30f5000Smrg# AM_PROG_INSTALL_STRIP 980c30f5000Smrg# --------------------- 981c30f5000Smrg# One issue with vendor 'install' (even GNU) is that you can't 982c30f5000Smrg# specify the program used to strip binaries. This is especially 983c30f5000Smrg# annoying in cross-compiling environments, where the build's strip 984c30f5000Smrg# is unlikely to handle the host's binaries. 985c30f5000Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 986c30f5000Smrg# always use install-sh in "make install-strip", and initialize 987c30f5000Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 988c30f5000SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 989c30f5000Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 990c30f5000Smrg# Installed binaries are usually stripped using 'strip' when the user 991c30f5000Smrg# run "make install-strip". However 'strip' might not be the right 992c30f5000Smrg# tool to use in cross-compilation environments, therefore Automake 993c30f5000Smrg# will honor the 'STRIP' environment variable to overrule this program. 994c30f5000Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995c30f5000Smrgif test "$cross_compiling" != no; then 996c30f5000Smrg AC_CHECK_TOOL([STRIP], [strip], :) 997c30f5000Smrgfi 998c30f5000SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999c30f5000SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000e0963edeSmrg 1001c30f5000Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002c30f5000Smrg# 1003c30f5000Smrg# This file is free software; the Free Software Foundation 1004c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 1005c30f5000Smrg# with or without modifications, as long as this notice is preserved. 1006e0963edeSmrg 1007c30f5000Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1008c30f5000Smrg# --------------------------- 1009c30f5000Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010c30f5000Smrg# This macro is traced by Automake. 1011c30f5000SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1012e0963edeSmrg 1013c30f5000Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1014c30f5000Smrg# -------------------------- 1015c30f5000Smrg# Public sister of _AM_SUBST_NOTMAKE. 1016c30f5000SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017e0963edeSmrg 1018c30f5000Smrg# Check how to create a tarball. -*- Autoconf -*- 1019e0963edeSmrg 1020c30f5000Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021c30f5000Smrg# 1022c30f5000Smrg# This file is free software; the Free Software Foundation 1023c30f5000Smrg# gives unlimited permission to copy and/or distribute it, 1024c30f5000Smrg# with or without modifications, as long as this notice is preserved. 1025e0963edeSmrg 1026c30f5000Smrg# _AM_PROG_TAR(FORMAT) 1027c30f5000Smrg# -------------------- 1028c30f5000Smrg# Check how to create a tarball in format FORMAT. 1029c30f5000Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030c30f5000Smrg# 1031c30f5000Smrg# Substitute a variable $(am__tar) that is a command 1032c30f5000Smrg# writing to stdout a FORMAT-tarball containing the directory 1033c30f5000Smrg# $tardir. 1034c30f5000Smrg# tardir=directory && $(am__tar) > result.tar 1035c30f5000Smrg# 1036c30f5000Smrg# Substitute a variable $(am__untar) that extract such 1037c30f5000Smrg# a tarball read from stdin. 1038c30f5000Smrg# $(am__untar) < result.tar 1039c30f5000Smrg# 1040c30f5000SmrgAC_DEFUN([_AM_PROG_TAR], 1041c30f5000Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1042c30f5000Smrg# in the wild :-( We should find a proper way to deprecate it ... 1043c30f5000SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1044e0963edeSmrg 1045c30f5000Smrg# We'll loop over all known methods to create a tar archive until one works. 1046c30f5000Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 104749e108a1Smrg 1048c30f5000Smrgm4_if([$1], [v7], 1049c30f5000Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 105067ab2ff2Smrg 1051c30f5000Smrg [m4_case([$1], 1052c30f5000Smrg [ustar], 1053c30f5000Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1054c30f5000Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1055c30f5000Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1056c30f5000Smrg # and bug#13588). 1057c30f5000Smrg am_max_uid=2097151 # 2^21 - 1 1058c30f5000Smrg am_max_gid=$am_max_uid 1059c30f5000Smrg # The $UID and $GID variables are not portable, so we need to resort 1060c30f5000Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1061c30f5000Smrg # below are definitely unexpected, so allow the users to see them 1062c30f5000Smrg # (that is, avoid stderr redirection). 1063c30f5000Smrg am_uid=`id -u || echo unknown` 1064c30f5000Smrg am_gid=`id -g || echo unknown` 1065c30f5000Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1066c30f5000Smrg if test $am_uid -le $am_max_uid; then 1067c30f5000Smrg AC_MSG_RESULT([yes]) 1068c30f5000Smrg else 1069c30f5000Smrg AC_MSG_RESULT([no]) 1070c30f5000Smrg _am_tools=none 1071c30f5000Smrg fi 1072c30f5000Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1073c30f5000Smrg if test $am_gid -le $am_max_gid; then 1074c30f5000Smrg AC_MSG_RESULT([yes]) 1075c30f5000Smrg else 1076c30f5000Smrg AC_MSG_RESULT([no]) 1077c30f5000Smrg _am_tools=none 1078c30f5000Smrg fi], 1079f05b35a2Smrg 1080c30f5000Smrg [pax], 1081c30f5000Smrg [], 1082f05b35a2Smrg 1083c30f5000Smrg [m4_fatal([Unknown tar format])]) 108449e108a1Smrg 1085c30f5000Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 108649e108a1Smrg 1087c30f5000Smrg # Go ahead even if we have the value already cached. We do so because we 1088c30f5000Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1089c30f5000Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1090f05b35a2Smrg 1091c30f5000Smrg for _am_tool in $_am_tools; do 1092c30f5000Smrg case $_am_tool in 1093c30f5000Smrg gnutar) 1094c30f5000Smrg for _am_tar in tar gnutar gtar; do 1095c30f5000Smrg AM_RUN_LOG([$_am_tar --version]) && break 1096c30f5000Smrg done 1097c30f5000Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1098c30f5000Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1099c30f5000Smrg am__untar="$_am_tar -xf -" 1100c30f5000Smrg ;; 1101c30f5000Smrg plaintar) 1102c30f5000Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1103c30f5000Smrg # ustar tarball either. 1104c30f5000Smrg (tar --version) >/dev/null 2>&1 && continue 1105c30f5000Smrg am__tar='tar chf - "$$tardir"' 1106c30f5000Smrg am__tar_='tar chf - "$tardir"' 1107c30f5000Smrg am__untar='tar xf -' 1108c30f5000Smrg ;; 1109c30f5000Smrg pax) 1110c30f5000Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1111c30f5000Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1112c30f5000Smrg am__untar='pax -r' 1113c30f5000Smrg ;; 1114c30f5000Smrg cpio) 1115c30f5000Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1116c30f5000Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1117c30f5000Smrg am__untar='cpio -i -H $1 -d' 1118c30f5000Smrg ;; 1119c30f5000Smrg none) 1120c30f5000Smrg am__tar=false 1121c30f5000Smrg am__tar_=false 1122c30f5000Smrg am__untar=false 1123c30f5000Smrg ;; 1124c30f5000Smrg esac 112549e108a1Smrg 1126c30f5000Smrg # If the value was cached, stop now. We just wanted to have am__tar 1127c30f5000Smrg # and am__untar set. 1128c30f5000Smrg test -n "${am_cv_prog_tar_$1}" && break 112949e108a1Smrg 1130c30f5000Smrg # tar/untar a dummy directory, and stop if the command works. 1131c30f5000Smrg rm -rf conftest.dir 1132c30f5000Smrg mkdir conftest.dir 1133c30f5000Smrg echo GrepMe > conftest.dir/file 1134c30f5000Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1135c30f5000Smrg rm -rf conftest.dir 1136c30f5000Smrg if test -s conftest.tar; then 1137c30f5000Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1138c30f5000Smrg AM_RUN_LOG([cat conftest.dir/file]) 1139c30f5000Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1140c30f5000Smrg fi 1141c30f5000Smrg done 1142c30f5000Smrg rm -rf conftest.dir 114349e108a1Smrg 1144c30f5000Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1145c30f5000Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1146f05b35a2Smrg 1147c30f5000SmrgAC_SUBST([am__tar]) 1148c30f5000SmrgAC_SUBST([am__untar]) 1149c30f5000Smrg]) # _AM_PROG_TAR 115049e108a1Smrg 1151c30f5000Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1152c30f5000Smrgdnl serial 11 (pkg-config-0.29) 1153c30f5000Smrgdnl 1154c30f5000Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1155c30f5000Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1156c30f5000Smrgdnl 1157c30f5000Smrgdnl This program is free software; you can redistribute it and/or modify 1158c30f5000Smrgdnl it under the terms of the GNU General Public License as published by 1159c30f5000Smrgdnl the Free Software Foundation; either version 2 of the License, or 1160c30f5000Smrgdnl (at your option) any later version. 1161c30f5000Smrgdnl 1162c30f5000Smrgdnl This program is distributed in the hope that it will be useful, but 1163c30f5000Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 1164c30f5000Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1165c30f5000Smrgdnl General Public License for more details. 1166c30f5000Smrgdnl 1167c30f5000Smrgdnl You should have received a copy of the GNU General Public License 1168c30f5000Smrgdnl along with this program; if not, write to the Free Software 1169c30f5000Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1170c30f5000Smrgdnl 02111-1307, USA. 1171c30f5000Smrgdnl 1172c30f5000Smrgdnl As a special exception to the GNU General Public License, if you 1173c30f5000Smrgdnl distribute this file as part of a program that contains a 1174c30f5000Smrgdnl configuration script generated by Autoconf, you may include it under 1175c30f5000Smrgdnl the same distribution terms that you use for the rest of that 1176c30f5000Smrgdnl program. 1177e0963edeSmrg 1178c30f5000Smrgdnl PKG_PREREQ(MIN-VERSION) 1179c30f5000Smrgdnl ----------------------- 1180c30f5000Smrgdnl Since: 0.29 1181c30f5000Smrgdnl 1182c30f5000Smrgdnl Verify that the version of the pkg-config macros are at least 1183c30f5000Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1184c30f5000Smrgdnl installed version of pkg-config, this checks the developer's version 1185c30f5000Smrgdnl of pkg.m4 when generating configure. 1186c30f5000Smrgdnl 1187c30f5000Smrgdnl To ensure that this macro is defined, also add: 1188c30f5000Smrgdnl m4_ifndef([PKG_PREREQ], 1189c30f5000Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1190c30f5000Smrgdnl 1191c30f5000Smrgdnl See the "Since" comment for each macro you use to see what version 1192c30f5000Smrgdnl of the macros you require. 1193c30f5000Smrgm4_defun([PKG_PREREQ], 1194c30f5000Smrg[m4_define([PKG_MACROS_VERSION], [0.29]) 1195c30f5000Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1196c30f5000Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1197c30f5000Smrg])dnl PKG_PREREQ 119849e108a1Smrg 1199c30f5000Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1200c30f5000Smrgdnl ---------------------------------- 1201c30f5000Smrgdnl Since: 0.16 1202c30f5000Smrgdnl 1203c30f5000Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1204c30f5000Smrgdnl first found in the path. Checks that the version of pkg-config found 1205c30f5000Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1206c30f5000Smrgdnl used since that's the first version where most current features of 1207c30f5000Smrgdnl pkg-config existed. 1208c30f5000SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1209c30f5000Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1210c30f5000Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1211c30f5000Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1212c30f5000SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1213c30f5000SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1214c30f5000SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1215e0963edeSmrg 1216c30f5000Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1217c30f5000Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1218c30f5000Smrgfi 1219c30f5000Smrgif test -n "$PKG_CONFIG"; then 1220c30f5000Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 1221c30f5000Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1222c30f5000Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1223c30f5000Smrg AC_MSG_RESULT([yes]) 1224c30f5000Smrg else 1225c30f5000Smrg AC_MSG_RESULT([no]) 1226c30f5000Smrg PKG_CONFIG="" 1227c30f5000Smrg fi 1228c30f5000Smrgfi[]dnl 1229c30f5000Smrg])dnl PKG_PROG_PKG_CONFIG 1230e0963edeSmrg 1231c30f5000Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1232c30f5000Smrgdnl ------------------------------------------------------------------- 1233c30f5000Smrgdnl Since: 0.18 1234c30f5000Smrgdnl 1235c30f5000Smrgdnl Check to see whether a particular set of modules exists. Similar to 1236c30f5000Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1237c30f5000Smrgdnl 1238c30f5000Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1239c30f5000Smrgdnl only at the first occurence in configure.ac, so if the first place 1240c30f5000Smrgdnl it's called might be skipped (such as if it is within an "if", you 1241c30f5000Smrgdnl have to call PKG_CHECK_EXISTS manually 1242c30f5000SmrgAC_DEFUN([PKG_CHECK_EXISTS], 1243c30f5000Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1244c30f5000Smrgif test -n "$PKG_CONFIG" && \ 1245c30f5000Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1246c30f5000Smrg m4_default([$2], [:]) 1247c30f5000Smrgm4_ifvaln([$3], [else 1248c30f5000Smrg $3])dnl 1249c30f5000Smrgfi]) 1250e0963edeSmrg 1251c30f5000Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1252c30f5000Smrgdnl --------------------------------------------- 1253c30f5000Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1254c30f5000Smrgdnl pkg_failed based on the result. 1255c30f5000Smrgm4_define([_PKG_CONFIG], 1256c30f5000Smrg[if test -n "$$1"; then 1257c30f5000Smrg pkg_cv_[]$1="$$1" 1258c30f5000Smrg elif test -n "$PKG_CONFIG"; then 1259c30f5000Smrg PKG_CHECK_EXISTS([$3], 1260c30f5000Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1261c30f5000Smrg test "x$?" != "x0" && pkg_failed=yes ], 1262c30f5000Smrg [pkg_failed=yes]) 1263c30f5000Smrg else 1264c30f5000Smrg pkg_failed=untried 1265c30f5000Smrgfi[]dnl 1266c30f5000Smrg])dnl _PKG_CONFIG 1267e0963edeSmrg 1268c30f5000Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 1269c30f5000Smrgdnl --------------------------- 1270c30f5000Smrgdnl Internal check to see if pkg-config supports short errors. 1271c30f5000SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1272c30f5000Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1273c30f5000Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1274c30f5000Smrg _pkg_short_errors_supported=yes 1275c30f5000Smrgelse 1276c30f5000Smrg _pkg_short_errors_supported=no 1277c30f5000Smrgfi[]dnl 1278c30f5000Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1279f05b35a2Smrg 1280e0963edeSmrg 1281c30f5000Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1282c30f5000Smrgdnl [ACTION-IF-NOT-FOUND]) 1283c30f5000Smrgdnl -------------------------------------------------------------- 1284c30f5000Smrgdnl Since: 0.4.0 1285c30f5000Smrgdnl 1286c30f5000Smrgdnl Note that if there is a possibility the first call to 1287c30f5000Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1288c30f5000Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1289c30f5000SmrgAC_DEFUN([PKG_CHECK_MODULES], 1290c30f5000Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1291c30f5000SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1292c30f5000SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1293e0963edeSmrg 1294c30f5000Smrgpkg_failed=no 1295c30f5000SmrgAC_MSG_CHECKING([for $1]) 1296e0963edeSmrg 1297c30f5000Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1298c30f5000Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1299e0963edeSmrg 1300c30f5000Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1301c30f5000Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1302c30f5000SmrgSee the pkg-config man page for more details.]) 1303e0963edeSmrg 1304c30f5000Smrgif test $pkg_failed = yes; then 1305c30f5000Smrg AC_MSG_RESULT([no]) 1306c30f5000Smrg _PKG_SHORT_ERRORS_SUPPORTED 1307c30f5000Smrg if test $_pkg_short_errors_supported = yes; then 1308c30f5000Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1309c30f5000Smrg else 1310c30f5000Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1311c30f5000Smrg fi 1312c30f5000Smrg # Put the nasty error message in config.log where it belongs 1313c30f5000Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1314e0963edeSmrg 1315c30f5000Smrg m4_default([$4], [AC_MSG_ERROR( 1316c30f5000Smrg[Package requirements ($2) were not met: 1317e0963edeSmrg 1318c30f5000Smrg$$1_PKG_ERRORS 1319e0963edeSmrg 1320c30f5000SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1321c30f5000Smrginstalled software in a non-standard prefix. 1322e0963edeSmrg 1323c30f5000Smrg_PKG_TEXT])[]dnl 1324c30f5000Smrg ]) 1325c30f5000Smrgelif test $pkg_failed = untried; then 1326c30f5000Smrg AC_MSG_RESULT([no]) 1327c30f5000Smrg m4_default([$4], [AC_MSG_FAILURE( 1328c30f5000Smrg[The pkg-config script could not be found or is too old. Make sure it 1329c30f5000Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1330c30f5000Smrgpath to pkg-config. 1331e0963edeSmrg 1332c30f5000Smrg_PKG_TEXT 1333e0963edeSmrg 1334c30f5000SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1335c30f5000Smrg ]) 1336c30f5000Smrgelse 1337c30f5000Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1338c30f5000Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1339c30f5000Smrg AC_MSG_RESULT([yes]) 1340c30f5000Smrg $3 1341c30f5000Smrgfi[]dnl 1342c30f5000Smrg])dnl PKG_CHECK_MODULES 1343e0963edeSmrg 1344e0963edeSmrg 1345c30f5000Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1346c30f5000Smrgdnl [ACTION-IF-NOT-FOUND]) 1347c30f5000Smrgdnl --------------------------------------------------------------------- 1348c30f5000Smrgdnl Since: 0.29 1349c30f5000Smrgdnl 1350c30f5000Smrgdnl Checks for existence of MODULES and gathers its build flags with 1351c30f5000Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1352c30f5000Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 1353c30f5000Smrgdnl 1354c30f5000Smrgdnl Note that if there is a possibility the first call to 1355c30f5000Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1356c30f5000Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1357c30f5000Smrgdnl configure.ac. 1358c30f5000SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 1359c30f5000Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1360c30f5000Smrg_save_PKG_CONFIG=$PKG_CONFIG 1361c30f5000SmrgPKG_CONFIG="$PKG_CONFIG --static" 1362c30f5000SmrgPKG_CHECK_MODULES($@) 1363c30f5000SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 1364c30f5000Smrg])dnl PKG_CHECK_MODULES_STATIC 1365e0963edeSmrg 1366e0963edeSmrg 1367c30f5000Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 1368c30f5000Smrgdnl ------------------------- 1369c30f5000Smrgdnl Since: 0.27 1370c30f5000Smrgdnl 1371c30f5000Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 1372c30f5000Smrgdnl should install pkg-config .pc files. By default the directory is 1373c30f5000Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 1374c30f5000Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 1375c30f5000Smrgdnl parameter. 1376c30f5000SmrgAC_DEFUN([PKG_INSTALLDIR], 1377c30f5000Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1378c30f5000Smrgm4_pushdef([pkg_description], 1379c30f5000Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 1380c30f5000SmrgAC_ARG_WITH([pkgconfigdir], 1381c30f5000Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1382c30f5000Smrg [with_pkgconfigdir=]pkg_default) 1383c30f5000SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1384c30f5000Smrgm4_popdef([pkg_default]) 1385c30f5000Smrgm4_popdef([pkg_description]) 1386c30f5000Smrg])dnl PKG_INSTALLDIR 1387e0963edeSmrg 1388e0963edeSmrg 1389c30f5000Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1390c30f5000Smrgdnl -------------------------------- 1391c30f5000Smrgdnl Since: 0.27 1392c30f5000Smrgdnl 1393c30f5000Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 1394c30f5000Smrgdnl module should install arch-independent pkg-config .pc files. By 1395c30f5000Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 1396c30f5000Smrgdnl changed by passing DIRECTORY. The user can override through the 1397c30f5000Smrgdnl --with-noarch-pkgconfigdir parameter. 1398c30f5000SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 1399c30f5000Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1400c30f5000Smrgm4_pushdef([pkg_description], 1401c30f5000Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1402c30f5000SmrgAC_ARG_WITH([noarch-pkgconfigdir], 1403c30f5000Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1404c30f5000Smrg [with_noarch_pkgconfigdir=]pkg_default) 1405c30f5000SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1406c30f5000Smrgm4_popdef([pkg_default]) 1407c30f5000Smrgm4_popdef([pkg_description]) 1408c30f5000Smrg])dnl PKG_NOARCH_INSTALLDIR 1409e0963edeSmrg 1410e0963edeSmrg 1411c30f5000Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1412c30f5000Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1413c30f5000Smrgdnl ------------------------------------------- 1414c30f5000Smrgdnl Since: 0.28 1415c30f5000Smrgdnl 1416c30f5000Smrgdnl Retrieves the value of the pkg-config variable for the given module. 1417c30f5000SmrgAC_DEFUN([PKG_CHECK_VAR], 1418c30f5000Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1419c30f5000SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1420e0963edeSmrg 1421c30f5000Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1422c30f5000SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 1423e0963edeSmrg 1424c30f5000SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 1425c30f5000Smrg])dnl PKG_CHECK_VAR 1426e0963edeSmrg 1427c30f5000Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1428c30f5000Smrgdnl 1429c30f5000Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 1430c30f5000Smrgdnl 1431c30f5000Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1432c30f5000Smrgdnl copy of this software and associated documentation files (the "Software"), 1433c30f5000Smrgdnl to deal in the Software without restriction, including without limitation 1434c30f5000Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1435c30f5000Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1436c30f5000Smrgdnl Software is furnished to do so, subject to the following conditions: 1437c30f5000Smrgdnl 1438c30f5000Smrgdnl The above copyright notice and this permission notice (including the next 1439c30f5000Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1440c30f5000Smrgdnl Software. 1441c30f5000Smrgdnl 1442c30f5000Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1443c30f5000Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1444c30f5000Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1445c30f5000Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1446c30f5000Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1447c30f5000Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1448c30f5000Smrgdnl DEALINGS IN THE SOFTWARE. 1449e0963edeSmrg 1450c30f5000Smrg# XORG_MACROS_VERSION(required-version) 1451c30f5000Smrg# ------------------------------------- 1452c30f5000Smrg# Minimum version: 1.1.0 1453c30f5000Smrg# 1454c30f5000Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1455c30f5000Smrg# your configure.ac with the minimum required version, such as: 1456c30f5000Smrg# XORG_MACROS_VERSION(1.1) 1457c30f5000Smrg# 1458c30f5000Smrg# To ensure that this macro is defined, also add: 1459c30f5000Smrg# m4_ifndef([XORG_MACROS_VERSION], 1460c30f5000Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1461c30f5000Smrg# 1462c30f5000Smrg# 1463c30f5000Smrg# See the "minimum version" comment for each macro you use to see what 1464c30f5000Smrg# version you require. 1465c30f5000Smrgm4_defun([XORG_MACROS_VERSION],[ 1466c30f5000Smrgm4_define([vers_have], [1.19.3]) 1467c30f5000Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1468c30f5000Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1469c30f5000Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1470c30f5000Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1471c30f5000Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1472c30f5000Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1473c30f5000Smrgm4_undefine([vers_have]) 1474c30f5000Smrgm4_undefine([maj_have]) 1475c30f5000Smrgm4_undefine([maj_needed]) 1476c30f5000Smrg]) # XORG_MACROS_VERSION 1477f05b35a2Smrg 1478c30f5000Smrg# XORG_PROG_RAWCPP() 1479c30f5000Smrg# ------------------ 1480c30f5000Smrg# Minimum version: 1.0.0 1481c30f5000Smrg# 1482c30f5000Smrg# Find cpp program and necessary flags for use in pre-processing text files 1483c30f5000Smrg# such as man pages and config files 1484c30f5000SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1485c30f5000SmrgAC_REQUIRE([AC_PROG_CPP]) 1486c30f5000SmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1487c30f5000Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1488e0963edeSmrg 1489c30f5000Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1490c30f5000Smrg# which is not the best choice for supporting other OS'es, but covers most 1491c30f5000Smrg# of the ones we need for now. 1492c30f5000SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1493c30f5000SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1494c30f5000Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1495c30f5000Smrg AC_MSG_RESULT([no]) 1496c30f5000Smrgelse 1497c30f5000Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1498c30f5000Smrg RAWCPPFLAGS=-undef 1499c30f5000Smrg AC_MSG_RESULT([yes]) 1500c30f5000Smrg # under Cygwin unix is still defined even with -undef 1501c30f5000Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1502c30f5000Smrg RAWCPPFLAGS="-undef -ansi" 1503c30f5000Smrg AC_MSG_RESULT([yes, with -ansi]) 1504c30f5000Smrg else 1505c30f5000Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1506c30f5000Smrg fi 1507c30f5000Smrgfi 1508c30f5000Smrgrm -f conftest.$ac_ext 1509e0963edeSmrg 1510c30f5000SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1511c30f5000SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1512c30f5000Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1513c30f5000Smrg AC_MSG_RESULT([no]) 1514c30f5000Smrgelse 1515c30f5000Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1516c30f5000Smrg TRADITIONALCPPFLAGS="-traditional" 1517c30f5000Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1518c30f5000Smrg AC_MSG_RESULT([yes]) 1519c30f5000Smrg else 1520c30f5000Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1521c30f5000Smrg fi 1522c30f5000Smrgfi 1523c30f5000Smrgrm -f conftest.$ac_ext 1524c30f5000SmrgAC_SUBST(RAWCPPFLAGS) 1525c30f5000SmrgAC_SUBST(TRADITIONALCPPFLAGS) 1526c30f5000Smrg]) # XORG_PROG_RAWCPP 1527e0963edeSmrg 1528c30f5000Smrg# XORG_MANPAGE_SECTIONS() 1529c30f5000Smrg# ----------------------- 1530c30f5000Smrg# Minimum version: 1.0.0 1531c30f5000Smrg# 1532c30f5000Smrg# Determine which sections man pages go in for the different man page types 1533c30f5000Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1534c30f5000Smrg# Not sure if there's any better way than just hardcoding by OS name. 1535c30f5000Smrg# Override default settings by setting environment variables 1536c30f5000Smrg# Added MAN_SUBSTS in version 1.8 1537c30f5000Smrg# Added AC_PROG_SED in version 1.8 1538e0963edeSmrg 1539c30f5000SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1540c30f5000SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1541c30f5000SmrgAC_REQUIRE([AC_PROG_SED]) 154249e108a1Smrg 1543c30f5000Smrgcase $host_os in 1544c30f5000Smrg solaris*) 1545c30f5000Smrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1546c30f5000Smrg # check for a man page file found in later versions that use 1547c30f5000Smrg # traditional section numbers instead 1548c30f5000Smrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1549c30f5000Smrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1550c30f5000Smrg ;; 1551c30f5000Smrg *) SYSV_MAN_SECTIONS=false ;; 1552c30f5000Smrgesac 1553e0963edeSmrg 1554c30f5000Smrgif test x$APP_MAN_SUFFIX = x ; then 1555c30f5000Smrg APP_MAN_SUFFIX=1 1556c30f5000Smrgfi 1557c30f5000Smrgif test x$APP_MAN_DIR = x ; then 1558c30f5000Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1559c30f5000Smrgfi 1560e0963edeSmrg 1561c30f5000Smrgif test x$LIB_MAN_SUFFIX = x ; then 1562c30f5000Smrg LIB_MAN_SUFFIX=3 1563c30f5000Smrgfi 1564c30f5000Smrgif test x$LIB_MAN_DIR = x ; then 1565c30f5000Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1566c30f5000Smrgfi 1567e0963edeSmrg 1568c30f5000Smrgif test x$FILE_MAN_SUFFIX = x ; then 1569c30f5000Smrg case $SYSV_MAN_SECTIONS in 1570c30f5000Smrg true) FILE_MAN_SUFFIX=4 ;; 1571c30f5000Smrg *) FILE_MAN_SUFFIX=5 ;; 1572c30f5000Smrg esac 1573c30f5000Smrgfi 1574c30f5000Smrgif test x$FILE_MAN_DIR = x ; then 1575c30f5000Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1576c30f5000Smrgfi 1577e0963edeSmrg 1578c30f5000Smrgif test x$MISC_MAN_SUFFIX = x ; then 1579c30f5000Smrg case $SYSV_MAN_SECTIONS in 1580c30f5000Smrg true) MISC_MAN_SUFFIX=5 ;; 1581c30f5000Smrg *) MISC_MAN_SUFFIX=7 ;; 1582c30f5000Smrg esac 1583c30f5000Smrgfi 1584c30f5000Smrgif test x$MISC_MAN_DIR = x ; then 1585c30f5000Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1586c30f5000Smrgfi 1587e0963edeSmrg 1588c30f5000Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1589c30f5000Smrg case $SYSV_MAN_SECTIONS in 1590c30f5000Smrg true) DRIVER_MAN_SUFFIX=7 ;; 1591c30f5000Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1592c30f5000Smrg esac 1593c30f5000Smrgfi 1594c30f5000Smrgif test x$DRIVER_MAN_DIR = x ; then 1595c30f5000Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1596c30f5000Smrgfi 1597e0963edeSmrg 1598c30f5000Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1599c30f5000Smrg case $SYSV_MAN_SECTIONS in 1600c30f5000Smrg true) ADMIN_MAN_SUFFIX=1m ;; 1601c30f5000Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1602c30f5000Smrg esac 1603c30f5000Smrgfi 1604c30f5000Smrgif test x$ADMIN_MAN_DIR = x ; then 1605c30f5000Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1606c30f5000Smrgfi 1607e0963edeSmrg 1608e0963edeSmrg 1609c30f5000SmrgAC_SUBST([APP_MAN_SUFFIX]) 1610c30f5000SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1611c30f5000SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1612c30f5000SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1613c30f5000SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1614c30f5000SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1615c30f5000SmrgAC_SUBST([APP_MAN_DIR]) 1616c30f5000SmrgAC_SUBST([LIB_MAN_DIR]) 1617c30f5000SmrgAC_SUBST([FILE_MAN_DIR]) 1618c30f5000SmrgAC_SUBST([MISC_MAN_DIR]) 1619c30f5000SmrgAC_SUBST([DRIVER_MAN_DIR]) 1620c30f5000SmrgAC_SUBST([ADMIN_MAN_DIR]) 1621e0963edeSmrg 1622c30f5000SmrgXORG_MAN_PAGE="X Version 11" 1623c30f5000SmrgAC_SUBST([XORG_MAN_PAGE]) 1624c30f5000SmrgMAN_SUBSTS="\ 1625c30f5000Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1626c30f5000Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1627c30f5000Smrg -e 's|__xservername__|Xorg|g' \ 1628c30f5000Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1629c30f5000Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1630c30f5000Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1631c30f5000Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1632c30f5000Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1633c30f5000Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1634c30f5000Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1635c30f5000Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1636c30f5000Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1637c30f5000SmrgAC_SUBST([MAN_SUBSTS]) 1638e0963edeSmrg 1639c30f5000Smrg]) # XORG_MANPAGE_SECTIONS 1640e0963edeSmrg 1641c30f5000Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1642c30f5000Smrg# ------------------------ 1643c30f5000Smrg# Minimum version: 1.7.0 1644c30f5000Smrg# 1645c30f5000Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1646c30f5000Smrg# provided by xorg-sgml-doctools, if installed. 1647c30f5000SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1648c30f5000SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1649c30f5000SmrgXORG_SGML_PATH= 1650c30f5000SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1651c30f5000Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1652c30f5000Smrg [m4_ifval([$1],[:], 1653c30f5000Smrg [if test x"$cross_compiling" != x"yes" ; then 1654c30f5000Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1655c30f5000Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1656c30f5000Smrg fi]) 1657b3a827e2Smrg ]) 165849e108a1Smrg 1659c30f5000Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1660c30f5000Smrg# the path and the name of the doc stylesheet 1661c30f5000Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1662c30f5000Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1663c30f5000Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1664c30f5000Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1665c30f5000Smrgelse 1666c30f5000Smrg AC_MSG_RESULT([no]) 1667c30f5000Smrgfi 1668e0963edeSmrg 1669c30f5000SmrgAC_SUBST(XORG_SGML_PATH) 1670c30f5000SmrgAC_SUBST(STYLESHEET_SRCDIR) 1671c30f5000SmrgAC_SUBST(XSL_STYLESHEET) 1672c30f5000SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1673c30f5000Smrg]) # XORG_CHECK_SGML_DOCTOOLS 1674e0963edeSmrg 1675c30f5000Smrg# XORG_CHECK_LINUXDOC 1676c30f5000Smrg# ------------------- 1677c30f5000Smrg# Minimum version: 1.0.0 1678c30f5000Smrg# 1679c30f5000Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1680c30f5000Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1681c30f5000Smrg# Whether or not the necessary tools and files are found can be checked 1682c30f5000Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1683c30f5000SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1684c30f5000SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1685c30f5000SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1686e0963edeSmrg 1687c30f5000SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1688e0963edeSmrg 1689c30f5000SmrgAC_MSG_CHECKING([whether to build documentation]) 1690e0963edeSmrg 1691c30f5000Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1692c30f5000Smrg BUILDDOC=yes 1693c30f5000Smrgelse 1694c30f5000Smrg BUILDDOC=no 1695c30f5000Smrgfi 1696e0963edeSmrg 1697c30f5000SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1698e0963edeSmrg 1699c30f5000SmrgAC_MSG_RESULT([$BUILDDOC]) 1700e0963edeSmrg 1701c30f5000SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1702e0963edeSmrg 1703c30f5000Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1704c30f5000Smrg BUILDPDFDOC=yes 1705b3a827e2Smrgelse 1706c30f5000Smrg BUILDPDFDOC=no 1707b3a827e2Smrgfi 1708e0963edeSmrg 1709c30f5000SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1710e0963edeSmrg 1711c30f5000SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1712e0963edeSmrg 1713c30f5000SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1714c30f5000SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1715c30f5000SmrgMAKE_PDF="$PS2PDF" 1716c30f5000SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 171749e108a1Smrg 1718c30f5000SmrgAC_SUBST(MAKE_TEXT) 1719c30f5000SmrgAC_SUBST(MAKE_PS) 1720c30f5000SmrgAC_SUBST(MAKE_PDF) 1721c30f5000SmrgAC_SUBST(MAKE_HTML) 1722c30f5000Smrg]) # XORG_CHECK_LINUXDOC 1723e0963edeSmrg 1724c30f5000Smrg# XORG_CHECK_DOCBOOK 1725c30f5000Smrg# ------------------- 1726c30f5000Smrg# Minimum version: 1.0.0 1727c30f5000Smrg# 1728c30f5000Smrg# Checks for the ability to build output formats from SGML DocBook source. 1729c30f5000Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1730c30f5000Smrg# indicates whether the necessary tools and files are found and, if set, 1731c30f5000Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1732c30f5000SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1733c30f5000SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1734f05b35a2Smrg 1735c30f5000SmrgBUILDTXTDOC=no 1736c30f5000SmrgBUILDPDFDOC=no 1737c30f5000SmrgBUILDPSDOC=no 1738c30f5000SmrgBUILDHTMLDOC=no 1739f05b35a2Smrg 1740c30f5000SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1741c30f5000SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1742c30f5000SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1743c30f5000SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1744e0963edeSmrg 1745c30f5000SmrgAC_MSG_CHECKING([whether to build text documentation]) 1746c30f5000Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1747c30f5000Smrg test x$BUILD_TXTDOC != xno; then 1748c30f5000Smrg BUILDTXTDOC=yes 1749c30f5000Smrgfi 1750c30f5000SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1751c30f5000SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1752e0963edeSmrg 1753c30f5000SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1754c30f5000Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1755c30f5000Smrg test x$BUILD_PDFDOC != xno; then 1756c30f5000Smrg BUILDPDFDOC=yes 1757c30f5000Smrgfi 1758c30f5000SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1759c30f5000SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1760e0963edeSmrg 1761c30f5000SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1762c30f5000Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1763c30f5000Smrg test x$BUILD_PSDOC != xno; then 1764c30f5000Smrg BUILDPSDOC=yes 1765c30f5000Smrgfi 1766c30f5000SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1767c30f5000SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1768e0963edeSmrg 1769c30f5000SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1770c30f5000Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1771c30f5000Smrg test x$BUILD_HTMLDOC != xno; then 1772c30f5000Smrg BUILDHTMLDOC=yes 1773c30f5000Smrgfi 1774c30f5000SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1775c30f5000SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1776e0963edeSmrg 1777c30f5000SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1778c30f5000SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1779c30f5000SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1780c30f5000SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1781f05b35a2Smrg 1782c30f5000SmrgAC_SUBST(MAKE_TEXT) 1783c30f5000SmrgAC_SUBST(MAKE_PS) 1784c30f5000SmrgAC_SUBST(MAKE_PDF) 1785c30f5000SmrgAC_SUBST(MAKE_HTML) 1786c30f5000Smrg]) # XORG_CHECK_DOCBOOK 1787b3a827e2Smrg 1788c30f5000Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1789c30f5000Smrg# ---------------- 1790c30f5000Smrg# Minimum version: 1.5.0 1791c30f5000Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1792c30f5000Smrg# 1793c30f5000Smrg# Documentation tools are not always available on all platforms and sometimes 1794c30f5000Smrg# not at the appropriate level. This macro enables a module to test for the 1795c30f5000Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1796c30f5000Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1797c30f5000Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1798c30f5000Smrg# --with-xmlto assumes 'auto'. 1799c30f5000Smrg# 1800c30f5000Smrg# Interface to module: 1801c30f5000Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1802c30f5000Smrg# XMLTO: returns the path of the xmlto program found 1803c30f5000Smrg# returns the path set by the user in the environment 1804c30f5000Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1805c30f5000Smrg# 'no' user instructs the module not to use xmlto 1806c30f5000Smrg# 1807c30f5000Smrg# Added in version 1.10.0 1808c30f5000Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1809c30f5000Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1810c30f5000Smrg# 1811c30f5000Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1812c30f5000Smrg# 1813c30f5000SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1814c30f5000SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1815c30f5000Smrgm4_define([_defopt], m4_default([$2], [auto])) 1816c30f5000SmrgAC_ARG_WITH(xmlto, 1817c30f5000Smrg AS_HELP_STRING([--with-xmlto], 1818c30f5000Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1819c30f5000Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1820c30f5000Smrgm4_undefine([_defopt]) 1821f05b35a2Smrg 1822c30f5000Smrgif test "x$use_xmlto" = x"auto"; then 1823c30f5000Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1824c30f5000Smrg if test "x$XMLTO" = "x"; then 1825c30f5000Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1826c30f5000Smrg have_xmlto=no 1827c30f5000Smrg else 1828c30f5000Smrg have_xmlto=yes 1829c30f5000Smrg fi 1830c30f5000Smrgelif test "x$use_xmlto" = x"yes" ; then 1831c30f5000Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1832c30f5000Smrg if test "x$XMLTO" = "x"; then 1833c30f5000Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1834c30f5000Smrg fi 1835c30f5000Smrg have_xmlto=yes 1836c30f5000Smrgelif test "x$use_xmlto" = x"no" ; then 1837c30f5000Smrg if test "x$XMLTO" != "x"; then 1838c30f5000Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1839c30f5000Smrg fi 1840c30f5000Smrg have_xmlto=no 1841b3a827e2Smrgelse 1842c30f5000Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1843b3a827e2Smrgfi 1844e0963edeSmrg 1845c30f5000Smrg# Test for a minimum version of xmlto, if provided. 1846c30f5000Smrgm4_ifval([$1], 1847c30f5000Smrg[if test "$have_xmlto" = yes; then 1848c30f5000Smrg # scrape the xmlto version 1849c30f5000Smrg AC_MSG_CHECKING([the xmlto version]) 1850c30f5000Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1851c30f5000Smrg AC_MSG_RESULT([$xmlto_version]) 1852c30f5000Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1853c30f5000Smrg [if test "x$use_xmlto" = xauto; then 1854c30f5000Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1855c30f5000Smrg have_xmlto=no 1856c30f5000Smrg else 1857c30f5000Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1858c30f5000Smrg fi]) 1859c30f5000Smrgfi]) 1860e0963edeSmrg 1861c30f5000Smrg# Test for the ability of xmlto to generate a text target 1862c30f5000Smrg# 1863c30f5000Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1864c30f5000Smrg# following test for empty XML docbook files. 1865c30f5000Smrg# For compatibility reasons use the following empty XML docbook file and if 1866c30f5000Smrg# it fails try it again with a non-empty XML file. 1867c30f5000Smrghave_xmlto_text=no 1868c30f5000Smrgcat > conftest.xml << "EOF" 1869c30f5000SmrgEOF 1870c30f5000SmrgAS_IF([test "$have_xmlto" = yes], 1871c30f5000Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1872c30f5000Smrg [have_xmlto_text=yes], 1873c30f5000Smrg [# Try it again with a non-empty XML file. 1874c30f5000Smrg cat > conftest.xml << "EOF" 1875c30f5000Smrg<x></x> 1876c30f5000SmrgEOF 1877c30f5000Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1878c30f5000Smrg [have_xmlto_text=yes], 1879c30f5000Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1880c30f5000Smrgrm -f conftest.xml 1881c30f5000SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1882c30f5000SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1883c30f5000Smrg]) # XORG_WITH_XMLTO 1884e494fffdSmrg 1885c30f5000Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1886c30f5000Smrg# -------------------------------------------- 1887c30f5000Smrg# Minimum version: 1.12.0 1888c30f5000Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1889c30f5000Smrg# 1890c30f5000Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1891c30f5000Smrg# XML-based language used for the transformation of XML documents. 1892c30f5000Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1893c30f5000Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1894c30f5000Smrg# The XSLT processor is often used as a standalone tool for transformations. 1895c30f5000Smrg# It should not be assumed that this tool is used only to work with documnetation. 1896c30f5000Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1897c30f5000Smrg# 1898c30f5000Smrg# Interface to module: 1899c30f5000Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1900c30f5000Smrg# XSLTPROC: returns the path of the xsltproc program found 1901c30f5000Smrg# returns the path set by the user in the environment 1902c30f5000Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1903c30f5000Smrg# 'no' user instructs the module not to use xsltproc 1904c30f5000Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1905c30f5000Smrg# 1906c30f5000Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1907c30f5000Smrg# 1908c30f5000SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1909c30f5000SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1910c30f5000Smrg# Preserves the interface, should it be implemented later 1911c30f5000Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1912c30f5000Smrgm4_define([_defopt], m4_default([$2], [auto])) 1913c30f5000SmrgAC_ARG_WITH(xsltproc, 1914c30f5000Smrg AS_HELP_STRING([--with-xsltproc], 1915c30f5000Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1916c30f5000Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1917c30f5000Smrgm4_undefine([_defopt]) 1918f05b35a2Smrg 1919c30f5000Smrgif test "x$use_xsltproc" = x"auto"; then 1920c30f5000Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1921c30f5000Smrg if test "x$XSLTPROC" = "x"; then 1922c30f5000Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1923c30f5000Smrg have_xsltproc=no 1924c30f5000Smrg else 1925c30f5000Smrg have_xsltproc=yes 1926b3a827e2Smrg fi 1927c30f5000Smrgelif test "x$use_xsltproc" = x"yes" ; then 1928c30f5000Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1929c30f5000Smrg if test "x$XSLTPROC" = "x"; then 1930c30f5000Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1931c30f5000Smrg fi 1932c30f5000Smrg have_xsltproc=yes 1933c30f5000Smrgelif test "x$use_xsltproc" = x"no" ; then 1934c30f5000Smrg if test "x$XSLTPROC" != "x"; then 1935c30f5000Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1936c30f5000Smrg fi 1937c30f5000Smrg have_xsltproc=no 1938b3a827e2Smrgelse 1939c30f5000Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1940b3a827e2Smrgfi 1941e0963edeSmrg 1942c30f5000SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1943c30f5000Smrg]) # XORG_WITH_XSLTPROC 1944e0963edeSmrg 1945c30f5000Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1946c30f5000Smrg# ---------------------------------------- 1947c30f5000Smrg# Minimum version: 1.15.0 1948c30f5000Smrg# 1949c30f5000Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1950c30f5000Smrg# scanning arbitrary text files, extracting information from those text files, 1951c30f5000Smrg# and printing reports based on that information. 1952c30f5000Smrg# 1953c30f5000Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1954c30f5000Smrg# 1955c30f5000Smrg# Interface to module: 1956c30f5000Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1957c30f5000Smrg# PERL: returns the path of the perl program found 1958c30f5000Smrg# returns the path set by the user in the environment 1959c30f5000Smrg# --with-perl: 'yes' user instructs the module to use perl 1960c30f5000Smrg# 'no' user instructs the module not to use perl 1961c30f5000Smrg# have_perl: returns yes if perl found in PATH or no 1962c30f5000Smrg# 1963c30f5000Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1964c30f5000Smrg# 1965c30f5000SmrgAC_DEFUN([XORG_WITH_PERL],[ 1966c30f5000SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1967c30f5000Smrg# Preserves the interface, should it be implemented later 1968c30f5000Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1969c30f5000Smrgm4_define([_defopt], m4_default([$2], [auto])) 1970c30f5000SmrgAC_ARG_WITH(perl, 1971c30f5000Smrg AS_HELP_STRING([--with-perl], 1972c30f5000Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1973c30f5000Smrg [use_perl=$withval], [use_perl=]_defopt) 1974c30f5000Smrgm4_undefine([_defopt]) 1975e494fffdSmrg 1976c30f5000Smrgif test "x$use_perl" = x"auto"; then 1977c30f5000Smrg AC_PATH_PROG([PERL], [perl]) 1978c30f5000Smrg if test "x$PERL" = "x"; then 1979c30f5000Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1980c30f5000Smrg have_perl=no 1981c30f5000Smrg else 1982c30f5000Smrg have_perl=yes 1983b3a827e2Smrg fi 1984c30f5000Smrgelif test "x$use_perl" = x"yes" ; then 1985c30f5000Smrg AC_PATH_PROG([PERL], [perl]) 1986c30f5000Smrg if test "x$PERL" = "x"; then 1987c30f5000Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1988c30f5000Smrg fi 1989c30f5000Smrg have_perl=yes 1990c30f5000Smrgelif test "x$use_perl" = x"no" ; then 1991c30f5000Smrg if test "x$PERL" != "x"; then 1992c30f5000Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1993c30f5000Smrg fi 1994c30f5000Smrg have_perl=no 1995b3a827e2Smrgelse 1996c30f5000Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1997b3a827e2Smrgfi 1998e0963edeSmrg 1999c30f5000SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2000c30f5000Smrg]) # XORG_WITH_PERL 2001e0963edeSmrg 2002c30f5000Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2003c30f5000Smrg# ---------------- 2004c30f5000Smrg# Minimum version: 1.5.0 2005c30f5000Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2006c30f5000Smrg# 2007c30f5000Smrg# Documentation tools are not always available on all platforms and sometimes 2008c30f5000Smrg# not at the appropriate level. This macro enables a module to test for the 2009c30f5000Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2010c30f5000Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 2011c30f5000Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2012c30f5000Smrg# --with-asciidoc assumes 'auto'. 2013c30f5000Smrg# 2014c30f5000Smrg# Interface to module: 2015c30f5000Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2016c30f5000Smrg# ASCIIDOC: returns the path of the asciidoc program found 2017c30f5000Smrg# returns the path set by the user in the environment 2018c30f5000Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2019c30f5000Smrg# 'no' user instructs the module not to use asciidoc 2020c30f5000Smrg# 2021c30f5000Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2022c30f5000Smrg# 2023c30f5000SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 2024c30f5000SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2025c30f5000Smrgm4_define([_defopt], m4_default([$2], [auto])) 2026c30f5000SmrgAC_ARG_WITH(asciidoc, 2027c30f5000Smrg AS_HELP_STRING([--with-asciidoc], 2028c30f5000Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2029c30f5000Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2030c30f5000Smrgm4_undefine([_defopt]) 2031e0963edeSmrg 2032c30f5000Smrgif test "x$use_asciidoc" = x"auto"; then 2033c30f5000Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2034c30f5000Smrg if test "x$ASCIIDOC" = "x"; then 2035c30f5000Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2036c30f5000Smrg have_asciidoc=no 2037c30f5000Smrg else 2038c30f5000Smrg have_asciidoc=yes 2039c30f5000Smrg fi 2040c30f5000Smrgelif test "x$use_asciidoc" = x"yes" ; then 2041c30f5000Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2042c30f5000Smrg if test "x$ASCIIDOC" = "x"; then 2043c30f5000Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2044c30f5000Smrg fi 2045c30f5000Smrg have_asciidoc=yes 2046c30f5000Smrgelif test "x$use_asciidoc" = x"no" ; then 2047c30f5000Smrg if test "x$ASCIIDOC" != "x"; then 2048c30f5000Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2049c30f5000Smrg fi 2050c30f5000Smrg have_asciidoc=no 2051c30f5000Smrgelse 2052c30f5000Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2053c30f5000Smrgfi 2054c30f5000Smrgm4_ifval([$1], 2055c30f5000Smrg[if test "$have_asciidoc" = yes; then 2056c30f5000Smrg # scrape the asciidoc version 2057c30f5000Smrg AC_MSG_CHECKING([the asciidoc version]) 2058c30f5000Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2059c30f5000Smrg AC_MSG_RESULT([$asciidoc_version]) 2060c30f5000Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 2061c30f5000Smrg [if test "x$use_asciidoc" = xauto; then 2062c30f5000Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2063c30f5000Smrg have_asciidoc=no 2064c30f5000Smrg else 2065c30f5000Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2066c30f5000Smrg fi]) 2067c30f5000Smrgfi]) 2068c30f5000SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2069c30f5000Smrg]) # XORG_WITH_ASCIIDOC 2070e494fffdSmrg 2071c30f5000Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2072c30f5000Smrg# ------------------------------------------- 2073c30f5000Smrg# Minimum version: 1.5.0 2074c30f5000Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2075c30f5000Smrg# Minimum version for optional DOT checking: 1.18.0 2076c30f5000Smrg# 2077c30f5000Smrg# Documentation tools are not always available on all platforms and sometimes 2078c30f5000Smrg# not at the appropriate level. This macro enables a module to test for the 2079c30f5000Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2080c30f5000Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 2081c30f5000Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 2082c30f5000Smrg# --with-doxygen assumes 'auto'. 2083c30f5000Smrg# 2084c30f5000Smrg# Interface to module: 2085c30f5000Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2086c30f5000Smrg# DOXYGEN: returns the path of the doxygen program found 2087c30f5000Smrg# returns the path set by the user in the environment 2088c30f5000Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 2089c30f5000Smrg# 'no' user instructs the module not to use doxygen 2090c30f5000Smrg# 2091c30f5000Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2092c30f5000Smrg# 2093c30f5000SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 2094c30f5000SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2095c30f5000SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2096c30f5000Smrgm4_define([_defopt], m4_default([$2], [auto])) 2097c30f5000SmrgAC_ARG_WITH(doxygen, 2098c30f5000Smrg AS_HELP_STRING([--with-doxygen], 2099c30f5000Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2100c30f5000Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 2101c30f5000Smrgm4_undefine([_defopt]) 2102e494fffdSmrg 2103c30f5000Smrgif test "x$use_doxygen" = x"auto"; then 2104c30f5000Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2105c30f5000Smrg if test "x$DOXYGEN" = "x"; then 2106c30f5000Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2107c30f5000Smrg have_doxygen=no 2108c30f5000Smrg else 2109c30f5000Smrg have_doxygen=yes 2110c30f5000Smrg fi 2111c30f5000Smrgelif test "x$use_doxygen" = x"yes" ; then 2112c30f5000Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2113c30f5000Smrg if test "x$DOXYGEN" = "x"; then 2114c30f5000Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2115c30f5000Smrg fi 2116c30f5000Smrg have_doxygen=yes 2117c30f5000Smrgelif test "x$use_doxygen" = x"no" ; then 2118c30f5000Smrg if test "x$DOXYGEN" != "x"; then 2119c30f5000Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2120c30f5000Smrg fi 2121c30f5000Smrg have_doxygen=no 2122c30f5000Smrgelse 2123c30f5000Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2124c30f5000Smrgfi 2125c30f5000Smrgm4_ifval([$1], 2126c30f5000Smrg[if test "$have_doxygen" = yes; then 2127c30f5000Smrg # scrape the doxygen version 2128c30f5000Smrg AC_MSG_CHECKING([the doxygen version]) 2129c30f5000Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 2130c30f5000Smrg AC_MSG_RESULT([$doxygen_version]) 2131c30f5000Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 2132c30f5000Smrg [if test "x$use_doxygen" = xauto; then 2133c30f5000Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2134c30f5000Smrg have_doxygen=no 2135c30f5000Smrg else 2136c30f5000Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2137c30f5000Smrg fi]) 2138c30f5000Smrgfi]) 2139b3a827e2Smrg 2140c30f5000Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2141c30f5000Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2142c30f5000Smrgdnl HAVE_DOT = @HAVE_DOT@ 2143c30f5000SmrgHAVE_DOT=no 2144c30f5000Smrgif test "x$have_doxygen" = "xyes"; then 2145c30f5000Smrg AC_PATH_PROG([DOT], [dot]) 2146c30f5000Smrg if test "x$DOT" != "x"; then 2147c30f5000Smrg HAVE_DOT=yes 214867ab2ff2Smrg fi 2149c30f5000Smrgfi 2150e0963edeSmrg 2151c30f5000SmrgAC_SUBST([HAVE_DOT]) 2152c30f5000SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2153c30f5000SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2154c30f5000Smrg]) # XORG_WITH_DOXYGEN 2155e0963edeSmrg 2156c30f5000Smrg# XORG_WITH_GROFF([DEFAULT]) 2157c30f5000Smrg# ---------------- 2158c30f5000Smrg# Minimum version: 1.6.0 2159c30f5000Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2160c30f5000Smrg# 2161c30f5000Smrg# Documentation tools are not always available on all platforms and sometimes 2162c30f5000Smrg# not at the appropriate level. This macro enables a module to test for the 2163c30f5000Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2164c30f5000Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 2165c30f5000Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 2166c30f5000Smrg# --with-groff assumes 'auto'. 2167c30f5000Smrg# 2168c30f5000Smrg# Interface to module: 2169c30f5000Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2170c30f5000Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2171c30f5000Smrg# HAVE_GROFF_MS: the -ms macros package 2172c30f5000Smrg# GROFF: returns the path of the groff program found 2173c30f5000Smrg# returns the path set by the user in the environment 2174c30f5000Smrg# --with-groff: 'yes' user instructs the module to use groff 2175c30f5000Smrg# 'no' user instructs the module not to use groff 2176c30f5000Smrg# 2177c30f5000Smrg# Added in version 1.9.0: 2178c30f5000Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2179c30f5000Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2180c30f5000Smrg# psselect from the psutils package. 2181c30f5000Smrg# the ghostcript package. Refer to the grohtml man pages 2182c30f5000Smrg# 2183c30f5000Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2184c30f5000Smrg# 2185c30f5000Smrg# OS and distros often splits groff in a basic and full package, the former 2186c30f5000Smrg# having the groff program and the later having devices, fonts and macros 2187c30f5000Smrg# Checking for the groff executable is not enough. 2188c30f5000Smrg# 2189c30f5000Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 2190c30f5000Smrg# unset HAVE_GROFF or GROFF env variables. 2191c30f5000Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2192c30f5000Smrg# 2193c30f5000SmrgAC_DEFUN([XORG_WITH_GROFF],[ 2194c30f5000SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2195c30f5000Smrgm4_define([_defopt], m4_default([$1], [auto])) 2196c30f5000SmrgAC_ARG_WITH(groff, 2197c30f5000Smrg AS_HELP_STRING([--with-groff], 2198c30f5000Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2199c30f5000Smrg [use_groff=$withval], [use_groff=]_defopt) 2200c30f5000Smrgm4_undefine([_defopt]) 2201b3a827e2Smrg 2202c30f5000Smrgif test "x$use_groff" = x"auto"; then 2203c30f5000Smrg AC_PATH_PROG([GROFF], [groff]) 2204c30f5000Smrg if test "x$GROFF" = "x"; then 2205c30f5000Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2206c30f5000Smrg have_groff=no 2207c30f5000Smrg else 2208c30f5000Smrg have_groff=yes 2209c30f5000Smrg fi 2210c30f5000Smrgelif test "x$use_groff" = x"yes" ; then 2211c30f5000Smrg AC_PATH_PROG([GROFF], [groff]) 2212c30f5000Smrg if test "x$GROFF" = "x"; then 2213c30f5000Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2214c30f5000Smrg fi 2215c30f5000Smrg have_groff=yes 2216c30f5000Smrgelif test "x$use_groff" = x"no" ; then 2217c30f5000Smrg if test "x$GROFF" != "x"; then 2218c30f5000Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2219c30f5000Smrg fi 2220c30f5000Smrg have_groff=no 2221c30f5000Smrgelse 2222c30f5000Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2223c30f5000Smrgfi 2224c30f5000Smrg 2225c30f5000Smrg# We have groff, test for the presence of the macro packages 2226c30f5000Smrgif test "x$have_groff" = x"yes"; then 2227c30f5000Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2228c30f5000Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2229c30f5000Smrg groff_ms_works=yes 2230b3a827e2Smrg else 2231c30f5000Smrg groff_ms_works=no 2232b3a827e2Smrg fi 2233c30f5000Smrg AC_MSG_RESULT([$groff_ms_works]) 2234c30f5000Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2235c30f5000Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2236c30f5000Smrg groff_mm_works=yes 2237b3a827e2Smrg else 2238c30f5000Smrg groff_mm_works=no 2239b3a827e2Smrg fi 2240c30f5000Smrg AC_MSG_RESULT([$groff_mm_works]) 224167ab2ff2Smrgfi 2242e0963edeSmrg 2243c30f5000Smrg# We have groff, test for HTML dependencies, one command per package 2244c30f5000Smrgif test "x$have_groff" = x"yes"; then 2245c30f5000Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2246c30f5000Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2247c30f5000Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2248c30f5000Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2249c30f5000Smrg have_groff_html=yes 2250c30f5000Smrg else 2251c30f5000Smrg have_groff_html=no 2252c30f5000Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2253c30f5000Smrg fi 2254c30f5000Smrgfi 2255e0963edeSmrg 2256c30f5000Smrg# Set Automake conditionals for Makefiles 2257c30f5000SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2258c30f5000SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2259c30f5000SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2260c30f5000SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2261c30f5000Smrg]) # XORG_WITH_GROFF 2262e0963edeSmrg 2263c30f5000Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2264c30f5000Smrg# --------------------------------------- 2265c30f5000Smrg# Minimum version: 1.6.0 2266c30f5000Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2267c30f5000Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2268c30f5000Smrg# 2269c30f5000Smrg# Documentation tools are not always available on all platforms and sometimes 2270c30f5000Smrg# not at the appropriate level. This macro enables a module to test for the 2271c30f5000Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2272c30f5000Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 2273c30f5000Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 2274c30f5000Smrg# --with-fop assumes 'auto'. 2275c30f5000Smrg# 2276c30f5000Smrg# Interface to module: 2277c30f5000Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2278c30f5000Smrg# FOP: returns the path of the fop program found 2279c30f5000Smrg# returns the path set by the user in the environment 2280c30f5000Smrg# --with-fop: 'yes' user instructs the module to use fop 2281c30f5000Smrg# 'no' user instructs the module not to use fop 2282c30f5000Smrg# 2283c30f5000Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2284c30f5000Smrg# 2285c30f5000SmrgAC_DEFUN([XORG_WITH_FOP],[ 2286c30f5000SmrgAC_ARG_VAR([FOP], [Path to fop command]) 2287c30f5000Smrgm4_define([_defopt], m4_default([$2], [auto])) 2288c30f5000SmrgAC_ARG_WITH(fop, 2289c30f5000Smrg AS_HELP_STRING([--with-fop], 2290c30f5000Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2291c30f5000Smrg [use_fop=$withval], [use_fop=]_defopt) 2292c30f5000Smrgm4_undefine([_defopt]) 2293f05b35a2Smrg 2294c30f5000Smrgif test "x$use_fop" = x"auto"; then 2295c30f5000Smrg AC_PATH_PROG([FOP], [fop]) 2296c30f5000Smrg if test "x$FOP" = "x"; then 2297c30f5000Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2298c30f5000Smrg have_fop=no 2299c30f5000Smrg else 2300c30f5000Smrg have_fop=yes 2301c30f5000Smrg fi 2302c30f5000Smrgelif test "x$use_fop" = x"yes" ; then 2303c30f5000Smrg AC_PATH_PROG([FOP], [fop]) 2304c30f5000Smrg if test "x$FOP" = "x"; then 2305c30f5000Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2306c30f5000Smrg fi 2307c30f5000Smrg have_fop=yes 2308c30f5000Smrgelif test "x$use_fop" = x"no" ; then 2309c30f5000Smrg if test "x$FOP" != "x"; then 2310c30f5000Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2311c30f5000Smrg fi 2312c30f5000Smrg have_fop=no 231367ab2ff2Smrgelse 2314c30f5000Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2315c30f5000Smrgfi 2316e0963edeSmrg 2317c30f5000Smrg# Test for a minimum version of fop, if provided. 2318c30f5000Smrgm4_ifval([$1], 2319c30f5000Smrg[if test "$have_fop" = yes; then 2320c30f5000Smrg # scrape the fop version 2321c30f5000Smrg AC_MSG_CHECKING([for fop minimum version]) 2322c30f5000Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2323c30f5000Smrg AC_MSG_RESULT([$fop_version]) 2324c30f5000Smrg AS_VERSION_COMPARE([$fop_version], [$1], 2325c30f5000Smrg [if test "x$use_fop" = xauto; then 2326c30f5000Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2327c30f5000Smrg have_fop=no 2328c30f5000Smrg else 2329c30f5000Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2330c30f5000Smrg fi]) 2331c30f5000Smrgfi]) 2332c30f5000SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2333c30f5000Smrg]) # XORG_WITH_FOP 2334e0963edeSmrg 2335c30f5000Smrg# XORG_WITH_M4([MIN-VERSION]) 2336c30f5000Smrg# --------------------------- 2337c30f5000Smrg# Minimum version: 1.19.0 2338c30f5000Smrg# 2339c30f5000Smrg# This macro attempts to locate an m4 macro processor which supports 2340c30f5000Smrg# -I option and is only useful for modules relying on M4 in order to 2341c30f5000Smrg# expand macros in source code files. 2342c30f5000Smrg# 2343c30f5000Smrg# Interface to module: 2344c30f5000Smrg# M4: returns the path of the m4 program found 2345c30f5000Smrg# returns the path set by the user in the environment 2346c30f5000Smrg# 2347c30f5000SmrgAC_DEFUN([XORG_WITH_M4], [ 2348c30f5000SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2349c30f5000Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2350c30f5000Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2351c30f5000Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2352c30f5000Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 2353c30f5000Smrg [$PATH:/usr/gnu/bin])]) 2354e0963edeSmrg 2355c30f5000SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 2356c30f5000Smrg]) # XORG_WITH_M4 235767ab2ff2Smrg 2358c30f5000Smrg# XORG_WITH_PS2PDF([DEFAULT]) 2359c30f5000Smrg# ---------------- 2360c30f5000Smrg# Minimum version: 1.6.0 2361c30f5000Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2362c30f5000Smrg# 2363c30f5000Smrg# Documentation tools are not always available on all platforms and sometimes 2364c30f5000Smrg# not at the appropriate level. This macro enables a module to test for the 2365c30f5000Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2366c30f5000Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 2367c30f5000Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2368c30f5000Smrg# --with-ps2pdf assumes 'auto'. 2369c30f5000Smrg# 2370c30f5000Smrg# Interface to module: 2371c30f5000Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2372c30f5000Smrg# PS2PDF: returns the path of the ps2pdf program found 2373c30f5000Smrg# returns the path set by the user in the environment 2374c30f5000Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2375c30f5000Smrg# 'no' user instructs the module not to use ps2pdf 2376c30f5000Smrg# 2377c30f5000Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2378c30f5000Smrg# 2379c30f5000SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2380c30f5000SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2381c30f5000Smrgm4_define([_defopt], m4_default([$1], [auto])) 2382c30f5000SmrgAC_ARG_WITH(ps2pdf, 2383c30f5000Smrg AS_HELP_STRING([--with-ps2pdf], 2384c30f5000Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2385c30f5000Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2386c30f5000Smrgm4_undefine([_defopt]) 2387e0963edeSmrg 2388c30f5000Smrgif test "x$use_ps2pdf" = x"auto"; then 2389c30f5000Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2390c30f5000Smrg if test "x$PS2PDF" = "x"; then 2391c30f5000Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2392c30f5000Smrg have_ps2pdf=no 2393c30f5000Smrg else 2394c30f5000Smrg have_ps2pdf=yes 2395c30f5000Smrg fi 2396c30f5000Smrgelif test "x$use_ps2pdf" = x"yes" ; then 2397c30f5000Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2398c30f5000Smrg if test "x$PS2PDF" = "x"; then 2399c30f5000Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2400c30f5000Smrg fi 2401c30f5000Smrg have_ps2pdf=yes 2402c30f5000Smrgelif test "x$use_ps2pdf" = x"no" ; then 2403c30f5000Smrg if test "x$PS2PDF" != "x"; then 2404c30f5000Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2405c30f5000Smrg fi 2406c30f5000Smrg have_ps2pdf=no 2407c30f5000Smrgelse 2408c30f5000Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2409b3a827e2Smrgfi 2410c30f5000SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2411c30f5000Smrg]) # XORG_WITH_PS2PDF 2412e0963edeSmrg 2413c30f5000Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 2414c30f5000Smrg# ---------------- 2415c30f5000Smrg# Minimum version: 1.6.0 2416c30f5000Smrg# 2417c30f5000Smrg# Documentation tools are not always available on all platforms and sometimes 2418c30f5000Smrg# not at the appropriate level. This macro enables a builder to skip all 2419c30f5000Smrg# documentation targets except traditional man pages. 2420c30f5000Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2421c30f5000Smrg# maximum flexibilty in controlling documentation building. 2422c30f5000Smrg# Refer to: 2423c30f5000Smrg# XORG_WITH_XMLTO --with-xmlto 2424c30f5000Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2425c30f5000Smrg# XORG_WITH_DOXYGEN --with-doxygen 2426c30f5000Smrg# XORG_WITH_FOP --with-fop 2427c30f5000Smrg# XORG_WITH_GROFF --with-groff 2428c30f5000Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2429c30f5000Smrg# 2430c30f5000Smrg# Interface to module: 2431c30f5000Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2432c30f5000Smrg# --enable-docs: 'yes' user instructs the module to generate docs 2433c30f5000Smrg# 'no' user instructs the module not to generate docs 2434c30f5000Smrg# parm1: specify the default value, yes or no. 2435c30f5000Smrg# 2436c30f5000SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2437c30f5000Smrgm4_define([docs_default], m4_default([$1], [yes])) 2438c30f5000SmrgAC_ARG_ENABLE(docs, 2439c30f5000Smrg AS_HELP_STRING([--enable-docs], 2440c30f5000Smrg [Enable building the documentation (default: ]docs_default[)]), 2441c30f5000Smrg [build_docs=$enableval], [build_docs=]docs_default) 2442c30f5000Smrgm4_undefine([docs_default]) 2443c30f5000SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2444c30f5000SmrgAC_MSG_CHECKING([whether to build documentation]) 2445c30f5000SmrgAC_MSG_RESULT([$build_docs]) 2446c30f5000Smrg]) # XORG_ENABLE_DOCS 2447e0963edeSmrg 2448c30f5000Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2449c30f5000Smrg# ---------------- 2450c30f5000Smrg# Minimum version: 1.6.0 2451c30f5000Smrg# 2452c30f5000Smrg# This macro enables a builder to skip all developer documentation. 2453c30f5000Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2454c30f5000Smrg# maximum flexibilty in controlling documentation building. 2455c30f5000Smrg# Refer to: 2456c30f5000Smrg# XORG_WITH_XMLTO --with-xmlto 2457c30f5000Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2458c30f5000Smrg# XORG_WITH_DOXYGEN --with-doxygen 2459c30f5000Smrg# XORG_WITH_FOP --with-fop 2460c30f5000Smrg# XORG_WITH_GROFF --with-groff 2461c30f5000Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2462c30f5000Smrg# 2463c30f5000Smrg# Interface to module: 2464c30f5000Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2465c30f5000Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2466c30f5000Smrg# 'no' user instructs the module not to generate developer docs 2467c30f5000Smrg# parm1: specify the default value, yes or no. 2468c30f5000Smrg# 2469c30f5000SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2470c30f5000Smrgm4_define([devel_default], m4_default([$1], [yes])) 2471c30f5000SmrgAC_ARG_ENABLE(devel-docs, 2472c30f5000Smrg AS_HELP_STRING([--enable-devel-docs], 2473c30f5000Smrg [Enable building the developer documentation (default: ]devel_default[)]), 2474c30f5000Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2475c30f5000Smrgm4_undefine([devel_default]) 2476c30f5000SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2477c30f5000SmrgAC_MSG_CHECKING([whether to build developer documentation]) 2478c30f5000SmrgAC_MSG_RESULT([$build_devel_docs]) 2479c30f5000Smrg]) # XORG_ENABLE_DEVEL_DOCS 2480e0963edeSmrg 2481c30f5000Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 2482c30f5000Smrg# ---------------- 2483c30f5000Smrg# Minimum version: 1.6.0 2484c30f5000Smrg# 2485c30f5000Smrg# This macro enables a builder to skip all functional specification targets. 2486c30f5000Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2487c30f5000Smrg# maximum flexibilty in controlling documentation building. 2488c30f5000Smrg# Refer to: 2489c30f5000Smrg# XORG_WITH_XMLTO --with-xmlto 2490c30f5000Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2491c30f5000Smrg# XORG_WITH_DOXYGEN --with-doxygen 2492c30f5000Smrg# XORG_WITH_FOP --with-fop 2493c30f5000Smrg# XORG_WITH_GROFF --with-groff 2494c30f5000Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2495c30f5000Smrg# 2496c30f5000Smrg# Interface to module: 2497c30f5000Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2498c30f5000Smrg# --enable-specs: 'yes' user instructs the module to generate specs 2499c30f5000Smrg# 'no' user instructs the module not to generate specs 2500c30f5000Smrg# parm1: specify the default value, yes or no. 2501c30f5000Smrg# 2502c30f5000SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2503c30f5000Smrgm4_define([spec_default], m4_default([$1], [yes])) 2504c30f5000SmrgAC_ARG_ENABLE(specs, 2505c30f5000Smrg AS_HELP_STRING([--enable-specs], 2506c30f5000Smrg [Enable building the specs (default: ]spec_default[)]), 2507c30f5000Smrg [build_specs=$enableval], [build_specs=]spec_default) 2508c30f5000Smrgm4_undefine([spec_default]) 2509c30f5000SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2510c30f5000SmrgAC_MSG_CHECKING([whether to build functional specifications]) 2511c30f5000SmrgAC_MSG_RESULT([$build_specs]) 2512c30f5000Smrg]) # XORG_ENABLE_SPECS 2513e0963edeSmrg 2514c30f5000Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2515c30f5000Smrg# ---------------------------------------------- 2516c30f5000Smrg# Minimum version: 1.13.0 2517c30f5000Smrg# 2518c30f5000Smrg# This macro enables a builder to enable/disable unit testing 2519c30f5000Smrg# It makes no assumption about the test cases implementation 2520c30f5000Smrg# Test cases may or may not use Automake "Support for test suites" 2521c30f5000Smrg# They may or may not use the software utility library GLib 2522c30f5000Smrg# 2523c30f5000Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2524c30f5000Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2525c30f5000Smrg# The variable enable_unit_tests is used by other macros in this file. 2526c30f5000Smrg# 2527c30f5000Smrg# Interface to module: 2528c30f5000Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2529c30f5000Smrg# enable_unit_tests: used in configure.ac for additional configuration 2530c30f5000Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2531c30f5000Smrg# 'no' user instructs the module not to build tests 2532c30f5000Smrg# parm1: specify the default value, yes or no. 2533c30f5000Smrg# 2534c30f5000SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2535c30f5000SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2536c30f5000SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2537c30f5000SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2538c30f5000Smrgm4_define([_defopt], m4_default([$1], [auto])) 2539c30f5000SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2540c30f5000Smrg [Enable building unit test cases (default: ]_defopt[)]), 2541c30f5000Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2542c30f5000Smrgm4_undefine([_defopt]) 2543c30f5000SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2544c30f5000SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2545c30f5000SmrgAC_MSG_RESULT([$enable_unit_tests]) 2546c30f5000Smrg]) # XORG_ENABLE_UNIT_TESTS 2547e0963edeSmrg 2548c30f5000Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2549c30f5000Smrg# ------------------------------------------------------ 2550c30f5000Smrg# Minimum version: 1.17.0 2551c30f5000Smrg# 2552c30f5000Smrg# This macro enables a builder to enable/disable integration testing 2553c30f5000Smrg# It makes no assumption about the test cases' implementation 2554c30f5000Smrg# Test cases may or may not use Automake "Support for test suites" 2555c30f5000Smrg# 2556c30f5000Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2557c30f5000Smrg# usually requires less dependencies and may be built and run under less 2558c30f5000Smrg# stringent environments than integration tests. 2559c30f5000Smrg# 2560c30f5000Smrg# Interface to module: 2561c30f5000Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2562c30f5000Smrg# enable_integration_tests: used in configure.ac for additional configuration 2563c30f5000Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2564c30f5000Smrg# 'no' user instructs the module not to build tests 2565c30f5000Smrg# parm1: specify the default value, yes or no. 2566c30f5000Smrg# 2567c30f5000SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2568c30f5000SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2569c30f5000Smrgm4_define([_defopt], m4_default([$1], [auto])) 2570c30f5000SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2571c30f5000Smrg [Enable building integration test cases (default: ]_defopt[)]), 2572c30f5000Smrg [enable_integration_tests=$enableval], 2573c30f5000Smrg [enable_integration_tests=]_defopt) 2574c30f5000Smrgm4_undefine([_defopt]) 2575c30f5000SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2576c30f5000Smrg [test "x$enable_integration_tests" != xno]) 2577c30f5000SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2578c30f5000SmrgAC_MSG_RESULT([$enable_integration_tests]) 2579c30f5000Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 2580b3a827e2Smrg 2581c30f5000Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2582c30f5000Smrg# ---------------------------------------- 2583c30f5000Smrg# Minimum version: 1.13.0 2584c30f5000Smrg# 2585c30f5000Smrg# GLib is a library which provides advanced data structures and functions. 2586c30f5000Smrg# This macro enables a module to test for the presence of Glib. 2587c30f5000Smrg# 2588c30f5000Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2589c30f5000Smrg# Otherwise the value of $enable_unit_tests is blank. 2590c30f5000Smrg# 2591c30f5000Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2592c30f5000Smrg# test support usually requires less dependencies and may be built and run under 2593c30f5000Smrg# less stringent environments than integration tests. 2594c30f5000Smrg# 2595c30f5000Smrg# Interface to module: 2596c30f5000Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 2597c30f5000Smrg# with_glib: used in configure.ac to know if GLib has been found 2598c30f5000Smrg# --with-glib: 'yes' user instructs the module to use glib 2599c30f5000Smrg# 'no' user instructs the module not to use glib 2600c30f5000Smrg# 2601c30f5000SmrgAC_DEFUN([XORG_WITH_GLIB],[ 2602c30f5000SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2603c30f5000Smrgm4_define([_defopt], m4_default([$2], [auto])) 2604c30f5000SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2605c30f5000Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 2606c30f5000Smrg [with_glib=$withval], [with_glib=]_defopt) 2607c30f5000Smrgm4_undefine([_defopt]) 2608e0963edeSmrg 2609c30f5000Smrghave_glib=no 2610c30f5000Smrg# Do not probe GLib if user explicitly disabled unit testing 2611c30f5000Smrgif test "x$enable_unit_tests" != x"no"; then 2612c30f5000Smrg # Do not probe GLib if user explicitly disabled it 2613c30f5000Smrg if test "x$with_glib" != x"no"; then 2614c30f5000Smrg m4_ifval( 2615c30f5000Smrg [$1], 2616c30f5000Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2617c30f5000Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2618c30f5000Smrg ) 2619b3a827e2Smrg fi 2620c30f5000Smrgfi 2621e0963edeSmrg 2622c30f5000Smrg# Not having GLib when unit testing has been explicitly requested is an error 2623c30f5000Smrgif test "x$enable_unit_tests" = x"yes"; then 2624c30f5000Smrg if test "x$have_glib" = x"no"; then 2625c30f5000Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2626c30f5000Smrg fi 2627c30f5000Smrgfi 2628b3a827e2Smrg 2629c30f5000Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 2630c30f5000Smrgif test "x$enable_unit_tests" = x"no"; then 2631c30f5000Smrg if test "x$with_glib" = x"yes"; then 2632c30f5000Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2633c30f5000Smrg fi 2634b3a827e2Smrgfi 2635b3a827e2Smrg 2636c30f5000Smrg# Not having GLib when it has been explicitly requested is an error 2637c30f5000Smrgif test "x$with_glib" = x"yes"; then 2638c30f5000Smrg if test "x$have_glib" = x"no"; then 2639c30f5000Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2640c30f5000Smrg fi 2641c30f5000Smrgfi 2642b3a827e2Smrg 2643c30f5000SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2644c30f5000Smrg]) # XORG_WITH_GLIB 2645b3a827e2Smrg 2646c30f5000Smrg# XORG_LD_WRAP([required|optional]) 2647c30f5000Smrg# --------------------------------- 2648c30f5000Smrg# Minimum version: 1.13.0 2649c30f5000Smrg# 2650c30f5000Smrg# Check if linker supports -wrap, passed via compiler flags 2651c30f5000Smrg# 2652c30f5000Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2653c30f5000Smrg# Otherwise the value of $enable_unit_tests is blank. 2654c30f5000Smrg# 2655c30f5000Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2656c30f5000Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2657c30f5000Smrg# available, an argument of "optional" allows use when some unit tests require 2658c30f5000Smrg# ld -wrap and others do not. 2659c30f5000Smrg# 2660c30f5000SmrgAC_DEFUN([XORG_LD_WRAP],[ 2661c30f5000SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2662c30f5000Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 2663c30f5000Smrg void __wrap_exit(int status) { return; }], 2664c30f5000Smrg [exit(0);])]) 2665c30f5000Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 2666c30f5000Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2667c30f5000Smrg if test "x$have_ld_wrap" = x"no"; then 2668c30f5000Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2669c30f5000Smrg fi 2670c30f5000Smrgfi 2671c30f5000SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2672c30f5000Smrg# 2673c30f5000Smrg]) # XORG_LD_WRAP 2674b3a827e2Smrg 2675c30f5000Smrg# XORG_CHECK_LINKER_FLAGS 2676c30f5000Smrg# ----------------------- 2677c30f5000Smrg# SYNOPSIS 2678c30f5000Smrg# 2679c30f5000Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2680c30f5000Smrg# 2681c30f5000Smrg# DESCRIPTION 2682c30f5000Smrg# 2683c30f5000Smrg# Check whether the given linker FLAGS work with the current language's 2684c30f5000Smrg# linker, or whether they give an error. 2685c30f5000Smrg# 2686c30f5000Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2687c30f5000Smrg# success/failure. 2688c30f5000Smrg# 2689c30f5000Smrg# PROGRAM-SOURCE is the program source to link with, if needed 2690c30f5000Smrg# 2691c30f5000Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2692c30f5000Smrg# 2693c30f5000Smrg# LICENSE 2694c30f5000Smrg# 2695c30f5000Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2696c30f5000Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2697c30f5000Smrg# Copyright (c) 2009 Matteo Frigo 2698c30f5000Smrg# 2699c30f5000Smrg# This program is free software: you can redistribute it and/or modify it 2700c30f5000Smrg# under the terms of the GNU General Public License as published by the 2701c30f5000Smrg# Free Software Foundation, either version 3 of the License, or (at your 2702c30f5000Smrg# option) any later version. 2703c30f5000Smrg# 2704c30f5000Smrg# This program is distributed in the hope that it will be useful, but 2705c30f5000Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2706c30f5000Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2707c30f5000Smrg# Public License for more details. 2708c30f5000Smrg# 2709c30f5000Smrg# You should have received a copy of the GNU General Public License along 2710c30f5000Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2711c30f5000Smrg# 2712c30f5000Smrg# As a special exception, the respective Autoconf Macro's copyright owner 2713c30f5000Smrg# gives unlimited permission to copy, distribute and modify the configure 2714c30f5000Smrg# scripts that are the output of Autoconf when processing the Macro. You 2715c30f5000Smrg# need not follow the terms of the GNU General Public License when using 2716c30f5000Smrg# or distributing such scripts, even though portions of the text of the 2717c30f5000Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 2718c30f5000Smrg# all other use of the material that constitutes the Autoconf Macro. 2719c30f5000Smrg# 2720c30f5000Smrg# This special exception to the GPL applies to versions of the Autoconf 2721c30f5000Smrg# Macro released by the Autoconf Archive. When you make and distribute a 2722c30f5000Smrg# modified version of the Autoconf Macro, you may extend this special 2723c30f5000Smrg# exception to the GPL to apply to your modified version as well.# 2724c30f5000SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2725c30f5000Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2726c30f5000Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2727c30f5000SmrgAS_LITERAL_IF([$1], 2728c30f5000Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2729c30f5000Smrg ax_save_FLAGS=$LDFLAGS 2730c30f5000Smrg LDFLAGS="$1" 2731c30f5000Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2732c30f5000Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2733c30f5000Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2734c30f5000Smrg LDFLAGS=$ax_save_FLAGS])], 2735c30f5000Smrg [ax_save_FLAGS=$LDFLAGS 2736c30f5000Smrg LDFLAGS="$1" 2737c30f5000Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2738c30f5000Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2739c30f5000Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2740c30f5000Smrg LDFLAGS=$ax_save_FLAGS]) 2741c30f5000Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2742c30f5000SmrgAC_MSG_RESULT($xorg_check_linker_flags) 2743c30f5000Smrgif test "x$xorg_check_linker_flags" = xyes; then 2744c30f5000Smrg m4_default([$2], :) 2745b3a827e2Smrgelse 2746c30f5000Smrg m4_default([$3], :) 2747b3a827e2Smrgfi 2748c30f5000Smrg]) # XORG_CHECK_LINKER_FLAGS 2749f05b35a2Smrg 2750c30f5000Smrg# XORG_MEMORY_CHECK_FLAGS 2751c30f5000Smrg# ----------------------- 2752c30f5000Smrg# Minimum version: 1.16.0 2753c30f5000Smrg# 2754c30f5000Smrg# This macro attempts to find appropriate memory checking functionality 2755c30f5000Smrg# for various platforms which unit testing code may use to catch various 2756c30f5000Smrg# forms of memory allocation and access errors in testing. 2757c30f5000Smrg# 2758c30f5000Smrg# Interface to module: 2759c30f5000Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2760c30f5000Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2761c30f5000Smrg# 2762c30f5000Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2763c30f5000Smrg# 2764c30f5000SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 276549e108a1Smrg 2766c30f5000SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2767c30f5000SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2768c30f5000Smrg [Environment variables to enable memory checking in tests]) 2769c30f5000Smrg 2770c30f5000Smrg# Check for different types of support on different platforms 2771c30f5000Smrgcase $host_os in 2772c30f5000Smrg solaris*) 2773c30f5000Smrg AC_CHECK_LIB([umem], [umem_alloc], 2774c30f5000Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2775c30f5000Smrg ;; 2776c30f5000Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2777c30f5000Smrg # both directly and inverted, so should not be 0 or 255. 2778c30f5000Smrg malloc_debug_env='MALLOC_PERTURB_=15' 2779c30f5000Smrg ;; 2780c30f5000Smrg darwin*) 2781c30f5000Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2782c30f5000Smrg ;; 2783c30f5000Smrg *bsd*) 2784c30f5000Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2785c30f5000Smrg ;; 2786c30f5000Smrgesac 2787c30f5000Smrg 2788c30f5000Smrg# User supplied flags override default flags 2789c30f5000Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2790c30f5000Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 279167ab2ff2Smrgfi 279249e108a1Smrg 2793c30f5000SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2794c30f5000Smrg]) # XORG_WITH_LINT 279549e108a1Smrg 2796c30f5000Smrg# XORG_CHECK_MALLOC_ZERO 2797c30f5000Smrg# ---------------------- 2798c30f5000Smrg# Minimum version: 1.0.0 2799c30f5000Smrg# 2800c30f5000Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2801c30f5000Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 2802c30f5000Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2803c30f5000SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2804c30f5000SmrgAC_ARG_ENABLE(malloc0returnsnull, 2805c30f5000Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 2806c30f5000Smrg [malloc(0) returns NULL (default: auto)]), 2807c30f5000Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2808c30f5000Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 280949e108a1Smrg 2810c30f5000SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2811c30f5000Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2812c30f5000SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2813c30f5000Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2814c30f5000Smrg#include <stdlib.h> 2815c30f5000Smrg],[ 2816c30f5000Smrg char *m0, *r0, *c0, *p; 2817c30f5000Smrg m0 = malloc(0); 2818c30f5000Smrg p = malloc(10); 2819c30f5000Smrg r0 = realloc(p,0); 2820c30f5000Smrg c0 = calloc(0,10); 2821c30f5000Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2822c30f5000Smrg])], 2823c30f5000Smrg [xorg_cv_malloc0_returns_null=yes], 2824c30f5000Smrg [xorg_cv_malloc0_returns_null=no])]) 2825c30f5000SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2826b3a827e2Smrgfi 2827c30f5000SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 282849e108a1Smrg 2829c30f5000Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2830c30f5000Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2831c30f5000Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2832c30f5000Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2833c30f5000Smrgelse 2834c30f5000Smrg MALLOC_ZERO_CFLAGS="" 2835c30f5000Smrg XMALLOC_ZERO_CFLAGS="" 2836c30f5000Smrg XTMALLOC_ZERO_CFLAGS="" 2837b3a827e2Smrgfi 283849e108a1Smrg 2839c30f5000SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2840c30f5000SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2841c30f5000SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2842c30f5000Smrg]) # XORG_CHECK_MALLOC_ZERO 284349e108a1Smrg 2844c30f5000Smrg# XORG_WITH_LINT() 2845b3a827e2Smrg# ---------------- 2846c30f5000Smrg# Minimum version: 1.1.0 2847c30f5000Smrg# 2848c30f5000Smrg# This macro enables the use of a tool that flags some suspicious and 2849c30f5000Smrg# non-portable constructs (likely to be bugs) in C language source code. 2850c30f5000Smrg# It will attempt to locate the tool and use appropriate options. 2851c30f5000Smrg# There are various lint type tools on different platforms. 2852c30f5000Smrg# 2853c30f5000Smrg# Interface to module: 2854c30f5000Smrg# LINT: returns the path to the tool found on the platform 2855c30f5000Smrg# or the value set to LINT on the configure cmd line 2856c30f5000Smrg# also an Automake conditional 2857c30f5000Smrg# LINT_FLAGS: an Automake variable with appropriate flags 2858c30f5000Smrg# 2859c30f5000Smrg# --with-lint: 'yes' user instructs the module to use lint 2860c30f5000Smrg# 'no' user instructs the module not to use lint (default) 2861c30f5000Smrg# 2862c30f5000Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2863c30f5000Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2864c30f5000Smrg# 2865c30f5000SmrgAC_DEFUN([XORG_WITH_LINT],[ 2866c30f5000Smrg 2867c30f5000SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2868c30f5000SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2869c30f5000SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2870c30f5000Smrg [Use a lint-style source code checker (default: disabled)])], 2871c30f5000Smrg [use_lint=$withval], [use_lint=no]) 2872c30f5000Smrg 2873c30f5000Smrg# Obtain platform specific info like program name and options 2874c30f5000Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2875c30f5000Smrgcase $host_os in 2876c30f5000Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2877c30f5000Smrg lint_name=splint 2878c30f5000Smrg lint_options="-badflag" 2879c30f5000Smrg ;; 2880c30f5000Smrg *freebsd* | *netbsd*) 2881c30f5000Smrg lint_name=lint 2882c30f5000Smrg lint_options="-u -b" 2883c30f5000Smrg ;; 2884c30f5000Smrg *solaris*) 2885c30f5000Smrg lint_name=lint 2886c30f5000Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2887c30f5000Smrg ;; 2888c30f5000Smrgesac 2889c30f5000Smrg 2890c30f5000Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2891c30f5000Smrgif test "x$use_lint" = x"yes" ; then 2892c30f5000Smrg AC_PATH_PROG([LINT], [$lint_name]) 2893c30f5000Smrg if test "x$LINT" = "x"; then 2894c30f5000Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2895c30f5000Smrg fi 2896c30f5000Smrgelif test "x$use_lint" = x"no" ; then 2897c30f5000Smrg if test "x$LINT" != "x"; then 2898c30f5000Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2899c30f5000Smrg fi 2900c30f5000Smrgelse 2901c30f5000Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2902b3a827e2Smrgfi 290349e108a1Smrg 2904c30f5000Smrg# User supplied flags override default flags 2905c30f5000Smrgif test "x$LINT_FLAGS" != "x"; then 2906c30f5000Smrg lint_options=$LINT_FLAGS 2907c30f5000Smrgfi 2908e494fffdSmrg 2909c30f5000SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2910c30f5000SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2911b3a827e2Smrg 2912c30f5000Smrg]) # XORG_WITH_LINT 2913b3a827e2Smrg 2914c30f5000Smrg# XORG_LINT_LIBRARY(LIBNAME) 2915c30f5000Smrg# -------------------------- 2916c30f5000Smrg# Minimum version: 1.1.0 2917c30f5000Smrg# 2918c30f5000Smrg# Sets up flags for building lint libraries for checking programs that call 2919c30f5000Smrg# functions in the library. 2920c30f5000Smrg# 2921c30f5000Smrg# Interface to module: 2922c30f5000Smrg# LINTLIB - Automake variable with the name of lint library file to make 2923c30f5000Smrg# MAKE_LINT_LIB - Automake conditional 2924c30f5000Smrg# 2925c30f5000Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2926c30f5000Smrg# - 'no' user instructs the module not to create a lint library (default) 292749e108a1Smrg 2928c30f5000SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2929c30f5000SmrgAC_REQUIRE([XORG_WITH_LINT]) 2930c30f5000SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2931c30f5000Smrg [Create lint library (default: disabled)])], 2932c30f5000Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 293349e108a1Smrg 2934c30f5000Smrgif test "x$make_lint_lib" = x"yes" ; then 2935c30f5000Smrg LINTLIB=llib-l$1.ln 2936c30f5000Smrg if test "x$LINT" = "x"; then 2937c30f5000Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2938c30f5000Smrg fi 2939c30f5000Smrgelif test "x$make_lint_lib" != x"no" ; then 2940c30f5000Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2941c30f5000Smrgfi 294249e108a1Smrg 2943c30f5000SmrgAC_SUBST(LINTLIB) 2944c30f5000SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 294549e108a1Smrg 2946c30f5000Smrg]) # XORG_LINT_LIBRARY 294749e108a1Smrg 2948c30f5000Smrg# XORG_COMPILER_BRAND 2949c30f5000Smrg# ------------------- 2950c30f5000Smrg# Minimum version: 1.14.0 2951c30f5000Smrg# 2952c30f5000Smrg# Checks for various brands of compilers and sets flags as appropriate: 2953c30f5000Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2954c30f5000Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 2955c30f5000Smrg# clang compiler - sets CLANGCC to "yes" 2956c30f5000Smrg# Intel compiler - sets INTELCC to "yes" 2957c30f5000Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2958c30f5000Smrg# 2959c30f5000SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 2960c30f5000SmrgAC_LANG_CASE( 2961c30f5000Smrg [C], [ 2962c30f5000Smrg AC_REQUIRE([AC_PROG_CC_C99]) 2963c30f5000Smrg ], 2964c30f5000Smrg [C++], [ 2965c30f5000Smrg AC_REQUIRE([AC_PROG_CXX]) 2966c30f5000Smrg ] 2967c30f5000Smrg) 2968c30f5000SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2969c30f5000SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2970c30f5000SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2971c30f5000Smrg]) # XORG_COMPILER_BRAND 2972b3a827e2Smrg 2973c30f5000Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2974c30f5000Smrg# --------------- 2975c30f5000Smrg# Minimum version: 1.16.0 2976c30f5000Smrg# 2977c30f5000Smrg# Test if the compiler works when passed the given flag as a command line argument. 2978c30f5000Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 2979c30f5000Smrg# next flag in the list until there are no more options. 2980c30f5000Smrg# 2981c30f5000Smrg# Note that this does not guarantee that the compiler supports the flag as some 2982c30f5000Smrg# compilers will simply ignore arguments that they do not understand, but we do 2983c30f5000Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 2984c30f5000Smrg# -Werror=unused-command-line-argument 2985c30f5000Smrg# 2986c30f5000SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 2987c30f5000Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2988c30f5000Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 298949e108a1Smrg 2990c30f5000SmrgAC_LANG_COMPILER_REQUIRE 299149e108a1Smrg 2992c30f5000SmrgAC_LANG_CASE( 2993c30f5000Smrg [C], [ 2994c30f5000Smrg AC_REQUIRE([AC_PROG_CC_C99]) 2995c30f5000Smrg define([PREFIX], [C]) 2996c30f5000Smrg define([CACHE_PREFIX], [cc]) 2997c30f5000Smrg define([COMPILER], [$CC]) 2998c30f5000Smrg ], 2999c30f5000Smrg [C++], [ 3000c30f5000Smrg define([PREFIX], [CXX]) 3001c30f5000Smrg define([CACHE_PREFIX], [cxx]) 3002c30f5000Smrg define([COMPILER], [$CXX]) 3003c30f5000Smrg ] 3004c30f5000Smrg) 300549e108a1Smrg 3006c30f5000Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 300749e108a1Smrg 3008c30f5000Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3009c30f5000Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3010c30f5000Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3011c30f5000Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3012c30f5000Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3013c30f5000Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3014c30f5000Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3015c30f5000Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3016c30f5000Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3017c30f5000Smrgfi 301867ab2ff2Smrg 3019c30f5000Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3020c30f5000Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3021c30f5000Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3022c30f5000Smrg fi 3023c30f5000Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3024c30f5000Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3025c30f5000Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3026c30f5000Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3027c30f5000Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3028c30f5000Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3029c30f5000Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3030c30f5000Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3031c30f5000Smrgfi 3032b3a827e2Smrg 3033c30f5000Smrgfound="no" 3034c30f5000Smrgm4_foreach([flag], m4_cdr($@), [ 3035c30f5000Smrg if test $found = "no" ; then 3036c30f5000Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3037c30f5000Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3038c30f5000Smrg fi 303967ab2ff2Smrg 3040c30f5000Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3041c30f5000Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3042c30f5000Smrg fi 3043b3a827e2Smrg 3044c30f5000Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3045b3a827e2Smrg 3046c30f5000Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3047c30f5000Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3048c30f5000Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3049c30f5000Smrg AC_CACHE_VAL($cacheid, 3050c30f5000Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3051c30f5000Smrg [eval $cacheid=yes], 3052c30f5000Smrg [eval $cacheid=no])]) 305367ab2ff2Smrg 3054c30f5000Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 305567ab2ff2Smrg 3056c30f5000Smrg eval supported=\$$cacheid 3057c30f5000Smrg AC_MSG_RESULT([$supported]) 3058c30f5000Smrg if test "$supported" = "yes" ; then 3059c30f5000Smrg $1="$$1 ]flag[" 3060c30f5000Smrg found="yes" 3061c30f5000Smrg fi 3062c30f5000Smrg fi 3063c30f5000Smrg]) 3064c30f5000Smrg]) # XORG_TESTSET_CFLAG 306549e108a1Smrg 3066c30f5000Smrg# XORG_COMPILER_FLAGS 3067c30f5000Smrg# --------------- 3068c30f5000Smrg# Minimum version: 1.16.0 3069c30f5000Smrg# 3070c30f5000Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3071c30f5000Smrg# arguments supported by the selected compiler which do NOT alter the generated 3072c30f5000Smrg# code. These arguments will cause the compiler to print various warnings 3073c30f5000Smrg# during compilation AND turn a conservative set of warnings into errors. 3074c30f5000Smrg# 3075c30f5000Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3076c30f5000Smrg# future versions of util-macros as options are added to new compilers. 3077c30f5000Smrg# 3078c30f5000SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 3079c30f5000SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 308049e108a1Smrg 3081c30f5000SmrgAC_ARG_ENABLE(selective-werror, 3082c30f5000Smrg AS_HELP_STRING([--disable-selective-werror], 3083c30f5000Smrg [Turn off selective compiler errors. (default: enabled)]), 3084c30f5000Smrg [SELECTIVE_WERROR=$enableval], 3085c30f5000Smrg [SELECTIVE_WERROR=yes]) 308649e108a1Smrg 3087c30f5000SmrgAC_LANG_CASE( 3088c30f5000Smrg [C], [ 3089c30f5000Smrg define([PREFIX], [C]) 3090c30f5000Smrg ], 3091c30f5000Smrg [C++], [ 3092c30f5000Smrg define([PREFIX], [CXX]) 3093c30f5000Smrg ] 3094c30f5000Smrg) 3095c30f5000Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 3096c30f5000Smrgif test "x$SUNCC" = "xyes"; then 3097c30f5000Smrg [BASE_]PREFIX[FLAGS]="-v" 3098c30f5000Smrgelse 3099c30f5000Smrg [BASE_]PREFIX[FLAGS]="" 3100c30f5000Smrgfi 310149e108a1Smrg 3102c30f5000Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3103c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3104c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3105c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3106c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 310749e108a1Smrg 3108c30f5000SmrgAC_LANG_CASE( 3109c30f5000Smrg [C], [ 3110c30f5000Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3111c30f5000Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3112c30f5000Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3113c30f5000Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3114c30f5000Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3115c30f5000Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3116c30f5000Smrg ] 3117c30f5000Smrg) 311849e108a1Smrg 3119c30f5000Smrg# This chunk adds additional warnings that could catch undesired effects. 3120c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3121c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3122c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3123c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3124c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3125c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3126c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 312749e108a1Smrg 3128c30f5000Smrg# These are currently disabled because they are noisy. They will be enabled 3129c30f5000Smrg# in the future once the codebase is sufficiently modernized to silence 3130c30f5000Smrg# them. For now, I don't want them to drown out the other warnings. 3131c30f5000Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3132c30f5000Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3133c30f5000Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 313467ab2ff2Smrg 3135c30f5000Smrg# Turn some warnings into errors, so we don't accidently get successful builds 3136c30f5000Smrg# when there are problems that should be fixed. 313749e108a1Smrg 3138c30f5000Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 3139c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3140c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3141c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3142c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3143c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3144c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3145c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3146c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3147c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3148c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3149c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3150c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3151c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3152c30f5000Smrgelse 3153c30f5000SmrgAC_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]) 3154c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3155c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3156c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3157c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3158c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3159c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3160c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3161c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3162c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3163c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3164c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3165c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3166c30f5000SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3167c30f5000Smrgfi 316867ab2ff2Smrg 3169c30f5000SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3170c30f5000Smrg]) # XORG_COMPILER_FLAGS 317167ab2ff2Smrg 3172c30f5000Smrg# XORG_CWARNFLAGS 3173c30f5000Smrg# --------------- 3174c30f5000Smrg# Minimum version: 1.2.0 3175c30f5000Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3176c30f5000Smrg# 3177c30f5000Smrg# Defines CWARNFLAGS to enable C compiler warnings. 3178c30f5000Smrg# 3179c30f5000Smrg# This function is deprecated because it defines -fno-strict-aliasing 3180c30f5000Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3181c30f5000Smrg# is needed, then it should be added explicitly in the module when 3182c30f5000Smrg# it is updated to use BASE_CFLAGS. 3183c30f5000Smrg# 3184c30f5000SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3185c30f5000SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3186c30f5000SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3187c30f5000SmrgAC_LANG_CASE( 3188c30f5000Smrg [C], [ 3189c30f5000Smrg CWARNFLAGS="$BASE_CFLAGS" 3190c30f5000Smrg if test "x$GCC" = xyes ; then 3191c30f5000Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3192c30f5000Smrg fi 3193c30f5000Smrg AC_SUBST(CWARNFLAGS) 3194c30f5000Smrg ] 3195c30f5000Smrg) 3196c30f5000Smrg]) # XORG_CWARNFLAGS 319749e108a1Smrg 3198c30f5000Smrg# XORG_STRICT_OPTION 3199c30f5000Smrg# ----------------------- 3200c30f5000Smrg# Minimum version: 1.3.0 3201c30f5000Smrg# 3202c30f5000Smrg# Add configure option to enable strict compilation flags, such as treating 3203c30f5000Smrg# warnings as fatal errors. 3204c30f5000Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3205c30f5000Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3206c30f5000Smrg# 3207c30f5000Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3208c30f5000Smrg# when strict compilation is unconditionally desired. 3209c30f5000SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3210c30f5000SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3211c30f5000SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 321249e108a1Smrg 3213c30f5000SmrgAC_ARG_ENABLE(strict-compilation, 3214c30f5000Smrg AS_HELP_STRING([--enable-strict-compilation], 3215c30f5000Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3216c30f5000Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 321749e108a1Smrg 3218c30f5000SmrgAC_LANG_CASE( 3219c30f5000Smrg [C], [ 3220c30f5000Smrg define([PREFIX], [C]) 3221c30f5000Smrg ], 3222c30f5000Smrg [C++], [ 3223c30f5000Smrg define([PREFIX], [CXX]) 3224c30f5000Smrg ] 3225c30f5000Smrg) 322649e108a1Smrg 3227c30f5000Smrg[STRICT_]PREFIX[FLAGS]="" 3228c30f5000SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3229c30f5000SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 323049e108a1Smrg 3231c30f5000Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3232c30f5000Smrg# activate it with -Werror, so we add it here explicitly. 3233c30f5000SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3234b3a827e2Smrg 3235c30f5000Smrgif test "x$STRICT_COMPILE" = "xyes"; then 3236c30f5000Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3237c30f5000Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3238c30f5000Smrgfi 3239c30f5000SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3240c30f5000SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3241c30f5000SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3242c30f5000Smrg]) # XORG_STRICT_OPTION 324349e108a1Smrg 3244c30f5000Smrg# XORG_DEFAULT_OPTIONS 3245c30f5000Smrg# -------------------- 3246c30f5000Smrg# Minimum version: 1.3.0 3247c30f5000Smrg# 3248c30f5000Smrg# Defines default options for X.Org modules. 3249c30f5000Smrg# 3250c30f5000SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3251c30f5000SmrgAC_REQUIRE([AC_PROG_INSTALL]) 3252c30f5000SmrgXORG_COMPILER_FLAGS 3253c30f5000SmrgXORG_CWARNFLAGS 3254c30f5000SmrgXORG_STRICT_OPTION 3255c30f5000SmrgXORG_RELEASE_VERSION 3256c30f5000SmrgXORG_CHANGELOG 3257c30f5000SmrgXORG_INSTALL 3258c30f5000SmrgXORG_MANPAGE_SECTIONS 3259c30f5000Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3260c30f5000Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3261c30f5000Smrg]) # XORG_DEFAULT_OPTIONS 326249e108a1Smrg 3263c30f5000Smrg# XORG_INSTALL() 3264c30f5000Smrg# ---------------- 3265c30f5000Smrg# Minimum version: 1.4.0 3266c30f5000Smrg# 3267c30f5000Smrg# Defines the variable INSTALL_CMD as the command to copy 3268c30f5000Smrg# INSTALL from $prefix/share/util-macros. 3269c30f5000Smrg# 3270c30f5000SmrgAC_DEFUN([XORG_INSTALL], [ 3271c30f5000SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3272c30f5000Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3273c30f5000SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3274c30f5000Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3275c30f5000Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3276c30f5000Smrgtouch \$(top_srcdir)/INSTALL; \ 3277c30f5000Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3278c30f5000SmrgAC_SUBST([INSTALL_CMD]) 3279c30f5000Smrg]) # XORG_INSTALL 3280c30f5000Smrgdnl Copyright 2005 Red Hat, Inc 3281c30f5000Smrgdnl 3282c30f5000Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3283c30f5000Smrgdnl documentation for any purpose is hereby granted without fee, provided that 3284c30f5000Smrgdnl the above copyright notice appear in all copies and that both that 3285c30f5000Smrgdnl copyright notice and this permission notice appear in supporting 3286c30f5000Smrgdnl documentation. 3287c30f5000Smrgdnl 3288c30f5000Smrgdnl The above copyright notice and this permission notice shall be included 3289c30f5000Smrgdnl in all copies or substantial portions of the Software. 3290c30f5000Smrgdnl 3291c30f5000Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3292c30f5000Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3293c30f5000Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3294c30f5000Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3295c30f5000Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3296c30f5000Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3297c30f5000Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 3298c30f5000Smrgdnl 3299c30f5000Smrgdnl Except as contained in this notice, the name of the copyright holders shall 3300c30f5000Smrgdnl not be used in advertising or otherwise to promote the sale, use or 3301c30f5000Smrgdnl other dealings in this Software without prior written authorization 3302c30f5000Smrgdnl from the copyright holders. 3303c30f5000Smrgdnl 330449e108a1Smrg 3305c30f5000Smrg# XORG_RELEASE_VERSION 3306c30f5000Smrg# -------------------- 3307c30f5000Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 330849e108a1Smrg 3309c30f5000SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3310c30f5000Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3311c30f5000Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3312c30f5000Smrg [Major version of this package]) 3313c30f5000Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3314c30f5000Smrg if test "x$PVM" = "x"; then 3315c30f5000Smrg PVM="0" 3316c30f5000Smrg fi 3317c30f5000Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3318c30f5000Smrg [$PVM], 3319c30f5000Smrg [Minor version of this package]) 3320c30f5000Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3321c30f5000Smrg if test "x$PVP" = "x"; then 3322c30f5000Smrg PVP="0" 3323c30f5000Smrg fi 3324c30f5000Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3325c30f5000Smrg [$PVP], 3326c30f5000Smrg [Patch version of this package]) 3327c30f5000Smrg]) 332849e108a1Smrg 3329c30f5000Smrg# XORG_CHANGELOG() 3330c30f5000Smrg# ---------------- 3331c30f5000Smrg# Minimum version: 1.2.0 3332c30f5000Smrg# 3333c30f5000Smrg# Defines the variable CHANGELOG_CMD as the command to generate 3334c30f5000Smrg# ChangeLog from git. 3335c30f5000Smrg# 3336c30f5000Smrg# 3337c30f5000SmrgAC_DEFUN([XORG_CHANGELOG], [ 3338c30f5000SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3339c30f5000Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3340c30f5000Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3341c30f5000Smrgtouch \$(top_srcdir)/ChangeLog; \ 3342c30f5000Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3343c30f5000SmrgAC_SUBST([CHANGELOG_CMD]) 3344c30f5000Smrg]) # XORG_CHANGELOG 3345f05b35a2Smrg 3346c30f5000Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3347c30f5000Smrg# 3348c30f5000Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3349c30f5000Smrg# Foundation, Inc. 3350c30f5000Smrg# Written by Gordon Matzigkeit, 1996 3351c30f5000Smrg# 3352c30f5000Smrg# This file is free software; the Free Software Foundation gives 3353c30f5000Smrg# unlimited permission to copy and/or distribute it, with or without 3354c30f5000Smrg# modifications, as long as this notice is preserved. 3355f05b35a2Smrg 3356c30f5000Smrgm4_define([_LT_COPYING], [dnl 3357c30f5000Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 3358c30f5000Smrg# This is free software; see the source for copying conditions. There is NO 3359c30f5000Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3360f05b35a2Smrg 3361c30f5000Smrg# GNU Libtool is free software; you can redistribute it and/or modify 3362c30f5000Smrg# it under the terms of the GNU General Public License as published by 3363c30f5000Smrg# the Free Software Foundation; either version 2 of of the License, or 3364c30f5000Smrg# (at your option) any later version. 3365c30f5000Smrg# 3366c30f5000Smrg# As a special exception to the GNU General Public License, if you 3367c30f5000Smrg# distribute this file as part of a program or library that is built 3368c30f5000Smrg# using GNU Libtool, you may include this file under the same 3369c30f5000Smrg# distribution terms that you use for the rest of that program. 3370c30f5000Smrg# 3371c30f5000Smrg# GNU Libtool is distributed in the hope that it will be useful, but 3372c30f5000Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3373c30f5000Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3374c30f5000Smrg# GNU General Public License for more details. 3375c30f5000Smrg# 3376c30f5000Smrg# You should have received a copy of the GNU General Public License 3377c30f5000Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3378c30f5000Smrg]) 337967ab2ff2Smrg 3380c30f5000Smrg# serial 59 LT_INIT 3381e0963edeSmrg 3382e0963edeSmrg 3383c30f5000Smrg# LT_PREREQ(VERSION) 3384c30f5000Smrg# ------------------ 3385c30f5000Smrg# Complain and exit if this libtool version is less that VERSION. 3386c30f5000Smrgm4_defun([LT_PREREQ], 3387c30f5000Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3388c30f5000Smrg [m4_default([$3], 3389c30f5000Smrg [m4_fatal([Libtool version $1 or higher is required], 3390c30f5000Smrg 63)])], 3391c30f5000Smrg [$2])]) 3392e0963edeSmrg 3393e0963edeSmrg 3394c30f5000Smrg# _LT_CHECK_BUILDDIR 3395c30f5000Smrg# ------------------ 3396c30f5000Smrg# Complain if the absolute build directory name contains unusual characters 3397c30f5000Smrgm4_defun([_LT_CHECK_BUILDDIR], 3398c30f5000Smrg[case `pwd` in 3399c30f5000Smrg *\ * | *\ *) 3400c30f5000Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3401b3a827e2Smrgesac 3402c30f5000Smrg]) 3403e0963edeSmrg 3404e0963edeSmrg 3405c30f5000Smrg# LT_INIT([OPTIONS]) 3406c30f5000Smrg# ------------------ 3407c30f5000SmrgAC_DEFUN([LT_INIT], 3408c30f5000Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3409c30f5000SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3410c30f5000SmrgAC_BEFORE([$0], [LT_LANG])dnl 3411c30f5000SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 3412c30f5000SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 3413c30f5000Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 341449e108a1Smrg 3415c30f5000Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 3416c30f5000Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3417c30f5000Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3418c30f5000Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3419c30f5000Smrgdnl unless we require an AC_DEFUNed macro: 3420c30f5000SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 3421c30f5000SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 3422c30f5000SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 3423c30f5000SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 3424c30f5000Smrgm4_require([_LT_PROG_LTMAIN])dnl 342549e108a1Smrg 3426c30f5000Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 342767ab2ff2Smrg 3428c30f5000Smrgdnl Parse OPTIONS 3429c30f5000Smrg_LT_SET_OPTIONS([$0], [$1]) 343067ab2ff2Smrg 3431c30f5000Smrg# This can be used to rebuild libtool when needed 3432c30f5000SmrgLIBTOOL_DEPS=$ltmain 343367ab2ff2Smrg 3434c30f5000Smrg# Always use our own libtool. 3435c30f5000SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 3436c30f5000SmrgAC_SUBST(LIBTOOL)dnl 3437e0963edeSmrg 3438c30f5000Smrg_LT_SETUP 3439e0963edeSmrg 3440c30f5000Smrg# Only expand once: 3441c30f5000Smrgm4_define([LT_INIT]) 3442c30f5000Smrg])# LT_INIT 3443e0963edeSmrg 3444c30f5000Smrg# Old names: 3445c30f5000SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3446c30f5000SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3447c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 3448c30f5000Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3449c30f5000Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 345067ab2ff2Smrg 345149e108a1Smrg 3452c30f5000Smrg# _LT_PREPARE_CC_BASENAME 3453c30f5000Smrg# ----------------------- 3454c30f5000Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 3455c30f5000Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3456c30f5000Smrgfunc_cc_basename () 3457c30f5000Smrg{ 3458c30f5000Smrg for cc_temp in @S|@*""; do 3459c30f5000Smrg case $cc_temp in 3460c30f5000Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3461c30f5000Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3462c30f5000Smrg \-*) ;; 3463c30f5000Smrg *) break;; 3464c30f5000Smrg esac 3465c30f5000Smrg done 3466c30f5000Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3467c30f5000Smrg} 3468c30f5000Smrg])# _LT_PREPARE_CC_BASENAME 3469e0963edeSmrg 3470e0963edeSmrg 3471c30f5000Smrg# _LT_CC_BASENAME(CC) 3472c30f5000Smrg# ------------------- 3473c30f5000Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3474c30f5000Smrg# but that macro is also expanded into generated libtool script, which 3475c30f5000Smrg# arranges for $SED and $ECHO to be set by different means. 3476c30f5000Smrgm4_defun([_LT_CC_BASENAME], 3477c30f5000Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3478c30f5000SmrgAC_REQUIRE([_LT_DECL_SED])dnl 3479c30f5000SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3480c30f5000Smrgfunc_cc_basename $1 3481c30f5000Smrgcc_basename=$func_cc_basename_result 3482c30f5000Smrg]) 3483e0963edeSmrg 3484e0963edeSmrg 3485c30f5000Smrg# _LT_FILEUTILS_DEFAULTS 3486c30f5000Smrg# ---------------------- 3487c30f5000Smrg# It is okay to use these file commands and assume they have been set 3488c30f5000Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3489c30f5000Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 3490c30f5000Smrg[: ${CP="cp -f"} 3491c30f5000Smrg: ${MV="mv -f"} 3492c30f5000Smrg: ${RM="rm -f"} 3493c30f5000Smrg])# _LT_FILEUTILS_DEFAULTS 3494e0963edeSmrg 3495e0963edeSmrg 3496c30f5000Smrg# _LT_SETUP 3497c30f5000Smrg# --------- 3498c30f5000Smrgm4_defun([_LT_SETUP], 3499c30f5000Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3500c30f5000SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3501c30f5000SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3502c30f5000SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3503e0963edeSmrg 3504c30f5000Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3505c30f5000Smrgdnl 3506c30f5000Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 3507c30f5000Smrg_LT_DECL([], [host], [0])dnl 3508c30f5000Smrg_LT_DECL([], [host_os], [0])dnl 3509c30f5000Smrgdnl 3510c30f5000Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 3511c30f5000Smrg_LT_DECL([], [build], [0])dnl 3512c30f5000Smrg_LT_DECL([], [build_os], [0])dnl 3513c30f5000Smrgdnl 3514c30f5000SmrgAC_REQUIRE([AC_PROG_CC])dnl 3515c30f5000SmrgAC_REQUIRE([LT_PATH_LD])dnl 3516c30f5000SmrgAC_REQUIRE([LT_PATH_NM])dnl 3517c30f5000Smrgdnl 3518c30f5000SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 3519c30f5000Smrgtest -z "$LN_S" && LN_S="ln -s" 3520c30f5000Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3521c30f5000Smrgdnl 3522c30f5000SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 3523c30f5000Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3524c30f5000Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3525c30f5000Smrgdnl 3526c30f5000Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3527c30f5000Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3528c30f5000Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3529c30f5000Smrgm4_require([_LT_CMD_RELOAD])dnl 3530c30f5000Smrgm4_require([_LT_DECL_FILECMD])dnl 3531c30f5000Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 3532c30f5000Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3533c30f5000Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 3534c30f5000Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3535c30f5000Smrgm4_require([_LT_WITH_SYSROOT])dnl 3536c30f5000Smrgm4_require([_LT_CMD_TRUNCATE])dnl 353749e108a1Smrg 3538c30f5000Smrg_LT_CONFIG_LIBTOOL_INIT([ 3539c30f5000Smrg# See if we are running on zsh, and set the options that allow our 3540c30f5000Smrg# commands through without removal of \ escapes INIT. 3541c30f5000Smrgif test -n "\${ZSH_VERSION+set}"; then 3542c30f5000Smrg setopt NO_GLOB_SUBST 3543c30f5000Smrgfi 3544c30f5000Smrg]) 3545c30f5000Smrgif test -n "${ZSH_VERSION+set}"; then 3546c30f5000Smrg setopt NO_GLOB_SUBST 3547c30f5000Smrgfi 354849e108a1Smrg 3549c30f5000Smrg_LT_CHECK_OBJDIR 355049e108a1Smrg 3551c30f5000Smrgm4_require([_LT_TAG_COMPILER])dnl 355249e108a1Smrg 355349e108a1Smrgcase $host_os in 3554c30f5000Smrgaix3*) 3555c30f5000Smrg # AIX sometimes has problems with the GCC collect2 program. For some 3556c30f5000Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 3557c30f5000Smrg # vanish in a puff of smoke. 3558c30f5000Smrg if test set != "${COLLECT_NAMES+set}"; then 3559c30f5000Smrg COLLECT_NAMES= 3560c30f5000Smrg export COLLECT_NAMES 3561c30f5000Smrg fi 3562c30f5000Smrg ;; 356349e108a1Smrgesac 3564e0963edeSmrg 3565c30f5000Smrg# Global variables: 3566c30f5000Smrgofile=libtool 3567c30f5000Smrgcan_build_shared=yes 3568e0963edeSmrg 3569c30f5000Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 3570c30f5000Smrg# ICC, which need '.lib'). 3571c30f5000Smrglibext=a 3572b3a827e2Smrg 3573c30f5000Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3574b3a827e2Smrg 3575c30f5000Smrgold_CC=$CC 3576c30f5000Smrgold_CFLAGS=$CFLAGS 3577b3a827e2Smrg 3578c30f5000Smrg# Set sane defaults for various variables 3579c30f5000Smrgtest -z "$CC" && CC=cc 3580c30f5000Smrgtest -z "$LTCC" && LTCC=$CC 3581c30f5000Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3582c30f5000Smrgtest -z "$LD" && LD=ld 3583c30f5000Smrgtest -z "$ac_objext" && ac_objext=o 3584e0963edeSmrg 3585c30f5000Smrg_LT_CC_BASENAME([$compiler]) 3586e0963edeSmrg 3587c30f5000Smrg# Only perform the check for file, if the check method requires it 3588c30f5000Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 3589c30f5000Smrgcase $deplibs_check_method in 3590c30f5000Smrgfile_magic*) 3591c30f5000Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3592c30f5000Smrg _LT_PATH_MAGIC 3593c30f5000Smrg fi 359449e108a1Smrg ;; 3595c30f5000Smrgesac 3596e0963edeSmrg 3597c30f5000Smrg# Use C for the default configuration in the libtool script 3598c30f5000SmrgLT_SUPPORTED_TAG([CC]) 3599c30f5000Smrg_LT_LANG_C_CONFIG 3600c30f5000Smrg_LT_LANG_DEFAULT_CONFIG 3601c30f5000Smrg_LT_CONFIG_COMMANDS 3602c30f5000Smrg])# _LT_SETUP 3603e0963edeSmrg 3604e0963edeSmrg 3605c30f5000Smrg# _LT_PREPARE_SED_QUOTE_VARS 3606c30f5000Smrg# -------------------------- 3607c30f5000Smrg# Define a few sed substitution that help us do robust quoting. 3608c30f5000Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3609c30f5000Smrg[# Backslashify metacharacters that are still active within 3610c30f5000Smrg# double-quoted strings. 3611c30f5000Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3612e0963edeSmrg 3613c30f5000Smrg# Same as above, but do not quote variable references. 3614c30f5000Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 3615e0963edeSmrg 3616c30f5000Smrg# Sed substitution to delay expansion of an escaped shell variable in a 3617c30f5000Smrg# double_quote_subst'ed string. 3618c30f5000Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3619e0963edeSmrg 3620c30f5000Smrg# Sed substitution to delay expansion of an escaped single quote. 3621c30f5000Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3622e0963edeSmrg 3623c30f5000Smrg# Sed substitution to avoid accidental globbing in evaled expressions 3624c30f5000Smrgno_glob_subst='s/\*/\\\*/g' 3625c30f5000Smrg]) 3626f05b35a2Smrg 3627c30f5000Smrg# _LT_PROG_LTMAIN 3628c30f5000Smrg# --------------- 3629c30f5000Smrg# Note that this code is called both from 'configure', and 'config.status' 3630c30f5000Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3631c30f5000Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3632c30f5000Smrg# so we pass a copy along to make sure it has a sensible value anyway. 3633c30f5000Smrgm4_defun([_LT_PROG_LTMAIN], 3634c30f5000Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3635c30f5000Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3636c30f5000Smrgltmain=$ac_aux_dir/ltmain.sh 3637c30f5000Smrg])# _LT_PROG_LTMAIN 3638e0963edeSmrg 3639e0963edeSmrg 3640e0963edeSmrg 3641c30f5000Smrg# So that we can recreate a full libtool script including additional 3642c30f5000Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3643c30f5000Smrg# in macros and then make a single call at the end using the 'libtool' 3644c30f5000Smrg# label. 3645e0963edeSmrg 3646e0963edeSmrg 3647c30f5000Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3648c30f5000Smrg# ---------------------------------------- 3649c30f5000Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3650c30f5000Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3651c30f5000Smrg[m4_ifval([$1], 3652c30f5000Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3653c30f5000Smrg [$1 3654c30f5000Smrg])])]) 3655e0963edeSmrg 3656c30f5000Smrg# Initialize. 3657c30f5000Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3658e0963edeSmrg 3659f05b35a2Smrg 3660c30f5000Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3661c30f5000Smrg# ------------------------------ 3662c30f5000Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3663c30f5000Smrgm4_define([_LT_CONFIG_LIBTOOL], 3664c30f5000Smrg[m4_ifval([$1], 3665c30f5000Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3666c30f5000Smrg [$1 3667c30f5000Smrg])])]) 3668f05b35a2Smrg 3669c30f5000Smrg# Initialize. 3670c30f5000Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3671f05b35a2Smrg 3672e0963edeSmrg 3673c30f5000Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3674c30f5000Smrg# ----------------------------------------------------- 3675c30f5000Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3676c30f5000Smrg[_LT_CONFIG_LIBTOOL([$1]) 3677c30f5000Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3678c30f5000Smrg]) 367949e108a1Smrg 3680e0963edeSmrg 3681c30f5000Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3682c30f5000Smrg# ----------------------------- 3683c30f5000Smrg# Add leading comment marks to the start of each line, and a trailing 3684c30f5000Smrg# full-stop to the whole comment if one is not present already. 3685c30f5000Smrgm4_define([_LT_FORMAT_COMMENT], 3686c30f5000Smrg[m4_ifval([$1], [ 3687c30f5000Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3688c30f5000Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3689c30f5000Smrg)]) 369067ab2ff2Smrg 369167ab2ff2Smrg 3692e0963edeSmrg 3693e0963edeSmrg 3694e0963edeSmrg 3695c30f5000Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3696c30f5000Smrg# ------------------------------------------------------------------- 3697c30f5000Smrg# CONFIGNAME is the name given to the value in the libtool script. 3698c30f5000Smrg# VARNAME is the (base) name used in the configure script. 3699c30f5000Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3700c30f5000Smrg# VARNAME. Any other value will be used directly. 3701c30f5000Smrgm4_define([_LT_DECL], 3702c30f5000Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3703c30f5000Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3704c30f5000Smrg [m4_ifval([$1], [$1], [$2])]) 3705c30f5000Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3706c30f5000Smrg m4_ifval([$4], 3707c30f5000Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3708c30f5000Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3709c30f5000Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3710c30f5000Smrg]) 371149e108a1Smrg 3712e0963edeSmrg 3713c30f5000Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3714c30f5000Smrg# -------------------------------------------------------- 3715c30f5000Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3716e0963edeSmrg 371767ab2ff2Smrg 3718c30f5000Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3719c30f5000Smrg# ------------------------------------------------ 3720c30f5000Smrgm4_define([lt_decl_tag_varnames], 3721c30f5000Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3722c30f5000Smrg 3723c30f5000Smrg 3724c30f5000Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3725c30f5000Smrg# --------------------------------------------------------- 3726c30f5000Smrgm4_define([_lt_decl_filter], 3727c30f5000Smrg[m4_case([$#], 3728c30f5000Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3729c30f5000Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3730c30f5000Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3731c30f5000Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3732c30f5000Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 373367ab2ff2Smrg]) 373467ab2ff2Smrg 373567ab2ff2Smrg 3736c30f5000Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3737c30f5000Smrg# -------------------------------------------------- 3738c30f5000Smrgm4_define([lt_decl_quote_varnames], 3739c30f5000Smrg[_lt_decl_filter([value], [1], $@)]) 374067ab2ff2Smrg 374167ab2ff2Smrg 3742c30f5000Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3743c30f5000Smrg# --------------------------------------------------- 3744c30f5000Smrgm4_define([lt_decl_dquote_varnames], 3745c30f5000Smrg[_lt_decl_filter([value], [2], $@)]) 3746e0963edeSmrg 3747b3a827e2Smrg 3748c30f5000Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3749c30f5000Smrg# --------------------------------------------------- 3750c30f5000Smrgm4_define([lt_decl_varnames_tagged], 3751c30f5000Smrg[m4_assert([$# <= 2])dnl 3752c30f5000Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 3753c30f5000Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3754c30f5000Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3755c30f5000Smrgm4_define([_lt_decl_varnames_tagged], 3756c30f5000Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3757b3a827e2Smrg 375849e108a1Smrg 3759c30f5000Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3760c30f5000Smrg# ------------------------------------------------ 3761c30f5000Smrgm4_define([lt_decl_all_varnames], 3762c30f5000Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3763c30f5000Smrg m4_if([$2], [], 3764c30f5000Smrg m4_quote(lt_decl_varnames), 3765c30f5000Smrg m4_quote(m4_shift($@))))[]dnl 3766c30f5000Smrg]) 3767c30f5000Smrgm4_define([_lt_decl_all_varnames], 3768c30f5000Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 3769c30f5000Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3770c30f5000Smrg]) 3771f05b35a2Smrg 3772e0963edeSmrg 3773c30f5000Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3774c30f5000Smrg# ------------------------------------ 3775c30f5000Smrg# Quote a variable value, and forward it to 'config.status' so that its 3776c30f5000Smrg# declaration there will have the same value as in 'configure'. VARNAME 3777c30f5000Smrg# must have a single quote delimited value for this to work. 3778c30f5000Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3779c30f5000Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3780e0963edeSmrg 3781f05b35a2Smrg 3782c30f5000Smrg# _LT_CONFIG_STATUS_DECLARATIONS 3783c30f5000Smrg# ------------------------------ 3784c30f5000Smrg# We delimit libtool config variables with single quotes, so when 3785c30f5000Smrg# we write them to config.status, we have to be sure to quote all 3786c30f5000Smrg# embedded single quotes properly. In configure, this macro expands 3787c30f5000Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3788c30f5000Smrg# 3789c30f5000Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3790c30f5000Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3791c30f5000Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3792c30f5000Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3793f05b35a2Smrg 3794f05b35a2Smrg 3795c30f5000Smrg# _LT_LIBTOOL_TAGS 3796c30f5000Smrg# ---------------- 3797c30f5000Smrg# Output comment and list of tags supported by the script 3798c30f5000Smrgm4_defun([_LT_LIBTOOL_TAGS], 3799c30f5000Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3800c30f5000Smrgavailable_tags='_LT_TAGS'dnl 3801c30f5000Smrg]) 3802f05b35a2Smrg 3803e0963edeSmrg 3804c30f5000Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3805c30f5000Smrg# ----------------------------------- 3806c30f5000Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3807c30f5000Smrg# expand to a commented shell variable setting: 3808c30f5000Smrg# 3809c30f5000Smrg# # Some comment about what VAR is for. 3810c30f5000Smrg# visible_name=$lt_internal_name 3811c30f5000Smrgm4_define([_LT_LIBTOOL_DECLARE], 3812c30f5000Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3813c30f5000Smrg [description])))[]dnl 3814c30f5000Smrgm4_pushdef([_libtool_name], 3815c30f5000Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3816c30f5000Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3817c30f5000Smrg [0], [_libtool_name=[$]$1], 3818c30f5000Smrg [1], [_libtool_name=$lt_[]$1], 3819c30f5000Smrg [2], [_libtool_name=$lt_[]$1], 3820c30f5000Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3821c30f5000Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3822c30f5000Smrg]) 3823e0963edeSmrg 3824e0963edeSmrg 3825c30f5000Smrg# _LT_LIBTOOL_CONFIG_VARS 3826c30f5000Smrg# ----------------------- 3827c30f5000Smrg# Produce commented declarations of non-tagged libtool config variables 3828c30f5000Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3829c30f5000Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3830c30f5000Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 3831c30f5000Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 3832c30f5000Smrg[m4_foreach([_lt_var], 3833c30f5000Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3834c30f5000Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3835e0963edeSmrg 3836e0963edeSmrg 3837c30f5000Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 3838c30f5000Smrg# ------------------------- 3839c30f5000Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 3840c30f5000Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3841c30f5000Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3842b3a827e2Smrg 3843e0963edeSmrg 3844c30f5000Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 3845c30f5000Smrg# ------------------------------ 3846c30f5000Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3847b3a827e2Smrg 3848e0963edeSmrg 3849c30f5000Smrg# _LT_CONFIG_COMMANDS 3850c30f5000Smrg# ------------------- 3851c30f5000Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3852c30f5000Smrg# variables for single and double quote escaping we saved from calls 3853c30f5000Smrg# to _LT_DECL, we can put quote escaped variables declarations 3854c30f5000Smrg# into 'config.status', and then the shell code to quote escape them in 3855c30f5000Smrg# for loops in 'config.status'. Finally, any additional code accumulated 3856c30f5000Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3857c30f5000Smrgm4_defun([_LT_CONFIG_COMMANDS], 3858c30f5000Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3859c30f5000Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3860c30f5000Smrg dnl instead of duplicating it all over again into config.status, 3861c30f5000Smrg dnl then we will have config.status run $CONFIG_LT later, so it 3862c30f5000Smrg dnl needs to know what name is stored there: 3863c30f5000Smrg [AC_CONFIG_COMMANDS([libtool], 3864c30f5000Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3865c30f5000Smrg dnl If the libtool generation code is destined for config.status, 3866c30f5000Smrg dnl expand the accumulated commands and init code now: 3867c30f5000Smrg [AC_CONFIG_COMMANDS([libtool], 3868c30f5000Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3869c30f5000Smrg])#_LT_CONFIG_COMMANDS 3870f05b35a2Smrg 3871e0963edeSmrg 3872c30f5000Smrg# Initialize. 3873c30f5000Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3874c30f5000Smrg[ 3875e0963edeSmrg 3876c30f5000Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3877c30f5000Smrg# if CDPATH is set. 3878c30f5000Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3879e0963edeSmrg 3880c30f5000Smrgsed_quote_subst='$sed_quote_subst' 3881c30f5000Smrgdouble_quote_subst='$double_quote_subst' 3882c30f5000Smrgdelay_variable_subst='$delay_variable_subst' 3883c30f5000Smrg_LT_CONFIG_STATUS_DECLARATIONS 3884c30f5000SmrgLTCC='$LTCC' 3885c30f5000SmrgLTCFLAGS='$LTCFLAGS' 3886c30f5000Smrgcompiler='$compiler_DEFAULT' 3887f05b35a2Smrg 3888c30f5000Smrg# A function that is used when there is no print builtin or printf. 3889c30f5000Smrgfunc_fallback_echo () 3890c30f5000Smrg{ 3891c30f5000Smrg eval 'cat <<_LTECHO_EOF 3892c30f5000Smrg\$[]1 3893c30f5000Smrg_LTECHO_EOF' 389449e108a1Smrg} 3895e0963edeSmrg 3896c30f5000Smrg# Quote evaled strings. 3897c30f5000Smrgfor var in lt_decl_all_varnames([[ \ 3898c30f5000Smrg]], lt_decl_quote_varnames); do 3899c30f5000Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3900c30f5000Smrg *[[\\\\\\\`\\"\\\$]]*) 3901c30f5000Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3902c30f5000Smrg ;; 3903c30f5000Smrg *) 3904c30f5000Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3905c30f5000Smrg ;; 3906c30f5000Smrg esac 3907c30f5000Smrgdone 390867ab2ff2Smrg 3909c30f5000Smrg# Double-quote double-evaled strings. 3910c30f5000Smrgfor var in lt_decl_all_varnames([[ \ 3911c30f5000Smrg]], lt_decl_dquote_varnames); do 3912c30f5000Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3913c30f5000Smrg *[[\\\\\\\`\\"\\\$]]*) 3914c30f5000Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3915c30f5000Smrg ;; 3916c30f5000Smrg *) 3917c30f5000Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3918c30f5000Smrg ;; 3919c30f5000Smrg esac 3920c30f5000Smrgdone 3921f05b35a2Smrg 3922c30f5000Smrg_LT_OUTPUT_LIBTOOL_INIT 3923c30f5000Smrg]) 3924f05b35a2Smrg 3925c30f5000Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3926c30f5000Smrg# ------------------------------------ 3927c30f5000Smrg# Generate a child script FILE with all initialization necessary to 3928c30f5000Smrg# reuse the environment learned by the parent script, and make the 3929c30f5000Smrg# file executable. If COMMENT is supplied, it is inserted after the 3930c30f5000Smrg# '#!' sequence but before initialization text begins. After this 3931c30f5000Smrg# macro, additional text can be appended to FILE to form the body of 3932c30f5000Smrg# the child script. The macro ends with non-zero status if the 3933c30f5000Smrg# file could not be fully written (such as if the disk is full). 3934c30f5000Smrgm4_ifdef([AS_INIT_GENERATED], 3935c30f5000Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3936c30f5000Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 3937c30f5000Smrg[m4_require([AS_PREPARE])]dnl 3938c30f5000Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3939c30f5000Smrg[lt_write_fail=0 3940c30f5000Smrgcat >$1 <<_ASEOF || lt_write_fail=1 3941c30f5000Smrg#! $SHELL 3942c30f5000Smrg# Generated by $as_me. 3943c30f5000Smrg$2 3944c30f5000SmrgSHELL=\${CONFIG_SHELL-$SHELL} 3945c30f5000Smrgexport SHELL 3946c30f5000Smrg_ASEOF 3947c30f5000Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 3948c30f5000SmrgAS_SHELL_SANITIZE 3949c30f5000Smrg_AS_PREPARE 3950c30f5000Smrgexec AS_MESSAGE_FD>&1 3951c30f5000Smrg_ASEOF 3952c30f5000Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 3953c30f5000Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 3954e0963edeSmrg 3955c30f5000Smrg# LT_OUTPUT 3956c30f5000Smrg# --------- 3957c30f5000Smrg# This macro allows early generation of the libtool script (before 3958c30f5000Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 3959c30f5000Smrg# tests. 3960c30f5000SmrgAC_DEFUN([LT_OUTPUT], 3961c30f5000Smrg[: ${CONFIG_LT=./config.lt} 3962c30f5000SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 3963c30f5000Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3964c30f5000Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 3965c30f5000Smrg 3966c30f5000Smrgcat >>"$CONFIG_LT" <<\_LTEOF 3967c30f5000Smrglt_cl_silent=false 3968c30f5000Smrgexec AS_MESSAGE_LOG_FD>>config.log 396949e108a1Smrg{ 3970c30f5000Smrg echo 3971c30f5000Smrg AS_BOX([Running $as_me.]) 3972c30f5000Smrg} >&AS_MESSAGE_LOG_FD 3973f05b35a2Smrg 3974c30f5000Smrglt_cl_help="\ 3975c30f5000Smrg'$as_me' creates a local libtool stub from the current configuration, 3976c30f5000Smrgfor use in further configure time tests before the real libtool is 3977c30f5000Smrggenerated. 3978e0963edeSmrg 3979c30f5000SmrgUsage: $[0] [[OPTIONS]] 3980e0963edeSmrg 3981c30f5000Smrg -h, --help print this help, then exit 3982c30f5000Smrg -V, --version print version number, then exit 3983c30f5000Smrg -q, --quiet do not print progress messages 3984c30f5000Smrg -d, --debug don't remove temporary files 3985e0963edeSmrg 3986c30f5000SmrgReport bugs to <bug-libtool@gnu.org>." 398767ab2ff2Smrg 3988c30f5000Smrglt_cl_version="\ 3989c30f5000Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3990c30f5000Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3991c30f5000Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 3992e0963edeSmrg 3993c30f5000SmrgCopyright (C) 2011 Free Software Foundation, Inc. 3994c30f5000SmrgThis config.lt script is free software; the Free Software Foundation 3995c30f5000Smrggives unlimited permision to copy, distribute and modify it." 3996e0963edeSmrg 3997c30f5000Smrgwhile test 0 != $[#] 3998c30f5000Smrgdo 3999c30f5000Smrg case $[1] in 4000c30f5000Smrg --version | --v* | -V ) 4001c30f5000Smrg echo "$lt_cl_version"; exit 0 ;; 4002c30f5000Smrg --help | --h* | -h ) 4003c30f5000Smrg echo "$lt_cl_help"; exit 0 ;; 4004c30f5000Smrg --debug | --d* | -d ) 4005c30f5000Smrg debug=: ;; 4006c30f5000Smrg --quiet | --q* | --silent | --s* | -q ) 4007c30f5000Smrg lt_cl_silent=: ;; 4008e0963edeSmrg 4009c30f5000Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4010c30f5000SmrgTry '$[0] --help' for more information.]) ;; 4011e0963edeSmrg 4012c30f5000Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4013c30f5000SmrgTry '$[0] --help' for more information.]) ;; 4014c30f5000Smrg esac 4015c30f5000Smrg shift 4016c30f5000Smrgdone 4017f05b35a2Smrg 4018c30f5000Smrgif $lt_cl_silent; then 4019c30f5000Smrg exec AS_MESSAGE_FD>/dev/null 4020c30f5000Smrgfi 4021c30f5000Smrg_LTEOF 4022e0963edeSmrg 4023c30f5000Smrgcat >>"$CONFIG_LT" <<_LTEOF 4024c30f5000Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4025c30f5000Smrg_LTEOF 402667ab2ff2Smrg 4027c30f5000Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4028c30f5000SmrgAC_MSG_NOTICE([creating $ofile]) 4029c30f5000Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 4030c30f5000SmrgAS_EXIT(0) 4031c30f5000Smrg_LTEOF 4032c30f5000Smrgchmod +x "$CONFIG_LT" 403367ab2ff2Smrg 4034c30f5000Smrg# configure is writing to config.log, but config.lt does its own redirection, 4035c30f5000Smrg# appending to config.log, which fails on DOS, as config.log is still kept 4036c30f5000Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4037c30f5000Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4038c30f5000Smrglt_cl_success=: 4039c30f5000Smrgtest yes = "$silent" && 4040c30f5000Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 4041c30f5000Smrgexec AS_MESSAGE_LOG_FD>/dev/null 4042c30f5000Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4043c30f5000Smrgexec AS_MESSAGE_LOG_FD>>config.log 4044c30f5000Smrg$lt_cl_success || AS_EXIT(1) 4045c30f5000Smrg])# LT_OUTPUT 404667ab2ff2Smrg 404767ab2ff2Smrg 4048c30f5000Smrg# _LT_CONFIG(TAG) 4049c30f5000Smrg# --------------- 4050c30f5000Smrg# If TAG is the built-in tag, create an initial libtool script with a 4051c30f5000Smrg# default configuration from the untagged config vars. Otherwise add code 4052c30f5000Smrg# to config.status for appending the configuration named by TAG from the 4053c30f5000Smrg# matching tagged config vars. 4054c30f5000Smrgm4_defun([_LT_CONFIG], 4055c30f5000Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4056c30f5000Smrg_LT_CONFIG_SAVE_COMMANDS([ 4057c30f5000Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4058c30f5000Smrg m4_if(_LT_TAG, [C], [ 4059c30f5000Smrg # See if we are running on zsh, and set the options that allow our 4060c30f5000Smrg # commands through without removal of \ escapes. 4061c30f5000Smrg if test -n "${ZSH_VERSION+set}"; then 4062c30f5000Smrg setopt NO_GLOB_SUBST 4063c30f5000Smrg fi 406467ab2ff2Smrg 4065c30f5000Smrg cfgfile=${ofile}T 4066c30f5000Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4067c30f5000Smrg $RM "$cfgfile" 4068c30f5000Smrg 4069c30f5000Smrg cat <<_LT_EOF >> "$cfgfile" 4070c30f5000Smrg#! $SHELL 4071c30f5000Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4072c30f5000Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4073c30f5000Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4074c30f5000Smrg 4075c30f5000Smrg# Provide generalized library-building support services. 4076c30f5000Smrg# Written by Gordon Matzigkeit, 1996 4077c30f5000Smrg 4078c30f5000Smrg_LT_COPYING 4079c30f5000Smrg_LT_LIBTOOL_TAGS 4080c30f5000Smrg 4081c30f5000Smrg# Configured defaults for sys_lib_dlsearch_path munging. 4082c30f5000Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4083c30f5000Smrg 4084c30f5000Smrg# ### BEGIN LIBTOOL CONFIG 4085c30f5000Smrg_LT_LIBTOOL_CONFIG_VARS 4086c30f5000Smrg_LT_LIBTOOL_TAG_VARS 4087c30f5000Smrg# ### END LIBTOOL CONFIG 408867ab2ff2Smrg 408967ab2ff2Smrg_LT_EOF 409067ab2ff2Smrg 4091c30f5000Smrg cat <<'_LT_EOF' >> "$cfgfile" 409267ab2ff2Smrg 4093c30f5000Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4094c30f5000Smrg 4095c30f5000Smrg_LT_PREPARE_MUNGE_PATH_LIST 4096c30f5000Smrg_LT_PREPARE_CC_BASENAME 4097c30f5000Smrg 4098c30f5000Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 409967ab2ff2Smrg 410067ab2ff2Smrg_LT_EOF 410167ab2ff2Smrg 4102c30f5000Smrg case $host_os in 4103c30f5000Smrg aix3*) 4104c30f5000Smrg cat <<\_LT_EOF >> "$cfgfile" 4105c30f5000Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4106c30f5000Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4107c30f5000Smrg# vanish in a puff of smoke. 4108c30f5000Smrgif test set != "${COLLECT_NAMES+set}"; then 4109c30f5000Smrg COLLECT_NAMES= 4110c30f5000Smrg export COLLECT_NAMES 4111c30f5000Smrgfi 4112c30f5000Smrg_LT_EOF 4113c30f5000Smrg ;; 4114c30f5000Smrg esac 411567ab2ff2Smrg 4116c30f5000Smrg _LT_PROG_LTMAIN 4117e0963edeSmrg 4118c30f5000Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4119c30f5000Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4120c30f5000Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4121c30f5000Smrg # is reportedly fixed, but why not run on old versions too? 4122c30f5000Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4123c30f5000Smrg || (rm -f "$cfgfile"; exit 1) 412467ab2ff2Smrg 4125c30f5000Smrg mv -f "$cfgfile" "$ofile" || 4126c30f5000Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4127c30f5000Smrg chmod +x "$ofile" 4128c30f5000Smrg], 4129c30f5000Smrg[cat <<_LT_EOF >> "$ofile" 413067ab2ff2Smrg 4131c30f5000Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4132c30f5000Smrgdnl in a comment (ie after a #). 4133c30f5000Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4134c30f5000Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4135c30f5000Smrg# ### END LIBTOOL TAG CONFIG: $1 4136c30f5000Smrg_LT_EOF 4137c30f5000Smrg])dnl /m4_if 4138c30f5000Smrg], 4139c30f5000Smrg[m4_if([$1], [], [ 4140c30f5000Smrg PACKAGE='$PACKAGE' 4141c30f5000Smrg VERSION='$VERSION' 4142c30f5000Smrg RM='$RM' 4143c30f5000Smrg ofile='$ofile'], []) 4144c30f5000Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4145c30f5000Smrg])# _LT_CONFIG 414667ab2ff2Smrg 414767ab2ff2Smrg 4148c30f5000Smrg# LT_SUPPORTED_TAG(TAG) 4149c30f5000Smrg# --------------------- 4150c30f5000Smrg# Trace this macro to discover what tags are supported by the libtool 4151c30f5000Smrg# --tag option, using: 4152c30f5000Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4153c30f5000SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 415467ab2ff2Smrg 415567ab2ff2Smrg 4156c30f5000Smrg# C support is built-in for now 4157c30f5000Smrgm4_define([_LT_LANG_C_enabled], []) 4158c30f5000Smrgm4_define([_LT_TAGS], []) 415967ab2ff2Smrg 4160e0963edeSmrg 4161c30f5000Smrg# LT_LANG(LANG) 4162c30f5000Smrg# ------------- 4163c30f5000Smrg# Enable libtool support for the given language if not already enabled. 4164c30f5000SmrgAC_DEFUN([LT_LANG], 4165c30f5000Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4166c30f5000Smrgm4_case([$1], 4167c30f5000Smrg [C], [_LT_LANG(C)], 4168c30f5000Smrg [C++], [_LT_LANG(CXX)], 4169c30f5000Smrg [Go], [_LT_LANG(GO)], 4170c30f5000Smrg [Java], [_LT_LANG(GCJ)], 4171c30f5000Smrg [Fortran 77], [_LT_LANG(F77)], 4172c30f5000Smrg [Fortran], [_LT_LANG(FC)], 4173c30f5000Smrg [Windows Resource], [_LT_LANG(RC)], 4174c30f5000Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4175c30f5000Smrg [_LT_LANG($1)], 4176c30f5000Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4177c30f5000Smrg])# LT_LANG 4178f05b35a2Smrg 417967ab2ff2Smrg 4180c30f5000Smrg# _LT_LANG(LANGNAME) 4181c30f5000Smrg# ------------------ 4182c30f5000Smrgm4_defun([_LT_LANG], 4183c30f5000Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4184c30f5000Smrg [LT_SUPPORTED_TAG([$1])dnl 4185c30f5000Smrg m4_append([_LT_TAGS], [$1 ])dnl 4186c30f5000Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4187c30f5000Smrg _LT_LANG_$1_CONFIG($1)])dnl 4188c30f5000Smrg])# _LT_LANG 4189c30f5000Smrg 4190c30f5000Smrg 4191c30f5000Smrgm4_ifndef([AC_PROG_GO], [ 4192c30f5000Smrg# NOTE: This macro has been submitted for inclusion into # 4193c30f5000Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4194c30f5000Smrg# a released version of Autoconf we should remove this # 4195c30f5000Smrg# macro and use it instead. # 4196c30f5000Smrgm4_defun([AC_PROG_GO], 4197c30f5000Smrg[AC_LANG_PUSH(Go)dnl 4198c30f5000SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4199c30f5000SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4200c30f5000Smrg_AC_ARG_VAR_LDFLAGS()dnl 4201c30f5000SmrgAC_CHECK_TOOL(GOC, gccgo) 4202c30f5000Smrgif test -z "$GOC"; then 4203c30f5000Smrg if test -n "$ac_tool_prefix"; then 4204c30f5000Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4205c30f5000Smrg fi 4206c30f5000Smrgfi 4207c30f5000Smrgif test -z "$GOC"; then 4208c30f5000Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4209c30f5000Smrgfi 4210c30f5000Smrg])#m4_defun 4211c30f5000Smrg])#m4_ifndef 4212e0963edeSmrg 4213f05b35a2Smrg 4214c30f5000Smrg# _LT_LANG_DEFAULT_CONFIG 4215c30f5000Smrg# ----------------------- 4216c30f5000Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4217c30f5000Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4218c30f5000Smrg [LT_LANG(CXX)], 4219c30f5000Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4220e0963edeSmrg 4221c30f5000SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4222c30f5000Smrg [LT_LANG(F77)], 4223c30f5000Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4224e0963edeSmrg 4225c30f5000SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4226c30f5000Smrg [LT_LANG(FC)], 4227c30f5000Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4228f05b35a2Smrg 4229c30f5000Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4230c30f5000Smrgdnl pulling things in needlessly. 4231c30f5000SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4232c30f5000Smrg [LT_LANG(GCJ)], 4233c30f5000Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4234c30f5000Smrg [LT_LANG(GCJ)], 4235c30f5000Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4236c30f5000Smrg [LT_LANG(GCJ)], 4237c30f5000Smrg [m4_ifdef([AC_PROG_GCJ], 4238c30f5000Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4239c30f5000Smrg m4_ifdef([A][M_PROG_GCJ], 4240c30f5000Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4241c30f5000Smrg m4_ifdef([LT_PROG_GCJ], 4242c30f5000Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 424367ab2ff2Smrg 4244c30f5000SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4245c30f5000Smrg [LT_LANG(GO)], 4246c30f5000Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4247f05b35a2Smrg 4248c30f5000SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4249c30f5000Smrg [LT_LANG(RC)], 4250c30f5000Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4251c30f5000Smrg])# _LT_LANG_DEFAULT_CONFIG 4252f05b35a2Smrg 4253c30f5000Smrg# Obsolete macros: 4254c30f5000SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4255c30f5000SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4256c30f5000SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4257c30f5000SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4258c30f5000SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4259c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 4260c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4261c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4262c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4263c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4264c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 4265e0963edeSmrg 4266e0963edeSmrg 4267c30f5000Smrg# _LT_TAG_COMPILER 4268c30f5000Smrg# ---------------- 4269c30f5000Smrgm4_defun([_LT_TAG_COMPILER], 4270c30f5000Smrg[AC_REQUIRE([AC_PROG_CC])dnl 427167ab2ff2Smrg 4272c30f5000Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4273c30f5000Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4274c30f5000Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4275c30f5000Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 427667ab2ff2Smrg 4277c30f5000Smrg# If no C compiler was specified, use CC. 4278c30f5000SmrgLTCC=${LTCC-"$CC"} 427967ab2ff2Smrg 4280c30f5000Smrg# If no C compiler flags were specified, use CFLAGS. 4281c30f5000SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4282b3a827e2Smrg 4283c30f5000Smrg# Allow CC to be a program name with arguments. 4284c30f5000Smrgcompiler=$CC 4285c30f5000Smrg])# _LT_TAG_COMPILER 4286c30f5000Smrg 4287c30f5000Smrg 4288c30f5000Smrg# _LT_COMPILER_BOILERPLATE 4289c30f5000Smrg# ------------------------ 4290c30f5000Smrg# Check for compiler boilerplate output or warnings with 4291c30f5000Smrg# the simple compiler test code. 4292c30f5000Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 4293c30f5000Smrg[m4_require([_LT_DECL_SED])dnl 4294c30f5000Smrgac_outfile=conftest.$ac_objext 4295c30f5000Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4296c30f5000Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4297c30f5000Smrg_lt_compiler_boilerplate=`cat conftest.err` 4298c30f5000Smrg$RM conftest* 4299c30f5000Smrg])# _LT_COMPILER_BOILERPLATE 4300e0963edeSmrg 4301e0963edeSmrg 4302c30f5000Smrg# _LT_LINKER_BOILERPLATE 4303c30f5000Smrg# ---------------------- 4304c30f5000Smrg# Check for linker boilerplate output or warnings with 4305c30f5000Smrg# the simple link test code. 4306c30f5000Smrgm4_defun([_LT_LINKER_BOILERPLATE], 4307c30f5000Smrg[m4_require([_LT_DECL_SED])dnl 4308c30f5000Smrgac_outfile=conftest.$ac_objext 4309c30f5000Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4310c30f5000Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4311c30f5000Smrg_lt_linker_boilerplate=`cat conftest.err` 4312c30f5000Smrg$RM -r conftest* 4313c30f5000Smrg])# _LT_LINKER_BOILERPLATE 4314e0963edeSmrg 4315c30f5000Smrg# _LT_REQUIRED_DARWIN_CHECKS 4316c30f5000Smrg# ------------------------- 4317c30f5000Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4318c30f5000Smrg case $host_os in 4319c30f5000Smrg rhapsody* | darwin*) 4320c30f5000Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4321c30f5000Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4322c30f5000Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4323c30f5000Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4324c30f5000Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4325c30f5000Smrg _LT_DECL([], [DSYMUTIL], [1], 4326c30f5000Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4327c30f5000Smrg _LT_DECL([], [NMEDIT], [1], 4328c30f5000Smrg [Tool to change global to local symbols on Mac OS X]) 4329c30f5000Smrg _LT_DECL([], [LIPO], [1], 4330c30f5000Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 4331c30f5000Smrg _LT_DECL([], [OTOOL], [1], 4332c30f5000Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4333c30f5000Smrg _LT_DECL([], [OTOOL64], [1], 4334c30f5000Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4335c30f5000Smrg 4336c30f5000Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4337c30f5000Smrg [lt_cv_apple_cc_single_mod=no 4338c30f5000Smrg if test -z "$LT_MULTI_MODULE"; then 4339c30f5000Smrg # By default we will add the -single_module flag. You can override 4340c30f5000Smrg # by either setting the environment variable LT_MULTI_MODULE 4341c30f5000Smrg # non-empty at configure time, or by adding -multi_module to the 4342c30f5000Smrg # link flags. 4343c30f5000Smrg rm -rf libconftest.dylib* 4344c30f5000Smrg echo "int foo(void){return 1;}" > conftest.c 4345c30f5000Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4346c30f5000Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4347c30f5000Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4348c30f5000Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4349c30f5000Smrg _lt_result=$? 4350c30f5000Smrg # If there is a non-empty error log, and "single_module" 4351c30f5000Smrg # appears in it, assume the flag caused a linker warning 4352c30f5000Smrg if test -s conftest.err && $GREP single_module conftest.err; then 4353c30f5000Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4354c30f5000Smrg # Otherwise, if the output was created with a 0 exit code from 4355c30f5000Smrg # the compiler, it worked. 4356c30f5000Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4357c30f5000Smrg lt_cv_apple_cc_single_mod=yes 435867ab2ff2Smrg else 4359c30f5000Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 436067ab2ff2Smrg fi 4361c30f5000Smrg rm -rf libconftest.dylib* 4362c30f5000Smrg rm -f conftest.* 4363c30f5000Smrg fi]) 4364e0963edeSmrg 4365c30f5000Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4366c30f5000Smrg [lt_cv_ld_exported_symbols_list], 4367c30f5000Smrg [lt_cv_ld_exported_symbols_list=no 4368c30f5000Smrg save_LDFLAGS=$LDFLAGS 4369c30f5000Smrg echo "_main" > conftest.sym 4370c30f5000Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4371c30f5000Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4372c30f5000Smrg [lt_cv_ld_exported_symbols_list=yes], 4373c30f5000Smrg [lt_cv_ld_exported_symbols_list=no]) 4374c30f5000Smrg LDFLAGS=$save_LDFLAGS 4375c30f5000Smrg ]) 437667ab2ff2Smrg 4377c30f5000Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4378c30f5000Smrg [lt_cv_ld_force_load=no 4379c30f5000Smrg cat > conftest.c << _LT_EOF 4380c30f5000Smrgint forced_loaded() { return 2;} 4381c30f5000Smrg_LT_EOF 4382c30f5000Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4383c30f5000Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4384c30f5000Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4385c30f5000Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4386c30f5000Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4387c30f5000Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4388c30f5000Smrg cat > conftest.c << _LT_EOF 4389c30f5000Smrgint main() { return 0;} 4390c30f5000Smrg_LT_EOF 4391c30f5000Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4392c30f5000Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4393c30f5000Smrg _lt_result=$? 4394c30f5000Smrg if test -s conftest.err && $GREP force_load conftest.err; then 4395c30f5000Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4396c30f5000Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4397c30f5000Smrg lt_cv_ld_force_load=yes 439867ab2ff2Smrg else 4399c30f5000Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 440067ab2ff2Smrg fi 4401c30f5000Smrg rm -f conftest.err libconftest.a conftest conftest.c 4402c30f5000Smrg rm -rf conftest.dSYM 4403c30f5000Smrg ]) 4404c30f5000Smrg case $host_os in 4405c30f5000Smrg rhapsody* | darwin1.[[012]]) 4406c30f5000Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4407c30f5000Smrg darwin1.*) 4408c30f5000Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4409c30f5000Smrg darwin*) 4410c30f5000Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 4411c30f5000Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4412c30f5000Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4413c30f5000Smrg *) 4414c30f5000Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4415c30f5000Smrg esac 4416c30f5000Smrg ;; 4417c30f5000Smrg esac 4418c30f5000Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 4419c30f5000Smrg _lt_dar_single_mod='$single_module' 4420c30f5000Smrg fi 4421c30f5000Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 4422c30f5000Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4423c30f5000Smrg else 4424c30f5000Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4425c30f5000Smrg fi 4426c30f5000Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4427c30f5000Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 4428c30f5000Smrg else 4429c30f5000Smrg _lt_dsymutil= 4430c30f5000Smrg fi 4431c30f5000Smrg ;; 4432c30f5000Smrg esac 4433c30f5000Smrg]) 4434c30f5000Smrg 4435c30f5000Smrg 4436c30f5000Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 4437c30f5000Smrg# --------------------------------- 4438c30f5000Smrg# Checks for linker and compiler features on darwin 4439c30f5000Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 4440c30f5000Smrg[ 4441c30f5000Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4442c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4443c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4444c30f5000Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 4445c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4446c30f5000Smrg if test yes = "$lt_cv_ld_force_load"; then 4447c30f5000Smrg _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\"`' 4448c30f5000Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4449c30f5000Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4450c30f5000Smrg else 4451c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4452c30f5000Smrg fi 4453c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4454c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4455c30f5000Smrg case $cc_basename in 4456c30f5000Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4457c30f5000Smrg *) _lt_dar_can_shared=$GCC ;; 4458c30f5000Smrg esac 4459c30f5000Smrg if test yes = "$_lt_dar_can_shared"; then 4460c30f5000Smrg output_verbose_link_cmd=func_echo_all 4461c30f5000Smrg _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" 4462c30f5000Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4463c30f5000Smrg _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" 4464c30f5000Smrg _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" 4465c30f5000Smrg m4_if([$1], [CXX], 4466c30f5000Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4467c30f5000Smrg _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" 4468c30f5000Smrg _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" 4469c30f5000Smrg fi 4470c30f5000Smrg],[]) 4471c30f5000Smrg else 4472c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4473c30f5000Smrg fi 4474c30f5000Smrg]) 4475c30f5000Smrg 4476c30f5000Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4477c30f5000Smrg# ---------------------------------- 4478c30f5000Smrg# Links a minimal program and checks the executable 4479c30f5000Smrg# for the system default hardcoded library path. In most cases, 4480c30f5000Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 4481c30f5000Smrg# the location of the communication and MPI libs are included too. 4482c30f5000Smrg# If we don't find anything, use the default library path according 4483c30f5000Smrg# to the aix ld manual. 4484c30f5000Smrg# Store the results from the different compilers for each TAGNAME. 4485c30f5000Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 4486c30f5000Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 4487c30f5000Smrg[m4_require([_LT_DECL_SED])dnl 4488c30f5000Smrgif test set = "${lt_cv_aix_libpath+set}"; then 4489c30f5000Smrg aix_libpath=$lt_cv_aix_libpath 4490c30f5000Smrgelse 4491c30f5000Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4492c30f5000Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4493c30f5000Smrg lt_aix_libpath_sed='[ 4494c30f5000Smrg /Import File Strings/,/^$/ { 4495c30f5000Smrg /^0/ { 4496c30f5000Smrg s/^0 *\([^ ]*\) *$/\1/ 4497c30f5000Smrg p 4498c30f5000Smrg } 4499c30f5000Smrg }]' 4500c30f5000Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4501c30f5000Smrg # Check for a 64-bit object if we didn't find anything. 4502c30f5000Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4503c30f5000Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4504c30f5000Smrg fi],[]) 4505c30f5000Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4506c30f5000Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4507c30f5000Smrg fi 4508c30f5000Smrg ]) 4509c30f5000Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4510c30f5000Smrgfi 4511c30f5000Smrg])# _LT_SYS_MODULE_PATH_AIX 451267ab2ff2Smrg 451367ab2ff2Smrg 4514c30f5000Smrg# _LT_SHELL_INIT(ARG) 4515c30f5000Smrg# ------------------- 4516c30f5000Smrgm4_define([_LT_SHELL_INIT], 4517c30f5000Smrg[m4_divert_text([M4SH-INIT], [$1 4518c30f5000Smrg])])# _LT_SHELL_INIT 4519e0963edeSmrg 4520e0963edeSmrg 4521f05b35a2Smrg 4522c30f5000Smrg# _LT_PROG_ECHO_BACKSLASH 4523c30f5000Smrg# ----------------------- 4524c30f5000Smrg# Find how we can fake an echo command that does not interpret backslash. 4525c30f5000Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 4526c30f5000Smrg# of the generated configure script that will find a shell with a builtin 4527c30f5000Smrg# printf (that we can use as an echo command). 4528c30f5000Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 4529c30f5000Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4530c30f5000SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4531c30f5000SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 453267ab2ff2Smrg 4533c30f5000SmrgAC_MSG_CHECKING([how to print strings]) 4534c30f5000Smrg# Test print first, because it will be a builtin if present. 4535c30f5000Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4536c30f5000Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4537c30f5000Smrg ECHO='print -r --' 4538c30f5000Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4539c30f5000Smrg ECHO='printf %s\n' 4540c30f5000Smrgelse 4541c30f5000Smrg # Use this function as a fallback that always works. 4542c30f5000Smrg func_fallback_echo () 4543c30f5000Smrg { 4544c30f5000Smrg eval 'cat <<_LTECHO_EOF 4545c30f5000Smrg$[]1 4546c30f5000Smrg_LTECHO_EOF' 4547c30f5000Smrg } 4548c30f5000Smrg ECHO='func_fallback_echo' 4549c30f5000Smrgfi 4550f05b35a2Smrg 4551c30f5000Smrg# func_echo_all arg... 4552c30f5000Smrg# Invoke $ECHO with all args, space-separated. 4553c30f5000Smrgfunc_echo_all () 4554c30f5000Smrg{ 4555c30f5000Smrg $ECHO "$*" 4556c30f5000Smrg} 4557f05b35a2Smrg 4558c30f5000Smrgcase $ECHO in 4559c30f5000Smrg printf*) AC_MSG_RESULT([printf]) ;; 4560c30f5000Smrg print*) AC_MSG_RESULT([print -r]) ;; 4561c30f5000Smrg *) AC_MSG_RESULT([cat]) ;; 4562c30f5000Smrgesac 456367ab2ff2Smrg 4564c30f5000Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 4565c30f5000Smrg[_AS_DETECT_SUGGESTED([ 4566c30f5000Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4567c30f5000Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4568c30f5000Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4569c30f5000Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4570c30f5000Smrg PATH=/empty FPATH=/empty; export PATH FPATH 4571c30f5000Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 4572c30f5000Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4573f05b35a2Smrg 4574c30f5000Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4575c30f5000Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4576c30f5000Smrg])# _LT_PROG_ECHO_BACKSLASH 457767ab2ff2Smrg 4578e0963edeSmrg 4579c30f5000Smrg# _LT_WITH_SYSROOT 4580c30f5000Smrg# ---------------- 4581c30f5000SmrgAC_DEFUN([_LT_WITH_SYSROOT], 4582c30f5000Smrg[m4_require([_LT_DECL_SED])dnl 4583c30f5000SmrgAC_MSG_CHECKING([for sysroot]) 4584c30f5000SmrgAC_ARG_WITH([sysroot], 4585c30f5000Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4586c30f5000Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 4587c30f5000Smrg if not specified).])], 4588c30f5000Smrg[], [with_sysroot=no]) 458967ab2ff2Smrg 4590c30f5000Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 4591c30f5000Smrgdnl in case the user passed a directory name. 4592c30f5000Smrglt_sysroot= 4593c30f5000Smrgcase $with_sysroot in #( 4594c30f5000Smrg yes) 4595c30f5000Smrg if test yes = "$GCC"; then 4596c30f5000Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4597c30f5000Smrg fi 4598c30f5000Smrg ;; #( 4599c30f5000Smrg /*) 4600c30f5000Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4601c30f5000Smrg ;; #( 4602c30f5000Smrg no|'') 4603c30f5000Smrg ;; #( 4604c30f5000Smrg *) 4605c30f5000Smrg AC_MSG_RESULT([$with_sysroot]) 4606c30f5000Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 4607c30f5000Smrg ;; 4608c30f5000Smrgesac 4609c30f5000Smrg 4610c30f5000Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 4611c30f5000Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4612c30f5000Smrg[dependent libraries, and where our libraries should be installed.])]) 4613c30f5000Smrg 4614c30f5000Smrg# _LT_ENABLE_LOCK 4615c30f5000Smrg# --------------- 4616c30f5000Smrgm4_defun([_LT_ENABLE_LOCK], 4617c30f5000Smrg[AC_ARG_ENABLE([libtool-lock], 4618c30f5000Smrg [AS_HELP_STRING([--disable-libtool-lock], 4619c30f5000Smrg [avoid locking (might break parallel builds)])]) 4620c30f5000Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 4621c30f5000Smrg 4622c30f5000Smrg# Some flags need to be propagated to the compiler or linker for good 4623c30f5000Smrg# libtool support. 4624c30f5000Smrgcase $host in 4625c30f5000Smrgia64-*-hpux*) 4626c30f5000Smrg # Find out what ABI is being produced by ac_compile, and set mode 4627c30f5000Smrg # options accordingly. 4628c30f5000Smrg echo 'int i;' > conftest.$ac_ext 4629c30f5000Smrg if AC_TRY_EVAL(ac_compile); then 4630c30f5000Smrg case `$FILECMD conftest.$ac_objext` in 4631c30f5000Smrg *ELF-32*) 4632c30f5000Smrg HPUX_IA64_MODE=32 4633c30f5000Smrg ;; 4634c30f5000Smrg *ELF-64*) 4635c30f5000Smrg HPUX_IA64_MODE=64 4636c30f5000Smrg ;; 463767ab2ff2Smrg esac 4638c30f5000Smrg fi 4639c30f5000Smrg rm -rf conftest* 4640c30f5000Smrg ;; 4641c30f5000Smrg*-*-irix6*) 4642c30f5000Smrg # Find out what ABI is being produced by ac_compile, and set linker 4643c30f5000Smrg # options accordingly. 4644c30f5000Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4645c30f5000Smrg if AC_TRY_EVAL(ac_compile); then 4646c30f5000Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 4647c30f5000Smrg case `$FILECMD conftest.$ac_objext` in 4648c30f5000Smrg *32-bit*) 4649c30f5000Smrg LD="${LD-ld} -melf32bsmip" 4650c30f5000Smrg ;; 4651c30f5000Smrg *N32*) 4652c30f5000Smrg LD="${LD-ld} -melf32bmipn32" 4653c30f5000Smrg ;; 4654c30f5000Smrg *64-bit*) 4655c30f5000Smrg LD="${LD-ld} -melf64bmip" 465667ab2ff2Smrg ;; 465767ab2ff2Smrg esac 4658c30f5000Smrg else 4659c30f5000Smrg case `$FILECMD conftest.$ac_objext` in 4660c30f5000Smrg *32-bit*) 4661c30f5000Smrg LD="${LD-ld} -32" 4662c30f5000Smrg ;; 4663c30f5000Smrg *N32*) 4664c30f5000Smrg LD="${LD-ld} -n32" 4665c30f5000Smrg ;; 4666c30f5000Smrg *64-bit*) 4667c30f5000Smrg LD="${LD-ld} -64" 4668c30f5000Smrg ;; 4669c30f5000Smrg esac 467067ab2ff2Smrg fi 467167ab2ff2Smrg fi 4672c30f5000Smrg rm -rf conftest* 4673c30f5000Smrg ;; 4674e0963edeSmrg 4675c30f5000Smrgmips64*-*linux*) 4676c30f5000Smrg # Find out what ABI is being produced by ac_compile, and set linker 4677c30f5000Smrg # options accordingly. 4678c30f5000Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4679c30f5000Smrg if AC_TRY_EVAL(ac_compile); then 4680c30f5000Smrg emul=elf 4681c30f5000Smrg case `$FILECMD conftest.$ac_objext` in 4682c30f5000Smrg *32-bit*) 4683c30f5000Smrg emul="${emul}32" 4684c30f5000Smrg ;; 4685c30f5000Smrg *64-bit*) 4686c30f5000Smrg emul="${emul}64" 4687c30f5000Smrg ;; 4688c30f5000Smrg esac 4689c30f5000Smrg case `$FILECMD conftest.$ac_objext` in 4690c30f5000Smrg *MSB*) 4691c30f5000Smrg emul="${emul}btsmip" 4692c30f5000Smrg ;; 4693c30f5000Smrg *LSB*) 4694c30f5000Smrg emul="${emul}ltsmip" 4695c30f5000Smrg ;; 469649e108a1Smrg esac 4697c30f5000Smrg case `$FILECMD conftest.$ac_objext` in 4698c30f5000Smrg *N32*) 4699c30f5000Smrg emul="${emul}n32" 4700c30f5000Smrg ;; 4701c30f5000Smrg esac 4702c30f5000Smrg LD="${LD-ld} -m $emul" 470349e108a1Smrg fi 4704c30f5000Smrg rm -rf conftest* 470567ab2ff2Smrg ;; 4706e0963edeSmrg 4707c30f5000Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4708c30f5000Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4709c30f5000Smrg # Find out what ABI is being produced by ac_compile, and set linker 4710c30f5000Smrg # options accordingly. Note that the listed cases only cover the 4711c30f5000Smrg # situations where additional linker options are needed (such as when 4712c30f5000Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4713c30f5000Smrg # vice versa); the common cases where no linker options are needed do 4714c30f5000Smrg # not appear in the list. 4715c30f5000Smrg echo 'int i;' > conftest.$ac_ext 4716c30f5000Smrg if AC_TRY_EVAL(ac_compile); then 4717c30f5000Smrg case `$FILECMD conftest.o` in 4718c30f5000Smrg *32-bit*) 4719c30f5000Smrg case $host in 4720c30f5000Smrg x86_64-*kfreebsd*-gnu) 4721c30f5000Smrg LD="${LD-ld} -m elf_i386_fbsd" 4722c30f5000Smrg ;; 4723c30f5000Smrg x86_64-*linux*) 4724c30f5000Smrg case `$FILECMD conftest.o` in 4725c30f5000Smrg *x86-64*) 4726c30f5000Smrg LD="${LD-ld} -m elf32_x86_64" 4727c30f5000Smrg ;; 4728c30f5000Smrg *) 4729c30f5000Smrg LD="${LD-ld} -m elf_i386" 4730c30f5000Smrg ;; 4731c30f5000Smrg esac 4732c30f5000Smrg ;; 4733c30f5000Smrg powerpc64le-*linux*) 4734c30f5000Smrg LD="${LD-ld} -m elf32lppclinux" 4735c30f5000Smrg ;; 4736c30f5000Smrg powerpc64-*linux*) 4737c30f5000Smrg LD="${LD-ld} -m elf32ppclinux" 4738c30f5000Smrg ;; 4739c30f5000Smrg s390x-*linux*) 4740c30f5000Smrg LD="${LD-ld} -m elf_s390" 4741c30f5000Smrg ;; 4742c30f5000Smrg sparc64-*linux*) 4743c30f5000Smrg LD="${LD-ld} -m elf32_sparc" 4744c30f5000Smrg ;; 4745c30f5000Smrg esac 4746c30f5000Smrg ;; 4747c30f5000Smrg *64-bit*) 4748c30f5000Smrg case $host in 4749c30f5000Smrg x86_64-*kfreebsd*-gnu) 4750c30f5000Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 4751c30f5000Smrg ;; 4752c30f5000Smrg x86_64-*linux*) 4753c30f5000Smrg LD="${LD-ld} -m elf_x86_64" 4754c30f5000Smrg ;; 4755c30f5000Smrg powerpcle-*linux*) 4756c30f5000Smrg LD="${LD-ld} -m elf64lppc" 4757c30f5000Smrg ;; 4758c30f5000Smrg powerpc-*linux*) 4759c30f5000Smrg LD="${LD-ld} -m elf64ppc" 4760c30f5000Smrg ;; 4761c30f5000Smrg s390*-*linux*|s390*-*tpf*) 4762c30f5000Smrg LD="${LD-ld} -m elf64_s390" 4763c30f5000Smrg ;; 4764c30f5000Smrg sparc*-*linux*) 4765c30f5000Smrg LD="${LD-ld} -m elf64_sparc" 4766c30f5000Smrg ;; 4767c30f5000Smrg esac 4768c30f5000Smrg ;; 4769c30f5000Smrg esac 4770c30f5000Smrg fi 4771c30f5000Smrg rm -rf conftest* 4772c30f5000Smrg ;; 4773e0963edeSmrg 4774c30f5000Smrg*-*-sco3.2v5*) 4775c30f5000Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4776c30f5000Smrg SAVE_CFLAGS=$CFLAGS 4777c30f5000Smrg CFLAGS="$CFLAGS -belf" 4778c30f5000Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4779c30f5000Smrg [AC_LANG_PUSH(C) 4780c30f5000Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4781c30f5000Smrg AC_LANG_POP]) 4782c30f5000Smrg if test yes != "$lt_cv_cc_needs_belf"; then 4783c30f5000Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4784c30f5000Smrg CFLAGS=$SAVE_CFLAGS 4785c30f5000Smrg fi 4786c30f5000Smrg ;; 4787c30f5000Smrg*-*solaris*) 4788c30f5000Smrg # Find out what ABI is being produced by ac_compile, and set linker 4789c30f5000Smrg # options accordingly. 4790c30f5000Smrg echo 'int i;' > conftest.$ac_ext 4791c30f5000Smrg if AC_TRY_EVAL(ac_compile); then 4792c30f5000Smrg case `$FILECMD conftest.o` in 4793c30f5000Smrg *64-bit*) 4794c30f5000Smrg case $lt_cv_prog_gnu_ld in 4795c30f5000Smrg yes*) 4796c30f5000Smrg case $host in 4797c30f5000Smrg i?86-*-solaris*|x86_64-*-solaris*) 4798c30f5000Smrg LD="${LD-ld} -m elf_x86_64" 4799c30f5000Smrg ;; 4800c30f5000Smrg sparc*-*-solaris*) 4801c30f5000Smrg LD="${LD-ld} -m elf64_sparc" 4802c30f5000Smrg ;; 4803c30f5000Smrg esac 4804c30f5000Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4805c30f5000Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4806c30f5000Smrg LD=${LD-ld}_sol2 4807c30f5000Smrg fi 4808c30f5000Smrg ;; 4809c30f5000Smrg *) 4810c30f5000Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4811c30f5000Smrg LD="${LD-ld} -64" 4812c30f5000Smrg fi 4813c30f5000Smrg ;; 4814c30f5000Smrg esac 4815c30f5000Smrg ;; 4816c30f5000Smrg esac 4817c30f5000Smrg fi 4818c30f5000Smrg rm -rf conftest* 4819c30f5000Smrg ;; 4820c30f5000Smrgesac 482149e108a1Smrg 4822c30f5000Smrgneed_locks=$enable_libtool_lock 4823c30f5000Smrg])# _LT_ENABLE_LOCK 4824e0963edeSmrg 4825e0963edeSmrg 4826c30f5000Smrg# _LT_PROG_AR 4827c30f5000Smrg# ----------- 4828c30f5000Smrgm4_defun([_LT_PROG_AR], 4829c30f5000Smrg[AC_CHECK_TOOLS(AR, [ar], false) 4830c30f5000Smrg: ${AR=ar} 4831c30f5000Smrg_LT_DECL([], [AR], [1], [The archiver]) 4832e0963edeSmrg 4833c30f5000Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4834c30f5000Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4835c30f5000Smrg# higher priority because thats what people were doing historically (setting 4836c30f5000Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4837c30f5000Smrg# variable obsoleted/removed. 4838e0963edeSmrg 4839c30f5000Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4840c30f5000Smrglt_ar_flags=$AR_FLAGS 4841c30f5000Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 4842e0963edeSmrg 4843c30f5000Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4844c30f5000Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4845c30f5000Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4846c30f5000Smrg [Flags to create an archive]) 4847e0963edeSmrg 4848c30f5000SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4849c30f5000Smrg [lt_cv_ar_at_file=no 4850c30f5000Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4851c30f5000Smrg [echo conftest.$ac_objext > conftest.lst 4852c30f5000Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4853c30f5000Smrg AC_TRY_EVAL([lt_ar_try]) 4854c30f5000Smrg if test 0 -eq "$ac_status"; then 4855c30f5000Smrg # Ensure the archiver fails upon bogus file names. 4856c30f5000Smrg rm -f conftest.$ac_objext libconftest.a 4857c30f5000Smrg AC_TRY_EVAL([lt_ar_try]) 4858c30f5000Smrg if test 0 -ne "$ac_status"; then 4859c30f5000Smrg lt_cv_ar_at_file=@ 4860c30f5000Smrg fi 4861c30f5000Smrg fi 4862c30f5000Smrg rm -f conftest.* libconftest.a 4863c30f5000Smrg ]) 4864c30f5000Smrg ]) 4865e0963edeSmrg 4866c30f5000Smrgif test no = "$lt_cv_ar_at_file"; then 4867c30f5000Smrg archiver_list_spec= 4868c30f5000Smrgelse 4869c30f5000Smrg archiver_list_spec=$lt_cv_ar_at_file 4870c30f5000Smrgfi 4871c30f5000Smrg_LT_DECL([], [archiver_list_spec], [1], 4872c30f5000Smrg [How to feed a file listing to the archiver]) 4873c30f5000Smrg])# _LT_PROG_AR 4874e0963edeSmrg 4875e0963edeSmrg 4876c30f5000Smrg# _LT_CMD_OLD_ARCHIVE 4877c30f5000Smrg# ------------------- 4878c30f5000Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 4879c30f5000Smrg[_LT_PROG_AR 4880e0963edeSmrg 4881c30f5000SmrgAC_CHECK_TOOL(STRIP, strip, :) 4882c30f5000Smrgtest -z "$STRIP" && STRIP=: 4883c30f5000Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4884c30f5000Smrg 4885c30f5000SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 4886c30f5000Smrgtest -z "$RANLIB" && RANLIB=: 4887c30f5000Smrg_LT_DECL([], [RANLIB], [1], 4888c30f5000Smrg [Commands used to install an old-style archive]) 4889c30f5000Smrg 4890c30f5000Smrg# Determine commands to create old-style static archives. 4891c30f5000Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4892c30f5000Smrgold_postinstall_cmds='chmod 644 $oldlib' 4893c30f5000Smrgold_postuninstall_cmds= 4894c30f5000Smrg 4895c30f5000Smrgif test -n "$RANLIB"; then 489667ab2ff2Smrg case $host_os in 4897c30f5000Smrg bitrig* | openbsd*) 4898c30f5000Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 489967ab2ff2Smrg ;; 4900c30f5000Smrg *) 4901c30f5000Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 490267ab2ff2Smrg ;; 490367ab2ff2Smrg esac 4904c30f5000Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 4905c30f5000Smrgfi 4906e0963edeSmrg 4907c30f5000Smrgcase $host_os in 4908c30f5000Smrg darwin*) 4909c30f5000Smrg lock_old_archive_extraction=yes ;; 4910c30f5000Smrg *) 4911c30f5000Smrg lock_old_archive_extraction=no ;; 4912c30f5000Smrgesac 4913c30f5000Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 4914c30f5000Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 4915c30f5000Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 4916c30f5000Smrg [Commands used to build an old-style archive]) 4917c30f5000Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 4918c30f5000Smrg [Whether to use a lock for old archive extraction]) 4919c30f5000Smrg])# _LT_CMD_OLD_ARCHIVE 4920c30f5000Smrg 4921c30f5000Smrg 4922c30f5000Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4923c30f5000Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4924c30f5000Smrg# ---------------------------------------------------------------- 4925c30f5000Smrg# Check whether the given compiler option works 4926c30f5000SmrgAC_DEFUN([_LT_COMPILER_OPTION], 4927c30f5000Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4928c30f5000Smrgm4_require([_LT_DECL_SED])dnl 4929c30f5000SmrgAC_CACHE_CHECK([$1], [$2], 4930c30f5000Smrg [$2=no 4931c30f5000Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 4932c30f5000Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4933c30f5000Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 4934c30f5000Smrg # Insert the option either (1) after the last *FLAGS variable, or 4935c30f5000Smrg # (2) before a word containing "conftest.", or (3) at the end. 4936c30f5000Smrg # Note that $ac_compile itself does not contain backslashes and begins 4937c30f5000Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4938c30f5000Smrg # The option is referenced via a variable to avoid confusing sed. 4939c30f5000Smrg lt_compile=`echo "$ac_compile" | $SED \ 4940c30f5000Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4941c30f5000Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4942c30f5000Smrg -e 's:$: $lt_compiler_flag:'` 4943c30f5000Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4944c30f5000Smrg (eval "$lt_compile" 2>conftest.err) 4945c30f5000Smrg ac_status=$? 4946c30f5000Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4947c30f5000Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4948c30f5000Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 4949c30f5000Smrg # The compiler can only warn and ignore the option if not recognized 4950c30f5000Smrg # So say no if there are warnings other than the usual output. 4951c30f5000Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 4952c30f5000Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4953c30f5000Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 4954c30f5000Smrg $2=yes 4955c30f5000Smrg fi 4956c30f5000Smrg fi 4957c30f5000Smrg $RM conftest* 4958c30f5000Smrg]) 4959c30f5000Smrg 4960c30f5000Smrgif test yes = "[$]$2"; then 4961c30f5000Smrg m4_if([$5], , :, [$5]) 4962c30f5000Smrgelse 4963c30f5000Smrg m4_if([$6], , :, [$6]) 4964c30f5000Smrgfi 4965c30f5000Smrg])# _LT_COMPILER_OPTION 4966c30f5000Smrg 4967c30f5000Smrg# Old name: 4968c30f5000SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 4969c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 4970c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 4971c30f5000Smrg 4972c30f5000Smrg 4973c30f5000Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4974c30f5000Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 4975c30f5000Smrg# ---------------------------------------------------- 4976c30f5000Smrg# Check whether the given linker option works 4977c30f5000SmrgAC_DEFUN([_LT_LINKER_OPTION], 4978c30f5000Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4979c30f5000Smrgm4_require([_LT_DECL_SED])dnl 4980c30f5000SmrgAC_CACHE_CHECK([$1], [$2], 4981c30f5000Smrg [$2=no 4982c30f5000Smrg save_LDFLAGS=$LDFLAGS 4983c30f5000Smrg LDFLAGS="$LDFLAGS $3" 4984c30f5000Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 4985c30f5000Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 4986c30f5000Smrg # The linker can only warn and ignore the option if not recognized 4987c30f5000Smrg # So say no if there are warnings 4988c30f5000Smrg if test -s conftest.err; then 4989c30f5000Smrg # Append any errors to the config.log. 4990c30f5000Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 4991c30f5000Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 4992c30f5000Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4993c30f5000Smrg if diff conftest.exp conftest.er2 >/dev/null; then 4994c30f5000Smrg $2=yes 4995c30f5000Smrg fi 4996c30f5000Smrg else 4997c30f5000Smrg $2=yes 4998c30f5000Smrg fi 4999c30f5000Smrg fi 5000c30f5000Smrg $RM -r conftest* 5001c30f5000Smrg LDFLAGS=$save_LDFLAGS 5002c30f5000Smrg]) 5003f05b35a2Smrg 5004c30f5000Smrgif test yes = "[$]$2"; then 5005c30f5000Smrg m4_if([$4], , :, [$4]) 5006c30f5000Smrgelse 5007c30f5000Smrg m4_if([$5], , :, [$5]) 500867ab2ff2Smrgfi 5009c30f5000Smrg])# _LT_LINKER_OPTION 5010e0963edeSmrg 5011c30f5000Smrg# Old name: 5012c30f5000SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5013c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 5014c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5015e0963edeSmrg 501667ab2ff2Smrg 5017c30f5000Smrg# LT_CMD_MAX_LEN 5018c30f5000Smrg#--------------- 5019c30f5000SmrgAC_DEFUN([LT_CMD_MAX_LEN], 5020c30f5000Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5021c30f5000Smrg# find the maximum length of command line arguments 5022c30f5000SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5023c30f5000SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5024c30f5000Smrg i=0 5025c30f5000Smrg teststring=ABCD 502667ab2ff2Smrg 5027c30f5000Smrg case $build_os in 5028c30f5000Smrg msdosdjgpp*) 5029c30f5000Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5030c30f5000Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5031c30f5000Smrg # during glob expansion). Even if it were fixed, the result of this 5032c30f5000Smrg # check would be larger than it should be. 5033c30f5000Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5034c30f5000Smrg ;; 5035f05b35a2Smrg 5036c30f5000Smrg gnu*) 5037c30f5000Smrg # Under GNU Hurd, this test is not required because there is 5038c30f5000Smrg # no limit to the length of command line arguments. 5039c30f5000Smrg # Libtool will interpret -1 as no limit whatsoever 5040c30f5000Smrg lt_cv_sys_max_cmd_len=-1; 5041c30f5000Smrg ;; 5042f05b35a2Smrg 5043c30f5000Smrg cygwin* | mingw* | cegcc*) 5044c30f5000Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5045c30f5000Smrg # about 5 minutes as the teststring grows exponentially. 5046c30f5000Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 5047c30f5000Smrg # you end up with a "frozen" computer, even though with patience 5048c30f5000Smrg # the test eventually succeeds (with a max line length of 256k). 5049c30f5000Smrg # Instead, let's just punt: use the minimum linelength reported by 5050c30f5000Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 5051c30f5000Smrg lt_cv_sys_max_cmd_len=8192; 5052c30f5000Smrg ;; 5053e0963edeSmrg 5054c30f5000Smrg mint*) 5055c30f5000Smrg # On MiNT this can take a long time and run out of memory. 5056c30f5000Smrg lt_cv_sys_max_cmd_len=8192; 5057c30f5000Smrg ;; 5058e0963edeSmrg 5059c30f5000Smrg amigaos*) 5060c30f5000Smrg # On AmigaOS with pdksh, this test takes hours, literally. 5061c30f5000Smrg # So we just punt and use a minimum line length of 8192. 5062c30f5000Smrg lt_cv_sys_max_cmd_len=8192; 5063c30f5000Smrg ;; 5064e0963edeSmrg 5065c30f5000Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5066c30f5000Smrg # This has been around since 386BSD, at least. Likely further. 5067c30f5000Smrg if test -x /sbin/sysctl; then 5068c30f5000Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5069c30f5000Smrg elif test -x /usr/sbin/sysctl; then 5070c30f5000Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5071c30f5000Smrg else 5072c30f5000Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5073c30f5000Smrg fi 5074c30f5000Smrg # And add a safety zone 5075c30f5000Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5076c30f5000Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5077c30f5000Smrg ;; 5078e0963edeSmrg 5079c30f5000Smrg interix*) 5080c30f5000Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5081c30f5000Smrg lt_cv_sys_max_cmd_len=196608 5082c30f5000Smrg ;; 5083e0963edeSmrg 5084c30f5000Smrg os2*) 5085c30f5000Smrg # The test takes a long time on OS/2. 5086c30f5000Smrg lt_cv_sys_max_cmd_len=8192 5087c30f5000Smrg ;; 5088c30f5000Smrg 5089c30f5000Smrg osf*) 5090c30f5000Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5091c30f5000Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5092c30f5000Smrg # nice to cause kernel panics so lets avoid the loop below. 5093c30f5000Smrg # First set a reasonable default. 5094c30f5000Smrg lt_cv_sys_max_cmd_len=16384 5095c30f5000Smrg # 5096c30f5000Smrg if test -x /sbin/sysconfig; then 5097c30f5000Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5098c30f5000Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5099c30f5000Smrg esac 5100c30f5000Smrg fi 5101c30f5000Smrg ;; 5102c30f5000Smrg sco3.2v5*) 5103c30f5000Smrg lt_cv_sys_max_cmd_len=102400 5104c30f5000Smrg ;; 5105c30f5000Smrg sysv5* | sco5v6* | sysv4.2uw2*) 5106c30f5000Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5107c30f5000Smrg if test -n "$kargmax"; then 5108c30f5000Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 510967ab2ff2Smrg else 5110c30f5000Smrg lt_cv_sys_max_cmd_len=32768 5111c30f5000Smrg fi 5112c30f5000Smrg ;; 5113c30f5000Smrg *) 5114c30f5000Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5115c30f5000Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5116c30f5000Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5117c30f5000Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5118c30f5000Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5119c30f5000Smrg else 5120c30f5000Smrg # Make teststring a little bigger before we do anything with it. 5121c30f5000Smrg # a 1K string should be a reasonable start. 5122c30f5000Smrg for i in 1 2 3 4 5 6 7 8; do 5123c30f5000Smrg teststring=$teststring$teststring 5124c30f5000Smrg done 5125c30f5000Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5126c30f5000Smrg # If test is not a shell built-in, we'll probably end up computing a 5127c30f5000Smrg # maximum length that is only half of the actual maximum length, but 5128c30f5000Smrg # we can't tell. 5129c30f5000Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5130c30f5000Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5131c30f5000Smrg test 17 != "$i" # 1/2 MB should be enough 5132c30f5000Smrg do 5133c30f5000Smrg i=`expr $i + 1` 5134c30f5000Smrg teststring=$teststring$teststring 5135c30f5000Smrg done 5136c30f5000Smrg # Only check the string length outside the loop. 5137c30f5000Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5138c30f5000Smrg teststring= 5139c30f5000Smrg # Add a significant safety factor because C++ compilers can tack on 5140c30f5000Smrg # massive amounts of additional arguments before passing them to the 5141c30f5000Smrg # linker. It appears as though 1/2 is a usable value. 5142c30f5000Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 514367ab2ff2Smrg fi 5144c30f5000Smrg ;; 5145c30f5000Smrg esac 5146c30f5000Smrg]) 5147c30f5000Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 5148c30f5000Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5149c30f5000Smrgelse 5150c30f5000Smrg AC_MSG_RESULT(none) 5151c30f5000Smrgfi 5152c30f5000Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5153c30f5000Smrg_LT_DECL([], [max_cmd_len], [0], 5154c30f5000Smrg [What is the maximum length of a command?]) 5155c30f5000Smrg])# LT_CMD_MAX_LEN 5156e0963edeSmrg 5157c30f5000Smrg# Old name: 5158c30f5000SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5159c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 5160c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5161f05b35a2Smrg 5162e0963edeSmrg 5163c30f5000Smrg# _LT_HEADER_DLFCN 5164c30f5000Smrg# ---------------- 5165c30f5000Smrgm4_defun([_LT_HEADER_DLFCN], 5166c30f5000Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5167c30f5000Smrg])# _LT_HEADER_DLFCN 5168c30f5000Smrg 516967ab2ff2Smrg 5170c30f5000Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5171c30f5000Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5172c30f5000Smrg# ---------------------------------------------------------------- 5173c30f5000Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 5174c30f5000Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5175c30f5000Smrgif test yes = "$cross_compiling"; then : 5176c30f5000Smrg [$4] 5177c30f5000Smrgelse 5178c30f5000Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5179c30f5000Smrg lt_status=$lt_dlunknown 5180c30f5000Smrg cat > conftest.$ac_ext <<_LT_EOF 5181c30f5000Smrg[#line $LINENO "configure" 5182c30f5000Smrg#include "confdefs.h" 518367ab2ff2Smrg 5184c30f5000Smrg#if HAVE_DLFCN_H 5185c30f5000Smrg#include <dlfcn.h> 5186c30f5000Smrg#endif 518767ab2ff2Smrg 5188c30f5000Smrg#include <stdio.h> 518967ab2ff2Smrg 5190c30f5000Smrg#ifdef RTLD_GLOBAL 5191c30f5000Smrg# define LT_DLGLOBAL RTLD_GLOBAL 5192c30f5000Smrg#else 5193c30f5000Smrg# ifdef DL_GLOBAL 5194c30f5000Smrg# define LT_DLGLOBAL DL_GLOBAL 5195c30f5000Smrg# else 5196c30f5000Smrg# define LT_DLGLOBAL 0 5197c30f5000Smrg# endif 5198c30f5000Smrg#endif 5199e0963edeSmrg 5200c30f5000Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5201c30f5000Smrg find out it does not work in some platform. */ 5202c30f5000Smrg#ifndef LT_DLLAZY_OR_NOW 5203c30f5000Smrg# ifdef RTLD_LAZY 5204c30f5000Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5205c30f5000Smrg# else 5206c30f5000Smrg# ifdef DL_LAZY 5207c30f5000Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 5208c30f5000Smrg# else 5209c30f5000Smrg# ifdef RTLD_NOW 5210c30f5000Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5211c30f5000Smrg# else 5212c30f5000Smrg# ifdef DL_NOW 5213c30f5000Smrg# define LT_DLLAZY_OR_NOW DL_NOW 5214c30f5000Smrg# else 5215c30f5000Smrg# define LT_DLLAZY_OR_NOW 0 5216c30f5000Smrg# endif 5217c30f5000Smrg# endif 5218c30f5000Smrg# endif 5219c30f5000Smrg# endif 5220c30f5000Smrg#endif 522167ab2ff2Smrg 5222c30f5000Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 5223c30f5000Smrg correspondingly for the symbols needed. */ 5224c30f5000Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5225c30f5000Smrgint fnord () __attribute__((visibility("default"))); 5226c30f5000Smrg#endif 5227e0963edeSmrg 5228c30f5000Smrgint fnord () { return 42; } 5229c30f5000Smrgint main () 5230c30f5000Smrg{ 5231c30f5000Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5232c30f5000Smrg int status = $lt_dlunknown; 5233e0963edeSmrg 5234c30f5000Smrg if (self) 5235c30f5000Smrg { 5236c30f5000Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5237c30f5000Smrg else 5238c30f5000Smrg { 5239c30f5000Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5240c30f5000Smrg else puts (dlerror ()); 5241c30f5000Smrg } 5242c30f5000Smrg /* dlclose (self); */ 5243c30f5000Smrg } 5244c30f5000Smrg else 5245c30f5000Smrg puts (dlerror ()); 5246e0963edeSmrg 5247c30f5000Smrg return status; 5248c30f5000Smrg}] 5249c30f5000Smrg_LT_EOF 5250c30f5000Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5251c30f5000Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5252c30f5000Smrg lt_status=$? 5253c30f5000Smrg case x$lt_status in 5254c30f5000Smrg x$lt_dlno_uscore) $1 ;; 5255c30f5000Smrg x$lt_dlneed_uscore) $2 ;; 5256c30f5000Smrg x$lt_dlunknown|x*) $3 ;; 5257c30f5000Smrg esac 5258c30f5000Smrg else : 5259c30f5000Smrg # compilation failed 5260c30f5000Smrg $3 5261c30f5000Smrg fi 5262c30f5000Smrgfi 5263c30f5000Smrgrm -fr conftest* 5264c30f5000Smrg])# _LT_TRY_DLOPEN_SELF 5265f05b35a2Smrg 5266f05b35a2Smrg 5267c30f5000Smrg# LT_SYS_DLOPEN_SELF 5268c30f5000Smrg# ------------------ 5269c30f5000SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5270c30f5000Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5271c30f5000Smrgif test yes != "$enable_dlopen"; then 5272c30f5000Smrg enable_dlopen=unknown 5273c30f5000Smrg enable_dlopen_self=unknown 5274c30f5000Smrg enable_dlopen_self_static=unknown 5275c30f5000Smrgelse 5276c30f5000Smrg lt_cv_dlopen=no 5277c30f5000Smrg lt_cv_dlopen_libs= 5278f05b35a2Smrg 5279c30f5000Smrg case $host_os in 5280c30f5000Smrg beos*) 5281c30f5000Smrg lt_cv_dlopen=load_add_on 5282c30f5000Smrg lt_cv_dlopen_libs= 5283c30f5000Smrg lt_cv_dlopen_self=yes 5284c30f5000Smrg ;; 5285f05b35a2Smrg 5286c30f5000Smrg mingw* | pw32* | cegcc*) 5287c30f5000Smrg lt_cv_dlopen=LoadLibrary 5288c30f5000Smrg lt_cv_dlopen_libs= 5289c30f5000Smrg ;; 5290f05b35a2Smrg 5291c30f5000Smrg cygwin*) 5292c30f5000Smrg lt_cv_dlopen=dlopen 5293c30f5000Smrg lt_cv_dlopen_libs= 5294c30f5000Smrg ;; 5295f05b35a2Smrg 5296c30f5000Smrg darwin*) 5297c30f5000Smrg # if libdl is installed we need to link against it 5298c30f5000Smrg AC_CHECK_LIB([dl], [dlopen], 5299c30f5000Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5300c30f5000Smrg lt_cv_dlopen=dyld 5301c30f5000Smrg lt_cv_dlopen_libs= 5302c30f5000Smrg lt_cv_dlopen_self=yes 5303c30f5000Smrg ]) 5304c30f5000Smrg ;; 5305e0963edeSmrg 5306c30f5000Smrg tpf*) 5307c30f5000Smrg # Don't try to run any link tests for TPF. We know it's impossible 5308c30f5000Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 5309c30f5000Smrg lt_cv_dlopen=dlopen 5310c30f5000Smrg lt_cv_dlopen_libs= 5311c30f5000Smrg lt_cv_dlopen_self=no 5312c30f5000Smrg ;; 5313f05b35a2Smrg 5314c30f5000Smrg *) 5315c30f5000Smrg AC_CHECK_FUNC([shl_load], 5316c30f5000Smrg [lt_cv_dlopen=shl_load], 5317c30f5000Smrg [AC_CHECK_LIB([dld], [shl_load], 5318c30f5000Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5319c30f5000Smrg [AC_CHECK_FUNC([dlopen], 5320c30f5000Smrg [lt_cv_dlopen=dlopen], 5321c30f5000Smrg [AC_CHECK_LIB([dl], [dlopen], 5322c30f5000Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5323c30f5000Smrg [AC_CHECK_LIB([svld], [dlopen], 5324c30f5000Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5325c30f5000Smrg [AC_CHECK_LIB([dld], [dld_link], 5326c30f5000Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5327c30f5000Smrg ]) 5328c30f5000Smrg ]) 5329c30f5000Smrg ]) 5330c30f5000Smrg ]) 5331c30f5000Smrg ]) 5332c30f5000Smrg ;; 5333c30f5000Smrg esac 533467ab2ff2Smrg 5335c30f5000Smrg if test no = "$lt_cv_dlopen"; then 5336c30f5000Smrg enable_dlopen=no 5337c30f5000Smrg else 5338c30f5000Smrg enable_dlopen=yes 5339c30f5000Smrg fi 5340f05b35a2Smrg 5341c30f5000Smrg case $lt_cv_dlopen in 5342c30f5000Smrg dlopen) 5343c30f5000Smrg save_CPPFLAGS=$CPPFLAGS 5344c30f5000Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 5345b3a827e2Smrg 5346c30f5000Smrg save_LDFLAGS=$LDFLAGS 5347c30f5000Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5348c30f5000Smrg 5349c30f5000Smrg save_LIBS=$LIBS 5350c30f5000Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 5351c30f5000Smrg 5352c30f5000Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 5353c30f5000Smrg lt_cv_dlopen_self, [dnl 5354c30f5000Smrg _LT_TRY_DLOPEN_SELF( 5355c30f5000Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5356c30f5000Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5357c30f5000Smrg ]) 5358e0963edeSmrg 5359c30f5000Smrg if test yes = "$lt_cv_dlopen_self"; then 5360c30f5000Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5361c30f5000Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5362c30f5000Smrg lt_cv_dlopen_self_static, [dnl 5363c30f5000Smrg _LT_TRY_DLOPEN_SELF( 5364c30f5000Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5365c30f5000Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5366c30f5000Smrg ]) 5367c30f5000Smrg fi 5368e0963edeSmrg 5369c30f5000Smrg CPPFLAGS=$save_CPPFLAGS 5370c30f5000Smrg LDFLAGS=$save_LDFLAGS 5371c30f5000Smrg LIBS=$save_LIBS 5372c30f5000Smrg ;; 5373c30f5000Smrg esac 5374e0963edeSmrg 5375c30f5000Smrg case $lt_cv_dlopen_self in 5376c30f5000Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5377c30f5000Smrg *) enable_dlopen_self=unknown ;; 5378c30f5000Smrg esac 5379f05b35a2Smrg 5380c30f5000Smrg case $lt_cv_dlopen_self_static in 5381c30f5000Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5382c30f5000Smrg *) enable_dlopen_self_static=unknown ;; 5383c30f5000Smrg esac 5384c30f5000Smrgfi 5385c30f5000Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 5386c30f5000Smrg [Whether dlopen is supported]) 5387c30f5000Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5388c30f5000Smrg [Whether dlopen of programs is supported]) 5389c30f5000Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5390c30f5000Smrg [Whether dlopen of statically linked programs is supported]) 5391c30f5000Smrg])# LT_SYS_DLOPEN_SELF 5392f05b35a2Smrg 5393c30f5000Smrg# Old name: 5394c30f5000SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5395c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 5396c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 5397f05b35a2Smrg 5398f05b35a2Smrg 5399c30f5000Smrg# _LT_COMPILER_C_O([TAGNAME]) 5400c30f5000Smrg# --------------------------- 5401c30f5000Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 5402c30f5000Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5403c30f5000Smrgm4_defun([_LT_COMPILER_C_O], 5404c30f5000Smrg[m4_require([_LT_DECL_SED])dnl 5405c30f5000Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5406c30f5000Smrgm4_require([_LT_TAG_COMPILER])dnl 5407c30f5000SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5408c30f5000Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5409c30f5000Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5410c30f5000Smrg $RM -r conftest 2>/dev/null 5411c30f5000Smrg mkdir conftest 5412c30f5000Smrg cd conftest 5413c30f5000Smrg mkdir out 5414c30f5000Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5415f05b35a2Smrg 5416c30f5000Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 5417c30f5000Smrg # Insert the option either (1) after the last *FLAGS variable, or 5418c30f5000Smrg # (2) before a word containing "conftest.", or (3) at the end. 5419c30f5000Smrg # Note that $ac_compile itself does not contain backslashes and begins 5420c30f5000Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5421c30f5000Smrg lt_compile=`echo "$ac_compile" | $SED \ 5422c30f5000Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5423c30f5000Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5424c30f5000Smrg -e 's:$: $lt_compiler_flag:'` 5425c30f5000Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5426c30f5000Smrg (eval "$lt_compile" 2>out/conftest.err) 5427c30f5000Smrg ac_status=$? 5428c30f5000Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 5429c30f5000Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5430c30f5000Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 5431c30f5000Smrg then 5432c30f5000Smrg # The compiler can only warn and ignore the option if not recognized 5433c30f5000Smrg # So say no if there are warnings 5434c30f5000Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5435c30f5000Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5436c30f5000Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5437c30f5000Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5438c30f5000Smrg fi 5439c30f5000Smrg fi 5440c30f5000Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 5441c30f5000Smrg $RM conftest* 5442c30f5000Smrg # SGI C++ compiler will create directory out/ii_files/ for 5443c30f5000Smrg # template instantiation 5444c30f5000Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5445c30f5000Smrg $RM out/* && rmdir out 5446c30f5000Smrg cd .. 5447c30f5000Smrg $RM -r conftest 5448c30f5000Smrg $RM conftest* 5449c30f5000Smrg]) 5450c30f5000Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5451c30f5000Smrg [Does compiler simultaneously support -c and -o options?]) 5452c30f5000Smrg])# _LT_COMPILER_C_O 5453f05b35a2Smrg 5454e0963edeSmrg 5455c30f5000Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5456c30f5000Smrg# ---------------------------------- 5457c30f5000Smrg# Check to see if we can do hard links to lock some files if needed 5458c30f5000Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 5459c30f5000Smrg[m4_require([_LT_ENABLE_LOCK])dnl 5460c30f5000Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5461c30f5000Smrg_LT_COMPILER_C_O([$1]) 5462c30f5000Smrg 5463c30f5000Smrghard_links=nottested 5464c30f5000Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5465c30f5000Smrg # do not overwrite the value of need_locks provided by the user 5466c30f5000Smrg AC_MSG_CHECKING([if we can lock with hard links]) 5467c30f5000Smrg hard_links=yes 5468c30f5000Smrg $RM conftest* 5469c30f5000Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5470c30f5000Smrg touch conftest.a 5471c30f5000Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 5472c30f5000Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5473c30f5000Smrg AC_MSG_RESULT([$hard_links]) 5474c30f5000Smrg if test no = "$hard_links"; then 5475c30f5000Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5476c30f5000Smrg need_locks=warn 5477c30f5000Smrg fi 5478c30f5000Smrgelse 5479c30f5000Smrg need_locks=no 5480c30f5000Smrgfi 5481c30f5000Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5482c30f5000Smrg])# _LT_COMPILER_FILE_LOCKS 5483f05b35a2Smrg 5484f05b35a2Smrg 5485c30f5000Smrg# _LT_CHECK_OBJDIR 5486c30f5000Smrg# ---------------- 5487c30f5000Smrgm4_defun([_LT_CHECK_OBJDIR], 5488c30f5000Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5489c30f5000Smrg[rm -f .libs 2>/dev/null 5490c30f5000Smrgmkdir .libs 2>/dev/null 5491c30f5000Smrgif test -d .libs; then 5492c30f5000Smrg lt_cv_objdir=.libs 5493c30f5000Smrgelse 5494c30f5000Smrg # MS-DOS does not allow filenames that begin with a dot. 5495c30f5000Smrg lt_cv_objdir=_libs 5496c30f5000Smrgfi 5497c30f5000Smrgrmdir .libs 2>/dev/null]) 5498c30f5000Smrgobjdir=$lt_cv_objdir 5499c30f5000Smrg_LT_DECL([], [objdir], [0], 5500c30f5000Smrg [The name of the directory that contains temporary libtool files])dnl 5501c30f5000Smrgm4_pattern_allow([LT_OBJDIR])dnl 5502c30f5000SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5503c30f5000Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 5504c30f5000Smrg])# _LT_CHECK_OBJDIR 5505f05b35a2Smrg 5506f05b35a2Smrg 5507c30f5000Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5508c30f5000Smrg# -------------------------------------- 5509c30f5000Smrg# Check hardcoding attributes. 5510c30f5000Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5511c30f5000Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5512c30f5000Smrg_LT_TAGVAR(hardcode_action, $1)= 5513c30f5000Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5514c30f5000Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 5515c30f5000Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 5516f05b35a2Smrg 5517c30f5000Smrg # We can hardcode non-existent directories. 5518c30f5000Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5519c30f5000Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 5520c30f5000Smrg # have to relink, otherwise we might link with an installed library 5521c30f5000Smrg # when we should be linking with a yet-to-be-installed one 5522c30f5000Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5523c30f5000Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5524c30f5000Smrg # Linking always hardcodes the temporary library directory. 5525c30f5000Smrg _LT_TAGVAR(hardcode_action, $1)=relink 5526c30f5000Smrg else 5527c30f5000Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 5528c30f5000Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 5529c30f5000Smrg fi 5530c30f5000Smrgelse 5531c30f5000Smrg # We cannot hardcode anything, or else we can only hardcode existing 5532c30f5000Smrg # directories. 5533c30f5000Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 5534c30f5000Smrgfi 5535c30f5000SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5536f05b35a2Smrg 5537c30f5000Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5538c30f5000Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5539c30f5000Smrg # Fast installation is not supported 5540c30f5000Smrg enable_fast_install=no 5541c30f5000Smrgelif test yes = "$shlibpath_overrides_runpath" || 5542c30f5000Smrg test no = "$enable_shared"; then 5543c30f5000Smrg # Fast installation is not necessary 5544c30f5000Smrg enable_fast_install=needless 5545c30f5000Smrgfi 5546c30f5000Smrg_LT_TAGDECL([], [hardcode_action], [0], 5547c30f5000Smrg [How to hardcode a shared library path into an executable]) 5548c30f5000Smrg])# _LT_LINKER_HARDCODE_LIBPATH 5549f05b35a2Smrg 5550f05b35a2Smrg 5551c30f5000Smrg# _LT_CMD_STRIPLIB 5552c30f5000Smrg# ---------------- 5553c30f5000Smrgm4_defun([_LT_CMD_STRIPLIB], 5554c30f5000Smrg[m4_require([_LT_DECL_EGREP]) 5555c30f5000Smrgstriplib= 5556c30f5000Smrgold_striplib= 5557c30f5000SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 5558c30f5000Smrgif test -z "$STRIP"; then 5559c30f5000Smrg AC_MSG_RESULT([no]) 5560c30f5000Smrgelse 5561c30f5000Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5562c30f5000Smrg old_striplib="$STRIP --strip-debug" 5563c30f5000Smrg striplib="$STRIP --strip-unneeded" 5564c30f5000Smrg AC_MSG_RESULT([yes]) 5565c30f5000Smrg else 5566c30f5000Smrg case $host_os in 5567c30f5000Smrg darwin*) 5568c30f5000Smrg # FIXME - insert some real tests, host_os isn't really good enough 5569c30f5000Smrg striplib="$STRIP -x" 5570c30f5000Smrg old_striplib="$STRIP -S" 5571c30f5000Smrg AC_MSG_RESULT([yes]) 5572c30f5000Smrg ;; 5573c30f5000Smrg freebsd*) 5574c30f5000Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5575c30f5000Smrg old_striplib="$STRIP --strip-debug" 5576c30f5000Smrg striplib="$STRIP --strip-unneeded" 5577c30f5000Smrg AC_MSG_RESULT([yes]) 5578c30f5000Smrg else 5579c30f5000Smrg AC_MSG_RESULT([no]) 5580c30f5000Smrg fi 5581c30f5000Smrg ;; 5582c30f5000Smrg *) 5583c30f5000Smrg AC_MSG_RESULT([no]) 5584c30f5000Smrg ;; 5585c30f5000Smrg esac 5586c30f5000Smrg fi 5587c30f5000Smrgfi 5588c30f5000Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5589c30f5000Smrg_LT_DECL([], [striplib], [1]) 5590c30f5000Smrg])# _LT_CMD_STRIPLIB 5591c30f5000Smrg 5592c30f5000Smrg 5593c30f5000Smrg# _LT_PREPARE_MUNGE_PATH_LIST 5594c30f5000Smrg# --------------------------- 5595c30f5000Smrg# Make sure func_munge_path_list() is defined correctly. 5596c30f5000Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5597c30f5000Smrg[[# func_munge_path_list VARIABLE PATH 5598c30f5000Smrg# ----------------------------------- 5599c30f5000Smrg# VARIABLE is name of variable containing _space_ separated list of 5600c30f5000Smrg# directories to be munged by the contents of PATH, which is string 5601c30f5000Smrg# having a format: 5602c30f5000Smrg# "DIR[:DIR]:" 5603c30f5000Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 5604c30f5000Smrg# ":DIR[:DIR]" 5605c30f5000Smrg# string "DIR[ DIR]" will be appended to VARIABLE 5606c30f5000Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 5607c30f5000Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5608c30f5000Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 5609c30f5000Smrg# "DIR[:DIR]" 5610c30f5000Smrg# VARIABLE will be replaced by "DIR[ DIR]" 5611c30f5000Smrgfunc_munge_path_list () 5612c30f5000Smrg{ 5613c30f5000Smrg case x@S|@2 in 5614c30f5000Smrg x) 5615c30f5000Smrg ;; 5616c30f5000Smrg *:) 5617c30f5000Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5618c30f5000Smrg ;; 5619c30f5000Smrg x:*) 5620c30f5000Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5621c30f5000Smrg ;; 5622c30f5000Smrg *::*) 5623c30f5000Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5624c30f5000Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5625c30f5000Smrg ;; 5626c30f5000Smrg *) 5627c30f5000Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5628c30f5000Smrg ;; 5629c30f5000Smrg esac 5630c30f5000Smrg} 5631c30f5000Smrg]])# _LT_PREPARE_PATH_LIST 563267ab2ff2Smrg 5633f05b35a2Smrg 5634c30f5000Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 5635c30f5000Smrg# ----------------------------- 5636c30f5000Smrg# PORTME Fill in your ld.so characteristics 5637c30f5000Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 5638c30f5000Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5639c30f5000Smrgm4_require([_LT_DECL_EGREP])dnl 5640c30f5000Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5641c30f5000Smrgm4_require([_LT_DECL_OBJDUMP])dnl 5642c30f5000Smrgm4_require([_LT_DECL_SED])dnl 5643c30f5000Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 5644c30f5000Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5645c30f5000SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 5646c30f5000Smrgm4_if([$1], 5647c30f5000Smrg [], [ 5648c30f5000Smrgif test yes = "$GCC"; then 5649c30f5000Smrg case $host_os in 5650c30f5000Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5651c30f5000Smrg *) lt_awk_arg='/^libraries:/' ;; 5652c30f5000Smrg esac 5653c30f5000Smrg case $host_os in 5654c30f5000Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5655c30f5000Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 5656c30f5000Smrg esac 5657c30f5000Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5658c30f5000Smrg case $lt_search_path_spec in 5659c30f5000Smrg *\;*) 5660c30f5000Smrg # if the path contains ";" then we assume it to be the separator 5661c30f5000Smrg # otherwise default to the standard path separator (i.e. ":") - it is 5662c30f5000Smrg # assumed that no part of a normal pathname contains ";" but that should 5663c30f5000Smrg # okay in the real world where ";" in dirpaths is itself problematic. 5664c30f5000Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5665c30f5000Smrg ;; 5666c30f5000Smrg *) 5667c30f5000Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5668c30f5000Smrg ;; 5669c30f5000Smrg esac 5670c30f5000Smrg # Ok, now we have the path, separated by spaces, we can step through it 5671c30f5000Smrg # and add multilib dir if necessary... 5672c30f5000Smrg lt_tmp_lt_search_path_spec= 5673c30f5000Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5674c30f5000Smrg # ...but if some path component already ends with the multilib dir we assume 5675c30f5000Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5676c30f5000Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 5677c30f5000Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5678c30f5000Smrg lt_multi_os_dir= 5679c30f5000Smrg ;; 5680c30f5000Smrg esac 5681c30f5000Smrg for lt_sys_path in $lt_search_path_spec; do 5682c30f5000Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 5683c30f5000Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5684c30f5000Smrg elif test -n "$lt_multi_os_dir"; then 5685c30f5000Smrg test -d "$lt_sys_path" && \ 5686c30f5000Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5687c30f5000Smrg fi 5688c30f5000Smrg done 5689c30f5000Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5690c30f5000SmrgBEGIN {RS = " "; FS = "/|\n";} { 5691c30f5000Smrg lt_foo = ""; 5692c30f5000Smrg lt_count = 0; 5693c30f5000Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 5694c30f5000Smrg if ($lt_i != "" && $lt_i != ".") { 5695c30f5000Smrg if ($lt_i == "..") { 5696c30f5000Smrg lt_count++; 5697c30f5000Smrg } else { 5698c30f5000Smrg if (lt_count == 0) { 5699c30f5000Smrg lt_foo = "/" $lt_i lt_foo; 5700c30f5000Smrg } else { 5701c30f5000Smrg lt_count--; 5702c30f5000Smrg } 5703c30f5000Smrg } 5704c30f5000Smrg } 5705c30f5000Smrg } 5706c30f5000Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5707c30f5000Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5708c30f5000Smrg}'` 5709c30f5000Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 5710c30f5000Smrg # for these hosts. 5711c30f5000Smrg case $host_os in 5712c30f5000Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5713c30f5000Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5714c30f5000Smrg esac 5715c30f5000Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5716c30f5000Smrgelse 5717c30f5000Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5718c30f5000Smrgfi]) 5719c30f5000Smrglibrary_names_spec= 5720c30f5000Smrglibname_spec='lib$name' 5721c30f5000Smrgsoname_spec= 5722c30f5000Smrgshrext_cmds=.so 5723c30f5000Smrgpostinstall_cmds= 5724c30f5000Smrgpostuninstall_cmds= 5725c30f5000Smrgfinish_cmds= 5726c30f5000Smrgfinish_eval= 5727c30f5000Smrgshlibpath_var= 5728c30f5000Smrgshlibpath_overrides_runpath=unknown 5729c30f5000Smrgversion_type=none 5730c30f5000Smrgdynamic_linker="$host_os ld.so" 5731c30f5000Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 5732c30f5000Smrgneed_lib_prefix=unknown 5733c30f5000Smrghardcode_into_libs=no 5734e0963edeSmrg 5735c30f5000Smrg# when you set need_version to no, make sure it does not cause -set_version 5736c30f5000Smrg# flags to be left without arguments 5737c30f5000Smrgneed_version=unknown 5738e0963edeSmrg 5739c30f5000SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5740c30f5000Smrg[User-defined run-time library search path.]) 5741e0963edeSmrg 5742c30f5000Smrgcase $host_os in 5743c30f5000Smrgaix3*) 5744c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 5745c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5746c30f5000Smrg shlibpath_var=LIBPATH 5747e0963edeSmrg 5748c30f5000Smrg # AIX 3 has no versioning support, so we append a major version to the name. 5749c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 5750c30f5000Smrg ;; 5751c30f5000Smrg 5752c30f5000Smrgaix[[4-9]]*) 5753c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 5754c30f5000Smrg need_lib_prefix=no 5755c30f5000Smrg need_version=no 5756c30f5000Smrg hardcode_into_libs=yes 5757c30f5000Smrg if test ia64 = "$host_cpu"; then 5758c30f5000Smrg # AIX 5 supports IA64 5759c30f5000Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5760c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 5761c30f5000Smrg else 5762c30f5000Smrg # With GCC up to 2.95.x, collect2 would create an import file 5763c30f5000Smrg # for dependence libraries. The import file would start with 5764c30f5000Smrg # the line '#! .'. This would cause the generated library to 5765c30f5000Smrg # depend on '.', always an invalid library. This was fixed in 5766c30f5000Smrg # development snapshots of GCC prior to 3.0. 5767c30f5000Smrg case $host_os in 5768c30f5000Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 5769c30f5000Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5770c30f5000Smrg echo ' yes ' 5771c30f5000Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5772c30f5000Smrg : 5773c30f5000Smrg else 5774c30f5000Smrg can_build_shared=no 5775c30f5000Smrg fi 5776c30f5000Smrg ;; 5777c30f5000Smrg esac 5778c30f5000Smrg # Using Import Files as archive members, it is possible to support 5779c30f5000Smrg # filename-based versioning of shared library archives on AIX. While 5780c30f5000Smrg # this would work for both with and without runtime linking, it will 5781c30f5000Smrg # prevent static linking of such archives. So we do filename-based 5782c30f5000Smrg # shared library versioning with .so extension only, which is used 5783c30f5000Smrg # when both runtime linking and shared linking is enabled. 5784c30f5000Smrg # Unfortunately, runtime linking may impact performance, so we do 5785c30f5000Smrg # not want this to be the default eventually. Also, we use the 5786c30f5000Smrg # versioned .so libs for executables only if there is the -brtl 5787c30f5000Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5788c30f5000Smrg # To allow for filename-based versioning support, we need to create 5789c30f5000Smrg # libNAME.so.V as an archive file, containing: 5790c30f5000Smrg # *) an Import File, referring to the versioned filename of the 5791c30f5000Smrg # archive as well as the shared archive member, telling the 5792c30f5000Smrg # bitwidth (32 or 64) of that shared object, and providing the 5793c30f5000Smrg # list of exported symbols of that shared object, eventually 5794c30f5000Smrg # decorated with the 'weak' keyword 5795c30f5000Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 5796c30f5000Smrg # it being seen by the linker. 5797c30f5000Smrg # At run time we better use the real file rather than another symlink, 5798c30f5000Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5799c30f5000Smrg 5800c30f5000Smrg case $with_aix_soname,$aix_use_runtimelinking in 5801c30f5000Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5802c30f5000Smrg # soname into executable. Probably we can add versioning support to 5803c30f5000Smrg # collect2, so additional links can be useful in future. 5804c30f5000Smrg aix,yes) # traditional libtool 5805c30f5000Smrg dynamic_linker='AIX unversionable lib.so' 5806c30f5000Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5807c30f5000Smrg # instead of lib<name>.a to let people know that these are not 5808c30f5000Smrg # typical AIX shared libraries. 5809c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5810c30f5000Smrg ;; 5811c30f5000Smrg aix,no) # traditional AIX only 5812c30f5000Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5813c30f5000Smrg # We preserve .a as extension for shared libraries through AIX4.2 5814c30f5000Smrg # and later when we are not doing run time linking. 5815c30f5000Smrg library_names_spec='$libname$release.a $libname.a' 5816c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 5817c30f5000Smrg ;; 5818c30f5000Smrg svr4,*) # full svr4 only 5819c30f5000Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5820c30f5000Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5821c30f5000Smrg # We do not specify a path in Import Files, so LIBPATH fires. 5822c30f5000Smrg shlibpath_overrides_runpath=yes 5823c30f5000Smrg ;; 5824c30f5000Smrg *,yes) # both, prefer svr4 5825c30f5000Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5826c30f5000Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5827c30f5000Smrg # unpreferred sharedlib libNAME.a needs extra handling 5828c30f5000Smrg 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"' 5829c30f5000Smrg 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"' 5830c30f5000Smrg # We do not specify a path in Import Files, so LIBPATH fires. 5831c30f5000Smrg shlibpath_overrides_runpath=yes 5832c30f5000Smrg ;; 5833c30f5000Smrg *,no) # both, prefer aix 5834c30f5000Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5835c30f5000Smrg library_names_spec='$libname$release.a $libname.a' 5836c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 5837c30f5000Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5838c30f5000Smrg 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)' 5839c30f5000Smrg 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"' 5840c30f5000Smrg ;; 5841c30f5000Smrg esac 5842c30f5000Smrg shlibpath_var=LIBPATH 5843c30f5000Smrg fi 5844c30f5000Smrg ;; 5845e0963edeSmrg 5846c30f5000Smrgamigaos*) 5847c30f5000Smrg case $host_cpu in 5848c30f5000Smrg powerpc) 5849c30f5000Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 5850c30f5000Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5851c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5852c30f5000Smrg ;; 5853c30f5000Smrg m68k) 5854c30f5000Smrg library_names_spec='$libname.ixlibrary $libname.a' 5855c30f5000Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 5856c30f5000Smrg 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' 5857c30f5000Smrg ;; 5858c30f5000Smrg esac 5859c30f5000Smrg ;; 5860e0963edeSmrg 5861c30f5000Smrgbeos*) 5862c30f5000Smrg library_names_spec='$libname$shared_ext' 5863c30f5000Smrg dynamic_linker="$host_os ld.so" 5864c30f5000Smrg shlibpath_var=LIBRARY_PATH 5865c30f5000Smrg ;; 5866f05b35a2Smrg 5867c30f5000Smrgbsdi[[45]]*) 5868c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 5869c30f5000Smrg need_version=no 5870c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5871c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 5872c30f5000Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5873c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 5874c30f5000Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5875c30f5000Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5876c30f5000Smrg # the default ld.so.conf also contains /usr/contrib/lib and 5877c30f5000Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5878c30f5000Smrg # libtool to hard-code these into programs 5879c30f5000Smrg ;; 5880f05b35a2Smrg 5881c30f5000Smrgcygwin* | mingw* | pw32* | cegcc*) 5882c30f5000Smrg version_type=windows 5883c30f5000Smrg shrext_cmds=.dll 5884c30f5000Smrg need_version=no 5885c30f5000Smrg need_lib_prefix=no 5886f05b35a2Smrg 5887c30f5000Smrg case $GCC,$cc_basename in 5888c30f5000Smrg yes,*) 5889c30f5000Smrg # gcc 5890c30f5000Smrg library_names_spec='$libname.dll.a' 5891c30f5000Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5892c30f5000Smrg postinstall_cmds='base_file=`basename \$file`~ 5893c30f5000Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5894c30f5000Smrg dldir=$destdir/`dirname \$dlpath`~ 5895c30f5000Smrg test -d \$dldir || mkdir -p \$dldir~ 5896c30f5000Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 5897c30f5000Smrg chmod a+x \$dldir/$dlname~ 5898c30f5000Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5899c30f5000Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5900c30f5000Smrg fi' 5901c30f5000Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5902c30f5000Smrg dlpath=$dir/\$dldll~ 5903c30f5000Smrg $RM \$dlpath' 5904c30f5000Smrg shlibpath_overrides_runpath=yes 590567ab2ff2Smrg 5906c30f5000Smrg case $host_os in 5907c30f5000Smrg cygwin*) 5908c30f5000Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5909c30f5000Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5910c30f5000Smrgm4_if([$1], [],[ 5911c30f5000Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5912c30f5000Smrg ;; 5913c30f5000Smrg mingw* | cegcc*) 5914c30f5000Smrg # MinGW DLLs use traditional 'lib' prefix 5915c30f5000Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5916c30f5000Smrg ;; 5917c30f5000Smrg pw32*) 5918c30f5000Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 5919c30f5000Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5920c30f5000Smrg ;; 5921c30f5000Smrg esac 5922c30f5000Smrg dynamic_linker='Win32 ld.exe' 5923c30f5000Smrg ;; 5924f05b35a2Smrg 5925c30f5000Smrg *,cl* | *,icl*) 5926c30f5000Smrg # Native MSVC or ICC 5927c30f5000Smrg libname_spec='$name' 5928c30f5000Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5929c30f5000Smrg library_names_spec='$libname.dll.lib' 593049e108a1Smrg 5931c30f5000Smrg case $build_os in 5932c30f5000Smrg mingw*) 5933c30f5000Smrg sys_lib_search_path_spec= 5934c30f5000Smrg lt_save_ifs=$IFS 5935c30f5000Smrg IFS=';' 5936c30f5000Smrg for lt_path in $LIB 5937c30f5000Smrg do 5938c30f5000Smrg IFS=$lt_save_ifs 5939c30f5000Smrg # Let DOS variable expansion print the short 8.3 style file name. 5940c30f5000Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 5941c30f5000Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 5942c30f5000Smrg done 5943c30f5000Smrg IFS=$lt_save_ifs 5944c30f5000Smrg # Convert to MSYS style. 5945c30f5000Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 5946c30f5000Smrg ;; 5947c30f5000Smrg cygwin*) 5948c30f5000Smrg # Convert to unix form, then to dos form, then back to unix form 5949c30f5000Smrg # but this time dos style (no spaces!) so that the unix form looks 5950c30f5000Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 5951c30f5000Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 5952c30f5000Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 5953c30f5000Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5954c30f5000Smrg ;; 5955c30f5000Smrg *) 5956c30f5000Smrg sys_lib_search_path_spec=$LIB 5957c30f5000Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 5958c30f5000Smrg # It is most probably a Windows format PATH. 5959c30f5000Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 5960c30f5000Smrg else 5961c30f5000Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5962c30f5000Smrg fi 5963c30f5000Smrg # FIXME: find the short name or the path components, as spaces are 5964c30f5000Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 5965c30f5000Smrg ;; 5966c30f5000Smrg esac 5967f05b35a2Smrg 5968c30f5000Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5969c30f5000Smrg postinstall_cmds='base_file=`basename \$file`~ 5970c30f5000Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5971c30f5000Smrg dldir=$destdir/`dirname \$dlpath`~ 5972c30f5000Smrg test -d \$dldir || mkdir -p \$dldir~ 5973c30f5000Smrg $install_prog $dir/$dlname \$dldir/$dlname' 5974c30f5000Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5975c30f5000Smrg dlpath=$dir/\$dldll~ 5976c30f5000Smrg $RM \$dlpath' 5977c30f5000Smrg shlibpath_overrides_runpath=yes 5978c30f5000Smrg dynamic_linker='Win32 link.exe' 5979c30f5000Smrg ;; 5980f05b35a2Smrg 5981c30f5000Smrg *) 5982c30f5000Smrg # Assume MSVC and ICC wrapper 5983c30f5000Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 5984c30f5000Smrg dynamic_linker='Win32 ld.exe' 5985c30f5000Smrg ;; 5986c30f5000Smrg esac 5987c30f5000Smrg # FIXME: first we should search . and the directory the executable is in 5988c30f5000Smrg shlibpath_var=PATH 5989c30f5000Smrg ;; 5990f05b35a2Smrg 5991c30f5000Smrgdarwin* | rhapsody*) 5992c30f5000Smrg dynamic_linker="$host_os dyld" 5993c30f5000Smrg version_type=darwin 5994c30f5000Smrg need_lib_prefix=no 5995c30f5000Smrg need_version=no 5996c30f5000Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 5997c30f5000Smrg soname_spec='$libname$release$major$shared_ext' 5998c30f5000Smrg shlibpath_overrides_runpath=yes 5999c30f5000Smrg shlibpath_var=DYLD_LIBRARY_PATH 6000c30f5000Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6001c30f5000Smrgm4_if([$1], [],[ 6002c30f5000Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6003c30f5000Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6004c30f5000Smrg ;; 6005f05b35a2Smrg 6006c30f5000Smrgdgux*) 6007c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6008c30f5000Smrg need_lib_prefix=no 6009c30f5000Smrg need_version=no 6010c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6011c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6012c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6013c30f5000Smrg ;; 6014f05b35a2Smrg 6015c30f5000Smrgfreebsd* | dragonfly* | midnightbsd*) 6016c30f5000Smrg # DragonFly does not have aout. When/if they implement a new 6017c30f5000Smrg # versioning mechanism, adjust this. 6018c30f5000Smrg if test -x /usr/bin/objformat; then 6019c30f5000Smrg objformat=`/usr/bin/objformat` 6020c30f5000Smrg else 6021c30f5000Smrg case $host_os in 6022c30f5000Smrg freebsd[[23]].*) objformat=aout ;; 6023c30f5000Smrg *) objformat=elf ;; 6024c30f5000Smrg esac 6025c30f5000Smrg fi 6026c30f5000Smrg version_type=freebsd-$objformat 6027c30f5000Smrg case $version_type in 6028c30f5000Smrg freebsd-elf*) 6029c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6030c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6031c30f5000Smrg need_version=no 6032c30f5000Smrg need_lib_prefix=no 6033c30f5000Smrg ;; 6034c30f5000Smrg freebsd-*) 6035c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6036c30f5000Smrg need_version=yes 6037c30f5000Smrg ;; 6038c30f5000Smrg esac 6039c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6040c30f5000Smrg case $host_os in 6041c30f5000Smrg freebsd2.*) 6042c30f5000Smrg shlibpath_overrides_runpath=yes 6043c30f5000Smrg ;; 6044c30f5000Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6045c30f5000Smrg shlibpath_overrides_runpath=yes 6046c30f5000Smrg hardcode_into_libs=yes 6047c30f5000Smrg ;; 6048c30f5000Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6049c30f5000Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6050c30f5000Smrg shlibpath_overrides_runpath=no 6051c30f5000Smrg hardcode_into_libs=yes 6052c30f5000Smrg ;; 6053c30f5000Smrg *) # from 4.6 on, and DragonFly 6054c30f5000Smrg shlibpath_overrides_runpath=yes 6055c30f5000Smrg hardcode_into_libs=yes 6056c30f5000Smrg ;; 6057c30f5000Smrg esac 6058c30f5000Smrg ;; 6059f05b35a2Smrg 6060c30f5000Smrghaiku*) 6061c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6062c30f5000Smrg need_lib_prefix=no 6063c30f5000Smrg need_version=no 6064c30f5000Smrg dynamic_linker="$host_os runtime_loader" 6065c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6066c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6067c30f5000Smrg shlibpath_var=LIBRARY_PATH 6068c30f5000Smrg shlibpath_overrides_runpath=no 6069c30f5000Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6070c30f5000Smrg hardcode_into_libs=yes 6071c30f5000Smrg ;; 6072f05b35a2Smrg 6073c30f5000Smrghpux9* | hpux10* | hpux11*) 6074c30f5000Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 6075c30f5000Smrg # link against other versions. 6076c30f5000Smrg version_type=sunos 6077c30f5000Smrg need_lib_prefix=no 6078c30f5000Smrg need_version=no 6079c30f5000Smrg case $host_cpu in 6080c30f5000Smrg ia64*) 6081c30f5000Smrg shrext_cmds='.so' 6082c30f5000Smrg hardcode_into_libs=yes 6083c30f5000Smrg dynamic_linker="$host_os dld.so" 6084c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6085c30f5000Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6086c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6087c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6088c30f5000Smrg if test 32 = "$HPUX_IA64_MODE"; then 6089c30f5000Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6090c30f5000Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6091c30f5000Smrg else 6092c30f5000Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6093c30f5000Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6094c30f5000Smrg fi 6095c30f5000Smrg ;; 6096c30f5000Smrg hppa*64*) 6097c30f5000Smrg shrext_cmds='.sl' 6098c30f5000Smrg hardcode_into_libs=yes 6099c30f5000Smrg dynamic_linker="$host_os dld.sl" 6100c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6101c30f5000Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6102c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6103c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6104c30f5000Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6105c30f5000Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6106c30f5000Smrg ;; 6107c30f5000Smrg *) 6108c30f5000Smrg shrext_cmds='.sl' 6109c30f5000Smrg dynamic_linker="$host_os dld.sl" 6110c30f5000Smrg shlibpath_var=SHLIB_PATH 6111c30f5000Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6112c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6113c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6114c30f5000Smrg ;; 6115c30f5000Smrg esac 6116c30f5000Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6117c30f5000Smrg postinstall_cmds='chmod 555 $lib' 6118c30f5000Smrg # or fails outright, so override atomically: 6119c30f5000Smrg install_override_mode=555 6120c30f5000Smrg ;; 6121f05b35a2Smrg 6122c30f5000Smrginterix[[3-9]]*) 6123c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6124c30f5000Smrg need_lib_prefix=no 6125c30f5000Smrg need_version=no 6126c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6127c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6128c30f5000Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6129c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6130c30f5000Smrg shlibpath_overrides_runpath=no 6131c30f5000Smrg hardcode_into_libs=yes 6132c30f5000Smrg ;; 6133f05b35a2Smrg 6134c30f5000Smrgirix5* | irix6* | nonstopux*) 6135c30f5000Smrg case $host_os in 6136c30f5000Smrg nonstopux*) version_type=nonstopux ;; 6137c30f5000Smrg *) 6138c30f5000Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 6139c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6140c30f5000Smrg else 6141c30f5000Smrg version_type=irix 6142c30f5000Smrg fi ;; 6143c30f5000Smrg esac 6144c30f5000Smrg need_lib_prefix=no 6145c30f5000Smrg need_version=no 6146c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6147c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6148c30f5000Smrg case $host_os in 6149c30f5000Smrg irix5* | nonstopux*) 6150c30f5000Smrg libsuff= shlibsuff= 6151c30f5000Smrg ;; 6152c30f5000Smrg *) 6153c30f5000Smrg case $LD in # libtool.m4 will add one of these switches to LD 6154c30f5000Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6155c30f5000Smrg libsuff= shlibsuff= libmagic=32-bit;; 6156c30f5000Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6157c30f5000Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6158c30f5000Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6159c30f5000Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6160c30f5000Smrg *) libsuff= shlibsuff= libmagic=never-match;; 6161c30f5000Smrg esac 6162c30f5000Smrg ;; 6163c30f5000Smrg esac 6164c30f5000Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6165c30f5000Smrg shlibpath_overrides_runpath=no 6166c30f5000Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6167c30f5000Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6168c30f5000Smrg hardcode_into_libs=yes 6169c30f5000Smrg ;; 6170f05b35a2Smrg 6171c30f5000Smrg# No shared lib support for Linux oldld, aout, or coff. 6172c30f5000Smrglinux*oldld* | linux*aout* | linux*coff*) 6173c30f5000Smrg dynamic_linker=no 6174c30f5000Smrg ;; 617567ab2ff2Smrg 6176c30f5000Smrglinux*android*) 6177c30f5000Smrg version_type=none # Android doesn't support versioned libraries. 6178c30f5000Smrg need_lib_prefix=no 6179c30f5000Smrg need_version=no 6180c30f5000Smrg library_names_spec='$libname$release$shared_ext' 6181c30f5000Smrg soname_spec='$libname$release$shared_ext' 6182c30f5000Smrg finish_cmds= 6183c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6184c30f5000Smrg shlibpath_overrides_runpath=yes 6185e0963edeSmrg 6186c30f5000Smrg # This implies no fast_install, which is unacceptable. 6187c30f5000Smrg # Some rework will be needed to allow for fast_install 6188c30f5000Smrg # before this can be enabled. 6189c30f5000Smrg hardcode_into_libs=yes 6190f05b35a2Smrg 6191c30f5000Smrg dynamic_linker='Android linker' 6192c30f5000Smrg # Don't embed -rpath directories since the linker doesn't support them. 6193c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6194c30f5000Smrg ;; 6195e0963edeSmrg 6196c30f5000Smrg# This must be glibc/ELF. 6197c30f5000Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6198c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6199c30f5000Smrg need_lib_prefix=no 6200c30f5000Smrg need_version=no 6201c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6202c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6203c30f5000Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6204c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6205c30f5000Smrg shlibpath_overrides_runpath=no 6206f05b35a2Smrg 6207c30f5000Smrg # Some binutils ld are patched to set DT_RUNPATH 6208c30f5000Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6209c30f5000Smrg [lt_cv_shlibpath_overrides_runpath=no 6210c30f5000Smrg save_LDFLAGS=$LDFLAGS 6211c30f5000Smrg save_libdir=$libdir 6212c30f5000Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6213c30f5000Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6214c30f5000Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6215c30f5000Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6216c30f5000Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6217c30f5000Smrg LDFLAGS=$save_LDFLAGS 6218c30f5000Smrg libdir=$save_libdir 6219c30f5000Smrg ]) 6220c30f5000Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6221f05b35a2Smrg 6222c30f5000Smrg # This implies no fast_install, which is unacceptable. 6223c30f5000Smrg # Some rework will be needed to allow for fast_install 6224c30f5000Smrg # before this can be enabled. 6225c30f5000Smrg hardcode_into_libs=yes 6226f05b35a2Smrg 6227c30f5000Smrg # Ideally, we could use ldconfig to report *all* directores which are 6228c30f5000Smrg # searched for libraries, however this is still not possible. Aside from not 6229c30f5000Smrg # being certain /sbin/ldconfig is available, command 6230c30f5000Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6231c30f5000Smrg # even though it is searched at run-time. Try to do the best guess by 6232c30f5000Smrg # appending ld.so.conf contents (and includes) to the search path. 6233c30f5000Smrg if test -f /etc/ld.so.conf; then 6234c30f5000Smrg 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' ' '` 6235c30f5000Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6236c30f5000Smrg fi 6237f05b35a2Smrg 6238c30f5000Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6239c30f5000Smrg # powerpc, because MkLinux only supported shared libraries with the 6240c30f5000Smrg # GNU dynamic linker. Since this was broken with cross compilers, 6241c30f5000Smrg # most powerpc-linux boxes support dynamic linking these days and 6242c30f5000Smrg # people can always --disable-shared, the test was removed, and we 6243c30f5000Smrg # assume the GNU/Linux dynamic linker is in use. 6244c30f5000Smrg dynamic_linker='GNU/Linux ld.so' 6245c30f5000Smrg ;; 6246f05b35a2Smrg 6247c30f5000Smrgnetbsd*) 6248c30f5000Smrg version_type=sunos 6249c30f5000Smrg need_lib_prefix=no 6250c30f5000Smrg need_version=no 6251c30f5000Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6252c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6253c30f5000Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6254c30f5000Smrg dynamic_linker='NetBSD (a.out) ld.so' 6255c30f5000Smrg else 6256c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6257c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6258c30f5000Smrg dynamic_linker='NetBSD ld.elf_so' 6259c30f5000Smrg fi 6260c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6261c30f5000Smrg shlibpath_overrides_runpath=yes 6262c30f5000Smrg hardcode_into_libs=yes 6263c30f5000Smrg ;; 6264f05b35a2Smrg 6265c30f5000Smrgnewsos6) 6266c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6267c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6268c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6269c30f5000Smrg shlibpath_overrides_runpath=yes 6270c30f5000Smrg ;; 6271f05b35a2Smrg 6272c30f5000Smrg*nto* | *qnx*) 6273c30f5000Smrg version_type=qnx 6274c30f5000Smrg need_lib_prefix=no 6275c30f5000Smrg need_version=no 6276c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6277c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6278c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6279c30f5000Smrg shlibpath_overrides_runpath=no 6280c30f5000Smrg hardcode_into_libs=yes 6281c30f5000Smrg dynamic_linker='ldqnx.so' 6282c30f5000Smrg ;; 6283f05b35a2Smrg 6284c30f5000Smrgopenbsd* | bitrig*) 6285c30f5000Smrg version_type=sunos 6286c30f5000Smrg sys_lib_dlsearch_path_spec=/usr/lib 6287c30f5000Smrg need_lib_prefix=no 6288c30f5000Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6289c30f5000Smrg need_version=no 6290c30f5000Smrg else 6291c30f5000Smrg need_version=yes 6292c30f5000Smrg fi 6293c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6294c30f5000Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6295c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6296c30f5000Smrg shlibpath_overrides_runpath=yes 6297c30f5000Smrg ;; 6298f05b35a2Smrg 6299c30f5000Smrgos2*) 6300c30f5000Smrg libname_spec='$name' 6301c30f5000Smrg version_type=windows 6302c30f5000Smrg shrext_cmds=.dll 6303c30f5000Smrg need_version=no 6304c30f5000Smrg need_lib_prefix=no 6305c30f5000Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6306c30f5000Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6307c30f5000Smrg v=$($ECHO $release$versuffix | tr -d .-); 6308c30f5000Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6309c30f5000Smrg $ECHO $n$v`$shared_ext' 6310c30f5000Smrg library_names_spec='${libname}_dll.$libext' 6311c30f5000Smrg dynamic_linker='OS/2 ld.exe' 6312c30f5000Smrg shlibpath_var=BEGINLIBPATH 6313c30f5000Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6314c30f5000Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6315c30f5000Smrg postinstall_cmds='base_file=`basename \$file`~ 6316c30f5000Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6317c30f5000Smrg dldir=$destdir/`dirname \$dlpath`~ 6318c30f5000Smrg test -d \$dldir || mkdir -p \$dldir~ 6319c30f5000Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 6320c30f5000Smrg chmod a+x \$dldir/$dlname~ 6321c30f5000Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6322c30f5000Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6323c30f5000Smrg fi' 6324c30f5000Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6325c30f5000Smrg dlpath=$dir/\$dldll~ 6326c30f5000Smrg $RM \$dlpath' 6327c30f5000Smrg ;; 6328f05b35a2Smrg 6329c30f5000Smrgosf3* | osf4* | osf5*) 6330c30f5000Smrg version_type=osf 6331c30f5000Smrg need_lib_prefix=no 6332c30f5000Smrg need_version=no 6333c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6334c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6335c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6336c30f5000Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6337c30f5000Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6338c30f5000Smrg ;; 6339f05b35a2Smrg 6340c30f5000Smrgrdos*) 6341c30f5000Smrg dynamic_linker=no 6342c30f5000Smrg ;; 6343f05b35a2Smrg 6344c30f5000Smrgsolaris*) 6345c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6346c30f5000Smrg need_lib_prefix=no 6347c30f5000Smrg need_version=no 6348c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6349c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6350c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6351c30f5000Smrg shlibpath_overrides_runpath=yes 6352c30f5000Smrg hardcode_into_libs=yes 6353c30f5000Smrg # ldd complains unless libraries are executable 6354c30f5000Smrg postinstall_cmds='chmod +x $lib' 6355c30f5000Smrg ;; 6356f05b35a2Smrg 6357c30f5000Smrgsunos4*) 6358c30f5000Smrg version_type=sunos 6359c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6360c30f5000Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6361c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6362c30f5000Smrg shlibpath_overrides_runpath=yes 6363c30f5000Smrg if test yes = "$with_gnu_ld"; then 6364c30f5000Smrg need_lib_prefix=no 6365c30f5000Smrg fi 6366c30f5000Smrg need_version=yes 6367c30f5000Smrg ;; 6368e0963edeSmrg 6369c30f5000Smrgsysv4 | sysv4.3*) 6370c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6371c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6372c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6373c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6374c30f5000Smrg case $host_vendor in 6375c30f5000Smrg sni) 6376c30f5000Smrg shlibpath_overrides_runpath=no 6377c30f5000Smrg need_lib_prefix=no 6378c30f5000Smrg runpath_var=LD_RUN_PATH 6379c30f5000Smrg ;; 6380c30f5000Smrg siemens) 6381c30f5000Smrg need_lib_prefix=no 6382c30f5000Smrg ;; 6383c30f5000Smrg motorola) 6384c30f5000Smrg need_lib_prefix=no 6385c30f5000Smrg need_version=no 6386c30f5000Smrg shlibpath_overrides_runpath=no 6387c30f5000Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6388c30f5000Smrg ;; 638967ab2ff2Smrg esac 6390c30f5000Smrg ;; 639167ab2ff2Smrg 6392c30f5000Smrgsysv4*MP*) 6393c30f5000Smrg if test -d /usr/nec; then 6394c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6395c30f5000Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6396c30f5000Smrg soname_spec='$libname$shared_ext.$major' 6397c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6398c30f5000Smrg fi 6399c30f5000Smrg ;; 6400b3a827e2Smrg 6401c30f5000Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6402c30f5000Smrg version_type=sco 6403c30f5000Smrg need_lib_prefix=no 6404c30f5000Smrg need_version=no 6405c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6406c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6407c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6408c30f5000Smrg shlibpath_overrides_runpath=yes 6409c30f5000Smrg hardcode_into_libs=yes 6410c30f5000Smrg if test yes = "$with_gnu_ld"; then 6411c30f5000Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6412c30f5000Smrg else 6413c30f5000Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6414c30f5000Smrg case $host_os in 6415c30f5000Smrg sco3.2v5*) 6416c30f5000Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6417c30f5000Smrg ;; 6418c30f5000Smrg esac 6419c30f5000Smrg fi 6420c30f5000Smrg sys_lib_dlsearch_path_spec='/usr/lib' 6421c30f5000Smrg ;; 6422e0963edeSmrg 6423c30f5000Smrgtpf*) 6424c30f5000Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6425c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6426c30f5000Smrg need_lib_prefix=no 6427c30f5000Smrg need_version=no 6428c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6429c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6430c30f5000Smrg shlibpath_overrides_runpath=no 6431c30f5000Smrg hardcode_into_libs=yes 6432c30f5000Smrg ;; 6433e0963edeSmrg 6434c30f5000Smrguts4*) 6435c30f5000Smrg version_type=linux # correct to gnu/linux during the next big refactor 6436c30f5000Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6437c30f5000Smrg soname_spec='$libname$release$shared_ext$major' 6438c30f5000Smrg shlibpath_var=LD_LIBRARY_PATH 6439c30f5000Smrg ;; 6440c30f5000Smrg 6441c30f5000Smrg*) 6442c30f5000Smrg dynamic_linker=no 6443c30f5000Smrg ;; 644467ab2ff2Smrgesac 6445c30f5000SmrgAC_MSG_RESULT([$dynamic_linker]) 6446c30f5000Smrgtest no = "$dynamic_linker" && can_build_shared=no 6447e0963edeSmrg 6448c30f5000Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6449c30f5000Smrgif test yes = "$GCC"; then 6450c30f5000Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6451c30f5000Smrgfi 6452e0963edeSmrg 6453c30f5000Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6454c30f5000Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6455c30f5000Smrgfi 6456e0963edeSmrg 6457c30f5000Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6458c30f5000Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6459c30f5000Smrgfi 6460e0963edeSmrg 6461c30f5000Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6462c30f5000Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6463e0963edeSmrg 6464c30f5000Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6465c30f5000Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 6466c30f5000Smrg 6467c30f5000Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6468c30f5000Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6469c30f5000Smrg 6470c30f5000Smrg_LT_DECL([], [variables_saved_for_relink], [1], 6471c30f5000Smrg [Variables whose values should be saved in libtool wrapper scripts and 6472c30f5000Smrg restored at link time]) 6473c30f5000Smrg_LT_DECL([], [need_lib_prefix], [0], 6474c30f5000Smrg [Do we need the "lib" prefix for modules?]) 6475c30f5000Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6476c30f5000Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 6477c30f5000Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6478c30f5000Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6479c30f5000Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 6480c30f5000Smrg [Is shlibpath searched before the hard-coded library search path?]) 6481c30f5000Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6482c30f5000Smrg_LT_DECL([], [library_names_spec], [1], 6483c30f5000Smrg [[List of archive names. First name is the real one, the rest are links. 6484c30f5000Smrg The last name is the one that the linker finds with -lNAME]]) 6485c30f5000Smrg_LT_DECL([], [soname_spec], [1], 6486c30f5000Smrg [[The coded name of the library, if different from the real name]]) 6487c30f5000Smrg_LT_DECL([], [install_override_mode], [1], 6488c30f5000Smrg [Permission mode override for installation of shared libraries]) 6489c30f5000Smrg_LT_DECL([], [postinstall_cmds], [2], 6490c30f5000Smrg [Command to use after installation of a shared archive]) 6491c30f5000Smrg_LT_DECL([], [postuninstall_cmds], [2], 6492c30f5000Smrg [Command to use after uninstallation of a shared archive]) 6493c30f5000Smrg_LT_DECL([], [finish_cmds], [2], 6494c30f5000Smrg [Commands used to finish a libtool library installation in a directory]) 6495c30f5000Smrg_LT_DECL([], [finish_eval], [1], 6496c30f5000Smrg [[As "finish_cmds", except a single script fragment to be evaled but 6497c30f5000Smrg not shown]]) 6498c30f5000Smrg_LT_DECL([], [hardcode_into_libs], [0], 6499c30f5000Smrg [Whether we should hardcode library paths into libraries]) 6500c30f5000Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 6501c30f5000Smrg [Compile-time system search path for libraries]) 6502c30f5000Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6503c30f5000Smrg [Detected run-time system search path for libraries]) 6504c30f5000Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6505c30f5000Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6506c30f5000Smrg])# _LT_SYS_DYNAMIC_LINKER 6507e0963edeSmrg 6508e0963edeSmrg 6509c30f5000Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 6510c30f5000Smrg# -------------------------- 6511c30f5000Smrg# find a file program that can recognize shared library 6512c30f5000SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 6513c30f5000Smrg[m4_require([_LT_DECL_EGREP])dnl 6514c30f5000SmrgAC_MSG_CHECKING([for $1]) 6515c30f5000SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6516c30f5000Smrg[case $MAGIC_CMD in 6517c30f5000Smrg[[\\/*] | ?:[\\/]*]) 6518c30f5000Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6519c30f5000Smrg ;; 6520c30f5000Smrg*) 6521c30f5000Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 6522c30f5000Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6523c30f5000Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 6524c30f5000Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 6525c30f5000Smrgdnl not every word. This closes a longstanding sh security hole. 6526c30f5000Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 6527c30f5000Smrg for ac_dir in $ac_dummy; do 6528c30f5000Smrg IFS=$lt_save_ifs 6529c30f5000Smrg test -z "$ac_dir" && ac_dir=. 6530c30f5000Smrg if test -f "$ac_dir/$1"; then 6531c30f5000Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6532c30f5000Smrg if test -n "$file_magic_test_file"; then 6533c30f5000Smrg case $deplibs_check_method in 6534c30f5000Smrg "file_magic "*) 6535c30f5000Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6536c30f5000Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6537c30f5000Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6538c30f5000Smrg $EGREP "$file_magic_regex" > /dev/null; then 6539c30f5000Smrg : 6540c30f5000Smrg else 6541c30f5000Smrg cat <<_LT_EOF 1>&2 6542e0963edeSmrg 6543c30f5000Smrg*** Warning: the command libtool uses to detect shared libraries, 6544c30f5000Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 6545c30f5000Smrg*** The result is that libtool may fail to recognize shared libraries 6546c30f5000Smrg*** as such. This will affect the creation of libtool libraries that 6547c30f5000Smrg*** depend on shared libraries, but programs linked with such libtool 6548c30f5000Smrg*** libraries will work regardless of this problem. Nevertheless, you 6549c30f5000Smrg*** may want to report the problem to your system manager and/or to 6550c30f5000Smrg*** bug-libtool@gnu.org 6551e0963edeSmrg 6552c30f5000Smrg_LT_EOF 6553c30f5000Smrg fi ;; 6554c30f5000Smrg esac 6555c30f5000Smrg fi 6556c30f5000Smrg break 6557c30f5000Smrg fi 655867ab2ff2Smrg done 6559c30f5000Smrg IFS=$lt_save_ifs 6560c30f5000Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 6561c30f5000Smrg ;; 6562c30f5000Smrgesac]) 6563c30f5000SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 6564c30f5000Smrgif test -n "$MAGIC_CMD"; then 6565c30f5000Smrg AC_MSG_RESULT($MAGIC_CMD) 656667ab2ff2Smrgelse 6567c30f5000Smrg AC_MSG_RESULT(no) 656867ab2ff2Smrgfi 6569c30f5000Smrg_LT_DECL([], [MAGIC_CMD], [0], 6570c30f5000Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6571c30f5000Smrg])# _LT_PATH_TOOL_PREFIX 6572e0963edeSmrg 6573c30f5000Smrg# Old name: 6574c30f5000SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6575c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 6576c30f5000Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 6577f05b35a2Smrg 6578e0963edeSmrg 6579c30f5000Smrg# _LT_PATH_MAGIC 6580c30f5000Smrg# -------------- 6581c30f5000Smrg# find a file program that can recognize a shared library 6582c30f5000Smrgm4_defun([_LT_PATH_MAGIC], 6583c30f5000Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6584c30f5000Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 6585c30f5000Smrg if test -n "$ac_tool_prefix"; then 6586c30f5000Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6587c30f5000Smrg else 6588c30f5000Smrg MAGIC_CMD=: 6589c30f5000Smrg fi 659067ab2ff2Smrgfi 6591c30f5000Smrg])# _LT_PATH_MAGIC 6592e0963edeSmrg 6593e0963edeSmrg 6594c30f5000Smrg# LT_PATH_LD 6595c30f5000Smrg# ---------- 6596c30f5000Smrg# find the pathname to the GNU or non-GNU linker 6597c30f5000SmrgAC_DEFUN([LT_PATH_LD], 6598c30f5000Smrg[AC_REQUIRE([AC_PROG_CC])dnl 6599c30f5000SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 6600c30f5000SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 6601c30f5000Smrgm4_require([_LT_DECL_SED])dnl 6602c30f5000Smrgm4_require([_LT_DECL_EGREP])dnl 6603c30f5000Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 6604e0963edeSmrg 6605c30f5000SmrgAC_ARG_WITH([gnu-ld], 6606c30f5000Smrg [AS_HELP_STRING([--with-gnu-ld], 6607c30f5000Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6608c30f5000Smrg [test no = "$withval" || with_gnu_ld=yes], 6609c30f5000Smrg [with_gnu_ld=no])dnl 6610e0963edeSmrg 6611c30f5000Smrgac_prog=ld 6612c30f5000Smrgif test yes = "$GCC"; then 6613c30f5000Smrg # Check if gcc -print-prog-name=ld gives a path. 6614c30f5000Smrg AC_MSG_CHECKING([for ld used by $CC]) 6615c30f5000Smrg case $host in 6616c30f5000Smrg *-*-mingw*) 6617c30f5000Smrg # gcc leaves a trailing carriage return, which upsets mingw 6618c30f5000Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6619c30f5000Smrg *) 6620c30f5000Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6621c30f5000Smrg esac 6622c30f5000Smrg case $ac_prog in 6623c30f5000Smrg # Accept absolute paths. 6624c30f5000Smrg [[\\/]]* | ?:[[\\/]]*) 6625c30f5000Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 6626c30f5000Smrg # Canonicalize the pathname of ld 6627c30f5000Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6628c30f5000Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6629c30f5000Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6630c30f5000Smrg done 6631c30f5000Smrg test -z "$LD" && LD=$ac_prog 6632c30f5000Smrg ;; 6633c30f5000Smrg "") 6634c30f5000Smrg # If it fails, then pretend we aren't using GCC. 6635c30f5000Smrg ac_prog=ld 6636c30f5000Smrg ;; 6637c30f5000Smrg *) 6638c30f5000Smrg # If it is relative, then search for the first ld in PATH. 6639c30f5000Smrg with_gnu_ld=unknown 6640c30f5000Smrg ;; 6641c30f5000Smrg esac 6642c30f5000Smrgelif test yes = "$with_gnu_ld"; then 6643c30f5000Smrg AC_MSG_CHECKING([for GNU ld]) 6644c30f5000Smrgelse 6645c30f5000Smrg AC_MSG_CHECKING([for non-GNU ld]) 6646c30f5000Smrgfi 6647c30f5000SmrgAC_CACHE_VAL(lt_cv_path_LD, 6648c30f5000Smrg[if test -z "$LD"; then 6649c30f5000Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6650c30f5000Smrg for ac_dir in $PATH; do 6651c30f5000Smrg IFS=$lt_save_ifs 6652c30f5000Smrg test -z "$ac_dir" && ac_dir=. 6653c30f5000Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6654c30f5000Smrg lt_cv_path_LD=$ac_dir/$ac_prog 6655c30f5000Smrg # Check to see if the program is GNU ld. I'd rather use --version, 6656c30f5000Smrg # but apparently some variants of GNU ld only accept -v. 6657c30f5000Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 6658c30f5000Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6659c30f5000Smrg *GNU* | *'with BFD'*) 6660c30f5000Smrg test no != "$with_gnu_ld" && break 6661c30f5000Smrg ;; 6662c30f5000Smrg *) 6663c30f5000Smrg test yes != "$with_gnu_ld" && break 6664c30f5000Smrg ;; 6665c30f5000Smrg esac 6666c30f5000Smrg fi 6667c30f5000Smrg done 6668c30f5000Smrg IFS=$lt_save_ifs 6669c30f5000Smrgelse 6670c30f5000Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 6671c30f5000Smrgfi]) 6672c30f5000SmrgLD=$lt_cv_path_LD 6673c30f5000Smrgif test -n "$LD"; then 6674c30f5000Smrg AC_MSG_RESULT($LD) 6675c30f5000Smrgelse 6676c30f5000Smrg AC_MSG_RESULT(no) 6677c30f5000Smrgfi 6678c30f5000Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6679c30f5000Smrg_LT_PATH_LD_GNU 6680c30f5000SmrgAC_SUBST([LD]) 6681e0963edeSmrg 6682c30f5000Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6683c30f5000Smrg])# LT_PATH_LD 6684e0963edeSmrg 6685c30f5000Smrg# Old names: 6686c30f5000SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6687c30f5000SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6688c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 6689c30f5000Smrgdnl AC_DEFUN([AM_PROG_LD], []) 6690c30f5000Smrgdnl AC_DEFUN([AC_PROG_LD], []) 669167ab2ff2Smrg 669267ab2ff2Smrg 6693c30f5000Smrg# _LT_PATH_LD_GNU 6694c30f5000Smrg#- -------------- 6695c30f5000Smrgm4_defun([_LT_PATH_LD_GNU], 6696c30f5000Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6697c30f5000Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6698c30f5000Smrgcase `$LD -v 2>&1 </dev/null` in 6699c30f5000Smrg*GNU* | *'with BFD'*) 6700c30f5000Smrg lt_cv_prog_gnu_ld=yes 6701c30f5000Smrg ;; 6702c30f5000Smrg*) 6703c30f5000Smrg lt_cv_prog_gnu_ld=no 6704c30f5000Smrg ;; 6705c30f5000Smrgesac]) 6706c30f5000Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 6707c30f5000Smrg])# _LT_PATH_LD_GNU 6708e0963edeSmrg 6709e0963edeSmrg 6710c30f5000Smrg# _LT_CMD_RELOAD 6711c30f5000Smrg# -------------- 6712c30f5000Smrg# find reload flag for linker 6713c30f5000Smrg# -- PORTME Some linkers may need a different reload flag. 6714c30f5000Smrgm4_defun([_LT_CMD_RELOAD], 6715c30f5000Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 6716c30f5000Smrg lt_cv_ld_reload_flag, 6717c30f5000Smrg [lt_cv_ld_reload_flag='-r']) 6718c30f5000Smrgreload_flag=$lt_cv_ld_reload_flag 6719c30f5000Smrgcase $reload_flag in 6720c30f5000Smrg"" | " "*) ;; 6721c30f5000Smrg*) reload_flag=" $reload_flag" ;; 6722c30f5000Smrgesac 6723c30f5000Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 6724c30f5000Smrgcase $host_os in 6725c30f5000Smrg cygwin* | mingw* | pw32* | cegcc*) 6726c30f5000Smrg if test yes != "$GCC"; then 6727c30f5000Smrg reload_cmds=false 6728c30f5000Smrg fi 6729c30f5000Smrg ;; 6730c30f5000Smrg darwin*) 6731c30f5000Smrg if test yes = "$GCC"; then 6732c30f5000Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6733c30f5000Smrg else 6734c30f5000Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 6735c30f5000Smrg fi 6736c30f5000Smrg ;; 6737c30f5000Smrgesac 6738c30f5000Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6739c30f5000Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 6740c30f5000Smrg])# _LT_CMD_RELOAD 6741e0963edeSmrg 6742f05b35a2Smrg 6743c30f5000Smrg# _LT_PATH_DD 6744c30f5000Smrg# ----------- 6745c30f5000Smrg# find a working dd 6746c30f5000Smrgm4_defun([_LT_PATH_DD], 6747c30f5000Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6748c30f5000Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6749c30f5000Smrgcat conftest.i conftest.i >conftest2.i 6750c30f5000Smrg: ${lt_DD:=$DD} 6751c30f5000SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6752c30f5000Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6753c30f5000Smrg cmp -s conftest.i conftest.out \ 6754c30f5000Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6755c30f5000Smrgfi]) 6756c30f5000Smrgrm -f conftest.i conftest2.i conftest.out]) 6757c30f5000Smrg])# _LT_PATH_DD 6758e0963edeSmrg 6759e0963edeSmrg 6760c30f5000Smrg# _LT_CMD_TRUNCATE 6761c30f5000Smrg# ---------------- 6762c30f5000Smrg# find command to truncate a binary pipe 6763c30f5000Smrgm4_defun([_LT_CMD_TRUNCATE], 6764c30f5000Smrg[m4_require([_LT_PATH_DD]) 6765c30f5000SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6766c30f5000Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6767c30f5000Smrgcat conftest.i conftest.i >conftest2.i 6768c30f5000Smrglt_cv_truncate_bin= 6769c30f5000Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6770c30f5000Smrg cmp -s conftest.i conftest.out \ 6771c30f5000Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6772c30f5000Smrgfi 6773c30f5000Smrgrm -f conftest.i conftest2.i conftest.out 6774c30f5000Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6775c30f5000Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6776c30f5000Smrg [Command to truncate a binary pipe]) 6777c30f5000Smrg])# _LT_CMD_TRUNCATE 6778e0963edeSmrg 6779e0963edeSmrg 6780c30f5000Smrg# _LT_CHECK_MAGIC_METHOD 6781c30f5000Smrg# ---------------------- 6782c30f5000Smrg# how to check for library dependencies 6783c30f5000Smrg# -- PORTME fill in with the dynamic library characteristics 6784c30f5000Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 6785c30f5000Smrg[m4_require([_LT_DECL_EGREP]) 6786c30f5000Smrgm4_require([_LT_DECL_OBJDUMP]) 6787c30f5000SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 6788c30f5000Smrglt_cv_deplibs_check_method, 6789c30f5000Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 6790c30f5000Smrglt_cv_file_magic_test_file= 6791c30f5000Smrglt_cv_deplibs_check_method='unknown' 6792c30f5000Smrg# Need to set the preceding variable on all platforms that support 6793c30f5000Smrg# interlibrary dependencies. 6794c30f5000Smrg# 'none' -- dependencies not supported. 6795c30f5000Smrg# 'unknown' -- same as none, but documents that we really don't know. 6796c30f5000Smrg# 'pass_all' -- all dependencies passed with no checks. 6797c30f5000Smrg# 'test_compile' -- check by making test program. 6798c30f5000Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 6799c30f5000Smrg# that responds to the $file_magic_cmd with a given extended regex. 6800c30f5000Smrg# If you have 'file' or equivalent on your system and you're not sure 6801c30f5000Smrg# whether 'pass_all' will *always* work, you probably want this one. 680267ab2ff2Smrg 6803c30f5000Smrgcase $host_os in 6804c30f5000Smrgaix[[4-9]]*) 6805c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6806c30f5000Smrg ;; 680767ab2ff2Smrg 6808c30f5000Smrgbeos*) 6809c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6810c30f5000Smrg ;; 681167ab2ff2Smrg 6812c30f5000Smrgbsdi[[45]]*) 6813c30f5000Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6814c30f5000Smrg lt_cv_file_magic_cmd='$FILECMD -L' 6815c30f5000Smrg lt_cv_file_magic_test_file=/shlib/libc.so 6816c30f5000Smrg ;; 681767ab2ff2Smrg 6818c30f5000Smrgcygwin*) 6819c30f5000Smrg # func_win32_libid is a shell function defined in ltmain.sh 6820c30f5000Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6821c30f5000Smrg lt_cv_file_magic_cmd='func_win32_libid' 6822c30f5000Smrg ;; 6823e0963edeSmrg 6824c30f5000Smrgmingw* | pw32*) 6825c30f5000Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 6826c30f5000Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 6827c30f5000Smrg # unless we find 'file', for example because we are cross-compiling. 6828c30f5000Smrg if ( file / ) >/dev/null 2>&1; then 6829c30f5000Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6830c30f5000Smrg lt_cv_file_magic_cmd='func_win32_libid' 6831c30f5000Smrg else 6832c30f5000Smrg # Keep this pattern in sync with the one in func_win32_libid. 6833c30f5000Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6834c30f5000Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6835c30f5000Smrg fi 6836c30f5000Smrg ;; 6837e0963edeSmrg 6838c30f5000Smrgcegcc*) 6839c30f5000Smrg # use the weaker test based on 'objdump'. See mingw*. 6840c30f5000Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6841c30f5000Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6842c30f5000Smrg ;; 6843f05b35a2Smrg 6844c30f5000Smrgdarwin* | rhapsody*) 6845c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6846c30f5000Smrg ;; 6847e0963edeSmrg 6848c30f5000Smrgfreebsd* | dragonfly* | midnightbsd*) 6849c30f5000Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6850c30f5000Smrg case $host_cpu in 6851c30f5000Smrg i*86 ) 6852c30f5000Smrg # Not sure whether the presence of OpenBSD here was a mistake. 6853c30f5000Smrg # Let's accept both of them until this is cleared up. 6854c30f5000Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6855c30f5000Smrg lt_cv_file_magic_cmd=$FILECMD 6856c30f5000Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6857c30f5000Smrg ;; 6858c30f5000Smrg esac 6859c30f5000Smrg else 6860c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6861c30f5000Smrg fi 6862c30f5000Smrg ;; 6863e0963edeSmrg 6864c30f5000Smrghaiku*) 6865c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6866c30f5000Smrg ;; 6867e0963edeSmrg 6868c30f5000Smrghpux10.20* | hpux11*) 6869c30f5000Smrg lt_cv_file_magic_cmd=$FILECMD 6870c30f5000Smrg case $host_cpu in 6871c30f5000Smrg ia64*) 6872c30f5000Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6873c30f5000Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6874c30f5000Smrg ;; 6875c30f5000Smrg hppa*64*) 6876c30f5000Smrg [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]'] 6877c30f5000Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6878c30f5000Smrg ;; 6879c30f5000Smrg *) 6880c30f5000Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6881c30f5000Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 6882c30f5000Smrg ;; 6883c30f5000Smrg esac 6884c30f5000Smrg ;; 6885e0963edeSmrg 6886c30f5000Smrginterix[[3-9]]*) 6887c30f5000Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6888c30f5000Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6889c30f5000Smrg ;; 6890e0963edeSmrg 6891c30f5000Smrgirix5* | irix6* | nonstopux*) 6892c30f5000Smrg case $LD in 6893c30f5000Smrg *-32|*"-32 ") libmagic=32-bit;; 6894c30f5000Smrg *-n32|*"-n32 ") libmagic=N32;; 6895c30f5000Smrg *-64|*"-64 ") libmagic=64-bit;; 6896c30f5000Smrg *) libmagic=never-match;; 6897c30f5000Smrg esac 6898c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6899c30f5000Smrg ;; 6900e0963edeSmrg 6901c30f5000Smrg# This must be glibc/ELF. 6902c30f5000Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6903c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6904c30f5000Smrg ;; 690567ab2ff2Smrg 6906c30f5000Smrgnetbsd*) 6907c30f5000Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6908c30f5000Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6909c30f5000Smrg else 6910c30f5000Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 6911c30f5000Smrg fi 6912c30f5000Smrg ;; 691367ab2ff2Smrg 6914c30f5000Smrgnewos6*) 6915c30f5000Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 6916c30f5000Smrg lt_cv_file_magic_cmd=$FILECMD 6917c30f5000Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 6918c30f5000Smrg ;; 6919e0963edeSmrg 6920c30f5000Smrg*nto* | *qnx*) 6921c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6922c30f5000Smrg ;; 6923e0963edeSmrg 6924c30f5000Smrgopenbsd* | bitrig*) 6925c30f5000Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6926c30f5000Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6927c30f5000Smrg else 6928c30f5000Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6929c30f5000Smrg fi 6930c30f5000Smrg ;; 6931e0963edeSmrg 6932c30f5000Smrgosf3* | osf4* | osf5*) 6933c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6934c30f5000Smrg ;; 6935e0963edeSmrg 6936c30f5000Smrgrdos*) 6937c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6938c30f5000Smrg ;; 6939e0963edeSmrg 6940c30f5000Smrgsolaris*) 6941c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6942c30f5000Smrg ;; 6943e0963edeSmrg 6944c30f5000Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6945c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6946c30f5000Smrg ;; 6947c30f5000Smrg 6948c30f5000Smrgsysv4 | sysv4.3*) 6949c30f5000Smrg case $host_vendor in 6950c30f5000Smrg motorola) 6951c30f5000Smrg 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]]' 6952c30f5000Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 6953c30f5000Smrg ;; 6954c30f5000Smrg ncr) 6955c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6956c30f5000Smrg ;; 6957c30f5000Smrg sequent) 6958c30f5000Smrg lt_cv_file_magic_cmd='/bin/file' 6959c30f5000Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 6960c30f5000Smrg ;; 6961c30f5000Smrg sni) 6962c30f5000Smrg lt_cv_file_magic_cmd='/bin/file' 6963c30f5000Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 6964c30f5000Smrg lt_cv_file_magic_test_file=/lib/libc.so 6965c30f5000Smrg ;; 6966c30f5000Smrg siemens) 6967c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6968c30f5000Smrg ;; 6969c30f5000Smrg pc) 6970c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6971c30f5000Smrg ;; 6972c30f5000Smrg esac 6973c30f5000Smrg ;; 6974e0963edeSmrg 6975c30f5000Smrgtpf*) 6976c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6977c30f5000Smrg ;; 6978c30f5000Smrgos2*) 6979c30f5000Smrg lt_cv_deplibs_check_method=pass_all 6980c30f5000Smrg ;; 6981c30f5000Smrgesac 6982c30f5000Smrg]) 6983e0963edeSmrg 6984c30f5000Smrgfile_magic_glob= 6985c30f5000Smrgwant_nocaseglob=no 6986c30f5000Smrgif test "$build" = "$host"; then 6987c30f5000Smrg case $host_os in 6988c30f5000Smrg mingw* | pw32*) 6989c30f5000Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 6990c30f5000Smrg want_nocaseglob=yes 6991c30f5000Smrg else 6992c30f5000Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 6993c30f5000Smrg fi 6994c30f5000Smrg ;; 6995c30f5000Smrg esac 6996c30f5000Smrgfi 699767ab2ff2Smrg 6998c30f5000Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 6999c30f5000Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 7000c30f5000Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 700167ab2ff2Smrg 7002c30f5000Smrg_LT_DECL([], [deplibs_check_method], [1], 7003c30f5000Smrg [Method to check whether dependent libraries are shared objects]) 7004c30f5000Smrg_LT_DECL([], [file_magic_cmd], [1], 7005c30f5000Smrg [Command to use when deplibs_check_method = "file_magic"]) 7006c30f5000Smrg_LT_DECL([], [file_magic_glob], [1], 7007c30f5000Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 7008c30f5000Smrg_LT_DECL([], [want_nocaseglob], [1], 7009c30f5000Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7010c30f5000Smrg])# _LT_CHECK_MAGIC_METHOD 7011e0963edeSmrg 7012e0963edeSmrg 7013c30f5000Smrg# LT_PATH_NM 7014c30f5000Smrg# ---------- 7015c30f5000Smrg# find the pathname to a BSD- or MS-compatible name lister 7016c30f5000SmrgAC_DEFUN([LT_PATH_NM], 7017c30f5000Smrg[AC_REQUIRE([AC_PROG_CC])dnl 7018c30f5000SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7019c30f5000Smrg[if test -n "$NM"; then 7020c30f5000Smrg # Let the user override the test. 7021c30f5000Smrg lt_cv_path_NM=$NM 7022c30f5000Smrgelse 7023c30f5000Smrg lt_nm_to_check=${ac_tool_prefix}nm 7024c30f5000Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7025c30f5000Smrg lt_nm_to_check="$lt_nm_to_check nm" 7026c30f5000Smrg fi 7027c30f5000Smrg for lt_tmp_nm in $lt_nm_to_check; do 7028c30f5000Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7029c30f5000Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7030c30f5000Smrg IFS=$lt_save_ifs 7031c30f5000Smrg test -z "$ac_dir" && ac_dir=. 7032c30f5000Smrg tmp_nm=$ac_dir/$lt_tmp_nm 7033c30f5000Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7034c30f5000Smrg # Check to see if the nm accepts a BSD-compat flag. 7035c30f5000Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7036c30f5000Smrg # nm: unknown option "B" ignored 7037c30f5000Smrg # Tru64's nm complains that /dev/null is an invalid object file 7038c30f5000Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7039c30f5000Smrg case $build_os in 7040c30f5000Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7041c30f5000Smrg *) lt_bad_file=/dev/null ;; 7042c30f5000Smrg esac 7043c30f5000Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7044c30f5000Smrg *$lt_bad_file* | *'Invalid file or object type'*) 7045c30f5000Smrg lt_cv_path_NM="$tmp_nm -B" 7046c30f5000Smrg break 2 7047c30f5000Smrg ;; 7048c30f5000Smrg *) 7049c30f5000Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7050c30f5000Smrg */dev/null*) 7051c30f5000Smrg lt_cv_path_NM="$tmp_nm -p" 7052c30f5000Smrg break 2 7053c30f5000Smrg ;; 7054c30f5000Smrg *) 7055c30f5000Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7056c30f5000Smrg continue # so that we can try to find one that supports BSD flags 7057c30f5000Smrg ;; 7058c30f5000Smrg esac 7059c30f5000Smrg ;; 7060c30f5000Smrg esac 7061c30f5000Smrg fi 7062c30f5000Smrg done 7063c30f5000Smrg IFS=$lt_save_ifs 7064c30f5000Smrg done 7065c30f5000Smrg : ${lt_cv_path_NM=no} 7066c30f5000Smrgfi]) 7067c30f5000Smrgif test no != "$lt_cv_path_NM"; then 7068c30f5000Smrg NM=$lt_cv_path_NM 7069c30f5000Smrgelse 7070c30f5000Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 7071c30f5000Smrg if test -n "$DUMPBIN"; then : 7072c30f5000Smrg # Let the user override the test. 7073c30f5000Smrg else 7074c30f5000Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7075c30f5000Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7076c30f5000Smrg *COFF*) 7077c30f5000Smrg DUMPBIN="$DUMPBIN -symbols -headers" 7078c30f5000Smrg ;; 7079c30f5000Smrg *) 7080c30f5000Smrg DUMPBIN=: 7081c30f5000Smrg ;; 7082c30f5000Smrg esac 7083c30f5000Smrg fi 7084c30f5000Smrg AC_SUBST([DUMPBIN]) 7085c30f5000Smrg if test : != "$DUMPBIN"; then 7086c30f5000Smrg NM=$DUMPBIN 7087c30f5000Smrg fi 7088c30f5000Smrgfi 7089c30f5000Smrgtest -z "$NM" && NM=nm 7090c30f5000SmrgAC_SUBST([NM]) 7091c30f5000Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7092e0963edeSmrg 7093c30f5000SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7094c30f5000Smrg [lt_cv_nm_interface="BSD nm" 7095c30f5000Smrg echo "int some_variable = 0;" > conftest.$ac_ext 7096c30f5000Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7097c30f5000Smrg (eval "$ac_compile" 2>conftest.err) 7098c30f5000Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7099c30f5000Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7100c30f5000Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7101c30f5000Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7102c30f5000Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7103c30f5000Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 7104c30f5000Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7105c30f5000Smrg lt_cv_nm_interface="MS dumpbin" 7106c30f5000Smrg fi 7107c30f5000Smrg rm -f conftest*]) 7108c30f5000Smrg])# LT_PATH_NM 7109f05b35a2Smrg 7110c30f5000Smrg# Old names: 7111c30f5000SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7112c30f5000SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7113c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 7114c30f5000Smrgdnl AC_DEFUN([AM_PROG_NM], []) 7115c30f5000Smrgdnl AC_DEFUN([AC_PROG_NM], []) 7116e0963edeSmrg 7117c30f5000Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7118c30f5000Smrg# -------------------------------- 7119c30f5000Smrg# how to determine the name of the shared library 7120c30f5000Smrg# associated with a specific link library. 7121c30f5000Smrg# -- PORTME fill in with the dynamic library characteristics 7122c30f5000Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7123c30f5000Smrg[m4_require([_LT_DECL_EGREP]) 7124c30f5000Smrgm4_require([_LT_DECL_OBJDUMP]) 7125c30f5000Smrgm4_require([_LT_DECL_DLLTOOL]) 7126c30f5000SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7127c30f5000Smrglt_cv_sharedlib_from_linklib_cmd, 7128c30f5000Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7129e0963edeSmrg 7130c30f5000Smrgcase $host_os in 7131c30f5000Smrgcygwin* | mingw* | pw32* | cegcc*) 7132c30f5000Smrg # two different shell functions defined in ltmain.sh; 7133c30f5000Smrg # decide which one to use based on capabilities of $DLLTOOL 7134c30f5000Smrg case `$DLLTOOL --help 2>&1` in 7135c30f5000Smrg *--identify-strict*) 7136c30f5000Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7137c30f5000Smrg ;; 7138c30f5000Smrg *) 7139c30f5000Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7140c30f5000Smrg ;; 7141c30f5000Smrg esac 7142c30f5000Smrg ;; 7143c30f5000Smrg*) 7144c30f5000Smrg # fallback: assume linklib IS sharedlib 7145c30f5000Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7146c30f5000Smrg ;; 7147c30f5000Smrgesac 7148c30f5000Smrg]) 7149c30f5000Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7150c30f5000Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7151e0963edeSmrg 7152c30f5000Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7153c30f5000Smrg [Command to associate shared and link libraries]) 7154c30f5000Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7155e0963edeSmrg 7156e0963edeSmrg 7157c30f5000Smrg# _LT_PATH_MANIFEST_TOOL 7158c30f5000Smrg# ---------------------- 7159c30f5000Smrg# locate the manifest tool 7160c30f5000Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7161c30f5000Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7162c30f5000Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7163c30f5000SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7164c30f5000Smrg [lt_cv_path_mainfest_tool=no 7165c30f5000Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7166c30f5000Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7167c30f5000Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7168c30f5000Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7169c30f5000Smrg lt_cv_path_mainfest_tool=yes 7170c30f5000Smrg fi 7171c30f5000Smrg rm -f conftest*]) 7172c30f5000Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 7173c30f5000Smrg MANIFEST_TOOL=: 717467ab2ff2Smrgfi 7175c30f5000Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7176c30f5000Smrg])# _LT_PATH_MANIFEST_TOOL 7177e0963edeSmrg 7178e0963edeSmrg 7179c30f5000Smrg# _LT_DLL_DEF_P([FILE]) 7180c30f5000Smrg# --------------------- 7181c30f5000Smrg# True iff FILE is a Windows DLL '.def' file. 7182c30f5000Smrg# Keep in sync with func_dll_def_p in the libtool script 7183c30f5000SmrgAC_DEFUN([_LT_DLL_DEF_P], 7184c30f5000Smrg[dnl 7185c30f5000Smrg test DEF = "`$SED -n dnl 7186c30f5000Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7187c30f5000Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7188c30f5000Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7189c30f5000Smrg -e q dnl Only consider the first "real" line 7190c30f5000Smrg $1`" dnl 7191c30f5000Smrg])# _LT_DLL_DEF_P 7192f05b35a2Smrg 7193f05b35a2Smrg 7194c30f5000Smrg# LT_LIB_M 7195c30f5000Smrg# -------- 7196c30f5000Smrg# check for math library 7197c30f5000SmrgAC_DEFUN([LT_LIB_M], 7198c30f5000Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7199c30f5000SmrgLIBM= 7200c30f5000Smrgcase $host in 7201c30f5000Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7202c30f5000Smrg # These system don't have libm, or don't need it 7203c30f5000Smrg ;; 7204c30f5000Smrg*-ncr-sysv4.3*) 7205c30f5000Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7206c30f5000Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7207c30f5000Smrg ;; 7208c30f5000Smrg*) 7209c30f5000Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7210c30f5000Smrg ;; 7211c30f5000Smrgesac 7212c30f5000SmrgAC_SUBST([LIBM]) 7213c30f5000Smrg])# LT_LIB_M 7214e494fffdSmrg 7215c30f5000Smrg# Old name: 7216c30f5000SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7217c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 7218c30f5000Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7219e494fffdSmrg 7220e494fffdSmrg 7221c30f5000Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7222c30f5000Smrg# ------------------------------- 7223c30f5000Smrgm4_defun([_LT_COMPILER_NO_RTTI], 7224c30f5000Smrg[m4_require([_LT_TAG_COMPILER])dnl 7225c30f5000Smrg 7226c30f5000Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7227e494fffdSmrg 7228c30f5000Smrgif test yes = "$GCC"; then 7229c30f5000Smrg case $cc_basename in 7230c30f5000Smrg nvcc*) 7231c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7232c30f5000Smrg *) 7233c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7234c30f5000Smrg esac 7235e494fffdSmrg 7236c30f5000Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7237c30f5000Smrg lt_cv_prog_compiler_rtti_exceptions, 7238c30f5000Smrg [-fno-rtti -fno-exceptions], [], 7239c30f5000Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7240c30f5000Smrgfi 7241c30f5000Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7242c30f5000Smrg [Compiler flag to turn off builtin functions]) 7243c30f5000Smrg])# _LT_COMPILER_NO_RTTI 7244e494fffdSmrg 7245e494fffdSmrg 7246c30f5000Smrg# _LT_CMD_GLOBAL_SYMBOLS 7247c30f5000Smrg# ---------------------- 7248c30f5000Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7249c30f5000Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7250c30f5000SmrgAC_REQUIRE([AC_PROG_CC])dnl 7251c30f5000SmrgAC_REQUIRE([AC_PROG_AWK])dnl 7252c30f5000SmrgAC_REQUIRE([LT_PATH_NM])dnl 7253c30f5000SmrgAC_REQUIRE([LT_PATH_LD])dnl 7254c30f5000Smrgm4_require([_LT_DECL_SED])dnl 7255c30f5000Smrgm4_require([_LT_DECL_EGREP])dnl 7256c30f5000Smrgm4_require([_LT_TAG_COMPILER])dnl 7257e494fffdSmrg 7258c30f5000Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7259c30f5000SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7260c30f5000SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7261c30f5000Smrg[ 7262c30f5000Smrg# These are sane defaults that work on at least a few old systems. 7263c30f5000Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7264e494fffdSmrg 7265c30f5000Smrg# Character class describing NM global symbol codes. 7266c30f5000Smrgsymcode='[[BCDEGRST]]' 7267e494fffdSmrg 7268c30f5000Smrg# Regexp to match symbols that can be accessed directly from C. 7269c30f5000Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7270e494fffdSmrg 7271c30f5000Smrg# Define system-specific variables. 7272c30f5000Smrgcase $host_os in 7273c30f5000Smrgaix*) 7274c30f5000Smrg symcode='[[BCDT]]' 7275c30f5000Smrg ;; 7276c30f5000Smrgcygwin* | mingw* | pw32* | cegcc*) 7277c30f5000Smrg symcode='[[ABCDGISTW]]' 7278c30f5000Smrg ;; 7279c30f5000Smrghpux*) 7280c30f5000Smrg if test ia64 = "$host_cpu"; then 7281c30f5000Smrg symcode='[[ABCDEGRST]]' 7282c30f5000Smrg fi 7283c30f5000Smrg ;; 7284c30f5000Smrgirix* | nonstopux*) 7285c30f5000Smrg symcode='[[BCDEGRST]]' 7286c30f5000Smrg ;; 7287c30f5000Smrgosf*) 7288c30f5000Smrg symcode='[[BCDEGQRST]]' 7289c30f5000Smrg ;; 7290c30f5000Smrgsolaris*) 7291c30f5000Smrg symcode='[[BDRT]]' 7292c30f5000Smrg ;; 7293c30f5000Smrgsco3.2v5*) 7294c30f5000Smrg symcode='[[DT]]' 7295c30f5000Smrg ;; 7296c30f5000Smrgsysv4.2uw2*) 7297c30f5000Smrg symcode='[[DT]]' 7298c30f5000Smrg ;; 7299c30f5000Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7300c30f5000Smrg symcode='[[ABDT]]' 7301c30f5000Smrg ;; 7302c30f5000Smrgsysv4) 7303c30f5000Smrg symcode='[[DFNSTU]]' 7304c30f5000Smrg ;; 7305c30f5000Smrgesac 7306e494fffdSmrg 7307c30f5000Smrg# If we're using GNU nm, then use its standard symbol codes. 7308c30f5000Smrgcase `$NM -V 2>&1` in 7309c30f5000Smrg*GNU* | *'with BFD'*) 7310c30f5000Smrg symcode='[[ABCDGIRSTW]]' ;; 7311c30f5000Smrgesac 7312e494fffdSmrg 7313c30f5000Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7314c30f5000Smrg # Gets list of data symbols to import. 7315c30f5000Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7316c30f5000Smrg # Adjust the below global symbol transforms to fixup imported variables. 7317c30f5000Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7318c30f5000Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7319c30f5000Smrg lt_c_name_lib_hook="\ 7320c30f5000Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7321c30f5000Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7322c30f5000Smrgelse 7323c30f5000Smrg # Disable hooks by default. 7324c30f5000Smrg lt_cv_sys_global_symbol_to_import= 7325c30f5000Smrg lt_cdecl_hook= 7326c30f5000Smrg lt_c_name_hook= 7327c30f5000Smrg lt_c_name_lib_hook= 7328c30f5000Smrgfi 7329e494fffdSmrg 7330c30f5000Smrg# Transform an extracted symbol line into a proper C declaration. 7331c30f5000Smrg# Some systems (esp. on ia64) link data and code symbols differently, 7332c30f5000Smrg# so use this general approach. 7333c30f5000Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7334c30f5000Smrg$lt_cdecl_hook\ 7335c30f5000Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7336c30f5000Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7337e494fffdSmrg 7338c30f5000Smrg# Transform an extracted symbol line into symbol name and symbol address 7339c30f5000Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7340c30f5000Smrg$lt_c_name_hook\ 7341c30f5000Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7342c30f5000Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7343f05b35a2Smrg 7344c30f5000Smrg# Transform an extracted symbol line into symbol name with lib prefix and 7345c30f5000Smrg# symbol address. 7346c30f5000Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7347c30f5000Smrg$lt_c_name_lib_hook\ 7348c30f5000Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7349c30f5000Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7350c30f5000Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7351f05b35a2Smrg 7352c30f5000Smrg# Handle CRLF in mingw tool chain 7353c30f5000Smrgopt_cr= 7354c30f5000Smrgcase $build_os in 7355c30f5000Smrgmingw*) 7356c30f5000Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7357c30f5000Smrg ;; 7358c30f5000Smrgesac 7359f05b35a2Smrg 7360c30f5000Smrg# Try without a prefix underscore, then with it. 7361c30f5000Smrgfor ac_symprfx in "" "_"; do 7362e0963edeSmrg 7363c30f5000Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7364c30f5000Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 7365e0963edeSmrg 7366c30f5000Smrg # Write the raw and C identifiers. 7367c30f5000Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7368c30f5000Smrg # Fake it for dumpbin and say T for any non-static function, 7369c30f5000Smrg # D for any global variable and I for any imported variable. 7370c30f5000Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7371c30f5000Smrg # which start with @ or ?. 7372c30f5000Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7373c30f5000Smrg" {last_section=section; section=\$ 3};"\ 7374c30f5000Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7375c30f5000Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7376c30f5000Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7377c30f5000Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7378c30f5000Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7379c30f5000Smrg" \$ 0!~/External *\|/{next};"\ 7380c30f5000Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7381c30f5000Smrg" {if(hide[section]) next};"\ 7382c30f5000Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7383c30f5000Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7384c30f5000Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7385c30f5000Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7386c30f5000Smrg" ' prfx=^$ac_symprfx]" 7387c30f5000Smrg else 7388c30f5000Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7389c30f5000Smrg fi 7390c30f5000Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7391e0963edeSmrg 7392c30f5000Smrg # Check to see that the pipe works correctly. 7393c30f5000Smrg pipe_works=no 739467ab2ff2Smrg 7395c30f5000Smrg rm -f conftest* 7396c30f5000Smrg cat > conftest.$ac_ext <<_LT_EOF 7397c30f5000Smrg#ifdef __cplusplus 7398c30f5000Smrgextern "C" { 7399c30f5000Smrg#endif 7400c30f5000Smrgchar nm_test_var; 7401c30f5000Smrgvoid nm_test_func(void); 7402c30f5000Smrgvoid nm_test_func(void){} 7403c30f5000Smrg#ifdef __cplusplus 7404c30f5000Smrg} 7405c30f5000Smrg#endif 7406c30f5000Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 7407c30f5000Smrg_LT_EOF 740867ab2ff2Smrg 7409c30f5000Smrg if AC_TRY_EVAL(ac_compile); then 7410c30f5000Smrg # Now try to grab the symbols. 7411c30f5000Smrg nlist=conftest.nm 7412c30f5000Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7413c30f5000Smrg # Try sorting and uniquifying the output. 7414c30f5000Smrg if sort "$nlist" | uniq > "$nlist"T; then 7415c30f5000Smrg mv -f "$nlist"T "$nlist" 7416c30f5000Smrg else 7417c30f5000Smrg rm -f "$nlist"T 7418c30f5000Smrg fi 7419e0963edeSmrg 7420c30f5000Smrg # Make sure that we snagged all the symbols we need. 7421c30f5000Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7422c30f5000Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7423c30f5000Smrg cat <<_LT_EOF > conftest.$ac_ext 7424c30f5000Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7425c30f5000Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7426c30f5000Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 7427c30f5000Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 7428c30f5000Smrg# define LT@&t@_DLSYM_CONST 7429c30f5000Smrg#elif defined __osf__ 7430c30f5000Smrg/* This system does not cope well with relocations in const data. */ 7431c30f5000Smrg# define LT@&t@_DLSYM_CONST 7432c30f5000Smrg#else 7433c30f5000Smrg# define LT@&t@_DLSYM_CONST const 7434c30f5000Smrg#endif 7435e0963edeSmrg 7436c30f5000Smrg#ifdef __cplusplus 7437c30f5000Smrgextern "C" { 7438c30f5000Smrg#endif 7439e0963edeSmrg 7440c30f5000Smrg_LT_EOF 7441c30f5000Smrg # Now generate the symbol file. 7442c30f5000Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7443e0963edeSmrg 7444c30f5000Smrg cat <<_LT_EOF >> conftest.$ac_ext 7445e0963edeSmrg 7446c30f5000Smrg/* The mapping between symbol names and symbols. */ 7447c30f5000SmrgLT@&t@_DLSYM_CONST struct { 7448c30f5000Smrg const char *name; 7449c30f5000Smrg void *address; 7450c30f5000Smrg} 7451c30f5000Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 7452c30f5000Smrg{ 7453c30f5000Smrg { "@PROGRAM@", (void *) 0 }, 7454c30f5000Smrg_LT_EOF 7455c30f5000Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7456c30f5000Smrg cat <<\_LT_EOF >> conftest.$ac_ext 7457c30f5000Smrg {0, (void *) 0} 7458c30f5000Smrg}; 7459f05b35a2Smrg 7460c30f5000Smrg/* This works around a problem in FreeBSD linker */ 7461c30f5000Smrg#ifdef FREEBSD_WORKAROUND 7462c30f5000Smrgstatic const void *lt_preloaded_setup() { 7463c30f5000Smrg return lt__PROGRAM__LTX_preloaded_symbols; 7464c30f5000Smrg} 7465c30f5000Smrg#endif 7466e494fffdSmrg 7467c30f5000Smrg#ifdef __cplusplus 7468c30f5000Smrg} 7469c30f5000Smrg#endif 7470c30f5000Smrg_LT_EOF 7471c30f5000Smrg # Now try linking the two files. 7472c30f5000Smrg mv conftest.$ac_objext conftstm.$ac_objext 7473c30f5000Smrg lt_globsym_save_LIBS=$LIBS 7474c30f5000Smrg lt_globsym_save_CFLAGS=$CFLAGS 7475c30f5000Smrg LIBS=conftstm.$ac_objext 7476c30f5000Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7477c30f5000Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7478c30f5000Smrg pipe_works=yes 7479c30f5000Smrg fi 7480c30f5000Smrg LIBS=$lt_globsym_save_LIBS 7481c30f5000Smrg CFLAGS=$lt_globsym_save_CFLAGS 7482c30f5000Smrg else 7483c30f5000Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7484c30f5000Smrg fi 7485c30f5000Smrg else 7486c30f5000Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7487c30f5000Smrg fi 7488c30f5000Smrg else 7489c30f5000Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7490c30f5000Smrg fi 7491c30f5000Smrg else 7492c30f5000Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7493c30f5000Smrg cat conftest.$ac_ext >&5 7494c30f5000Smrg fi 7495c30f5000Smrg rm -rf conftest* conftst* 7496e494fffdSmrg 7497c30f5000Smrg # Do not use the global_symbol_pipe unless it works. 7498c30f5000Smrg if test yes = "$pipe_works"; then 7499c30f5000Smrg break 7500c30f5000Smrg else 7501c30f5000Smrg lt_cv_sys_global_symbol_pipe= 7502c30f5000Smrg fi 7503c30f5000Smrgdone 750467ab2ff2Smrg]) 7505c30f5000Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 7506c30f5000Smrg lt_cv_sys_global_symbol_to_cdecl= 7507c30f5000Smrgfi 7508c30f5000Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7509c30f5000Smrg AC_MSG_RESULT(failed) 7510c30f5000Smrgelse 7511c30f5000Smrg AC_MSG_RESULT(ok) 7512c30f5000Smrgfi 7513f05b35a2Smrg 7514c30f5000Smrg# Response file support. 7515c30f5000Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7516c30f5000Smrg nm_file_list_spec='@' 7517c30f5000Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7518c30f5000Smrg nm_file_list_spec='@' 7519c30f5000Smrgfi 7520f05b35a2Smrg 7521c30f5000Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7522c30f5000Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 7523c30f5000Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7524c30f5000Smrg [Transform the output of nm in a proper C declaration]) 7525c30f5000Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7526c30f5000Smrg [Transform the output of nm into a list of symbols to manually relocate]) 7527c30f5000Smrg_LT_DECL([global_symbol_to_c_name_address], 7528c30f5000Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 7529c30f5000Smrg [Transform the output of nm in a C name address pair]) 7530c30f5000Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7531c30f5000Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7532c30f5000Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 7533c30f5000Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7534c30f5000Smrg [The name lister interface]) 7535c30f5000Smrg_LT_DECL([], [nm_file_list_spec], [1], 7536c30f5000Smrg [Specify filename containing input files for $NM]) 7537c30f5000Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 7538f05b35a2Smrg 7539f05b35a2Smrg 7540c30f5000Smrg# _LT_COMPILER_PIC([TAGNAME]) 7541c30f5000Smrg# --------------------------- 7542c30f5000Smrgm4_defun([_LT_COMPILER_PIC], 7543c30f5000Smrg[m4_require([_LT_TAG_COMPILER])dnl 7544c30f5000Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7545c30f5000Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7546c30f5000Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 7547f05b35a2Smrg 7548c30f5000Smrgm4_if([$1], [CXX], [ 7549c30f5000Smrg # C++ specific cases for pic, static, wl, etc. 7550c30f5000Smrg if test yes = "$GXX"; then 7551c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7552c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7553f05b35a2Smrg 7554c30f5000Smrg case $host_os in 7555c30f5000Smrg aix*) 7556c30f5000Smrg # All AIX code is PIC. 7557c30f5000Smrg if test ia64 = "$host_cpu"; then 7558c30f5000Smrg # AIX 5 now supports IA64 processor 7559c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7560c30f5000Smrg fi 7561c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7562c30f5000Smrg ;; 7563f05b35a2Smrg 7564c30f5000Smrg amigaos*) 7565c30f5000Smrg case $host_cpu in 7566c30f5000Smrg powerpc) 7567c30f5000Smrg # see comment about AmigaOS4 .so support 7568c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7569c30f5000Smrg ;; 7570c30f5000Smrg m68k) 7571c30f5000Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7572c30f5000Smrg # adding the '-m68020' flag to GCC prevents building anything better, 7573c30f5000Smrg # like '-m68040'. 7574c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7575c30f5000Smrg ;; 7576c30f5000Smrg esac 7577c30f5000Smrg ;; 7578f05b35a2Smrg 7579c30f5000Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7580c30f5000Smrg # PIC is the default for these OSes. 7581c30f5000Smrg ;; 7582c30f5000Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7583c30f5000Smrg # This hack is so that the source file can tell whether it is being 7584c30f5000Smrg # built for inclusion in a dll (and should export symbols for example). 7585c30f5000Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7586c30f5000Smrg # (--disable-auto-import) libraries 7587c30f5000Smrg m4_if([$1], [GCJ], [], 7588c30f5000Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7589c30f5000Smrg case $host_os in 7590c30f5000Smrg os2*) 7591c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7592c30f5000Smrg ;; 7593c30f5000Smrg esac 7594c30f5000Smrg ;; 7595c30f5000Smrg darwin* | rhapsody*) 7596c30f5000Smrg # PIC is the default on this platform 7597c30f5000Smrg # Common symbols not allowed in MH_DYLIB files 7598c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7599c30f5000Smrg ;; 7600c30f5000Smrg *djgpp*) 7601c30f5000Smrg # DJGPP does not support shared libraries at all 7602c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7603c30f5000Smrg ;; 7604c30f5000Smrg haiku*) 7605c30f5000Smrg # PIC is the default for Haiku. 7606c30f5000Smrg # The "-static" flag exists, but is broken. 7607c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7608c30f5000Smrg ;; 7609c30f5000Smrg interix[[3-9]]*) 7610c30f5000Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7611c30f5000Smrg # Instead, we relocate shared libraries at runtime. 7612c30f5000Smrg ;; 7613c30f5000Smrg sysv4*MP*) 7614c30f5000Smrg if test -d /usr/nec; then 7615c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 761667ab2ff2Smrg fi 7617c30f5000Smrg ;; 7618c30f5000Smrg hpux*) 7619c30f5000Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7620c30f5000Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7621c30f5000Smrg # sets the default TLS model and affects inlining. 7622c30f5000Smrg case $host_cpu in 7623c30f5000Smrg hppa*64*) 7624c30f5000Smrg ;; 7625c30f5000Smrg *) 7626c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7627c30f5000Smrg ;; 7628c30f5000Smrg esac 7629c30f5000Smrg ;; 7630c30f5000Smrg *qnx* | *nto*) 7631c30f5000Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7632c30f5000Smrg # it will coredump. 7633c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7634c30f5000Smrg ;; 7635c30f5000Smrg *) 7636c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7637c30f5000Smrg ;; 7638c30f5000Smrg esac 7639c30f5000Smrg else 7640c30f5000Smrg case $host_os in 7641c30f5000Smrg aix[[4-9]]*) 7642c30f5000Smrg # All AIX code is PIC. 7643c30f5000Smrg if test ia64 = "$host_cpu"; then 7644c30f5000Smrg # AIX 5 now supports IA64 processor 7645c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7646c30f5000Smrg else 7647c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7648c30f5000Smrg fi 7649c30f5000Smrg ;; 7650c30f5000Smrg chorus*) 7651c30f5000Smrg case $cc_basename in 7652c30f5000Smrg cxch68*) 7653c30f5000Smrg # Green Hills C++ Compiler 7654c30f5000Smrg # _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" 7655c30f5000Smrg ;; 7656c30f5000Smrg esac 7657c30f5000Smrg ;; 7658c30f5000Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7659c30f5000Smrg # This hack is so that the source file can tell whether it is being 7660c30f5000Smrg # built for inclusion in a dll (and should export symbols for example). 7661c30f5000Smrg m4_if([$1], [GCJ], [], 7662c30f5000Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7663c30f5000Smrg ;; 7664c30f5000Smrg dgux*) 7665c30f5000Smrg case $cc_basename in 7666c30f5000Smrg ec++*) 7667c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7668c30f5000Smrg ;; 7669c30f5000Smrg ghcx*) 7670c30f5000Smrg # Green Hills C++ Compiler 7671c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7672c30f5000Smrg ;; 7673c30f5000Smrg *) 7674c30f5000Smrg ;; 7675c30f5000Smrg esac 7676c30f5000Smrg ;; 7677c30f5000Smrg freebsd* | dragonfly* | midnightbsd*) 7678c30f5000Smrg # FreeBSD uses GNU C++ 7679c30f5000Smrg ;; 7680c30f5000Smrg hpux9* | hpux10* | hpux11*) 7681c30f5000Smrg case $cc_basename in 7682c30f5000Smrg CC*) 7683c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7684c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7685c30f5000Smrg if test ia64 != "$host_cpu"; then 7686c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7687c30f5000Smrg fi 7688c30f5000Smrg ;; 7689c30f5000Smrg aCC*) 7690c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7691c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7692c30f5000Smrg case $host_cpu in 7693c30f5000Smrg hppa*64*|ia64*) 7694c30f5000Smrg # +Z the default 7695c30f5000Smrg ;; 7696c30f5000Smrg *) 7697c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7698c30f5000Smrg ;; 7699c30f5000Smrg esac 7700c30f5000Smrg ;; 7701c30f5000Smrg *) 7702c30f5000Smrg ;; 7703c30f5000Smrg esac 7704c30f5000Smrg ;; 7705c30f5000Smrg interix*) 7706c30f5000Smrg # This is c89, which is MS Visual C++ (no shared libs) 7707c30f5000Smrg # Anyone wants to do a port? 7708c30f5000Smrg ;; 7709c30f5000Smrg irix5* | irix6* | nonstopux*) 7710c30f5000Smrg case $cc_basename in 7711c30f5000Smrg CC*) 7712c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7713c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7714c30f5000Smrg # CC pic flag -KPIC is the default. 7715c30f5000Smrg ;; 7716c30f5000Smrg *) 7717c30f5000Smrg ;; 7718c30f5000Smrg esac 7719c30f5000Smrg ;; 7720c30f5000Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7721c30f5000Smrg case $cc_basename in 7722c30f5000Smrg KCC*) 7723c30f5000Smrg # KAI C++ Compiler 7724c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7725c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7726c30f5000Smrg ;; 7727c30f5000Smrg ecpc* ) 7728c30f5000Smrg # old Intel C++ for x86_64, which still supported -KPIC. 7729c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7730c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7731c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7732c30f5000Smrg ;; 7733c30f5000Smrg icpc* ) 7734c30f5000Smrg # Intel C++, used to be incompatible with GCC. 7735c30f5000Smrg # ICC 10 doesn't accept -KPIC any more. 7736c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7737c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7738c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7739c30f5000Smrg ;; 7740c30f5000Smrg pgCC* | pgcpp*) 7741c30f5000Smrg # Portland Group C++ compiler 7742c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7743c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7744c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7745c30f5000Smrg ;; 7746c30f5000Smrg cxx*) 7747c30f5000Smrg # Compaq C++ 7748c30f5000Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7749c30f5000Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7750c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7751c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7752c30f5000Smrg ;; 7753c30f5000Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7754c30f5000Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 7755c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7756c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7757c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7758c30f5000Smrg ;; 7759c30f5000Smrg *) 7760c30f5000Smrg case `$CC -V 2>&1 | $SED 5q` in 7761c30f5000Smrg *Sun\ C*) 7762c30f5000Smrg # Sun C++ 5.9 7763c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7764c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7765c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7766c30f5000Smrg ;; 7767c30f5000Smrg esac 7768c30f5000Smrg ;; 7769c30f5000Smrg esac 7770c30f5000Smrg ;; 7771c30f5000Smrg lynxos*) 7772c30f5000Smrg ;; 7773c30f5000Smrg m88k*) 7774c30f5000Smrg ;; 7775c30f5000Smrg mvs*) 7776c30f5000Smrg case $cc_basename in 7777c30f5000Smrg cxx*) 7778c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7779c30f5000Smrg ;; 7780c30f5000Smrg *) 7781c30f5000Smrg ;; 7782c30f5000Smrg esac 7783c30f5000Smrg ;; 7784c30f5000Smrg netbsd*) 7785c30f5000Smrg ;; 7786c30f5000Smrg *qnx* | *nto*) 7787c30f5000Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7788c30f5000Smrg # it will coredump. 7789c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7790c30f5000Smrg ;; 7791c30f5000Smrg osf3* | osf4* | osf5*) 7792c30f5000Smrg case $cc_basename in 7793c30f5000Smrg KCC*) 7794c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7795c30f5000Smrg ;; 7796c30f5000Smrg RCC*) 7797c30f5000Smrg # Rational C++ 2.4.1 7798c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7799c30f5000Smrg ;; 7800c30f5000Smrg cxx*) 7801c30f5000Smrg # Digital/Compaq C++ 7802c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7803c30f5000Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7804c30f5000Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7805c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7806c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7807c30f5000Smrg ;; 7808c30f5000Smrg *) 7809c30f5000Smrg ;; 7810c30f5000Smrg esac 7811c30f5000Smrg ;; 7812c30f5000Smrg psos*) 7813c30f5000Smrg ;; 7814c30f5000Smrg solaris*) 7815c30f5000Smrg case $cc_basename in 7816c30f5000Smrg CC* | sunCC*) 7817c30f5000Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7818c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7819c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7820c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7821c30f5000Smrg ;; 7822c30f5000Smrg gcx*) 7823c30f5000Smrg # Green Hills C++ Compiler 7824c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7825c30f5000Smrg ;; 7826c30f5000Smrg *) 7827c30f5000Smrg ;; 7828c30f5000Smrg esac 7829c30f5000Smrg ;; 7830c30f5000Smrg sunos4*) 7831c30f5000Smrg case $cc_basename in 7832c30f5000Smrg CC*) 7833c30f5000Smrg # Sun C++ 4.x 7834c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7835c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7836c30f5000Smrg ;; 7837c30f5000Smrg lcc*) 7838c30f5000Smrg # Lucid 7839c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7840c30f5000Smrg ;; 7841c30f5000Smrg *) 7842c30f5000Smrg ;; 7843c30f5000Smrg esac 7844c30f5000Smrg ;; 7845c30f5000Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7846c30f5000Smrg case $cc_basename in 7847c30f5000Smrg CC*) 7848c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7849c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7850c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7851c30f5000Smrg ;; 7852c30f5000Smrg esac 7853c30f5000Smrg ;; 7854c30f5000Smrg tandem*) 7855c30f5000Smrg case $cc_basename in 7856c30f5000Smrg NCC*) 7857c30f5000Smrg # NonStop-UX NCC 3.20 7858c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7859c30f5000Smrg ;; 7860c30f5000Smrg *) 7861c30f5000Smrg ;; 7862c30f5000Smrg esac 7863c30f5000Smrg ;; 7864c30f5000Smrg vxworks*) 7865c30f5000Smrg ;; 7866c30f5000Smrg *) 7867c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7868c30f5000Smrg ;; 7869c30f5000Smrg esac 787067ab2ff2Smrg fi 7871c30f5000Smrg], 7872c30f5000Smrg[ 7873c30f5000Smrg if test yes = "$GCC"; then 7874c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7875c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7876e0963edeSmrg 7877c30f5000Smrg case $host_os in 7878c30f5000Smrg aix*) 7879c30f5000Smrg # All AIX code is PIC. 7880c30f5000Smrg if test ia64 = "$host_cpu"; then 7881c30f5000Smrg # AIX 5 now supports IA64 processor 7882c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7883c30f5000Smrg fi 7884c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7885c30f5000Smrg ;; 7886e0963edeSmrg 7887c30f5000Smrg amigaos*) 7888c30f5000Smrg case $host_cpu in 7889c30f5000Smrg powerpc) 7890c30f5000Smrg # see comment about AmigaOS4 .so support 7891c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 789267ab2ff2Smrg ;; 7893c30f5000Smrg m68k) 7894c30f5000Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7895c30f5000Smrg # adding the '-m68020' flag to GCC prevents building anything better, 7896c30f5000Smrg # like '-m68040'. 7897c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 789867ab2ff2Smrg ;; 7899c30f5000Smrg esac 7900c30f5000Smrg ;; 790167ab2ff2Smrg 7902c30f5000Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7903c30f5000Smrg # PIC is the default for these OSes. 7904c30f5000Smrg ;; 7905e0963edeSmrg 7906c30f5000Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 7907c30f5000Smrg # This hack is so that the source file can tell whether it is being 7908c30f5000Smrg # built for inclusion in a dll (and should export symbols for example). 7909c30f5000Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7910c30f5000Smrg # (--disable-auto-import) libraries 7911c30f5000Smrg m4_if([$1], [GCJ], [], 7912c30f5000Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7913c30f5000Smrg case $host_os in 7914c30f5000Smrg os2*) 7915c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7916c30f5000Smrg ;; 7917c30f5000Smrg esac 7918c30f5000Smrg ;; 7919e0963edeSmrg 7920c30f5000Smrg darwin* | rhapsody*) 7921c30f5000Smrg # PIC is the default on this platform 7922c30f5000Smrg # Common symbols not allowed in MH_DYLIB files 7923c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7924c30f5000Smrg ;; 7925e0963edeSmrg 7926c30f5000Smrg haiku*) 7927c30f5000Smrg # PIC is the default for Haiku. 7928c30f5000Smrg # The "-static" flag exists, but is broken. 7929c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7930c30f5000Smrg ;; 7931c30f5000Smrg 7932c30f5000Smrg hpux*) 7933c30f5000Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7934c30f5000Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7935c30f5000Smrg # sets the default TLS model and affects inlining. 7936c30f5000Smrg case $host_cpu in 7937c30f5000Smrg hppa*64*) 7938c30f5000Smrg # +Z the default 7939c30f5000Smrg ;; 7940c30f5000Smrg *) 7941c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7942c30f5000Smrg ;; 7943c30f5000Smrg esac 7944c30f5000Smrg ;; 7945e0963edeSmrg 7946c30f5000Smrg interix[[3-9]]*) 7947c30f5000Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7948c30f5000Smrg # Instead, we relocate shared libraries at runtime. 7949c30f5000Smrg ;; 7950e0963edeSmrg 7951c30f5000Smrg msdosdjgpp*) 7952c30f5000Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 7953c30f5000Smrg # on systems that don't support them. 7954c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7955c30f5000Smrg enable_shared=no 7956c30f5000Smrg ;; 7957e0963edeSmrg 7958c30f5000Smrg *nto* | *qnx*) 7959c30f5000Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7960c30f5000Smrg # it will coredump. 7961c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7962c30f5000Smrg ;; 7963e0963edeSmrg 7964c30f5000Smrg sysv4*MP*) 7965c30f5000Smrg if test -d /usr/nec; then 7966c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7967c30f5000Smrg fi 7968c30f5000Smrg ;; 7969e0963edeSmrg 7970c30f5000Smrg *) 7971c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7972c30f5000Smrg ;; 7973c30f5000Smrg esac 7974e0963edeSmrg 7975c30f5000Smrg case $cc_basename in 7976c30f5000Smrg nvcc*) # Cuda Compiler Driver 2.2 7977c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 7978c30f5000Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 7979c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 7980c30f5000Smrg fi 7981c30f5000Smrg ;; 7982c30f5000Smrg esac 7983c30f5000Smrg else 7984c30f5000Smrg # PORTME Check for flag to pass linker flags through the system compiler. 7985c30f5000Smrg case $host_os in 7986c30f5000Smrg aix*) 7987c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7988c30f5000Smrg if test ia64 = "$host_cpu"; then 7989c30f5000Smrg # AIX 5 now supports IA64 processor 7990c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7991c30f5000Smrg else 7992c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7993c30f5000Smrg fi 7994c30f5000Smrg ;; 7995e0963edeSmrg 7996c30f5000Smrg darwin* | rhapsody*) 7997c30f5000Smrg # PIC is the default on this platform 7998c30f5000Smrg # Common symbols not allowed in MH_DYLIB files 7999c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8000c30f5000Smrg case $cc_basename in 8001c30f5000Smrg nagfor*) 8002c30f5000Smrg # NAG Fortran compiler 8003c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8004c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8005c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8006c30f5000Smrg ;; 8007c30f5000Smrg esac 8008c30f5000Smrg ;; 8009e0963edeSmrg 8010c30f5000Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8011c30f5000Smrg # This hack is so that the source file can tell whether it is being 8012c30f5000Smrg # built for inclusion in a dll (and should export symbols for example). 8013c30f5000Smrg m4_if([$1], [GCJ], [], 8014c30f5000Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8015c30f5000Smrg case $host_os in 8016c30f5000Smrg os2*) 8017c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8018c30f5000Smrg ;; 8019c30f5000Smrg esac 8020c30f5000Smrg ;; 8021e0963edeSmrg 8022c30f5000Smrg hpux9* | hpux10* | hpux11*) 8023c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8024c30f5000Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8025c30f5000Smrg # not for PA HP-UX. 8026c30f5000Smrg case $host_cpu in 8027c30f5000Smrg hppa*64*|ia64*) 8028c30f5000Smrg # +Z the default 8029c30f5000Smrg ;; 8030c30f5000Smrg *) 8031c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8032c30f5000Smrg ;; 8033c30f5000Smrg esac 8034c30f5000Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8035c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8036c30f5000Smrg ;; 8037e0963edeSmrg 8038c30f5000Smrg irix5* | irix6* | nonstopux*) 8039c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8040c30f5000Smrg # PIC (with -KPIC) is the default. 8041c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8042c30f5000Smrg ;; 8043e0963edeSmrg 8044c30f5000Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8045c30f5000Smrg case $cc_basename in 8046c30f5000Smrg # old Intel for x86_64, which still supported -KPIC. 8047c30f5000Smrg ecc*) 8048c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8049c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8050c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8051c30f5000Smrg ;; 8052c30f5000Smrg # icc used to be incompatible with GCC. 8053c30f5000Smrg # ICC 10 doesn't accept -KPIC any more. 8054c30f5000Smrg icc* | ifort*) 8055c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8056c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8057c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8058c30f5000Smrg ;; 8059c30f5000Smrg # Lahey Fortran 8.1. 8060c30f5000Smrg lf95*) 8061c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8062c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8063c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8064c30f5000Smrg ;; 8065c30f5000Smrg nagfor*) 8066c30f5000Smrg # NAG Fortran compiler 8067c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8068c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8069c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8070c30f5000Smrg ;; 8071c30f5000Smrg tcc*) 8072c30f5000Smrg # Fabrice Bellard et al's Tiny C Compiler 8073c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8074c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8075c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8076c30f5000Smrg ;; 8077c30f5000Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8078c30f5000Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 8079c30f5000Smrg # which looks to be a dead project) 8080c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8081c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8082c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8083c30f5000Smrg ;; 8084c30f5000Smrg ccc*) 8085c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8086c30f5000Smrg # All Alpha code is PIC. 8087c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8088c30f5000Smrg ;; 8089c30f5000Smrg xl* | bgxl* | bgf* | mpixl*) 8090c30f5000Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8091c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8092c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8093c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8094c30f5000Smrg ;; 8095c30f5000Smrg *) 8096c30f5000Smrg case `$CC -V 2>&1 | $SED 5q` in 8097c30f5000Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8098c30f5000Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8099c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8100c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8101c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8102c30f5000Smrg ;; 8103c30f5000Smrg *Sun\ F* | *Sun*Fortran*) 8104c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8105c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8106c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8107c30f5000Smrg ;; 8108c30f5000Smrg *Sun\ C*) 8109c30f5000Smrg # Sun C 5.9 8110c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8111c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8112c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8113c30f5000Smrg ;; 8114c30f5000Smrg *Intel*\ [[CF]]*Compiler*) 8115c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8116c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8117c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8118c30f5000Smrg ;; 8119c30f5000Smrg *Portland\ Group*) 8120c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8121c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8122c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8123c30f5000Smrg ;; 8124c30f5000Smrg esac 8125c30f5000Smrg ;; 8126c30f5000Smrg esac 8127c30f5000Smrg ;; 8128e0963edeSmrg 8129c30f5000Smrg newsos6) 8130c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8131c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8132c30f5000Smrg ;; 813349e108a1Smrg 8134c30f5000Smrg *nto* | *qnx*) 8135c30f5000Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8136c30f5000Smrg # it will coredump. 8137c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8138c30f5000Smrg ;; 8139e0963edeSmrg 8140c30f5000Smrg osf3* | osf4* | osf5*) 8141c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8142c30f5000Smrg # All OSF/1 code is PIC. 8143c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8144c30f5000Smrg ;; 8145e0963edeSmrg 8146c30f5000Smrg rdos*) 8147c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8148c30f5000Smrg ;; 8149e0963edeSmrg 8150c30f5000Smrg solaris*) 8151c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8152c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8153c30f5000Smrg case $cc_basename in 8154c30f5000Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8155c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8156c30f5000Smrg *) 8157c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8158c30f5000Smrg esac 8159c30f5000Smrg ;; 8160e0963edeSmrg 8161c30f5000Smrg sunos4*) 8162c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8163c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8164c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8165c30f5000Smrg ;; 8166e0963edeSmrg 8167c30f5000Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 8168c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8169c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8170c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8171c30f5000Smrg ;; 8172e0963edeSmrg 8173c30f5000Smrg sysv4*MP*) 8174c30f5000Smrg if test -d /usr/nec; then 8175c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8176c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8177c30f5000Smrg fi 8178c30f5000Smrg ;; 8179f05b35a2Smrg 8180c30f5000Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8181c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8182c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8183c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8184c30f5000Smrg ;; 8185f05b35a2Smrg 8186c30f5000Smrg unicos*) 8187c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8188c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8189c30f5000Smrg ;; 8190e0963edeSmrg 8191c30f5000Smrg uts4*) 8192c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8193c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8194c30f5000Smrg ;; 8195e0963edeSmrg 8196c30f5000Smrg *) 8197c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8198c30f5000Smrg ;; 8199c30f5000Smrg esac 8200c30f5000Smrg fi 8201c30f5000Smrg]) 8202c30f5000Smrgcase $host_os in 8203c30f5000Smrg # For platforms that do not support PIC, -DPIC is meaningless: 8204c30f5000Smrg *djgpp*) 8205c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8206c30f5000Smrg ;; 8207c30f5000Smrg *) 8208c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8209c30f5000Smrg ;; 821067ab2ff2Smrgesac 821167ab2ff2Smrg 8212c30f5000SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8213c30f5000Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8214c30f5000Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8215c30f5000Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 821667ab2ff2Smrg 8217c30f5000Smrg# 8218c30f5000Smrg# Check to make sure the PIC flag actually works. 8219c30f5000Smrg# 8220c30f5000Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8221c30f5000Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8222c30f5000Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8223c30f5000Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8224c30f5000Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8225c30f5000Smrg "" | " "*) ;; 8226c30f5000Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8227c30f5000Smrg esac], 8228c30f5000Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8229c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8230c30f5000Smrgfi 8231c30f5000Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8232c30f5000Smrg [Additional compiler flags for building library objects]) 8233e0963edeSmrg 8234c30f5000Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8235c30f5000Smrg [How to pass a linker flag through the compiler]) 8236c30f5000Smrg# 8237c30f5000Smrg# Check to make sure the static flag actually works. 8238c30f5000Smrg# 8239c30f5000Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8240c30f5000Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8241c30f5000Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8242c30f5000Smrg $lt_tmp_static_flag, 8243c30f5000Smrg [], 8244c30f5000Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8245c30f5000Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8246c30f5000Smrg [Compiler flag to prevent dynamic linking]) 8247c30f5000Smrg])# _LT_COMPILER_PIC 8248e0963edeSmrg 8249e0963edeSmrg 8250c30f5000Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 825167ab2ff2Smrg# ---------------------------- 8252c30f5000Smrg# See if the linker supports building shared libraries. 8253c30f5000Smrgm4_defun([_LT_LINKER_SHLIBS], 8254c30f5000Smrg[AC_REQUIRE([LT_PATH_LD])dnl 8255c30f5000SmrgAC_REQUIRE([LT_PATH_NM])dnl 8256c30f5000Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8257c30f5000Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8258c30f5000Smrgm4_require([_LT_DECL_EGREP])dnl 8259c30f5000Smrgm4_require([_LT_DECL_SED])dnl 8260c30f5000Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8261c30f5000Smrgm4_require([_LT_TAG_COMPILER])dnl 8262c30f5000SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8263c30f5000Smrgm4_if([$1], [CXX], [ 8264c30f5000Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8265c30f5000Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8266c30f5000Smrg case $host_os in 8267c30f5000Smrg aix[[4-9]]*) 8268c30f5000Smrg # If we're using GNU nm, then we don't want the "-C" option. 8269c30f5000Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8270c30f5000Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8271c30f5000Smrg # weak defined symbols like other global defined symbols, whereas 8272c30f5000Smrg # GNU nm marks them as "W". 8273c30f5000Smrg # While the 'weak' keyword is ignored in the Export File, we need 8274c30f5000Smrg # it in the Import File for the 'aix-soname' feature, so we have 8275c30f5000Smrg # to replace the "-B" option with "-P" for AIX nm. 8276c30f5000Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8277c30f5000Smrg _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' 8278c30f5000Smrg else 8279c30f5000Smrg _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' 8280c30f5000Smrg fi 8281c30f5000Smrg ;; 8282c30f5000Smrg pw32*) 8283c30f5000Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8284c30f5000Smrg ;; 8285c30f5000Smrg cygwin* | mingw* | cegcc*) 8286c30f5000Smrg case $cc_basename in 8287c30f5000Smrg cl* | icl*) 8288c30f5000Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8289c30f5000Smrg ;; 829067ab2ff2Smrg *) 8291c30f5000Smrg _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' 8292c30f5000Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 829367ab2ff2Smrg ;; 8294c30f5000Smrg esac 8295c30f5000Smrg ;; 8296c30f5000Smrg *) 8297c30f5000Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8298c30f5000Smrg ;; 8299c30f5000Smrg esac 8300c30f5000Smrg], [ 8301c30f5000Smrg runpath_var= 8302c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 8303c30f5000Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8304c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)= 8305c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8306c30f5000Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 8307c30f5000Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8308c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8309c30f5000Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8310c30f5000Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 8311c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8312c30f5000Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8313c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8314c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8315c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8316c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8317c30f5000Smrg _LT_TAGVAR(inherit_rpath, $1)=no 8318c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8319c30f5000Smrg _LT_TAGVAR(module_cmds, $1)= 8320c30f5000Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 8321c30f5000Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8322c30f5000Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8323c30f5000Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8324c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8325c30f5000Smrg # include_expsyms should be a list of space-separated symbols to be *always* 8326c30f5000Smrg # included in the symbol list 8327c30f5000Smrg _LT_TAGVAR(include_expsyms, $1)= 8328c30f5000Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 8329c30f5000Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8330c30f5000Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8331c30f5000Smrg # as well as any symbol that contains 'd'. 8332c30f5000Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8333c30f5000Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8334c30f5000Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 8335c30f5000Smrg # the symbol is explicitly referenced. Since portable code cannot 8336c30f5000Smrg # rely on this symbol name, it's probably fine to never include it in 8337c30f5000Smrg # preloaded symbol tables. 8338c30f5000Smrg # Exclude shared library initialization/finalization symbols. 8339c30f5000Smrgdnl Note also adjust exclude_expsyms for C++ above. 8340c30f5000Smrg extract_expsyms_cmds= 8341e0963edeSmrg 8342c30f5000Smrg case $host_os in 8343c30f5000Smrg cygwin* | mingw* | pw32* | cegcc*) 8344c30f5000Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8345c30f5000Smrg # When not using gcc, we currently assume that we are using 8346c30f5000Smrg # Microsoft Visual C++ or Intel C++ Compiler. 8347c30f5000Smrg if test yes != "$GCC"; then 8348c30f5000Smrg with_gnu_ld=no 8349c30f5000Smrg fi 8350c30f5000Smrg ;; 8351c30f5000Smrg interix*) 8352c30f5000Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8353c30f5000Smrg with_gnu_ld=yes 8354c30f5000Smrg ;; 8355c30f5000Smrg openbsd* | bitrig*) 8356c30f5000Smrg with_gnu_ld=no 8357c30f5000Smrg ;; 8358c30f5000Smrg esac 8359e0963edeSmrg 8360c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8361e0963edeSmrg 8362c30f5000Smrg # On some targets, GNU ld is compatible enough with the native linker 8363c30f5000Smrg # that we're better off using the native interface for both. 8364c30f5000Smrg lt_use_gnu_ld_interface=no 8365c30f5000Smrg if test yes = "$with_gnu_ld"; then 8366c30f5000Smrg case $host_os in 8367c30f5000Smrg aix*) 8368c30f5000Smrg # The AIX port of GNU ld has always aspired to compatibility 8369c30f5000Smrg # with the native linker. However, as the warning in the GNU ld 8370c30f5000Smrg # block says, versions before 2.19.5* couldn't really create working 8371c30f5000Smrg # shared libraries, regardless of the interface used. 8372c30f5000Smrg case `$LD -v 2>&1` in 8373c30f5000Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8374c30f5000Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8375c30f5000Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8376c30f5000Smrg *) 8377c30f5000Smrg lt_use_gnu_ld_interface=yes 8378c30f5000Smrg ;; 8379c30f5000Smrg esac 8380c30f5000Smrg ;; 8381c30f5000Smrg *) 8382c30f5000Smrg lt_use_gnu_ld_interface=yes 8383c30f5000Smrg ;; 8384c30f5000Smrg esac 8385c30f5000Smrg fi 8386e0963edeSmrg 8387c30f5000Smrg if test yes = "$lt_use_gnu_ld_interface"; then 8388c30f5000Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 8389c30f5000Smrg wlarc='$wl' 8390e0963edeSmrg 8391c30f5000Smrg # Set some defaults for GNU ld with shared library support. These 8392c30f5000Smrg # are reset later if shared libraries are not supported. Putting them 8393c30f5000Smrg # here allows them to be overridden if necessary. 8394c30f5000Smrg runpath_var=LD_RUN_PATH 8395c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8396c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8397c30f5000Smrg # ancient GNU ld didn't support --whole-archive et. al. 8398c30f5000Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8399c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8400c30f5000Smrg else 8401c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8402c30f5000Smrg fi 8403c30f5000Smrg supports_anon_versioning=no 8404c30f5000Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8405c30f5000Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 8406c30f5000Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8407c30f5000Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8408c30f5000Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8409c30f5000Smrg *\ 2.11.*) ;; # other 2.11 versions 8410c30f5000Smrg *) supports_anon_versioning=yes ;; 8411c30f5000Smrg esac 8412e0963edeSmrg 8413c30f5000Smrg # See if GNU ld supports shared libraries. 8414c30f5000Smrg case $host_os in 8415c30f5000Smrg aix[[3-9]]*) 8416c30f5000Smrg # On AIX/PPC, the GNU linker is very broken 8417c30f5000Smrg if test ia64 != "$host_cpu"; then 8418c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8419c30f5000Smrg cat <<_LT_EOF 1>&2 8420e0963edeSmrg 8421c30f5000Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 8422c30f5000Smrg*** to be unable to reliably create shared libraries on AIX. 8423c30f5000Smrg*** Therefore, libtool is disabling shared libraries support. If you 8424c30f5000Smrg*** really care for shared libraries, you may want to install binutils 8425c30f5000Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8426c30f5000Smrg*** You will then need to restart the configuration process. 8427e0963edeSmrg 8428c30f5000Smrg_LT_EOF 8429c30f5000Smrg fi 8430c30f5000Smrg ;; 8431e0963edeSmrg 8432c30f5000Smrg amigaos*) 8433c30f5000Smrg case $host_cpu in 8434c30f5000Smrg powerpc) 8435c30f5000Smrg # see comment about AmigaOS4 .so support 8436c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8437c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8438c30f5000Smrg ;; 8439c30f5000Smrg m68k) 8440c30f5000Smrg _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)' 8441c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8442c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8443c30f5000Smrg ;; 8444c30f5000Smrg esac 844567ab2ff2Smrg ;; 8446f05b35a2Smrg 8447c30f5000Smrg beos*) 8448c30f5000Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8449c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8450c30f5000Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8451c30f5000Smrg # support --undefined. This deserves some investigation. FIXME 8452c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8453c30f5000Smrg else 8454c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8455c30f5000Smrg fi 8456c30f5000Smrg ;; 8457f05b35a2Smrg 8458c30f5000Smrg cygwin* | mingw* | pw32* | cegcc*) 8459c30f5000Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8460c30f5000Smrg # as there is no search path for DLLs. 8461c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8462c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8463c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8464c30f5000Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8465c30f5000Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8466c30f5000Smrg _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' 8467c30f5000Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8468e0963edeSmrg 8469c30f5000Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8470c30f5000Smrg _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' 8471c30f5000Smrg # If the export-symbols file already is a .def file, use it as 8472c30f5000Smrg # is; otherwise, prepend EXPORTS... 8473c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8474c30f5000Smrg cp $export_symbols $output_objdir/$soname.def; 8475c30f5000Smrg else 8476c30f5000Smrg echo EXPORTS > $output_objdir/$soname.def; 8477c30f5000Smrg cat $export_symbols >> $output_objdir/$soname.def; 8478c30f5000Smrg fi~ 8479c30f5000Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8480c30f5000Smrg else 8481c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8482c30f5000Smrg fi 8483c30f5000Smrg ;; 8484e0963edeSmrg 8485c30f5000Smrg haiku*) 8486c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8487c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8488c30f5000Smrg ;; 8489e0963edeSmrg 8490c30f5000Smrg os2*) 8491c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8492c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8493c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8494c30f5000Smrg shrext_cmds=.dll 8495c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8496c30f5000Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8497c30f5000Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8498c30f5000Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8499c30f5000Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8500c30f5000Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8501c30f5000Smrg emximp -o $lib $output_objdir/$libname.def' 8502c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8503c30f5000Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8504c30f5000Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8505c30f5000Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8506c30f5000Smrg prefix_cmds="$SED"~ 8507c30f5000Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 8508c30f5000Smrg prefix_cmds="$prefix_cmds -e 1d"; 8509c30f5000Smrg fi~ 8510c30f5000Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8511c30f5000Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8512c30f5000Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8513c30f5000Smrg emximp -o $lib $output_objdir/$libname.def' 8514c30f5000Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8515c30f5000Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8516c30f5000Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8517c30f5000Smrg ;; 8518e0963edeSmrg 8519c30f5000Smrg interix[[3-9]]*) 8520c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8521c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8522c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8523c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8524c30f5000Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8525c30f5000Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8526c30f5000Smrg # default) and relocated if they conflict, which is a slow very memory 8527c30f5000Smrg # consuming and fragmenting process. To avoid this, we pick a random, 8528c30f5000Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8529c30f5000Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8530c30f5000Smrg _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' 8531c30f5000Smrg _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' 8532c30f5000Smrg ;; 8533e0963edeSmrg 8534c30f5000Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8535c30f5000Smrg tmp_diet=no 8536c30f5000Smrg if test linux-dietlibc = "$host_os"; then 8537c30f5000Smrg case $cc_basename in 8538c30f5000Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8539c30f5000Smrg esac 8540c30f5000Smrg fi 8541c30f5000Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8542c30f5000Smrg && test no = "$tmp_diet" 8543c30f5000Smrg then 8544c30f5000Smrg tmp_addflag=' $pic_flag' 8545c30f5000Smrg tmp_sharedflag='-shared' 8546c30f5000Smrg case $cc_basename,$host_cpu in 8547c30f5000Smrg pgcc*) # Portland Group C compiler 8548c30f5000Smrg _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' 8549c30f5000Smrg tmp_addflag=' $pic_flag' 8550c30f5000Smrg ;; 8551c30f5000Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 8552c30f5000Smrg # Portland Group f77 and f90 compilers 8553c30f5000Smrg _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' 8554c30f5000Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 8555c30f5000Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8556c30f5000Smrg tmp_addflag=' -i_dynamic' ;; 8557c30f5000Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8558c30f5000Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 8559c30f5000Smrg ifc* | ifort*) # Intel Fortran compiler 8560c30f5000Smrg tmp_addflag=' -nofor_main' ;; 8561c30f5000Smrg lf95*) # Lahey Fortran 8.1 8562c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8563c30f5000Smrg tmp_sharedflag='--shared' ;; 8564c30f5000Smrg nagfor*) # NAGFOR 5.3 8565c30f5000Smrg tmp_sharedflag='-Wl,-shared' ;; 8566c30f5000Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8567c30f5000Smrg tmp_sharedflag='-qmkshrobj' 8568c30f5000Smrg tmp_addflag= ;; 8569c30f5000Smrg nvcc*) # Cuda Compiler Driver 2.2 8570c30f5000Smrg _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' 8571c30f5000Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8572c30f5000Smrg ;; 8573c30f5000Smrg esac 8574c30f5000Smrg case `$CC -V 2>&1 | $SED 5q` in 8575c30f5000Smrg *Sun\ C*) # Sun C 5.9 8576c30f5000Smrg _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' 8577c30f5000Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8578c30f5000Smrg tmp_sharedflag='-G' ;; 8579c30f5000Smrg *Sun\ F*) # Sun Fortran 8.3 8580c30f5000Smrg tmp_sharedflag='-G' ;; 8581c30f5000Smrg esac 8582c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8583e0963edeSmrg 8584c30f5000Smrg if test yes = "$supports_anon_versioning"; then 8585c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8586c30f5000Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8587c30f5000Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8588c30f5000Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8589c30f5000Smrg fi 8590e0963edeSmrg 8591c30f5000Smrg case $cc_basename in 8592c30f5000Smrg tcc*) 8593c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8594c30f5000Smrg ;; 8595c30f5000Smrg xlf* | bgf* | bgxlf* | mpixlf*) 8596c30f5000Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8597c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8598c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8599c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8600c30f5000Smrg if test yes = "$supports_anon_versioning"; then 8601c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8602c30f5000Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8603c30f5000Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8604c30f5000Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8605c30f5000Smrg fi 8606c30f5000Smrg ;; 8607c30f5000Smrg esac 8608c30f5000Smrg else 8609c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8610c30f5000Smrg fi 861167ab2ff2Smrg ;; 8612e0963edeSmrg 8613c30f5000Smrg netbsd*) 8614c30f5000Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8615c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8616c30f5000Smrg wlarc= 8617c30f5000Smrg else 8618c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8619c30f5000Smrg _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' 8620c30f5000Smrg fi 8621c30f5000Smrg ;; 8622e0963edeSmrg 8623c30f5000Smrg solaris*) 8624c30f5000Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8625c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8626c30f5000Smrg cat <<_LT_EOF 1>&2 8627e0963edeSmrg 8628c30f5000Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8629c30f5000Smrg*** create shared libraries on Solaris systems. Therefore, libtool 8630c30f5000Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 8631c30f5000Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 8632c30f5000Smrg*** your PATH or compiler configuration so that the native linker is 8633c30f5000Smrg*** used, and then restart. 863449e108a1Smrg 8635c30f5000Smrg_LT_EOF 8636c30f5000Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8637c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8638c30f5000Smrg _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' 8639c30f5000Smrg else 8640c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8641c30f5000Smrg fi 8642c30f5000Smrg ;; 864349e108a1Smrg 8644c30f5000Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8645c30f5000Smrg case `$LD -v 2>&1` in 8646c30f5000Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8647c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8648c30f5000Smrg cat <<_LT_EOF 1>&2 864949e108a1Smrg 8650c30f5000Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8651c30f5000Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 8652c30f5000Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 8653c30f5000Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8654c30f5000Smrg*** your PATH or compiler configuration so that the native linker is 8655c30f5000Smrg*** used, and then restart. 865649e108a1Smrg 8657c30f5000Smrg_LT_EOF 8658c30f5000Smrg ;; 8659c30f5000Smrg *) 8660c30f5000Smrg # For security reasons, it is highly recommended that you always 8661c30f5000Smrg # use absolute paths for naming shared libraries, and exclude the 8662c30f5000Smrg # DT_RUNPATH tag from executables and libraries. But doing so 8663c30f5000Smrg # requires that you compile everything twice, which is a pain. 8664c30f5000Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8665c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8666c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8667c30f5000Smrg _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' 8668c30f5000Smrg else 8669c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8670c30f5000Smrg fi 8671c30f5000Smrg ;; 8672c30f5000Smrg esac 8673b3a827e2Smrg ;; 8674b3a827e2Smrg 8675c30f5000Smrg sunos4*) 8676c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8677c30f5000Smrg wlarc= 8678c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8679c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8680c30f5000Smrg ;; 8681b3a827e2Smrg 8682e494fffdSmrg *) 8683c30f5000Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8684c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8685c30f5000Smrg _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' 8686c30f5000Smrg else 8687c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8688c30f5000Smrg fi 8689e494fffdSmrg ;; 8690c30f5000Smrg esac 8691e0963edeSmrg 8692c30f5000Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8693c30f5000Smrg runpath_var= 8694c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8695c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8696c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8697c30f5000Smrg fi 8698c30f5000Smrg else 8699c30f5000Smrg # PORTME fill in a description of your system's linker (not GNU ld) 8700c30f5000Smrg case $host_os in 8701c30f5000Smrg aix3*) 8702c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8703c30f5000Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8704c30f5000Smrg _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' 8705c30f5000Smrg # Note: this linker hardcodes the directories in LIBPATH if there 8706c30f5000Smrg # are no directories specified by -L. 8707c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8708c30f5000Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8709c30f5000Smrg # Neither direct hardcoding nor static linking is supported with a 8710c30f5000Smrg # broken collect2. 8711c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8712c30f5000Smrg fi 8713c30f5000Smrg ;; 8714e0963edeSmrg 8715c30f5000Smrg aix[[4-9]]*) 8716c30f5000Smrg if test ia64 = "$host_cpu"; then 8717c30f5000Smrg # On IA64, the linker does run time linking by default, so we don't 8718c30f5000Smrg # have to do anything special. 8719c30f5000Smrg aix_use_runtimelinking=no 8720c30f5000Smrg exp_sym_flag='-Bexport' 8721c30f5000Smrg no_entry_flag= 8722c30f5000Smrg else 8723c30f5000Smrg # If we're using GNU nm, then we don't want the "-C" option. 8724c30f5000Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8725c30f5000Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8726c30f5000Smrg # weak defined symbols like other global defined symbols, whereas 8727c30f5000Smrg # GNU nm marks them as "W". 8728c30f5000Smrg # While the 'weak' keyword is ignored in the Export File, we need 8729c30f5000Smrg # it in the Import File for the 'aix-soname' feature, so we have 8730c30f5000Smrg # to replace the "-B" option with "-P" for AIX nm. 8731c30f5000Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8732c30f5000Smrg _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' 8733c30f5000Smrg else 8734c30f5000Smrg _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' 8735c30f5000Smrg fi 8736c30f5000Smrg aix_use_runtimelinking=no 8737e0963edeSmrg 8738c30f5000Smrg # Test if we are trying to use run time linking or normal 8739c30f5000Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8740c30f5000Smrg # have runtime linking enabled, and use it for executables. 8741c30f5000Smrg # For shared libraries, we enable/disable runtime linking 8742c30f5000Smrg # depending on the kind of the shared library created - 8743c30f5000Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 8744c30f5000Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8745c30f5000Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 8746c30f5000Smrg # lib.a static archive 8747c30f5000Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 8748c30f5000Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 8749c30f5000Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8750c30f5000Smrg # lib.a(lib.so.V) shared, rtl:no 8751c30f5000Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8752c30f5000Smrg # lib.a static archive 8753c30f5000Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8754c30f5000Smrg for ld_flag in $LDFLAGS; do 8755c30f5000Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8756c30f5000Smrg aix_use_runtimelinking=yes 8757c30f5000Smrg break 8758c30f5000Smrg fi 8759c30f5000Smrg done 8760c30f5000Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8761c30f5000Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 8762c30f5000Smrg # so we don't have lib.a shared libs to link our executables. 8763c30f5000Smrg # We have to force runtime linking in this case. 8764c30f5000Smrg aix_use_runtimelinking=yes 8765c30f5000Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 8766c30f5000Smrg fi 8767c30f5000Smrg ;; 8768c30f5000Smrg esac 8769e0963edeSmrg 8770c30f5000Smrg exp_sym_flag='-bexport' 8771c30f5000Smrg no_entry_flag='-bnoentry' 8772c30f5000Smrg fi 8773e0963edeSmrg 8774c30f5000Smrg # When large executables or shared objects are built, AIX ld can 8775c30f5000Smrg # have problems creating the table of contents. If linking a library 8776c30f5000Smrg # or program results in "error TOC overflow" add -mminimal-toc to 8777c30f5000Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8778c30f5000Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8779f05b35a2Smrg 8780c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='' 8781c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8782c30f5000Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8783c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8784c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8785c30f5000Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8786c30f5000Smrg case $with_aix_soname,$aix_use_runtimelinking in 8787c30f5000Smrg aix,*) ;; # traditional, no import file 8788c30f5000Smrg svr4,* | *,yes) # use import file 8789c30f5000Smrg # The Import File defines what to hardcode. 8790c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8791c30f5000Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8792c30f5000Smrg ;; 8793c30f5000Smrg esac 8794f05b35a2Smrg 8795c30f5000Smrg if test yes = "$GCC"; then 8796c30f5000Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8797c30f5000Smrg # We only want to do this on AIX 4.2 and lower, the check 8798c30f5000Smrg # below for broken collect2 doesn't work under 4.3+ 8799c30f5000Smrg collect2name=`$CC -print-prog-name=collect2` 8800c30f5000Smrg if test -f "$collect2name" && 8801c30f5000Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8802c30f5000Smrg then 8803c30f5000Smrg # We have reworked collect2 8804c30f5000Smrg : 8805c30f5000Smrg else 8806c30f5000Smrg # We have old collect2 8807c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8808c30f5000Smrg # It fails to find uninstalled libraries when the uninstalled 8809c30f5000Smrg # path is not listed in the libpath. Setting hardcode_minus_L 8810c30f5000Smrg # to unsupported forces relinking 8811c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8812c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8813c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8814c30f5000Smrg fi 8815c30f5000Smrg ;; 8816c30f5000Smrg esac 8817c30f5000Smrg shared_flag='-shared' 8818c30f5000Smrg if test yes = "$aix_use_runtimelinking"; then 8819c30f5000Smrg shared_flag="$shared_flag "'$wl-G' 8820c30f5000Smrg fi 8821c30f5000Smrg # Need to ensure runtime linking is disabled for the traditional 8822c30f5000Smrg # shared library, or the linker may eventually find shared libraries 8823c30f5000Smrg # /with/ Import File - we do not want to mix them. 8824c30f5000Smrg shared_flag_aix='-shared' 8825c30f5000Smrg shared_flag_svr4='-shared $wl-G' 8826c30f5000Smrg else 8827c30f5000Smrg # not using gcc 8828c30f5000Smrg if test ia64 = "$host_cpu"; then 8829c30f5000Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8830c30f5000Smrg # chokes on -Wl,-G. The following line is correct: 8831c30f5000Smrg shared_flag='-G' 8832c30f5000Smrg else 8833c30f5000Smrg if test yes = "$aix_use_runtimelinking"; then 8834c30f5000Smrg shared_flag='$wl-G' 8835c30f5000Smrg else 8836c30f5000Smrg shared_flag='$wl-bM:SRE' 8837c30f5000Smrg fi 8838c30f5000Smrg shared_flag_aix='$wl-bM:SRE' 8839c30f5000Smrg shared_flag_svr4='$wl-G' 8840c30f5000Smrg fi 8841c30f5000Smrg fi 884267ab2ff2Smrg 8843c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8844c30f5000Smrg # It seems that -bexpall does not export symbols beginning with 8845c30f5000Smrg # underscore (_), so it is better to generate a list of symbols to export. 8846c30f5000Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8847c30f5000Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8848c30f5000Smrg # Warning - without using the other runtime loading flags (-brtl), 8849c30f5000Smrg # -berok will link without error, but may produce a broken library. 8850c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8851c30f5000Smrg # Determine the default libpath from the value encoded in an 8852c30f5000Smrg # empty executable. 8853c30f5000Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8854c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8855c30f5000Smrg _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 8856c30f5000Smrg else 8857c30f5000Smrg if test ia64 = "$host_cpu"; then 8858c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8859c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8860c30f5000Smrg _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" 8861c30f5000Smrg else 8862c30f5000Smrg # Determine the default libpath from the value encoded in an 8863c30f5000Smrg # empty executable. 8864c30f5000Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8865c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8866c30f5000Smrg # Warning - without using the other run time loading flags, 8867c30f5000Smrg # -berok will link without error, but may produce a broken library. 8868c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8869c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8870c30f5000Smrg if test yes = "$with_gnu_ld"; then 8871c30f5000Smrg # We only use this code for GNU lds that support --whole-archive. 8872c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8873c30f5000Smrg else 8874c30f5000Smrg # Exported symbols can be pulled into shared objects from archives 8875c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8876c30f5000Smrg fi 8877c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8878c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8879c30f5000Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 8880c30f5000Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8881c30f5000Smrg if test svr4 != "$with_aix_soname"; then 8882c30f5000Smrg # This is similar to how AIX traditionally builds its shared libraries. 8883c30f5000Smrg _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' 8884c30f5000Smrg fi 8885c30f5000Smrg if test aix != "$with_aix_soname"; then 8886c30f5000Smrg _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' 8887c30f5000Smrg else 8888c30f5000Smrg # used by -dlpreopen to get the symbols 8889c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8890c30f5000Smrg fi 8891c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8892c30f5000Smrg fi 8893c30f5000Smrg fi 8894c30f5000Smrg ;; 8895e0963edeSmrg 8896c30f5000Smrg amigaos*) 8897c30f5000Smrg case $host_cpu in 8898c30f5000Smrg powerpc) 8899c30f5000Smrg # see comment about AmigaOS4 .so support 8900c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8901c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8902c30f5000Smrg ;; 8903c30f5000Smrg m68k) 8904c30f5000Smrg _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)' 8905c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8906c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8907c30f5000Smrg ;; 8908c30f5000Smrg esac 8909c30f5000Smrg ;; 8910e0963edeSmrg 8911c30f5000Smrg bsdi[[45]]*) 8912c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 8913c30f5000Smrg ;; 8914f05b35a2Smrg 8915c30f5000Smrg cygwin* | mingw* | pw32* | cegcc*) 8916c30f5000Smrg # When not using gcc, we currently assume that we are using 8917c30f5000Smrg # Microsoft Visual C++ or Intel C++ Compiler. 8918c30f5000Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 8919c30f5000Smrg # no search path for DLLs. 8920c30f5000Smrg case $cc_basename in 8921c30f5000Smrg cl* | icl*) 8922c30f5000Smrg # Native MSVC or ICC 8923c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8924c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8925c30f5000Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8926c30f5000Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8927c30f5000Smrg # Tell ltmain to make .lib files, not .a files. 8928c30f5000Smrg libext=lib 8929c30f5000Smrg # Tell ltmain to make .dll files, not .so files. 8930c30f5000Smrg shrext_cmds=.dll 8931c30f5000Smrg # FIXME: Setting linknames here is a bad hack. 8932c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 8933c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8934c30f5000Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 8935c30f5000Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 8936c30f5000Smrg else 8937c30f5000Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 8938c30f5000Smrg fi~ 8939c30f5000Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 8940c30f5000Smrg linknames=' 8941c30f5000Smrg # The linker will not automatically build a static lib if we build a DLL. 8942c30f5000Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8943c30f5000Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8944c30f5000Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8945c30f5000Smrg _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' 8946c30f5000Smrg # Don't use ranlib 8947c30f5000Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 8948c30f5000Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 8949c30f5000Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 8950c30f5000Smrg case $lt_outputfile in 8951c30f5000Smrg *.exe|*.EXE) ;; 8952c30f5000Smrg *) 8953c30f5000Smrg lt_outputfile=$lt_outputfile.exe 8954c30f5000Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 8955c30f5000Smrg ;; 8956c30f5000Smrg esac~ 8957c30f5000Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 8958c30f5000Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 8959c30f5000Smrg $RM "$lt_outputfile.manifest"; 8960c30f5000Smrg fi' 8961c30f5000Smrg ;; 8962c30f5000Smrg *) 8963c30f5000Smrg # Assume MSVC and ICC wrapper 8964c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8965c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8966c30f5000Smrg # Tell ltmain to make .lib files, not .a files. 8967c30f5000Smrg libext=lib 8968c30f5000Smrg # Tell ltmain to make .dll files, not .so files. 8969c30f5000Smrg shrext_cmds=.dll 8970c30f5000Smrg # FIXME: Setting linknames here is a bad hack. 8971c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 8972c30f5000Smrg # The linker will automatically build a .lib file if we build a DLL. 8973c30f5000Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8974c30f5000Smrg # FIXME: Should let the user specify the lib program. 8975c30f5000Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 8976c30f5000Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8977c30f5000Smrg ;; 8978c30f5000Smrg esac 8979c30f5000Smrg ;; 8980f05b35a2Smrg 8981c30f5000Smrg darwin* | rhapsody*) 8982c30f5000Smrg _LT_DARWIN_LINKER_FEATURES($1) 8983c30f5000Smrg ;; 8984e0963edeSmrg 8985c30f5000Smrg dgux*) 8986c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8987c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8988c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8989c30f5000Smrg ;; 8990e0963edeSmrg 8991c30f5000Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 8992c30f5000Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 8993c30f5000Smrg # does not break anything, and helps significantly (at the cost of a little 8994c30f5000Smrg # extra space). 8995c30f5000Smrg freebsd2.2*) 8996c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 8997c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8998c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8999c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9000c30f5000Smrg ;; 9001e0963edeSmrg 9002c30f5000Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9003c30f5000Smrg freebsd2.*) 9004c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9005c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9006c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9007c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9008c30f5000Smrg ;; 9009e0963edeSmrg 9010c30f5000Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9011c30f5000Smrg freebsd* | dragonfly* | midnightbsd*) 9012c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9013c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9014c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9015c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9016c30f5000Smrg ;; 9017e0963edeSmrg 9018c30f5000Smrg hpux9*) 9019c30f5000Smrg if test yes = "$GCC"; then 9020c30f5000Smrg _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' 9021c30f5000Smrg else 9022c30f5000Smrg _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' 9023c30f5000Smrg fi 9024c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9025c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9026c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9027e0963edeSmrg 9028c30f5000Smrg # hardcode_minus_L: Not really in the search PATH, 9029c30f5000Smrg # but as the default location of the library. 9030c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9031c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9032c30f5000Smrg ;; 903367ab2ff2Smrg 9034c30f5000Smrg hpux10*) 9035c30f5000Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9036c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9037c30f5000Smrg else 9038c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9039c30f5000Smrg fi 9040c30f5000Smrg if test no = "$with_gnu_ld"; then 9041c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9042c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9043c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9044c30f5000Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9045c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9046c30f5000Smrg # hardcode_minus_L: Not really in the search PATH, 9047c30f5000Smrg # but as the default location of the library. 9048c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9049c30f5000Smrg fi 9050c30f5000Smrg ;; 905167ab2ff2Smrg 9052c30f5000Smrg hpux11*) 9053c30f5000Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9054c30f5000Smrg case $host_cpu in 9055c30f5000Smrg hppa*64*) 9056c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9057c30f5000Smrg ;; 9058c30f5000Smrg ia64*) 9059c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9060c30f5000Smrg ;; 9061c30f5000Smrg *) 9062c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9063c30f5000Smrg ;; 9064c30f5000Smrg esac 9065c30f5000Smrg else 9066c30f5000Smrg case $host_cpu in 9067c30f5000Smrg hppa*64*) 9068c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9069c30f5000Smrg ;; 9070c30f5000Smrg ia64*) 9071c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9072c30f5000Smrg ;; 9073c30f5000Smrg *) 9074c30f5000Smrg m4_if($1, [], [ 9075c30f5000Smrg # Older versions of the 11.00 compiler do not understand -b yet 9076c30f5000Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9077c30f5000Smrg _LT_LINKER_OPTION([if $CC understands -b], 9078c30f5000Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9079c30f5000Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9080c30f5000Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9081c30f5000Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9082c30f5000Smrg ;; 9083c30f5000Smrg esac 9084c30f5000Smrg fi 9085c30f5000Smrg if test no = "$with_gnu_ld"; then 9086c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9087c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 908867ab2ff2Smrg 9089c30f5000Smrg case $host_cpu in 9090c30f5000Smrg hppa*64*|ia64*) 9091c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9092c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9093c30f5000Smrg ;; 9094c30f5000Smrg *) 9095c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9096c30f5000Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9097c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9098e0963edeSmrg 9099c30f5000Smrg # hardcode_minus_L: Not really in the search PATH, 9100c30f5000Smrg # but as the default location of the library. 9101c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9102c30f5000Smrg ;; 9103c30f5000Smrg esac 9104c30f5000Smrg fi 9105c30f5000Smrg ;; 9106e0963edeSmrg 9107c30f5000Smrg irix5* | irix6* | nonstopux*) 9108c30f5000Smrg if test yes = "$GCC"; then 9109c30f5000Smrg _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' 9110c30f5000Smrg # Try to use the -exported_symbol ld option, if it does not 9111c30f5000Smrg # work, assume that -exports_file does not work either and 9112c30f5000Smrg # implicitly export all symbols. 9113c30f5000Smrg # This should be the same for all languages, so no per-tag cache variable. 9114c30f5000Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9115c30f5000Smrg [lt_cv_irix_exported_symbol], 9116c30f5000Smrg [save_LDFLAGS=$LDFLAGS 9117c30f5000Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9118c30f5000Smrg AC_LINK_IFELSE( 9119c30f5000Smrg [AC_LANG_SOURCE( 9120c30f5000Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9121c30f5000Smrg [C++], [[int foo (void) { return 0; }]], 9122c30f5000Smrg [Fortran 77], [[ 9123c30f5000Smrg subroutine foo 9124c30f5000Smrg end]], 9125c30f5000Smrg [Fortran], [[ 9126c30f5000Smrg subroutine foo 9127c30f5000Smrg end]])])], 9128c30f5000Smrg [lt_cv_irix_exported_symbol=yes], 9129c30f5000Smrg [lt_cv_irix_exported_symbol=no]) 9130c30f5000Smrg LDFLAGS=$save_LDFLAGS]) 9131c30f5000Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 9132c30f5000Smrg _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' 9133c30f5000Smrg fi 9134c30f5000Smrg else 9135c30f5000Smrg _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' 9136c30f5000Smrg _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' 9137c30f5000Smrg fi 9138c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9139c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9140c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9141c30f5000Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 9142c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9143c30f5000Smrg ;; 9144e0963edeSmrg 9145c30f5000Smrg linux*) 9146c30f5000Smrg case $cc_basename in 9147c30f5000Smrg tcc*) 9148c30f5000Smrg # Fabrice Bellard et al's Tiny C Compiler 9149c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9150c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9151c30f5000Smrg ;; 9152c30f5000Smrg esac 9153c30f5000Smrg ;; 9154e0963edeSmrg 9155c30f5000Smrg netbsd*) 9156c30f5000Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9157c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9158c30f5000Smrg else 9159c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9160c30f5000Smrg fi 9161c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9162c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9163c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9164c30f5000Smrg ;; 9165e0963edeSmrg 9166c30f5000Smrg newsos6) 9167c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9168c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9169c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9170c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9171c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9172c30f5000Smrg ;; 9173e0963edeSmrg 9174c30f5000Smrg *nto* | *qnx*) 9175c30f5000Smrg ;; 9176f05b35a2Smrg 9177c30f5000Smrg openbsd* | bitrig*) 9178c30f5000Smrg if test -f /usr/libexec/ld.so; then 9179c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9180c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9181c30f5000Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9182c30f5000Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9183c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9184c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9185c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9186c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9187c30f5000Smrg else 9188c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9189c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9190c30f5000Smrg fi 9191c30f5000Smrg else 9192c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9193c30f5000Smrg fi 9194c30f5000Smrg ;; 9195e0963edeSmrg 9196c30f5000Smrg os2*) 9197c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9198c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9199c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9200c30f5000Smrg shrext_cmds=.dll 9201c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9202c30f5000Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9203c30f5000Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9204c30f5000Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9205c30f5000Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9206c30f5000Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9207c30f5000Smrg emximp -o $lib $output_objdir/$libname.def' 9208c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9209c30f5000Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9210c30f5000Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9211c30f5000Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9212c30f5000Smrg prefix_cmds="$SED"~ 9213c30f5000Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9214c30f5000Smrg prefix_cmds="$prefix_cmds -e 1d"; 9215c30f5000Smrg fi~ 9216c30f5000Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9217c30f5000Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9218c30f5000Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9219c30f5000Smrg emximp -o $lib $output_objdir/$libname.def' 9220c30f5000Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9221c30f5000Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9222c30f5000Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9223c30f5000Smrg ;; 9224e0963edeSmrg 9225c30f5000Smrg osf3*) 9226c30f5000Smrg if test yes = "$GCC"; then 9227c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9228c30f5000Smrg _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' 9229c30f5000Smrg else 9230c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9231c30f5000Smrg _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' 9232c30f5000Smrg fi 9233c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9234c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9235c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9236c30f5000Smrg ;; 9237e0963edeSmrg 9238c30f5000Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9239c30f5000Smrg if test yes = "$GCC"; then 9240c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9241c30f5000Smrg _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' 9242c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9243c30f5000Smrg else 9244c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9245c30f5000Smrg _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' 9246c30f5000Smrg _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~ 9247c30f5000Smrg $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' 924849e108a1Smrg 9249c30f5000Smrg # Both c and cxx compiler support -rpath directly 9250c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9251c30f5000Smrg fi 9252c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9253c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9254c30f5000Smrg ;; 925549e108a1Smrg 9256c30f5000Smrg solaris*) 9257c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9258c30f5000Smrg if test yes = "$GCC"; then 9259c30f5000Smrg wlarc='$wl' 9260c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9261c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9262c30f5000Smrg $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' 9263c30f5000Smrg else 9264c30f5000Smrg case `$CC -V 2>&1` in 9265c30f5000Smrg *"Compilers 5.0"*) 9266c30f5000Smrg wlarc='' 9267c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9268c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9269c30f5000Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9270c30f5000Smrg ;; 9271c30f5000Smrg *) 9272c30f5000Smrg wlarc='$wl' 9273c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9274c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9275c30f5000Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9276c30f5000Smrg ;; 9277c30f5000Smrg esac 9278c30f5000Smrg fi 9279c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9280c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9281c30f5000Smrg case $host_os in 9282c30f5000Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9283c30f5000Smrg *) 9284c30f5000Smrg # The compiler driver will combine and reorder linker options, 9285c30f5000Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9286c30f5000Smrg # but is careful enough not to reorder. 9287c30f5000Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9288c30f5000Smrg if test yes = "$GCC"; then 9289c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9290c30f5000Smrg else 9291c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9292c30f5000Smrg fi 9293c30f5000Smrg ;; 9294c30f5000Smrg esac 9295c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9296c30f5000Smrg ;; 9297e0963edeSmrg 9298c30f5000Smrg sunos4*) 9299c30f5000Smrg if test sequent = "$host_vendor"; then 9300c30f5000Smrg # Use $CC to link under sequent, because it throws in some extra .o 9301c30f5000Smrg # files that make .init and .fini sections work. 9302c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9303c30f5000Smrg else 9304c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9305c30f5000Smrg fi 9306c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9307c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9308c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9309c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9310c30f5000Smrg ;; 931167ab2ff2Smrg 9312c30f5000Smrg sysv4) 9313c30f5000Smrg case $host_vendor in 9314c30f5000Smrg sni) 9315c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9316c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9317c30f5000Smrg ;; 9318c30f5000Smrg siemens) 9319c30f5000Smrg ## LD is ld it makes a PLAMLIB 9320c30f5000Smrg ## CC just makes a GrossModule. 9321c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9322c30f5000Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9323c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9324c30f5000Smrg ;; 9325c30f5000Smrg motorola) 9326c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9327c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9328c30f5000Smrg ;; 9329c30f5000Smrg esac 9330c30f5000Smrg runpath_var='LD_RUN_PATH' 9331c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9332c30f5000Smrg ;; 9333f05b35a2Smrg 9334c30f5000Smrg sysv4.3*) 9335c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9336c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9337c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9338c30f5000Smrg ;; 9339e0963edeSmrg 9340c30f5000Smrg sysv4*MP*) 9341c30f5000Smrg if test -d /usr/nec; then 9342c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9343c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9344c30f5000Smrg runpath_var=LD_RUN_PATH 9345c30f5000Smrg hardcode_runpath_var=yes 9346c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9347c30f5000Smrg fi 9348c30f5000Smrg ;; 934967ab2ff2Smrg 9350c30f5000Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9351c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9352c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9353c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9354c30f5000Smrg runpath_var='LD_RUN_PATH' 9355e494fffdSmrg 9356c30f5000Smrg if test yes = "$GCC"; then 9357c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9358c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9359c30f5000Smrg else 9360c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9361c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9362c30f5000Smrg fi 9363c30f5000Smrg ;; 9364b3a827e2Smrg 9365c30f5000Smrg sysv5* | sco3.2v5* | sco5v6*) 9366c30f5000Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 9367c30f5000Smrg # link with -lc, and that would cause any symbols used from libc to 9368c30f5000Smrg # always be unresolved, which means just about no library would 9369c30f5000Smrg # ever link correctly. If we're not using GNU ld we use -z text 9370c30f5000Smrg # though, which does catch some bad symbols but isn't as heavy-handed 9371c30f5000Smrg # as -z defs. 9372c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9373c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9374c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9375c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9376c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9377c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9378c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9379c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9380c30f5000Smrg runpath_var='LD_RUN_PATH' 9381b3a827e2Smrg 9382c30f5000Smrg if test yes = "$GCC"; then 9383c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9384c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9385c30f5000Smrg else 9386c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9387c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9388c30f5000Smrg fi 9389c30f5000Smrg ;; 9390b3a827e2Smrg 9391c30f5000Smrg uts4*) 9392c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9393c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9394c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9395c30f5000Smrg ;; 9396e494fffdSmrg 9397c30f5000Smrg *) 9398c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9399c30f5000Smrg ;; 9400c30f5000Smrg esac 9401e494fffdSmrg 9402c30f5000Smrg if test sni = "$host_vendor"; then 9403c30f5000Smrg case $host in 9404c30f5000Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9405c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9406c30f5000Smrg ;; 9407c30f5000Smrg esac 9408c30f5000Smrg fi 9409c30f5000Smrg fi 9410c30f5000Smrg]) 9411c30f5000SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9412c30f5000Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9413e494fffdSmrg 9414c30f5000Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9415c30f5000Smrg 9416c30f5000Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9417c30f5000Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9418c30f5000Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 9419c30f5000Smrg [The commands to extract the exported symbol list from a shared archive]) 9420c30f5000Smrg 9421c30f5000Smrg# 9422c30f5000Smrg# Do we need to explicitly link libc? 9423c30f5000Smrg# 9424c30f5000Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9425c30f5000Smrgx|xyes) 9426c30f5000Smrg # Assume -lc should be added 9427c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9428c30f5000Smrg 9429c30f5000Smrg if test yes,yes = "$GCC,$enable_shared"; then 9430c30f5000Smrg case $_LT_TAGVAR(archive_cmds, $1) in 9431c30f5000Smrg *'~'*) 9432c30f5000Smrg # FIXME: we may have to deal with multi-command sequences. 9433c30f5000Smrg ;; 9434c30f5000Smrg '$CC '*) 9435c30f5000Smrg # Test whether the compiler implicitly links with -lc since on some 9436c30f5000Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 9437c30f5000Smrg # to ld, don't add -lc before -lgcc. 9438c30f5000Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9439c30f5000Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9440c30f5000Smrg [$RM conftest* 9441c30f5000Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9442c30f5000Smrg 9443c30f5000Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9444c30f5000Smrg soname=conftest 9445c30f5000Smrg lib=conftest 9446c30f5000Smrg libobjs=conftest.$ac_objext 9447c30f5000Smrg deplibs= 9448c30f5000Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9449c30f5000Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9450c30f5000Smrg compiler_flags=-v 9451c30f5000Smrg linker_flags=-v 9452c30f5000Smrg verstring= 9453c30f5000Smrg output_objdir=. 9454c30f5000Smrg libname=conftest 9455c30f5000Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9456c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 9457c30f5000Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9458c30f5000Smrg then 9459c30f5000Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9460c30f5000Smrg else 9461c30f5000Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9462c30f5000Smrg fi 9463c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9464c30f5000Smrg else 9465c30f5000Smrg cat conftest.err 1>&5 9466c30f5000Smrg fi 9467c30f5000Smrg $RM conftest* 9468c30f5000Smrg ]) 9469c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9470c30f5000Smrg ;; 9471c30f5000Smrg esac 9472c30f5000Smrg fi 9473c30f5000Smrg ;; 9474c30f5000Smrgesac 9475e494fffdSmrg 9476c30f5000Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9477c30f5000Smrg [Whether or not to add -lc for building shared libraries]) 9478c30f5000Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9479c30f5000Smrg [enable_shared_with_static_runtimes], [0], 9480c30f5000Smrg [Whether or not to disallow shared libs when runtime libs are static]) 9481c30f5000Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9482c30f5000Smrg [Compiler flag to allow reflexive dlopens]) 9483c30f5000Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9484c30f5000Smrg [Compiler flag to generate shared objects directly from archives]) 9485c30f5000Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 9486c30f5000Smrg [Whether the compiler copes with passing no objects directly]) 9487c30f5000Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9488c30f5000Smrg [Create an old-style archive from a shared archive]) 9489c30f5000Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9490c30f5000Smrg [Create a temporary old-style archive to link instead of a shared archive]) 9491c30f5000Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9492c30f5000Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9493c30f5000Smrg_LT_TAGDECL([], [module_cmds], [2], 9494c30f5000Smrg [Commands used to build a loadable module if different from building 9495c30f5000Smrg a shared archive.]) 9496c30f5000Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 9497c30f5000Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 9498c30f5000Smrg [Whether we are building with GNU ld or not]) 9499c30f5000Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 9500c30f5000Smrg [Flag that allows shared libraries with undefined symbols to be built]) 9501c30f5000Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 9502c30f5000Smrg [Flag that enforces no undefined symbols]) 9503c30f5000Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9504c30f5000Smrg [Flag to hardcode $libdir into a binary during linking. 9505c30f5000Smrg This must work even if $libdir does not exist]) 9506c30f5000Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9507c30f5000Smrg [Whether we need a single "-rpath" flag with a separated argument]) 9508c30f5000Smrg_LT_TAGDECL([], [hardcode_direct], [0], 9509c30f5000Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9510c30f5000Smrg DIR into the resulting binary]) 9511c30f5000Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9512c30f5000Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9513c30f5000Smrg DIR into the resulting binary and the resulting library dependency is 9514c30f5000Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 9515c30f5000Smrg library is relocated]) 9516c30f5000Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 9517c30f5000Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9518c30f5000Smrg into the resulting binary]) 9519c30f5000Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9520c30f5000Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9521c30f5000Smrg into the resulting binary]) 9522c30f5000Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 9523c30f5000Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 9524c30f5000Smrg into the library and all subsequent libraries and executables linked 9525c30f5000Smrg against it]) 9526c30f5000Smrg_LT_TAGDECL([], [inherit_rpath], [0], 9527c30f5000Smrg [Set to yes if linker adds runtime paths of dependent libraries 9528c30f5000Smrg to runtime path list]) 9529c30f5000Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 9530c30f5000Smrg [Whether libtool must link a program against all its dependency libraries]) 9531c30f5000Smrg_LT_TAGDECL([], [always_export_symbols], [0], 9532c30f5000Smrg [Set to "yes" if exported symbols are required]) 9533c30f5000Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 9534c30f5000Smrg [The commands to list exported symbols]) 9535c30f5000Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 9536c30f5000Smrg [Symbols that should not be listed in the preloaded symbols]) 9537c30f5000Smrg_LT_TAGDECL([], [include_expsyms], [1], 9538c30f5000Smrg [Symbols that must always be exported]) 9539c30f5000Smrg_LT_TAGDECL([], [prelink_cmds], [2], 9540c30f5000Smrg [Commands necessary for linking programs (against libraries) with templates]) 9541c30f5000Smrg_LT_TAGDECL([], [postlink_cmds], [2], 9542c30f5000Smrg [Commands necessary for finishing linking programs]) 9543c30f5000Smrg_LT_TAGDECL([], [file_list_spec], [1], 9544c30f5000Smrg [Specify filename containing input files]) 9545c30f5000Smrgdnl FIXME: Not yet implemented 9546c30f5000Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9547c30f5000Smrgdnl [Compiler flag to generate thread safe objects]) 9548c30f5000Smrg])# _LT_LINKER_SHLIBS 9549e494fffdSmrg 9550e494fffdSmrg 9551c30f5000Smrg# _LT_LANG_C_CONFIG([TAG]) 9552c30f5000Smrg# ------------------------ 9553c30f5000Smrg# Ensure that the configuration variables for a C compiler are suitably 9554c30f5000Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 9555c30f5000Smrg# the compiler configuration to 'libtool'. 9556c30f5000Smrgm4_defun([_LT_LANG_C_CONFIG], 9557c30f5000Smrg[m4_require([_LT_DECL_EGREP])dnl 9558c30f5000Smrglt_save_CC=$CC 9559c30f5000SmrgAC_LANG_PUSH(C) 9560e494fffdSmrg 9561c30f5000Smrg# Source file extension for C test sources. 9562c30f5000Smrgac_ext=c 9563e494fffdSmrg 9564c30f5000Smrg# Object file extension for compiled C test sources. 9565c30f5000Smrgobjext=o 9566c30f5000Smrg_LT_TAGVAR(objext, $1)=$objext 9567e494fffdSmrg 9568c30f5000Smrg# Code to be used in simple compile tests 9569c30f5000Smrglt_simple_compile_test_code="int some_variable = 0;" 9570e494fffdSmrg 9571c30f5000Smrg# Code to be used in simple link tests 9572c30f5000Smrglt_simple_link_test_code='int main(){return(0);}' 9573e494fffdSmrg 9574c30f5000Smrg_LT_TAG_COMPILER 9575c30f5000Smrg# Save the default compiler, since it gets overwritten when the other 9576c30f5000Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9577c30f5000Smrgcompiler_DEFAULT=$CC 9578e494fffdSmrg 9579c30f5000Smrg# save warnings/boilerplate of simple test code 9580c30f5000Smrg_LT_COMPILER_BOILERPLATE 9581c30f5000Smrg_LT_LINKER_BOILERPLATE 9582e494fffdSmrg 9583c30f5000Smrgif test -n "$compiler"; then 9584c30f5000Smrg _LT_COMPILER_NO_RTTI($1) 9585c30f5000Smrg _LT_COMPILER_PIC($1) 9586c30f5000Smrg _LT_COMPILER_C_O($1) 9587c30f5000Smrg _LT_COMPILER_FILE_LOCKS($1) 9588c30f5000Smrg _LT_LINKER_SHLIBS($1) 9589c30f5000Smrg _LT_SYS_DYNAMIC_LINKER($1) 9590c30f5000Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9591c30f5000Smrg LT_SYS_DLOPEN_SELF 9592c30f5000Smrg _LT_CMD_STRIPLIB 9593e494fffdSmrg 9594c30f5000Smrg # Report what library types will actually be built 9595c30f5000Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9596c30f5000Smrg AC_MSG_RESULT([$can_build_shared]) 9597e494fffdSmrg 9598c30f5000Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9599c30f5000Smrg test no = "$can_build_shared" && enable_shared=no 9600b3a827e2Smrg 9601c30f5000Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9602c30f5000Smrg # are all built from PIC. 9603c30f5000Smrg case $host_os in 9604c30f5000Smrg aix3*) 9605c30f5000Smrg test yes = "$enable_shared" && enable_static=no 9606c30f5000Smrg if test -n "$RANLIB"; then 9607c30f5000Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9608c30f5000Smrg postinstall_cmds='$RANLIB $lib' 9609c30f5000Smrg fi 9610c30f5000Smrg ;; 9611b3a827e2Smrg 9612c30f5000Smrg aix[[4-9]]*) 9613c30f5000Smrg if test ia64 != "$host_cpu"; then 9614c30f5000Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9615c30f5000Smrg yes,aix,yes) ;; # shared object as lib.so file only 9616c30f5000Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 9617c30f5000Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 9618c30f5000Smrg esac 9619c30f5000Smrg fi 9620c30f5000Smrg ;; 9621c30f5000Smrg esac 9622c30f5000Smrg AC_MSG_RESULT([$enable_shared]) 9623b3a827e2Smrg 9624c30f5000Smrg AC_MSG_CHECKING([whether to build static libraries]) 9625c30f5000Smrg # Make sure either enable_shared or enable_static is yes. 9626c30f5000Smrg test yes = "$enable_shared" || enable_static=yes 9627c30f5000Smrg AC_MSG_RESULT([$enable_static]) 9628b3a827e2Smrg 9629c30f5000Smrg _LT_CONFIG($1) 9630c30f5000Smrgfi 9631c30f5000SmrgAC_LANG_POP 9632c30f5000SmrgCC=$lt_save_CC 9633c30f5000Smrg])# _LT_LANG_C_CONFIG 9634b3a827e2Smrg 9635b3a827e2Smrg 9636c30f5000Smrg# _LT_LANG_CXX_CONFIG([TAG]) 9637c30f5000Smrg# -------------------------- 9638c30f5000Smrg# Ensure that the configuration variables for a C++ compiler are suitably 9639c30f5000Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 9640c30f5000Smrg# the compiler configuration to 'libtool'. 9641c30f5000Smrgm4_defun([_LT_LANG_CXX_CONFIG], 9642c30f5000Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9643c30f5000Smrgm4_require([_LT_DECL_EGREP])dnl 9644c30f5000Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9645c30f5000Smrgif test -n "$CXX" && ( test no != "$CXX" && 9646c30f5000Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9647c30f5000Smrg (test g++ != "$CXX"))); then 9648c30f5000Smrg AC_PROG_CXXCPP 9649c30f5000Smrgelse 9650c30f5000Smrg _lt_caught_CXX_error=yes 9651c30f5000Smrgfi 9652b3a827e2Smrg 9653c30f5000SmrgAC_LANG_PUSH(C++) 9654c30f5000Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9655c30f5000Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9656c30f5000Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9657c30f5000Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9658c30f5000Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 9659c30f5000Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9660c30f5000Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9661c30f5000Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9662c30f5000Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9663c30f5000Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9664c30f5000Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9665c30f5000Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9666c30f5000Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9667c30f5000Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9668c30f5000Smrg_LT_TAGVAR(module_cmds, $1)= 9669c30f5000Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9670c30f5000Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9671c30f5000Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9672c30f5000Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9673c30f5000Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9674c30f5000Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9675c30f5000Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9676c30f5000Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9677b3a827e2Smrg 9678c30f5000Smrg# Source file extension for C++ test sources. 9679c30f5000Smrgac_ext=cpp 9680b3a827e2Smrg 9681c30f5000Smrg# Object file extension for compiled C++ test sources. 9682c30f5000Smrgobjext=o 9683c30f5000Smrg_LT_TAGVAR(objext, $1)=$objext 9684b3a827e2Smrg 9685c30f5000Smrg# No sense in running all these tests if we already determined that 9686c30f5000Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 9687c30f5000Smrg# are currently assumed to apply to all compilers on this platform, 9688c30f5000Smrg# and will be corrupted by setting them based on a non-working compiler. 9689c30f5000Smrgif test yes != "$_lt_caught_CXX_error"; then 9690c30f5000Smrg # Code to be used in simple compile tests 9691c30f5000Smrg lt_simple_compile_test_code="int some_variable = 0;" 9692b3a827e2Smrg 9693c30f5000Smrg # Code to be used in simple link tests 9694c30f5000Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9695b3a827e2Smrg 9696c30f5000Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9697c30f5000Smrg _LT_TAG_COMPILER 9698b3a827e2Smrg 9699c30f5000Smrg # save warnings/boilerplate of simple test code 9700c30f5000Smrg _LT_COMPILER_BOILERPLATE 9701c30f5000Smrg _LT_LINKER_BOILERPLATE 9702b3a827e2Smrg 9703c30f5000Smrg # Allow CC to be a program name with arguments. 9704c30f5000Smrg lt_save_CC=$CC 9705c30f5000Smrg lt_save_CFLAGS=$CFLAGS 9706c30f5000Smrg lt_save_LD=$LD 9707c30f5000Smrg lt_save_GCC=$GCC 9708c30f5000Smrg GCC=$GXX 9709c30f5000Smrg lt_save_with_gnu_ld=$with_gnu_ld 9710c30f5000Smrg lt_save_path_LD=$lt_cv_path_LD 9711c30f5000Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9712c30f5000Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9713c30f5000Smrg else 9714c30f5000Smrg $as_unset lt_cv_prog_gnu_ld 9715c30f5000Smrg fi 9716c30f5000Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 9717c30f5000Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 9718c30f5000Smrg else 9719c30f5000Smrg $as_unset lt_cv_path_LD 9720c30f5000Smrg fi 9721c30f5000Smrg test -z "${LDCXX+set}" || LD=$LDCXX 9722c30f5000Smrg CC=${CXX-"c++"} 9723c30f5000Smrg CFLAGS=$CXXFLAGS 9724c30f5000Smrg compiler=$CC 9725c30f5000Smrg _LT_TAGVAR(compiler, $1)=$CC 9726c30f5000Smrg _LT_CC_BASENAME([$compiler]) 9727b3a827e2Smrg 9728c30f5000Smrg if test -n "$compiler"; then 9729c30f5000Smrg # We don't want -fno-exception when compiling C++ code, so set the 9730c30f5000Smrg # no_builtin_flag separately 9731c30f5000Smrg if test yes = "$GXX"; then 9732c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9733c30f5000Smrg else 9734c30f5000Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9735c30f5000Smrg fi 9736b3a827e2Smrg 9737c30f5000Smrg if test yes = "$GXX"; then 9738c30f5000Smrg # Set up default GNU C++ configuration 9739b3a827e2Smrg 9740c30f5000Smrg LT_PATH_LD 9741b3a827e2Smrg 9742c30f5000Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 9743c30f5000Smrg # archiving commands below assume that GNU ld is being used. 9744c30f5000Smrg if test yes = "$with_gnu_ld"; then 9745c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9746c30f5000Smrg _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' 9747b3a827e2Smrg 9748c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9749c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9750b3a827e2Smrg 9751c30f5000Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 9752c30f5000Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9753c30f5000Smrg # investigate it a little bit more. (MM) 9754c30f5000Smrg wlarc='$wl' 9755b3a827e2Smrg 9756c30f5000Smrg # ancient GNU ld didn't support --whole-archive et. al. 9757c30f5000Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9758c30f5000Smrg $GREP 'no-whole-archive' > /dev/null; then 9759c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9760c30f5000Smrg else 9761c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9762c30f5000Smrg fi 9763c30f5000Smrg else 9764c30f5000Smrg with_gnu_ld=no 9765c30f5000Smrg wlarc= 9766b3a827e2Smrg 9767c30f5000Smrg # A generic and very simple default shared library creation 9768c30f5000Smrg # command for GNU C++ for the case where it uses the native 9769c30f5000Smrg # linker, instead of GNU ld. If possible, this setting should 9770c30f5000Smrg # overridden to take advantage of the native linker features on 9771c30f5000Smrg # the platform it is being used on. 9772c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9773c30f5000Smrg fi 9774e494fffdSmrg 9775c30f5000Smrg # Commands to make compiler produce verbose output that lists 9776c30f5000Smrg # what "hidden" libraries, object files and flags are used when 9777c30f5000Smrg # linking a shared library. 9778c30f5000Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9779e0963edeSmrg 9780c30f5000Smrg else 9781c30f5000Smrg GXX=no 9782c30f5000Smrg with_gnu_ld=no 9783c30f5000Smrg wlarc= 9784c30f5000Smrg fi 9785e0963edeSmrg 9786c30f5000Smrg # PORTME: fill in a description of your system's C++ link characteristics 9787c30f5000Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9788c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9789c30f5000Smrg case $host_os in 9790c30f5000Smrg aix3*) 9791c30f5000Smrg # FIXME: insert proper C++ library support 9792c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9793c30f5000Smrg ;; 9794c30f5000Smrg aix[[4-9]]*) 9795c30f5000Smrg if test ia64 = "$host_cpu"; then 9796c30f5000Smrg # On IA64, the linker does run time linking by default, so we don't 9797c30f5000Smrg # have to do anything special. 9798c30f5000Smrg aix_use_runtimelinking=no 9799c30f5000Smrg exp_sym_flag='-Bexport' 9800c30f5000Smrg no_entry_flag= 9801c30f5000Smrg else 9802c30f5000Smrg aix_use_runtimelinking=no 9803e0963edeSmrg 9804c30f5000Smrg # Test if we are trying to use run time linking or normal 9805c30f5000Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9806c30f5000Smrg # have runtime linking enabled, and use it for executables. 9807c30f5000Smrg # For shared libraries, we enable/disable runtime linking 9808c30f5000Smrg # depending on the kind of the shared library created - 9809c30f5000Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 9810c30f5000Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9811c30f5000Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 9812c30f5000Smrg # lib.a static archive 9813c30f5000Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9814c30f5000Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 9815c30f5000Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9816c30f5000Smrg # lib.a(lib.so.V) shared, rtl:no 9817c30f5000Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9818c30f5000Smrg # lib.a static archive 9819c30f5000Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9820c30f5000Smrg for ld_flag in $LDFLAGS; do 9821c30f5000Smrg case $ld_flag in 9822c30f5000Smrg *-brtl*) 9823c30f5000Smrg aix_use_runtimelinking=yes 9824c30f5000Smrg break 9825c30f5000Smrg ;; 9826c30f5000Smrg esac 9827c30f5000Smrg done 9828c30f5000Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9829c30f5000Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9830c30f5000Smrg # so we don't have lib.a shared libs to link our executables. 9831c30f5000Smrg # We have to force runtime linking in this case. 9832c30f5000Smrg aix_use_runtimelinking=yes 9833c30f5000Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9834c30f5000Smrg fi 9835c30f5000Smrg ;; 9836c30f5000Smrg esac 983749e108a1Smrg 9838c30f5000Smrg exp_sym_flag='-bexport' 9839c30f5000Smrg no_entry_flag='-bnoentry' 9840c30f5000Smrg fi 984149e108a1Smrg 9842c30f5000Smrg # When large executables or shared objects are built, AIX ld can 9843c30f5000Smrg # have problems creating the table of contents. If linking a library 9844c30f5000Smrg # or program results in "error TOC overflow" add -mminimal-toc to 9845c30f5000Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9846c30f5000Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 984749e108a1Smrg 9848c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='' 9849c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9850c30f5000Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9851c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9852c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9853c30f5000Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9854c30f5000Smrg case $with_aix_soname,$aix_use_runtimelinking in 9855c30f5000Smrg aix,*) ;; # no import file 9856c30f5000Smrg svr4,* | *,yes) # use import file 9857c30f5000Smrg # The Import File defines what to hardcode. 9858c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9859c30f5000Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9860c30f5000Smrg ;; 9861c30f5000Smrg esac 986249e108a1Smrg 9863c30f5000Smrg if test yes = "$GXX"; then 9864c30f5000Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9865c30f5000Smrg # We only want to do this on AIX 4.2 and lower, the check 9866c30f5000Smrg # below for broken collect2 doesn't work under 4.3+ 9867c30f5000Smrg collect2name=`$CC -print-prog-name=collect2` 9868c30f5000Smrg if test -f "$collect2name" && 9869c30f5000Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9870c30f5000Smrg then 9871c30f5000Smrg # We have reworked collect2 9872c30f5000Smrg : 9873c30f5000Smrg else 9874c30f5000Smrg # We have old collect2 9875c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9876c30f5000Smrg # It fails to find uninstalled libraries when the uninstalled 9877c30f5000Smrg # path is not listed in the libpath. Setting hardcode_minus_L 9878c30f5000Smrg # to unsupported forces relinking 9879c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9880c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9881c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9882c30f5000Smrg fi 9883c30f5000Smrg esac 9884c30f5000Smrg shared_flag='-shared' 9885c30f5000Smrg if test yes = "$aix_use_runtimelinking"; then 9886c30f5000Smrg shared_flag=$shared_flag' $wl-G' 9887c30f5000Smrg fi 9888c30f5000Smrg # Need to ensure runtime linking is disabled for the traditional 9889c30f5000Smrg # shared library, or the linker may eventually find shared libraries 9890c30f5000Smrg # /with/ Import File - we do not want to mix them. 9891c30f5000Smrg shared_flag_aix='-shared' 9892c30f5000Smrg shared_flag_svr4='-shared $wl-G' 9893c30f5000Smrg else 9894c30f5000Smrg # not using gcc 9895c30f5000Smrg if test ia64 = "$host_cpu"; then 9896c30f5000Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9897c30f5000Smrg # chokes on -Wl,-G. The following line is correct: 9898c30f5000Smrg shared_flag='-G' 9899c30f5000Smrg else 9900c30f5000Smrg if test yes = "$aix_use_runtimelinking"; then 9901c30f5000Smrg shared_flag='$wl-G' 9902c30f5000Smrg else 9903c30f5000Smrg shared_flag='$wl-bM:SRE' 9904c30f5000Smrg fi 9905c30f5000Smrg shared_flag_aix='$wl-bM:SRE' 9906c30f5000Smrg shared_flag_svr4='$wl-G' 9907c30f5000Smrg fi 9908c30f5000Smrg fi 990949e108a1Smrg 9910c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9911c30f5000Smrg # It seems that -bexpall does not export symbols beginning with 9912c30f5000Smrg # underscore (_), so it is better to generate a list of symbols to 9913c30f5000Smrg # export. 9914c30f5000Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9915c30f5000Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9916c30f5000Smrg # Warning - without using the other runtime loading flags (-brtl), 9917c30f5000Smrg # -berok will link without error, but may produce a broken library. 9918c30f5000Smrg # The "-G" linker flag allows undefined symbols. 9919c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 9920c30f5000Smrg # Determine the default libpath from the value encoded in an empty 9921c30f5000Smrg # executable. 9922c30f5000Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9923c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 992449e108a1Smrg 9925c30f5000Smrg _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 9926c30f5000Smrg else 9927c30f5000Smrg if test ia64 = "$host_cpu"; then 9928c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9929c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 9930c30f5000Smrg _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" 9931c30f5000Smrg else 9932c30f5000Smrg # Determine the default libpath from the value encoded in an 9933c30f5000Smrg # empty executable. 9934c30f5000Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9935c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9936c30f5000Smrg # Warning - without using the other run time loading flags, 9937c30f5000Smrg # -berok will link without error, but may produce a broken library. 9938c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 9939c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 9940c30f5000Smrg if test yes = "$with_gnu_ld"; then 9941c30f5000Smrg # We only use this code for GNU lds that support --whole-archive. 9942c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9943c30f5000Smrg else 9944c30f5000Smrg # Exported symbols can be pulled into shared objects from archives 9945c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 9946c30f5000Smrg fi 9947c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9948c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 9949c30f5000Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 9950c30f5000Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 9951c30f5000Smrg if test svr4 != "$with_aix_soname"; then 9952c30f5000Smrg # This is similar to how AIX traditionally builds its shared 9953c30f5000Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 9954c30f5000Smrg _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' 9955c30f5000Smrg fi 9956c30f5000Smrg if test aix != "$with_aix_soname"; then 9957c30f5000Smrg _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' 9958c30f5000Smrg else 9959c30f5000Smrg # used by -dlpreopen to get the symbols 9960c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 9961c30f5000Smrg fi 9962c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 9963c30f5000Smrg fi 9964c30f5000Smrg fi 9965c30f5000Smrg ;; 996649e108a1Smrg 9967c30f5000Smrg beos*) 9968c30f5000Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9969c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9970c30f5000Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 9971c30f5000Smrg # support --undefined. This deserves some investigation. FIXME 9972c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9973c30f5000Smrg else 9974c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9975c30f5000Smrg fi 9976c30f5000Smrg ;; 997749e108a1Smrg 9978c30f5000Smrg chorus*) 9979c30f5000Smrg case $cc_basename in 9980c30f5000Smrg *) 9981c30f5000Smrg # FIXME: insert proper C++ library support 9982c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9983c30f5000Smrg ;; 9984c30f5000Smrg esac 9985c30f5000Smrg ;; 9986e0963edeSmrg 9987c30f5000Smrg cygwin* | mingw* | pw32* | cegcc*) 9988c30f5000Smrg case $GXX,$cc_basename in 9989c30f5000Smrg ,cl* | no,cl* | ,icl* | no,icl*) 9990c30f5000Smrg # Native MSVC or ICC 9991c30f5000Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 9992c30f5000Smrg # no search path for DLLs. 9993c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9994c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9995c30f5000Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9996c30f5000Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9997c30f5000Smrg # Tell ltmain to make .lib files, not .a files. 9998c30f5000Smrg libext=lib 9999c30f5000Smrg # Tell ltmain to make .dll files, not .so files. 10000c30f5000Smrg shrext_cmds=.dll 10001c30f5000Smrg # FIXME: Setting linknames here is a bad hack. 10002c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10003c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10004c30f5000Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 10005c30f5000Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10006c30f5000Smrg else 10007c30f5000Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10008c30f5000Smrg fi~ 10009c30f5000Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10010c30f5000Smrg linknames=' 10011c30f5000Smrg # The linker will not automatically build a static lib if we build a DLL. 10012c30f5000Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10013c30f5000Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10014c30f5000Smrg # Don't use ranlib 10015c30f5000Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10016c30f5000Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10017c30f5000Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10018c30f5000Smrg case $lt_outputfile in 10019c30f5000Smrg *.exe|*.EXE) ;; 10020c30f5000Smrg *) 10021c30f5000Smrg lt_outputfile=$lt_outputfile.exe 10022c30f5000Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 10023c30f5000Smrg ;; 10024c30f5000Smrg esac~ 10025c30f5000Smrg func_to_tool_file "$lt_outputfile"~ 10026c30f5000Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10027c30f5000Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10028c30f5000Smrg $RM "$lt_outputfile.manifest"; 10029c30f5000Smrg fi' 10030c30f5000Smrg ;; 10031c30f5000Smrg *) 10032c30f5000Smrg # g++ 10033c30f5000Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10034c30f5000Smrg # as there is no search path for DLLs. 10035c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10036c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10037c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10038c30f5000Smrg _LT_TAGVAR(always_export_symbols, $1)=no 10039c30f5000Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10040e0963edeSmrg 10041c30f5000Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10042c30f5000Smrg _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' 10043c30f5000Smrg # If the export-symbols file already is a .def file, use it as 10044c30f5000Smrg # is; otherwise, prepend EXPORTS... 10045c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10046c30f5000Smrg cp $export_symbols $output_objdir/$soname.def; 10047c30f5000Smrg else 10048c30f5000Smrg echo EXPORTS > $output_objdir/$soname.def; 10049c30f5000Smrg cat $export_symbols >> $output_objdir/$soname.def; 10050c30f5000Smrg fi~ 10051c30f5000Smrg $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' 10052c30f5000Smrg else 10053c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10054c30f5000Smrg fi 10055c30f5000Smrg ;; 10056c30f5000Smrg esac 10057c30f5000Smrg ;; 10058c30f5000Smrg darwin* | rhapsody*) 10059c30f5000Smrg _LT_DARWIN_LINKER_FEATURES($1) 10060c30f5000Smrg ;; 10061e0963edeSmrg 10062c30f5000Smrg os2*) 10063c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10064c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10065c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10066c30f5000Smrg shrext_cmds=.dll 10067c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10068c30f5000Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10069c30f5000Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10070c30f5000Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10071c30f5000Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10072c30f5000Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10073c30f5000Smrg emximp -o $lib $output_objdir/$libname.def' 10074c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10075c30f5000Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10076c30f5000Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10077c30f5000Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10078c30f5000Smrg prefix_cmds="$SED"~ 10079c30f5000Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10080c30f5000Smrg prefix_cmds="$prefix_cmds -e 1d"; 10081c30f5000Smrg fi~ 10082c30f5000Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10083c30f5000Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10084c30f5000Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10085c30f5000Smrg emximp -o $lib $output_objdir/$libname.def' 10086c30f5000Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10087c30f5000Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10088c30f5000Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10089c30f5000Smrg ;; 10090e0963edeSmrg 10091c30f5000Smrg dgux*) 10092c30f5000Smrg case $cc_basename in 10093c30f5000Smrg ec++*) 10094c30f5000Smrg # FIXME: insert proper C++ library support 10095c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10096c30f5000Smrg ;; 10097c30f5000Smrg ghcx*) 10098c30f5000Smrg # Green Hills C++ Compiler 10099c30f5000Smrg # FIXME: insert proper C++ library support 10100c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10101c30f5000Smrg ;; 10102c30f5000Smrg *) 10103c30f5000Smrg # FIXME: insert proper C++ library support 10104c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10105c30f5000Smrg ;; 10106c30f5000Smrg esac 10107c30f5000Smrg ;; 10108f05b35a2Smrg 10109c30f5000Smrg freebsd2.*) 10110c30f5000Smrg # C++ shared libraries reported to be fairly broken before 10111c30f5000Smrg # switch to ELF 10112c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10113c30f5000Smrg ;; 10114f05b35a2Smrg 10115c30f5000Smrg freebsd-elf*) 10116c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10117c30f5000Smrg ;; 10118f05b35a2Smrg 10119c30f5000Smrg freebsd* | dragonfly* | midnightbsd*) 10120c30f5000Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10121c30f5000Smrg # conventions 10122c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10123c30f5000Smrg ;; 10124f05b35a2Smrg 10125c30f5000Smrg haiku*) 10126c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10127c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10128c30f5000Smrg ;; 10129e0963edeSmrg 10130c30f5000Smrg hpux9*) 10131c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10132c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10133c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10134c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10135c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10136c30f5000Smrg # but as the default 10137c30f5000Smrg # location of the library. 10138f05b35a2Smrg 10139c30f5000Smrg case $cc_basename in 10140c30f5000Smrg CC*) 10141c30f5000Smrg # FIXME: insert proper C++ library support 10142c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10143c30f5000Smrg ;; 10144c30f5000Smrg aCC*) 10145c30f5000Smrg _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' 10146c30f5000Smrg # Commands to make compiler produce verbose output that lists 10147c30f5000Smrg # what "hidden" libraries, object files and flags are used when 10148c30f5000Smrg # linking a shared library. 10149c30f5000Smrg # 10150c30f5000Smrg # There doesn't appear to be a way to prevent this compiler from 10151c30f5000Smrg # explicitly linking system object files so we need to strip them 10152c30f5000Smrg # from the output so that they don't get included in the library 10153c30f5000Smrg # dependencies. 10154c30f5000Smrg 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"' 10155c30f5000Smrg ;; 10156c30f5000Smrg *) 10157c30f5000Smrg if test yes = "$GXX"; then 10158c30f5000Smrg _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' 10159c30f5000Smrg else 10160c30f5000Smrg # FIXME: insert proper C++ library support 10161c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10162c30f5000Smrg fi 10163c30f5000Smrg ;; 10164c30f5000Smrg esac 10165c30f5000Smrg ;; 10166e0963edeSmrg 10167c30f5000Smrg hpux10*|hpux11*) 10168c30f5000Smrg if test no = "$with_gnu_ld"; then 10169c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10170c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10171e0963edeSmrg 10172c30f5000Smrg case $host_cpu in 10173c30f5000Smrg hppa*64*|ia64*) 10174c30f5000Smrg ;; 10175c30f5000Smrg *) 10176c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10177c30f5000Smrg ;; 10178c30f5000Smrg esac 10179c30f5000Smrg fi 10180c30f5000Smrg case $host_cpu in 10181c30f5000Smrg hppa*64*|ia64*) 10182c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10183c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10184c30f5000Smrg ;; 10185c30f5000Smrg *) 10186c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10187c30f5000Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10188c30f5000Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10189c30f5000Smrg # but as the default 10190c30f5000Smrg # location of the library. 10191c30f5000Smrg ;; 10192c30f5000Smrg esac 10193e0963edeSmrg 10194c30f5000Smrg case $cc_basename in 10195c30f5000Smrg CC*) 10196c30f5000Smrg # FIXME: insert proper C++ library support 10197c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10198c30f5000Smrg ;; 10199c30f5000Smrg aCC*) 10200c30f5000Smrg case $host_cpu in 10201c30f5000Smrg hppa*64*) 10202c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10203c30f5000Smrg ;; 10204c30f5000Smrg ia64*) 10205c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10206c30f5000Smrg ;; 10207c30f5000Smrg *) 10208c30f5000Smrg _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' 10209c30f5000Smrg ;; 10210c30f5000Smrg esac 10211c30f5000Smrg # Commands to make compiler produce verbose output that lists 10212c30f5000Smrg # what "hidden" libraries, object files and flags are used when 10213c30f5000Smrg # linking a shared library. 10214c30f5000Smrg # 10215c30f5000Smrg # There doesn't appear to be a way to prevent this compiler from 10216c30f5000Smrg # explicitly linking system object files so we need to strip them 10217c30f5000Smrg # from the output so that they don't get included in the library 10218c30f5000Smrg # dependencies. 10219c30f5000Smrg 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"' 10220c30f5000Smrg ;; 10221c30f5000Smrg *) 10222c30f5000Smrg if test yes = "$GXX"; then 10223c30f5000Smrg if test no = "$with_gnu_ld"; then 10224c30f5000Smrg case $host_cpu in 10225c30f5000Smrg hppa*64*) 10226c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10227c30f5000Smrg ;; 10228c30f5000Smrg ia64*) 10229c30f5000Smrg _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' 10230c30f5000Smrg ;; 10231c30f5000Smrg *) 10232c30f5000Smrg _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' 10233c30f5000Smrg ;; 10234c30f5000Smrg esac 10235c30f5000Smrg fi 10236c30f5000Smrg else 10237c30f5000Smrg # FIXME: insert proper C++ library support 10238c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10239c30f5000Smrg fi 10240c30f5000Smrg ;; 10241c30f5000Smrg esac 10242c30f5000Smrg ;; 10243e0963edeSmrg 10244c30f5000Smrg interix[[3-9]]*) 10245c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10246c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10247c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10248c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10249c30f5000Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10250c30f5000Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10251c30f5000Smrg # default) and relocated if they conflict, which is a slow very memory 10252c30f5000Smrg # consuming and fragmenting process. To avoid this, we pick a random, 10253c30f5000Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10254c30f5000Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10255c30f5000Smrg _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' 10256c30f5000Smrg _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' 10257c30f5000Smrg ;; 10258c30f5000Smrg irix5* | irix6*) 10259c30f5000Smrg case $cc_basename in 10260c30f5000Smrg CC*) 10261c30f5000Smrg # SGI C++ 10262c30f5000Smrg _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' 10263e0963edeSmrg 10264c30f5000Smrg # Archives containing C++ object files must be created using 10265c30f5000Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10266c30f5000Smrg # necessary to make sure instantiated templates are included 10267c30f5000Smrg # in the archive. 10268c30f5000Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10269c30f5000Smrg ;; 10270c30f5000Smrg *) 10271c30f5000Smrg if test yes = "$GXX"; then 10272c30f5000Smrg if test no = "$with_gnu_ld"; then 10273c30f5000Smrg _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' 10274c30f5000Smrg else 10275c30f5000Smrg _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' 10276c30f5000Smrg fi 10277c30f5000Smrg fi 10278c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10279c30f5000Smrg ;; 10280c30f5000Smrg esac 10281c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10282c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10283c30f5000Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 10284c30f5000Smrg ;; 10285e0963edeSmrg 10286c30f5000Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10287c30f5000Smrg case $cc_basename in 10288c30f5000Smrg KCC*) 10289c30f5000Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10290f05b35a2Smrg 10291c30f5000Smrg # KCC will only create a shared library if the output file 10292c30f5000Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10293c30f5000Smrg # to its proper name (with version) after linking. 10294c30f5000Smrg _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' 10295c30f5000Smrg _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' 10296c30f5000Smrg # Commands to make compiler produce verbose output that lists 10297c30f5000Smrg # what "hidden" libraries, object files and flags are used when 10298c30f5000Smrg # linking a shared library. 10299c30f5000Smrg # 10300c30f5000Smrg # There doesn't appear to be a way to prevent this compiler from 10301c30f5000Smrg # explicitly linking system object files so we need to strip them 10302c30f5000Smrg # from the output so that they don't get included in the library 10303c30f5000Smrg # dependencies. 10304c30f5000Smrg 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"' 10305e0963edeSmrg 10306c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10307c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10308e0963edeSmrg 10309c30f5000Smrg # Archives containing C++ object files must be created using 10310c30f5000Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10311c30f5000Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10312c30f5000Smrg ;; 10313c30f5000Smrg icpc* | ecpc* ) 10314c30f5000Smrg # Intel C++ 10315c30f5000Smrg with_gnu_ld=yes 10316c30f5000Smrg # version 8.0 and above of icpc choke on multiply defined symbols 10317c30f5000Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10318c30f5000Smrg # earlier do not add the objects themselves. 10319c30f5000Smrg case `$CC -V 2>&1` in 10320c30f5000Smrg *"Version 7."*) 10321c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10322c30f5000Smrg _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' 10323c30f5000Smrg ;; 10324c30f5000Smrg *) # Version 8.0 or newer 10325c30f5000Smrg tmp_idyn= 10326c30f5000Smrg case $host_cpu in 10327c30f5000Smrg ia64*) tmp_idyn=' -i_dynamic';; 10328c30f5000Smrg esac 10329c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10330c30f5000Smrg _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' 10331c30f5000Smrg ;; 10332c30f5000Smrg esac 10333c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10334c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10335c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10336c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10337c30f5000Smrg ;; 10338c30f5000Smrg pgCC* | pgcpp*) 10339c30f5000Smrg # Portland Group C++ compiler 10340c30f5000Smrg case `$CC -V` in 10341c30f5000Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10342c30f5000Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10343c30f5000Smrg rm -rf $tpldir~ 10344c30f5000Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10345c30f5000Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10346c30f5000Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10347c30f5000Smrg rm -rf $tpldir~ 10348c30f5000Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10349c30f5000Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10350c30f5000Smrg $RANLIB $oldlib' 10351c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10352c30f5000Smrg rm -rf $tpldir~ 10353c30f5000Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10354c30f5000Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10355c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10356c30f5000Smrg rm -rf $tpldir~ 10357c30f5000Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10358c30f5000Smrg $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' 10359c30f5000Smrg ;; 10360c30f5000Smrg *) # Version 6 and above use weak symbols 10361c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10362c30f5000Smrg _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' 10363c30f5000Smrg ;; 10364c30f5000Smrg esac 1036549e108a1Smrg 10366c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10367c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10368c30f5000Smrg _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' 10369c30f5000Smrg ;; 10370c30f5000Smrg cxx*) 10371c30f5000Smrg # Compaq C++ 10372c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10373c30f5000Smrg _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' 1037449e108a1Smrg 10375c30f5000Smrg runpath_var=LD_RUN_PATH 10376c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10377c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10378e0963edeSmrg 10379c30f5000Smrg # Commands to make compiler produce verbose output that lists 10380c30f5000Smrg # what "hidden" libraries, object files and flags are used when 10381c30f5000Smrg # linking a shared library. 10382c30f5000Smrg # 10383c30f5000Smrg # There doesn't appear to be a way to prevent this compiler from 10384c30f5000Smrg # explicitly linking system object files so we need to strip them 10385c30f5000Smrg # from the output so that they don't get included in the library 10386c30f5000Smrg # dependencies. 10387c30f5000Smrg 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' 10388c30f5000Smrg ;; 10389c30f5000Smrg xl* | mpixl* | bgxl*) 10390c30f5000Smrg # IBM XL 8.0 on PPC, with GNU ld 10391c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10392c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10393c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10394c30f5000Smrg if test yes = "$supports_anon_versioning"; then 10395c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10396c30f5000Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10397c30f5000Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 10398c30f5000Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10399c30f5000Smrg fi 10400c30f5000Smrg ;; 10401c30f5000Smrg *) 10402c30f5000Smrg case `$CC -V 2>&1 | $SED 5q` in 10403c30f5000Smrg *Sun\ C*) 10404c30f5000Smrg # Sun C++ 5.9 10405c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10406c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10407c30f5000Smrg _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' 10408c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10409c30f5000Smrg _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' 10410c30f5000Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 10411e0963edeSmrg 10412c30f5000Smrg # Not sure whether something based on 10413c30f5000Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10414c30f5000Smrg # would be better. 10415c30f5000Smrg output_verbose_link_cmd='func_echo_all' 10416e0963edeSmrg 10417c30f5000Smrg # Archives containing C++ object files must be created using 10418c30f5000Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10419c30f5000Smrg # necessary to make sure instantiated templates are included 10420c30f5000Smrg # in the archive. 10421c30f5000Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10422c30f5000Smrg ;; 10423c30f5000Smrg esac 10424c30f5000Smrg ;; 10425c30f5000Smrg esac 10426c30f5000Smrg ;; 10427e0963edeSmrg 10428c30f5000Smrg lynxos*) 10429c30f5000Smrg # FIXME: insert proper C++ library support 10430c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10431c30f5000Smrg ;; 10432e0963edeSmrg 10433c30f5000Smrg m88k*) 10434c30f5000Smrg # FIXME: insert proper C++ library support 10435c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10436c30f5000Smrg ;; 10437e0963edeSmrg 10438c30f5000Smrg mvs*) 10439c30f5000Smrg case $cc_basename in 10440c30f5000Smrg cxx*) 10441c30f5000Smrg # FIXME: insert proper C++ library support 10442c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10443c30f5000Smrg ;; 10444c30f5000Smrg *) 10445c30f5000Smrg # FIXME: insert proper C++ library support 10446c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10447c30f5000Smrg ;; 10448c30f5000Smrg esac 10449c30f5000Smrg ;; 10450e0963edeSmrg 10451c30f5000Smrg netbsd*) 10452c30f5000Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10453c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10454c30f5000Smrg wlarc= 10455c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10456c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10457c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10458c30f5000Smrg fi 10459c30f5000Smrg # Workaround some broken pre-1.5 toolchains 10460c30f5000Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10461c30f5000Smrg ;; 10462e0963edeSmrg 10463c30f5000Smrg *nto* | *qnx*) 10464c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10465c30f5000Smrg ;; 10466e0963edeSmrg 10467c30f5000Smrg openbsd* | bitrig*) 10468c30f5000Smrg if test -f /usr/libexec/ld.so; then 10469c30f5000Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10470c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10471c30f5000Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10472c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10473c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10474c30f5000Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10475c30f5000Smrg _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' 10476c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10477c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10478c30f5000Smrg fi 10479c30f5000Smrg output_verbose_link_cmd=func_echo_all 10480c30f5000Smrg else 10481c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10482c30f5000Smrg fi 10483c30f5000Smrg ;; 10484f05b35a2Smrg 10485c30f5000Smrg osf3* | osf4* | osf5*) 10486c30f5000Smrg case $cc_basename in 10487c30f5000Smrg KCC*) 10488c30f5000Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10489e0963edeSmrg 10490c30f5000Smrg # KCC will only create a shared library if the output file 10491c30f5000Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10492c30f5000Smrg # to its proper name (with version) after linking. 10493c30f5000Smrg _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' 10494e0963edeSmrg 10495c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10496c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 1049749e108a1Smrg 10498c30f5000Smrg # Archives containing C++ object files must be created using 10499c30f5000Smrg # the KAI C++ compiler. 10500c30f5000Smrg case $host in 10501c30f5000Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10502c30f5000Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10503c30f5000Smrg esac 10504c30f5000Smrg ;; 10505c30f5000Smrg RCC*) 10506c30f5000Smrg # Rational C++ 2.4.1 10507c30f5000Smrg # FIXME: insert proper C++ library support 10508c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10509c30f5000Smrg ;; 10510c30f5000Smrg cxx*) 10511c30f5000Smrg case $host in 10512c30f5000Smrg osf3*) 10513c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10514c30f5000Smrg _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' 10515c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10516c30f5000Smrg ;; 10517c30f5000Smrg *) 10518c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10519c30f5000Smrg _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' 10520c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10521c30f5000Smrg echo "-hidden">> $lib.exp~ 10522c30f5000Smrg $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~ 10523c30f5000Smrg $RM $lib.exp' 10524c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10525c30f5000Smrg ;; 10526c30f5000Smrg esac 1052767ab2ff2Smrg 10528c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10529c30f5000Smrg 10530c30f5000Smrg # Commands to make compiler produce verbose output that lists 10531c30f5000Smrg # what "hidden" libraries, object files and flags are used when 10532c30f5000Smrg # linking a shared library. 10533c30f5000Smrg # 10534c30f5000Smrg # There doesn't appear to be a way to prevent this compiler from 10535c30f5000Smrg # explicitly linking system object files so we need to strip them 10536c30f5000Smrg # from the output so that they don't get included in the library 10537c30f5000Smrg # dependencies. 10538c30f5000Smrg 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"' 10539c30f5000Smrg ;; 10540c30f5000Smrg *) 10541c30f5000Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 10542c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10543c30f5000Smrg case $host in 10544c30f5000Smrg osf3*) 10545c30f5000Smrg _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' 10546c30f5000Smrg ;; 10547c30f5000Smrg *) 10548c30f5000Smrg _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' 10549c30f5000Smrg ;; 10550c30f5000Smrg esac 1055149e108a1Smrg 10552c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10553c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 1055449e108a1Smrg 10555c30f5000Smrg # Commands to make compiler produce verbose output that lists 10556c30f5000Smrg # what "hidden" libraries, object files and flags are used when 10557c30f5000Smrg # linking a shared library. 10558c30f5000Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 1055967ab2ff2Smrg 10560c30f5000Smrg else 10561c30f5000Smrg # FIXME: insert proper C++ library support 10562c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10563c30f5000Smrg fi 10564c30f5000Smrg ;; 10565c30f5000Smrg esac 10566c30f5000Smrg ;; 10567e0963edeSmrg 10568c30f5000Smrg psos*) 10569c30f5000Smrg # FIXME: insert proper C++ library support 10570c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10571c30f5000Smrg ;; 10572e0963edeSmrg 10573c30f5000Smrg sunos4*) 10574c30f5000Smrg case $cc_basename in 10575c30f5000Smrg CC*) 10576c30f5000Smrg # Sun C++ 4.x 10577c30f5000Smrg # FIXME: insert proper C++ library support 10578c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10579c30f5000Smrg ;; 10580c30f5000Smrg lcc*) 10581c30f5000Smrg # Lucid 10582c30f5000Smrg # FIXME: insert proper C++ library support 10583c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10584c30f5000Smrg ;; 10585c30f5000Smrg *) 10586c30f5000Smrg # FIXME: insert proper C++ library support 10587c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10588c30f5000Smrg ;; 10589c30f5000Smrg esac 10590c30f5000Smrg ;; 10591e0963edeSmrg 10592c30f5000Smrg solaris*) 10593c30f5000Smrg case $cc_basename in 10594c30f5000Smrg CC* | sunCC*) 10595c30f5000Smrg # Sun C++ 4.2, 5.x and Centerline C++ 10596c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10597c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10598c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10599c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10600c30f5000Smrg $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' 10601e0963edeSmrg 10602c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10603c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10604c30f5000Smrg case $host_os in 10605c30f5000Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10606c30f5000Smrg *) 10607c30f5000Smrg # The compiler driver will combine and reorder linker options, 10608c30f5000Smrg # but understands '-z linker_flag'. 10609c30f5000Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10610c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10611c30f5000Smrg ;; 10612c30f5000Smrg esac 10613c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10614e0963edeSmrg 10615c30f5000Smrg output_verbose_link_cmd='func_echo_all' 10616c30f5000Smrg 10617c30f5000Smrg # Archives containing C++ object files must be created using 10618c30f5000Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10619c30f5000Smrg # necessary to make sure instantiated templates are included 10620c30f5000Smrg # in the archive. 10621c30f5000Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10622c30f5000Smrg ;; 10623c30f5000Smrg gcx*) 10624c30f5000Smrg # Green Hills C++ Compiler 10625c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10626b3a827e2Smrg 10627c30f5000Smrg # The C++ compiler must be used to create the archive. 10628c30f5000Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10629c30f5000Smrg ;; 10630c30f5000Smrg *) 10631c30f5000Smrg # GNU C++ compiler with Solaris linker 10632c30f5000Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 10633c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10634c30f5000Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10635c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10636c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10637c30f5000Smrg $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' 10638b3a827e2Smrg 10639c30f5000Smrg # Commands to make compiler produce verbose output that lists 10640c30f5000Smrg # what "hidden" libraries, object files and flags are used when 10641c30f5000Smrg # linking a shared library. 10642c30f5000Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10643c30f5000Smrg else 10644c30f5000Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 10645c30f5000Smrg # platform. 10646c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10647c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10648c30f5000Smrg $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' 10649e0963edeSmrg 10650c30f5000Smrg # Commands to make compiler produce verbose output that lists 10651c30f5000Smrg # what "hidden" libraries, object files and flags are used when 10652c30f5000Smrg # linking a shared library. 10653c30f5000Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10654c30f5000Smrg fi 10655e0963edeSmrg 10656c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10657c30f5000Smrg case $host_os in 10658c30f5000Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10659c30f5000Smrg *) 10660c30f5000Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10661c30f5000Smrg ;; 10662c30f5000Smrg esac 10663c30f5000Smrg fi 10664c30f5000Smrg ;; 10665c30f5000Smrg esac 10666c30f5000Smrg ;; 10667e0963edeSmrg 10668c30f5000Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10669c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10670c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10671c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10672c30f5000Smrg runpath_var='LD_RUN_PATH' 10673e0963edeSmrg 10674c30f5000Smrg case $cc_basename in 10675c30f5000Smrg CC*) 10676c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10677c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10678c30f5000Smrg ;; 10679c30f5000Smrg *) 10680c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10681c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10682c30f5000Smrg ;; 10683c30f5000Smrg esac 10684c30f5000Smrg ;; 10685e0963edeSmrg 10686c30f5000Smrg sysv5* | sco3.2v5* | sco5v6*) 10687c30f5000Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 10688c30f5000Smrg # link with -lc, and that would cause any symbols used from libc to 10689c30f5000Smrg # always be unresolved, which means just about no library would 10690c30f5000Smrg # ever link correctly. If we're not using GNU ld we use -z text 10691c30f5000Smrg # though, which does catch some bad symbols but isn't as heavy-handed 10692c30f5000Smrg # as -z defs. 10693c30f5000Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10694c30f5000Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10695c30f5000Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10696c30f5000Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10697c30f5000Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10698c30f5000Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10699c30f5000Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10700c30f5000Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10701c30f5000Smrg runpath_var='LD_RUN_PATH' 10702e0963edeSmrg 10703c30f5000Smrg case $cc_basename in 10704c30f5000Smrg CC*) 10705c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10706c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10707c30f5000Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10708c30f5000Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 10709c30f5000Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10710c30f5000Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 10711c30f5000Smrg ;; 10712c30f5000Smrg *) 10713c30f5000Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10714c30f5000Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10715c30f5000Smrg ;; 10716c30f5000Smrg esac 10717c30f5000Smrg ;; 10718c30f5000Smrg 10719c30f5000Smrg tandem*) 10720c30f5000Smrg case $cc_basename in 10721c30f5000Smrg NCC*) 10722c30f5000Smrg # NonStop-UX NCC 3.20 10723c30f5000Smrg # FIXME: insert proper C++ library support 10724c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10725c30f5000Smrg ;; 10726c30f5000Smrg *) 10727c30f5000Smrg # FIXME: insert proper C++ library support 10728c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10729c30f5000Smrg ;; 10730c30f5000Smrg esac 10731c30f5000Smrg ;; 10732c30f5000Smrg 10733c30f5000Smrg vxworks*) 10734c30f5000Smrg # FIXME: insert proper C++ library support 10735c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10736c30f5000Smrg ;; 10737c30f5000Smrg 10738c30f5000Smrg *) 10739c30f5000Smrg # FIXME: insert proper C++ library support 10740c30f5000Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10741c30f5000Smrg ;; 10742c30f5000Smrg esac 10743e0963edeSmrg 10744c30f5000Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10745c30f5000Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10746e0963edeSmrg 10747c30f5000Smrg _LT_TAGVAR(GCC, $1)=$GXX 10748c30f5000Smrg _LT_TAGVAR(LD, $1)=$LD 10749e0963edeSmrg 10750c30f5000Smrg ## CAVEAT EMPTOR: 10751c30f5000Smrg ## There is no encapsulation within the following macros, do not change 10752c30f5000Smrg ## the running order or otherwise move them around unless you know exactly 10753c30f5000Smrg ## what you are doing... 10754c30f5000Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 10755c30f5000Smrg _LT_COMPILER_PIC($1) 10756c30f5000Smrg _LT_COMPILER_C_O($1) 10757c30f5000Smrg _LT_COMPILER_FILE_LOCKS($1) 10758c30f5000Smrg _LT_LINKER_SHLIBS($1) 10759c30f5000Smrg _LT_SYS_DYNAMIC_LINKER($1) 10760c30f5000Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 10761b3a827e2Smrg 10762c30f5000Smrg _LT_CONFIG($1) 10763c30f5000Smrg fi # test -n "$compiler" 10764b3a827e2Smrg 10765c30f5000Smrg CC=$lt_save_CC 10766c30f5000Smrg CFLAGS=$lt_save_CFLAGS 10767c30f5000Smrg LDCXX=$LD 10768c30f5000Smrg LD=$lt_save_LD 10769c30f5000Smrg GCC=$lt_save_GCC 10770c30f5000Smrg with_gnu_ld=$lt_save_with_gnu_ld 10771c30f5000Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 10772c30f5000Smrg lt_cv_path_LD=$lt_save_path_LD 10773c30f5000Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10774c30f5000Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10775c30f5000Smrgfi # test yes != "$_lt_caught_CXX_error" 10776f05b35a2Smrg 10777c30f5000SmrgAC_LANG_POP 10778c30f5000Smrg])# _LT_LANG_CXX_CONFIG 1077949e108a1Smrg 10780c30f5000Smrg 10781c30f5000Smrg# _LT_FUNC_STRIPNAME_CNF 10782c30f5000Smrg# ---------------------- 10783c30f5000Smrg# func_stripname_cnf prefix suffix name 10784c30f5000Smrg# strip PREFIX and SUFFIX off of NAME. 10785c30f5000Smrg# PREFIX and SUFFIX must not contain globbing or regex special 10786c30f5000Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 10787c30f5000Smrg# dot (in which case that matches only a dot). 1078867ab2ff2Smrg# 10789c30f5000Smrg# This function is identical to the (non-XSI) version of func_stripname, 10790c30f5000Smrg# except this one can be used by m4 code that may be executed by configure, 10791c30f5000Smrg# rather than the libtool script. 10792c30f5000Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10793c30f5000SmrgAC_REQUIRE([_LT_DECL_SED]) 10794c30f5000SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10795c30f5000Smrgfunc_stripname_cnf () 10796c30f5000Smrg{ 10797c30f5000Smrg case @S|@2 in 10798c30f5000Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10799c30f5000Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10800c30f5000Smrg esac 10801c30f5000Smrg} # func_stripname_cnf 10802c30f5000Smrg])# _LT_FUNC_STRIPNAME_CNF 10803c30f5000Smrg 10804c30f5000Smrg 10805c30f5000Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10806c30f5000Smrg# --------------------------------- 10807c30f5000Smrg# Figure out "hidden" library dependencies from verbose 10808c30f5000Smrg# compiler output when linking a shared library. 10809c30f5000Smrg# Parse the compiler output and extract the necessary 10810c30f5000Smrg# objects, libraries and library flags. 10811c30f5000Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10812c30f5000Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10813c30f5000SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10814c30f5000Smrg# Dependencies to place before and after the object being linked: 10815c30f5000Smrg_LT_TAGVAR(predep_objects, $1)= 10816c30f5000Smrg_LT_TAGVAR(postdep_objects, $1)= 10817c30f5000Smrg_LT_TAGVAR(predeps, $1)= 10818c30f5000Smrg_LT_TAGVAR(postdeps, $1)= 10819c30f5000Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 10820c30f5000Smrg 10821c30f5000Smrgdnl we can't use the lt_simple_compile_test_code here, 10822c30f5000Smrgdnl because it contains code intended for an executable, 10823c30f5000Smrgdnl not a library. It's possible we should let each 10824c30f5000Smrgdnl tag define a new lt_????_link_test_code variable, 10825c30f5000Smrgdnl but it's only used here... 10826c30f5000Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10827c30f5000Smrgint a; 10828c30f5000Smrgvoid foo (void) { a = 0; } 10829c30f5000Smrg_LT_EOF 10830c30f5000Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10831c30f5000Smrgclass Foo 10832c30f5000Smrg{ 10833c30f5000Smrgpublic: 10834c30f5000Smrg Foo (void) { a = 0; } 10835c30f5000Smrgprivate: 10836c30f5000Smrg int a; 10837c30f5000Smrg}; 10838c30f5000Smrg_LT_EOF 10839c30f5000Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10840c30f5000Smrg subroutine foo 10841c30f5000Smrg implicit none 10842c30f5000Smrg integer*4 a 10843c30f5000Smrg a=0 10844c30f5000Smrg return 10845c30f5000Smrg end 10846c30f5000Smrg_LT_EOF 10847c30f5000Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10848c30f5000Smrg subroutine foo 10849c30f5000Smrg implicit none 10850c30f5000Smrg integer a 10851c30f5000Smrg a=0 10852c30f5000Smrg return 10853c30f5000Smrg end 10854c30f5000Smrg_LT_EOF 10855c30f5000Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10856c30f5000Smrgpublic class foo { 10857c30f5000Smrg private int a; 10858c30f5000Smrg public void bar (void) { 10859c30f5000Smrg a = 0; 10860c30f5000Smrg } 10861c30f5000Smrg}; 10862c30f5000Smrg_LT_EOF 10863c30f5000Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10864c30f5000Smrgpackage foo 10865c30f5000Smrgfunc foo() { 10866c30f5000Smrg} 10867c30f5000Smrg_LT_EOF 10868c30f5000Smrg]) 10869f05b35a2Smrg 10870c30f5000Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 10871c30f5000Smrgcase "$CC $CFLAGS " in #( 10872c30f5000Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10873c30f5000Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10874c30f5000Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 10875c30f5000Smrgesac 10876f05b35a2Smrg 10877c30f5000Smrgdnl Parse the compiler output and extract the necessary 10878c30f5000Smrgdnl objects, libraries and library flags. 10879c30f5000Smrgif AC_TRY_EVAL(ac_compile); then 10880c30f5000Smrg # Parse the compiler output and extract the necessary 10881c30f5000Smrg # objects, libraries and library flags. 10882f05b35a2Smrg 10883c30f5000Smrg # Sentinel used to keep track of whether or not we are before 10884c30f5000Smrg # the conftest object file. 10885c30f5000Smrg pre_test_object_deps_done=no 1088667ab2ff2Smrg 10887c30f5000Smrg for p in `eval "$output_verbose_link_cmd"`; do 10888c30f5000Smrg case $prev$p in 10889e494fffdSmrg 10890c30f5000Smrg -L* | -R* | -l*) 10891c30f5000Smrg # Some compilers place space between "-{L,R}" and the path. 10892c30f5000Smrg # Remove the space. 10893c30f5000Smrg if test x-L = "$p" || 10894c30f5000Smrg test x-R = "$p"; then 10895c30f5000Smrg prev=$p 10896c30f5000Smrg continue 10897c30f5000Smrg fi 1089867ab2ff2Smrg 10899c30f5000Smrg # Expand the sysroot to ease extracting the directories later. 10900c30f5000Smrg if test -z "$prev"; then 10901c30f5000Smrg case $p in 10902c30f5000Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 10903c30f5000Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 10904c30f5000Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 10905c30f5000Smrg esac 10906c30f5000Smrg fi 10907c30f5000Smrg case $p in 10908c30f5000Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 10909c30f5000Smrg esac 10910c30f5000Smrg if test no = "$pre_test_object_deps_done"; then 10911c30f5000Smrg case $prev in 10912c30f5000Smrg -L | -R) 10913c30f5000Smrg # Internal compiler library paths should come after those 10914c30f5000Smrg # provided the user. The postdeps already come after the 10915c30f5000Smrg # user supplied libs so there is no need to process them. 10916c30f5000Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 10917c30f5000Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 10918c30f5000Smrg else 10919c30f5000Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 10920c30f5000Smrg fi 10921c30f5000Smrg ;; 10922c30f5000Smrg # The "-l" case would never come before the object being 10923c30f5000Smrg # linked, so don't bother handling this case. 10924c30f5000Smrg esac 10925c30f5000Smrg else 10926c30f5000Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 10927c30f5000Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 10928c30f5000Smrg else 10929c30f5000Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 10930c30f5000Smrg fi 10931c30f5000Smrg fi 10932c30f5000Smrg prev= 10933c30f5000Smrg ;; 10934c30f5000Smrg 10935c30f5000Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 10936c30f5000Smrg *.$objext) 10937c30f5000Smrg # This assumes that the test object file only shows up 10938c30f5000Smrg # once in the compiler output. 10939c30f5000Smrg if test "$p" = "conftest.$objext"; then 10940c30f5000Smrg pre_test_object_deps_done=yes 10941c30f5000Smrg continue 10942c30f5000Smrg fi 10943c30f5000Smrg 10944c30f5000Smrg if test no = "$pre_test_object_deps_done"; then 10945c30f5000Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 10946c30f5000Smrg _LT_TAGVAR(predep_objects, $1)=$p 10947c30f5000Smrg else 10948c30f5000Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 10949c30f5000Smrg fi 10950c30f5000Smrg else 10951c30f5000Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 10952c30f5000Smrg _LT_TAGVAR(postdep_objects, $1)=$p 10953c30f5000Smrg else 10954c30f5000Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 10955c30f5000Smrg fi 10956c30f5000Smrg fi 10957c30f5000Smrg ;; 10958e0963edeSmrg 10959c30f5000Smrg *) ;; # Ignore the rest. 10960e0963edeSmrg 10961c30f5000Smrg esac 10962c30f5000Smrg done 10963e0963edeSmrg 10964c30f5000Smrg # Clean up. 10965c30f5000Smrg rm -f a.out a.exe 10966c30f5000Smrgelse 10967c30f5000Smrg echo "libtool.m4: error: problem compiling $1 test program" 1096867ab2ff2Smrgfi 10969e0963edeSmrg 10970c30f5000Smrg$RM -f confest.$objext 10971c30f5000SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 10972e0963edeSmrg 10973c30f5000Smrg# PORTME: override above test on systems where it is broken 10974c30f5000Smrgm4_if([$1], [CXX], 10975c30f5000Smrg[case $host_os in 10976c30f5000Smrginterix[[3-9]]*) 10977c30f5000Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 10978c30f5000Smrg # hack all around it, let's just trust "g++" to DTRT. 10979c30f5000Smrg _LT_TAGVAR(predep_objects,$1)= 10980c30f5000Smrg _LT_TAGVAR(postdep_objects,$1)= 10981c30f5000Smrg _LT_TAGVAR(postdeps,$1)= 10982c30f5000Smrg ;; 10983c30f5000Smrgesac 10984c30f5000Smrg]) 10985c30f5000Smrg 10986c30f5000Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 10987c30f5000Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 10988c30f5000Smrgesac 10989c30f5000Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 10990c30f5000Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 10991c30f5000Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 1099267ab2ff2Smrgfi 10993c30f5000Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 10994c30f5000Smrg [The directories searched by this compiler when creating a shared library]) 10995c30f5000Smrg_LT_TAGDECL([], [predep_objects], [1], 10996c30f5000Smrg [Dependencies to place before and after the objects being linked to 10997c30f5000Smrg create a shared library]) 10998c30f5000Smrg_LT_TAGDECL([], [postdep_objects], [1]) 10999c30f5000Smrg_LT_TAGDECL([], [predeps], [1]) 11000c30f5000Smrg_LT_TAGDECL([], [postdeps], [1]) 11001c30f5000Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11002c30f5000Smrg [The library search path used internally by the compiler when linking 11003c30f5000Smrg a shared library]) 11004c30f5000Smrg])# _LT_SYS_HIDDEN_LIBDEPS 11005e0963edeSmrg 11006c30f5000Smrg 11007c30f5000Smrg# _LT_LANG_F77_CONFIG([TAG]) 11008c30f5000Smrg# -------------------------- 11009c30f5000Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 11010c30f5000Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11011c30f5000Smrg# to write the compiler configuration to 'libtool'. 11012c30f5000Smrgm4_defun([_LT_LANG_F77_CONFIG], 11013c30f5000Smrg[AC_LANG_PUSH(Fortran 77) 11014c30f5000Smrgif test -z "$F77" || test no = "$F77"; then 11015c30f5000Smrg _lt_disable_F77=yes 1101667ab2ff2Smrgfi 11017f05b35a2Smrg 11018c30f5000Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11019c30f5000Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11020c30f5000Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11021c30f5000Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11022c30f5000Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11023c30f5000Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11024c30f5000Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11025c30f5000Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11026c30f5000Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11027c30f5000Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11028c30f5000Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11029c30f5000Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11030c30f5000Smrg_LT_TAGVAR(module_cmds, $1)= 11031c30f5000Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11032c30f5000Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11033c30f5000Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11034c30f5000Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11035c30f5000Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11036c30f5000Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11037c30f5000Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11038c30f5000Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11039c30f5000Smrg 11040c30f5000Smrg# Source file extension for f77 test sources. 11041c30f5000Smrgac_ext=f 11042c30f5000Smrg 11043c30f5000Smrg# Object file extension for compiled f77 test sources. 11044c30f5000Smrgobjext=o 11045c30f5000Smrg_LT_TAGVAR(objext, $1)=$objext 11046c30f5000Smrg 11047c30f5000Smrg# No sense in running all these tests if we already determined that 11048c30f5000Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 11049c30f5000Smrg# are currently assumed to apply to all compilers on this platform, 11050c30f5000Smrg# and will be corrupted by setting them based on a non-working compiler. 11051c30f5000Smrgif test yes != "$_lt_disable_F77"; then 11052c30f5000Smrg # Code to be used in simple compile tests 11053c30f5000Smrg lt_simple_compile_test_code="\ 11054c30f5000Smrg subroutine t 11055c30f5000Smrg return 11056c30f5000Smrg end 11057c30f5000Smrg" 11058c30f5000Smrg 11059c30f5000Smrg # Code to be used in simple link tests 11060c30f5000Smrg lt_simple_link_test_code="\ 11061c30f5000Smrg program t 11062c30f5000Smrg end 11063c30f5000Smrg" 11064c30f5000Smrg 11065c30f5000Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11066c30f5000Smrg _LT_TAG_COMPILER 11067c30f5000Smrg 11068c30f5000Smrg # save warnings/boilerplate of simple test code 11069c30f5000Smrg _LT_COMPILER_BOILERPLATE 11070c30f5000Smrg _LT_LINKER_BOILERPLATE 11071c30f5000Smrg 11072c30f5000Smrg # Allow CC to be a program name with arguments. 11073c30f5000Smrg lt_save_CC=$CC 11074c30f5000Smrg lt_save_GCC=$GCC 11075c30f5000Smrg lt_save_CFLAGS=$CFLAGS 11076c30f5000Smrg CC=${F77-"f77"} 11077c30f5000Smrg CFLAGS=$FFLAGS 11078c30f5000Smrg compiler=$CC 11079c30f5000Smrg _LT_TAGVAR(compiler, $1)=$CC 11080c30f5000Smrg _LT_CC_BASENAME([$compiler]) 11081c30f5000Smrg GCC=$G77 11082c30f5000Smrg if test -n "$compiler"; then 11083c30f5000Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11084c30f5000Smrg AC_MSG_RESULT([$can_build_shared]) 11085e0963edeSmrg 11086c30f5000Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11087c30f5000Smrg test no = "$can_build_shared" && enable_shared=no 11088e0963edeSmrg 11089c30f5000Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11090c30f5000Smrg # are all built from PIC. 11091c30f5000Smrg case $host_os in 11092c30f5000Smrg aix3*) 11093c30f5000Smrg test yes = "$enable_shared" && enable_static=no 11094c30f5000Smrg if test -n "$RANLIB"; then 11095c30f5000Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11096c30f5000Smrg postinstall_cmds='$RANLIB $lib' 11097c30f5000Smrg fi 1109867ab2ff2Smrg ;; 11099c30f5000Smrg aix[[4-9]]*) 11100c30f5000Smrg if test ia64 != "$host_cpu"; then 11101c30f5000Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11102c30f5000Smrg yes,aix,yes) ;; # shared object as lib.so file only 11103c30f5000Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11104c30f5000Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11105c30f5000Smrg esac 11106c30f5000Smrg fi 1110767ab2ff2Smrg ;; 11108c30f5000Smrg esac 11109c30f5000Smrg AC_MSG_RESULT([$enable_shared]) 11110e0963edeSmrg 11111c30f5000Smrg AC_MSG_CHECKING([whether to build static libraries]) 11112c30f5000Smrg # Make sure either enable_shared or enable_static is yes. 11113c30f5000Smrg test yes = "$enable_shared" || enable_static=yes 11114c30f5000Smrg AC_MSG_RESULT([$enable_static]) 11115f05b35a2Smrg 11116c30f5000Smrg _LT_TAGVAR(GCC, $1)=$G77 11117c30f5000Smrg _LT_TAGVAR(LD, $1)=$LD 11118b3a827e2Smrg 11119c30f5000Smrg ## CAVEAT EMPTOR: 11120c30f5000Smrg ## There is no encapsulation within the following macros, do not change 11121c30f5000Smrg ## the running order or otherwise move them around unless you know exactly 11122c30f5000Smrg ## what you are doing... 11123c30f5000Smrg _LT_COMPILER_PIC($1) 11124c30f5000Smrg _LT_COMPILER_C_O($1) 11125c30f5000Smrg _LT_COMPILER_FILE_LOCKS($1) 11126c30f5000Smrg _LT_LINKER_SHLIBS($1) 11127c30f5000Smrg _LT_SYS_DYNAMIC_LINKER($1) 11128c30f5000Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11129b3a827e2Smrg 11130c30f5000Smrg _LT_CONFIG($1) 11131c30f5000Smrg fi # test -n "$compiler" 11132b3a827e2Smrg 11133c30f5000Smrg GCC=$lt_save_GCC 11134c30f5000Smrg CC=$lt_save_CC 11135c30f5000Smrg CFLAGS=$lt_save_CFLAGS 11136c30f5000Smrgfi # test yes != "$_lt_disable_F77" 11137c30f5000Smrg 11138c30f5000SmrgAC_LANG_POP 11139c30f5000Smrg])# _LT_LANG_F77_CONFIG 11140c30f5000Smrg 11141c30f5000Smrg 11142c30f5000Smrg# _LT_LANG_FC_CONFIG([TAG]) 11143c30f5000Smrg# ------------------------- 11144c30f5000Smrg# Ensure that the configuration variables for a Fortran compiler are 11145c30f5000Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11146c30f5000Smrg# to write the compiler configuration to 'libtool'. 11147c30f5000Smrgm4_defun([_LT_LANG_FC_CONFIG], 11148c30f5000Smrg[AC_LANG_PUSH(Fortran) 11149c30f5000Smrg 11150c30f5000Smrgif test -z "$FC" || test no = "$FC"; then 11151c30f5000Smrg _lt_disable_FC=yes 11152b3a827e2Smrgfi 11153b3a827e2Smrg 11154c30f5000Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11155c30f5000Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11156c30f5000Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11157c30f5000Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11158c30f5000Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11159c30f5000Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11160c30f5000Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11161c30f5000Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11162c30f5000Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11163c30f5000Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11164c30f5000Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11165c30f5000Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11166c30f5000Smrg_LT_TAGVAR(module_cmds, $1)= 11167c30f5000Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11168c30f5000Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11169c30f5000Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11170c30f5000Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11171c30f5000Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11172c30f5000Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11173c30f5000Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11174c30f5000Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11175b3a827e2Smrg 11176c30f5000Smrg# Source file extension for fc test sources. 11177c30f5000Smrgac_ext=${ac_fc_srcext-f} 11178b3a827e2Smrg 11179c30f5000Smrg# Object file extension for compiled fc test sources. 11180c30f5000Smrgobjext=o 11181c30f5000Smrg_LT_TAGVAR(objext, $1)=$objext 11182b3a827e2Smrg 11183c30f5000Smrg# No sense in running all these tests if we already determined that 11184c30f5000Smrg# the FC compiler isn't working. Some variables (like enable_shared) 11185c30f5000Smrg# are currently assumed to apply to all compilers on this platform, 11186c30f5000Smrg# and will be corrupted by setting them based on a non-working compiler. 11187c30f5000Smrgif test yes != "$_lt_disable_FC"; then 11188c30f5000Smrg # Code to be used in simple compile tests 11189c30f5000Smrg lt_simple_compile_test_code="\ 11190c30f5000Smrg subroutine t 11191c30f5000Smrg return 11192c30f5000Smrg end 11193c30f5000Smrg" 11194b3a827e2Smrg 11195c30f5000Smrg # Code to be used in simple link tests 11196c30f5000Smrg lt_simple_link_test_code="\ 11197c30f5000Smrg program t 11198c30f5000Smrg end 11199c30f5000Smrg" 11200b3a827e2Smrg 11201c30f5000Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11202c30f5000Smrg _LT_TAG_COMPILER 11203b3a827e2Smrg 11204c30f5000Smrg # save warnings/boilerplate of simple test code 11205c30f5000Smrg _LT_COMPILER_BOILERPLATE 11206c30f5000Smrg _LT_LINKER_BOILERPLATE 11207b3a827e2Smrg 11208c30f5000Smrg # Allow CC to be a program name with arguments. 11209c30f5000Smrg lt_save_CC=$CC 11210c30f5000Smrg lt_save_GCC=$GCC 11211c30f5000Smrg lt_save_CFLAGS=$CFLAGS 11212c30f5000Smrg CC=${FC-"f95"} 11213c30f5000Smrg CFLAGS=$FCFLAGS 11214c30f5000Smrg compiler=$CC 11215c30f5000Smrg GCC=$ac_cv_fc_compiler_gnu 11216b3a827e2Smrg 11217c30f5000Smrg _LT_TAGVAR(compiler, $1)=$CC 11218c30f5000Smrg _LT_CC_BASENAME([$compiler]) 11219b3a827e2Smrg 11220c30f5000Smrg if test -n "$compiler"; then 11221c30f5000Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11222c30f5000Smrg AC_MSG_RESULT([$can_build_shared]) 11223b3a827e2Smrg 11224c30f5000Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11225c30f5000Smrg test no = "$can_build_shared" && enable_shared=no 11226b3a827e2Smrg 11227c30f5000Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11228c30f5000Smrg # are all built from PIC. 11229c30f5000Smrg case $host_os in 11230c30f5000Smrg aix3*) 11231c30f5000Smrg test yes = "$enable_shared" && enable_static=no 11232c30f5000Smrg if test -n "$RANLIB"; then 11233c30f5000Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11234c30f5000Smrg postinstall_cmds='$RANLIB $lib' 11235c30f5000Smrg fi 11236c30f5000Smrg ;; 11237c30f5000Smrg aix[[4-9]]*) 11238c30f5000Smrg if test ia64 != "$host_cpu"; then 11239c30f5000Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11240c30f5000Smrg yes,aix,yes) ;; # shared object as lib.so file only 11241c30f5000Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11242c30f5000Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11243c30f5000Smrg esac 11244c30f5000Smrg fi 11245c30f5000Smrg ;; 11246c30f5000Smrg esac 11247c30f5000Smrg AC_MSG_RESULT([$enable_shared]) 11248b3a827e2Smrg 11249c30f5000Smrg AC_MSG_CHECKING([whether to build static libraries]) 11250c30f5000Smrg # Make sure either enable_shared or enable_static is yes. 11251c30f5000Smrg test yes = "$enable_shared" || enable_static=yes 11252c30f5000Smrg AC_MSG_RESULT([$enable_static]) 11253b3a827e2Smrg 11254c30f5000Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11255c30f5000Smrg _LT_TAGVAR(LD, $1)=$LD 11256b3a827e2Smrg 11257c30f5000Smrg ## CAVEAT EMPTOR: 11258c30f5000Smrg ## There is no encapsulation within the following macros, do not change 11259c30f5000Smrg ## the running order or otherwise move them around unless you know exactly 11260c30f5000Smrg ## what you are doing... 11261c30f5000Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 11262c30f5000Smrg _LT_COMPILER_PIC($1) 11263c30f5000Smrg _LT_COMPILER_C_O($1) 11264c30f5000Smrg _LT_COMPILER_FILE_LOCKS($1) 11265c30f5000Smrg _LT_LINKER_SHLIBS($1) 11266c30f5000Smrg _LT_SYS_DYNAMIC_LINKER($1) 11267c30f5000Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11268b3a827e2Smrg 11269c30f5000Smrg _LT_CONFIG($1) 11270c30f5000Smrg fi # test -n "$compiler" 11271b3a827e2Smrg 11272c30f5000Smrg GCC=$lt_save_GCC 11273c30f5000Smrg CC=$lt_save_CC 11274c30f5000Smrg CFLAGS=$lt_save_CFLAGS 11275c30f5000Smrgfi # test yes != "$_lt_disable_FC" 11276b3a827e2Smrg 11277c30f5000SmrgAC_LANG_POP 11278c30f5000Smrg])# _LT_LANG_FC_CONFIG 11279b3a827e2Smrg 11280b3a827e2Smrg 11281c30f5000Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 11282c30f5000Smrg# -------------------------- 11283c30f5000Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11284c30f5000Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11285c30f5000Smrg# to write the compiler configuration to 'libtool'. 11286c30f5000Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 11287c30f5000Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11288c30f5000SmrgAC_LANG_SAVE 11289b3a827e2Smrg 11290c30f5000Smrg# Source file extension for Java test sources. 11291c30f5000Smrgac_ext=java 11292b3a827e2Smrg 11293c30f5000Smrg# Object file extension for compiled Java test sources. 11294c30f5000Smrgobjext=o 11295c30f5000Smrg_LT_TAGVAR(objext, $1)=$objext 11296b3a827e2Smrg 11297c30f5000Smrg# Code to be used in simple compile tests 11298c30f5000Smrglt_simple_compile_test_code="class foo {}" 11299b3a827e2Smrg 11300c30f5000Smrg# Code to be used in simple link tests 11301c30f5000Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11302b3a827e2Smrg 11303c30f5000Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11304c30f5000Smrg_LT_TAG_COMPILER 11305b3a827e2Smrg 11306c30f5000Smrg# save warnings/boilerplate of simple test code 11307c30f5000Smrg_LT_COMPILER_BOILERPLATE 11308c30f5000Smrg_LT_LINKER_BOILERPLATE 11309b3a827e2Smrg 11310c30f5000Smrg# Allow CC to be a program name with arguments. 11311c30f5000Smrglt_save_CC=$CC 11312c30f5000Smrglt_save_CFLAGS=$CFLAGS 11313c30f5000Smrglt_save_GCC=$GCC 11314c30f5000SmrgGCC=yes 11315c30f5000SmrgCC=${GCJ-"gcj"} 11316c30f5000SmrgCFLAGS=$GCJFLAGS 11317c30f5000Smrgcompiler=$CC 11318c30f5000Smrg_LT_TAGVAR(compiler, $1)=$CC 11319c30f5000Smrg_LT_TAGVAR(LD, $1)=$LD 11320c30f5000Smrg_LT_CC_BASENAME([$compiler]) 11321b3a827e2Smrg 11322c30f5000Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11323c30f5000Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11324b3a827e2Smrg 11325c30f5000Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11326c30f5000Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11327c30f5000Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11328c30f5000Smrg 11329c30f5000Smrgif test -n "$compiler"; then 11330c30f5000Smrg _LT_COMPILER_NO_RTTI($1) 11331c30f5000Smrg _LT_COMPILER_PIC($1) 11332c30f5000Smrg _LT_COMPILER_C_O($1) 11333c30f5000Smrg _LT_COMPILER_FILE_LOCKS($1) 11334c30f5000Smrg _LT_LINKER_SHLIBS($1) 11335c30f5000Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11336c30f5000Smrg 11337c30f5000Smrg _LT_CONFIG($1) 11338b3a827e2Smrgfi 11339b3a827e2Smrg 11340c30f5000SmrgAC_LANG_RESTORE 11341c30f5000Smrg 11342c30f5000SmrgGCC=$lt_save_GCC 11343c30f5000SmrgCC=$lt_save_CC 11344c30f5000SmrgCFLAGS=$lt_save_CFLAGS 11345c30f5000Smrg])# _LT_LANG_GCJ_CONFIG 11346b3a827e2Smrg 11347b3a827e2Smrg 11348c30f5000Smrg# _LT_LANG_GO_CONFIG([TAG]) 11349c30f5000Smrg# -------------------------- 11350c30f5000Smrg# Ensure that the configuration variables for the GNU Go compiler 11351c30f5000Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11352c30f5000Smrg# to write the compiler configuration to 'libtool'. 11353c30f5000Smrgm4_defun([_LT_LANG_GO_CONFIG], 11354c30f5000Smrg[AC_REQUIRE([LT_PROG_GO])dnl 11355c30f5000SmrgAC_LANG_SAVE 11356b3a827e2Smrg 11357c30f5000Smrg# Source file extension for Go test sources. 11358c30f5000Smrgac_ext=go 11359b3a827e2Smrg 11360c30f5000Smrg# Object file extension for compiled Go test sources. 11361c30f5000Smrgobjext=o 11362c30f5000Smrg_LT_TAGVAR(objext, $1)=$objext 11363b3a827e2Smrg 11364c30f5000Smrg# Code to be used in simple compile tests 11365c30f5000Smrglt_simple_compile_test_code="package main; func main() { }" 11366b3a827e2Smrg 11367c30f5000Smrg# Code to be used in simple link tests 11368c30f5000Smrglt_simple_link_test_code='package main; func main() { }' 11369b3a827e2Smrg 11370c30f5000Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11371c30f5000Smrg_LT_TAG_COMPILER 11372b3a827e2Smrg 11373c30f5000Smrg# save warnings/boilerplate of simple test code 11374c30f5000Smrg_LT_COMPILER_BOILERPLATE 11375c30f5000Smrg_LT_LINKER_BOILERPLATE 11376b3a827e2Smrg 11377c30f5000Smrg# Allow CC to be a program name with arguments. 11378c30f5000Smrglt_save_CC=$CC 11379c30f5000Smrglt_save_CFLAGS=$CFLAGS 11380c30f5000Smrglt_save_GCC=$GCC 11381c30f5000SmrgGCC=yes 11382c30f5000SmrgCC=${GOC-"gccgo"} 11383c30f5000SmrgCFLAGS=$GOFLAGS 11384c30f5000Smrgcompiler=$CC 11385c30f5000Smrg_LT_TAGVAR(compiler, $1)=$CC 11386c30f5000Smrg_LT_TAGVAR(LD, $1)=$LD 11387c30f5000Smrg_LT_CC_BASENAME([$compiler]) 11388b3a827e2Smrg 11389c30f5000Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 11390c30f5000Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11391b3a827e2Smrg 11392c30f5000Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11393c30f5000Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11394c30f5000Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11395b3a827e2Smrg 11396c30f5000Smrgif test -n "$compiler"; then 11397c30f5000Smrg _LT_COMPILER_NO_RTTI($1) 11398c30f5000Smrg _LT_COMPILER_PIC($1) 11399c30f5000Smrg _LT_COMPILER_C_O($1) 11400c30f5000Smrg _LT_COMPILER_FILE_LOCKS($1) 11401c30f5000Smrg _LT_LINKER_SHLIBS($1) 11402c30f5000Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11403b3a827e2Smrg 11404c30f5000Smrg _LT_CONFIG($1) 11405b3a827e2Smrgfi 11406b3a827e2Smrg 11407c30f5000SmrgAC_LANG_RESTORE 11408b3a827e2Smrg 11409c30f5000SmrgGCC=$lt_save_GCC 11410c30f5000SmrgCC=$lt_save_CC 11411c30f5000SmrgCFLAGS=$lt_save_CFLAGS 11412c30f5000Smrg])# _LT_LANG_GO_CONFIG 11413c30f5000Smrg 11414c30f5000Smrg 11415c30f5000Smrg# _LT_LANG_RC_CONFIG([TAG]) 11416c30f5000Smrg# ------------------------- 11417c30f5000Smrg# Ensure that the configuration variables for the Windows resource compiler 11418c30f5000Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11419c30f5000Smrg# to write the compiler configuration to 'libtool'. 11420c30f5000Smrgm4_defun([_LT_LANG_RC_CONFIG], 11421c30f5000Smrg[AC_REQUIRE([LT_PROG_RC])dnl 11422c30f5000SmrgAC_LANG_SAVE 11423c30f5000Smrg 11424c30f5000Smrg# Source file extension for RC test sources. 11425c30f5000Smrgac_ext=rc 11426c30f5000Smrg 11427c30f5000Smrg# Object file extension for compiled RC test sources. 11428c30f5000Smrgobjext=o 11429c30f5000Smrg_LT_TAGVAR(objext, $1)=$objext 11430c30f5000Smrg 11431c30f5000Smrg# Code to be used in simple compile tests 11432c30f5000Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11433b3a827e2Smrg 11434c30f5000Smrg# Code to be used in simple link tests 11435c30f5000Smrglt_simple_link_test_code=$lt_simple_compile_test_code 11436b3a827e2Smrg 11437c30f5000Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11438c30f5000Smrg_LT_TAG_COMPILER 11439b3a827e2Smrg 11440c30f5000Smrg# save warnings/boilerplate of simple test code 11441c30f5000Smrg_LT_COMPILER_BOILERPLATE 11442c30f5000Smrg_LT_LINKER_BOILERPLATE 11443b3a827e2Smrg 11444c30f5000Smrg# Allow CC to be a program name with arguments. 11445c30f5000Smrglt_save_CC=$CC 11446c30f5000Smrglt_save_CFLAGS=$CFLAGS 11447c30f5000Smrglt_save_GCC=$GCC 11448c30f5000SmrgGCC= 11449c30f5000SmrgCC=${RC-"windres"} 11450c30f5000SmrgCFLAGS= 11451c30f5000Smrgcompiler=$CC 11452c30f5000Smrg_LT_TAGVAR(compiler, $1)=$CC 11453c30f5000Smrg_LT_CC_BASENAME([$compiler]) 11454c30f5000Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11455b3a827e2Smrg 11456c30f5000Smrgif test -n "$compiler"; then 11457c30f5000Smrg : 11458c30f5000Smrg _LT_CONFIG($1) 11459c30f5000Smrgfi 11460b3a827e2Smrg 11461c30f5000SmrgGCC=$lt_save_GCC 11462c30f5000SmrgAC_LANG_RESTORE 11463c30f5000SmrgCC=$lt_save_CC 11464c30f5000SmrgCFLAGS=$lt_save_CFLAGS 11465c30f5000Smrg])# _LT_LANG_RC_CONFIG 11466b3a827e2Smrg 11467b3a827e2Smrg 11468c30f5000Smrg# LT_PROG_GCJ 11469c30f5000Smrg# ----------- 11470c30f5000SmrgAC_DEFUN([LT_PROG_GCJ], 11471c30f5000Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11472c30f5000Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11473c30f5000Smrg [AC_CHECK_TOOL(GCJ, gcj,) 11474c30f5000Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11475c30f5000Smrg AC_SUBST(GCJFLAGS)])])[]dnl 11476c30f5000Smrg]) 11477b3a827e2Smrg 11478c30f5000Smrg# Old name: 11479c30f5000SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11480c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 11481c30f5000Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11482b3a827e2Smrg 11483b3a827e2Smrg 11484c30f5000Smrg# LT_PROG_GO 11485c30f5000Smrg# ---------- 11486c30f5000SmrgAC_DEFUN([LT_PROG_GO], 11487c30f5000Smrg[AC_CHECK_TOOL(GOC, gccgo,) 11488b3a827e2Smrg]) 11489b3a827e2Smrg 11490b3a827e2Smrg 11491c30f5000Smrg# LT_PROG_RC 11492c30f5000Smrg# ---------- 11493c30f5000SmrgAC_DEFUN([LT_PROG_RC], 11494c30f5000Smrg[AC_CHECK_TOOL(RC, windres,) 11495c30f5000Smrg]) 11496b3a827e2Smrg 11497c30f5000Smrg# Old name: 11498c30f5000SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11499c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 11500c30f5000Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 11501b3a827e2Smrg 11502b3a827e2Smrg 11503c30f5000Smrg# _LT_DECL_EGREP 11504c30f5000Smrg# -------------- 11505c30f5000Smrg# If we don't have a new enough Autoconf to choose the best grep 11506c30f5000Smrg# available, choose the one first in the user's PATH. 11507c30f5000Smrgm4_defun([_LT_DECL_EGREP], 11508c30f5000Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 11509c30f5000SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 11510c30f5000Smrgtest -z "$GREP" && GREP=grep 11511c30f5000Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11512c30f5000Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11513c30f5000Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11514c30f5000Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11515c30f5000SmrgAC_SUBST([GREP]) 11516c30f5000Smrg]) 11517b3a827e2Smrg 11518b3a827e2Smrg 11519c30f5000Smrg# _LT_DECL_OBJDUMP 11520c30f5000Smrg# -------------- 11521c30f5000Smrg# If we don't have a new enough Autoconf to choose the best objdump 11522c30f5000Smrg# available, choose the one first in the user's PATH. 11523c30f5000Smrgm4_defun([_LT_DECL_OBJDUMP], 11524c30f5000Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11525c30f5000Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11526c30f5000Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11527c30f5000SmrgAC_SUBST([OBJDUMP]) 11528c30f5000Smrg]) 11529b3a827e2Smrg 11530c30f5000Smrg# _LT_DECL_DLLTOOL 11531c30f5000Smrg# ---------------- 11532c30f5000Smrg# Ensure DLLTOOL variable is set. 11533c30f5000Smrgm4_defun([_LT_DECL_DLLTOOL], 11534c30f5000Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11535c30f5000Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11536c30f5000Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11537c30f5000SmrgAC_SUBST([DLLTOOL]) 11538c30f5000Smrg]) 11539b3a827e2Smrg 11540c30f5000Smrg# _LT_DECL_FILECMD 11541c30f5000Smrg# ---------------- 11542c30f5000Smrg# Check for a file(cmd) program that can be used to detect file type and magic 11543c30f5000Smrgm4_defun([_LT_DECL_FILECMD], 11544c30f5000Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 11545c30f5000Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11546c30f5000Smrg])# _LD_DECL_FILECMD 11547b3a827e2Smrg 11548c30f5000Smrg# _LT_DECL_SED 11549c30f5000Smrg# ------------ 11550c30f5000Smrg# Check for a fully-functional sed program, that truncates 11551c30f5000Smrg# as few characters as possible. Prefer GNU sed if found. 11552c30f5000Smrgm4_defun([_LT_DECL_SED], 11553c30f5000Smrg[AC_PROG_SED 11554c30f5000Smrgtest -z "$SED" && SED=sed 11555c30f5000SmrgXsed="$SED -e 1s/^X//" 11556c30f5000Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11557c30f5000Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11558c30f5000Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11559c30f5000Smrg])# _LT_DECL_SED 11560b3a827e2Smrg 11561c30f5000Smrgm4_ifndef([AC_PROG_SED], [ 11562c30f5000Smrg# NOTE: This macro has been submitted for inclusion into # 11563c30f5000Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 11564c30f5000Smrg# a released version of Autoconf we should remove this # 11565c30f5000Smrg# macro and use it instead. # 11566b3a827e2Smrg 11567c30f5000Smrgm4_defun([AC_PROG_SED], 11568c30f5000Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 11569c30f5000SmrgAC_CACHE_VAL(lt_cv_path_SED, 11570c30f5000Smrg[# Loop through the user's path and test for sed and gsed. 11571c30f5000Smrg# Then use that list of sed's as ones to test for truncation. 11572c30f5000Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11573c30f5000Smrgfor as_dir in $PATH 11574c30f5000Smrgdo 11575c30f5000Smrg IFS=$as_save_IFS 11576c30f5000Smrg test -z "$as_dir" && as_dir=. 11577c30f5000Smrg for lt_ac_prog in sed gsed; do 11578c30f5000Smrg for ac_exec_ext in '' $ac_executable_extensions; do 11579c30f5000Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11580c30f5000Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11581b3a827e2Smrg fi 11582c30f5000Smrg done 11583c30f5000Smrg done 11584c30f5000Smrgdone 11585c30f5000SmrgIFS=$as_save_IFS 11586c30f5000Smrglt_ac_max=0 11587c30f5000Smrglt_ac_count=0 11588c30f5000Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11589c30f5000Smrg# along with /bin/sed that truncates output. 11590c30f5000Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11591c30f5000Smrg test ! -f "$lt_ac_sed" && continue 11592c30f5000Smrg cat /dev/null > conftest.in 11593c30f5000Smrg lt_ac_count=0 11594c30f5000Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11595c30f5000Smrg # Check for GNU sed and select it if it is found. 11596c30f5000Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11597c30f5000Smrg lt_cv_path_SED=$lt_ac_sed 11598c30f5000Smrg break 11599c30f5000Smrg fi 11600c30f5000Smrg while true; do 11601c30f5000Smrg cat conftest.in conftest.in >conftest.tmp 11602c30f5000Smrg mv conftest.tmp conftest.in 11603c30f5000Smrg cp conftest.in conftest.nl 11604c30f5000Smrg echo >>conftest.nl 11605c30f5000Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11606c30f5000Smrg cmp -s conftest.out conftest.nl || break 11607c30f5000Smrg # 10000 chars as input seems more than enough 11608c30f5000Smrg test 10 -lt "$lt_ac_count" && break 11609c30f5000Smrg lt_ac_count=`expr $lt_ac_count + 1` 11610c30f5000Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 11611c30f5000Smrg lt_ac_max=$lt_ac_count 11612c30f5000Smrg lt_cv_path_SED=$lt_ac_sed 11613b3a827e2Smrg fi 11614b3a827e2Smrg done 11615c30f5000Smrgdone 11616c30f5000Smrg]) 11617c30f5000SmrgSED=$lt_cv_path_SED 11618c30f5000SmrgAC_SUBST([SED]) 11619c30f5000SmrgAC_MSG_RESULT([$SED]) 11620c30f5000Smrg])#AC_PROG_SED 11621c30f5000Smrg])#m4_ifndef 11622b3a827e2Smrg 11623c30f5000Smrg# Old name: 11624c30f5000SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11625c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 11626c30f5000Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 11627c30f5000Smrg 11628c30f5000Smrg 11629c30f5000Smrg# _LT_CHECK_SHELL_FEATURES 11630c30f5000Smrg# ------------------------ 11631c30f5000Smrg# Find out whether the shell is Bourne or XSI compatible, 11632c30f5000Smrg# or has some other useful features. 11633c30f5000Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 11634c30f5000Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11635c30f5000Smrg lt_unset=unset 11636b3a827e2Smrgelse 11637c30f5000Smrg lt_unset=false 11638b3a827e2Smrgfi 11639c30f5000Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11640c30f5000Smrg 11641c30f5000Smrg# test EBCDIC or ASCII 11642c30f5000Smrgcase `echo X|tr X '\101'` in 11643c30f5000Smrg A) # ASCII based system 11644c30f5000Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11645c30f5000Smrg lt_SP2NL='tr \040 \012' 11646c30f5000Smrg lt_NL2SP='tr \015\012 \040\040' 11647c30f5000Smrg ;; 11648c30f5000Smrg *) # EBCDIC based system 11649c30f5000Smrg lt_SP2NL='tr \100 \n' 11650c30f5000Smrg lt_NL2SP='tr \r\n \100\100' 11651c30f5000Smrg ;; 11652c30f5000Smrgesac 11653c30f5000Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11654c30f5000Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11655c30f5000Smrg])# _LT_CHECK_SHELL_FEATURES 11656c30f5000Smrg 11657c30f5000Smrg 11658c30f5000Smrg# _LT_PATH_CONVERSION_FUNCTIONS 11659c30f5000Smrg# ----------------------------- 11660c30f5000Smrg# Determine what file name conversion functions should be used by 11661c30f5000Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11662c30f5000Smrg# for certain cross-compile configurations and native mingw. 11663c30f5000Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11664c30f5000Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11665c30f5000SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11666c30f5000SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 11667c30f5000SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 11668c30f5000Smrg[case $host in 11669c30f5000Smrg *-*-mingw* ) 11670c30f5000Smrg case $build in 11671c30f5000Smrg *-*-mingw* ) # actually msys 11672c30f5000Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11673c30f5000Smrg ;; 11674c30f5000Smrg *-*-cygwin* ) 11675c30f5000Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11676c30f5000Smrg ;; 11677c30f5000Smrg * ) # otherwise, assume *nix 11678c30f5000Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11679c30f5000Smrg ;; 11680c30f5000Smrg esac 11681c30f5000Smrg ;; 11682c30f5000Smrg *-*-cygwin* ) 11683c30f5000Smrg case $build in 11684c30f5000Smrg *-*-mingw* ) # actually msys 11685c30f5000Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11686c30f5000Smrg ;; 11687c30f5000Smrg *-*-cygwin* ) 11688c30f5000Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 11689c30f5000Smrg ;; 11690c30f5000Smrg * ) # otherwise, assume *nix 11691c30f5000Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11692c30f5000Smrg ;; 11693c30f5000Smrg esac 11694c30f5000Smrg ;; 11695c30f5000Smrg * ) # unhandled hosts (and "normal" native builds) 11696c30f5000Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 11697c30f5000Smrg ;; 11698c30f5000Smrgesac 11699b3a827e2Smrg]) 11700c30f5000Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 11701c30f5000SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11702c30f5000Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11703c30f5000Smrg [0], [convert $build file names to $host format])dnl 11704c30f5000Smrg 11705c30f5000SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11706c30f5000SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11707c30f5000Smrg[#assume ordinary cross tools, or native build. 11708c30f5000Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 11709c30f5000Smrgcase $host in 11710c30f5000Smrg *-*-mingw* ) 11711c30f5000Smrg case $build in 11712c30f5000Smrg *-*-mingw* ) # actually msys 11713c30f5000Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11714c30f5000Smrg ;; 11715c30f5000Smrg esac 11716c30f5000Smrg ;; 11717c30f5000Smrgesac 11718b3a827e2Smrg]) 11719c30f5000Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 11720c30f5000SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11721c30f5000Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11722c30f5000Smrg [0], [convert $build files to toolchain format])dnl 11723c30f5000Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 11724b3a827e2Smrg 11725c30f5000Smrg# Helper functions for option handling. -*- Autoconf -*- 11726c30f5000Smrg# 11727c30f5000Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11728c30f5000Smrg# Software Foundation, Inc. 11729c30f5000Smrg# Written by Gary V. Vaughan, 2004 11730c30f5000Smrg# 11731c30f5000Smrg# This file is free software; the Free Software Foundation gives 11732c30f5000Smrg# unlimited permission to copy and/or distribute it, with or without 11733c30f5000Smrg# modifications, as long as this notice is preserved. 11734b3a827e2Smrg 11735c30f5000Smrg# serial 8 ltoptions.m4 11736c30f5000Smrg 11737c30f5000Smrg# This is to help aclocal find these macros, as it can't see m4_define. 11738c30f5000SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11739c30f5000Smrg 11740c30f5000Smrg 11741c30f5000Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11742c30f5000Smrg# ------------------------------------------ 11743c30f5000Smrgm4_define([_LT_MANGLE_OPTION], 11744c30f5000Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11745c30f5000Smrg 11746c30f5000Smrg 11747c30f5000Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11748c30f5000Smrg# --------------------------------------- 11749c30f5000Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11750c30f5000Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11751c30f5000Smrg# saved as a flag. 11752c30f5000Smrgm4_define([_LT_SET_OPTION], 11753c30f5000Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11754c30f5000Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11755c30f5000Smrg _LT_MANGLE_DEFUN([$1], [$2]), 11756c30f5000Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 11757b3a827e2Smrg]) 11758b3a827e2Smrg 11759b3a827e2Smrg 11760c30f5000Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11761c30f5000Smrg# ------------------------------------------------------------ 11762c30f5000Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11763c30f5000Smrgm4_define([_LT_IF_OPTION], 11764c30f5000Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11765c30f5000Smrg 11766c30f5000Smrg 11767c30f5000Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11768c30f5000Smrg# ------------------------------------------------------- 11769c30f5000Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11770c30f5000Smrg# are set. 11771c30f5000Smrgm4_define([_LT_UNLESS_OPTIONS], 11772c30f5000Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11773c30f5000Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11774c30f5000Smrg [m4_define([$0_found])])])[]dnl 11775c30f5000Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11776c30f5000Smrg])[]dnl 11777b3a827e2Smrg]) 11778b3a827e2Smrg 11779b3a827e2Smrg 11780c30f5000Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11781c30f5000Smrg# ---------------------------------------- 11782c30f5000Smrg# OPTION-LIST is a space-separated list of Libtool options associated 11783c30f5000Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 11784c30f5000Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11785c30f5000Smrg# the unknown option and exit. 11786c30f5000Smrgm4_defun([_LT_SET_OPTIONS], 11787c30f5000Smrg[# Set options 11788c30f5000Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11789c30f5000Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 11790c30f5000Smrg 11791c30f5000Smrgm4_if([$1],[LT_INIT],[ 11792c30f5000Smrg dnl 11793c30f5000Smrg dnl Simply set some default values (i.e off) if boolean options were not 11794c30f5000Smrg dnl specified: 11795c30f5000Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11796c30f5000Smrg ]) 11797c30f5000Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11798c30f5000Smrg ]) 11799c30f5000Smrg dnl 11800c30f5000Smrg dnl If no reference was made to various pairs of opposing options, then 11801c30f5000Smrg dnl we run the default mode handler for the pair. For example, if neither 11802c30f5000Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11803c30f5000Smrg dnl archives by default: 11804c30f5000Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11805c30f5000Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11806c30f5000Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11807c30f5000Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11808c30f5000Smrg [_LT_ENABLE_FAST_INSTALL]) 11809c30f5000Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11810c30f5000Smrg [_LT_WITH_AIX_SONAME([aix])]) 11811c30f5000Smrg ]) 11812c30f5000Smrg])# _LT_SET_OPTIONS 11813b3a827e2Smrg 11814b3a827e2Smrg 11815b3a827e2Smrg 11816c30f5000Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11817c30f5000Smrg# ----------------------------------------- 11818c30f5000Smrgm4_define([_LT_MANGLE_DEFUN], 11819c30f5000Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11820b3a827e2Smrg 11821c30f5000Smrg 11822c30f5000Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11823c30f5000Smrg# ----------------------------------------------- 11824c30f5000Smrgm4_define([LT_OPTION_DEFINE], 11825c30f5000Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11826c30f5000Smrg])# LT_OPTION_DEFINE 11827c30f5000Smrg 11828c30f5000Smrg 11829c30f5000Smrg# dlopen 11830c30f5000Smrg# ------ 11831c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 11832b3a827e2Smrg]) 11833b3a827e2Smrg 11834c30f5000SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 11835c30f5000Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 11836c30f5000SmrgAC_DIAGNOSE([obsolete], 11837c30f5000Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11838c30f5000Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 11839c30f5000Smrg]) 11840b3a827e2Smrg 11841c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 11842c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11843b3a827e2Smrg 11844b3a827e2Smrg 11845c30f5000Smrg# win32-dll 11846c30f5000Smrg# --------- 11847c30f5000Smrg# Declare package support for building win32 dll's. 11848c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 11849c30f5000Smrg[enable_win32_dll=yes 11850c30f5000Smrg 11851c30f5000Smrgcase $host in 11852c30f5000Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11853c30f5000Smrg AC_CHECK_TOOL(AS, as, false) 11854c30f5000Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11855c30f5000Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 11856c30f5000Smrg ;; 11857c30f5000Smrgesac 11858c30f5000Smrg 11859c30f5000Smrgtest -z "$AS" && AS=as 11860c30f5000Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 11861c30f5000Smrg 11862c30f5000Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11863c30f5000Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11864c30f5000Smrg 11865c30f5000Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11866c30f5000Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11867c30f5000Smrg])# win32-dll 11868c30f5000Smrg 11869c30f5000SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11870c30f5000Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11871c30f5000Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 11872c30f5000SmrgAC_DIAGNOSE([obsolete], 11873c30f5000Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11874c30f5000Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 11875b3a827e2Smrg]) 11876b3a827e2Smrg 11877c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 11878c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 11879c30f5000Smrg 11880c30f5000Smrg 11881c30f5000Smrg# _LT_ENABLE_SHARED([DEFAULT]) 11882c30f5000Smrg# ---------------------------- 11883c30f5000Smrg# implement the --enable-shared flag, and supports the 'shared' and 11884c30f5000Smrg# 'disable-shared' LT_INIT options. 11885c30f5000Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11886c30f5000Smrgm4_define([_LT_ENABLE_SHARED], 11887c30f5000Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11888c30f5000SmrgAC_ARG_ENABLE([shared], 11889c30f5000Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11890c30f5000Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11891c30f5000Smrg [p=${PACKAGE-default} 11892c30f5000Smrg case $enableval in 11893c30f5000Smrg yes) enable_shared=yes ;; 11894c30f5000Smrg no) enable_shared=no ;; 11895c30f5000Smrg *) 11896c30f5000Smrg enable_shared=no 11897c30f5000Smrg # Look at the argument we got. We use all the common list separators. 11898c30f5000Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11899c30f5000Smrg for pkg in $enableval; do 11900c30f5000Smrg IFS=$lt_save_ifs 11901c30f5000Smrg if test "X$pkg" = "X$p"; then 11902c30f5000Smrg enable_shared=yes 11903c30f5000Smrg fi 11904c30f5000Smrg done 11905c30f5000Smrg IFS=$lt_save_ifs 11906c30f5000Smrg ;; 11907c30f5000Smrg esac], 11908c30f5000Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 11909b3a827e2Smrg 11910c30f5000Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 11911c30f5000Smrg [Whether or not to build shared libraries]) 11912c30f5000Smrg])# _LT_ENABLE_SHARED 11913b3a827e2Smrg 11914c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 11915c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 11916e0963edeSmrg 11917c30f5000Smrg# Old names: 11918c30f5000SmrgAC_DEFUN([AC_ENABLE_SHARED], 11919c30f5000Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 11920c30f5000Smrg]) 11921e0963edeSmrg 11922c30f5000SmrgAC_DEFUN([AC_DISABLE_SHARED], 11923c30f5000Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 11924b3a827e2Smrg]) 11925e0963edeSmrg 11926c30f5000SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 11927c30f5000SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 11928b3a827e2Smrg 11929c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 11930c30f5000Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 11931c30f5000Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 11932b3a827e2Smrg 11933e0963edeSmrg 11934e0963edeSmrg 11935c30f5000Smrg# _LT_ENABLE_STATIC([DEFAULT]) 11936c30f5000Smrg# ---------------------------- 11937c30f5000Smrg# implement the --enable-static flag, and support the 'static' and 11938c30f5000Smrg# 'disable-static' LT_INIT options. 11939c30f5000Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11940c30f5000Smrgm4_define([_LT_ENABLE_STATIC], 11941c30f5000Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 11942c30f5000SmrgAC_ARG_ENABLE([static], 11943c30f5000Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 11944c30f5000Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 11945c30f5000Smrg [p=${PACKAGE-default} 11946c30f5000Smrg case $enableval in 11947c30f5000Smrg yes) enable_static=yes ;; 11948c30f5000Smrg no) enable_static=no ;; 11949c30f5000Smrg *) 11950c30f5000Smrg enable_static=no 11951c30f5000Smrg # Look at the argument we got. We use all the common list separators. 11952c30f5000Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11953c30f5000Smrg for pkg in $enableval; do 11954c30f5000Smrg IFS=$lt_save_ifs 11955c30f5000Smrg if test "X$pkg" = "X$p"; then 11956c30f5000Smrg enable_static=yes 11957c30f5000Smrg fi 11958c30f5000Smrg done 11959c30f5000Smrg IFS=$lt_save_ifs 11960c30f5000Smrg ;; 11961c30f5000Smrg esac], 11962c30f5000Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 11963e0963edeSmrg 11964c30f5000Smrg _LT_DECL([build_old_libs], [enable_static], [0], 11965c30f5000Smrg [Whether or not to build static libraries]) 11966c30f5000Smrg])# _LT_ENABLE_STATIC 11967f05b35a2Smrg 11968c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 11969c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 11970f05b35a2Smrg 11971c30f5000Smrg# Old names: 11972c30f5000SmrgAC_DEFUN([AC_ENABLE_STATIC], 11973c30f5000Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 11974c30f5000Smrg]) 11975e0963edeSmrg 11976c30f5000SmrgAC_DEFUN([AC_DISABLE_STATIC], 11977c30f5000Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 11978c30f5000Smrg]) 11979e0963edeSmrg 11980c30f5000SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 11981c30f5000SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 11982e0963edeSmrg 11983c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 11984c30f5000Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 11985c30f5000Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 11986f05b35a2Smrg 11987e0963edeSmrg 11988b3a827e2Smrg 11989c30f5000Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 11990c30f5000Smrg# ---------------------------------- 11991c30f5000Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 11992c30f5000Smrg# and 'disable-fast-install' LT_INIT options. 11993c30f5000Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11994c30f5000Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 11995c30f5000Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 11996c30f5000SmrgAC_ARG_ENABLE([fast-install], 11997c30f5000Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 11998c30f5000Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 11999c30f5000Smrg [p=${PACKAGE-default} 12000c30f5000Smrg case $enableval in 12001c30f5000Smrg yes) enable_fast_install=yes ;; 12002c30f5000Smrg no) enable_fast_install=no ;; 12003c30f5000Smrg *) 12004c30f5000Smrg enable_fast_install=no 12005c30f5000Smrg # Look at the argument we got. We use all the common list separators. 12006c30f5000Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12007c30f5000Smrg for pkg in $enableval; do 12008c30f5000Smrg IFS=$lt_save_ifs 12009c30f5000Smrg if test "X$pkg" = "X$p"; then 12010c30f5000Smrg enable_fast_install=yes 12011c30f5000Smrg fi 12012c30f5000Smrg done 12013c30f5000Smrg IFS=$lt_save_ifs 12014c30f5000Smrg ;; 12015c30f5000Smrg esac], 12016c30f5000Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 1201749e108a1Smrg 12018c30f5000Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 12019c30f5000Smrg [Whether or not to optimize for fast installation])dnl 12020c30f5000Smrg])# _LT_ENABLE_FAST_INSTALL 1202167ab2ff2Smrg 12022c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12023c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 1202449e108a1Smrg 12025c30f5000Smrg# Old names: 12026c30f5000SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 12027c30f5000Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12028c30f5000SmrgAC_DIAGNOSE([obsolete], 12029c30f5000Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12030c30f5000Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 12031b3a827e2Smrg]) 1203267ab2ff2Smrg 12033c30f5000SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 12034c30f5000Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12035c30f5000SmrgAC_DIAGNOSE([obsolete], 12036c30f5000Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12037c30f5000Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 12038c30f5000Smrg]) 1203967ab2ff2Smrg 12040c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 12041c30f5000Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12042c30f5000Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12043e0963edeSmrg 1204467ab2ff2Smrg 12045c30f5000Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 12046c30f5000Smrg# ---------------------------------- 12047c30f5000Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12048c30f5000Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12049c30f5000Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12050c30f5000Smrgm4_define([_LT_WITH_AIX_SONAME], 12051c30f5000Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12052c30f5000Smrgshared_archive_member_spec= 12053c30f5000Smrgcase $host,$enable_shared in 12054c30f5000Smrgpower*-*-aix[[5-9]]*,yes) 12055c30f5000Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12056c30f5000Smrg AC_ARG_WITH([aix-soname], 12057c30f5000Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12058c30f5000Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12059c30f5000Smrg [case $withval in 12060c30f5000Smrg aix|svr4|both) 12061c30f5000Smrg ;; 12062c30f5000Smrg *) 12063c30f5000Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12064c30f5000Smrg ;; 12065c30f5000Smrg esac 12066c30f5000Smrg lt_cv_with_aix_soname=$with_aix_soname], 12067c30f5000Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 12068c30f5000Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12069c30f5000Smrg with_aix_soname=$lt_cv_with_aix_soname]) 12070c30f5000Smrg AC_MSG_RESULT([$with_aix_soname]) 12071c30f5000Smrg if test aix != "$with_aix_soname"; then 12072c30f5000Smrg # For the AIX way of multilib, we name the shared archive member 12073c30f5000Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12074c30f5000Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12075c30f5000Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12076c30f5000Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 12077c30f5000Smrg if test 64 = "${OBJECT_MODE-32}"; then 12078c30f5000Smrg shared_archive_member_spec=shr_64 12079c30f5000Smrg else 12080c30f5000Smrg shared_archive_member_spec=shr 12081c30f5000Smrg fi 12082c30f5000Smrg fi 12083c30f5000Smrg ;; 12084c30f5000Smrg*) 12085c30f5000Smrg with_aix_soname=aix 12086c30f5000Smrg ;; 12087c30f5000Smrgesac 12088e0963edeSmrg 12089c30f5000Smrg_LT_DECL([], [shared_archive_member_spec], [0], 12090c30f5000Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12091c30f5000Smrg])# _LT_WITH_AIX_SONAME 1209267ab2ff2Smrg 12093c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12094c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12095c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 1209667ab2ff2Smrg 1209767ab2ff2Smrg 12098c30f5000Smrg# _LT_WITH_PIC([MODE]) 12099b3a827e2Smrg# -------------------- 12100c30f5000Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12101c30f5000Smrg# LT_INIT options. 12102c30f5000Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12103c30f5000Smrgm4_define([_LT_WITH_PIC], 12104c30f5000Smrg[AC_ARG_WITH([pic], 12105c30f5000Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12106c30f5000Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12107c30f5000Smrg [lt_p=${PACKAGE-default} 12108c30f5000Smrg case $withval in 12109c30f5000Smrg yes|no) pic_mode=$withval ;; 12110c30f5000Smrg *) 12111c30f5000Smrg pic_mode=default 12112c30f5000Smrg # Look at the argument we got. We use all the common list separators. 12113c30f5000Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12114c30f5000Smrg for lt_pkg in $withval; do 12115c30f5000Smrg IFS=$lt_save_ifs 12116c30f5000Smrg if test "X$lt_pkg" = "X$lt_p"; then 12117c30f5000Smrg pic_mode=yes 12118c30f5000Smrg fi 12119c30f5000Smrg done 12120c30f5000Smrg IFS=$lt_save_ifs 12121c30f5000Smrg ;; 12122c30f5000Smrg esac], 12123c30f5000Smrg [pic_mode=m4_default([$1], [default])]) 1212467ab2ff2Smrg 12125c30f5000Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12126c30f5000Smrg])# _LT_WITH_PIC 1212767ab2ff2Smrg 12128c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12129c30f5000SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12130e0963edeSmrg 12131c30f5000Smrg# Old name: 12132c30f5000SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 12133c30f5000Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 12134c30f5000SmrgAC_DIAGNOSE([obsolete], 12135c30f5000Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12136c30f5000Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 12137c30f5000Smrg]) 1213867ab2ff2Smrg 12139c30f5000Smrgdnl aclocal-1.4 backwards compatibility: 12140c30f5000Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12141b3a827e2Smrg 12142b3a827e2Smrg 12143c30f5000Smrgm4_define([_LTDL_MODE], []) 12144c30f5000SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12145c30f5000Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 12146c30f5000SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 12147c30f5000Smrg [m4_define([_LTDL_MODE], [recursive])]) 12148c30f5000SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 12149c30f5000Smrg [m4_define([_LTDL_MODE], [subproject])]) 12150c30f5000Smrg 12151c30f5000Smrgm4_define([_LTDL_TYPE], []) 12152c30f5000SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 12153c30f5000Smrg [m4_define([_LTDL_TYPE], [installable])]) 12154c30f5000SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 12155c30f5000Smrg [m4_define([_LTDL_TYPE], [convenience])]) 12156c30f5000Smrg 12157c30f5000Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12158b3a827e2Smrg# 12159c30f5000Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12160c30f5000Smrg# Foundation, Inc. 12161c30f5000Smrg# Written by Gary V. Vaughan, 2004 12162c30f5000Smrg# 12163c30f5000Smrg# This file is free software; the Free Software Foundation gives 12164c30f5000Smrg# unlimited permission to copy and/or distribute it, with or without 12165c30f5000Smrg# modifications, as long as this notice is preserved. 12166e0963edeSmrg 12167c30f5000Smrg# serial 6 ltsugar.m4 1216867ab2ff2Smrg 12169c30f5000Smrg# This is to help aclocal find these macros, as it can't see m4_define. 12170c30f5000SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12171e0963edeSmrg 1217267ab2ff2Smrg 12173c30f5000Smrg# lt_join(SEP, ARG1, [ARG2...]) 12174c30f5000Smrg# ----------------------------- 12175c30f5000Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12176c30f5000Smrg# associated separator. 12177c30f5000Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12178c30f5000Smrg# versions in m4sugar had bugs. 12179c30f5000Smrgm4_define([lt_join], 12180c30f5000Smrg[m4_if([$#], [1], [], 12181c30f5000Smrg [$#], [2], [[$2]], 12182c30f5000Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12183c30f5000Smrgm4_define([_lt_join], 12184c30f5000Smrg[m4_if([$#$2], [2], [], 12185c30f5000Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 1218667ab2ff2Smrg 1218767ab2ff2Smrg 12188c30f5000Smrg# lt_car(LIST) 12189c30f5000Smrg# lt_cdr(LIST) 12190c30f5000Smrg# ------------ 12191c30f5000Smrg# Manipulate m4 lists. 12192c30f5000Smrg# These macros are necessary as long as will still need to support 12193c30f5000Smrg# Autoconf-2.59, which quotes differently. 12194c30f5000Smrgm4_define([lt_car], [[$1]]) 12195c30f5000Smrgm4_define([lt_cdr], 12196c30f5000Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12197c30f5000Smrg [$#], 1, [], 12198c30f5000Smrg [m4_dquote(m4_shift($@))])]) 12199c30f5000Smrgm4_define([lt_unquote], $1) 12200c30f5000Smrg 1220149e108a1Smrg 12202c30f5000Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12203c30f5000Smrg# ------------------------------------------ 12204c30f5000Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12205c30f5000Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 12206c30f5000Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12207c30f5000Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12208c30f5000Smrg# than defined and empty). 1220967ab2ff2Smrg# 12210c30f5000Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 12211c30f5000Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12212c30f5000Smrgm4_define([lt_append], 12213c30f5000Smrg[m4_define([$1], 12214c30f5000Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12215e0963edeSmrg 12216b3a827e2Smrg 12217b3a827e2Smrg 12218c30f5000Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12219c30f5000Smrg# ---------------------------------------------------------- 12220c30f5000Smrg# Produce a SEP delimited list of all paired combinations of elements of 12221c30f5000Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12222c30f5000Smrg# has the form PREFIXmINFIXSUFFIXn. 12223c30f5000Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 12224c30f5000Smrgm4_define([lt_combine], 12225c30f5000Smrg[m4_if(m4_eval([$# > 3]), [1], 12226c30f5000Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12227c30f5000Smrg[[m4_foreach([_Lt_prefix], [$2], 12228c30f5000Smrg [m4_foreach([_Lt_suffix], 12229c30f5000Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12230c30f5000Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12231c30f5000Smrg 12232c30f5000Smrg 12233c30f5000Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12234c30f5000Smrg# ----------------------------------------------------------------------- 12235c30f5000Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12236c30f5000Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12237c30f5000Smrgm4_define([lt_if_append_uniq], 12238c30f5000Smrg[m4_ifdef([$1], 12239c30f5000Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12240c30f5000Smrg [lt_append([$1], [$2], [$3])$4], 12241c30f5000Smrg [$5])], 12242c30f5000Smrg [lt_append([$1], [$2], [$3])$4])]) 12243c30f5000Smrg 12244c30f5000Smrg 12245c30f5000Smrg# lt_dict_add(DICT, KEY, VALUE) 12246c30f5000Smrg# ----------------------------- 12247c30f5000Smrgm4_define([lt_dict_add], 12248c30f5000Smrg[m4_define([$1($2)], [$3])]) 12249f05b35a2Smrg 12250e0963edeSmrg 12251c30f5000Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12252c30f5000Smrg# -------------------------------------------- 12253c30f5000Smrgm4_define([lt_dict_add_subkey], 12254c30f5000Smrg[m4_define([$1($2:$3)], [$4])]) 1225549e108a1Smrg 1225649e108a1Smrg 12257c30f5000Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12258c30f5000Smrg# ---------------------------------- 12259c30f5000Smrgm4_define([lt_dict_fetch], 12260c30f5000Smrg[m4_ifval([$3], 12261c30f5000Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12262c30f5000Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12263e0963edeSmrg 12264e0963edeSmrg 12265c30f5000Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12266c30f5000Smrg# ----------------------------------------------------------------- 12267c30f5000Smrgm4_define([lt_if_dict_fetch], 12268c30f5000Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12269c30f5000Smrg [$5], 12270c30f5000Smrg [$6])]) 1227149e108a1Smrg 1227249e108a1Smrg 12273c30f5000Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12274c30f5000Smrg# -------------------------------------------------------------- 12275c30f5000Smrgm4_define([lt_dict_filter], 12276c30f5000Smrg[m4_if([$5], [], [], 12277c30f5000Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 12278c30f5000Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12279c30f5000Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12280c30f5000Smrg]) 12281b3a827e2Smrg 12282c30f5000Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12283c30f5000Smrg# 12284c30f5000Smrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12285c30f5000Smrg# Inc. 12286c30f5000Smrg# Written by Scott James Remnant, 2004 12287c30f5000Smrg# 12288c30f5000Smrg# This file is free software; the Free Software Foundation gives 12289c30f5000Smrg# unlimited permission to copy and/or distribute it, with or without 12290c30f5000Smrg# modifications, as long as this notice is preserved. 12291b3a827e2Smrg 12292c30f5000Smrg# @configure_input@ 12293b3a827e2Smrg 12294c30f5000Smrg# serial 4245 ltversion.m4 12295c30f5000Smrg# This file is part of GNU Libtool 12296b3a827e2Smrg 12297c30f5000Smrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12298c30f5000Smrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 12299b3a827e2Smrg 12300c30f5000SmrgAC_DEFUN([LTVERSION_VERSION], 12301c30f5000Smrg[macro_version='2.4.7' 12302c30f5000Smrgmacro_revision='2.4.7' 12303c30f5000Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12304c30f5000Smrg_LT_DECL(, macro_revision, 0) 12305c30f5000Smrg]) 12306b3a827e2Smrg 12307c30f5000Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12308c30f5000Smrg# 12309c30f5000Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12310c30f5000Smrg# Software Foundation, Inc. 12311c30f5000Smrg# Written by Scott James Remnant, 2004. 12312c30f5000Smrg# 12313c30f5000Smrg# This file is free software; the Free Software Foundation gives 12314c30f5000Smrg# unlimited permission to copy and/or distribute it, with or without 12315c30f5000Smrg# modifications, as long as this notice is preserved. 12316b3a827e2Smrg 12317c30f5000Smrg# serial 5 lt~obsolete.m4 12318b3a827e2Smrg 12319c30f5000Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 12320c30f5000Smrg# 12321c30f5000Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12322c30f5000Smrg# which have later been changed to m4_define as they aren't part of the 12323c30f5000Smrg# exported API, or moved to Autoconf or Automake where they belong. 12324c30f5000Smrg# 12325c30f5000Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12326c30f5000Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12327c30f5000Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 12328c30f5000Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12329c30f5000Smrg# and doesn't know about Autoconf macros at all.) 12330c30f5000Smrg# 12331c30f5000Smrg# So we provide this file, which has a silly filename so it's always 12332c30f5000Smrg# included after everything else. This provides aclocal with the 12333c30f5000Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12334c30f5000Smrg# because those macros already exist, or will be overwritten later. 12335c30f5000Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12336c30f5000Smrg# 12337c30f5000Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12338c30f5000Smrg# Yes, that means every name once taken will need to remain here until 12339c30f5000Smrg# we give up compatibility with versions before 1.7, at which point 12340c30f5000Smrg# we need to keep only those names which we still refer to. 12341b3a827e2Smrg 12342c30f5000Smrg# This is to help aclocal find these macros, as it can't see m4_define. 12343c30f5000SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12344b3a827e2Smrg 12345c30f5000Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12346c30f5000Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12347c30f5000Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12348c30f5000Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12349c30f5000Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12350c30f5000Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12351c30f5000Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12352c30f5000Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12353c30f5000Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12354c30f5000Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12355c30f5000Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12356c30f5000Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12357c30f5000Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12358c30f5000Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12359c30f5000Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12360c30f5000Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12361c30f5000Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12362c30f5000Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12363c30f5000Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12364c30f5000Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12365c30f5000Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12366c30f5000Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12367c30f5000Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12368c30f5000Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12369c30f5000Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12370c30f5000Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12371c30f5000Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12372c30f5000Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12373c30f5000Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12374c30f5000Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12375c30f5000Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12376c30f5000Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12377c30f5000Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12378c30f5000Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12379c30f5000Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12380c30f5000Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12381c30f5000Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12382c30f5000Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12383c30f5000Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12384c30f5000Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12385c30f5000Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12386c30f5000Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12387c30f5000Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12388c30f5000Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12389c30f5000Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12390c30f5000Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12391c30f5000Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12392c30f5000Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12393c30f5000Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12394c30f5000Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12395c30f5000Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12396c30f5000Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12397c30f5000Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12398c30f5000Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12399c30f5000Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12400c30f5000Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12401c30f5000Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12402c30f5000Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12403c30f5000Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12404c30f5000Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12405c30f5000Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12406e0963edeSmrg 12407