aclocal.m4 revision c3e29c03
1c3e29c03Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 226372658Smrg 3c3e29c03Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 44b0ead49Smrg 54b0ead49Smrg# This file is free software; the Free Software Foundation 64b0ead49Smrg# gives unlimited permission to copy and/or distribute it, 74b0ead49Smrg# with or without modifications, as long as this notice is preserved. 84b0ead49Smrg 94b0ead49Smrg# This program is distributed in the hope that it will be useful, 104b0ead49Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 114b0ead49Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 124b0ead49Smrg# PARTICULAR PURPOSE. 134b0ead49Smrg 1426372658Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1552b01e16Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1652b01e16Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17c3e29c03Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18c3e29c03Smrg[m4_warning([this file was generated for autoconf 2.71. 1952b01e16SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2052b01e16SmrgIf you have problems, you may need to regenerate the build system entirely. 2126372658SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 224b0ead49Smrg 23c3e29c03Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 2426372658Smrg# 25c3e29c03Smrg# This file is free software; the Free Software Foundation 26c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 27c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 284e7590efSmrg 29c3e29c03Smrg# AM_AUTOMAKE_VERSION(VERSION) 30c3e29c03Smrg# ---------------------------- 31c3e29c03Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32c3e29c03Smrg# generated from the m4 files accompanying Automake X.Y. 33c3e29c03Smrg# (This private macro should not be called outside this file.) 34c3e29c03SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35c3e29c03Smrg[am__api_version='1.16' 36c3e29c03Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37c3e29c03Smrgdnl require some minimum version. Point them to the right macro. 38c3e29c03Smrgm4_if([$1], [1.16.5], [], 39c3e29c03Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 4052b01e16Smrg]) 414b0ead49Smrg 42c3e29c03Smrg# _AM_AUTOCONF_VERSION(VERSION) 43c3e29c03Smrg# ----------------------------- 44c3e29c03Smrg# aclocal traces this macro to find the Autoconf version. 45c3e29c03Smrg# This is a private macro too. Using m4_define simplifies 46c3e29c03Smrg# the logic in aclocal, which can simply ignore this definition. 47c3e29c03Smrgm4_define([_AM_AUTOCONF_VERSION], []) 484b0ead49Smrg 49c3e29c03Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50c3e29c03Smrg# ------------------------------- 51c3e29c03Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52c3e29c03Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53c3e29c03SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54c3e29c03Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 55c3e29c03Smrgm4_ifndef([AC_AUTOCONF_VERSION], 56c3e29c03Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57c3e29c03Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 584b0ead49Smrg 59c3e29c03Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 604b0ead49Smrg 61c3e29c03Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62c3e29c03Smrg# 63c3e29c03Smrg# This file is free software; the Free Software Foundation 64c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 65c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 664b0ead49Smrg 67c3e29c03Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68c3e29c03Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69c3e29c03Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70c3e29c03Smrg# 71c3e29c03Smrg# Of course, Automake must honor this variable whenever it calls a 72c3e29c03Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 73c3e29c03Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74c3e29c03Smrg# depending on how configure is run. This is pretty annoying, since 75c3e29c03Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76c3e29c03Smrg# source directory, any form will work fine, but in subdirectories a 77c3e29c03Smrg# relative path needs to be adjusted first. 78c3e29c03Smrg# 79c3e29c03Smrg# $ac_aux_dir/missing 80c3e29c03Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 81c3e29c03Smrg# $top_srcdir/$ac_aux_dir/missing 82c3e29c03Smrg# fails if $ac_aux_dir is absolute, 83c3e29c03Smrg# fails when called from a subdirectory in a VPATH build with 84c3e29c03Smrg# a relative $ac_aux_dir 85c3e29c03Smrg# 86c3e29c03Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87c3e29c03Smrg# are both prefixed by $srcdir. In an in-source build this is usually 88c3e29c03Smrg# harmless because $srcdir is '.', but things will broke when you 89c3e29c03Smrg# start a VPATH build or use an absolute $srcdir. 90c3e29c03Smrg# 91c3e29c03Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92c3e29c03Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93c3e29c03Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94c3e29c03Smrg# and then we would define $MISSING as 95c3e29c03Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 96c3e29c03Smrg# This will work as long as MISSING is not called from configure, because 97c3e29c03Smrg# unfortunately $(top_srcdir) has no meaning in configure. 98c3e29c03Smrg# However there are other variables, like CC, which are often used in 99c3e29c03Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100c3e29c03Smrg# 101c3e29c03Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 102c3e29c03Smrg# absolute PATH. The drawback is that using absolute paths prevent a 103c3e29c03Smrg# configured tree to be moved without reconfiguration. 104c3e29c03Smrg 105c3e29c03SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106c3e29c03Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107c3e29c03Smrg# Expand $ac_aux_dir to an absolute path. 108c3e29c03Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 10926372658Smrg]) 1104e7590efSmrg 111c3e29c03Smrg# AM_CONDITIONAL -*- Autoconf -*- 1124b0ead49Smrg 113c3e29c03Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114c3e29c03Smrg# 115c3e29c03Smrg# This file is free software; the Free Software Foundation 116c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 117c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 1184b0ead49Smrg 119c3e29c03Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120c3e29c03Smrg# ------------------------------------- 121c3e29c03Smrg# Define a conditional. 122c3e29c03SmrgAC_DEFUN([AM_CONDITIONAL], 123c3e29c03Smrg[AC_PREREQ([2.52])dnl 124c3e29c03Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125c3e29c03Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126c3e29c03SmrgAC_SUBST([$1_TRUE])dnl 127c3e29c03SmrgAC_SUBST([$1_FALSE])dnl 128c3e29c03Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129c3e29c03Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130c3e29c03Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131c3e29c03Smrgif $2; then 132c3e29c03Smrg $1_TRUE= 133c3e29c03Smrg $1_FALSE='#' 134c3e29c03Smrgelse 135c3e29c03Smrg $1_TRUE='#' 136c3e29c03Smrg $1_FALSE= 137c3e29c03Smrgfi 138c3e29c03SmrgAC_CONFIG_COMMANDS_PRE( 139c3e29c03Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140c3e29c03Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 141c3e29c03SmrgUsually this means the macro was only invoked conditionally.]]) 142c3e29c03Smrgfi])]) 1434b0ead49Smrg 144c3e29c03Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145c3e29c03Smrg# 146c3e29c03Smrg# This file is free software; the Free Software Foundation 147c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 148c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 1494b0ead49Smrg 1504b0ead49Smrg 151c3e29c03Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152c3e29c03Smrg# written in clear, in which case automake, when reading aclocal.m4, 153c3e29c03Smrg# will think it sees a *use*, and therefore will trigger all it's 154c3e29c03Smrg# C support machinery. Also note that it means that autoscan, seeing 155c3e29c03Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1564b0ead49Smrg 1574b0ead49Smrg 158c3e29c03Smrg# _AM_DEPENDENCIES(NAME) 159c3e29c03Smrg# ---------------------- 160c3e29c03Smrg# See how the compiler implements dependency checking. 161c3e29c03Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162c3e29c03Smrg# We try a few techniques and use that to set a single cache variable. 163c3e29c03Smrg# 164c3e29c03Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165c3e29c03Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166c3e29c03Smrg# dependency, and given that the user is not expected to run this macro, 167c3e29c03Smrg# just rely on AC_PROG_CC. 168c3e29c03SmrgAC_DEFUN([_AM_DEPENDENCIES], 169c3e29c03Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170c3e29c03SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171c3e29c03SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172c3e29c03SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1734b0ead49Smrg 174c3e29c03Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175c3e29c03Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176c3e29c03Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177c3e29c03Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178c3e29c03Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179c3e29c03Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180c3e29c03Smrg [depcc="$$1" am_compiler_list=]) 1814b0ead49Smrg 182c3e29c03SmrgAC_CACHE_CHECK([dependency style of $depcc], 183c3e29c03Smrg [am_cv_$1_dependencies_compiler_type], 184c3e29c03Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185c3e29c03Smrg # We make a subdir and do the tests there. Otherwise we can end up 186c3e29c03Smrg # making bogus files that we don't know about and never remove. For 187c3e29c03Smrg # instance it was reported that on HP-UX the gcc test will end up 188c3e29c03Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 189c3e29c03Smrg # in D". 190c3e29c03Smrg rm -rf conftest.dir 191c3e29c03Smrg mkdir conftest.dir 192c3e29c03Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 193c3e29c03Smrg # using a relative directory. 194c3e29c03Smrg cp "$am_depcomp" conftest.dir 195c3e29c03Smrg cd conftest.dir 196c3e29c03Smrg # We will build objects and dependencies in a subdirectory because 197c3e29c03Smrg # it helps to detect inapplicable dependency modes. For instance 198c3e29c03Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 199c3e29c03Smrg # side effect of compilation, but ICC will put the dependencies in 200c3e29c03Smrg # the current directory while Tru64 will put them in the object 201c3e29c03Smrg # directory. 202c3e29c03Smrg mkdir sub 2034b0ead49Smrg 204c3e29c03Smrg am_cv_$1_dependencies_compiler_type=none 205c3e29c03Smrg if test "$am_compiler_list" = ""; then 206c3e29c03Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207c3e29c03Smrg fi 208c3e29c03Smrg am__universal=false 209c3e29c03Smrg m4_case([$1], [CC], 210c3e29c03Smrg [case " $depcc " in #( 211c3e29c03Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212c3e29c03Smrg esac], 213c3e29c03Smrg [CXX], 214c3e29c03Smrg [case " $depcc " in #( 215c3e29c03Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216c3e29c03Smrg esac]) 2174b0ead49Smrg 218c3e29c03Smrg for depmode in $am_compiler_list; do 219c3e29c03Smrg # Setup a source with many dependencies, because some compilers 220c3e29c03Smrg # like to wrap large dependency lists on column 80 (with \), and 221c3e29c03Smrg # we should not choose a depcomp mode which is confused by this. 222c3e29c03Smrg # 223c3e29c03Smrg # We need to recreate these files for each test, as the compiler may 224c3e29c03Smrg # overwrite some of them when testing with obscure command lines. 225c3e29c03Smrg # This happens at least with the AIX C compiler. 226c3e29c03Smrg : > sub/conftest.c 227c3e29c03Smrg for i in 1 2 3 4 5 6; do 228c3e29c03Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229c3e29c03Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230c3e29c03Smrg # Solaris 10 /bin/sh. 231c3e29c03Smrg echo '/* dummy */' > sub/conftst$i.h 23226372658Smrg done 233c3e29c03Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2344b0ead49Smrg 235c3e29c03Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236c3e29c03Smrg # mode. It turns out that the SunPro C++ compiler does not properly 237c3e29c03Smrg # handle '-M -o', and we need to detect this. Also, some Intel 238c3e29c03Smrg # versions had trouble with output in subdirs. 239c3e29c03Smrg am__obj=sub/conftest.${OBJEXT-o} 240c3e29c03Smrg am__minus_obj="-o $am__obj" 241c3e29c03Smrg case $depmode in 242c3e29c03Smrg gcc) 243c3e29c03Smrg # This depmode causes a compiler race in universal mode. 244c3e29c03Smrg test "$am__universal" = false || continue 245c3e29c03Smrg ;; 246c3e29c03Smrg nosideeffect) 247c3e29c03Smrg # After this tag, mechanisms are not by side-effect, so they'll 248c3e29c03Smrg # only be used when explicitly requested. 249c3e29c03Smrg if test "x$enable_dependency_tracking" = xyes; then 250c3e29c03Smrg continue 251c3e29c03Smrg else 252c3e29c03Smrg break 253c3e29c03Smrg fi 254c3e29c03Smrg ;; 255c3e29c03Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256c3e29c03Smrg # This compiler won't grok '-c -o', but also, the minuso test has 257c3e29c03Smrg # not run yet. These depmodes are late enough in the game, and 258c3e29c03Smrg # so weak that their functioning should not be impacted. 259c3e29c03Smrg am__obj=conftest.${OBJEXT-o} 260c3e29c03Smrg am__minus_obj= 261c3e29c03Smrg ;; 262c3e29c03Smrg none) break ;; 263c3e29c03Smrg esac 264c3e29c03Smrg if depmode=$depmode \ 265c3e29c03Smrg source=sub/conftest.c object=$am__obj \ 266c3e29c03Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267c3e29c03Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268c3e29c03Smrg >/dev/null 2>conftest.err && 269c3e29c03Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270c3e29c03Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271c3e29c03Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272c3e29c03Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273c3e29c03Smrg # icc doesn't choke on unknown options, it will just issue warnings 274c3e29c03Smrg # or remarks (even with -Werror). So we grep stderr for any message 275c3e29c03Smrg # that says an option was ignored or not supported. 276c3e29c03Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277c3e29c03Smrg # icc: Command line warning: ignoring option '-M'; no argument required 278c3e29c03Smrg # The diagnosis changed in icc 8.0: 279c3e29c03Smrg # icc: Command line remark: option '-MP' not supported 280c3e29c03Smrg if (grep 'ignoring option' conftest.err || 281c3e29c03Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282c3e29c03Smrg am_cv_$1_dependencies_compiler_type=$depmode 283c3e29c03Smrg break 284c3e29c03Smrg fi 285c3e29c03Smrg fi 286c3e29c03Smrg done 2874b0ead49Smrg 288c3e29c03Smrg cd .. 289c3e29c03Smrg rm -rf conftest.dir 290c3e29c03Smrgelse 291c3e29c03Smrg am_cv_$1_dependencies_compiler_type=none 292c3e29c03Smrgfi 293c3e29c03Smrg]) 294c3e29c03SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295c3e29c03SmrgAM_CONDITIONAL([am__fastdep$1], [ 296c3e29c03Smrg test "x$enable_dependency_tracking" != xno \ 297c3e29c03Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 29826372658Smrg]) 2994b0ead49Smrg 3004b0ead49Smrg 301c3e29c03Smrg# AM_SET_DEPDIR 302c3e29c03Smrg# ------------- 303c3e29c03Smrg# Choose a directory name for dependency files. 304c3e29c03Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305c3e29c03SmrgAC_DEFUN([AM_SET_DEPDIR], 306c3e29c03Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307c3e29c03SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308c3e29c03Smrg]) 3094b0ead49Smrg 3104b0ead49Smrg 311c3e29c03Smrg# AM_DEP_TRACK 312c3e29c03Smrg# ------------ 313c3e29c03SmrgAC_DEFUN([AM_DEP_TRACK], 314c3e29c03Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 315c3e29c03SmrgAS_HELP_STRING( 316c3e29c03Smrg [--enable-dependency-tracking], 317c3e29c03Smrg [do not reject slow dependency extractors]) 318c3e29c03SmrgAS_HELP_STRING( 319c3e29c03Smrg [--disable-dependency-tracking], 320c3e29c03Smrg [speeds up one-time build])]) 321c3e29c03Smrgif test "x$enable_dependency_tracking" != xno; then 322c3e29c03Smrg am_depcomp="$ac_aux_dir/depcomp" 323c3e29c03Smrg AMDEPBACKSLASH='\' 324c3e29c03Smrg am__nodep='_no' 32552b01e16Smrgfi 326c3e29c03SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327c3e29c03SmrgAC_SUBST([AMDEPBACKSLASH])dnl 328c3e29c03Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329c3e29c03SmrgAC_SUBST([am__nodep])dnl 330c3e29c03Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 33152b01e16Smrg]) 3324b0ead49Smrg 333c3e29c03Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3344b0ead49Smrg 335c3e29c03Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 336c3e29c03Smrg# 337c3e29c03Smrg# This file is free software; the Free Software Foundation 338c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 339c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 3404b0ead49Smrg 341c3e29c03Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 342c3e29c03Smrg# ------------------------------ 343c3e29c03SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344c3e29c03Smrg[{ 345c3e29c03Smrg # Older Autoconf quotes --file arguments for eval, but not when files 346c3e29c03Smrg # are listed without --file. Let's play safe and only enable the eval 347c3e29c03Smrg # if we detect the quoting. 348c3e29c03Smrg # TODO: see whether this extra hack can be removed once we start 349c3e29c03Smrg # requiring Autoconf 2.70 or later. 350c3e29c03Smrg AS_CASE([$CONFIG_FILES], 351c3e29c03Smrg [*\'*], [eval set x "$CONFIG_FILES"], 352c3e29c03Smrg [*], [set x $CONFIG_FILES]) 353c3e29c03Smrg shift 354c3e29c03Smrg # Used to flag and report bootstrapping failures. 355c3e29c03Smrg am_rc=0 356c3e29c03Smrg for am_mf 357c3e29c03Smrg do 358c3e29c03Smrg # Strip MF so we end up with the name of the file. 359c3e29c03Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360c3e29c03Smrg # Check whether this is an Automake generated Makefile which includes 361c3e29c03Smrg # dependency-tracking related rules and includes. 362c3e29c03Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 363c3e29c03Smrg # limit of 2048, but all sed's we know have understand at least 4000. 364c3e29c03Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365c3e29c03Smrg || continue 366c3e29c03Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 367c3e29c03Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 368c3e29c03Smrg AM_RUN_LOG([cd "$am_dirpart" \ 369c3e29c03Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 370c3e29c03Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 371c3e29c03Smrg done 372c3e29c03Smrg if test $am_rc -ne 0; then 373c3e29c03Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374c3e29c03Smrg for automatic dependency tracking. If GNU make was not used, consider 375c3e29c03Smrg re-running the configure script with MAKE="gmake" (or whatever is 376c3e29c03Smrg necessary). You can also try re-running configure with the 377c3e29c03Smrg '--disable-dependency-tracking' option to at least be able to build 378c3e29c03Smrg the package (albeit without support for automatic dependency tracking).]) 37926372658Smrg fi 380c3e29c03Smrg AS_UNSET([am_dirpart]) 381c3e29c03Smrg AS_UNSET([am_filepart]) 382c3e29c03Smrg AS_UNSET([am_mf]) 383c3e29c03Smrg AS_UNSET([am_rc]) 384c3e29c03Smrg rm -f conftest-deps.mk 385c3e29c03Smrg} 386c3e29c03Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3874b0ead49Smrg 3884b0ead49Smrg 389c3e29c03Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 390c3e29c03Smrg# ----------------------------- 391c3e29c03Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 392c3e29c03Smrg# 393c3e29c03Smrg# This code is only required when automatic dependency tracking is enabled. 394c3e29c03Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395c3e29c03Smrg# order to bootstrap the dependency handling code. 396c3e29c03SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397c3e29c03Smrg[AC_CONFIG_COMMANDS([depfiles], 398c3e29c03Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399c3e29c03Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 4004b0ead49Smrg 401c3e29c03Smrg# Do all the work for Automake. -*- Autoconf -*- 4024b0ead49Smrg 403c3e29c03Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 404c3e29c03Smrg# 405c3e29c03Smrg# This file is free software; the Free Software Foundation 406c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 407c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 4084b0ead49Smrg 409c3e29c03Smrg# This macro actually does too much. Some checks are only needed if 410c3e29c03Smrg# your package does certain things. But this isn't really a big deal. 4114b0ead49Smrg 412c3e29c03Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 413c3e29c03Smrgm4_define([AC_PROG_CC], 414c3e29c03Smrgm4_defn([AC_PROG_CC]) 415c3e29c03Smrg[_AM_PROG_CC_C_O 416c3e29c03Smrg]) 4174b0ead49Smrg 418c3e29c03Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419c3e29c03Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 420c3e29c03Smrg# ----------------------------------------------- 421c3e29c03Smrg# The call with PACKAGE and VERSION arguments is the old style 422c3e29c03Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 423c3e29c03Smrg# and VERSION should now be passed to AC_INIT and removed from 424c3e29c03Smrg# the call to AM_INIT_AUTOMAKE. 425c3e29c03Smrg# We support both call styles for the transition. After 426c3e29c03Smrg# the next Automake release, Autoconf can make the AC_INIT 427c3e29c03Smrg# arguments mandatory, and then we can depend on a new Autoconf 428c3e29c03Smrg# release and drop the old call support. 429c3e29c03SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 430c3e29c03Smrg[AC_PREREQ([2.65])dnl 431c3e29c03Smrgm4_ifdef([_$0_ALREADY_INIT], 432c3e29c03Smrg [m4_fatal([$0 expanded multiple times 433c3e29c03Smrg]m4_defn([_$0_ALREADY_INIT]))], 434c3e29c03Smrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435c3e29c03Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 436c3e29c03Smrgdnl the ones we care about. 437c3e29c03Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438c3e29c03SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439c3e29c03SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 440c3e29c03Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 441c3e29c03Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442c3e29c03Smrg # is not polluted with repeated "-I." 443c3e29c03Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444c3e29c03Smrg # test to see if srcdir already configured 445c3e29c03Smrg if test -f $srcdir/config.status; then 446c3e29c03Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 447c3e29c03Smrg fi 448c3e29c03Smrgfi 4494b0ead49Smrg 450c3e29c03Smrg# test whether we have cygpath 451c3e29c03Smrgif test -z "$CYGPATH_W"; then 452c3e29c03Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 453c3e29c03Smrg CYGPATH_W='cygpath -w' 454c3e29c03Smrg else 455c3e29c03Smrg CYGPATH_W=echo 456c3e29c03Smrg fi 457c3e29c03Smrgfi 458c3e29c03SmrgAC_SUBST([CYGPATH_W]) 4594b0ead49Smrg 460c3e29c03Smrg# Define the identity of the package. 461c3e29c03Smrgdnl Distinguish between old-style and new-style calls. 462c3e29c03Smrgm4_ifval([$2], 463c3e29c03Smrg[AC_DIAGNOSE([obsolete], 464c3e29c03Smrg [$0: two- and three-arguments forms are deprecated.]) 465c3e29c03Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466c3e29c03Smrg AC_SUBST([PACKAGE], [$1])dnl 467c3e29c03Smrg AC_SUBST([VERSION], [$2])], 468c3e29c03Smrg[_AM_SET_OPTIONS([$1])dnl 469c3e29c03Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 470c3e29c03Smrgm4_if( 471c3e29c03Smrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 472c3e29c03Smrg [ok:ok],, 473c3e29c03Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474c3e29c03Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475c3e29c03Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4764b0ead49Smrg 477c3e29c03Smrg_AM_IF_OPTION([no-define],, 478c3e29c03Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 479c3e29c03Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 4804e7590efSmrg 481c3e29c03Smrg# Some tools Automake needs. 482c3e29c03SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 483c3e29c03SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 484c3e29c03SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 485c3e29c03SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 486c3e29c03SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 487c3e29c03SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 488c3e29c03SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 489c3e29c03SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490c3e29c03SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 491c3e29c03SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 492c3e29c03Smrg# For better backward compatibility. To be removed once Automake 1.9.x 493c3e29c03Smrg# dies out for good. For more background, see: 494c3e29c03Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495c3e29c03Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 496c3e29c03SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497c3e29c03Smrg# We need awk for the "check" target (and possibly the TAP driver). The 498c3e29c03Smrg# system "awk" is bad on some platforms. 499c3e29c03SmrgAC_REQUIRE([AC_PROG_AWK])dnl 500c3e29c03SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 501c3e29c03SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 502c3e29c03Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503c3e29c03Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504c3e29c03Smrg [_AM_PROG_TAR([v7])])]) 505c3e29c03Smrg_AM_IF_OPTION([no-dependencies],, 506c3e29c03Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 507c3e29c03Smrg [_AM_DEPENDENCIES([CC])], 508c3e29c03Smrg [m4_define([AC_PROG_CC], 509c3e29c03Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510c3e29c03SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 511c3e29c03Smrg [_AM_DEPENDENCIES([CXX])], 512c3e29c03Smrg [m4_define([AC_PROG_CXX], 513c3e29c03Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514c3e29c03SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 515c3e29c03Smrg [_AM_DEPENDENCIES([OBJC])], 516c3e29c03Smrg [m4_define([AC_PROG_OBJC], 517c3e29c03Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 518c3e29c03SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 519c3e29c03Smrg [_AM_DEPENDENCIES([OBJCXX])], 520c3e29c03Smrg [m4_define([AC_PROG_OBJCXX], 521c3e29c03Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 52226372658Smrg]) 523c3e29c03Smrg# Variables for tags utilities; see am/tags.am 524c3e29c03Smrgif test -z "$CTAGS"; then 525c3e29c03Smrg CTAGS=ctags 526c3e29c03Smrgfi 527c3e29c03SmrgAC_SUBST([CTAGS]) 528c3e29c03Smrgif test -z "$ETAGS"; then 529c3e29c03Smrg ETAGS=etags 530c3e29c03Smrgfi 531c3e29c03SmrgAC_SUBST([ETAGS]) 532c3e29c03Smrgif test -z "$CSCOPE"; then 533c3e29c03Smrg CSCOPE=cscope 534c3e29c03Smrgfi 535c3e29c03SmrgAC_SUBST([CSCOPE]) 5364b0ead49Smrg 537c3e29c03SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 538c3e29c03Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 539c3e29c03Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 540c3e29c03Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541c3e29c03SmrgAC_CONFIG_COMMANDS_PRE(dnl 542c3e29c03Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 543c3e29c03Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5444b0ead49Smrg 545c3e29c03Smrg# POSIX will say in a future version that running "rm -f" with no argument 546c3e29c03Smrg# is OK; and we want to be able to make that assumption in our Makefile 547c3e29c03Smrg# recipes. So use an aggressive probe to check that the usage we want is 548c3e29c03Smrg# actually supported "in the wild" to an acceptable degree. 549c3e29c03Smrg# See automake bug#10828. 550c3e29c03Smrg# To make any issue more visible, cause the running configure to be aborted 551c3e29c03Smrg# by default if the 'rm' program in use doesn't match our expectations; the 552c3e29c03Smrg# user can still override this though. 553c3e29c03Smrgif rm -f && rm -fr && rm -rf; then : OK; else 554c3e29c03Smrg cat >&2 <<'END' 555c3e29c03SmrgOops! 5564b0ead49Smrg 557c3e29c03SmrgYour 'rm' program seems unable to run without file operands specified 558c3e29c03Smrgon the command line, even when the '-f' option is present. This is contrary 559c3e29c03Smrgto the behaviour of most rm programs out there, and not conforming with 560c3e29c03Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 5614b0ead49Smrg 562c3e29c03SmrgPlease tell bug-automake@gnu.org about your system, including the value 563c3e29c03Smrgof your $PATH and any error possibly output before this message. This 564c3e29c03Smrgcan help us improve future automake versions. 5654b0ead49Smrg 566c3e29c03SmrgEND 567c3e29c03Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 568c3e29c03Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 569c3e29c03Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 570c3e29c03Smrg echo >&2 571c3e29c03Smrg else 572c3e29c03Smrg cat >&2 <<'END' 573c3e29c03SmrgAborting the configuration process, to ensure you take notice of the issue. 57452b01e16Smrg 575c3e29c03SmrgYou can download and install GNU coreutils to get an 'rm' implementation 576c3e29c03Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 57752b01e16Smrg 578c3e29c03SmrgIf you want to complete the configuration process using your problematic 579c3e29c03Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 580c3e29c03Smrgto "yes", and re-run configure. 58152b01e16Smrg 582c3e29c03SmrgEND 583c3e29c03Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 584c3e29c03Smrg fi 585c3e29c03Smrgfi 586c3e29c03Smrgdnl The trailing newline in this macro's definition is deliberate, for 587c3e29c03Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 588c3e29c03Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 58952b01e16Smrg]) 5904b0ead49Smrg 591c3e29c03Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592c3e29c03Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593c3e29c03Smrgdnl mangled by Autoconf and run in a shell conditional statement. 594c3e29c03Smrgm4_define([_AC_COMPILER_EXEEXT], 595c3e29c03Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5964b0ead49Smrg 597c3e29c03Smrg# When config.status generates a header, we must update the stamp-h file. 598c3e29c03Smrg# This file resides in the same directory as the config header 599c3e29c03Smrg# that is generated. The stamp files are numbered to have different names. 6004b0ead49Smrg 601c3e29c03Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602c3e29c03Smrg# loop where config.status creates the headers, so we can generate 603c3e29c03Smrg# our stamp files there. 604c3e29c03SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605c3e29c03Smrg[# Compute $1's index in $config_headers. 606c3e29c03Smrg_am_arg=$1 607c3e29c03Smrg_am_stamp_count=1 608c3e29c03Smrgfor _am_header in $config_headers :; do 609c3e29c03Smrg case $_am_header in 610c3e29c03Smrg $_am_arg | $_am_arg:* ) 611c3e29c03Smrg break ;; 612c3e29c03Smrg * ) 613c3e29c03Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614c3e29c03Smrg esac 615c3e29c03Smrgdone 616c3e29c03Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 61752b01e16Smrg 618c3e29c03Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 619c3e29c03Smrg# 620c3e29c03Smrg# This file is free software; the Free Software Foundation 621c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 622c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 62326372658Smrg 624c3e29c03Smrg# AM_PROG_INSTALL_SH 625c3e29c03Smrg# ------------------ 626c3e29c03Smrg# Define $install_sh. 627c3e29c03SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 628c3e29c03Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629c3e29c03Smrgif test x"${install_sh+set}" != xset; then 630c3e29c03Smrg case $am_aux_dir in 631c3e29c03Smrg *\ * | *\ *) 632c3e29c03Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633c3e29c03Smrg *) 634c3e29c03Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 635c3e29c03Smrg esac 636c3e29c03Smrgfi 637c3e29c03SmrgAC_SUBST([install_sh])]) 6384b0ead49Smrg 639c3e29c03Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 640c3e29c03Smrg# 641c3e29c03Smrg# This file is free software; the Free Software Foundation 642c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 643c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 6444b0ead49Smrg 645c3e29c03Smrg# Check whether the underlying file-system supports filenames 646c3e29c03Smrg# with a leading dot. For instance MS-DOS doesn't. 647c3e29c03SmrgAC_DEFUN([AM_SET_LEADING_DOT], 648c3e29c03Smrg[rm -rf .tst 2>/dev/null 649c3e29c03Smrgmkdir .tst 2>/dev/null 650c3e29c03Smrgif test -d .tst; then 651c3e29c03Smrg am__leading_dot=. 652c3e29c03Smrgelse 653c3e29c03Smrg am__leading_dot=_ 654c3e29c03Smrgfi 655c3e29c03Smrgrmdir .tst 2>/dev/null 656c3e29c03SmrgAC_SUBST([am__leading_dot])]) 6574e7590efSmrg 658c3e29c03Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6594b0ead49Smrg 660c3e29c03Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661c3e29c03Smrg# 662c3e29c03Smrg# This file is free software; the Free Software Foundation 663c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 664c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 6654b0ead49Smrg 666c3e29c03Smrg# AM_MAKE_INCLUDE() 667c3e29c03Smrg# ----------------- 668c3e29c03Smrg# Check whether make has an 'include' directive that can support all 669c3e29c03Smrg# the idioms we need for our automatic dependency tracking code. 670c3e29c03SmrgAC_DEFUN([AM_MAKE_INCLUDE], 671c3e29c03Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672c3e29c03Smrgcat > confinc.mk << 'END' 673c3e29c03Smrgam__doit: 674c3e29c03Smrg @echo this is the am__doit target >confinc.out 675c3e29c03Smrg.PHONY: am__doit 676c3e29c03SmrgEND 677c3e29c03Smrgam__include="#" 678c3e29c03Smrgam__quote= 679c3e29c03Smrg# BSD make does it like this. 680c3e29c03Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 681c3e29c03Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682c3e29c03Smrgecho 'include confinc.mk # ignored' > confmf.GNU 683c3e29c03Smrg_am_result=no 684c3e29c03Smrgfor s in GNU BSD; do 685c3e29c03Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686c3e29c03Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687c3e29c03Smrg ['0:this is the am__doit target'], 688c3e29c03Smrg [AS_CASE([$s], 689c3e29c03Smrg [BSD], [am__include='.include' am__quote='"'], 690c3e29c03Smrg [am__include='include' am__quote=''])]) 691c3e29c03Smrg if test "$am__include" != "#"; then 692c3e29c03Smrg _am_result="yes ($s style)" 693c3e29c03Smrg break 694c3e29c03Smrg fi 695c3e29c03Smrgdone 696c3e29c03Smrgrm -f confinc.* confmf.* 697c3e29c03SmrgAC_MSG_RESULT([${_am_result}]) 698c3e29c03SmrgAC_SUBST([am__include])]) 699c3e29c03SmrgAC_SUBST([am__quote])]) 7004b0ead49Smrg 701c3e29c03Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7024b0ead49Smrg 703c3e29c03Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704c3e29c03Smrg# 705c3e29c03Smrg# This file is free software; the Free Software Foundation 706c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 707c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 7084b0ead49Smrg 709c3e29c03Smrg# AM_MISSING_PROG(NAME, PROGRAM) 710c3e29c03Smrg# ------------------------------ 711c3e29c03SmrgAC_DEFUN([AM_MISSING_PROG], 712c3e29c03Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713c3e29c03Smrg$1=${$1-"${am_missing_run}$2"} 714c3e29c03SmrgAC_SUBST($1)]) 715c3e29c03Smrg 716c3e29c03Smrg# AM_MISSING_HAS_RUN 717c3e29c03Smrg# ------------------ 718c3e29c03Smrg# Define MISSING if not defined so far and test if it is modern enough. 719c3e29c03Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 720c3e29c03SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 721c3e29c03Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722c3e29c03SmrgAC_REQUIRE_AUX_FILE([missing])dnl 723c3e29c03Smrgif test x"${MISSING+set}" != xset; then 724c3e29c03Smrg MISSING="\${SHELL} '$am_aux_dir/missing'" 725c3e29c03Smrgfi 726c3e29c03Smrg# Use eval to expand $SHELL 727c3e29c03Smrgif eval "$MISSING --is-lightweight"; then 728c3e29c03Smrg am_missing_run="$MISSING " 729c3e29c03Smrgelse 730c3e29c03Smrg am_missing_run= 731c3e29c03Smrg AC_MSG_WARN(['missing' script is too old or missing]) 732c3e29c03Smrgfi 733c3e29c03Smrg]) 7344b0ead49Smrg 735c3e29c03Smrg# Helper functions for option handling. -*- Autoconf -*- 7364b0ead49Smrg 737c3e29c03Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738c3e29c03Smrg# 739c3e29c03Smrg# This file is free software; the Free Software Foundation 740c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 741c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 7424b0ead49Smrg 743c3e29c03Smrg# _AM_MANGLE_OPTION(NAME) 744c3e29c03Smrg# ----------------------- 745c3e29c03SmrgAC_DEFUN([_AM_MANGLE_OPTION], 746c3e29c03Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7474b0ead49Smrg 748c3e29c03Smrg# _AM_SET_OPTION(NAME) 749c3e29c03Smrg# -------------------- 750c3e29c03Smrg# Set option NAME. Presently that only means defining a flag for this option. 751c3e29c03SmrgAC_DEFUN([_AM_SET_OPTION], 752c3e29c03Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 7534b0ead49Smrg 754c3e29c03Smrg# _AM_SET_OPTIONS(OPTIONS) 755c3e29c03Smrg# ------------------------ 756c3e29c03Smrg# OPTIONS is a space-separated list of Automake options. 757c3e29c03SmrgAC_DEFUN([_AM_SET_OPTIONS], 758c3e29c03Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7594b0ead49Smrg 760c3e29c03Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761c3e29c03Smrg# ------------------------------------------- 762c3e29c03Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763c3e29c03SmrgAC_DEFUN([_AM_IF_OPTION], 764c3e29c03Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7654b0ead49Smrg 766c3e29c03Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 767c3e29c03Smrg# 768c3e29c03Smrg# This file is free software; the Free Software Foundation 769c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 770c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 7714b0ead49Smrg 772c3e29c03Smrg# _AM_PROG_CC_C_O 773c3e29c03Smrg# --------------- 774c3e29c03Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 775c3e29c03Smrg# to automatically call this. 776c3e29c03SmrgAC_DEFUN([_AM_PROG_CC_C_O], 777c3e29c03Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778c3e29c03SmrgAC_REQUIRE_AUX_FILE([compile])dnl 779c3e29c03SmrgAC_LANG_PUSH([C])dnl 780c3e29c03SmrgAC_CACHE_CHECK( 781c3e29c03Smrg [whether $CC understands -c and -o together], 782c3e29c03Smrg [am_cv_prog_cc_c_o], 783c3e29c03Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 784c3e29c03Smrg # Make sure it works both with $CC and with simple cc. 785c3e29c03Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 786c3e29c03Smrg # compilers refuse to overwrite an existing .o file with -o, 787c3e29c03Smrg # though they will create one. 788c3e29c03Smrg am_cv_prog_cc_c_o=yes 789c3e29c03Smrg for am_i in 1 2; do 790c3e29c03Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 791c3e29c03Smrg && test -f conftest2.$ac_objext; then 792c3e29c03Smrg : OK 793c3e29c03Smrg else 794c3e29c03Smrg am_cv_prog_cc_c_o=no 795c3e29c03Smrg break 796c3e29c03Smrg fi 797c3e29c03Smrg done 798c3e29c03Smrg rm -f core conftest* 799c3e29c03Smrg unset am_i]) 800c3e29c03Smrgif test "$am_cv_prog_cc_c_o" != yes; then 801c3e29c03Smrg # Losing compiler, so override with the script. 802c3e29c03Smrg # FIXME: It is wrong to rewrite CC. 803c3e29c03Smrg # But if we don't then we get into trouble of one sort or another. 804c3e29c03Smrg # A longer-term fix would be to have automake use am__CC in this case, 805c3e29c03Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 806c3e29c03Smrg CC="$am_aux_dir/compile $CC" 807c3e29c03Smrgfi 808c3e29c03SmrgAC_LANG_POP([C])]) 8094b0ead49Smrg 810c3e29c03Smrg# For backward compatibility. 811c3e29c03SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 81226372658Smrg 813c3e29c03Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 81452b01e16Smrg# 815c3e29c03Smrg# This file is free software; the Free Software Foundation 816c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 817c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 8184b0ead49Smrg 819c3e29c03Smrg# AM_RUN_LOG(COMMAND) 820c3e29c03Smrg# ------------------- 821c3e29c03Smrg# Run COMMAND, save the exit status in ac_status, and log it. 822c3e29c03Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 823c3e29c03SmrgAC_DEFUN([AM_RUN_LOG], 824c3e29c03Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 825c3e29c03Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 826c3e29c03Smrg ac_status=$? 827c3e29c03Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 828c3e29c03Smrg (exit $ac_status); }]) 8294b0ead49Smrg 830c3e29c03Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8314b0ead49Smrg 832c3e29c03Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 83352b01e16Smrg# 834c3e29c03Smrg# This file is free software; the Free Software Foundation 835c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 836c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 8374b0ead49Smrg 838c3e29c03Smrg# AM_SANITY_CHECK 839c3e29c03Smrg# --------------- 840c3e29c03SmrgAC_DEFUN([AM_SANITY_CHECK], 841c3e29c03Smrg[AC_MSG_CHECKING([whether build environment is sane]) 842c3e29c03Smrg# Reject unsafe characters in $srcdir or the absolute working directory 843c3e29c03Smrg# name. Accept space and tab only in the latter. 844c3e29c03Smrgam_lf=' 845c3e29c03Smrg' 846c3e29c03Smrgcase `pwd` in 847c3e29c03Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 848c3e29c03Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 849c3e29c03Smrgesac 850c3e29c03Smrgcase $srcdir in 851c3e29c03Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 852c3e29c03Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853c3e29c03Smrgesac 8544b0ead49Smrg 855c3e29c03Smrg# Do 'set' in a subshell so we don't clobber the current shell's 856c3e29c03Smrg# arguments. Must try -L first in case configure is actually a 857c3e29c03Smrg# symlink; some systems play weird games with the mod time of symlinks 858c3e29c03Smrg# (eg FreeBSD returns the mod time of the symlink's containing 859c3e29c03Smrg# directory). 860c3e29c03Smrgif ( 861c3e29c03Smrg am_has_slept=no 862c3e29c03Smrg for am_try in 1 2; do 863c3e29c03Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 864c3e29c03Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 865c3e29c03Smrg if test "$[*]" = "X"; then 866c3e29c03Smrg # -L didn't work. 867c3e29c03Smrg set X `ls -t "$srcdir/configure" conftest.file` 868c3e29c03Smrg fi 869c3e29c03Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 870c3e29c03Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8714b0ead49Smrg 872c3e29c03Smrg # If neither matched, then we have a broken ls. This can happen 873c3e29c03Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 874c3e29c03Smrg # broken ls alias from the environment. This has actually 875c3e29c03Smrg # happened. Such a system could not be considered "sane". 876c3e29c03Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 877c3e29c03Smrg alias in your environment]) 878c3e29c03Smrg fi 879c3e29c03Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 880c3e29c03Smrg break 881c3e29c03Smrg fi 882c3e29c03Smrg # Just in case. 883c3e29c03Smrg sleep 1 884c3e29c03Smrg am_has_slept=yes 885c3e29c03Smrg done 886c3e29c03Smrg test "$[2]" = conftest.file 887c3e29c03Smrg ) 888c3e29c03Smrgthen 889c3e29c03Smrg # Ok. 890c3e29c03Smrg : 891c3e29c03Smrgelse 892c3e29c03Smrg AC_MSG_ERROR([newly created file is older than distributed files! 893c3e29c03SmrgCheck your system clock]) 894c3e29c03Smrgfi 895c3e29c03SmrgAC_MSG_RESULT([yes]) 896c3e29c03Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 897c3e29c03Smrg# generated files are strictly newer. 898c3e29c03Smrgam_sleep_pid= 899c3e29c03Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 900c3e29c03Smrg ( sleep 1 ) & 901c3e29c03Smrg am_sleep_pid=$! 902c3e29c03Smrgfi 903c3e29c03SmrgAC_CONFIG_COMMANDS_PRE( 904c3e29c03Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 905c3e29c03Smrg if test -n "$am_sleep_pid"; then 906c3e29c03Smrg # Hide warnings about reused PIDs. 907c3e29c03Smrg wait $am_sleep_pid 2>/dev/null 908c3e29c03Smrg fi 909c3e29c03Smrg AC_MSG_RESULT([done])]) 910c3e29c03Smrgrm -f conftest.file 911c3e29c03Smrg]) 9124b0ead49Smrg 913c3e29c03Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914c3e29c03Smrg# 915c3e29c03Smrg# This file is free software; the Free Software Foundation 916c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 917c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 91852b01e16Smrg 919c3e29c03Smrg# AM_SILENT_RULES([DEFAULT]) 920c3e29c03Smrg# -------------------------- 921c3e29c03Smrg# Enable less verbose build rules; with the default set to DEFAULT 922c3e29c03Smrg# ("yes" being less verbose, "no" or empty being verbose). 923c3e29c03SmrgAC_DEFUN([AM_SILENT_RULES], 924c3e29c03Smrg[AC_ARG_ENABLE([silent-rules], [dnl 925c3e29c03SmrgAS_HELP_STRING( 926c3e29c03Smrg [--enable-silent-rules], 927c3e29c03Smrg [less verbose build output (undo: "make V=1")]) 928c3e29c03SmrgAS_HELP_STRING( 929c3e29c03Smrg [--disable-silent-rules], 930c3e29c03Smrg [verbose build output (undo: "make V=0")])dnl 931c3e29c03Smrg]) 932c3e29c03Smrgcase $enable_silent_rules in @%:@ ((( 933c3e29c03Smrg yes) AM_DEFAULT_VERBOSITY=0;; 934c3e29c03Smrg no) AM_DEFAULT_VERBOSITY=1;; 935c3e29c03Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936c3e29c03Smrgesac 937c3e29c03Smrgdnl 938c3e29c03Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 939c3e29c03Smrgdnl do not support nested variable expansions. 940c3e29c03Smrgdnl See automake bug#9928 and bug#10237. 941c3e29c03Smrgam_make=${MAKE-make} 942c3e29c03SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 943c3e29c03Smrg [am_cv_make_support_nested_variables], 944c3e29c03Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 945c3e29c03SmrgBAR0=false 946c3e29c03SmrgBAR1=true 947c3e29c03SmrgV=1 948c3e29c03Smrgam__doit: 949c3e29c03Smrg @$(TRUE) 950c3e29c03Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 951c3e29c03Smrg am_cv_make_support_nested_variables=yes 952c3e29c03Smrgelse 953c3e29c03Smrg am_cv_make_support_nested_variables=no 954c3e29c03Smrgfi]) 955c3e29c03Smrgif test $am_cv_make_support_nested_variables = yes; then 956c3e29c03Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 957c3e29c03Smrg AM_V='$(V)' 958c3e29c03Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 959c3e29c03Smrgelse 960c3e29c03Smrg AM_V=$AM_DEFAULT_VERBOSITY 961c3e29c03Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 962c3e29c03Smrgfi 963c3e29c03SmrgAC_SUBST([AM_V])dnl 964c3e29c03SmrgAM_SUBST_NOTMAKE([AM_V])dnl 965c3e29c03SmrgAC_SUBST([AM_DEFAULT_V])dnl 966c3e29c03SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967c3e29c03SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968c3e29c03SmrgAM_BACKSLASH='\' 969c3e29c03SmrgAC_SUBST([AM_BACKSLASH])dnl 970c3e29c03Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 971c3e29c03Smrg]) 9724b0ead49Smrg 973c3e29c03Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974c3e29c03Smrg# 975c3e29c03Smrg# This file is free software; the Free Software Foundation 976c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 977c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 9784b0ead49Smrg 979c3e29c03Smrg# AM_PROG_INSTALL_STRIP 980c3e29c03Smrg# --------------------- 981c3e29c03Smrg# One issue with vendor 'install' (even GNU) is that you can't 982c3e29c03Smrg# specify the program used to strip binaries. This is especially 983c3e29c03Smrg# annoying in cross-compiling environments, where the build's strip 984c3e29c03Smrg# is unlikely to handle the host's binaries. 985c3e29c03Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 986c3e29c03Smrg# always use install-sh in "make install-strip", and initialize 987c3e29c03Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 988c3e29c03SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 989c3e29c03Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 990c3e29c03Smrg# Installed binaries are usually stripped using 'strip' when the user 991c3e29c03Smrg# run "make install-strip". However 'strip' might not be the right 992c3e29c03Smrg# tool to use in cross-compilation environments, therefore Automake 993c3e29c03Smrg# will honor the 'STRIP' environment variable to overrule this program. 994c3e29c03Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995c3e29c03Smrgif test "$cross_compiling" != no; then 996c3e29c03Smrg AC_CHECK_TOOL([STRIP], [strip], :) 997c3e29c03Smrgfi 998c3e29c03SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999c3e29c03SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10004b0ead49Smrg 1001c3e29c03Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002c3e29c03Smrg# 1003c3e29c03Smrg# This file is free software; the Free Software Foundation 1004c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 1005c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 10064b0ead49Smrg 1007c3e29c03Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1008c3e29c03Smrg# --------------------------- 1009c3e29c03Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010c3e29c03Smrg# This macro is traced by Automake. 1011c3e29c03SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10124b0ead49Smrg 1013c3e29c03Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1014c3e29c03Smrg# -------------------------- 1015c3e29c03Smrg# Public sister of _AM_SUBST_NOTMAKE. 1016c3e29c03SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10174b0ead49Smrg 1018c3e29c03Smrg# Check how to create a tarball. -*- Autoconf -*- 10194b0ead49Smrg 1020c3e29c03Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021c3e29c03Smrg# 1022c3e29c03Smrg# This file is free software; the Free Software Foundation 1023c3e29c03Smrg# gives unlimited permission to copy and/or distribute it, 1024c3e29c03Smrg# with or without modifications, as long as this notice is preserved. 10254b0ead49Smrg 1026c3e29c03Smrg# _AM_PROG_TAR(FORMAT) 1027c3e29c03Smrg# -------------------- 1028c3e29c03Smrg# Check how to create a tarball in format FORMAT. 1029c3e29c03Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030c3e29c03Smrg# 1031c3e29c03Smrg# Substitute a variable $(am__tar) that is a command 1032c3e29c03Smrg# writing to stdout a FORMAT-tarball containing the directory 1033c3e29c03Smrg# $tardir. 1034c3e29c03Smrg# tardir=directory && $(am__tar) > result.tar 1035c3e29c03Smrg# 1036c3e29c03Smrg# Substitute a variable $(am__untar) that extract such 1037c3e29c03Smrg# a tarball read from stdin. 1038c3e29c03Smrg# $(am__untar) < result.tar 1039c3e29c03Smrg# 1040c3e29c03SmrgAC_DEFUN([_AM_PROG_TAR], 1041c3e29c03Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1042c3e29c03Smrg# in the wild :-( We should find a proper way to deprecate it ... 1043c3e29c03SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 10444b0ead49Smrg 1045c3e29c03Smrg# We'll loop over all known methods to create a tar archive until one works. 1046c3e29c03Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10474b0ead49Smrg 1048c3e29c03Smrgm4_if([$1], [v7], 1049c3e29c03Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10504b0ead49Smrg 1051c3e29c03Smrg [m4_case([$1], 1052c3e29c03Smrg [ustar], 1053c3e29c03Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1054c3e29c03Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1055c3e29c03Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1056c3e29c03Smrg # and bug#13588). 1057c3e29c03Smrg am_max_uid=2097151 # 2^21 - 1 1058c3e29c03Smrg am_max_gid=$am_max_uid 1059c3e29c03Smrg # The $UID and $GID variables are not portable, so we need to resort 1060c3e29c03Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1061c3e29c03Smrg # below are definitely unexpected, so allow the users to see them 1062c3e29c03Smrg # (that is, avoid stderr redirection). 1063c3e29c03Smrg am_uid=`id -u || echo unknown` 1064c3e29c03Smrg am_gid=`id -g || echo unknown` 1065c3e29c03Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1066c3e29c03Smrg if test $am_uid -le $am_max_uid; then 1067c3e29c03Smrg AC_MSG_RESULT([yes]) 1068c3e29c03Smrg else 1069c3e29c03Smrg AC_MSG_RESULT([no]) 1070c3e29c03Smrg _am_tools=none 1071c3e29c03Smrg fi 1072c3e29c03Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1073c3e29c03Smrg if test $am_gid -le $am_max_gid; then 1074c3e29c03Smrg AC_MSG_RESULT([yes]) 1075c3e29c03Smrg else 1076c3e29c03Smrg AC_MSG_RESULT([no]) 1077c3e29c03Smrg _am_tools=none 1078c3e29c03Smrg fi], 10794b0ead49Smrg 1080c3e29c03Smrg [pax], 1081c3e29c03Smrg [], 10824b0ead49Smrg 1083c3e29c03Smrg [m4_fatal([Unknown tar format])]) 10844b0ead49Smrg 1085c3e29c03Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 108649dc963fSmrg 1087c3e29c03Smrg # Go ahead even if we have the value already cached. We do so because we 1088c3e29c03Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1089c3e29c03Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10904b0ead49Smrg 1091c3e29c03Smrg for _am_tool in $_am_tools; do 1092c3e29c03Smrg case $_am_tool in 1093c3e29c03Smrg gnutar) 1094c3e29c03Smrg for _am_tar in tar gnutar gtar; do 1095c3e29c03Smrg AM_RUN_LOG([$_am_tar --version]) && break 1096c3e29c03Smrg done 1097c3e29c03Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1098c3e29c03Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1099c3e29c03Smrg am__untar="$_am_tar -xf -" 1100c3e29c03Smrg ;; 1101c3e29c03Smrg plaintar) 1102c3e29c03Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1103c3e29c03Smrg # ustar tarball either. 1104c3e29c03Smrg (tar --version) >/dev/null 2>&1 && continue 1105c3e29c03Smrg am__tar='tar chf - "$$tardir"' 1106c3e29c03Smrg am__tar_='tar chf - "$tardir"' 1107c3e29c03Smrg am__untar='tar xf -' 1108c3e29c03Smrg ;; 1109c3e29c03Smrg pax) 1110c3e29c03Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1111c3e29c03Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1112c3e29c03Smrg am__untar='pax -r' 1113c3e29c03Smrg ;; 1114c3e29c03Smrg cpio) 1115c3e29c03Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1116c3e29c03Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1117c3e29c03Smrg am__untar='cpio -i -H $1 -d' 1118c3e29c03Smrg ;; 1119c3e29c03Smrg none) 1120c3e29c03Smrg am__tar=false 1121c3e29c03Smrg am__tar_=false 1122c3e29c03Smrg am__untar=false 1123c3e29c03Smrg ;; 1124c3e29c03Smrg esac 112549dc963fSmrg 1126c3e29c03Smrg # If the value was cached, stop now. We just wanted to have am__tar 1127c3e29c03Smrg # and am__untar set. 1128c3e29c03Smrg test -n "${am_cv_prog_tar_$1}" && break 112949dc963fSmrg 1130c3e29c03Smrg # tar/untar a dummy directory, and stop if the command works. 1131c3e29c03Smrg rm -rf conftest.dir 1132c3e29c03Smrg mkdir conftest.dir 1133c3e29c03Smrg echo GrepMe > conftest.dir/file 1134c3e29c03Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1135c3e29c03Smrg rm -rf conftest.dir 1136c3e29c03Smrg if test -s conftest.tar; then 1137c3e29c03Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1138c3e29c03Smrg AM_RUN_LOG([cat conftest.dir/file]) 1139c3e29c03Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1140c3e29c03Smrg fi 1141c3e29c03Smrg done 1142c3e29c03Smrg rm -rf conftest.dir 114349dc963fSmrg 1144c3e29c03Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1145c3e29c03Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11464b0ead49Smrg 1147c3e29c03SmrgAC_SUBST([am__tar]) 1148c3e29c03SmrgAC_SUBST([am__untar]) 1149c3e29c03Smrg]) # _AM_PROG_TAR 11504b0ead49Smrg 1151c3e29c03Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1152c3e29c03Smrgdnl serial 11 (pkg-config-0.29) 1153c3e29c03Smrgdnl 1154c3e29c03Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1155c3e29c03Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1156c3e29c03Smrgdnl 1157c3e29c03Smrgdnl This program is free software; you can redistribute it and/or modify 1158c3e29c03Smrgdnl it under the terms of the GNU General Public License as published by 1159c3e29c03Smrgdnl the Free Software Foundation; either version 2 of the License, or 1160c3e29c03Smrgdnl (at your option) any later version. 1161c3e29c03Smrgdnl 1162c3e29c03Smrgdnl This program is distributed in the hope that it will be useful, but 1163c3e29c03Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 1164c3e29c03Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1165c3e29c03Smrgdnl General Public License for more details. 1166c3e29c03Smrgdnl 1167c3e29c03Smrgdnl You should have received a copy of the GNU General Public License 1168c3e29c03Smrgdnl along with this program; if not, write to the Free Software 1169c3e29c03Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1170c3e29c03Smrgdnl 02111-1307, USA. 1171c3e29c03Smrgdnl 1172c3e29c03Smrgdnl As a special exception to the GNU General Public License, if you 1173c3e29c03Smrgdnl distribute this file as part of a program that contains a 1174c3e29c03Smrgdnl configuration script generated by Autoconf, you may include it under 1175c3e29c03Smrgdnl the same distribution terms that you use for the rest of that 1176c3e29c03Smrgdnl program. 11774b0ead49Smrg 1178c3e29c03Smrgdnl PKG_PREREQ(MIN-VERSION) 1179c3e29c03Smrgdnl ----------------------- 1180c3e29c03Smrgdnl Since: 0.29 1181c3e29c03Smrgdnl 1182c3e29c03Smrgdnl Verify that the version of the pkg-config macros are at least 1183c3e29c03Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1184c3e29c03Smrgdnl installed version of pkg-config, this checks the developer's version 1185c3e29c03Smrgdnl of pkg.m4 when generating configure. 1186c3e29c03Smrgdnl 1187c3e29c03Smrgdnl To ensure that this macro is defined, also add: 1188c3e29c03Smrgdnl m4_ifndef([PKG_PREREQ], 1189c3e29c03Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1190c3e29c03Smrgdnl 1191c3e29c03Smrgdnl See the "Since" comment for each macro you use to see what version 1192c3e29c03Smrgdnl of the macros you require. 1193c3e29c03Smrgm4_defun([PKG_PREREQ], 1194c3e29c03Smrg[m4_define([PKG_MACROS_VERSION], [0.29]) 1195c3e29c03Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1196c3e29c03Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1197c3e29c03Smrg])dnl PKG_PREREQ 11984b0ead49Smrg 1199c3e29c03Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1200c3e29c03Smrgdnl ---------------------------------- 1201c3e29c03Smrgdnl Since: 0.16 1202c3e29c03Smrgdnl 1203c3e29c03Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1204c3e29c03Smrgdnl first found in the path. Checks that the version of pkg-config found 1205c3e29c03Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1206c3e29c03Smrgdnl used since that's the first version where most current features of 1207c3e29c03Smrgdnl pkg-config existed. 1208c3e29c03SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1209c3e29c03Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1210c3e29c03Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1211c3e29c03Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1212c3e29c03SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1213c3e29c03SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1214c3e29c03SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 12154b0ead49Smrg 1216c3e29c03Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1217c3e29c03Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1218c3e29c03Smrgfi 1219c3e29c03Smrgif test -n "$PKG_CONFIG"; then 1220c3e29c03Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 1221c3e29c03Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1222c3e29c03Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1223c3e29c03Smrg AC_MSG_RESULT([yes]) 1224c3e29c03Smrg else 1225c3e29c03Smrg AC_MSG_RESULT([no]) 1226c3e29c03Smrg PKG_CONFIG="" 1227c3e29c03Smrg fi 1228c3e29c03Smrgfi[]dnl 1229c3e29c03Smrg])dnl PKG_PROG_PKG_CONFIG 12304b0ead49Smrg 1231c3e29c03Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1232c3e29c03Smrgdnl ------------------------------------------------------------------- 1233c3e29c03Smrgdnl Since: 0.18 1234c3e29c03Smrgdnl 1235c3e29c03Smrgdnl Check to see whether a particular set of modules exists. Similar to 1236c3e29c03Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1237c3e29c03Smrgdnl 1238c3e29c03Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1239c3e29c03Smrgdnl only at the first occurence in configure.ac, so if the first place 1240c3e29c03Smrgdnl it's called might be skipped (such as if it is within an "if", you 1241c3e29c03Smrgdnl have to call PKG_CHECK_EXISTS manually 1242c3e29c03SmrgAC_DEFUN([PKG_CHECK_EXISTS], 1243c3e29c03Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1244c3e29c03Smrgif test -n "$PKG_CONFIG" && \ 1245c3e29c03Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1246c3e29c03Smrg m4_default([$2], [:]) 1247c3e29c03Smrgm4_ifvaln([$3], [else 1248c3e29c03Smrg $3])dnl 1249c3e29c03Smrgfi]) 12504b0ead49Smrg 1251c3e29c03Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1252c3e29c03Smrgdnl --------------------------------------------- 1253c3e29c03Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1254c3e29c03Smrgdnl pkg_failed based on the result. 1255c3e29c03Smrgm4_define([_PKG_CONFIG], 1256c3e29c03Smrg[if test -n "$$1"; then 1257c3e29c03Smrg pkg_cv_[]$1="$$1" 1258c3e29c03Smrg elif test -n "$PKG_CONFIG"; then 1259c3e29c03Smrg PKG_CHECK_EXISTS([$3], 1260c3e29c03Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1261c3e29c03Smrg test "x$?" != "x0" && pkg_failed=yes ], 1262c3e29c03Smrg [pkg_failed=yes]) 1263c3e29c03Smrg else 1264c3e29c03Smrg pkg_failed=untried 1265c3e29c03Smrgfi[]dnl 1266c3e29c03Smrg])dnl _PKG_CONFIG 12674b0ead49Smrg 1268c3e29c03Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 1269c3e29c03Smrgdnl --------------------------- 1270c3e29c03Smrgdnl Internal check to see if pkg-config supports short errors. 1271c3e29c03SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1272c3e29c03Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1273c3e29c03Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1274c3e29c03Smrg _pkg_short_errors_supported=yes 1275c3e29c03Smrgelse 1276c3e29c03Smrg _pkg_short_errors_supported=no 1277c3e29c03Smrgfi[]dnl 1278c3e29c03Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 12794b0ead49Smrg 12804b0ead49Smrg 1281c3e29c03Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1282c3e29c03Smrgdnl [ACTION-IF-NOT-FOUND]) 1283c3e29c03Smrgdnl -------------------------------------------------------------- 1284c3e29c03Smrgdnl Since: 0.4.0 1285c3e29c03Smrgdnl 1286c3e29c03Smrgdnl Note that if there is a possibility the first call to 1287c3e29c03Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1288c3e29c03Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1289c3e29c03SmrgAC_DEFUN([PKG_CHECK_MODULES], 1290c3e29c03Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1291c3e29c03SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1292c3e29c03SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 12934b0ead49Smrg 1294c3e29c03Smrgpkg_failed=no 1295c3e29c03SmrgAC_MSG_CHECKING([for $1]) 12964b0ead49Smrg 1297c3e29c03Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1298c3e29c03Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 129949dc963fSmrg 1300c3e29c03Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1301c3e29c03Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1302c3e29c03SmrgSee the pkg-config man page for more details.]) 13037aa89044Smrg 1304c3e29c03Smrgif test $pkg_failed = yes; then 1305c3e29c03Smrg AC_MSG_RESULT([no]) 1306c3e29c03Smrg _PKG_SHORT_ERRORS_SUPPORTED 1307c3e29c03Smrg if test $_pkg_short_errors_supported = yes; then 1308c3e29c03Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1309c3e29c03Smrg else 1310c3e29c03Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1311c3e29c03Smrg fi 1312c3e29c03Smrg # Put the nasty error message in config.log where it belongs 1313c3e29c03Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 13147aa89044Smrg 1315c3e29c03Smrg m4_default([$4], [AC_MSG_ERROR( 1316c3e29c03Smrg[Package requirements ($2) were not met: 131749dc963fSmrg 1318c3e29c03Smrg$$1_PKG_ERRORS 131949dc963fSmrg 1320c3e29c03SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1321c3e29c03Smrginstalled software in a non-standard prefix. 132249dc963fSmrg 1323c3e29c03Smrg_PKG_TEXT])[]dnl 1324c3e29c03Smrg ]) 1325c3e29c03Smrgelif test $pkg_failed = untried; then 1326c3e29c03Smrg AC_MSG_RESULT([no]) 1327c3e29c03Smrg m4_default([$4], [AC_MSG_FAILURE( 1328c3e29c03Smrg[The pkg-config script could not be found or is too old. Make sure it 1329c3e29c03Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1330c3e29c03Smrgpath to pkg-config. 133149dc963fSmrg 1332c3e29c03Smrg_PKG_TEXT 133349dc963fSmrg 1334c3e29c03SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1335c3e29c03Smrg ]) 1336c3e29c03Smrgelse 1337c3e29c03Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1338c3e29c03Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1339c3e29c03Smrg AC_MSG_RESULT([yes]) 1340c3e29c03Smrg $3 1341c3e29c03Smrgfi[]dnl 1342c3e29c03Smrg])dnl PKG_CHECK_MODULES 13437aa89044Smrg 13447aa89044Smrg 1345c3e29c03Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1346c3e29c03Smrgdnl [ACTION-IF-NOT-FOUND]) 1347c3e29c03Smrgdnl --------------------------------------------------------------------- 1348c3e29c03Smrgdnl Since: 0.29 1349c3e29c03Smrgdnl 1350c3e29c03Smrgdnl Checks for existence of MODULES and gathers its build flags with 1351c3e29c03Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1352c3e29c03Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 1353c3e29c03Smrgdnl 1354c3e29c03Smrgdnl Note that if there is a possibility the first call to 1355c3e29c03Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1356c3e29c03Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1357c3e29c03Smrgdnl configure.ac. 1358c3e29c03SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 1359c3e29c03Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1360c3e29c03Smrg_save_PKG_CONFIG=$PKG_CONFIG 1361c3e29c03SmrgPKG_CONFIG="$PKG_CONFIG --static" 1362c3e29c03SmrgPKG_CHECK_MODULES($@) 1363c3e29c03SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 1364c3e29c03Smrg])dnl PKG_CHECK_MODULES_STATIC 13657aa89044Smrg 136649dc963fSmrg 1367c3e29c03Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 1368c3e29c03Smrgdnl ------------------------- 1369c3e29c03Smrgdnl Since: 0.27 1370c3e29c03Smrgdnl 1371c3e29c03Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 1372c3e29c03Smrgdnl should install pkg-config .pc files. By default the directory is 1373c3e29c03Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 1374c3e29c03Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 1375c3e29c03Smrgdnl parameter. 1376c3e29c03SmrgAC_DEFUN([PKG_INSTALLDIR], 1377c3e29c03Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1378c3e29c03Smrgm4_pushdef([pkg_description], 1379c3e29c03Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 1380c3e29c03SmrgAC_ARG_WITH([pkgconfigdir], 1381c3e29c03Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1382c3e29c03Smrg [with_pkgconfigdir=]pkg_default) 1383c3e29c03SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1384c3e29c03Smrgm4_popdef([pkg_default]) 1385c3e29c03Smrgm4_popdef([pkg_description]) 1386c3e29c03Smrg])dnl PKG_INSTALLDIR 138749dc963fSmrg 138849dc963fSmrg 1389c3e29c03Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1390c3e29c03Smrgdnl -------------------------------- 1391c3e29c03Smrgdnl Since: 0.27 1392c3e29c03Smrgdnl 1393c3e29c03Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 1394c3e29c03Smrgdnl module should install arch-independent pkg-config .pc files. By 1395c3e29c03Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 1396c3e29c03Smrgdnl changed by passing DIRECTORY. The user can override through the 1397c3e29c03Smrgdnl --with-noarch-pkgconfigdir parameter. 1398c3e29c03SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 1399c3e29c03Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1400c3e29c03Smrgm4_pushdef([pkg_description], 1401c3e29c03Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1402c3e29c03SmrgAC_ARG_WITH([noarch-pkgconfigdir], 1403c3e29c03Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1404c3e29c03Smrg [with_noarch_pkgconfigdir=]pkg_default) 1405c3e29c03SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1406c3e29c03Smrgm4_popdef([pkg_default]) 1407c3e29c03Smrgm4_popdef([pkg_description]) 1408c3e29c03Smrg])dnl PKG_NOARCH_INSTALLDIR 140949dc963fSmrg 141049dc963fSmrg 1411c3e29c03Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1412c3e29c03Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1413c3e29c03Smrgdnl ------------------------------------------- 1414c3e29c03Smrgdnl Since: 0.28 1415c3e29c03Smrgdnl 1416c3e29c03Smrgdnl Retrieves the value of the pkg-config variable for the given module. 1417c3e29c03SmrgAC_DEFUN([PKG_CHECK_VAR], 1418c3e29c03Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1419c3e29c03SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 142049dc963fSmrg 1421c3e29c03Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1422c3e29c03SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 14234b0ead49Smrg 1424c3e29c03SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 1425c3e29c03Smrg])dnl PKG_CHECK_VAR 14264b0ead49Smrg 1427c3e29c03Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1428c3e29c03Smrgdnl 1429c3e29c03Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 1430c3e29c03Smrgdnl 1431c3e29c03Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1432c3e29c03Smrgdnl copy of this software and associated documentation files (the "Software"), 1433c3e29c03Smrgdnl to deal in the Software without restriction, including without limitation 1434c3e29c03Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1435c3e29c03Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1436c3e29c03Smrgdnl Software is furnished to do so, subject to the following conditions: 1437c3e29c03Smrgdnl 1438c3e29c03Smrgdnl The above copyright notice and this permission notice (including the next 1439c3e29c03Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1440c3e29c03Smrgdnl Software. 1441c3e29c03Smrgdnl 1442c3e29c03Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1443c3e29c03Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1444c3e29c03Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1445c3e29c03Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1446c3e29c03Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1447c3e29c03Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1448c3e29c03Smrgdnl DEALINGS IN THE SOFTWARE. 14494b0ead49Smrg 1450c3e29c03Smrg# XORG_MACROS_VERSION(required-version) 1451c3e29c03Smrg# ------------------------------------- 1452c3e29c03Smrg# Minimum version: 1.1.0 1453c3e29c03Smrg# 1454c3e29c03Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1455c3e29c03Smrg# your configure.ac with the minimum required version, such as: 1456c3e29c03Smrg# XORG_MACROS_VERSION(1.1) 1457c3e29c03Smrg# 1458c3e29c03Smrg# To ensure that this macro is defined, also add: 1459c3e29c03Smrg# m4_ifndef([XORG_MACROS_VERSION], 1460c3e29c03Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1461c3e29c03Smrg# 1462c3e29c03Smrg# 1463c3e29c03Smrg# See the "minimum version" comment for each macro you use to see what 1464c3e29c03Smrg# version you require. 1465c3e29c03Smrgm4_defun([XORG_MACROS_VERSION],[ 1466c3e29c03Smrgm4_define([vers_have], [1.19.3]) 1467c3e29c03Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1468c3e29c03Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1469c3e29c03Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1470c3e29c03Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1471c3e29c03Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1472c3e29c03Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1473c3e29c03Smrgm4_undefine([vers_have]) 1474c3e29c03Smrgm4_undefine([maj_have]) 1475c3e29c03Smrgm4_undefine([maj_needed]) 1476c3e29c03Smrg]) # XORG_MACROS_VERSION 14774b0ead49Smrg 1478c3e29c03Smrg# XORG_PROG_RAWCPP() 1479c3e29c03Smrg# ------------------ 1480c3e29c03Smrg# Minimum version: 1.0.0 1481c3e29c03Smrg# 1482c3e29c03Smrg# Find cpp program and necessary flags for use in pre-processing text files 1483c3e29c03Smrg# such as man pages and config files 1484c3e29c03SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1485c3e29c03SmrgAC_REQUIRE([AC_PROG_CPP]) 1486c3e29c03SmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1487c3e29c03Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 148852b01e16Smrg 1489c3e29c03Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1490c3e29c03Smrg# which is not the best choice for supporting other OS'es, but covers most 1491c3e29c03Smrg# of the ones we need for now. 1492c3e29c03SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1493c3e29c03SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1494c3e29c03Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1495c3e29c03Smrg AC_MSG_RESULT([no]) 1496c3e29c03Smrgelse 1497c3e29c03Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1498c3e29c03Smrg RAWCPPFLAGS=-undef 1499c3e29c03Smrg AC_MSG_RESULT([yes]) 1500c3e29c03Smrg # under Cygwin unix is still defined even with -undef 1501c3e29c03Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1502c3e29c03Smrg RAWCPPFLAGS="-undef -ansi" 1503c3e29c03Smrg AC_MSG_RESULT([yes, with -ansi]) 1504c3e29c03Smrg else 1505c3e29c03Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1506c3e29c03Smrg fi 1507c3e29c03Smrgfi 1508c3e29c03Smrgrm -f conftest.$ac_ext 150949dc963fSmrg 1510c3e29c03SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1511c3e29c03SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1512c3e29c03Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1513c3e29c03Smrg AC_MSG_RESULT([no]) 1514c3e29c03Smrgelse 1515c3e29c03Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1516c3e29c03Smrg TRADITIONALCPPFLAGS="-traditional" 1517c3e29c03Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1518c3e29c03Smrg AC_MSG_RESULT([yes]) 1519c3e29c03Smrg else 1520c3e29c03Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1521c3e29c03Smrg fi 1522c3e29c03Smrgfi 1523c3e29c03Smrgrm -f conftest.$ac_ext 1524c3e29c03SmrgAC_SUBST(RAWCPPFLAGS) 1525c3e29c03SmrgAC_SUBST(TRADITIONALCPPFLAGS) 1526c3e29c03Smrg]) # XORG_PROG_RAWCPP 152749dc963fSmrg 1528c3e29c03Smrg# XORG_MANPAGE_SECTIONS() 1529c3e29c03Smrg# ----------------------- 1530c3e29c03Smrg# Minimum version: 1.0.0 1531c3e29c03Smrg# 1532c3e29c03Smrg# Determine which sections man pages go in for the different man page types 1533c3e29c03Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1534c3e29c03Smrg# Not sure if there's any better way than just hardcoding by OS name. 1535c3e29c03Smrg# Override default settings by setting environment variables 1536c3e29c03Smrg# Added MAN_SUBSTS in version 1.8 1537c3e29c03Smrg# Added AC_PROG_SED in version 1.8 153849dc963fSmrg 1539c3e29c03SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1540c3e29c03SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1541c3e29c03SmrgAC_REQUIRE([AC_PROG_SED]) 15424b0ead49Smrg 1543c3e29c03Smrgcase $host_os in 1544c3e29c03Smrg solaris*) 1545c3e29c03Smrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1546c3e29c03Smrg # check for a man page file found in later versions that use 1547c3e29c03Smrg # traditional section numbers instead 1548c3e29c03Smrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1549c3e29c03Smrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1550c3e29c03Smrg ;; 1551c3e29c03Smrg *) SYSV_MAN_SECTIONS=false ;; 1552c3e29c03Smrgesac 15534b0ead49Smrg 1554c3e29c03Smrgif test x$APP_MAN_SUFFIX = x ; then 1555c3e29c03Smrg APP_MAN_SUFFIX=1 1556c3e29c03Smrgfi 1557c3e29c03Smrgif test x$APP_MAN_DIR = x ; then 1558c3e29c03Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1559c3e29c03Smrgfi 15604b0ead49Smrg 1561c3e29c03Smrgif test x$LIB_MAN_SUFFIX = x ; then 1562c3e29c03Smrg LIB_MAN_SUFFIX=3 1563c3e29c03Smrgfi 1564c3e29c03Smrgif test x$LIB_MAN_DIR = x ; then 1565c3e29c03Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1566c3e29c03Smrgfi 15674b0ead49Smrg 1568c3e29c03Smrgif test x$FILE_MAN_SUFFIX = x ; then 1569c3e29c03Smrg case $SYSV_MAN_SECTIONS in 1570c3e29c03Smrg true) FILE_MAN_SUFFIX=4 ;; 1571c3e29c03Smrg *) FILE_MAN_SUFFIX=5 ;; 1572c3e29c03Smrg esac 1573c3e29c03Smrgfi 1574c3e29c03Smrgif test x$FILE_MAN_DIR = x ; then 1575c3e29c03Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1576c3e29c03Smrgfi 157749dc963fSmrg 1578c3e29c03Smrgif test x$MISC_MAN_SUFFIX = x ; then 1579c3e29c03Smrg case $SYSV_MAN_SECTIONS in 1580c3e29c03Smrg true) MISC_MAN_SUFFIX=5 ;; 1581c3e29c03Smrg *) MISC_MAN_SUFFIX=7 ;; 1582c3e29c03Smrg esac 1583c3e29c03Smrgfi 1584c3e29c03Smrgif test x$MISC_MAN_DIR = x ; then 1585c3e29c03Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1586c3e29c03Smrgfi 158749dc963fSmrg 1588c3e29c03Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1589c3e29c03Smrg case $SYSV_MAN_SECTIONS in 1590c3e29c03Smrg true) DRIVER_MAN_SUFFIX=7 ;; 1591c3e29c03Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1592c3e29c03Smrg esac 1593c3e29c03Smrgfi 1594c3e29c03Smrgif test x$DRIVER_MAN_DIR = x ; then 1595c3e29c03Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1596c3e29c03Smrgfi 15974b0ead49Smrg 1598c3e29c03Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1599c3e29c03Smrg case $SYSV_MAN_SECTIONS in 1600c3e29c03Smrg true) ADMIN_MAN_SUFFIX=1m ;; 1601c3e29c03Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1602c3e29c03Smrg esac 1603c3e29c03Smrgfi 1604c3e29c03Smrgif test x$ADMIN_MAN_DIR = x ; then 1605c3e29c03Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1606c3e29c03Smrgfi 16074b0ead49Smrg 16084b0ead49Smrg 1609c3e29c03SmrgAC_SUBST([APP_MAN_SUFFIX]) 1610c3e29c03SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1611c3e29c03SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1612c3e29c03SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1613c3e29c03SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1614c3e29c03SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1615c3e29c03SmrgAC_SUBST([APP_MAN_DIR]) 1616c3e29c03SmrgAC_SUBST([LIB_MAN_DIR]) 1617c3e29c03SmrgAC_SUBST([FILE_MAN_DIR]) 1618c3e29c03SmrgAC_SUBST([MISC_MAN_DIR]) 1619c3e29c03SmrgAC_SUBST([DRIVER_MAN_DIR]) 1620c3e29c03SmrgAC_SUBST([ADMIN_MAN_DIR]) 162152b01e16Smrg 1622c3e29c03SmrgXORG_MAN_PAGE="X Version 11" 1623c3e29c03SmrgAC_SUBST([XORG_MAN_PAGE]) 1624c3e29c03SmrgMAN_SUBSTS="\ 1625c3e29c03Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1626c3e29c03Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1627c3e29c03Smrg -e 's|__xservername__|Xorg|g' \ 1628c3e29c03Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1629c3e29c03Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1630c3e29c03Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1631c3e29c03Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1632c3e29c03Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1633c3e29c03Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1634c3e29c03Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1635c3e29c03Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1636c3e29c03Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1637c3e29c03SmrgAC_SUBST([MAN_SUBSTS]) 16384b0ead49Smrg 1639c3e29c03Smrg]) # XORG_MANPAGE_SECTIONS 164049dc963fSmrg 1641c3e29c03Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1642c3e29c03Smrg# ------------------------ 1643c3e29c03Smrg# Minimum version: 1.7.0 1644c3e29c03Smrg# 1645c3e29c03Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1646c3e29c03Smrg# provided by xorg-sgml-doctools, if installed. 1647c3e29c03SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1648c3e29c03SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1649c3e29c03SmrgXORG_SGML_PATH= 1650c3e29c03SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1651c3e29c03Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1652c3e29c03Smrg [m4_ifval([$1],[:], 1653c3e29c03Smrg [if test x"$cross_compiling" != x"yes" ; then 1654c3e29c03Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1655c3e29c03Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1656c3e29c03Smrg fi]) 165726372658Smrg ]) 16584b0ead49Smrg 1659c3e29c03Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1660c3e29c03Smrg# the path and the name of the doc stylesheet 1661c3e29c03Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1662c3e29c03Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1663c3e29c03Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1664c3e29c03Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1665c3e29c03Smrgelse 1666c3e29c03Smrg AC_MSG_RESULT([no]) 1667c3e29c03Smrgfi 16684b0ead49Smrg 1669c3e29c03SmrgAC_SUBST(XORG_SGML_PATH) 1670c3e29c03SmrgAC_SUBST(STYLESHEET_SRCDIR) 1671c3e29c03SmrgAC_SUBST(XSL_STYLESHEET) 1672c3e29c03SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1673c3e29c03Smrg]) # XORG_CHECK_SGML_DOCTOOLS 16744b0ead49Smrg 1675c3e29c03Smrg# XORG_CHECK_LINUXDOC 1676c3e29c03Smrg# ------------------- 1677c3e29c03Smrg# Minimum version: 1.0.0 1678c3e29c03Smrg# 1679c3e29c03Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1680c3e29c03Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1681c3e29c03Smrg# Whether or not the necessary tools and files are found can be checked 1682c3e29c03Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1683c3e29c03SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1684c3e29c03SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1685c3e29c03SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 16864b0ead49Smrg 1687c3e29c03SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 16884b0ead49Smrg 1689c3e29c03SmrgAC_MSG_CHECKING([whether to build documentation]) 16904e7590efSmrg 1691c3e29c03Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1692c3e29c03Smrg BUILDDOC=yes 1693c3e29c03Smrgelse 1694c3e29c03Smrg BUILDDOC=no 1695c3e29c03Smrgfi 16964b0ead49Smrg 1697c3e29c03SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 16984b0ead49Smrg 1699c3e29c03SmrgAC_MSG_RESULT([$BUILDDOC]) 17004b0ead49Smrg 1701c3e29c03SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1702c3e29c03Smrg 1703c3e29c03Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1704c3e29c03Smrg BUILDPDFDOC=yes 170526372658Smrgelse 1706c3e29c03Smrg BUILDPDFDOC=no 170726372658Smrgfi 17084b0ead49Smrg 1709c3e29c03SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17104b0ead49Smrg 1711c3e29c03SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 17124b0ead49Smrg 1713c3e29c03SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1714c3e29c03SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1715c3e29c03SmrgMAKE_PDF="$PS2PDF" 1716c3e29c03SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 17174b0ead49Smrg 1718c3e29c03SmrgAC_SUBST(MAKE_TEXT) 1719c3e29c03SmrgAC_SUBST(MAKE_PS) 1720c3e29c03SmrgAC_SUBST(MAKE_PDF) 1721c3e29c03SmrgAC_SUBST(MAKE_HTML) 1722c3e29c03Smrg]) # XORG_CHECK_LINUXDOC 172349dc963fSmrg 1724c3e29c03Smrg# XORG_CHECK_DOCBOOK 1725c3e29c03Smrg# ------------------- 1726c3e29c03Smrg# Minimum version: 1.0.0 1727c3e29c03Smrg# 1728c3e29c03Smrg# Checks for the ability to build output formats from SGML DocBook source. 1729c3e29c03Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1730c3e29c03Smrg# indicates whether the necessary tools and files are found and, if set, 1731c3e29c03Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1732c3e29c03SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1733c3e29c03SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 173449dc963fSmrg 1735c3e29c03SmrgBUILDTXTDOC=no 1736c3e29c03SmrgBUILDPDFDOC=no 1737c3e29c03SmrgBUILDPSDOC=no 1738c3e29c03SmrgBUILDHTMLDOC=no 173949dc963fSmrg 1740c3e29c03SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1741c3e29c03SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1742c3e29c03SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1743c3e29c03SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 174449dc963fSmrg 1745c3e29c03SmrgAC_MSG_CHECKING([whether to build text documentation]) 1746c3e29c03Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1747c3e29c03Smrg test x$BUILD_TXTDOC != xno; then 1748c3e29c03Smrg BUILDTXTDOC=yes 1749c3e29c03Smrgfi 1750c3e29c03SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1751c3e29c03SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 175249dc963fSmrg 1753c3e29c03SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1754c3e29c03Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1755c3e29c03Smrg test x$BUILD_PDFDOC != xno; then 1756c3e29c03Smrg BUILDPDFDOC=yes 1757c3e29c03Smrgfi 1758c3e29c03SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1759c3e29c03SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 176049dc963fSmrg 1761c3e29c03SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1762c3e29c03Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1763c3e29c03Smrg test x$BUILD_PSDOC != xno; then 1764c3e29c03Smrg BUILDPSDOC=yes 1765c3e29c03Smrgfi 1766c3e29c03SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1767c3e29c03SmrgAC_MSG_RESULT([$BUILDPSDOC]) 176849dc963fSmrg 1769c3e29c03SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1770c3e29c03Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1771c3e29c03Smrg test x$BUILD_HTMLDOC != xno; then 1772c3e29c03Smrg BUILDHTMLDOC=yes 1773c3e29c03Smrgfi 1774c3e29c03SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1775c3e29c03SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 177649dc963fSmrg 1777c3e29c03SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1778c3e29c03SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1779c3e29c03SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1780c3e29c03SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 178149dc963fSmrg 1782c3e29c03SmrgAC_SUBST(MAKE_TEXT) 1783c3e29c03SmrgAC_SUBST(MAKE_PS) 1784c3e29c03SmrgAC_SUBST(MAKE_PDF) 1785c3e29c03SmrgAC_SUBST(MAKE_HTML) 1786c3e29c03Smrg]) # XORG_CHECK_DOCBOOK 178749dc963fSmrg 1788c3e29c03Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1789c3e29c03Smrg# ---------------- 1790c3e29c03Smrg# Minimum version: 1.5.0 1791c3e29c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1792c3e29c03Smrg# 1793c3e29c03Smrg# Documentation tools are not always available on all platforms and sometimes 1794c3e29c03Smrg# not at the appropriate level. This macro enables a module to test for the 1795c3e29c03Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1796c3e29c03Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1797c3e29c03Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1798c3e29c03Smrg# --with-xmlto assumes 'auto'. 1799c3e29c03Smrg# 1800c3e29c03Smrg# Interface to module: 1801c3e29c03Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1802c3e29c03Smrg# XMLTO: returns the path of the xmlto program found 1803c3e29c03Smrg# returns the path set by the user in the environment 1804c3e29c03Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1805c3e29c03Smrg# 'no' user instructs the module not to use xmlto 1806c3e29c03Smrg# 1807c3e29c03Smrg# Added in version 1.10.0 1808c3e29c03Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1809c3e29c03Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1810c3e29c03Smrg# 1811c3e29c03Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1812c3e29c03Smrg# 1813c3e29c03SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1814c3e29c03SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1815c3e29c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 1816c3e29c03SmrgAC_ARG_WITH(xmlto, 1817c3e29c03Smrg AS_HELP_STRING([--with-xmlto], 1818c3e29c03Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1819c3e29c03Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1820c3e29c03Smrgm4_undefine([_defopt]) 182149dc963fSmrg 1822c3e29c03Smrgif test "x$use_xmlto" = x"auto"; then 1823c3e29c03Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1824c3e29c03Smrg if test "x$XMLTO" = "x"; then 1825c3e29c03Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1826c3e29c03Smrg have_xmlto=no 1827c3e29c03Smrg else 1828c3e29c03Smrg have_xmlto=yes 1829c3e29c03Smrg fi 1830c3e29c03Smrgelif test "x$use_xmlto" = x"yes" ; then 1831c3e29c03Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1832c3e29c03Smrg if test "x$XMLTO" = "x"; then 1833c3e29c03Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1834c3e29c03Smrg fi 1835c3e29c03Smrg have_xmlto=yes 1836c3e29c03Smrgelif test "x$use_xmlto" = x"no" ; then 1837c3e29c03Smrg if test "x$XMLTO" != "x"; then 1838c3e29c03Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1839c3e29c03Smrg fi 1840c3e29c03Smrg have_xmlto=no 184126372658Smrgelse 1842c3e29c03Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 184326372658Smrgfi 18447aa89044Smrg 1845c3e29c03Smrg# Test for a minimum version of xmlto, if provided. 1846c3e29c03Smrgm4_ifval([$1], 1847c3e29c03Smrg[if test "$have_xmlto" = yes; then 1848c3e29c03Smrg # scrape the xmlto version 1849c3e29c03Smrg AC_MSG_CHECKING([the xmlto version]) 1850c3e29c03Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1851c3e29c03Smrg AC_MSG_RESULT([$xmlto_version]) 1852c3e29c03Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1853c3e29c03Smrg [if test "x$use_xmlto" = xauto; then 1854c3e29c03Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1855c3e29c03Smrg have_xmlto=no 1856c3e29c03Smrg else 1857c3e29c03Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1858c3e29c03Smrg fi]) 1859c3e29c03Smrgfi]) 186049dc963fSmrg 1861c3e29c03Smrg# Test for the ability of xmlto to generate a text target 1862c3e29c03Smrg# 1863c3e29c03Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1864c3e29c03Smrg# following test for empty XML docbook files. 1865c3e29c03Smrg# For compatibility reasons use the following empty XML docbook file and if 1866c3e29c03Smrg# it fails try it again with a non-empty XML file. 1867c3e29c03Smrghave_xmlto_text=no 1868c3e29c03Smrgcat > conftest.xml << "EOF" 1869c3e29c03SmrgEOF 1870c3e29c03SmrgAS_IF([test "$have_xmlto" = yes], 1871c3e29c03Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1872c3e29c03Smrg [have_xmlto_text=yes], 1873c3e29c03Smrg [# Try it again with a non-empty XML file. 1874c3e29c03Smrg cat > conftest.xml << "EOF" 1875c3e29c03Smrg<x></x> 1876c3e29c03SmrgEOF 1877c3e29c03Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1878c3e29c03Smrg [have_xmlto_text=yes], 1879c3e29c03Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1880c3e29c03Smrgrm -f conftest.xml 1881c3e29c03SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1882c3e29c03SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1883c3e29c03Smrg]) # XORG_WITH_XMLTO 188449dc963fSmrg 1885c3e29c03Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1886c3e29c03Smrg# -------------------------------------------- 1887c3e29c03Smrg# Minimum version: 1.12.0 1888c3e29c03Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1889c3e29c03Smrg# 1890c3e29c03Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1891c3e29c03Smrg# XML-based language used for the transformation of XML documents. 1892c3e29c03Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1893c3e29c03Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1894c3e29c03Smrg# The XSLT processor is often used as a standalone tool for transformations. 1895c3e29c03Smrg# It should not be assumed that this tool is used only to work with documnetation. 1896c3e29c03Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1897c3e29c03Smrg# 1898c3e29c03Smrg# Interface to module: 1899c3e29c03Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1900c3e29c03Smrg# XSLTPROC: returns the path of the xsltproc program found 1901c3e29c03Smrg# returns the path set by the user in the environment 1902c3e29c03Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1903c3e29c03Smrg# 'no' user instructs the module not to use xsltproc 1904c3e29c03Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1905c3e29c03Smrg# 1906c3e29c03Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1907c3e29c03Smrg# 1908c3e29c03SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1909c3e29c03SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1910c3e29c03Smrg# Preserves the interface, should it be implemented later 1911c3e29c03Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1912c3e29c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 1913c3e29c03SmrgAC_ARG_WITH(xsltproc, 1914c3e29c03Smrg AS_HELP_STRING([--with-xsltproc], 1915c3e29c03Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1916c3e29c03Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1917c3e29c03Smrgm4_undefine([_defopt]) 191849dc963fSmrg 1919c3e29c03Smrgif test "x$use_xsltproc" = x"auto"; then 1920c3e29c03Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1921c3e29c03Smrg if test "x$XSLTPROC" = "x"; then 1922c3e29c03Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1923c3e29c03Smrg have_xsltproc=no 1924c3e29c03Smrg else 1925c3e29c03Smrg have_xsltproc=yes 1926c3e29c03Smrg fi 1927c3e29c03Smrgelif test "x$use_xsltproc" = x"yes" ; then 1928c3e29c03Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1929c3e29c03Smrg if test "x$XSLTPROC" = "x"; then 1930c3e29c03Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1931c3e29c03Smrg fi 1932c3e29c03Smrg have_xsltproc=yes 1933c3e29c03Smrgelif test "x$use_xsltproc" = x"no" ; then 1934c3e29c03Smrg if test "x$XSLTPROC" != "x"; then 1935c3e29c03Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1936c3e29c03Smrg fi 1937c3e29c03Smrg have_xsltproc=no 1938c3e29c03Smrgelse 1939c3e29c03Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 19404e7590efSmrgfi 194149dc963fSmrg 1942c3e29c03SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1943c3e29c03Smrg]) # XORG_WITH_XSLTPROC 194449dc963fSmrg 1945c3e29c03Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1946c3e29c03Smrg# ---------------------------------------- 1947c3e29c03Smrg# Minimum version: 1.15.0 1948c3e29c03Smrg# 1949c3e29c03Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1950c3e29c03Smrg# scanning arbitrary text files, extracting information from those text files, 1951c3e29c03Smrg# and printing reports based on that information. 1952c3e29c03Smrg# 1953c3e29c03Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1954c3e29c03Smrg# 1955c3e29c03Smrg# Interface to module: 1956c3e29c03Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1957c3e29c03Smrg# PERL: returns the path of the perl program found 1958c3e29c03Smrg# returns the path set by the user in the environment 1959c3e29c03Smrg# --with-perl: 'yes' user instructs the module to use perl 1960c3e29c03Smrg# 'no' user instructs the module not to use perl 1961c3e29c03Smrg# have_perl: returns yes if perl found in PATH or no 1962c3e29c03Smrg# 1963c3e29c03Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1964c3e29c03Smrg# 1965c3e29c03SmrgAC_DEFUN([XORG_WITH_PERL],[ 1966c3e29c03SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1967c3e29c03Smrg# Preserves the interface, should it be implemented later 1968c3e29c03Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1969c3e29c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 1970c3e29c03SmrgAC_ARG_WITH(perl, 1971c3e29c03Smrg AS_HELP_STRING([--with-perl], 1972c3e29c03Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1973c3e29c03Smrg [use_perl=$withval], [use_perl=]_defopt) 1974c3e29c03Smrgm4_undefine([_defopt]) 197549dc963fSmrg 1976c3e29c03Smrgif test "x$use_perl" = x"auto"; then 1977c3e29c03Smrg AC_PATH_PROG([PERL], [perl]) 1978c3e29c03Smrg if test "x$PERL" = "x"; then 1979c3e29c03Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1980c3e29c03Smrg have_perl=no 1981c3e29c03Smrg else 1982c3e29c03Smrg have_perl=yes 198326372658Smrg fi 1984c3e29c03Smrgelif test "x$use_perl" = x"yes" ; then 1985c3e29c03Smrg AC_PATH_PROG([PERL], [perl]) 1986c3e29c03Smrg if test "x$PERL" = "x"; then 1987c3e29c03Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1988c3e29c03Smrg fi 1989c3e29c03Smrg have_perl=yes 1990c3e29c03Smrgelif test "x$use_perl" = x"no" ; then 1991c3e29c03Smrg if test "x$PERL" != "x"; then 1992c3e29c03Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1993c3e29c03Smrg fi 1994c3e29c03Smrg have_perl=no 199526372658Smrgelse 1996c3e29c03Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 199726372658Smrgfi 19984b0ead49Smrg 1999c3e29c03SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2000c3e29c03Smrg]) # XORG_WITH_PERL 20014b0ead49Smrg 2002c3e29c03Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2003c3e29c03Smrg# ---------------- 2004c3e29c03Smrg# Minimum version: 1.5.0 2005c3e29c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2006c3e29c03Smrg# 2007c3e29c03Smrg# Documentation tools are not always available on all platforms and sometimes 2008c3e29c03Smrg# not at the appropriate level. This macro enables a module to test for the 2009c3e29c03Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2010c3e29c03Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 2011c3e29c03Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2012c3e29c03Smrg# --with-asciidoc assumes 'auto'. 2013c3e29c03Smrg# 2014c3e29c03Smrg# Interface to module: 2015c3e29c03Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2016c3e29c03Smrg# ASCIIDOC: returns the path of the asciidoc program found 2017c3e29c03Smrg# returns the path set by the user in the environment 2018c3e29c03Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2019c3e29c03Smrg# 'no' user instructs the module not to use asciidoc 2020c3e29c03Smrg# 2021c3e29c03Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2022c3e29c03Smrg# 2023c3e29c03SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 2024c3e29c03SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2025c3e29c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 2026c3e29c03SmrgAC_ARG_WITH(asciidoc, 2027c3e29c03Smrg AS_HELP_STRING([--with-asciidoc], 2028c3e29c03Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2029c3e29c03Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2030c3e29c03Smrgm4_undefine([_defopt]) 20314b0ead49Smrg 2032c3e29c03Smrgif test "x$use_asciidoc" = x"auto"; then 2033c3e29c03Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2034c3e29c03Smrg if test "x$ASCIIDOC" = "x"; then 2035c3e29c03Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2036c3e29c03Smrg have_asciidoc=no 2037c3e29c03Smrg else 2038c3e29c03Smrg have_asciidoc=yes 2039c3e29c03Smrg fi 2040c3e29c03Smrgelif test "x$use_asciidoc" = x"yes" ; then 2041c3e29c03Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2042c3e29c03Smrg if test "x$ASCIIDOC" = "x"; then 2043c3e29c03Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2044c3e29c03Smrg fi 2045c3e29c03Smrg have_asciidoc=yes 2046c3e29c03Smrgelif test "x$use_asciidoc" = x"no" ; then 2047c3e29c03Smrg if test "x$ASCIIDOC" != "x"; then 2048c3e29c03Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2049c3e29c03Smrg fi 2050c3e29c03Smrg have_asciidoc=no 205126372658Smrgelse 2052c3e29c03Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 20534e7590efSmrgfi 2054c3e29c03Smrgm4_ifval([$1], 2055c3e29c03Smrg[if test "$have_asciidoc" = yes; then 2056c3e29c03Smrg # scrape the asciidoc version 2057c3e29c03Smrg AC_MSG_CHECKING([the asciidoc version]) 2058c3e29c03Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2059c3e29c03Smrg AC_MSG_RESULT([$asciidoc_version]) 2060c3e29c03Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 2061c3e29c03Smrg [if test "x$use_asciidoc" = xauto; then 2062c3e29c03Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2063c3e29c03Smrg have_asciidoc=no 2064c3e29c03Smrg else 2065c3e29c03Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2066c3e29c03Smrg fi]) 2067c3e29c03Smrgfi]) 2068c3e29c03SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2069c3e29c03Smrg]) # XORG_WITH_ASCIIDOC 20707aa89044Smrg 2071c3e29c03Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2072c3e29c03Smrg# ------------------------------------------- 2073c3e29c03Smrg# Minimum version: 1.5.0 2074c3e29c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2075c3e29c03Smrg# Minimum version for optional DOT checking: 1.18.0 2076c3e29c03Smrg# 2077c3e29c03Smrg# Documentation tools are not always available on all platforms and sometimes 2078c3e29c03Smrg# not at the appropriate level. This macro enables a module to test for the 2079c3e29c03Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2080c3e29c03Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 2081c3e29c03Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 2082c3e29c03Smrg# --with-doxygen assumes 'auto'. 2083c3e29c03Smrg# 2084c3e29c03Smrg# Interface to module: 2085c3e29c03Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2086c3e29c03Smrg# DOXYGEN: returns the path of the doxygen program found 2087c3e29c03Smrg# returns the path set by the user in the environment 2088c3e29c03Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 2089c3e29c03Smrg# 'no' user instructs the module not to use doxygen 2090c3e29c03Smrg# 2091c3e29c03Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2092c3e29c03Smrg# 2093c3e29c03SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 2094c3e29c03SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2095c3e29c03SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2096c3e29c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 2097c3e29c03SmrgAC_ARG_WITH(doxygen, 2098c3e29c03Smrg AS_HELP_STRING([--with-doxygen], 2099c3e29c03Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2100c3e29c03Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 2101c3e29c03Smrgm4_undefine([_defopt]) 21027aa89044Smrg 2103c3e29c03Smrgif test "x$use_doxygen" = x"auto"; then 2104c3e29c03Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2105c3e29c03Smrg if test "x$DOXYGEN" = "x"; then 2106c3e29c03Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2107c3e29c03Smrg have_doxygen=no 2108c3e29c03Smrg else 2109c3e29c03Smrg have_doxygen=yes 2110c3e29c03Smrg fi 2111c3e29c03Smrgelif test "x$use_doxygen" = x"yes" ; then 2112c3e29c03Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2113c3e29c03Smrg if test "x$DOXYGEN" = "x"; then 2114c3e29c03Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2115c3e29c03Smrg fi 2116c3e29c03Smrg have_doxygen=yes 2117c3e29c03Smrgelif test "x$use_doxygen" = x"no" ; then 2118c3e29c03Smrg if test "x$DOXYGEN" != "x"; then 2119c3e29c03Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2120c3e29c03Smrg fi 2121c3e29c03Smrg have_doxygen=no 2122c3e29c03Smrgelse 2123c3e29c03Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2124c3e29c03Smrgfi 2125c3e29c03Smrgm4_ifval([$1], 2126c3e29c03Smrg[if test "$have_doxygen" = yes; then 2127c3e29c03Smrg # scrape the doxygen version 2128c3e29c03Smrg AC_MSG_CHECKING([the doxygen version]) 2129c3e29c03Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 2130c3e29c03Smrg AC_MSG_RESULT([$doxygen_version]) 2131c3e29c03Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 2132c3e29c03Smrg [if test "x$use_doxygen" = xauto; then 2133c3e29c03Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2134c3e29c03Smrg have_doxygen=no 2135c3e29c03Smrg else 2136c3e29c03Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2137c3e29c03Smrg fi]) 2138c3e29c03Smrgfi]) 21394b0ead49Smrg 2140c3e29c03Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2141c3e29c03Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2142c3e29c03Smrgdnl HAVE_DOT = @HAVE_DOT@ 2143c3e29c03SmrgHAVE_DOT=no 2144c3e29c03Smrgif test "x$have_doxygen" = "xyes"; then 2145c3e29c03Smrg AC_PATH_PROG([DOT], [dot]) 2146c3e29c03Smrg if test "x$DOT" != "x"; then 2147c3e29c03Smrg HAVE_DOT=yes 214826372658Smrg fi 2149c3e29c03Smrgfi 21504b0ead49Smrg 2151c3e29c03SmrgAC_SUBST([HAVE_DOT]) 2152c3e29c03SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2153c3e29c03SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2154c3e29c03Smrg]) # XORG_WITH_DOXYGEN 21554b0ead49Smrg 2156c3e29c03Smrg# XORG_WITH_GROFF([DEFAULT]) 2157c3e29c03Smrg# ---------------- 2158c3e29c03Smrg# Minimum version: 1.6.0 2159c3e29c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2160c3e29c03Smrg# 2161c3e29c03Smrg# Documentation tools are not always available on all platforms and sometimes 2162c3e29c03Smrg# not at the appropriate level. This macro enables a module to test for the 2163c3e29c03Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2164c3e29c03Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 2165c3e29c03Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 2166c3e29c03Smrg# --with-groff assumes 'auto'. 2167c3e29c03Smrg# 2168c3e29c03Smrg# Interface to module: 2169c3e29c03Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2170c3e29c03Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2171c3e29c03Smrg# HAVE_GROFF_MS: the -ms macros package 2172c3e29c03Smrg# GROFF: returns the path of the groff program found 2173c3e29c03Smrg# returns the path set by the user in the environment 2174c3e29c03Smrg# --with-groff: 'yes' user instructs the module to use groff 2175c3e29c03Smrg# 'no' user instructs the module not to use groff 2176c3e29c03Smrg# 2177c3e29c03Smrg# Added in version 1.9.0: 2178c3e29c03Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2179c3e29c03Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2180c3e29c03Smrg# psselect from the psutils package. 2181c3e29c03Smrg# the ghostcript package. Refer to the grohtml man pages 2182c3e29c03Smrg# 2183c3e29c03Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2184c3e29c03Smrg# 2185c3e29c03Smrg# OS and distros often splits groff in a basic and full package, the former 2186c3e29c03Smrg# having the groff program and the later having devices, fonts and macros 2187c3e29c03Smrg# Checking for the groff executable is not enough. 2188c3e29c03Smrg# 2189c3e29c03Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 2190c3e29c03Smrg# unset HAVE_GROFF or GROFF env variables. 2191c3e29c03Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2192c3e29c03Smrg# 2193c3e29c03SmrgAC_DEFUN([XORG_WITH_GROFF],[ 2194c3e29c03SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2195c3e29c03Smrgm4_define([_defopt], m4_default([$1], [auto])) 2196c3e29c03SmrgAC_ARG_WITH(groff, 2197c3e29c03Smrg AS_HELP_STRING([--with-groff], 2198c3e29c03Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2199c3e29c03Smrg [use_groff=$withval], [use_groff=]_defopt) 2200c3e29c03Smrgm4_undefine([_defopt]) 2201c3e29c03Smrg 2202c3e29c03Smrgif test "x$use_groff" = x"auto"; then 2203c3e29c03Smrg AC_PATH_PROG([GROFF], [groff]) 2204c3e29c03Smrg if test "x$GROFF" = "x"; then 2205c3e29c03Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2206c3e29c03Smrg have_groff=no 2207c3e29c03Smrg else 2208c3e29c03Smrg have_groff=yes 2209c3e29c03Smrg fi 2210c3e29c03Smrgelif test "x$use_groff" = x"yes" ; then 2211c3e29c03Smrg AC_PATH_PROG([GROFF], [groff]) 2212c3e29c03Smrg if test "x$GROFF" = "x"; then 2213c3e29c03Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2214c3e29c03Smrg fi 2215c3e29c03Smrg have_groff=yes 2216c3e29c03Smrgelif test "x$use_groff" = x"no" ; then 2217c3e29c03Smrg if test "x$GROFF" != "x"; then 2218c3e29c03Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2219c3e29c03Smrg fi 2220c3e29c03Smrg have_groff=no 222126372658Smrgelse 2222c3e29c03Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 22234e7590efSmrgfi 222449dc963fSmrg 2225c3e29c03Smrg# We have groff, test for the presence of the macro packages 2226c3e29c03Smrgif test "x$have_groff" = x"yes"; then 2227c3e29c03Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2228c3e29c03Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2229c3e29c03Smrg groff_ms_works=yes 2230c3e29c03Smrg else 2231c3e29c03Smrg groff_ms_works=no 2232c3e29c03Smrg fi 2233c3e29c03Smrg AC_MSG_RESULT([$groff_ms_works]) 2234c3e29c03Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2235c3e29c03Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2236c3e29c03Smrg groff_mm_works=yes 2237c3e29c03Smrg else 2238c3e29c03Smrg groff_mm_works=no 2239c3e29c03Smrg fi 2240c3e29c03Smrg AC_MSG_RESULT([$groff_mm_works]) 2241c3e29c03Smrgfi 224249dc963fSmrg 2243c3e29c03Smrg# We have groff, test for HTML dependencies, one command per package 2244c3e29c03Smrgif test "x$have_groff" = x"yes"; then 2245c3e29c03Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2246c3e29c03Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2247c3e29c03Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2248c3e29c03Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2249c3e29c03Smrg have_groff_html=yes 2250c3e29c03Smrg else 2251c3e29c03Smrg have_groff_html=no 2252c3e29c03Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2253c3e29c03Smrg fi 2254c3e29c03Smrgfi 225549dc963fSmrg 2256c3e29c03Smrg# Set Automake conditionals for Makefiles 2257c3e29c03SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2258c3e29c03SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2259c3e29c03SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2260c3e29c03SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2261c3e29c03Smrg]) # XORG_WITH_GROFF 22624b0ead49Smrg 2263c3e29c03Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2264c3e29c03Smrg# --------------------------------------- 2265c3e29c03Smrg# Minimum version: 1.6.0 2266c3e29c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2267c3e29c03Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2268c3e29c03Smrg# 2269c3e29c03Smrg# Documentation tools are not always available on all platforms and sometimes 2270c3e29c03Smrg# not at the appropriate level. This macro enables a module to test for the 2271c3e29c03Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2272c3e29c03Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 2273c3e29c03Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 2274c3e29c03Smrg# --with-fop assumes 'auto'. 2275c3e29c03Smrg# 2276c3e29c03Smrg# Interface to module: 2277c3e29c03Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2278c3e29c03Smrg# FOP: returns the path of the fop program found 2279c3e29c03Smrg# returns the path set by the user in the environment 2280c3e29c03Smrg# --with-fop: 'yes' user instructs the module to use fop 2281c3e29c03Smrg# 'no' user instructs the module not to use fop 2282c3e29c03Smrg# 2283c3e29c03Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2284c3e29c03Smrg# 2285c3e29c03SmrgAC_DEFUN([XORG_WITH_FOP],[ 2286c3e29c03SmrgAC_ARG_VAR([FOP], [Path to fop command]) 2287c3e29c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 2288c3e29c03SmrgAC_ARG_WITH(fop, 2289c3e29c03Smrg AS_HELP_STRING([--with-fop], 2290c3e29c03Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2291c3e29c03Smrg [use_fop=$withval], [use_fop=]_defopt) 2292c3e29c03Smrgm4_undefine([_defopt]) 229349dc963fSmrg 2294c3e29c03Smrgif test "x$use_fop" = x"auto"; then 2295c3e29c03Smrg AC_PATH_PROG([FOP], [fop]) 2296c3e29c03Smrg if test "x$FOP" = "x"; then 2297c3e29c03Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2298c3e29c03Smrg have_fop=no 2299c3e29c03Smrg else 2300c3e29c03Smrg have_fop=yes 2301c3e29c03Smrg fi 2302c3e29c03Smrgelif test "x$use_fop" = x"yes" ; then 2303c3e29c03Smrg AC_PATH_PROG([FOP], [fop]) 2304c3e29c03Smrg if test "x$FOP" = "x"; then 2305c3e29c03Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2306c3e29c03Smrg fi 2307c3e29c03Smrg have_fop=yes 2308c3e29c03Smrgelif test "x$use_fop" = x"no" ; then 2309c3e29c03Smrg if test "x$FOP" != "x"; then 2310c3e29c03Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2311c3e29c03Smrg fi 2312c3e29c03Smrg have_fop=no 231326372658Smrgelse 2314c3e29c03Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2315c3e29c03Smrgfi 231649dc963fSmrg 2317c3e29c03Smrg# Test for a minimum version of fop, if provided. 2318c3e29c03Smrgm4_ifval([$1], 2319c3e29c03Smrg[if test "$have_fop" = yes; then 2320c3e29c03Smrg # scrape the fop version 2321c3e29c03Smrg AC_MSG_CHECKING([for fop minimum version]) 2322c3e29c03Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2323c3e29c03Smrg AC_MSG_RESULT([$fop_version]) 2324c3e29c03Smrg AS_VERSION_COMPARE([$fop_version], [$1], 2325c3e29c03Smrg [if test "x$use_fop" = xauto; then 2326c3e29c03Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2327c3e29c03Smrg have_fop=no 2328c3e29c03Smrg else 2329c3e29c03Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2330c3e29c03Smrg fi]) 2331c3e29c03Smrgfi]) 2332c3e29c03SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2333c3e29c03Smrg]) # XORG_WITH_FOP 233449dc963fSmrg 2335c3e29c03Smrg# XORG_WITH_M4([MIN-VERSION]) 2336c3e29c03Smrg# --------------------------- 2337c3e29c03Smrg# Minimum version: 1.19.0 2338c3e29c03Smrg# 2339c3e29c03Smrg# This macro attempts to locate an m4 macro processor which supports 2340c3e29c03Smrg# -I option and is only useful for modules relying on M4 in order to 2341c3e29c03Smrg# expand macros in source code files. 2342c3e29c03Smrg# 2343c3e29c03Smrg# Interface to module: 2344c3e29c03Smrg# M4: returns the path of the m4 program found 2345c3e29c03Smrg# returns the path set by the user in the environment 2346c3e29c03Smrg# 2347c3e29c03SmrgAC_DEFUN([XORG_WITH_M4], [ 2348c3e29c03SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2349c3e29c03Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2350c3e29c03Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2351c3e29c03Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2352c3e29c03Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 2353c3e29c03Smrg [$PATH:/usr/gnu/bin])]) 235449dc963fSmrg 2355c3e29c03SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 2356c3e29c03Smrg]) # XORG_WITH_M4 23574b0ead49Smrg 2358c3e29c03Smrg# XORG_WITH_PS2PDF([DEFAULT]) 2359c3e29c03Smrg# ---------------- 2360c3e29c03Smrg# Minimum version: 1.6.0 2361c3e29c03Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2362c3e29c03Smrg# 2363c3e29c03Smrg# Documentation tools are not always available on all platforms and sometimes 2364c3e29c03Smrg# not at the appropriate level. This macro enables a module to test for the 2365c3e29c03Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2366c3e29c03Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 2367c3e29c03Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2368c3e29c03Smrg# --with-ps2pdf assumes 'auto'. 2369c3e29c03Smrg# 2370c3e29c03Smrg# Interface to module: 2371c3e29c03Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2372c3e29c03Smrg# PS2PDF: returns the path of the ps2pdf program found 2373c3e29c03Smrg# returns the path set by the user in the environment 2374c3e29c03Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2375c3e29c03Smrg# 'no' user instructs the module not to use ps2pdf 2376c3e29c03Smrg# 2377c3e29c03Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2378c3e29c03Smrg# 2379c3e29c03SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2380c3e29c03SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2381c3e29c03Smrgm4_define([_defopt], m4_default([$1], [auto])) 2382c3e29c03SmrgAC_ARG_WITH(ps2pdf, 2383c3e29c03Smrg AS_HELP_STRING([--with-ps2pdf], 2384c3e29c03Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2385c3e29c03Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2386c3e29c03Smrgm4_undefine([_defopt]) 23874b0ead49Smrg 2388c3e29c03Smrgif test "x$use_ps2pdf" = x"auto"; then 2389c3e29c03Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2390c3e29c03Smrg if test "x$PS2PDF" = "x"; then 2391c3e29c03Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2392c3e29c03Smrg have_ps2pdf=no 2393c3e29c03Smrg else 2394c3e29c03Smrg have_ps2pdf=yes 2395c3e29c03Smrg fi 2396c3e29c03Smrgelif test "x$use_ps2pdf" = x"yes" ; then 2397c3e29c03Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2398c3e29c03Smrg if test "x$PS2PDF" = "x"; then 2399c3e29c03Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2400c3e29c03Smrg fi 2401c3e29c03Smrg have_ps2pdf=yes 2402c3e29c03Smrgelif test "x$use_ps2pdf" = x"no" ; then 2403c3e29c03Smrg if test "x$PS2PDF" != "x"; then 2404c3e29c03Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2405c3e29c03Smrg fi 2406c3e29c03Smrg have_ps2pdf=no 240726372658Smrgelse 2408c3e29c03Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2409c3e29c03Smrgfi 2410c3e29c03SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2411c3e29c03Smrg]) # XORG_WITH_PS2PDF 241249dc963fSmrg 2413c3e29c03Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 2414c3e29c03Smrg# ---------------- 2415c3e29c03Smrg# Minimum version: 1.6.0 2416c3e29c03Smrg# 2417c3e29c03Smrg# Documentation tools are not always available on all platforms and sometimes 2418c3e29c03Smrg# not at the appropriate level. This macro enables a builder to skip all 2419c3e29c03Smrg# documentation targets except traditional man pages. 2420c3e29c03Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2421c3e29c03Smrg# maximum flexibilty in controlling documentation building. 2422c3e29c03Smrg# Refer to: 2423c3e29c03Smrg# XORG_WITH_XMLTO --with-xmlto 2424c3e29c03Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2425c3e29c03Smrg# XORG_WITH_DOXYGEN --with-doxygen 2426c3e29c03Smrg# XORG_WITH_FOP --with-fop 2427c3e29c03Smrg# XORG_WITH_GROFF --with-groff 2428c3e29c03Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2429c3e29c03Smrg# 2430c3e29c03Smrg# Interface to module: 2431c3e29c03Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2432c3e29c03Smrg# --enable-docs: 'yes' user instructs the module to generate docs 2433c3e29c03Smrg# 'no' user instructs the module not to generate docs 2434c3e29c03Smrg# parm1: specify the default value, yes or no. 2435c3e29c03Smrg# 2436c3e29c03SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2437c3e29c03Smrgm4_define([docs_default], m4_default([$1], [yes])) 2438c3e29c03SmrgAC_ARG_ENABLE(docs, 2439c3e29c03Smrg AS_HELP_STRING([--enable-docs], 2440c3e29c03Smrg [Enable building the documentation (default: ]docs_default[)]), 2441c3e29c03Smrg [build_docs=$enableval], [build_docs=]docs_default) 2442c3e29c03Smrgm4_undefine([docs_default]) 2443c3e29c03SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2444c3e29c03SmrgAC_MSG_CHECKING([whether to build documentation]) 2445c3e29c03SmrgAC_MSG_RESULT([$build_docs]) 2446c3e29c03Smrg]) # XORG_ENABLE_DOCS 244749dc963fSmrg 2448c3e29c03Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2449c3e29c03Smrg# ---------------- 2450c3e29c03Smrg# Minimum version: 1.6.0 2451c3e29c03Smrg# 2452c3e29c03Smrg# This macro enables a builder to skip all developer documentation. 2453c3e29c03Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2454c3e29c03Smrg# maximum flexibilty in controlling documentation building. 2455c3e29c03Smrg# Refer to: 2456c3e29c03Smrg# XORG_WITH_XMLTO --with-xmlto 2457c3e29c03Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2458c3e29c03Smrg# XORG_WITH_DOXYGEN --with-doxygen 2459c3e29c03Smrg# XORG_WITH_FOP --with-fop 2460c3e29c03Smrg# XORG_WITH_GROFF --with-groff 2461c3e29c03Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2462c3e29c03Smrg# 2463c3e29c03Smrg# Interface to module: 2464c3e29c03Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2465c3e29c03Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2466c3e29c03Smrg# 'no' user instructs the module not to generate developer docs 2467c3e29c03Smrg# parm1: specify the default value, yes or no. 2468c3e29c03Smrg# 2469c3e29c03SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2470c3e29c03Smrgm4_define([devel_default], m4_default([$1], [yes])) 2471c3e29c03SmrgAC_ARG_ENABLE(devel-docs, 2472c3e29c03Smrg AS_HELP_STRING([--enable-devel-docs], 2473c3e29c03Smrg [Enable building the developer documentation (default: ]devel_default[)]), 2474c3e29c03Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2475c3e29c03Smrgm4_undefine([devel_default]) 2476c3e29c03SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2477c3e29c03SmrgAC_MSG_CHECKING([whether to build developer documentation]) 2478c3e29c03SmrgAC_MSG_RESULT([$build_devel_docs]) 2479c3e29c03Smrg]) # XORG_ENABLE_DEVEL_DOCS 248049dc963fSmrg 2481c3e29c03Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 2482c3e29c03Smrg# ---------------- 2483c3e29c03Smrg# Minimum version: 1.6.0 2484c3e29c03Smrg# 2485c3e29c03Smrg# This macro enables a builder to skip all functional specification targets. 2486c3e29c03Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2487c3e29c03Smrg# maximum flexibilty in controlling documentation building. 2488c3e29c03Smrg# Refer to: 2489c3e29c03Smrg# XORG_WITH_XMLTO --with-xmlto 2490c3e29c03Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2491c3e29c03Smrg# XORG_WITH_DOXYGEN --with-doxygen 2492c3e29c03Smrg# XORG_WITH_FOP --with-fop 2493c3e29c03Smrg# XORG_WITH_GROFF --with-groff 2494c3e29c03Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2495c3e29c03Smrg# 2496c3e29c03Smrg# Interface to module: 2497c3e29c03Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2498c3e29c03Smrg# --enable-specs: 'yes' user instructs the module to generate specs 2499c3e29c03Smrg# 'no' user instructs the module not to generate specs 2500c3e29c03Smrg# parm1: specify the default value, yes or no. 2501c3e29c03Smrg# 2502c3e29c03SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2503c3e29c03Smrgm4_define([spec_default], m4_default([$1], [yes])) 2504c3e29c03SmrgAC_ARG_ENABLE(specs, 2505c3e29c03Smrg AS_HELP_STRING([--enable-specs], 2506c3e29c03Smrg [Enable building the specs (default: ]spec_default[)]), 2507c3e29c03Smrg [build_specs=$enableval], [build_specs=]spec_default) 2508c3e29c03Smrgm4_undefine([spec_default]) 2509c3e29c03SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2510c3e29c03SmrgAC_MSG_CHECKING([whether to build functional specifications]) 2511c3e29c03SmrgAC_MSG_RESULT([$build_specs]) 2512c3e29c03Smrg]) # XORG_ENABLE_SPECS 251349dc963fSmrg 2514c3e29c03Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2515c3e29c03Smrg# ---------------------------------------------- 2516c3e29c03Smrg# Minimum version: 1.13.0 2517c3e29c03Smrg# 2518c3e29c03Smrg# This macro enables a builder to enable/disable unit testing 2519c3e29c03Smrg# It makes no assumption about the test cases implementation 2520c3e29c03Smrg# Test cases may or may not use Automake "Support for test suites" 2521c3e29c03Smrg# They may or may not use the software utility library GLib 2522c3e29c03Smrg# 2523c3e29c03Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2524c3e29c03Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2525c3e29c03Smrg# The variable enable_unit_tests is used by other macros in this file. 2526c3e29c03Smrg# 2527c3e29c03Smrg# Interface to module: 2528c3e29c03Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2529c3e29c03Smrg# enable_unit_tests: used in configure.ac for additional configuration 2530c3e29c03Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2531c3e29c03Smrg# 'no' user instructs the module not to build tests 2532c3e29c03Smrg# parm1: specify the default value, yes or no. 2533c3e29c03Smrg# 2534c3e29c03SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2535c3e29c03SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2536c3e29c03SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2537c3e29c03SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2538c3e29c03Smrgm4_define([_defopt], m4_default([$1], [auto])) 2539c3e29c03SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2540c3e29c03Smrg [Enable building unit test cases (default: ]_defopt[)]), 2541c3e29c03Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2542c3e29c03Smrgm4_undefine([_defopt]) 2543c3e29c03SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2544c3e29c03SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2545c3e29c03SmrgAC_MSG_RESULT([$enable_unit_tests]) 2546c3e29c03Smrg]) # XORG_ENABLE_UNIT_TESTS 254749dc963fSmrg 2548c3e29c03Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2549c3e29c03Smrg# ------------------------------------------------------ 2550c3e29c03Smrg# Minimum version: 1.17.0 2551c3e29c03Smrg# 2552c3e29c03Smrg# This macro enables a builder to enable/disable integration testing 2553c3e29c03Smrg# It makes no assumption about the test cases' implementation 2554c3e29c03Smrg# Test cases may or may not use Automake "Support for test suites" 2555c3e29c03Smrg# 2556c3e29c03Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2557c3e29c03Smrg# usually requires less dependencies and may be built and run under less 2558c3e29c03Smrg# stringent environments than integration tests. 2559c3e29c03Smrg# 2560c3e29c03Smrg# Interface to module: 2561c3e29c03Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2562c3e29c03Smrg# enable_integration_tests: used in configure.ac for additional configuration 2563c3e29c03Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2564c3e29c03Smrg# 'no' user instructs the module not to build tests 2565c3e29c03Smrg# parm1: specify the default value, yes or no. 2566c3e29c03Smrg# 2567c3e29c03SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2568c3e29c03SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2569c3e29c03Smrgm4_define([_defopt], m4_default([$1], [auto])) 2570c3e29c03SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2571c3e29c03Smrg [Enable building integration test cases (default: ]_defopt[)]), 2572c3e29c03Smrg [enable_integration_tests=$enableval], 2573c3e29c03Smrg [enable_integration_tests=]_defopt) 2574c3e29c03Smrgm4_undefine([_defopt]) 2575c3e29c03SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2576c3e29c03Smrg [test "x$enable_integration_tests" != xno]) 2577c3e29c03SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2578c3e29c03SmrgAC_MSG_RESULT([$enable_integration_tests]) 2579c3e29c03Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 258049dc963fSmrg 2581c3e29c03Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2582c3e29c03Smrg# ---------------------------------------- 2583c3e29c03Smrg# Minimum version: 1.13.0 2584c3e29c03Smrg# 2585c3e29c03Smrg# GLib is a library which provides advanced data structures and functions. 2586c3e29c03Smrg# This macro enables a module to test for the presence of Glib. 2587c3e29c03Smrg# 2588c3e29c03Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2589c3e29c03Smrg# Otherwise the value of $enable_unit_tests is blank. 2590c3e29c03Smrg# 2591c3e29c03Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2592c3e29c03Smrg# test support usually requires less dependencies and may be built and run under 2593c3e29c03Smrg# less stringent environments than integration tests. 2594c3e29c03Smrg# 2595c3e29c03Smrg# Interface to module: 2596c3e29c03Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 2597c3e29c03Smrg# with_glib: used in configure.ac to know if GLib has been found 2598c3e29c03Smrg# --with-glib: 'yes' user instructs the module to use glib 2599c3e29c03Smrg# 'no' user instructs the module not to use glib 2600c3e29c03Smrg# 2601c3e29c03SmrgAC_DEFUN([XORG_WITH_GLIB],[ 2602c3e29c03SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2603c3e29c03Smrgm4_define([_defopt], m4_default([$2], [auto])) 2604c3e29c03SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2605c3e29c03Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 2606c3e29c03Smrg [with_glib=$withval], [with_glib=]_defopt) 2607c3e29c03Smrgm4_undefine([_defopt]) 260849dc963fSmrg 2609c3e29c03Smrghave_glib=no 2610c3e29c03Smrg# Do not probe GLib if user explicitly disabled unit testing 2611c3e29c03Smrgif test "x$enable_unit_tests" != x"no"; then 2612c3e29c03Smrg # Do not probe GLib if user explicitly disabled it 2613c3e29c03Smrg if test "x$with_glib" != x"no"; then 2614c3e29c03Smrg m4_ifval( 2615c3e29c03Smrg [$1], 2616c3e29c03Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2617c3e29c03Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2618c3e29c03Smrg ) 2619c3e29c03Smrg fi 2620c3e29c03Smrgfi 262149dc963fSmrg 2622c3e29c03Smrg# Not having GLib when unit testing has been explicitly requested is an error 2623c3e29c03Smrgif test "x$enable_unit_tests" = x"yes"; then 2624c3e29c03Smrg if test "x$have_glib" = x"no"; then 2625c3e29c03Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2626c3e29c03Smrg fi 2627c3e29c03Smrgfi 262826372658Smrg 2629c3e29c03Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 2630c3e29c03Smrgif test "x$enable_unit_tests" = x"no"; then 2631c3e29c03Smrg if test "x$with_glib" = x"yes"; then 2632c3e29c03Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2633c3e29c03Smrg fi 26344e7590efSmrgfi 263549dc963fSmrg 2636c3e29c03Smrg# Not having GLib when it has been explicitly requested is an error 2637c3e29c03Smrgif test "x$with_glib" = x"yes"; then 2638c3e29c03Smrg if test "x$have_glib" = x"no"; then 2639c3e29c03Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2640c3e29c03Smrg fi 2641c3e29c03Smrgfi 264249dc963fSmrg 2643c3e29c03SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2644c3e29c03Smrg]) # XORG_WITH_GLIB 264549dc963fSmrg 2646c3e29c03Smrg# XORG_LD_WRAP([required|optional]) 2647c3e29c03Smrg# --------------------------------- 2648c3e29c03Smrg# Minimum version: 1.13.0 2649c3e29c03Smrg# 2650c3e29c03Smrg# Check if linker supports -wrap, passed via compiler flags 2651c3e29c03Smrg# 2652c3e29c03Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2653c3e29c03Smrg# Otherwise the value of $enable_unit_tests is blank. 2654c3e29c03Smrg# 2655c3e29c03Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2656c3e29c03Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2657c3e29c03Smrg# available, an argument of "optional" allows use when some unit tests require 2658c3e29c03Smrg# ld -wrap and others do not. 2659c3e29c03Smrg# 2660c3e29c03SmrgAC_DEFUN([XORG_LD_WRAP],[ 2661c3e29c03SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2662c3e29c03Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 2663c3e29c03Smrg void __wrap_exit(int status) { return; }], 2664c3e29c03Smrg [exit(0);])]) 2665c3e29c03Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 2666c3e29c03Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2667c3e29c03Smrg if test "x$have_ld_wrap" = x"no"; then 2668c3e29c03Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2669c3e29c03Smrg fi 2670c3e29c03Smrgfi 2671c3e29c03SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2672c3e29c03Smrg# 2673c3e29c03Smrg]) # XORG_LD_WRAP 267449dc963fSmrg 2675c3e29c03Smrg# XORG_CHECK_LINKER_FLAGS 2676c3e29c03Smrg# ----------------------- 2677c3e29c03Smrg# SYNOPSIS 2678c3e29c03Smrg# 2679c3e29c03Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2680c3e29c03Smrg# 2681c3e29c03Smrg# DESCRIPTION 2682c3e29c03Smrg# 2683c3e29c03Smrg# Check whether the given linker FLAGS work with the current language's 2684c3e29c03Smrg# linker, or whether they give an error. 2685c3e29c03Smrg# 2686c3e29c03Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2687c3e29c03Smrg# success/failure. 2688c3e29c03Smrg# 2689c3e29c03Smrg# PROGRAM-SOURCE is the program source to link with, if needed 2690c3e29c03Smrg# 2691c3e29c03Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2692c3e29c03Smrg# 2693c3e29c03Smrg# LICENSE 2694c3e29c03Smrg# 2695c3e29c03Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2696c3e29c03Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2697c3e29c03Smrg# Copyright (c) 2009 Matteo Frigo 2698c3e29c03Smrg# 2699c3e29c03Smrg# This program is free software: you can redistribute it and/or modify it 2700c3e29c03Smrg# under the terms of the GNU General Public License as published by the 2701c3e29c03Smrg# Free Software Foundation, either version 3 of the License, or (at your 2702c3e29c03Smrg# option) any later version. 2703c3e29c03Smrg# 2704c3e29c03Smrg# This program is distributed in the hope that it will be useful, but 2705c3e29c03Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2706c3e29c03Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2707c3e29c03Smrg# Public License for more details. 2708c3e29c03Smrg# 2709c3e29c03Smrg# You should have received a copy of the GNU General Public License along 2710c3e29c03Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2711c3e29c03Smrg# 2712c3e29c03Smrg# As a special exception, the respective Autoconf Macro's copyright owner 2713c3e29c03Smrg# gives unlimited permission to copy, distribute and modify the configure 2714c3e29c03Smrg# scripts that are the output of Autoconf when processing the Macro. You 2715c3e29c03Smrg# need not follow the terms of the GNU General Public License when using 2716c3e29c03Smrg# or distributing such scripts, even though portions of the text of the 2717c3e29c03Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 2718c3e29c03Smrg# all other use of the material that constitutes the Autoconf Macro. 2719c3e29c03Smrg# 2720c3e29c03Smrg# This special exception to the GPL applies to versions of the Autoconf 2721c3e29c03Smrg# Macro released by the Autoconf Archive. When you make and distribute a 2722c3e29c03Smrg# modified version of the Autoconf Macro, you may extend this special 2723c3e29c03Smrg# exception to the GPL to apply to your modified version as well.# 2724c3e29c03SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2725c3e29c03Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2726c3e29c03Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2727c3e29c03SmrgAS_LITERAL_IF([$1], 2728c3e29c03Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2729c3e29c03Smrg ax_save_FLAGS=$LDFLAGS 2730c3e29c03Smrg LDFLAGS="$1" 2731c3e29c03Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2732c3e29c03Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2733c3e29c03Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2734c3e29c03Smrg LDFLAGS=$ax_save_FLAGS])], 2735c3e29c03Smrg [ax_save_FLAGS=$LDFLAGS 2736c3e29c03Smrg LDFLAGS="$1" 2737c3e29c03Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2738c3e29c03Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2739c3e29c03Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2740c3e29c03Smrg LDFLAGS=$ax_save_FLAGS]) 2741c3e29c03Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2742c3e29c03SmrgAC_MSG_RESULT($xorg_check_linker_flags) 2743c3e29c03Smrgif test "x$xorg_check_linker_flags" = xyes; then 2744c3e29c03Smrg m4_default([$2], :) 274526372658Smrgelse 2746c3e29c03Smrg m4_default([$3], :) 274726372658Smrgfi 2748c3e29c03Smrg]) # XORG_CHECK_LINKER_FLAGS 2749c3e29c03Smrg 2750c3e29c03Smrg# XORG_MEMORY_CHECK_FLAGS 2751c3e29c03Smrg# ----------------------- 2752c3e29c03Smrg# Minimum version: 1.16.0 2753c3e29c03Smrg# 2754c3e29c03Smrg# This macro attempts to find appropriate memory checking functionality 2755c3e29c03Smrg# for various platforms which unit testing code may use to catch various 2756c3e29c03Smrg# forms of memory allocation and access errors in testing. 2757c3e29c03Smrg# 2758c3e29c03Smrg# Interface to module: 2759c3e29c03Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2760c3e29c03Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2761c3e29c03Smrg# 2762c3e29c03Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2763c3e29c03Smrg# 2764c3e29c03SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 276549dc963fSmrg 2766c3e29c03SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2767c3e29c03SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2768c3e29c03Smrg [Environment variables to enable memory checking in tests]) 276949dc963fSmrg 2770c3e29c03Smrg# Check for different types of support on different platforms 2771c3e29c03Smrgcase $host_os in 2772c3e29c03Smrg solaris*) 2773c3e29c03Smrg AC_CHECK_LIB([umem], [umem_alloc], 2774c3e29c03Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2775c3e29c03Smrg ;; 2776c3e29c03Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2777c3e29c03Smrg # both directly and inverted, so should not be 0 or 255. 2778c3e29c03Smrg malloc_debug_env='MALLOC_PERTURB_=15' 2779c3e29c03Smrg ;; 2780c3e29c03Smrg darwin*) 2781c3e29c03Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2782c3e29c03Smrg ;; 2783c3e29c03Smrg *bsd*) 2784c3e29c03Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2785c3e29c03Smrg ;; 2786c3e29c03Smrgesac 2787c3e29c03Smrg 2788c3e29c03Smrg# User supplied flags override default flags 2789c3e29c03Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2790c3e29c03Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 279126372658Smrgfi 279249dc963fSmrg 2793c3e29c03SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2794c3e29c03Smrg]) # XORG_WITH_LINT 27957aa89044Smrg 2796c3e29c03Smrg# XORG_CHECK_MALLOC_ZERO 2797c3e29c03Smrg# ---------------------- 2798c3e29c03Smrg# Minimum version: 1.0.0 2799c3e29c03Smrg# 2800c3e29c03Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2801c3e29c03Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 2802c3e29c03Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2803c3e29c03SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2804c3e29c03SmrgAC_ARG_ENABLE(malloc0returnsnull, 2805c3e29c03Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 2806c3e29c03Smrg [malloc(0) returns NULL (default: auto)]), 2807c3e29c03Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2808c3e29c03Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 280949dc963fSmrg 2810c3e29c03SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2811c3e29c03Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2812c3e29c03SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2813c3e29c03Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2814c3e29c03Smrg#include <stdlib.h> 2815c3e29c03Smrg],[ 2816c3e29c03Smrg char *m0, *r0, *c0, *p; 2817c3e29c03Smrg m0 = malloc(0); 2818c3e29c03Smrg p = malloc(10); 2819c3e29c03Smrg r0 = realloc(p,0); 2820c3e29c03Smrg c0 = calloc(0,10); 2821c3e29c03Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2822c3e29c03Smrg])], 2823c3e29c03Smrg [xorg_cv_malloc0_returns_null=yes], 2824c3e29c03Smrg [xorg_cv_malloc0_returns_null=no])]) 2825c3e29c03SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2826c3e29c03Smrgfi 2827c3e29c03SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2828c3e29c03Smrg 2829c3e29c03Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2830c3e29c03Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2831c3e29c03Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2832c3e29c03Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 28334e7590efSmrgelse 2834c3e29c03Smrg MALLOC_ZERO_CFLAGS="" 2835c3e29c03Smrg XMALLOC_ZERO_CFLAGS="" 2836c3e29c03Smrg XTMALLOC_ZERO_CFLAGS="" 28374e7590efSmrgfi 283849dc963fSmrg 2839c3e29c03SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2840c3e29c03SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2841c3e29c03SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2842c3e29c03Smrg]) # XORG_CHECK_MALLOC_ZERO 284349dc963fSmrg 2844c3e29c03Smrg# XORG_WITH_LINT() 284526372658Smrg# ---------------- 2846c3e29c03Smrg# Minimum version: 1.1.0 2847c3e29c03Smrg# 2848c3e29c03Smrg# This macro enables the use of a tool that flags some suspicious and 2849c3e29c03Smrg# non-portable constructs (likely to be bugs) in C language source code. 2850c3e29c03Smrg# It will attempt to locate the tool and use appropriate options. 2851c3e29c03Smrg# There are various lint type tools on different platforms. 2852c3e29c03Smrg# 2853c3e29c03Smrg# Interface to module: 2854c3e29c03Smrg# LINT: returns the path to the tool found on the platform 2855c3e29c03Smrg# or the value set to LINT on the configure cmd line 2856c3e29c03Smrg# also an Automake conditional 2857c3e29c03Smrg# LINT_FLAGS: an Automake variable with appropriate flags 2858c3e29c03Smrg# 2859c3e29c03Smrg# --with-lint: 'yes' user instructs the module to use lint 2860c3e29c03Smrg# 'no' user instructs the module not to use lint (default) 2861c3e29c03Smrg# 2862c3e29c03Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2863c3e29c03Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2864c3e29c03Smrg# 2865c3e29c03SmrgAC_DEFUN([XORG_WITH_LINT],[ 286649dc963fSmrg 2867c3e29c03SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2868c3e29c03SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2869c3e29c03SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2870c3e29c03Smrg [Use a lint-style source code checker (default: disabled)])], 2871c3e29c03Smrg [use_lint=$withval], [use_lint=no]) 287249dc963fSmrg 2873c3e29c03Smrg# Obtain platform specific info like program name and options 2874c3e29c03Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2875c3e29c03Smrgcase $host_os in 2876c3e29c03Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2877c3e29c03Smrg lint_name=splint 2878c3e29c03Smrg lint_options="-badflag" 2879c3e29c03Smrg ;; 2880c3e29c03Smrg *freebsd* | *netbsd*) 2881c3e29c03Smrg lint_name=lint 2882c3e29c03Smrg lint_options="-u -b" 2883c3e29c03Smrg ;; 2884c3e29c03Smrg *solaris*) 2885c3e29c03Smrg lint_name=lint 2886c3e29c03Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2887c3e29c03Smrg ;; 2888c3e29c03Smrgesac 288949dc963fSmrg 2890c3e29c03Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2891c3e29c03Smrgif test "x$use_lint" = x"yes" ; then 2892c3e29c03Smrg AC_PATH_PROG([LINT], [$lint_name]) 2893c3e29c03Smrg if test "x$LINT" = "x"; then 2894c3e29c03Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2895c3e29c03Smrg fi 2896c3e29c03Smrgelif test "x$use_lint" = x"no" ; then 2897c3e29c03Smrg if test "x$LINT" != "x"; then 2898c3e29c03Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2899c3e29c03Smrg fi 29004e7590efSmrgelse 2901c3e29c03Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2902c3e29c03Smrgfi 290349dc963fSmrg 2904c3e29c03Smrg# User supplied flags override default flags 2905c3e29c03Smrgif test "x$LINT_FLAGS" != "x"; then 2906c3e29c03Smrg lint_options=$LINT_FLAGS 2907c3e29c03Smrgfi 290849dc963fSmrg 2909c3e29c03SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2910c3e29c03SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 291149dc963fSmrg 2912c3e29c03Smrg]) # XORG_WITH_LINT 291349dc963fSmrg 2914c3e29c03Smrg# XORG_LINT_LIBRARY(LIBNAME) 2915c3e29c03Smrg# -------------------------- 2916c3e29c03Smrg# Minimum version: 1.1.0 2917c3e29c03Smrg# 2918c3e29c03Smrg# Sets up flags for building lint libraries for checking programs that call 2919c3e29c03Smrg# functions in the library. 2920c3e29c03Smrg# 2921c3e29c03Smrg# Interface to module: 2922c3e29c03Smrg# LINTLIB - Automake variable with the name of lint library file to make 2923c3e29c03Smrg# MAKE_LINT_LIB - Automake conditional 2924c3e29c03Smrg# 2925c3e29c03Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2926c3e29c03Smrg# - 'no' user instructs the module not to create a lint library (default) 292726372658Smrg 2928c3e29c03SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2929c3e29c03SmrgAC_REQUIRE([XORG_WITH_LINT]) 2930c3e29c03SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2931c3e29c03Smrg [Create lint library (default: disabled)])], 2932c3e29c03Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 293349dc963fSmrg 2934c3e29c03Smrgif test "x$make_lint_lib" = x"yes" ; then 2935c3e29c03Smrg LINTLIB=llib-l$1.ln 2936c3e29c03Smrg if test "x$LINT" = "x"; then 2937c3e29c03Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2938c3e29c03Smrg fi 2939c3e29c03Smrgelif test "x$make_lint_lib" != x"no" ; then 2940c3e29c03Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2941c3e29c03Smrgfi 294249dc963fSmrg 2943c3e29c03SmrgAC_SUBST(LINTLIB) 2944c3e29c03SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 294549dc963fSmrg 2946c3e29c03Smrg]) # XORG_LINT_LIBRARY 294749dc963fSmrg 2948c3e29c03Smrg# XORG_COMPILER_BRAND 2949c3e29c03Smrg# ------------------- 2950c3e29c03Smrg# Minimum version: 1.14.0 2951c3e29c03Smrg# 2952c3e29c03Smrg# Checks for various brands of compilers and sets flags as appropriate: 2953c3e29c03Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2954c3e29c03Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 2955c3e29c03Smrg# clang compiler - sets CLANGCC to "yes" 2956c3e29c03Smrg# Intel compiler - sets INTELCC to "yes" 2957c3e29c03Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2958c3e29c03Smrg# 2959c3e29c03SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 2960c3e29c03SmrgAC_LANG_CASE( 2961c3e29c03Smrg [C], [ 2962c3e29c03Smrg AC_REQUIRE([AC_PROG_CC_C99]) 2963c3e29c03Smrg ], 2964c3e29c03Smrg [C++], [ 2965c3e29c03Smrg AC_REQUIRE([AC_PROG_CXX]) 2966c3e29c03Smrg ] 2967c3e29c03Smrg) 2968c3e29c03SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2969c3e29c03SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2970c3e29c03SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2971c3e29c03Smrg]) # XORG_COMPILER_BRAND 297249dc963fSmrg 2973c3e29c03Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2974c3e29c03Smrg# --------------- 2975c3e29c03Smrg# Minimum version: 1.16.0 2976c3e29c03Smrg# 2977c3e29c03Smrg# Test if the compiler works when passed the given flag as a command line argument. 2978c3e29c03Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 2979c3e29c03Smrg# next flag in the list until there are no more options. 2980c3e29c03Smrg# 2981c3e29c03Smrg# Note that this does not guarantee that the compiler supports the flag as some 2982c3e29c03Smrg# compilers will simply ignore arguments that they do not understand, but we do 2983c3e29c03Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 2984c3e29c03Smrg# -Werror=unused-command-line-argument 2985c3e29c03Smrg# 2986c3e29c03SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 2987c3e29c03Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2988c3e29c03Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 298926372658Smrg 2990c3e29c03SmrgAC_LANG_COMPILER_REQUIRE 299149dc963fSmrg 2992c3e29c03SmrgAC_LANG_CASE( 2993c3e29c03Smrg [C], [ 2994c3e29c03Smrg AC_REQUIRE([AC_PROG_CC_C99]) 2995c3e29c03Smrg define([PREFIX], [C]) 2996c3e29c03Smrg define([CACHE_PREFIX], [cc]) 2997c3e29c03Smrg define([COMPILER], [$CC]) 2998c3e29c03Smrg ], 2999c3e29c03Smrg [C++], [ 3000c3e29c03Smrg define([PREFIX], [CXX]) 3001c3e29c03Smrg define([CACHE_PREFIX], [cxx]) 3002c3e29c03Smrg define([COMPILER], [$CXX]) 3003c3e29c03Smrg ] 3004c3e29c03Smrg) 300549dc963fSmrg 3006c3e29c03Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 300749dc963fSmrg 3008c3e29c03Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3009c3e29c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3010c3e29c03Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3011c3e29c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3012c3e29c03Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3013c3e29c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3014c3e29c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3015c3e29c03Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3016c3e29c03Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3017c3e29c03Smrgfi 301849dc963fSmrg 3019c3e29c03Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3020c3e29c03Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3021c3e29c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3022c3e29c03Smrg fi 3023c3e29c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3024c3e29c03Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3025c3e29c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3026c3e29c03Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3027c3e29c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3028c3e29c03Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3029c3e29c03Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3030c3e29c03Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3031c3e29c03Smrgfi 303249dc963fSmrg 3033c3e29c03Smrgfound="no" 3034c3e29c03Smrgm4_foreach([flag], m4_cdr($@), [ 3035c3e29c03Smrg if test $found = "no" ; then 3036c3e29c03Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3037c3e29c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3038c3e29c03Smrg fi 303949dc963fSmrg 3040c3e29c03Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3041c3e29c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3042c3e29c03Smrg fi 304349dc963fSmrg 3044c3e29c03Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 304549dc963fSmrg 3046c3e29c03Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3047c3e29c03Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3048c3e29c03Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3049c3e29c03Smrg AC_CACHE_VAL($cacheid, 3050c3e29c03Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3051c3e29c03Smrg [eval $cacheid=yes], 3052c3e29c03Smrg [eval $cacheid=no])]) 305349dc963fSmrg 3054c3e29c03Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 30554e7590efSmrg 3056c3e29c03Smrg eval supported=\$$cacheid 3057c3e29c03Smrg AC_MSG_RESULT([$supported]) 3058c3e29c03Smrg if test "$supported" = "yes" ; then 3059c3e29c03Smrg $1="$$1 ]flag[" 3060c3e29c03Smrg found="yes" 3061c3e29c03Smrg fi 3062c3e29c03Smrg fi 3063c3e29c03Smrg]) 3064c3e29c03Smrg]) # XORG_TESTSET_CFLAG 30654e7590efSmrg 3066c3e29c03Smrg# XORG_COMPILER_FLAGS 3067c3e29c03Smrg# --------------- 3068c3e29c03Smrg# Minimum version: 1.16.0 3069c3e29c03Smrg# 3070c3e29c03Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3071c3e29c03Smrg# arguments supported by the selected compiler which do NOT alter the generated 3072c3e29c03Smrg# code. These arguments will cause the compiler to print various warnings 3073c3e29c03Smrg# during compilation AND turn a conservative set of warnings into errors. 3074c3e29c03Smrg# 3075c3e29c03Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3076c3e29c03Smrg# future versions of util-macros as options are added to new compilers. 3077c3e29c03Smrg# 3078c3e29c03SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 3079c3e29c03SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 308049dc963fSmrg 3081c3e29c03SmrgAC_ARG_ENABLE(selective-werror, 3082c3e29c03Smrg AS_HELP_STRING([--disable-selective-werror], 3083c3e29c03Smrg [Turn off selective compiler errors. (default: enabled)]), 3084c3e29c03Smrg [SELECTIVE_WERROR=$enableval], 3085c3e29c03Smrg [SELECTIVE_WERROR=yes]) 308649dc963fSmrg 3087c3e29c03SmrgAC_LANG_CASE( 3088c3e29c03Smrg [C], [ 3089c3e29c03Smrg define([PREFIX], [C]) 3090c3e29c03Smrg ], 3091c3e29c03Smrg [C++], [ 3092c3e29c03Smrg define([PREFIX], [CXX]) 3093c3e29c03Smrg ] 3094c3e29c03Smrg) 3095c3e29c03Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 3096c3e29c03Smrgif test "x$SUNCC" = "xyes"; then 3097c3e29c03Smrg [BASE_]PREFIX[FLAGS]="-v" 3098c3e29c03Smrgelse 3099c3e29c03Smrg [BASE_]PREFIX[FLAGS]="" 3100c3e29c03Smrgfi 310149dc963fSmrg 3102c3e29c03Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3103c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3104c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3105c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3106c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 310749dc963fSmrg 3108c3e29c03SmrgAC_LANG_CASE( 3109c3e29c03Smrg [C], [ 3110c3e29c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3111c3e29c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3112c3e29c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3113c3e29c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3114c3e29c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3115c3e29c03Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3116c3e29c03Smrg ] 3117c3e29c03Smrg) 31187aa89044Smrg 3119c3e29c03Smrg# This chunk adds additional warnings that could catch undesired effects. 3120c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3121c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3122c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3123c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3124c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3125c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3126c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 312726372658Smrg 3128c3e29c03Smrg# These are currently disabled because they are noisy. They will be enabled 3129c3e29c03Smrg# in the future once the codebase is sufficiently modernized to silence 3130c3e29c03Smrg# them. For now, I don't want them to drown out the other warnings. 3131c3e29c03Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3132c3e29c03Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3133c3e29c03Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 31344b0ead49Smrg 3135c3e29c03Smrg# Turn some warnings into errors, so we don't accidently get successful builds 3136c3e29c03Smrg# when there are problems that should be fixed. 31374b0ead49Smrg 3138c3e29c03Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 3139c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3140c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3141c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3142c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3143c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3144c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3145c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3146c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3147c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3148c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3149c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3150c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3151c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3152c3e29c03Smrgelse 3153c3e29c03SmrgAC_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]) 3154c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3155c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3156c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3157c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3158c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3159c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3160c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3161c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3162c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3163c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3164c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3165c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3166c3e29c03SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3167c3e29c03Smrgfi 31687aa89044Smrg 3169c3e29c03SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3170c3e29c03Smrg]) # XORG_COMPILER_FLAGS 31714e7590efSmrg 3172c3e29c03Smrg# XORG_CWARNFLAGS 3173c3e29c03Smrg# --------------- 3174c3e29c03Smrg# Minimum version: 1.2.0 3175c3e29c03Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3176c3e29c03Smrg# 3177c3e29c03Smrg# Defines CWARNFLAGS to enable C compiler warnings. 3178c3e29c03Smrg# 3179c3e29c03Smrg# This function is deprecated because it defines -fno-strict-aliasing 3180c3e29c03Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3181c3e29c03Smrg# is needed, then it should be added explicitly in the module when 3182c3e29c03Smrg# it is updated to use BASE_CFLAGS. 3183c3e29c03Smrg# 3184c3e29c03SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3185c3e29c03SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3186c3e29c03SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3187c3e29c03SmrgAC_LANG_CASE( 3188c3e29c03Smrg [C], [ 3189c3e29c03Smrg CWARNFLAGS="$BASE_CFLAGS" 3190c3e29c03Smrg if test "x$GCC" = xyes ; then 3191c3e29c03Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3192c3e29c03Smrg fi 3193c3e29c03Smrg AC_SUBST(CWARNFLAGS) 3194c3e29c03Smrg ] 3195c3e29c03Smrg) 3196c3e29c03Smrg]) # XORG_CWARNFLAGS 31974b0ead49Smrg 3198c3e29c03Smrg# XORG_STRICT_OPTION 3199c3e29c03Smrg# ----------------------- 3200c3e29c03Smrg# Minimum version: 1.3.0 3201c3e29c03Smrg# 3202c3e29c03Smrg# Add configure option to enable strict compilation flags, such as treating 3203c3e29c03Smrg# warnings as fatal errors. 3204c3e29c03Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3205c3e29c03Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3206c3e29c03Smrg# 3207c3e29c03Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3208c3e29c03Smrg# when strict compilation is unconditionally desired. 3209c3e29c03SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3210c3e29c03SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3211c3e29c03SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 32124b0ead49Smrg 3213c3e29c03SmrgAC_ARG_ENABLE(strict-compilation, 3214c3e29c03Smrg AS_HELP_STRING([--enable-strict-compilation], 3215c3e29c03Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3216c3e29c03Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 32174b0ead49Smrg 3218c3e29c03SmrgAC_LANG_CASE( 3219c3e29c03Smrg [C], [ 3220c3e29c03Smrg define([PREFIX], [C]) 3221c3e29c03Smrg ], 3222c3e29c03Smrg [C++], [ 3223c3e29c03Smrg define([PREFIX], [CXX]) 3224c3e29c03Smrg ] 3225c3e29c03Smrg) 32264b0ead49Smrg 3227c3e29c03Smrg[STRICT_]PREFIX[FLAGS]="" 3228c3e29c03SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3229c3e29c03SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 32304b0ead49Smrg 3231c3e29c03Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3232c3e29c03Smrg# activate it with -Werror, so we add it here explicitly. 3233c3e29c03SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 32344b0ead49Smrg 3235c3e29c03Smrgif test "x$STRICT_COMPILE" = "xyes"; then 3236c3e29c03Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3237c3e29c03Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3238c3e29c03Smrgfi 3239c3e29c03SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3240c3e29c03SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3241c3e29c03SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3242c3e29c03Smrg]) # XORG_STRICT_OPTION 32434b0ead49Smrg 3244c3e29c03Smrg# XORG_DEFAULT_OPTIONS 3245c3e29c03Smrg# -------------------- 3246c3e29c03Smrg# Minimum version: 1.3.0 3247c3e29c03Smrg# 3248c3e29c03Smrg# Defines default options for X.Org modules. 3249c3e29c03Smrg# 3250c3e29c03SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3251c3e29c03SmrgAC_REQUIRE([AC_PROG_INSTALL]) 3252c3e29c03SmrgXORG_COMPILER_FLAGS 3253c3e29c03SmrgXORG_CWARNFLAGS 3254c3e29c03SmrgXORG_STRICT_OPTION 3255c3e29c03SmrgXORG_RELEASE_VERSION 3256c3e29c03SmrgXORG_CHANGELOG 3257c3e29c03SmrgXORG_INSTALL 3258c3e29c03SmrgXORG_MANPAGE_SECTIONS 3259c3e29c03Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3260c3e29c03Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3261c3e29c03Smrg]) # XORG_DEFAULT_OPTIONS 326249dc963fSmrg 3263c3e29c03Smrg# XORG_INSTALL() 3264c3e29c03Smrg# ---------------- 3265c3e29c03Smrg# Minimum version: 1.4.0 3266c3e29c03Smrg# 3267c3e29c03Smrg# Defines the variable INSTALL_CMD as the command to copy 3268c3e29c03Smrg# INSTALL from $prefix/share/util-macros. 3269c3e29c03Smrg# 3270c3e29c03SmrgAC_DEFUN([XORG_INSTALL], [ 3271c3e29c03SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3272c3e29c03Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3273c3e29c03SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3274c3e29c03Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3275c3e29c03Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3276c3e29c03Smrgtouch \$(top_srcdir)/INSTALL; \ 3277c3e29c03Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3278c3e29c03SmrgAC_SUBST([INSTALL_CMD]) 3279c3e29c03Smrg]) # XORG_INSTALL 3280c3e29c03Smrgdnl Copyright 2005 Red Hat, Inc 3281c3e29c03Smrgdnl 3282c3e29c03Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3283c3e29c03Smrgdnl documentation for any purpose is hereby granted without fee, provided that 3284c3e29c03Smrgdnl the above copyright notice appear in all copies and that both that 3285c3e29c03Smrgdnl copyright notice and this permission notice appear in supporting 3286c3e29c03Smrgdnl documentation. 3287c3e29c03Smrgdnl 3288c3e29c03Smrgdnl The above copyright notice and this permission notice shall be included 3289c3e29c03Smrgdnl in all copies or substantial portions of the Software. 3290c3e29c03Smrgdnl 3291c3e29c03Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3292c3e29c03Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3293c3e29c03Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3294c3e29c03Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3295c3e29c03Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3296c3e29c03Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3297c3e29c03Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 3298c3e29c03Smrgdnl 3299c3e29c03Smrgdnl Except as contained in this notice, the name of the copyright holders shall 3300c3e29c03Smrgdnl not be used in advertising or otherwise to promote the sale, use or 3301c3e29c03Smrgdnl other dealings in this Software without prior written authorization 3302c3e29c03Smrgdnl from the copyright holders. 3303c3e29c03Smrgdnl 330449dc963fSmrg 3305c3e29c03Smrg# XORG_RELEASE_VERSION 3306c3e29c03Smrg# -------------------- 3307c3e29c03Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 330849dc963fSmrg 3309c3e29c03SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3310c3e29c03Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3311c3e29c03Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3312c3e29c03Smrg [Major version of this package]) 3313c3e29c03Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3314c3e29c03Smrg if test "x$PVM" = "x"; then 3315c3e29c03Smrg PVM="0" 3316c3e29c03Smrg fi 3317c3e29c03Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3318c3e29c03Smrg [$PVM], 3319c3e29c03Smrg [Minor version of this package]) 3320c3e29c03Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3321c3e29c03Smrg if test "x$PVP" = "x"; then 3322c3e29c03Smrg PVP="0" 3323c3e29c03Smrg fi 3324c3e29c03Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3325c3e29c03Smrg [$PVP], 3326c3e29c03Smrg [Patch version of this package]) 3327c3e29c03Smrg]) 332849dc963fSmrg 3329c3e29c03Smrg# XORG_CHANGELOG() 3330c3e29c03Smrg# ---------------- 3331c3e29c03Smrg# Minimum version: 1.2.0 3332c3e29c03Smrg# 3333c3e29c03Smrg# Defines the variable CHANGELOG_CMD as the command to generate 3334c3e29c03Smrg# ChangeLog from git. 3335c3e29c03Smrg# 3336c3e29c03Smrg# 3337c3e29c03SmrgAC_DEFUN([XORG_CHANGELOG], [ 3338c3e29c03SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3339c3e29c03Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3340c3e29c03Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3341c3e29c03Smrgtouch \$(top_srcdir)/ChangeLog; \ 3342c3e29c03Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3343c3e29c03SmrgAC_SUBST([CHANGELOG_CMD]) 3344c3e29c03Smrg]) # XORG_CHANGELOG 334549dc963fSmrg 3346c3e29c03Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3347c3e29c03Smrg# 3348c3e29c03Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3349c3e29c03Smrg# Foundation, Inc. 3350c3e29c03Smrg# Written by Gordon Matzigkeit, 1996 3351c3e29c03Smrg# 3352c3e29c03Smrg# This file is free software; the Free Software Foundation gives 3353c3e29c03Smrg# unlimited permission to copy and/or distribute it, with or without 3354c3e29c03Smrg# modifications, as long as this notice is preserved. 33554b0ead49Smrg 3356c3e29c03Smrgm4_define([_LT_COPYING], [dnl 3357c3e29c03Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 3358c3e29c03Smrg# This is free software; see the source for copying conditions. There is NO 3359c3e29c03Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 336026372658Smrg 3361c3e29c03Smrg# GNU Libtool is free software; you can redistribute it and/or modify 3362c3e29c03Smrg# it under the terms of the GNU General Public License as published by 3363c3e29c03Smrg# the Free Software Foundation; either version 2 of of the License, or 3364c3e29c03Smrg# (at your option) any later version. 3365c3e29c03Smrg# 3366c3e29c03Smrg# As a special exception to the GNU General Public License, if you 3367c3e29c03Smrg# distribute this file as part of a program or library that is built 3368c3e29c03Smrg# using GNU Libtool, you may include this file under the same 3369c3e29c03Smrg# distribution terms that you use for the rest of that program. 3370c3e29c03Smrg# 3371c3e29c03Smrg# GNU Libtool is distributed in the hope that it will be useful, but 3372c3e29c03Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3373c3e29c03Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3374c3e29c03Smrg# GNU General Public License for more details. 3375c3e29c03Smrg# 3376c3e29c03Smrg# You should have received a copy of the GNU General Public License 3377c3e29c03Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3378c3e29c03Smrg]) 33794b0ead49Smrg 3380c3e29c03Smrg# serial 59 LT_INIT 33814b0ead49Smrg 33824b0ead49Smrg 3383c3e29c03Smrg# LT_PREREQ(VERSION) 3384c3e29c03Smrg# ------------------ 3385c3e29c03Smrg# Complain and exit if this libtool version is less that VERSION. 3386c3e29c03Smrgm4_defun([LT_PREREQ], 3387c3e29c03Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3388c3e29c03Smrg [m4_default([$3], 3389c3e29c03Smrg [m4_fatal([Libtool version $1 or higher is required], 3390c3e29c03Smrg 63)])], 3391c3e29c03Smrg [$2])]) 33924b0ead49Smrg 33937aa89044Smrg 3394c3e29c03Smrg# _LT_CHECK_BUILDDIR 3395c3e29c03Smrg# ------------------ 3396c3e29c03Smrg# Complain if the absolute build directory name contains unusual characters 3397c3e29c03Smrgm4_defun([_LT_CHECK_BUILDDIR], 3398c3e29c03Smrg[case `pwd` in 3399c3e29c03Smrg *\ * | *\ *) 3400c3e29c03Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3401c3e29c03Smrgesac 3402c3e29c03Smrg]) 340326372658Smrg 340426372658Smrg 3405c3e29c03Smrg# LT_INIT([OPTIONS]) 3406c3e29c03Smrg# ------------------ 3407c3e29c03SmrgAC_DEFUN([LT_INIT], 3408c3e29c03Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3409c3e29c03SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3410c3e29c03SmrgAC_BEFORE([$0], [LT_LANG])dnl 3411c3e29c03SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 3412c3e29c03SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 3413c3e29c03Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 341426372658Smrg 3415c3e29c03Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 3416c3e29c03Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3417c3e29c03Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3418c3e29c03Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3419c3e29c03Smrgdnl unless we require an AC_DEFUNed macro: 3420c3e29c03SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 3421c3e29c03SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 3422c3e29c03SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 3423c3e29c03SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 3424c3e29c03Smrgm4_require([_LT_PROG_LTMAIN])dnl 34254b0ead49Smrg 3426c3e29c03Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 342726372658Smrg 3428c3e29c03Smrgdnl Parse OPTIONS 3429c3e29c03Smrg_LT_SET_OPTIONS([$0], [$1]) 34304b0ead49Smrg 3431c3e29c03Smrg# This can be used to rebuild libtool when needed 3432c3e29c03SmrgLIBTOOL_DEPS=$ltmain 34334b0ead49Smrg 3434c3e29c03Smrg# Always use our own libtool. 3435c3e29c03SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 3436c3e29c03SmrgAC_SUBST(LIBTOOL)dnl 343749dc963fSmrg 3438c3e29c03Smrg_LT_SETUP 34394b0ead49Smrg 3440c3e29c03Smrg# Only expand once: 3441c3e29c03Smrgm4_define([LT_INIT]) 3442c3e29c03Smrg])# LT_INIT 34434b0ead49Smrg 3444c3e29c03Smrg# Old names: 3445c3e29c03SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3446c3e29c03SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3447c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 3448c3e29c03Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3449c3e29c03Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 34504b0ead49Smrg 34514e7590efSmrg 3452c3e29c03Smrg# _LT_PREPARE_CC_BASENAME 3453c3e29c03Smrg# ----------------------- 3454c3e29c03Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 3455c3e29c03Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3456c3e29c03Smrgfunc_cc_basename () 3457c3e29c03Smrg{ 3458c3e29c03Smrg for cc_temp in @S|@*""; do 3459c3e29c03Smrg case $cc_temp in 3460c3e29c03Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3461c3e29c03Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3462c3e29c03Smrg \-*) ;; 3463c3e29c03Smrg *) break;; 346426372658Smrg esac 3465c3e29c03Smrg done 3466c3e29c03Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3467c3e29c03Smrg} 3468c3e29c03Smrg])# _LT_PREPARE_CC_BASENAME 34697aa89044Smrg 347052b01e16Smrg 3471c3e29c03Smrg# _LT_CC_BASENAME(CC) 3472c3e29c03Smrg# ------------------- 3473c3e29c03Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3474c3e29c03Smrg# but that macro is also expanded into generated libtool script, which 3475c3e29c03Smrg# arranges for $SED and $ECHO to be set by different means. 3476c3e29c03Smrgm4_defun([_LT_CC_BASENAME], 3477c3e29c03Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3478c3e29c03SmrgAC_REQUIRE([_LT_DECL_SED])dnl 3479c3e29c03SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3480c3e29c03Smrgfunc_cc_basename $1 3481c3e29c03Smrgcc_basename=$func_cc_basename_result 3482c3e29c03Smrg]) 34834b0ead49Smrg 34844b0ead49Smrg 3485c3e29c03Smrg# _LT_FILEUTILS_DEFAULTS 3486c3e29c03Smrg# ---------------------- 3487c3e29c03Smrg# It is okay to use these file commands and assume they have been set 3488c3e29c03Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3489c3e29c03Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 3490c3e29c03Smrg[: ${CP="cp -f"} 3491c3e29c03Smrg: ${MV="mv -f"} 3492c3e29c03Smrg: ${RM="rm -f"} 3493c3e29c03Smrg])# _LT_FILEUTILS_DEFAULTS 34944b0ead49Smrg 34954b0ead49Smrg 3496c3e29c03Smrg# _LT_SETUP 3497c3e29c03Smrg# --------- 3498c3e29c03Smrgm4_defun([_LT_SETUP], 3499c3e29c03Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3500c3e29c03SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3501c3e29c03SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3502c3e29c03SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3503c3e29c03Smrg 3504c3e29c03Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3505c3e29c03Smrgdnl 3506c3e29c03Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 3507c3e29c03Smrg_LT_DECL([], [host], [0])dnl 3508c3e29c03Smrg_LT_DECL([], [host_os], [0])dnl 3509c3e29c03Smrgdnl 3510c3e29c03Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 3511c3e29c03Smrg_LT_DECL([], [build], [0])dnl 3512c3e29c03Smrg_LT_DECL([], [build_os], [0])dnl 3513c3e29c03Smrgdnl 3514c3e29c03SmrgAC_REQUIRE([AC_PROG_CC])dnl 3515c3e29c03SmrgAC_REQUIRE([LT_PATH_LD])dnl 3516c3e29c03SmrgAC_REQUIRE([LT_PATH_NM])dnl 3517c3e29c03Smrgdnl 3518c3e29c03SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 3519c3e29c03Smrgtest -z "$LN_S" && LN_S="ln -s" 3520c3e29c03Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3521c3e29c03Smrgdnl 3522c3e29c03SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 3523c3e29c03Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3524c3e29c03Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3525c3e29c03Smrgdnl 3526c3e29c03Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3527c3e29c03Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3528c3e29c03Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3529c3e29c03Smrgm4_require([_LT_CMD_RELOAD])dnl 3530c3e29c03Smrgm4_require([_LT_DECL_FILECMD])dnl 3531c3e29c03Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 3532c3e29c03Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3533c3e29c03Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 3534c3e29c03Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3535c3e29c03Smrgm4_require([_LT_WITH_SYSROOT])dnl 3536c3e29c03Smrgm4_require([_LT_CMD_TRUNCATE])dnl 3537c3e29c03Smrg 3538c3e29c03Smrg_LT_CONFIG_LIBTOOL_INIT([ 3539c3e29c03Smrg# See if we are running on zsh, and set the options that allow our 3540c3e29c03Smrg# commands through without removal of \ escapes INIT. 3541c3e29c03Smrgif test -n "\${ZSH_VERSION+set}"; then 3542c3e29c03Smrg setopt NO_GLOB_SUBST 3543c3e29c03Smrgfi 3544c3e29c03Smrg]) 3545c3e29c03Smrgif test -n "${ZSH_VERSION+set}"; then 3546c3e29c03Smrg setopt NO_GLOB_SUBST 3547c3e29c03Smrgfi 3548c3e29c03Smrg 3549c3e29c03Smrg_LT_CHECK_OBJDIR 3550c3e29c03Smrg 3551c3e29c03Smrgm4_require([_LT_TAG_COMPILER])dnl 3552c3e29c03Smrg 355326372658Smrgcase $host_os in 3554c3e29c03Smrgaix3*) 3555c3e29c03Smrg # AIX sometimes has problems with the GCC collect2 program. For some 3556c3e29c03Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 3557c3e29c03Smrg # vanish in a puff of smoke. 3558c3e29c03Smrg if test set != "${COLLECT_NAMES+set}"; then 3559c3e29c03Smrg COLLECT_NAMES= 3560c3e29c03Smrg export COLLECT_NAMES 3561c3e29c03Smrg fi 3562c3e29c03Smrg ;; 356326372658Smrgesac 356452b01e16Smrg 3565c3e29c03Smrg# Global variables: 3566c3e29c03Smrgofile=libtool 3567c3e29c03Smrgcan_build_shared=yes 356849dc963fSmrg 3569c3e29c03Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 3570c3e29c03Smrg# ICC, which need '.lib'). 3571c3e29c03Smrglibext=a 357252b01e16Smrg 3573c3e29c03Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 357452b01e16Smrg 3575c3e29c03Smrgold_CC=$CC 3576c3e29c03Smrgold_CFLAGS=$CFLAGS 357752b01e16Smrg 3578c3e29c03Smrg# Set sane defaults for various variables 3579c3e29c03Smrgtest -z "$CC" && CC=cc 3580c3e29c03Smrgtest -z "$LTCC" && LTCC=$CC 3581c3e29c03Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3582c3e29c03Smrgtest -z "$LD" && LD=ld 3583c3e29c03Smrgtest -z "$ac_objext" && ac_objext=o 358452b01e16Smrg 3585c3e29c03Smrg_LT_CC_BASENAME([$compiler]) 358626372658Smrg 3587c3e29c03Smrg# Only perform the check for file, if the check method requires it 3588c3e29c03Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 3589c3e29c03Smrgcase $deplibs_check_method in 3590c3e29c03Smrgfile_magic*) 3591c3e29c03Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3592c3e29c03Smrg _LT_PATH_MAGIC 3593c3e29c03Smrg fi 35944e7590efSmrg ;; 3595c3e29c03Smrgesac 359652b01e16Smrg 3597c3e29c03Smrg# Use C for the default configuration in the libtool script 3598c3e29c03SmrgLT_SUPPORTED_TAG([CC]) 3599c3e29c03Smrg_LT_LANG_C_CONFIG 3600c3e29c03Smrg_LT_LANG_DEFAULT_CONFIG 3601c3e29c03Smrg_LT_CONFIG_COMMANDS 3602c3e29c03Smrg])# _LT_SETUP 36034b0ead49Smrg 360452b01e16Smrg 3605c3e29c03Smrg# _LT_PREPARE_SED_QUOTE_VARS 3606c3e29c03Smrg# -------------------------- 3607c3e29c03Smrg# Define a few sed substitution that help us do robust quoting. 3608c3e29c03Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3609c3e29c03Smrg[# Backslashify metacharacters that are still active within 3610c3e29c03Smrg# double-quoted strings. 3611c3e29c03Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 361252b01e16Smrg 3613c3e29c03Smrg# Same as above, but do not quote variable references. 3614c3e29c03Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 36154b0ead49Smrg 3616c3e29c03Smrg# Sed substitution to delay expansion of an escaped shell variable in a 3617c3e29c03Smrg# double_quote_subst'ed string. 3618c3e29c03Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 36194b0ead49Smrg 3620c3e29c03Smrg# Sed substitution to delay expansion of an escaped single quote. 3621c3e29c03Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 36224b0ead49Smrg 3623c3e29c03Smrg# Sed substitution to avoid accidental globbing in evaled expressions 3624c3e29c03Smrgno_glob_subst='s/\*/\\\*/g' 3625c3e29c03Smrg]) 36264b0ead49Smrg 3627c3e29c03Smrg# _LT_PROG_LTMAIN 3628c3e29c03Smrg# --------------- 3629c3e29c03Smrg# Note that this code is called both from 'configure', and 'config.status' 3630c3e29c03Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3631c3e29c03Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3632c3e29c03Smrg# so we pass a copy along to make sure it has a sensible value anyway. 3633c3e29c03Smrgm4_defun([_LT_PROG_LTMAIN], 3634c3e29c03Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3635c3e29c03Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3636c3e29c03Smrgltmain=$ac_aux_dir/ltmain.sh 3637c3e29c03Smrg])# _LT_PROG_LTMAIN 36384b0ead49Smrg 36394b0ead49Smrg 364026372658Smrg 3641c3e29c03Smrg# So that we can recreate a full libtool script including additional 3642c3e29c03Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3643c3e29c03Smrg# in macros and then make a single call at the end using the 'libtool' 3644c3e29c03Smrg# label. 36454b0ead49Smrg 36464e7590efSmrg 3647c3e29c03Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3648c3e29c03Smrg# ---------------------------------------- 3649c3e29c03Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3650c3e29c03Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3651c3e29c03Smrg[m4_ifval([$1], 3652c3e29c03Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3653c3e29c03Smrg [$1 3654c3e29c03Smrg])])]) 36554b0ead49Smrg 3656c3e29c03Smrg# Initialize. 3657c3e29c03Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 36584b0ead49Smrg 36594b0ead49Smrg 3660c3e29c03Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3661c3e29c03Smrg# ------------------------------ 3662c3e29c03Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3663c3e29c03Smrgm4_define([_LT_CONFIG_LIBTOOL], 3664c3e29c03Smrg[m4_ifval([$1], 3665c3e29c03Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3666c3e29c03Smrg [$1 3667c3e29c03Smrg])])]) 36684b0ead49Smrg 3669c3e29c03Smrg# Initialize. 3670c3e29c03Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 36714b0ead49Smrg 36724b0ead49Smrg 3673c3e29c03Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3674c3e29c03Smrg# ----------------------------------------------------- 3675c3e29c03Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3676c3e29c03Smrg[_LT_CONFIG_LIBTOOL([$1]) 3677c3e29c03Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3678c3e29c03Smrg]) 36794e7590efSmrg 36804b0ead49Smrg 3681c3e29c03Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3682c3e29c03Smrg# ----------------------------- 3683c3e29c03Smrg# Add leading comment marks to the start of each line, and a trailing 3684c3e29c03Smrg# full-stop to the whole comment if one is not present already. 3685c3e29c03Smrgm4_define([_LT_FORMAT_COMMENT], 3686c3e29c03Smrg[m4_ifval([$1], [ 3687c3e29c03Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3688c3e29c03Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3689c3e29c03Smrg)]) 36904e7590efSmrg 36914b0ead49Smrg 36924e7590efSmrg 36934e7590efSmrg 369452b01e16Smrg 3695c3e29c03Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3696c3e29c03Smrg# ------------------------------------------------------------------- 3697c3e29c03Smrg# CONFIGNAME is the name given to the value in the libtool script. 3698c3e29c03Smrg# VARNAME is the (base) name used in the configure script. 3699c3e29c03Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3700c3e29c03Smrg# VARNAME. Any other value will be used directly. 3701c3e29c03Smrgm4_define([_LT_DECL], 3702c3e29c03Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3703c3e29c03Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3704c3e29c03Smrg [m4_ifval([$1], [$1], [$2])]) 3705c3e29c03Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3706c3e29c03Smrg m4_ifval([$4], 3707c3e29c03Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3708c3e29c03Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3709c3e29c03Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3710c3e29c03Smrg]) 371152b01e16Smrg 37127aa89044Smrg 3713c3e29c03Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3714c3e29c03Smrg# -------------------------------------------------------- 3715c3e29c03Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 371649dc963fSmrg 37174b0ead49Smrg 3718c3e29c03Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3719c3e29c03Smrg# ------------------------------------------------ 3720c3e29c03Smrgm4_define([lt_decl_tag_varnames], 3721c3e29c03Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 37224b0ead49Smrg 3723c3e29c03Smrg 3724c3e29c03Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3725c3e29c03Smrg# --------------------------------------------------------- 3726c3e29c03Smrgm4_define([_lt_decl_filter], 3727c3e29c03Smrg[m4_case([$#], 3728c3e29c03Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3729c3e29c03Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3730c3e29c03Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3731c3e29c03Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3732c3e29c03Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 373326372658Smrg]) 37344b0ead49Smrg 373552b01e16Smrg 3736c3e29c03Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3737c3e29c03Smrg# -------------------------------------------------- 3738c3e29c03Smrgm4_define([lt_decl_quote_varnames], 3739c3e29c03Smrg[_lt_decl_filter([value], [1], $@)]) 37404b0ead49Smrg 37414e7590efSmrg 3742c3e29c03Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3743c3e29c03Smrg# --------------------------------------------------- 3744c3e29c03Smrgm4_define([lt_decl_dquote_varnames], 3745c3e29c03Smrg[_lt_decl_filter([value], [2], $@)]) 37464b0ead49Smrg 37474b0ead49Smrg 3748c3e29c03Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3749c3e29c03Smrg# --------------------------------------------------- 3750c3e29c03Smrgm4_define([lt_decl_varnames_tagged], 3751c3e29c03Smrg[m4_assert([$# <= 2])dnl 3752c3e29c03Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 3753c3e29c03Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3754c3e29c03Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3755c3e29c03Smrgm4_define([_lt_decl_varnames_tagged], 3756c3e29c03Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 37574b0ead49Smrg 37584b0ead49Smrg 3759c3e29c03Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3760c3e29c03Smrg# ------------------------------------------------ 3761c3e29c03Smrgm4_define([lt_decl_all_varnames], 3762c3e29c03Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3763c3e29c03Smrg m4_if([$2], [], 3764c3e29c03Smrg m4_quote(lt_decl_varnames), 3765c3e29c03Smrg m4_quote(m4_shift($@))))[]dnl 3766c3e29c03Smrg]) 3767c3e29c03Smrgm4_define([_lt_decl_all_varnames], 3768c3e29c03Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 3769c3e29c03Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3770c3e29c03Smrg]) 377152b01e16Smrg 37724b0ead49Smrg 3773c3e29c03Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3774c3e29c03Smrg# ------------------------------------ 3775c3e29c03Smrg# Quote a variable value, and forward it to 'config.status' so that its 3776c3e29c03Smrg# declaration there will have the same value as in 'configure'. VARNAME 3777c3e29c03Smrg# must have a single quote delimited value for this to work. 3778c3e29c03Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3779c3e29c03Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 378049dc963fSmrg 37814b0ead49Smrg 3782c3e29c03Smrg# _LT_CONFIG_STATUS_DECLARATIONS 3783c3e29c03Smrg# ------------------------------ 3784c3e29c03Smrg# We delimit libtool config variables with single quotes, so when 3785c3e29c03Smrg# we write them to config.status, we have to be sure to quote all 3786c3e29c03Smrg# embedded single quotes properly. In configure, this macro expands 3787c3e29c03Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3788c3e29c03Smrg# 3789c3e29c03Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3790c3e29c03Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3791c3e29c03Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3792c3e29c03Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 379349dc963fSmrg 379449dc963fSmrg 3795c3e29c03Smrg# _LT_LIBTOOL_TAGS 3796c3e29c03Smrg# ---------------- 3797c3e29c03Smrg# Output comment and list of tags supported by the script 3798c3e29c03Smrgm4_defun([_LT_LIBTOOL_TAGS], 3799c3e29c03Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3800c3e29c03Smrgavailable_tags='_LT_TAGS'dnl 3801c3e29c03Smrg]) 38024b0ead49Smrg 380352b01e16Smrg 3804c3e29c03Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3805c3e29c03Smrg# ----------------------------------- 3806c3e29c03Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3807c3e29c03Smrg# expand to a commented shell variable setting: 3808c3e29c03Smrg# 3809c3e29c03Smrg# # Some comment about what VAR is for. 3810c3e29c03Smrg# visible_name=$lt_internal_name 3811c3e29c03Smrgm4_define([_LT_LIBTOOL_DECLARE], 3812c3e29c03Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3813c3e29c03Smrg [description])))[]dnl 3814c3e29c03Smrgm4_pushdef([_libtool_name], 3815c3e29c03Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3816c3e29c03Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3817c3e29c03Smrg [0], [_libtool_name=[$]$1], 3818c3e29c03Smrg [1], [_libtool_name=$lt_[]$1], 3819c3e29c03Smrg [2], [_libtool_name=$lt_[]$1], 3820c3e29c03Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3821c3e29c03Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3822c3e29c03Smrg]) 38234b0ead49Smrg 38244b0ead49Smrg 3825c3e29c03Smrg# _LT_LIBTOOL_CONFIG_VARS 3826c3e29c03Smrg# ----------------------- 3827c3e29c03Smrg# Produce commented declarations of non-tagged libtool config variables 3828c3e29c03Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3829c3e29c03Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3830c3e29c03Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 3831c3e29c03Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 3832c3e29c03Smrg[m4_foreach([_lt_var], 3833c3e29c03Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3834c3e29c03Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 383549dc963fSmrg 38364e7590efSmrg 3837c3e29c03Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 3838c3e29c03Smrg# ------------------------- 3839c3e29c03Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 3840c3e29c03Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3841c3e29c03Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 38424e7590efSmrg 38434e7590efSmrg 3844c3e29c03Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 3845c3e29c03Smrg# ------------------------------ 3846c3e29c03Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 38474e7590efSmrg 384826372658Smrg 3849c3e29c03Smrg# _LT_CONFIG_COMMANDS 3850c3e29c03Smrg# ------------------- 3851c3e29c03Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3852c3e29c03Smrg# variables for single and double quote escaping we saved from calls 3853c3e29c03Smrg# to _LT_DECL, we can put quote escaped variables declarations 3854c3e29c03Smrg# into 'config.status', and then the shell code to quote escape them in 3855c3e29c03Smrg# for loops in 'config.status'. Finally, any additional code accumulated 3856c3e29c03Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3857c3e29c03Smrgm4_defun([_LT_CONFIG_COMMANDS], 3858c3e29c03Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3859c3e29c03Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3860c3e29c03Smrg dnl instead of duplicating it all over again into config.status, 3861c3e29c03Smrg dnl then we will have config.status run $CONFIG_LT later, so it 3862c3e29c03Smrg dnl needs to know what name is stored there: 3863c3e29c03Smrg [AC_CONFIG_COMMANDS([libtool], 3864c3e29c03Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3865c3e29c03Smrg dnl If the libtool generation code is destined for config.status, 3866c3e29c03Smrg dnl expand the accumulated commands and init code now: 3867c3e29c03Smrg [AC_CONFIG_COMMANDS([libtool], 3868c3e29c03Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3869c3e29c03Smrg])#_LT_CONFIG_COMMANDS 38704e7590efSmrg 38714e7590efSmrg 3872c3e29c03Smrg# Initialize. 3873c3e29c03Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3874c3e29c03Smrg[ 387552b01e16Smrg 3876c3e29c03Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3877c3e29c03Smrg# if CDPATH is set. 3878c3e29c03Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 387926372658Smrg 3880c3e29c03Smrgsed_quote_subst='$sed_quote_subst' 3881c3e29c03Smrgdouble_quote_subst='$double_quote_subst' 3882c3e29c03Smrgdelay_variable_subst='$delay_variable_subst' 3883c3e29c03Smrg_LT_CONFIG_STATUS_DECLARATIONS 3884c3e29c03SmrgLTCC='$LTCC' 3885c3e29c03SmrgLTCFLAGS='$LTCFLAGS' 3886c3e29c03Smrgcompiler='$compiler_DEFAULT' 388752b01e16Smrg 3888c3e29c03Smrg# A function that is used when there is no print builtin or printf. 3889c3e29c03Smrgfunc_fallback_echo () 3890c3e29c03Smrg{ 3891c3e29c03Smrg eval 'cat <<_LTECHO_EOF 3892c3e29c03Smrg\$[]1 3893c3e29c03Smrg_LTECHO_EOF' 389426372658Smrg} 389549dc963fSmrg 3896c3e29c03Smrg# Quote evaled strings. 3897c3e29c03Smrgfor var in lt_decl_all_varnames([[ \ 3898c3e29c03Smrg]], lt_decl_quote_varnames); do 3899c3e29c03Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3900c3e29c03Smrg *[[\\\\\\\`\\"\\\$]]*) 3901c3e29c03Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3902c3e29c03Smrg ;; 3903c3e29c03Smrg *) 3904c3e29c03Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3905c3e29c03Smrg ;; 3906c3e29c03Smrg esac 3907c3e29c03Smrgdone 39084b0ead49Smrg 3909c3e29c03Smrg# Double-quote double-evaled strings. 3910c3e29c03Smrgfor var in lt_decl_all_varnames([[ \ 3911c3e29c03Smrg]], lt_decl_dquote_varnames); do 3912c3e29c03Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3913c3e29c03Smrg *[[\\\\\\\`\\"\\\$]]*) 3914c3e29c03Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3915c3e29c03Smrg ;; 3916c3e29c03Smrg *) 3917c3e29c03Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3918c3e29c03Smrg ;; 3919c3e29c03Smrg esac 3920c3e29c03Smrgdone 39214b0ead49Smrg 3922c3e29c03Smrg_LT_OUTPUT_LIBTOOL_INIT 3923c3e29c03Smrg]) 39244e7590efSmrg 3925c3e29c03Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3926c3e29c03Smrg# ------------------------------------ 3927c3e29c03Smrg# Generate a child script FILE with all initialization necessary to 3928c3e29c03Smrg# reuse the environment learned by the parent script, and make the 3929c3e29c03Smrg# file executable. If COMMENT is supplied, it is inserted after the 3930c3e29c03Smrg# '#!' sequence but before initialization text begins. After this 3931c3e29c03Smrg# macro, additional text can be appended to FILE to form the body of 3932c3e29c03Smrg# the child script. The macro ends with non-zero status if the 3933c3e29c03Smrg# file could not be fully written (such as if the disk is full). 3934c3e29c03Smrgm4_ifdef([AS_INIT_GENERATED], 3935c3e29c03Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3936c3e29c03Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 3937c3e29c03Smrg[m4_require([AS_PREPARE])]dnl 3938c3e29c03Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3939c3e29c03Smrg[lt_write_fail=0 3940c3e29c03Smrgcat >$1 <<_ASEOF || lt_write_fail=1 3941c3e29c03Smrg#! $SHELL 3942c3e29c03Smrg# Generated by $as_me. 3943c3e29c03Smrg$2 3944c3e29c03SmrgSHELL=\${CONFIG_SHELL-$SHELL} 3945c3e29c03Smrgexport SHELL 3946c3e29c03Smrg_ASEOF 3947c3e29c03Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 3948c3e29c03SmrgAS_SHELL_SANITIZE 3949c3e29c03Smrg_AS_PREPARE 3950c3e29c03Smrgexec AS_MESSAGE_FD>&1 3951c3e29c03Smrg_ASEOF 3952c3e29c03Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 3953c3e29c03Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 39544b0ead49Smrg 3955c3e29c03Smrg# LT_OUTPUT 3956c3e29c03Smrg# --------- 3957c3e29c03Smrg# This macro allows early generation of the libtool script (before 3958c3e29c03Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 3959c3e29c03Smrg# tests. 3960c3e29c03SmrgAC_DEFUN([LT_OUTPUT], 3961c3e29c03Smrg[: ${CONFIG_LT=./config.lt} 3962c3e29c03SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 3963c3e29c03Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3964c3e29c03Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 39654b0ead49Smrg 3966c3e29c03Smrgcat >>"$CONFIG_LT" <<\_LTEOF 3967c3e29c03Smrglt_cl_silent=false 3968c3e29c03Smrgexec AS_MESSAGE_LOG_FD>>config.log 396949dc963fSmrg{ 3970c3e29c03Smrg echo 3971c3e29c03Smrg AS_BOX([Running $as_me.]) 3972c3e29c03Smrg} >&AS_MESSAGE_LOG_FD 39734b0ead49Smrg 3974c3e29c03Smrglt_cl_help="\ 3975c3e29c03Smrg'$as_me' creates a local libtool stub from the current configuration, 3976c3e29c03Smrgfor use in further configure time tests before the real libtool is 3977c3e29c03Smrggenerated. 39784b0ead49Smrg 3979c3e29c03SmrgUsage: $[0] [[OPTIONS]] 39804b0ead49Smrg 3981c3e29c03Smrg -h, --help print this help, then exit 3982c3e29c03Smrg -V, --version print version number, then exit 3983c3e29c03Smrg -q, --quiet do not print progress messages 3984c3e29c03Smrg -d, --debug don't remove temporary files 39854b0ead49Smrg 3986c3e29c03SmrgReport bugs to <bug-libtool@gnu.org>." 39874e7590efSmrg 3988c3e29c03Smrglt_cl_version="\ 3989c3e29c03Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3990c3e29c03Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3991c3e29c03Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 39924b0ead49Smrg 3993c3e29c03SmrgCopyright (C) 2011 Free Software Foundation, Inc. 3994c3e29c03SmrgThis config.lt script is free software; the Free Software Foundation 3995c3e29c03Smrggives unlimited permision to copy, distribute and modify it." 39964b0ead49Smrg 3997c3e29c03Smrgwhile test 0 != $[#] 3998c3e29c03Smrgdo 3999c3e29c03Smrg case $[1] in 4000c3e29c03Smrg --version | --v* | -V ) 4001c3e29c03Smrg echo "$lt_cl_version"; exit 0 ;; 4002c3e29c03Smrg --help | --h* | -h ) 4003c3e29c03Smrg echo "$lt_cl_help"; exit 0 ;; 4004c3e29c03Smrg --debug | --d* | -d ) 4005c3e29c03Smrg debug=: ;; 4006c3e29c03Smrg --quiet | --q* | --silent | --s* | -q ) 4007c3e29c03Smrg lt_cl_silent=: ;; 40084b0ead49Smrg 4009c3e29c03Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4010c3e29c03SmrgTry '$[0] --help' for more information.]) ;; 40114b0ead49Smrg 4012c3e29c03Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4013c3e29c03SmrgTry '$[0] --help' for more information.]) ;; 4014c3e29c03Smrg esac 4015c3e29c03Smrg shift 4016c3e29c03Smrgdone 40174b0ead49Smrg 4018c3e29c03Smrgif $lt_cl_silent; then 4019c3e29c03Smrg exec AS_MESSAGE_FD>/dev/null 4020c3e29c03Smrgfi 4021c3e29c03Smrg_LTEOF 40224b0ead49Smrg 4023c3e29c03Smrgcat >>"$CONFIG_LT" <<_LTEOF 4024c3e29c03Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4025c3e29c03Smrg_LTEOF 40264b0ead49Smrg 4027c3e29c03Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4028c3e29c03SmrgAC_MSG_NOTICE([creating $ofile]) 4029c3e29c03Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 4030c3e29c03SmrgAS_EXIT(0) 4031c3e29c03Smrg_LTEOF 4032c3e29c03Smrgchmod +x "$CONFIG_LT" 40334b0ead49Smrg 4034c3e29c03Smrg# configure is writing to config.log, but config.lt does its own redirection, 4035c3e29c03Smrg# appending to config.log, which fails on DOS, as config.log is still kept 4036c3e29c03Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4037c3e29c03Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4038c3e29c03Smrglt_cl_success=: 4039c3e29c03Smrgtest yes = "$silent" && 4040c3e29c03Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 4041c3e29c03Smrgexec AS_MESSAGE_LOG_FD>/dev/null 4042c3e29c03Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4043c3e29c03Smrgexec AS_MESSAGE_LOG_FD>>config.log 4044c3e29c03Smrg$lt_cl_success || AS_EXIT(1) 4045c3e29c03Smrg])# LT_OUTPUT 40464b0ead49Smrg 40474b0ead49Smrg 4048c3e29c03Smrg# _LT_CONFIG(TAG) 4049c3e29c03Smrg# --------------- 4050c3e29c03Smrg# If TAG is the built-in tag, create an initial libtool script with a 4051c3e29c03Smrg# default configuration from the untagged config vars. Otherwise add code 4052c3e29c03Smrg# to config.status for appending the configuration named by TAG from the 4053c3e29c03Smrg# matching tagged config vars. 4054c3e29c03Smrgm4_defun([_LT_CONFIG], 4055c3e29c03Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4056c3e29c03Smrg_LT_CONFIG_SAVE_COMMANDS([ 4057c3e29c03Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4058c3e29c03Smrg m4_if(_LT_TAG, [C], [ 4059c3e29c03Smrg # See if we are running on zsh, and set the options that allow our 4060c3e29c03Smrg # commands through without removal of \ escapes. 4061c3e29c03Smrg if test -n "${ZSH_VERSION+set}"; then 4062c3e29c03Smrg setopt NO_GLOB_SUBST 4063c3e29c03Smrg fi 40644b0ead49Smrg 4065c3e29c03Smrg cfgfile=${ofile}T 4066c3e29c03Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4067c3e29c03Smrg $RM "$cfgfile" 40684b0ead49Smrg 4069c3e29c03Smrg cat <<_LT_EOF >> "$cfgfile" 4070c3e29c03Smrg#! $SHELL 4071c3e29c03Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4072c3e29c03Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4073c3e29c03Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4074c3e29c03Smrg 4075c3e29c03Smrg# Provide generalized library-building support services. 4076c3e29c03Smrg# Written by Gordon Matzigkeit, 1996 4077c3e29c03Smrg 4078c3e29c03Smrg_LT_COPYING 4079c3e29c03Smrg_LT_LIBTOOL_TAGS 4080c3e29c03Smrg 4081c3e29c03Smrg# Configured defaults for sys_lib_dlsearch_path munging. 4082c3e29c03Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4083c3e29c03Smrg 4084c3e29c03Smrg# ### BEGIN LIBTOOL CONFIG 4085c3e29c03Smrg_LT_LIBTOOL_CONFIG_VARS 4086c3e29c03Smrg_LT_LIBTOOL_TAG_VARS 4087c3e29c03Smrg# ### END LIBTOOL CONFIG 408852b01e16Smrg 408949dc963fSmrg_LT_EOF 409052b01e16Smrg 4091c3e29c03Smrg cat <<'_LT_EOF' >> "$cfgfile" 409249dc963fSmrg 4093c3e29c03Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 40944b0ead49Smrg 4095c3e29c03Smrg_LT_PREPARE_MUNGE_PATH_LIST 4096c3e29c03Smrg_LT_PREPARE_CC_BASENAME 40974b0ead49Smrg 4098c3e29c03Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 40994b0ead49Smrg 4100c3e29c03Smrg_LT_EOF 4101c3e29c03Smrg 4102c3e29c03Smrg case $host_os in 4103c3e29c03Smrg aix3*) 4104c3e29c03Smrg cat <<\_LT_EOF >> "$cfgfile" 4105c3e29c03Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4106c3e29c03Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4107c3e29c03Smrg# vanish in a puff of smoke. 4108c3e29c03Smrgif test set != "${COLLECT_NAMES+set}"; then 4109c3e29c03Smrg COLLECT_NAMES= 4110c3e29c03Smrg export COLLECT_NAMES 4111c3e29c03Smrgfi 4112c3e29c03Smrg_LT_EOF 4113c3e29c03Smrg ;; 4114c3e29c03Smrg esac 4115c3e29c03Smrg 4116c3e29c03Smrg _LT_PROG_LTMAIN 41174b0ead49Smrg 4118c3e29c03Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4119c3e29c03Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4120c3e29c03Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4121c3e29c03Smrg # is reportedly fixed, but why not run on old versions too? 4122c3e29c03Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4123c3e29c03Smrg || (rm -f "$cfgfile"; exit 1) 41244b0ead49Smrg 4125c3e29c03Smrg mv -f "$cfgfile" "$ofile" || 4126c3e29c03Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4127c3e29c03Smrg chmod +x "$ofile" 4128c3e29c03Smrg], 4129c3e29c03Smrg[cat <<_LT_EOF >> "$ofile" 41304b0ead49Smrg 4131c3e29c03Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4132c3e29c03Smrgdnl in a comment (ie after a #). 4133c3e29c03Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4134c3e29c03Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4135c3e29c03Smrg# ### END LIBTOOL TAG CONFIG: $1 4136c3e29c03Smrg_LT_EOF 4137c3e29c03Smrg])dnl /m4_if 4138c3e29c03Smrg], 4139c3e29c03Smrg[m4_if([$1], [], [ 4140c3e29c03Smrg PACKAGE='$PACKAGE' 4141c3e29c03Smrg VERSION='$VERSION' 4142c3e29c03Smrg RM='$RM' 4143c3e29c03Smrg ofile='$ofile'], []) 4144c3e29c03Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4145c3e29c03Smrg])# _LT_CONFIG 41464b0ead49Smrg 41474b0ead49Smrg 4148c3e29c03Smrg# LT_SUPPORTED_TAG(TAG) 4149c3e29c03Smrg# --------------------- 4150c3e29c03Smrg# Trace this macro to discover what tags are supported by the libtool 4151c3e29c03Smrg# --tag option, using: 4152c3e29c03Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4153c3e29c03SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 41544b0ead49Smrg 41554b0ead49Smrg 4156c3e29c03Smrg# C support is built-in for now 4157c3e29c03Smrgm4_define([_LT_LANG_C_enabled], []) 4158c3e29c03Smrgm4_define([_LT_TAGS], []) 41594b0ead49Smrg 41604b0ead49Smrg 4161c3e29c03Smrg# LT_LANG(LANG) 4162c3e29c03Smrg# ------------- 4163c3e29c03Smrg# Enable libtool support for the given language if not already enabled. 4164c3e29c03SmrgAC_DEFUN([LT_LANG], 4165c3e29c03Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4166c3e29c03Smrgm4_case([$1], 4167c3e29c03Smrg [C], [_LT_LANG(C)], 4168c3e29c03Smrg [C++], [_LT_LANG(CXX)], 4169c3e29c03Smrg [Go], [_LT_LANG(GO)], 4170c3e29c03Smrg [Java], [_LT_LANG(GCJ)], 4171c3e29c03Smrg [Fortran 77], [_LT_LANG(F77)], 4172c3e29c03Smrg [Fortran], [_LT_LANG(FC)], 4173c3e29c03Smrg [Windows Resource], [_LT_LANG(RC)], 4174c3e29c03Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4175c3e29c03Smrg [_LT_LANG($1)], 4176c3e29c03Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4177c3e29c03Smrg])# LT_LANG 4178c3e29c03Smrg 4179c3e29c03Smrg 4180c3e29c03Smrg# _LT_LANG(LANGNAME) 4181c3e29c03Smrg# ------------------ 4182c3e29c03Smrgm4_defun([_LT_LANG], 4183c3e29c03Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4184c3e29c03Smrg [LT_SUPPORTED_TAG([$1])dnl 4185c3e29c03Smrg m4_append([_LT_TAGS], [$1 ])dnl 4186c3e29c03Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4187c3e29c03Smrg _LT_LANG_$1_CONFIG($1)])dnl 4188c3e29c03Smrg])# _LT_LANG 4189c3e29c03Smrg 41904b0ead49Smrg 4191c3e29c03Smrgm4_ifndef([AC_PROG_GO], [ 4192c3e29c03Smrg# NOTE: This macro has been submitted for inclusion into # 4193c3e29c03Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4194c3e29c03Smrg# a released version of Autoconf we should remove this # 4195c3e29c03Smrg# macro and use it instead. # 4196c3e29c03Smrgm4_defun([AC_PROG_GO], 4197c3e29c03Smrg[AC_LANG_PUSH(Go)dnl 4198c3e29c03SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4199c3e29c03SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4200c3e29c03Smrg_AC_ARG_VAR_LDFLAGS()dnl 4201c3e29c03SmrgAC_CHECK_TOOL(GOC, gccgo) 4202c3e29c03Smrgif test -z "$GOC"; then 4203c3e29c03Smrg if test -n "$ac_tool_prefix"; then 4204c3e29c03Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4205c3e29c03Smrg fi 4206c3e29c03Smrgfi 4207c3e29c03Smrgif test -z "$GOC"; then 4208c3e29c03Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4209c3e29c03Smrgfi 4210c3e29c03Smrg])#m4_defun 4211c3e29c03Smrg])#m4_ifndef 42124b0ead49Smrg 42134b0ead49Smrg 4214c3e29c03Smrg# _LT_LANG_DEFAULT_CONFIG 4215c3e29c03Smrg# ----------------------- 4216c3e29c03Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4217c3e29c03Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4218c3e29c03Smrg [LT_LANG(CXX)], 4219c3e29c03Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 42204b0ead49Smrg 4221c3e29c03SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4222c3e29c03Smrg [LT_LANG(F77)], 4223c3e29c03Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 42244b0ead49Smrg 4225c3e29c03SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4226c3e29c03Smrg [LT_LANG(FC)], 4227c3e29c03Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 42284b0ead49Smrg 4229c3e29c03Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4230c3e29c03Smrgdnl pulling things in needlessly. 4231c3e29c03SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4232c3e29c03Smrg [LT_LANG(GCJ)], 4233c3e29c03Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4234c3e29c03Smrg [LT_LANG(GCJ)], 4235c3e29c03Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4236c3e29c03Smrg [LT_LANG(GCJ)], 4237c3e29c03Smrg [m4_ifdef([AC_PROG_GCJ], 4238c3e29c03Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4239c3e29c03Smrg m4_ifdef([A][M_PROG_GCJ], 4240c3e29c03Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4241c3e29c03Smrg m4_ifdef([LT_PROG_GCJ], 4242c3e29c03Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 42434b0ead49Smrg 4244c3e29c03SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4245c3e29c03Smrg [LT_LANG(GO)], 4246c3e29c03Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 42474b0ead49Smrg 4248c3e29c03SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4249c3e29c03Smrg [LT_LANG(RC)], 4250c3e29c03Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4251c3e29c03Smrg])# _LT_LANG_DEFAULT_CONFIG 42524b0ead49Smrg 4253c3e29c03Smrg# Obsolete macros: 4254c3e29c03SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4255c3e29c03SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4256c3e29c03SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4257c3e29c03SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4258c3e29c03SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4259c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 4260c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4261c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4262c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4263c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4264c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 42654b0ead49Smrg 42664b0ead49Smrg 4267c3e29c03Smrg# _LT_TAG_COMPILER 4268c3e29c03Smrg# ---------------- 4269c3e29c03Smrgm4_defun([_LT_TAG_COMPILER], 4270c3e29c03Smrg[AC_REQUIRE([AC_PROG_CC])dnl 42714b0ead49Smrg 4272c3e29c03Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4273c3e29c03Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4274c3e29c03Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4275c3e29c03Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4276c3e29c03Smrg 4277c3e29c03Smrg# If no C compiler was specified, use CC. 4278c3e29c03SmrgLTCC=${LTCC-"$CC"} 4279c3e29c03Smrg 4280c3e29c03Smrg# If no C compiler flags were specified, use CFLAGS. 4281c3e29c03SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4282c3e29c03Smrg 4283c3e29c03Smrg# Allow CC to be a program name with arguments. 4284c3e29c03Smrgcompiler=$CC 4285c3e29c03Smrg])# _LT_TAG_COMPILER 4286c3e29c03Smrg 4287c3e29c03Smrg 4288c3e29c03Smrg# _LT_COMPILER_BOILERPLATE 4289c3e29c03Smrg# ------------------------ 4290c3e29c03Smrg# Check for compiler boilerplate output or warnings with 4291c3e29c03Smrg# the simple compiler test code. 4292c3e29c03Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 4293c3e29c03Smrg[m4_require([_LT_DECL_SED])dnl 4294c3e29c03Smrgac_outfile=conftest.$ac_objext 4295c3e29c03Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4296c3e29c03Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4297c3e29c03Smrg_lt_compiler_boilerplate=`cat conftest.err` 4298c3e29c03Smrg$RM conftest* 4299c3e29c03Smrg])# _LT_COMPILER_BOILERPLATE 430026372658Smrg 43014b0ead49Smrg 4302c3e29c03Smrg# _LT_LINKER_BOILERPLATE 4303c3e29c03Smrg# ---------------------- 4304c3e29c03Smrg# Check for linker boilerplate output or warnings with 4305c3e29c03Smrg# the simple link test code. 4306c3e29c03Smrgm4_defun([_LT_LINKER_BOILERPLATE], 4307c3e29c03Smrg[m4_require([_LT_DECL_SED])dnl 4308c3e29c03Smrgac_outfile=conftest.$ac_objext 4309c3e29c03Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4310c3e29c03Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4311c3e29c03Smrg_lt_linker_boilerplate=`cat conftest.err` 4312c3e29c03Smrg$RM -r conftest* 4313c3e29c03Smrg])# _LT_LINKER_BOILERPLATE 43144b0ead49Smrg 4315c3e29c03Smrg# _LT_REQUIRED_DARWIN_CHECKS 4316c3e29c03Smrg# ------------------------- 4317c3e29c03Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4318c3e29c03Smrg case $host_os in 4319c3e29c03Smrg rhapsody* | darwin*) 4320c3e29c03Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4321c3e29c03Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4322c3e29c03Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4323c3e29c03Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4324c3e29c03Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4325c3e29c03Smrg _LT_DECL([], [DSYMUTIL], [1], 4326c3e29c03Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4327c3e29c03Smrg _LT_DECL([], [NMEDIT], [1], 4328c3e29c03Smrg [Tool to change global to local symbols on Mac OS X]) 4329c3e29c03Smrg _LT_DECL([], [LIPO], [1], 4330c3e29c03Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 4331c3e29c03Smrg _LT_DECL([], [OTOOL], [1], 4332c3e29c03Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4333c3e29c03Smrg _LT_DECL([], [OTOOL64], [1], 4334c3e29c03Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 43354b0ead49Smrg 4336c3e29c03Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4337c3e29c03Smrg [lt_cv_apple_cc_single_mod=no 4338c3e29c03Smrg if test -z "$LT_MULTI_MODULE"; then 4339c3e29c03Smrg # By default we will add the -single_module flag. You can override 4340c3e29c03Smrg # by either setting the environment variable LT_MULTI_MODULE 4341c3e29c03Smrg # non-empty at configure time, or by adding -multi_module to the 4342c3e29c03Smrg # link flags. 4343c3e29c03Smrg rm -rf libconftest.dylib* 4344c3e29c03Smrg echo "int foo(void){return 1;}" > conftest.c 4345c3e29c03Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4346c3e29c03Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4347c3e29c03Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4348c3e29c03Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4349c3e29c03Smrg _lt_result=$? 4350c3e29c03Smrg # If there is a non-empty error log, and "single_module" 4351c3e29c03Smrg # appears in it, assume the flag caused a linker warning 4352c3e29c03Smrg if test -s conftest.err && $GREP single_module conftest.err; then 4353c3e29c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4354c3e29c03Smrg # Otherwise, if the output was created with a 0 exit code from 4355c3e29c03Smrg # the compiler, it worked. 4356c3e29c03Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4357c3e29c03Smrg lt_cv_apple_cc_single_mod=yes 435849dc963fSmrg else 4359c3e29c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 436049dc963fSmrg fi 4361c3e29c03Smrg rm -rf libconftest.dylib* 4362c3e29c03Smrg rm -f conftest.* 4363c3e29c03Smrg fi]) 4364c3e29c03Smrg 4365c3e29c03Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4366c3e29c03Smrg [lt_cv_ld_exported_symbols_list], 4367c3e29c03Smrg [lt_cv_ld_exported_symbols_list=no 4368c3e29c03Smrg save_LDFLAGS=$LDFLAGS 4369c3e29c03Smrg echo "_main" > conftest.sym 4370c3e29c03Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4371c3e29c03Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4372c3e29c03Smrg [lt_cv_ld_exported_symbols_list=yes], 4373c3e29c03Smrg [lt_cv_ld_exported_symbols_list=no]) 4374c3e29c03Smrg LDFLAGS=$save_LDFLAGS 4375c3e29c03Smrg ]) 4376c3e29c03Smrg 4377c3e29c03Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4378c3e29c03Smrg [lt_cv_ld_force_load=no 4379c3e29c03Smrg cat > conftest.c << _LT_EOF 4380c3e29c03Smrgint forced_loaded() { return 2;} 4381c3e29c03Smrg_LT_EOF 4382c3e29c03Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4383c3e29c03Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4384c3e29c03Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4385c3e29c03Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4386c3e29c03Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4387c3e29c03Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4388c3e29c03Smrg cat > conftest.c << _LT_EOF 4389c3e29c03Smrgint main() { return 0;} 4390c3e29c03Smrg_LT_EOF 4391c3e29c03Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4392c3e29c03Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4393c3e29c03Smrg _lt_result=$? 4394c3e29c03Smrg if test -s conftest.err && $GREP force_load conftest.err; then 4395c3e29c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4396c3e29c03Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4397c3e29c03Smrg lt_cv_ld_force_load=yes 439849dc963fSmrg else 4399c3e29c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 440049dc963fSmrg fi 4401c3e29c03Smrg rm -f conftest.err libconftest.a conftest conftest.c 4402c3e29c03Smrg rm -rf conftest.dSYM 4403c3e29c03Smrg ]) 4404c3e29c03Smrg case $host_os in 4405c3e29c03Smrg rhapsody* | darwin1.[[012]]) 4406c3e29c03Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4407c3e29c03Smrg darwin1.*) 4408c3e29c03Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4409c3e29c03Smrg darwin*) 4410c3e29c03Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 4411c3e29c03Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4412c3e29c03Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4413c3e29c03Smrg *) 4414c3e29c03Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4415c3e29c03Smrg esac 4416c3e29c03Smrg ;; 4417c3e29c03Smrg esac 4418c3e29c03Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 4419c3e29c03Smrg _lt_dar_single_mod='$single_module' 4420c3e29c03Smrg fi 4421c3e29c03Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 4422c3e29c03Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4423c3e29c03Smrg else 4424c3e29c03Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4425c3e29c03Smrg fi 4426c3e29c03Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4427c3e29c03Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 4428c3e29c03Smrg else 4429c3e29c03Smrg _lt_dsymutil= 4430c3e29c03Smrg fi 4431c3e29c03Smrg ;; 4432c3e29c03Smrg esac 4433c3e29c03Smrg]) 44344b0ead49Smrg 44354b0ead49Smrg 4436c3e29c03Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 4437c3e29c03Smrg# --------------------------------- 4438c3e29c03Smrg# Checks for linker and compiler features on darwin 4439c3e29c03Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 4440c3e29c03Smrg[ 4441c3e29c03Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4442c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4443c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4444c3e29c03Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 4445c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4446c3e29c03Smrg if test yes = "$lt_cv_ld_force_load"; then 4447c3e29c03Smrg _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\"`' 4448c3e29c03Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4449c3e29c03Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4450c3e29c03Smrg else 4451c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4452c3e29c03Smrg fi 4453c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4454c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4455c3e29c03Smrg case $cc_basename in 4456c3e29c03Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4457c3e29c03Smrg *) _lt_dar_can_shared=$GCC ;; 4458c3e29c03Smrg esac 4459c3e29c03Smrg if test yes = "$_lt_dar_can_shared"; then 4460c3e29c03Smrg output_verbose_link_cmd=func_echo_all 4461c3e29c03Smrg _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" 4462c3e29c03Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4463c3e29c03Smrg _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" 4464c3e29c03Smrg _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" 4465c3e29c03Smrg m4_if([$1], [CXX], 4466c3e29c03Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4467c3e29c03Smrg _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" 4468c3e29c03Smrg _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" 4469c3e29c03Smrg fi 4470c3e29c03Smrg],[]) 4471c3e29c03Smrg else 4472c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4473c3e29c03Smrg fi 4474c3e29c03Smrg]) 4475c3e29c03Smrg 4476c3e29c03Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4477c3e29c03Smrg# ---------------------------------- 4478c3e29c03Smrg# Links a minimal program and checks the executable 4479c3e29c03Smrg# for the system default hardcoded library path. In most cases, 4480c3e29c03Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 4481c3e29c03Smrg# the location of the communication and MPI libs are included too. 4482c3e29c03Smrg# If we don't find anything, use the default library path according 4483c3e29c03Smrg# to the aix ld manual. 4484c3e29c03Smrg# Store the results from the different compilers for each TAGNAME. 4485c3e29c03Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 4486c3e29c03Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 4487c3e29c03Smrg[m4_require([_LT_DECL_SED])dnl 4488c3e29c03Smrgif test set = "${lt_cv_aix_libpath+set}"; then 4489c3e29c03Smrg aix_libpath=$lt_cv_aix_libpath 4490c3e29c03Smrgelse 4491c3e29c03Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4492c3e29c03Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4493c3e29c03Smrg lt_aix_libpath_sed='[ 4494c3e29c03Smrg /Import File Strings/,/^$/ { 4495c3e29c03Smrg /^0/ { 4496c3e29c03Smrg s/^0 *\([^ ]*\) *$/\1/ 4497c3e29c03Smrg p 4498c3e29c03Smrg } 4499c3e29c03Smrg }]' 4500c3e29c03Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4501c3e29c03Smrg # Check for a 64-bit object if we didn't find anything. 4502c3e29c03Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4503c3e29c03Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4504c3e29c03Smrg fi],[]) 4505c3e29c03Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4506c3e29c03Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4507c3e29c03Smrg fi 4508c3e29c03Smrg ]) 4509c3e29c03Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4510c3e29c03Smrgfi 4511c3e29c03Smrg])# _LT_SYS_MODULE_PATH_AIX 4512c3e29c03Smrg 45134b0ead49Smrg 4514c3e29c03Smrg# _LT_SHELL_INIT(ARG) 4515c3e29c03Smrg# ------------------- 4516c3e29c03Smrgm4_define([_LT_SHELL_INIT], 4517c3e29c03Smrg[m4_divert_text([M4SH-INIT], [$1 4518c3e29c03Smrg])])# _LT_SHELL_INIT 45194b0ead49Smrg 45204b0ead49Smrg 45214b0ead49Smrg 4522c3e29c03Smrg# _LT_PROG_ECHO_BACKSLASH 4523c3e29c03Smrg# ----------------------- 4524c3e29c03Smrg# Find how we can fake an echo command that does not interpret backslash. 4525c3e29c03Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 4526c3e29c03Smrg# of the generated configure script that will find a shell with a builtin 4527c3e29c03Smrg# printf (that we can use as an echo command). 4528c3e29c03Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 4529c3e29c03Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4530c3e29c03SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4531c3e29c03SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 45324b0ead49Smrg 4533c3e29c03SmrgAC_MSG_CHECKING([how to print strings]) 4534c3e29c03Smrg# Test print first, because it will be a builtin if present. 4535c3e29c03Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4536c3e29c03Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4537c3e29c03Smrg ECHO='print -r --' 4538c3e29c03Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4539c3e29c03Smrg ECHO='printf %s\n' 4540c3e29c03Smrgelse 4541c3e29c03Smrg # Use this function as a fallback that always works. 4542c3e29c03Smrg func_fallback_echo () 4543c3e29c03Smrg { 4544c3e29c03Smrg eval 'cat <<_LTECHO_EOF 4545c3e29c03Smrg$[]1 4546c3e29c03Smrg_LTECHO_EOF' 4547c3e29c03Smrg } 4548c3e29c03Smrg ECHO='func_fallback_echo' 4549c3e29c03Smrgfi 45504b0ead49Smrg 4551c3e29c03Smrg# func_echo_all arg... 4552c3e29c03Smrg# Invoke $ECHO with all args, space-separated. 4553c3e29c03Smrgfunc_echo_all () 4554c3e29c03Smrg{ 4555c3e29c03Smrg $ECHO "$*" 4556c3e29c03Smrg} 45574b0ead49Smrg 4558c3e29c03Smrgcase $ECHO in 4559c3e29c03Smrg printf*) AC_MSG_RESULT([printf]) ;; 4560c3e29c03Smrg print*) AC_MSG_RESULT([print -r]) ;; 4561c3e29c03Smrg *) AC_MSG_RESULT([cat]) ;; 4562c3e29c03Smrgesac 45634b0ead49Smrg 4564c3e29c03Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 4565c3e29c03Smrg[_AS_DETECT_SUGGESTED([ 4566c3e29c03Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4567c3e29c03Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4568c3e29c03Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4569c3e29c03Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4570c3e29c03Smrg PATH=/empty FPATH=/empty; export PATH FPATH 4571c3e29c03Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 4572c3e29c03Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 45734b0ead49Smrg 4574c3e29c03Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4575c3e29c03Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4576c3e29c03Smrg])# _LT_PROG_ECHO_BACKSLASH 45774b0ead49Smrg 45784b0ead49Smrg 4579c3e29c03Smrg# _LT_WITH_SYSROOT 4580c3e29c03Smrg# ---------------- 4581c3e29c03SmrgAC_DEFUN([_LT_WITH_SYSROOT], 4582c3e29c03Smrg[m4_require([_LT_DECL_SED])dnl 4583c3e29c03SmrgAC_MSG_CHECKING([for sysroot]) 4584c3e29c03SmrgAC_ARG_WITH([sysroot], 4585c3e29c03Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4586c3e29c03Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 4587c3e29c03Smrg if not specified).])], 4588c3e29c03Smrg[], [with_sysroot=no]) 45894b0ead49Smrg 4590c3e29c03Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 4591c3e29c03Smrgdnl in case the user passed a directory name. 4592c3e29c03Smrglt_sysroot= 4593c3e29c03Smrgcase $with_sysroot in #( 4594c3e29c03Smrg yes) 4595c3e29c03Smrg if test yes = "$GCC"; then 4596c3e29c03Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4597c3e29c03Smrg fi 4598c3e29c03Smrg ;; #( 4599c3e29c03Smrg /*) 4600c3e29c03Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4601c3e29c03Smrg ;; #( 4602c3e29c03Smrg no|'') 4603c3e29c03Smrg ;; #( 4604c3e29c03Smrg *) 4605c3e29c03Smrg AC_MSG_RESULT([$with_sysroot]) 4606c3e29c03Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 4607c3e29c03Smrg ;; 4608c3e29c03Smrgesac 4609c3e29c03Smrg 4610c3e29c03Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 4611c3e29c03Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4612c3e29c03Smrg[dependent libraries, and where our libraries should be installed.])]) 4613c3e29c03Smrg 4614c3e29c03Smrg# _LT_ENABLE_LOCK 4615c3e29c03Smrg# --------------- 4616c3e29c03Smrgm4_defun([_LT_ENABLE_LOCK], 4617c3e29c03Smrg[AC_ARG_ENABLE([libtool-lock], 4618c3e29c03Smrg [AS_HELP_STRING([--disable-libtool-lock], 4619c3e29c03Smrg [avoid locking (might break parallel builds)])]) 4620c3e29c03Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 46214b0ead49Smrg 4622c3e29c03Smrg# Some flags need to be propagated to the compiler or linker for good 4623c3e29c03Smrg# libtool support. 4624c3e29c03Smrgcase $host in 4625c3e29c03Smrgia64-*-hpux*) 4626c3e29c03Smrg # Find out what ABI is being produced by ac_compile, and set mode 4627c3e29c03Smrg # options accordingly. 4628c3e29c03Smrg echo 'int i;' > conftest.$ac_ext 4629c3e29c03Smrg if AC_TRY_EVAL(ac_compile); then 4630c3e29c03Smrg case `$FILECMD conftest.$ac_objext` in 4631c3e29c03Smrg *ELF-32*) 4632c3e29c03Smrg HPUX_IA64_MODE=32 4633c3e29c03Smrg ;; 4634c3e29c03Smrg *ELF-64*) 4635c3e29c03Smrg HPUX_IA64_MODE=64 4636c3e29c03Smrg ;; 463749dc963fSmrg esac 4638c3e29c03Smrg fi 4639c3e29c03Smrg rm -rf conftest* 4640c3e29c03Smrg ;; 4641c3e29c03Smrg*-*-irix6*) 4642c3e29c03Smrg # Find out what ABI is being produced by ac_compile, and set linker 4643c3e29c03Smrg # options accordingly. 4644c3e29c03Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4645c3e29c03Smrg if AC_TRY_EVAL(ac_compile); then 4646c3e29c03Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 4647c3e29c03Smrg case `$FILECMD conftest.$ac_objext` in 4648c3e29c03Smrg *32-bit*) 4649c3e29c03Smrg LD="${LD-ld} -melf32bsmip" 4650c3e29c03Smrg ;; 4651c3e29c03Smrg *N32*) 4652c3e29c03Smrg LD="${LD-ld} -melf32bmipn32" 4653c3e29c03Smrg ;; 4654c3e29c03Smrg *64-bit*) 4655c3e29c03Smrg LD="${LD-ld} -melf64bmip" 465649dc963fSmrg ;; 465749dc963fSmrg esac 4658c3e29c03Smrg else 4659c3e29c03Smrg case `$FILECMD conftest.$ac_objext` in 4660c3e29c03Smrg *32-bit*) 4661c3e29c03Smrg LD="${LD-ld} -32" 4662c3e29c03Smrg ;; 4663c3e29c03Smrg *N32*) 4664c3e29c03Smrg LD="${LD-ld} -n32" 4665c3e29c03Smrg ;; 4666c3e29c03Smrg *64-bit*) 4667c3e29c03Smrg LD="${LD-ld} -64" 4668c3e29c03Smrg ;; 4669c3e29c03Smrg esac 467049dc963fSmrg fi 467149dc963fSmrg fi 4672c3e29c03Smrg rm -rf conftest* 4673c3e29c03Smrg ;; 46747aa89044Smrg 4675c3e29c03Smrgmips64*-*linux*) 4676c3e29c03Smrg # Find out what ABI is being produced by ac_compile, and set linker 4677c3e29c03Smrg # options accordingly. 4678c3e29c03Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4679c3e29c03Smrg if AC_TRY_EVAL(ac_compile); then 4680c3e29c03Smrg emul=elf 4681c3e29c03Smrg case `$FILECMD conftest.$ac_objext` in 4682c3e29c03Smrg *32-bit*) 4683c3e29c03Smrg emul="${emul}32" 4684c3e29c03Smrg ;; 4685c3e29c03Smrg *64-bit*) 4686c3e29c03Smrg emul="${emul}64" 4687c3e29c03Smrg ;; 4688c3e29c03Smrg esac 4689c3e29c03Smrg case `$FILECMD conftest.$ac_objext` in 4690c3e29c03Smrg *MSB*) 4691c3e29c03Smrg emul="${emul}btsmip" 4692c3e29c03Smrg ;; 4693c3e29c03Smrg *LSB*) 4694c3e29c03Smrg emul="${emul}ltsmip" 4695c3e29c03Smrg ;; 4696c3e29c03Smrg esac 4697c3e29c03Smrg case `$FILECMD conftest.$ac_objext` in 4698c3e29c03Smrg *N32*) 4699c3e29c03Smrg emul="${emul}n32" 4700c3e29c03Smrg ;; 470149dc963fSmrg esac 4702c3e29c03Smrg LD="${LD-ld} -m $emul" 470349dc963fSmrg fi 4704c3e29c03Smrg rm -rf conftest* 470549dc963fSmrg ;; 47064b0ead49Smrg 4707c3e29c03Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4708c3e29c03Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4709c3e29c03Smrg # Find out what ABI is being produced by ac_compile, and set linker 4710c3e29c03Smrg # options accordingly. Note that the listed cases only cover the 4711c3e29c03Smrg # situations where additional linker options are needed (such as when 4712c3e29c03Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4713c3e29c03Smrg # vice versa); the common cases where no linker options are needed do 4714c3e29c03Smrg # not appear in the list. 4715c3e29c03Smrg echo 'int i;' > conftest.$ac_ext 4716c3e29c03Smrg if AC_TRY_EVAL(ac_compile); then 4717c3e29c03Smrg case `$FILECMD conftest.o` in 4718c3e29c03Smrg *32-bit*) 4719c3e29c03Smrg case $host in 4720c3e29c03Smrg x86_64-*kfreebsd*-gnu) 4721c3e29c03Smrg LD="${LD-ld} -m elf_i386_fbsd" 4722c3e29c03Smrg ;; 4723c3e29c03Smrg x86_64-*linux*) 4724c3e29c03Smrg case `$FILECMD conftest.o` in 4725c3e29c03Smrg *x86-64*) 4726c3e29c03Smrg LD="${LD-ld} -m elf32_x86_64" 4727c3e29c03Smrg ;; 4728c3e29c03Smrg *) 4729c3e29c03Smrg LD="${LD-ld} -m elf_i386" 4730c3e29c03Smrg ;; 4731c3e29c03Smrg esac 4732c3e29c03Smrg ;; 4733c3e29c03Smrg powerpc64le-*linux*) 4734c3e29c03Smrg LD="${LD-ld} -m elf32lppclinux" 4735c3e29c03Smrg ;; 4736c3e29c03Smrg powerpc64-*linux*) 4737c3e29c03Smrg LD="${LD-ld} -m elf32ppclinux" 4738c3e29c03Smrg ;; 4739c3e29c03Smrg s390x-*linux*) 4740c3e29c03Smrg LD="${LD-ld} -m elf_s390" 4741c3e29c03Smrg ;; 4742c3e29c03Smrg sparc64-*linux*) 4743c3e29c03Smrg LD="${LD-ld} -m elf32_sparc" 4744c3e29c03Smrg ;; 4745c3e29c03Smrg esac 4746c3e29c03Smrg ;; 4747c3e29c03Smrg *64-bit*) 4748c3e29c03Smrg case $host in 4749c3e29c03Smrg x86_64-*kfreebsd*-gnu) 4750c3e29c03Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 4751c3e29c03Smrg ;; 4752c3e29c03Smrg x86_64-*linux*) 4753c3e29c03Smrg LD="${LD-ld} -m elf_x86_64" 4754c3e29c03Smrg ;; 4755c3e29c03Smrg powerpcle-*linux*) 4756c3e29c03Smrg LD="${LD-ld} -m elf64lppc" 4757c3e29c03Smrg ;; 4758c3e29c03Smrg powerpc-*linux*) 4759c3e29c03Smrg LD="${LD-ld} -m elf64ppc" 4760c3e29c03Smrg ;; 4761c3e29c03Smrg s390*-*linux*|s390*-*tpf*) 4762c3e29c03Smrg LD="${LD-ld} -m elf64_s390" 4763c3e29c03Smrg ;; 4764c3e29c03Smrg sparc*-*linux*) 4765c3e29c03Smrg LD="${LD-ld} -m elf64_sparc" 4766c3e29c03Smrg ;; 4767c3e29c03Smrg esac 4768c3e29c03Smrg ;; 4769c3e29c03Smrg esac 4770c3e29c03Smrg fi 4771c3e29c03Smrg rm -rf conftest* 4772c3e29c03Smrg ;; 477349dc963fSmrg 4774c3e29c03Smrg*-*-sco3.2v5*) 4775c3e29c03Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4776c3e29c03Smrg SAVE_CFLAGS=$CFLAGS 4777c3e29c03Smrg CFLAGS="$CFLAGS -belf" 4778c3e29c03Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4779c3e29c03Smrg [AC_LANG_PUSH(C) 4780c3e29c03Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4781c3e29c03Smrg AC_LANG_POP]) 4782c3e29c03Smrg if test yes != "$lt_cv_cc_needs_belf"; then 4783c3e29c03Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4784c3e29c03Smrg CFLAGS=$SAVE_CFLAGS 4785c3e29c03Smrg fi 4786c3e29c03Smrg ;; 4787c3e29c03Smrg*-*solaris*) 4788c3e29c03Smrg # Find out what ABI is being produced by ac_compile, and set linker 4789c3e29c03Smrg # options accordingly. 4790c3e29c03Smrg echo 'int i;' > conftest.$ac_ext 4791c3e29c03Smrg if AC_TRY_EVAL(ac_compile); then 4792c3e29c03Smrg case `$FILECMD conftest.o` in 4793c3e29c03Smrg *64-bit*) 4794c3e29c03Smrg case $lt_cv_prog_gnu_ld in 4795c3e29c03Smrg yes*) 4796c3e29c03Smrg case $host in 4797c3e29c03Smrg i?86-*-solaris*|x86_64-*-solaris*) 4798c3e29c03Smrg LD="${LD-ld} -m elf_x86_64" 4799c3e29c03Smrg ;; 4800c3e29c03Smrg sparc*-*-solaris*) 4801c3e29c03Smrg LD="${LD-ld} -m elf64_sparc" 4802c3e29c03Smrg ;; 4803c3e29c03Smrg esac 4804c3e29c03Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4805c3e29c03Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4806c3e29c03Smrg LD=${LD-ld}_sol2 4807c3e29c03Smrg fi 4808c3e29c03Smrg ;; 4809c3e29c03Smrg *) 4810c3e29c03Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4811c3e29c03Smrg LD="${LD-ld} -64" 4812c3e29c03Smrg fi 4813c3e29c03Smrg ;; 4814c3e29c03Smrg esac 4815c3e29c03Smrg ;; 4816c3e29c03Smrg esac 4817c3e29c03Smrg fi 4818c3e29c03Smrg rm -rf conftest* 4819c3e29c03Smrg ;; 4820c3e29c03Smrgesac 482149dc963fSmrg 4822c3e29c03Smrgneed_locks=$enable_libtool_lock 4823c3e29c03Smrg])# _LT_ENABLE_LOCK 48244b0ead49Smrg 48254b0ead49Smrg 4826c3e29c03Smrg# _LT_PROG_AR 4827c3e29c03Smrg# ----------- 4828c3e29c03Smrgm4_defun([_LT_PROG_AR], 4829c3e29c03Smrg[AC_CHECK_TOOLS(AR, [ar], false) 4830c3e29c03Smrg: ${AR=ar} 4831c3e29c03Smrg_LT_DECL([], [AR], [1], [The archiver]) 48324b0ead49Smrg 4833c3e29c03Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4834c3e29c03Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4835c3e29c03Smrg# higher priority because thats what people were doing historically (setting 4836c3e29c03Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4837c3e29c03Smrg# variable obsoleted/removed. 48384b0ead49Smrg 4839c3e29c03Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4840c3e29c03Smrglt_ar_flags=$AR_FLAGS 4841c3e29c03Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 48424b0ead49Smrg 4843c3e29c03Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4844c3e29c03Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4845c3e29c03Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4846c3e29c03Smrg [Flags to create an archive]) 48474b0ead49Smrg 4848c3e29c03SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4849c3e29c03Smrg [lt_cv_ar_at_file=no 4850c3e29c03Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4851c3e29c03Smrg [echo conftest.$ac_objext > conftest.lst 4852c3e29c03Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4853c3e29c03Smrg AC_TRY_EVAL([lt_ar_try]) 4854c3e29c03Smrg if test 0 -eq "$ac_status"; then 4855c3e29c03Smrg # Ensure the archiver fails upon bogus file names. 4856c3e29c03Smrg rm -f conftest.$ac_objext libconftest.a 4857c3e29c03Smrg AC_TRY_EVAL([lt_ar_try]) 4858c3e29c03Smrg if test 0 -ne "$ac_status"; then 4859c3e29c03Smrg lt_cv_ar_at_file=@ 4860c3e29c03Smrg fi 4861c3e29c03Smrg fi 4862c3e29c03Smrg rm -f conftest.* libconftest.a 4863c3e29c03Smrg ]) 4864c3e29c03Smrg ]) 48654b0ead49Smrg 4866c3e29c03Smrgif test no = "$lt_cv_ar_at_file"; then 4867c3e29c03Smrg archiver_list_spec= 4868c3e29c03Smrgelse 4869c3e29c03Smrg archiver_list_spec=$lt_cv_ar_at_file 4870c3e29c03Smrgfi 4871c3e29c03Smrg_LT_DECL([], [archiver_list_spec], [1], 4872c3e29c03Smrg [How to feed a file listing to the archiver]) 4873c3e29c03Smrg])# _LT_PROG_AR 487449dc963fSmrg 487549dc963fSmrg 4876c3e29c03Smrg# _LT_CMD_OLD_ARCHIVE 4877c3e29c03Smrg# ------------------- 4878c3e29c03Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 4879c3e29c03Smrg[_LT_PROG_AR 488049dc963fSmrg 4881c3e29c03SmrgAC_CHECK_TOOL(STRIP, strip, :) 4882c3e29c03Smrgtest -z "$STRIP" && STRIP=: 4883c3e29c03Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4884c3e29c03Smrg 4885c3e29c03SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 4886c3e29c03Smrgtest -z "$RANLIB" && RANLIB=: 4887c3e29c03Smrg_LT_DECL([], [RANLIB], [1], 4888c3e29c03Smrg [Commands used to install an old-style archive]) 4889c3e29c03Smrg 4890c3e29c03Smrg# Determine commands to create old-style static archives. 4891c3e29c03Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4892c3e29c03Smrgold_postinstall_cmds='chmod 644 $oldlib' 4893c3e29c03Smrgold_postuninstall_cmds= 4894c3e29c03Smrg 4895c3e29c03Smrgif test -n "$RANLIB"; then 489649dc963fSmrg case $host_os in 4897c3e29c03Smrg bitrig* | openbsd*) 4898c3e29c03Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 489949dc963fSmrg ;; 4900c3e29c03Smrg *) 4901c3e29c03Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 490249dc963fSmrg ;; 490349dc963fSmrg esac 4904c3e29c03Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 4905c3e29c03Smrgfi 49064b0ead49Smrg 4907c3e29c03Smrgcase $host_os in 4908c3e29c03Smrg darwin*) 4909c3e29c03Smrg lock_old_archive_extraction=yes ;; 4910c3e29c03Smrg *) 4911c3e29c03Smrg lock_old_archive_extraction=no ;; 4912c3e29c03Smrgesac 4913c3e29c03Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 4914c3e29c03Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 4915c3e29c03Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 4916c3e29c03Smrg [Commands used to build an old-style archive]) 4917c3e29c03Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 4918c3e29c03Smrg [Whether to use a lock for old archive extraction]) 4919c3e29c03Smrg])# _LT_CMD_OLD_ARCHIVE 49204b0ead49Smrg 49214b0ead49Smrg 4922c3e29c03Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4923c3e29c03Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4924c3e29c03Smrg# ---------------------------------------------------------------- 4925c3e29c03Smrg# Check whether the given compiler option works 4926c3e29c03SmrgAC_DEFUN([_LT_COMPILER_OPTION], 4927c3e29c03Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4928c3e29c03Smrgm4_require([_LT_DECL_SED])dnl 4929c3e29c03SmrgAC_CACHE_CHECK([$1], [$2], 4930c3e29c03Smrg [$2=no 4931c3e29c03Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 4932c3e29c03Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4933c3e29c03Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 4934c3e29c03Smrg # Insert the option either (1) after the last *FLAGS variable, or 4935c3e29c03Smrg # (2) before a word containing "conftest.", or (3) at the end. 4936c3e29c03Smrg # Note that $ac_compile itself does not contain backslashes and begins 4937c3e29c03Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4938c3e29c03Smrg # The option is referenced via a variable to avoid confusing sed. 4939c3e29c03Smrg lt_compile=`echo "$ac_compile" | $SED \ 4940c3e29c03Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4941c3e29c03Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4942c3e29c03Smrg -e 's:$: $lt_compiler_flag:'` 4943c3e29c03Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4944c3e29c03Smrg (eval "$lt_compile" 2>conftest.err) 4945c3e29c03Smrg ac_status=$? 4946c3e29c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4947c3e29c03Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4948c3e29c03Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 4949c3e29c03Smrg # The compiler can only warn and ignore the option if not recognized 4950c3e29c03Smrg # So say no if there are warnings other than the usual output. 4951c3e29c03Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 4952c3e29c03Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4953c3e29c03Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 4954c3e29c03Smrg $2=yes 4955c3e29c03Smrg fi 4956c3e29c03Smrg fi 4957c3e29c03Smrg $RM conftest* 4958c3e29c03Smrg]) 4959c3e29c03Smrg 4960c3e29c03Smrgif test yes = "[$]$2"; then 4961c3e29c03Smrg m4_if([$5], , :, [$5]) 4962c3e29c03Smrgelse 4963c3e29c03Smrg m4_if([$6], , :, [$6]) 4964c3e29c03Smrgfi 4965c3e29c03Smrg])# _LT_COMPILER_OPTION 49664b0ead49Smrg 4967c3e29c03Smrg# Old name: 4968c3e29c03SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 4969c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 4970c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 4971c3e29c03Smrg 4972c3e29c03Smrg 4973c3e29c03Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4974c3e29c03Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 4975c3e29c03Smrg# ---------------------------------------------------- 4976c3e29c03Smrg# Check whether the given linker option works 4977c3e29c03SmrgAC_DEFUN([_LT_LINKER_OPTION], 49787aa89044Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4979c3e29c03Smrgm4_require([_LT_DECL_SED])dnl 4980c3e29c03SmrgAC_CACHE_CHECK([$1], [$2], 4981c3e29c03Smrg [$2=no 4982c3e29c03Smrg save_LDFLAGS=$LDFLAGS 4983c3e29c03Smrg LDFLAGS="$LDFLAGS $3" 4984c3e29c03Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 4985c3e29c03Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 4986c3e29c03Smrg # The linker can only warn and ignore the option if not recognized 4987c3e29c03Smrg # So say no if there are warnings 4988c3e29c03Smrg if test -s conftest.err; then 4989c3e29c03Smrg # Append any errors to the config.log. 4990c3e29c03Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 4991c3e29c03Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 4992c3e29c03Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4993c3e29c03Smrg if diff conftest.exp conftest.er2 >/dev/null; then 4994c3e29c03Smrg $2=yes 4995c3e29c03Smrg fi 4996c3e29c03Smrg else 4997c3e29c03Smrg $2=yes 4998c3e29c03Smrg fi 4999c3e29c03Smrg fi 5000c3e29c03Smrg $RM -r conftest* 5001c3e29c03Smrg LDFLAGS=$save_LDFLAGS 5002c3e29c03Smrg]) 5003c3e29c03Smrg 5004c3e29c03Smrgif test yes = "[$]$2"; then 5005c3e29c03Smrg m4_if([$4], , :, [$4]) 50067aa89044Smrgelse 5007c3e29c03Smrg m4_if([$5], , :, [$5]) 50087aa89044Smrgfi 5009c3e29c03Smrg])# _LT_LINKER_OPTION 501049dc963fSmrg 5011c3e29c03Smrg# Old name: 5012c3e29c03SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5013c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 5014c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 50154b0ead49Smrg 50164b0ead49Smrg 5017c3e29c03Smrg# LT_CMD_MAX_LEN 5018c3e29c03Smrg#--------------- 5019c3e29c03SmrgAC_DEFUN([LT_CMD_MAX_LEN], 5020c3e29c03Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5021c3e29c03Smrg# find the maximum length of command line arguments 5022c3e29c03SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5023c3e29c03SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5024c3e29c03Smrg i=0 5025c3e29c03Smrg teststring=ABCD 502649dc963fSmrg 5027c3e29c03Smrg case $build_os in 5028c3e29c03Smrg msdosdjgpp*) 5029c3e29c03Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5030c3e29c03Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5031c3e29c03Smrg # during glob expansion). Even if it were fixed, the result of this 5032c3e29c03Smrg # check would be larger than it should be. 5033c3e29c03Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5034c3e29c03Smrg ;; 503549dc963fSmrg 5036c3e29c03Smrg gnu*) 5037c3e29c03Smrg # Under GNU Hurd, this test is not required because there is 5038c3e29c03Smrg # no limit to the length of command line arguments. 5039c3e29c03Smrg # Libtool will interpret -1 as no limit whatsoever 5040c3e29c03Smrg lt_cv_sys_max_cmd_len=-1; 5041c3e29c03Smrg ;; 504249dc963fSmrg 5043c3e29c03Smrg cygwin* | mingw* | cegcc*) 5044c3e29c03Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5045c3e29c03Smrg # about 5 minutes as the teststring grows exponentially. 5046c3e29c03Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 5047c3e29c03Smrg # you end up with a "frozen" computer, even though with patience 5048c3e29c03Smrg # the test eventually succeeds (with a max line length of 256k). 5049c3e29c03Smrg # Instead, let's just punt: use the minimum linelength reported by 5050c3e29c03Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 5051c3e29c03Smrg lt_cv_sys_max_cmd_len=8192; 5052c3e29c03Smrg ;; 505349dc963fSmrg 5054c3e29c03Smrg mint*) 5055c3e29c03Smrg # On MiNT this can take a long time and run out of memory. 5056c3e29c03Smrg lt_cv_sys_max_cmd_len=8192; 5057c3e29c03Smrg ;; 505849dc963fSmrg 5059c3e29c03Smrg amigaos*) 5060c3e29c03Smrg # On AmigaOS with pdksh, this test takes hours, literally. 5061c3e29c03Smrg # So we just punt and use a minimum line length of 8192. 5062c3e29c03Smrg lt_cv_sys_max_cmd_len=8192; 5063c3e29c03Smrg ;; 50644b0ead49Smrg 5065c3e29c03Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5066c3e29c03Smrg # This has been around since 386BSD, at least. Likely further. 5067c3e29c03Smrg if test -x /sbin/sysctl; then 5068c3e29c03Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5069c3e29c03Smrg elif test -x /usr/sbin/sysctl; then 5070c3e29c03Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 507149dc963fSmrg else 5072c3e29c03Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 507349dc963fSmrg fi 5074c3e29c03Smrg # And add a safety zone 5075c3e29c03Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5076c3e29c03Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5077c3e29c03Smrg ;; 50784b0ead49Smrg 5079c3e29c03Smrg interix*) 5080c3e29c03Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5081c3e29c03Smrg lt_cv_sys_max_cmd_len=196608 5082c3e29c03Smrg ;; 50834b0ead49Smrg 5084c3e29c03Smrg os2*) 5085c3e29c03Smrg # The test takes a long time on OS/2. 5086c3e29c03Smrg lt_cv_sys_max_cmd_len=8192 5087c3e29c03Smrg ;; 50884b0ead49Smrg 5089c3e29c03Smrg osf*) 5090c3e29c03Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5091c3e29c03Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5092c3e29c03Smrg # nice to cause kernel panics so lets avoid the loop below. 5093c3e29c03Smrg # First set a reasonable default. 5094c3e29c03Smrg lt_cv_sys_max_cmd_len=16384 5095c3e29c03Smrg # 5096c3e29c03Smrg if test -x /sbin/sysconfig; then 5097c3e29c03Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5098c3e29c03Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5099c3e29c03Smrg esac 5100c3e29c03Smrg fi 5101c3e29c03Smrg ;; 5102c3e29c03Smrg sco3.2v5*) 5103c3e29c03Smrg lt_cv_sys_max_cmd_len=102400 5104c3e29c03Smrg ;; 5105c3e29c03Smrg sysv5* | sco5v6* | sysv4.2uw2*) 5106c3e29c03Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5107c3e29c03Smrg if test -n "$kargmax"; then 5108c3e29c03Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5109c3e29c03Smrg else 5110c3e29c03Smrg lt_cv_sys_max_cmd_len=32768 5111c3e29c03Smrg fi 5112c3e29c03Smrg ;; 5113c3e29c03Smrg *) 5114c3e29c03Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5115c3e29c03Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5116c3e29c03Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5117c3e29c03Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5118c3e29c03Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5119c3e29c03Smrg else 5120c3e29c03Smrg # Make teststring a little bigger before we do anything with it. 5121c3e29c03Smrg # a 1K string should be a reasonable start. 5122c3e29c03Smrg for i in 1 2 3 4 5 6 7 8; do 5123c3e29c03Smrg teststring=$teststring$teststring 5124c3e29c03Smrg done 5125c3e29c03Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5126c3e29c03Smrg # If test is not a shell built-in, we'll probably end up computing a 5127c3e29c03Smrg # maximum length that is only half of the actual maximum length, but 5128c3e29c03Smrg # we can't tell. 5129c3e29c03Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5130c3e29c03Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5131c3e29c03Smrg test 17 != "$i" # 1/2 MB should be enough 5132c3e29c03Smrg do 5133c3e29c03Smrg i=`expr $i + 1` 5134c3e29c03Smrg teststring=$teststring$teststring 5135c3e29c03Smrg done 5136c3e29c03Smrg # Only check the string length outside the loop. 5137c3e29c03Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5138c3e29c03Smrg teststring= 5139c3e29c03Smrg # Add a significant safety factor because C++ compilers can tack on 5140c3e29c03Smrg # massive amounts of additional arguments before passing them to the 5141c3e29c03Smrg # linker. It appears as though 1/2 is a usable value. 5142c3e29c03Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5143c3e29c03Smrg fi 5144c3e29c03Smrg ;; 5145c3e29c03Smrg esac 5146c3e29c03Smrg]) 5147c3e29c03Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 5148c3e29c03Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5149c3e29c03Smrgelse 5150c3e29c03Smrg AC_MSG_RESULT(none) 5151c3e29c03Smrgfi 5152c3e29c03Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5153c3e29c03Smrg_LT_DECL([], [max_cmd_len], [0], 5154c3e29c03Smrg [What is the maximum length of a command?]) 5155c3e29c03Smrg])# LT_CMD_MAX_LEN 51564b0ead49Smrg 5157c3e29c03Smrg# Old name: 5158c3e29c03SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5159c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 5160c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 51614b0ead49Smrg 51624b0ead49Smrg 5163c3e29c03Smrg# _LT_HEADER_DLFCN 5164c3e29c03Smrg# ---------------- 5165c3e29c03Smrgm4_defun([_LT_HEADER_DLFCN], 5166c3e29c03Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5167c3e29c03Smrg])# _LT_HEADER_DLFCN 516849dc963fSmrg 51694b0ead49Smrg 5170c3e29c03Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5171c3e29c03Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5172c3e29c03Smrg# ---------------------------------------------------------------- 5173c3e29c03Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 5174c3e29c03Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5175c3e29c03Smrgif test yes = "$cross_compiling"; then : 5176c3e29c03Smrg [$4] 5177c3e29c03Smrgelse 5178c3e29c03Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5179c3e29c03Smrg lt_status=$lt_dlunknown 5180c3e29c03Smrg cat > conftest.$ac_ext <<_LT_EOF 5181c3e29c03Smrg[#line $LINENO "configure" 5182c3e29c03Smrg#include "confdefs.h" 51834b0ead49Smrg 5184c3e29c03Smrg#if HAVE_DLFCN_H 5185c3e29c03Smrg#include <dlfcn.h> 5186c3e29c03Smrg#endif 51874b0ead49Smrg 5188c3e29c03Smrg#include <stdio.h> 518949dc963fSmrg 5190c3e29c03Smrg#ifdef RTLD_GLOBAL 5191c3e29c03Smrg# define LT_DLGLOBAL RTLD_GLOBAL 5192c3e29c03Smrg#else 5193c3e29c03Smrg# ifdef DL_GLOBAL 5194c3e29c03Smrg# define LT_DLGLOBAL DL_GLOBAL 5195c3e29c03Smrg# else 5196c3e29c03Smrg# define LT_DLGLOBAL 0 5197c3e29c03Smrg# endif 5198c3e29c03Smrg#endif 51994b0ead49Smrg 5200c3e29c03Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5201c3e29c03Smrg find out it does not work in some platform. */ 5202c3e29c03Smrg#ifndef LT_DLLAZY_OR_NOW 5203c3e29c03Smrg# ifdef RTLD_LAZY 5204c3e29c03Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5205c3e29c03Smrg# else 5206c3e29c03Smrg# ifdef DL_LAZY 5207c3e29c03Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 5208c3e29c03Smrg# else 5209c3e29c03Smrg# ifdef RTLD_NOW 5210c3e29c03Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5211c3e29c03Smrg# else 5212c3e29c03Smrg# ifdef DL_NOW 5213c3e29c03Smrg# define LT_DLLAZY_OR_NOW DL_NOW 5214c3e29c03Smrg# else 5215c3e29c03Smrg# define LT_DLLAZY_OR_NOW 0 5216c3e29c03Smrg# endif 5217c3e29c03Smrg# endif 5218c3e29c03Smrg# endif 5219c3e29c03Smrg# endif 5220c3e29c03Smrg#endif 52214b0ead49Smrg 5222c3e29c03Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 5223c3e29c03Smrg correspondingly for the symbols needed. */ 5224c3e29c03Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5225c3e29c03Smrgint fnord () __attribute__((visibility("default"))); 5226c3e29c03Smrg#endif 522749dc963fSmrg 5228c3e29c03Smrgint fnord () { return 42; } 5229c3e29c03Smrgint main () 5230c3e29c03Smrg{ 5231c3e29c03Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5232c3e29c03Smrg int status = $lt_dlunknown; 523349dc963fSmrg 5234c3e29c03Smrg if (self) 5235c3e29c03Smrg { 5236c3e29c03Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5237c3e29c03Smrg else 5238c3e29c03Smrg { 5239c3e29c03Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5240c3e29c03Smrg else puts (dlerror ()); 5241c3e29c03Smrg } 5242c3e29c03Smrg /* dlclose (self); */ 5243c3e29c03Smrg } 5244c3e29c03Smrg else 5245c3e29c03Smrg puts (dlerror ()); 52464b0ead49Smrg 5247c3e29c03Smrg return status; 5248c3e29c03Smrg}] 5249c3e29c03Smrg_LT_EOF 5250c3e29c03Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5251c3e29c03Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5252c3e29c03Smrg lt_status=$? 5253c3e29c03Smrg case x$lt_status in 5254c3e29c03Smrg x$lt_dlno_uscore) $1 ;; 5255c3e29c03Smrg x$lt_dlneed_uscore) $2 ;; 5256c3e29c03Smrg x$lt_dlunknown|x*) $3 ;; 5257c3e29c03Smrg esac 5258c3e29c03Smrg else : 5259c3e29c03Smrg # compilation failed 5260c3e29c03Smrg $3 5261c3e29c03Smrg fi 5262c3e29c03Smrgfi 5263c3e29c03Smrgrm -fr conftest* 5264c3e29c03Smrg])# _LT_TRY_DLOPEN_SELF 526549dc963fSmrg 52664b0ead49Smrg 5267c3e29c03Smrg# LT_SYS_DLOPEN_SELF 5268c3e29c03Smrg# ------------------ 5269c3e29c03SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5270c3e29c03Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5271c3e29c03Smrgif test yes != "$enable_dlopen"; then 5272c3e29c03Smrg enable_dlopen=unknown 5273c3e29c03Smrg enable_dlopen_self=unknown 5274c3e29c03Smrg enable_dlopen_self_static=unknown 5275c3e29c03Smrgelse 5276c3e29c03Smrg lt_cv_dlopen=no 5277c3e29c03Smrg lt_cv_dlopen_libs= 52784b0ead49Smrg 5279c3e29c03Smrg case $host_os in 5280c3e29c03Smrg beos*) 5281c3e29c03Smrg lt_cv_dlopen=load_add_on 5282c3e29c03Smrg lt_cv_dlopen_libs= 5283c3e29c03Smrg lt_cv_dlopen_self=yes 5284c3e29c03Smrg ;; 52854b0ead49Smrg 5286c3e29c03Smrg mingw* | pw32* | cegcc*) 5287c3e29c03Smrg lt_cv_dlopen=LoadLibrary 5288c3e29c03Smrg lt_cv_dlopen_libs= 5289c3e29c03Smrg ;; 52904e7590efSmrg 5291c3e29c03Smrg cygwin*) 5292c3e29c03Smrg lt_cv_dlopen=dlopen 5293c3e29c03Smrg lt_cv_dlopen_libs= 5294c3e29c03Smrg ;; 52954b0ead49Smrg 5296c3e29c03Smrg darwin*) 5297c3e29c03Smrg # if libdl is installed we need to link against it 5298c3e29c03Smrg AC_CHECK_LIB([dl], [dlopen], 5299c3e29c03Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5300c3e29c03Smrg lt_cv_dlopen=dyld 5301c3e29c03Smrg lt_cv_dlopen_libs= 5302c3e29c03Smrg lt_cv_dlopen_self=yes 5303c3e29c03Smrg ]) 5304c3e29c03Smrg ;; 530526372658Smrg 5306c3e29c03Smrg tpf*) 5307c3e29c03Smrg # Don't try to run any link tests for TPF. We know it's impossible 5308c3e29c03Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 5309c3e29c03Smrg lt_cv_dlopen=dlopen 5310c3e29c03Smrg lt_cv_dlopen_libs= 5311c3e29c03Smrg lt_cv_dlopen_self=no 5312c3e29c03Smrg ;; 53134b0ead49Smrg 5314c3e29c03Smrg *) 5315c3e29c03Smrg AC_CHECK_FUNC([shl_load], 5316c3e29c03Smrg [lt_cv_dlopen=shl_load], 5317c3e29c03Smrg [AC_CHECK_LIB([dld], [shl_load], 5318c3e29c03Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5319c3e29c03Smrg [AC_CHECK_FUNC([dlopen], 5320c3e29c03Smrg [lt_cv_dlopen=dlopen], 5321c3e29c03Smrg [AC_CHECK_LIB([dl], [dlopen], 5322c3e29c03Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5323c3e29c03Smrg [AC_CHECK_LIB([svld], [dlopen], 5324c3e29c03Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5325c3e29c03Smrg [AC_CHECK_LIB([dld], [dld_link], 5326c3e29c03Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5327c3e29c03Smrg ]) 5328c3e29c03Smrg ]) 5329c3e29c03Smrg ]) 5330c3e29c03Smrg ]) 5331c3e29c03Smrg ]) 5332c3e29c03Smrg ;; 5333c3e29c03Smrg esac 53344b0ead49Smrg 5335c3e29c03Smrg if test no = "$lt_cv_dlopen"; then 5336c3e29c03Smrg enable_dlopen=no 5337c3e29c03Smrg else 5338c3e29c03Smrg enable_dlopen=yes 5339c3e29c03Smrg fi 5340c3e29c03Smrg 5341c3e29c03Smrg case $lt_cv_dlopen in 5342c3e29c03Smrg dlopen) 5343c3e29c03Smrg save_CPPFLAGS=$CPPFLAGS 5344c3e29c03Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 53454b0ead49Smrg 5346c3e29c03Smrg save_LDFLAGS=$LDFLAGS 5347c3e29c03Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 53484b0ead49Smrg 5349c3e29c03Smrg save_LIBS=$LIBS 5350c3e29c03Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 53517aa89044Smrg 5352c3e29c03Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 5353c3e29c03Smrg lt_cv_dlopen_self, [dnl 5354c3e29c03Smrg _LT_TRY_DLOPEN_SELF( 5355c3e29c03Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5356c3e29c03Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5357c3e29c03Smrg ]) 535849dc963fSmrg 5359c3e29c03Smrg if test yes = "$lt_cv_dlopen_self"; then 5360c3e29c03Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5361c3e29c03Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5362c3e29c03Smrg lt_cv_dlopen_self_static, [dnl 5363c3e29c03Smrg _LT_TRY_DLOPEN_SELF( 5364c3e29c03Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5365c3e29c03Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5366c3e29c03Smrg ]) 5367c3e29c03Smrg fi 53684b0ead49Smrg 5369c3e29c03Smrg CPPFLAGS=$save_CPPFLAGS 5370c3e29c03Smrg LDFLAGS=$save_LDFLAGS 5371c3e29c03Smrg LIBS=$save_LIBS 5372c3e29c03Smrg ;; 5373c3e29c03Smrg esac 537449dc963fSmrg 5375c3e29c03Smrg case $lt_cv_dlopen_self in 5376c3e29c03Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5377c3e29c03Smrg *) enable_dlopen_self=unknown ;; 5378c3e29c03Smrg esac 537949dc963fSmrg 5380c3e29c03Smrg case $lt_cv_dlopen_self_static in 5381c3e29c03Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5382c3e29c03Smrg *) enable_dlopen_self_static=unknown ;; 5383c3e29c03Smrg esac 5384c3e29c03Smrgfi 5385c3e29c03Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 5386c3e29c03Smrg [Whether dlopen is supported]) 5387c3e29c03Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5388c3e29c03Smrg [Whether dlopen of programs is supported]) 5389c3e29c03Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5390c3e29c03Smrg [Whether dlopen of statically linked programs is supported]) 5391c3e29c03Smrg])# LT_SYS_DLOPEN_SELF 53924b0ead49Smrg 5393c3e29c03Smrg# Old name: 5394c3e29c03SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5395c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 5396c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 539749dc963fSmrg 53984b0ead49Smrg 5399c3e29c03Smrg# _LT_COMPILER_C_O([TAGNAME]) 5400c3e29c03Smrg# --------------------------- 5401c3e29c03Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 5402c3e29c03Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5403c3e29c03Smrgm4_defun([_LT_COMPILER_C_O], 5404c3e29c03Smrg[m4_require([_LT_DECL_SED])dnl 5405c3e29c03Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5406c3e29c03Smrgm4_require([_LT_TAG_COMPILER])dnl 5407c3e29c03SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5408c3e29c03Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5409c3e29c03Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5410c3e29c03Smrg $RM -r conftest 2>/dev/null 5411c3e29c03Smrg mkdir conftest 5412c3e29c03Smrg cd conftest 5413c3e29c03Smrg mkdir out 5414c3e29c03Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 541549dc963fSmrg 5416c3e29c03Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 5417c3e29c03Smrg # Insert the option either (1) after the last *FLAGS variable, or 5418c3e29c03Smrg # (2) before a word containing "conftest.", or (3) at the end. 5419c3e29c03Smrg # Note that $ac_compile itself does not contain backslashes and begins 5420c3e29c03Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5421c3e29c03Smrg lt_compile=`echo "$ac_compile" | $SED \ 5422c3e29c03Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5423c3e29c03Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5424c3e29c03Smrg -e 's:$: $lt_compiler_flag:'` 5425c3e29c03Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5426c3e29c03Smrg (eval "$lt_compile" 2>out/conftest.err) 5427c3e29c03Smrg ac_status=$? 5428c3e29c03Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 5429c3e29c03Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5430c3e29c03Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 5431c3e29c03Smrg then 5432c3e29c03Smrg # The compiler can only warn and ignore the option if not recognized 5433c3e29c03Smrg # So say no if there are warnings 5434c3e29c03Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5435c3e29c03Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5436c3e29c03Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5437c3e29c03Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5438c3e29c03Smrg fi 5439c3e29c03Smrg fi 5440c3e29c03Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 5441c3e29c03Smrg $RM conftest* 5442c3e29c03Smrg # SGI C++ compiler will create directory out/ii_files/ for 5443c3e29c03Smrg # template instantiation 5444c3e29c03Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5445c3e29c03Smrg $RM out/* && rmdir out 5446c3e29c03Smrg cd .. 5447c3e29c03Smrg $RM -r conftest 5448c3e29c03Smrg $RM conftest* 5449c3e29c03Smrg]) 5450c3e29c03Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5451c3e29c03Smrg [Does compiler simultaneously support -c and -o options?]) 5452c3e29c03Smrg])# _LT_COMPILER_C_O 545349dc963fSmrg 545449dc963fSmrg 5455c3e29c03Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5456c3e29c03Smrg# ---------------------------------- 5457c3e29c03Smrg# Check to see if we can do hard links to lock some files if needed 5458c3e29c03Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 5459c3e29c03Smrg[m4_require([_LT_ENABLE_LOCK])dnl 5460c3e29c03Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5461c3e29c03Smrg_LT_COMPILER_C_O([$1]) 54624b0ead49Smrg 5463c3e29c03Smrghard_links=nottested 5464c3e29c03Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5465c3e29c03Smrg # do not overwrite the value of need_locks provided by the user 5466c3e29c03Smrg AC_MSG_CHECKING([if we can lock with hard links]) 5467c3e29c03Smrg hard_links=yes 5468c3e29c03Smrg $RM conftest* 5469c3e29c03Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5470c3e29c03Smrg touch conftest.a 5471c3e29c03Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 5472c3e29c03Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5473c3e29c03Smrg AC_MSG_RESULT([$hard_links]) 5474c3e29c03Smrg if test no = "$hard_links"; then 5475c3e29c03Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5476c3e29c03Smrg need_locks=warn 5477c3e29c03Smrg fi 5478c3e29c03Smrgelse 5479c3e29c03Smrg need_locks=no 5480c3e29c03Smrgfi 5481c3e29c03Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5482c3e29c03Smrg])# _LT_COMPILER_FILE_LOCKS 54834b0ead49Smrg 54844b0ead49Smrg 5485c3e29c03Smrg# _LT_CHECK_OBJDIR 5486c3e29c03Smrg# ---------------- 5487c3e29c03Smrgm4_defun([_LT_CHECK_OBJDIR], 5488c3e29c03Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5489c3e29c03Smrg[rm -f .libs 2>/dev/null 5490c3e29c03Smrgmkdir .libs 2>/dev/null 5491c3e29c03Smrgif test -d .libs; then 5492c3e29c03Smrg lt_cv_objdir=.libs 5493c3e29c03Smrgelse 5494c3e29c03Smrg # MS-DOS does not allow filenames that begin with a dot. 5495c3e29c03Smrg lt_cv_objdir=_libs 5496c3e29c03Smrgfi 5497c3e29c03Smrgrmdir .libs 2>/dev/null]) 5498c3e29c03Smrgobjdir=$lt_cv_objdir 5499c3e29c03Smrg_LT_DECL([], [objdir], [0], 5500c3e29c03Smrg [The name of the directory that contains temporary libtool files])dnl 5501c3e29c03Smrgm4_pattern_allow([LT_OBJDIR])dnl 5502c3e29c03SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5503c3e29c03Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 5504c3e29c03Smrg])# _LT_CHECK_OBJDIR 550549dc963fSmrg 550649dc963fSmrg 5507c3e29c03Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5508c3e29c03Smrg# -------------------------------------- 5509c3e29c03Smrg# Check hardcoding attributes. 5510c3e29c03Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5511c3e29c03Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5512c3e29c03Smrg_LT_TAGVAR(hardcode_action, $1)= 5513c3e29c03Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5514c3e29c03Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 5515c3e29c03Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 55164b0ead49Smrg 5517c3e29c03Smrg # We can hardcode non-existent directories. 5518c3e29c03Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5519c3e29c03Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 5520c3e29c03Smrg # have to relink, otherwise we might link with an installed library 5521c3e29c03Smrg # when we should be linking with a yet-to-be-installed one 5522c3e29c03Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5523c3e29c03Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5524c3e29c03Smrg # Linking always hardcodes the temporary library directory. 5525c3e29c03Smrg _LT_TAGVAR(hardcode_action, $1)=relink 5526c3e29c03Smrg else 5527c3e29c03Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 5528c3e29c03Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 5529c3e29c03Smrg fi 5530c3e29c03Smrgelse 5531c3e29c03Smrg # We cannot hardcode anything, or else we can only hardcode existing 5532c3e29c03Smrg # directories. 5533c3e29c03Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 5534c3e29c03Smrgfi 5535c3e29c03SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 55364b0ead49Smrg 5537c3e29c03Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5538c3e29c03Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5539c3e29c03Smrg # Fast installation is not supported 5540c3e29c03Smrg enable_fast_install=no 5541c3e29c03Smrgelif test yes = "$shlibpath_overrides_runpath" || 5542c3e29c03Smrg test no = "$enable_shared"; then 5543c3e29c03Smrg # Fast installation is not necessary 5544c3e29c03Smrg enable_fast_install=needless 5545c3e29c03Smrgfi 5546c3e29c03Smrg_LT_TAGDECL([], [hardcode_action], [0], 5547c3e29c03Smrg [How to hardcode a shared library path into an executable]) 5548c3e29c03Smrg])# _LT_LINKER_HARDCODE_LIBPATH 55494b0ead49Smrg 55504b0ead49Smrg 5551c3e29c03Smrg# _LT_CMD_STRIPLIB 5552c3e29c03Smrg# ---------------- 5553c3e29c03Smrgm4_defun([_LT_CMD_STRIPLIB], 5554c3e29c03Smrg[m4_require([_LT_DECL_EGREP]) 5555c3e29c03Smrgstriplib= 5556c3e29c03Smrgold_striplib= 5557c3e29c03SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 5558c3e29c03Smrgif test -z "$STRIP"; then 5559c3e29c03Smrg AC_MSG_RESULT([no]) 5560c3e29c03Smrgelse 5561c3e29c03Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5562c3e29c03Smrg old_striplib="$STRIP --strip-debug" 5563c3e29c03Smrg striplib="$STRIP --strip-unneeded" 5564c3e29c03Smrg AC_MSG_RESULT([yes]) 5565c3e29c03Smrg else 5566c3e29c03Smrg case $host_os in 5567c3e29c03Smrg darwin*) 5568c3e29c03Smrg # FIXME - insert some real tests, host_os isn't really good enough 5569c3e29c03Smrg striplib="$STRIP -x" 5570c3e29c03Smrg old_striplib="$STRIP -S" 5571c3e29c03Smrg AC_MSG_RESULT([yes]) 5572c3e29c03Smrg ;; 5573c3e29c03Smrg freebsd*) 5574c3e29c03Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5575c3e29c03Smrg old_striplib="$STRIP --strip-debug" 5576c3e29c03Smrg striplib="$STRIP --strip-unneeded" 5577c3e29c03Smrg AC_MSG_RESULT([yes]) 5578c3e29c03Smrg else 5579c3e29c03Smrg AC_MSG_RESULT([no]) 5580c3e29c03Smrg fi 5581c3e29c03Smrg ;; 5582c3e29c03Smrg *) 5583c3e29c03Smrg AC_MSG_RESULT([no]) 5584c3e29c03Smrg ;; 5585c3e29c03Smrg esac 5586c3e29c03Smrg fi 5587c3e29c03Smrgfi 5588c3e29c03Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5589c3e29c03Smrg_LT_DECL([], [striplib], [1]) 5590c3e29c03Smrg])# _LT_CMD_STRIPLIB 55914b0ead49Smrg 55924b0ead49Smrg 5593c3e29c03Smrg# _LT_PREPARE_MUNGE_PATH_LIST 5594c3e29c03Smrg# --------------------------- 5595c3e29c03Smrg# Make sure func_munge_path_list() is defined correctly. 5596c3e29c03Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5597c3e29c03Smrg[[# func_munge_path_list VARIABLE PATH 5598c3e29c03Smrg# ----------------------------------- 5599c3e29c03Smrg# VARIABLE is name of variable containing _space_ separated list of 5600c3e29c03Smrg# directories to be munged by the contents of PATH, which is string 5601c3e29c03Smrg# having a format: 5602c3e29c03Smrg# "DIR[:DIR]:" 5603c3e29c03Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 5604c3e29c03Smrg# ":DIR[:DIR]" 5605c3e29c03Smrg# string "DIR[ DIR]" will be appended to VARIABLE 5606c3e29c03Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 5607c3e29c03Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5608c3e29c03Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 5609c3e29c03Smrg# "DIR[:DIR]" 5610c3e29c03Smrg# VARIABLE will be replaced by "DIR[ DIR]" 5611c3e29c03Smrgfunc_munge_path_list () 5612c3e29c03Smrg{ 5613c3e29c03Smrg case x@S|@2 in 5614c3e29c03Smrg x) 5615c3e29c03Smrg ;; 5616c3e29c03Smrg *:) 5617c3e29c03Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5618c3e29c03Smrg ;; 5619c3e29c03Smrg x:*) 5620c3e29c03Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5621c3e29c03Smrg ;; 5622c3e29c03Smrg *::*) 5623c3e29c03Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5624c3e29c03Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5625c3e29c03Smrg ;; 5626c3e29c03Smrg *) 5627c3e29c03Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5628c3e29c03Smrg ;; 5629c3e29c03Smrg esac 5630c3e29c03Smrg} 5631c3e29c03Smrg]])# _LT_PREPARE_PATH_LIST 56324b0ead49Smrg 563349dc963fSmrg 5634c3e29c03Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 5635c3e29c03Smrg# ----------------------------- 5636c3e29c03Smrg# PORTME Fill in your ld.so characteristics 5637c3e29c03Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 5638c3e29c03Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5639c3e29c03Smrgm4_require([_LT_DECL_EGREP])dnl 5640c3e29c03Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5641c3e29c03Smrgm4_require([_LT_DECL_OBJDUMP])dnl 5642c3e29c03Smrgm4_require([_LT_DECL_SED])dnl 5643c3e29c03Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 5644c3e29c03Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5645c3e29c03SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 5646c3e29c03Smrgm4_if([$1], 5647c3e29c03Smrg [], [ 5648c3e29c03Smrgif test yes = "$GCC"; then 5649c3e29c03Smrg case $host_os in 5650c3e29c03Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5651c3e29c03Smrg *) lt_awk_arg='/^libraries:/' ;; 5652c3e29c03Smrg esac 5653c3e29c03Smrg case $host_os in 5654c3e29c03Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5655c3e29c03Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 5656c3e29c03Smrg esac 5657c3e29c03Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5658c3e29c03Smrg case $lt_search_path_spec in 5659c3e29c03Smrg *\;*) 5660c3e29c03Smrg # if the path contains ";" then we assume it to be the separator 5661c3e29c03Smrg # otherwise default to the standard path separator (i.e. ":") - it is 5662c3e29c03Smrg # assumed that no part of a normal pathname contains ";" but that should 5663c3e29c03Smrg # okay in the real world where ";" in dirpaths is itself problematic. 5664c3e29c03Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5665c3e29c03Smrg ;; 5666c3e29c03Smrg *) 5667c3e29c03Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5668c3e29c03Smrg ;; 5669c3e29c03Smrg esac 5670c3e29c03Smrg # Ok, now we have the path, separated by spaces, we can step through it 5671c3e29c03Smrg # and add multilib dir if necessary... 5672c3e29c03Smrg lt_tmp_lt_search_path_spec= 5673c3e29c03Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5674c3e29c03Smrg # ...but if some path component already ends with the multilib dir we assume 5675c3e29c03Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5676c3e29c03Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 5677c3e29c03Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5678c3e29c03Smrg lt_multi_os_dir= 5679c3e29c03Smrg ;; 5680c3e29c03Smrg esac 5681c3e29c03Smrg for lt_sys_path in $lt_search_path_spec; do 5682c3e29c03Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 5683c3e29c03Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5684c3e29c03Smrg elif test -n "$lt_multi_os_dir"; then 5685c3e29c03Smrg test -d "$lt_sys_path" && \ 5686c3e29c03Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5687c3e29c03Smrg fi 5688c3e29c03Smrg done 5689c3e29c03Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5690c3e29c03SmrgBEGIN {RS = " "; FS = "/|\n";} { 5691c3e29c03Smrg lt_foo = ""; 5692c3e29c03Smrg lt_count = 0; 5693c3e29c03Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 5694c3e29c03Smrg if ($lt_i != "" && $lt_i != ".") { 5695c3e29c03Smrg if ($lt_i == "..") { 5696c3e29c03Smrg lt_count++; 5697c3e29c03Smrg } else { 5698c3e29c03Smrg if (lt_count == 0) { 5699c3e29c03Smrg lt_foo = "/" $lt_i lt_foo; 5700c3e29c03Smrg } else { 5701c3e29c03Smrg lt_count--; 5702c3e29c03Smrg } 5703c3e29c03Smrg } 5704c3e29c03Smrg } 5705c3e29c03Smrg } 5706c3e29c03Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5707c3e29c03Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5708c3e29c03Smrg}'` 5709c3e29c03Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 5710c3e29c03Smrg # for these hosts. 5711c3e29c03Smrg case $host_os in 5712c3e29c03Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5713c3e29c03Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5714c3e29c03Smrg esac 5715c3e29c03Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5716c3e29c03Smrgelse 5717c3e29c03Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5718c3e29c03Smrgfi]) 5719c3e29c03Smrglibrary_names_spec= 5720c3e29c03Smrglibname_spec='lib$name' 5721c3e29c03Smrgsoname_spec= 5722c3e29c03Smrgshrext_cmds=.so 5723c3e29c03Smrgpostinstall_cmds= 5724c3e29c03Smrgpostuninstall_cmds= 5725c3e29c03Smrgfinish_cmds= 5726c3e29c03Smrgfinish_eval= 5727c3e29c03Smrgshlibpath_var= 5728c3e29c03Smrgshlibpath_overrides_runpath=unknown 5729c3e29c03Smrgversion_type=none 5730c3e29c03Smrgdynamic_linker="$host_os ld.so" 5731c3e29c03Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 5732c3e29c03Smrgneed_lib_prefix=unknown 5733c3e29c03Smrghardcode_into_libs=no 573449dc963fSmrg 5735c3e29c03Smrg# when you set need_version to no, make sure it does not cause -set_version 5736c3e29c03Smrg# flags to be left without arguments 5737c3e29c03Smrgneed_version=unknown 573849dc963fSmrg 5739c3e29c03SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5740c3e29c03Smrg[User-defined run-time library search path.]) 57414b0ead49Smrg 5742c3e29c03Smrgcase $host_os in 5743c3e29c03Smrgaix3*) 5744c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 5745c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5746c3e29c03Smrg shlibpath_var=LIBPATH 57474b0ead49Smrg 5748c3e29c03Smrg # AIX 3 has no versioning support, so we append a major version to the name. 5749c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 5750c3e29c03Smrg ;; 575149dc963fSmrg 5752c3e29c03Smrgaix[[4-9]]*) 5753c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 5754c3e29c03Smrg need_lib_prefix=no 5755c3e29c03Smrg need_version=no 5756c3e29c03Smrg hardcode_into_libs=yes 5757c3e29c03Smrg if test ia64 = "$host_cpu"; then 5758c3e29c03Smrg # AIX 5 supports IA64 5759c3e29c03Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5760c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 5761c3e29c03Smrg else 5762c3e29c03Smrg # With GCC up to 2.95.x, collect2 would create an import file 5763c3e29c03Smrg # for dependence libraries. The import file would start with 5764c3e29c03Smrg # the line '#! .'. This would cause the generated library to 5765c3e29c03Smrg # depend on '.', always an invalid library. This was fixed in 5766c3e29c03Smrg # development snapshots of GCC prior to 3.0. 5767c3e29c03Smrg case $host_os in 5768c3e29c03Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 5769c3e29c03Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5770c3e29c03Smrg echo ' yes ' 5771c3e29c03Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5772c3e29c03Smrg : 5773c3e29c03Smrg else 5774c3e29c03Smrg can_build_shared=no 5775c3e29c03Smrg fi 5776c3e29c03Smrg ;; 5777c3e29c03Smrg esac 5778c3e29c03Smrg # Using Import Files as archive members, it is possible to support 5779c3e29c03Smrg # filename-based versioning of shared library archives on AIX. While 5780c3e29c03Smrg # this would work for both with and without runtime linking, it will 5781c3e29c03Smrg # prevent static linking of such archives. So we do filename-based 5782c3e29c03Smrg # shared library versioning with .so extension only, which is used 5783c3e29c03Smrg # when both runtime linking and shared linking is enabled. 5784c3e29c03Smrg # Unfortunately, runtime linking may impact performance, so we do 5785c3e29c03Smrg # not want this to be the default eventually. Also, we use the 5786c3e29c03Smrg # versioned .so libs for executables only if there is the -brtl 5787c3e29c03Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5788c3e29c03Smrg # To allow for filename-based versioning support, we need to create 5789c3e29c03Smrg # libNAME.so.V as an archive file, containing: 5790c3e29c03Smrg # *) an Import File, referring to the versioned filename of the 5791c3e29c03Smrg # archive as well as the shared archive member, telling the 5792c3e29c03Smrg # bitwidth (32 or 64) of that shared object, and providing the 5793c3e29c03Smrg # list of exported symbols of that shared object, eventually 5794c3e29c03Smrg # decorated with the 'weak' keyword 5795c3e29c03Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 5796c3e29c03Smrg # it being seen by the linker. 5797c3e29c03Smrg # At run time we better use the real file rather than another symlink, 5798c3e29c03Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 579949dc963fSmrg 5800c3e29c03Smrg case $with_aix_soname,$aix_use_runtimelinking in 5801c3e29c03Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5802c3e29c03Smrg # soname into executable. Probably we can add versioning support to 5803c3e29c03Smrg # collect2, so additional links can be useful in future. 5804c3e29c03Smrg aix,yes) # traditional libtool 5805c3e29c03Smrg dynamic_linker='AIX unversionable lib.so' 5806c3e29c03Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5807c3e29c03Smrg # instead of lib<name>.a to let people know that these are not 5808c3e29c03Smrg # typical AIX shared libraries. 5809c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5810c3e29c03Smrg ;; 5811c3e29c03Smrg aix,no) # traditional AIX only 5812c3e29c03Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5813c3e29c03Smrg # We preserve .a as extension for shared libraries through AIX4.2 5814c3e29c03Smrg # and later when we are not doing run time linking. 5815c3e29c03Smrg library_names_spec='$libname$release.a $libname.a' 5816c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 5817c3e29c03Smrg ;; 5818c3e29c03Smrg svr4,*) # full svr4 only 5819c3e29c03Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5820c3e29c03Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5821c3e29c03Smrg # We do not specify a path in Import Files, so LIBPATH fires. 5822c3e29c03Smrg shlibpath_overrides_runpath=yes 5823c3e29c03Smrg ;; 5824c3e29c03Smrg *,yes) # both, prefer svr4 5825c3e29c03Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5826c3e29c03Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5827c3e29c03Smrg # unpreferred sharedlib libNAME.a needs extra handling 5828c3e29c03Smrg 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"' 5829c3e29c03Smrg 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"' 5830c3e29c03Smrg # We do not specify a path in Import Files, so LIBPATH fires. 5831c3e29c03Smrg shlibpath_overrides_runpath=yes 5832c3e29c03Smrg ;; 5833c3e29c03Smrg *,no) # both, prefer aix 5834c3e29c03Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5835c3e29c03Smrg library_names_spec='$libname$release.a $libname.a' 5836c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 5837c3e29c03Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5838c3e29c03Smrg 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)' 5839c3e29c03Smrg 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"' 5840c3e29c03Smrg ;; 5841c3e29c03Smrg esac 5842c3e29c03Smrg shlibpath_var=LIBPATH 5843c3e29c03Smrg fi 5844c3e29c03Smrg ;; 584549dc963fSmrg 5846c3e29c03Smrgamigaos*) 5847c3e29c03Smrg case $host_cpu in 5848c3e29c03Smrg powerpc) 5849c3e29c03Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 5850c3e29c03Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5851c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5852c3e29c03Smrg ;; 5853c3e29c03Smrg m68k) 5854c3e29c03Smrg library_names_spec='$libname.ixlibrary $libname.a' 5855c3e29c03Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 5856c3e29c03Smrg 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' 5857c3e29c03Smrg ;; 5858c3e29c03Smrg esac 5859c3e29c03Smrg ;; 58604b0ead49Smrg 5861c3e29c03Smrgbeos*) 5862c3e29c03Smrg library_names_spec='$libname$shared_ext' 5863c3e29c03Smrg dynamic_linker="$host_os ld.so" 5864c3e29c03Smrg shlibpath_var=LIBRARY_PATH 5865c3e29c03Smrg ;; 58664b0ead49Smrg 5867c3e29c03Smrgbsdi[[45]]*) 5868c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 5869c3e29c03Smrg need_version=no 5870c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5871c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 5872c3e29c03Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5873c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 5874c3e29c03Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5875c3e29c03Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5876c3e29c03Smrg # the default ld.so.conf also contains /usr/contrib/lib and 5877c3e29c03Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5878c3e29c03Smrg # libtool to hard-code these into programs 5879c3e29c03Smrg ;; 58804b0ead49Smrg 5881c3e29c03Smrgcygwin* | mingw* | pw32* | cegcc*) 5882c3e29c03Smrg version_type=windows 5883c3e29c03Smrg shrext_cmds=.dll 5884c3e29c03Smrg need_version=no 5885c3e29c03Smrg need_lib_prefix=no 588649dc963fSmrg 5887c3e29c03Smrg case $GCC,$cc_basename in 5888c3e29c03Smrg yes,*) 5889c3e29c03Smrg # gcc 5890c3e29c03Smrg library_names_spec='$libname.dll.a' 5891c3e29c03Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5892c3e29c03Smrg postinstall_cmds='base_file=`basename \$file`~ 5893c3e29c03Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5894c3e29c03Smrg dldir=$destdir/`dirname \$dlpath`~ 5895c3e29c03Smrg test -d \$dldir || mkdir -p \$dldir~ 5896c3e29c03Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 5897c3e29c03Smrg chmod a+x \$dldir/$dlname~ 5898c3e29c03Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5899c3e29c03Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5900c3e29c03Smrg fi' 5901c3e29c03Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5902c3e29c03Smrg dlpath=$dir/\$dldll~ 5903c3e29c03Smrg $RM \$dlpath' 5904c3e29c03Smrg shlibpath_overrides_runpath=yes 59054b0ead49Smrg 5906c3e29c03Smrg case $host_os in 5907c3e29c03Smrg cygwin*) 5908c3e29c03Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5909c3e29c03Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5910c3e29c03Smrgm4_if([$1], [],[ 5911c3e29c03Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5912c3e29c03Smrg ;; 5913c3e29c03Smrg mingw* | cegcc*) 5914c3e29c03Smrg # MinGW DLLs use traditional 'lib' prefix 5915c3e29c03Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5916c3e29c03Smrg ;; 5917c3e29c03Smrg pw32*) 5918c3e29c03Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 5919c3e29c03Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5920c3e29c03Smrg ;; 5921c3e29c03Smrg esac 5922c3e29c03Smrg dynamic_linker='Win32 ld.exe' 5923c3e29c03Smrg ;; 59244b0ead49Smrg 5925c3e29c03Smrg *,cl* | *,icl*) 5926c3e29c03Smrg # Native MSVC or ICC 5927c3e29c03Smrg libname_spec='$name' 5928c3e29c03Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5929c3e29c03Smrg library_names_spec='$libname.dll.lib' 59304b0ead49Smrg 5931c3e29c03Smrg case $build_os in 5932c3e29c03Smrg mingw*) 5933c3e29c03Smrg sys_lib_search_path_spec= 5934c3e29c03Smrg lt_save_ifs=$IFS 5935c3e29c03Smrg IFS=';' 5936c3e29c03Smrg for lt_path in $LIB 5937c3e29c03Smrg do 5938c3e29c03Smrg IFS=$lt_save_ifs 5939c3e29c03Smrg # Let DOS variable expansion print the short 8.3 style file name. 5940c3e29c03Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 5941c3e29c03Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 5942c3e29c03Smrg done 5943c3e29c03Smrg IFS=$lt_save_ifs 5944c3e29c03Smrg # Convert to MSYS style. 5945c3e29c03Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 5946c3e29c03Smrg ;; 5947c3e29c03Smrg cygwin*) 5948c3e29c03Smrg # Convert to unix form, then to dos form, then back to unix form 5949c3e29c03Smrg # but this time dos style (no spaces!) so that the unix form looks 5950c3e29c03Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 5951c3e29c03Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 5952c3e29c03Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 5953c3e29c03Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5954c3e29c03Smrg ;; 5955c3e29c03Smrg *) 5956c3e29c03Smrg sys_lib_search_path_spec=$LIB 5957c3e29c03Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 5958c3e29c03Smrg # It is most probably a Windows format PATH. 5959c3e29c03Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 5960c3e29c03Smrg else 5961c3e29c03Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5962c3e29c03Smrg fi 5963c3e29c03Smrg # FIXME: find the short name or the path components, as spaces are 5964c3e29c03Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 5965c3e29c03Smrg ;; 5966c3e29c03Smrg esac 596749dc963fSmrg 5968c3e29c03Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5969c3e29c03Smrg postinstall_cmds='base_file=`basename \$file`~ 5970c3e29c03Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5971c3e29c03Smrg dldir=$destdir/`dirname \$dlpath`~ 5972c3e29c03Smrg test -d \$dldir || mkdir -p \$dldir~ 5973c3e29c03Smrg $install_prog $dir/$dlname \$dldir/$dlname' 5974c3e29c03Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5975c3e29c03Smrg dlpath=$dir/\$dldll~ 5976c3e29c03Smrg $RM \$dlpath' 5977c3e29c03Smrg shlibpath_overrides_runpath=yes 5978c3e29c03Smrg dynamic_linker='Win32 link.exe' 5979c3e29c03Smrg ;; 598049dc963fSmrg 5981c3e29c03Smrg *) 5982c3e29c03Smrg # Assume MSVC and ICC wrapper 5983c3e29c03Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 5984c3e29c03Smrg dynamic_linker='Win32 ld.exe' 5985c3e29c03Smrg ;; 5986c3e29c03Smrg esac 5987c3e29c03Smrg # FIXME: first we should search . and the directory the executable is in 5988c3e29c03Smrg shlibpath_var=PATH 5989c3e29c03Smrg ;; 599049dc963fSmrg 5991c3e29c03Smrgdarwin* | rhapsody*) 5992c3e29c03Smrg dynamic_linker="$host_os dyld" 5993c3e29c03Smrg version_type=darwin 5994c3e29c03Smrg need_lib_prefix=no 5995c3e29c03Smrg need_version=no 5996c3e29c03Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 5997c3e29c03Smrg soname_spec='$libname$release$major$shared_ext' 5998c3e29c03Smrg shlibpath_overrides_runpath=yes 5999c3e29c03Smrg shlibpath_var=DYLD_LIBRARY_PATH 6000c3e29c03Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6001c3e29c03Smrgm4_if([$1], [],[ 6002c3e29c03Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6003c3e29c03Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6004c3e29c03Smrg ;; 60054b0ead49Smrg 6006c3e29c03Smrgdgux*) 6007c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6008c3e29c03Smrg need_lib_prefix=no 6009c3e29c03Smrg need_version=no 6010c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6011c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6012c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6013c3e29c03Smrg ;; 60144b0ead49Smrg 6015c3e29c03Smrgfreebsd* | dragonfly* | midnightbsd*) 6016c3e29c03Smrg # DragonFly does not have aout. When/if they implement a new 6017c3e29c03Smrg # versioning mechanism, adjust this. 6018c3e29c03Smrg if test -x /usr/bin/objformat; then 6019c3e29c03Smrg objformat=`/usr/bin/objformat` 6020c3e29c03Smrg else 6021c3e29c03Smrg case $host_os in 6022c3e29c03Smrg freebsd[[23]].*) objformat=aout ;; 6023c3e29c03Smrg *) objformat=elf ;; 6024c3e29c03Smrg esac 6025c3e29c03Smrg fi 6026c3e29c03Smrg version_type=freebsd-$objformat 6027c3e29c03Smrg case $version_type in 6028c3e29c03Smrg freebsd-elf*) 6029c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6030c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6031c3e29c03Smrg need_version=no 6032c3e29c03Smrg need_lib_prefix=no 603349dc963fSmrg ;; 6034c3e29c03Smrg freebsd-*) 6035c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6036c3e29c03Smrg need_version=yes 603749dc963fSmrg ;; 6038c3e29c03Smrg esac 6039c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6040c3e29c03Smrg case $host_os in 6041c3e29c03Smrg freebsd2.*) 6042c3e29c03Smrg shlibpath_overrides_runpath=yes 6043c3e29c03Smrg ;; 6044c3e29c03Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6045c3e29c03Smrg shlibpath_overrides_runpath=yes 6046c3e29c03Smrg hardcode_into_libs=yes 6047c3e29c03Smrg ;; 6048c3e29c03Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6049c3e29c03Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6050c3e29c03Smrg shlibpath_overrides_runpath=no 6051c3e29c03Smrg hardcode_into_libs=yes 6052c3e29c03Smrg ;; 6053c3e29c03Smrg *) # from 4.6 on, and DragonFly 6054c3e29c03Smrg shlibpath_overrides_runpath=yes 6055c3e29c03Smrg hardcode_into_libs=yes 6056c3e29c03Smrg ;; 6057c3e29c03Smrg esac 6058c3e29c03Smrg ;; 60594b0ead49Smrg 6060c3e29c03Smrghaiku*) 6061c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6062c3e29c03Smrg need_lib_prefix=no 6063c3e29c03Smrg need_version=no 6064c3e29c03Smrg dynamic_linker="$host_os runtime_loader" 6065c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6066c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6067c3e29c03Smrg shlibpath_var=LIBRARY_PATH 6068c3e29c03Smrg shlibpath_overrides_runpath=no 6069c3e29c03Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6070c3e29c03Smrg hardcode_into_libs=yes 6071c3e29c03Smrg ;; 60724b0ead49Smrg 6073c3e29c03Smrghpux9* | hpux10* | hpux11*) 6074c3e29c03Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 6075c3e29c03Smrg # link against other versions. 6076c3e29c03Smrg version_type=sunos 6077c3e29c03Smrg need_lib_prefix=no 6078c3e29c03Smrg need_version=no 6079c3e29c03Smrg case $host_cpu in 6080c3e29c03Smrg ia64*) 6081c3e29c03Smrg shrext_cmds='.so' 6082c3e29c03Smrg hardcode_into_libs=yes 6083c3e29c03Smrg dynamic_linker="$host_os dld.so" 6084c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6085c3e29c03Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6086c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6087c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6088c3e29c03Smrg if test 32 = "$HPUX_IA64_MODE"; then 6089c3e29c03Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6090c3e29c03Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6091c3e29c03Smrg else 6092c3e29c03Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6093c3e29c03Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6094c3e29c03Smrg fi 6095c3e29c03Smrg ;; 6096c3e29c03Smrg hppa*64*) 6097c3e29c03Smrg shrext_cmds='.sl' 6098c3e29c03Smrg hardcode_into_libs=yes 6099c3e29c03Smrg dynamic_linker="$host_os dld.sl" 6100c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6101c3e29c03Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6102c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6103c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6104c3e29c03Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6105c3e29c03Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6106c3e29c03Smrg ;; 6107c3e29c03Smrg *) 6108c3e29c03Smrg shrext_cmds='.sl' 6109c3e29c03Smrg dynamic_linker="$host_os dld.sl" 6110c3e29c03Smrg shlibpath_var=SHLIB_PATH 6111c3e29c03Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6112c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6113c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6114c3e29c03Smrg ;; 6115c3e29c03Smrg esac 6116c3e29c03Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6117c3e29c03Smrg postinstall_cmds='chmod 555 $lib' 6118c3e29c03Smrg # or fails outright, so override atomically: 6119c3e29c03Smrg install_override_mode=555 6120c3e29c03Smrg ;; 6121c3e29c03Smrg 6122c3e29c03Smrginterix[[3-9]]*) 6123c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6124c3e29c03Smrg need_lib_prefix=no 6125c3e29c03Smrg need_version=no 6126c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6127c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6128c3e29c03Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6129c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6130c3e29c03Smrg shlibpath_overrides_runpath=no 6131c3e29c03Smrg hardcode_into_libs=yes 6132c3e29c03Smrg ;; 61334b0ead49Smrg 6134c3e29c03Smrgirix5* | irix6* | nonstopux*) 6135c3e29c03Smrg case $host_os in 6136c3e29c03Smrg nonstopux*) version_type=nonstopux ;; 6137c3e29c03Smrg *) 6138c3e29c03Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 6139c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6140c3e29c03Smrg else 6141c3e29c03Smrg version_type=irix 6142c3e29c03Smrg fi ;; 6143c3e29c03Smrg esac 6144c3e29c03Smrg need_lib_prefix=no 6145c3e29c03Smrg need_version=no 6146c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6147c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6148c3e29c03Smrg case $host_os in 6149c3e29c03Smrg irix5* | nonstopux*) 6150c3e29c03Smrg libsuff= shlibsuff= 6151c3e29c03Smrg ;; 6152c3e29c03Smrg *) 6153c3e29c03Smrg case $LD in # libtool.m4 will add one of these switches to LD 6154c3e29c03Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6155c3e29c03Smrg libsuff= shlibsuff= libmagic=32-bit;; 6156c3e29c03Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6157c3e29c03Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6158c3e29c03Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6159c3e29c03Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6160c3e29c03Smrg *) libsuff= shlibsuff= libmagic=never-match;; 616149dc963fSmrg esac 6162c3e29c03Smrg ;; 6163c3e29c03Smrg esac 6164c3e29c03Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6165c3e29c03Smrg shlibpath_overrides_runpath=no 6166c3e29c03Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6167c3e29c03Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6168c3e29c03Smrg hardcode_into_libs=yes 6169c3e29c03Smrg ;; 61704b0ead49Smrg 6171c3e29c03Smrg# No shared lib support for Linux oldld, aout, or coff. 6172c3e29c03Smrglinux*oldld* | linux*aout* | linux*coff*) 6173c3e29c03Smrg dynamic_linker=no 6174c3e29c03Smrg ;; 617549dc963fSmrg 6176c3e29c03Smrglinux*android*) 6177c3e29c03Smrg version_type=none # Android doesn't support versioned libraries. 6178c3e29c03Smrg need_lib_prefix=no 6179c3e29c03Smrg need_version=no 6180c3e29c03Smrg library_names_spec='$libname$release$shared_ext' 6181c3e29c03Smrg soname_spec='$libname$release$shared_ext' 6182c3e29c03Smrg finish_cmds= 6183c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6184c3e29c03Smrg shlibpath_overrides_runpath=yes 618549dc963fSmrg 6186c3e29c03Smrg # This implies no fast_install, which is unacceptable. 6187c3e29c03Smrg # Some rework will be needed to allow for fast_install 6188c3e29c03Smrg # before this can be enabled. 6189c3e29c03Smrg hardcode_into_libs=yes 619049dc963fSmrg 6191c3e29c03Smrg dynamic_linker='Android linker' 6192c3e29c03Smrg # Don't embed -rpath directories since the linker doesn't support them. 6193c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6194c3e29c03Smrg ;; 61954b0ead49Smrg 6196c3e29c03Smrg# This must be glibc/ELF. 6197c3e29c03Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6198c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6199c3e29c03Smrg need_lib_prefix=no 6200c3e29c03Smrg need_version=no 6201c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6202c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6203c3e29c03Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6204c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6205c3e29c03Smrg shlibpath_overrides_runpath=no 62064b0ead49Smrg 6207c3e29c03Smrg # Some binutils ld are patched to set DT_RUNPATH 6208c3e29c03Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6209c3e29c03Smrg [lt_cv_shlibpath_overrides_runpath=no 6210c3e29c03Smrg save_LDFLAGS=$LDFLAGS 6211c3e29c03Smrg save_libdir=$libdir 6212c3e29c03Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6213c3e29c03Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6214c3e29c03Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6215c3e29c03Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6216c3e29c03Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6217c3e29c03Smrg LDFLAGS=$save_LDFLAGS 6218c3e29c03Smrg libdir=$save_libdir 6219c3e29c03Smrg ]) 6220c3e29c03Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 62214b0ead49Smrg 6222c3e29c03Smrg # This implies no fast_install, which is unacceptable. 6223c3e29c03Smrg # Some rework will be needed to allow for fast_install 6224c3e29c03Smrg # before this can be enabled. 6225c3e29c03Smrg hardcode_into_libs=yes 62264e7590efSmrg 6227c3e29c03Smrg # Ideally, we could use ldconfig to report *all* directores which are 6228c3e29c03Smrg # searched for libraries, however this is still not possible. Aside from not 6229c3e29c03Smrg # being certain /sbin/ldconfig is available, command 6230c3e29c03Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6231c3e29c03Smrg # even though it is searched at run-time. Try to do the best guess by 6232c3e29c03Smrg # appending ld.so.conf contents (and includes) to the search path. 6233c3e29c03Smrg if test -f /etc/ld.so.conf; then 6234c3e29c03Smrg 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' ' '` 6235c3e29c03Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6236c3e29c03Smrg fi 623726372658Smrg 6238c3e29c03Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6239c3e29c03Smrg # powerpc, because MkLinux only supported shared libraries with the 6240c3e29c03Smrg # GNU dynamic linker. Since this was broken with cross compilers, 6241c3e29c03Smrg # most powerpc-linux boxes support dynamic linking these days and 6242c3e29c03Smrg # people can always --disable-shared, the test was removed, and we 6243c3e29c03Smrg # assume the GNU/Linux dynamic linker is in use. 6244c3e29c03Smrg dynamic_linker='GNU/Linux ld.so' 6245c3e29c03Smrg ;; 62464b0ead49Smrg 6247c3e29c03Smrgnetbsd*) 6248c3e29c03Smrg version_type=sunos 6249c3e29c03Smrg need_lib_prefix=no 6250c3e29c03Smrg need_version=no 6251c3e29c03Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6252c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6253c3e29c03Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6254c3e29c03Smrg dynamic_linker='NetBSD (a.out) ld.so' 6255c3e29c03Smrg else 6256c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6257c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6258c3e29c03Smrg dynamic_linker='NetBSD ld.elf_so' 6259c3e29c03Smrg fi 6260c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6261c3e29c03Smrg shlibpath_overrides_runpath=yes 6262c3e29c03Smrg hardcode_into_libs=yes 6263c3e29c03Smrg ;; 62644e7590efSmrg 6265c3e29c03Smrgnewsos6) 6266c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6267c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6268c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6269c3e29c03Smrg shlibpath_overrides_runpath=yes 6270c3e29c03Smrg ;; 62714e7590efSmrg 6272c3e29c03Smrg*nto* | *qnx*) 6273c3e29c03Smrg version_type=qnx 6274c3e29c03Smrg need_lib_prefix=no 6275c3e29c03Smrg need_version=no 6276c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6277c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6278c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6279c3e29c03Smrg shlibpath_overrides_runpath=no 6280c3e29c03Smrg hardcode_into_libs=yes 6281c3e29c03Smrg dynamic_linker='ldqnx.so' 6282c3e29c03Smrg ;; 628352b01e16Smrg 6284c3e29c03Smrgopenbsd* | bitrig*) 6285c3e29c03Smrg version_type=sunos 6286c3e29c03Smrg sys_lib_dlsearch_path_spec=/usr/lib 6287c3e29c03Smrg need_lib_prefix=no 6288c3e29c03Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6289c3e29c03Smrg need_version=no 6290c3e29c03Smrg else 6291c3e29c03Smrg need_version=yes 6292c3e29c03Smrg fi 6293c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6294c3e29c03Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6295c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6296c3e29c03Smrg shlibpath_overrides_runpath=yes 6297c3e29c03Smrg ;; 629852b01e16Smrg 6299c3e29c03Smrgos2*) 6300c3e29c03Smrg libname_spec='$name' 6301c3e29c03Smrg version_type=windows 6302c3e29c03Smrg shrext_cmds=.dll 6303c3e29c03Smrg need_version=no 6304c3e29c03Smrg need_lib_prefix=no 6305c3e29c03Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6306c3e29c03Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6307c3e29c03Smrg v=$($ECHO $release$versuffix | tr -d .-); 6308c3e29c03Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6309c3e29c03Smrg $ECHO $n$v`$shared_ext' 6310c3e29c03Smrg library_names_spec='${libname}_dll.$libext' 6311c3e29c03Smrg dynamic_linker='OS/2 ld.exe' 6312c3e29c03Smrg shlibpath_var=BEGINLIBPATH 6313c3e29c03Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6314c3e29c03Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6315c3e29c03Smrg postinstall_cmds='base_file=`basename \$file`~ 6316c3e29c03Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6317c3e29c03Smrg dldir=$destdir/`dirname \$dlpath`~ 6318c3e29c03Smrg test -d \$dldir || mkdir -p \$dldir~ 6319c3e29c03Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 6320c3e29c03Smrg chmod a+x \$dldir/$dlname~ 6321c3e29c03Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6322c3e29c03Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6323c3e29c03Smrg fi' 6324c3e29c03Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6325c3e29c03Smrg dlpath=$dir/\$dldll~ 6326c3e29c03Smrg $RM \$dlpath' 6327c3e29c03Smrg ;; 632852b01e16Smrg 6329c3e29c03Smrgosf3* | osf4* | osf5*) 6330c3e29c03Smrg version_type=osf 6331c3e29c03Smrg need_lib_prefix=no 6332c3e29c03Smrg need_version=no 6333c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6334c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6335c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6336c3e29c03Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6337c3e29c03Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6338c3e29c03Smrg ;; 633952b01e16Smrg 6340c3e29c03Smrgrdos*) 6341c3e29c03Smrg dynamic_linker=no 6342c3e29c03Smrg ;; 63434b0ead49Smrg 6344c3e29c03Smrgsolaris*) 6345c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6346c3e29c03Smrg need_lib_prefix=no 6347c3e29c03Smrg need_version=no 6348c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6349c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6350c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6351c3e29c03Smrg shlibpath_overrides_runpath=yes 6352c3e29c03Smrg hardcode_into_libs=yes 6353c3e29c03Smrg # ldd complains unless libraries are executable 6354c3e29c03Smrg postinstall_cmds='chmod +x $lib' 6355c3e29c03Smrg ;; 635649dc963fSmrg 6357c3e29c03Smrgsunos4*) 6358c3e29c03Smrg version_type=sunos 6359c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6360c3e29c03Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6361c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6362c3e29c03Smrg shlibpath_overrides_runpath=yes 6363c3e29c03Smrg if test yes = "$with_gnu_ld"; then 6364c3e29c03Smrg need_lib_prefix=no 6365c3e29c03Smrg fi 6366c3e29c03Smrg need_version=yes 6367c3e29c03Smrg ;; 63684b0ead49Smrg 6369c3e29c03Smrgsysv4 | sysv4.3*) 6370c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6371c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6372c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6373c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6374c3e29c03Smrg case $host_vendor in 6375c3e29c03Smrg sni) 6376c3e29c03Smrg shlibpath_overrides_runpath=no 6377c3e29c03Smrg need_lib_prefix=no 6378c3e29c03Smrg runpath_var=LD_RUN_PATH 6379c3e29c03Smrg ;; 6380c3e29c03Smrg siemens) 6381c3e29c03Smrg need_lib_prefix=no 6382c3e29c03Smrg ;; 6383c3e29c03Smrg motorola) 6384c3e29c03Smrg need_lib_prefix=no 6385c3e29c03Smrg need_version=no 6386c3e29c03Smrg shlibpath_overrides_runpath=no 6387c3e29c03Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6388c3e29c03Smrg ;; 6389c3e29c03Smrg esac 6390c3e29c03Smrg ;; 63914b0ead49Smrg 6392c3e29c03Smrgsysv4*MP*) 6393c3e29c03Smrg if test -d /usr/nec; then 6394c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6395c3e29c03Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6396c3e29c03Smrg soname_spec='$libname$shared_ext.$major' 6397c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6398c3e29c03Smrg fi 6399c3e29c03Smrg ;; 6400c3e29c03Smrg 6401c3e29c03Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6402c3e29c03Smrg version_type=sco 6403c3e29c03Smrg need_lib_prefix=no 6404c3e29c03Smrg need_version=no 6405c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6406c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6407c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6408c3e29c03Smrg shlibpath_overrides_runpath=yes 6409c3e29c03Smrg hardcode_into_libs=yes 6410c3e29c03Smrg if test yes = "$with_gnu_ld"; then 6411c3e29c03Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6412c3e29c03Smrg else 6413c3e29c03Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6414c3e29c03Smrg case $host_os in 6415c3e29c03Smrg sco3.2v5*) 6416c3e29c03Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6417c3e29c03Smrg ;; 641849dc963fSmrg esac 6419c3e29c03Smrg fi 6420c3e29c03Smrg sys_lib_dlsearch_path_spec='/usr/lib' 6421c3e29c03Smrg ;; 642252b01e16Smrg 6423c3e29c03Smrgtpf*) 6424c3e29c03Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6425c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6426c3e29c03Smrg need_lib_prefix=no 6427c3e29c03Smrg need_version=no 6428c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6429c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6430c3e29c03Smrg shlibpath_overrides_runpath=no 6431c3e29c03Smrg hardcode_into_libs=yes 6432c3e29c03Smrg ;; 64334b0ead49Smrg 6434c3e29c03Smrguts4*) 6435c3e29c03Smrg version_type=linux # correct to gnu/linux during the next big refactor 6436c3e29c03Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6437c3e29c03Smrg soname_spec='$libname$release$shared_ext$major' 6438c3e29c03Smrg shlibpath_var=LD_LIBRARY_PATH 6439c3e29c03Smrg ;; 64404b0ead49Smrg 6441c3e29c03Smrg*) 6442c3e29c03Smrg dynamic_linker=no 644349dc963fSmrg ;; 644449dc963fSmrgesac 6445c3e29c03SmrgAC_MSG_RESULT([$dynamic_linker]) 6446c3e29c03Smrgtest no = "$dynamic_linker" && can_build_shared=no 64474b0ead49Smrg 6448c3e29c03Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6449c3e29c03Smrgif test yes = "$GCC"; then 6450c3e29c03Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 645149dc963fSmrgfi 645249dc963fSmrg 6453c3e29c03Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6454c3e29c03Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6455c3e29c03Smrgfi 645649dc963fSmrg 6457c3e29c03Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6458c3e29c03Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 64597aa89044Smrgfi 646049dc963fSmrg 6461c3e29c03Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6462c3e29c03Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 646349dc963fSmrg 6464c3e29c03Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6465c3e29c03Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 646649dc963fSmrg 6467c3e29c03Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6468c3e29c03Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 646949dc963fSmrg 6470c3e29c03Smrg_LT_DECL([], [variables_saved_for_relink], [1], 6471c3e29c03Smrg [Variables whose values should be saved in libtool wrapper scripts and 6472c3e29c03Smrg restored at link time]) 6473c3e29c03Smrg_LT_DECL([], [need_lib_prefix], [0], 6474c3e29c03Smrg [Do we need the "lib" prefix for modules?]) 6475c3e29c03Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6476c3e29c03Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 6477c3e29c03Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6478c3e29c03Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6479c3e29c03Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 6480c3e29c03Smrg [Is shlibpath searched before the hard-coded library search path?]) 6481c3e29c03Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6482c3e29c03Smrg_LT_DECL([], [library_names_spec], [1], 6483c3e29c03Smrg [[List of archive names. First name is the real one, the rest are links. 6484c3e29c03Smrg The last name is the one that the linker finds with -lNAME]]) 6485c3e29c03Smrg_LT_DECL([], [soname_spec], [1], 6486c3e29c03Smrg [[The coded name of the library, if different from the real name]]) 6487c3e29c03Smrg_LT_DECL([], [install_override_mode], [1], 6488c3e29c03Smrg [Permission mode override for installation of shared libraries]) 6489c3e29c03Smrg_LT_DECL([], [postinstall_cmds], [2], 6490c3e29c03Smrg [Command to use after installation of a shared archive]) 6491c3e29c03Smrg_LT_DECL([], [postuninstall_cmds], [2], 6492c3e29c03Smrg [Command to use after uninstallation of a shared archive]) 6493c3e29c03Smrg_LT_DECL([], [finish_cmds], [2], 6494c3e29c03Smrg [Commands used to finish a libtool library installation in a directory]) 6495c3e29c03Smrg_LT_DECL([], [finish_eval], [1], 6496c3e29c03Smrg [[As "finish_cmds", except a single script fragment to be evaled but 6497c3e29c03Smrg not shown]]) 6498c3e29c03Smrg_LT_DECL([], [hardcode_into_libs], [0], 6499c3e29c03Smrg [Whether we should hardcode library paths into libraries]) 6500c3e29c03Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 6501c3e29c03Smrg [Compile-time system search path for libraries]) 6502c3e29c03Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6503c3e29c03Smrg [Detected run-time system search path for libraries]) 6504c3e29c03Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6505c3e29c03Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6506c3e29c03Smrg])# _LT_SYS_DYNAMIC_LINKER 650749dc963fSmrg 650849dc963fSmrg 6509c3e29c03Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 6510c3e29c03Smrg# -------------------------- 6511c3e29c03Smrg# find a file program that can recognize shared library 6512c3e29c03SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 6513c3e29c03Smrg[m4_require([_LT_DECL_EGREP])dnl 6514c3e29c03SmrgAC_MSG_CHECKING([for $1]) 6515c3e29c03SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6516c3e29c03Smrg[case $MAGIC_CMD in 6517c3e29c03Smrg[[\\/*] | ?:[\\/]*]) 6518c3e29c03Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6519c3e29c03Smrg ;; 6520c3e29c03Smrg*) 6521c3e29c03Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 6522c3e29c03Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6523c3e29c03Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 6524c3e29c03Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 6525c3e29c03Smrgdnl not every word. This closes a longstanding sh security hole. 6526c3e29c03Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 6527c3e29c03Smrg for ac_dir in $ac_dummy; do 6528c3e29c03Smrg IFS=$lt_save_ifs 6529c3e29c03Smrg test -z "$ac_dir" && ac_dir=. 6530c3e29c03Smrg if test -f "$ac_dir/$1"; then 6531c3e29c03Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6532c3e29c03Smrg if test -n "$file_magic_test_file"; then 6533c3e29c03Smrg case $deplibs_check_method in 6534c3e29c03Smrg "file_magic "*) 6535c3e29c03Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6536c3e29c03Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6537c3e29c03Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6538c3e29c03Smrg $EGREP "$file_magic_regex" > /dev/null; then 6539c3e29c03Smrg : 6540c3e29c03Smrg else 6541c3e29c03Smrg cat <<_LT_EOF 1>&2 654249dc963fSmrg 6543c3e29c03Smrg*** Warning: the command libtool uses to detect shared libraries, 6544c3e29c03Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 6545c3e29c03Smrg*** The result is that libtool may fail to recognize shared libraries 6546c3e29c03Smrg*** as such. This will affect the creation of libtool libraries that 6547c3e29c03Smrg*** depend on shared libraries, but programs linked with such libtool 6548c3e29c03Smrg*** libraries will work regardless of this problem. Nevertheless, you 6549c3e29c03Smrg*** may want to report the problem to your system manager and/or to 6550c3e29c03Smrg*** bug-libtool@gnu.org 655149dc963fSmrg 6552c3e29c03Smrg_LT_EOF 6553c3e29c03Smrg fi ;; 6554c3e29c03Smrg esac 6555c3e29c03Smrg fi 6556c3e29c03Smrg break 6557c3e29c03Smrg fi 6558c3e29c03Smrg done 6559c3e29c03Smrg IFS=$lt_save_ifs 6560c3e29c03Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 6561c3e29c03Smrg ;; 6562c3e29c03Smrgesac]) 6563c3e29c03SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 6564c3e29c03Smrgif test -n "$MAGIC_CMD"; then 6565c3e29c03Smrg AC_MSG_RESULT($MAGIC_CMD) 6566c3e29c03Smrgelse 6567c3e29c03Smrg AC_MSG_RESULT(no) 6568c3e29c03Smrgfi 6569c3e29c03Smrg_LT_DECL([], [MAGIC_CMD], [0], 6570c3e29c03Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6571c3e29c03Smrg])# _LT_PATH_TOOL_PREFIX 657249dc963fSmrg 6573c3e29c03Smrg# Old name: 6574c3e29c03SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6575c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 6576c3e29c03Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 657749dc963fSmrg 657849dc963fSmrg 6579c3e29c03Smrg# _LT_PATH_MAGIC 6580c3e29c03Smrg# -------------- 6581c3e29c03Smrg# find a file program that can recognize a shared library 6582c3e29c03Smrgm4_defun([_LT_PATH_MAGIC], 6583c3e29c03Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6584c3e29c03Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 6585c3e29c03Smrg if test -n "$ac_tool_prefix"; then 6586c3e29c03Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6587c3e29c03Smrg else 6588c3e29c03Smrg MAGIC_CMD=: 6589c3e29c03Smrg fi 6590c3e29c03Smrgfi 6591c3e29c03Smrg])# _LT_PATH_MAGIC 6592c3e29c03Smrg 6593c3e29c03Smrg 6594c3e29c03Smrg# LT_PATH_LD 6595c3e29c03Smrg# ---------- 6596c3e29c03Smrg# find the pathname to the GNU or non-GNU linker 6597c3e29c03SmrgAC_DEFUN([LT_PATH_LD], 6598c3e29c03Smrg[AC_REQUIRE([AC_PROG_CC])dnl 6599c3e29c03SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 6600c3e29c03SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 6601c3e29c03Smrgm4_require([_LT_DECL_SED])dnl 6602c3e29c03Smrgm4_require([_LT_DECL_EGREP])dnl 6603c3e29c03Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 660449dc963fSmrg 6605c3e29c03SmrgAC_ARG_WITH([gnu-ld], 6606c3e29c03Smrg [AS_HELP_STRING([--with-gnu-ld], 6607c3e29c03Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6608c3e29c03Smrg [test no = "$withval" || with_gnu_ld=yes], 6609c3e29c03Smrg [with_gnu_ld=no])dnl 661049dc963fSmrg 6611c3e29c03Smrgac_prog=ld 6612c3e29c03Smrgif test yes = "$GCC"; then 6613c3e29c03Smrg # Check if gcc -print-prog-name=ld gives a path. 6614c3e29c03Smrg AC_MSG_CHECKING([for ld used by $CC]) 6615c3e29c03Smrg case $host in 6616c3e29c03Smrg *-*-mingw*) 6617c3e29c03Smrg # gcc leaves a trailing carriage return, which upsets mingw 6618c3e29c03Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6619c3e29c03Smrg *) 6620c3e29c03Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6621c3e29c03Smrg esac 6622c3e29c03Smrg case $ac_prog in 6623c3e29c03Smrg # Accept absolute paths. 6624c3e29c03Smrg [[\\/]]* | ?:[[\\/]]*) 6625c3e29c03Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 6626c3e29c03Smrg # Canonicalize the pathname of ld 6627c3e29c03Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6628c3e29c03Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6629c3e29c03Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6630c3e29c03Smrg done 6631c3e29c03Smrg test -z "$LD" && LD=$ac_prog 6632c3e29c03Smrg ;; 6633c3e29c03Smrg "") 6634c3e29c03Smrg # If it fails, then pretend we aren't using GCC. 6635c3e29c03Smrg ac_prog=ld 6636c3e29c03Smrg ;; 6637c3e29c03Smrg *) 6638c3e29c03Smrg # If it is relative, then search for the first ld in PATH. 6639c3e29c03Smrg with_gnu_ld=unknown 6640c3e29c03Smrg ;; 6641c3e29c03Smrg esac 6642c3e29c03Smrgelif test yes = "$with_gnu_ld"; then 6643c3e29c03Smrg AC_MSG_CHECKING([for GNU ld]) 6644c3e29c03Smrgelse 6645c3e29c03Smrg AC_MSG_CHECKING([for non-GNU ld]) 6646c3e29c03Smrgfi 6647c3e29c03SmrgAC_CACHE_VAL(lt_cv_path_LD, 6648c3e29c03Smrg[if test -z "$LD"; then 6649c3e29c03Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6650c3e29c03Smrg for ac_dir in $PATH; do 6651c3e29c03Smrg IFS=$lt_save_ifs 6652c3e29c03Smrg test -z "$ac_dir" && ac_dir=. 6653c3e29c03Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6654c3e29c03Smrg lt_cv_path_LD=$ac_dir/$ac_prog 6655c3e29c03Smrg # Check to see if the program is GNU ld. I'd rather use --version, 6656c3e29c03Smrg # but apparently some variants of GNU ld only accept -v. 6657c3e29c03Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 6658c3e29c03Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6659c3e29c03Smrg *GNU* | *'with BFD'*) 6660c3e29c03Smrg test no != "$with_gnu_ld" && break 6661c3e29c03Smrg ;; 6662c3e29c03Smrg *) 6663c3e29c03Smrg test yes != "$with_gnu_ld" && break 6664c3e29c03Smrg ;; 6665c3e29c03Smrg esac 6666c3e29c03Smrg fi 6667c3e29c03Smrg done 6668c3e29c03Smrg IFS=$lt_save_ifs 6669c3e29c03Smrgelse 6670c3e29c03Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 6671c3e29c03Smrgfi]) 6672c3e29c03SmrgLD=$lt_cv_path_LD 6673c3e29c03Smrgif test -n "$LD"; then 6674c3e29c03Smrg AC_MSG_RESULT($LD) 6675c3e29c03Smrgelse 6676c3e29c03Smrg AC_MSG_RESULT(no) 6677c3e29c03Smrgfi 6678c3e29c03Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6679c3e29c03Smrg_LT_PATH_LD_GNU 6680c3e29c03SmrgAC_SUBST([LD]) 668149dc963fSmrg 6682c3e29c03Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6683c3e29c03Smrg])# LT_PATH_LD 668449dc963fSmrg 6685c3e29c03Smrg# Old names: 6686c3e29c03SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6687c3e29c03SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6688c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 6689c3e29c03Smrgdnl AC_DEFUN([AM_PROG_LD], []) 6690c3e29c03Smrgdnl AC_DEFUN([AC_PROG_LD], []) 669149dc963fSmrg 669249dc963fSmrg 6693c3e29c03Smrg# _LT_PATH_LD_GNU 6694c3e29c03Smrg#- -------------- 6695c3e29c03Smrgm4_defun([_LT_PATH_LD_GNU], 6696c3e29c03Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6697c3e29c03Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6698c3e29c03Smrgcase `$LD -v 2>&1 </dev/null` in 6699c3e29c03Smrg*GNU* | *'with BFD'*) 6700c3e29c03Smrg lt_cv_prog_gnu_ld=yes 6701c3e29c03Smrg ;; 6702c3e29c03Smrg*) 6703c3e29c03Smrg lt_cv_prog_gnu_ld=no 6704c3e29c03Smrg ;; 6705c3e29c03Smrgesac]) 6706c3e29c03Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 6707c3e29c03Smrg])# _LT_PATH_LD_GNU 670849dc963fSmrg 67097aa89044Smrg 6710c3e29c03Smrg# _LT_CMD_RELOAD 6711c3e29c03Smrg# -------------- 6712c3e29c03Smrg# find reload flag for linker 6713c3e29c03Smrg# -- PORTME Some linkers may need a different reload flag. 6714c3e29c03Smrgm4_defun([_LT_CMD_RELOAD], 6715c3e29c03Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 6716c3e29c03Smrg lt_cv_ld_reload_flag, 6717c3e29c03Smrg [lt_cv_ld_reload_flag='-r']) 6718c3e29c03Smrgreload_flag=$lt_cv_ld_reload_flag 6719c3e29c03Smrgcase $reload_flag in 6720c3e29c03Smrg"" | " "*) ;; 6721c3e29c03Smrg*) reload_flag=" $reload_flag" ;; 6722c3e29c03Smrgesac 6723c3e29c03Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 6724c3e29c03Smrgcase $host_os in 6725c3e29c03Smrg cygwin* | mingw* | pw32* | cegcc*) 6726c3e29c03Smrg if test yes != "$GCC"; then 6727c3e29c03Smrg reload_cmds=false 6728c3e29c03Smrg fi 6729c3e29c03Smrg ;; 6730c3e29c03Smrg darwin*) 6731c3e29c03Smrg if test yes = "$GCC"; then 6732c3e29c03Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6733c3e29c03Smrg else 6734c3e29c03Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 6735c3e29c03Smrg fi 6736c3e29c03Smrg ;; 6737c3e29c03Smrgesac 6738c3e29c03Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6739c3e29c03Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 6740c3e29c03Smrg])# _LT_CMD_RELOAD 674149dc963fSmrg 674249dc963fSmrg 6743c3e29c03Smrg# _LT_PATH_DD 6744c3e29c03Smrg# ----------- 6745c3e29c03Smrg# find a working dd 6746c3e29c03Smrgm4_defun([_LT_PATH_DD], 6747c3e29c03Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6748c3e29c03Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6749c3e29c03Smrgcat conftest.i conftest.i >conftest2.i 6750c3e29c03Smrg: ${lt_DD:=$DD} 6751c3e29c03SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6752c3e29c03Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6753c3e29c03Smrg cmp -s conftest.i conftest.out \ 6754c3e29c03Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6755c3e29c03Smrgfi]) 6756c3e29c03Smrgrm -f conftest.i conftest2.i conftest.out]) 6757c3e29c03Smrg])# _LT_PATH_DD 675849dc963fSmrg 675949dc963fSmrg 6760c3e29c03Smrg# _LT_CMD_TRUNCATE 6761c3e29c03Smrg# ---------------- 6762c3e29c03Smrg# find command to truncate a binary pipe 6763c3e29c03Smrgm4_defun([_LT_CMD_TRUNCATE], 6764c3e29c03Smrg[m4_require([_LT_PATH_DD]) 6765c3e29c03SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6766c3e29c03Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6767c3e29c03Smrgcat conftest.i conftest.i >conftest2.i 6768c3e29c03Smrglt_cv_truncate_bin= 6769c3e29c03Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6770c3e29c03Smrg cmp -s conftest.i conftest.out \ 6771c3e29c03Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6772c3e29c03Smrgfi 6773c3e29c03Smrgrm -f conftest.i conftest2.i conftest.out 6774c3e29c03Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6775c3e29c03Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6776c3e29c03Smrg [Command to truncate a binary pipe]) 6777c3e29c03Smrg])# _LT_CMD_TRUNCATE 677849dc963fSmrg 677949dc963fSmrg 6780c3e29c03Smrg# _LT_CHECK_MAGIC_METHOD 6781c3e29c03Smrg# ---------------------- 6782c3e29c03Smrg# how to check for library dependencies 6783c3e29c03Smrg# -- PORTME fill in with the dynamic library characteristics 6784c3e29c03Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 6785c3e29c03Smrg[m4_require([_LT_DECL_EGREP]) 6786c3e29c03Smrgm4_require([_LT_DECL_OBJDUMP]) 6787c3e29c03SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 6788c3e29c03Smrglt_cv_deplibs_check_method, 6789c3e29c03Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 6790c3e29c03Smrglt_cv_file_magic_test_file= 6791c3e29c03Smrglt_cv_deplibs_check_method='unknown' 6792c3e29c03Smrg# Need to set the preceding variable on all platforms that support 6793c3e29c03Smrg# interlibrary dependencies. 6794c3e29c03Smrg# 'none' -- dependencies not supported. 6795c3e29c03Smrg# 'unknown' -- same as none, but documents that we really don't know. 6796c3e29c03Smrg# 'pass_all' -- all dependencies passed with no checks. 6797c3e29c03Smrg# 'test_compile' -- check by making test program. 6798c3e29c03Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 6799c3e29c03Smrg# that responds to the $file_magic_cmd with a given extended regex. 6800c3e29c03Smrg# If you have 'file' or equivalent on your system and you're not sure 6801c3e29c03Smrg# whether 'pass_all' will *always* work, you probably want this one. 6802c3e29c03Smrg 6803c3e29c03Smrgcase $host_os in 6804c3e29c03Smrgaix[[4-9]]*) 6805c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6806c3e29c03Smrg ;; 680749dc963fSmrg 6808c3e29c03Smrgbeos*) 6809c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6810c3e29c03Smrg ;; 681149dc963fSmrg 6812c3e29c03Smrgbsdi[[45]]*) 6813c3e29c03Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6814c3e29c03Smrg lt_cv_file_magic_cmd='$FILECMD -L' 6815c3e29c03Smrg lt_cv_file_magic_test_file=/shlib/libc.so 6816c3e29c03Smrg ;; 681749dc963fSmrg 6818c3e29c03Smrgcygwin*) 6819c3e29c03Smrg # func_win32_libid is a shell function defined in ltmain.sh 6820c3e29c03Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6821c3e29c03Smrg lt_cv_file_magic_cmd='func_win32_libid' 6822c3e29c03Smrg ;; 682349dc963fSmrg 6824c3e29c03Smrgmingw* | pw32*) 6825c3e29c03Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 6826c3e29c03Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 6827c3e29c03Smrg # unless we find 'file', for example because we are cross-compiling. 6828c3e29c03Smrg if ( file / ) >/dev/null 2>&1; then 6829c3e29c03Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6830c3e29c03Smrg lt_cv_file_magic_cmd='func_win32_libid' 6831c3e29c03Smrg else 6832c3e29c03Smrg # Keep this pattern in sync with the one in func_win32_libid. 6833c3e29c03Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6834c3e29c03Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6835c3e29c03Smrg fi 6836c3e29c03Smrg ;; 683749dc963fSmrg 6838c3e29c03Smrgcegcc*) 6839c3e29c03Smrg # use the weaker test based on 'objdump'. See mingw*. 6840c3e29c03Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6841c3e29c03Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6842c3e29c03Smrg ;; 684349dc963fSmrg 6844c3e29c03Smrgdarwin* | rhapsody*) 6845c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6846c3e29c03Smrg ;; 684749dc963fSmrg 6848c3e29c03Smrgfreebsd* | dragonfly* | midnightbsd*) 6849c3e29c03Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6850c3e29c03Smrg case $host_cpu in 6851c3e29c03Smrg i*86 ) 6852c3e29c03Smrg # Not sure whether the presence of OpenBSD here was a mistake. 6853c3e29c03Smrg # Let's accept both of them until this is cleared up. 6854c3e29c03Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6855c3e29c03Smrg lt_cv_file_magic_cmd=$FILECMD 6856c3e29c03Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6857c3e29c03Smrg ;; 6858c3e29c03Smrg esac 6859c3e29c03Smrg else 6860c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6861c3e29c03Smrg fi 6862c3e29c03Smrg ;; 686349dc963fSmrg 6864c3e29c03Smrghaiku*) 6865c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6866c3e29c03Smrg ;; 686749dc963fSmrg 6868c3e29c03Smrghpux10.20* | hpux11*) 6869c3e29c03Smrg lt_cv_file_magic_cmd=$FILECMD 6870c3e29c03Smrg case $host_cpu in 6871c3e29c03Smrg ia64*) 6872c3e29c03Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6873c3e29c03Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6874c3e29c03Smrg ;; 6875c3e29c03Smrg hppa*64*) 6876c3e29c03Smrg [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]'] 6877c3e29c03Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6878c3e29c03Smrg ;; 6879c3e29c03Smrg *) 6880c3e29c03Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6881c3e29c03Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 6882c3e29c03Smrg ;; 6883c3e29c03Smrg esac 6884c3e29c03Smrg ;; 688549dc963fSmrg 6886c3e29c03Smrginterix[[3-9]]*) 6887c3e29c03Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6888c3e29c03Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6889c3e29c03Smrg ;; 689049dc963fSmrg 6891c3e29c03Smrgirix5* | irix6* | nonstopux*) 6892c3e29c03Smrg case $LD in 6893c3e29c03Smrg *-32|*"-32 ") libmagic=32-bit;; 6894c3e29c03Smrg *-n32|*"-n32 ") libmagic=N32;; 6895c3e29c03Smrg *-64|*"-64 ") libmagic=64-bit;; 6896c3e29c03Smrg *) libmagic=never-match;; 6897c3e29c03Smrg esac 6898c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6899c3e29c03Smrg ;; 690049dc963fSmrg 6901c3e29c03Smrg# This must be glibc/ELF. 6902c3e29c03Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6903c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6904c3e29c03Smrg ;; 690549dc963fSmrg 6906c3e29c03Smrgnetbsd*) 6907c3e29c03Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6908c3e29c03Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6909c3e29c03Smrg else 6910c3e29c03Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 6911c3e29c03Smrg fi 6912c3e29c03Smrg ;; 691349dc963fSmrg 6914c3e29c03Smrgnewos6*) 6915c3e29c03Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 6916c3e29c03Smrg lt_cv_file_magic_cmd=$FILECMD 6917c3e29c03Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 6918c3e29c03Smrg ;; 691949dc963fSmrg 6920c3e29c03Smrg*nto* | *qnx*) 6921c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6922c3e29c03Smrg ;; 692349dc963fSmrg 6924c3e29c03Smrgopenbsd* | bitrig*) 6925c3e29c03Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6926c3e29c03Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6927c3e29c03Smrg else 6928c3e29c03Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6929c3e29c03Smrg fi 6930c3e29c03Smrg ;; 693149dc963fSmrg 6932c3e29c03Smrgosf3* | osf4* | osf5*) 6933c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6934c3e29c03Smrg ;; 693549dc963fSmrg 6936c3e29c03Smrgrdos*) 6937c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6938c3e29c03Smrg ;; 693949dc963fSmrg 6940c3e29c03Smrgsolaris*) 6941c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6942c3e29c03Smrg ;; 694349dc963fSmrg 6944c3e29c03Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6945c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6946c3e29c03Smrg ;; 694749dc963fSmrg 6948c3e29c03Smrgsysv4 | sysv4.3*) 6949c3e29c03Smrg case $host_vendor in 6950c3e29c03Smrg motorola) 6951c3e29c03Smrg 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]]' 6952c3e29c03Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 6953c3e29c03Smrg ;; 6954c3e29c03Smrg ncr) 6955c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6956c3e29c03Smrg ;; 6957c3e29c03Smrg sequent) 6958c3e29c03Smrg lt_cv_file_magic_cmd='/bin/file' 6959c3e29c03Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 6960c3e29c03Smrg ;; 6961c3e29c03Smrg sni) 6962c3e29c03Smrg lt_cv_file_magic_cmd='/bin/file' 6963c3e29c03Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 6964c3e29c03Smrg lt_cv_file_magic_test_file=/lib/libc.so 6965c3e29c03Smrg ;; 6966c3e29c03Smrg siemens) 6967c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6968c3e29c03Smrg ;; 6969c3e29c03Smrg pc) 6970c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6971c3e29c03Smrg ;; 6972c3e29c03Smrg esac 6973c3e29c03Smrg ;; 69744b0ead49Smrg 6975c3e29c03Smrgtpf*) 6976c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6977c3e29c03Smrg ;; 6978c3e29c03Smrgos2*) 6979c3e29c03Smrg lt_cv_deplibs_check_method=pass_all 6980c3e29c03Smrg ;; 6981c3e29c03Smrgesac 6982c3e29c03Smrg]) 69834b0ead49Smrg 6984c3e29c03Smrgfile_magic_glob= 6985c3e29c03Smrgwant_nocaseglob=no 6986c3e29c03Smrgif test "$build" = "$host"; then 6987c3e29c03Smrg case $host_os in 6988c3e29c03Smrg mingw* | pw32*) 6989c3e29c03Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 6990c3e29c03Smrg want_nocaseglob=yes 6991c3e29c03Smrg else 6992c3e29c03Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 6993c3e29c03Smrg fi 6994c3e29c03Smrg ;; 6995c3e29c03Smrg esac 6996c3e29c03Smrgfi 69974b0ead49Smrg 6998c3e29c03Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 6999c3e29c03Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 7000c3e29c03Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 70014b0ead49Smrg 7002c3e29c03Smrg_LT_DECL([], [deplibs_check_method], [1], 7003c3e29c03Smrg [Method to check whether dependent libraries are shared objects]) 7004c3e29c03Smrg_LT_DECL([], [file_magic_cmd], [1], 7005c3e29c03Smrg [Command to use when deplibs_check_method = "file_magic"]) 7006c3e29c03Smrg_LT_DECL([], [file_magic_glob], [1], 7007c3e29c03Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 7008c3e29c03Smrg_LT_DECL([], [want_nocaseglob], [1], 7009c3e29c03Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7010c3e29c03Smrg])# _LT_CHECK_MAGIC_METHOD 70114b0ead49Smrg 70124b0ead49Smrg 7013c3e29c03Smrg# LT_PATH_NM 7014c3e29c03Smrg# ---------- 7015c3e29c03Smrg# find the pathname to a BSD- or MS-compatible name lister 7016c3e29c03SmrgAC_DEFUN([LT_PATH_NM], 7017c3e29c03Smrg[AC_REQUIRE([AC_PROG_CC])dnl 7018c3e29c03SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7019c3e29c03Smrg[if test -n "$NM"; then 7020c3e29c03Smrg # Let the user override the test. 7021c3e29c03Smrg lt_cv_path_NM=$NM 7022c3e29c03Smrgelse 7023c3e29c03Smrg lt_nm_to_check=${ac_tool_prefix}nm 7024c3e29c03Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7025c3e29c03Smrg lt_nm_to_check="$lt_nm_to_check nm" 7026c3e29c03Smrg fi 7027c3e29c03Smrg for lt_tmp_nm in $lt_nm_to_check; do 7028c3e29c03Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7029c3e29c03Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7030c3e29c03Smrg IFS=$lt_save_ifs 7031c3e29c03Smrg test -z "$ac_dir" && ac_dir=. 7032c3e29c03Smrg tmp_nm=$ac_dir/$lt_tmp_nm 7033c3e29c03Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7034c3e29c03Smrg # Check to see if the nm accepts a BSD-compat flag. 7035c3e29c03Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7036c3e29c03Smrg # nm: unknown option "B" ignored 7037c3e29c03Smrg # Tru64's nm complains that /dev/null is an invalid object file 7038c3e29c03Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7039c3e29c03Smrg case $build_os in 7040c3e29c03Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7041c3e29c03Smrg *) lt_bad_file=/dev/null ;; 7042c3e29c03Smrg esac 7043c3e29c03Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7044c3e29c03Smrg *$lt_bad_file* | *'Invalid file or object type'*) 7045c3e29c03Smrg lt_cv_path_NM="$tmp_nm -B" 7046c3e29c03Smrg break 2 7047c3e29c03Smrg ;; 7048c3e29c03Smrg *) 7049c3e29c03Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7050c3e29c03Smrg */dev/null*) 7051c3e29c03Smrg lt_cv_path_NM="$tmp_nm -p" 7052c3e29c03Smrg break 2 7053c3e29c03Smrg ;; 7054c3e29c03Smrg *) 7055c3e29c03Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7056c3e29c03Smrg continue # so that we can try to find one that supports BSD flags 7057c3e29c03Smrg ;; 7058c3e29c03Smrg esac 7059c3e29c03Smrg ;; 7060c3e29c03Smrg esac 7061c3e29c03Smrg fi 7062c3e29c03Smrg done 7063c3e29c03Smrg IFS=$lt_save_ifs 7064c3e29c03Smrg done 7065c3e29c03Smrg : ${lt_cv_path_NM=no} 7066c3e29c03Smrgfi]) 7067c3e29c03Smrgif test no != "$lt_cv_path_NM"; then 7068c3e29c03Smrg NM=$lt_cv_path_NM 7069c3e29c03Smrgelse 7070c3e29c03Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 7071c3e29c03Smrg if test -n "$DUMPBIN"; then : 7072c3e29c03Smrg # Let the user override the test. 7073c3e29c03Smrg else 7074c3e29c03Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7075c3e29c03Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7076c3e29c03Smrg *COFF*) 7077c3e29c03Smrg DUMPBIN="$DUMPBIN -symbols -headers" 7078c3e29c03Smrg ;; 7079c3e29c03Smrg *) 7080c3e29c03Smrg DUMPBIN=: 7081c3e29c03Smrg ;; 7082c3e29c03Smrg esac 7083c3e29c03Smrg fi 7084c3e29c03Smrg AC_SUBST([DUMPBIN]) 7085c3e29c03Smrg if test : != "$DUMPBIN"; then 7086c3e29c03Smrg NM=$DUMPBIN 7087c3e29c03Smrg fi 7088c3e29c03Smrgfi 7089c3e29c03Smrgtest -z "$NM" && NM=nm 7090c3e29c03SmrgAC_SUBST([NM]) 7091c3e29c03Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 70924b0ead49Smrg 7093c3e29c03SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7094c3e29c03Smrg [lt_cv_nm_interface="BSD nm" 7095c3e29c03Smrg echo "int some_variable = 0;" > conftest.$ac_ext 7096c3e29c03Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7097c3e29c03Smrg (eval "$ac_compile" 2>conftest.err) 7098c3e29c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7099c3e29c03Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7100c3e29c03Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7101c3e29c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7102c3e29c03Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7103c3e29c03Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 7104c3e29c03Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7105c3e29c03Smrg lt_cv_nm_interface="MS dumpbin" 7106c3e29c03Smrg fi 7107c3e29c03Smrg rm -f conftest*]) 7108c3e29c03Smrg])# LT_PATH_NM 71094b0ead49Smrg 7110c3e29c03Smrg# Old names: 7111c3e29c03SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7112c3e29c03SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7113c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 7114c3e29c03Smrgdnl AC_DEFUN([AM_PROG_NM], []) 7115c3e29c03Smrgdnl AC_DEFUN([AC_PROG_NM], []) 71164e7590efSmrg 7117c3e29c03Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7118c3e29c03Smrg# -------------------------------- 7119c3e29c03Smrg# how to determine the name of the shared library 7120c3e29c03Smrg# associated with a specific link library. 7121c3e29c03Smrg# -- PORTME fill in with the dynamic library characteristics 7122c3e29c03Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7123c3e29c03Smrg[m4_require([_LT_DECL_EGREP]) 7124c3e29c03Smrgm4_require([_LT_DECL_OBJDUMP]) 7125c3e29c03Smrgm4_require([_LT_DECL_DLLTOOL]) 7126c3e29c03SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7127c3e29c03Smrglt_cv_sharedlib_from_linklib_cmd, 7128c3e29c03Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 71294e7590efSmrg 7130c3e29c03Smrgcase $host_os in 7131c3e29c03Smrgcygwin* | mingw* | pw32* | cegcc*) 7132c3e29c03Smrg # two different shell functions defined in ltmain.sh; 7133c3e29c03Smrg # decide which one to use based on capabilities of $DLLTOOL 7134c3e29c03Smrg case `$DLLTOOL --help 2>&1` in 7135c3e29c03Smrg *--identify-strict*) 7136c3e29c03Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7137c3e29c03Smrg ;; 7138c3e29c03Smrg *) 7139c3e29c03Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7140c3e29c03Smrg ;; 7141c3e29c03Smrg esac 7142c3e29c03Smrg ;; 7143c3e29c03Smrg*) 7144c3e29c03Smrg # fallback: assume linklib IS sharedlib 7145c3e29c03Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7146c3e29c03Smrg ;; 7147c3e29c03Smrgesac 7148c3e29c03Smrg]) 7149c3e29c03Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7150c3e29c03Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 71514e7590efSmrg 7152c3e29c03Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7153c3e29c03Smrg [Command to associate shared and link libraries]) 7154c3e29c03Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 71554e7590efSmrg 71564e7590efSmrg 7157c3e29c03Smrg# _LT_PATH_MANIFEST_TOOL 7158c3e29c03Smrg# ---------------------- 7159c3e29c03Smrg# locate the manifest tool 7160c3e29c03Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7161c3e29c03Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7162c3e29c03Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7163c3e29c03SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7164c3e29c03Smrg [lt_cv_path_mainfest_tool=no 7165c3e29c03Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7166c3e29c03Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7167c3e29c03Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7168c3e29c03Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7169c3e29c03Smrg lt_cv_path_mainfest_tool=yes 7170c3e29c03Smrg fi 7171c3e29c03Smrg rm -f conftest*]) 7172c3e29c03Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 7173c3e29c03Smrg MANIFEST_TOOL=: 7174c3e29c03Smrgfi 7175c3e29c03Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7176c3e29c03Smrg])# _LT_PATH_MANIFEST_TOOL 71774e7590efSmrg 71784e7590efSmrg 7179c3e29c03Smrg# _LT_DLL_DEF_P([FILE]) 7180c3e29c03Smrg# --------------------- 7181c3e29c03Smrg# True iff FILE is a Windows DLL '.def' file. 7182c3e29c03Smrg# Keep in sync with func_dll_def_p in the libtool script 7183c3e29c03SmrgAC_DEFUN([_LT_DLL_DEF_P], 7184c3e29c03Smrg[dnl 7185c3e29c03Smrg test DEF = "`$SED -n dnl 7186c3e29c03Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7187c3e29c03Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7188c3e29c03Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7189c3e29c03Smrg -e q dnl Only consider the first "real" line 7190c3e29c03Smrg $1`" dnl 7191c3e29c03Smrg])# _LT_DLL_DEF_P 71924e7590efSmrg 71934e7590efSmrg 7194c3e29c03Smrg# LT_LIB_M 7195c3e29c03Smrg# -------- 7196c3e29c03Smrg# check for math library 7197c3e29c03SmrgAC_DEFUN([LT_LIB_M], 7198c3e29c03Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7199c3e29c03SmrgLIBM= 7200c3e29c03Smrgcase $host in 7201c3e29c03Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7202c3e29c03Smrg # These system don't have libm, or don't need it 7203c3e29c03Smrg ;; 7204c3e29c03Smrg*-ncr-sysv4.3*) 7205c3e29c03Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7206c3e29c03Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7207c3e29c03Smrg ;; 7208c3e29c03Smrg*) 7209c3e29c03Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7210c3e29c03Smrg ;; 7211c3e29c03Smrgesac 7212c3e29c03SmrgAC_SUBST([LIBM]) 7213c3e29c03Smrg])# LT_LIB_M 72144e7590efSmrg 7215c3e29c03Smrg# Old name: 7216c3e29c03SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7217c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 7218c3e29c03Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 72194e7590efSmrg 72204e7590efSmrg 7221c3e29c03Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7222c3e29c03Smrg# ------------------------------- 7223c3e29c03Smrgm4_defun([_LT_COMPILER_NO_RTTI], 7224c3e29c03Smrg[m4_require([_LT_TAG_COMPILER])dnl 72254e7590efSmrg 7226c3e29c03Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 72274e7590efSmrg 7228c3e29c03Smrgif test yes = "$GCC"; then 7229c3e29c03Smrg case $cc_basename in 7230c3e29c03Smrg nvcc*) 7231c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7232c3e29c03Smrg *) 7233c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7234c3e29c03Smrg esac 72354e7590efSmrg 7236c3e29c03Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7237c3e29c03Smrg lt_cv_prog_compiler_rtti_exceptions, 7238c3e29c03Smrg [-fno-rtti -fno-exceptions], [], 7239c3e29c03Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7240c3e29c03Smrgfi 7241c3e29c03Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7242c3e29c03Smrg [Compiler flag to turn off builtin functions]) 7243c3e29c03Smrg])# _LT_COMPILER_NO_RTTI 72444b0ead49Smrg 72454b0ead49Smrg 7246c3e29c03Smrg# _LT_CMD_GLOBAL_SYMBOLS 7247c3e29c03Smrg# ---------------------- 7248c3e29c03Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7249c3e29c03Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7250c3e29c03SmrgAC_REQUIRE([AC_PROG_CC])dnl 7251c3e29c03SmrgAC_REQUIRE([AC_PROG_AWK])dnl 7252c3e29c03SmrgAC_REQUIRE([LT_PATH_NM])dnl 7253c3e29c03SmrgAC_REQUIRE([LT_PATH_LD])dnl 7254c3e29c03Smrgm4_require([_LT_DECL_SED])dnl 7255c3e29c03Smrgm4_require([_LT_DECL_EGREP])dnl 7256c3e29c03Smrgm4_require([_LT_TAG_COMPILER])dnl 72574b0ead49Smrg 7258c3e29c03Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7259c3e29c03SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7260c3e29c03SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7261c3e29c03Smrg[ 7262c3e29c03Smrg# These are sane defaults that work on at least a few old systems. 7263c3e29c03Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 726449dc963fSmrg 7265c3e29c03Smrg# Character class describing NM global symbol codes. 7266c3e29c03Smrgsymcode='[[BCDEGRST]]' 726749dc963fSmrg 7268c3e29c03Smrg# Regexp to match symbols that can be accessed directly from C. 7269c3e29c03Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 727049dc963fSmrg 7271c3e29c03Smrg# Define system-specific variables. 7272c3e29c03Smrgcase $host_os in 7273c3e29c03Smrgaix*) 7274c3e29c03Smrg symcode='[[BCDT]]' 7275c3e29c03Smrg ;; 7276c3e29c03Smrgcygwin* | mingw* | pw32* | cegcc*) 7277c3e29c03Smrg symcode='[[ABCDGISTW]]' 7278c3e29c03Smrg ;; 7279c3e29c03Smrghpux*) 7280c3e29c03Smrg if test ia64 = "$host_cpu"; then 7281c3e29c03Smrg symcode='[[ABCDEGRST]]' 7282c3e29c03Smrg fi 7283c3e29c03Smrg ;; 7284c3e29c03Smrgirix* | nonstopux*) 7285c3e29c03Smrg symcode='[[BCDEGRST]]' 7286c3e29c03Smrg ;; 7287c3e29c03Smrgosf*) 7288c3e29c03Smrg symcode='[[BCDEGQRST]]' 7289c3e29c03Smrg ;; 7290c3e29c03Smrgsolaris*) 7291c3e29c03Smrg symcode='[[BDRT]]' 7292c3e29c03Smrg ;; 7293c3e29c03Smrgsco3.2v5*) 7294c3e29c03Smrg symcode='[[DT]]' 7295c3e29c03Smrg ;; 7296c3e29c03Smrgsysv4.2uw2*) 7297c3e29c03Smrg symcode='[[DT]]' 7298c3e29c03Smrg ;; 7299c3e29c03Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7300c3e29c03Smrg symcode='[[ABDT]]' 7301c3e29c03Smrg ;; 7302c3e29c03Smrgsysv4) 7303c3e29c03Smrg symcode='[[DFNSTU]]' 7304c3e29c03Smrg ;; 7305c3e29c03Smrgesac 730649dc963fSmrg 7307c3e29c03Smrg# If we're using GNU nm, then use its standard symbol codes. 7308c3e29c03Smrgcase `$NM -V 2>&1` in 7309c3e29c03Smrg*GNU* | *'with BFD'*) 7310c3e29c03Smrg symcode='[[ABCDGIRSTW]]' ;; 7311c3e29c03Smrgesac 731249dc963fSmrg 7313c3e29c03Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7314c3e29c03Smrg # Gets list of data symbols to import. 7315c3e29c03Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7316c3e29c03Smrg # Adjust the below global symbol transforms to fixup imported variables. 7317c3e29c03Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7318c3e29c03Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7319c3e29c03Smrg lt_c_name_lib_hook="\ 7320c3e29c03Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7321c3e29c03Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7322c3e29c03Smrgelse 7323c3e29c03Smrg # Disable hooks by default. 7324c3e29c03Smrg lt_cv_sys_global_symbol_to_import= 7325c3e29c03Smrg lt_cdecl_hook= 7326c3e29c03Smrg lt_c_name_hook= 7327c3e29c03Smrg lt_c_name_lib_hook= 732852b01e16Smrgfi 73294b0ead49Smrg 7330c3e29c03Smrg# Transform an extracted symbol line into a proper C declaration. 7331c3e29c03Smrg# Some systems (esp. on ia64) link data and code symbols differently, 7332c3e29c03Smrg# so use this general approach. 7333c3e29c03Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7334c3e29c03Smrg$lt_cdecl_hook\ 7335c3e29c03Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7336c3e29c03Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 733749dc963fSmrg 7338c3e29c03Smrg# Transform an extracted symbol line into symbol name and symbol address 7339c3e29c03Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7340c3e29c03Smrg$lt_c_name_hook\ 7341c3e29c03Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7342c3e29c03Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 734349dc963fSmrg 7344c3e29c03Smrg# Transform an extracted symbol line into symbol name with lib prefix and 7345c3e29c03Smrg# symbol address. 7346c3e29c03Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7347c3e29c03Smrg$lt_c_name_lib_hook\ 7348c3e29c03Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7349c3e29c03Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7350c3e29c03Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 73514b0ead49Smrg 7352c3e29c03Smrg# Handle CRLF in mingw tool chain 7353c3e29c03Smrgopt_cr= 7354c3e29c03Smrgcase $build_os in 7355c3e29c03Smrgmingw*) 7356c3e29c03Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7357c3e29c03Smrg ;; 7358c3e29c03Smrgesac 73594b0ead49Smrg 7360c3e29c03Smrg# Try without a prefix underscore, then with it. 7361c3e29c03Smrgfor ac_symprfx in "" "_"; do 736252b01e16Smrg 7363c3e29c03Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7364c3e29c03Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 73654e7590efSmrg 7366c3e29c03Smrg # Write the raw and C identifiers. 7367c3e29c03Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7368c3e29c03Smrg # Fake it for dumpbin and say T for any non-static function, 7369c3e29c03Smrg # D for any global variable and I for any imported variable. 7370c3e29c03Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7371c3e29c03Smrg # which start with @ or ?. 7372c3e29c03Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7373c3e29c03Smrg" {last_section=section; section=\$ 3};"\ 7374c3e29c03Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7375c3e29c03Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7376c3e29c03Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7377c3e29c03Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7378c3e29c03Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7379c3e29c03Smrg" \$ 0!~/External *\|/{next};"\ 7380c3e29c03Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7381c3e29c03Smrg" {if(hide[section]) next};"\ 7382c3e29c03Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7383c3e29c03Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7384c3e29c03Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7385c3e29c03Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7386c3e29c03Smrg" ' prfx=^$ac_symprfx]" 7387c3e29c03Smrg else 7388c3e29c03Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7389c3e29c03Smrg fi 7390c3e29c03Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 73914e7590efSmrg 7392c3e29c03Smrg # Check to see that the pipe works correctly. 7393c3e29c03Smrg pipe_works=no 73944b0ead49Smrg 7395c3e29c03Smrg rm -f conftest* 7396c3e29c03Smrg cat > conftest.$ac_ext <<_LT_EOF 7397c3e29c03Smrg#ifdef __cplusplus 7398c3e29c03Smrgextern "C" { 7399c3e29c03Smrg#endif 7400c3e29c03Smrgchar nm_test_var; 7401c3e29c03Smrgvoid nm_test_func(void); 7402c3e29c03Smrgvoid nm_test_func(void){} 7403c3e29c03Smrg#ifdef __cplusplus 7404c3e29c03Smrg} 7405c3e29c03Smrg#endif 7406c3e29c03Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 7407c3e29c03Smrg_LT_EOF 74084b0ead49Smrg 7409c3e29c03Smrg if AC_TRY_EVAL(ac_compile); then 7410c3e29c03Smrg # Now try to grab the symbols. 7411c3e29c03Smrg nlist=conftest.nm 7412c3e29c03Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7413c3e29c03Smrg # Try sorting and uniquifying the output. 7414c3e29c03Smrg if sort "$nlist" | uniq > "$nlist"T; then 7415c3e29c03Smrg mv -f "$nlist"T "$nlist" 7416c3e29c03Smrg else 7417c3e29c03Smrg rm -f "$nlist"T 7418c3e29c03Smrg fi 74194b0ead49Smrg 7420c3e29c03Smrg # Make sure that we snagged all the symbols we need. 7421c3e29c03Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7422c3e29c03Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7423c3e29c03Smrg cat <<_LT_EOF > conftest.$ac_ext 7424c3e29c03Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7425c3e29c03Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7426c3e29c03Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 7427c3e29c03Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 7428c3e29c03Smrg# define LT@&t@_DLSYM_CONST 7429c3e29c03Smrg#elif defined __osf__ 7430c3e29c03Smrg/* This system does not cope well with relocations in const data. */ 7431c3e29c03Smrg# define LT@&t@_DLSYM_CONST 7432c3e29c03Smrg#else 7433c3e29c03Smrg# define LT@&t@_DLSYM_CONST const 7434c3e29c03Smrg#endif 74354b0ead49Smrg 7436c3e29c03Smrg#ifdef __cplusplus 7437c3e29c03Smrgextern "C" { 7438c3e29c03Smrg#endif 74394b0ead49Smrg 7440c3e29c03Smrg_LT_EOF 7441c3e29c03Smrg # Now generate the symbol file. 7442c3e29c03Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 74434b0ead49Smrg 7444c3e29c03Smrg cat <<_LT_EOF >> conftest.$ac_ext 74454b0ead49Smrg 7446c3e29c03Smrg/* The mapping between symbol names and symbols. */ 7447c3e29c03SmrgLT@&t@_DLSYM_CONST struct { 7448c3e29c03Smrg const char *name; 7449c3e29c03Smrg void *address; 7450c3e29c03Smrg} 7451c3e29c03Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 7452c3e29c03Smrg{ 7453c3e29c03Smrg { "@PROGRAM@", (void *) 0 }, 7454c3e29c03Smrg_LT_EOF 7455c3e29c03Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7456c3e29c03Smrg cat <<\_LT_EOF >> conftest.$ac_ext 7457c3e29c03Smrg {0, (void *) 0} 7458c3e29c03Smrg}; 745949dc963fSmrg 7460c3e29c03Smrg/* This works around a problem in FreeBSD linker */ 7461c3e29c03Smrg#ifdef FREEBSD_WORKAROUND 7462c3e29c03Smrgstatic const void *lt_preloaded_setup() { 7463c3e29c03Smrg return lt__PROGRAM__LTX_preloaded_symbols; 7464c3e29c03Smrg} 7465c3e29c03Smrg#endif 746649dc963fSmrg 7467c3e29c03Smrg#ifdef __cplusplus 7468c3e29c03Smrg} 7469c3e29c03Smrg#endif 7470c3e29c03Smrg_LT_EOF 7471c3e29c03Smrg # Now try linking the two files. 7472c3e29c03Smrg mv conftest.$ac_objext conftstm.$ac_objext 7473c3e29c03Smrg lt_globsym_save_LIBS=$LIBS 7474c3e29c03Smrg lt_globsym_save_CFLAGS=$CFLAGS 7475c3e29c03Smrg LIBS=conftstm.$ac_objext 7476c3e29c03Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7477c3e29c03Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7478c3e29c03Smrg pipe_works=yes 7479c3e29c03Smrg fi 7480c3e29c03Smrg LIBS=$lt_globsym_save_LIBS 7481c3e29c03Smrg CFLAGS=$lt_globsym_save_CFLAGS 7482c3e29c03Smrg else 7483c3e29c03Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7484c3e29c03Smrg fi 7485c3e29c03Smrg else 7486c3e29c03Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 748752b01e16Smrg fi 7488c3e29c03Smrg else 7489c3e29c03Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7490c3e29c03Smrg fi 7491c3e29c03Smrg else 7492c3e29c03Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7493c3e29c03Smrg cat conftest.$ac_ext >&5 7494c3e29c03Smrg fi 7495c3e29c03Smrg rm -rf conftest* conftst* 7496c3e29c03Smrg 7497c3e29c03Smrg # Do not use the global_symbol_pipe unless it works. 7498c3e29c03Smrg if test yes = "$pipe_works"; then 749949dc963fSmrg break 7500c3e29c03Smrg else 7501c3e29c03Smrg lt_cv_sys_global_symbol_pipe= 750249dc963fSmrg fi 750349dc963fSmrgdone 750449dc963fSmrg]) 7505c3e29c03Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 7506c3e29c03Smrg lt_cv_sys_global_symbol_to_cdecl= 7507c3e29c03Smrgfi 7508c3e29c03Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7509c3e29c03Smrg AC_MSG_RESULT(failed) 7510c3e29c03Smrgelse 7511c3e29c03Smrg AC_MSG_RESULT(ok) 7512c3e29c03Smrgfi 751349dc963fSmrg 7514c3e29c03Smrg# Response file support. 7515c3e29c03Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7516c3e29c03Smrg nm_file_list_spec='@' 7517c3e29c03Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7518c3e29c03Smrg nm_file_list_spec='@' 7519c3e29c03Smrgfi 752049dc963fSmrg 7521c3e29c03Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7522c3e29c03Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 7523c3e29c03Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7524c3e29c03Smrg [Transform the output of nm in a proper C declaration]) 7525c3e29c03Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7526c3e29c03Smrg [Transform the output of nm into a list of symbols to manually relocate]) 7527c3e29c03Smrg_LT_DECL([global_symbol_to_c_name_address], 7528c3e29c03Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 7529c3e29c03Smrg [Transform the output of nm in a C name address pair]) 7530c3e29c03Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7531c3e29c03Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7532c3e29c03Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 7533c3e29c03Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7534c3e29c03Smrg [The name lister interface]) 7535c3e29c03Smrg_LT_DECL([], [nm_file_list_spec], [1], 7536c3e29c03Smrg [Specify filename containing input files for $NM]) 7537c3e29c03Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 753849dc963fSmrg 753949dc963fSmrg 7540c3e29c03Smrg# _LT_COMPILER_PIC([TAGNAME]) 7541c3e29c03Smrg# --------------------------- 7542c3e29c03Smrgm4_defun([_LT_COMPILER_PIC], 7543c3e29c03Smrg[m4_require([_LT_TAG_COMPILER])dnl 7544c3e29c03Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7545c3e29c03Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7546c3e29c03Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 7547c3e29c03Smrg 7548c3e29c03Smrgm4_if([$1], [CXX], [ 7549c3e29c03Smrg # C++ specific cases for pic, static, wl, etc. 7550c3e29c03Smrg if test yes = "$GXX"; then 7551c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7552c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 75534b0ead49Smrg 7554c3e29c03Smrg case $host_os in 7555c3e29c03Smrg aix*) 7556c3e29c03Smrg # All AIX code is PIC. 7557c3e29c03Smrg if test ia64 = "$host_cpu"; then 7558c3e29c03Smrg # AIX 5 now supports IA64 processor 7559c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7560c3e29c03Smrg fi 7561c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7562c3e29c03Smrg ;; 75634b0ead49Smrg 7564c3e29c03Smrg amigaos*) 7565c3e29c03Smrg case $host_cpu in 7566c3e29c03Smrg powerpc) 7567c3e29c03Smrg # see comment about AmigaOS4 .so support 7568c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 75694e7590efSmrg ;; 7570c3e29c03Smrg m68k) 7571c3e29c03Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7572c3e29c03Smrg # adding the '-m68020' flag to GCC prevents building anything better, 7573c3e29c03Smrg # like '-m68040'. 7574c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 75754e7590efSmrg ;; 7576c3e29c03Smrg esac 7577c3e29c03Smrg ;; 7578c3e29c03Smrg 7579c3e29c03Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7580c3e29c03Smrg # PIC is the default for these OSes. 7581c3e29c03Smrg ;; 7582c3e29c03Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7583c3e29c03Smrg # This hack is so that the source file can tell whether it is being 7584c3e29c03Smrg # built for inclusion in a dll (and should export symbols for example). 7585c3e29c03Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7586c3e29c03Smrg # (--disable-auto-import) libraries 7587c3e29c03Smrg m4_if([$1], [GCJ], [], 7588c3e29c03Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7589c3e29c03Smrg case $host_os in 7590c3e29c03Smrg os2*) 7591c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7592c3e29c03Smrg ;; 7593c3e29c03Smrg esac 7594c3e29c03Smrg ;; 7595c3e29c03Smrg darwin* | rhapsody*) 7596c3e29c03Smrg # PIC is the default on this platform 7597c3e29c03Smrg # Common symbols not allowed in MH_DYLIB files 7598c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7599c3e29c03Smrg ;; 7600c3e29c03Smrg *djgpp*) 7601c3e29c03Smrg # DJGPP does not support shared libraries at all 7602c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7603c3e29c03Smrg ;; 7604c3e29c03Smrg haiku*) 7605c3e29c03Smrg # PIC is the default for Haiku. 7606c3e29c03Smrg # The "-static" flag exists, but is broken. 7607c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7608c3e29c03Smrg ;; 7609c3e29c03Smrg interix[[3-9]]*) 7610c3e29c03Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7611c3e29c03Smrg # Instead, we relocate shared libraries at runtime. 7612c3e29c03Smrg ;; 7613c3e29c03Smrg sysv4*MP*) 7614c3e29c03Smrg if test -d /usr/nec; then 7615c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7616c3e29c03Smrg fi 7617c3e29c03Smrg ;; 7618c3e29c03Smrg hpux*) 7619c3e29c03Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7620c3e29c03Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7621c3e29c03Smrg # sets the default TLS model and affects inlining. 7622c3e29c03Smrg case $host_cpu in 7623c3e29c03Smrg hppa*64*) 7624c3e29c03Smrg ;; 7625c3e29c03Smrg *) 7626c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7627c3e29c03Smrg ;; 7628c3e29c03Smrg esac 7629c3e29c03Smrg ;; 7630c3e29c03Smrg *qnx* | *nto*) 7631c3e29c03Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7632c3e29c03Smrg # it will coredump. 7633c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7634c3e29c03Smrg ;; 7635c3e29c03Smrg *) 7636c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7637c3e29c03Smrg ;; 76384e7590efSmrg esac 7639c3e29c03Smrg else 7640c3e29c03Smrg case $host_os in 7641c3e29c03Smrg aix[[4-9]]*) 7642c3e29c03Smrg # All AIX code is PIC. 7643c3e29c03Smrg if test ia64 = "$host_cpu"; then 7644c3e29c03Smrg # AIX 5 now supports IA64 processor 7645c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7646c3e29c03Smrg else 7647c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7648c3e29c03Smrg fi 7649c3e29c03Smrg ;; 7650c3e29c03Smrg chorus*) 7651c3e29c03Smrg case $cc_basename in 7652c3e29c03Smrg cxch68*) 7653c3e29c03Smrg # Green Hills C++ Compiler 7654c3e29c03Smrg # _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" 7655c3e29c03Smrg ;; 7656c3e29c03Smrg esac 7657c3e29c03Smrg ;; 7658c3e29c03Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7659c3e29c03Smrg # This hack is so that the source file can tell whether it is being 7660c3e29c03Smrg # built for inclusion in a dll (and should export symbols for example). 7661c3e29c03Smrg m4_if([$1], [GCJ], [], 7662c3e29c03Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7663c3e29c03Smrg ;; 7664c3e29c03Smrg dgux*) 7665c3e29c03Smrg case $cc_basename in 7666c3e29c03Smrg ec++*) 7667c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7668c3e29c03Smrg ;; 7669c3e29c03Smrg ghcx*) 7670c3e29c03Smrg # Green Hills C++ Compiler 7671c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7672c3e29c03Smrg ;; 7673c3e29c03Smrg *) 7674c3e29c03Smrg ;; 7675c3e29c03Smrg esac 7676c3e29c03Smrg ;; 7677c3e29c03Smrg freebsd* | dragonfly* | midnightbsd*) 7678c3e29c03Smrg # FreeBSD uses GNU C++ 7679c3e29c03Smrg ;; 7680c3e29c03Smrg hpux9* | hpux10* | hpux11*) 7681c3e29c03Smrg case $cc_basename in 7682c3e29c03Smrg CC*) 7683c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7684c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7685c3e29c03Smrg if test ia64 != "$host_cpu"; then 7686c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7687c3e29c03Smrg fi 7688c3e29c03Smrg ;; 7689c3e29c03Smrg aCC*) 7690c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7691c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7692c3e29c03Smrg case $host_cpu in 7693c3e29c03Smrg hppa*64*|ia64*) 7694c3e29c03Smrg # +Z the default 7695c3e29c03Smrg ;; 7696c3e29c03Smrg *) 7697c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7698c3e29c03Smrg ;; 7699c3e29c03Smrg esac 7700c3e29c03Smrg ;; 7701c3e29c03Smrg *) 7702c3e29c03Smrg ;; 7703c3e29c03Smrg esac 7704c3e29c03Smrg ;; 7705c3e29c03Smrg interix*) 7706c3e29c03Smrg # This is c89, which is MS Visual C++ (no shared libs) 7707c3e29c03Smrg # Anyone wants to do a port? 7708c3e29c03Smrg ;; 7709c3e29c03Smrg irix5* | irix6* | nonstopux*) 7710c3e29c03Smrg case $cc_basename in 7711c3e29c03Smrg CC*) 7712c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7713c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7714c3e29c03Smrg # CC pic flag -KPIC is the default. 7715c3e29c03Smrg ;; 7716c3e29c03Smrg *) 7717c3e29c03Smrg ;; 7718c3e29c03Smrg esac 7719c3e29c03Smrg ;; 7720c3e29c03Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7721c3e29c03Smrg case $cc_basename in 7722c3e29c03Smrg KCC*) 7723c3e29c03Smrg # KAI C++ Compiler 7724c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7725c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7726c3e29c03Smrg ;; 7727c3e29c03Smrg ecpc* ) 7728c3e29c03Smrg # old Intel C++ for x86_64, which still supported -KPIC. 7729c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7730c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7731c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7732c3e29c03Smrg ;; 7733c3e29c03Smrg icpc* ) 7734c3e29c03Smrg # Intel C++, used to be incompatible with GCC. 7735c3e29c03Smrg # ICC 10 doesn't accept -KPIC any more. 7736c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7737c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7738c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7739c3e29c03Smrg ;; 7740c3e29c03Smrg pgCC* | pgcpp*) 7741c3e29c03Smrg # Portland Group C++ compiler 7742c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7743c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7744c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7745c3e29c03Smrg ;; 7746c3e29c03Smrg cxx*) 7747c3e29c03Smrg # Compaq C++ 7748c3e29c03Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7749c3e29c03Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7750c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7751c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7752c3e29c03Smrg ;; 7753c3e29c03Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7754c3e29c03Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 7755c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7756c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7757c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7758c3e29c03Smrg ;; 7759c3e29c03Smrg *) 7760c3e29c03Smrg case `$CC -V 2>&1 | $SED 5q` in 7761c3e29c03Smrg *Sun\ C*) 7762c3e29c03Smrg # Sun C++ 5.9 7763c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7764c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7765c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7766c3e29c03Smrg ;; 7767c3e29c03Smrg esac 7768c3e29c03Smrg ;; 7769c3e29c03Smrg esac 7770c3e29c03Smrg ;; 7771c3e29c03Smrg lynxos*) 7772c3e29c03Smrg ;; 7773c3e29c03Smrg m88k*) 7774c3e29c03Smrg ;; 7775c3e29c03Smrg mvs*) 7776c3e29c03Smrg case $cc_basename in 7777c3e29c03Smrg cxx*) 7778c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7779c3e29c03Smrg ;; 7780c3e29c03Smrg *) 7781c3e29c03Smrg ;; 7782c3e29c03Smrg esac 7783c3e29c03Smrg ;; 7784c3e29c03Smrg netbsd*) 7785c3e29c03Smrg ;; 7786c3e29c03Smrg *qnx* | *nto*) 7787c3e29c03Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7788c3e29c03Smrg # it will coredump. 7789c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 77904e7590efSmrg ;; 7791c3e29c03Smrg osf3* | osf4* | osf5*) 7792c3e29c03Smrg case $cc_basename in 7793c3e29c03Smrg KCC*) 7794c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7795c3e29c03Smrg ;; 7796c3e29c03Smrg RCC*) 7797c3e29c03Smrg # Rational C++ 2.4.1 7798c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7799c3e29c03Smrg ;; 7800c3e29c03Smrg cxx*) 7801c3e29c03Smrg # Digital/Compaq C++ 7802c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7803c3e29c03Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7804c3e29c03Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7805c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7806c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7807c3e29c03Smrg ;; 7808c3e29c03Smrg *) 7809c3e29c03Smrg ;; 7810c3e29c03Smrg esac 7811c3e29c03Smrg ;; 7812c3e29c03Smrg psos*) 7813c3e29c03Smrg ;; 7814c3e29c03Smrg solaris*) 7815c3e29c03Smrg case $cc_basename in 7816c3e29c03Smrg CC* | sunCC*) 7817c3e29c03Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7818c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7819c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7820c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7821c3e29c03Smrg ;; 7822c3e29c03Smrg gcx*) 7823c3e29c03Smrg # Green Hills C++ Compiler 7824c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7825c3e29c03Smrg ;; 7826c3e29c03Smrg *) 7827c3e29c03Smrg ;; 7828c3e29c03Smrg esac 7829c3e29c03Smrg ;; 7830c3e29c03Smrg sunos4*) 7831c3e29c03Smrg case $cc_basename in 7832c3e29c03Smrg CC*) 7833c3e29c03Smrg # Sun C++ 4.x 7834c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7835c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7836c3e29c03Smrg ;; 7837c3e29c03Smrg lcc*) 7838c3e29c03Smrg # Lucid 7839c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7840c3e29c03Smrg ;; 7841c3e29c03Smrg *) 7842c3e29c03Smrg ;; 7843c3e29c03Smrg esac 7844c3e29c03Smrg ;; 7845c3e29c03Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7846c3e29c03Smrg case $cc_basename in 7847c3e29c03Smrg CC*) 7848c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7849c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7850c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7851c3e29c03Smrg ;; 7852c3e29c03Smrg esac 7853c3e29c03Smrg ;; 7854c3e29c03Smrg tandem*) 7855c3e29c03Smrg case $cc_basename in 7856c3e29c03Smrg NCC*) 7857c3e29c03Smrg # NonStop-UX NCC 3.20 7858c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7859c3e29c03Smrg ;; 7860c3e29c03Smrg *) 7861c3e29c03Smrg ;; 7862c3e29c03Smrg esac 7863c3e29c03Smrg ;; 7864c3e29c03Smrg vxworks*) 7865c3e29c03Smrg ;; 7866c3e29c03Smrg *) 7867c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7868c3e29c03Smrg ;; 78694e7590efSmrg esac 7870c3e29c03Smrg fi 7871c3e29c03Smrg], 7872c3e29c03Smrg[ 7873c3e29c03Smrg if test yes = "$GCC"; then 7874c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7875c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 78764e7590efSmrg 7877c3e29c03Smrg case $host_os in 7878c3e29c03Smrg aix*) 7879c3e29c03Smrg # All AIX code is PIC. 7880c3e29c03Smrg if test ia64 = "$host_cpu"; then 7881c3e29c03Smrg # AIX 5 now supports IA64 processor 7882c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7883c3e29c03Smrg fi 7884c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7885c3e29c03Smrg ;; 7886c3e29c03Smrg 7887c3e29c03Smrg amigaos*) 7888c3e29c03Smrg case $host_cpu in 7889c3e29c03Smrg powerpc) 7890c3e29c03Smrg # see comment about AmigaOS4 .so support 7891c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 78924e7590efSmrg ;; 7893c3e29c03Smrg m68k) 7894c3e29c03Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7895c3e29c03Smrg # adding the '-m68020' flag to GCC prevents building anything better, 7896c3e29c03Smrg # like '-m68040'. 7897c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7898c3e29c03Smrg ;; 7899c3e29c03Smrg esac 7900c3e29c03Smrg ;; 79014b0ead49Smrg 7902c3e29c03Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7903c3e29c03Smrg # PIC is the default for these OSes. 7904c3e29c03Smrg ;; 79054b0ead49Smrg 7906c3e29c03Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 7907c3e29c03Smrg # This hack is so that the source file can tell whether it is being 7908c3e29c03Smrg # built for inclusion in a dll (and should export symbols for example). 7909c3e29c03Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7910c3e29c03Smrg # (--disable-auto-import) libraries 7911c3e29c03Smrg m4_if([$1], [GCJ], [], 7912c3e29c03Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7913c3e29c03Smrg case $host_os in 7914c3e29c03Smrg os2*) 7915c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7916c3e29c03Smrg ;; 7917c3e29c03Smrg esac 7918c3e29c03Smrg ;; 79194b0ead49Smrg 7920c3e29c03Smrg darwin* | rhapsody*) 7921c3e29c03Smrg # PIC is the default on this platform 7922c3e29c03Smrg # Common symbols not allowed in MH_DYLIB files 7923c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7924c3e29c03Smrg ;; 792549dc963fSmrg 7926c3e29c03Smrg haiku*) 7927c3e29c03Smrg # PIC is the default for Haiku. 7928c3e29c03Smrg # The "-static" flag exists, but is broken. 7929c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7930c3e29c03Smrg ;; 793149dc963fSmrg 7932c3e29c03Smrg hpux*) 7933c3e29c03Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7934c3e29c03Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7935c3e29c03Smrg # sets the default TLS model and affects inlining. 7936c3e29c03Smrg case $host_cpu in 7937c3e29c03Smrg hppa*64*) 7938c3e29c03Smrg # +Z the default 7939c3e29c03Smrg ;; 7940c3e29c03Smrg *) 7941c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7942c3e29c03Smrg ;; 7943c3e29c03Smrg esac 7944c3e29c03Smrg ;; 794549dc963fSmrg 7946c3e29c03Smrg interix[[3-9]]*) 7947c3e29c03Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7948c3e29c03Smrg # Instead, we relocate shared libraries at runtime. 7949c3e29c03Smrg ;; 795049dc963fSmrg 7951c3e29c03Smrg msdosdjgpp*) 7952c3e29c03Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 7953c3e29c03Smrg # on systems that don't support them. 7954c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7955c3e29c03Smrg enable_shared=no 7956c3e29c03Smrg ;; 795749dc963fSmrg 7958c3e29c03Smrg *nto* | *qnx*) 7959c3e29c03Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7960c3e29c03Smrg # it will coredump. 7961c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7962c3e29c03Smrg ;; 796349dc963fSmrg 7964c3e29c03Smrg sysv4*MP*) 7965c3e29c03Smrg if test -d /usr/nec; then 7966c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7967c3e29c03Smrg fi 7968c3e29c03Smrg ;; 796949dc963fSmrg 7970c3e29c03Smrg *) 7971c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7972c3e29c03Smrg ;; 7973c3e29c03Smrg esac 797449dc963fSmrg 7975c3e29c03Smrg case $cc_basename in 7976c3e29c03Smrg nvcc*) # Cuda Compiler Driver 2.2 7977c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 7978c3e29c03Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 7979c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 7980c3e29c03Smrg fi 7981c3e29c03Smrg ;; 7982c3e29c03Smrg esac 7983c3e29c03Smrg else 7984c3e29c03Smrg # PORTME Check for flag to pass linker flags through the system compiler. 7985c3e29c03Smrg case $host_os in 7986c3e29c03Smrg aix*) 7987c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7988c3e29c03Smrg if test ia64 = "$host_cpu"; then 7989c3e29c03Smrg # AIX 5 now supports IA64 processor 7990c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7991c3e29c03Smrg else 7992c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7993c3e29c03Smrg fi 7994c3e29c03Smrg ;; 79954b0ead49Smrg 7996c3e29c03Smrg darwin* | rhapsody*) 7997c3e29c03Smrg # PIC is the default on this platform 7998c3e29c03Smrg # Common symbols not allowed in MH_DYLIB files 7999c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8000c3e29c03Smrg case $cc_basename in 8001c3e29c03Smrg nagfor*) 8002c3e29c03Smrg # NAG Fortran compiler 8003c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8004c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8005c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8006c3e29c03Smrg ;; 8007c3e29c03Smrg esac 8008c3e29c03Smrg ;; 80094b0ead49Smrg 8010c3e29c03Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8011c3e29c03Smrg # This hack is so that the source file can tell whether it is being 8012c3e29c03Smrg # built for inclusion in a dll (and should export symbols for example). 8013c3e29c03Smrg m4_if([$1], [GCJ], [], 8014c3e29c03Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8015c3e29c03Smrg case $host_os in 8016c3e29c03Smrg os2*) 8017c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8018c3e29c03Smrg ;; 8019c3e29c03Smrg esac 8020c3e29c03Smrg ;; 802149dc963fSmrg 8022c3e29c03Smrg hpux9* | hpux10* | hpux11*) 8023c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8024c3e29c03Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8025c3e29c03Smrg # not for PA HP-UX. 8026c3e29c03Smrg case $host_cpu in 8027c3e29c03Smrg hppa*64*|ia64*) 8028c3e29c03Smrg # +Z the default 8029c3e29c03Smrg ;; 8030c3e29c03Smrg *) 8031c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8032c3e29c03Smrg ;; 8033c3e29c03Smrg esac 8034c3e29c03Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8035c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8036c3e29c03Smrg ;; 80374b0ead49Smrg 8038c3e29c03Smrg irix5* | irix6* | nonstopux*) 8039c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8040c3e29c03Smrg # PIC (with -KPIC) is the default. 8041c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8042c3e29c03Smrg ;; 80434b0ead49Smrg 8044c3e29c03Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8045c3e29c03Smrg case $cc_basename in 8046c3e29c03Smrg # old Intel for x86_64, which still supported -KPIC. 8047c3e29c03Smrg ecc*) 8048c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8049c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8050c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8051c3e29c03Smrg ;; 8052c3e29c03Smrg # icc used to be incompatible with GCC. 8053c3e29c03Smrg # ICC 10 doesn't accept -KPIC any more. 8054c3e29c03Smrg icc* | ifort*) 8055c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8056c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8057c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8058c3e29c03Smrg ;; 8059c3e29c03Smrg # Lahey Fortran 8.1. 8060c3e29c03Smrg lf95*) 8061c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8062c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8063c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8064c3e29c03Smrg ;; 8065c3e29c03Smrg nagfor*) 8066c3e29c03Smrg # NAG Fortran compiler 8067c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8068c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8069c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8070c3e29c03Smrg ;; 8071c3e29c03Smrg tcc*) 8072c3e29c03Smrg # Fabrice Bellard et al's Tiny C Compiler 8073c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8074c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8075c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8076c3e29c03Smrg ;; 8077c3e29c03Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8078c3e29c03Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 8079c3e29c03Smrg # which looks to be a dead project) 8080c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8081c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8082c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8083c3e29c03Smrg ;; 8084c3e29c03Smrg ccc*) 8085c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8086c3e29c03Smrg # All Alpha code is PIC. 8087c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8088c3e29c03Smrg ;; 8089c3e29c03Smrg xl* | bgxl* | bgf* | mpixl*) 8090c3e29c03Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8091c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8092c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8093c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8094c3e29c03Smrg ;; 8095c3e29c03Smrg *) 8096c3e29c03Smrg case `$CC -V 2>&1 | $SED 5q` in 8097c3e29c03Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8098c3e29c03Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8099c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8100c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8101c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8102c3e29c03Smrg ;; 8103c3e29c03Smrg *Sun\ F* | *Sun*Fortran*) 8104c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8105c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8106c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8107c3e29c03Smrg ;; 8108c3e29c03Smrg *Sun\ C*) 8109c3e29c03Smrg # Sun C 5.9 8110c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8111c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8112c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8113c3e29c03Smrg ;; 8114c3e29c03Smrg *Intel*\ [[CF]]*Compiler*) 8115c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8116c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8117c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8118c3e29c03Smrg ;; 8119c3e29c03Smrg *Portland\ Group*) 8120c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8121c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8122c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8123c3e29c03Smrg ;; 8124c3e29c03Smrg esac 8125c3e29c03Smrg ;; 8126c3e29c03Smrg esac 8127c3e29c03Smrg ;; 81284b0ead49Smrg 8129c3e29c03Smrg newsos6) 8130c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8131c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8132c3e29c03Smrg ;; 81334b0ead49Smrg 8134c3e29c03Smrg *nto* | *qnx*) 8135c3e29c03Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8136c3e29c03Smrg # it will coredump. 8137c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8138c3e29c03Smrg ;; 81394b0ead49Smrg 8140c3e29c03Smrg osf3* | osf4* | osf5*) 8141c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8142c3e29c03Smrg # All OSF/1 code is PIC. 8143c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8144c3e29c03Smrg ;; 81454b0ead49Smrg 8146c3e29c03Smrg rdos*) 8147c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8148c3e29c03Smrg ;; 81494b0ead49Smrg 8150c3e29c03Smrg solaris*) 8151c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8152c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8153c3e29c03Smrg case $cc_basename in 8154c3e29c03Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8155c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8156c3e29c03Smrg *) 8157c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8158c3e29c03Smrg esac 8159c3e29c03Smrg ;; 81604b0ead49Smrg 8161c3e29c03Smrg sunos4*) 8162c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8163c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8164c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8165c3e29c03Smrg ;; 81664b0ead49Smrg 8167c3e29c03Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 8168c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8169c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8170c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8171c3e29c03Smrg ;; 81724b0ead49Smrg 8173c3e29c03Smrg sysv4*MP*) 8174c3e29c03Smrg if test -d /usr/nec; then 8175c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8176c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8177c3e29c03Smrg fi 8178c3e29c03Smrg ;; 81794b0ead49Smrg 8180c3e29c03Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8181c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8182c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8183c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8184c3e29c03Smrg ;; 81854b0ead49Smrg 8186c3e29c03Smrg unicos*) 8187c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8188c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8189c3e29c03Smrg ;; 81904b0ead49Smrg 8191c3e29c03Smrg uts4*) 8192c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8193c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8194c3e29c03Smrg ;; 81954b0ead49Smrg 8196c3e29c03Smrg *) 8197c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8198c3e29c03Smrg ;; 8199c3e29c03Smrg esac 8200c3e29c03Smrg fi 8201c3e29c03Smrg]) 8202c3e29c03Smrgcase $host_os in 8203c3e29c03Smrg # For platforms that do not support PIC, -DPIC is meaningless: 8204c3e29c03Smrg *djgpp*) 8205c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8206c3e29c03Smrg ;; 8207c3e29c03Smrg *) 8208c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8209c3e29c03Smrg ;; 8210c3e29c03Smrgesac 82114b0ead49Smrg 8212c3e29c03SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8213c3e29c03Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8214c3e29c03Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8215c3e29c03Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 82164b0ead49Smrg 8217c3e29c03Smrg# 8218c3e29c03Smrg# Check to make sure the PIC flag actually works. 8219c3e29c03Smrg# 8220c3e29c03Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8221c3e29c03Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8222c3e29c03Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8223c3e29c03Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8224c3e29c03Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8225c3e29c03Smrg "" | " "*) ;; 8226c3e29c03Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8227c3e29c03Smrg esac], 8228c3e29c03Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8229c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8230c3e29c03Smrgfi 8231c3e29c03Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8232c3e29c03Smrg [Additional compiler flags for building library objects]) 823352b01e16Smrg 8234c3e29c03Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8235c3e29c03Smrg [How to pass a linker flag through the compiler]) 8236c3e29c03Smrg# 8237c3e29c03Smrg# Check to make sure the static flag actually works. 8238c3e29c03Smrg# 8239c3e29c03Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8240c3e29c03Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8241c3e29c03Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8242c3e29c03Smrg $lt_tmp_static_flag, 8243c3e29c03Smrg [], 8244c3e29c03Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8245c3e29c03Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8246c3e29c03Smrg [Compiler flag to prevent dynamic linking]) 8247c3e29c03Smrg])# _LT_COMPILER_PIC 82484b0ead49Smrg 82494b0ead49Smrg 8250c3e29c03Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 825149dc963fSmrg# ---------------------------- 8252c3e29c03Smrg# See if the linker supports building shared libraries. 8253c3e29c03Smrgm4_defun([_LT_LINKER_SHLIBS], 8254c3e29c03Smrg[AC_REQUIRE([LT_PATH_LD])dnl 8255c3e29c03SmrgAC_REQUIRE([LT_PATH_NM])dnl 8256c3e29c03Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8257c3e29c03Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8258c3e29c03Smrgm4_require([_LT_DECL_EGREP])dnl 8259c3e29c03Smrgm4_require([_LT_DECL_SED])dnl 8260c3e29c03Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8261c3e29c03Smrgm4_require([_LT_TAG_COMPILER])dnl 8262c3e29c03SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8263c3e29c03Smrgm4_if([$1], [CXX], [ 8264c3e29c03Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8265c3e29c03Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8266c3e29c03Smrg case $host_os in 8267c3e29c03Smrg aix[[4-9]]*) 8268c3e29c03Smrg # If we're using GNU nm, then we don't want the "-C" option. 8269c3e29c03Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8270c3e29c03Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8271c3e29c03Smrg # weak defined symbols like other global defined symbols, whereas 8272c3e29c03Smrg # GNU nm marks them as "W". 8273c3e29c03Smrg # While the 'weak' keyword is ignored in the Export File, we need 8274c3e29c03Smrg # it in the Import File for the 'aix-soname' feature, so we have 8275c3e29c03Smrg # to replace the "-B" option with "-P" for AIX nm. 8276c3e29c03Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8277c3e29c03Smrg _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' 8278c3e29c03Smrg else 8279c3e29c03Smrg _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' 8280c3e29c03Smrg fi 8281c3e29c03Smrg ;; 8282c3e29c03Smrg pw32*) 8283c3e29c03Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8284c3e29c03Smrg ;; 8285c3e29c03Smrg cygwin* | mingw* | cegcc*) 8286c3e29c03Smrg case $cc_basename in 8287c3e29c03Smrg cl* | icl*) 8288c3e29c03Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8289c3e29c03Smrg ;; 829049dc963fSmrg *) 8291c3e29c03Smrg _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' 8292c3e29c03Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 829352b01e16Smrg ;; 8294c3e29c03Smrg esac 8295c3e29c03Smrg ;; 8296c3e29c03Smrg *) 8297c3e29c03Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8298c3e29c03Smrg ;; 8299c3e29c03Smrg esac 8300c3e29c03Smrg], [ 8301c3e29c03Smrg runpath_var= 8302c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 8303c3e29c03Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8304c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)= 8305c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8306c3e29c03Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 8307c3e29c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8308c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8309c3e29c03Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8310c3e29c03Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 8311c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8312c3e29c03Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8313c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8314c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8315c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8316c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8317c3e29c03Smrg _LT_TAGVAR(inherit_rpath, $1)=no 8318c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8319c3e29c03Smrg _LT_TAGVAR(module_cmds, $1)= 8320c3e29c03Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 8321c3e29c03Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8322c3e29c03Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8323c3e29c03Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8324c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8325c3e29c03Smrg # include_expsyms should be a list of space-separated symbols to be *always* 8326c3e29c03Smrg # included in the symbol list 8327c3e29c03Smrg _LT_TAGVAR(include_expsyms, $1)= 8328c3e29c03Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 8329c3e29c03Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8330c3e29c03Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8331c3e29c03Smrg # as well as any symbol that contains 'd'. 8332c3e29c03Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8333c3e29c03Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8334c3e29c03Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 8335c3e29c03Smrg # the symbol is explicitly referenced. Since portable code cannot 8336c3e29c03Smrg # rely on this symbol name, it's probably fine to never include it in 8337c3e29c03Smrg # preloaded symbol tables. 8338c3e29c03Smrg # Exclude shared library initialization/finalization symbols. 8339c3e29c03Smrgdnl Note also adjust exclude_expsyms for C++ above. 8340c3e29c03Smrg extract_expsyms_cmds= 83414b0ead49Smrg 8342c3e29c03Smrg case $host_os in 8343c3e29c03Smrg cygwin* | mingw* | pw32* | cegcc*) 8344c3e29c03Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8345c3e29c03Smrg # When not using gcc, we currently assume that we are using 8346c3e29c03Smrg # Microsoft Visual C++ or Intel C++ Compiler. 8347c3e29c03Smrg if test yes != "$GCC"; then 8348c3e29c03Smrg with_gnu_ld=no 8349c3e29c03Smrg fi 8350c3e29c03Smrg ;; 8351c3e29c03Smrg interix*) 8352c3e29c03Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8353c3e29c03Smrg with_gnu_ld=yes 8354c3e29c03Smrg ;; 8355c3e29c03Smrg openbsd* | bitrig*) 8356c3e29c03Smrg with_gnu_ld=no 8357c3e29c03Smrg ;; 8358c3e29c03Smrg esac 83594b0ead49Smrg 8360c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 83614b0ead49Smrg 8362c3e29c03Smrg # On some targets, GNU ld is compatible enough with the native linker 8363c3e29c03Smrg # that we're better off using the native interface for both. 8364c3e29c03Smrg lt_use_gnu_ld_interface=no 8365c3e29c03Smrg if test yes = "$with_gnu_ld"; then 8366c3e29c03Smrg case $host_os in 8367c3e29c03Smrg aix*) 8368c3e29c03Smrg # The AIX port of GNU ld has always aspired to compatibility 8369c3e29c03Smrg # with the native linker. However, as the warning in the GNU ld 8370c3e29c03Smrg # block says, versions before 2.19.5* couldn't really create working 8371c3e29c03Smrg # shared libraries, regardless of the interface used. 8372c3e29c03Smrg case `$LD -v 2>&1` in 8373c3e29c03Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8374c3e29c03Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8375c3e29c03Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8376c3e29c03Smrg *) 8377c3e29c03Smrg lt_use_gnu_ld_interface=yes 8378c3e29c03Smrg ;; 8379c3e29c03Smrg esac 8380c3e29c03Smrg ;; 8381c3e29c03Smrg *) 8382c3e29c03Smrg lt_use_gnu_ld_interface=yes 8383c3e29c03Smrg ;; 8384c3e29c03Smrg esac 8385c3e29c03Smrg fi 83864b0ead49Smrg 8387c3e29c03Smrg if test yes = "$lt_use_gnu_ld_interface"; then 8388c3e29c03Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 8389c3e29c03Smrg wlarc='$wl' 83904b0ead49Smrg 8391c3e29c03Smrg # Set some defaults for GNU ld with shared library support. These 8392c3e29c03Smrg # are reset later if shared libraries are not supported. Putting them 8393c3e29c03Smrg # here allows them to be overridden if necessary. 8394c3e29c03Smrg runpath_var=LD_RUN_PATH 8395c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8396c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8397c3e29c03Smrg # ancient GNU ld didn't support --whole-archive et. al. 8398c3e29c03Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8399c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8400c3e29c03Smrg else 8401c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8402c3e29c03Smrg fi 8403c3e29c03Smrg supports_anon_versioning=no 8404c3e29c03Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8405c3e29c03Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 8406c3e29c03Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8407c3e29c03Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8408c3e29c03Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8409c3e29c03Smrg *\ 2.11.*) ;; # other 2.11 versions 8410c3e29c03Smrg *) supports_anon_versioning=yes ;; 8411c3e29c03Smrg esac 841249dc963fSmrg 8413c3e29c03Smrg # See if GNU ld supports shared libraries. 8414c3e29c03Smrg case $host_os in 8415c3e29c03Smrg aix[[3-9]]*) 8416c3e29c03Smrg # On AIX/PPC, the GNU linker is very broken 8417c3e29c03Smrg if test ia64 != "$host_cpu"; then 8418c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8419c3e29c03Smrg cat <<_LT_EOF 1>&2 84204b0ead49Smrg 8421c3e29c03Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 8422c3e29c03Smrg*** to be unable to reliably create shared libraries on AIX. 8423c3e29c03Smrg*** Therefore, libtool is disabling shared libraries support. If you 8424c3e29c03Smrg*** really care for shared libraries, you may want to install binutils 8425c3e29c03Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8426c3e29c03Smrg*** You will then need to restart the configuration process. 84274b0ead49Smrg 8428c3e29c03Smrg_LT_EOF 8429c3e29c03Smrg fi 8430c3e29c03Smrg ;; 84314b0ead49Smrg 8432c3e29c03Smrg amigaos*) 8433c3e29c03Smrg case $host_cpu in 8434c3e29c03Smrg powerpc) 8435c3e29c03Smrg # see comment about AmigaOS4 .so support 8436c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8437c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8438c3e29c03Smrg ;; 8439c3e29c03Smrg m68k) 8440c3e29c03Smrg _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)' 8441c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8442c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8443c3e29c03Smrg ;; 8444c3e29c03Smrg esac 844552b01e16Smrg ;; 84464b0ead49Smrg 8447c3e29c03Smrg beos*) 8448c3e29c03Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8449c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8450c3e29c03Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8451c3e29c03Smrg # support --undefined. This deserves some investigation. FIXME 8452c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8453c3e29c03Smrg else 8454c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8455c3e29c03Smrg fi 8456c3e29c03Smrg ;; 84574b0ead49Smrg 8458c3e29c03Smrg cygwin* | mingw* | pw32* | cegcc*) 8459c3e29c03Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8460c3e29c03Smrg # as there is no search path for DLLs. 8461c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8462c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8463c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8464c3e29c03Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8465c3e29c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8466c3e29c03Smrg _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' 8467c3e29c03Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 84684b0ead49Smrg 8469c3e29c03Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8470c3e29c03Smrg _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' 8471c3e29c03Smrg # If the export-symbols file already is a .def file, use it as 8472c3e29c03Smrg # is; otherwise, prepend EXPORTS... 8473c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8474c3e29c03Smrg cp $export_symbols $output_objdir/$soname.def; 8475c3e29c03Smrg else 8476c3e29c03Smrg echo EXPORTS > $output_objdir/$soname.def; 8477c3e29c03Smrg cat $export_symbols >> $output_objdir/$soname.def; 8478c3e29c03Smrg fi~ 8479c3e29c03Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8480c3e29c03Smrg else 8481c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8482c3e29c03Smrg fi 8483c3e29c03Smrg ;; 848452b01e16Smrg 8485c3e29c03Smrg haiku*) 8486c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8487c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8488c3e29c03Smrg ;; 848949dc963fSmrg 8490c3e29c03Smrg os2*) 8491c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8492c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8493c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8494c3e29c03Smrg shrext_cmds=.dll 8495c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8496c3e29c03Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8497c3e29c03Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8498c3e29c03Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8499c3e29c03Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8500c3e29c03Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8501c3e29c03Smrg emximp -o $lib $output_objdir/$libname.def' 8502c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8503c3e29c03Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8504c3e29c03Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8505c3e29c03Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8506c3e29c03Smrg prefix_cmds="$SED"~ 8507c3e29c03Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 8508c3e29c03Smrg prefix_cmds="$prefix_cmds -e 1d"; 8509c3e29c03Smrg fi~ 8510c3e29c03Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8511c3e29c03Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8512c3e29c03Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8513c3e29c03Smrg emximp -o $lib $output_objdir/$libname.def' 8514c3e29c03Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8515c3e29c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8516c3e29c03Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8517c3e29c03Smrg ;; 851849dc963fSmrg 8519c3e29c03Smrg interix[[3-9]]*) 8520c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8521c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8522c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8523c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8524c3e29c03Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8525c3e29c03Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8526c3e29c03Smrg # default) and relocated if they conflict, which is a slow very memory 8527c3e29c03Smrg # consuming and fragmenting process. To avoid this, we pick a random, 8528c3e29c03Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8529c3e29c03Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8530c3e29c03Smrg _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' 8531c3e29c03Smrg _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' 8532c3e29c03Smrg ;; 8533c3e29c03Smrg 8534c3e29c03Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8535c3e29c03Smrg tmp_diet=no 8536c3e29c03Smrg if test linux-dietlibc = "$host_os"; then 8537c3e29c03Smrg case $cc_basename in 8538c3e29c03Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8539c3e29c03Smrg esac 8540c3e29c03Smrg fi 8541c3e29c03Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8542c3e29c03Smrg && test no = "$tmp_diet" 8543c3e29c03Smrg then 8544c3e29c03Smrg tmp_addflag=' $pic_flag' 8545c3e29c03Smrg tmp_sharedflag='-shared' 8546c3e29c03Smrg case $cc_basename,$host_cpu in 8547c3e29c03Smrg pgcc*) # Portland Group C compiler 8548c3e29c03Smrg _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' 8549c3e29c03Smrg tmp_addflag=' $pic_flag' 8550c3e29c03Smrg ;; 8551c3e29c03Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 8552c3e29c03Smrg # Portland Group f77 and f90 compilers 8553c3e29c03Smrg _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' 8554c3e29c03Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 8555c3e29c03Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8556c3e29c03Smrg tmp_addflag=' -i_dynamic' ;; 8557c3e29c03Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8558c3e29c03Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 8559c3e29c03Smrg ifc* | ifort*) # Intel Fortran compiler 8560c3e29c03Smrg tmp_addflag=' -nofor_main' ;; 8561c3e29c03Smrg lf95*) # Lahey Fortran 8.1 8562c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8563c3e29c03Smrg tmp_sharedflag='--shared' ;; 8564c3e29c03Smrg nagfor*) # NAGFOR 5.3 8565c3e29c03Smrg tmp_sharedflag='-Wl,-shared' ;; 8566c3e29c03Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8567c3e29c03Smrg tmp_sharedflag='-qmkshrobj' 8568c3e29c03Smrg tmp_addflag= ;; 8569c3e29c03Smrg nvcc*) # Cuda Compiler Driver 2.2 8570c3e29c03Smrg _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' 8571c3e29c03Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8572c3e29c03Smrg ;; 8573c3e29c03Smrg esac 8574c3e29c03Smrg case `$CC -V 2>&1 | $SED 5q` in 8575c3e29c03Smrg *Sun\ C*) # Sun C 5.9 8576c3e29c03Smrg _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' 8577c3e29c03Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8578c3e29c03Smrg tmp_sharedflag='-G' ;; 8579c3e29c03Smrg *Sun\ F*) # Sun Fortran 8.3 8580c3e29c03Smrg tmp_sharedflag='-G' ;; 8581c3e29c03Smrg esac 8582c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 85834e7590efSmrg 8584c3e29c03Smrg if test yes = "$supports_anon_versioning"; then 8585c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8586c3e29c03Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8587c3e29c03Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8588c3e29c03Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8589c3e29c03Smrg fi 85904e7590efSmrg 8591c3e29c03Smrg case $cc_basename in 8592c3e29c03Smrg tcc*) 8593c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8594c3e29c03Smrg ;; 8595c3e29c03Smrg xlf* | bgf* | bgxlf* | mpixlf*) 8596c3e29c03Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8597c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8598c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8599c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8600c3e29c03Smrg if test yes = "$supports_anon_versioning"; then 8601c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8602c3e29c03Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8603c3e29c03Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8604c3e29c03Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8605c3e29c03Smrg fi 8606c3e29c03Smrg ;; 8607c3e29c03Smrg esac 8608c3e29c03Smrg else 8609c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8610c3e29c03Smrg fi 8611c3e29c03Smrg ;; 86124e7590efSmrg 8613c3e29c03Smrg netbsd*) 8614c3e29c03Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8615c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8616c3e29c03Smrg wlarc= 8617c3e29c03Smrg else 8618c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8619c3e29c03Smrg _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' 8620c3e29c03Smrg fi 86214e7590efSmrg ;; 86224e7590efSmrg 8623c3e29c03Smrg solaris*) 8624c3e29c03Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8625c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8626c3e29c03Smrg cat <<_LT_EOF 1>&2 86274e7590efSmrg 8628c3e29c03Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8629c3e29c03Smrg*** create shared libraries on Solaris systems. Therefore, libtool 8630c3e29c03Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 8631c3e29c03Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 8632c3e29c03Smrg*** your PATH or compiler configuration so that the native linker is 8633c3e29c03Smrg*** used, and then restart. 86344e7590efSmrg 8635c3e29c03Smrg_LT_EOF 8636c3e29c03Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8637c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8638c3e29c03Smrg _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' 8639c3e29c03Smrg else 8640c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8641c3e29c03Smrg fi 8642c3e29c03Smrg ;; 86434e7590efSmrg 8644c3e29c03Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8645c3e29c03Smrg case `$LD -v 2>&1` in 8646c3e29c03Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8647c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8648c3e29c03Smrg cat <<_LT_EOF 1>&2 86494e7590efSmrg 8650c3e29c03Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8651c3e29c03Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 8652c3e29c03Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 8653c3e29c03Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8654c3e29c03Smrg*** your PATH or compiler configuration so that the native linker is 8655c3e29c03Smrg*** used, and then restart. 86564e7590efSmrg 8657c3e29c03Smrg_LT_EOF 8658c3e29c03Smrg ;; 8659c3e29c03Smrg *) 8660c3e29c03Smrg # For security reasons, it is highly recommended that you always 8661c3e29c03Smrg # use absolute paths for naming shared libraries, and exclude the 8662c3e29c03Smrg # DT_RUNPATH tag from executables and libraries. But doing so 8663c3e29c03Smrg # requires that you compile everything twice, which is a pain. 8664c3e29c03Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8665c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8666c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8667c3e29c03Smrg _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' 8668c3e29c03Smrg else 8669c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8670c3e29c03Smrg fi 8671c3e29c03Smrg ;; 8672c3e29c03Smrg esac 8673c3e29c03Smrg ;; 86744e7590efSmrg 8675c3e29c03Smrg sunos4*) 8676c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8677c3e29c03Smrg wlarc= 8678c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8679c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 868026372658Smrg ;; 8681c3e29c03Smrg 868226372658Smrg *) 8683c3e29c03Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8684c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8685c3e29c03Smrg _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' 8686c3e29c03Smrg else 8687c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8688c3e29c03Smrg fi 868926372658Smrg ;; 869026372658Smrg esac 869126372658Smrg 8692c3e29c03Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8693c3e29c03Smrg runpath_var= 8694c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8695c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8696c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8697c3e29c03Smrg fi 8698c3e29c03Smrg else 8699c3e29c03Smrg # PORTME fill in a description of your system's linker (not GNU ld) 8700c3e29c03Smrg case $host_os in 8701c3e29c03Smrg aix3*) 8702c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8703c3e29c03Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8704c3e29c03Smrg _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' 8705c3e29c03Smrg # Note: this linker hardcodes the directories in LIBPATH if there 8706c3e29c03Smrg # are no directories specified by -L. 8707c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8708c3e29c03Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8709c3e29c03Smrg # Neither direct hardcoding nor static linking is supported with a 8710c3e29c03Smrg # broken collect2. 8711c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8712c3e29c03Smrg fi 87134e7590efSmrg ;; 87144e7590efSmrg 8715c3e29c03Smrg aix[[4-9]]*) 8716c3e29c03Smrg if test ia64 = "$host_cpu"; then 8717c3e29c03Smrg # On IA64, the linker does run time linking by default, so we don't 8718c3e29c03Smrg # have to do anything special. 8719c3e29c03Smrg aix_use_runtimelinking=no 8720c3e29c03Smrg exp_sym_flag='-Bexport' 8721c3e29c03Smrg no_entry_flag= 8722c3e29c03Smrg else 8723c3e29c03Smrg # If we're using GNU nm, then we don't want the "-C" option. 8724c3e29c03Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8725c3e29c03Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8726c3e29c03Smrg # weak defined symbols like other global defined symbols, whereas 8727c3e29c03Smrg # GNU nm marks them as "W". 8728c3e29c03Smrg # While the 'weak' keyword is ignored in the Export File, we need 8729c3e29c03Smrg # it in the Import File for the 'aix-soname' feature, so we have 8730c3e29c03Smrg # to replace the "-B" option with "-P" for AIX nm. 8731c3e29c03Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8732c3e29c03Smrg _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' 8733c3e29c03Smrg else 8734c3e29c03Smrg _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' 8735c3e29c03Smrg fi 8736c3e29c03Smrg aix_use_runtimelinking=no 87374e7590efSmrg 8738c3e29c03Smrg # Test if we are trying to use run time linking or normal 8739c3e29c03Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8740c3e29c03Smrg # have runtime linking enabled, and use it for executables. 8741c3e29c03Smrg # For shared libraries, we enable/disable runtime linking 8742c3e29c03Smrg # depending on the kind of the shared library created - 8743c3e29c03Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 8744c3e29c03Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8745c3e29c03Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 8746c3e29c03Smrg # lib.a static archive 8747c3e29c03Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 8748c3e29c03Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 8749c3e29c03Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8750c3e29c03Smrg # lib.a(lib.so.V) shared, rtl:no 8751c3e29c03Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8752c3e29c03Smrg # lib.a static archive 8753c3e29c03Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8754c3e29c03Smrg for ld_flag in $LDFLAGS; do 8755c3e29c03Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8756c3e29c03Smrg aix_use_runtimelinking=yes 8757c3e29c03Smrg break 8758c3e29c03Smrg fi 8759c3e29c03Smrg done 8760c3e29c03Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8761c3e29c03Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 8762c3e29c03Smrg # so we don't have lib.a shared libs to link our executables. 8763c3e29c03Smrg # We have to force runtime linking in this case. 8764c3e29c03Smrg aix_use_runtimelinking=yes 8765c3e29c03Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 8766c3e29c03Smrg fi 8767c3e29c03Smrg ;; 8768c3e29c03Smrg esac 87694e7590efSmrg 8770c3e29c03Smrg exp_sym_flag='-bexport' 8771c3e29c03Smrg no_entry_flag='-bnoentry' 8772c3e29c03Smrg fi 87734e7590efSmrg 8774c3e29c03Smrg # When large executables or shared objects are built, AIX ld can 8775c3e29c03Smrg # have problems creating the table of contents. If linking a library 8776c3e29c03Smrg # or program results in "error TOC overflow" add -mminimal-toc to 8777c3e29c03Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8778c3e29c03Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 87794e7590efSmrg 8780c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='' 8781c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8782c3e29c03Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8783c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8784c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8785c3e29c03Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8786c3e29c03Smrg case $with_aix_soname,$aix_use_runtimelinking in 8787c3e29c03Smrg aix,*) ;; # traditional, no import file 8788c3e29c03Smrg svr4,* | *,yes) # use import file 8789c3e29c03Smrg # The Import File defines what to hardcode. 8790c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8791c3e29c03Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8792c3e29c03Smrg ;; 8793c3e29c03Smrg esac 87944e7590efSmrg 8795c3e29c03Smrg if test yes = "$GCC"; then 8796c3e29c03Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8797c3e29c03Smrg # We only want to do this on AIX 4.2 and lower, the check 8798c3e29c03Smrg # below for broken collect2 doesn't work under 4.3+ 8799c3e29c03Smrg collect2name=`$CC -print-prog-name=collect2` 8800c3e29c03Smrg if test -f "$collect2name" && 8801c3e29c03Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8802c3e29c03Smrg then 8803c3e29c03Smrg # We have reworked collect2 8804c3e29c03Smrg : 8805c3e29c03Smrg else 8806c3e29c03Smrg # We have old collect2 8807c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8808c3e29c03Smrg # It fails to find uninstalled libraries when the uninstalled 8809c3e29c03Smrg # path is not listed in the libpath. Setting hardcode_minus_L 8810c3e29c03Smrg # to unsupported forces relinking 8811c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8812c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8813c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8814c3e29c03Smrg fi 8815c3e29c03Smrg ;; 8816c3e29c03Smrg esac 8817c3e29c03Smrg shared_flag='-shared' 8818c3e29c03Smrg if test yes = "$aix_use_runtimelinking"; then 8819c3e29c03Smrg shared_flag="$shared_flag "'$wl-G' 8820c3e29c03Smrg fi 8821c3e29c03Smrg # Need to ensure runtime linking is disabled for the traditional 8822c3e29c03Smrg # shared library, or the linker may eventually find shared libraries 8823c3e29c03Smrg # /with/ Import File - we do not want to mix them. 8824c3e29c03Smrg shared_flag_aix='-shared' 8825c3e29c03Smrg shared_flag_svr4='-shared $wl-G' 8826c3e29c03Smrg else 8827c3e29c03Smrg # not using gcc 8828c3e29c03Smrg if test ia64 = "$host_cpu"; then 8829c3e29c03Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8830c3e29c03Smrg # chokes on -Wl,-G. The following line is correct: 8831c3e29c03Smrg shared_flag='-G' 8832c3e29c03Smrg else 8833c3e29c03Smrg if test yes = "$aix_use_runtimelinking"; then 8834c3e29c03Smrg shared_flag='$wl-G' 8835c3e29c03Smrg else 8836c3e29c03Smrg shared_flag='$wl-bM:SRE' 8837c3e29c03Smrg fi 8838c3e29c03Smrg shared_flag_aix='$wl-bM:SRE' 8839c3e29c03Smrg shared_flag_svr4='$wl-G' 8840c3e29c03Smrg fi 8841c3e29c03Smrg fi 88424e7590efSmrg 8843c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8844c3e29c03Smrg # It seems that -bexpall does not export symbols beginning with 8845c3e29c03Smrg # underscore (_), so it is better to generate a list of symbols to export. 8846c3e29c03Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8847c3e29c03Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8848c3e29c03Smrg # Warning - without using the other runtime loading flags (-brtl), 8849c3e29c03Smrg # -berok will link without error, but may produce a broken library. 8850c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8851c3e29c03Smrg # Determine the default libpath from the value encoded in an 8852c3e29c03Smrg # empty executable. 8853c3e29c03Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8854c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8855c3e29c03Smrg _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 8856c3e29c03Smrg else 8857c3e29c03Smrg if test ia64 = "$host_cpu"; then 8858c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8859c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8860c3e29c03Smrg _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" 8861c3e29c03Smrg else 8862c3e29c03Smrg # Determine the default libpath from the value encoded in an 8863c3e29c03Smrg # empty executable. 8864c3e29c03Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8865c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8866c3e29c03Smrg # Warning - without using the other run time loading flags, 8867c3e29c03Smrg # -berok will link without error, but may produce a broken library. 8868c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8869c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8870c3e29c03Smrg if test yes = "$with_gnu_ld"; then 8871c3e29c03Smrg # We only use this code for GNU lds that support --whole-archive. 8872c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8873c3e29c03Smrg else 8874c3e29c03Smrg # Exported symbols can be pulled into shared objects from archives 8875c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8876c3e29c03Smrg fi 8877c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8878c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8879c3e29c03Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 8880c3e29c03Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8881c3e29c03Smrg if test svr4 != "$with_aix_soname"; then 8882c3e29c03Smrg # This is similar to how AIX traditionally builds its shared libraries. 8883c3e29c03Smrg _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' 8884c3e29c03Smrg fi 8885c3e29c03Smrg if test aix != "$with_aix_soname"; then 8886c3e29c03Smrg _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' 8887c3e29c03Smrg else 8888c3e29c03Smrg # used by -dlpreopen to get the symbols 8889c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8890c3e29c03Smrg fi 8891c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8892c3e29c03Smrg fi 8893c3e29c03Smrg fi 8894c3e29c03Smrg ;; 88954e7590efSmrg 8896c3e29c03Smrg amigaos*) 8897c3e29c03Smrg case $host_cpu in 8898c3e29c03Smrg powerpc) 8899c3e29c03Smrg # see comment about AmigaOS4 .so support 8900c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8901c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8902c3e29c03Smrg ;; 8903c3e29c03Smrg m68k) 8904c3e29c03Smrg _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)' 8905c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8906c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8907c3e29c03Smrg ;; 8908c3e29c03Smrg esac 8909c3e29c03Smrg ;; 89104e7590efSmrg 8911c3e29c03Smrg bsdi[[45]]*) 8912c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 8913c3e29c03Smrg ;; 8914c3e29c03Smrg 8915c3e29c03Smrg cygwin* | mingw* | pw32* | cegcc*) 8916c3e29c03Smrg # When not using gcc, we currently assume that we are using 8917c3e29c03Smrg # Microsoft Visual C++ or Intel C++ Compiler. 8918c3e29c03Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 8919c3e29c03Smrg # no search path for DLLs. 8920c3e29c03Smrg case $cc_basename in 8921c3e29c03Smrg cl* | icl*) 8922c3e29c03Smrg # Native MSVC or ICC 8923c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8924c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8925c3e29c03Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8926c3e29c03Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8927c3e29c03Smrg # Tell ltmain to make .lib files, not .a files. 8928c3e29c03Smrg libext=lib 8929c3e29c03Smrg # Tell ltmain to make .dll files, not .so files. 8930c3e29c03Smrg shrext_cmds=.dll 8931c3e29c03Smrg # FIXME: Setting linknames here is a bad hack. 8932c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 8933c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8934c3e29c03Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 8935c3e29c03Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 8936c3e29c03Smrg else 8937c3e29c03Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 8938c3e29c03Smrg fi~ 8939c3e29c03Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 8940c3e29c03Smrg linknames=' 8941c3e29c03Smrg # The linker will not automatically build a static lib if we build a DLL. 8942c3e29c03Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8943c3e29c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8944c3e29c03Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8945c3e29c03Smrg _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' 8946c3e29c03Smrg # Don't use ranlib 8947c3e29c03Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 8948c3e29c03Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 8949c3e29c03Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 8950c3e29c03Smrg case $lt_outputfile in 8951c3e29c03Smrg *.exe|*.EXE) ;; 8952c3e29c03Smrg *) 8953c3e29c03Smrg lt_outputfile=$lt_outputfile.exe 8954c3e29c03Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 8955c3e29c03Smrg ;; 8956c3e29c03Smrg esac~ 8957c3e29c03Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 8958c3e29c03Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 8959c3e29c03Smrg $RM "$lt_outputfile.manifest"; 8960c3e29c03Smrg fi' 8961c3e29c03Smrg ;; 8962c3e29c03Smrg *) 8963c3e29c03Smrg # Assume MSVC and ICC wrapper 8964c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8965c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8966c3e29c03Smrg # Tell ltmain to make .lib files, not .a files. 8967c3e29c03Smrg libext=lib 8968c3e29c03Smrg # Tell ltmain to make .dll files, not .so files. 8969c3e29c03Smrg shrext_cmds=.dll 8970c3e29c03Smrg # FIXME: Setting linknames here is a bad hack. 8971c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 8972c3e29c03Smrg # The linker will automatically build a .lib file if we build a DLL. 8973c3e29c03Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8974c3e29c03Smrg # FIXME: Should let the user specify the lib program. 8975c3e29c03Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 8976c3e29c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8977c3e29c03Smrg ;; 8978c3e29c03Smrg esac 8979c3e29c03Smrg ;; 89804e7590efSmrg 8981c3e29c03Smrg darwin* | rhapsody*) 8982c3e29c03Smrg _LT_DARWIN_LINKER_FEATURES($1) 8983c3e29c03Smrg ;; 89844e7590efSmrg 8985c3e29c03Smrg dgux*) 8986c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8987c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8988c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8989c3e29c03Smrg ;; 89904e7590efSmrg 8991c3e29c03Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 8992c3e29c03Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 8993c3e29c03Smrg # does not break anything, and helps significantly (at the cost of a little 8994c3e29c03Smrg # extra space). 8995c3e29c03Smrg freebsd2.2*) 8996c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 8997c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8998c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8999c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9000c3e29c03Smrg ;; 90014e7590efSmrg 9002c3e29c03Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9003c3e29c03Smrg freebsd2.*) 9004c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9005c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9006c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9007c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9008c3e29c03Smrg ;; 90094e7590efSmrg 9010c3e29c03Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9011c3e29c03Smrg freebsd* | dragonfly* | midnightbsd*) 9012c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9013c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9014c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9015c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9016c3e29c03Smrg ;; 90174e7590efSmrg 9018c3e29c03Smrg hpux9*) 9019c3e29c03Smrg if test yes = "$GCC"; then 9020c3e29c03Smrg _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' 9021c3e29c03Smrg else 9022c3e29c03Smrg _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' 9023c3e29c03Smrg fi 9024c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9025c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9026c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 90274e7590efSmrg 9028c3e29c03Smrg # hardcode_minus_L: Not really in the search PATH, 9029c3e29c03Smrg # but as the default location of the library. 9030c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9031c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9032c3e29c03Smrg ;; 90334e7590efSmrg 9034c3e29c03Smrg hpux10*) 9035c3e29c03Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9036c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9037c3e29c03Smrg else 9038c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9039c3e29c03Smrg fi 9040c3e29c03Smrg if test no = "$with_gnu_ld"; then 9041c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9042c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9043c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9044c3e29c03Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9045c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9046c3e29c03Smrg # hardcode_minus_L: Not really in the search PATH, 9047c3e29c03Smrg # but as the default location of the library. 9048c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9049c3e29c03Smrg fi 9050c3e29c03Smrg ;; 90514e7590efSmrg 9052c3e29c03Smrg hpux11*) 9053c3e29c03Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9054c3e29c03Smrg case $host_cpu in 9055c3e29c03Smrg hppa*64*) 9056c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9057c3e29c03Smrg ;; 9058c3e29c03Smrg ia64*) 9059c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9060c3e29c03Smrg ;; 9061c3e29c03Smrg *) 9062c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9063c3e29c03Smrg ;; 9064c3e29c03Smrg esac 9065c3e29c03Smrg else 9066c3e29c03Smrg case $host_cpu in 9067c3e29c03Smrg hppa*64*) 9068c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9069c3e29c03Smrg ;; 9070c3e29c03Smrg ia64*) 9071c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9072c3e29c03Smrg ;; 9073c3e29c03Smrg *) 9074c3e29c03Smrg m4_if($1, [], [ 9075c3e29c03Smrg # Older versions of the 11.00 compiler do not understand -b yet 9076c3e29c03Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9077c3e29c03Smrg _LT_LINKER_OPTION([if $CC understands -b], 9078c3e29c03Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9079c3e29c03Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9080c3e29c03Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9081c3e29c03Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9082c3e29c03Smrg ;; 9083c3e29c03Smrg esac 9084c3e29c03Smrg fi 9085c3e29c03Smrg if test no = "$with_gnu_ld"; then 9086c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9087c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 90884e7590efSmrg 9089c3e29c03Smrg case $host_cpu in 9090c3e29c03Smrg hppa*64*|ia64*) 9091c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9092c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9093c3e29c03Smrg ;; 9094c3e29c03Smrg *) 9095c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9096c3e29c03Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9097c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 90984e7590efSmrg 9099c3e29c03Smrg # hardcode_minus_L: Not really in the search PATH, 9100c3e29c03Smrg # but as the default location of the library. 9101c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9102c3e29c03Smrg ;; 9103c3e29c03Smrg esac 9104c3e29c03Smrg fi 9105c3e29c03Smrg ;; 91064e7590efSmrg 9107c3e29c03Smrg irix5* | irix6* | nonstopux*) 9108c3e29c03Smrg if test yes = "$GCC"; then 9109c3e29c03Smrg _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' 9110c3e29c03Smrg # Try to use the -exported_symbol ld option, if it does not 9111c3e29c03Smrg # work, assume that -exports_file does not work either and 9112c3e29c03Smrg # implicitly export all symbols. 9113c3e29c03Smrg # This should be the same for all languages, so no per-tag cache variable. 9114c3e29c03Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9115c3e29c03Smrg [lt_cv_irix_exported_symbol], 9116c3e29c03Smrg [save_LDFLAGS=$LDFLAGS 9117c3e29c03Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9118c3e29c03Smrg AC_LINK_IFELSE( 9119c3e29c03Smrg [AC_LANG_SOURCE( 9120c3e29c03Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9121c3e29c03Smrg [C++], [[int foo (void) { return 0; }]], 9122c3e29c03Smrg [Fortran 77], [[ 9123c3e29c03Smrg subroutine foo 9124c3e29c03Smrg end]], 9125c3e29c03Smrg [Fortran], [[ 9126c3e29c03Smrg subroutine foo 9127c3e29c03Smrg end]])])], 9128c3e29c03Smrg [lt_cv_irix_exported_symbol=yes], 9129c3e29c03Smrg [lt_cv_irix_exported_symbol=no]) 9130c3e29c03Smrg LDFLAGS=$save_LDFLAGS]) 9131c3e29c03Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 9132c3e29c03Smrg _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' 9133c3e29c03Smrg fi 9134c3e29c03Smrg else 9135c3e29c03Smrg _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' 9136c3e29c03Smrg _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' 9137c3e29c03Smrg fi 9138c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9139c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9140c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9141c3e29c03Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 9142c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9143c3e29c03Smrg ;; 91444e7590efSmrg 9145c3e29c03Smrg linux*) 9146c3e29c03Smrg case $cc_basename in 9147c3e29c03Smrg tcc*) 9148c3e29c03Smrg # Fabrice Bellard et al's Tiny C Compiler 9149c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9150c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9151c3e29c03Smrg ;; 9152c3e29c03Smrg esac 9153c3e29c03Smrg ;; 91544e7590efSmrg 9155c3e29c03Smrg netbsd*) 9156c3e29c03Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9157c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9158c3e29c03Smrg else 9159c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9160c3e29c03Smrg fi 9161c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9162c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9163c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9164c3e29c03Smrg ;; 91654e7590efSmrg 9166c3e29c03Smrg newsos6) 9167c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9168c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9169c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9170c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9171c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9172c3e29c03Smrg ;; 91734e7590efSmrg 9174c3e29c03Smrg *nto* | *qnx*) 9175c3e29c03Smrg ;; 91764e7590efSmrg 9177c3e29c03Smrg openbsd* | bitrig*) 9178c3e29c03Smrg if test -f /usr/libexec/ld.so; then 9179c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9180c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9181c3e29c03Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9182c3e29c03Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9183c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9184c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9185c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9186c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9187c3e29c03Smrg else 9188c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9189c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9190c3e29c03Smrg fi 9191c3e29c03Smrg else 9192c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9193c3e29c03Smrg fi 9194c3e29c03Smrg ;; 91954e7590efSmrg 9196c3e29c03Smrg os2*) 9197c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9198c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9199c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9200c3e29c03Smrg shrext_cmds=.dll 9201c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9202c3e29c03Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9203c3e29c03Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9204c3e29c03Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9205c3e29c03Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9206c3e29c03Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9207c3e29c03Smrg emximp -o $lib $output_objdir/$libname.def' 9208c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9209c3e29c03Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9210c3e29c03Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9211c3e29c03Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9212c3e29c03Smrg prefix_cmds="$SED"~ 9213c3e29c03Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9214c3e29c03Smrg prefix_cmds="$prefix_cmds -e 1d"; 9215c3e29c03Smrg fi~ 9216c3e29c03Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9217c3e29c03Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9218c3e29c03Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9219c3e29c03Smrg emximp -o $lib $output_objdir/$libname.def' 9220c3e29c03Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9221c3e29c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9222c3e29c03Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9223c3e29c03Smrg ;; 92244e7590efSmrg 9225c3e29c03Smrg osf3*) 9226c3e29c03Smrg if test yes = "$GCC"; then 9227c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9228c3e29c03Smrg _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' 9229c3e29c03Smrg else 9230c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9231c3e29c03Smrg _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' 9232c3e29c03Smrg fi 9233c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9234c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9235c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9236c3e29c03Smrg ;; 92374e7590efSmrg 9238c3e29c03Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9239c3e29c03Smrg if test yes = "$GCC"; then 9240c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9241c3e29c03Smrg _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' 9242c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9243c3e29c03Smrg else 9244c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9245c3e29c03Smrg _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' 9246c3e29c03Smrg _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~ 9247c3e29c03Smrg $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' 92484e7590efSmrg 9249c3e29c03Smrg # Both c and cxx compiler support -rpath directly 9250c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9251c3e29c03Smrg fi 9252c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9253c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9254c3e29c03Smrg ;; 92554e7590efSmrg 9256c3e29c03Smrg solaris*) 9257c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9258c3e29c03Smrg if test yes = "$GCC"; then 9259c3e29c03Smrg wlarc='$wl' 9260c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9261c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9262c3e29c03Smrg $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' 9263c3e29c03Smrg else 9264c3e29c03Smrg case `$CC -V 2>&1` in 9265c3e29c03Smrg *"Compilers 5.0"*) 9266c3e29c03Smrg wlarc='' 9267c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9268c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9269c3e29c03Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9270c3e29c03Smrg ;; 9271c3e29c03Smrg *) 9272c3e29c03Smrg wlarc='$wl' 9273c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9274c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9275c3e29c03Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9276c3e29c03Smrg ;; 9277c3e29c03Smrg esac 9278c3e29c03Smrg fi 9279c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9280c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9281c3e29c03Smrg case $host_os in 9282c3e29c03Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9283c3e29c03Smrg *) 9284c3e29c03Smrg # The compiler driver will combine and reorder linker options, 9285c3e29c03Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9286c3e29c03Smrg # but is careful enough not to reorder. 9287c3e29c03Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9288c3e29c03Smrg if test yes = "$GCC"; then 9289c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9290c3e29c03Smrg else 9291c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9292c3e29c03Smrg fi 9293c3e29c03Smrg ;; 9294c3e29c03Smrg esac 9295c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9296c3e29c03Smrg ;; 92974e7590efSmrg 9298c3e29c03Smrg sunos4*) 9299c3e29c03Smrg if test sequent = "$host_vendor"; then 9300c3e29c03Smrg # Use $CC to link under sequent, because it throws in some extra .o 9301c3e29c03Smrg # files that make .init and .fini sections work. 9302c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9303c3e29c03Smrg else 9304c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9305c3e29c03Smrg fi 9306c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9307c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9308c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9309c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9310c3e29c03Smrg ;; 93114e7590efSmrg 9312c3e29c03Smrg sysv4) 9313c3e29c03Smrg case $host_vendor in 9314c3e29c03Smrg sni) 9315c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9316c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9317c3e29c03Smrg ;; 9318c3e29c03Smrg siemens) 9319c3e29c03Smrg ## LD is ld it makes a PLAMLIB 9320c3e29c03Smrg ## CC just makes a GrossModule. 9321c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9322c3e29c03Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9323c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9324c3e29c03Smrg ;; 9325c3e29c03Smrg motorola) 9326c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9327c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9328c3e29c03Smrg ;; 9329c3e29c03Smrg esac 9330c3e29c03Smrg runpath_var='LD_RUN_PATH' 9331c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9332c3e29c03Smrg ;; 93334e7590efSmrg 9334c3e29c03Smrg sysv4.3*) 9335c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9336c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9337c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9338c3e29c03Smrg ;; 93394e7590efSmrg 9340c3e29c03Smrg sysv4*MP*) 9341c3e29c03Smrg if test -d /usr/nec; then 9342c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9343c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9344c3e29c03Smrg runpath_var=LD_RUN_PATH 9345c3e29c03Smrg hardcode_runpath_var=yes 9346c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9347c3e29c03Smrg fi 9348c3e29c03Smrg ;; 93494e7590efSmrg 9350c3e29c03Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9351c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9352c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9353c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9354c3e29c03Smrg runpath_var='LD_RUN_PATH' 93554e7590efSmrg 9356c3e29c03Smrg if test yes = "$GCC"; then 9357c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9358c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9359c3e29c03Smrg else 9360c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9361c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9362c3e29c03Smrg fi 9363c3e29c03Smrg ;; 93644e7590efSmrg 9365c3e29c03Smrg sysv5* | sco3.2v5* | sco5v6*) 9366c3e29c03Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 9367c3e29c03Smrg # link with -lc, and that would cause any symbols used from libc to 9368c3e29c03Smrg # always be unresolved, which means just about no library would 9369c3e29c03Smrg # ever link correctly. If we're not using GNU ld we use -z text 9370c3e29c03Smrg # though, which does catch some bad symbols but isn't as heavy-handed 9371c3e29c03Smrg # as -z defs. 9372c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9373c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9374c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9375c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9376c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9377c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9378c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9379c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9380c3e29c03Smrg runpath_var='LD_RUN_PATH' 93814e7590efSmrg 9382c3e29c03Smrg if test yes = "$GCC"; then 9383c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9384c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9385c3e29c03Smrg else 9386c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9387c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9388c3e29c03Smrg fi 9389c3e29c03Smrg ;; 939026372658Smrg 9391c3e29c03Smrg uts4*) 9392c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9393c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9394c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9395c3e29c03Smrg ;; 939626372658Smrg 9397c3e29c03Smrg *) 9398c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9399c3e29c03Smrg ;; 9400c3e29c03Smrg esac 940126372658Smrg 9402c3e29c03Smrg if test sni = "$host_vendor"; then 9403c3e29c03Smrg case $host in 9404c3e29c03Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9405c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9406c3e29c03Smrg ;; 9407c3e29c03Smrg esac 9408c3e29c03Smrg fi 9409c3e29c03Smrg fi 9410c3e29c03Smrg]) 9411c3e29c03SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9412c3e29c03Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9413c3e29c03Smrg 9414c3e29c03Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9415c3e29c03Smrg 9416c3e29c03Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9417c3e29c03Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9418c3e29c03Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 9419c3e29c03Smrg [The commands to extract the exported symbol list from a shared archive]) 9420c3e29c03Smrg 9421c3e29c03Smrg# 9422c3e29c03Smrg# Do we need to explicitly link libc? 9423c3e29c03Smrg# 9424c3e29c03Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9425c3e29c03Smrgx|xyes) 9426c3e29c03Smrg # Assume -lc should be added 9427c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9428c3e29c03Smrg 9429c3e29c03Smrg if test yes,yes = "$GCC,$enable_shared"; then 9430c3e29c03Smrg case $_LT_TAGVAR(archive_cmds, $1) in 9431c3e29c03Smrg *'~'*) 9432c3e29c03Smrg # FIXME: we may have to deal with multi-command sequences. 9433c3e29c03Smrg ;; 9434c3e29c03Smrg '$CC '*) 9435c3e29c03Smrg # Test whether the compiler implicitly links with -lc since on some 9436c3e29c03Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 9437c3e29c03Smrg # to ld, don't add -lc before -lgcc. 9438c3e29c03Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9439c3e29c03Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9440c3e29c03Smrg [$RM conftest* 9441c3e29c03Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9442c3e29c03Smrg 9443c3e29c03Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9444c3e29c03Smrg soname=conftest 9445c3e29c03Smrg lib=conftest 9446c3e29c03Smrg libobjs=conftest.$ac_objext 9447c3e29c03Smrg deplibs= 9448c3e29c03Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9449c3e29c03Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9450c3e29c03Smrg compiler_flags=-v 9451c3e29c03Smrg linker_flags=-v 9452c3e29c03Smrg verstring= 9453c3e29c03Smrg output_objdir=. 9454c3e29c03Smrg libname=conftest 9455c3e29c03Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9456c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 9457c3e29c03Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9458c3e29c03Smrg then 9459c3e29c03Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9460c3e29c03Smrg else 9461c3e29c03Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9462c3e29c03Smrg fi 9463c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 94644e7590efSmrg else 9465c3e29c03Smrg cat conftest.err 1>&5 94664e7590efSmrg fi 9467c3e29c03Smrg $RM conftest* 9468c3e29c03Smrg ]) 9469c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9470c3e29c03Smrg ;; 9471c3e29c03Smrg esac 9472c3e29c03Smrg fi 9473c3e29c03Smrg ;; 9474c3e29c03Smrgesac 9475c3e29c03Smrg 9476c3e29c03Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9477c3e29c03Smrg [Whether or not to add -lc for building shared libraries]) 9478c3e29c03Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9479c3e29c03Smrg [enable_shared_with_static_runtimes], [0], 9480c3e29c03Smrg [Whether or not to disallow shared libs when runtime libs are static]) 9481c3e29c03Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9482c3e29c03Smrg [Compiler flag to allow reflexive dlopens]) 9483c3e29c03Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9484c3e29c03Smrg [Compiler flag to generate shared objects directly from archives]) 9485c3e29c03Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 9486c3e29c03Smrg [Whether the compiler copes with passing no objects directly]) 9487c3e29c03Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9488c3e29c03Smrg [Create an old-style archive from a shared archive]) 9489c3e29c03Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9490c3e29c03Smrg [Create a temporary old-style archive to link instead of a shared archive]) 9491c3e29c03Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9492c3e29c03Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9493c3e29c03Smrg_LT_TAGDECL([], [module_cmds], [2], 9494c3e29c03Smrg [Commands used to build a loadable module if different from building 9495c3e29c03Smrg a shared archive.]) 9496c3e29c03Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 9497c3e29c03Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 9498c3e29c03Smrg [Whether we are building with GNU ld or not]) 9499c3e29c03Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 9500c3e29c03Smrg [Flag that allows shared libraries with undefined symbols to be built]) 9501c3e29c03Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 9502c3e29c03Smrg [Flag that enforces no undefined symbols]) 9503c3e29c03Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9504c3e29c03Smrg [Flag to hardcode $libdir into a binary during linking. 9505c3e29c03Smrg This must work even if $libdir does not exist]) 9506c3e29c03Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9507c3e29c03Smrg [Whether we need a single "-rpath" flag with a separated argument]) 9508c3e29c03Smrg_LT_TAGDECL([], [hardcode_direct], [0], 9509c3e29c03Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9510c3e29c03Smrg DIR into the resulting binary]) 9511c3e29c03Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9512c3e29c03Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9513c3e29c03Smrg DIR into the resulting binary and the resulting library dependency is 9514c3e29c03Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 9515c3e29c03Smrg library is relocated]) 9516c3e29c03Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 9517c3e29c03Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9518c3e29c03Smrg into the resulting binary]) 9519c3e29c03Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9520c3e29c03Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9521c3e29c03Smrg into the resulting binary]) 9522c3e29c03Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 9523c3e29c03Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 9524c3e29c03Smrg into the library and all subsequent libraries and executables linked 9525c3e29c03Smrg against it]) 9526c3e29c03Smrg_LT_TAGDECL([], [inherit_rpath], [0], 9527c3e29c03Smrg [Set to yes if linker adds runtime paths of dependent libraries 9528c3e29c03Smrg to runtime path list]) 9529c3e29c03Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 9530c3e29c03Smrg [Whether libtool must link a program against all its dependency libraries]) 9531c3e29c03Smrg_LT_TAGDECL([], [always_export_symbols], [0], 9532c3e29c03Smrg [Set to "yes" if exported symbols are required]) 9533c3e29c03Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 9534c3e29c03Smrg [The commands to list exported symbols]) 9535c3e29c03Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 9536c3e29c03Smrg [Symbols that should not be listed in the preloaded symbols]) 9537c3e29c03Smrg_LT_TAGDECL([], [include_expsyms], [1], 9538c3e29c03Smrg [Symbols that must always be exported]) 9539c3e29c03Smrg_LT_TAGDECL([], [prelink_cmds], [2], 9540c3e29c03Smrg [Commands necessary for linking programs (against libraries) with templates]) 9541c3e29c03Smrg_LT_TAGDECL([], [postlink_cmds], [2], 9542c3e29c03Smrg [Commands necessary for finishing linking programs]) 9543c3e29c03Smrg_LT_TAGDECL([], [file_list_spec], [1], 9544c3e29c03Smrg [Specify filename containing input files]) 9545c3e29c03Smrgdnl FIXME: Not yet implemented 9546c3e29c03Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9547c3e29c03Smrgdnl [Compiler flag to generate thread safe objects]) 9548c3e29c03Smrg])# _LT_LINKER_SHLIBS 9549c3e29c03Smrg 9550c3e29c03Smrg 9551c3e29c03Smrg# _LT_LANG_C_CONFIG([TAG]) 9552c3e29c03Smrg# ------------------------ 9553c3e29c03Smrg# Ensure that the configuration variables for a C compiler are suitably 9554c3e29c03Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 9555c3e29c03Smrg# the compiler configuration to 'libtool'. 9556c3e29c03Smrgm4_defun([_LT_LANG_C_CONFIG], 9557c3e29c03Smrg[m4_require([_LT_DECL_EGREP])dnl 9558c3e29c03Smrglt_save_CC=$CC 9559c3e29c03SmrgAC_LANG_PUSH(C) 95604e7590efSmrg 9561c3e29c03Smrg# Source file extension for C test sources. 9562c3e29c03Smrgac_ext=c 95634e7590efSmrg 9564c3e29c03Smrg# Object file extension for compiled C test sources. 9565c3e29c03Smrgobjext=o 9566c3e29c03Smrg_LT_TAGVAR(objext, $1)=$objext 95674e7590efSmrg 9568c3e29c03Smrg# Code to be used in simple compile tests 9569c3e29c03Smrglt_simple_compile_test_code="int some_variable = 0;" 95704e7590efSmrg 9571c3e29c03Smrg# Code to be used in simple link tests 9572c3e29c03Smrglt_simple_link_test_code='int main(){return(0);}' 95734e7590efSmrg 9574c3e29c03Smrg_LT_TAG_COMPILER 9575c3e29c03Smrg# Save the default compiler, since it gets overwritten when the other 9576c3e29c03Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9577c3e29c03Smrgcompiler_DEFAULT=$CC 95784e7590efSmrg 9579c3e29c03Smrg# save warnings/boilerplate of simple test code 9580c3e29c03Smrg_LT_COMPILER_BOILERPLATE 9581c3e29c03Smrg_LT_LINKER_BOILERPLATE 95824e7590efSmrg 9583c3e29c03Smrgif test -n "$compiler"; then 9584c3e29c03Smrg _LT_COMPILER_NO_RTTI($1) 9585c3e29c03Smrg _LT_COMPILER_PIC($1) 9586c3e29c03Smrg _LT_COMPILER_C_O($1) 9587c3e29c03Smrg _LT_COMPILER_FILE_LOCKS($1) 9588c3e29c03Smrg _LT_LINKER_SHLIBS($1) 9589c3e29c03Smrg _LT_SYS_DYNAMIC_LINKER($1) 9590c3e29c03Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9591c3e29c03Smrg LT_SYS_DLOPEN_SELF 9592c3e29c03Smrg _LT_CMD_STRIPLIB 95934e7590efSmrg 9594c3e29c03Smrg # Report what library types will actually be built 9595c3e29c03Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9596c3e29c03Smrg AC_MSG_RESULT([$can_build_shared]) 95974e7590efSmrg 9598c3e29c03Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9599c3e29c03Smrg test no = "$can_build_shared" && enable_shared=no 96004e7590efSmrg 9601c3e29c03Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9602c3e29c03Smrg # are all built from PIC. 9603c3e29c03Smrg case $host_os in 9604c3e29c03Smrg aix3*) 9605c3e29c03Smrg test yes = "$enable_shared" && enable_static=no 9606c3e29c03Smrg if test -n "$RANLIB"; then 9607c3e29c03Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9608c3e29c03Smrg postinstall_cmds='$RANLIB $lib' 9609c3e29c03Smrg fi 9610c3e29c03Smrg ;; 96114e7590efSmrg 9612c3e29c03Smrg aix[[4-9]]*) 9613c3e29c03Smrg if test ia64 != "$host_cpu"; then 9614c3e29c03Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9615c3e29c03Smrg yes,aix,yes) ;; # shared object as lib.so file only 9616c3e29c03Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 9617c3e29c03Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 9618c3e29c03Smrg esac 9619c3e29c03Smrg fi 9620c3e29c03Smrg ;; 9621c3e29c03Smrg esac 9622c3e29c03Smrg AC_MSG_RESULT([$enable_shared]) 96234e7590efSmrg 9624c3e29c03Smrg AC_MSG_CHECKING([whether to build static libraries]) 9625c3e29c03Smrg # Make sure either enable_shared or enable_static is yes. 9626c3e29c03Smrg test yes = "$enable_shared" || enable_static=yes 9627c3e29c03Smrg AC_MSG_RESULT([$enable_static]) 96284e7590efSmrg 9629c3e29c03Smrg _LT_CONFIG($1) 9630c3e29c03Smrgfi 9631c3e29c03SmrgAC_LANG_POP 9632c3e29c03SmrgCC=$lt_save_CC 9633c3e29c03Smrg])# _LT_LANG_C_CONFIG 96344e7590efSmrg 96354e7590efSmrg 9636c3e29c03Smrg# _LT_LANG_CXX_CONFIG([TAG]) 9637c3e29c03Smrg# -------------------------- 9638c3e29c03Smrg# Ensure that the configuration variables for a C++ compiler are suitably 9639c3e29c03Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 9640c3e29c03Smrg# the compiler configuration to 'libtool'. 9641c3e29c03Smrgm4_defun([_LT_LANG_CXX_CONFIG], 9642c3e29c03Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9643c3e29c03Smrgm4_require([_LT_DECL_EGREP])dnl 9644c3e29c03Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9645c3e29c03Smrgif test -n "$CXX" && ( test no != "$CXX" && 9646c3e29c03Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9647c3e29c03Smrg (test g++ != "$CXX"))); then 9648c3e29c03Smrg AC_PROG_CXXCPP 96494e7590efSmrgelse 9650c3e29c03Smrg _lt_caught_CXX_error=yes 9651c3e29c03Smrgfi 9652c3e29c03Smrg 9653c3e29c03SmrgAC_LANG_PUSH(C++) 9654c3e29c03Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9655c3e29c03Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9656c3e29c03Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9657c3e29c03Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9658c3e29c03Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 9659c3e29c03Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9660c3e29c03Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9661c3e29c03Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9662c3e29c03Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9663c3e29c03Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9664c3e29c03Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9665c3e29c03Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9666c3e29c03Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9667c3e29c03Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9668c3e29c03Smrg_LT_TAGVAR(module_cmds, $1)= 9669c3e29c03Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9670c3e29c03Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9671c3e29c03Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9672c3e29c03Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9673c3e29c03Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9674c3e29c03Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9675c3e29c03Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9676c3e29c03Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 967726372658Smrg 9678c3e29c03Smrg# Source file extension for C++ test sources. 9679c3e29c03Smrgac_ext=cpp 968026372658Smrg 9681c3e29c03Smrg# Object file extension for compiled C++ test sources. 9682c3e29c03Smrgobjext=o 9683c3e29c03Smrg_LT_TAGVAR(objext, $1)=$objext 9684c3e29c03Smrg 9685c3e29c03Smrg# No sense in running all these tests if we already determined that 9686c3e29c03Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 9687c3e29c03Smrg# are currently assumed to apply to all compilers on this platform, 9688c3e29c03Smrg# and will be corrupted by setting them based on a non-working compiler. 9689c3e29c03Smrgif test yes != "$_lt_caught_CXX_error"; then 9690c3e29c03Smrg # Code to be used in simple compile tests 9691c3e29c03Smrg lt_simple_compile_test_code="int some_variable = 0;" 9692c3e29c03Smrg 9693c3e29c03Smrg # Code to be used in simple link tests 9694c3e29c03Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9695c3e29c03Smrg 9696c3e29c03Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9697c3e29c03Smrg _LT_TAG_COMPILER 9698c3e29c03Smrg 9699c3e29c03Smrg # save warnings/boilerplate of simple test code 9700c3e29c03Smrg _LT_COMPILER_BOILERPLATE 9701c3e29c03Smrg _LT_LINKER_BOILERPLATE 970226372658Smrg 9703c3e29c03Smrg # Allow CC to be a program name with arguments. 9704c3e29c03Smrg lt_save_CC=$CC 9705c3e29c03Smrg lt_save_CFLAGS=$CFLAGS 9706c3e29c03Smrg lt_save_LD=$LD 9707c3e29c03Smrg lt_save_GCC=$GCC 9708c3e29c03Smrg GCC=$GXX 9709c3e29c03Smrg lt_save_with_gnu_ld=$with_gnu_ld 9710c3e29c03Smrg lt_save_path_LD=$lt_cv_path_LD 9711c3e29c03Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9712c3e29c03Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9713c3e29c03Smrg else 9714c3e29c03Smrg $as_unset lt_cv_prog_gnu_ld 9715c3e29c03Smrg fi 9716c3e29c03Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 9717c3e29c03Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 9718c3e29c03Smrg else 9719c3e29c03Smrg $as_unset lt_cv_path_LD 9720c3e29c03Smrg fi 9721c3e29c03Smrg test -z "${LDCXX+set}" || LD=$LDCXX 9722c3e29c03Smrg CC=${CXX-"c++"} 9723c3e29c03Smrg CFLAGS=$CXXFLAGS 9724c3e29c03Smrg compiler=$CC 9725c3e29c03Smrg _LT_TAGVAR(compiler, $1)=$CC 9726c3e29c03Smrg _LT_CC_BASENAME([$compiler]) 972726372658Smrg 9728c3e29c03Smrg if test -n "$compiler"; then 9729c3e29c03Smrg # We don't want -fno-exception when compiling C++ code, so set the 9730c3e29c03Smrg # no_builtin_flag separately 9731c3e29c03Smrg if test yes = "$GXX"; then 9732c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9733c3e29c03Smrg else 9734c3e29c03Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9735c3e29c03Smrg fi 973626372658Smrg 9737c3e29c03Smrg if test yes = "$GXX"; then 9738c3e29c03Smrg # Set up default GNU C++ configuration 973926372658Smrg 9740c3e29c03Smrg LT_PATH_LD 974126372658Smrg 9742c3e29c03Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 9743c3e29c03Smrg # archiving commands below assume that GNU ld is being used. 9744c3e29c03Smrg if test yes = "$with_gnu_ld"; then 9745c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9746c3e29c03Smrg _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' 974726372658Smrg 9748c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9749c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 975026372658Smrg 9751c3e29c03Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 9752c3e29c03Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9753c3e29c03Smrg # investigate it a little bit more. (MM) 9754c3e29c03Smrg wlarc='$wl' 975526372658Smrg 9756c3e29c03Smrg # ancient GNU ld didn't support --whole-archive et. al. 9757c3e29c03Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9758c3e29c03Smrg $GREP 'no-whole-archive' > /dev/null; then 9759c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9760c3e29c03Smrg else 9761c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9762c3e29c03Smrg fi 9763c3e29c03Smrg else 9764c3e29c03Smrg with_gnu_ld=no 9765c3e29c03Smrg wlarc= 97664e7590efSmrg 9767c3e29c03Smrg # A generic and very simple default shared library creation 9768c3e29c03Smrg # command for GNU C++ for the case where it uses the native 9769c3e29c03Smrg # linker, instead of GNU ld. If possible, this setting should 9770c3e29c03Smrg # overridden to take advantage of the native linker features on 9771c3e29c03Smrg # the platform it is being used on. 9772c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9773c3e29c03Smrg fi 97744e7590efSmrg 9775c3e29c03Smrg # Commands to make compiler produce verbose output that lists 9776c3e29c03Smrg # what "hidden" libraries, object files and flags are used when 9777c3e29c03Smrg # linking a shared library. 9778c3e29c03Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 97794e7590efSmrg 9780c3e29c03Smrg else 9781c3e29c03Smrg GXX=no 9782c3e29c03Smrg with_gnu_ld=no 9783c3e29c03Smrg wlarc= 9784c3e29c03Smrg fi 97854e7590efSmrg 9786c3e29c03Smrg # PORTME: fill in a description of your system's C++ link characteristics 9787c3e29c03Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9788c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9789c3e29c03Smrg case $host_os in 9790c3e29c03Smrg aix3*) 9791c3e29c03Smrg # FIXME: insert proper C++ library support 9792c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9793c3e29c03Smrg ;; 9794c3e29c03Smrg aix[[4-9]]*) 9795c3e29c03Smrg if test ia64 = "$host_cpu"; then 9796c3e29c03Smrg # On IA64, the linker does run time linking by default, so we don't 9797c3e29c03Smrg # have to do anything special. 9798c3e29c03Smrg aix_use_runtimelinking=no 9799c3e29c03Smrg exp_sym_flag='-Bexport' 9800c3e29c03Smrg no_entry_flag= 9801c3e29c03Smrg else 9802c3e29c03Smrg aix_use_runtimelinking=no 98034e7590efSmrg 9804c3e29c03Smrg # Test if we are trying to use run time linking or normal 9805c3e29c03Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9806c3e29c03Smrg # have runtime linking enabled, and use it for executables. 9807c3e29c03Smrg # For shared libraries, we enable/disable runtime linking 9808c3e29c03Smrg # depending on the kind of the shared library created - 9809c3e29c03Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 9810c3e29c03Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9811c3e29c03Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 9812c3e29c03Smrg # lib.a static archive 9813c3e29c03Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9814c3e29c03Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 9815c3e29c03Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9816c3e29c03Smrg # lib.a(lib.so.V) shared, rtl:no 9817c3e29c03Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9818c3e29c03Smrg # lib.a static archive 9819c3e29c03Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9820c3e29c03Smrg for ld_flag in $LDFLAGS; do 9821c3e29c03Smrg case $ld_flag in 9822c3e29c03Smrg *-brtl*) 9823c3e29c03Smrg aix_use_runtimelinking=yes 9824c3e29c03Smrg break 9825c3e29c03Smrg ;; 9826c3e29c03Smrg esac 9827c3e29c03Smrg done 9828c3e29c03Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9829c3e29c03Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9830c3e29c03Smrg # so we don't have lib.a shared libs to link our executables. 9831c3e29c03Smrg # We have to force runtime linking in this case. 9832c3e29c03Smrg aix_use_runtimelinking=yes 9833c3e29c03Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9834c3e29c03Smrg fi 9835c3e29c03Smrg ;; 9836c3e29c03Smrg esac 98374e7590efSmrg 9838c3e29c03Smrg exp_sym_flag='-bexport' 9839c3e29c03Smrg no_entry_flag='-bnoentry' 9840c3e29c03Smrg fi 98414e7590efSmrg 9842c3e29c03Smrg # When large executables or shared objects are built, AIX ld can 9843c3e29c03Smrg # have problems creating the table of contents. If linking a library 9844c3e29c03Smrg # or program results in "error TOC overflow" add -mminimal-toc to 9845c3e29c03Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9846c3e29c03Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 98474e7590efSmrg 9848c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='' 9849c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9850c3e29c03Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9851c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9852c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9853c3e29c03Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9854c3e29c03Smrg case $with_aix_soname,$aix_use_runtimelinking in 9855c3e29c03Smrg aix,*) ;; # no import file 9856c3e29c03Smrg svr4,* | *,yes) # use import file 9857c3e29c03Smrg # The Import File defines what to hardcode. 9858c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9859c3e29c03Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9860c3e29c03Smrg ;; 9861c3e29c03Smrg esac 98624e7590efSmrg 9863c3e29c03Smrg if test yes = "$GXX"; then 9864c3e29c03Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9865c3e29c03Smrg # We only want to do this on AIX 4.2 and lower, the check 9866c3e29c03Smrg # below for broken collect2 doesn't work under 4.3+ 9867c3e29c03Smrg collect2name=`$CC -print-prog-name=collect2` 9868c3e29c03Smrg if test -f "$collect2name" && 9869c3e29c03Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9870c3e29c03Smrg then 9871c3e29c03Smrg # We have reworked collect2 9872c3e29c03Smrg : 9873c3e29c03Smrg else 9874c3e29c03Smrg # We have old collect2 9875c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9876c3e29c03Smrg # It fails to find uninstalled libraries when the uninstalled 9877c3e29c03Smrg # path is not listed in the libpath. Setting hardcode_minus_L 9878c3e29c03Smrg # to unsupported forces relinking 9879c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9880c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9881c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9882c3e29c03Smrg fi 9883c3e29c03Smrg esac 9884c3e29c03Smrg shared_flag='-shared' 9885c3e29c03Smrg if test yes = "$aix_use_runtimelinking"; then 9886c3e29c03Smrg shared_flag=$shared_flag' $wl-G' 9887c3e29c03Smrg fi 9888c3e29c03Smrg # Need to ensure runtime linking is disabled for the traditional 9889c3e29c03Smrg # shared library, or the linker may eventually find shared libraries 9890c3e29c03Smrg # /with/ Import File - we do not want to mix them. 9891c3e29c03Smrg shared_flag_aix='-shared' 9892c3e29c03Smrg shared_flag_svr4='-shared $wl-G' 9893c3e29c03Smrg else 9894c3e29c03Smrg # not using gcc 9895c3e29c03Smrg if test ia64 = "$host_cpu"; then 9896c3e29c03Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9897c3e29c03Smrg # chokes on -Wl,-G. The following line is correct: 9898c3e29c03Smrg shared_flag='-G' 9899c3e29c03Smrg else 9900c3e29c03Smrg if test yes = "$aix_use_runtimelinking"; then 9901c3e29c03Smrg shared_flag='$wl-G' 9902c3e29c03Smrg else 9903c3e29c03Smrg shared_flag='$wl-bM:SRE' 9904c3e29c03Smrg fi 9905c3e29c03Smrg shared_flag_aix='$wl-bM:SRE' 9906c3e29c03Smrg shared_flag_svr4='$wl-G' 9907c3e29c03Smrg fi 9908c3e29c03Smrg fi 99094e7590efSmrg 9910c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9911c3e29c03Smrg # It seems that -bexpall does not export symbols beginning with 9912c3e29c03Smrg # underscore (_), so it is better to generate a list of symbols to 9913c3e29c03Smrg # export. 9914c3e29c03Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9915c3e29c03Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9916c3e29c03Smrg # Warning - without using the other runtime loading flags (-brtl), 9917c3e29c03Smrg # -berok will link without error, but may produce a broken library. 9918c3e29c03Smrg # The "-G" linker flag allows undefined symbols. 9919c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 9920c3e29c03Smrg # Determine the default libpath from the value encoded in an empty 9921c3e29c03Smrg # executable. 9922c3e29c03Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9923c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 99244e7590efSmrg 9925c3e29c03Smrg _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 9926c3e29c03Smrg else 9927c3e29c03Smrg if test ia64 = "$host_cpu"; then 9928c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9929c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 9930c3e29c03Smrg _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" 9931c3e29c03Smrg else 9932c3e29c03Smrg # Determine the default libpath from the value encoded in an 9933c3e29c03Smrg # empty executable. 9934c3e29c03Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9935c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9936c3e29c03Smrg # Warning - without using the other run time loading flags, 9937c3e29c03Smrg # -berok will link without error, but may produce a broken library. 9938c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 9939c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 9940c3e29c03Smrg if test yes = "$with_gnu_ld"; then 9941c3e29c03Smrg # We only use this code for GNU lds that support --whole-archive. 9942c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9943c3e29c03Smrg else 9944c3e29c03Smrg # Exported symbols can be pulled into shared objects from archives 9945c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 9946c3e29c03Smrg fi 9947c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9948c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 9949c3e29c03Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 9950c3e29c03Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 9951c3e29c03Smrg if test svr4 != "$with_aix_soname"; then 9952c3e29c03Smrg # This is similar to how AIX traditionally builds its shared 9953c3e29c03Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 9954c3e29c03Smrg _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' 9955c3e29c03Smrg fi 9956c3e29c03Smrg if test aix != "$with_aix_soname"; then 9957c3e29c03Smrg _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' 9958c3e29c03Smrg else 9959c3e29c03Smrg # used by -dlpreopen to get the symbols 9960c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 9961c3e29c03Smrg fi 9962c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 9963c3e29c03Smrg fi 9964c3e29c03Smrg fi 9965c3e29c03Smrg ;; 99664e7590efSmrg 9967c3e29c03Smrg beos*) 9968c3e29c03Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9969c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9970c3e29c03Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 9971c3e29c03Smrg # support --undefined. This deserves some investigation. FIXME 9972c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9973c3e29c03Smrg else 9974c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9975c3e29c03Smrg fi 9976c3e29c03Smrg ;; 99774e7590efSmrg 9978c3e29c03Smrg chorus*) 9979c3e29c03Smrg case $cc_basename in 9980c3e29c03Smrg *) 9981c3e29c03Smrg # FIXME: insert proper C++ library support 9982c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9983c3e29c03Smrg ;; 9984c3e29c03Smrg esac 9985c3e29c03Smrg ;; 9986c3e29c03Smrg 9987c3e29c03Smrg cygwin* | mingw* | pw32* | cegcc*) 9988c3e29c03Smrg case $GXX,$cc_basename in 9989c3e29c03Smrg ,cl* | no,cl* | ,icl* | no,icl*) 9990c3e29c03Smrg # Native MSVC or ICC 9991c3e29c03Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 9992c3e29c03Smrg # no search path for DLLs. 9993c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9994c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9995c3e29c03Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9996c3e29c03Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9997c3e29c03Smrg # Tell ltmain to make .lib files, not .a files. 9998c3e29c03Smrg libext=lib 9999c3e29c03Smrg # Tell ltmain to make .dll files, not .so files. 10000c3e29c03Smrg shrext_cmds=.dll 10001c3e29c03Smrg # FIXME: Setting linknames here is a bad hack. 10002c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10003c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10004c3e29c03Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 10005c3e29c03Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10006c3e29c03Smrg else 10007c3e29c03Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10008c3e29c03Smrg fi~ 10009c3e29c03Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10010c3e29c03Smrg linknames=' 10011c3e29c03Smrg # The linker will not automatically build a static lib if we build a DLL. 10012c3e29c03Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10013c3e29c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10014c3e29c03Smrg # Don't use ranlib 10015c3e29c03Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10016c3e29c03Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10017c3e29c03Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10018c3e29c03Smrg case $lt_outputfile in 10019c3e29c03Smrg *.exe|*.EXE) ;; 10020c3e29c03Smrg *) 10021c3e29c03Smrg lt_outputfile=$lt_outputfile.exe 10022c3e29c03Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 10023c3e29c03Smrg ;; 10024c3e29c03Smrg esac~ 10025c3e29c03Smrg func_to_tool_file "$lt_outputfile"~ 10026c3e29c03Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10027c3e29c03Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10028c3e29c03Smrg $RM "$lt_outputfile.manifest"; 10029c3e29c03Smrg fi' 10030c3e29c03Smrg ;; 10031c3e29c03Smrg *) 10032c3e29c03Smrg # g++ 10033c3e29c03Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10034c3e29c03Smrg # as there is no search path for DLLs. 10035c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10036c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10037c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10038c3e29c03Smrg _LT_TAGVAR(always_export_symbols, $1)=no 10039c3e29c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10040c3e29c03Smrg 10041c3e29c03Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10042c3e29c03Smrg _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' 10043c3e29c03Smrg # If the export-symbols file already is a .def file, use it as 10044c3e29c03Smrg # is; otherwise, prepend EXPORTS... 10045c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10046c3e29c03Smrg cp $export_symbols $output_objdir/$soname.def; 10047c3e29c03Smrg else 10048c3e29c03Smrg echo EXPORTS > $output_objdir/$soname.def; 10049c3e29c03Smrg cat $export_symbols >> $output_objdir/$soname.def; 10050c3e29c03Smrg fi~ 10051c3e29c03Smrg $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' 10052c3e29c03Smrg else 10053c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10054c3e29c03Smrg fi 10055c3e29c03Smrg ;; 10056c3e29c03Smrg esac 10057c3e29c03Smrg ;; 10058c3e29c03Smrg darwin* | rhapsody*) 10059c3e29c03Smrg _LT_DARWIN_LINKER_FEATURES($1) 10060c3e29c03Smrg ;; 100614e7590efSmrg 10062c3e29c03Smrg os2*) 10063c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10064c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10065c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10066c3e29c03Smrg shrext_cmds=.dll 10067c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10068c3e29c03Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10069c3e29c03Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10070c3e29c03Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10071c3e29c03Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10072c3e29c03Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10073c3e29c03Smrg emximp -o $lib $output_objdir/$libname.def' 10074c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10075c3e29c03Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10076c3e29c03Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10077c3e29c03Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10078c3e29c03Smrg prefix_cmds="$SED"~ 10079c3e29c03Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10080c3e29c03Smrg prefix_cmds="$prefix_cmds -e 1d"; 10081c3e29c03Smrg fi~ 10082c3e29c03Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10083c3e29c03Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10084c3e29c03Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10085c3e29c03Smrg emximp -o $lib $output_objdir/$libname.def' 10086c3e29c03Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10087c3e29c03Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10088c3e29c03Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10089c3e29c03Smrg ;; 100904e7590efSmrg 10091c3e29c03Smrg dgux*) 10092c3e29c03Smrg case $cc_basename in 10093c3e29c03Smrg ec++*) 10094c3e29c03Smrg # FIXME: insert proper C++ library support 10095c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10096c3e29c03Smrg ;; 10097c3e29c03Smrg ghcx*) 10098c3e29c03Smrg # Green Hills C++ Compiler 10099c3e29c03Smrg # FIXME: insert proper C++ library support 10100c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10101c3e29c03Smrg ;; 10102c3e29c03Smrg *) 10103c3e29c03Smrg # FIXME: insert proper C++ library support 10104c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10105c3e29c03Smrg ;; 10106c3e29c03Smrg esac 10107c3e29c03Smrg ;; 101084e7590efSmrg 10109c3e29c03Smrg freebsd2.*) 10110c3e29c03Smrg # C++ shared libraries reported to be fairly broken before 10111c3e29c03Smrg # switch to ELF 10112c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10113c3e29c03Smrg ;; 101144e7590efSmrg 10115c3e29c03Smrg freebsd-elf*) 10116c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10117c3e29c03Smrg ;; 101184e7590efSmrg 10119c3e29c03Smrg freebsd* | dragonfly* | midnightbsd*) 10120c3e29c03Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10121c3e29c03Smrg # conventions 10122c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10123c3e29c03Smrg ;; 101244e7590efSmrg 10125c3e29c03Smrg haiku*) 10126c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10127c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10128c3e29c03Smrg ;; 101294e7590efSmrg 10130c3e29c03Smrg hpux9*) 10131c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10132c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10133c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10134c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10135c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10136c3e29c03Smrg # but as the default 10137c3e29c03Smrg # location of the library. 101384e7590efSmrg 10139c3e29c03Smrg case $cc_basename in 10140c3e29c03Smrg CC*) 10141c3e29c03Smrg # FIXME: insert proper C++ library support 10142c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10143c3e29c03Smrg ;; 10144c3e29c03Smrg aCC*) 10145c3e29c03Smrg _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' 10146c3e29c03Smrg # Commands to make compiler produce verbose output that lists 10147c3e29c03Smrg # what "hidden" libraries, object files and flags are used when 10148c3e29c03Smrg # linking a shared library. 10149c3e29c03Smrg # 10150c3e29c03Smrg # There doesn't appear to be a way to prevent this compiler from 10151c3e29c03Smrg # explicitly linking system object files so we need to strip them 10152c3e29c03Smrg # from the output so that they don't get included in the library 10153c3e29c03Smrg # dependencies. 10154c3e29c03Smrg 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"' 10155c3e29c03Smrg ;; 10156c3e29c03Smrg *) 10157c3e29c03Smrg if test yes = "$GXX"; then 10158c3e29c03Smrg _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' 10159c3e29c03Smrg else 10160c3e29c03Smrg # FIXME: insert proper C++ library support 10161c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10162c3e29c03Smrg fi 10163c3e29c03Smrg ;; 10164c3e29c03Smrg esac 10165c3e29c03Smrg ;; 101664e7590efSmrg 10167c3e29c03Smrg hpux10*|hpux11*) 10168c3e29c03Smrg if test no = "$with_gnu_ld"; then 10169c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10170c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 101714e7590efSmrg 10172c3e29c03Smrg case $host_cpu in 10173c3e29c03Smrg hppa*64*|ia64*) 10174c3e29c03Smrg ;; 10175c3e29c03Smrg *) 10176c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10177c3e29c03Smrg ;; 10178c3e29c03Smrg esac 10179c3e29c03Smrg fi 10180c3e29c03Smrg case $host_cpu in 10181c3e29c03Smrg hppa*64*|ia64*) 10182c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10183c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10184c3e29c03Smrg ;; 10185c3e29c03Smrg *) 10186c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10187c3e29c03Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10188c3e29c03Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10189c3e29c03Smrg # but as the default 10190c3e29c03Smrg # location of the library. 10191c3e29c03Smrg ;; 10192c3e29c03Smrg esac 101934e7590efSmrg 10194c3e29c03Smrg case $cc_basename in 10195c3e29c03Smrg CC*) 10196c3e29c03Smrg # FIXME: insert proper C++ library support 10197c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10198c3e29c03Smrg ;; 10199c3e29c03Smrg aCC*) 10200c3e29c03Smrg case $host_cpu in 10201c3e29c03Smrg hppa*64*) 10202c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10203c3e29c03Smrg ;; 10204c3e29c03Smrg ia64*) 10205c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10206c3e29c03Smrg ;; 10207c3e29c03Smrg *) 10208c3e29c03Smrg _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' 10209c3e29c03Smrg ;; 10210c3e29c03Smrg esac 10211c3e29c03Smrg # Commands to make compiler produce verbose output that lists 10212c3e29c03Smrg # what "hidden" libraries, object files and flags are used when 10213c3e29c03Smrg # linking a shared library. 10214c3e29c03Smrg # 10215c3e29c03Smrg # There doesn't appear to be a way to prevent this compiler from 10216c3e29c03Smrg # explicitly linking system object files so we need to strip them 10217c3e29c03Smrg # from the output so that they don't get included in the library 10218c3e29c03Smrg # dependencies. 10219c3e29c03Smrg 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"' 10220c3e29c03Smrg ;; 10221c3e29c03Smrg *) 10222c3e29c03Smrg if test yes = "$GXX"; then 10223c3e29c03Smrg if test no = "$with_gnu_ld"; then 10224c3e29c03Smrg case $host_cpu in 10225c3e29c03Smrg hppa*64*) 10226c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10227c3e29c03Smrg ;; 10228c3e29c03Smrg ia64*) 10229c3e29c03Smrg _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' 10230c3e29c03Smrg ;; 10231c3e29c03Smrg *) 10232c3e29c03Smrg _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' 10233c3e29c03Smrg ;; 10234c3e29c03Smrg esac 10235c3e29c03Smrg fi 10236c3e29c03Smrg else 10237c3e29c03Smrg # FIXME: insert proper C++ library support 10238c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10239c3e29c03Smrg fi 10240c3e29c03Smrg ;; 10241c3e29c03Smrg esac 10242c3e29c03Smrg ;; 102434e7590efSmrg 10244c3e29c03Smrg interix[[3-9]]*) 10245c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10246c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10247c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10248c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10249c3e29c03Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10250c3e29c03Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10251c3e29c03Smrg # default) and relocated if they conflict, which is a slow very memory 10252c3e29c03Smrg # consuming and fragmenting process. To avoid this, we pick a random, 10253c3e29c03Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10254c3e29c03Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10255c3e29c03Smrg _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' 10256c3e29c03Smrg _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' 10257c3e29c03Smrg ;; 10258c3e29c03Smrg irix5* | irix6*) 10259c3e29c03Smrg case $cc_basename in 10260c3e29c03Smrg CC*) 10261c3e29c03Smrg # SGI C++ 10262c3e29c03Smrg _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' 102634e7590efSmrg 10264c3e29c03Smrg # Archives containing C++ object files must be created using 10265c3e29c03Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10266c3e29c03Smrg # necessary to make sure instantiated templates are included 10267c3e29c03Smrg # in the archive. 10268c3e29c03Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10269c3e29c03Smrg ;; 10270c3e29c03Smrg *) 10271c3e29c03Smrg if test yes = "$GXX"; then 10272c3e29c03Smrg if test no = "$with_gnu_ld"; then 10273c3e29c03Smrg _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' 10274c3e29c03Smrg else 10275c3e29c03Smrg _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' 10276c3e29c03Smrg fi 10277c3e29c03Smrg fi 10278c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10279c3e29c03Smrg ;; 10280c3e29c03Smrg esac 10281c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10282c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10283c3e29c03Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 10284c3e29c03Smrg ;; 102854e7590efSmrg 10286c3e29c03Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10287c3e29c03Smrg case $cc_basename in 10288c3e29c03Smrg KCC*) 10289c3e29c03Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 102904e7590efSmrg 10291c3e29c03Smrg # KCC will only create a shared library if the output file 10292c3e29c03Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10293c3e29c03Smrg # to its proper name (with version) after linking. 10294c3e29c03Smrg _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' 10295c3e29c03Smrg _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' 10296c3e29c03Smrg # Commands to make compiler produce verbose output that lists 10297c3e29c03Smrg # what "hidden" libraries, object files and flags are used when 10298c3e29c03Smrg # linking a shared library. 10299c3e29c03Smrg # 10300c3e29c03Smrg # There doesn't appear to be a way to prevent this compiler from 10301c3e29c03Smrg # explicitly linking system object files so we need to strip them 10302c3e29c03Smrg # from the output so that they don't get included in the library 10303c3e29c03Smrg # dependencies. 10304c3e29c03Smrg 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"' 103054e7590efSmrg 10306c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10307c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 103084e7590efSmrg 10309c3e29c03Smrg # Archives containing C++ object files must be created using 10310c3e29c03Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10311c3e29c03Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10312c3e29c03Smrg ;; 10313c3e29c03Smrg icpc* | ecpc* ) 10314c3e29c03Smrg # Intel C++ 10315c3e29c03Smrg with_gnu_ld=yes 10316c3e29c03Smrg # version 8.0 and above of icpc choke on multiply defined symbols 10317c3e29c03Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10318c3e29c03Smrg # earlier do not add the objects themselves. 10319c3e29c03Smrg case `$CC -V 2>&1` in 10320c3e29c03Smrg *"Version 7."*) 10321c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10322c3e29c03Smrg _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' 10323c3e29c03Smrg ;; 10324c3e29c03Smrg *) # Version 8.0 or newer 10325c3e29c03Smrg tmp_idyn= 10326c3e29c03Smrg case $host_cpu in 10327c3e29c03Smrg ia64*) tmp_idyn=' -i_dynamic';; 10328c3e29c03Smrg esac 10329c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10330c3e29c03Smrg _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' 10331c3e29c03Smrg ;; 10332c3e29c03Smrg esac 10333c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10334c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10335c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10336c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10337c3e29c03Smrg ;; 10338c3e29c03Smrg pgCC* | pgcpp*) 10339c3e29c03Smrg # Portland Group C++ compiler 10340c3e29c03Smrg case `$CC -V` in 10341c3e29c03Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10342c3e29c03Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10343c3e29c03Smrg rm -rf $tpldir~ 10344c3e29c03Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10345c3e29c03Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10346c3e29c03Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10347c3e29c03Smrg rm -rf $tpldir~ 10348c3e29c03Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10349c3e29c03Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10350c3e29c03Smrg $RANLIB $oldlib' 10351c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10352c3e29c03Smrg rm -rf $tpldir~ 10353c3e29c03Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10354c3e29c03Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10355c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10356c3e29c03Smrg rm -rf $tpldir~ 10357c3e29c03Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10358c3e29c03Smrg $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' 10359c3e29c03Smrg ;; 10360c3e29c03Smrg *) # Version 6 and above use weak symbols 10361c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10362c3e29c03Smrg _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' 10363c3e29c03Smrg ;; 10364c3e29c03Smrg esac 103654e7590efSmrg 10366c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10367c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10368c3e29c03Smrg _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' 10369c3e29c03Smrg ;; 10370c3e29c03Smrg cxx*) 10371c3e29c03Smrg # Compaq C++ 10372c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10373c3e29c03Smrg _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' 103744e7590efSmrg 10375c3e29c03Smrg runpath_var=LD_RUN_PATH 10376c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10377c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 103784e7590efSmrg 10379c3e29c03Smrg # Commands to make compiler produce verbose output that lists 10380c3e29c03Smrg # what "hidden" libraries, object files and flags are used when 10381c3e29c03Smrg # linking a shared library. 10382c3e29c03Smrg # 10383c3e29c03Smrg # There doesn't appear to be a way to prevent this compiler from 10384c3e29c03Smrg # explicitly linking system object files so we need to strip them 10385c3e29c03Smrg # from the output so that they don't get included in the library 10386c3e29c03Smrg # dependencies. 10387c3e29c03Smrg 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' 10388c3e29c03Smrg ;; 10389c3e29c03Smrg xl* | mpixl* | bgxl*) 10390c3e29c03Smrg # IBM XL 8.0 on PPC, with GNU ld 10391c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10392c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10393c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10394c3e29c03Smrg if test yes = "$supports_anon_versioning"; then 10395c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10396c3e29c03Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10397c3e29c03Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 10398c3e29c03Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10399c3e29c03Smrg fi 10400c3e29c03Smrg ;; 10401c3e29c03Smrg *) 10402c3e29c03Smrg case `$CC -V 2>&1 | $SED 5q` in 10403c3e29c03Smrg *Sun\ C*) 10404c3e29c03Smrg # Sun C++ 5.9 10405c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10406c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10407c3e29c03Smrg _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' 10408c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10409c3e29c03Smrg _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' 10410c3e29c03Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 104114e7590efSmrg 10412c3e29c03Smrg # Not sure whether something based on 10413c3e29c03Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10414c3e29c03Smrg # would be better. 10415c3e29c03Smrg output_verbose_link_cmd='func_echo_all' 104164e7590efSmrg 10417c3e29c03Smrg # Archives containing C++ object files must be created using 10418c3e29c03Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10419c3e29c03Smrg # necessary to make sure instantiated templates are included 10420c3e29c03Smrg # in the archive. 10421c3e29c03Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10422c3e29c03Smrg ;; 10423c3e29c03Smrg esac 10424c3e29c03Smrg ;; 10425c3e29c03Smrg esac 10426c3e29c03Smrg ;; 104274e7590efSmrg 10428c3e29c03Smrg lynxos*) 10429c3e29c03Smrg # FIXME: insert proper C++ library support 10430c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10431c3e29c03Smrg ;; 104324e7590efSmrg 10433c3e29c03Smrg m88k*) 10434c3e29c03Smrg # FIXME: insert proper C++ library support 10435c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10436c3e29c03Smrg ;; 104374e7590efSmrg 10438c3e29c03Smrg mvs*) 10439c3e29c03Smrg case $cc_basename in 10440c3e29c03Smrg cxx*) 10441c3e29c03Smrg # FIXME: insert proper C++ library support 10442c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10443c3e29c03Smrg ;; 10444c3e29c03Smrg *) 10445c3e29c03Smrg # FIXME: insert proper C++ library support 10446c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10447c3e29c03Smrg ;; 10448c3e29c03Smrg esac 10449c3e29c03Smrg ;; 104504e7590efSmrg 10451c3e29c03Smrg netbsd*) 10452c3e29c03Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10453c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10454c3e29c03Smrg wlarc= 10455c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10456c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10457c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10458c3e29c03Smrg fi 10459c3e29c03Smrg # Workaround some broken pre-1.5 toolchains 10460c3e29c03Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10461c3e29c03Smrg ;; 104624e7590efSmrg 10463c3e29c03Smrg *nto* | *qnx*) 10464c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10465c3e29c03Smrg ;; 104664e7590efSmrg 10467c3e29c03Smrg openbsd* | bitrig*) 10468c3e29c03Smrg if test -f /usr/libexec/ld.so; then 10469c3e29c03Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10470c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10471c3e29c03Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10472c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10473c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10474c3e29c03Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10475c3e29c03Smrg _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' 10476c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10477c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10478c3e29c03Smrg fi 10479c3e29c03Smrg output_verbose_link_cmd=func_echo_all 10480c3e29c03Smrg else 10481c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10482c3e29c03Smrg fi 10483c3e29c03Smrg ;; 104844e7590efSmrg 10485c3e29c03Smrg osf3* | osf4* | osf5*) 10486c3e29c03Smrg case $cc_basename in 10487c3e29c03Smrg KCC*) 10488c3e29c03Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 104894e7590efSmrg 10490c3e29c03Smrg # KCC will only create a shared library if the output file 10491c3e29c03Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10492c3e29c03Smrg # to its proper name (with version) after linking. 10493c3e29c03Smrg _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' 104944e7590efSmrg 10495c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10496c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 104974e7590efSmrg 10498c3e29c03Smrg # Archives containing C++ object files must be created using 10499c3e29c03Smrg # the KAI C++ compiler. 10500c3e29c03Smrg case $host in 10501c3e29c03Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10502c3e29c03Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10503c3e29c03Smrg esac 10504c3e29c03Smrg ;; 10505c3e29c03Smrg RCC*) 10506c3e29c03Smrg # Rational C++ 2.4.1 10507c3e29c03Smrg # FIXME: insert proper C++ library support 10508c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10509c3e29c03Smrg ;; 10510c3e29c03Smrg cxx*) 10511c3e29c03Smrg case $host in 10512c3e29c03Smrg osf3*) 10513c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10514c3e29c03Smrg _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' 10515c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10516c3e29c03Smrg ;; 10517c3e29c03Smrg *) 10518c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10519c3e29c03Smrg _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' 10520c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10521c3e29c03Smrg echo "-hidden">> $lib.exp~ 10522c3e29c03Smrg $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~ 10523c3e29c03Smrg $RM $lib.exp' 10524c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10525c3e29c03Smrg ;; 10526c3e29c03Smrg esac 105274e7590efSmrg 10528c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105294e7590efSmrg 10530c3e29c03Smrg # Commands to make compiler produce verbose output that lists 10531c3e29c03Smrg # what "hidden" libraries, object files and flags are used when 10532c3e29c03Smrg # linking a shared library. 10533c3e29c03Smrg # 10534c3e29c03Smrg # There doesn't appear to be a way to prevent this compiler from 10535c3e29c03Smrg # explicitly linking system object files so we need to strip them 10536c3e29c03Smrg # from the output so that they don't get included in the library 10537c3e29c03Smrg # dependencies. 10538c3e29c03Smrg 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"' 10539c3e29c03Smrg ;; 10540c3e29c03Smrg *) 10541c3e29c03Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 10542c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10543c3e29c03Smrg case $host in 10544c3e29c03Smrg osf3*) 10545c3e29c03Smrg _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' 10546c3e29c03Smrg ;; 10547c3e29c03Smrg *) 10548c3e29c03Smrg _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' 10549c3e29c03Smrg ;; 10550c3e29c03Smrg esac 105514e7590efSmrg 10552c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10553c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105544e7590efSmrg 10555c3e29c03Smrg # Commands to make compiler produce verbose output that lists 10556c3e29c03Smrg # what "hidden" libraries, object files and flags are used when 10557c3e29c03Smrg # linking a shared library. 10558c3e29c03Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 105594e7590efSmrg 10560c3e29c03Smrg else 10561c3e29c03Smrg # FIXME: insert proper C++ library support 10562c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10563c3e29c03Smrg fi 10564c3e29c03Smrg ;; 10565c3e29c03Smrg esac 10566c3e29c03Smrg ;; 105674e7590efSmrg 10568c3e29c03Smrg psos*) 10569c3e29c03Smrg # FIXME: insert proper C++ library support 10570c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10571c3e29c03Smrg ;; 105724e7590efSmrg 10573c3e29c03Smrg sunos4*) 10574c3e29c03Smrg case $cc_basename in 10575c3e29c03Smrg CC*) 10576c3e29c03Smrg # Sun C++ 4.x 10577c3e29c03Smrg # FIXME: insert proper C++ library support 10578c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10579c3e29c03Smrg ;; 10580c3e29c03Smrg lcc*) 10581c3e29c03Smrg # Lucid 10582c3e29c03Smrg # FIXME: insert proper C++ library support 10583c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10584c3e29c03Smrg ;; 10585c3e29c03Smrg *) 10586c3e29c03Smrg # FIXME: insert proper C++ library support 10587c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10588c3e29c03Smrg ;; 10589c3e29c03Smrg esac 10590c3e29c03Smrg ;; 105914e7590efSmrg 10592c3e29c03Smrg solaris*) 10593c3e29c03Smrg case $cc_basename in 10594c3e29c03Smrg CC* | sunCC*) 10595c3e29c03Smrg # Sun C++ 4.2, 5.x and Centerline C++ 10596c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10597c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10598c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10599c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10600c3e29c03Smrg $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' 106014e7590efSmrg 10602c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10603c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10604c3e29c03Smrg case $host_os in 10605c3e29c03Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10606c3e29c03Smrg *) 10607c3e29c03Smrg # The compiler driver will combine and reorder linker options, 10608c3e29c03Smrg # but understands '-z linker_flag'. 10609c3e29c03Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10610c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10611c3e29c03Smrg ;; 10612c3e29c03Smrg esac 10613c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 106144e7590efSmrg 10615c3e29c03Smrg output_verbose_link_cmd='func_echo_all' 10616c3e29c03Smrg 10617c3e29c03Smrg # Archives containing C++ object files must be created using 10618c3e29c03Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10619c3e29c03Smrg # necessary to make sure instantiated templates are included 10620c3e29c03Smrg # in the archive. 10621c3e29c03Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10622c3e29c03Smrg ;; 10623c3e29c03Smrg gcx*) 10624c3e29c03Smrg # Green Hills C++ Compiler 10625c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 1062626372658Smrg 10627c3e29c03Smrg # The C++ compiler must be used to create the archive. 10628c3e29c03Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10629c3e29c03Smrg ;; 10630c3e29c03Smrg *) 10631c3e29c03Smrg # GNU C++ compiler with Solaris linker 10632c3e29c03Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 10633c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10634c3e29c03Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10635c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10636c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10637c3e29c03Smrg $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' 1063826372658Smrg 10639c3e29c03Smrg # Commands to make compiler produce verbose output that lists 10640c3e29c03Smrg # what "hidden" libraries, object files and flags are used when 10641c3e29c03Smrg # linking a shared library. 10642c3e29c03Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10643c3e29c03Smrg else 10644c3e29c03Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 10645c3e29c03Smrg # platform. 10646c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10647c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10648c3e29c03Smrg $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' 106494e7590efSmrg 10650c3e29c03Smrg # Commands to make compiler produce verbose output that lists 10651c3e29c03Smrg # what "hidden" libraries, object files and flags are used when 10652c3e29c03Smrg # linking a shared library. 10653c3e29c03Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10654c3e29c03Smrg fi 106554e7590efSmrg 10656c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10657c3e29c03Smrg case $host_os in 10658c3e29c03Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10659c3e29c03Smrg *) 10660c3e29c03Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10661c3e29c03Smrg ;; 10662c3e29c03Smrg esac 10663c3e29c03Smrg fi 10664c3e29c03Smrg ;; 10665c3e29c03Smrg esac 10666c3e29c03Smrg ;; 106674e7590efSmrg 10668c3e29c03Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10669c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10670c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10671c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10672c3e29c03Smrg runpath_var='LD_RUN_PATH' 106734e7590efSmrg 10674c3e29c03Smrg case $cc_basename in 10675c3e29c03Smrg CC*) 10676c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10677c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10678c3e29c03Smrg ;; 10679c3e29c03Smrg *) 10680c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10681c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10682c3e29c03Smrg ;; 10683c3e29c03Smrg esac 10684c3e29c03Smrg ;; 106854e7590efSmrg 10686c3e29c03Smrg sysv5* | sco3.2v5* | sco5v6*) 10687c3e29c03Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 10688c3e29c03Smrg # link with -lc, and that would cause any symbols used from libc to 10689c3e29c03Smrg # always be unresolved, which means just about no library would 10690c3e29c03Smrg # ever link correctly. If we're not using GNU ld we use -z text 10691c3e29c03Smrg # though, which does catch some bad symbols but isn't as heavy-handed 10692c3e29c03Smrg # as -z defs. 10693c3e29c03Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10694c3e29c03Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10695c3e29c03Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10696c3e29c03Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10697c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10698c3e29c03Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10699c3e29c03Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10700c3e29c03Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10701c3e29c03Smrg runpath_var='LD_RUN_PATH' 107024e7590efSmrg 10703c3e29c03Smrg case $cc_basename in 10704c3e29c03Smrg CC*) 10705c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10706c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10707c3e29c03Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10708c3e29c03Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 10709c3e29c03Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10710c3e29c03Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 10711c3e29c03Smrg ;; 10712c3e29c03Smrg *) 10713c3e29c03Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10714c3e29c03Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10715c3e29c03Smrg ;; 10716c3e29c03Smrg esac 10717c3e29c03Smrg ;; 10718c3e29c03Smrg 10719c3e29c03Smrg tandem*) 10720c3e29c03Smrg case $cc_basename in 10721c3e29c03Smrg NCC*) 10722c3e29c03Smrg # NonStop-UX NCC 3.20 10723c3e29c03Smrg # FIXME: insert proper C++ library support 10724c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10725c3e29c03Smrg ;; 10726c3e29c03Smrg *) 10727c3e29c03Smrg # FIXME: insert proper C++ library support 10728c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10729c3e29c03Smrg ;; 10730c3e29c03Smrg esac 10731c3e29c03Smrg ;; 10732c3e29c03Smrg 10733c3e29c03Smrg vxworks*) 10734c3e29c03Smrg # FIXME: insert proper C++ library support 10735c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10736c3e29c03Smrg ;; 10737c3e29c03Smrg 10738c3e29c03Smrg *) 10739c3e29c03Smrg # FIXME: insert proper C++ library support 10740c3e29c03Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10741c3e29c03Smrg ;; 10742c3e29c03Smrg esac 107434e7590efSmrg 10744c3e29c03Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10745c3e29c03Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 107464b0ead49Smrg 10747c3e29c03Smrg _LT_TAGVAR(GCC, $1)=$GXX 10748c3e29c03Smrg _LT_TAGVAR(LD, $1)=$LD 107494b0ead49Smrg 10750c3e29c03Smrg ## CAVEAT EMPTOR: 10751c3e29c03Smrg ## There is no encapsulation within the following macros, do not change 10752c3e29c03Smrg ## the running order or otherwise move them around unless you know exactly 10753c3e29c03Smrg ## what you are doing... 10754c3e29c03Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 10755c3e29c03Smrg _LT_COMPILER_PIC($1) 10756c3e29c03Smrg _LT_COMPILER_C_O($1) 10757c3e29c03Smrg _LT_COMPILER_FILE_LOCKS($1) 10758c3e29c03Smrg _LT_LINKER_SHLIBS($1) 10759c3e29c03Smrg _LT_SYS_DYNAMIC_LINKER($1) 10760c3e29c03Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 1076126372658Smrg 10762c3e29c03Smrg _LT_CONFIG($1) 10763c3e29c03Smrg fi # test -n "$compiler" 1076426372658Smrg 10765c3e29c03Smrg CC=$lt_save_CC 10766c3e29c03Smrg CFLAGS=$lt_save_CFLAGS 10767c3e29c03Smrg LDCXX=$LD 10768c3e29c03Smrg LD=$lt_save_LD 10769c3e29c03Smrg GCC=$lt_save_GCC 10770c3e29c03Smrg with_gnu_ld=$lt_save_with_gnu_ld 10771c3e29c03Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 10772c3e29c03Smrg lt_cv_path_LD=$lt_save_path_LD 10773c3e29c03Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10774c3e29c03Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10775c3e29c03Smrgfi # test yes != "$_lt_caught_CXX_error" 107764b0ead49Smrg 10777c3e29c03SmrgAC_LANG_POP 10778c3e29c03Smrg])# _LT_LANG_CXX_CONFIG 1077949dc963fSmrg 10780c3e29c03Smrg 10781c3e29c03Smrg# _LT_FUNC_STRIPNAME_CNF 10782c3e29c03Smrg# ---------------------- 10783c3e29c03Smrg# func_stripname_cnf prefix suffix name 10784c3e29c03Smrg# strip PREFIX and SUFFIX off of NAME. 10785c3e29c03Smrg# PREFIX and SUFFIX must not contain globbing or regex special 10786c3e29c03Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 10787c3e29c03Smrg# dot (in which case that matches only a dot). 107884e7590efSmrg# 10789c3e29c03Smrg# This function is identical to the (non-XSI) version of func_stripname, 10790c3e29c03Smrg# except this one can be used by m4 code that may be executed by configure, 10791c3e29c03Smrg# rather than the libtool script. 10792c3e29c03Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10793c3e29c03SmrgAC_REQUIRE([_LT_DECL_SED]) 10794c3e29c03SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10795c3e29c03Smrgfunc_stripname_cnf () 10796c3e29c03Smrg{ 10797c3e29c03Smrg case @S|@2 in 10798c3e29c03Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10799c3e29c03Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10800c3e29c03Smrg esac 10801c3e29c03Smrg} # func_stripname_cnf 10802c3e29c03Smrg])# _LT_FUNC_STRIPNAME_CNF 10803c3e29c03Smrg 10804c3e29c03Smrg 10805c3e29c03Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10806c3e29c03Smrg# --------------------------------- 10807c3e29c03Smrg# Figure out "hidden" library dependencies from verbose 10808c3e29c03Smrg# compiler output when linking a shared library. 10809c3e29c03Smrg# Parse the compiler output and extract the necessary 10810c3e29c03Smrg# objects, libraries and library flags. 10811c3e29c03Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10812c3e29c03Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10813c3e29c03SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10814c3e29c03Smrg# Dependencies to place before and after the object being linked: 10815c3e29c03Smrg_LT_TAGVAR(predep_objects, $1)= 10816c3e29c03Smrg_LT_TAGVAR(postdep_objects, $1)= 10817c3e29c03Smrg_LT_TAGVAR(predeps, $1)= 10818c3e29c03Smrg_LT_TAGVAR(postdeps, $1)= 10819c3e29c03Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 10820c3e29c03Smrg 10821c3e29c03Smrgdnl we can't use the lt_simple_compile_test_code here, 10822c3e29c03Smrgdnl because it contains code intended for an executable, 10823c3e29c03Smrgdnl not a library. It's possible we should let each 10824c3e29c03Smrgdnl tag define a new lt_????_link_test_code variable, 10825c3e29c03Smrgdnl but it's only used here... 10826c3e29c03Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10827c3e29c03Smrgint a; 10828c3e29c03Smrgvoid foo (void) { a = 0; } 10829c3e29c03Smrg_LT_EOF 10830c3e29c03Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10831c3e29c03Smrgclass Foo 10832c3e29c03Smrg{ 10833c3e29c03Smrgpublic: 10834c3e29c03Smrg Foo (void) { a = 0; } 10835c3e29c03Smrgprivate: 10836c3e29c03Smrg int a; 10837c3e29c03Smrg}; 10838c3e29c03Smrg_LT_EOF 10839c3e29c03Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10840c3e29c03Smrg subroutine foo 10841c3e29c03Smrg implicit none 10842c3e29c03Smrg integer*4 a 10843c3e29c03Smrg a=0 10844c3e29c03Smrg return 10845c3e29c03Smrg end 10846c3e29c03Smrg_LT_EOF 10847c3e29c03Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10848c3e29c03Smrg subroutine foo 10849c3e29c03Smrg implicit none 10850c3e29c03Smrg integer a 10851c3e29c03Smrg a=0 10852c3e29c03Smrg return 10853c3e29c03Smrg end 10854c3e29c03Smrg_LT_EOF 10855c3e29c03Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10856c3e29c03Smrgpublic class foo { 10857c3e29c03Smrg private int a; 10858c3e29c03Smrg public void bar (void) { 10859c3e29c03Smrg a = 0; 10860c3e29c03Smrg } 10861c3e29c03Smrg}; 10862c3e29c03Smrg_LT_EOF 10863c3e29c03Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10864c3e29c03Smrgpackage foo 10865c3e29c03Smrgfunc foo() { 10866c3e29c03Smrg} 10867c3e29c03Smrg_LT_EOF 10868c3e29c03Smrg]) 1086949dc963fSmrg 10870c3e29c03Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 10871c3e29c03Smrgcase "$CC $CFLAGS " in #( 10872c3e29c03Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10873c3e29c03Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10874c3e29c03Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 10875c3e29c03Smrgesac 108764b0ead49Smrg 10877c3e29c03Smrgdnl Parse the compiler output and extract the necessary 10878c3e29c03Smrgdnl objects, libraries and library flags. 10879c3e29c03Smrgif AC_TRY_EVAL(ac_compile); then 10880c3e29c03Smrg # Parse the compiler output and extract the necessary 10881c3e29c03Smrg # objects, libraries and library flags. 108824b0ead49Smrg 10883c3e29c03Smrg # Sentinel used to keep track of whether or not we are before 10884c3e29c03Smrg # the conftest object file. 10885c3e29c03Smrg pre_test_object_deps_done=no 108864e7590efSmrg 10887c3e29c03Smrg for p in `eval "$output_verbose_link_cmd"`; do 10888c3e29c03Smrg case $prev$p in 108894e7590efSmrg 10890c3e29c03Smrg -L* | -R* | -l*) 10891c3e29c03Smrg # Some compilers place space between "-{L,R}" and the path. 10892c3e29c03Smrg # Remove the space. 10893c3e29c03Smrg if test x-L = "$p" || 10894c3e29c03Smrg test x-R = "$p"; then 10895c3e29c03Smrg prev=$p 10896c3e29c03Smrg continue 10897c3e29c03Smrg fi 1089826372658Smrg 10899c3e29c03Smrg # Expand the sysroot to ease extracting the directories later. 10900c3e29c03Smrg if test -z "$prev"; then 10901c3e29c03Smrg case $p in 10902c3e29c03Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 10903c3e29c03Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 10904c3e29c03Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 10905c3e29c03Smrg esac 10906c3e29c03Smrg fi 10907c3e29c03Smrg case $p in 10908c3e29c03Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 10909c3e29c03Smrg esac 10910c3e29c03Smrg if test no = "$pre_test_object_deps_done"; then 10911c3e29c03Smrg case $prev in 10912c3e29c03Smrg -L | -R) 10913c3e29c03Smrg # Internal compiler library paths should come after those 10914c3e29c03Smrg # provided the user. The postdeps already come after the 10915c3e29c03Smrg # user supplied libs so there is no need to process them. 10916c3e29c03Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 10917c3e29c03Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 10918c3e29c03Smrg else 10919c3e29c03Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 10920c3e29c03Smrg fi 10921c3e29c03Smrg ;; 10922c3e29c03Smrg # The "-l" case would never come before the object being 10923c3e29c03Smrg # linked, so don't bother handling this case. 10924c3e29c03Smrg esac 10925c3e29c03Smrg else 10926c3e29c03Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 10927c3e29c03Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 10928c3e29c03Smrg else 10929c3e29c03Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 10930c3e29c03Smrg fi 10931c3e29c03Smrg fi 10932c3e29c03Smrg prev= 10933c3e29c03Smrg ;; 10934c3e29c03Smrg 10935c3e29c03Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 10936c3e29c03Smrg *.$objext) 10937c3e29c03Smrg # This assumes that the test object file only shows up 10938c3e29c03Smrg # once in the compiler output. 10939c3e29c03Smrg if test "$p" = "conftest.$objext"; then 10940c3e29c03Smrg pre_test_object_deps_done=yes 10941c3e29c03Smrg continue 10942c3e29c03Smrg fi 10943c3e29c03Smrg 10944c3e29c03Smrg if test no = "$pre_test_object_deps_done"; then 10945c3e29c03Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 10946c3e29c03Smrg _LT_TAGVAR(predep_objects, $1)=$p 10947c3e29c03Smrg else 10948c3e29c03Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 10949c3e29c03Smrg fi 10950c3e29c03Smrg else 10951c3e29c03Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 10952c3e29c03Smrg _LT_TAGVAR(postdep_objects, $1)=$p 10953c3e29c03Smrg else 10954c3e29c03Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 10955c3e29c03Smrg fi 10956c3e29c03Smrg fi 10957c3e29c03Smrg ;; 1095826372658Smrg 10959c3e29c03Smrg *) ;; # Ignore the rest. 1096026372658Smrg 10961c3e29c03Smrg esac 10962c3e29c03Smrg done 1096326372658Smrg 10964c3e29c03Smrg # Clean up. 10965c3e29c03Smrg rm -f a.out a.exe 10966c3e29c03Smrgelse 10967c3e29c03Smrg echo "libtool.m4: error: problem compiling $1 test program" 1096826372658Smrgfi 1096926372658Smrg 10970c3e29c03Smrg$RM -f confest.$objext 10971c3e29c03SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 1097226372658Smrg 10973c3e29c03Smrg# PORTME: override above test on systems where it is broken 10974c3e29c03Smrgm4_if([$1], [CXX], 10975c3e29c03Smrg[case $host_os in 10976c3e29c03Smrginterix[[3-9]]*) 10977c3e29c03Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 10978c3e29c03Smrg # hack all around it, let's just trust "g++" to DTRT. 10979c3e29c03Smrg _LT_TAGVAR(predep_objects,$1)= 10980c3e29c03Smrg _LT_TAGVAR(postdep_objects,$1)= 10981c3e29c03Smrg _LT_TAGVAR(postdeps,$1)= 10982c3e29c03Smrg ;; 10983c3e29c03Smrgesac 10984c3e29c03Smrg]) 10985c3e29c03Smrg 10986c3e29c03Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 10987c3e29c03Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 10988c3e29c03Smrgesac 10989c3e29c03Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 10990c3e29c03Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 10991c3e29c03Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 1099226372658Smrgfi 10993c3e29c03Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 10994c3e29c03Smrg [The directories searched by this compiler when creating a shared library]) 10995c3e29c03Smrg_LT_TAGDECL([], [predep_objects], [1], 10996c3e29c03Smrg [Dependencies to place before and after the objects being linked to 10997c3e29c03Smrg create a shared library]) 10998c3e29c03Smrg_LT_TAGDECL([], [postdep_objects], [1]) 10999c3e29c03Smrg_LT_TAGDECL([], [predeps], [1]) 11000c3e29c03Smrg_LT_TAGDECL([], [postdeps], [1]) 11001c3e29c03Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11002c3e29c03Smrg [The library search path used internally by the compiler when linking 11003c3e29c03Smrg a shared library]) 11004c3e29c03Smrg])# _LT_SYS_HIDDEN_LIBDEPS 1100526372658Smrg 11006c3e29c03Smrg 11007c3e29c03Smrg# _LT_LANG_F77_CONFIG([TAG]) 11008c3e29c03Smrg# -------------------------- 11009c3e29c03Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 11010c3e29c03Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11011c3e29c03Smrg# to write the compiler configuration to 'libtool'. 11012c3e29c03Smrgm4_defun([_LT_LANG_F77_CONFIG], 11013c3e29c03Smrg[AC_LANG_PUSH(Fortran 77) 11014c3e29c03Smrgif test -z "$F77" || test no = "$F77"; then 11015c3e29c03Smrg _lt_disable_F77=yes 1101626372658Smrgfi 1101726372658Smrg 11018c3e29c03Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11019c3e29c03Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11020c3e29c03Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11021c3e29c03Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11022c3e29c03Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11023c3e29c03Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11024c3e29c03Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11025c3e29c03Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11026c3e29c03Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11027c3e29c03Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11028c3e29c03Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11029c3e29c03Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11030c3e29c03Smrg_LT_TAGVAR(module_cmds, $1)= 11031c3e29c03Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11032c3e29c03Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11033c3e29c03Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11034c3e29c03Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11035c3e29c03Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11036c3e29c03Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11037c3e29c03Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11038c3e29c03Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11039c3e29c03Smrg 11040c3e29c03Smrg# Source file extension for f77 test sources. 11041c3e29c03Smrgac_ext=f 11042c3e29c03Smrg 11043c3e29c03Smrg# Object file extension for compiled f77 test sources. 11044c3e29c03Smrgobjext=o 11045c3e29c03Smrg_LT_TAGVAR(objext, $1)=$objext 11046c3e29c03Smrg 11047c3e29c03Smrg# No sense in running all these tests if we already determined that 11048c3e29c03Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 11049c3e29c03Smrg# are currently assumed to apply to all compilers on this platform, 11050c3e29c03Smrg# and will be corrupted by setting them based on a non-working compiler. 11051c3e29c03Smrgif test yes != "$_lt_disable_F77"; then 11052c3e29c03Smrg # Code to be used in simple compile tests 11053c3e29c03Smrg lt_simple_compile_test_code="\ 11054c3e29c03Smrg subroutine t 11055c3e29c03Smrg return 11056c3e29c03Smrg end 11057c3e29c03Smrg" 11058c3e29c03Smrg 11059c3e29c03Smrg # Code to be used in simple link tests 11060c3e29c03Smrg lt_simple_link_test_code="\ 11061c3e29c03Smrg program t 11062c3e29c03Smrg end 11063c3e29c03Smrg" 11064c3e29c03Smrg 11065c3e29c03Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11066c3e29c03Smrg _LT_TAG_COMPILER 11067c3e29c03Smrg 11068c3e29c03Smrg # save warnings/boilerplate of simple test code 11069c3e29c03Smrg _LT_COMPILER_BOILERPLATE 11070c3e29c03Smrg _LT_LINKER_BOILERPLATE 11071c3e29c03Smrg 11072c3e29c03Smrg # Allow CC to be a program name with arguments. 11073c3e29c03Smrg lt_save_CC=$CC 11074c3e29c03Smrg lt_save_GCC=$GCC 11075c3e29c03Smrg lt_save_CFLAGS=$CFLAGS 11076c3e29c03Smrg CC=${F77-"f77"} 11077c3e29c03Smrg CFLAGS=$FFLAGS 11078c3e29c03Smrg compiler=$CC 11079c3e29c03Smrg _LT_TAGVAR(compiler, $1)=$CC 11080c3e29c03Smrg _LT_CC_BASENAME([$compiler]) 11081c3e29c03Smrg GCC=$G77 11082c3e29c03Smrg if test -n "$compiler"; then 11083c3e29c03Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11084c3e29c03Smrg AC_MSG_RESULT([$can_build_shared]) 1108526372658Smrg 11086c3e29c03Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11087c3e29c03Smrg test no = "$can_build_shared" && enable_shared=no 1108826372658Smrg 11089c3e29c03Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11090c3e29c03Smrg # are all built from PIC. 11091c3e29c03Smrg case $host_os in 11092c3e29c03Smrg aix3*) 11093c3e29c03Smrg test yes = "$enable_shared" && enable_static=no 11094c3e29c03Smrg if test -n "$RANLIB"; then 11095c3e29c03Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11096c3e29c03Smrg postinstall_cmds='$RANLIB $lib' 11097c3e29c03Smrg fi 1109826372658Smrg ;; 11099c3e29c03Smrg aix[[4-9]]*) 11100c3e29c03Smrg if test ia64 != "$host_cpu"; then 11101c3e29c03Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11102c3e29c03Smrg yes,aix,yes) ;; # shared object as lib.so file only 11103c3e29c03Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11104c3e29c03Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11105c3e29c03Smrg esac 11106c3e29c03Smrg fi 1110726372658Smrg ;; 11108c3e29c03Smrg esac 11109c3e29c03Smrg AC_MSG_RESULT([$enable_shared]) 1111026372658Smrg 11111c3e29c03Smrg AC_MSG_CHECKING([whether to build static libraries]) 11112c3e29c03Smrg # Make sure either enable_shared or enable_static is yes. 11113c3e29c03Smrg test yes = "$enable_shared" || enable_static=yes 11114c3e29c03Smrg AC_MSG_RESULT([$enable_static]) 1111526372658Smrg 11116c3e29c03Smrg _LT_TAGVAR(GCC, $1)=$G77 11117c3e29c03Smrg _LT_TAGVAR(LD, $1)=$LD 1111826372658Smrg 11119c3e29c03Smrg ## CAVEAT EMPTOR: 11120c3e29c03Smrg ## There is no encapsulation within the following macros, do not change 11121c3e29c03Smrg ## the running order or otherwise move them around unless you know exactly 11122c3e29c03Smrg ## what you are doing... 11123c3e29c03Smrg _LT_COMPILER_PIC($1) 11124c3e29c03Smrg _LT_COMPILER_C_O($1) 11125c3e29c03Smrg _LT_COMPILER_FILE_LOCKS($1) 11126c3e29c03Smrg _LT_LINKER_SHLIBS($1) 11127c3e29c03Smrg _LT_SYS_DYNAMIC_LINKER($1) 11128c3e29c03Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 1112926372658Smrg 11130c3e29c03Smrg _LT_CONFIG($1) 11131c3e29c03Smrg fi # test -n "$compiler" 1113226372658Smrg 11133c3e29c03Smrg GCC=$lt_save_GCC 11134c3e29c03Smrg CC=$lt_save_CC 11135c3e29c03Smrg CFLAGS=$lt_save_CFLAGS 11136c3e29c03Smrgfi # test yes != "$_lt_disable_F77" 11137c3e29c03Smrg 11138c3e29c03SmrgAC_LANG_POP 11139c3e29c03Smrg])# _LT_LANG_F77_CONFIG 11140c3e29c03Smrg 11141c3e29c03Smrg 11142c3e29c03Smrg# _LT_LANG_FC_CONFIG([TAG]) 11143c3e29c03Smrg# ------------------------- 11144c3e29c03Smrg# Ensure that the configuration variables for a Fortran compiler are 11145c3e29c03Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11146c3e29c03Smrg# to write the compiler configuration to 'libtool'. 11147c3e29c03Smrgm4_defun([_LT_LANG_FC_CONFIG], 11148c3e29c03Smrg[AC_LANG_PUSH(Fortran) 11149c3e29c03Smrg 11150c3e29c03Smrgif test -z "$FC" || test no = "$FC"; then 11151c3e29c03Smrg _lt_disable_FC=yes 1115226372658Smrgfi 1115326372658Smrg 11154c3e29c03Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11155c3e29c03Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11156c3e29c03Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11157c3e29c03Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11158c3e29c03Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11159c3e29c03Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11160c3e29c03Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11161c3e29c03Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11162c3e29c03Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11163c3e29c03Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11164c3e29c03Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11165c3e29c03Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11166c3e29c03Smrg_LT_TAGVAR(module_cmds, $1)= 11167c3e29c03Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11168c3e29c03Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11169c3e29c03Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11170c3e29c03Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11171c3e29c03Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11172c3e29c03Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11173c3e29c03Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11174c3e29c03Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 1117526372658Smrg 11176c3e29c03Smrg# Source file extension for fc test sources. 11177c3e29c03Smrgac_ext=${ac_fc_srcext-f} 1117826372658Smrg 11179c3e29c03Smrg# Object file extension for compiled fc test sources. 11180c3e29c03Smrgobjext=o 11181c3e29c03Smrg_LT_TAGVAR(objext, $1)=$objext 1118226372658Smrg 11183c3e29c03Smrg# No sense in running all these tests if we already determined that 11184c3e29c03Smrg# the FC compiler isn't working. Some variables (like enable_shared) 11185c3e29c03Smrg# are currently assumed to apply to all compilers on this platform, 11186c3e29c03Smrg# and will be corrupted by setting them based on a non-working compiler. 11187c3e29c03Smrgif test yes != "$_lt_disable_FC"; then 11188c3e29c03Smrg # Code to be used in simple compile tests 11189c3e29c03Smrg lt_simple_compile_test_code="\ 11190c3e29c03Smrg subroutine t 11191c3e29c03Smrg return 11192c3e29c03Smrg end 11193c3e29c03Smrg" 1119426372658Smrg 11195c3e29c03Smrg # Code to be used in simple link tests 11196c3e29c03Smrg lt_simple_link_test_code="\ 11197c3e29c03Smrg program t 11198c3e29c03Smrg end 11199c3e29c03Smrg" 1120026372658Smrg 11201c3e29c03Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11202c3e29c03Smrg _LT_TAG_COMPILER 1120326372658Smrg 11204c3e29c03Smrg # save warnings/boilerplate of simple test code 11205c3e29c03Smrg _LT_COMPILER_BOILERPLATE 11206c3e29c03Smrg _LT_LINKER_BOILERPLATE 1120726372658Smrg 11208c3e29c03Smrg # Allow CC to be a program name with arguments. 11209c3e29c03Smrg lt_save_CC=$CC 11210c3e29c03Smrg lt_save_GCC=$GCC 11211c3e29c03Smrg lt_save_CFLAGS=$CFLAGS 11212c3e29c03Smrg CC=${FC-"f95"} 11213c3e29c03Smrg CFLAGS=$FCFLAGS 11214c3e29c03Smrg compiler=$CC 11215c3e29c03Smrg GCC=$ac_cv_fc_compiler_gnu 1121626372658Smrg 11217c3e29c03Smrg _LT_TAGVAR(compiler, $1)=$CC 11218c3e29c03Smrg _LT_CC_BASENAME([$compiler]) 1121926372658Smrg 11220c3e29c03Smrg if test -n "$compiler"; then 11221c3e29c03Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11222c3e29c03Smrg AC_MSG_RESULT([$can_build_shared]) 1122326372658Smrg 11224c3e29c03Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11225c3e29c03Smrg test no = "$can_build_shared" && enable_shared=no 1122626372658Smrg 11227c3e29c03Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11228c3e29c03Smrg # are all built from PIC. 11229c3e29c03Smrg case $host_os in 11230c3e29c03Smrg aix3*) 11231c3e29c03Smrg test yes = "$enable_shared" && enable_static=no 11232c3e29c03Smrg if test -n "$RANLIB"; then 11233c3e29c03Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11234c3e29c03Smrg postinstall_cmds='$RANLIB $lib' 11235c3e29c03Smrg fi 11236c3e29c03Smrg ;; 11237c3e29c03Smrg aix[[4-9]]*) 11238c3e29c03Smrg if test ia64 != "$host_cpu"; then 11239c3e29c03Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11240c3e29c03Smrg yes,aix,yes) ;; # shared object as lib.so file only 11241c3e29c03Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11242c3e29c03Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11243c3e29c03Smrg esac 11244c3e29c03Smrg fi 11245c3e29c03Smrg ;; 11246c3e29c03Smrg esac 11247c3e29c03Smrg AC_MSG_RESULT([$enable_shared]) 1124826372658Smrg 11249c3e29c03Smrg AC_MSG_CHECKING([whether to build static libraries]) 11250c3e29c03Smrg # Make sure either enable_shared or enable_static is yes. 11251c3e29c03Smrg test yes = "$enable_shared" || enable_static=yes 11252c3e29c03Smrg AC_MSG_RESULT([$enable_static]) 1125326372658Smrg 11254c3e29c03Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11255c3e29c03Smrg _LT_TAGVAR(LD, $1)=$LD 1125626372658Smrg 11257c3e29c03Smrg ## CAVEAT EMPTOR: 11258c3e29c03Smrg ## There is no encapsulation within the following macros, do not change 11259c3e29c03Smrg ## the running order or otherwise move them around unless you know exactly 11260c3e29c03Smrg ## what you are doing... 11261c3e29c03Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 11262c3e29c03Smrg _LT_COMPILER_PIC($1) 11263c3e29c03Smrg _LT_COMPILER_C_O($1) 11264c3e29c03Smrg _LT_COMPILER_FILE_LOCKS($1) 11265c3e29c03Smrg _LT_LINKER_SHLIBS($1) 11266c3e29c03Smrg _LT_SYS_DYNAMIC_LINKER($1) 11267c3e29c03Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 1126826372658Smrg 11269c3e29c03Smrg _LT_CONFIG($1) 11270c3e29c03Smrg fi # test -n "$compiler" 1127126372658Smrg 11272c3e29c03Smrg GCC=$lt_save_GCC 11273c3e29c03Smrg CC=$lt_save_CC 11274c3e29c03Smrg CFLAGS=$lt_save_CFLAGS 11275c3e29c03Smrgfi # test yes != "$_lt_disable_FC" 1127626372658Smrg 11277c3e29c03SmrgAC_LANG_POP 11278c3e29c03Smrg])# _LT_LANG_FC_CONFIG 1127926372658Smrg 1128026372658Smrg 11281c3e29c03Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 11282c3e29c03Smrg# -------------------------- 11283c3e29c03Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11284c3e29c03Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11285c3e29c03Smrg# to write the compiler configuration to 'libtool'. 11286c3e29c03Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 11287c3e29c03Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11288c3e29c03SmrgAC_LANG_SAVE 1128926372658Smrg 11290c3e29c03Smrg# Source file extension for Java test sources. 11291c3e29c03Smrgac_ext=java 1129226372658Smrg 11293c3e29c03Smrg# Object file extension for compiled Java test sources. 11294c3e29c03Smrgobjext=o 11295c3e29c03Smrg_LT_TAGVAR(objext, $1)=$objext 1129626372658Smrg 11297c3e29c03Smrg# Code to be used in simple compile tests 11298c3e29c03Smrglt_simple_compile_test_code="class foo {}" 1129926372658Smrg 11300c3e29c03Smrg# Code to be used in simple link tests 11301c3e29c03Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 1130226372658Smrg 11303c3e29c03Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11304c3e29c03Smrg_LT_TAG_COMPILER 1130526372658Smrg 11306c3e29c03Smrg# save warnings/boilerplate of simple test code 11307c3e29c03Smrg_LT_COMPILER_BOILERPLATE 11308c3e29c03Smrg_LT_LINKER_BOILERPLATE 1130926372658Smrg 11310c3e29c03Smrg# Allow CC to be a program name with arguments. 11311c3e29c03Smrglt_save_CC=$CC 11312c3e29c03Smrglt_save_CFLAGS=$CFLAGS 11313c3e29c03Smrglt_save_GCC=$GCC 11314c3e29c03SmrgGCC=yes 11315c3e29c03SmrgCC=${GCJ-"gcj"} 11316c3e29c03SmrgCFLAGS=$GCJFLAGS 11317c3e29c03Smrgcompiler=$CC 11318c3e29c03Smrg_LT_TAGVAR(compiler, $1)=$CC 11319c3e29c03Smrg_LT_TAGVAR(LD, $1)=$LD 11320c3e29c03Smrg_LT_CC_BASENAME([$compiler]) 1132126372658Smrg 11322c3e29c03Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11323c3e29c03Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 1132426372658Smrg 11325c3e29c03Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11326c3e29c03Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11327c3e29c03Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11328c3e29c03Smrg 11329c3e29c03Smrgif test -n "$compiler"; then 11330c3e29c03Smrg _LT_COMPILER_NO_RTTI($1) 11331c3e29c03Smrg _LT_COMPILER_PIC($1) 11332c3e29c03Smrg _LT_COMPILER_C_O($1) 11333c3e29c03Smrg _LT_COMPILER_FILE_LOCKS($1) 11334c3e29c03Smrg _LT_LINKER_SHLIBS($1) 11335c3e29c03Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11336c3e29c03Smrg 11337c3e29c03Smrg _LT_CONFIG($1) 1133826372658Smrgfi 1133926372658Smrg 11340c3e29c03SmrgAC_LANG_RESTORE 11341c3e29c03Smrg 11342c3e29c03SmrgGCC=$lt_save_GCC 11343c3e29c03SmrgCC=$lt_save_CC 11344c3e29c03SmrgCFLAGS=$lt_save_CFLAGS 11345c3e29c03Smrg])# _LT_LANG_GCJ_CONFIG 1134626372658Smrg 1134726372658Smrg 11348c3e29c03Smrg# _LT_LANG_GO_CONFIG([TAG]) 11349c3e29c03Smrg# -------------------------- 11350c3e29c03Smrg# Ensure that the configuration variables for the GNU Go compiler 11351c3e29c03Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11352c3e29c03Smrg# to write the compiler configuration to 'libtool'. 11353c3e29c03Smrgm4_defun([_LT_LANG_GO_CONFIG], 11354c3e29c03Smrg[AC_REQUIRE([LT_PROG_GO])dnl 11355c3e29c03SmrgAC_LANG_SAVE 1135626372658Smrg 11357c3e29c03Smrg# Source file extension for Go test sources. 11358c3e29c03Smrgac_ext=go 1135926372658Smrg 11360c3e29c03Smrg# Object file extension for compiled Go test sources. 11361c3e29c03Smrgobjext=o 11362c3e29c03Smrg_LT_TAGVAR(objext, $1)=$objext 1136326372658Smrg 11364c3e29c03Smrg# Code to be used in simple compile tests 11365c3e29c03Smrglt_simple_compile_test_code="package main; func main() { }" 1136626372658Smrg 11367c3e29c03Smrg# Code to be used in simple link tests 11368c3e29c03Smrglt_simple_link_test_code='package main; func main() { }' 1136926372658Smrg 11370c3e29c03Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11371c3e29c03Smrg_LT_TAG_COMPILER 1137226372658Smrg 11373c3e29c03Smrg# save warnings/boilerplate of simple test code 11374c3e29c03Smrg_LT_COMPILER_BOILERPLATE 11375c3e29c03Smrg_LT_LINKER_BOILERPLATE 1137626372658Smrg 11377c3e29c03Smrg# Allow CC to be a program name with arguments. 11378c3e29c03Smrglt_save_CC=$CC 11379c3e29c03Smrglt_save_CFLAGS=$CFLAGS 11380c3e29c03Smrglt_save_GCC=$GCC 11381c3e29c03SmrgGCC=yes 11382c3e29c03SmrgCC=${GOC-"gccgo"} 11383c3e29c03SmrgCFLAGS=$GOFLAGS 11384c3e29c03Smrgcompiler=$CC 11385c3e29c03Smrg_LT_TAGVAR(compiler, $1)=$CC 11386c3e29c03Smrg_LT_TAGVAR(LD, $1)=$LD 11387c3e29c03Smrg_LT_CC_BASENAME([$compiler]) 1138826372658Smrg 11389c3e29c03Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 11390c3e29c03Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 1139126372658Smrg 11392c3e29c03Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11393c3e29c03Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11394c3e29c03Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 1139526372658Smrg 11396c3e29c03Smrgif test -n "$compiler"; then 11397c3e29c03Smrg _LT_COMPILER_NO_RTTI($1) 11398c3e29c03Smrg _LT_COMPILER_PIC($1) 11399c3e29c03Smrg _LT_COMPILER_C_O($1) 11400c3e29c03Smrg _LT_COMPILER_FILE_LOCKS($1) 11401c3e29c03Smrg _LT_LINKER_SHLIBS($1) 11402c3e29c03Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 1140326372658Smrg 11404c3e29c03Smrg _LT_CONFIG($1) 1140526372658Smrgfi 1140626372658Smrg 11407c3e29c03SmrgAC_LANG_RESTORE 1140826372658Smrg 11409c3e29c03SmrgGCC=$lt_save_GCC 11410c3e29c03SmrgCC=$lt_save_CC 11411c3e29c03SmrgCFLAGS=$lt_save_CFLAGS 11412c3e29c03Smrg])# _LT_LANG_GO_CONFIG 11413c3e29c03Smrg 11414c3e29c03Smrg 11415c3e29c03Smrg# _LT_LANG_RC_CONFIG([TAG]) 11416c3e29c03Smrg# ------------------------- 11417c3e29c03Smrg# Ensure that the configuration variables for the Windows resource compiler 11418c3e29c03Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11419c3e29c03Smrg# to write the compiler configuration to 'libtool'. 11420c3e29c03Smrgm4_defun([_LT_LANG_RC_CONFIG], 11421c3e29c03Smrg[AC_REQUIRE([LT_PROG_RC])dnl 11422c3e29c03SmrgAC_LANG_SAVE 11423c3e29c03Smrg 11424c3e29c03Smrg# Source file extension for RC test sources. 11425c3e29c03Smrgac_ext=rc 11426c3e29c03Smrg 11427c3e29c03Smrg# Object file extension for compiled RC test sources. 11428c3e29c03Smrgobjext=o 11429c3e29c03Smrg_LT_TAGVAR(objext, $1)=$objext 11430c3e29c03Smrg 11431c3e29c03Smrg# Code to be used in simple compile tests 11432c3e29c03Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 1143326372658Smrg 11434c3e29c03Smrg# Code to be used in simple link tests 11435c3e29c03Smrglt_simple_link_test_code=$lt_simple_compile_test_code 1143626372658Smrg 11437c3e29c03Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11438c3e29c03Smrg_LT_TAG_COMPILER 1143926372658Smrg 11440c3e29c03Smrg# save warnings/boilerplate of simple test code 11441c3e29c03Smrg_LT_COMPILER_BOILERPLATE 11442c3e29c03Smrg_LT_LINKER_BOILERPLATE 1144326372658Smrg 11444c3e29c03Smrg# Allow CC to be a program name with arguments. 11445c3e29c03Smrglt_save_CC=$CC 11446c3e29c03Smrglt_save_CFLAGS=$CFLAGS 11447c3e29c03Smrglt_save_GCC=$GCC 11448c3e29c03SmrgGCC= 11449c3e29c03SmrgCC=${RC-"windres"} 11450c3e29c03SmrgCFLAGS= 11451c3e29c03Smrgcompiler=$CC 11452c3e29c03Smrg_LT_TAGVAR(compiler, $1)=$CC 11453c3e29c03Smrg_LT_CC_BASENAME([$compiler]) 11454c3e29c03Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1145526372658Smrg 11456c3e29c03Smrgif test -n "$compiler"; then 11457c3e29c03Smrg : 11458c3e29c03Smrg _LT_CONFIG($1) 11459c3e29c03Smrgfi 1146026372658Smrg 11461c3e29c03SmrgGCC=$lt_save_GCC 11462c3e29c03SmrgAC_LANG_RESTORE 11463c3e29c03SmrgCC=$lt_save_CC 11464c3e29c03SmrgCFLAGS=$lt_save_CFLAGS 11465c3e29c03Smrg])# _LT_LANG_RC_CONFIG 1146626372658Smrg 1146726372658Smrg 11468c3e29c03Smrg# LT_PROG_GCJ 11469c3e29c03Smrg# ----------- 11470c3e29c03SmrgAC_DEFUN([LT_PROG_GCJ], 11471c3e29c03Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11472c3e29c03Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11473c3e29c03Smrg [AC_CHECK_TOOL(GCJ, gcj,) 11474c3e29c03Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11475c3e29c03Smrg AC_SUBST(GCJFLAGS)])])[]dnl 11476c3e29c03Smrg]) 1147726372658Smrg 11478c3e29c03Smrg# Old name: 11479c3e29c03SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11480c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 11481c3e29c03Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 1148226372658Smrg 1148326372658Smrg 11484c3e29c03Smrg# LT_PROG_GO 11485c3e29c03Smrg# ---------- 11486c3e29c03SmrgAC_DEFUN([LT_PROG_GO], 11487c3e29c03Smrg[AC_CHECK_TOOL(GOC, gccgo,) 1148826372658Smrg]) 1148926372658Smrg 1149026372658Smrg 11491c3e29c03Smrg# LT_PROG_RC 11492c3e29c03Smrg# ---------- 11493c3e29c03SmrgAC_DEFUN([LT_PROG_RC], 11494c3e29c03Smrg[AC_CHECK_TOOL(RC, windres,) 11495c3e29c03Smrg]) 1149626372658Smrg 11497c3e29c03Smrg# Old name: 11498c3e29c03SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11499c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 11500c3e29c03Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 1150126372658Smrg 1150226372658Smrg 11503c3e29c03Smrg# _LT_DECL_EGREP 11504c3e29c03Smrg# -------------- 11505c3e29c03Smrg# If we don't have a new enough Autoconf to choose the best grep 11506c3e29c03Smrg# available, choose the one first in the user's PATH. 11507c3e29c03Smrgm4_defun([_LT_DECL_EGREP], 11508c3e29c03Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 11509c3e29c03SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 11510c3e29c03Smrgtest -z "$GREP" && GREP=grep 11511c3e29c03Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11512c3e29c03Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11513c3e29c03Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11514c3e29c03Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11515c3e29c03SmrgAC_SUBST([GREP]) 11516c3e29c03Smrg]) 1151726372658Smrg 1151826372658Smrg 11519c3e29c03Smrg# _LT_DECL_OBJDUMP 11520c3e29c03Smrg# -------------- 11521c3e29c03Smrg# If we don't have a new enough Autoconf to choose the best objdump 11522c3e29c03Smrg# available, choose the one first in the user's PATH. 11523c3e29c03Smrgm4_defun([_LT_DECL_OBJDUMP], 11524c3e29c03Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11525c3e29c03Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11526c3e29c03Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11527c3e29c03SmrgAC_SUBST([OBJDUMP]) 11528c3e29c03Smrg]) 1152926372658Smrg 11530c3e29c03Smrg# _LT_DECL_DLLTOOL 11531c3e29c03Smrg# ---------------- 11532c3e29c03Smrg# Ensure DLLTOOL variable is set. 11533c3e29c03Smrgm4_defun([_LT_DECL_DLLTOOL], 11534c3e29c03Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11535c3e29c03Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11536c3e29c03Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11537c3e29c03SmrgAC_SUBST([DLLTOOL]) 11538c3e29c03Smrg]) 1153926372658Smrg 11540c3e29c03Smrg# _LT_DECL_FILECMD 11541c3e29c03Smrg# ---------------- 11542c3e29c03Smrg# Check for a file(cmd) program that can be used to detect file type and magic 11543c3e29c03Smrgm4_defun([_LT_DECL_FILECMD], 11544c3e29c03Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 11545c3e29c03Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11546c3e29c03Smrg])# _LD_DECL_FILECMD 1154726372658Smrg 11548c3e29c03Smrg# _LT_DECL_SED 11549c3e29c03Smrg# ------------ 11550c3e29c03Smrg# Check for a fully-functional sed program, that truncates 11551c3e29c03Smrg# as few characters as possible. Prefer GNU sed if found. 11552c3e29c03Smrgm4_defun([_LT_DECL_SED], 11553c3e29c03Smrg[AC_PROG_SED 11554c3e29c03Smrgtest -z "$SED" && SED=sed 11555c3e29c03SmrgXsed="$SED -e 1s/^X//" 11556c3e29c03Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11557c3e29c03Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11558c3e29c03Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11559c3e29c03Smrg])# _LT_DECL_SED 1156026372658Smrg 11561c3e29c03Smrgm4_ifndef([AC_PROG_SED], [ 11562c3e29c03Smrg# NOTE: This macro has been submitted for inclusion into # 11563c3e29c03Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 11564c3e29c03Smrg# a released version of Autoconf we should remove this # 11565c3e29c03Smrg# macro and use it instead. # 1156626372658Smrg 11567c3e29c03Smrgm4_defun([AC_PROG_SED], 11568c3e29c03Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 11569c3e29c03SmrgAC_CACHE_VAL(lt_cv_path_SED, 11570c3e29c03Smrg[# Loop through the user's path and test for sed and gsed. 11571c3e29c03Smrg# Then use that list of sed's as ones to test for truncation. 11572c3e29c03Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11573c3e29c03Smrgfor as_dir in $PATH 11574c3e29c03Smrgdo 11575c3e29c03Smrg IFS=$as_save_IFS 11576c3e29c03Smrg test -z "$as_dir" && as_dir=. 11577c3e29c03Smrg for lt_ac_prog in sed gsed; do 11578c3e29c03Smrg for ac_exec_ext in '' $ac_executable_extensions; do 11579c3e29c03Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11580c3e29c03Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 1158126372658Smrg fi 11582c3e29c03Smrg done 11583c3e29c03Smrg done 11584c3e29c03Smrgdone 11585c3e29c03SmrgIFS=$as_save_IFS 11586c3e29c03Smrglt_ac_max=0 11587c3e29c03Smrglt_ac_count=0 11588c3e29c03Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11589c3e29c03Smrg# along with /bin/sed that truncates output. 11590c3e29c03Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11591c3e29c03Smrg test ! -f "$lt_ac_sed" && continue 11592c3e29c03Smrg cat /dev/null > conftest.in 11593c3e29c03Smrg lt_ac_count=0 11594c3e29c03Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11595c3e29c03Smrg # Check for GNU sed and select it if it is found. 11596c3e29c03Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11597c3e29c03Smrg lt_cv_path_SED=$lt_ac_sed 11598c3e29c03Smrg break 11599c3e29c03Smrg fi 11600c3e29c03Smrg while true; do 11601c3e29c03Smrg cat conftest.in conftest.in >conftest.tmp 11602c3e29c03Smrg mv conftest.tmp conftest.in 11603c3e29c03Smrg cp conftest.in conftest.nl 11604c3e29c03Smrg echo >>conftest.nl 11605c3e29c03Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11606c3e29c03Smrg cmp -s conftest.out conftest.nl || break 11607c3e29c03Smrg # 10000 chars as input seems more than enough 11608c3e29c03Smrg test 10 -lt "$lt_ac_count" && break 11609c3e29c03Smrg lt_ac_count=`expr $lt_ac_count + 1` 11610c3e29c03Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 11611c3e29c03Smrg lt_ac_max=$lt_ac_count 11612c3e29c03Smrg lt_cv_path_SED=$lt_ac_sed 1161326372658Smrg fi 1161426372658Smrg done 11615c3e29c03Smrgdone 11616c3e29c03Smrg]) 11617c3e29c03SmrgSED=$lt_cv_path_SED 11618c3e29c03SmrgAC_SUBST([SED]) 11619c3e29c03SmrgAC_MSG_RESULT([$SED]) 11620c3e29c03Smrg])#AC_PROG_SED 11621c3e29c03Smrg])#m4_ifndef 1162226372658Smrg 11623c3e29c03Smrg# Old name: 11624c3e29c03SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11625c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 11626c3e29c03Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 11627c3e29c03Smrg 11628c3e29c03Smrg 11629c3e29c03Smrg# _LT_CHECK_SHELL_FEATURES 11630c3e29c03Smrg# ------------------------ 11631c3e29c03Smrg# Find out whether the shell is Bourne or XSI compatible, 11632c3e29c03Smrg# or has some other useful features. 11633c3e29c03Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 11634c3e29c03Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11635c3e29c03Smrg lt_unset=unset 1163626372658Smrgelse 11637c3e29c03Smrg lt_unset=false 1163826372658Smrgfi 11639c3e29c03Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11640c3e29c03Smrg 11641c3e29c03Smrg# test EBCDIC or ASCII 11642c3e29c03Smrgcase `echo X|tr X '\101'` in 11643c3e29c03Smrg A) # ASCII based system 11644c3e29c03Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11645c3e29c03Smrg lt_SP2NL='tr \040 \012' 11646c3e29c03Smrg lt_NL2SP='tr \015\012 \040\040' 11647c3e29c03Smrg ;; 11648c3e29c03Smrg *) # EBCDIC based system 11649c3e29c03Smrg lt_SP2NL='tr \100 \n' 11650c3e29c03Smrg lt_NL2SP='tr \r\n \100\100' 11651c3e29c03Smrg ;; 11652c3e29c03Smrgesac 11653c3e29c03Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11654c3e29c03Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11655c3e29c03Smrg])# _LT_CHECK_SHELL_FEATURES 11656c3e29c03Smrg 11657c3e29c03Smrg 11658c3e29c03Smrg# _LT_PATH_CONVERSION_FUNCTIONS 11659c3e29c03Smrg# ----------------------------- 11660c3e29c03Smrg# Determine what file name conversion functions should be used by 11661c3e29c03Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11662c3e29c03Smrg# for certain cross-compile configurations and native mingw. 11663c3e29c03Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11664c3e29c03Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11665c3e29c03SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11666c3e29c03SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 11667c3e29c03SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 11668c3e29c03Smrg[case $host in 11669c3e29c03Smrg *-*-mingw* ) 11670c3e29c03Smrg case $build in 11671c3e29c03Smrg *-*-mingw* ) # actually msys 11672c3e29c03Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11673c3e29c03Smrg ;; 11674c3e29c03Smrg *-*-cygwin* ) 11675c3e29c03Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11676c3e29c03Smrg ;; 11677c3e29c03Smrg * ) # otherwise, assume *nix 11678c3e29c03Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11679c3e29c03Smrg ;; 11680c3e29c03Smrg esac 11681c3e29c03Smrg ;; 11682c3e29c03Smrg *-*-cygwin* ) 11683c3e29c03Smrg case $build in 11684c3e29c03Smrg *-*-mingw* ) # actually msys 11685c3e29c03Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11686c3e29c03Smrg ;; 11687c3e29c03Smrg *-*-cygwin* ) 11688c3e29c03Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 11689c3e29c03Smrg ;; 11690c3e29c03Smrg * ) # otherwise, assume *nix 11691c3e29c03Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11692c3e29c03Smrg ;; 11693c3e29c03Smrg esac 11694c3e29c03Smrg ;; 11695c3e29c03Smrg * ) # unhandled hosts (and "normal" native builds) 11696c3e29c03Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 11697c3e29c03Smrg ;; 11698c3e29c03Smrgesac 1169926372658Smrg]) 11700c3e29c03Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 11701c3e29c03SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11702c3e29c03Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11703c3e29c03Smrg [0], [convert $build file names to $host format])dnl 11704c3e29c03Smrg 11705c3e29c03SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11706c3e29c03SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11707c3e29c03Smrg[#assume ordinary cross tools, or native build. 11708c3e29c03Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 11709c3e29c03Smrgcase $host in 11710c3e29c03Smrg *-*-mingw* ) 11711c3e29c03Smrg case $build in 11712c3e29c03Smrg *-*-mingw* ) # actually msys 11713c3e29c03Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11714c3e29c03Smrg ;; 11715c3e29c03Smrg esac 11716c3e29c03Smrg ;; 11717c3e29c03Smrgesac 1171826372658Smrg]) 11719c3e29c03Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 11720c3e29c03SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11721c3e29c03Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11722c3e29c03Smrg [0], [convert $build files to toolchain format])dnl 11723c3e29c03Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 1172426372658Smrg 11725c3e29c03Smrg# Helper functions for option handling. -*- Autoconf -*- 11726c3e29c03Smrg# 11727c3e29c03Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11728c3e29c03Smrg# Software Foundation, Inc. 11729c3e29c03Smrg# Written by Gary V. Vaughan, 2004 11730c3e29c03Smrg# 11731c3e29c03Smrg# This file is free software; the Free Software Foundation gives 11732c3e29c03Smrg# unlimited permission to copy and/or distribute it, with or without 11733c3e29c03Smrg# modifications, as long as this notice is preserved. 1173426372658Smrg 11735c3e29c03Smrg# serial 8 ltoptions.m4 11736c3e29c03Smrg 11737c3e29c03Smrg# This is to help aclocal find these macros, as it can't see m4_define. 11738c3e29c03SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11739c3e29c03Smrg 11740c3e29c03Smrg 11741c3e29c03Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11742c3e29c03Smrg# ------------------------------------------ 11743c3e29c03Smrgm4_define([_LT_MANGLE_OPTION], 11744c3e29c03Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11745c3e29c03Smrg 11746c3e29c03Smrg 11747c3e29c03Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11748c3e29c03Smrg# --------------------------------------- 11749c3e29c03Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11750c3e29c03Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11751c3e29c03Smrg# saved as a flag. 11752c3e29c03Smrgm4_define([_LT_SET_OPTION], 11753c3e29c03Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11754c3e29c03Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11755c3e29c03Smrg _LT_MANGLE_DEFUN([$1], [$2]), 11756c3e29c03Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 1175726372658Smrg]) 1175826372658Smrg 1175926372658Smrg 11760c3e29c03Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11761c3e29c03Smrg# ------------------------------------------------------------ 11762c3e29c03Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11763c3e29c03Smrgm4_define([_LT_IF_OPTION], 11764c3e29c03Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11765c3e29c03Smrg 11766c3e29c03Smrg 11767c3e29c03Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11768c3e29c03Smrg# ------------------------------------------------------- 11769c3e29c03Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11770c3e29c03Smrg# are set. 11771c3e29c03Smrgm4_define([_LT_UNLESS_OPTIONS], 11772c3e29c03Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11773c3e29c03Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11774c3e29c03Smrg [m4_define([$0_found])])])[]dnl 11775c3e29c03Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11776c3e29c03Smrg])[]dnl 1177726372658Smrg]) 1177826372658Smrg 1177926372658Smrg 11780c3e29c03Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11781c3e29c03Smrg# ---------------------------------------- 11782c3e29c03Smrg# OPTION-LIST is a space-separated list of Libtool options associated 11783c3e29c03Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 11784c3e29c03Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11785c3e29c03Smrg# the unknown option and exit. 11786c3e29c03Smrgm4_defun([_LT_SET_OPTIONS], 11787c3e29c03Smrg[# Set options 11788c3e29c03Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11789c3e29c03Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 11790c3e29c03Smrg 11791c3e29c03Smrgm4_if([$1],[LT_INIT],[ 11792c3e29c03Smrg dnl 11793c3e29c03Smrg dnl Simply set some default values (i.e off) if boolean options were not 11794c3e29c03Smrg dnl specified: 11795c3e29c03Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11796c3e29c03Smrg ]) 11797c3e29c03Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11798c3e29c03Smrg ]) 11799c3e29c03Smrg dnl 11800c3e29c03Smrg dnl If no reference was made to various pairs of opposing options, then 11801c3e29c03Smrg dnl we run the default mode handler for the pair. For example, if neither 11802c3e29c03Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11803c3e29c03Smrg dnl archives by default: 11804c3e29c03Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11805c3e29c03Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11806c3e29c03Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11807c3e29c03Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11808c3e29c03Smrg [_LT_ENABLE_FAST_INSTALL]) 11809c3e29c03Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11810c3e29c03Smrg [_LT_WITH_AIX_SONAME([aix])]) 11811c3e29c03Smrg ]) 11812c3e29c03Smrg])# _LT_SET_OPTIONS 1181326372658Smrg 1181426372658Smrg 1181526372658Smrg 11816c3e29c03Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11817c3e29c03Smrg# ----------------------------------------- 11818c3e29c03Smrgm4_define([_LT_MANGLE_DEFUN], 11819c3e29c03Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 1182026372658Smrg 11821c3e29c03Smrg 11822c3e29c03Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11823c3e29c03Smrg# ----------------------------------------------- 11824c3e29c03Smrgm4_define([LT_OPTION_DEFINE], 11825c3e29c03Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11826c3e29c03Smrg])# LT_OPTION_DEFINE 11827c3e29c03Smrg 11828c3e29c03Smrg 11829c3e29c03Smrg# dlopen 11830c3e29c03Smrg# ------ 11831c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 1183226372658Smrg]) 118334e7590efSmrg 11834c3e29c03SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 11835c3e29c03Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 11836c3e29c03SmrgAC_DIAGNOSE([obsolete], 11837c3e29c03Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11838c3e29c03Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 11839c3e29c03Smrg]) 118404b0ead49Smrg 11841c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 11842c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 118434b0ead49Smrg 1184426372658Smrg 11845c3e29c03Smrg# win32-dll 11846c3e29c03Smrg# --------- 11847c3e29c03Smrg# Declare package support for building win32 dll's. 11848c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 11849c3e29c03Smrg[enable_win32_dll=yes 11850c3e29c03Smrg 11851c3e29c03Smrgcase $host in 11852c3e29c03Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11853c3e29c03Smrg AC_CHECK_TOOL(AS, as, false) 11854c3e29c03Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11855c3e29c03Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 11856c3e29c03Smrg ;; 11857c3e29c03Smrgesac 11858c3e29c03Smrg 11859c3e29c03Smrgtest -z "$AS" && AS=as 11860c3e29c03Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 11861c3e29c03Smrg 11862c3e29c03Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11863c3e29c03Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11864c3e29c03Smrg 11865c3e29c03Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11866c3e29c03Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11867c3e29c03Smrg])# win32-dll 11868c3e29c03Smrg 11869c3e29c03SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11870c3e29c03Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11871c3e29c03Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 11872c3e29c03SmrgAC_DIAGNOSE([obsolete], 11873c3e29c03Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11874c3e29c03Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 1187526372658Smrg]) 1187626372658Smrg 11877c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 11878c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 11879c3e29c03Smrg 11880c3e29c03Smrg 11881c3e29c03Smrg# _LT_ENABLE_SHARED([DEFAULT]) 11882c3e29c03Smrg# ---------------------------- 11883c3e29c03Smrg# implement the --enable-shared flag, and supports the 'shared' and 11884c3e29c03Smrg# 'disable-shared' LT_INIT options. 11885c3e29c03Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11886c3e29c03Smrgm4_define([_LT_ENABLE_SHARED], 11887c3e29c03Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11888c3e29c03SmrgAC_ARG_ENABLE([shared], 11889c3e29c03Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11890c3e29c03Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11891c3e29c03Smrg [p=${PACKAGE-default} 11892c3e29c03Smrg case $enableval in 11893c3e29c03Smrg yes) enable_shared=yes ;; 11894c3e29c03Smrg no) enable_shared=no ;; 11895c3e29c03Smrg *) 11896c3e29c03Smrg enable_shared=no 11897c3e29c03Smrg # Look at the argument we got. We use all the common list separators. 11898c3e29c03Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11899c3e29c03Smrg for pkg in $enableval; do 11900c3e29c03Smrg IFS=$lt_save_ifs 11901c3e29c03Smrg if test "X$pkg" = "X$p"; then 11902c3e29c03Smrg enable_shared=yes 11903c3e29c03Smrg fi 11904c3e29c03Smrg done 11905c3e29c03Smrg IFS=$lt_save_ifs 11906c3e29c03Smrg ;; 11907c3e29c03Smrg esac], 11908c3e29c03Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 119094b0ead49Smrg 11910c3e29c03Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 11911c3e29c03Smrg [Whether or not to build shared libraries]) 11912c3e29c03Smrg])# _LT_ENABLE_SHARED 119134b0ead49Smrg 11914c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 11915c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 119164b0ead49Smrg 11917c3e29c03Smrg# Old names: 11918c3e29c03SmrgAC_DEFUN([AC_ENABLE_SHARED], 11919c3e29c03Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 11920c3e29c03Smrg]) 1192149dc963fSmrg 11922c3e29c03SmrgAC_DEFUN([AC_DISABLE_SHARED], 11923c3e29c03Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 1192426372658Smrg]) 1192549dc963fSmrg 11926c3e29c03SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 11927c3e29c03SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 1192826372658Smrg 11929c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 11930c3e29c03Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 11931c3e29c03Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 1193226372658Smrg 119334b0ead49Smrg 119344b0ead49Smrg 11935c3e29c03Smrg# _LT_ENABLE_STATIC([DEFAULT]) 11936c3e29c03Smrg# ---------------------------- 11937c3e29c03Smrg# implement the --enable-static flag, and support the 'static' and 11938c3e29c03Smrg# 'disable-static' LT_INIT options. 11939c3e29c03Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11940c3e29c03Smrgm4_define([_LT_ENABLE_STATIC], 11941c3e29c03Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 11942c3e29c03SmrgAC_ARG_ENABLE([static], 11943c3e29c03Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 11944c3e29c03Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 11945c3e29c03Smrg [p=${PACKAGE-default} 11946c3e29c03Smrg case $enableval in 11947c3e29c03Smrg yes) enable_static=yes ;; 11948c3e29c03Smrg no) enable_static=no ;; 11949c3e29c03Smrg *) 11950c3e29c03Smrg enable_static=no 11951c3e29c03Smrg # Look at the argument we got. We use all the common list separators. 11952c3e29c03Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11953c3e29c03Smrg for pkg in $enableval; do 11954c3e29c03Smrg IFS=$lt_save_ifs 11955c3e29c03Smrg if test "X$pkg" = "X$p"; then 11956c3e29c03Smrg enable_static=yes 11957c3e29c03Smrg fi 11958c3e29c03Smrg done 11959c3e29c03Smrg IFS=$lt_save_ifs 11960c3e29c03Smrg ;; 11961c3e29c03Smrg esac], 11962c3e29c03Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 119634b0ead49Smrg 11964c3e29c03Smrg _LT_DECL([build_old_libs], [enable_static], [0], 11965c3e29c03Smrg [Whether or not to build static libraries]) 11966c3e29c03Smrg])# _LT_ENABLE_STATIC 1196726372658Smrg 11968c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 11969c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 1197049dc963fSmrg 11971c3e29c03Smrg# Old names: 11972c3e29c03SmrgAC_DEFUN([AC_ENABLE_STATIC], 11973c3e29c03Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 11974c3e29c03Smrg]) 1197549dc963fSmrg 11976c3e29c03SmrgAC_DEFUN([AC_DISABLE_STATIC], 11977c3e29c03Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 11978c3e29c03Smrg]) 1197926372658Smrg 11980c3e29c03SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 11981c3e29c03SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 1198226372658Smrg 11983c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 11984c3e29c03Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 11985c3e29c03Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 119864b0ead49Smrg 119874b0ead49Smrg 1198826372658Smrg 11989c3e29c03Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 11990c3e29c03Smrg# ---------------------------------- 11991c3e29c03Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 11992c3e29c03Smrg# and 'disable-fast-install' LT_INIT options. 11993c3e29c03Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11994c3e29c03Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 11995c3e29c03Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 11996c3e29c03SmrgAC_ARG_ENABLE([fast-install], 11997c3e29c03Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 11998c3e29c03Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 11999c3e29c03Smrg [p=${PACKAGE-default} 12000c3e29c03Smrg case $enableval in 12001c3e29c03Smrg yes) enable_fast_install=yes ;; 12002c3e29c03Smrg no) enable_fast_install=no ;; 12003c3e29c03Smrg *) 12004c3e29c03Smrg enable_fast_install=no 12005c3e29c03Smrg # Look at the argument we got. We use all the common list separators. 12006c3e29c03Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12007c3e29c03Smrg for pkg in $enableval; do 12008c3e29c03Smrg IFS=$lt_save_ifs 12009c3e29c03Smrg if test "X$pkg" = "X$p"; then 12010c3e29c03Smrg enable_fast_install=yes 12011c3e29c03Smrg fi 12012c3e29c03Smrg done 12013c3e29c03Smrg IFS=$lt_save_ifs 12014c3e29c03Smrg ;; 12015c3e29c03Smrg esac], 12016c3e29c03Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 1201752b01e16Smrg 12018c3e29c03Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 12019c3e29c03Smrg [Whether or not to optimize for fast installation])dnl 12020c3e29c03Smrg])# _LT_ENABLE_FAST_INSTALL 1202149dc963fSmrg 12022c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12023c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 1202449dc963fSmrg 12025c3e29c03Smrg# Old names: 12026c3e29c03SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 12027c3e29c03Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12028c3e29c03SmrgAC_DIAGNOSE([obsolete], 12029c3e29c03Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12030c3e29c03Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 1203126372658Smrg]) 1203249dc963fSmrg 12033c3e29c03SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 12034c3e29c03Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12035c3e29c03SmrgAC_DIAGNOSE([obsolete], 12036c3e29c03Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12037c3e29c03Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 12038c3e29c03Smrg]) 1203949dc963fSmrg 12040c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 12041c3e29c03Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12042c3e29c03Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 1204349dc963fSmrg 1204449dc963fSmrg 12045c3e29c03Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 12046c3e29c03Smrg# ---------------------------------- 12047c3e29c03Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12048c3e29c03Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12049c3e29c03Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12050c3e29c03Smrgm4_define([_LT_WITH_AIX_SONAME], 12051c3e29c03Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12052c3e29c03Smrgshared_archive_member_spec= 12053c3e29c03Smrgcase $host,$enable_shared in 12054c3e29c03Smrgpower*-*-aix[[5-9]]*,yes) 12055c3e29c03Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12056c3e29c03Smrg AC_ARG_WITH([aix-soname], 12057c3e29c03Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12058c3e29c03Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12059c3e29c03Smrg [case $withval in 12060c3e29c03Smrg aix|svr4|both) 12061c3e29c03Smrg ;; 12062c3e29c03Smrg *) 12063c3e29c03Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12064c3e29c03Smrg ;; 12065c3e29c03Smrg esac 12066c3e29c03Smrg lt_cv_with_aix_soname=$with_aix_soname], 12067c3e29c03Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 12068c3e29c03Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12069c3e29c03Smrg with_aix_soname=$lt_cv_with_aix_soname]) 12070c3e29c03Smrg AC_MSG_RESULT([$with_aix_soname]) 12071c3e29c03Smrg if test aix != "$with_aix_soname"; then 12072c3e29c03Smrg # For the AIX way of multilib, we name the shared archive member 12073c3e29c03Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12074c3e29c03Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12075c3e29c03Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12076c3e29c03Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 12077c3e29c03Smrg if test 64 = "${OBJECT_MODE-32}"; then 12078c3e29c03Smrg shared_archive_member_spec=shr_64 12079c3e29c03Smrg else 12080c3e29c03Smrg shared_archive_member_spec=shr 12081c3e29c03Smrg fi 12082c3e29c03Smrg fi 12083c3e29c03Smrg ;; 12084c3e29c03Smrg*) 12085c3e29c03Smrg with_aix_soname=aix 12086c3e29c03Smrg ;; 12087c3e29c03Smrgesac 1208849dc963fSmrg 12089c3e29c03Smrg_LT_DECL([], [shared_archive_member_spec], [0], 12090c3e29c03Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12091c3e29c03Smrg])# _LT_WITH_AIX_SONAME 120924e7590efSmrg 12093c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12094c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12095c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 120964b0ead49Smrg 120974e7590efSmrg 12098c3e29c03Smrg# _LT_WITH_PIC([MODE]) 1209926372658Smrg# -------------------- 12100c3e29c03Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12101c3e29c03Smrg# LT_INIT options. 12102c3e29c03Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12103c3e29c03Smrgm4_define([_LT_WITH_PIC], 12104c3e29c03Smrg[AC_ARG_WITH([pic], 12105c3e29c03Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12106c3e29c03Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12107c3e29c03Smrg [lt_p=${PACKAGE-default} 12108c3e29c03Smrg case $withval in 12109c3e29c03Smrg yes|no) pic_mode=$withval ;; 12110c3e29c03Smrg *) 12111c3e29c03Smrg pic_mode=default 12112c3e29c03Smrg # Look at the argument we got. We use all the common list separators. 12113c3e29c03Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12114c3e29c03Smrg for lt_pkg in $withval; do 12115c3e29c03Smrg IFS=$lt_save_ifs 12116c3e29c03Smrg if test "X$lt_pkg" = "X$lt_p"; then 12117c3e29c03Smrg pic_mode=yes 12118c3e29c03Smrg fi 12119c3e29c03Smrg done 12120c3e29c03Smrg IFS=$lt_save_ifs 12121c3e29c03Smrg ;; 12122c3e29c03Smrg esac], 12123c3e29c03Smrg [pic_mode=m4_default([$1], [default])]) 121244e7590efSmrg 12125c3e29c03Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12126c3e29c03Smrg])# _LT_WITH_PIC 121274b0ead49Smrg 12128c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12129c3e29c03SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 121304e7590efSmrg 12131c3e29c03Smrg# Old name: 12132c3e29c03SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 12133c3e29c03Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 12134c3e29c03SmrgAC_DIAGNOSE([obsolete], 12135c3e29c03Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12136c3e29c03Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 12137c3e29c03Smrg]) 121384b0ead49Smrg 12139c3e29c03Smrgdnl aclocal-1.4 backwards compatibility: 12140c3e29c03Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 121414b0ead49Smrg 121424e7590efSmrg 12143c3e29c03Smrgm4_define([_LTDL_MODE], []) 12144c3e29c03SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12145c3e29c03Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 12146c3e29c03SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 12147c3e29c03Smrg [m4_define([_LTDL_MODE], [recursive])]) 12148c3e29c03SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 12149c3e29c03Smrg [m4_define([_LTDL_MODE], [subproject])]) 12150c3e29c03Smrg 12151c3e29c03Smrgm4_define([_LTDL_TYPE], []) 12152c3e29c03SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 12153c3e29c03Smrg [m4_define([_LTDL_TYPE], [installable])]) 12154c3e29c03SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 12155c3e29c03Smrg [m4_define([_LTDL_TYPE], [convenience])]) 12156c3e29c03Smrg 12157c3e29c03Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 1215826372658Smrg# 12159c3e29c03Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12160c3e29c03Smrg# Foundation, Inc. 12161c3e29c03Smrg# Written by Gary V. Vaughan, 2004 12162c3e29c03Smrg# 12163c3e29c03Smrg# This file is free software; the Free Software Foundation gives 12164c3e29c03Smrg# unlimited permission to copy and/or distribute it, with or without 12165c3e29c03Smrg# modifications, as long as this notice is preserved. 121664e7590efSmrg 12167c3e29c03Smrg# serial 6 ltsugar.m4 121684e7590efSmrg 12169c3e29c03Smrg# This is to help aclocal find these macros, as it can't see m4_define. 12170c3e29c03SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 121714e7590efSmrg 121724e7590efSmrg 12173c3e29c03Smrg# lt_join(SEP, ARG1, [ARG2...]) 12174c3e29c03Smrg# ----------------------------- 12175c3e29c03Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12176c3e29c03Smrg# associated separator. 12177c3e29c03Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12178c3e29c03Smrg# versions in m4sugar had bugs. 12179c3e29c03Smrgm4_define([lt_join], 12180c3e29c03Smrg[m4_if([$#], [1], [], 12181c3e29c03Smrg [$#], [2], [[$2]], 12182c3e29c03Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12183c3e29c03Smrgm4_define([_lt_join], 12184c3e29c03Smrg[m4_if([$#$2], [2], [], 12185c3e29c03Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 1218626372658Smrg 1218726372658Smrg 12188c3e29c03Smrg# lt_car(LIST) 12189c3e29c03Smrg# lt_cdr(LIST) 12190c3e29c03Smrg# ------------ 12191c3e29c03Smrg# Manipulate m4 lists. 12192c3e29c03Smrg# These macros are necessary as long as will still need to support 12193c3e29c03Smrg# Autoconf-2.59, which quotes differently. 12194c3e29c03Smrgm4_define([lt_car], [[$1]]) 12195c3e29c03Smrgm4_define([lt_cdr], 12196c3e29c03Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12197c3e29c03Smrg [$#], 1, [], 12198c3e29c03Smrg [m4_dquote(m4_shift($@))])]) 12199c3e29c03Smrgm4_define([lt_unquote], $1) 12200c3e29c03Smrg 122014b0ead49Smrg 12202c3e29c03Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12203c3e29c03Smrg# ------------------------------------------ 12204c3e29c03Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12205c3e29c03Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 12206c3e29c03Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12207c3e29c03Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12208c3e29c03Smrg# than defined and empty). 122094e7590efSmrg# 12210c3e29c03Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 12211c3e29c03Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12212c3e29c03Smrgm4_define([lt_append], 12213c3e29c03Smrg[m4_define([$1], 12214c3e29c03Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 122154e7590efSmrg 122164b0ead49Smrg 122174e7590efSmrg 12218c3e29c03Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12219c3e29c03Smrg# ---------------------------------------------------------- 12220c3e29c03Smrg# Produce a SEP delimited list of all paired combinations of elements of 12221c3e29c03Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12222c3e29c03Smrg# has the form PREFIXmINFIXSUFFIXn. 12223c3e29c03Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 12224c3e29c03Smrgm4_define([lt_combine], 12225c3e29c03Smrg[m4_if(m4_eval([$# > 3]), [1], 12226c3e29c03Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12227c3e29c03Smrg[[m4_foreach([_Lt_prefix], [$2], 12228c3e29c03Smrg [m4_foreach([_Lt_suffix], 12229c3e29c03Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12230c3e29c03Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12231c3e29c03Smrg 12232c3e29c03Smrg 12233c3e29c03Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12234c3e29c03Smrg# ----------------------------------------------------------------------- 12235c3e29c03Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12236c3e29c03Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12237c3e29c03Smrgm4_define([lt_if_append_uniq], 12238c3e29c03Smrg[m4_ifdef([$1], 12239c3e29c03Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12240c3e29c03Smrg [lt_append([$1], [$2], [$3])$4], 12241c3e29c03Smrg [$5])], 12242c3e29c03Smrg [lt_append([$1], [$2], [$3])$4])]) 12243c3e29c03Smrg 12244c3e29c03Smrg 12245c3e29c03Smrg# lt_dict_add(DICT, KEY, VALUE) 12246c3e29c03Smrg# ----------------------------- 12247c3e29c03Smrgm4_define([lt_dict_add], 12248c3e29c03Smrg[m4_define([$1($2)], [$3])]) 122494b0ead49Smrg 122504e7590efSmrg 12251c3e29c03Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12252c3e29c03Smrg# -------------------------------------------- 12253c3e29c03Smrgm4_define([lt_dict_add_subkey], 12254c3e29c03Smrg[m4_define([$1($2:$3)], [$4])]) 122554e7590efSmrg 122564e7590efSmrg 12257c3e29c03Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12258c3e29c03Smrg# ---------------------------------- 12259c3e29c03Smrgm4_define([lt_dict_fetch], 12260c3e29c03Smrg[m4_ifval([$3], 12261c3e29c03Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12262c3e29c03Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 122634b0ead49Smrg 122644b0ead49Smrg 12265c3e29c03Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12266c3e29c03Smrg# ----------------------------------------------------------------- 12267c3e29c03Smrgm4_define([lt_if_dict_fetch], 12268c3e29c03Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12269c3e29c03Smrg [$5], 12270c3e29c03Smrg [$6])]) 122714b0ead49Smrg 1227252b01e16Smrg 12273c3e29c03Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12274c3e29c03Smrg# -------------------------------------------------------------- 12275c3e29c03Smrgm4_define([lt_dict_filter], 12276c3e29c03Smrg[m4_if([$5], [], [], 12277c3e29c03Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 12278c3e29c03Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12279c3e29c03Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12280c3e29c03Smrg]) 1228126372658Smrg 12282c3e29c03Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12283c3e29c03Smrg# 12284c3e29c03Smrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12285c3e29c03Smrg# Inc. 12286c3e29c03Smrg# Written by Scott James Remnant, 2004 12287c3e29c03Smrg# 12288c3e29c03Smrg# This file is free software; the Free Software Foundation gives 12289c3e29c03Smrg# unlimited permission to copy and/or distribute it, with or without 12290c3e29c03Smrg# modifications, as long as this notice is preserved. 1229152b01e16Smrg 12292c3e29c03Smrg# @configure_input@ 1229349dc963fSmrg 12294c3e29c03Smrg# serial 4245 ltversion.m4 12295c3e29c03Smrg# This file is part of GNU Libtool 1229649dc963fSmrg 12297c3e29c03Smrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12298c3e29c03Smrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 1229949dc963fSmrg 12300c3e29c03SmrgAC_DEFUN([LTVERSION_VERSION], 12301c3e29c03Smrg[macro_version='2.4.7' 12302c3e29c03Smrgmacro_revision='2.4.7' 12303c3e29c03Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12304c3e29c03Smrg_LT_DECL(, macro_revision, 0) 12305c3e29c03Smrg]) 1230649dc963fSmrg 12307c3e29c03Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12308c3e29c03Smrg# 12309c3e29c03Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12310c3e29c03Smrg# Software Foundation, Inc. 12311c3e29c03Smrg# Written by Scott James Remnant, 2004. 12312c3e29c03Smrg# 12313c3e29c03Smrg# This file is free software; the Free Software Foundation gives 12314c3e29c03Smrg# unlimited permission to copy and/or distribute it, with or without 12315c3e29c03Smrg# modifications, as long as this notice is preserved. 123164e7590efSmrg 12317c3e29c03Smrg# serial 5 lt~obsolete.m4 1231826372658Smrg 12319c3e29c03Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 12320c3e29c03Smrg# 12321c3e29c03Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12322c3e29c03Smrg# which have later been changed to m4_define as they aren't part of the 12323c3e29c03Smrg# exported API, or moved to Autoconf or Automake where they belong. 12324c3e29c03Smrg# 12325c3e29c03Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12326c3e29c03Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12327c3e29c03Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 12328c3e29c03Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12329c3e29c03Smrg# and doesn't know about Autoconf macros at all.) 12330c3e29c03Smrg# 12331c3e29c03Smrg# So we provide this file, which has a silly filename so it's always 12332c3e29c03Smrg# included after everything else. This provides aclocal with the 12333c3e29c03Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12334c3e29c03Smrg# because those macros already exist, or will be overwritten later. 12335c3e29c03Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12336c3e29c03Smrg# 12337c3e29c03Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12338c3e29c03Smrg# Yes, that means every name once taken will need to remain here until 12339c3e29c03Smrg# we give up compatibility with versions before 1.7, at which point 12340c3e29c03Smrg# we need to keep only those names which we still refer to. 1234149dc963fSmrg 12342c3e29c03Smrg# This is to help aclocal find these macros, as it can't see m4_define. 12343c3e29c03SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 1234449dc963fSmrg 12345c3e29c03Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12346c3e29c03Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12347c3e29c03Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12348c3e29c03Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12349c3e29c03Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12350c3e29c03Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12351c3e29c03Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12352c3e29c03Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12353c3e29c03Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12354c3e29c03Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12355c3e29c03Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12356c3e29c03Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12357c3e29c03Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12358c3e29c03Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12359c3e29c03Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12360c3e29c03Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12361c3e29c03Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12362c3e29c03Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12363c3e29c03Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12364c3e29c03Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12365c3e29c03Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12366c3e29c03Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12367c3e29c03Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12368c3e29c03Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12369c3e29c03Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12370c3e29c03Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12371c3e29c03Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12372c3e29c03Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12373c3e29c03Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12374c3e29c03Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12375c3e29c03Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12376c3e29c03Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12377c3e29c03Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12378c3e29c03Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12379c3e29c03Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12380c3e29c03Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12381c3e29c03Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12382c3e29c03Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12383c3e29c03Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12384c3e29c03Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12385c3e29c03Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12386c3e29c03Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12387c3e29c03Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12388c3e29c03Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12389c3e29c03Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12390c3e29c03Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12391c3e29c03Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12392c3e29c03Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12393c3e29c03Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12394c3e29c03Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12395c3e29c03Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12396c3e29c03Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12397c3e29c03Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12398c3e29c03Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12399c3e29c03Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12400c3e29c03Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12401c3e29c03Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12402c3e29c03Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12403c3e29c03Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12404c3e29c03Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12405c3e29c03Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 124064b0ead49Smrg 12407