aclocal.m4 revision 515ec619
1515ec619Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2fc544a13Smrg 3515ec619Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4ff559fabSmrg 5ff559fabSmrg# This file is free software; the Free Software Foundation 6ff559fabSmrg# gives unlimited permission to copy and/or distribute it, 7ff559fabSmrg# with or without modifications, as long as this notice is preserved. 8ff559fabSmrg 9ff559fabSmrg# This program is distributed in the hope that it will be useful, 10ff559fabSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ff559fabSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ff559fabSmrg# PARTICULAR PURPOSE. 13ff559fabSmrg 14fc544a13Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 157a3b38f7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 167a3b38f7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17515ec619Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18515ec619Smrg[m4_warning([this file was generated for autoconf 2.71. 197a3b38f7SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 207a3b38f7SmrgIf you have problems, you may need to regenerate the build system entirely. 21fc544a13SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22ff559fabSmrg 23515ec619Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 246fc0178dSmrg# 25515ec619Smrg# This file is free software; the Free Software Foundation 26515ec619Smrg# gives unlimited permission to copy and/or distribute it, 27515ec619Smrg# with or without modifications, as long as this notice is preserved. 2844dda7b2Smrg 29515ec619Smrg# AM_AUTOMAKE_VERSION(VERSION) 30515ec619Smrg# ---------------------------- 31515ec619Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32515ec619Smrg# generated from the m4 files accompanying Automake X.Y. 33515ec619Smrg# (This private macro should not be called outside this file.) 34515ec619SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35515ec619Smrg[am__api_version='1.16' 36515ec619Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37515ec619Smrgdnl require some minimum version. Point them to the right macro. 38515ec619Smrgm4_if([$1], [1.16.5], [], 39515ec619Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 406fc0178dSmrg]) 4144dda7b2Smrg 42515ec619Smrg# _AM_AUTOCONF_VERSION(VERSION) 43515ec619Smrg# ----------------------------- 44515ec619Smrg# aclocal traces this macro to find the Autoconf version. 45515ec619Smrg# This is a private macro too. Using m4_define simplifies 46515ec619Smrg# the logic in aclocal, which can simply ignore this definition. 47515ec619Smrgm4_define([_AM_AUTOCONF_VERSION], []) 4844dda7b2Smrg 49515ec619Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50515ec619Smrg# ------------------------------- 51515ec619Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52515ec619Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53515ec619SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54515ec619Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 55515ec619Smrgm4_ifndef([AC_AUTOCONF_VERSION], 56515ec619Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57515ec619Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5844dda7b2Smrg 59515ec619Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 607a3b38f7Smrg 61515ec619Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62515ec619Smrg# 63515ec619Smrg# This file is free software; the Free Software Foundation 64515ec619Smrg# gives unlimited permission to copy and/or distribute it, 65515ec619Smrg# with or without modifications, as long as this notice is preserved. 66ff559fabSmrg 67515ec619Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68515ec619Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69515ec619Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70515ec619Smrg# 71515ec619Smrg# Of course, Automake must honor this variable whenever it calls a 72515ec619Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 73515ec619Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74515ec619Smrg# depending on how configure is run. This is pretty annoying, since 75515ec619Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76515ec619Smrg# source directory, any form will work fine, but in subdirectories a 77515ec619Smrg# relative path needs to be adjusted first. 78515ec619Smrg# 79515ec619Smrg# $ac_aux_dir/missing 80515ec619Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 81515ec619Smrg# $top_srcdir/$ac_aux_dir/missing 82515ec619Smrg# fails if $ac_aux_dir is absolute, 83515ec619Smrg# fails when called from a subdirectory in a VPATH build with 84515ec619Smrg# a relative $ac_aux_dir 85515ec619Smrg# 86515ec619Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87515ec619Smrg# are both prefixed by $srcdir. In an in-source build this is usually 88515ec619Smrg# harmless because $srcdir is '.', but things will broke when you 89515ec619Smrg# start a VPATH build or use an absolute $srcdir. 90515ec619Smrg# 91515ec619Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92515ec619Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93515ec619Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94515ec619Smrg# and then we would define $MISSING as 95515ec619Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 96515ec619Smrg# This will work as long as MISSING is not called from configure, because 97515ec619Smrg# unfortunately $(top_srcdir) has no meaning in configure. 98515ec619Smrg# However there are other variables, like CC, which are often used in 99515ec619Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100515ec619Smrg# 101515ec619Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 102515ec619Smrg# absolute PATH. The drawback is that using absolute paths prevent a 103515ec619Smrg# configured tree to be moved without reconfiguration. 104515ec619Smrg 105515ec619SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106515ec619Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107515ec619Smrg# Expand $ac_aux_dir to an absolute path. 108515ec619Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1097a3b38f7Smrg]) 110ff559fabSmrg 111515ec619Smrg# AM_CONDITIONAL -*- Autoconf -*- 112ff559fabSmrg 113515ec619Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114515ec619Smrg# 115515ec619Smrg# This file is free software; the Free Software Foundation 116515ec619Smrg# gives unlimited permission to copy and/or distribute it, 117515ec619Smrg# with or without modifications, as long as this notice is preserved. 118ff559fabSmrg 119515ec619Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120515ec619Smrg# ------------------------------------- 121515ec619Smrg# Define a conditional. 122515ec619SmrgAC_DEFUN([AM_CONDITIONAL], 123515ec619Smrg[AC_PREREQ([2.52])dnl 124515ec619Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125515ec619Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126515ec619SmrgAC_SUBST([$1_TRUE])dnl 127515ec619SmrgAC_SUBST([$1_FALSE])dnl 128515ec619Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129515ec619Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130515ec619Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131515ec619Smrgif $2; then 132515ec619Smrg $1_TRUE= 133515ec619Smrg $1_FALSE='#' 134515ec619Smrgelse 135515ec619Smrg $1_TRUE='#' 136515ec619Smrg $1_FALSE= 137515ec619Smrgfi 138515ec619SmrgAC_CONFIG_COMMANDS_PRE( 139515ec619Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140515ec619Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 141515ec619SmrgUsually this means the macro was only invoked conditionally.]]) 142515ec619Smrgfi])]) 143ff559fabSmrg 144515ec619Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145515ec619Smrg# 146515ec619Smrg# This file is free software; the Free Software Foundation 147515ec619Smrg# gives unlimited permission to copy and/or distribute it, 148515ec619Smrg# with or without modifications, as long as this notice is preserved. 149ff559fabSmrg 150ff559fabSmrg 151515ec619Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152515ec619Smrg# written in clear, in which case automake, when reading aclocal.m4, 153515ec619Smrg# will think it sees a *use*, and therefore will trigger all it's 154515ec619Smrg# C support machinery. Also note that it means that autoscan, seeing 155515ec619Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156ff559fabSmrg 157ff559fabSmrg 158515ec619Smrg# _AM_DEPENDENCIES(NAME) 159515ec619Smrg# ---------------------- 160515ec619Smrg# See how the compiler implements dependency checking. 161515ec619Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162515ec619Smrg# We try a few techniques and use that to set a single cache variable. 163515ec619Smrg# 164515ec619Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165515ec619Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166515ec619Smrg# dependency, and given that the user is not expected to run this macro, 167515ec619Smrg# just rely on AC_PROG_CC. 168515ec619SmrgAC_DEFUN([_AM_DEPENDENCIES], 169515ec619Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170515ec619SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171515ec619SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172515ec619SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1737a3b38f7Smrg 174515ec619Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175515ec619Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176515ec619Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177515ec619Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178515ec619Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179515ec619Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180515ec619Smrg [depcc="$$1" am_compiler_list=]) 1817a3b38f7Smrg 182515ec619SmrgAC_CACHE_CHECK([dependency style of $depcc], 183515ec619Smrg [am_cv_$1_dependencies_compiler_type], 184515ec619Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185515ec619Smrg # We make a subdir and do the tests there. Otherwise we can end up 186515ec619Smrg # making bogus files that we don't know about and never remove. For 187515ec619Smrg # instance it was reported that on HP-UX the gcc test will end up 188515ec619Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 189515ec619Smrg # in D". 190515ec619Smrg rm -rf conftest.dir 191515ec619Smrg mkdir conftest.dir 192515ec619Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 193515ec619Smrg # using a relative directory. 194515ec619Smrg cp "$am_depcomp" conftest.dir 195515ec619Smrg cd conftest.dir 196515ec619Smrg # We will build objects and dependencies in a subdirectory because 197515ec619Smrg # it helps to detect inapplicable dependency modes. For instance 198515ec619Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 199515ec619Smrg # side effect of compilation, but ICC will put the dependencies in 200515ec619Smrg # the current directory while Tru64 will put them in the object 201515ec619Smrg # directory. 202515ec619Smrg mkdir sub 203ff559fabSmrg 204515ec619Smrg am_cv_$1_dependencies_compiler_type=none 205515ec619Smrg if test "$am_compiler_list" = ""; then 206515ec619Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207515ec619Smrg fi 208515ec619Smrg am__universal=false 209515ec619Smrg m4_case([$1], [CC], 210515ec619Smrg [case " $depcc " in #( 211515ec619Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212515ec619Smrg esac], 213515ec619Smrg [CXX], 214515ec619Smrg [case " $depcc " in #( 215515ec619Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216515ec619Smrg esac]) 217ff559fabSmrg 218515ec619Smrg for depmode in $am_compiler_list; do 219515ec619Smrg # Setup a source with many dependencies, because some compilers 220515ec619Smrg # like to wrap large dependency lists on column 80 (with \), and 221515ec619Smrg # we should not choose a depcomp mode which is confused by this. 222515ec619Smrg # 223515ec619Smrg # We need to recreate these files for each test, as the compiler may 224515ec619Smrg # overwrite some of them when testing with obscure command lines. 225515ec619Smrg # This happens at least with the AIX C compiler. 226515ec619Smrg : > sub/conftest.c 227515ec619Smrg for i in 1 2 3 4 5 6; do 228515ec619Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229515ec619Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230515ec619Smrg # Solaris 10 /bin/sh. 231515ec619Smrg echo '/* dummy */' > sub/conftst$i.h 23244dda7b2Smrg done 233515ec619Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234ff559fabSmrg 235515ec619Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236515ec619Smrg # mode. It turns out that the SunPro C++ compiler does not properly 237515ec619Smrg # handle '-M -o', and we need to detect this. Also, some Intel 238515ec619Smrg # versions had trouble with output in subdirs. 239515ec619Smrg am__obj=sub/conftest.${OBJEXT-o} 240515ec619Smrg am__minus_obj="-o $am__obj" 241515ec619Smrg case $depmode in 242515ec619Smrg gcc) 243515ec619Smrg # This depmode causes a compiler race in universal mode. 244515ec619Smrg test "$am__universal" = false || continue 245515ec619Smrg ;; 246515ec619Smrg nosideeffect) 247515ec619Smrg # After this tag, mechanisms are not by side-effect, so they'll 248515ec619Smrg # only be used when explicitly requested. 249515ec619Smrg if test "x$enable_dependency_tracking" = xyes; then 250515ec619Smrg continue 251515ec619Smrg else 252515ec619Smrg break 253515ec619Smrg fi 254515ec619Smrg ;; 255515ec619Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256515ec619Smrg # This compiler won't grok '-c -o', but also, the minuso test has 257515ec619Smrg # not run yet. These depmodes are late enough in the game, and 258515ec619Smrg # so weak that their functioning should not be impacted. 259515ec619Smrg am__obj=conftest.${OBJEXT-o} 260515ec619Smrg am__minus_obj= 261515ec619Smrg ;; 262515ec619Smrg none) break ;; 263515ec619Smrg esac 264515ec619Smrg if depmode=$depmode \ 265515ec619Smrg source=sub/conftest.c object=$am__obj \ 266515ec619Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267515ec619Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268515ec619Smrg >/dev/null 2>conftest.err && 269515ec619Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270515ec619Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271515ec619Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272515ec619Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273515ec619Smrg # icc doesn't choke on unknown options, it will just issue warnings 274515ec619Smrg # or remarks (even with -Werror). So we grep stderr for any message 275515ec619Smrg # that says an option was ignored or not supported. 276515ec619Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277515ec619Smrg # icc: Command line warning: ignoring option '-M'; no argument required 278515ec619Smrg # The diagnosis changed in icc 8.0: 279515ec619Smrg # icc: Command line remark: option '-MP' not supported 280515ec619Smrg if (grep 'ignoring option' conftest.err || 281515ec619Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282515ec619Smrg am_cv_$1_dependencies_compiler_type=$depmode 283515ec619Smrg break 284515ec619Smrg fi 285515ec619Smrg fi 286515ec619Smrg done 2877a3b38f7Smrg 288515ec619Smrg cd .. 289515ec619Smrg rm -rf conftest.dir 290515ec619Smrgelse 291515ec619Smrg am_cv_$1_dependencies_compiler_type=none 292515ec619Smrgfi 293515ec619Smrg]) 294515ec619SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295515ec619SmrgAM_CONDITIONAL([am__fastdep$1], [ 296515ec619Smrg test "x$enable_dependency_tracking" != xno \ 297515ec619Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 29844dda7b2Smrg]) 299ff559fabSmrg 300ff559fabSmrg 301515ec619Smrg# AM_SET_DEPDIR 302515ec619Smrg# ------------- 303515ec619Smrg# Choose a directory name for dependency files. 304515ec619Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305515ec619SmrgAC_DEFUN([AM_SET_DEPDIR], 306515ec619Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307515ec619SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308515ec619Smrg]) 3096fc0178dSmrg 3106fc0178dSmrg 311515ec619Smrg# AM_DEP_TRACK 312515ec619Smrg# ------------ 313515ec619SmrgAC_DEFUN([AM_DEP_TRACK], 314515ec619Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 315515ec619SmrgAS_HELP_STRING( 316515ec619Smrg [--enable-dependency-tracking], 317515ec619Smrg [do not reject slow dependency extractors]) 318515ec619SmrgAS_HELP_STRING( 319515ec619Smrg [--disable-dependency-tracking], 320515ec619Smrg [speeds up one-time build])]) 321515ec619Smrgif test "x$enable_dependency_tracking" != xno; then 322515ec619Smrg am_depcomp="$ac_aux_dir/depcomp" 323515ec619Smrg AMDEPBACKSLASH='\' 324515ec619Smrg am__nodep='_no' 32544dda7b2Smrgfi 326515ec619SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327515ec619SmrgAC_SUBST([AMDEPBACKSLASH])dnl 328515ec619Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329515ec619SmrgAC_SUBST([am__nodep])dnl 330515ec619Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 33144dda7b2Smrg]) 3327a3b38f7Smrg 333515ec619Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3347a3b38f7Smrg 335515ec619Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 336515ec619Smrg# 337515ec619Smrg# This file is free software; the Free Software Foundation 338515ec619Smrg# gives unlimited permission to copy and/or distribute it, 339515ec619Smrg# with or without modifications, as long as this notice is preserved. 3407a3b38f7Smrg 341515ec619Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 342515ec619Smrg# ------------------------------ 343515ec619SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344515ec619Smrg[{ 345515ec619Smrg # Older Autoconf quotes --file arguments for eval, but not when files 346515ec619Smrg # are listed without --file. Let's play safe and only enable the eval 347515ec619Smrg # if we detect the quoting. 348515ec619Smrg # TODO: see whether this extra hack can be removed once we start 349515ec619Smrg # requiring Autoconf 2.70 or later. 350515ec619Smrg AS_CASE([$CONFIG_FILES], 351515ec619Smrg [*\'*], [eval set x "$CONFIG_FILES"], 352515ec619Smrg [*], [set x $CONFIG_FILES]) 353515ec619Smrg shift 354515ec619Smrg # Used to flag and report bootstrapping failures. 355515ec619Smrg am_rc=0 356515ec619Smrg for am_mf 357515ec619Smrg do 358515ec619Smrg # Strip MF so we end up with the name of the file. 359515ec619Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360515ec619Smrg # Check whether this is an Automake generated Makefile which includes 361515ec619Smrg # dependency-tracking related rules and includes. 362515ec619Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 363515ec619Smrg # limit of 2048, but all sed's we know have understand at least 4000. 364515ec619Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365515ec619Smrg || continue 366515ec619Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 367515ec619Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 368515ec619Smrg AM_RUN_LOG([cd "$am_dirpart" \ 369515ec619Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 370515ec619Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 371515ec619Smrg done 372515ec619Smrg if test $am_rc -ne 0; then 373515ec619Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374515ec619Smrg for automatic dependency tracking. If GNU make was not used, consider 375515ec619Smrg re-running the configure script with MAKE="gmake" (or whatever is 376515ec619Smrg necessary). You can also try re-running configure with the 377515ec619Smrg '--disable-dependency-tracking' option to at least be able to build 378515ec619Smrg the package (albeit without support for automatic dependency tracking).]) 3796fc0178dSmrg fi 380515ec619Smrg AS_UNSET([am_dirpart]) 381515ec619Smrg AS_UNSET([am_filepart]) 382515ec619Smrg AS_UNSET([am_mf]) 383515ec619Smrg AS_UNSET([am_rc]) 384515ec619Smrg rm -f conftest-deps.mk 385515ec619Smrg} 386515ec619Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3877a3b38f7Smrg 3887a3b38f7Smrg 389515ec619Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 390515ec619Smrg# ----------------------------- 391515ec619Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 392515ec619Smrg# 393515ec619Smrg# This code is only required when automatic dependency tracking is enabled. 394515ec619Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395515ec619Smrg# order to bootstrap the dependency handling code. 396515ec619SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397515ec619Smrg[AC_CONFIG_COMMANDS([depfiles], 398515ec619Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399515ec619Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 4007a3b38f7Smrg 401515ec619Smrg# Do all the work for Automake. -*- Autoconf -*- 4027a3b38f7Smrg 403515ec619Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 404515ec619Smrg# 405515ec619Smrg# This file is free software; the Free Software Foundation 406515ec619Smrg# gives unlimited permission to copy and/or distribute it, 407515ec619Smrg# with or without modifications, as long as this notice is preserved. 4087a3b38f7Smrg 409515ec619Smrg# This macro actually does too much. Some checks are only needed if 410515ec619Smrg# your package does certain things. But this isn't really a big deal. 411fc544a13Smrg 412515ec619Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 413515ec619Smrgm4_define([AC_PROG_CC], 414515ec619Smrgm4_defn([AC_PROG_CC]) 415515ec619Smrg[_AM_PROG_CC_C_O 416515ec619Smrg]) 417ff559fabSmrg 418515ec619Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419515ec619Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 420515ec619Smrg# ----------------------------------------------- 421515ec619Smrg# The call with PACKAGE and VERSION arguments is the old style 422515ec619Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 423515ec619Smrg# and VERSION should now be passed to AC_INIT and removed from 424515ec619Smrg# the call to AM_INIT_AUTOMAKE. 425515ec619Smrg# We support both call styles for the transition. After 426515ec619Smrg# the next Automake release, Autoconf can make the AC_INIT 427515ec619Smrg# arguments mandatory, and then we can depend on a new Autoconf 428515ec619Smrg# release and drop the old call support. 429515ec619SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 430515ec619Smrg[AC_PREREQ([2.65])dnl 431515ec619Smrgm4_ifdef([_$0_ALREADY_INIT], 432515ec619Smrg [m4_fatal([$0 expanded multiple times 433515ec619Smrg]m4_defn([_$0_ALREADY_INIT]))], 434515ec619Smrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435515ec619Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 436515ec619Smrgdnl the ones we care about. 437515ec619Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438515ec619SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439515ec619SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 440515ec619Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 441515ec619Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442515ec619Smrg # is not polluted with repeated "-I." 443515ec619Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444515ec619Smrg # test to see if srcdir already configured 445515ec619Smrg if test -f $srcdir/config.status; then 446515ec619Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 447515ec619Smrg fi 448515ec619Smrgfi 449ff559fabSmrg 450515ec619Smrg# test whether we have cygpath 451515ec619Smrgif test -z "$CYGPATH_W"; then 452515ec619Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 453515ec619Smrg CYGPATH_W='cygpath -w' 454515ec619Smrg else 455515ec619Smrg CYGPATH_W=echo 456515ec619Smrg fi 457515ec619Smrgfi 458515ec619SmrgAC_SUBST([CYGPATH_W]) 459fc544a13Smrg 460515ec619Smrg# Define the identity of the package. 461515ec619Smrgdnl Distinguish between old-style and new-style calls. 462515ec619Smrgm4_ifval([$2], 463515ec619Smrg[AC_DIAGNOSE([obsolete], 464515ec619Smrg [$0: two- and three-arguments forms are deprecated.]) 465515ec619Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466515ec619Smrg AC_SUBST([PACKAGE], [$1])dnl 467515ec619Smrg AC_SUBST([VERSION], [$2])], 468515ec619Smrg[_AM_SET_OPTIONS([$1])dnl 469515ec619Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 470515ec619Smrgm4_if( 471515ec619Smrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 472515ec619Smrg [ok:ok],, 473515ec619Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474515ec619Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475515ec619Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476fc544a13Smrg 477515ec619Smrg_AM_IF_OPTION([no-define],, 478515ec619Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 479515ec619Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 480fc544a13Smrg 481515ec619Smrg# Some tools Automake needs. 482515ec619SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 483515ec619SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 484515ec619SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 485515ec619SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 486515ec619SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 487515ec619SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 488515ec619SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 489515ec619SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490515ec619SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 491515ec619SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 492515ec619Smrg# For better backward compatibility. To be removed once Automake 1.9.x 493515ec619Smrg# dies out for good. For more background, see: 494515ec619Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495515ec619Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 496515ec619SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497515ec619Smrg# We need awk for the "check" target (and possibly the TAP driver). The 498515ec619Smrg# system "awk" is bad on some platforms. 499515ec619SmrgAC_REQUIRE([AC_PROG_AWK])dnl 500515ec619SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 501515ec619SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 502515ec619Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503515ec619Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504515ec619Smrg [_AM_PROG_TAR([v7])])]) 505515ec619Smrg_AM_IF_OPTION([no-dependencies],, 506515ec619Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 507515ec619Smrg [_AM_DEPENDENCIES([CC])], 508515ec619Smrg [m4_define([AC_PROG_CC], 509515ec619Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510515ec619SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 511515ec619Smrg [_AM_DEPENDENCIES([CXX])], 512515ec619Smrg [m4_define([AC_PROG_CXX], 513515ec619Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514515ec619SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 515515ec619Smrg [_AM_DEPENDENCIES([OBJC])], 516515ec619Smrg [m4_define([AC_PROG_OBJC], 517515ec619Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 518515ec619SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 519515ec619Smrg [_AM_DEPENDENCIES([OBJCXX])], 520515ec619Smrg [m4_define([AC_PROG_OBJCXX], 521515ec619Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 5226fc0178dSmrg]) 523515ec619Smrg# Variables for tags utilities; see am/tags.am 524515ec619Smrgif test -z "$CTAGS"; then 525515ec619Smrg CTAGS=ctags 526515ec619Smrgfi 527515ec619SmrgAC_SUBST([CTAGS]) 528515ec619Smrgif test -z "$ETAGS"; then 529515ec619Smrg ETAGS=etags 530515ec619Smrgfi 531515ec619SmrgAC_SUBST([ETAGS]) 532515ec619Smrgif test -z "$CSCOPE"; then 533515ec619Smrg CSCOPE=cscope 534515ec619Smrgfi 535515ec619SmrgAC_SUBST([CSCOPE]) 536fc544a13Smrg 537515ec619SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 538515ec619Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 539515ec619Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 540515ec619Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541515ec619SmrgAC_CONFIG_COMMANDS_PRE(dnl 542515ec619Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 543515ec619Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544ff559fabSmrg 545515ec619Smrg# POSIX will say in a future version that running "rm -f" with no argument 546515ec619Smrg# is OK; and we want to be able to make that assumption in our Makefile 547515ec619Smrg# recipes. So use an aggressive probe to check that the usage we want is 548515ec619Smrg# actually supported "in the wild" to an acceptable degree. 549515ec619Smrg# See automake bug#10828. 550515ec619Smrg# To make any issue more visible, cause the running configure to be aborted 551515ec619Smrg# by default if the 'rm' program in use doesn't match our expectations; the 552515ec619Smrg# user can still override this though. 553515ec619Smrgif rm -f && rm -fr && rm -rf; then : OK; else 554515ec619Smrg cat >&2 <<'END' 555515ec619SmrgOops! 556ff559fabSmrg 557515ec619SmrgYour 'rm' program seems unable to run without file operands specified 558515ec619Smrgon the command line, even when the '-f' option is present. This is contrary 559515ec619Smrgto the behaviour of most rm programs out there, and not conforming with 560515ec619Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 561ff559fabSmrg 562515ec619SmrgPlease tell bug-automake@gnu.org about your system, including the value 563515ec619Smrgof your $PATH and any error possibly output before this message. This 564515ec619Smrgcan help us improve future automake versions. 565ff559fabSmrg 566515ec619SmrgEND 567515ec619Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 568515ec619Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 569515ec619Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 570515ec619Smrg echo >&2 571515ec619Smrg else 572515ec619Smrg cat >&2 <<'END' 573515ec619SmrgAborting the configuration process, to ensure you take notice of the issue. 574ff559fabSmrg 575515ec619SmrgYou can download and install GNU coreutils to get an 'rm' implementation 576515ec619Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 577ff559fabSmrg 578515ec619SmrgIf you want to complete the configuration process using your problematic 579515ec619Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 580515ec619Smrgto "yes", and re-run configure. 5817a3b38f7Smrg 582515ec619SmrgEND 583515ec619Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 584515ec619Smrg fi 585515ec619Smrgfi 586515ec619Smrgdnl The trailing newline in this macro's definition is deliberate, for 587515ec619Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 588515ec619Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 5896fc0178dSmrg]) 59044dda7b2Smrg 591515ec619Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592515ec619Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593515ec619Smrgdnl mangled by Autoconf and run in a shell conditional statement. 594515ec619Smrgm4_define([_AC_COMPILER_EXEEXT], 595515ec619Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 596ff559fabSmrg 597515ec619Smrg# When config.status generates a header, we must update the stamp-h file. 598515ec619Smrg# This file resides in the same directory as the config header 599515ec619Smrg# that is generated. The stamp files are numbered to have different names. 6007a3b38f7Smrg 601515ec619Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602515ec619Smrg# loop where config.status creates the headers, so we can generate 603515ec619Smrg# our stamp files there. 604515ec619SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605515ec619Smrg[# Compute $1's index in $config_headers. 606515ec619Smrg_am_arg=$1 607515ec619Smrg_am_stamp_count=1 608515ec619Smrgfor _am_header in $config_headers :; do 609515ec619Smrg case $_am_header in 610515ec619Smrg $_am_arg | $_am_arg:* ) 611515ec619Smrg break ;; 612515ec619Smrg * ) 613515ec619Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614515ec619Smrg esac 615515ec619Smrgdone 616515ec619Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 6177a3b38f7Smrg 618515ec619Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 619515ec619Smrg# 620515ec619Smrg# This file is free software; the Free Software Foundation 621515ec619Smrg# gives unlimited permission to copy and/or distribute it, 622515ec619Smrg# with or without modifications, as long as this notice is preserved. 6236fc0178dSmrg 624515ec619Smrg# AM_PROG_INSTALL_SH 625515ec619Smrg# ------------------ 626515ec619Smrg# Define $install_sh. 627515ec619SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 628515ec619Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629515ec619Smrgif test x"${install_sh+set}" != xset; then 630515ec619Smrg case $am_aux_dir in 631515ec619Smrg *\ * | *\ *) 632515ec619Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633515ec619Smrg *) 634515ec619Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 635515ec619Smrg esac 636515ec619Smrgfi 637515ec619SmrgAC_SUBST([install_sh])]) 638ff559fabSmrg 639515ec619Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 640515ec619Smrg# 641515ec619Smrg# This file is free software; the Free Software Foundation 642515ec619Smrg# gives unlimited permission to copy and/or distribute it, 643515ec619Smrg# with or without modifications, as long as this notice is preserved. 644ff559fabSmrg 645515ec619Smrg# Check whether the underlying file-system supports filenames 646515ec619Smrg# with a leading dot. For instance MS-DOS doesn't. 647515ec619SmrgAC_DEFUN([AM_SET_LEADING_DOT], 648515ec619Smrg[rm -rf .tst 2>/dev/null 649515ec619Smrgmkdir .tst 2>/dev/null 650515ec619Smrgif test -d .tst; then 651515ec619Smrg am__leading_dot=. 652515ec619Smrgelse 653515ec619Smrg am__leading_dot=_ 654515ec619Smrgfi 655515ec619Smrgrmdir .tst 2>/dev/null 656515ec619SmrgAC_SUBST([am__leading_dot])]) 6577a3b38f7Smrg 658515ec619Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 659ff559fabSmrg 660515ec619Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661515ec619Smrg# 662515ec619Smrg# This file is free software; the Free Software Foundation 663515ec619Smrg# gives unlimited permission to copy and/or distribute it, 664515ec619Smrg# with or without modifications, as long as this notice is preserved. 665ff559fabSmrg 666515ec619Smrg# AM_MAKE_INCLUDE() 667515ec619Smrg# ----------------- 668515ec619Smrg# Check whether make has an 'include' directive that can support all 669515ec619Smrg# the idioms we need for our automatic dependency tracking code. 670515ec619SmrgAC_DEFUN([AM_MAKE_INCLUDE], 671515ec619Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672515ec619Smrgcat > confinc.mk << 'END' 673515ec619Smrgam__doit: 674515ec619Smrg @echo this is the am__doit target >confinc.out 675515ec619Smrg.PHONY: am__doit 676515ec619SmrgEND 677515ec619Smrgam__include="#" 678515ec619Smrgam__quote= 679515ec619Smrg# BSD make does it like this. 680515ec619Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 681515ec619Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682515ec619Smrgecho 'include confinc.mk # ignored' > confmf.GNU 683515ec619Smrg_am_result=no 684515ec619Smrgfor s in GNU BSD; do 685515ec619Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686515ec619Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687515ec619Smrg ['0:this is the am__doit target'], 688515ec619Smrg [AS_CASE([$s], 689515ec619Smrg [BSD], [am__include='.include' am__quote='"'], 690515ec619Smrg [am__include='include' am__quote=''])]) 691515ec619Smrg if test "$am__include" != "#"; then 692515ec619Smrg _am_result="yes ($s style)" 693515ec619Smrg break 694515ec619Smrg fi 695515ec619Smrgdone 696515ec619Smrgrm -f confinc.* confmf.* 697515ec619SmrgAC_MSG_RESULT([${_am_result}]) 698515ec619SmrgAC_SUBST([am__include])]) 699515ec619SmrgAC_SUBST([am__quote])]) 700ff559fabSmrg 701515ec619Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702ff559fabSmrg 703515ec619Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704515ec619Smrg# 705515ec619Smrg# This file is free software; the Free Software Foundation 706515ec619Smrg# gives unlimited permission to copy and/or distribute it, 707515ec619Smrg# with or without modifications, as long as this notice is preserved. 708fc544a13Smrg 709515ec619Smrg# AM_MISSING_PROG(NAME, PROGRAM) 710515ec619Smrg# ------------------------------ 711515ec619SmrgAC_DEFUN([AM_MISSING_PROG], 712515ec619Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713515ec619Smrg$1=${$1-"${am_missing_run}$2"} 714515ec619SmrgAC_SUBST($1)]) 715515ec619Smrg 716515ec619Smrg# AM_MISSING_HAS_RUN 717515ec619Smrg# ------------------ 718515ec619Smrg# Define MISSING if not defined so far and test if it is modern enough. 719515ec619Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 720515ec619SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 721515ec619Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722515ec619SmrgAC_REQUIRE_AUX_FILE([missing])dnl 723515ec619Smrgif test x"${MISSING+set}" != xset; then 724515ec619Smrg MISSING="\${SHELL} '$am_aux_dir/missing'" 725515ec619Smrgfi 726515ec619Smrg# Use eval to expand $SHELL 727515ec619Smrgif eval "$MISSING --is-lightweight"; then 728515ec619Smrg am_missing_run="$MISSING " 729515ec619Smrgelse 730515ec619Smrg am_missing_run= 731515ec619Smrg AC_MSG_WARN(['missing' script is too old or missing]) 732515ec619Smrgfi 733515ec619Smrg]) 734ff559fabSmrg 735515ec619Smrg# Helper functions for option handling. -*- Autoconf -*- 736fc544a13Smrg 737515ec619Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738515ec619Smrg# 739515ec619Smrg# This file is free software; the Free Software Foundation 740515ec619Smrg# gives unlimited permission to copy and/or distribute it, 741515ec619Smrg# with or without modifications, as long as this notice is preserved. 742ff559fabSmrg 743515ec619Smrg# _AM_MANGLE_OPTION(NAME) 744515ec619Smrg# ----------------------- 745515ec619SmrgAC_DEFUN([_AM_MANGLE_OPTION], 746515ec619Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747fc544a13Smrg 748515ec619Smrg# _AM_SET_OPTION(NAME) 749515ec619Smrg# -------------------- 750515ec619Smrg# Set option NAME. Presently that only means defining a flag for this option. 751515ec619SmrgAC_DEFUN([_AM_SET_OPTION], 752515ec619Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753fc544a13Smrg 754515ec619Smrg# _AM_SET_OPTIONS(OPTIONS) 755515ec619Smrg# ------------------------ 756515ec619Smrg# OPTIONS is a space-separated list of Automake options. 757515ec619SmrgAC_DEFUN([_AM_SET_OPTIONS], 758515ec619Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759ff559fabSmrg 760515ec619Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761515ec619Smrg# ------------------------------------------- 762515ec619Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763515ec619SmrgAC_DEFUN([_AM_IF_OPTION], 764515ec619Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7657a3b38f7Smrg 766515ec619Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 767515ec619Smrg# 768515ec619Smrg# This file is free software; the Free Software Foundation 769515ec619Smrg# gives unlimited permission to copy and/or distribute it, 770515ec619Smrg# with or without modifications, as long as this notice is preserved. 771fc544a13Smrg 772515ec619Smrg# _AM_PROG_CC_C_O 773515ec619Smrg# --------------- 774515ec619Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 775515ec619Smrg# to automatically call this. 776515ec619SmrgAC_DEFUN([_AM_PROG_CC_C_O], 777515ec619Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778515ec619SmrgAC_REQUIRE_AUX_FILE([compile])dnl 779515ec619SmrgAC_LANG_PUSH([C])dnl 780515ec619SmrgAC_CACHE_CHECK( 781515ec619Smrg [whether $CC understands -c and -o together], 782515ec619Smrg [am_cv_prog_cc_c_o], 783515ec619Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 784515ec619Smrg # Make sure it works both with $CC and with simple cc. 785515ec619Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 786515ec619Smrg # compilers refuse to overwrite an existing .o file with -o, 787515ec619Smrg # though they will create one. 788515ec619Smrg am_cv_prog_cc_c_o=yes 789515ec619Smrg for am_i in 1 2; do 790515ec619Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 791515ec619Smrg && test -f conftest2.$ac_objext; then 792515ec619Smrg : OK 793515ec619Smrg else 794515ec619Smrg am_cv_prog_cc_c_o=no 795515ec619Smrg break 796515ec619Smrg fi 797515ec619Smrg done 798515ec619Smrg rm -f core conftest* 799515ec619Smrg unset am_i]) 800515ec619Smrgif test "$am_cv_prog_cc_c_o" != yes; then 801515ec619Smrg # Losing compiler, so override with the script. 802515ec619Smrg # FIXME: It is wrong to rewrite CC. 803515ec619Smrg # But if we don't then we get into trouble of one sort or another. 804515ec619Smrg # A longer-term fix would be to have automake use am__CC in this case, 805515ec619Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 806515ec619Smrg CC="$am_aux_dir/compile $CC" 807515ec619Smrgfi 808515ec619SmrgAC_LANG_POP([C])]) 8097a3b38f7Smrg 810515ec619Smrg# For backward compatibility. 811515ec619SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 8126fc0178dSmrg 813515ec619Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 81444dda7b2Smrg# 815515ec619Smrg# This file is free software; the Free Software Foundation 816515ec619Smrg# gives unlimited permission to copy and/or distribute it, 817515ec619Smrg# with or without modifications, as long as this notice is preserved. 8186fc0178dSmrg 819515ec619Smrg# AM_RUN_LOG(COMMAND) 820515ec619Smrg# ------------------- 821515ec619Smrg# Run COMMAND, save the exit status in ac_status, and log it. 822515ec619Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 823515ec619SmrgAC_DEFUN([AM_RUN_LOG], 824515ec619Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 825515ec619Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 826515ec619Smrg ac_status=$? 827515ec619Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 828515ec619Smrg (exit $ac_status); }]) 8297a3b38f7Smrg 830515ec619Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8316fc0178dSmrg 832515ec619Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833ff559fabSmrg# 834515ec619Smrg# This file is free software; the Free Software Foundation 835515ec619Smrg# gives unlimited permission to copy and/or distribute it, 836515ec619Smrg# with or without modifications, as long as this notice is preserved. 837ff559fabSmrg 838515ec619Smrg# AM_SANITY_CHECK 839515ec619Smrg# --------------- 840515ec619SmrgAC_DEFUN([AM_SANITY_CHECK], 841515ec619Smrg[AC_MSG_CHECKING([whether build environment is sane]) 842515ec619Smrg# Reject unsafe characters in $srcdir or the absolute working directory 843515ec619Smrg# name. Accept space and tab only in the latter. 844515ec619Smrgam_lf=' 845515ec619Smrg' 846515ec619Smrgcase `pwd` in 847515ec619Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 848515ec619Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 849515ec619Smrgesac 850515ec619Smrgcase $srcdir in 851515ec619Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 852515ec619Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853515ec619Smrgesac 854ff559fabSmrg 855515ec619Smrg# Do 'set' in a subshell so we don't clobber the current shell's 856515ec619Smrg# arguments. Must try -L first in case configure is actually a 857515ec619Smrg# symlink; some systems play weird games with the mod time of symlinks 858515ec619Smrg# (eg FreeBSD returns the mod time of the symlink's containing 859515ec619Smrg# directory). 860515ec619Smrgif ( 861515ec619Smrg am_has_slept=no 862515ec619Smrg for am_try in 1 2; do 863515ec619Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 864515ec619Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 865515ec619Smrg if test "$[*]" = "X"; then 866515ec619Smrg # -L didn't work. 867515ec619Smrg set X `ls -t "$srcdir/configure" conftest.file` 868515ec619Smrg fi 869515ec619Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 870515ec619Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 871ff559fabSmrg 872515ec619Smrg # If neither matched, then we have a broken ls. This can happen 873515ec619Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 874515ec619Smrg # broken ls alias from the environment. This has actually 875515ec619Smrg # happened. Such a system could not be considered "sane". 876515ec619Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 877515ec619Smrg alias in your environment]) 878515ec619Smrg fi 879515ec619Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 880515ec619Smrg break 881515ec619Smrg fi 882515ec619Smrg # Just in case. 883515ec619Smrg sleep 1 884515ec619Smrg am_has_slept=yes 885515ec619Smrg done 886515ec619Smrg test "$[2]" = conftest.file 887515ec619Smrg ) 888515ec619Smrgthen 889515ec619Smrg # Ok. 890515ec619Smrg : 891515ec619Smrgelse 892515ec619Smrg AC_MSG_ERROR([newly created file is older than distributed files! 893515ec619SmrgCheck your system clock]) 894515ec619Smrgfi 895515ec619SmrgAC_MSG_RESULT([yes]) 896515ec619Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 897515ec619Smrg# generated files are strictly newer. 898515ec619Smrgam_sleep_pid= 899515ec619Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 900515ec619Smrg ( sleep 1 ) & 901515ec619Smrg am_sleep_pid=$! 902515ec619Smrgfi 903515ec619SmrgAC_CONFIG_COMMANDS_PRE( 904515ec619Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 905515ec619Smrg if test -n "$am_sleep_pid"; then 906515ec619Smrg # Hide warnings about reused PIDs. 907515ec619Smrg wait $am_sleep_pid 2>/dev/null 908515ec619Smrg fi 909515ec619Smrg AC_MSG_RESULT([done])]) 910515ec619Smrgrm -f conftest.file 911515ec619Smrg]) 912ff559fabSmrg 913515ec619Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914515ec619Smrg# 915515ec619Smrg# This file is free software; the Free Software Foundation 916515ec619Smrg# gives unlimited permission to copy and/or distribute it, 917515ec619Smrg# with or without modifications, as long as this notice is preserved. 918ff559fabSmrg 919515ec619Smrg# AM_SILENT_RULES([DEFAULT]) 920515ec619Smrg# -------------------------- 921515ec619Smrg# Enable less verbose build rules; with the default set to DEFAULT 922515ec619Smrg# ("yes" being less verbose, "no" or empty being verbose). 923515ec619SmrgAC_DEFUN([AM_SILENT_RULES], 924515ec619Smrg[AC_ARG_ENABLE([silent-rules], [dnl 925515ec619SmrgAS_HELP_STRING( 926515ec619Smrg [--enable-silent-rules], 927515ec619Smrg [less verbose build output (undo: "make V=1")]) 928515ec619SmrgAS_HELP_STRING( 929515ec619Smrg [--disable-silent-rules], 930515ec619Smrg [verbose build output (undo: "make V=0")])dnl 931515ec619Smrg]) 932515ec619Smrgcase $enable_silent_rules in @%:@ ((( 933515ec619Smrg yes) AM_DEFAULT_VERBOSITY=0;; 934515ec619Smrg no) AM_DEFAULT_VERBOSITY=1;; 935515ec619Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936515ec619Smrgesac 937515ec619Smrgdnl 938515ec619Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 939515ec619Smrgdnl do not support nested variable expansions. 940515ec619Smrgdnl See automake bug#9928 and bug#10237. 941515ec619Smrgam_make=${MAKE-make} 942515ec619SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 943515ec619Smrg [am_cv_make_support_nested_variables], 944515ec619Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 945515ec619SmrgBAR0=false 946515ec619SmrgBAR1=true 947515ec619SmrgV=1 948515ec619Smrgam__doit: 949515ec619Smrg @$(TRUE) 950515ec619Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 951515ec619Smrg am_cv_make_support_nested_variables=yes 952515ec619Smrgelse 953515ec619Smrg am_cv_make_support_nested_variables=no 954515ec619Smrgfi]) 955515ec619Smrgif test $am_cv_make_support_nested_variables = yes; then 956515ec619Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 957515ec619Smrg AM_V='$(V)' 958515ec619Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 959515ec619Smrgelse 960515ec619Smrg AM_V=$AM_DEFAULT_VERBOSITY 961515ec619Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 962515ec619Smrgfi 963515ec619SmrgAC_SUBST([AM_V])dnl 964515ec619SmrgAM_SUBST_NOTMAKE([AM_V])dnl 965515ec619SmrgAC_SUBST([AM_DEFAULT_V])dnl 966515ec619SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967515ec619SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968515ec619SmrgAM_BACKSLASH='\' 969515ec619SmrgAC_SUBST([AM_BACKSLASH])dnl 970515ec619Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 971515ec619Smrg]) 972ff559fabSmrg 973515ec619Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974515ec619Smrg# 975515ec619Smrg# This file is free software; the Free Software Foundation 976515ec619Smrg# gives unlimited permission to copy and/or distribute it, 977515ec619Smrg# with or without modifications, as long as this notice is preserved. 978fc544a13Smrg 979515ec619Smrg# AM_PROG_INSTALL_STRIP 980515ec619Smrg# --------------------- 981515ec619Smrg# One issue with vendor 'install' (even GNU) is that you can't 982515ec619Smrg# specify the program used to strip binaries. This is especially 983515ec619Smrg# annoying in cross-compiling environments, where the build's strip 984515ec619Smrg# is unlikely to handle the host's binaries. 985515ec619Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 986515ec619Smrg# always use install-sh in "make install-strip", and initialize 987515ec619Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 988515ec619SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 989515ec619Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 990515ec619Smrg# Installed binaries are usually stripped using 'strip' when the user 991515ec619Smrg# run "make install-strip". However 'strip' might not be the right 992515ec619Smrg# tool to use in cross-compilation environments, therefore Automake 993515ec619Smrg# will honor the 'STRIP' environment variable to overrule this program. 994515ec619Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995515ec619Smrgif test "$cross_compiling" != no; then 996515ec619Smrg AC_CHECK_TOOL([STRIP], [strip], :) 997515ec619Smrgfi 998515ec619SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999515ec619SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000ff559fabSmrg 1001515ec619Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002515ec619Smrg# 1003515ec619Smrg# This file is free software; the Free Software Foundation 1004515ec619Smrg# gives unlimited permission to copy and/or distribute it, 1005515ec619Smrg# with or without modifications, as long as this notice is preserved. 1006ff559fabSmrg 1007515ec619Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1008515ec619Smrg# --------------------------- 1009515ec619Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010515ec619Smrg# This macro is traced by Automake. 1011515ec619SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1012ff559fabSmrg 1013515ec619Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1014515ec619Smrg# -------------------------- 1015515ec619Smrg# Public sister of _AM_SUBST_NOTMAKE. 1016515ec619SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017ff559fabSmrg 1018515ec619Smrg# Check how to create a tarball. -*- Autoconf -*- 101944dda7b2Smrg 1020515ec619Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021515ec619Smrg# 1022515ec619Smrg# This file is free software; the Free Software Foundation 1023515ec619Smrg# gives unlimited permission to copy and/or distribute it, 1024515ec619Smrg# with or without modifications, as long as this notice is preserved. 10256fc0178dSmrg 1026515ec619Smrg# _AM_PROG_TAR(FORMAT) 1027515ec619Smrg# -------------------- 1028515ec619Smrg# Check how to create a tarball in format FORMAT. 1029515ec619Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030515ec619Smrg# 1031515ec619Smrg# Substitute a variable $(am__tar) that is a command 1032515ec619Smrg# writing to stdout a FORMAT-tarball containing the directory 1033515ec619Smrg# $tardir. 1034515ec619Smrg# tardir=directory && $(am__tar) > result.tar 1035515ec619Smrg# 1036515ec619Smrg# Substitute a variable $(am__untar) that extract such 1037515ec619Smrg# a tarball read from stdin. 1038515ec619Smrg# $(am__untar) < result.tar 1039515ec619Smrg# 1040515ec619SmrgAC_DEFUN([_AM_PROG_TAR], 1041515ec619Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1042515ec619Smrg# in the wild :-( We should find a proper way to deprecate it ... 1043515ec619SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1044862f5301Smrg 1045515ec619Smrg# We'll loop over all known methods to create a tar archive until one works. 1046515ec619Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047862f5301Smrg 1048515ec619Smrgm4_if([$1], [v7], 1049515ec619Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1050ff559fabSmrg 1051515ec619Smrg [m4_case([$1], 1052515ec619Smrg [ustar], 1053515ec619Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1054515ec619Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1055515ec619Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1056515ec619Smrg # and bug#13588). 1057515ec619Smrg am_max_uid=2097151 # 2^21 - 1 1058515ec619Smrg am_max_gid=$am_max_uid 1059515ec619Smrg # The $UID and $GID variables are not portable, so we need to resort 1060515ec619Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1061515ec619Smrg # below are definitely unexpected, so allow the users to see them 1062515ec619Smrg # (that is, avoid stderr redirection). 1063515ec619Smrg am_uid=`id -u || echo unknown` 1064515ec619Smrg am_gid=`id -g || echo unknown` 1065515ec619Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1066515ec619Smrg if test $am_uid -le $am_max_uid; then 1067515ec619Smrg AC_MSG_RESULT([yes]) 1068515ec619Smrg else 1069515ec619Smrg AC_MSG_RESULT([no]) 1070515ec619Smrg _am_tools=none 1071515ec619Smrg fi 1072515ec619Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1073515ec619Smrg if test $am_gid -le $am_max_gid; then 1074515ec619Smrg AC_MSG_RESULT([yes]) 1075515ec619Smrg else 1076515ec619Smrg AC_MSG_RESULT([no]) 1077515ec619Smrg _am_tools=none 1078515ec619Smrg fi], 1079ff559fabSmrg 1080515ec619Smrg [pax], 1081515ec619Smrg [], 10827a3b38f7Smrg 1083515ec619Smrg [m4_fatal([Unknown tar format])]) 1084ff559fabSmrg 1085515ec619Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1086ff559fabSmrg 1087515ec619Smrg # Go ahead even if we have the value already cached. We do so because we 1088515ec619Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1089515ec619Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1090ff559fabSmrg 1091515ec619Smrg for _am_tool in $_am_tools; do 1092515ec619Smrg case $_am_tool in 1093515ec619Smrg gnutar) 1094515ec619Smrg for _am_tar in tar gnutar gtar; do 1095515ec619Smrg AM_RUN_LOG([$_am_tar --version]) && break 1096515ec619Smrg done 1097515ec619Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1098515ec619Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1099515ec619Smrg am__untar="$_am_tar -xf -" 1100515ec619Smrg ;; 1101515ec619Smrg plaintar) 1102515ec619Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1103515ec619Smrg # ustar tarball either. 1104515ec619Smrg (tar --version) >/dev/null 2>&1 && continue 1105515ec619Smrg am__tar='tar chf - "$$tardir"' 1106515ec619Smrg am__tar_='tar chf - "$tardir"' 1107515ec619Smrg am__untar='tar xf -' 1108515ec619Smrg ;; 1109515ec619Smrg pax) 1110515ec619Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1111515ec619Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1112515ec619Smrg am__untar='pax -r' 1113515ec619Smrg ;; 1114515ec619Smrg cpio) 1115515ec619Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1116515ec619Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1117515ec619Smrg am__untar='cpio -i -H $1 -d' 1118515ec619Smrg ;; 1119515ec619Smrg none) 1120515ec619Smrg am__tar=false 1121515ec619Smrg am__tar_=false 1122515ec619Smrg am__untar=false 1123515ec619Smrg ;; 1124515ec619Smrg esac 1125ff559fabSmrg 1126515ec619Smrg # If the value was cached, stop now. We just wanted to have am__tar 1127515ec619Smrg # and am__untar set. 1128515ec619Smrg test -n "${am_cv_prog_tar_$1}" && break 1129ff559fabSmrg 1130515ec619Smrg # tar/untar a dummy directory, and stop if the command works. 1131515ec619Smrg rm -rf conftest.dir 1132515ec619Smrg mkdir conftest.dir 1133515ec619Smrg echo GrepMe > conftest.dir/file 1134515ec619Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1135515ec619Smrg rm -rf conftest.dir 1136515ec619Smrg if test -s conftest.tar; then 1137515ec619Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1138515ec619Smrg AM_RUN_LOG([cat conftest.dir/file]) 1139515ec619Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1140515ec619Smrg fi 1141515ec619Smrg done 1142515ec619Smrg rm -rf conftest.dir 1143ff559fabSmrg 1144515ec619Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1145515ec619Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1146ff559fabSmrg 1147515ec619SmrgAC_SUBST([am__tar]) 1148515ec619SmrgAC_SUBST([am__untar]) 1149515ec619Smrg]) # _AM_PROG_TAR 1150ff559fabSmrg 1151515ec619Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1152515ec619Smrgdnl serial 11 (pkg-config-0.29) 1153515ec619Smrgdnl 1154515ec619Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1155515ec619Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1156515ec619Smrgdnl 1157515ec619Smrgdnl This program is free software; you can redistribute it and/or modify 1158515ec619Smrgdnl it under the terms of the GNU General Public License as published by 1159515ec619Smrgdnl the Free Software Foundation; either version 2 of the License, or 1160515ec619Smrgdnl (at your option) any later version. 1161515ec619Smrgdnl 1162515ec619Smrgdnl This program is distributed in the hope that it will be useful, but 1163515ec619Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 1164515ec619Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1165515ec619Smrgdnl General Public License for more details. 1166515ec619Smrgdnl 1167515ec619Smrgdnl You should have received a copy of the GNU General Public License 1168515ec619Smrgdnl along with this program; if not, write to the Free Software 1169515ec619Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1170515ec619Smrgdnl 02111-1307, USA. 1171515ec619Smrgdnl 1172515ec619Smrgdnl As a special exception to the GNU General Public License, if you 1173515ec619Smrgdnl distribute this file as part of a program that contains a 1174515ec619Smrgdnl configuration script generated by Autoconf, you may include it under 1175515ec619Smrgdnl the same distribution terms that you use for the rest of that 1176515ec619Smrgdnl program. 1177ff559fabSmrg 1178515ec619Smrgdnl PKG_PREREQ(MIN-VERSION) 1179515ec619Smrgdnl ----------------------- 1180515ec619Smrgdnl Since: 0.29 1181515ec619Smrgdnl 1182515ec619Smrgdnl Verify that the version of the pkg-config macros are at least 1183515ec619Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1184515ec619Smrgdnl installed version of pkg-config, this checks the developer's version 1185515ec619Smrgdnl of pkg.m4 when generating configure. 1186515ec619Smrgdnl 1187515ec619Smrgdnl To ensure that this macro is defined, also add: 1188515ec619Smrgdnl m4_ifndef([PKG_PREREQ], 1189515ec619Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1190515ec619Smrgdnl 1191515ec619Smrgdnl See the "Since" comment for each macro you use to see what version 1192515ec619Smrgdnl of the macros you require. 1193515ec619Smrgm4_defun([PKG_PREREQ], 1194515ec619Smrg[m4_define([PKG_MACROS_VERSION], [0.29]) 1195515ec619Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1196515ec619Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1197515ec619Smrg])dnl PKG_PREREQ 1198ff559fabSmrg 1199515ec619Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1200515ec619Smrgdnl ---------------------------------- 1201515ec619Smrgdnl Since: 0.16 1202515ec619Smrgdnl 1203515ec619Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1204515ec619Smrgdnl first found in the path. Checks that the version of pkg-config found 1205515ec619Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1206515ec619Smrgdnl used since that's the first version where most current features of 1207515ec619Smrgdnl pkg-config existed. 1208515ec619SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1209515ec619Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1210515ec619Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1211515ec619Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1212515ec619SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1213515ec619SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1214515ec619SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1215ff559fabSmrg 1216515ec619Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1217515ec619Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1218515ec619Smrgfi 1219515ec619Smrgif test -n "$PKG_CONFIG"; then 1220515ec619Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 1221515ec619Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1222515ec619Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1223515ec619Smrg AC_MSG_RESULT([yes]) 1224515ec619Smrg else 1225515ec619Smrg AC_MSG_RESULT([no]) 1226515ec619Smrg PKG_CONFIG="" 1227515ec619Smrg fi 1228515ec619Smrgfi[]dnl 1229515ec619Smrg])dnl PKG_PROG_PKG_CONFIG 123044dda7b2Smrg 1231515ec619Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1232515ec619Smrgdnl ------------------------------------------------------------------- 1233515ec619Smrgdnl Since: 0.18 1234515ec619Smrgdnl 1235515ec619Smrgdnl Check to see whether a particular set of modules exists. Similar to 1236515ec619Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1237515ec619Smrgdnl 1238515ec619Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1239515ec619Smrgdnl only at the first occurence in configure.ac, so if the first place 1240515ec619Smrgdnl it's called might be skipped (such as if it is within an "if", you 1241515ec619Smrgdnl have to call PKG_CHECK_EXISTS manually 1242515ec619SmrgAC_DEFUN([PKG_CHECK_EXISTS], 1243515ec619Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1244515ec619Smrgif test -n "$PKG_CONFIG" && \ 1245515ec619Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1246515ec619Smrg m4_default([$2], [:]) 1247515ec619Smrgm4_ifvaln([$3], [else 1248515ec619Smrg $3])dnl 1249515ec619Smrgfi]) 1250862f5301Smrg 1251515ec619Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1252515ec619Smrgdnl --------------------------------------------- 1253515ec619Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1254515ec619Smrgdnl pkg_failed based on the result. 1255515ec619Smrgm4_define([_PKG_CONFIG], 1256515ec619Smrg[if test -n "$$1"; then 1257515ec619Smrg pkg_cv_[]$1="$$1" 1258515ec619Smrg elif test -n "$PKG_CONFIG"; then 1259515ec619Smrg PKG_CHECK_EXISTS([$3], 1260515ec619Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1261515ec619Smrg test "x$?" != "x0" && pkg_failed=yes ], 1262515ec619Smrg [pkg_failed=yes]) 1263515ec619Smrg else 1264515ec619Smrg pkg_failed=untried 1265515ec619Smrgfi[]dnl 1266515ec619Smrg])dnl _PKG_CONFIG 1267ff559fabSmrg 1268515ec619Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 1269515ec619Smrgdnl --------------------------- 1270515ec619Smrgdnl Internal check to see if pkg-config supports short errors. 1271515ec619SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1272515ec619Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1273515ec619Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1274515ec619Smrg _pkg_short_errors_supported=yes 1275515ec619Smrgelse 1276515ec619Smrg _pkg_short_errors_supported=no 1277515ec619Smrgfi[]dnl 1278515ec619Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1279ff559fabSmrg 128044dda7b2Smrg 1281515ec619Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1282515ec619Smrgdnl [ACTION-IF-NOT-FOUND]) 1283515ec619Smrgdnl -------------------------------------------------------------- 1284515ec619Smrgdnl Since: 0.4.0 1285515ec619Smrgdnl 1286515ec619Smrgdnl Note that if there is a possibility the first call to 1287515ec619Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1288515ec619Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1289515ec619SmrgAC_DEFUN([PKG_CHECK_MODULES], 1290515ec619Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1291515ec619SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1292515ec619SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 129344dda7b2Smrg 1294515ec619Smrgpkg_failed=no 1295515ec619SmrgAC_MSG_CHECKING([for $1]) 1296ff559fabSmrg 1297515ec619Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1298515ec619Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 129944dda7b2Smrg 1300515ec619Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1301515ec619Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1302515ec619SmrgSee the pkg-config man page for more details.]) 1303ff559fabSmrg 1304515ec619Smrgif test $pkg_failed = yes; then 1305515ec619Smrg AC_MSG_RESULT([no]) 1306515ec619Smrg _PKG_SHORT_ERRORS_SUPPORTED 1307515ec619Smrg if test $_pkg_short_errors_supported = yes; then 1308515ec619Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1309515ec619Smrg else 1310515ec619Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1311515ec619Smrg fi 1312515ec619Smrg # Put the nasty error message in config.log where it belongs 1313515ec619Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 131444dda7b2Smrg 1315515ec619Smrg m4_default([$4], [AC_MSG_ERROR( 1316515ec619Smrg[Package requirements ($2) were not met: 1317ff559fabSmrg 1318515ec619Smrg$$1_PKG_ERRORS 1319ff559fabSmrg 1320515ec619SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1321515ec619Smrginstalled software in a non-standard prefix. 1322ff559fabSmrg 1323515ec619Smrg_PKG_TEXT])[]dnl 1324515ec619Smrg ]) 1325515ec619Smrgelif test $pkg_failed = untried; then 1326515ec619Smrg AC_MSG_RESULT([no]) 1327515ec619Smrg m4_default([$4], [AC_MSG_FAILURE( 1328515ec619Smrg[The pkg-config script could not be found or is too old. Make sure it 1329515ec619Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1330515ec619Smrgpath to pkg-config. 1331ff559fabSmrg 1332515ec619Smrg_PKG_TEXT 133344dda7b2Smrg 1334515ec619SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1335515ec619Smrg ]) 1336515ec619Smrgelse 1337515ec619Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1338515ec619Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1339515ec619Smrg AC_MSG_RESULT([yes]) 1340515ec619Smrg $3 1341515ec619Smrgfi[]dnl 1342515ec619Smrg])dnl PKG_CHECK_MODULES 1343ff559fabSmrg 134444dda7b2Smrg 1345515ec619Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1346515ec619Smrgdnl [ACTION-IF-NOT-FOUND]) 1347515ec619Smrgdnl --------------------------------------------------------------------- 1348515ec619Smrgdnl Since: 0.29 1349515ec619Smrgdnl 1350515ec619Smrgdnl Checks for existence of MODULES and gathers its build flags with 1351515ec619Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1352515ec619Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 1353515ec619Smrgdnl 1354515ec619Smrgdnl Note that if there is a possibility the first call to 1355515ec619Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1356515ec619Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1357515ec619Smrgdnl configure.ac. 1358515ec619SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 1359515ec619Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1360515ec619Smrg_save_PKG_CONFIG=$PKG_CONFIG 1361515ec619SmrgPKG_CONFIG="$PKG_CONFIG --static" 1362515ec619SmrgPKG_CHECK_MODULES($@) 1363515ec619SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 1364515ec619Smrg])dnl PKG_CHECK_MODULES_STATIC 1365ff559fabSmrg 136644dda7b2Smrg 1367515ec619Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 1368515ec619Smrgdnl ------------------------- 1369515ec619Smrgdnl Since: 0.27 1370515ec619Smrgdnl 1371515ec619Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 1372515ec619Smrgdnl should install pkg-config .pc files. By default the directory is 1373515ec619Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 1374515ec619Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 1375515ec619Smrgdnl parameter. 1376515ec619SmrgAC_DEFUN([PKG_INSTALLDIR], 1377515ec619Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1378515ec619Smrgm4_pushdef([pkg_description], 1379515ec619Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 1380515ec619SmrgAC_ARG_WITH([pkgconfigdir], 1381515ec619Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1382515ec619Smrg [with_pkgconfigdir=]pkg_default) 1383515ec619SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1384515ec619Smrgm4_popdef([pkg_default]) 1385515ec619Smrgm4_popdef([pkg_description]) 1386515ec619Smrg])dnl PKG_INSTALLDIR 1387ff559fabSmrg 1388ff559fabSmrg 1389515ec619Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1390515ec619Smrgdnl -------------------------------- 1391515ec619Smrgdnl Since: 0.27 1392515ec619Smrgdnl 1393515ec619Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 1394515ec619Smrgdnl module should install arch-independent pkg-config .pc files. By 1395515ec619Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 1396515ec619Smrgdnl changed by passing DIRECTORY. The user can override through the 1397515ec619Smrgdnl --with-noarch-pkgconfigdir parameter. 1398515ec619SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 1399515ec619Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1400515ec619Smrgm4_pushdef([pkg_description], 1401515ec619Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1402515ec619SmrgAC_ARG_WITH([noarch-pkgconfigdir], 1403515ec619Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1404515ec619Smrg [with_noarch_pkgconfigdir=]pkg_default) 1405515ec619SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1406515ec619Smrgm4_popdef([pkg_default]) 1407515ec619Smrgm4_popdef([pkg_description]) 1408515ec619Smrg])dnl PKG_NOARCH_INSTALLDIR 1409ff559fabSmrg 1410ff559fabSmrg 1411515ec619Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1412515ec619Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1413515ec619Smrgdnl ------------------------------------------- 1414515ec619Smrgdnl Since: 0.28 1415515ec619Smrgdnl 1416515ec619Smrgdnl Retrieves the value of the pkg-config variable for the given module. 1417515ec619SmrgAC_DEFUN([PKG_CHECK_VAR], 1418515ec619Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1419515ec619SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1420ff559fabSmrg 1421515ec619Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1422515ec619SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 1423ff559fabSmrg 1424515ec619SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 1425515ec619Smrg])dnl PKG_CHECK_VAR 1426ff559fabSmrg 1427515ec619Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1428515ec619Smrgdnl 1429515ec619Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 1430515ec619Smrgdnl 1431515ec619Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1432515ec619Smrgdnl copy of this software and associated documentation files (the "Software"), 1433515ec619Smrgdnl to deal in the Software without restriction, including without limitation 1434515ec619Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1435515ec619Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1436515ec619Smrgdnl Software is furnished to do so, subject to the following conditions: 1437515ec619Smrgdnl 1438515ec619Smrgdnl The above copyright notice and this permission notice (including the next 1439515ec619Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1440515ec619Smrgdnl Software. 1441515ec619Smrgdnl 1442515ec619Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1443515ec619Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1444515ec619Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1445515ec619Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1446515ec619Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1447515ec619Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1448515ec619Smrgdnl DEALINGS IN THE SOFTWARE. 1449ff559fabSmrg 1450515ec619Smrg# XORG_MACROS_VERSION(required-version) 1451515ec619Smrg# ------------------------------------- 1452515ec619Smrg# Minimum version: 1.1.0 1453515ec619Smrg# 1454515ec619Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1455515ec619Smrg# your configure.ac with the minimum required version, such as: 1456515ec619Smrg# XORG_MACROS_VERSION(1.1) 1457515ec619Smrg# 1458515ec619Smrg# To ensure that this macro is defined, also add: 1459515ec619Smrg# m4_ifndef([XORG_MACROS_VERSION], 1460515ec619Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1461515ec619Smrg# 1462515ec619Smrg# 1463515ec619Smrg# See the "minimum version" comment for each macro you use to see what 1464515ec619Smrg# version you require. 1465515ec619Smrgm4_defun([XORG_MACROS_VERSION],[ 1466515ec619Smrgm4_define([vers_have], [1.19.3]) 1467515ec619Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1468515ec619Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1469515ec619Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1470515ec619Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1471515ec619Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1472515ec619Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1473515ec619Smrgm4_undefine([vers_have]) 1474515ec619Smrgm4_undefine([maj_have]) 1475515ec619Smrgm4_undefine([maj_needed]) 1476515ec619Smrg]) # XORG_MACROS_VERSION 1477ff559fabSmrg 1478515ec619Smrg# XORG_PROG_RAWCPP() 1479515ec619Smrg# ------------------ 1480515ec619Smrg# Minimum version: 1.0.0 1481515ec619Smrg# 1482515ec619Smrg# Find cpp program and necessary flags for use in pre-processing text files 1483515ec619Smrg# such as man pages and config files 1484515ec619SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1485515ec619SmrgAC_REQUIRE([AC_PROG_CPP]) 1486515ec619SmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1487515ec619Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1488ff559fabSmrg 1489515ec619Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1490515ec619Smrg# which is not the best choice for supporting other OS'es, but covers most 1491515ec619Smrg# of the ones we need for now. 1492515ec619SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1493515ec619SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1494515ec619Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1495515ec619Smrg AC_MSG_RESULT([no]) 1496515ec619Smrgelse 1497515ec619Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1498515ec619Smrg RAWCPPFLAGS=-undef 1499515ec619Smrg AC_MSG_RESULT([yes]) 1500515ec619Smrg # under Cygwin unix is still defined even with -undef 1501515ec619Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1502515ec619Smrg RAWCPPFLAGS="-undef -ansi" 1503515ec619Smrg AC_MSG_RESULT([yes, with -ansi]) 1504515ec619Smrg else 1505515ec619Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1506515ec619Smrg fi 1507515ec619Smrgfi 1508515ec619Smrgrm -f conftest.$ac_ext 1509ff559fabSmrg 1510515ec619SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1511515ec619SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1512515ec619Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1513515ec619Smrg AC_MSG_RESULT([no]) 1514515ec619Smrgelse 1515515ec619Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1516515ec619Smrg TRADITIONALCPPFLAGS="-traditional" 1517515ec619Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1518515ec619Smrg AC_MSG_RESULT([yes]) 1519515ec619Smrg else 1520515ec619Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1521515ec619Smrg fi 1522515ec619Smrgfi 1523515ec619Smrgrm -f conftest.$ac_ext 1524515ec619SmrgAC_SUBST(RAWCPPFLAGS) 1525515ec619SmrgAC_SUBST(TRADITIONALCPPFLAGS) 1526515ec619Smrg]) # XORG_PROG_RAWCPP 1527ff559fabSmrg 1528515ec619Smrg# XORG_MANPAGE_SECTIONS() 1529515ec619Smrg# ----------------------- 1530515ec619Smrg# Minimum version: 1.0.0 1531515ec619Smrg# 1532515ec619Smrg# Determine which sections man pages go in for the different man page types 1533515ec619Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1534515ec619Smrg# Not sure if there's any better way than just hardcoding by OS name. 1535515ec619Smrg# Override default settings by setting environment variables 1536515ec619Smrg# Added MAN_SUBSTS in version 1.8 1537515ec619Smrg# Added AC_PROG_SED in version 1.8 1538ff559fabSmrg 1539515ec619SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1540515ec619SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1541515ec619SmrgAC_REQUIRE([AC_PROG_SED]) 1542ff559fabSmrg 1543515ec619Smrgcase $host_os in 1544515ec619Smrg solaris*) 1545515ec619Smrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1546515ec619Smrg # check for a man page file found in later versions that use 1547515ec619Smrg # traditional section numbers instead 1548515ec619Smrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1549515ec619Smrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1550515ec619Smrg ;; 1551515ec619Smrg *) SYSV_MAN_SECTIONS=false ;; 1552515ec619Smrgesac 1553ff559fabSmrg 1554515ec619Smrgif test x$APP_MAN_SUFFIX = x ; then 1555515ec619Smrg APP_MAN_SUFFIX=1 1556515ec619Smrgfi 1557515ec619Smrgif test x$APP_MAN_DIR = x ; then 1558515ec619Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1559515ec619Smrgfi 1560ff559fabSmrg 1561515ec619Smrgif test x$LIB_MAN_SUFFIX = x ; then 1562515ec619Smrg LIB_MAN_SUFFIX=3 1563515ec619Smrgfi 1564515ec619Smrgif test x$LIB_MAN_DIR = x ; then 1565515ec619Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1566515ec619Smrgfi 1567ff559fabSmrg 1568515ec619Smrgif test x$FILE_MAN_SUFFIX = x ; then 1569515ec619Smrg case $SYSV_MAN_SECTIONS in 1570515ec619Smrg true) FILE_MAN_SUFFIX=4 ;; 1571515ec619Smrg *) FILE_MAN_SUFFIX=5 ;; 1572515ec619Smrg esac 1573515ec619Smrgfi 1574515ec619Smrgif test x$FILE_MAN_DIR = x ; then 1575515ec619Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1576515ec619Smrgfi 1577ff559fabSmrg 1578515ec619Smrgif test x$MISC_MAN_SUFFIX = x ; then 1579515ec619Smrg case $SYSV_MAN_SECTIONS in 1580515ec619Smrg true) MISC_MAN_SUFFIX=5 ;; 1581515ec619Smrg *) MISC_MAN_SUFFIX=7 ;; 1582515ec619Smrg esac 1583515ec619Smrgfi 1584515ec619Smrgif test x$MISC_MAN_DIR = x ; then 1585515ec619Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1586515ec619Smrgfi 1587ff559fabSmrg 1588515ec619Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1589515ec619Smrg case $SYSV_MAN_SECTIONS in 1590515ec619Smrg true) DRIVER_MAN_SUFFIX=7 ;; 1591515ec619Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1592515ec619Smrg esac 1593515ec619Smrgfi 1594515ec619Smrgif test x$DRIVER_MAN_DIR = x ; then 1595515ec619Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1596515ec619Smrgfi 1597ff559fabSmrg 1598515ec619Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1599515ec619Smrg case $SYSV_MAN_SECTIONS in 1600515ec619Smrg true) ADMIN_MAN_SUFFIX=1m ;; 1601515ec619Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1602515ec619Smrg esac 1603515ec619Smrgfi 1604515ec619Smrgif test x$ADMIN_MAN_DIR = x ; then 1605515ec619Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1606515ec619Smrgfi 1607ff559fabSmrg 1608ff559fabSmrg 1609515ec619SmrgAC_SUBST([APP_MAN_SUFFIX]) 1610515ec619SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1611515ec619SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1612515ec619SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1613515ec619SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1614515ec619SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1615515ec619SmrgAC_SUBST([APP_MAN_DIR]) 1616515ec619SmrgAC_SUBST([LIB_MAN_DIR]) 1617515ec619SmrgAC_SUBST([FILE_MAN_DIR]) 1618515ec619SmrgAC_SUBST([MISC_MAN_DIR]) 1619515ec619SmrgAC_SUBST([DRIVER_MAN_DIR]) 1620515ec619SmrgAC_SUBST([ADMIN_MAN_DIR]) 1621862f5301Smrg 1622515ec619SmrgXORG_MAN_PAGE="X Version 11" 1623515ec619SmrgAC_SUBST([XORG_MAN_PAGE]) 1624515ec619SmrgMAN_SUBSTS="\ 1625515ec619Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1626515ec619Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1627515ec619Smrg -e 's|__xservername__|Xorg|g' \ 1628515ec619Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1629515ec619Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1630515ec619Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1631515ec619Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1632515ec619Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1633515ec619Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1634515ec619Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1635515ec619Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1636515ec619Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1637515ec619SmrgAC_SUBST([MAN_SUBSTS]) 1638862f5301Smrg 1639515ec619Smrg]) # XORG_MANPAGE_SECTIONS 16406fc0178dSmrg 1641515ec619Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1642515ec619Smrg# ------------------------ 1643515ec619Smrg# Minimum version: 1.7.0 1644515ec619Smrg# 1645515ec619Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1646515ec619Smrg# provided by xorg-sgml-doctools, if installed. 1647515ec619SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1648515ec619SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1649515ec619SmrgXORG_SGML_PATH= 1650515ec619SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1651515ec619Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1652515ec619Smrg [m4_ifval([$1],[:], 1653515ec619Smrg [if test x"$cross_compiling" != x"yes" ; then 1654515ec619Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1655515ec619Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1656515ec619Smrg fi]) 16576fc0178dSmrg ]) 1658ff559fabSmrg 1659515ec619Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1660515ec619Smrg# the path and the name of the doc stylesheet 1661515ec619Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1662515ec619Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1663515ec619Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1664515ec619Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1665515ec619Smrgelse 1666515ec619Smrg AC_MSG_RESULT([no]) 1667515ec619Smrgfi 1668ff559fabSmrg 1669515ec619SmrgAC_SUBST(XORG_SGML_PATH) 1670515ec619SmrgAC_SUBST(STYLESHEET_SRCDIR) 1671515ec619SmrgAC_SUBST(XSL_STYLESHEET) 1672515ec619SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1673515ec619Smrg]) # XORG_CHECK_SGML_DOCTOOLS 16747a3b38f7Smrg 1675515ec619Smrg# XORG_CHECK_LINUXDOC 1676515ec619Smrg# ------------------- 1677515ec619Smrg# Minimum version: 1.0.0 1678515ec619Smrg# 1679515ec619Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1680515ec619Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1681515ec619Smrg# Whether or not the necessary tools and files are found can be checked 1682515ec619Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1683515ec619SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1684515ec619SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1685515ec619SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1686ff559fabSmrg 1687515ec619SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1688ff559fabSmrg 1689515ec619SmrgAC_MSG_CHECKING([whether to build documentation]) 1690ff559fabSmrg 1691515ec619Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1692515ec619Smrg BUILDDOC=yes 1693515ec619Smrgelse 1694515ec619Smrg BUILDDOC=no 1695515ec619Smrgfi 16967a3b38f7Smrg 1697515ec619SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 16987a3b38f7Smrg 1699515ec619SmrgAC_MSG_RESULT([$BUILDDOC]) 17007a3b38f7Smrg 1701515ec619SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1702515ec619Smrg 1703515ec619Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1704515ec619Smrg BUILDPDFDOC=yes 17056fc0178dSmrgelse 1706515ec619Smrg BUILDPDFDOC=no 17076fc0178dSmrgfi 17087a3b38f7Smrg 1709515ec619SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1710ff559fabSmrg 1711515ec619SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 17127a3b38f7Smrg 1713515ec619SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1714515ec619SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1715515ec619SmrgMAKE_PDF="$PS2PDF" 1716515ec619SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 17177a3b38f7Smrg 1718515ec619SmrgAC_SUBST(MAKE_TEXT) 1719515ec619SmrgAC_SUBST(MAKE_PS) 1720515ec619SmrgAC_SUBST(MAKE_PDF) 1721515ec619SmrgAC_SUBST(MAKE_HTML) 1722515ec619Smrg]) # XORG_CHECK_LINUXDOC 172344dda7b2Smrg 1724515ec619Smrg# XORG_CHECK_DOCBOOK 1725515ec619Smrg# ------------------- 1726515ec619Smrg# Minimum version: 1.0.0 1727515ec619Smrg# 1728515ec619Smrg# Checks for the ability to build output formats from SGML DocBook source. 1729515ec619Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1730515ec619Smrg# indicates whether the necessary tools and files are found and, if set, 1731515ec619Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1732515ec619SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1733515ec619SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 17346fc0178dSmrg 1735515ec619SmrgBUILDTXTDOC=no 1736515ec619SmrgBUILDPDFDOC=no 1737515ec619SmrgBUILDPSDOC=no 1738515ec619SmrgBUILDHTMLDOC=no 1739ff559fabSmrg 1740515ec619SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1741515ec619SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1742515ec619SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1743515ec619SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1744ff559fabSmrg 1745515ec619SmrgAC_MSG_CHECKING([whether to build text documentation]) 1746515ec619Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1747515ec619Smrg test x$BUILD_TXTDOC != xno; then 1748515ec619Smrg BUILDTXTDOC=yes 1749515ec619Smrgfi 1750515ec619SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1751515ec619SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1752ff559fabSmrg 1753515ec619SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1754515ec619Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1755515ec619Smrg test x$BUILD_PDFDOC != xno; then 1756515ec619Smrg BUILDPDFDOC=yes 1757515ec619Smrgfi 1758515ec619SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1759515ec619SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1760ff559fabSmrg 1761515ec619SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1762515ec619Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1763515ec619Smrg test x$BUILD_PSDOC != xno; then 1764515ec619Smrg BUILDPSDOC=yes 1765515ec619Smrgfi 1766515ec619SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1767515ec619SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1768ff559fabSmrg 1769515ec619SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1770515ec619Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1771515ec619Smrg test x$BUILD_HTMLDOC != xno; then 1772515ec619Smrg BUILDHTMLDOC=yes 1773515ec619Smrgfi 1774515ec619SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1775515ec619SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1776ff559fabSmrg 1777515ec619SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1778515ec619SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1779515ec619SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1780515ec619SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1781ff559fabSmrg 1782515ec619SmrgAC_SUBST(MAKE_TEXT) 1783515ec619SmrgAC_SUBST(MAKE_PS) 1784515ec619SmrgAC_SUBST(MAKE_PDF) 1785515ec619SmrgAC_SUBST(MAKE_HTML) 1786515ec619Smrg]) # XORG_CHECK_DOCBOOK 1787ff559fabSmrg 1788515ec619Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1789515ec619Smrg# ---------------- 1790515ec619Smrg# Minimum version: 1.5.0 1791515ec619Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1792515ec619Smrg# 1793515ec619Smrg# Documentation tools are not always available on all platforms and sometimes 1794515ec619Smrg# not at the appropriate level. This macro enables a module to test for the 1795515ec619Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1796515ec619Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1797515ec619Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1798515ec619Smrg# --with-xmlto assumes 'auto'. 1799515ec619Smrg# 1800515ec619Smrg# Interface to module: 1801515ec619Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1802515ec619Smrg# XMLTO: returns the path of the xmlto program found 1803515ec619Smrg# returns the path set by the user in the environment 1804515ec619Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1805515ec619Smrg# 'no' user instructs the module not to use xmlto 1806515ec619Smrg# 1807515ec619Smrg# Added in version 1.10.0 1808515ec619Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1809515ec619Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1810515ec619Smrg# 1811515ec619Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1812515ec619Smrg# 1813515ec619SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1814515ec619SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1815515ec619Smrgm4_define([_defopt], m4_default([$2], [auto])) 1816515ec619SmrgAC_ARG_WITH(xmlto, 1817515ec619Smrg AS_HELP_STRING([--with-xmlto], 1818515ec619Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1819515ec619Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1820515ec619Smrgm4_undefine([_defopt]) 1821ff559fabSmrg 1822515ec619Smrgif test "x$use_xmlto" = x"auto"; then 1823515ec619Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1824515ec619Smrg if test "x$XMLTO" = "x"; then 1825515ec619Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1826515ec619Smrg have_xmlto=no 1827515ec619Smrg else 1828515ec619Smrg have_xmlto=yes 1829515ec619Smrg fi 1830515ec619Smrgelif test "x$use_xmlto" = x"yes" ; then 1831515ec619Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1832515ec619Smrg if test "x$XMLTO" = "x"; then 1833515ec619Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1834515ec619Smrg fi 1835515ec619Smrg have_xmlto=yes 1836515ec619Smrgelif test "x$use_xmlto" = x"no" ; then 1837515ec619Smrg if test "x$XMLTO" != "x"; then 1838515ec619Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1839515ec619Smrg fi 1840515ec619Smrg have_xmlto=no 18416fc0178dSmrgelse 1842515ec619Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 18436fc0178dSmrgfi 184444dda7b2Smrg 1845515ec619Smrg# Test for a minimum version of xmlto, if provided. 1846515ec619Smrgm4_ifval([$1], 1847515ec619Smrg[if test "$have_xmlto" = yes; then 1848515ec619Smrg # scrape the xmlto version 1849515ec619Smrg AC_MSG_CHECKING([the xmlto version]) 1850515ec619Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1851515ec619Smrg AC_MSG_RESULT([$xmlto_version]) 1852515ec619Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1853515ec619Smrg [if test "x$use_xmlto" = xauto; then 1854515ec619Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1855515ec619Smrg have_xmlto=no 1856515ec619Smrg else 1857515ec619Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1858515ec619Smrg fi]) 1859515ec619Smrgfi]) 1860ff559fabSmrg 1861515ec619Smrg# Test for the ability of xmlto to generate a text target 1862515ec619Smrg# 1863515ec619Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1864515ec619Smrg# following test for empty XML docbook files. 1865515ec619Smrg# For compatibility reasons use the following empty XML docbook file and if 1866515ec619Smrg# it fails try it again with a non-empty XML file. 1867515ec619Smrghave_xmlto_text=no 1868515ec619Smrgcat > conftest.xml << "EOF" 1869515ec619SmrgEOF 1870515ec619SmrgAS_IF([test "$have_xmlto" = yes], 1871515ec619Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1872515ec619Smrg [have_xmlto_text=yes], 1873515ec619Smrg [# Try it again with a non-empty XML file. 1874515ec619Smrg cat > conftest.xml << "EOF" 1875515ec619Smrg<x></x> 1876515ec619SmrgEOF 1877515ec619Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1878515ec619Smrg [have_xmlto_text=yes], 1879515ec619Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1880515ec619Smrgrm -f conftest.xml 1881515ec619SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1882515ec619SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1883515ec619Smrg]) # XORG_WITH_XMLTO 18847a3b38f7Smrg 1885515ec619Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1886515ec619Smrg# -------------------------------------------- 1887515ec619Smrg# Minimum version: 1.12.0 1888515ec619Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1889515ec619Smrg# 1890515ec619Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1891515ec619Smrg# XML-based language used for the transformation of XML documents. 1892515ec619Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1893515ec619Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1894515ec619Smrg# The XSLT processor is often used as a standalone tool for transformations. 1895515ec619Smrg# It should not be assumed that this tool is used only to work with documnetation. 1896515ec619Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1897515ec619Smrg# 1898515ec619Smrg# Interface to module: 1899515ec619Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1900515ec619Smrg# XSLTPROC: returns the path of the xsltproc program found 1901515ec619Smrg# returns the path set by the user in the environment 1902515ec619Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1903515ec619Smrg# 'no' user instructs the module not to use xsltproc 1904515ec619Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1905515ec619Smrg# 1906515ec619Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1907515ec619Smrg# 1908515ec619SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1909515ec619SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1910515ec619Smrg# Preserves the interface, should it be implemented later 1911515ec619Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1912515ec619Smrgm4_define([_defopt], m4_default([$2], [auto])) 1913515ec619SmrgAC_ARG_WITH(xsltproc, 1914515ec619Smrg AS_HELP_STRING([--with-xsltproc], 1915515ec619Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1916515ec619Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1917515ec619Smrgm4_undefine([_defopt]) 19187a3b38f7Smrg 1919515ec619Smrgif test "x$use_xsltproc" = x"auto"; then 1920515ec619Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1921515ec619Smrg if test "x$XSLTPROC" = "x"; then 1922515ec619Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1923515ec619Smrg have_xsltproc=no 1924515ec619Smrg else 1925515ec619Smrg have_xsltproc=yes 1926515ec619Smrg fi 1927515ec619Smrgelif test "x$use_xsltproc" = x"yes" ; then 1928515ec619Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1929515ec619Smrg if test "x$XSLTPROC" = "x"; then 1930515ec619Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1931515ec619Smrg fi 1932515ec619Smrg have_xsltproc=yes 1933515ec619Smrgelif test "x$use_xsltproc" = x"no" ; then 1934515ec619Smrg if test "x$XSLTPROC" != "x"; then 1935515ec619Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1936515ec619Smrg fi 1937515ec619Smrg have_xsltproc=no 1938515ec619Smrgelse 1939515ec619Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 19406fc0178dSmrgfi 1941ff559fabSmrg 1942515ec619SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1943515ec619Smrg]) # XORG_WITH_XSLTPROC 1944ff559fabSmrg 1945515ec619Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1946515ec619Smrg# ---------------------------------------- 1947515ec619Smrg# Minimum version: 1.15.0 1948515ec619Smrg# 1949515ec619Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1950515ec619Smrg# scanning arbitrary text files, extracting information from those text files, 1951515ec619Smrg# and printing reports based on that information. 1952515ec619Smrg# 1953515ec619Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1954515ec619Smrg# 1955515ec619Smrg# Interface to module: 1956515ec619Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1957515ec619Smrg# PERL: returns the path of the perl program found 1958515ec619Smrg# returns the path set by the user in the environment 1959515ec619Smrg# --with-perl: 'yes' user instructs the module to use perl 1960515ec619Smrg# 'no' user instructs the module not to use perl 1961515ec619Smrg# have_perl: returns yes if perl found in PATH or no 1962515ec619Smrg# 1963515ec619Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1964515ec619Smrg# 1965515ec619SmrgAC_DEFUN([XORG_WITH_PERL],[ 1966515ec619SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1967515ec619Smrg# Preserves the interface, should it be implemented later 1968515ec619Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1969515ec619Smrgm4_define([_defopt], m4_default([$2], [auto])) 1970515ec619SmrgAC_ARG_WITH(perl, 1971515ec619Smrg AS_HELP_STRING([--with-perl], 1972515ec619Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1973515ec619Smrg [use_perl=$withval], [use_perl=]_defopt) 1974515ec619Smrgm4_undefine([_defopt]) 1975ff559fabSmrg 1976515ec619Smrgif test "x$use_perl" = x"auto"; then 1977515ec619Smrg AC_PATH_PROG([PERL], [perl]) 1978515ec619Smrg if test "x$PERL" = "x"; then 1979515ec619Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1980515ec619Smrg have_perl=no 1981515ec619Smrg else 1982515ec619Smrg have_perl=yes 19836fc0178dSmrg fi 1984515ec619Smrgelif test "x$use_perl" = x"yes" ; then 1985515ec619Smrg AC_PATH_PROG([PERL], [perl]) 1986515ec619Smrg if test "x$PERL" = "x"; then 1987515ec619Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1988515ec619Smrg fi 1989515ec619Smrg have_perl=yes 1990515ec619Smrgelif test "x$use_perl" = x"no" ; then 1991515ec619Smrg if test "x$PERL" != "x"; then 1992515ec619Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1993515ec619Smrg fi 1994515ec619Smrg have_perl=no 19956fc0178dSmrgelse 1996515ec619Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 19976fc0178dSmrgfi 1998ff559fabSmrg 1999515ec619SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2000515ec619Smrg]) # XORG_WITH_PERL 2001ff559fabSmrg 2002515ec619Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2003515ec619Smrg# ---------------- 2004515ec619Smrg# Minimum version: 1.5.0 2005515ec619Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2006515ec619Smrg# 2007515ec619Smrg# Documentation tools are not always available on all platforms and sometimes 2008515ec619Smrg# not at the appropriate level. This macro enables a module to test for the 2009515ec619Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2010515ec619Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 2011515ec619Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2012515ec619Smrg# --with-asciidoc assumes 'auto'. 2013515ec619Smrg# 2014515ec619Smrg# Interface to module: 2015515ec619Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2016515ec619Smrg# ASCIIDOC: returns the path of the asciidoc program found 2017515ec619Smrg# returns the path set by the user in the environment 2018515ec619Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2019515ec619Smrg# 'no' user instructs the module not to use asciidoc 2020515ec619Smrg# 2021515ec619Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2022515ec619Smrg# 2023515ec619SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 2024515ec619SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2025515ec619Smrgm4_define([_defopt], m4_default([$2], [auto])) 2026515ec619SmrgAC_ARG_WITH(asciidoc, 2027515ec619Smrg AS_HELP_STRING([--with-asciidoc], 2028515ec619Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2029515ec619Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2030515ec619Smrgm4_undefine([_defopt]) 2031ff559fabSmrg 2032515ec619Smrgif test "x$use_asciidoc" = x"auto"; then 2033515ec619Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2034515ec619Smrg if test "x$ASCIIDOC" = "x"; then 2035515ec619Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2036515ec619Smrg have_asciidoc=no 2037515ec619Smrg else 2038515ec619Smrg have_asciidoc=yes 2039515ec619Smrg fi 2040515ec619Smrgelif test "x$use_asciidoc" = x"yes" ; then 2041515ec619Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2042515ec619Smrg if test "x$ASCIIDOC" = "x"; then 2043515ec619Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2044515ec619Smrg fi 2045515ec619Smrg have_asciidoc=yes 2046515ec619Smrgelif test "x$use_asciidoc" = x"no" ; then 2047515ec619Smrg if test "x$ASCIIDOC" != "x"; then 2048515ec619Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2049515ec619Smrg fi 2050515ec619Smrg have_asciidoc=no 20516fc0178dSmrgelse 2052515ec619Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 20536fc0178dSmrgfi 2054515ec619Smrgm4_ifval([$1], 2055515ec619Smrg[if test "$have_asciidoc" = yes; then 2056515ec619Smrg # scrape the asciidoc version 2057515ec619Smrg AC_MSG_CHECKING([the asciidoc version]) 2058515ec619Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2059515ec619Smrg AC_MSG_RESULT([$asciidoc_version]) 2060515ec619Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 2061515ec619Smrg [if test "x$use_asciidoc" = xauto; then 2062515ec619Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2063515ec619Smrg have_asciidoc=no 2064515ec619Smrg else 2065515ec619Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2066515ec619Smrg fi]) 2067515ec619Smrgfi]) 2068515ec619SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2069515ec619Smrg]) # XORG_WITH_ASCIIDOC 2070ff559fabSmrg 2071515ec619Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2072515ec619Smrg# ------------------------------------------- 2073515ec619Smrg# Minimum version: 1.5.0 2074515ec619Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2075515ec619Smrg# Minimum version for optional DOT checking: 1.18.0 2076515ec619Smrg# 2077515ec619Smrg# Documentation tools are not always available on all platforms and sometimes 2078515ec619Smrg# not at the appropriate level. This macro enables a module to test for the 2079515ec619Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2080515ec619Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 2081515ec619Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 2082515ec619Smrg# --with-doxygen assumes 'auto'. 2083515ec619Smrg# 2084515ec619Smrg# Interface to module: 2085515ec619Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2086515ec619Smrg# DOXYGEN: returns the path of the doxygen program found 2087515ec619Smrg# returns the path set by the user in the environment 2088515ec619Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 2089515ec619Smrg# 'no' user instructs the module not to use doxygen 2090515ec619Smrg# 2091515ec619Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2092515ec619Smrg# 2093515ec619SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 2094515ec619SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2095515ec619SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2096515ec619Smrgm4_define([_defopt], m4_default([$2], [auto])) 2097515ec619SmrgAC_ARG_WITH(doxygen, 2098515ec619Smrg AS_HELP_STRING([--with-doxygen], 2099515ec619Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2100515ec619Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 2101515ec619Smrgm4_undefine([_defopt]) 2102ff559fabSmrg 2103515ec619Smrgif test "x$use_doxygen" = x"auto"; then 2104515ec619Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2105515ec619Smrg if test "x$DOXYGEN" = "x"; then 2106515ec619Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2107515ec619Smrg have_doxygen=no 2108515ec619Smrg else 2109515ec619Smrg have_doxygen=yes 2110515ec619Smrg fi 2111515ec619Smrgelif test "x$use_doxygen" = x"yes" ; then 2112515ec619Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2113515ec619Smrg if test "x$DOXYGEN" = "x"; then 2114515ec619Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2115515ec619Smrg fi 2116515ec619Smrg have_doxygen=yes 2117515ec619Smrgelif test "x$use_doxygen" = x"no" ; then 2118515ec619Smrg if test "x$DOXYGEN" != "x"; then 2119515ec619Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2120515ec619Smrg fi 2121515ec619Smrg have_doxygen=no 2122515ec619Smrgelse 2123515ec619Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2124515ec619Smrgfi 2125515ec619Smrgm4_ifval([$1], 2126515ec619Smrg[if test "$have_doxygen" = yes; then 2127515ec619Smrg # scrape the doxygen version 2128515ec619Smrg AC_MSG_CHECKING([the doxygen version]) 2129515ec619Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 2130515ec619Smrg AC_MSG_RESULT([$doxygen_version]) 2131515ec619Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 2132515ec619Smrg [if test "x$use_doxygen" = xauto; then 2133515ec619Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2134515ec619Smrg have_doxygen=no 2135515ec619Smrg else 2136515ec619Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2137515ec619Smrg fi]) 2138515ec619Smrgfi]) 21397a3b38f7Smrg 2140515ec619Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2141515ec619Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2142515ec619Smrgdnl HAVE_DOT = @HAVE_DOT@ 2143515ec619SmrgHAVE_DOT=no 2144515ec619Smrgif test "x$have_doxygen" = "xyes"; then 2145515ec619Smrg AC_PATH_PROG([DOT], [dot]) 2146515ec619Smrg if test "x$DOT" != "x"; then 2147515ec619Smrg HAVE_DOT=yes 21486fc0178dSmrg fi 2149515ec619Smrgfi 2150ff559fabSmrg 2151515ec619SmrgAC_SUBST([HAVE_DOT]) 2152515ec619SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2153515ec619SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2154515ec619Smrg]) # XORG_WITH_DOXYGEN 2155ff559fabSmrg 2156515ec619Smrg# XORG_WITH_GROFF([DEFAULT]) 2157515ec619Smrg# ---------------- 2158515ec619Smrg# Minimum version: 1.6.0 2159515ec619Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2160515ec619Smrg# 2161515ec619Smrg# Documentation tools are not always available on all platforms and sometimes 2162515ec619Smrg# not at the appropriate level. This macro enables a module to test for the 2163515ec619Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2164515ec619Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 2165515ec619Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 2166515ec619Smrg# --with-groff assumes 'auto'. 2167515ec619Smrg# 2168515ec619Smrg# Interface to module: 2169515ec619Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2170515ec619Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2171515ec619Smrg# HAVE_GROFF_MS: the -ms macros package 2172515ec619Smrg# GROFF: returns the path of the groff program found 2173515ec619Smrg# returns the path set by the user in the environment 2174515ec619Smrg# --with-groff: 'yes' user instructs the module to use groff 2175515ec619Smrg# 'no' user instructs the module not to use groff 2176515ec619Smrg# 2177515ec619Smrg# Added in version 1.9.0: 2178515ec619Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2179515ec619Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2180515ec619Smrg# psselect from the psutils package. 2181515ec619Smrg# the ghostcript package. Refer to the grohtml man pages 2182515ec619Smrg# 2183515ec619Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2184515ec619Smrg# 2185515ec619Smrg# OS and distros often splits groff in a basic and full package, the former 2186515ec619Smrg# having the groff program and the later having devices, fonts and macros 2187515ec619Smrg# Checking for the groff executable is not enough. 2188515ec619Smrg# 2189515ec619Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 2190515ec619Smrg# unset HAVE_GROFF or GROFF env variables. 2191515ec619Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2192515ec619Smrg# 2193515ec619SmrgAC_DEFUN([XORG_WITH_GROFF],[ 2194515ec619SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2195515ec619Smrgm4_define([_defopt], m4_default([$1], [auto])) 2196515ec619SmrgAC_ARG_WITH(groff, 2197515ec619Smrg AS_HELP_STRING([--with-groff], 2198515ec619Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2199515ec619Smrg [use_groff=$withval], [use_groff=]_defopt) 2200515ec619Smrgm4_undefine([_defopt]) 2201515ec619Smrg 2202515ec619Smrgif test "x$use_groff" = x"auto"; then 2203515ec619Smrg AC_PATH_PROG([GROFF], [groff]) 2204515ec619Smrg if test "x$GROFF" = "x"; then 2205515ec619Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2206515ec619Smrg have_groff=no 2207515ec619Smrg else 2208515ec619Smrg have_groff=yes 2209515ec619Smrg fi 2210515ec619Smrgelif test "x$use_groff" = x"yes" ; then 2211515ec619Smrg AC_PATH_PROG([GROFF], [groff]) 2212515ec619Smrg if test "x$GROFF" = "x"; then 2213515ec619Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2214515ec619Smrg fi 2215515ec619Smrg have_groff=yes 2216515ec619Smrgelif test "x$use_groff" = x"no" ; then 2217515ec619Smrg if test "x$GROFF" != "x"; then 2218515ec619Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2219515ec619Smrg fi 2220515ec619Smrg have_groff=no 22216fc0178dSmrgelse 2222515ec619Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 22236fc0178dSmrgfi 2224ff559fabSmrg 2225515ec619Smrg# We have groff, test for the presence of the macro packages 2226515ec619Smrgif test "x$have_groff" = x"yes"; then 2227515ec619Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2228515ec619Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2229515ec619Smrg groff_ms_works=yes 2230515ec619Smrg else 2231515ec619Smrg groff_ms_works=no 2232515ec619Smrg fi 2233515ec619Smrg AC_MSG_RESULT([$groff_ms_works]) 2234515ec619Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2235515ec619Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2236515ec619Smrg groff_mm_works=yes 2237515ec619Smrg else 2238515ec619Smrg groff_mm_works=no 2239515ec619Smrg fi 2240515ec619Smrg AC_MSG_RESULT([$groff_mm_works]) 2241515ec619Smrgfi 2242ff559fabSmrg 2243515ec619Smrg# We have groff, test for HTML dependencies, one command per package 2244515ec619Smrgif test "x$have_groff" = x"yes"; then 2245515ec619Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2246515ec619Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2247515ec619Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2248515ec619Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2249515ec619Smrg have_groff_html=yes 2250515ec619Smrg else 2251515ec619Smrg have_groff_html=no 2252515ec619Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2253515ec619Smrg fi 2254515ec619Smrgfi 2255ff559fabSmrg 2256515ec619Smrg# Set Automake conditionals for Makefiles 2257515ec619SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2258515ec619SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2259515ec619SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2260515ec619SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2261515ec619Smrg]) # XORG_WITH_GROFF 2262ff559fabSmrg 2263515ec619Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2264515ec619Smrg# --------------------------------------- 2265515ec619Smrg# Minimum version: 1.6.0 2266515ec619Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2267515ec619Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2268515ec619Smrg# 2269515ec619Smrg# Documentation tools are not always available on all platforms and sometimes 2270515ec619Smrg# not at the appropriate level. This macro enables a module to test for the 2271515ec619Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2272515ec619Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 2273515ec619Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 2274515ec619Smrg# --with-fop assumes 'auto'. 2275515ec619Smrg# 2276515ec619Smrg# Interface to module: 2277515ec619Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2278515ec619Smrg# FOP: returns the path of the fop program found 2279515ec619Smrg# returns the path set by the user in the environment 2280515ec619Smrg# --with-fop: 'yes' user instructs the module to use fop 2281515ec619Smrg# 'no' user instructs the module not to use fop 2282515ec619Smrg# 2283515ec619Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2284515ec619Smrg# 2285515ec619SmrgAC_DEFUN([XORG_WITH_FOP],[ 2286515ec619SmrgAC_ARG_VAR([FOP], [Path to fop command]) 2287515ec619Smrgm4_define([_defopt], m4_default([$2], [auto])) 2288515ec619SmrgAC_ARG_WITH(fop, 2289515ec619Smrg AS_HELP_STRING([--with-fop], 2290515ec619Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2291515ec619Smrg [use_fop=$withval], [use_fop=]_defopt) 2292515ec619Smrgm4_undefine([_defopt]) 2293ff559fabSmrg 2294515ec619Smrgif test "x$use_fop" = x"auto"; then 2295515ec619Smrg AC_PATH_PROG([FOP], [fop]) 2296515ec619Smrg if test "x$FOP" = "x"; then 2297515ec619Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2298515ec619Smrg have_fop=no 2299515ec619Smrg else 2300515ec619Smrg have_fop=yes 2301515ec619Smrg fi 2302515ec619Smrgelif test "x$use_fop" = x"yes" ; then 2303515ec619Smrg AC_PATH_PROG([FOP], [fop]) 2304515ec619Smrg if test "x$FOP" = "x"; then 2305515ec619Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2306515ec619Smrg fi 2307515ec619Smrg have_fop=yes 2308515ec619Smrgelif test "x$use_fop" = x"no" ; then 2309515ec619Smrg if test "x$FOP" != "x"; then 2310515ec619Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2311515ec619Smrg fi 2312515ec619Smrg have_fop=no 23136fc0178dSmrgelse 2314515ec619Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2315515ec619Smrgfi 2316ff559fabSmrg 2317515ec619Smrg# Test for a minimum version of fop, if provided. 2318515ec619Smrgm4_ifval([$1], 2319515ec619Smrg[if test "$have_fop" = yes; then 2320515ec619Smrg # scrape the fop version 2321515ec619Smrg AC_MSG_CHECKING([for fop minimum version]) 2322515ec619Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2323515ec619Smrg AC_MSG_RESULT([$fop_version]) 2324515ec619Smrg AS_VERSION_COMPARE([$fop_version], [$1], 2325515ec619Smrg [if test "x$use_fop" = xauto; then 2326515ec619Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2327515ec619Smrg have_fop=no 2328515ec619Smrg else 2329515ec619Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2330515ec619Smrg fi]) 2331515ec619Smrgfi]) 2332515ec619SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2333515ec619Smrg]) # XORG_WITH_FOP 2334ff559fabSmrg 2335515ec619Smrg# XORG_WITH_M4([MIN-VERSION]) 2336515ec619Smrg# --------------------------- 2337515ec619Smrg# Minimum version: 1.19.0 2338515ec619Smrg# 2339515ec619Smrg# This macro attempts to locate an m4 macro processor which supports 2340515ec619Smrg# -I option and is only useful for modules relying on M4 in order to 2341515ec619Smrg# expand macros in source code files. 2342515ec619Smrg# 2343515ec619Smrg# Interface to module: 2344515ec619Smrg# M4: returns the path of the m4 program found 2345515ec619Smrg# returns the path set by the user in the environment 2346515ec619Smrg# 2347515ec619SmrgAC_DEFUN([XORG_WITH_M4], [ 2348515ec619SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2349515ec619Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2350515ec619Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2351515ec619Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2352515ec619Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 2353515ec619Smrg [$PATH:/usr/gnu/bin])]) 2354ff559fabSmrg 2355515ec619SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 2356515ec619Smrg]) # XORG_WITH_M4 2357fc544a13Smrg 2358515ec619Smrg# XORG_WITH_PS2PDF([DEFAULT]) 2359515ec619Smrg# ---------------- 2360515ec619Smrg# Minimum version: 1.6.0 2361515ec619Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2362515ec619Smrg# 2363515ec619Smrg# Documentation tools are not always available on all platforms and sometimes 2364515ec619Smrg# not at the appropriate level. This macro enables a module to test for the 2365515ec619Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2366515ec619Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 2367515ec619Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2368515ec619Smrg# --with-ps2pdf assumes 'auto'. 2369515ec619Smrg# 2370515ec619Smrg# Interface to module: 2371515ec619Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2372515ec619Smrg# PS2PDF: returns the path of the ps2pdf program found 2373515ec619Smrg# returns the path set by the user in the environment 2374515ec619Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2375515ec619Smrg# 'no' user instructs the module not to use ps2pdf 2376515ec619Smrg# 2377515ec619Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2378515ec619Smrg# 2379515ec619SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2380515ec619SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2381515ec619Smrgm4_define([_defopt], m4_default([$1], [auto])) 2382515ec619SmrgAC_ARG_WITH(ps2pdf, 2383515ec619Smrg AS_HELP_STRING([--with-ps2pdf], 2384515ec619Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2385515ec619Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2386515ec619Smrgm4_undefine([_defopt]) 2387fc544a13Smrg 2388515ec619Smrgif test "x$use_ps2pdf" = x"auto"; then 2389515ec619Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2390515ec619Smrg if test "x$PS2PDF" = "x"; then 2391515ec619Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2392515ec619Smrg have_ps2pdf=no 2393515ec619Smrg else 2394515ec619Smrg have_ps2pdf=yes 2395515ec619Smrg fi 2396515ec619Smrgelif test "x$use_ps2pdf" = x"yes" ; then 2397515ec619Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2398515ec619Smrg if test "x$PS2PDF" = "x"; then 2399515ec619Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2400515ec619Smrg fi 2401515ec619Smrg have_ps2pdf=yes 2402515ec619Smrgelif test "x$use_ps2pdf" = x"no" ; then 2403515ec619Smrg if test "x$PS2PDF" != "x"; then 2404515ec619Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2405515ec619Smrg fi 2406515ec619Smrg have_ps2pdf=no 24076fc0178dSmrgelse 2408515ec619Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2409515ec619Smrgfi 2410515ec619SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2411515ec619Smrg]) # XORG_WITH_PS2PDF 24127a3b38f7Smrg 2413515ec619Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 2414515ec619Smrg# ---------------- 2415515ec619Smrg# Minimum version: 1.6.0 2416515ec619Smrg# 2417515ec619Smrg# Documentation tools are not always available on all platforms and sometimes 2418515ec619Smrg# not at the appropriate level. This macro enables a builder to skip all 2419515ec619Smrg# documentation targets except traditional man pages. 2420515ec619Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2421515ec619Smrg# maximum flexibilty in controlling documentation building. 2422515ec619Smrg# Refer to: 2423515ec619Smrg# XORG_WITH_XMLTO --with-xmlto 2424515ec619Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2425515ec619Smrg# XORG_WITH_DOXYGEN --with-doxygen 2426515ec619Smrg# XORG_WITH_FOP --with-fop 2427515ec619Smrg# XORG_WITH_GROFF --with-groff 2428515ec619Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2429515ec619Smrg# 2430515ec619Smrg# Interface to module: 2431515ec619Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2432515ec619Smrg# --enable-docs: 'yes' user instructs the module to generate docs 2433515ec619Smrg# 'no' user instructs the module not to generate docs 2434515ec619Smrg# parm1: specify the default value, yes or no. 2435515ec619Smrg# 2436515ec619SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2437515ec619Smrgm4_define([docs_default], m4_default([$1], [yes])) 2438515ec619SmrgAC_ARG_ENABLE(docs, 2439515ec619Smrg AS_HELP_STRING([--enable-docs], 2440515ec619Smrg [Enable building the documentation (default: ]docs_default[)]), 2441515ec619Smrg [build_docs=$enableval], [build_docs=]docs_default) 2442515ec619Smrgm4_undefine([docs_default]) 2443515ec619SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2444515ec619SmrgAC_MSG_CHECKING([whether to build documentation]) 2445515ec619SmrgAC_MSG_RESULT([$build_docs]) 2446515ec619Smrg]) # XORG_ENABLE_DOCS 24477a3b38f7Smrg 2448515ec619Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2449515ec619Smrg# ---------------- 2450515ec619Smrg# Minimum version: 1.6.0 2451515ec619Smrg# 2452515ec619Smrg# This macro enables a builder to skip all developer documentation. 2453515ec619Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2454515ec619Smrg# maximum flexibilty in controlling documentation building. 2455515ec619Smrg# Refer to: 2456515ec619Smrg# XORG_WITH_XMLTO --with-xmlto 2457515ec619Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2458515ec619Smrg# XORG_WITH_DOXYGEN --with-doxygen 2459515ec619Smrg# XORG_WITH_FOP --with-fop 2460515ec619Smrg# XORG_WITH_GROFF --with-groff 2461515ec619Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2462515ec619Smrg# 2463515ec619Smrg# Interface to module: 2464515ec619Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2465515ec619Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2466515ec619Smrg# 'no' user instructs the module not to generate developer docs 2467515ec619Smrg# parm1: specify the default value, yes or no. 2468515ec619Smrg# 2469515ec619SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2470515ec619Smrgm4_define([devel_default], m4_default([$1], [yes])) 2471515ec619SmrgAC_ARG_ENABLE(devel-docs, 2472515ec619Smrg AS_HELP_STRING([--enable-devel-docs], 2473515ec619Smrg [Enable building the developer documentation (default: ]devel_default[)]), 2474515ec619Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2475515ec619Smrgm4_undefine([devel_default]) 2476515ec619SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2477515ec619SmrgAC_MSG_CHECKING([whether to build developer documentation]) 2478515ec619SmrgAC_MSG_RESULT([$build_devel_docs]) 2479515ec619Smrg]) # XORG_ENABLE_DEVEL_DOCS 2480ff559fabSmrg 2481515ec619Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 2482515ec619Smrg# ---------------- 2483515ec619Smrg# Minimum version: 1.6.0 2484515ec619Smrg# 2485515ec619Smrg# This macro enables a builder to skip all functional specification targets. 2486515ec619Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2487515ec619Smrg# maximum flexibilty in controlling documentation building. 2488515ec619Smrg# Refer to: 2489515ec619Smrg# XORG_WITH_XMLTO --with-xmlto 2490515ec619Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2491515ec619Smrg# XORG_WITH_DOXYGEN --with-doxygen 2492515ec619Smrg# XORG_WITH_FOP --with-fop 2493515ec619Smrg# XORG_WITH_GROFF --with-groff 2494515ec619Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2495515ec619Smrg# 2496515ec619Smrg# Interface to module: 2497515ec619Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2498515ec619Smrg# --enable-specs: 'yes' user instructs the module to generate specs 2499515ec619Smrg# 'no' user instructs the module not to generate specs 2500515ec619Smrg# parm1: specify the default value, yes or no. 2501515ec619Smrg# 2502515ec619SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2503515ec619Smrgm4_define([spec_default], m4_default([$1], [yes])) 2504515ec619SmrgAC_ARG_ENABLE(specs, 2505515ec619Smrg AS_HELP_STRING([--enable-specs], 2506515ec619Smrg [Enable building the specs (default: ]spec_default[)]), 2507515ec619Smrg [build_specs=$enableval], [build_specs=]spec_default) 2508515ec619Smrgm4_undefine([spec_default]) 2509515ec619SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2510515ec619SmrgAC_MSG_CHECKING([whether to build functional specifications]) 2511515ec619SmrgAC_MSG_RESULT([$build_specs]) 2512515ec619Smrg]) # XORG_ENABLE_SPECS 2513fc544a13Smrg 2514515ec619Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2515515ec619Smrg# ---------------------------------------------- 2516515ec619Smrg# Minimum version: 1.13.0 2517515ec619Smrg# 2518515ec619Smrg# This macro enables a builder to enable/disable unit testing 2519515ec619Smrg# It makes no assumption about the test cases implementation 2520515ec619Smrg# Test cases may or may not use Automake "Support for test suites" 2521515ec619Smrg# They may or may not use the software utility library GLib 2522515ec619Smrg# 2523515ec619Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2524515ec619Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2525515ec619Smrg# The variable enable_unit_tests is used by other macros in this file. 2526515ec619Smrg# 2527515ec619Smrg# Interface to module: 2528515ec619Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2529515ec619Smrg# enable_unit_tests: used in configure.ac for additional configuration 2530515ec619Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2531515ec619Smrg# 'no' user instructs the module not to build tests 2532515ec619Smrg# parm1: specify the default value, yes or no. 2533515ec619Smrg# 2534515ec619SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2535515ec619SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2536515ec619SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2537515ec619SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2538515ec619Smrgm4_define([_defopt], m4_default([$1], [auto])) 2539515ec619SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2540515ec619Smrg [Enable building unit test cases (default: ]_defopt[)]), 2541515ec619Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2542515ec619Smrgm4_undefine([_defopt]) 2543515ec619SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2544515ec619SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2545515ec619SmrgAC_MSG_RESULT([$enable_unit_tests]) 2546515ec619Smrg]) # XORG_ENABLE_UNIT_TESTS 2547ff559fabSmrg 2548515ec619Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2549515ec619Smrg# ------------------------------------------------------ 2550515ec619Smrg# Minimum version: 1.17.0 2551515ec619Smrg# 2552515ec619Smrg# This macro enables a builder to enable/disable integration testing 2553515ec619Smrg# It makes no assumption about the test cases' implementation 2554515ec619Smrg# Test cases may or may not use Automake "Support for test suites" 2555515ec619Smrg# 2556515ec619Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2557515ec619Smrg# usually requires less dependencies and may be built and run under less 2558515ec619Smrg# stringent environments than integration tests. 2559515ec619Smrg# 2560515ec619Smrg# Interface to module: 2561515ec619Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2562515ec619Smrg# enable_integration_tests: used in configure.ac for additional configuration 2563515ec619Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2564515ec619Smrg# 'no' user instructs the module not to build tests 2565515ec619Smrg# parm1: specify the default value, yes or no. 2566515ec619Smrg# 2567515ec619SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2568515ec619SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2569515ec619Smrgm4_define([_defopt], m4_default([$1], [auto])) 2570515ec619SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2571515ec619Smrg [Enable building integration test cases (default: ]_defopt[)]), 2572515ec619Smrg [enable_integration_tests=$enableval], 2573515ec619Smrg [enable_integration_tests=]_defopt) 2574515ec619Smrgm4_undefine([_defopt]) 2575515ec619SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2576515ec619Smrg [test "x$enable_integration_tests" != xno]) 2577515ec619SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2578515ec619SmrgAC_MSG_RESULT([$enable_integration_tests]) 2579515ec619Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 2580ff559fabSmrg 2581515ec619Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2582515ec619Smrg# ---------------------------------------- 2583515ec619Smrg# Minimum version: 1.13.0 2584515ec619Smrg# 2585515ec619Smrg# GLib is a library which provides advanced data structures and functions. 2586515ec619Smrg# This macro enables a module to test for the presence of Glib. 2587515ec619Smrg# 2588515ec619Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2589515ec619Smrg# Otherwise the value of $enable_unit_tests is blank. 2590515ec619Smrg# 2591515ec619Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2592515ec619Smrg# test support usually requires less dependencies and may be built and run under 2593515ec619Smrg# less stringent environments than integration tests. 2594515ec619Smrg# 2595515ec619Smrg# Interface to module: 2596515ec619Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 2597515ec619Smrg# with_glib: used in configure.ac to know if GLib has been found 2598515ec619Smrg# --with-glib: 'yes' user instructs the module to use glib 2599515ec619Smrg# 'no' user instructs the module not to use glib 2600515ec619Smrg# 2601515ec619SmrgAC_DEFUN([XORG_WITH_GLIB],[ 2602515ec619SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2603515ec619Smrgm4_define([_defopt], m4_default([$2], [auto])) 2604515ec619SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2605515ec619Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 2606515ec619Smrg [with_glib=$withval], [with_glib=]_defopt) 2607515ec619Smrgm4_undefine([_defopt]) 2608ff559fabSmrg 2609515ec619Smrghave_glib=no 2610515ec619Smrg# Do not probe GLib if user explicitly disabled unit testing 2611515ec619Smrgif test "x$enable_unit_tests" != x"no"; then 2612515ec619Smrg # Do not probe GLib if user explicitly disabled it 2613515ec619Smrg if test "x$with_glib" != x"no"; then 2614515ec619Smrg m4_ifval( 2615515ec619Smrg [$1], 2616515ec619Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2617515ec619Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2618515ec619Smrg ) 2619515ec619Smrg fi 2620515ec619Smrgfi 2621ff559fabSmrg 2622515ec619Smrg# Not having GLib when unit testing has been explicitly requested is an error 2623515ec619Smrgif test "x$enable_unit_tests" = x"yes"; then 2624515ec619Smrg if test "x$have_glib" = x"no"; then 2625515ec619Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2626515ec619Smrg fi 2627515ec619Smrgfi 2628ff559fabSmrg 2629515ec619Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 2630515ec619Smrgif test "x$enable_unit_tests" = x"no"; then 2631515ec619Smrg if test "x$with_glib" = x"yes"; then 2632515ec619Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2633515ec619Smrg fi 26346fc0178dSmrgfi 2635ff559fabSmrg 2636515ec619Smrg# Not having GLib when it has been explicitly requested is an error 2637515ec619Smrgif test "x$with_glib" = x"yes"; then 2638515ec619Smrg if test "x$have_glib" = x"no"; then 2639515ec619Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2640515ec619Smrg fi 2641515ec619Smrgfi 26426fc0178dSmrg 2643515ec619SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2644515ec619Smrg]) # XORG_WITH_GLIB 26456fc0178dSmrg 2646515ec619Smrg# XORG_LD_WRAP([required|optional]) 2647515ec619Smrg# --------------------------------- 2648515ec619Smrg# Minimum version: 1.13.0 2649515ec619Smrg# 2650515ec619Smrg# Check if linker supports -wrap, passed via compiler flags 2651515ec619Smrg# 2652515ec619Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2653515ec619Smrg# Otherwise the value of $enable_unit_tests is blank. 2654515ec619Smrg# 2655515ec619Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2656515ec619Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2657515ec619Smrg# available, an argument of "optional" allows use when some unit tests require 2658515ec619Smrg# ld -wrap and others do not. 2659515ec619Smrg# 2660515ec619SmrgAC_DEFUN([XORG_LD_WRAP],[ 2661515ec619SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2662515ec619Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 2663515ec619Smrg void __wrap_exit(int status) { return; }], 2664515ec619Smrg [exit(0);])]) 2665515ec619Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 2666515ec619Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2667515ec619Smrg if test "x$have_ld_wrap" = x"no"; then 2668515ec619Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2669515ec619Smrg fi 2670515ec619Smrgfi 2671515ec619SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2672515ec619Smrg# 2673515ec619Smrg]) # XORG_LD_WRAP 2674ff559fabSmrg 2675515ec619Smrg# XORG_CHECK_LINKER_FLAGS 2676515ec619Smrg# ----------------------- 2677515ec619Smrg# SYNOPSIS 2678515ec619Smrg# 2679515ec619Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2680515ec619Smrg# 2681515ec619Smrg# DESCRIPTION 2682515ec619Smrg# 2683515ec619Smrg# Check whether the given linker FLAGS work with the current language's 2684515ec619Smrg# linker, or whether they give an error. 2685515ec619Smrg# 2686515ec619Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2687515ec619Smrg# success/failure. 2688515ec619Smrg# 2689515ec619Smrg# PROGRAM-SOURCE is the program source to link with, if needed 2690515ec619Smrg# 2691515ec619Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2692515ec619Smrg# 2693515ec619Smrg# LICENSE 2694515ec619Smrg# 2695515ec619Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2696515ec619Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2697515ec619Smrg# Copyright (c) 2009 Matteo Frigo 2698515ec619Smrg# 2699515ec619Smrg# This program is free software: you can redistribute it and/or modify it 2700515ec619Smrg# under the terms of the GNU General Public License as published by the 2701515ec619Smrg# Free Software Foundation, either version 3 of the License, or (at your 2702515ec619Smrg# option) any later version. 2703515ec619Smrg# 2704515ec619Smrg# This program is distributed in the hope that it will be useful, but 2705515ec619Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2706515ec619Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2707515ec619Smrg# Public License for more details. 2708515ec619Smrg# 2709515ec619Smrg# You should have received a copy of the GNU General Public License along 2710515ec619Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2711515ec619Smrg# 2712515ec619Smrg# As a special exception, the respective Autoconf Macro's copyright owner 2713515ec619Smrg# gives unlimited permission to copy, distribute and modify the configure 2714515ec619Smrg# scripts that are the output of Autoconf when processing the Macro. You 2715515ec619Smrg# need not follow the terms of the GNU General Public License when using 2716515ec619Smrg# or distributing such scripts, even though portions of the text of the 2717515ec619Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 2718515ec619Smrg# all other use of the material that constitutes the Autoconf Macro. 2719515ec619Smrg# 2720515ec619Smrg# This special exception to the GPL applies to versions of the Autoconf 2721515ec619Smrg# Macro released by the Autoconf Archive. When you make and distribute a 2722515ec619Smrg# modified version of the Autoconf Macro, you may extend this special 2723515ec619Smrg# exception to the GPL to apply to your modified version as well.# 2724515ec619SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2725515ec619Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2726515ec619Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2727515ec619SmrgAS_LITERAL_IF([$1], 2728515ec619Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2729515ec619Smrg ax_save_FLAGS=$LDFLAGS 2730515ec619Smrg LDFLAGS="$1" 2731515ec619Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2732515ec619Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2733515ec619Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2734515ec619Smrg LDFLAGS=$ax_save_FLAGS])], 2735515ec619Smrg [ax_save_FLAGS=$LDFLAGS 2736515ec619Smrg LDFLAGS="$1" 2737515ec619Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2738515ec619Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2739515ec619Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2740515ec619Smrg LDFLAGS=$ax_save_FLAGS]) 2741515ec619Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2742515ec619SmrgAC_MSG_RESULT($xorg_check_linker_flags) 2743515ec619Smrgif test "x$xorg_check_linker_flags" = xyes; then 2744515ec619Smrg m4_default([$2], :) 27456fc0178dSmrgelse 2746515ec619Smrg m4_default([$3], :) 2747862f5301Smrgfi 2748515ec619Smrg]) # XORG_CHECK_LINKER_FLAGS 2749515ec619Smrg 2750515ec619Smrg# XORG_MEMORY_CHECK_FLAGS 2751515ec619Smrg# ----------------------- 2752515ec619Smrg# Minimum version: 1.16.0 2753515ec619Smrg# 2754515ec619Smrg# This macro attempts to find appropriate memory checking functionality 2755515ec619Smrg# for various platforms which unit testing code may use to catch various 2756515ec619Smrg# forms of memory allocation and access errors in testing. 2757515ec619Smrg# 2758515ec619Smrg# Interface to module: 2759515ec619Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2760515ec619Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2761515ec619Smrg# 2762515ec619Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2763515ec619Smrg# 2764515ec619SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2765ff559fabSmrg 2766515ec619SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2767515ec619SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2768515ec619Smrg [Environment variables to enable memory checking in tests]) 2769ff559fabSmrg 2770515ec619Smrg# Check for different types of support on different platforms 2771515ec619Smrgcase $host_os in 2772515ec619Smrg solaris*) 2773515ec619Smrg AC_CHECK_LIB([umem], [umem_alloc], 2774515ec619Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2775515ec619Smrg ;; 2776515ec619Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2777515ec619Smrg # both directly and inverted, so should not be 0 or 255. 2778515ec619Smrg malloc_debug_env='MALLOC_PERTURB_=15' 2779515ec619Smrg ;; 2780515ec619Smrg darwin*) 2781515ec619Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2782515ec619Smrg ;; 2783515ec619Smrg *bsd*) 2784515ec619Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2785515ec619Smrg ;; 2786515ec619Smrgesac 2787515ec619Smrg 2788515ec619Smrg# User supplied flags override default flags 2789515ec619Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2790515ec619Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 27916fc0178dSmrgfi 27927a3b38f7Smrg 2793515ec619SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2794515ec619Smrg]) # XORG_WITH_LINT 2795ff559fabSmrg 2796515ec619Smrg# XORG_CHECK_MALLOC_ZERO 2797515ec619Smrg# ---------------------- 2798515ec619Smrg# Minimum version: 1.0.0 2799515ec619Smrg# 2800515ec619Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2801515ec619Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 2802515ec619Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2803515ec619SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2804515ec619SmrgAC_ARG_ENABLE(malloc0returnsnull, 2805515ec619Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 2806515ec619Smrg [malloc(0) returns NULL (default: auto)]), 2807515ec619Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2808515ec619Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2809ff559fabSmrg 2810515ec619SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2811515ec619Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2812515ec619SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2813515ec619Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2814515ec619Smrg#include <stdlib.h> 2815515ec619Smrg],[ 2816515ec619Smrg char *m0, *r0, *c0, *p; 2817515ec619Smrg m0 = malloc(0); 2818515ec619Smrg p = malloc(10); 2819515ec619Smrg r0 = realloc(p,0); 2820515ec619Smrg c0 = calloc(0,10); 2821515ec619Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2822515ec619Smrg])], 2823515ec619Smrg [xorg_cv_malloc0_returns_null=yes], 2824515ec619Smrg [xorg_cv_malloc0_returns_null=no])]) 2825515ec619SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2826515ec619Smrgfi 2827515ec619SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2828515ec619Smrg 2829515ec619Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2830515ec619Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2831515ec619Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2832515ec619Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 28336fc0178dSmrgelse 2834515ec619Smrg MALLOC_ZERO_CFLAGS="" 2835515ec619Smrg XMALLOC_ZERO_CFLAGS="" 2836515ec619Smrg XTMALLOC_ZERO_CFLAGS="" 28376fc0178dSmrgfi 28386fc0178dSmrg 2839515ec619SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2840515ec619SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2841515ec619SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2842515ec619Smrg]) # XORG_CHECK_MALLOC_ZERO 28436fc0178dSmrg 2844515ec619Smrg# XORG_WITH_LINT() 28456fc0178dSmrg# ---------------- 2846515ec619Smrg# Minimum version: 1.1.0 2847515ec619Smrg# 2848515ec619Smrg# This macro enables the use of a tool that flags some suspicious and 2849515ec619Smrg# non-portable constructs (likely to be bugs) in C language source code. 2850515ec619Smrg# It will attempt to locate the tool and use appropriate options. 2851515ec619Smrg# There are various lint type tools on different platforms. 2852515ec619Smrg# 2853515ec619Smrg# Interface to module: 2854515ec619Smrg# LINT: returns the path to the tool found on the platform 2855515ec619Smrg# or the value set to LINT on the configure cmd line 2856515ec619Smrg# also an Automake conditional 2857515ec619Smrg# LINT_FLAGS: an Automake variable with appropriate flags 2858515ec619Smrg# 2859515ec619Smrg# --with-lint: 'yes' user instructs the module to use lint 2860515ec619Smrg# 'no' user instructs the module not to use lint (default) 2861515ec619Smrg# 2862515ec619Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2863515ec619Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2864515ec619Smrg# 2865515ec619SmrgAC_DEFUN([XORG_WITH_LINT],[ 28666fc0178dSmrg 2867515ec619SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2868515ec619SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2869515ec619SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2870515ec619Smrg [Use a lint-style source code checker (default: disabled)])], 2871515ec619Smrg [use_lint=$withval], [use_lint=no]) 2872ff559fabSmrg 2873515ec619Smrg# Obtain platform specific info like program name and options 2874515ec619Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2875515ec619Smrgcase $host_os in 2876515ec619Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2877515ec619Smrg lint_name=splint 2878515ec619Smrg lint_options="-badflag" 2879515ec619Smrg ;; 2880515ec619Smrg *freebsd* | *netbsd*) 2881515ec619Smrg lint_name=lint 2882515ec619Smrg lint_options="-u -b" 2883515ec619Smrg ;; 2884515ec619Smrg *solaris*) 2885515ec619Smrg lint_name=lint 2886515ec619Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2887515ec619Smrg ;; 2888515ec619Smrgesac 2889ff559fabSmrg 2890515ec619Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2891515ec619Smrgif test "x$use_lint" = x"yes" ; then 2892515ec619Smrg AC_PATH_PROG([LINT], [$lint_name]) 2893515ec619Smrg if test "x$LINT" = "x"; then 2894515ec619Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2895515ec619Smrg fi 2896515ec619Smrgelif test "x$use_lint" = x"no" ; then 2897515ec619Smrg if test "x$LINT" != "x"; then 2898515ec619Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2899515ec619Smrg fi 29006fc0178dSmrgelse 2901515ec619Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2902515ec619Smrgfi 2903862f5301Smrg 2904515ec619Smrg# User supplied flags override default flags 2905515ec619Smrgif test "x$LINT_FLAGS" != "x"; then 2906515ec619Smrg lint_options=$LINT_FLAGS 2907515ec619Smrgfi 2908ff559fabSmrg 2909515ec619SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2910515ec619SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2911ff559fabSmrg 2912515ec619Smrg]) # XORG_WITH_LINT 2913ff559fabSmrg 2914515ec619Smrg# XORG_LINT_LIBRARY(LIBNAME) 2915515ec619Smrg# -------------------------- 2916515ec619Smrg# Minimum version: 1.1.0 2917515ec619Smrg# 2918515ec619Smrg# Sets up flags for building lint libraries for checking programs that call 2919515ec619Smrg# functions in the library. 2920515ec619Smrg# 2921515ec619Smrg# Interface to module: 2922515ec619Smrg# LINTLIB - Automake variable with the name of lint library file to make 2923515ec619Smrg# MAKE_LINT_LIB - Automake conditional 2924515ec619Smrg# 2925515ec619Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2926515ec619Smrg# - 'no' user instructs the module not to create a lint library (default) 29276fc0178dSmrg 2928515ec619SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2929515ec619SmrgAC_REQUIRE([XORG_WITH_LINT]) 2930515ec619SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2931515ec619Smrg [Create lint library (default: disabled)])], 2932515ec619Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2933ff559fabSmrg 2934515ec619Smrgif test "x$make_lint_lib" = x"yes" ; then 2935515ec619Smrg LINTLIB=llib-l$1.ln 2936515ec619Smrg if test "x$LINT" = "x"; then 2937515ec619Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2938515ec619Smrg fi 2939515ec619Smrgelif test "x$make_lint_lib" != x"no" ; then 2940515ec619Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2941515ec619Smrgfi 29426fc0178dSmrg 2943515ec619SmrgAC_SUBST(LINTLIB) 2944515ec619SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2945ff559fabSmrg 2946515ec619Smrg]) # XORG_LINT_LIBRARY 2947ff559fabSmrg 2948515ec619Smrg# XORG_COMPILER_BRAND 2949515ec619Smrg# ------------------- 2950515ec619Smrg# Minimum version: 1.14.0 2951515ec619Smrg# 2952515ec619Smrg# Checks for various brands of compilers and sets flags as appropriate: 2953515ec619Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2954515ec619Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 2955515ec619Smrg# clang compiler - sets CLANGCC to "yes" 2956515ec619Smrg# Intel compiler - sets INTELCC to "yes" 2957515ec619Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2958515ec619Smrg# 2959515ec619SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 2960515ec619SmrgAC_LANG_CASE( 2961515ec619Smrg [C], [ 2962515ec619Smrg AC_REQUIRE([AC_PROG_CC_C99]) 2963515ec619Smrg ], 2964515ec619Smrg [C++], [ 2965515ec619Smrg AC_REQUIRE([AC_PROG_CXX]) 2966515ec619Smrg ] 2967515ec619Smrg) 2968515ec619SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2969515ec619SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2970515ec619SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2971515ec619Smrg]) # XORG_COMPILER_BRAND 2972ff559fabSmrg 2973515ec619Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2974515ec619Smrg# --------------- 2975515ec619Smrg# Minimum version: 1.16.0 2976515ec619Smrg# 2977515ec619Smrg# Test if the compiler works when passed the given flag as a command line argument. 2978515ec619Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 2979515ec619Smrg# next flag in the list until there are no more options. 2980515ec619Smrg# 2981515ec619Smrg# Note that this does not guarantee that the compiler supports the flag as some 2982515ec619Smrg# compilers will simply ignore arguments that they do not understand, but we do 2983515ec619Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 2984515ec619Smrg# -Werror=unused-command-line-argument 2985515ec619Smrg# 2986515ec619SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 2987515ec619Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2988515ec619Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2989862f5301Smrg 2990515ec619SmrgAC_LANG_COMPILER_REQUIRE 2991ff559fabSmrg 2992515ec619SmrgAC_LANG_CASE( 2993515ec619Smrg [C], [ 2994515ec619Smrg AC_REQUIRE([AC_PROG_CC_C99]) 2995515ec619Smrg define([PREFIX], [C]) 2996515ec619Smrg define([CACHE_PREFIX], [cc]) 2997515ec619Smrg define([COMPILER], [$CC]) 2998515ec619Smrg ], 2999515ec619Smrg [C++], [ 3000515ec619Smrg define([PREFIX], [CXX]) 3001515ec619Smrg define([CACHE_PREFIX], [cxx]) 3002515ec619Smrg define([COMPILER], [$CXX]) 3003515ec619Smrg ] 3004515ec619Smrg) 3005ff559fabSmrg 3006515ec619Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3007ff559fabSmrg 3008515ec619Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3009515ec619Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3010515ec619Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3011515ec619Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3012515ec619Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3013515ec619Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3014515ec619Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3015515ec619Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3016515ec619Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3017515ec619Smrgfi 3018ff559fabSmrg 3019515ec619Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3020515ec619Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3021515ec619Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3022515ec619Smrg fi 3023515ec619Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3024515ec619Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3025515ec619Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3026515ec619Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3027515ec619Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3028515ec619Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3029515ec619Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3030515ec619Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3031515ec619Smrgfi 3032ff559fabSmrg 3033515ec619Smrgfound="no" 3034515ec619Smrgm4_foreach([flag], m4_cdr($@), [ 3035515ec619Smrg if test $found = "no" ; then 3036515ec619Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3037515ec619Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3038515ec619Smrg fi 3039ff559fabSmrg 3040515ec619Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3041515ec619Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3042515ec619Smrg fi 3043ff559fabSmrg 3044515ec619Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3045ff559fabSmrg 3046515ec619Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3047515ec619Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3048515ec619Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3049515ec619Smrg AC_CACHE_VAL($cacheid, 3050515ec619Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3051515ec619Smrg [eval $cacheid=yes], 3052515ec619Smrg [eval $cacheid=no])]) 30536fc0178dSmrg 3054515ec619Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3055ff559fabSmrg 3056515ec619Smrg eval supported=\$$cacheid 3057515ec619Smrg AC_MSG_RESULT([$supported]) 3058515ec619Smrg if test "$supported" = "yes" ; then 3059515ec619Smrg $1="$$1 ]flag[" 3060515ec619Smrg found="yes" 3061515ec619Smrg fi 3062515ec619Smrg fi 3063515ec619Smrg]) 3064515ec619Smrg]) # XORG_TESTSET_CFLAG 3065ff559fabSmrg 3066515ec619Smrg# XORG_COMPILER_FLAGS 3067515ec619Smrg# --------------- 3068515ec619Smrg# Minimum version: 1.16.0 3069515ec619Smrg# 3070515ec619Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3071515ec619Smrg# arguments supported by the selected compiler which do NOT alter the generated 3072515ec619Smrg# code. These arguments will cause the compiler to print various warnings 3073515ec619Smrg# during compilation AND turn a conservative set of warnings into errors. 3074515ec619Smrg# 3075515ec619Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3076515ec619Smrg# future versions of util-macros as options are added to new compilers. 3077515ec619Smrg# 3078515ec619SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 3079515ec619SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3080ff559fabSmrg 3081515ec619SmrgAC_ARG_ENABLE(selective-werror, 3082515ec619Smrg AS_HELP_STRING([--disable-selective-werror], 3083515ec619Smrg [Turn off selective compiler errors. (default: enabled)]), 3084515ec619Smrg [SELECTIVE_WERROR=$enableval], 3085515ec619Smrg [SELECTIVE_WERROR=yes]) 3086ff559fabSmrg 3087515ec619SmrgAC_LANG_CASE( 3088515ec619Smrg [C], [ 3089515ec619Smrg define([PREFIX], [C]) 3090515ec619Smrg ], 3091515ec619Smrg [C++], [ 3092515ec619Smrg define([PREFIX], [CXX]) 3093515ec619Smrg ] 3094515ec619Smrg) 3095515ec619Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 3096515ec619Smrgif test "x$SUNCC" = "xyes"; then 3097515ec619Smrg [BASE_]PREFIX[FLAGS]="-v" 3098515ec619Smrgelse 3099515ec619Smrg [BASE_]PREFIX[FLAGS]="" 3100515ec619Smrgfi 3101ff559fabSmrg 3102515ec619Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3103515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3104515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3105515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3106515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3107ff559fabSmrg 3108515ec619SmrgAC_LANG_CASE( 3109515ec619Smrg [C], [ 3110515ec619Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3111515ec619Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3112515ec619Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3113515ec619Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3114515ec619Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3115515ec619Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3116515ec619Smrg ] 3117515ec619Smrg) 3118ff559fabSmrg 3119515ec619Smrg# This chunk adds additional warnings that could catch undesired effects. 3120515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3121515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3122515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3123515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3124515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3125515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3126515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3127ff559fabSmrg 3128515ec619Smrg# These are currently disabled because they are noisy. They will be enabled 3129515ec619Smrg# in the future once the codebase is sufficiently modernized to silence 3130515ec619Smrg# them. For now, I don't want them to drown out the other warnings. 3131515ec619Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3132515ec619Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3133515ec619Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 3134ff559fabSmrg 3135515ec619Smrg# Turn some warnings into errors, so we don't accidently get successful builds 3136515ec619Smrg# when there are problems that should be fixed. 3137ff559fabSmrg 3138515ec619Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 3139515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3140515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3141515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3142515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3143515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3144515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3145515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3146515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3147515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3148515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3149515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3150515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3151515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3152515ec619Smrgelse 3153515ec619SmrgAC_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]) 3154515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3155515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3156515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3157515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3158515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3159515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3160515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3161515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3162515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3163515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3164515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3165515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3166515ec619SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3167515ec619Smrgfi 3168ff559fabSmrg 3169515ec619SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3170515ec619Smrg]) # XORG_COMPILER_FLAGS 3171ff559fabSmrg 3172515ec619Smrg# XORG_CWARNFLAGS 3173515ec619Smrg# --------------- 3174515ec619Smrg# Minimum version: 1.2.0 3175515ec619Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3176515ec619Smrg# 3177515ec619Smrg# Defines CWARNFLAGS to enable C compiler warnings. 3178515ec619Smrg# 3179515ec619Smrg# This function is deprecated because it defines -fno-strict-aliasing 3180515ec619Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3181515ec619Smrg# is needed, then it should be added explicitly in the module when 3182515ec619Smrg# it is updated to use BASE_CFLAGS. 3183515ec619Smrg# 3184515ec619SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3185515ec619SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3186515ec619SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3187515ec619SmrgAC_LANG_CASE( 3188515ec619Smrg [C], [ 3189515ec619Smrg CWARNFLAGS="$BASE_CFLAGS" 3190515ec619Smrg if test "x$GCC" = xyes ; then 3191515ec619Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3192515ec619Smrg fi 3193515ec619Smrg AC_SUBST(CWARNFLAGS) 3194515ec619Smrg ] 3195515ec619Smrg) 3196515ec619Smrg]) # XORG_CWARNFLAGS 319744dda7b2Smrg 3198515ec619Smrg# XORG_STRICT_OPTION 3199515ec619Smrg# ----------------------- 3200515ec619Smrg# Minimum version: 1.3.0 3201515ec619Smrg# 3202515ec619Smrg# Add configure option to enable strict compilation flags, such as treating 3203515ec619Smrg# warnings as fatal errors. 3204515ec619Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3205515ec619Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3206515ec619Smrg# 3207515ec619Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3208515ec619Smrg# when strict compilation is unconditionally desired. 3209515ec619SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3210515ec619SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3211515ec619SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 321244dda7b2Smrg 3213515ec619SmrgAC_ARG_ENABLE(strict-compilation, 3214515ec619Smrg AS_HELP_STRING([--enable-strict-compilation], 3215515ec619Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3216515ec619Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 321744dda7b2Smrg 3218515ec619SmrgAC_LANG_CASE( 3219515ec619Smrg [C], [ 3220515ec619Smrg define([PREFIX], [C]) 3221515ec619Smrg ], 3222515ec619Smrg [C++], [ 3223515ec619Smrg define([PREFIX], [CXX]) 3224515ec619Smrg ] 3225515ec619Smrg) 322644dda7b2Smrg 3227515ec619Smrg[STRICT_]PREFIX[FLAGS]="" 3228515ec619SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3229515ec619SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 323044dda7b2Smrg 3231515ec619Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3232515ec619Smrg# activate it with -Werror, so we add it here explicitly. 3233515ec619SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3234fc544a13Smrg 3235515ec619Smrgif test "x$STRICT_COMPILE" = "xyes"; then 3236515ec619Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3237515ec619Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3238515ec619Smrgfi 3239515ec619SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3240515ec619SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3241515ec619SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3242515ec619Smrg]) # XORG_STRICT_OPTION 324344dda7b2Smrg 3244515ec619Smrg# XORG_DEFAULT_OPTIONS 3245515ec619Smrg# -------------------- 3246515ec619Smrg# Minimum version: 1.3.0 3247515ec619Smrg# 3248515ec619Smrg# Defines default options for X.Org modules. 3249515ec619Smrg# 3250515ec619SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3251515ec619SmrgAC_REQUIRE([AC_PROG_INSTALL]) 3252515ec619SmrgXORG_COMPILER_FLAGS 3253515ec619SmrgXORG_CWARNFLAGS 3254515ec619SmrgXORG_STRICT_OPTION 3255515ec619SmrgXORG_RELEASE_VERSION 3256515ec619SmrgXORG_CHANGELOG 3257515ec619SmrgXORG_INSTALL 3258515ec619SmrgXORG_MANPAGE_SECTIONS 3259515ec619Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3260515ec619Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3261515ec619Smrg]) # XORG_DEFAULT_OPTIONS 326244dda7b2Smrg 3263515ec619Smrg# XORG_INSTALL() 3264515ec619Smrg# ---------------- 3265515ec619Smrg# Minimum version: 1.4.0 3266515ec619Smrg# 3267515ec619Smrg# Defines the variable INSTALL_CMD as the command to copy 3268515ec619Smrg# INSTALL from $prefix/share/util-macros. 3269515ec619Smrg# 3270515ec619SmrgAC_DEFUN([XORG_INSTALL], [ 3271515ec619SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3272515ec619Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3273515ec619SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3274515ec619Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3275515ec619Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3276515ec619Smrgtouch \$(top_srcdir)/INSTALL; \ 3277515ec619Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3278515ec619SmrgAC_SUBST([INSTALL_CMD]) 3279515ec619Smrg]) # XORG_INSTALL 3280515ec619Smrgdnl Copyright 2005 Red Hat, Inc 3281515ec619Smrgdnl 3282515ec619Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3283515ec619Smrgdnl documentation for any purpose is hereby granted without fee, provided that 3284515ec619Smrgdnl the above copyright notice appear in all copies and that both that 3285515ec619Smrgdnl copyright notice and this permission notice appear in supporting 3286515ec619Smrgdnl documentation. 3287515ec619Smrgdnl 3288515ec619Smrgdnl The above copyright notice and this permission notice shall be included 3289515ec619Smrgdnl in all copies or substantial portions of the Software. 3290515ec619Smrgdnl 3291515ec619Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3292515ec619Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3293515ec619Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3294515ec619Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3295515ec619Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3296515ec619Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3297515ec619Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 3298515ec619Smrgdnl 3299515ec619Smrgdnl Except as contained in this notice, the name of the copyright holders shall 3300515ec619Smrgdnl not be used in advertising or otherwise to promote the sale, use or 3301515ec619Smrgdnl other dealings in this Software without prior written authorization 3302515ec619Smrgdnl from the copyright holders. 3303515ec619Smrgdnl 3304862f5301Smrg 3305515ec619Smrg# XORG_RELEASE_VERSION 3306515ec619Smrg# -------------------- 3307515ec619Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 330844dda7b2Smrg 3309515ec619SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3310515ec619Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3311515ec619Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3312515ec619Smrg [Major version of this package]) 3313515ec619Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3314515ec619Smrg if test "x$PVM" = "x"; then 3315515ec619Smrg PVM="0" 3316515ec619Smrg fi 3317515ec619Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3318515ec619Smrg [$PVM], 3319515ec619Smrg [Minor version of this package]) 3320515ec619Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3321515ec619Smrg if test "x$PVP" = "x"; then 3322515ec619Smrg PVP="0" 3323515ec619Smrg fi 3324515ec619Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3325515ec619Smrg [$PVP], 3326515ec619Smrg [Patch version of this package]) 3327515ec619Smrg]) 332844dda7b2Smrg 3329515ec619Smrg# XORG_CHANGELOG() 3330515ec619Smrg# ---------------- 3331515ec619Smrg# Minimum version: 1.2.0 3332515ec619Smrg# 3333515ec619Smrg# Defines the variable CHANGELOG_CMD as the command to generate 3334515ec619Smrg# ChangeLog from git. 3335515ec619Smrg# 3336515ec619Smrg# 3337515ec619SmrgAC_DEFUN([XORG_CHANGELOG], [ 3338515ec619SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3339515ec619Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3340515ec619Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3341515ec619Smrgtouch \$(top_srcdir)/ChangeLog; \ 3342515ec619Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3343515ec619SmrgAC_SUBST([CHANGELOG_CMD]) 3344515ec619Smrg]) # XORG_CHANGELOG 334544dda7b2Smrg 3346515ec619Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3347515ec619Smrg# 3348515ec619Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3349515ec619Smrg# Foundation, Inc. 3350515ec619Smrg# Written by Gordon Matzigkeit, 1996 3351515ec619Smrg# 3352515ec619Smrg# This file is free software; the Free Software Foundation gives 3353515ec619Smrg# unlimited permission to copy and/or distribute it, with or without 3354515ec619Smrg# modifications, as long as this notice is preserved. 335544dda7b2Smrg 3356515ec619Smrgm4_define([_LT_COPYING], [dnl 3357515ec619Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 3358515ec619Smrg# This is free software; see the source for copying conditions. There is NO 3359515ec619Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 336044dda7b2Smrg 3361515ec619Smrg# GNU Libtool is free software; you can redistribute it and/or modify 3362515ec619Smrg# it under the terms of the GNU General Public License as published by 3363515ec619Smrg# the Free Software Foundation; either version 2 of of the License, or 3364515ec619Smrg# (at your option) any later version. 3365515ec619Smrg# 3366515ec619Smrg# As a special exception to the GNU General Public License, if you 3367515ec619Smrg# distribute this file as part of a program or library that is built 3368515ec619Smrg# using GNU Libtool, you may include this file under the same 3369515ec619Smrg# distribution terms that you use for the rest of that program. 3370515ec619Smrg# 3371515ec619Smrg# GNU Libtool is distributed in the hope that it will be useful, but 3372515ec619Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3373515ec619Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3374515ec619Smrg# GNU General Public License for more details. 3375515ec619Smrg# 3376515ec619Smrg# You should have received a copy of the GNU General Public License 3377515ec619Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3378515ec619Smrg]) 337944dda7b2Smrg 3380515ec619Smrg# serial 59 LT_INIT 338144dda7b2Smrg 338244dda7b2Smrg 3383515ec619Smrg# LT_PREREQ(VERSION) 3384515ec619Smrg# ------------------ 3385515ec619Smrg# Complain and exit if this libtool version is less that VERSION. 3386515ec619Smrgm4_defun([LT_PREREQ], 3387515ec619Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3388515ec619Smrg [m4_default([$3], 3389515ec619Smrg [m4_fatal([Libtool version $1 or higher is required], 3390515ec619Smrg 63)])], 3391515ec619Smrg [$2])]) 339244dda7b2Smrg 339344dda7b2Smrg 3394515ec619Smrg# _LT_CHECK_BUILDDIR 3395515ec619Smrg# ------------------ 3396515ec619Smrg# Complain if the absolute build directory name contains unusual characters 3397515ec619Smrgm4_defun([_LT_CHECK_BUILDDIR], 3398515ec619Smrg[case `pwd` in 3399515ec619Smrg *\ * | *\ *) 3400515ec619Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3401515ec619Smrgesac 3402515ec619Smrg]) 340344dda7b2Smrg 340444dda7b2Smrg 3405515ec619Smrg# LT_INIT([OPTIONS]) 3406515ec619Smrg# ------------------ 3407515ec619SmrgAC_DEFUN([LT_INIT], 3408515ec619Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3409515ec619SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3410515ec619SmrgAC_BEFORE([$0], [LT_LANG])dnl 3411515ec619SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 3412515ec619SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 3413515ec619Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 341444dda7b2Smrg 3415515ec619Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 3416515ec619Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3417515ec619Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3418515ec619Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3419515ec619Smrgdnl unless we require an AC_DEFUNed macro: 3420515ec619SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 3421515ec619SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 3422515ec619SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 3423515ec619SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 3424515ec619Smrgm4_require([_LT_PROG_LTMAIN])dnl 3425862f5301Smrg 3426515ec619Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3427862f5301Smrg 3428515ec619Smrgdnl Parse OPTIONS 3429515ec619Smrg_LT_SET_OPTIONS([$0], [$1]) 343044dda7b2Smrg 3431515ec619Smrg# This can be used to rebuild libtool when needed 3432515ec619SmrgLIBTOOL_DEPS=$ltmain 343344dda7b2Smrg 3434515ec619Smrg# Always use our own libtool. 3435515ec619SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 3436515ec619SmrgAC_SUBST(LIBTOOL)dnl 343744dda7b2Smrg 3438515ec619Smrg_LT_SETUP 3439862f5301Smrg 3440515ec619Smrg# Only expand once: 3441515ec619Smrgm4_define([LT_INIT]) 3442515ec619Smrg])# LT_INIT 344344dda7b2Smrg 3444515ec619Smrg# Old names: 3445515ec619SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3446515ec619SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3447515ec619Smrgdnl aclocal-1.4 backwards compatibility: 3448515ec619Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3449515ec619Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 345044dda7b2Smrg 345144dda7b2Smrg 3452515ec619Smrg# _LT_PREPARE_CC_BASENAME 3453515ec619Smrg# ----------------------- 3454515ec619Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 3455515ec619Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3456515ec619Smrgfunc_cc_basename () 3457515ec619Smrg{ 3458515ec619Smrg for cc_temp in @S|@*""; do 3459515ec619Smrg case $cc_temp in 3460515ec619Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3461515ec619Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3462515ec619Smrg \-*) ;; 3463515ec619Smrg *) break;; 34646fc0178dSmrg esac 3465515ec619Smrg done 3466515ec619Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3467515ec619Smrg} 3468515ec619Smrg])# _LT_PREPARE_CC_BASENAME 346944dda7b2Smrg 347044dda7b2Smrg 3471515ec619Smrg# _LT_CC_BASENAME(CC) 3472515ec619Smrg# ------------------- 3473515ec619Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3474515ec619Smrg# but that macro is also expanded into generated libtool script, which 3475515ec619Smrg# arranges for $SED and $ECHO to be set by different means. 3476515ec619Smrgm4_defun([_LT_CC_BASENAME], 3477515ec619Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3478515ec619SmrgAC_REQUIRE([_LT_DECL_SED])dnl 3479515ec619SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3480515ec619Smrgfunc_cc_basename $1 3481515ec619Smrgcc_basename=$func_cc_basename_result 3482515ec619Smrg]) 348344dda7b2Smrg 348444dda7b2Smrg 3485515ec619Smrg# _LT_FILEUTILS_DEFAULTS 3486515ec619Smrg# ---------------------- 3487515ec619Smrg# It is okay to use these file commands and assume they have been set 3488515ec619Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3489515ec619Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 3490515ec619Smrg[: ${CP="cp -f"} 3491515ec619Smrg: ${MV="mv -f"} 3492515ec619Smrg: ${RM="rm -f"} 3493515ec619Smrg])# _LT_FILEUTILS_DEFAULTS 349444dda7b2Smrg 349544dda7b2Smrg 3496515ec619Smrg# _LT_SETUP 3497515ec619Smrg# --------- 3498515ec619Smrgm4_defun([_LT_SETUP], 3499515ec619Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3500515ec619SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3501515ec619SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3502515ec619SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3503515ec619Smrg 3504515ec619Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3505515ec619Smrgdnl 3506515ec619Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 3507515ec619Smrg_LT_DECL([], [host], [0])dnl 3508515ec619Smrg_LT_DECL([], [host_os], [0])dnl 3509515ec619Smrgdnl 3510515ec619Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 3511515ec619Smrg_LT_DECL([], [build], [0])dnl 3512515ec619Smrg_LT_DECL([], [build_os], [0])dnl 3513515ec619Smrgdnl 3514515ec619SmrgAC_REQUIRE([AC_PROG_CC])dnl 3515515ec619SmrgAC_REQUIRE([LT_PATH_LD])dnl 3516515ec619SmrgAC_REQUIRE([LT_PATH_NM])dnl 3517515ec619Smrgdnl 3518515ec619SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 3519515ec619Smrgtest -z "$LN_S" && LN_S="ln -s" 3520515ec619Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3521515ec619Smrgdnl 3522515ec619SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 3523515ec619Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3524515ec619Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3525515ec619Smrgdnl 3526515ec619Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3527515ec619Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3528515ec619Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3529515ec619Smrgm4_require([_LT_CMD_RELOAD])dnl 3530515ec619Smrgm4_require([_LT_DECL_FILECMD])dnl 3531515ec619Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 3532515ec619Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3533515ec619Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 3534515ec619Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3535515ec619Smrgm4_require([_LT_WITH_SYSROOT])dnl 3536515ec619Smrgm4_require([_LT_CMD_TRUNCATE])dnl 3537515ec619Smrg 3538515ec619Smrg_LT_CONFIG_LIBTOOL_INIT([ 3539515ec619Smrg# See if we are running on zsh, and set the options that allow our 3540515ec619Smrg# commands through without removal of \ escapes INIT. 3541515ec619Smrgif test -n "\${ZSH_VERSION+set}"; then 3542515ec619Smrg setopt NO_GLOB_SUBST 3543515ec619Smrgfi 3544515ec619Smrg]) 3545515ec619Smrgif test -n "${ZSH_VERSION+set}"; then 3546515ec619Smrg setopt NO_GLOB_SUBST 3547515ec619Smrgfi 3548515ec619Smrg 3549515ec619Smrg_LT_CHECK_OBJDIR 3550515ec619Smrg 3551515ec619Smrgm4_require([_LT_TAG_COMPILER])dnl 3552515ec619Smrg 35536fc0178dSmrgcase $host_os in 3554515ec619Smrgaix3*) 3555515ec619Smrg # AIX sometimes has problems with the GCC collect2 program. For some 3556515ec619Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 3557515ec619Smrg # vanish in a puff of smoke. 3558515ec619Smrg if test set != "${COLLECT_NAMES+set}"; then 3559515ec619Smrg COLLECT_NAMES= 3560515ec619Smrg export COLLECT_NAMES 3561515ec619Smrg fi 3562515ec619Smrg ;; 35636fc0178dSmrgesac 356444dda7b2Smrg 3565515ec619Smrg# Global variables: 3566515ec619Smrgofile=libtool 3567515ec619Smrgcan_build_shared=yes 3568862f5301Smrg 3569515ec619Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 3570515ec619Smrg# ICC, which need '.lib'). 3571515ec619Smrglibext=a 357244dda7b2Smrg 3573515ec619Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 357444dda7b2Smrg 3575515ec619Smrgold_CC=$CC 3576515ec619Smrgold_CFLAGS=$CFLAGS 357744dda7b2Smrg 3578515ec619Smrg# Set sane defaults for various variables 3579515ec619Smrgtest -z "$CC" && CC=cc 3580515ec619Smrgtest -z "$LTCC" && LTCC=$CC 3581515ec619Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3582515ec619Smrgtest -z "$LD" && LD=ld 3583515ec619Smrgtest -z "$ac_objext" && ac_objext=o 358444dda7b2Smrg 3585515ec619Smrg_LT_CC_BASENAME([$compiler]) 358644dda7b2Smrg 3587515ec619Smrg# Only perform the check for file, if the check method requires it 3588515ec619Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 3589515ec619Smrgcase $deplibs_check_method in 3590515ec619Smrgfile_magic*) 3591515ec619Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3592515ec619Smrg _LT_PATH_MAGIC 3593515ec619Smrg fi 3594862f5301Smrg ;; 3595515ec619Smrgesac 359644dda7b2Smrg 3597515ec619Smrg# Use C for the default configuration in the libtool script 3598515ec619SmrgLT_SUPPORTED_TAG([CC]) 3599515ec619Smrg_LT_LANG_C_CONFIG 3600515ec619Smrg_LT_LANG_DEFAULT_CONFIG 3601515ec619Smrg_LT_CONFIG_COMMANDS 3602515ec619Smrg])# _LT_SETUP 360344dda7b2Smrg 360444dda7b2Smrg 3605515ec619Smrg# _LT_PREPARE_SED_QUOTE_VARS 3606515ec619Smrg# -------------------------- 3607515ec619Smrg# Define a few sed substitution that help us do robust quoting. 3608515ec619Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3609515ec619Smrg[# Backslashify metacharacters that are still active within 3610515ec619Smrg# double-quoted strings. 3611515ec619Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3612ff559fabSmrg 3613515ec619Smrg# Same as above, but do not quote variable references. 3614515ec619Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 3615ff559fabSmrg 3616515ec619Smrg# Sed substitution to delay expansion of an escaped shell variable in a 3617515ec619Smrg# double_quote_subst'ed string. 3618515ec619Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3619ff559fabSmrg 3620515ec619Smrg# Sed substitution to delay expansion of an escaped single quote. 3621515ec619Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 36227a3b38f7Smrg 3623515ec619Smrg# Sed substitution to avoid accidental globbing in evaled expressions 3624515ec619Smrgno_glob_subst='s/\*/\\\*/g' 3625515ec619Smrg]) 36267a3b38f7Smrg 3627515ec619Smrg# _LT_PROG_LTMAIN 3628515ec619Smrg# --------------- 3629515ec619Smrg# Note that this code is called both from 'configure', and 'config.status' 3630515ec619Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3631515ec619Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3632515ec619Smrg# so we pass a copy along to make sure it has a sensible value anyway. 3633515ec619Smrgm4_defun([_LT_PROG_LTMAIN], 3634515ec619Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3635515ec619Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3636515ec619Smrgltmain=$ac_aux_dir/ltmain.sh 3637515ec619Smrg])# _LT_PROG_LTMAIN 36387a3b38f7Smrg 36397a3b38f7Smrg 36407a3b38f7Smrg 3641515ec619Smrg# So that we can recreate a full libtool script including additional 3642515ec619Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3643515ec619Smrg# in macros and then make a single call at the end using the 'libtool' 3644515ec619Smrg# label. 36457a3b38f7Smrg 36467a3b38f7Smrg 3647515ec619Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3648515ec619Smrg# ---------------------------------------- 3649515ec619Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3650515ec619Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3651515ec619Smrg[m4_ifval([$1], 3652515ec619Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3653515ec619Smrg [$1 3654515ec619Smrg])])]) 3655ff559fabSmrg 3656515ec619Smrg# Initialize. 3657515ec619Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3658ff559fabSmrg 3659ff559fabSmrg 3660515ec619Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3661515ec619Smrg# ------------------------------ 3662515ec619Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3663515ec619Smrgm4_define([_LT_CONFIG_LIBTOOL], 3664515ec619Smrg[m4_ifval([$1], 3665515ec619Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3666515ec619Smrg [$1 3667515ec619Smrg])])]) 3668ff559fabSmrg 3669515ec619Smrg# Initialize. 3670515ec619Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3671862f5301Smrg 3672862f5301Smrg 3673515ec619Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3674515ec619Smrg# ----------------------------------------------------- 3675515ec619Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3676515ec619Smrg[_LT_CONFIG_LIBTOOL([$1]) 3677515ec619Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3678515ec619Smrg]) 3679862f5301Smrg 3680862f5301Smrg 3681515ec619Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3682515ec619Smrg# ----------------------------- 3683515ec619Smrg# Add leading comment marks to the start of each line, and a trailing 3684515ec619Smrg# full-stop to the whole comment if one is not present already. 3685515ec619Smrgm4_define([_LT_FORMAT_COMMENT], 3686515ec619Smrg[m4_ifval([$1], [ 3687515ec619Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3688515ec619Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3689515ec619Smrg)]) 369044dda7b2Smrg 369144dda7b2Smrg 369244dda7b2Smrg 369344dda7b2Smrg 3694ff559fabSmrg 3695515ec619Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3696515ec619Smrg# ------------------------------------------------------------------- 3697515ec619Smrg# CONFIGNAME is the name given to the value in the libtool script. 3698515ec619Smrg# VARNAME is the (base) name used in the configure script. 3699515ec619Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3700515ec619Smrg# VARNAME. Any other value will be used directly. 3701515ec619Smrgm4_define([_LT_DECL], 3702515ec619Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3703515ec619Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3704515ec619Smrg [m4_ifval([$1], [$1], [$2])]) 3705515ec619Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3706515ec619Smrg m4_ifval([$4], 3707515ec619Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3708515ec619Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3709515ec619Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3710515ec619Smrg]) 3711ff559fabSmrg 3712ff559fabSmrg 3713515ec619Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3714515ec619Smrg# -------------------------------------------------------- 3715515ec619Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3716ff559fabSmrg 371744dda7b2Smrg 3718515ec619Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3719515ec619Smrg# ------------------------------------------------ 3720515ec619Smrgm4_define([lt_decl_tag_varnames], 3721515ec619Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3722862f5301Smrg 3723515ec619Smrg 3724515ec619Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3725515ec619Smrg# --------------------------------------------------------- 3726515ec619Smrgm4_define([_lt_decl_filter], 3727515ec619Smrg[m4_case([$#], 3728515ec619Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3729515ec619Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3730515ec619Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3731515ec619Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3732515ec619Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 37336fc0178dSmrg]) 37346fc0178dSmrg 3735862f5301Smrg 3736515ec619Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3737515ec619Smrg# -------------------------------------------------- 3738515ec619Smrgm4_define([lt_decl_quote_varnames], 3739515ec619Smrg[_lt_decl_filter([value], [1], $@)]) 3740862f5301Smrg 3741862f5301Smrg 3742515ec619Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3743515ec619Smrg# --------------------------------------------------- 3744515ec619Smrgm4_define([lt_decl_dquote_varnames], 3745515ec619Smrg[_lt_decl_filter([value], [2], $@)]) 3746ff559fabSmrg 3747ff559fabSmrg 3748515ec619Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3749515ec619Smrg# --------------------------------------------------- 3750515ec619Smrgm4_define([lt_decl_varnames_tagged], 3751515ec619Smrg[m4_assert([$# <= 2])dnl 3752515ec619Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 3753515ec619Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3754515ec619Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3755515ec619Smrgm4_define([_lt_decl_varnames_tagged], 3756515ec619Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3757862f5301Smrg 3758ff559fabSmrg 3759515ec619Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3760515ec619Smrg# ------------------------------------------------ 3761515ec619Smrgm4_define([lt_decl_all_varnames], 3762515ec619Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3763515ec619Smrg m4_if([$2], [], 3764515ec619Smrg m4_quote(lt_decl_varnames), 3765515ec619Smrg m4_quote(m4_shift($@))))[]dnl 3766515ec619Smrg]) 3767515ec619Smrgm4_define([_lt_decl_all_varnames], 3768515ec619Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 3769515ec619Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3770515ec619Smrg]) 3771ff559fabSmrg 3772ff559fabSmrg 3773515ec619Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3774515ec619Smrg# ------------------------------------ 3775515ec619Smrg# Quote a variable value, and forward it to 'config.status' so that its 3776515ec619Smrg# declaration there will have the same value as in 'configure'. VARNAME 3777515ec619Smrg# must have a single quote delimited value for this to work. 3778515ec619Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3779515ec619Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3780ff559fabSmrg 3781ff559fabSmrg 3782515ec619Smrg# _LT_CONFIG_STATUS_DECLARATIONS 3783515ec619Smrg# ------------------------------ 3784515ec619Smrg# We delimit libtool config variables with single quotes, so when 3785515ec619Smrg# we write them to config.status, we have to be sure to quote all 3786515ec619Smrg# embedded single quotes properly. In configure, this macro expands 3787515ec619Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3788515ec619Smrg# 3789515ec619Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3790515ec619Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3791515ec619Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3792515ec619Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3793ff559fabSmrg 3794ff559fabSmrg 3795515ec619Smrg# _LT_LIBTOOL_TAGS 3796515ec619Smrg# ---------------- 3797515ec619Smrg# Output comment and list of tags supported by the script 3798515ec619Smrgm4_defun([_LT_LIBTOOL_TAGS], 3799515ec619Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3800515ec619Smrgavailable_tags='_LT_TAGS'dnl 3801515ec619Smrg]) 380244dda7b2Smrg 380344dda7b2Smrg 3804515ec619Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3805515ec619Smrg# ----------------------------------- 3806515ec619Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3807515ec619Smrg# expand to a commented shell variable setting: 3808515ec619Smrg# 3809515ec619Smrg# # Some comment about what VAR is for. 3810515ec619Smrg# visible_name=$lt_internal_name 3811515ec619Smrgm4_define([_LT_LIBTOOL_DECLARE], 3812515ec619Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3813515ec619Smrg [description])))[]dnl 3814515ec619Smrgm4_pushdef([_libtool_name], 3815515ec619Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3816515ec619Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3817515ec619Smrg [0], [_libtool_name=[$]$1], 3818515ec619Smrg [1], [_libtool_name=$lt_[]$1], 3819515ec619Smrg [2], [_libtool_name=$lt_[]$1], 3820515ec619Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3821515ec619Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3822515ec619Smrg]) 3823ff559fabSmrg 3824ff559fabSmrg 3825515ec619Smrg# _LT_LIBTOOL_CONFIG_VARS 3826515ec619Smrg# ----------------------- 3827515ec619Smrg# Produce commented declarations of non-tagged libtool config variables 3828515ec619Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3829515ec619Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3830515ec619Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 3831515ec619Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 3832515ec619Smrg[m4_foreach([_lt_var], 3833515ec619Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3834515ec619Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3835862f5301Smrg 3836ff559fabSmrg 3837515ec619Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 3838515ec619Smrg# ------------------------- 3839515ec619Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 3840515ec619Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3841515ec619Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3842ff559fabSmrg 3843ff559fabSmrg 3844515ec619Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 3845515ec619Smrg# ------------------------------ 3846515ec619Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3847ff559fabSmrg 38486fc0178dSmrg 3849515ec619Smrg# _LT_CONFIG_COMMANDS 3850515ec619Smrg# ------------------- 3851515ec619Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3852515ec619Smrg# variables for single and double quote escaping we saved from calls 3853515ec619Smrg# to _LT_DECL, we can put quote escaped variables declarations 3854515ec619Smrg# into 'config.status', and then the shell code to quote escape them in 3855515ec619Smrg# for loops in 'config.status'. Finally, any additional code accumulated 3856515ec619Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3857515ec619Smrgm4_defun([_LT_CONFIG_COMMANDS], 3858515ec619Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3859515ec619Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3860515ec619Smrg dnl instead of duplicating it all over again into config.status, 3861515ec619Smrg dnl then we will have config.status run $CONFIG_LT later, so it 3862515ec619Smrg dnl needs to know what name is stored there: 3863515ec619Smrg [AC_CONFIG_COMMANDS([libtool], 3864515ec619Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3865515ec619Smrg dnl If the libtool generation code is destined for config.status, 3866515ec619Smrg dnl expand the accumulated commands and init code now: 3867515ec619Smrg [AC_CONFIG_COMMANDS([libtool], 3868515ec619Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3869515ec619Smrg])#_LT_CONFIG_COMMANDS 3870862f5301Smrg 3871862f5301Smrg 3872515ec619Smrg# Initialize. 3873515ec619Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3874515ec619Smrg[ 3875862f5301Smrg 3876515ec619Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3877515ec619Smrg# if CDPATH is set. 3878515ec619Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3879ff559fabSmrg 3880515ec619Smrgsed_quote_subst='$sed_quote_subst' 3881515ec619Smrgdouble_quote_subst='$double_quote_subst' 3882515ec619Smrgdelay_variable_subst='$delay_variable_subst' 3883515ec619Smrg_LT_CONFIG_STATUS_DECLARATIONS 3884515ec619SmrgLTCC='$LTCC' 3885515ec619SmrgLTCFLAGS='$LTCFLAGS' 3886515ec619Smrgcompiler='$compiler_DEFAULT' 3887ff559fabSmrg 3888515ec619Smrg# A function that is used when there is no print builtin or printf. 3889515ec619Smrgfunc_fallback_echo () 3890515ec619Smrg{ 3891515ec619Smrg eval 'cat <<_LTECHO_EOF 3892515ec619Smrg\$[]1 3893515ec619Smrg_LTECHO_EOF' 389444dda7b2Smrg} 3895ff559fabSmrg 3896515ec619Smrg# Quote evaled strings. 3897515ec619Smrgfor var in lt_decl_all_varnames([[ \ 3898515ec619Smrg]], lt_decl_quote_varnames); do 3899515ec619Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3900515ec619Smrg *[[\\\\\\\`\\"\\\$]]*) 3901515ec619Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3902515ec619Smrg ;; 3903515ec619Smrg *) 3904515ec619Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3905515ec619Smrg ;; 3906515ec619Smrg esac 3907515ec619Smrgdone 3908ff559fabSmrg 3909515ec619Smrg# Double-quote double-evaled strings. 3910515ec619Smrgfor var in lt_decl_all_varnames([[ \ 3911515ec619Smrg]], lt_decl_dquote_varnames); do 3912515ec619Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3913515ec619Smrg *[[\\\\\\\`\\"\\\$]]*) 3914515ec619Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3915515ec619Smrg ;; 3916515ec619Smrg *) 3917515ec619Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3918515ec619Smrg ;; 3919515ec619Smrg esac 3920515ec619Smrgdone 3921862f5301Smrg 3922515ec619Smrg_LT_OUTPUT_LIBTOOL_INIT 3923515ec619Smrg]) 39247a3b38f7Smrg 3925515ec619Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3926515ec619Smrg# ------------------------------------ 3927515ec619Smrg# Generate a child script FILE with all initialization necessary to 3928515ec619Smrg# reuse the environment learned by the parent script, and make the 3929515ec619Smrg# file executable. If COMMENT is supplied, it is inserted after the 3930515ec619Smrg# '#!' sequence but before initialization text begins. After this 3931515ec619Smrg# macro, additional text can be appended to FILE to form the body of 3932515ec619Smrg# the child script. The macro ends with non-zero status if the 3933515ec619Smrg# file could not be fully written (such as if the disk is full). 3934515ec619Smrgm4_ifdef([AS_INIT_GENERATED], 3935515ec619Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3936515ec619Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 3937515ec619Smrg[m4_require([AS_PREPARE])]dnl 3938515ec619Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3939515ec619Smrg[lt_write_fail=0 3940515ec619Smrgcat >$1 <<_ASEOF || lt_write_fail=1 3941515ec619Smrg#! $SHELL 3942515ec619Smrg# Generated by $as_me. 3943515ec619Smrg$2 3944515ec619SmrgSHELL=\${CONFIG_SHELL-$SHELL} 3945515ec619Smrgexport SHELL 3946515ec619Smrg_ASEOF 3947515ec619Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 3948515ec619SmrgAS_SHELL_SANITIZE 3949515ec619Smrg_AS_PREPARE 3950515ec619Smrgexec AS_MESSAGE_FD>&1 3951515ec619Smrg_ASEOF 3952515ec619Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 3953515ec619Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 39547a3b38f7Smrg 3955515ec619Smrg# LT_OUTPUT 3956515ec619Smrg# --------- 3957515ec619Smrg# This macro allows early generation of the libtool script (before 3958515ec619Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 3959515ec619Smrg# tests. 3960515ec619SmrgAC_DEFUN([LT_OUTPUT], 3961515ec619Smrg[: ${CONFIG_LT=./config.lt} 3962515ec619SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 3963515ec619Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3964515ec619Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 3965ff559fabSmrg 3966515ec619Smrgcat >>"$CONFIG_LT" <<\_LTEOF 3967515ec619Smrglt_cl_silent=false 3968515ec619Smrgexec AS_MESSAGE_LOG_FD>>config.log 396944dda7b2Smrg{ 3970515ec619Smrg echo 3971515ec619Smrg AS_BOX([Running $as_me.]) 3972515ec619Smrg} >&AS_MESSAGE_LOG_FD 39737a3b38f7Smrg 3974515ec619Smrglt_cl_help="\ 3975515ec619Smrg'$as_me' creates a local libtool stub from the current configuration, 3976515ec619Smrgfor use in further configure time tests before the real libtool is 3977515ec619Smrggenerated. 3978ff559fabSmrg 3979515ec619SmrgUsage: $[0] [[OPTIONS]] 3980ff559fabSmrg 3981515ec619Smrg -h, --help print this help, then exit 3982515ec619Smrg -V, --version print version number, then exit 3983515ec619Smrg -q, --quiet do not print progress messages 3984515ec619Smrg -d, --debug don't remove temporary files 3985ff559fabSmrg 3986515ec619SmrgReport bugs to <bug-libtool@gnu.org>." 3987862f5301Smrg 3988515ec619Smrglt_cl_version="\ 3989515ec619Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3990515ec619Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3991515ec619Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 3992ff559fabSmrg 3993515ec619SmrgCopyright (C) 2011 Free Software Foundation, Inc. 3994515ec619SmrgThis config.lt script is free software; the Free Software Foundation 3995515ec619Smrggives unlimited permision to copy, distribute and modify it." 3996ff559fabSmrg 3997515ec619Smrgwhile test 0 != $[#] 3998515ec619Smrgdo 3999515ec619Smrg case $[1] in 4000515ec619Smrg --version | --v* | -V ) 4001515ec619Smrg echo "$lt_cl_version"; exit 0 ;; 4002515ec619Smrg --help | --h* | -h ) 4003515ec619Smrg echo "$lt_cl_help"; exit 0 ;; 4004515ec619Smrg --debug | --d* | -d ) 4005515ec619Smrg debug=: ;; 4006515ec619Smrg --quiet | --q* | --silent | --s* | -q ) 4007515ec619Smrg lt_cl_silent=: ;; 4008ff559fabSmrg 4009515ec619Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4010515ec619SmrgTry '$[0] --help' for more information.]) ;; 4011ff559fabSmrg 4012515ec619Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4013515ec619SmrgTry '$[0] --help' for more information.]) ;; 4014515ec619Smrg esac 4015515ec619Smrg shift 4016515ec619Smrgdone 4017ff559fabSmrg 4018515ec619Smrgif $lt_cl_silent; then 4019515ec619Smrg exec AS_MESSAGE_FD>/dev/null 4020515ec619Smrgfi 4021515ec619Smrg_LTEOF 40227a3b38f7Smrg 4023515ec619Smrgcat >>"$CONFIG_LT" <<_LTEOF 4024515ec619Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4025515ec619Smrg_LTEOF 40267a3b38f7Smrg 4027515ec619Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4028515ec619SmrgAC_MSG_NOTICE([creating $ofile]) 4029515ec619Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 4030515ec619SmrgAS_EXIT(0) 4031515ec619Smrg_LTEOF 4032515ec619Smrgchmod +x "$CONFIG_LT" 4033ff559fabSmrg 4034515ec619Smrg# configure is writing to config.log, but config.lt does its own redirection, 4035515ec619Smrg# appending to config.log, which fails on DOS, as config.log is still kept 4036515ec619Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4037515ec619Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4038515ec619Smrglt_cl_success=: 4039515ec619Smrgtest yes = "$silent" && 4040515ec619Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 4041515ec619Smrgexec AS_MESSAGE_LOG_FD>/dev/null 4042515ec619Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4043515ec619Smrgexec AS_MESSAGE_LOG_FD>>config.log 4044515ec619Smrg$lt_cl_success || AS_EXIT(1) 4045515ec619Smrg])# LT_OUTPUT 4046ff559fabSmrg 4047ff559fabSmrg 4048515ec619Smrg# _LT_CONFIG(TAG) 4049515ec619Smrg# --------------- 4050515ec619Smrg# If TAG is the built-in tag, create an initial libtool script with a 4051515ec619Smrg# default configuration from the untagged config vars. Otherwise add code 4052515ec619Smrg# to config.status for appending the configuration named by TAG from the 4053515ec619Smrg# matching tagged config vars. 4054515ec619Smrgm4_defun([_LT_CONFIG], 4055515ec619Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4056515ec619Smrg_LT_CONFIG_SAVE_COMMANDS([ 4057515ec619Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4058515ec619Smrg m4_if(_LT_TAG, [C], [ 4059515ec619Smrg # See if we are running on zsh, and set the options that allow our 4060515ec619Smrg # commands through without removal of \ escapes. 4061515ec619Smrg if test -n "${ZSH_VERSION+set}"; then 4062515ec619Smrg setopt NO_GLOB_SUBST 4063515ec619Smrg fi 4064ff559fabSmrg 4065515ec619Smrg cfgfile=${ofile}T 4066515ec619Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4067515ec619Smrg $RM "$cfgfile" 4068ff559fabSmrg 4069515ec619Smrg cat <<_LT_EOF >> "$cfgfile" 4070515ec619Smrg#! $SHELL 4071515ec619Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4072515ec619Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4073515ec619Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4074515ec619Smrg 4075515ec619Smrg# Provide generalized library-building support services. 4076515ec619Smrg# Written by Gordon Matzigkeit, 1996 4077515ec619Smrg 4078515ec619Smrg_LT_COPYING 4079515ec619Smrg_LT_LIBTOOL_TAGS 4080515ec619Smrg 4081515ec619Smrg# Configured defaults for sys_lib_dlsearch_path munging. 4082515ec619Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4083515ec619Smrg 4084515ec619Smrg# ### BEGIN LIBTOOL CONFIG 4085515ec619Smrg_LT_LIBTOOL_CONFIG_VARS 4086515ec619Smrg_LT_LIBTOOL_TAG_VARS 4087515ec619Smrg# ### END LIBTOOL CONFIG 4088ff559fabSmrg 408944dda7b2Smrg_LT_EOF 40907a3b38f7Smrg 4091515ec619Smrg cat <<'_LT_EOF' >> "$cfgfile" 4092ff559fabSmrg 4093515ec619Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4094ff559fabSmrg 4095515ec619Smrg_LT_PREPARE_MUNGE_PATH_LIST 4096515ec619Smrg_LT_PREPARE_CC_BASENAME 4097ff559fabSmrg 4098515ec619Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 4099ff559fabSmrg 4100515ec619Smrg_LT_EOF 4101515ec619Smrg 4102515ec619Smrg case $host_os in 4103515ec619Smrg aix3*) 4104515ec619Smrg cat <<\_LT_EOF >> "$cfgfile" 4105515ec619Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4106515ec619Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4107515ec619Smrg# vanish in a puff of smoke. 4108515ec619Smrgif test set != "${COLLECT_NAMES+set}"; then 4109515ec619Smrg COLLECT_NAMES= 4110515ec619Smrg export COLLECT_NAMES 4111515ec619Smrgfi 4112515ec619Smrg_LT_EOF 4113515ec619Smrg ;; 4114515ec619Smrg esac 4115515ec619Smrg 4116515ec619Smrg _LT_PROG_LTMAIN 4117ff559fabSmrg 4118515ec619Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4119515ec619Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4120515ec619Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4121515ec619Smrg # is reportedly fixed, but why not run on old versions too? 4122515ec619Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4123515ec619Smrg || (rm -f "$cfgfile"; exit 1) 41247a3b38f7Smrg 4125515ec619Smrg mv -f "$cfgfile" "$ofile" || 4126515ec619Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4127515ec619Smrg chmod +x "$ofile" 4128515ec619Smrg], 4129515ec619Smrg[cat <<_LT_EOF >> "$ofile" 41307a3b38f7Smrg 4131515ec619Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4132515ec619Smrgdnl in a comment (ie after a #). 4133515ec619Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4134515ec619Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4135515ec619Smrg# ### END LIBTOOL TAG CONFIG: $1 4136515ec619Smrg_LT_EOF 4137515ec619Smrg])dnl /m4_if 4138515ec619Smrg], 4139515ec619Smrg[m4_if([$1], [], [ 4140515ec619Smrg PACKAGE='$PACKAGE' 4141515ec619Smrg VERSION='$VERSION' 4142515ec619Smrg RM='$RM' 4143515ec619Smrg ofile='$ofile'], []) 4144515ec619Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4145515ec619Smrg])# _LT_CONFIG 41467a3b38f7Smrg 41477a3b38f7Smrg 4148515ec619Smrg# LT_SUPPORTED_TAG(TAG) 4149515ec619Smrg# --------------------- 4150515ec619Smrg# Trace this macro to discover what tags are supported by the libtool 4151515ec619Smrg# --tag option, using: 4152515ec619Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4153515ec619SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 41547a3b38f7Smrg 41557a3b38f7Smrg 4156515ec619Smrg# C support is built-in for now 4157515ec619Smrgm4_define([_LT_LANG_C_enabled], []) 4158515ec619Smrgm4_define([_LT_TAGS], []) 4159ff559fabSmrg 41607a3b38f7Smrg 4161515ec619Smrg# LT_LANG(LANG) 4162515ec619Smrg# ------------- 4163515ec619Smrg# Enable libtool support for the given language if not already enabled. 4164515ec619SmrgAC_DEFUN([LT_LANG], 4165515ec619Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4166515ec619Smrgm4_case([$1], 4167515ec619Smrg [C], [_LT_LANG(C)], 4168515ec619Smrg [C++], [_LT_LANG(CXX)], 4169515ec619Smrg [Go], [_LT_LANG(GO)], 4170515ec619Smrg [Java], [_LT_LANG(GCJ)], 4171515ec619Smrg [Fortran 77], [_LT_LANG(F77)], 4172515ec619Smrg [Fortran], [_LT_LANG(FC)], 4173515ec619Smrg [Windows Resource], [_LT_LANG(RC)], 4174515ec619Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4175515ec619Smrg [_LT_LANG($1)], 4176515ec619Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4177515ec619Smrg])# LT_LANG 4178515ec619Smrg 4179515ec619Smrg 4180515ec619Smrg# _LT_LANG(LANGNAME) 4181515ec619Smrg# ------------------ 4182515ec619Smrgm4_defun([_LT_LANG], 4183515ec619Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4184515ec619Smrg [LT_SUPPORTED_TAG([$1])dnl 4185515ec619Smrg m4_append([_LT_TAGS], [$1 ])dnl 4186515ec619Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4187515ec619Smrg _LT_LANG_$1_CONFIG($1)])dnl 4188515ec619Smrg])# _LT_LANG 4189515ec619Smrg 41907a3b38f7Smrg 4191515ec619Smrgm4_ifndef([AC_PROG_GO], [ 4192515ec619Smrg# NOTE: This macro has been submitted for inclusion into # 4193515ec619Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4194515ec619Smrg# a released version of Autoconf we should remove this # 4195515ec619Smrg# macro and use it instead. # 4196515ec619Smrgm4_defun([AC_PROG_GO], 4197515ec619Smrg[AC_LANG_PUSH(Go)dnl 4198515ec619SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4199515ec619SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4200515ec619Smrg_AC_ARG_VAR_LDFLAGS()dnl 4201515ec619SmrgAC_CHECK_TOOL(GOC, gccgo) 4202515ec619Smrgif test -z "$GOC"; then 4203515ec619Smrg if test -n "$ac_tool_prefix"; then 4204515ec619Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4205515ec619Smrg fi 4206515ec619Smrgfi 4207515ec619Smrgif test -z "$GOC"; then 4208515ec619Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4209515ec619Smrgfi 4210515ec619Smrg])#m4_defun 4211515ec619Smrg])#m4_ifndef 4212ff559fabSmrg 4213ff559fabSmrg 4214515ec619Smrg# _LT_LANG_DEFAULT_CONFIG 4215515ec619Smrg# ----------------------- 4216515ec619Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4217515ec619Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4218515ec619Smrg [LT_LANG(CXX)], 4219515ec619Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 42207a3b38f7Smrg 4221515ec619SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4222515ec619Smrg [LT_LANG(F77)], 4223515ec619Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 42247a3b38f7Smrg 4225515ec619SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4226515ec619Smrg [LT_LANG(FC)], 4227515ec619Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 42287a3b38f7Smrg 4229515ec619Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4230515ec619Smrgdnl pulling things in needlessly. 4231515ec619SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4232515ec619Smrg [LT_LANG(GCJ)], 4233515ec619Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4234515ec619Smrg [LT_LANG(GCJ)], 4235515ec619Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4236515ec619Smrg [LT_LANG(GCJ)], 4237515ec619Smrg [m4_ifdef([AC_PROG_GCJ], 4238515ec619Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4239515ec619Smrg m4_ifdef([A][M_PROG_GCJ], 4240515ec619Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4241515ec619Smrg m4_ifdef([LT_PROG_GCJ], 4242515ec619Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 42437a3b38f7Smrg 4244515ec619SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4245515ec619Smrg [LT_LANG(GO)], 4246515ec619Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4247ff559fabSmrg 4248515ec619SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4249515ec619Smrg [LT_LANG(RC)], 4250515ec619Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4251515ec619Smrg])# _LT_LANG_DEFAULT_CONFIG 42527a3b38f7Smrg 4253515ec619Smrg# Obsolete macros: 4254515ec619SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4255515ec619SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4256515ec619SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4257515ec619SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4258515ec619SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4259515ec619Smrgdnl aclocal-1.4 backwards compatibility: 4260515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4261515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4262515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4263515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4264515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 42657a3b38f7Smrg 42667a3b38f7Smrg 4267515ec619Smrg# _LT_TAG_COMPILER 4268515ec619Smrg# ---------------- 4269515ec619Smrgm4_defun([_LT_TAG_COMPILER], 4270515ec619Smrg[AC_REQUIRE([AC_PROG_CC])dnl 42717a3b38f7Smrg 4272515ec619Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4273515ec619Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4274515ec619Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4275515ec619Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4276515ec619Smrg 4277515ec619Smrg# If no C compiler was specified, use CC. 4278515ec619SmrgLTCC=${LTCC-"$CC"} 4279515ec619Smrg 4280515ec619Smrg# If no C compiler flags were specified, use CFLAGS. 4281515ec619SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4282515ec619Smrg 4283515ec619Smrg# Allow CC to be a program name with arguments. 4284515ec619Smrgcompiler=$CC 4285515ec619Smrg])# _LT_TAG_COMPILER 4286515ec619Smrg 4287515ec619Smrg 4288515ec619Smrg# _LT_COMPILER_BOILERPLATE 4289515ec619Smrg# ------------------------ 4290515ec619Smrg# Check for compiler boilerplate output or warnings with 4291515ec619Smrg# the simple compiler test code. 4292515ec619Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 4293515ec619Smrg[m4_require([_LT_DECL_SED])dnl 4294515ec619Smrgac_outfile=conftest.$ac_objext 4295515ec619Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4296515ec619Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4297515ec619Smrg_lt_compiler_boilerplate=`cat conftest.err` 4298515ec619Smrg$RM conftest* 4299515ec619Smrg])# _LT_COMPILER_BOILERPLATE 43006fc0178dSmrg 43017a3b38f7Smrg 4302515ec619Smrg# _LT_LINKER_BOILERPLATE 4303515ec619Smrg# ---------------------- 4304515ec619Smrg# Check for linker boilerplate output or warnings with 4305515ec619Smrg# the simple link test code. 4306515ec619Smrgm4_defun([_LT_LINKER_BOILERPLATE], 4307515ec619Smrg[m4_require([_LT_DECL_SED])dnl 4308515ec619Smrgac_outfile=conftest.$ac_objext 4309515ec619Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4310515ec619Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4311515ec619Smrg_lt_linker_boilerplate=`cat conftest.err` 4312515ec619Smrg$RM -r conftest* 4313515ec619Smrg])# _LT_LINKER_BOILERPLATE 43147a3b38f7Smrg 4315515ec619Smrg# _LT_REQUIRED_DARWIN_CHECKS 4316515ec619Smrg# ------------------------- 4317515ec619Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4318515ec619Smrg case $host_os in 4319515ec619Smrg rhapsody* | darwin*) 4320515ec619Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4321515ec619Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4322515ec619Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4323515ec619Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4324515ec619Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4325515ec619Smrg _LT_DECL([], [DSYMUTIL], [1], 4326515ec619Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4327515ec619Smrg _LT_DECL([], [NMEDIT], [1], 4328515ec619Smrg [Tool to change global to local symbols on Mac OS X]) 4329515ec619Smrg _LT_DECL([], [LIPO], [1], 4330515ec619Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 4331515ec619Smrg _LT_DECL([], [OTOOL], [1], 4332515ec619Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4333515ec619Smrg _LT_DECL([], [OTOOL64], [1], 4334515ec619Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 43357a3b38f7Smrg 4336515ec619Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4337515ec619Smrg [lt_cv_apple_cc_single_mod=no 4338515ec619Smrg if test -z "$LT_MULTI_MODULE"; then 4339515ec619Smrg # By default we will add the -single_module flag. You can override 4340515ec619Smrg # by either setting the environment variable LT_MULTI_MODULE 4341515ec619Smrg # non-empty at configure time, or by adding -multi_module to the 4342515ec619Smrg # link flags. 4343515ec619Smrg rm -rf libconftest.dylib* 4344515ec619Smrg echo "int foo(void){return 1;}" > conftest.c 4345515ec619Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4346515ec619Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4347515ec619Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4348515ec619Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4349515ec619Smrg _lt_result=$? 4350515ec619Smrg # If there is a non-empty error log, and "single_module" 4351515ec619Smrg # appears in it, assume the flag caused a linker warning 4352515ec619Smrg if test -s conftest.err && $GREP single_module conftest.err; then 4353515ec619Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4354515ec619Smrg # Otherwise, if the output was created with a 0 exit code from 4355515ec619Smrg # the compiler, it worked. 4356515ec619Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4357515ec619Smrg lt_cv_apple_cc_single_mod=yes 435844dda7b2Smrg else 4359515ec619Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4360ff559fabSmrg fi 4361515ec619Smrg rm -rf libconftest.dylib* 4362515ec619Smrg rm -f conftest.* 4363515ec619Smrg fi]) 4364515ec619Smrg 4365515ec619Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4366515ec619Smrg [lt_cv_ld_exported_symbols_list], 4367515ec619Smrg [lt_cv_ld_exported_symbols_list=no 4368515ec619Smrg save_LDFLAGS=$LDFLAGS 4369515ec619Smrg echo "_main" > conftest.sym 4370515ec619Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4371515ec619Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4372515ec619Smrg [lt_cv_ld_exported_symbols_list=yes], 4373515ec619Smrg [lt_cv_ld_exported_symbols_list=no]) 4374515ec619Smrg LDFLAGS=$save_LDFLAGS 4375515ec619Smrg ]) 4376515ec619Smrg 4377515ec619Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4378515ec619Smrg [lt_cv_ld_force_load=no 4379515ec619Smrg cat > conftest.c << _LT_EOF 4380515ec619Smrgint forced_loaded() { return 2;} 4381515ec619Smrg_LT_EOF 4382515ec619Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4383515ec619Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4384515ec619Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4385515ec619Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4386515ec619Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4387515ec619Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4388515ec619Smrg cat > conftest.c << _LT_EOF 4389515ec619Smrgint main() { return 0;} 4390515ec619Smrg_LT_EOF 4391515ec619Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4392515ec619Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4393515ec619Smrg _lt_result=$? 4394515ec619Smrg if test -s conftest.err && $GREP force_load conftest.err; then 4395515ec619Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4396515ec619Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4397515ec619Smrg lt_cv_ld_force_load=yes 439844dda7b2Smrg else 4399515ec619Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 440044dda7b2Smrg fi 4401515ec619Smrg rm -f conftest.err libconftest.a conftest conftest.c 4402515ec619Smrg rm -rf conftest.dSYM 4403515ec619Smrg ]) 4404515ec619Smrg case $host_os in 4405515ec619Smrg rhapsody* | darwin1.[[012]]) 4406515ec619Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4407515ec619Smrg darwin1.*) 4408515ec619Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4409515ec619Smrg darwin*) 4410515ec619Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 4411515ec619Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4412515ec619Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4413515ec619Smrg *) 4414515ec619Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4415515ec619Smrg esac 4416515ec619Smrg ;; 4417515ec619Smrg esac 4418515ec619Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 4419515ec619Smrg _lt_dar_single_mod='$single_module' 4420515ec619Smrg fi 4421515ec619Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 4422515ec619Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4423515ec619Smrg else 4424515ec619Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4425515ec619Smrg fi 4426515ec619Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4427515ec619Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 4428515ec619Smrg else 4429515ec619Smrg _lt_dsymutil= 4430515ec619Smrg fi 4431515ec619Smrg ;; 4432515ec619Smrg esac 4433515ec619Smrg]) 44347a3b38f7Smrg 44357a3b38f7Smrg 4436515ec619Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 4437515ec619Smrg# --------------------------------- 4438515ec619Smrg# Checks for linker and compiler features on darwin 4439515ec619Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 4440515ec619Smrg[ 4441515ec619Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4442515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4443515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4444515ec619Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 4445515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4446515ec619Smrg if test yes = "$lt_cv_ld_force_load"; then 4447515ec619Smrg _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\"`' 4448515ec619Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4449515ec619Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4450515ec619Smrg else 4451515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4452515ec619Smrg fi 4453515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4454515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4455515ec619Smrg case $cc_basename in 4456515ec619Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4457515ec619Smrg *) _lt_dar_can_shared=$GCC ;; 4458515ec619Smrg esac 4459515ec619Smrg if test yes = "$_lt_dar_can_shared"; then 4460515ec619Smrg output_verbose_link_cmd=func_echo_all 4461515ec619Smrg _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" 4462515ec619Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4463515ec619Smrg _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" 4464515ec619Smrg _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" 4465515ec619Smrg m4_if([$1], [CXX], 4466515ec619Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4467515ec619Smrg _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" 4468515ec619Smrg _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" 4469515ec619Smrg fi 4470515ec619Smrg],[]) 4471515ec619Smrg else 4472515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4473515ec619Smrg fi 4474515ec619Smrg]) 4475515ec619Smrg 4476515ec619Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4477515ec619Smrg# ---------------------------------- 4478515ec619Smrg# Links a minimal program and checks the executable 4479515ec619Smrg# for the system default hardcoded library path. In most cases, 4480515ec619Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 4481515ec619Smrg# the location of the communication and MPI libs are included too. 4482515ec619Smrg# If we don't find anything, use the default library path according 4483515ec619Smrg# to the aix ld manual. 4484515ec619Smrg# Store the results from the different compilers for each TAGNAME. 4485515ec619Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 4486515ec619Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 4487515ec619Smrg[m4_require([_LT_DECL_SED])dnl 4488515ec619Smrgif test set = "${lt_cv_aix_libpath+set}"; then 4489515ec619Smrg aix_libpath=$lt_cv_aix_libpath 4490515ec619Smrgelse 4491515ec619Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4492515ec619Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4493515ec619Smrg lt_aix_libpath_sed='[ 4494515ec619Smrg /Import File Strings/,/^$/ { 4495515ec619Smrg /^0/ { 4496515ec619Smrg s/^0 *\([^ ]*\) *$/\1/ 4497515ec619Smrg p 4498515ec619Smrg } 4499515ec619Smrg }]' 4500515ec619Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4501515ec619Smrg # Check for a 64-bit object if we didn't find anything. 4502515ec619Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4503515ec619Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4504515ec619Smrg fi],[]) 4505515ec619Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4506515ec619Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4507515ec619Smrg fi 4508515ec619Smrg ]) 4509515ec619Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4510515ec619Smrgfi 4511515ec619Smrg])# _LT_SYS_MODULE_PATH_AIX 4512515ec619Smrg 45137a3b38f7Smrg 4514515ec619Smrg# _LT_SHELL_INIT(ARG) 4515515ec619Smrg# ------------------- 4516515ec619Smrgm4_define([_LT_SHELL_INIT], 4517515ec619Smrg[m4_divert_text([M4SH-INIT], [$1 4518515ec619Smrg])])# _LT_SHELL_INIT 45197a3b38f7Smrg 45207a3b38f7Smrg 4521ff559fabSmrg 4522515ec619Smrg# _LT_PROG_ECHO_BACKSLASH 4523515ec619Smrg# ----------------------- 4524515ec619Smrg# Find how we can fake an echo command that does not interpret backslash. 4525515ec619Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 4526515ec619Smrg# of the generated configure script that will find a shell with a builtin 4527515ec619Smrg# printf (that we can use as an echo command). 4528515ec619Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 4529515ec619Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4530515ec619SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4531515ec619SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4532ff559fabSmrg 4533515ec619SmrgAC_MSG_CHECKING([how to print strings]) 4534515ec619Smrg# Test print first, because it will be a builtin if present. 4535515ec619Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4536515ec619Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4537515ec619Smrg ECHO='print -r --' 4538515ec619Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4539515ec619Smrg ECHO='printf %s\n' 4540515ec619Smrgelse 4541515ec619Smrg # Use this function as a fallback that always works. 4542515ec619Smrg func_fallback_echo () 4543515ec619Smrg { 4544515ec619Smrg eval 'cat <<_LTECHO_EOF 4545515ec619Smrg$[]1 4546515ec619Smrg_LTECHO_EOF' 4547515ec619Smrg } 4548515ec619Smrg ECHO='func_fallback_echo' 4549515ec619Smrgfi 4550ff559fabSmrg 4551515ec619Smrg# func_echo_all arg... 4552515ec619Smrg# Invoke $ECHO with all args, space-separated. 4553515ec619Smrgfunc_echo_all () 4554515ec619Smrg{ 4555515ec619Smrg $ECHO "$*" 4556515ec619Smrg} 4557ff559fabSmrg 4558515ec619Smrgcase $ECHO in 4559515ec619Smrg printf*) AC_MSG_RESULT([printf]) ;; 4560515ec619Smrg print*) AC_MSG_RESULT([print -r]) ;; 4561515ec619Smrg *) AC_MSG_RESULT([cat]) ;; 4562515ec619Smrgesac 4563ff559fabSmrg 4564515ec619Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 4565515ec619Smrg[_AS_DETECT_SUGGESTED([ 4566515ec619Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4567515ec619Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4568515ec619Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4569515ec619Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4570515ec619Smrg PATH=/empty FPATH=/empty; export PATH FPATH 4571515ec619Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 4572515ec619Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4573ff559fabSmrg 4574515ec619Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4575515ec619Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4576515ec619Smrg])# _LT_PROG_ECHO_BACKSLASH 4577ff559fabSmrg 45787a3b38f7Smrg 4579515ec619Smrg# _LT_WITH_SYSROOT 4580515ec619Smrg# ---------------- 4581515ec619SmrgAC_DEFUN([_LT_WITH_SYSROOT], 4582515ec619Smrg[m4_require([_LT_DECL_SED])dnl 4583515ec619SmrgAC_MSG_CHECKING([for sysroot]) 4584515ec619SmrgAC_ARG_WITH([sysroot], 4585515ec619Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4586515ec619Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 4587515ec619Smrg if not specified).])], 4588515ec619Smrg[], [with_sysroot=no]) 45897a3b38f7Smrg 4590515ec619Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 4591515ec619Smrgdnl in case the user passed a directory name. 4592515ec619Smrglt_sysroot= 4593515ec619Smrgcase $with_sysroot in #( 4594515ec619Smrg yes) 4595515ec619Smrg if test yes = "$GCC"; then 4596515ec619Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4597515ec619Smrg fi 4598515ec619Smrg ;; #( 4599515ec619Smrg /*) 4600515ec619Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4601515ec619Smrg ;; #( 4602515ec619Smrg no|'') 4603515ec619Smrg ;; #( 4604515ec619Smrg *) 4605515ec619Smrg AC_MSG_RESULT([$with_sysroot]) 4606515ec619Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 4607515ec619Smrg ;; 4608515ec619Smrgesac 4609515ec619Smrg 4610515ec619Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 4611515ec619Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4612515ec619Smrg[dependent libraries, and where our libraries should be installed.])]) 4613515ec619Smrg 4614515ec619Smrg# _LT_ENABLE_LOCK 4615515ec619Smrg# --------------- 4616515ec619Smrgm4_defun([_LT_ENABLE_LOCK], 4617515ec619Smrg[AC_ARG_ENABLE([libtool-lock], 4618515ec619Smrg [AS_HELP_STRING([--disable-libtool-lock], 4619515ec619Smrg [avoid locking (might break parallel builds)])]) 4620515ec619Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 46217a3b38f7Smrg 4622515ec619Smrg# Some flags need to be propagated to the compiler or linker for good 4623515ec619Smrg# libtool support. 4624515ec619Smrgcase $host in 4625515ec619Smrgia64-*-hpux*) 4626515ec619Smrg # Find out what ABI is being produced by ac_compile, and set mode 4627515ec619Smrg # options accordingly. 4628515ec619Smrg echo 'int i;' > conftest.$ac_ext 4629515ec619Smrg if AC_TRY_EVAL(ac_compile); then 4630515ec619Smrg case `$FILECMD conftest.$ac_objext` in 4631515ec619Smrg *ELF-32*) 4632515ec619Smrg HPUX_IA64_MODE=32 4633515ec619Smrg ;; 4634515ec619Smrg *ELF-64*) 4635515ec619Smrg HPUX_IA64_MODE=64 4636515ec619Smrg ;; 463744dda7b2Smrg esac 4638515ec619Smrg fi 4639515ec619Smrg rm -rf conftest* 4640515ec619Smrg ;; 4641515ec619Smrg*-*-irix6*) 4642515ec619Smrg # Find out what ABI is being produced by ac_compile, and set linker 4643515ec619Smrg # options accordingly. 4644515ec619Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4645515ec619Smrg if AC_TRY_EVAL(ac_compile); then 4646515ec619Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 4647515ec619Smrg case `$FILECMD conftest.$ac_objext` in 4648515ec619Smrg *32-bit*) 4649515ec619Smrg LD="${LD-ld} -melf32bsmip" 4650515ec619Smrg ;; 4651515ec619Smrg *N32*) 4652515ec619Smrg LD="${LD-ld} -melf32bmipn32" 4653515ec619Smrg ;; 4654515ec619Smrg *64-bit*) 4655515ec619Smrg LD="${LD-ld} -melf64bmip" 465644dda7b2Smrg ;; 465744dda7b2Smrg esac 4658515ec619Smrg else 4659515ec619Smrg case `$FILECMD conftest.$ac_objext` in 4660515ec619Smrg *32-bit*) 4661515ec619Smrg LD="${LD-ld} -32" 4662515ec619Smrg ;; 4663515ec619Smrg *N32*) 4664515ec619Smrg LD="${LD-ld} -n32" 4665515ec619Smrg ;; 4666515ec619Smrg *64-bit*) 4667515ec619Smrg LD="${LD-ld} -64" 4668515ec619Smrg ;; 4669515ec619Smrg esac 467044dda7b2Smrg fi 467144dda7b2Smrg fi 4672515ec619Smrg rm -rf conftest* 4673515ec619Smrg ;; 467444dda7b2Smrg 4675515ec619Smrgmips64*-*linux*) 4676515ec619Smrg # Find out what ABI is being produced by ac_compile, and set linker 4677515ec619Smrg # options accordingly. 4678515ec619Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4679515ec619Smrg if AC_TRY_EVAL(ac_compile); then 4680515ec619Smrg emul=elf 4681515ec619Smrg case `$FILECMD conftest.$ac_objext` in 4682515ec619Smrg *32-bit*) 4683515ec619Smrg emul="${emul}32" 4684515ec619Smrg ;; 4685515ec619Smrg *64-bit*) 4686515ec619Smrg emul="${emul}64" 4687515ec619Smrg ;; 4688515ec619Smrg esac 4689515ec619Smrg case `$FILECMD conftest.$ac_objext` in 4690515ec619Smrg *MSB*) 4691515ec619Smrg emul="${emul}btsmip" 4692515ec619Smrg ;; 4693515ec619Smrg *LSB*) 4694515ec619Smrg emul="${emul}ltsmip" 4695515ec619Smrg ;; 4696515ec619Smrg esac 4697515ec619Smrg case `$FILECMD conftest.$ac_objext` in 4698515ec619Smrg *N32*) 4699515ec619Smrg emul="${emul}n32" 4700515ec619Smrg ;; 470144dda7b2Smrg esac 4702515ec619Smrg LD="${LD-ld} -m $emul" 470344dda7b2Smrg fi 4704515ec619Smrg rm -rf conftest* 470544dda7b2Smrg ;; 47067a3b38f7Smrg 4707515ec619Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4708515ec619Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4709515ec619Smrg # Find out what ABI is being produced by ac_compile, and set linker 4710515ec619Smrg # options accordingly. Note that the listed cases only cover the 4711515ec619Smrg # situations where additional linker options are needed (such as when 4712515ec619Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4713515ec619Smrg # vice versa); the common cases where no linker options are needed do 4714515ec619Smrg # not appear in the list. 4715515ec619Smrg echo 'int i;' > conftest.$ac_ext 4716515ec619Smrg if AC_TRY_EVAL(ac_compile); then 4717515ec619Smrg case `$FILECMD conftest.o` in 4718515ec619Smrg *32-bit*) 4719515ec619Smrg case $host in 4720515ec619Smrg x86_64-*kfreebsd*-gnu) 4721515ec619Smrg LD="${LD-ld} -m elf_i386_fbsd" 4722515ec619Smrg ;; 4723515ec619Smrg x86_64-*linux*) 4724515ec619Smrg case `$FILECMD conftest.o` in 4725515ec619Smrg *x86-64*) 4726515ec619Smrg LD="${LD-ld} -m elf32_x86_64" 4727515ec619Smrg ;; 4728515ec619Smrg *) 4729515ec619Smrg LD="${LD-ld} -m elf_i386" 4730515ec619Smrg ;; 4731515ec619Smrg esac 4732515ec619Smrg ;; 4733515ec619Smrg powerpc64le-*linux*) 4734515ec619Smrg LD="${LD-ld} -m elf32lppclinux" 4735515ec619Smrg ;; 4736515ec619Smrg powerpc64-*linux*) 4737515ec619Smrg LD="${LD-ld} -m elf32ppclinux" 4738515ec619Smrg ;; 4739515ec619Smrg s390x-*linux*) 4740515ec619Smrg LD="${LD-ld} -m elf_s390" 4741515ec619Smrg ;; 4742515ec619Smrg sparc64-*linux*) 4743515ec619Smrg LD="${LD-ld} -m elf32_sparc" 4744515ec619Smrg ;; 4745515ec619Smrg esac 4746515ec619Smrg ;; 4747515ec619Smrg *64-bit*) 4748515ec619Smrg case $host in 4749515ec619Smrg x86_64-*kfreebsd*-gnu) 4750515ec619Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 4751515ec619Smrg ;; 4752515ec619Smrg x86_64-*linux*) 4753515ec619Smrg LD="${LD-ld} -m elf_x86_64" 4754515ec619Smrg ;; 4755515ec619Smrg powerpcle-*linux*) 4756515ec619Smrg LD="${LD-ld} -m elf64lppc" 4757515ec619Smrg ;; 4758515ec619Smrg powerpc-*linux*) 4759515ec619Smrg LD="${LD-ld} -m elf64ppc" 4760515ec619Smrg ;; 4761515ec619Smrg s390*-*linux*|s390*-*tpf*) 4762515ec619Smrg LD="${LD-ld} -m elf64_s390" 4763515ec619Smrg ;; 4764515ec619Smrg sparc*-*linux*) 4765515ec619Smrg LD="${LD-ld} -m elf64_sparc" 4766515ec619Smrg ;; 4767515ec619Smrg esac 4768515ec619Smrg ;; 4769515ec619Smrg esac 4770515ec619Smrg fi 4771515ec619Smrg rm -rf conftest* 4772515ec619Smrg ;; 47737a3b38f7Smrg 4774515ec619Smrg*-*-sco3.2v5*) 4775515ec619Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4776515ec619Smrg SAVE_CFLAGS=$CFLAGS 4777515ec619Smrg CFLAGS="$CFLAGS -belf" 4778515ec619Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4779515ec619Smrg [AC_LANG_PUSH(C) 4780515ec619Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4781515ec619Smrg AC_LANG_POP]) 4782515ec619Smrg if test yes != "$lt_cv_cc_needs_belf"; then 4783515ec619Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4784515ec619Smrg CFLAGS=$SAVE_CFLAGS 4785515ec619Smrg fi 4786515ec619Smrg ;; 4787515ec619Smrg*-*solaris*) 4788515ec619Smrg # Find out what ABI is being produced by ac_compile, and set linker 4789515ec619Smrg # options accordingly. 4790515ec619Smrg echo 'int i;' > conftest.$ac_ext 4791515ec619Smrg if AC_TRY_EVAL(ac_compile); then 4792515ec619Smrg case `$FILECMD conftest.o` in 4793515ec619Smrg *64-bit*) 4794515ec619Smrg case $lt_cv_prog_gnu_ld in 4795515ec619Smrg yes*) 4796515ec619Smrg case $host in 4797515ec619Smrg i?86-*-solaris*|x86_64-*-solaris*) 4798515ec619Smrg LD="${LD-ld} -m elf_x86_64" 4799515ec619Smrg ;; 4800515ec619Smrg sparc*-*-solaris*) 4801515ec619Smrg LD="${LD-ld} -m elf64_sparc" 4802515ec619Smrg ;; 4803515ec619Smrg esac 4804515ec619Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4805515ec619Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4806515ec619Smrg LD=${LD-ld}_sol2 4807515ec619Smrg fi 4808515ec619Smrg ;; 4809515ec619Smrg *) 4810515ec619Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4811515ec619Smrg LD="${LD-ld} -64" 4812515ec619Smrg fi 4813515ec619Smrg ;; 4814515ec619Smrg esac 4815515ec619Smrg ;; 4816515ec619Smrg esac 4817515ec619Smrg fi 4818515ec619Smrg rm -rf conftest* 4819515ec619Smrg ;; 4820515ec619Smrgesac 48217a3b38f7Smrg 4822515ec619Smrgneed_locks=$enable_libtool_lock 4823515ec619Smrg])# _LT_ENABLE_LOCK 48247a3b38f7Smrg 48257a3b38f7Smrg 4826515ec619Smrg# _LT_PROG_AR 4827515ec619Smrg# ----------- 4828515ec619Smrgm4_defun([_LT_PROG_AR], 4829515ec619Smrg[AC_CHECK_TOOLS(AR, [ar], false) 4830515ec619Smrg: ${AR=ar} 4831515ec619Smrg_LT_DECL([], [AR], [1], [The archiver]) 48327a3b38f7Smrg 4833515ec619Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4834515ec619Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4835515ec619Smrg# higher priority because thats what people were doing historically (setting 4836515ec619Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4837515ec619Smrg# variable obsoleted/removed. 48387a3b38f7Smrg 4839515ec619Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4840515ec619Smrglt_ar_flags=$AR_FLAGS 4841515ec619Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 48427a3b38f7Smrg 4843515ec619Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4844515ec619Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4845515ec619Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4846515ec619Smrg [Flags to create an archive]) 48477a3b38f7Smrg 4848515ec619SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4849515ec619Smrg [lt_cv_ar_at_file=no 4850515ec619Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4851515ec619Smrg [echo conftest.$ac_objext > conftest.lst 4852515ec619Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4853515ec619Smrg AC_TRY_EVAL([lt_ar_try]) 4854515ec619Smrg if test 0 -eq "$ac_status"; then 4855515ec619Smrg # Ensure the archiver fails upon bogus file names. 4856515ec619Smrg rm -f conftest.$ac_objext libconftest.a 4857515ec619Smrg AC_TRY_EVAL([lt_ar_try]) 4858515ec619Smrg if test 0 -ne "$ac_status"; then 4859515ec619Smrg lt_cv_ar_at_file=@ 4860515ec619Smrg fi 4861515ec619Smrg fi 4862515ec619Smrg rm -f conftest.* libconftest.a 4863515ec619Smrg ]) 4864515ec619Smrg ]) 48657a3b38f7Smrg 4866515ec619Smrgif test no = "$lt_cv_ar_at_file"; then 4867515ec619Smrg archiver_list_spec= 4868515ec619Smrgelse 4869515ec619Smrg archiver_list_spec=$lt_cv_ar_at_file 4870515ec619Smrgfi 4871515ec619Smrg_LT_DECL([], [archiver_list_spec], [1], 4872515ec619Smrg [How to feed a file listing to the archiver]) 4873515ec619Smrg])# _LT_PROG_AR 48747a3b38f7Smrg 48757a3b38f7Smrg 4876515ec619Smrg# _LT_CMD_OLD_ARCHIVE 4877515ec619Smrg# ------------------- 4878515ec619Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 4879515ec619Smrg[_LT_PROG_AR 48807a3b38f7Smrg 4881515ec619SmrgAC_CHECK_TOOL(STRIP, strip, :) 4882515ec619Smrgtest -z "$STRIP" && STRIP=: 4883515ec619Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4884515ec619Smrg 4885515ec619SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 4886515ec619Smrgtest -z "$RANLIB" && RANLIB=: 4887515ec619Smrg_LT_DECL([], [RANLIB], [1], 4888515ec619Smrg [Commands used to install an old-style archive]) 4889515ec619Smrg 4890515ec619Smrg# Determine commands to create old-style static archives. 4891515ec619Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4892515ec619Smrgold_postinstall_cmds='chmod 644 $oldlib' 4893515ec619Smrgold_postuninstall_cmds= 4894515ec619Smrg 4895515ec619Smrgif test -n "$RANLIB"; then 489644dda7b2Smrg case $host_os in 4897515ec619Smrg bitrig* | openbsd*) 4898515ec619Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 489944dda7b2Smrg ;; 4900515ec619Smrg *) 4901515ec619Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 490244dda7b2Smrg ;; 49037a3b38f7Smrg esac 4904515ec619Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 4905515ec619Smrgfi 49067a3b38f7Smrg 4907515ec619Smrgcase $host_os in 4908515ec619Smrg darwin*) 4909515ec619Smrg lock_old_archive_extraction=yes ;; 4910515ec619Smrg *) 4911515ec619Smrg lock_old_archive_extraction=no ;; 4912515ec619Smrgesac 4913515ec619Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 4914515ec619Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 4915515ec619Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 4916515ec619Smrg [Commands used to build an old-style archive]) 4917515ec619Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 4918515ec619Smrg [Whether to use a lock for old archive extraction]) 4919515ec619Smrg])# _LT_CMD_OLD_ARCHIVE 49207a3b38f7Smrg 49217a3b38f7Smrg 4922515ec619Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4923515ec619Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4924515ec619Smrg# ---------------------------------------------------------------- 4925515ec619Smrg# Check whether the given compiler option works 4926515ec619SmrgAC_DEFUN([_LT_COMPILER_OPTION], 4927515ec619Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4928515ec619Smrgm4_require([_LT_DECL_SED])dnl 4929515ec619SmrgAC_CACHE_CHECK([$1], [$2], 4930515ec619Smrg [$2=no 4931515ec619Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 4932515ec619Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4933515ec619Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 4934515ec619Smrg # Insert the option either (1) after the last *FLAGS variable, or 4935515ec619Smrg # (2) before a word containing "conftest.", or (3) at the end. 4936515ec619Smrg # Note that $ac_compile itself does not contain backslashes and begins 4937515ec619Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4938515ec619Smrg # The option is referenced via a variable to avoid confusing sed. 4939515ec619Smrg lt_compile=`echo "$ac_compile" | $SED \ 4940515ec619Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4941515ec619Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4942515ec619Smrg -e 's:$: $lt_compiler_flag:'` 4943515ec619Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4944515ec619Smrg (eval "$lt_compile" 2>conftest.err) 4945515ec619Smrg ac_status=$? 4946515ec619Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4947515ec619Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4948515ec619Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 4949515ec619Smrg # The compiler can only warn and ignore the option if not recognized 4950515ec619Smrg # So say no if there are warnings other than the usual output. 4951515ec619Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 4952515ec619Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4953515ec619Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 4954515ec619Smrg $2=yes 4955515ec619Smrg fi 4956515ec619Smrg fi 4957515ec619Smrg $RM conftest* 4958515ec619Smrg]) 4959515ec619Smrg 4960515ec619Smrgif test yes = "[$]$2"; then 4961515ec619Smrg m4_if([$5], , :, [$5]) 4962515ec619Smrgelse 4963515ec619Smrg m4_if([$6], , :, [$6]) 4964515ec619Smrgfi 4965515ec619Smrg])# _LT_COMPILER_OPTION 49667a3b38f7Smrg 4967515ec619Smrg# Old name: 4968515ec619SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 4969515ec619Smrgdnl aclocal-1.4 backwards compatibility: 4970515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 4971515ec619Smrg 4972515ec619Smrg 4973515ec619Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4974515ec619Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 4975515ec619Smrg# ---------------------------------------------------- 4976515ec619Smrg# Check whether the given linker option works 4977515ec619SmrgAC_DEFUN([_LT_LINKER_OPTION], 497844dda7b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4979515ec619Smrgm4_require([_LT_DECL_SED])dnl 4980515ec619SmrgAC_CACHE_CHECK([$1], [$2], 4981515ec619Smrg [$2=no 4982515ec619Smrg save_LDFLAGS=$LDFLAGS 4983515ec619Smrg LDFLAGS="$LDFLAGS $3" 4984515ec619Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 4985515ec619Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 4986515ec619Smrg # The linker can only warn and ignore the option if not recognized 4987515ec619Smrg # So say no if there are warnings 4988515ec619Smrg if test -s conftest.err; then 4989515ec619Smrg # Append any errors to the config.log. 4990515ec619Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 4991515ec619Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 4992515ec619Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4993515ec619Smrg if diff conftest.exp conftest.er2 >/dev/null; then 4994515ec619Smrg $2=yes 4995515ec619Smrg fi 4996515ec619Smrg else 4997515ec619Smrg $2=yes 4998515ec619Smrg fi 4999515ec619Smrg fi 5000515ec619Smrg $RM -r conftest* 5001515ec619Smrg LDFLAGS=$save_LDFLAGS 5002515ec619Smrg]) 5003515ec619Smrg 5004515ec619Smrgif test yes = "[$]$2"; then 5005515ec619Smrg m4_if([$4], , :, [$4]) 500644dda7b2Smrgelse 5007515ec619Smrg m4_if([$5], , :, [$5]) 500844dda7b2Smrgfi 5009515ec619Smrg])# _LT_LINKER_OPTION 50107a3b38f7Smrg 5011515ec619Smrg# Old name: 5012515ec619SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5013515ec619Smrgdnl aclocal-1.4 backwards compatibility: 5014515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 50157a3b38f7Smrg 50167a3b38f7Smrg 5017515ec619Smrg# LT_CMD_MAX_LEN 5018515ec619Smrg#--------------- 5019515ec619SmrgAC_DEFUN([LT_CMD_MAX_LEN], 5020515ec619Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5021515ec619Smrg# find the maximum length of command line arguments 5022515ec619SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5023515ec619SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5024515ec619Smrg i=0 5025515ec619Smrg teststring=ABCD 50267a3b38f7Smrg 5027515ec619Smrg case $build_os in 5028515ec619Smrg msdosdjgpp*) 5029515ec619Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5030515ec619Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5031515ec619Smrg # during glob expansion). Even if it were fixed, the result of this 5032515ec619Smrg # check would be larger than it should be. 5033515ec619Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5034515ec619Smrg ;; 50357a3b38f7Smrg 5036515ec619Smrg gnu*) 5037515ec619Smrg # Under GNU Hurd, this test is not required because there is 5038515ec619Smrg # no limit to the length of command line arguments. 5039515ec619Smrg # Libtool will interpret -1 as no limit whatsoever 5040515ec619Smrg lt_cv_sys_max_cmd_len=-1; 5041515ec619Smrg ;; 50427a3b38f7Smrg 5043515ec619Smrg cygwin* | mingw* | cegcc*) 5044515ec619Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5045515ec619Smrg # about 5 minutes as the teststring grows exponentially. 5046515ec619Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 5047515ec619Smrg # you end up with a "frozen" computer, even though with patience 5048515ec619Smrg # the test eventually succeeds (with a max line length of 256k). 5049515ec619Smrg # Instead, let's just punt: use the minimum linelength reported by 5050515ec619Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 5051515ec619Smrg lt_cv_sys_max_cmd_len=8192; 5052515ec619Smrg ;; 50537a3b38f7Smrg 5054515ec619Smrg mint*) 5055515ec619Smrg # On MiNT this can take a long time and run out of memory. 5056515ec619Smrg lt_cv_sys_max_cmd_len=8192; 5057515ec619Smrg ;; 50587a3b38f7Smrg 5059515ec619Smrg amigaos*) 5060515ec619Smrg # On AmigaOS with pdksh, this test takes hours, literally. 5061515ec619Smrg # So we just punt and use a minimum line length of 8192. 5062515ec619Smrg lt_cv_sys_max_cmd_len=8192; 5063515ec619Smrg ;; 50647a3b38f7Smrg 5065515ec619Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5066515ec619Smrg # This has been around since 386BSD, at least. Likely further. 5067515ec619Smrg if test -x /sbin/sysctl; then 5068515ec619Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5069515ec619Smrg elif test -x /usr/sbin/sysctl; then 5070515ec619Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 507144dda7b2Smrg else 5072515ec619Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 507344dda7b2Smrg fi 5074515ec619Smrg # And add a safety zone 5075515ec619Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5076515ec619Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5077515ec619Smrg ;; 50787a3b38f7Smrg 5079515ec619Smrg interix*) 5080515ec619Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5081515ec619Smrg lt_cv_sys_max_cmd_len=196608 5082515ec619Smrg ;; 50837a3b38f7Smrg 5084515ec619Smrg os2*) 5085515ec619Smrg # The test takes a long time on OS/2. 5086515ec619Smrg lt_cv_sys_max_cmd_len=8192 5087515ec619Smrg ;; 50887a3b38f7Smrg 5089515ec619Smrg osf*) 5090515ec619Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5091515ec619Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5092515ec619Smrg # nice to cause kernel panics so lets avoid the loop below. 5093515ec619Smrg # First set a reasonable default. 5094515ec619Smrg lt_cv_sys_max_cmd_len=16384 5095515ec619Smrg # 5096515ec619Smrg if test -x /sbin/sysconfig; then 5097515ec619Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5098515ec619Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5099515ec619Smrg esac 5100515ec619Smrg fi 5101515ec619Smrg ;; 5102515ec619Smrg sco3.2v5*) 5103515ec619Smrg lt_cv_sys_max_cmd_len=102400 5104515ec619Smrg ;; 5105515ec619Smrg sysv5* | sco5v6* | sysv4.2uw2*) 5106515ec619Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5107515ec619Smrg if test -n "$kargmax"; then 5108515ec619Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5109515ec619Smrg else 5110515ec619Smrg lt_cv_sys_max_cmd_len=32768 5111515ec619Smrg fi 5112515ec619Smrg ;; 5113515ec619Smrg *) 5114515ec619Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5115515ec619Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5116515ec619Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5117515ec619Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5118515ec619Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5119515ec619Smrg else 5120515ec619Smrg # Make teststring a little bigger before we do anything with it. 5121515ec619Smrg # a 1K string should be a reasonable start. 5122515ec619Smrg for i in 1 2 3 4 5 6 7 8; do 5123515ec619Smrg teststring=$teststring$teststring 5124515ec619Smrg done 5125515ec619Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5126515ec619Smrg # If test is not a shell built-in, we'll probably end up computing a 5127515ec619Smrg # maximum length that is only half of the actual maximum length, but 5128515ec619Smrg # we can't tell. 5129515ec619Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5130515ec619Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5131515ec619Smrg test 17 != "$i" # 1/2 MB should be enough 5132515ec619Smrg do 5133515ec619Smrg i=`expr $i + 1` 5134515ec619Smrg teststring=$teststring$teststring 5135515ec619Smrg done 5136515ec619Smrg # Only check the string length outside the loop. 5137515ec619Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5138515ec619Smrg teststring= 5139515ec619Smrg # Add a significant safety factor because C++ compilers can tack on 5140515ec619Smrg # massive amounts of additional arguments before passing them to the 5141515ec619Smrg # linker. It appears as though 1/2 is a usable value. 5142515ec619Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5143515ec619Smrg fi 5144515ec619Smrg ;; 5145515ec619Smrg esac 5146515ec619Smrg]) 5147515ec619Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 5148515ec619Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5149515ec619Smrgelse 5150515ec619Smrg AC_MSG_RESULT(none) 5151515ec619Smrgfi 5152515ec619Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5153515ec619Smrg_LT_DECL([], [max_cmd_len], [0], 5154515ec619Smrg [What is the maximum length of a command?]) 5155515ec619Smrg])# LT_CMD_MAX_LEN 51567a3b38f7Smrg 5157515ec619Smrg# Old name: 5158515ec619SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5159515ec619Smrgdnl aclocal-1.4 backwards compatibility: 5160515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 51617a3b38f7Smrg 51627a3b38f7Smrg 5163515ec619Smrg# _LT_HEADER_DLFCN 5164515ec619Smrg# ---------------- 5165515ec619Smrgm4_defun([_LT_HEADER_DLFCN], 5166515ec619Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5167515ec619Smrg])# _LT_HEADER_DLFCN 51687a3b38f7Smrg 51697a3b38f7Smrg 5170515ec619Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5171515ec619Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5172515ec619Smrg# ---------------------------------------------------------------- 5173515ec619Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 5174515ec619Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5175515ec619Smrgif test yes = "$cross_compiling"; then : 5176515ec619Smrg [$4] 5177515ec619Smrgelse 5178515ec619Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5179515ec619Smrg lt_status=$lt_dlunknown 5180515ec619Smrg cat > conftest.$ac_ext <<_LT_EOF 5181515ec619Smrg[#line $LINENO "configure" 5182515ec619Smrg#include "confdefs.h" 51837a3b38f7Smrg 5184515ec619Smrg#if HAVE_DLFCN_H 5185515ec619Smrg#include <dlfcn.h> 5186515ec619Smrg#endif 51877a3b38f7Smrg 5188515ec619Smrg#include <stdio.h> 51897a3b38f7Smrg 5190515ec619Smrg#ifdef RTLD_GLOBAL 5191515ec619Smrg# define LT_DLGLOBAL RTLD_GLOBAL 5192515ec619Smrg#else 5193515ec619Smrg# ifdef DL_GLOBAL 5194515ec619Smrg# define LT_DLGLOBAL DL_GLOBAL 5195515ec619Smrg# else 5196515ec619Smrg# define LT_DLGLOBAL 0 5197515ec619Smrg# endif 5198515ec619Smrg#endif 51997a3b38f7Smrg 5200515ec619Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5201515ec619Smrg find out it does not work in some platform. */ 5202515ec619Smrg#ifndef LT_DLLAZY_OR_NOW 5203515ec619Smrg# ifdef RTLD_LAZY 5204515ec619Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5205515ec619Smrg# else 5206515ec619Smrg# ifdef DL_LAZY 5207515ec619Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 5208515ec619Smrg# else 5209515ec619Smrg# ifdef RTLD_NOW 5210515ec619Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5211515ec619Smrg# else 5212515ec619Smrg# ifdef DL_NOW 5213515ec619Smrg# define LT_DLLAZY_OR_NOW DL_NOW 5214515ec619Smrg# else 5215515ec619Smrg# define LT_DLLAZY_OR_NOW 0 5216515ec619Smrg# endif 5217515ec619Smrg# endif 5218515ec619Smrg# endif 5219515ec619Smrg# endif 5220515ec619Smrg#endif 52217a3b38f7Smrg 5222515ec619Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 5223515ec619Smrg correspondingly for the symbols needed. */ 5224515ec619Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5225515ec619Smrgint fnord () __attribute__((visibility("default"))); 5226515ec619Smrg#endif 52277a3b38f7Smrg 5228515ec619Smrgint fnord () { return 42; } 5229515ec619Smrgint main () 5230515ec619Smrg{ 5231515ec619Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5232515ec619Smrg int status = $lt_dlunknown; 52337a3b38f7Smrg 5234515ec619Smrg if (self) 5235515ec619Smrg { 5236515ec619Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5237515ec619Smrg else 5238515ec619Smrg { 5239515ec619Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5240515ec619Smrg else puts (dlerror ()); 5241515ec619Smrg } 5242515ec619Smrg /* dlclose (self); */ 5243515ec619Smrg } 5244515ec619Smrg else 5245515ec619Smrg puts (dlerror ()); 52467a3b38f7Smrg 5247515ec619Smrg return status; 5248515ec619Smrg}] 5249515ec619Smrg_LT_EOF 5250515ec619Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5251515ec619Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5252515ec619Smrg lt_status=$? 5253515ec619Smrg case x$lt_status in 5254515ec619Smrg x$lt_dlno_uscore) $1 ;; 5255515ec619Smrg x$lt_dlneed_uscore) $2 ;; 5256515ec619Smrg x$lt_dlunknown|x*) $3 ;; 5257515ec619Smrg esac 5258515ec619Smrg else : 5259515ec619Smrg # compilation failed 5260515ec619Smrg $3 5261515ec619Smrg fi 5262515ec619Smrgfi 5263515ec619Smrgrm -fr conftest* 5264515ec619Smrg])# _LT_TRY_DLOPEN_SELF 52657a3b38f7Smrg 52667a3b38f7Smrg 5267515ec619Smrg# LT_SYS_DLOPEN_SELF 5268515ec619Smrg# ------------------ 5269515ec619SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5270515ec619Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5271515ec619Smrgif test yes != "$enable_dlopen"; then 5272515ec619Smrg enable_dlopen=unknown 5273515ec619Smrg enable_dlopen_self=unknown 5274515ec619Smrg enable_dlopen_self_static=unknown 5275515ec619Smrgelse 5276515ec619Smrg lt_cv_dlopen=no 5277515ec619Smrg lt_cv_dlopen_libs= 52787a3b38f7Smrg 5279515ec619Smrg case $host_os in 5280515ec619Smrg beos*) 5281515ec619Smrg lt_cv_dlopen=load_add_on 5282515ec619Smrg lt_cv_dlopen_libs= 5283515ec619Smrg lt_cv_dlopen_self=yes 5284515ec619Smrg ;; 52857a3b38f7Smrg 5286515ec619Smrg mingw* | pw32* | cegcc*) 5287515ec619Smrg lt_cv_dlopen=LoadLibrary 5288515ec619Smrg lt_cv_dlopen_libs= 5289515ec619Smrg ;; 5290862f5301Smrg 5291515ec619Smrg cygwin*) 5292515ec619Smrg lt_cv_dlopen=dlopen 5293515ec619Smrg lt_cv_dlopen_libs= 5294515ec619Smrg ;; 52957a3b38f7Smrg 5296515ec619Smrg darwin*) 5297515ec619Smrg # if libdl is installed we need to link against it 5298515ec619Smrg AC_CHECK_LIB([dl], [dlopen], 5299515ec619Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5300515ec619Smrg lt_cv_dlopen=dyld 5301515ec619Smrg lt_cv_dlopen_libs= 5302515ec619Smrg lt_cv_dlopen_self=yes 5303515ec619Smrg ]) 5304515ec619Smrg ;; 53056fc0178dSmrg 5306515ec619Smrg tpf*) 5307515ec619Smrg # Don't try to run any link tests for TPF. We know it's impossible 5308515ec619Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 5309515ec619Smrg lt_cv_dlopen=dlopen 5310515ec619Smrg lt_cv_dlopen_libs= 5311515ec619Smrg lt_cv_dlopen_self=no 5312515ec619Smrg ;; 53137a3b38f7Smrg 5314515ec619Smrg *) 5315515ec619Smrg AC_CHECK_FUNC([shl_load], 5316515ec619Smrg [lt_cv_dlopen=shl_load], 5317515ec619Smrg [AC_CHECK_LIB([dld], [shl_load], 5318515ec619Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5319515ec619Smrg [AC_CHECK_FUNC([dlopen], 5320515ec619Smrg [lt_cv_dlopen=dlopen], 5321515ec619Smrg [AC_CHECK_LIB([dl], [dlopen], 5322515ec619Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5323515ec619Smrg [AC_CHECK_LIB([svld], [dlopen], 5324515ec619Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5325515ec619Smrg [AC_CHECK_LIB([dld], [dld_link], 5326515ec619Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5327515ec619Smrg ]) 5328515ec619Smrg ]) 5329515ec619Smrg ]) 5330515ec619Smrg ]) 5331515ec619Smrg ]) 5332515ec619Smrg ;; 5333515ec619Smrg esac 53347a3b38f7Smrg 5335515ec619Smrg if test no = "$lt_cv_dlopen"; then 5336515ec619Smrg enable_dlopen=no 5337515ec619Smrg else 5338515ec619Smrg enable_dlopen=yes 5339515ec619Smrg fi 5340515ec619Smrg 5341515ec619Smrg case $lt_cv_dlopen in 5342515ec619Smrg dlopen) 5343515ec619Smrg save_CPPFLAGS=$CPPFLAGS 5344515ec619Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 53457a3b38f7Smrg 5346515ec619Smrg save_LDFLAGS=$LDFLAGS 5347515ec619Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 53487a3b38f7Smrg 5349515ec619Smrg save_LIBS=$LIBS 5350515ec619Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 53517a3b38f7Smrg 5352515ec619Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 5353515ec619Smrg lt_cv_dlopen_self, [dnl 5354515ec619Smrg _LT_TRY_DLOPEN_SELF( 5355515ec619Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5356515ec619Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5357515ec619Smrg ]) 53587a3b38f7Smrg 5359515ec619Smrg if test yes = "$lt_cv_dlopen_self"; then 5360515ec619Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5361515ec619Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5362515ec619Smrg lt_cv_dlopen_self_static, [dnl 5363515ec619Smrg _LT_TRY_DLOPEN_SELF( 5364515ec619Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5365515ec619Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5366515ec619Smrg ]) 5367515ec619Smrg fi 53687a3b38f7Smrg 5369515ec619Smrg CPPFLAGS=$save_CPPFLAGS 5370515ec619Smrg LDFLAGS=$save_LDFLAGS 5371515ec619Smrg LIBS=$save_LIBS 5372515ec619Smrg ;; 5373515ec619Smrg esac 53747a3b38f7Smrg 5375515ec619Smrg case $lt_cv_dlopen_self in 5376515ec619Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5377515ec619Smrg *) enable_dlopen_self=unknown ;; 5378515ec619Smrg esac 53797a3b38f7Smrg 5380515ec619Smrg case $lt_cv_dlopen_self_static in 5381515ec619Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5382515ec619Smrg *) enable_dlopen_self_static=unknown ;; 5383515ec619Smrg esac 5384515ec619Smrgfi 5385515ec619Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 5386515ec619Smrg [Whether dlopen is supported]) 5387515ec619Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5388515ec619Smrg [Whether dlopen of programs is supported]) 5389515ec619Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5390515ec619Smrg [Whether dlopen of statically linked programs is supported]) 5391515ec619Smrg])# LT_SYS_DLOPEN_SELF 53927a3b38f7Smrg 5393515ec619Smrg# Old name: 5394515ec619SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5395515ec619Smrgdnl aclocal-1.4 backwards compatibility: 5396515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 53977a3b38f7Smrg 53987a3b38f7Smrg 5399515ec619Smrg# _LT_COMPILER_C_O([TAGNAME]) 5400515ec619Smrg# --------------------------- 5401515ec619Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 5402515ec619Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5403515ec619Smrgm4_defun([_LT_COMPILER_C_O], 5404515ec619Smrg[m4_require([_LT_DECL_SED])dnl 5405515ec619Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5406515ec619Smrgm4_require([_LT_TAG_COMPILER])dnl 5407515ec619SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5408515ec619Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5409515ec619Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5410515ec619Smrg $RM -r conftest 2>/dev/null 5411515ec619Smrg mkdir conftest 5412515ec619Smrg cd conftest 5413515ec619Smrg mkdir out 5414515ec619Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 54157a3b38f7Smrg 5416515ec619Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 5417515ec619Smrg # Insert the option either (1) after the last *FLAGS variable, or 5418515ec619Smrg # (2) before a word containing "conftest.", or (3) at the end. 5419515ec619Smrg # Note that $ac_compile itself does not contain backslashes and begins 5420515ec619Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5421515ec619Smrg lt_compile=`echo "$ac_compile" | $SED \ 5422515ec619Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5423515ec619Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5424515ec619Smrg -e 's:$: $lt_compiler_flag:'` 5425515ec619Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5426515ec619Smrg (eval "$lt_compile" 2>out/conftest.err) 5427515ec619Smrg ac_status=$? 5428515ec619Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 5429515ec619Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5430515ec619Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 5431515ec619Smrg then 5432515ec619Smrg # The compiler can only warn and ignore the option if not recognized 5433515ec619Smrg # So say no if there are warnings 5434515ec619Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5435515ec619Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5436515ec619Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5437515ec619Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5438515ec619Smrg fi 5439515ec619Smrg fi 5440515ec619Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 5441515ec619Smrg $RM conftest* 5442515ec619Smrg # SGI C++ compiler will create directory out/ii_files/ for 5443515ec619Smrg # template instantiation 5444515ec619Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5445515ec619Smrg $RM out/* && rmdir out 5446515ec619Smrg cd .. 5447515ec619Smrg $RM -r conftest 5448515ec619Smrg $RM conftest* 5449515ec619Smrg]) 5450515ec619Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5451515ec619Smrg [Does compiler simultaneously support -c and -o options?]) 5452515ec619Smrg])# _LT_COMPILER_C_O 54537a3b38f7Smrg 54547a3b38f7Smrg 5455515ec619Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5456515ec619Smrg# ---------------------------------- 5457515ec619Smrg# Check to see if we can do hard links to lock some files if needed 5458515ec619Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 5459515ec619Smrg[m4_require([_LT_ENABLE_LOCK])dnl 5460515ec619Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5461515ec619Smrg_LT_COMPILER_C_O([$1]) 54627a3b38f7Smrg 5463515ec619Smrghard_links=nottested 5464515ec619Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5465515ec619Smrg # do not overwrite the value of need_locks provided by the user 5466515ec619Smrg AC_MSG_CHECKING([if we can lock with hard links]) 5467515ec619Smrg hard_links=yes 5468515ec619Smrg $RM conftest* 5469515ec619Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5470515ec619Smrg touch conftest.a 5471515ec619Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 5472515ec619Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5473515ec619Smrg AC_MSG_RESULT([$hard_links]) 5474515ec619Smrg if test no = "$hard_links"; then 5475515ec619Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5476515ec619Smrg need_locks=warn 5477515ec619Smrg fi 5478515ec619Smrgelse 5479515ec619Smrg need_locks=no 5480515ec619Smrgfi 5481515ec619Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5482515ec619Smrg])# _LT_COMPILER_FILE_LOCKS 54837a3b38f7Smrg 54847a3b38f7Smrg 5485515ec619Smrg# _LT_CHECK_OBJDIR 5486515ec619Smrg# ---------------- 5487515ec619Smrgm4_defun([_LT_CHECK_OBJDIR], 5488515ec619Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5489515ec619Smrg[rm -f .libs 2>/dev/null 5490515ec619Smrgmkdir .libs 2>/dev/null 5491515ec619Smrgif test -d .libs; then 5492515ec619Smrg lt_cv_objdir=.libs 5493515ec619Smrgelse 5494515ec619Smrg # MS-DOS does not allow filenames that begin with a dot. 5495515ec619Smrg lt_cv_objdir=_libs 5496515ec619Smrgfi 5497515ec619Smrgrmdir .libs 2>/dev/null]) 5498515ec619Smrgobjdir=$lt_cv_objdir 5499515ec619Smrg_LT_DECL([], [objdir], [0], 5500515ec619Smrg [The name of the directory that contains temporary libtool files])dnl 5501515ec619Smrgm4_pattern_allow([LT_OBJDIR])dnl 5502515ec619SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5503515ec619Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 5504515ec619Smrg])# _LT_CHECK_OBJDIR 55057a3b38f7Smrg 5506862f5301Smrg 5507515ec619Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5508515ec619Smrg# -------------------------------------- 5509515ec619Smrg# Check hardcoding attributes. 5510515ec619Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5511515ec619Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5512515ec619Smrg_LT_TAGVAR(hardcode_action, $1)= 5513515ec619Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5514515ec619Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 5515515ec619Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 5516862f5301Smrg 5517515ec619Smrg # We can hardcode non-existent directories. 5518515ec619Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5519515ec619Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 5520515ec619Smrg # have to relink, otherwise we might link with an installed library 5521515ec619Smrg # when we should be linking with a yet-to-be-installed one 5522515ec619Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5523515ec619Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5524515ec619Smrg # Linking always hardcodes the temporary library directory. 5525515ec619Smrg _LT_TAGVAR(hardcode_action, $1)=relink 5526515ec619Smrg else 5527515ec619Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 5528515ec619Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 5529515ec619Smrg fi 5530515ec619Smrgelse 5531515ec619Smrg # We cannot hardcode anything, or else we can only hardcode existing 5532515ec619Smrg # directories. 5533515ec619Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 5534515ec619Smrgfi 5535515ec619SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5536862f5301Smrg 5537515ec619Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5538515ec619Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5539515ec619Smrg # Fast installation is not supported 5540515ec619Smrg enable_fast_install=no 5541515ec619Smrgelif test yes = "$shlibpath_overrides_runpath" || 5542515ec619Smrg test no = "$enable_shared"; then 5543515ec619Smrg # Fast installation is not necessary 5544515ec619Smrg enable_fast_install=needless 5545515ec619Smrgfi 5546515ec619Smrg_LT_TAGDECL([], [hardcode_action], [0], 5547515ec619Smrg [How to hardcode a shared library path into an executable]) 5548515ec619Smrg])# _LT_LINKER_HARDCODE_LIBPATH 5549862f5301Smrg 5550862f5301Smrg 5551515ec619Smrg# _LT_CMD_STRIPLIB 5552515ec619Smrg# ---------------- 5553515ec619Smrgm4_defun([_LT_CMD_STRIPLIB], 5554515ec619Smrg[m4_require([_LT_DECL_EGREP]) 5555515ec619Smrgstriplib= 5556515ec619Smrgold_striplib= 5557515ec619SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 5558515ec619Smrgif test -z "$STRIP"; then 5559515ec619Smrg AC_MSG_RESULT([no]) 5560515ec619Smrgelse 5561515ec619Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5562515ec619Smrg old_striplib="$STRIP --strip-debug" 5563515ec619Smrg striplib="$STRIP --strip-unneeded" 5564515ec619Smrg AC_MSG_RESULT([yes]) 5565515ec619Smrg else 5566515ec619Smrg case $host_os in 5567515ec619Smrg darwin*) 5568515ec619Smrg # FIXME - insert some real tests, host_os isn't really good enough 5569515ec619Smrg striplib="$STRIP -x" 5570515ec619Smrg old_striplib="$STRIP -S" 5571515ec619Smrg AC_MSG_RESULT([yes]) 5572515ec619Smrg ;; 5573515ec619Smrg freebsd*) 5574515ec619Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5575515ec619Smrg old_striplib="$STRIP --strip-debug" 5576515ec619Smrg striplib="$STRIP --strip-unneeded" 5577515ec619Smrg AC_MSG_RESULT([yes]) 5578515ec619Smrg else 5579515ec619Smrg AC_MSG_RESULT([no]) 5580515ec619Smrg fi 5581515ec619Smrg ;; 5582515ec619Smrg *) 5583515ec619Smrg AC_MSG_RESULT([no]) 5584515ec619Smrg ;; 5585515ec619Smrg esac 5586515ec619Smrg fi 5587515ec619Smrgfi 5588515ec619Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5589515ec619Smrg_LT_DECL([], [striplib], [1]) 5590515ec619Smrg])# _LT_CMD_STRIPLIB 5591862f5301Smrg 5592862f5301Smrg 5593515ec619Smrg# _LT_PREPARE_MUNGE_PATH_LIST 5594515ec619Smrg# --------------------------- 5595515ec619Smrg# Make sure func_munge_path_list() is defined correctly. 5596515ec619Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5597515ec619Smrg[[# func_munge_path_list VARIABLE PATH 5598515ec619Smrg# ----------------------------------- 5599515ec619Smrg# VARIABLE is name of variable containing _space_ separated list of 5600515ec619Smrg# directories to be munged by the contents of PATH, which is string 5601515ec619Smrg# having a format: 5602515ec619Smrg# "DIR[:DIR]:" 5603515ec619Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 5604515ec619Smrg# ":DIR[:DIR]" 5605515ec619Smrg# string "DIR[ DIR]" will be appended to VARIABLE 5606515ec619Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 5607515ec619Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5608515ec619Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 5609515ec619Smrg# "DIR[:DIR]" 5610515ec619Smrg# VARIABLE will be replaced by "DIR[ DIR]" 5611515ec619Smrgfunc_munge_path_list () 5612515ec619Smrg{ 5613515ec619Smrg case x@S|@2 in 5614515ec619Smrg x) 5615515ec619Smrg ;; 5616515ec619Smrg *:) 5617515ec619Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5618515ec619Smrg ;; 5619515ec619Smrg x:*) 5620515ec619Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5621515ec619Smrg ;; 5622515ec619Smrg *::*) 5623515ec619Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5624515ec619Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5625515ec619Smrg ;; 5626515ec619Smrg *) 5627515ec619Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5628515ec619Smrg ;; 5629515ec619Smrg esac 5630515ec619Smrg} 5631515ec619Smrg]])# _LT_PREPARE_PATH_LIST 5632862f5301Smrg 5633862f5301Smrg 5634515ec619Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 5635515ec619Smrg# ----------------------------- 5636515ec619Smrg# PORTME Fill in your ld.so characteristics 5637515ec619Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 5638515ec619Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5639515ec619Smrgm4_require([_LT_DECL_EGREP])dnl 5640515ec619Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5641515ec619Smrgm4_require([_LT_DECL_OBJDUMP])dnl 5642515ec619Smrgm4_require([_LT_DECL_SED])dnl 5643515ec619Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 5644515ec619Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5645515ec619SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 5646515ec619Smrgm4_if([$1], 5647515ec619Smrg [], [ 5648515ec619Smrgif test yes = "$GCC"; then 5649515ec619Smrg case $host_os in 5650515ec619Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5651515ec619Smrg *) lt_awk_arg='/^libraries:/' ;; 5652515ec619Smrg esac 5653515ec619Smrg case $host_os in 5654515ec619Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5655515ec619Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 5656515ec619Smrg esac 5657515ec619Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5658515ec619Smrg case $lt_search_path_spec in 5659515ec619Smrg *\;*) 5660515ec619Smrg # if the path contains ";" then we assume it to be the separator 5661515ec619Smrg # otherwise default to the standard path separator (i.e. ":") - it is 5662515ec619Smrg # assumed that no part of a normal pathname contains ";" but that should 5663515ec619Smrg # okay in the real world where ";" in dirpaths is itself problematic. 5664515ec619Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5665515ec619Smrg ;; 5666515ec619Smrg *) 5667515ec619Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5668515ec619Smrg ;; 5669515ec619Smrg esac 5670515ec619Smrg # Ok, now we have the path, separated by spaces, we can step through it 5671515ec619Smrg # and add multilib dir if necessary... 5672515ec619Smrg lt_tmp_lt_search_path_spec= 5673515ec619Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5674515ec619Smrg # ...but if some path component already ends with the multilib dir we assume 5675515ec619Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5676515ec619Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 5677515ec619Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5678515ec619Smrg lt_multi_os_dir= 5679515ec619Smrg ;; 5680515ec619Smrg esac 5681515ec619Smrg for lt_sys_path in $lt_search_path_spec; do 5682515ec619Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 5683515ec619Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5684515ec619Smrg elif test -n "$lt_multi_os_dir"; then 5685515ec619Smrg test -d "$lt_sys_path" && \ 5686515ec619Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5687515ec619Smrg fi 5688515ec619Smrg done 5689515ec619Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5690515ec619SmrgBEGIN {RS = " "; FS = "/|\n";} { 5691515ec619Smrg lt_foo = ""; 5692515ec619Smrg lt_count = 0; 5693515ec619Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 5694515ec619Smrg if ($lt_i != "" && $lt_i != ".") { 5695515ec619Smrg if ($lt_i == "..") { 5696515ec619Smrg lt_count++; 5697515ec619Smrg } else { 5698515ec619Smrg if (lt_count == 0) { 5699515ec619Smrg lt_foo = "/" $lt_i lt_foo; 5700515ec619Smrg } else { 5701515ec619Smrg lt_count--; 5702515ec619Smrg } 5703515ec619Smrg } 5704515ec619Smrg } 5705515ec619Smrg } 5706515ec619Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5707515ec619Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5708515ec619Smrg}'` 5709515ec619Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 5710515ec619Smrg # for these hosts. 5711515ec619Smrg case $host_os in 5712515ec619Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5713515ec619Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5714515ec619Smrg esac 5715515ec619Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5716515ec619Smrgelse 5717515ec619Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5718515ec619Smrgfi]) 5719515ec619Smrglibrary_names_spec= 5720515ec619Smrglibname_spec='lib$name' 5721515ec619Smrgsoname_spec= 5722515ec619Smrgshrext_cmds=.so 5723515ec619Smrgpostinstall_cmds= 5724515ec619Smrgpostuninstall_cmds= 5725515ec619Smrgfinish_cmds= 5726515ec619Smrgfinish_eval= 5727515ec619Smrgshlibpath_var= 5728515ec619Smrgshlibpath_overrides_runpath=unknown 5729515ec619Smrgversion_type=none 5730515ec619Smrgdynamic_linker="$host_os ld.so" 5731515ec619Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 5732515ec619Smrgneed_lib_prefix=unknown 5733515ec619Smrghardcode_into_libs=no 5734862f5301Smrg 5735515ec619Smrg# when you set need_version to no, make sure it does not cause -set_version 5736515ec619Smrg# flags to be left without arguments 5737515ec619Smrgneed_version=unknown 5738862f5301Smrg 5739515ec619SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5740515ec619Smrg[User-defined run-time library search path.]) 5741862f5301Smrg 5742515ec619Smrgcase $host_os in 5743515ec619Smrgaix3*) 5744515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 5745515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5746515ec619Smrg shlibpath_var=LIBPATH 5747862f5301Smrg 5748515ec619Smrg # AIX 3 has no versioning support, so we append a major version to the name. 5749515ec619Smrg soname_spec='$libname$release$shared_ext$major' 5750515ec619Smrg ;; 5751862f5301Smrg 5752515ec619Smrgaix[[4-9]]*) 5753515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 5754515ec619Smrg need_lib_prefix=no 5755515ec619Smrg need_version=no 5756515ec619Smrg hardcode_into_libs=yes 5757515ec619Smrg if test ia64 = "$host_cpu"; then 5758515ec619Smrg # AIX 5 supports IA64 5759515ec619Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5760515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 5761515ec619Smrg else 5762515ec619Smrg # With GCC up to 2.95.x, collect2 would create an import file 5763515ec619Smrg # for dependence libraries. The import file would start with 5764515ec619Smrg # the line '#! .'. This would cause the generated library to 5765515ec619Smrg # depend on '.', always an invalid library. This was fixed in 5766515ec619Smrg # development snapshots of GCC prior to 3.0. 5767515ec619Smrg case $host_os in 5768515ec619Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 5769515ec619Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5770515ec619Smrg echo ' yes ' 5771515ec619Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5772515ec619Smrg : 5773515ec619Smrg else 5774515ec619Smrg can_build_shared=no 5775515ec619Smrg fi 5776515ec619Smrg ;; 5777515ec619Smrg esac 5778515ec619Smrg # Using Import Files as archive members, it is possible to support 5779515ec619Smrg # filename-based versioning of shared library archives on AIX. While 5780515ec619Smrg # this would work for both with and without runtime linking, it will 5781515ec619Smrg # prevent static linking of such archives. So we do filename-based 5782515ec619Smrg # shared library versioning with .so extension only, which is used 5783515ec619Smrg # when both runtime linking and shared linking is enabled. 5784515ec619Smrg # Unfortunately, runtime linking may impact performance, so we do 5785515ec619Smrg # not want this to be the default eventually. Also, we use the 5786515ec619Smrg # versioned .so libs for executables only if there is the -brtl 5787515ec619Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5788515ec619Smrg # To allow for filename-based versioning support, we need to create 5789515ec619Smrg # libNAME.so.V as an archive file, containing: 5790515ec619Smrg # *) an Import File, referring to the versioned filename of the 5791515ec619Smrg # archive as well as the shared archive member, telling the 5792515ec619Smrg # bitwidth (32 or 64) of that shared object, and providing the 5793515ec619Smrg # list of exported symbols of that shared object, eventually 5794515ec619Smrg # decorated with the 'weak' keyword 5795515ec619Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 5796515ec619Smrg # it being seen by the linker. 5797515ec619Smrg # At run time we better use the real file rather than another symlink, 5798515ec619Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5799862f5301Smrg 5800515ec619Smrg case $with_aix_soname,$aix_use_runtimelinking in 5801515ec619Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5802515ec619Smrg # soname into executable. Probably we can add versioning support to 5803515ec619Smrg # collect2, so additional links can be useful in future. 5804515ec619Smrg aix,yes) # traditional libtool 5805515ec619Smrg dynamic_linker='AIX unversionable lib.so' 5806515ec619Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5807515ec619Smrg # instead of lib<name>.a to let people know that these are not 5808515ec619Smrg # typical AIX shared libraries. 5809515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5810515ec619Smrg ;; 5811515ec619Smrg aix,no) # traditional AIX only 5812515ec619Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5813515ec619Smrg # We preserve .a as extension for shared libraries through AIX4.2 5814515ec619Smrg # and later when we are not doing run time linking. 5815515ec619Smrg library_names_spec='$libname$release.a $libname.a' 5816515ec619Smrg soname_spec='$libname$release$shared_ext$major' 5817515ec619Smrg ;; 5818515ec619Smrg svr4,*) # full svr4 only 5819515ec619Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5820515ec619Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5821515ec619Smrg # We do not specify a path in Import Files, so LIBPATH fires. 5822515ec619Smrg shlibpath_overrides_runpath=yes 5823515ec619Smrg ;; 5824515ec619Smrg *,yes) # both, prefer svr4 5825515ec619Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5826515ec619Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5827515ec619Smrg # unpreferred sharedlib libNAME.a needs extra handling 5828515ec619Smrg 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"' 5829515ec619Smrg 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"' 5830515ec619Smrg # We do not specify a path in Import Files, so LIBPATH fires. 5831515ec619Smrg shlibpath_overrides_runpath=yes 5832515ec619Smrg ;; 5833515ec619Smrg *,no) # both, prefer aix 5834515ec619Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5835515ec619Smrg library_names_spec='$libname$release.a $libname.a' 5836515ec619Smrg soname_spec='$libname$release$shared_ext$major' 5837515ec619Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5838515ec619Smrg 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)' 5839515ec619Smrg 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"' 5840515ec619Smrg ;; 5841515ec619Smrg esac 5842515ec619Smrg shlibpath_var=LIBPATH 5843515ec619Smrg fi 5844515ec619Smrg ;; 5845862f5301Smrg 5846515ec619Smrgamigaos*) 5847515ec619Smrg case $host_cpu in 5848515ec619Smrg powerpc) 5849515ec619Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 5850515ec619Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5851515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5852515ec619Smrg ;; 5853515ec619Smrg m68k) 5854515ec619Smrg library_names_spec='$libname.ixlibrary $libname.a' 5855515ec619Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 5856515ec619Smrg 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' 5857515ec619Smrg ;; 5858515ec619Smrg esac 5859515ec619Smrg ;; 5860862f5301Smrg 5861515ec619Smrgbeos*) 5862515ec619Smrg library_names_spec='$libname$shared_ext' 5863515ec619Smrg dynamic_linker="$host_os ld.so" 5864515ec619Smrg shlibpath_var=LIBRARY_PATH 5865515ec619Smrg ;; 5866862f5301Smrg 5867515ec619Smrgbsdi[[45]]*) 5868515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 5869515ec619Smrg need_version=no 5870515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5871515ec619Smrg soname_spec='$libname$release$shared_ext$major' 5872515ec619Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5873515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 5874515ec619Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5875515ec619Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5876515ec619Smrg # the default ld.so.conf also contains /usr/contrib/lib and 5877515ec619Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5878515ec619Smrg # libtool to hard-code these into programs 5879515ec619Smrg ;; 5880862f5301Smrg 5881515ec619Smrgcygwin* | mingw* | pw32* | cegcc*) 5882515ec619Smrg version_type=windows 5883515ec619Smrg shrext_cmds=.dll 5884515ec619Smrg need_version=no 5885515ec619Smrg need_lib_prefix=no 5886862f5301Smrg 5887515ec619Smrg case $GCC,$cc_basename in 5888515ec619Smrg yes,*) 5889515ec619Smrg # gcc 5890515ec619Smrg library_names_spec='$libname.dll.a' 5891515ec619Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5892515ec619Smrg postinstall_cmds='base_file=`basename \$file`~ 5893515ec619Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5894515ec619Smrg dldir=$destdir/`dirname \$dlpath`~ 5895515ec619Smrg test -d \$dldir || mkdir -p \$dldir~ 5896515ec619Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 5897515ec619Smrg chmod a+x \$dldir/$dlname~ 5898515ec619Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5899515ec619Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5900515ec619Smrg fi' 5901515ec619Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5902515ec619Smrg dlpath=$dir/\$dldll~ 5903515ec619Smrg $RM \$dlpath' 5904515ec619Smrg shlibpath_overrides_runpath=yes 5905862f5301Smrg 5906515ec619Smrg case $host_os in 5907515ec619Smrg cygwin*) 5908515ec619Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5909515ec619Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5910515ec619Smrgm4_if([$1], [],[ 5911515ec619Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5912515ec619Smrg ;; 5913515ec619Smrg mingw* | cegcc*) 5914515ec619Smrg # MinGW DLLs use traditional 'lib' prefix 5915515ec619Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5916515ec619Smrg ;; 5917515ec619Smrg pw32*) 5918515ec619Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 5919515ec619Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5920515ec619Smrg ;; 5921515ec619Smrg esac 5922515ec619Smrg dynamic_linker='Win32 ld.exe' 5923515ec619Smrg ;; 5924862f5301Smrg 5925515ec619Smrg *,cl* | *,icl*) 5926515ec619Smrg # Native MSVC or ICC 5927515ec619Smrg libname_spec='$name' 5928515ec619Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5929515ec619Smrg library_names_spec='$libname.dll.lib' 5930862f5301Smrg 5931515ec619Smrg case $build_os in 5932515ec619Smrg mingw*) 5933515ec619Smrg sys_lib_search_path_spec= 5934515ec619Smrg lt_save_ifs=$IFS 5935515ec619Smrg IFS=';' 5936515ec619Smrg for lt_path in $LIB 5937515ec619Smrg do 5938515ec619Smrg IFS=$lt_save_ifs 5939515ec619Smrg # Let DOS variable expansion print the short 8.3 style file name. 5940515ec619Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 5941515ec619Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 5942515ec619Smrg done 5943515ec619Smrg IFS=$lt_save_ifs 5944515ec619Smrg # Convert to MSYS style. 5945515ec619Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 5946515ec619Smrg ;; 5947515ec619Smrg cygwin*) 5948515ec619Smrg # Convert to unix form, then to dos form, then back to unix form 5949515ec619Smrg # but this time dos style (no spaces!) so that the unix form looks 5950515ec619Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 5951515ec619Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 5952515ec619Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 5953515ec619Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5954515ec619Smrg ;; 5955515ec619Smrg *) 5956515ec619Smrg sys_lib_search_path_spec=$LIB 5957515ec619Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 5958515ec619Smrg # It is most probably a Windows format PATH. 5959515ec619Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 5960515ec619Smrg else 5961515ec619Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5962515ec619Smrg fi 5963515ec619Smrg # FIXME: find the short name or the path components, as spaces are 5964515ec619Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 5965515ec619Smrg ;; 5966515ec619Smrg esac 5967862f5301Smrg 5968515ec619Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5969515ec619Smrg postinstall_cmds='base_file=`basename \$file`~ 5970515ec619Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5971515ec619Smrg dldir=$destdir/`dirname \$dlpath`~ 5972515ec619Smrg test -d \$dldir || mkdir -p \$dldir~ 5973515ec619Smrg $install_prog $dir/$dlname \$dldir/$dlname' 5974515ec619Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5975515ec619Smrg dlpath=$dir/\$dldll~ 5976515ec619Smrg $RM \$dlpath' 5977515ec619Smrg shlibpath_overrides_runpath=yes 5978515ec619Smrg dynamic_linker='Win32 link.exe' 5979515ec619Smrg ;; 5980862f5301Smrg 5981515ec619Smrg *) 5982515ec619Smrg # Assume MSVC and ICC wrapper 5983515ec619Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 5984515ec619Smrg dynamic_linker='Win32 ld.exe' 5985515ec619Smrg ;; 5986515ec619Smrg esac 5987515ec619Smrg # FIXME: first we should search . and the directory the executable is in 5988515ec619Smrg shlibpath_var=PATH 5989515ec619Smrg ;; 5990862f5301Smrg 5991515ec619Smrgdarwin* | rhapsody*) 5992515ec619Smrg dynamic_linker="$host_os dyld" 5993515ec619Smrg version_type=darwin 5994515ec619Smrg need_lib_prefix=no 5995515ec619Smrg need_version=no 5996515ec619Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 5997515ec619Smrg soname_spec='$libname$release$major$shared_ext' 5998515ec619Smrg shlibpath_overrides_runpath=yes 5999515ec619Smrg shlibpath_var=DYLD_LIBRARY_PATH 6000515ec619Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6001515ec619Smrgm4_if([$1], [],[ 6002515ec619Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6003515ec619Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6004515ec619Smrg ;; 6005862f5301Smrg 6006515ec619Smrgdgux*) 6007515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6008515ec619Smrg need_lib_prefix=no 6009515ec619Smrg need_version=no 6010515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6011515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6012515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6013515ec619Smrg ;; 6014862f5301Smrg 6015515ec619Smrgfreebsd* | dragonfly* | midnightbsd*) 6016515ec619Smrg # DragonFly does not have aout. When/if they implement a new 6017515ec619Smrg # versioning mechanism, adjust this. 6018515ec619Smrg if test -x /usr/bin/objformat; then 6019515ec619Smrg objformat=`/usr/bin/objformat` 6020515ec619Smrg else 6021515ec619Smrg case $host_os in 6022515ec619Smrg freebsd[[23]].*) objformat=aout ;; 6023515ec619Smrg *) objformat=elf ;; 6024515ec619Smrg esac 6025515ec619Smrg fi 6026515ec619Smrg version_type=freebsd-$objformat 6027515ec619Smrg case $version_type in 6028515ec619Smrg freebsd-elf*) 6029515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6030515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6031515ec619Smrg need_version=no 6032515ec619Smrg need_lib_prefix=no 6033862f5301Smrg ;; 6034515ec619Smrg freebsd-*) 6035515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6036515ec619Smrg need_version=yes 6037862f5301Smrg ;; 6038515ec619Smrg esac 6039515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6040515ec619Smrg case $host_os in 6041515ec619Smrg freebsd2.*) 6042515ec619Smrg shlibpath_overrides_runpath=yes 6043515ec619Smrg ;; 6044515ec619Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6045515ec619Smrg shlibpath_overrides_runpath=yes 6046515ec619Smrg hardcode_into_libs=yes 6047515ec619Smrg ;; 6048515ec619Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6049515ec619Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6050515ec619Smrg shlibpath_overrides_runpath=no 6051515ec619Smrg hardcode_into_libs=yes 6052515ec619Smrg ;; 6053515ec619Smrg *) # from 4.6 on, and DragonFly 6054515ec619Smrg shlibpath_overrides_runpath=yes 6055515ec619Smrg hardcode_into_libs=yes 6056515ec619Smrg ;; 6057515ec619Smrg esac 6058515ec619Smrg ;; 6059862f5301Smrg 6060515ec619Smrghaiku*) 6061515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6062515ec619Smrg need_lib_prefix=no 6063515ec619Smrg need_version=no 6064515ec619Smrg dynamic_linker="$host_os runtime_loader" 6065515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6066515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6067515ec619Smrg shlibpath_var=LIBRARY_PATH 6068515ec619Smrg shlibpath_overrides_runpath=no 6069515ec619Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6070515ec619Smrg hardcode_into_libs=yes 6071515ec619Smrg ;; 6072862f5301Smrg 6073515ec619Smrghpux9* | hpux10* | hpux11*) 6074515ec619Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 6075515ec619Smrg # link against other versions. 6076515ec619Smrg version_type=sunos 6077515ec619Smrg need_lib_prefix=no 6078515ec619Smrg need_version=no 6079515ec619Smrg case $host_cpu in 6080515ec619Smrg ia64*) 6081515ec619Smrg shrext_cmds='.so' 6082515ec619Smrg hardcode_into_libs=yes 6083515ec619Smrg dynamic_linker="$host_os dld.so" 6084515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6085515ec619Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6086515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6087515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6088515ec619Smrg if test 32 = "$HPUX_IA64_MODE"; then 6089515ec619Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6090515ec619Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6091515ec619Smrg else 6092515ec619Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6093515ec619Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6094515ec619Smrg fi 6095515ec619Smrg ;; 6096515ec619Smrg hppa*64*) 6097515ec619Smrg shrext_cmds='.sl' 6098515ec619Smrg hardcode_into_libs=yes 6099515ec619Smrg dynamic_linker="$host_os dld.sl" 6100515ec619Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6101515ec619Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6102515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6103515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6104515ec619Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6105515ec619Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6106515ec619Smrg ;; 6107515ec619Smrg *) 6108515ec619Smrg shrext_cmds='.sl' 6109515ec619Smrg dynamic_linker="$host_os dld.sl" 6110515ec619Smrg shlibpath_var=SHLIB_PATH 6111515ec619Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6112515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6113515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6114515ec619Smrg ;; 6115515ec619Smrg esac 6116515ec619Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6117515ec619Smrg postinstall_cmds='chmod 555 $lib' 6118515ec619Smrg # or fails outright, so override atomically: 6119515ec619Smrg install_override_mode=555 6120515ec619Smrg ;; 6121515ec619Smrg 6122515ec619Smrginterix[[3-9]]*) 6123515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6124515ec619Smrg need_lib_prefix=no 6125515ec619Smrg need_version=no 6126515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6127515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6128515ec619Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6129515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6130515ec619Smrg shlibpath_overrides_runpath=no 6131515ec619Smrg hardcode_into_libs=yes 6132515ec619Smrg ;; 6133862f5301Smrg 6134515ec619Smrgirix5* | irix6* | nonstopux*) 6135515ec619Smrg case $host_os in 6136515ec619Smrg nonstopux*) version_type=nonstopux ;; 6137515ec619Smrg *) 6138515ec619Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 6139515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6140515ec619Smrg else 6141515ec619Smrg version_type=irix 6142515ec619Smrg fi ;; 6143515ec619Smrg esac 6144515ec619Smrg need_lib_prefix=no 6145515ec619Smrg need_version=no 6146515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6147515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6148515ec619Smrg case $host_os in 6149515ec619Smrg irix5* | nonstopux*) 6150515ec619Smrg libsuff= shlibsuff= 6151515ec619Smrg ;; 6152515ec619Smrg *) 6153515ec619Smrg case $LD in # libtool.m4 will add one of these switches to LD 6154515ec619Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6155515ec619Smrg libsuff= shlibsuff= libmagic=32-bit;; 6156515ec619Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6157515ec619Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6158515ec619Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6159515ec619Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6160515ec619Smrg *) libsuff= shlibsuff= libmagic=never-match;; 6161862f5301Smrg esac 6162515ec619Smrg ;; 6163515ec619Smrg esac 6164515ec619Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6165515ec619Smrg shlibpath_overrides_runpath=no 6166515ec619Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6167515ec619Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6168515ec619Smrg hardcode_into_libs=yes 6169515ec619Smrg ;; 6170862f5301Smrg 6171515ec619Smrg# No shared lib support for Linux oldld, aout, or coff. 6172515ec619Smrglinux*oldld* | linux*aout* | linux*coff*) 6173515ec619Smrg dynamic_linker=no 6174515ec619Smrg ;; 6175862f5301Smrg 6176515ec619Smrglinux*android*) 6177515ec619Smrg version_type=none # Android doesn't support versioned libraries. 6178515ec619Smrg need_lib_prefix=no 6179515ec619Smrg need_version=no 6180515ec619Smrg library_names_spec='$libname$release$shared_ext' 6181515ec619Smrg soname_spec='$libname$release$shared_ext' 6182515ec619Smrg finish_cmds= 6183515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6184515ec619Smrg shlibpath_overrides_runpath=yes 6185862f5301Smrg 6186515ec619Smrg # This implies no fast_install, which is unacceptable. 6187515ec619Smrg # Some rework will be needed to allow for fast_install 6188515ec619Smrg # before this can be enabled. 6189515ec619Smrg hardcode_into_libs=yes 6190862f5301Smrg 6191515ec619Smrg dynamic_linker='Android linker' 6192515ec619Smrg # Don't embed -rpath directories since the linker doesn't support them. 6193515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6194515ec619Smrg ;; 6195862f5301Smrg 6196515ec619Smrg# This must be glibc/ELF. 6197515ec619Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6198515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6199515ec619Smrg need_lib_prefix=no 6200515ec619Smrg need_version=no 6201515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6202515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6203515ec619Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6204515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6205515ec619Smrg shlibpath_overrides_runpath=no 6206862f5301Smrg 6207515ec619Smrg # Some binutils ld are patched to set DT_RUNPATH 6208515ec619Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6209515ec619Smrg [lt_cv_shlibpath_overrides_runpath=no 6210515ec619Smrg save_LDFLAGS=$LDFLAGS 6211515ec619Smrg save_libdir=$libdir 6212515ec619Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6213515ec619Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6214515ec619Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6215515ec619Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6216515ec619Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6217515ec619Smrg LDFLAGS=$save_LDFLAGS 6218515ec619Smrg libdir=$save_libdir 6219515ec619Smrg ]) 6220515ec619Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6221862f5301Smrg 6222515ec619Smrg # This implies no fast_install, which is unacceptable. 6223515ec619Smrg # Some rework will be needed to allow for fast_install 6224515ec619Smrg # before this can be enabled. 6225515ec619Smrg hardcode_into_libs=yes 6226862f5301Smrg 6227515ec619Smrg # Ideally, we could use ldconfig to report *all* directores which are 6228515ec619Smrg # searched for libraries, however this is still not possible. Aside from not 6229515ec619Smrg # being certain /sbin/ldconfig is available, command 6230515ec619Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6231515ec619Smrg # even though it is searched at run-time. Try to do the best guess by 6232515ec619Smrg # appending ld.so.conf contents (and includes) to the search path. 6233515ec619Smrg if test -f /etc/ld.so.conf; then 6234515ec619Smrg 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' ' '` 6235515ec619Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6236515ec619Smrg fi 62376fc0178dSmrg 6238515ec619Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6239515ec619Smrg # powerpc, because MkLinux only supported shared libraries with the 6240515ec619Smrg # GNU dynamic linker. Since this was broken with cross compilers, 6241515ec619Smrg # most powerpc-linux boxes support dynamic linking these days and 6242515ec619Smrg # people can always --disable-shared, the test was removed, and we 6243515ec619Smrg # assume the GNU/Linux dynamic linker is in use. 6244515ec619Smrg dynamic_linker='GNU/Linux ld.so' 6245515ec619Smrg ;; 6246862f5301Smrg 6247515ec619Smrgnetbsd*) 6248515ec619Smrg version_type=sunos 6249515ec619Smrg need_lib_prefix=no 6250515ec619Smrg need_version=no 6251515ec619Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6252515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6253515ec619Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6254515ec619Smrg dynamic_linker='NetBSD (a.out) ld.so' 6255515ec619Smrg else 6256515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6257515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6258515ec619Smrg dynamic_linker='NetBSD ld.elf_so' 6259515ec619Smrg fi 6260515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6261515ec619Smrg shlibpath_overrides_runpath=yes 6262515ec619Smrg hardcode_into_libs=yes 6263515ec619Smrg ;; 6264862f5301Smrg 6265515ec619Smrgnewsos6) 6266515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6267515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6268515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6269515ec619Smrg shlibpath_overrides_runpath=yes 6270515ec619Smrg ;; 6271862f5301Smrg 6272515ec619Smrg*nto* | *qnx*) 6273515ec619Smrg version_type=qnx 6274515ec619Smrg need_lib_prefix=no 6275515ec619Smrg need_version=no 6276515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6277515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6278515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6279515ec619Smrg shlibpath_overrides_runpath=no 6280515ec619Smrg hardcode_into_libs=yes 6281515ec619Smrg dynamic_linker='ldqnx.so' 6282515ec619Smrg ;; 6283862f5301Smrg 6284515ec619Smrgopenbsd* | bitrig*) 6285515ec619Smrg version_type=sunos 6286515ec619Smrg sys_lib_dlsearch_path_spec=/usr/lib 6287515ec619Smrg need_lib_prefix=no 6288515ec619Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6289515ec619Smrg need_version=no 6290515ec619Smrg else 6291515ec619Smrg need_version=yes 6292515ec619Smrg fi 6293515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6294515ec619Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6295515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6296515ec619Smrg shlibpath_overrides_runpath=yes 6297515ec619Smrg ;; 6298862f5301Smrg 6299515ec619Smrgos2*) 6300515ec619Smrg libname_spec='$name' 6301515ec619Smrg version_type=windows 6302515ec619Smrg shrext_cmds=.dll 6303515ec619Smrg need_version=no 6304515ec619Smrg need_lib_prefix=no 6305515ec619Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6306515ec619Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6307515ec619Smrg v=$($ECHO $release$versuffix | tr -d .-); 6308515ec619Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6309515ec619Smrg $ECHO $n$v`$shared_ext' 6310515ec619Smrg library_names_spec='${libname}_dll.$libext' 6311515ec619Smrg dynamic_linker='OS/2 ld.exe' 6312515ec619Smrg shlibpath_var=BEGINLIBPATH 6313515ec619Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6314515ec619Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6315515ec619Smrg postinstall_cmds='base_file=`basename \$file`~ 6316515ec619Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6317515ec619Smrg dldir=$destdir/`dirname \$dlpath`~ 6318515ec619Smrg test -d \$dldir || mkdir -p \$dldir~ 6319515ec619Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 6320515ec619Smrg chmod a+x \$dldir/$dlname~ 6321515ec619Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6322515ec619Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6323515ec619Smrg fi' 6324515ec619Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6325515ec619Smrg dlpath=$dir/\$dldll~ 6326515ec619Smrg $RM \$dlpath' 6327515ec619Smrg ;; 6328862f5301Smrg 6329515ec619Smrgosf3* | osf4* | osf5*) 6330515ec619Smrg version_type=osf 6331515ec619Smrg need_lib_prefix=no 6332515ec619Smrg need_version=no 6333515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6334515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6335515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6336515ec619Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6337515ec619Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6338515ec619Smrg ;; 6339862f5301Smrg 6340515ec619Smrgrdos*) 6341515ec619Smrg dynamic_linker=no 6342515ec619Smrg ;; 6343862f5301Smrg 6344515ec619Smrgsolaris*) 6345515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6346515ec619Smrg need_lib_prefix=no 6347515ec619Smrg need_version=no 6348515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6349515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6350515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6351515ec619Smrg shlibpath_overrides_runpath=yes 6352515ec619Smrg hardcode_into_libs=yes 6353515ec619Smrg # ldd complains unless libraries are executable 6354515ec619Smrg postinstall_cmds='chmod +x $lib' 6355515ec619Smrg ;; 6356862f5301Smrg 6357515ec619Smrgsunos4*) 6358515ec619Smrg version_type=sunos 6359515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6360515ec619Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6361515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6362515ec619Smrg shlibpath_overrides_runpath=yes 6363515ec619Smrg if test yes = "$with_gnu_ld"; then 6364515ec619Smrg need_lib_prefix=no 6365515ec619Smrg fi 6366515ec619Smrg need_version=yes 6367515ec619Smrg ;; 63687a3b38f7Smrg 6369515ec619Smrgsysv4 | sysv4.3*) 6370515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6371515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6372515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6373515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6374515ec619Smrg case $host_vendor in 6375515ec619Smrg sni) 6376515ec619Smrg shlibpath_overrides_runpath=no 6377515ec619Smrg need_lib_prefix=no 6378515ec619Smrg runpath_var=LD_RUN_PATH 6379515ec619Smrg ;; 6380515ec619Smrg siemens) 6381515ec619Smrg need_lib_prefix=no 6382515ec619Smrg ;; 6383515ec619Smrg motorola) 6384515ec619Smrg need_lib_prefix=no 6385515ec619Smrg need_version=no 6386515ec619Smrg shlibpath_overrides_runpath=no 6387515ec619Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6388515ec619Smrg ;; 6389515ec619Smrg esac 6390515ec619Smrg ;; 63917a3b38f7Smrg 6392515ec619Smrgsysv4*MP*) 6393515ec619Smrg if test -d /usr/nec; then 6394515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6395515ec619Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6396515ec619Smrg soname_spec='$libname$shared_ext.$major' 6397515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6398515ec619Smrg fi 6399515ec619Smrg ;; 6400515ec619Smrg 6401515ec619Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6402515ec619Smrg version_type=sco 6403515ec619Smrg need_lib_prefix=no 6404515ec619Smrg need_version=no 6405515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6406515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6407515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6408515ec619Smrg shlibpath_overrides_runpath=yes 6409515ec619Smrg hardcode_into_libs=yes 6410515ec619Smrg if test yes = "$with_gnu_ld"; then 6411515ec619Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6412515ec619Smrg else 6413515ec619Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6414515ec619Smrg case $host_os in 6415515ec619Smrg sco3.2v5*) 6416515ec619Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6417515ec619Smrg ;; 6418862f5301Smrg esac 6419515ec619Smrg fi 6420515ec619Smrg sys_lib_dlsearch_path_spec='/usr/lib' 6421515ec619Smrg ;; 64227a3b38f7Smrg 6423515ec619Smrgtpf*) 6424515ec619Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6425515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6426515ec619Smrg need_lib_prefix=no 6427515ec619Smrg need_version=no 6428515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6429515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6430515ec619Smrg shlibpath_overrides_runpath=no 6431515ec619Smrg hardcode_into_libs=yes 6432515ec619Smrg ;; 64337a3b38f7Smrg 6434515ec619Smrguts4*) 6435515ec619Smrg version_type=linux # correct to gnu/linux during the next big refactor 6436515ec619Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6437515ec619Smrg soname_spec='$libname$release$shared_ext$major' 6438515ec619Smrg shlibpath_var=LD_LIBRARY_PATH 6439515ec619Smrg ;; 64407a3b38f7Smrg 6441515ec619Smrg*) 6442515ec619Smrg dynamic_linker=no 6443862f5301Smrg ;; 6444862f5301Smrgesac 6445515ec619SmrgAC_MSG_RESULT([$dynamic_linker]) 6446515ec619Smrgtest no = "$dynamic_linker" && can_build_shared=no 64477a3b38f7Smrg 6448515ec619Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6449515ec619Smrgif test yes = "$GCC"; then 6450515ec619Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6451862f5301Smrgfi 64527a3b38f7Smrg 6453515ec619Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6454515ec619Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6455515ec619Smrgfi 64567a3b38f7Smrg 6457515ec619Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6458515ec619Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6459862f5301Smrgfi 6460862f5301Smrg 6461515ec619Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6462515ec619Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6463862f5301Smrg 6464515ec619Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6465515ec619Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 6466862f5301Smrg 6467515ec619Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6468515ec619Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6469862f5301Smrg 6470515ec619Smrg_LT_DECL([], [variables_saved_for_relink], [1], 6471515ec619Smrg [Variables whose values should be saved in libtool wrapper scripts and 6472515ec619Smrg restored at link time]) 6473515ec619Smrg_LT_DECL([], [need_lib_prefix], [0], 6474515ec619Smrg [Do we need the "lib" prefix for modules?]) 6475515ec619Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6476515ec619Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 6477515ec619Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6478515ec619Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6479515ec619Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 6480515ec619Smrg [Is shlibpath searched before the hard-coded library search path?]) 6481515ec619Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6482515ec619Smrg_LT_DECL([], [library_names_spec], [1], 6483515ec619Smrg [[List of archive names. First name is the real one, the rest are links. 6484515ec619Smrg The last name is the one that the linker finds with -lNAME]]) 6485515ec619Smrg_LT_DECL([], [soname_spec], [1], 6486515ec619Smrg [[The coded name of the library, if different from the real name]]) 6487515ec619Smrg_LT_DECL([], [install_override_mode], [1], 6488515ec619Smrg [Permission mode override for installation of shared libraries]) 6489515ec619Smrg_LT_DECL([], [postinstall_cmds], [2], 6490515ec619Smrg [Command to use after installation of a shared archive]) 6491515ec619Smrg_LT_DECL([], [postuninstall_cmds], [2], 6492515ec619Smrg [Command to use after uninstallation of a shared archive]) 6493515ec619Smrg_LT_DECL([], [finish_cmds], [2], 6494515ec619Smrg [Commands used to finish a libtool library installation in a directory]) 6495515ec619Smrg_LT_DECL([], [finish_eval], [1], 6496515ec619Smrg [[As "finish_cmds", except a single script fragment to be evaled but 6497515ec619Smrg not shown]]) 6498515ec619Smrg_LT_DECL([], [hardcode_into_libs], [0], 6499515ec619Smrg [Whether we should hardcode library paths into libraries]) 6500515ec619Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 6501515ec619Smrg [Compile-time system search path for libraries]) 6502515ec619Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6503515ec619Smrg [Detected run-time system search path for libraries]) 6504515ec619Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6505515ec619Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6506515ec619Smrg])# _LT_SYS_DYNAMIC_LINKER 6507862f5301Smrg 65087a3b38f7Smrg 6509515ec619Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 6510515ec619Smrg# -------------------------- 6511515ec619Smrg# find a file program that can recognize shared library 6512515ec619SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 6513515ec619Smrg[m4_require([_LT_DECL_EGREP])dnl 6514515ec619SmrgAC_MSG_CHECKING([for $1]) 6515515ec619SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6516515ec619Smrg[case $MAGIC_CMD in 6517515ec619Smrg[[\\/*] | ?:[\\/]*]) 6518515ec619Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6519515ec619Smrg ;; 6520515ec619Smrg*) 6521515ec619Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 6522515ec619Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6523515ec619Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 6524515ec619Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 6525515ec619Smrgdnl not every word. This closes a longstanding sh security hole. 6526515ec619Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 6527515ec619Smrg for ac_dir in $ac_dummy; do 6528515ec619Smrg IFS=$lt_save_ifs 6529515ec619Smrg test -z "$ac_dir" && ac_dir=. 6530515ec619Smrg if test -f "$ac_dir/$1"; then 6531515ec619Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6532515ec619Smrg if test -n "$file_magic_test_file"; then 6533515ec619Smrg case $deplibs_check_method in 6534515ec619Smrg "file_magic "*) 6535515ec619Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6536515ec619Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6537515ec619Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6538515ec619Smrg $EGREP "$file_magic_regex" > /dev/null; then 6539515ec619Smrg : 6540515ec619Smrg else 6541515ec619Smrg cat <<_LT_EOF 1>&2 65427a3b38f7Smrg 6543515ec619Smrg*** Warning: the command libtool uses to detect shared libraries, 6544515ec619Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 6545515ec619Smrg*** The result is that libtool may fail to recognize shared libraries 6546515ec619Smrg*** as such. This will affect the creation of libtool libraries that 6547515ec619Smrg*** depend on shared libraries, but programs linked with such libtool 6548515ec619Smrg*** libraries will work regardless of this problem. Nevertheless, you 6549515ec619Smrg*** may want to report the problem to your system manager and/or to 6550515ec619Smrg*** bug-libtool@gnu.org 65517a3b38f7Smrg 6552515ec619Smrg_LT_EOF 6553515ec619Smrg fi ;; 6554515ec619Smrg esac 6555515ec619Smrg fi 6556515ec619Smrg break 6557515ec619Smrg fi 6558515ec619Smrg done 6559515ec619Smrg IFS=$lt_save_ifs 6560515ec619Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 6561515ec619Smrg ;; 6562515ec619Smrgesac]) 6563515ec619SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 6564515ec619Smrgif test -n "$MAGIC_CMD"; then 6565515ec619Smrg AC_MSG_RESULT($MAGIC_CMD) 6566515ec619Smrgelse 6567515ec619Smrg AC_MSG_RESULT(no) 6568515ec619Smrgfi 6569515ec619Smrg_LT_DECL([], [MAGIC_CMD], [0], 6570515ec619Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6571515ec619Smrg])# _LT_PATH_TOOL_PREFIX 65727a3b38f7Smrg 6573515ec619Smrg# Old name: 6574515ec619SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6575515ec619Smrgdnl aclocal-1.4 backwards compatibility: 6576515ec619Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 65777a3b38f7Smrg 65787a3b38f7Smrg 6579515ec619Smrg# _LT_PATH_MAGIC 6580515ec619Smrg# -------------- 6581515ec619Smrg# find a file program that can recognize a shared library 6582515ec619Smrgm4_defun([_LT_PATH_MAGIC], 6583515ec619Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6584515ec619Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 6585515ec619Smrg if test -n "$ac_tool_prefix"; then 6586515ec619Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6587515ec619Smrg else 6588515ec619Smrg MAGIC_CMD=: 6589515ec619Smrg fi 6590515ec619Smrgfi 6591515ec619Smrg])# _LT_PATH_MAGIC 6592515ec619Smrg 6593515ec619Smrg 6594515ec619Smrg# LT_PATH_LD 6595515ec619Smrg# ---------- 6596515ec619Smrg# find the pathname to the GNU or non-GNU linker 6597515ec619SmrgAC_DEFUN([LT_PATH_LD], 6598515ec619Smrg[AC_REQUIRE([AC_PROG_CC])dnl 6599515ec619SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 6600515ec619SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 6601515ec619Smrgm4_require([_LT_DECL_SED])dnl 6602515ec619Smrgm4_require([_LT_DECL_EGREP])dnl 6603515ec619Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 66047a3b38f7Smrg 6605515ec619SmrgAC_ARG_WITH([gnu-ld], 6606515ec619Smrg [AS_HELP_STRING([--with-gnu-ld], 6607515ec619Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6608515ec619Smrg [test no = "$withval" || with_gnu_ld=yes], 6609515ec619Smrg [with_gnu_ld=no])dnl 66107a3b38f7Smrg 6611515ec619Smrgac_prog=ld 6612515ec619Smrgif test yes = "$GCC"; then 6613515ec619Smrg # Check if gcc -print-prog-name=ld gives a path. 6614515ec619Smrg AC_MSG_CHECKING([for ld used by $CC]) 6615515ec619Smrg case $host in 6616515ec619Smrg *-*-mingw*) 6617515ec619Smrg # gcc leaves a trailing carriage return, which upsets mingw 6618515ec619Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6619515ec619Smrg *) 6620515ec619Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6621515ec619Smrg esac 6622515ec619Smrg case $ac_prog in 6623515ec619Smrg # Accept absolute paths. 6624515ec619Smrg [[\\/]]* | ?:[[\\/]]*) 6625515ec619Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 6626515ec619Smrg # Canonicalize the pathname of ld 6627515ec619Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6628515ec619Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6629515ec619Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6630515ec619Smrg done 6631515ec619Smrg test -z "$LD" && LD=$ac_prog 6632515ec619Smrg ;; 6633515ec619Smrg "") 6634515ec619Smrg # If it fails, then pretend we aren't using GCC. 6635515ec619Smrg ac_prog=ld 6636515ec619Smrg ;; 6637515ec619Smrg *) 6638515ec619Smrg # If it is relative, then search for the first ld in PATH. 6639515ec619Smrg with_gnu_ld=unknown 6640515ec619Smrg ;; 6641515ec619Smrg esac 6642515ec619Smrgelif test yes = "$with_gnu_ld"; then 6643515ec619Smrg AC_MSG_CHECKING([for GNU ld]) 6644515ec619Smrgelse 6645515ec619Smrg AC_MSG_CHECKING([for non-GNU ld]) 6646515ec619Smrgfi 6647515ec619SmrgAC_CACHE_VAL(lt_cv_path_LD, 6648515ec619Smrg[if test -z "$LD"; then 6649515ec619Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6650515ec619Smrg for ac_dir in $PATH; do 6651515ec619Smrg IFS=$lt_save_ifs 6652515ec619Smrg test -z "$ac_dir" && ac_dir=. 6653515ec619Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6654515ec619Smrg lt_cv_path_LD=$ac_dir/$ac_prog 6655515ec619Smrg # Check to see if the program is GNU ld. I'd rather use --version, 6656515ec619Smrg # but apparently some variants of GNU ld only accept -v. 6657515ec619Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 6658515ec619Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6659515ec619Smrg *GNU* | *'with BFD'*) 6660515ec619Smrg test no != "$with_gnu_ld" && break 6661515ec619Smrg ;; 6662515ec619Smrg *) 6663515ec619Smrg test yes != "$with_gnu_ld" && break 6664515ec619Smrg ;; 6665515ec619Smrg esac 6666515ec619Smrg fi 6667515ec619Smrg done 6668515ec619Smrg IFS=$lt_save_ifs 6669515ec619Smrgelse 6670515ec619Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 6671515ec619Smrgfi]) 6672515ec619SmrgLD=$lt_cv_path_LD 6673515ec619Smrgif test -n "$LD"; then 6674515ec619Smrg AC_MSG_RESULT($LD) 6675515ec619Smrgelse 6676515ec619Smrg AC_MSG_RESULT(no) 6677515ec619Smrgfi 6678515ec619Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6679515ec619Smrg_LT_PATH_LD_GNU 6680515ec619SmrgAC_SUBST([LD]) 66817a3b38f7Smrg 6682515ec619Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6683515ec619Smrg])# LT_PATH_LD 66847a3b38f7Smrg 6685515ec619Smrg# Old names: 6686515ec619SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6687515ec619SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6688515ec619Smrgdnl aclocal-1.4 backwards compatibility: 6689515ec619Smrgdnl AC_DEFUN([AM_PROG_LD], []) 6690515ec619Smrgdnl AC_DEFUN([AC_PROG_LD], []) 66917a3b38f7Smrg 66927a3b38f7Smrg 6693515ec619Smrg# _LT_PATH_LD_GNU 6694515ec619Smrg#- -------------- 6695515ec619Smrgm4_defun([_LT_PATH_LD_GNU], 6696515ec619Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6697515ec619Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6698515ec619Smrgcase `$LD -v 2>&1 </dev/null` in 6699515ec619Smrg*GNU* | *'with BFD'*) 6700515ec619Smrg lt_cv_prog_gnu_ld=yes 6701515ec619Smrg ;; 6702515ec619Smrg*) 6703515ec619Smrg lt_cv_prog_gnu_ld=no 6704515ec619Smrg ;; 6705515ec619Smrgesac]) 6706515ec619Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 6707515ec619Smrg])# _LT_PATH_LD_GNU 67087a3b38f7Smrg 67097a3b38f7Smrg 6710515ec619Smrg# _LT_CMD_RELOAD 6711515ec619Smrg# -------------- 6712515ec619Smrg# find reload flag for linker 6713515ec619Smrg# -- PORTME Some linkers may need a different reload flag. 6714515ec619Smrgm4_defun([_LT_CMD_RELOAD], 6715515ec619Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 6716515ec619Smrg lt_cv_ld_reload_flag, 6717515ec619Smrg [lt_cv_ld_reload_flag='-r']) 6718515ec619Smrgreload_flag=$lt_cv_ld_reload_flag 6719515ec619Smrgcase $reload_flag in 6720515ec619Smrg"" | " "*) ;; 6721515ec619Smrg*) reload_flag=" $reload_flag" ;; 6722515ec619Smrgesac 6723515ec619Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 6724515ec619Smrgcase $host_os in 6725515ec619Smrg cygwin* | mingw* | pw32* | cegcc*) 6726515ec619Smrg if test yes != "$GCC"; then 6727515ec619Smrg reload_cmds=false 6728515ec619Smrg fi 6729515ec619Smrg ;; 6730515ec619Smrg darwin*) 6731515ec619Smrg if test yes = "$GCC"; then 6732515ec619Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6733515ec619Smrg else 6734515ec619Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 6735515ec619Smrg fi 6736515ec619Smrg ;; 6737515ec619Smrgesac 6738515ec619Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6739515ec619Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 6740515ec619Smrg])# _LT_CMD_RELOAD 67417a3b38f7Smrg 6742862f5301Smrg 6743515ec619Smrg# _LT_PATH_DD 6744515ec619Smrg# ----------- 6745515ec619Smrg# find a working dd 6746515ec619Smrgm4_defun([_LT_PATH_DD], 6747515ec619Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6748515ec619Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6749515ec619Smrgcat conftest.i conftest.i >conftest2.i 6750515ec619Smrg: ${lt_DD:=$DD} 6751515ec619SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6752515ec619Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6753515ec619Smrg cmp -s conftest.i conftest.out \ 6754515ec619Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6755515ec619Smrgfi]) 6756515ec619Smrgrm -f conftest.i conftest2.i conftest.out]) 6757515ec619Smrg])# _LT_PATH_DD 6758862f5301Smrg 6759862f5301Smrg 6760515ec619Smrg# _LT_CMD_TRUNCATE 6761515ec619Smrg# ---------------- 6762515ec619Smrg# find command to truncate a binary pipe 6763515ec619Smrgm4_defun([_LT_CMD_TRUNCATE], 6764515ec619Smrg[m4_require([_LT_PATH_DD]) 6765515ec619SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6766515ec619Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6767515ec619Smrgcat conftest.i conftest.i >conftest2.i 6768515ec619Smrglt_cv_truncate_bin= 6769515ec619Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6770515ec619Smrg cmp -s conftest.i conftest.out \ 6771515ec619Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6772515ec619Smrgfi 6773515ec619Smrgrm -f conftest.i conftest2.i conftest.out 6774515ec619Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6775515ec619Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6776515ec619Smrg [Command to truncate a binary pipe]) 6777515ec619Smrg])# _LT_CMD_TRUNCATE 6778862f5301Smrg 6779862f5301Smrg 6780515ec619Smrg# _LT_CHECK_MAGIC_METHOD 6781515ec619Smrg# ---------------------- 6782515ec619Smrg# how to check for library dependencies 6783515ec619Smrg# -- PORTME fill in with the dynamic library characteristics 6784515ec619Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 6785515ec619Smrg[m4_require([_LT_DECL_EGREP]) 6786515ec619Smrgm4_require([_LT_DECL_OBJDUMP]) 6787515ec619SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 6788515ec619Smrglt_cv_deplibs_check_method, 6789515ec619Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 6790515ec619Smrglt_cv_file_magic_test_file= 6791515ec619Smrglt_cv_deplibs_check_method='unknown' 6792515ec619Smrg# Need to set the preceding variable on all platforms that support 6793515ec619Smrg# interlibrary dependencies. 6794515ec619Smrg# 'none' -- dependencies not supported. 6795515ec619Smrg# 'unknown' -- same as none, but documents that we really don't know. 6796515ec619Smrg# 'pass_all' -- all dependencies passed with no checks. 6797515ec619Smrg# 'test_compile' -- check by making test program. 6798515ec619Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 6799515ec619Smrg# that responds to the $file_magic_cmd with a given extended regex. 6800515ec619Smrg# If you have 'file' or equivalent on your system and you're not sure 6801515ec619Smrg# whether 'pass_all' will *always* work, you probably want this one. 6802515ec619Smrg 6803515ec619Smrgcase $host_os in 6804515ec619Smrgaix[[4-9]]*) 6805515ec619Smrg lt_cv_deplibs_check_method=pass_all 6806515ec619Smrg ;; 68077a3b38f7Smrg 6808515ec619Smrgbeos*) 6809515ec619Smrg lt_cv_deplibs_check_method=pass_all 6810515ec619Smrg ;; 68117a3b38f7Smrg 6812515ec619Smrgbsdi[[45]]*) 6813515ec619Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6814515ec619Smrg lt_cv_file_magic_cmd='$FILECMD -L' 6815515ec619Smrg lt_cv_file_magic_test_file=/shlib/libc.so 6816515ec619Smrg ;; 68177a3b38f7Smrg 6818515ec619Smrgcygwin*) 6819515ec619Smrg # func_win32_libid is a shell function defined in ltmain.sh 6820515ec619Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6821515ec619Smrg lt_cv_file_magic_cmd='func_win32_libid' 6822515ec619Smrg ;; 68237a3b38f7Smrg 6824515ec619Smrgmingw* | pw32*) 6825515ec619Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 6826515ec619Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 6827515ec619Smrg # unless we find 'file', for example because we are cross-compiling. 6828515ec619Smrg if ( file / ) >/dev/null 2>&1; then 6829515ec619Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6830515ec619Smrg lt_cv_file_magic_cmd='func_win32_libid' 6831515ec619Smrg else 6832515ec619Smrg # Keep this pattern in sync with the one in func_win32_libid. 6833515ec619Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6834515ec619Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6835515ec619Smrg fi 6836515ec619Smrg ;; 68377a3b38f7Smrg 6838515ec619Smrgcegcc*) 6839515ec619Smrg # use the weaker test based on 'objdump'. See mingw*. 6840515ec619Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6841515ec619Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6842515ec619Smrg ;; 6843862f5301Smrg 6844515ec619Smrgdarwin* | rhapsody*) 6845515ec619Smrg lt_cv_deplibs_check_method=pass_all 6846515ec619Smrg ;; 68477a3b38f7Smrg 6848515ec619Smrgfreebsd* | dragonfly* | midnightbsd*) 6849515ec619Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6850515ec619Smrg case $host_cpu in 6851515ec619Smrg i*86 ) 6852515ec619Smrg # Not sure whether the presence of OpenBSD here was a mistake. 6853515ec619Smrg # Let's accept both of them until this is cleared up. 6854515ec619Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6855515ec619Smrg lt_cv_file_magic_cmd=$FILECMD 6856515ec619Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6857515ec619Smrg ;; 6858515ec619Smrg esac 6859515ec619Smrg else 6860515ec619Smrg lt_cv_deplibs_check_method=pass_all 6861515ec619Smrg fi 6862515ec619Smrg ;; 68637a3b38f7Smrg 6864515ec619Smrghaiku*) 6865515ec619Smrg lt_cv_deplibs_check_method=pass_all 6866515ec619Smrg ;; 68677a3b38f7Smrg 6868515ec619Smrghpux10.20* | hpux11*) 6869515ec619Smrg lt_cv_file_magic_cmd=$FILECMD 6870515ec619Smrg case $host_cpu in 6871515ec619Smrg ia64*) 6872515ec619Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6873515ec619Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6874515ec619Smrg ;; 6875515ec619Smrg hppa*64*) 6876515ec619Smrg [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]'] 6877515ec619Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6878515ec619Smrg ;; 6879515ec619Smrg *) 6880515ec619Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6881515ec619Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 6882515ec619Smrg ;; 6883515ec619Smrg esac 6884515ec619Smrg ;; 68857a3b38f7Smrg 6886515ec619Smrginterix[[3-9]]*) 6887515ec619Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6888515ec619Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6889515ec619Smrg ;; 6890862f5301Smrg 6891515ec619Smrgirix5* | irix6* | nonstopux*) 6892515ec619Smrg case $LD in 6893515ec619Smrg *-32|*"-32 ") libmagic=32-bit;; 6894515ec619Smrg *-n32|*"-n32 ") libmagic=N32;; 6895515ec619Smrg *-64|*"-64 ") libmagic=64-bit;; 6896515ec619Smrg *) libmagic=never-match;; 6897515ec619Smrg esac 6898515ec619Smrg lt_cv_deplibs_check_method=pass_all 6899515ec619Smrg ;; 6900862f5301Smrg 6901515ec619Smrg# This must be glibc/ELF. 6902515ec619Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6903515ec619Smrg lt_cv_deplibs_check_method=pass_all 6904515ec619Smrg ;; 6905862f5301Smrg 6906515ec619Smrgnetbsd*) 6907515ec619Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6908515ec619Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6909515ec619Smrg else 6910515ec619Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 6911515ec619Smrg fi 6912515ec619Smrg ;; 6913862f5301Smrg 6914515ec619Smrgnewos6*) 6915515ec619Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 6916515ec619Smrg lt_cv_file_magic_cmd=$FILECMD 6917515ec619Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 6918515ec619Smrg ;; 6919862f5301Smrg 6920515ec619Smrg*nto* | *qnx*) 6921515ec619Smrg lt_cv_deplibs_check_method=pass_all 6922515ec619Smrg ;; 6923862f5301Smrg 6924515ec619Smrgopenbsd* | bitrig*) 6925515ec619Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6926515ec619Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6927515ec619Smrg else 6928515ec619Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6929515ec619Smrg fi 6930515ec619Smrg ;; 6931862f5301Smrg 6932515ec619Smrgosf3* | osf4* | osf5*) 6933515ec619Smrg lt_cv_deplibs_check_method=pass_all 6934515ec619Smrg ;; 6935862f5301Smrg 6936515ec619Smrgrdos*) 6937515ec619Smrg lt_cv_deplibs_check_method=pass_all 6938515ec619Smrg ;; 6939862f5301Smrg 6940515ec619Smrgsolaris*) 6941515ec619Smrg lt_cv_deplibs_check_method=pass_all 6942515ec619Smrg ;; 6943862f5301Smrg 6944515ec619Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6945515ec619Smrg lt_cv_deplibs_check_method=pass_all 6946515ec619Smrg ;; 6947862f5301Smrg 6948515ec619Smrgsysv4 | sysv4.3*) 6949515ec619Smrg case $host_vendor in 6950515ec619Smrg motorola) 6951515ec619Smrg 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]]' 6952515ec619Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 6953515ec619Smrg ;; 6954515ec619Smrg ncr) 6955515ec619Smrg lt_cv_deplibs_check_method=pass_all 6956515ec619Smrg ;; 6957515ec619Smrg sequent) 6958515ec619Smrg lt_cv_file_magic_cmd='/bin/file' 6959515ec619Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 6960515ec619Smrg ;; 6961515ec619Smrg sni) 6962515ec619Smrg lt_cv_file_magic_cmd='/bin/file' 6963515ec619Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 6964515ec619Smrg lt_cv_file_magic_test_file=/lib/libc.so 6965515ec619Smrg ;; 6966515ec619Smrg siemens) 6967515ec619Smrg lt_cv_deplibs_check_method=pass_all 6968515ec619Smrg ;; 6969515ec619Smrg pc) 6970515ec619Smrg lt_cv_deplibs_check_method=pass_all 6971515ec619Smrg ;; 6972515ec619Smrg esac 6973515ec619Smrg ;; 6974862f5301Smrg 6975515ec619Smrgtpf*) 6976515ec619Smrg lt_cv_deplibs_check_method=pass_all 6977515ec619Smrg ;; 6978515ec619Smrgos2*) 6979515ec619Smrg lt_cv_deplibs_check_method=pass_all 6980515ec619Smrg ;; 6981515ec619Smrgesac 6982515ec619Smrg]) 6983862f5301Smrg 6984515ec619Smrgfile_magic_glob= 6985515ec619Smrgwant_nocaseglob=no 6986515ec619Smrgif test "$build" = "$host"; then 6987515ec619Smrg case $host_os in 6988515ec619Smrg mingw* | pw32*) 6989515ec619Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 6990515ec619Smrg want_nocaseglob=yes 6991515ec619Smrg else 6992515ec619Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 6993515ec619Smrg fi 6994515ec619Smrg ;; 6995515ec619Smrg esac 6996515ec619Smrgfi 6997862f5301Smrg 6998515ec619Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 6999515ec619Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 7000515ec619Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 7001862f5301Smrg 7002515ec619Smrg_LT_DECL([], [deplibs_check_method], [1], 7003515ec619Smrg [Method to check whether dependent libraries are shared objects]) 7004515ec619Smrg_LT_DECL([], [file_magic_cmd], [1], 7005515ec619Smrg [Command to use when deplibs_check_method = "file_magic"]) 7006515ec619Smrg_LT_DECL([], [file_magic_glob], [1], 7007515ec619Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 7008515ec619Smrg_LT_DECL([], [want_nocaseglob], [1], 7009515ec619Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7010515ec619Smrg])# _LT_CHECK_MAGIC_METHOD 7011862f5301Smrg 7012862f5301Smrg 7013515ec619Smrg# LT_PATH_NM 7014515ec619Smrg# ---------- 7015515ec619Smrg# find the pathname to a BSD- or MS-compatible name lister 7016515ec619SmrgAC_DEFUN([LT_PATH_NM], 7017515ec619Smrg[AC_REQUIRE([AC_PROG_CC])dnl 7018515ec619SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7019515ec619Smrg[if test -n "$NM"; then 7020515ec619Smrg # Let the user override the test. 7021515ec619Smrg lt_cv_path_NM=$NM 7022515ec619Smrgelse 7023515ec619Smrg lt_nm_to_check=${ac_tool_prefix}nm 7024515ec619Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7025515ec619Smrg lt_nm_to_check="$lt_nm_to_check nm" 7026515ec619Smrg fi 7027515ec619Smrg for lt_tmp_nm in $lt_nm_to_check; do 7028515ec619Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7029515ec619Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7030515ec619Smrg IFS=$lt_save_ifs 7031515ec619Smrg test -z "$ac_dir" && ac_dir=. 7032515ec619Smrg tmp_nm=$ac_dir/$lt_tmp_nm 7033515ec619Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7034515ec619Smrg # Check to see if the nm accepts a BSD-compat flag. 7035515ec619Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7036515ec619Smrg # nm: unknown option "B" ignored 7037515ec619Smrg # Tru64's nm complains that /dev/null is an invalid object file 7038515ec619Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7039515ec619Smrg case $build_os in 7040515ec619Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7041515ec619Smrg *) lt_bad_file=/dev/null ;; 7042515ec619Smrg esac 7043515ec619Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7044515ec619Smrg *$lt_bad_file* | *'Invalid file or object type'*) 7045515ec619Smrg lt_cv_path_NM="$tmp_nm -B" 7046515ec619Smrg break 2 7047515ec619Smrg ;; 7048515ec619Smrg *) 7049515ec619Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7050515ec619Smrg */dev/null*) 7051515ec619Smrg lt_cv_path_NM="$tmp_nm -p" 7052515ec619Smrg break 2 7053515ec619Smrg ;; 7054515ec619Smrg *) 7055515ec619Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7056515ec619Smrg continue # so that we can try to find one that supports BSD flags 7057515ec619Smrg ;; 7058515ec619Smrg esac 7059515ec619Smrg ;; 7060515ec619Smrg esac 7061515ec619Smrg fi 7062515ec619Smrg done 7063515ec619Smrg IFS=$lt_save_ifs 7064515ec619Smrg done 7065515ec619Smrg : ${lt_cv_path_NM=no} 7066515ec619Smrgfi]) 7067515ec619Smrgif test no != "$lt_cv_path_NM"; then 7068515ec619Smrg NM=$lt_cv_path_NM 7069515ec619Smrgelse 7070515ec619Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 7071515ec619Smrg if test -n "$DUMPBIN"; then : 7072515ec619Smrg # Let the user override the test. 7073515ec619Smrg else 7074515ec619Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7075515ec619Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7076515ec619Smrg *COFF*) 7077515ec619Smrg DUMPBIN="$DUMPBIN -symbols -headers" 7078515ec619Smrg ;; 7079515ec619Smrg *) 7080515ec619Smrg DUMPBIN=: 7081515ec619Smrg ;; 7082515ec619Smrg esac 7083515ec619Smrg fi 7084515ec619Smrg AC_SUBST([DUMPBIN]) 7085515ec619Smrg if test : != "$DUMPBIN"; then 7086515ec619Smrg NM=$DUMPBIN 7087515ec619Smrg fi 7088515ec619Smrgfi 7089515ec619Smrgtest -z "$NM" && NM=nm 7090515ec619SmrgAC_SUBST([NM]) 7091515ec619Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7092862f5301Smrg 7093515ec619SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7094515ec619Smrg [lt_cv_nm_interface="BSD nm" 7095515ec619Smrg echo "int some_variable = 0;" > conftest.$ac_ext 7096515ec619Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7097515ec619Smrg (eval "$ac_compile" 2>conftest.err) 7098515ec619Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7099515ec619Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7100515ec619Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7101515ec619Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7102515ec619Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7103515ec619Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 7104515ec619Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7105515ec619Smrg lt_cv_nm_interface="MS dumpbin" 7106515ec619Smrg fi 7107515ec619Smrg rm -f conftest*]) 7108515ec619Smrg])# LT_PATH_NM 7109862f5301Smrg 7110515ec619Smrg# Old names: 7111515ec619SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7112515ec619SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7113515ec619Smrgdnl aclocal-1.4 backwards compatibility: 7114515ec619Smrgdnl AC_DEFUN([AM_PROG_NM], []) 7115515ec619Smrgdnl AC_DEFUN([AC_PROG_NM], []) 7116fc544a13Smrg 7117515ec619Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7118515ec619Smrg# -------------------------------- 7119515ec619Smrg# how to determine the name of the shared library 7120515ec619Smrg# associated with a specific link library. 7121515ec619Smrg# -- PORTME fill in with the dynamic library characteristics 7122515ec619Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7123515ec619Smrg[m4_require([_LT_DECL_EGREP]) 7124515ec619Smrgm4_require([_LT_DECL_OBJDUMP]) 7125515ec619Smrgm4_require([_LT_DECL_DLLTOOL]) 7126515ec619SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7127515ec619Smrglt_cv_sharedlib_from_linklib_cmd, 7128515ec619Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7129fc544a13Smrg 7130515ec619Smrgcase $host_os in 7131515ec619Smrgcygwin* | mingw* | pw32* | cegcc*) 7132515ec619Smrg # two different shell functions defined in ltmain.sh; 7133515ec619Smrg # decide which one to use based on capabilities of $DLLTOOL 7134515ec619Smrg case `$DLLTOOL --help 2>&1` in 7135515ec619Smrg *--identify-strict*) 7136515ec619Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7137515ec619Smrg ;; 7138515ec619Smrg *) 7139515ec619Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7140515ec619Smrg ;; 7141515ec619Smrg esac 7142515ec619Smrg ;; 7143515ec619Smrg*) 7144515ec619Smrg # fallback: assume linklib IS sharedlib 7145515ec619Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7146515ec619Smrg ;; 7147515ec619Smrgesac 7148515ec619Smrg]) 7149515ec619Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7150515ec619Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7151fc544a13Smrg 7152515ec619Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7153515ec619Smrg [Command to associate shared and link libraries]) 7154515ec619Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7155fc544a13Smrg 7156fc544a13Smrg 7157515ec619Smrg# _LT_PATH_MANIFEST_TOOL 7158515ec619Smrg# ---------------------- 7159515ec619Smrg# locate the manifest tool 7160515ec619Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7161515ec619Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7162515ec619Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7163515ec619SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7164515ec619Smrg [lt_cv_path_mainfest_tool=no 7165515ec619Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7166515ec619Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7167515ec619Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7168515ec619Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7169515ec619Smrg lt_cv_path_mainfest_tool=yes 7170515ec619Smrg fi 7171515ec619Smrg rm -f conftest*]) 7172515ec619Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 7173515ec619Smrg MANIFEST_TOOL=: 7174515ec619Smrgfi 7175515ec619Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7176515ec619Smrg])# _LT_PATH_MANIFEST_TOOL 7177fc544a13Smrg 7178fc544a13Smrg 7179515ec619Smrg# _LT_DLL_DEF_P([FILE]) 7180515ec619Smrg# --------------------- 7181515ec619Smrg# True iff FILE is a Windows DLL '.def' file. 7182515ec619Smrg# Keep in sync with func_dll_def_p in the libtool script 7183515ec619SmrgAC_DEFUN([_LT_DLL_DEF_P], 7184515ec619Smrg[dnl 7185515ec619Smrg test DEF = "`$SED -n dnl 7186515ec619Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7187515ec619Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7188515ec619Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7189515ec619Smrg -e q dnl Only consider the first "real" line 7190515ec619Smrg $1`" dnl 7191515ec619Smrg])# _LT_DLL_DEF_P 7192fc544a13Smrg 7193fc544a13Smrg 7194515ec619Smrg# LT_LIB_M 7195515ec619Smrg# -------- 7196515ec619Smrg# check for math library 7197515ec619SmrgAC_DEFUN([LT_LIB_M], 7198515ec619Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7199515ec619SmrgLIBM= 7200515ec619Smrgcase $host in 7201515ec619Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7202515ec619Smrg # These system don't have libm, or don't need it 7203515ec619Smrg ;; 7204515ec619Smrg*-ncr-sysv4.3*) 7205515ec619Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7206515ec619Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7207515ec619Smrg ;; 7208515ec619Smrg*) 7209515ec619Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7210515ec619Smrg ;; 7211515ec619Smrgesac 7212515ec619SmrgAC_SUBST([LIBM]) 7213515ec619Smrg])# LT_LIB_M 7214fc544a13Smrg 7215515ec619Smrg# Old name: 7216515ec619SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7217515ec619Smrgdnl aclocal-1.4 backwards compatibility: 7218515ec619Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7219fc544a13Smrg 7220fc544a13Smrg 7221515ec619Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7222515ec619Smrg# ------------------------------- 7223515ec619Smrgm4_defun([_LT_COMPILER_NO_RTTI], 7224515ec619Smrg[m4_require([_LT_TAG_COMPILER])dnl 7225fc544a13Smrg 7226515ec619Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7227fc544a13Smrg 7228515ec619Smrgif test yes = "$GCC"; then 7229515ec619Smrg case $cc_basename in 7230515ec619Smrg nvcc*) 7231515ec619Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7232515ec619Smrg *) 7233515ec619Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7234515ec619Smrg esac 7235fc544a13Smrg 7236515ec619Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7237515ec619Smrg lt_cv_prog_compiler_rtti_exceptions, 7238515ec619Smrg [-fno-rtti -fno-exceptions], [], 7239515ec619Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7240515ec619Smrgfi 7241515ec619Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7242515ec619Smrg [Compiler flag to turn off builtin functions]) 7243515ec619Smrg])# _LT_COMPILER_NO_RTTI 7244862f5301Smrg 7245862f5301Smrg 7246515ec619Smrg# _LT_CMD_GLOBAL_SYMBOLS 7247515ec619Smrg# ---------------------- 7248515ec619Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7249515ec619Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7250515ec619SmrgAC_REQUIRE([AC_PROG_CC])dnl 7251515ec619SmrgAC_REQUIRE([AC_PROG_AWK])dnl 7252515ec619SmrgAC_REQUIRE([LT_PATH_NM])dnl 7253515ec619SmrgAC_REQUIRE([LT_PATH_LD])dnl 7254515ec619Smrgm4_require([_LT_DECL_SED])dnl 7255515ec619Smrgm4_require([_LT_DECL_EGREP])dnl 7256515ec619Smrgm4_require([_LT_TAG_COMPILER])dnl 7257862f5301Smrg 7258515ec619Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7259515ec619SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7260515ec619SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7261515ec619Smrg[ 7262515ec619Smrg# These are sane defaults that work on at least a few old systems. 7263515ec619Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7264862f5301Smrg 7265515ec619Smrg# Character class describing NM global symbol codes. 7266515ec619Smrgsymcode='[[BCDEGRST]]' 7267862f5301Smrg 7268515ec619Smrg# Regexp to match symbols that can be accessed directly from C. 7269515ec619Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7270862f5301Smrg 7271515ec619Smrg# Define system-specific variables. 7272515ec619Smrgcase $host_os in 7273515ec619Smrgaix*) 7274515ec619Smrg symcode='[[BCDT]]' 7275515ec619Smrg ;; 7276515ec619Smrgcygwin* | mingw* | pw32* | cegcc*) 7277515ec619Smrg symcode='[[ABCDGISTW]]' 7278515ec619Smrg ;; 7279515ec619Smrghpux*) 7280515ec619Smrg if test ia64 = "$host_cpu"; then 7281515ec619Smrg symcode='[[ABCDEGRST]]' 7282515ec619Smrg fi 7283515ec619Smrg ;; 7284515ec619Smrgirix* | nonstopux*) 7285515ec619Smrg symcode='[[BCDEGRST]]' 7286515ec619Smrg ;; 7287515ec619Smrgosf*) 7288515ec619Smrg symcode='[[BCDEGQRST]]' 7289515ec619Smrg ;; 7290515ec619Smrgsolaris*) 7291515ec619Smrg symcode='[[BDRT]]' 7292515ec619Smrg ;; 7293515ec619Smrgsco3.2v5*) 7294515ec619Smrg symcode='[[DT]]' 7295515ec619Smrg ;; 7296515ec619Smrgsysv4.2uw2*) 7297515ec619Smrg symcode='[[DT]]' 7298515ec619Smrg ;; 7299515ec619Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7300515ec619Smrg symcode='[[ABDT]]' 7301515ec619Smrg ;; 7302515ec619Smrgsysv4) 7303515ec619Smrg symcode='[[DFNSTU]]' 7304515ec619Smrg ;; 7305515ec619Smrgesac 7306862f5301Smrg 7307515ec619Smrg# If we're using GNU nm, then use its standard symbol codes. 7308515ec619Smrgcase `$NM -V 2>&1` in 7309515ec619Smrg*GNU* | *'with BFD'*) 7310515ec619Smrg symcode='[[ABCDGIRSTW]]' ;; 7311515ec619Smrgesac 7312862f5301Smrg 7313515ec619Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7314515ec619Smrg # Gets list of data symbols to import. 7315515ec619Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7316515ec619Smrg # Adjust the below global symbol transforms to fixup imported variables. 7317515ec619Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7318515ec619Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7319515ec619Smrg lt_c_name_lib_hook="\ 7320515ec619Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7321515ec619Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7322515ec619Smrgelse 7323515ec619Smrg # Disable hooks by default. 7324515ec619Smrg lt_cv_sys_global_symbol_to_import= 7325515ec619Smrg lt_cdecl_hook= 7326515ec619Smrg lt_c_name_hook= 7327515ec619Smrg lt_c_name_lib_hook= 7328862f5301Smrgfi 7329862f5301Smrg 7330515ec619Smrg# Transform an extracted symbol line into a proper C declaration. 7331515ec619Smrg# Some systems (esp. on ia64) link data and code symbols differently, 7332515ec619Smrg# so use this general approach. 7333515ec619Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7334515ec619Smrg$lt_cdecl_hook\ 7335515ec619Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7336515ec619Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7337862f5301Smrg 7338515ec619Smrg# Transform an extracted symbol line into symbol name and symbol address 7339515ec619Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7340515ec619Smrg$lt_c_name_hook\ 7341515ec619Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7342515ec619Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7343862f5301Smrg 7344515ec619Smrg# Transform an extracted symbol line into symbol name with lib prefix and 7345515ec619Smrg# symbol address. 7346515ec619Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7347515ec619Smrg$lt_c_name_lib_hook\ 7348515ec619Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7349515ec619Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7350515ec619Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7351862f5301Smrg 7352515ec619Smrg# Handle CRLF in mingw tool chain 7353515ec619Smrgopt_cr= 7354515ec619Smrgcase $build_os in 7355515ec619Smrgmingw*) 7356515ec619Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7357515ec619Smrg ;; 7358515ec619Smrgesac 7359862f5301Smrg 7360515ec619Smrg# Try without a prefix underscore, then with it. 7361515ec619Smrgfor ac_symprfx in "" "_"; do 7362862f5301Smrg 7363515ec619Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7364515ec619Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 7365fc544a13Smrg 7366515ec619Smrg # Write the raw and C identifiers. 7367515ec619Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7368515ec619Smrg # Fake it for dumpbin and say T for any non-static function, 7369515ec619Smrg # D for any global variable and I for any imported variable. 7370515ec619Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7371515ec619Smrg # which start with @ or ?. 7372515ec619Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7373515ec619Smrg" {last_section=section; section=\$ 3};"\ 7374515ec619Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7375515ec619Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7376515ec619Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7377515ec619Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7378515ec619Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7379515ec619Smrg" \$ 0!~/External *\|/{next};"\ 7380515ec619Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7381515ec619Smrg" {if(hide[section]) next};"\ 7382515ec619Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7383515ec619Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7384515ec619Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7385515ec619Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7386515ec619Smrg" ' prfx=^$ac_symprfx]" 7387515ec619Smrg else 7388515ec619Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7389515ec619Smrg fi 7390515ec619Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7391fc544a13Smrg 7392515ec619Smrg # Check to see that the pipe works correctly. 7393515ec619Smrg pipe_works=no 7394862f5301Smrg 7395515ec619Smrg rm -f conftest* 7396515ec619Smrg cat > conftest.$ac_ext <<_LT_EOF 7397515ec619Smrg#ifdef __cplusplus 7398515ec619Smrgextern "C" { 7399515ec619Smrg#endif 7400515ec619Smrgchar nm_test_var; 7401515ec619Smrgvoid nm_test_func(void); 7402515ec619Smrgvoid nm_test_func(void){} 7403515ec619Smrg#ifdef __cplusplus 7404515ec619Smrg} 7405515ec619Smrg#endif 7406515ec619Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 7407515ec619Smrg_LT_EOF 7408862f5301Smrg 7409515ec619Smrg if AC_TRY_EVAL(ac_compile); then 7410515ec619Smrg # Now try to grab the symbols. 7411515ec619Smrg nlist=conftest.nm 7412515ec619Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7413515ec619Smrg # Try sorting and uniquifying the output. 7414515ec619Smrg if sort "$nlist" | uniq > "$nlist"T; then 7415515ec619Smrg mv -f "$nlist"T "$nlist" 7416515ec619Smrg else 7417515ec619Smrg rm -f "$nlist"T 7418515ec619Smrg fi 7419862f5301Smrg 7420515ec619Smrg # Make sure that we snagged all the symbols we need. 7421515ec619Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7422515ec619Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7423515ec619Smrg cat <<_LT_EOF > conftest.$ac_ext 7424515ec619Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7425515ec619Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7426515ec619Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 7427515ec619Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 7428515ec619Smrg# define LT@&t@_DLSYM_CONST 7429515ec619Smrg#elif defined __osf__ 7430515ec619Smrg/* This system does not cope well with relocations in const data. */ 7431515ec619Smrg# define LT@&t@_DLSYM_CONST 7432515ec619Smrg#else 7433515ec619Smrg# define LT@&t@_DLSYM_CONST const 7434515ec619Smrg#endif 7435862f5301Smrg 7436515ec619Smrg#ifdef __cplusplus 7437515ec619Smrgextern "C" { 7438515ec619Smrg#endif 74397a3b38f7Smrg 7440515ec619Smrg_LT_EOF 7441515ec619Smrg # Now generate the symbol file. 7442515ec619Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 74437a3b38f7Smrg 7444515ec619Smrg cat <<_LT_EOF >> conftest.$ac_ext 74457a3b38f7Smrg 7446515ec619Smrg/* The mapping between symbol names and symbols. */ 7447515ec619SmrgLT@&t@_DLSYM_CONST struct { 7448515ec619Smrg const char *name; 7449515ec619Smrg void *address; 7450515ec619Smrg} 7451515ec619Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 7452515ec619Smrg{ 7453515ec619Smrg { "@PROGRAM@", (void *) 0 }, 7454515ec619Smrg_LT_EOF 7455515ec619Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7456515ec619Smrg cat <<\_LT_EOF >> conftest.$ac_ext 7457515ec619Smrg {0, (void *) 0} 7458515ec619Smrg}; 74597a3b38f7Smrg 7460515ec619Smrg/* This works around a problem in FreeBSD linker */ 7461515ec619Smrg#ifdef FREEBSD_WORKAROUND 7462515ec619Smrgstatic const void *lt_preloaded_setup() { 7463515ec619Smrg return lt__PROGRAM__LTX_preloaded_symbols; 7464515ec619Smrg} 7465515ec619Smrg#endif 74667a3b38f7Smrg 7467515ec619Smrg#ifdef __cplusplus 7468515ec619Smrg} 7469515ec619Smrg#endif 7470515ec619Smrg_LT_EOF 7471515ec619Smrg # Now try linking the two files. 7472515ec619Smrg mv conftest.$ac_objext conftstm.$ac_objext 7473515ec619Smrg lt_globsym_save_LIBS=$LIBS 7474515ec619Smrg lt_globsym_save_CFLAGS=$CFLAGS 7475515ec619Smrg LIBS=conftstm.$ac_objext 7476515ec619Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7477515ec619Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7478515ec619Smrg pipe_works=yes 7479515ec619Smrg fi 7480515ec619Smrg LIBS=$lt_globsym_save_LIBS 7481515ec619Smrg CFLAGS=$lt_globsym_save_CFLAGS 7482515ec619Smrg else 7483515ec619Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7484515ec619Smrg fi 7485515ec619Smrg else 7486515ec619Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7487862f5301Smrg fi 7488515ec619Smrg else 7489515ec619Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7490515ec619Smrg fi 7491515ec619Smrg else 7492515ec619Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7493515ec619Smrg cat conftest.$ac_ext >&5 7494515ec619Smrg fi 7495515ec619Smrg rm -rf conftest* conftst* 7496515ec619Smrg 7497515ec619Smrg # Do not use the global_symbol_pipe unless it works. 7498515ec619Smrg if test yes = "$pipe_works"; then 7499862f5301Smrg break 7500515ec619Smrg else 7501515ec619Smrg lt_cv_sys_global_symbol_pipe= 7502862f5301Smrg fi 7503862f5301Smrgdone 750444dda7b2Smrg]) 7505515ec619Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 7506515ec619Smrg lt_cv_sys_global_symbol_to_cdecl= 7507515ec619Smrgfi 7508515ec619Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7509515ec619Smrg AC_MSG_RESULT(failed) 7510515ec619Smrgelse 7511515ec619Smrg AC_MSG_RESULT(ok) 7512515ec619Smrgfi 75137a3b38f7Smrg 7514515ec619Smrg# Response file support. 7515515ec619Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7516515ec619Smrg nm_file_list_spec='@' 7517515ec619Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7518515ec619Smrg nm_file_list_spec='@' 7519515ec619Smrgfi 75207a3b38f7Smrg 7521515ec619Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7522515ec619Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 7523515ec619Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7524515ec619Smrg [Transform the output of nm in a proper C declaration]) 7525515ec619Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7526515ec619Smrg [Transform the output of nm into a list of symbols to manually relocate]) 7527515ec619Smrg_LT_DECL([global_symbol_to_c_name_address], 7528515ec619Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 7529515ec619Smrg [Transform the output of nm in a C name address pair]) 7530515ec619Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7531515ec619Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7532515ec619Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 7533515ec619Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7534515ec619Smrg [The name lister interface]) 7535515ec619Smrg_LT_DECL([], [nm_file_list_spec], [1], 7536515ec619Smrg [Specify filename containing input files for $NM]) 7537515ec619Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 75387a3b38f7Smrg 75397a3b38f7Smrg 7540515ec619Smrg# _LT_COMPILER_PIC([TAGNAME]) 7541515ec619Smrg# --------------------------- 7542515ec619Smrgm4_defun([_LT_COMPILER_PIC], 7543515ec619Smrg[m4_require([_LT_TAG_COMPILER])dnl 7544515ec619Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7545515ec619Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7546515ec619Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 7547515ec619Smrg 7548515ec619Smrgm4_if([$1], [CXX], [ 7549515ec619Smrg # C++ specific cases for pic, static, wl, etc. 7550515ec619Smrg if test yes = "$GXX"; then 7551515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7552515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7553862f5301Smrg 7554515ec619Smrg case $host_os in 7555515ec619Smrg aix*) 7556515ec619Smrg # All AIX code is PIC. 7557515ec619Smrg if test ia64 = "$host_cpu"; then 7558515ec619Smrg # AIX 5 now supports IA64 processor 7559515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7560515ec619Smrg fi 7561515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7562515ec619Smrg ;; 7563862f5301Smrg 7564515ec619Smrg amigaos*) 7565515ec619Smrg case $host_cpu in 7566515ec619Smrg powerpc) 7567515ec619Smrg # see comment about AmigaOS4 .so support 7568515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7569862f5301Smrg ;; 7570515ec619Smrg m68k) 7571515ec619Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7572515ec619Smrg # adding the '-m68020' flag to GCC prevents building anything better, 7573515ec619Smrg # like '-m68040'. 7574515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7575862f5301Smrg ;; 7576515ec619Smrg esac 7577515ec619Smrg ;; 7578515ec619Smrg 7579515ec619Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7580515ec619Smrg # PIC is the default for these OSes. 7581515ec619Smrg ;; 7582515ec619Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7583515ec619Smrg # This hack is so that the source file can tell whether it is being 7584515ec619Smrg # built for inclusion in a dll (and should export symbols for example). 7585515ec619Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7586515ec619Smrg # (--disable-auto-import) libraries 7587515ec619Smrg m4_if([$1], [GCJ], [], 7588515ec619Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7589515ec619Smrg case $host_os in 7590515ec619Smrg os2*) 7591515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7592515ec619Smrg ;; 7593515ec619Smrg esac 7594515ec619Smrg ;; 7595515ec619Smrg darwin* | rhapsody*) 7596515ec619Smrg # PIC is the default on this platform 7597515ec619Smrg # Common symbols not allowed in MH_DYLIB files 7598515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7599515ec619Smrg ;; 7600515ec619Smrg *djgpp*) 7601515ec619Smrg # DJGPP does not support shared libraries at all 7602515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7603515ec619Smrg ;; 7604515ec619Smrg haiku*) 7605515ec619Smrg # PIC is the default for Haiku. 7606515ec619Smrg # The "-static" flag exists, but is broken. 7607515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7608515ec619Smrg ;; 7609515ec619Smrg interix[[3-9]]*) 7610515ec619Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7611515ec619Smrg # Instead, we relocate shared libraries at runtime. 7612515ec619Smrg ;; 7613515ec619Smrg sysv4*MP*) 7614515ec619Smrg if test -d /usr/nec; then 7615515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7616515ec619Smrg fi 7617515ec619Smrg ;; 7618515ec619Smrg hpux*) 7619515ec619Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7620515ec619Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7621515ec619Smrg # sets the default TLS model and affects inlining. 7622515ec619Smrg case $host_cpu in 7623515ec619Smrg hppa*64*) 7624515ec619Smrg ;; 7625515ec619Smrg *) 7626515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7627515ec619Smrg ;; 7628515ec619Smrg esac 7629515ec619Smrg ;; 7630515ec619Smrg *qnx* | *nto*) 7631515ec619Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7632515ec619Smrg # it will coredump. 7633515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7634515ec619Smrg ;; 7635515ec619Smrg *) 7636515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7637515ec619Smrg ;; 7638862f5301Smrg esac 7639515ec619Smrg else 7640515ec619Smrg case $host_os in 7641515ec619Smrg aix[[4-9]]*) 7642515ec619Smrg # All AIX code is PIC. 7643515ec619Smrg if test ia64 = "$host_cpu"; then 7644515ec619Smrg # AIX 5 now supports IA64 processor 7645515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7646515ec619Smrg else 7647515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7648515ec619Smrg fi 7649515ec619Smrg ;; 7650515ec619Smrg chorus*) 7651515ec619Smrg case $cc_basename in 7652515ec619Smrg cxch68*) 7653515ec619Smrg # Green Hills C++ Compiler 7654515ec619Smrg # _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" 7655515ec619Smrg ;; 7656515ec619Smrg esac 7657515ec619Smrg ;; 7658515ec619Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7659515ec619Smrg # This hack is so that the source file can tell whether it is being 7660515ec619Smrg # built for inclusion in a dll (and should export symbols for example). 7661515ec619Smrg m4_if([$1], [GCJ], [], 7662515ec619Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7663515ec619Smrg ;; 7664515ec619Smrg dgux*) 7665515ec619Smrg case $cc_basename in 7666515ec619Smrg ec++*) 7667515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7668515ec619Smrg ;; 7669515ec619Smrg ghcx*) 7670515ec619Smrg # Green Hills C++ Compiler 7671515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7672515ec619Smrg ;; 7673515ec619Smrg *) 7674515ec619Smrg ;; 7675515ec619Smrg esac 7676515ec619Smrg ;; 7677515ec619Smrg freebsd* | dragonfly* | midnightbsd*) 7678515ec619Smrg # FreeBSD uses GNU C++ 7679515ec619Smrg ;; 7680515ec619Smrg hpux9* | hpux10* | hpux11*) 7681515ec619Smrg case $cc_basename in 7682515ec619Smrg CC*) 7683515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7684515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7685515ec619Smrg if test ia64 != "$host_cpu"; then 7686515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7687515ec619Smrg fi 7688515ec619Smrg ;; 7689515ec619Smrg aCC*) 7690515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7691515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7692515ec619Smrg case $host_cpu in 7693515ec619Smrg hppa*64*|ia64*) 7694515ec619Smrg # +Z the default 7695515ec619Smrg ;; 7696515ec619Smrg *) 7697515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7698515ec619Smrg ;; 7699515ec619Smrg esac 7700515ec619Smrg ;; 7701515ec619Smrg *) 7702515ec619Smrg ;; 7703515ec619Smrg esac 7704515ec619Smrg ;; 7705515ec619Smrg interix*) 7706515ec619Smrg # This is c89, which is MS Visual C++ (no shared libs) 7707515ec619Smrg # Anyone wants to do a port? 7708515ec619Smrg ;; 7709515ec619Smrg irix5* | irix6* | nonstopux*) 7710515ec619Smrg case $cc_basename in 7711515ec619Smrg CC*) 7712515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7713515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7714515ec619Smrg # CC pic flag -KPIC is the default. 7715515ec619Smrg ;; 7716515ec619Smrg *) 7717515ec619Smrg ;; 7718515ec619Smrg esac 7719515ec619Smrg ;; 7720515ec619Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7721515ec619Smrg case $cc_basename in 7722515ec619Smrg KCC*) 7723515ec619Smrg # KAI C++ Compiler 7724515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7725515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7726515ec619Smrg ;; 7727515ec619Smrg ecpc* ) 7728515ec619Smrg # old Intel C++ for x86_64, which still supported -KPIC. 7729515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7730515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7731515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7732515ec619Smrg ;; 7733515ec619Smrg icpc* ) 7734515ec619Smrg # Intel C++, used to be incompatible with GCC. 7735515ec619Smrg # ICC 10 doesn't accept -KPIC any more. 7736515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7737515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7738515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7739515ec619Smrg ;; 7740515ec619Smrg pgCC* | pgcpp*) 7741515ec619Smrg # Portland Group C++ compiler 7742515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7743515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7744515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7745515ec619Smrg ;; 7746515ec619Smrg cxx*) 7747515ec619Smrg # Compaq C++ 7748515ec619Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7749515ec619Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7750515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7751515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7752515ec619Smrg ;; 7753515ec619Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7754515ec619Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 7755515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7756515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7757515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7758515ec619Smrg ;; 7759515ec619Smrg *) 7760515ec619Smrg case `$CC -V 2>&1 | $SED 5q` in 7761515ec619Smrg *Sun\ C*) 7762515ec619Smrg # Sun C++ 5.9 7763515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7764515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7765515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7766515ec619Smrg ;; 7767515ec619Smrg esac 7768515ec619Smrg ;; 7769515ec619Smrg esac 7770515ec619Smrg ;; 7771515ec619Smrg lynxos*) 7772515ec619Smrg ;; 7773515ec619Smrg m88k*) 7774515ec619Smrg ;; 7775515ec619Smrg mvs*) 7776515ec619Smrg case $cc_basename in 7777515ec619Smrg cxx*) 7778515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7779515ec619Smrg ;; 7780515ec619Smrg *) 7781515ec619Smrg ;; 7782515ec619Smrg esac 7783515ec619Smrg ;; 7784515ec619Smrg netbsd*) 7785515ec619Smrg ;; 7786515ec619Smrg *qnx* | *nto*) 7787515ec619Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7788515ec619Smrg # it will coredump. 7789515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7790862f5301Smrg ;; 7791515ec619Smrg osf3* | osf4* | osf5*) 7792515ec619Smrg case $cc_basename in 7793515ec619Smrg KCC*) 7794515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7795515ec619Smrg ;; 7796515ec619Smrg RCC*) 7797515ec619Smrg # Rational C++ 2.4.1 7798515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7799515ec619Smrg ;; 7800515ec619Smrg cxx*) 7801515ec619Smrg # Digital/Compaq C++ 7802515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7803515ec619Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7804515ec619Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7805515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7806515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7807515ec619Smrg ;; 7808515ec619Smrg *) 7809515ec619Smrg ;; 7810515ec619Smrg esac 7811515ec619Smrg ;; 7812515ec619Smrg psos*) 7813515ec619Smrg ;; 7814515ec619Smrg solaris*) 7815515ec619Smrg case $cc_basename in 7816515ec619Smrg CC* | sunCC*) 7817515ec619Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7818515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7819515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7820515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7821515ec619Smrg ;; 7822515ec619Smrg gcx*) 7823515ec619Smrg # Green Hills C++ Compiler 7824515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7825515ec619Smrg ;; 7826515ec619Smrg *) 7827515ec619Smrg ;; 7828515ec619Smrg esac 7829515ec619Smrg ;; 7830515ec619Smrg sunos4*) 7831515ec619Smrg case $cc_basename in 7832515ec619Smrg CC*) 7833515ec619Smrg # Sun C++ 4.x 7834515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7835515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7836515ec619Smrg ;; 7837515ec619Smrg lcc*) 7838515ec619Smrg # Lucid 7839515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7840515ec619Smrg ;; 7841515ec619Smrg *) 7842515ec619Smrg ;; 7843515ec619Smrg esac 7844515ec619Smrg ;; 7845515ec619Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7846515ec619Smrg case $cc_basename in 7847515ec619Smrg CC*) 7848515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7849515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7850515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7851515ec619Smrg ;; 7852515ec619Smrg esac 7853515ec619Smrg ;; 7854515ec619Smrg tandem*) 7855515ec619Smrg case $cc_basename in 7856515ec619Smrg NCC*) 7857515ec619Smrg # NonStop-UX NCC 3.20 7858515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7859515ec619Smrg ;; 7860515ec619Smrg *) 7861515ec619Smrg ;; 7862515ec619Smrg esac 7863515ec619Smrg ;; 7864515ec619Smrg vxworks*) 7865515ec619Smrg ;; 7866515ec619Smrg *) 7867515ec619Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7868515ec619Smrg ;; 786944dda7b2Smrg esac 7870515ec619Smrg fi 7871515ec619Smrg], 7872515ec619Smrg[ 7873515ec619Smrg if test yes = "$GCC"; then 7874515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7875515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7876862f5301Smrg 7877515ec619Smrg case $host_os in 7878515ec619Smrg aix*) 7879515ec619Smrg # All AIX code is PIC. 7880515ec619Smrg if test ia64 = "$host_cpu"; then 7881515ec619Smrg # AIX 5 now supports IA64 processor 7882515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7883515ec619Smrg fi 7884515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7885515ec619Smrg ;; 7886515ec619Smrg 7887515ec619Smrg amigaos*) 7888515ec619Smrg case $host_cpu in 7889515ec619Smrg powerpc) 7890515ec619Smrg # see comment about AmigaOS4 .so support 7891515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7892862f5301Smrg ;; 7893515ec619Smrg m68k) 7894515ec619Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7895515ec619Smrg # adding the '-m68020' flag to GCC prevents building anything better, 7896515ec619Smrg # like '-m68040'. 7897515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7898515ec619Smrg ;; 7899515ec619Smrg esac 7900515ec619Smrg ;; 79017a3b38f7Smrg 7902515ec619Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7903515ec619Smrg # PIC is the default for these OSes. 7904515ec619Smrg ;; 79057a3b38f7Smrg 7906515ec619Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 7907515ec619Smrg # This hack is so that the source file can tell whether it is being 7908515ec619Smrg # built for inclusion in a dll (and should export symbols for example). 7909515ec619Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7910515ec619Smrg # (--disable-auto-import) libraries 7911515ec619Smrg m4_if([$1], [GCJ], [], 7912515ec619Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7913515ec619Smrg case $host_os in 7914515ec619Smrg os2*) 7915515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7916515ec619Smrg ;; 7917515ec619Smrg esac 7918515ec619Smrg ;; 79197a3b38f7Smrg 7920515ec619Smrg darwin* | rhapsody*) 7921515ec619Smrg # PIC is the default on this platform 7922515ec619Smrg # Common symbols not allowed in MH_DYLIB files 7923515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7924515ec619Smrg ;; 79257a3b38f7Smrg 7926515ec619Smrg haiku*) 7927515ec619Smrg # PIC is the default for Haiku. 7928515ec619Smrg # The "-static" flag exists, but is broken. 7929515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7930515ec619Smrg ;; 79317a3b38f7Smrg 7932515ec619Smrg hpux*) 7933515ec619Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7934515ec619Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7935515ec619Smrg # sets the default TLS model and affects inlining. 7936515ec619Smrg case $host_cpu in 7937515ec619Smrg hppa*64*) 7938515ec619Smrg # +Z the default 7939515ec619Smrg ;; 7940515ec619Smrg *) 7941515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7942515ec619Smrg ;; 7943515ec619Smrg esac 7944515ec619Smrg ;; 79457a3b38f7Smrg 7946515ec619Smrg interix[[3-9]]*) 7947515ec619Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7948515ec619Smrg # Instead, we relocate shared libraries at runtime. 7949515ec619Smrg ;; 79507a3b38f7Smrg 7951515ec619Smrg msdosdjgpp*) 7952515ec619Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 7953515ec619Smrg # on systems that don't support them. 7954515ec619Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7955515ec619Smrg enable_shared=no 7956515ec619Smrg ;; 79577a3b38f7Smrg 7958515ec619Smrg *nto* | *qnx*) 7959515ec619Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7960515ec619Smrg # it will coredump. 7961515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7962515ec619Smrg ;; 796344dda7b2Smrg 7964515ec619Smrg sysv4*MP*) 7965515ec619Smrg if test -d /usr/nec; then 7966515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7967515ec619Smrg fi 7968515ec619Smrg ;; 796944dda7b2Smrg 7970515ec619Smrg *) 7971515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7972515ec619Smrg ;; 7973515ec619Smrg esac 797444dda7b2Smrg 7975515ec619Smrg case $cc_basename in 7976515ec619Smrg nvcc*) # Cuda Compiler Driver 2.2 7977515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 7978515ec619Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 7979515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 7980515ec619Smrg fi 7981515ec619Smrg ;; 7982515ec619Smrg esac 7983515ec619Smrg else 7984515ec619Smrg # PORTME Check for flag to pass linker flags through the system compiler. 7985515ec619Smrg case $host_os in 7986515ec619Smrg aix*) 7987515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7988515ec619Smrg if test ia64 = "$host_cpu"; then 7989515ec619Smrg # AIX 5 now supports IA64 processor 7990515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7991515ec619Smrg else 7992515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7993515ec619Smrg fi 7994515ec619Smrg ;; 7995862f5301Smrg 7996515ec619Smrg darwin* | rhapsody*) 7997515ec619Smrg # PIC is the default on this platform 7998515ec619Smrg # Common symbols not allowed in MH_DYLIB files 7999515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8000515ec619Smrg case $cc_basename in 8001515ec619Smrg nagfor*) 8002515ec619Smrg # NAG Fortran compiler 8003515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8004515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8005515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8006515ec619Smrg ;; 8007515ec619Smrg esac 8008515ec619Smrg ;; 8009862f5301Smrg 8010515ec619Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8011515ec619Smrg # This hack is so that the source file can tell whether it is being 8012515ec619Smrg # built for inclusion in a dll (and should export symbols for example). 8013515ec619Smrg m4_if([$1], [GCJ], [], 8014515ec619Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8015515ec619Smrg case $host_os in 8016515ec619Smrg os2*) 8017515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8018515ec619Smrg ;; 8019515ec619Smrg esac 8020515ec619Smrg ;; 8021862f5301Smrg 8022515ec619Smrg hpux9* | hpux10* | hpux11*) 8023515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8024515ec619Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8025515ec619Smrg # not for PA HP-UX. 8026515ec619Smrg case $host_cpu in 8027515ec619Smrg hppa*64*|ia64*) 8028515ec619Smrg # +Z the default 8029515ec619Smrg ;; 8030515ec619Smrg *) 8031515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8032515ec619Smrg ;; 8033515ec619Smrg esac 8034515ec619Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8035515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8036515ec619Smrg ;; 8037862f5301Smrg 8038515ec619Smrg irix5* | irix6* | nonstopux*) 8039515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8040515ec619Smrg # PIC (with -KPIC) is the default. 8041515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8042515ec619Smrg ;; 804344dda7b2Smrg 8044515ec619Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8045515ec619Smrg case $cc_basename in 8046515ec619Smrg # old Intel for x86_64, which still supported -KPIC. 8047515ec619Smrg ecc*) 8048515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8049515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8050515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8051515ec619Smrg ;; 8052515ec619Smrg # icc used to be incompatible with GCC. 8053515ec619Smrg # ICC 10 doesn't accept -KPIC any more. 8054515ec619Smrg icc* | ifort*) 8055515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8056515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8057515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8058515ec619Smrg ;; 8059515ec619Smrg # Lahey Fortran 8.1. 8060515ec619Smrg lf95*) 8061515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8062515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8063515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8064515ec619Smrg ;; 8065515ec619Smrg nagfor*) 8066515ec619Smrg # NAG Fortran compiler 8067515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8068515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8069515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8070515ec619Smrg ;; 8071515ec619Smrg tcc*) 8072515ec619Smrg # Fabrice Bellard et al's Tiny C Compiler 8073515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8074515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8075515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8076515ec619Smrg ;; 8077515ec619Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8078515ec619Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 8079515ec619Smrg # which looks to be a dead project) 8080515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8081515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8082515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8083515ec619Smrg ;; 8084515ec619Smrg ccc*) 8085515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8086515ec619Smrg # All Alpha code is PIC. 8087515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8088515ec619Smrg ;; 8089515ec619Smrg xl* | bgxl* | bgf* | mpixl*) 8090515ec619Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8091515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8092515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8093515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8094515ec619Smrg ;; 8095515ec619Smrg *) 8096515ec619Smrg case `$CC -V 2>&1 | $SED 5q` in 8097515ec619Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8098515ec619Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8099515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8100515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8101515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8102515ec619Smrg ;; 8103515ec619Smrg *Sun\ F* | *Sun*Fortran*) 8104515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8105515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8106515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8107515ec619Smrg ;; 8108515ec619Smrg *Sun\ C*) 8109515ec619Smrg # Sun C 5.9 8110515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8111515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8112515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8113515ec619Smrg ;; 8114515ec619Smrg *Intel*\ [[CF]]*Compiler*) 8115515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8116515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8117515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8118515ec619Smrg ;; 8119515ec619Smrg *Portland\ Group*) 8120515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8121515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8122515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8123515ec619Smrg ;; 8124515ec619Smrg esac 8125515ec619Smrg ;; 8126515ec619Smrg esac 8127515ec619Smrg ;; 81287a3b38f7Smrg 8129515ec619Smrg newsos6) 8130515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8131515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8132515ec619Smrg ;; 81337a3b38f7Smrg 8134515ec619Smrg *nto* | *qnx*) 8135515ec619Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8136515ec619Smrg # it will coredump. 8137515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8138515ec619Smrg ;; 81397a3b38f7Smrg 8140515ec619Smrg osf3* | osf4* | osf5*) 8141515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8142515ec619Smrg # All OSF/1 code is PIC. 8143515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8144515ec619Smrg ;; 81457a3b38f7Smrg 8146515ec619Smrg rdos*) 8147515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8148515ec619Smrg ;; 81497a3b38f7Smrg 8150515ec619Smrg solaris*) 8151515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8152515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8153515ec619Smrg case $cc_basename in 8154515ec619Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8155515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8156515ec619Smrg *) 8157515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8158515ec619Smrg esac 8159515ec619Smrg ;; 81607a3b38f7Smrg 8161515ec619Smrg sunos4*) 8162515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8163515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8164515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8165515ec619Smrg ;; 81667a3b38f7Smrg 8167515ec619Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 8168515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8169515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8170515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8171515ec619Smrg ;; 81727a3b38f7Smrg 8173515ec619Smrg sysv4*MP*) 8174515ec619Smrg if test -d /usr/nec; then 8175515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8176515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8177515ec619Smrg fi 8178515ec619Smrg ;; 81797a3b38f7Smrg 8180515ec619Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8181515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8182515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8183515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8184515ec619Smrg ;; 81857a3b38f7Smrg 8186515ec619Smrg unicos*) 8187515ec619Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8188515ec619Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8189515ec619Smrg ;; 81907a3b38f7Smrg 8191515ec619Smrg uts4*) 8192515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8193515ec619Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8194515ec619Smrg ;; 81957a3b38f7Smrg 8196515ec619Smrg *) 8197515ec619Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8198515ec619Smrg ;; 8199515ec619Smrg esac 8200515ec619Smrg fi 8201515ec619Smrg]) 8202515ec619Smrgcase $host_os in 8203515ec619Smrg # For platforms that do not support PIC, -DPIC is meaningless: 8204515ec619Smrg *djgpp*) 8205515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8206515ec619Smrg ;; 8207515ec619Smrg *) 8208515ec619Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8209515ec619Smrg ;; 8210515ec619Smrgesac 82117a3b38f7Smrg 8212515ec619SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8213515ec619Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8214515ec619Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8215515ec619Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 82167a3b38f7Smrg 8217515ec619Smrg# 8218515ec619Smrg# Check to make sure the PIC flag actually works. 8219515ec619Smrg# 8220515ec619Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8221515ec619Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8222515ec619Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8223515ec619Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8224515ec619Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8225515ec619Smrg "" | " "*) ;; 8226515ec619Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8227515ec619Smrg esac], 8228515ec619Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8229515ec619Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8230515ec619Smrgfi 8231515ec619Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8232515ec619Smrg [Additional compiler flags for building library objects]) 82337a3b38f7Smrg 8234515ec619Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8235515ec619Smrg [How to pass a linker flag through the compiler]) 8236515ec619Smrg# 8237515ec619Smrg# Check to make sure the static flag actually works. 8238515ec619Smrg# 8239515ec619Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8240515ec619Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8241515ec619Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8242515ec619Smrg $lt_tmp_static_flag, 8243515ec619Smrg [], 8244515ec619Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8245515ec619Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8246515ec619Smrg [Compiler flag to prevent dynamic linking]) 8247515ec619Smrg])# _LT_COMPILER_PIC 824844dda7b2Smrg 82497a3b38f7Smrg 8250515ec619Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 8251862f5301Smrg# ---------------------------- 8252515ec619Smrg# See if the linker supports building shared libraries. 8253515ec619Smrgm4_defun([_LT_LINKER_SHLIBS], 8254515ec619Smrg[AC_REQUIRE([LT_PATH_LD])dnl 8255515ec619SmrgAC_REQUIRE([LT_PATH_NM])dnl 8256515ec619Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8257515ec619Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8258515ec619Smrgm4_require([_LT_DECL_EGREP])dnl 8259515ec619Smrgm4_require([_LT_DECL_SED])dnl 8260515ec619Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8261515ec619Smrgm4_require([_LT_TAG_COMPILER])dnl 8262515ec619SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8263515ec619Smrgm4_if([$1], [CXX], [ 8264515ec619Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8265515ec619Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8266515ec619Smrg case $host_os in 8267515ec619Smrg aix[[4-9]]*) 8268515ec619Smrg # If we're using GNU nm, then we don't want the "-C" option. 8269515ec619Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8270515ec619Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8271515ec619Smrg # weak defined symbols like other global defined symbols, whereas 8272515ec619Smrg # GNU nm marks them as "W". 8273515ec619Smrg # While the 'weak' keyword is ignored in the Export File, we need 8274515ec619Smrg # it in the Import File for the 'aix-soname' feature, so we have 8275515ec619Smrg # to replace the "-B" option with "-P" for AIX nm. 8276515ec619Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8277515ec619Smrg _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' 8278515ec619Smrg else 8279515ec619Smrg _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' 8280515ec619Smrg fi 8281515ec619Smrg ;; 8282515ec619Smrg pw32*) 8283515ec619Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8284515ec619Smrg ;; 8285515ec619Smrg cygwin* | mingw* | cegcc*) 8286515ec619Smrg case $cc_basename in 8287515ec619Smrg cl* | icl*) 8288515ec619Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8289515ec619Smrg ;; 8290862f5301Smrg *) 8291515ec619Smrg _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' 8292515ec619Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8293862f5301Smrg ;; 8294515ec619Smrg esac 8295515ec619Smrg ;; 8296515ec619Smrg *) 8297515ec619Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8298515ec619Smrg ;; 8299515ec619Smrg esac 8300515ec619Smrg], [ 8301515ec619Smrg runpath_var= 8302515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 8303515ec619Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8304515ec619Smrg _LT_TAGVAR(archive_cmds, $1)= 8305515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8306515ec619Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 8307515ec619Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8308515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8309515ec619Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8310515ec619Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 8311515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8312515ec619Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8313515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8314515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8315515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8316515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8317515ec619Smrg _LT_TAGVAR(inherit_rpath, $1)=no 8318515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8319515ec619Smrg _LT_TAGVAR(module_cmds, $1)= 8320515ec619Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 8321515ec619Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8322515ec619Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8323515ec619Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8324515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8325515ec619Smrg # include_expsyms should be a list of space-separated symbols to be *always* 8326515ec619Smrg # included in the symbol list 8327515ec619Smrg _LT_TAGVAR(include_expsyms, $1)= 8328515ec619Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 8329515ec619Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8330515ec619Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8331515ec619Smrg # as well as any symbol that contains 'd'. 8332515ec619Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8333515ec619Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8334515ec619Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 8335515ec619Smrg # the symbol is explicitly referenced. Since portable code cannot 8336515ec619Smrg # rely on this symbol name, it's probably fine to never include it in 8337515ec619Smrg # preloaded symbol tables. 8338515ec619Smrg # Exclude shared library initialization/finalization symbols. 8339515ec619Smrgdnl Note also adjust exclude_expsyms for C++ above. 8340515ec619Smrg extract_expsyms_cmds= 83417a3b38f7Smrg 8342515ec619Smrg case $host_os in 8343515ec619Smrg cygwin* | mingw* | pw32* | cegcc*) 8344515ec619Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8345515ec619Smrg # When not using gcc, we currently assume that we are using 8346515ec619Smrg # Microsoft Visual C++ or Intel C++ Compiler. 8347515ec619Smrg if test yes != "$GCC"; then 8348515ec619Smrg with_gnu_ld=no 8349515ec619Smrg fi 8350515ec619Smrg ;; 8351515ec619Smrg interix*) 8352515ec619Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8353515ec619Smrg with_gnu_ld=yes 8354515ec619Smrg ;; 8355515ec619Smrg openbsd* | bitrig*) 8356515ec619Smrg with_gnu_ld=no 8357515ec619Smrg ;; 8358515ec619Smrg esac 83597a3b38f7Smrg 8360515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 83617a3b38f7Smrg 8362515ec619Smrg # On some targets, GNU ld is compatible enough with the native linker 8363515ec619Smrg # that we're better off using the native interface for both. 8364515ec619Smrg lt_use_gnu_ld_interface=no 8365515ec619Smrg if test yes = "$with_gnu_ld"; then 8366515ec619Smrg case $host_os in 8367515ec619Smrg aix*) 8368515ec619Smrg # The AIX port of GNU ld has always aspired to compatibility 8369515ec619Smrg # with the native linker. However, as the warning in the GNU ld 8370515ec619Smrg # block says, versions before 2.19.5* couldn't really create working 8371515ec619Smrg # shared libraries, regardless of the interface used. 8372515ec619Smrg case `$LD -v 2>&1` in 8373515ec619Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8374515ec619Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8375515ec619Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8376515ec619Smrg *) 8377515ec619Smrg lt_use_gnu_ld_interface=yes 8378515ec619Smrg ;; 8379515ec619Smrg esac 8380515ec619Smrg ;; 8381515ec619Smrg *) 8382515ec619Smrg lt_use_gnu_ld_interface=yes 8383515ec619Smrg ;; 8384515ec619Smrg esac 8385515ec619Smrg fi 83867a3b38f7Smrg 8387515ec619Smrg if test yes = "$lt_use_gnu_ld_interface"; then 8388515ec619Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 8389515ec619Smrg wlarc='$wl' 83907a3b38f7Smrg 8391515ec619Smrg # Set some defaults for GNU ld with shared library support. These 8392515ec619Smrg # are reset later if shared libraries are not supported. Putting them 8393515ec619Smrg # here allows them to be overridden if necessary. 8394515ec619Smrg runpath_var=LD_RUN_PATH 8395515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8396515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8397515ec619Smrg # ancient GNU ld didn't support --whole-archive et. al. 8398515ec619Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8399515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8400515ec619Smrg else 8401515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8402515ec619Smrg fi 8403515ec619Smrg supports_anon_versioning=no 8404515ec619Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8405515ec619Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 8406515ec619Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8407515ec619Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8408515ec619Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8409515ec619Smrg *\ 2.11.*) ;; # other 2.11 versions 8410515ec619Smrg *) supports_anon_versioning=yes ;; 8411515ec619Smrg esac 84127a3b38f7Smrg 8413515ec619Smrg # See if GNU ld supports shared libraries. 8414515ec619Smrg case $host_os in 8415515ec619Smrg aix[[3-9]]*) 8416515ec619Smrg # On AIX/PPC, the GNU linker is very broken 8417515ec619Smrg if test ia64 != "$host_cpu"; then 8418515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8419515ec619Smrg cat <<_LT_EOF 1>&2 84207a3b38f7Smrg 8421515ec619Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 8422515ec619Smrg*** to be unable to reliably create shared libraries on AIX. 8423515ec619Smrg*** Therefore, libtool is disabling shared libraries support. If you 8424515ec619Smrg*** really care for shared libraries, you may want to install binutils 8425515ec619Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8426515ec619Smrg*** You will then need to restart the configuration process. 84277a3b38f7Smrg 8428515ec619Smrg_LT_EOF 8429515ec619Smrg fi 8430515ec619Smrg ;; 84317a3b38f7Smrg 8432515ec619Smrg amigaos*) 8433515ec619Smrg case $host_cpu in 8434515ec619Smrg powerpc) 8435515ec619Smrg # see comment about AmigaOS4 .so support 8436515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8437515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8438515ec619Smrg ;; 8439515ec619Smrg m68k) 8440515ec619Smrg _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)' 8441515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8442515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8443515ec619Smrg ;; 8444515ec619Smrg esac 8445862f5301Smrg ;; 8446862f5301Smrg 8447515ec619Smrg beos*) 8448515ec619Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8449515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8450515ec619Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8451515ec619Smrg # support --undefined. This deserves some investigation. FIXME 8452515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8453515ec619Smrg else 8454515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8455515ec619Smrg fi 8456515ec619Smrg ;; 8457862f5301Smrg 8458515ec619Smrg cygwin* | mingw* | pw32* | cegcc*) 8459515ec619Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8460515ec619Smrg # as there is no search path for DLLs. 8461515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8462515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8463515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8464515ec619Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8465515ec619Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8466515ec619Smrg _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' 8467515ec619Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 84687a3b38f7Smrg 8469515ec619Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8470515ec619Smrg _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' 8471515ec619Smrg # If the export-symbols file already is a .def file, use it as 8472515ec619Smrg # is; otherwise, prepend EXPORTS... 8473515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8474515ec619Smrg cp $export_symbols $output_objdir/$soname.def; 8475515ec619Smrg else 8476515ec619Smrg echo EXPORTS > $output_objdir/$soname.def; 8477515ec619Smrg cat $export_symbols >> $output_objdir/$soname.def; 8478515ec619Smrg fi~ 8479515ec619Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8480515ec619Smrg else 8481515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8482515ec619Smrg fi 8483515ec619Smrg ;; 84847a3b38f7Smrg 8485515ec619Smrg haiku*) 8486515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8487515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8488515ec619Smrg ;; 84897a3b38f7Smrg 8490515ec619Smrg os2*) 8491515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8492515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8493515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8494515ec619Smrg shrext_cmds=.dll 8495515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8496515ec619Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8497515ec619Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8498515ec619Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8499515ec619Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8500515ec619Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8501515ec619Smrg emximp -o $lib $output_objdir/$libname.def' 8502515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8503515ec619Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8504515ec619Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8505515ec619Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8506515ec619Smrg prefix_cmds="$SED"~ 8507515ec619Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 8508515ec619Smrg prefix_cmds="$prefix_cmds -e 1d"; 8509515ec619Smrg fi~ 8510515ec619Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8511515ec619Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8512515ec619Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8513515ec619Smrg emximp -o $lib $output_objdir/$libname.def' 8514515ec619Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8515515ec619Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8516515ec619Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8517515ec619Smrg ;; 85187a3b38f7Smrg 8519515ec619Smrg interix[[3-9]]*) 8520515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8521515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8522515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8523515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8524515ec619Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8525515ec619Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8526515ec619Smrg # default) and relocated if they conflict, which is a slow very memory 8527515ec619Smrg # consuming and fragmenting process. To avoid this, we pick a random, 8528515ec619Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8529515ec619Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8530515ec619Smrg _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' 8531515ec619Smrg _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' 8532515ec619Smrg ;; 8533515ec619Smrg 8534515ec619Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8535515ec619Smrg tmp_diet=no 8536515ec619Smrg if test linux-dietlibc = "$host_os"; then 8537515ec619Smrg case $cc_basename in 8538515ec619Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8539515ec619Smrg esac 8540515ec619Smrg fi 8541515ec619Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8542515ec619Smrg && test no = "$tmp_diet" 8543515ec619Smrg then 8544515ec619Smrg tmp_addflag=' $pic_flag' 8545515ec619Smrg tmp_sharedflag='-shared' 8546515ec619Smrg case $cc_basename,$host_cpu in 8547515ec619Smrg pgcc*) # Portland Group C compiler 8548515ec619Smrg _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' 8549515ec619Smrg tmp_addflag=' $pic_flag' 8550515ec619Smrg ;; 8551515ec619Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 8552515ec619Smrg # Portland Group f77 and f90 compilers 8553515ec619Smrg _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' 8554515ec619Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 8555515ec619Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8556515ec619Smrg tmp_addflag=' -i_dynamic' ;; 8557515ec619Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8558515ec619Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 8559515ec619Smrg ifc* | ifort*) # Intel Fortran compiler 8560515ec619Smrg tmp_addflag=' -nofor_main' ;; 8561515ec619Smrg lf95*) # Lahey Fortran 8.1 8562515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8563515ec619Smrg tmp_sharedflag='--shared' ;; 8564515ec619Smrg nagfor*) # NAGFOR 5.3 8565515ec619Smrg tmp_sharedflag='-Wl,-shared' ;; 8566515ec619Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8567515ec619Smrg tmp_sharedflag='-qmkshrobj' 8568515ec619Smrg tmp_addflag= ;; 8569515ec619Smrg nvcc*) # Cuda Compiler Driver 2.2 8570515ec619Smrg _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' 8571515ec619Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8572515ec619Smrg ;; 8573515ec619Smrg esac 8574515ec619Smrg case `$CC -V 2>&1 | $SED 5q` in 8575515ec619Smrg *Sun\ C*) # Sun C 5.9 8576515ec619Smrg _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' 8577515ec619Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8578515ec619Smrg tmp_sharedflag='-G' ;; 8579515ec619Smrg *Sun\ F*) # Sun Fortran 8.3 8580515ec619Smrg tmp_sharedflag='-G' ;; 8581515ec619Smrg esac 8582515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 85837a3b38f7Smrg 8584515ec619Smrg if test yes = "$supports_anon_versioning"; then 8585515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8586515ec619Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8587515ec619Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8588515ec619Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8589515ec619Smrg fi 85907a3b38f7Smrg 8591515ec619Smrg case $cc_basename in 8592515ec619Smrg tcc*) 8593515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8594515ec619Smrg ;; 8595515ec619Smrg xlf* | bgf* | bgxlf* | mpixlf*) 8596515ec619Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8597515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8598515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8599515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8600515ec619Smrg if test yes = "$supports_anon_versioning"; then 8601515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8602515ec619Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8603515ec619Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8604515ec619Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8605515ec619Smrg fi 8606515ec619Smrg ;; 8607515ec619Smrg esac 8608515ec619Smrg else 8609515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8610515ec619Smrg fi 8611515ec619Smrg ;; 86127a3b38f7Smrg 8613515ec619Smrg netbsd*) 8614515ec619Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8615515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8616515ec619Smrg wlarc= 8617515ec619Smrg else 8618515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8619515ec619Smrg _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' 8620515ec619Smrg fi 8621862f5301Smrg ;; 86227a3b38f7Smrg 8623515ec619Smrg solaris*) 8624515ec619Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8625515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8626515ec619Smrg cat <<_LT_EOF 1>&2 86277a3b38f7Smrg 8628515ec619Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8629515ec619Smrg*** create shared libraries on Solaris systems. Therefore, libtool 8630515ec619Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 8631515ec619Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 8632515ec619Smrg*** your PATH or compiler configuration so that the native linker is 8633515ec619Smrg*** used, and then restart. 86347a3b38f7Smrg 8635515ec619Smrg_LT_EOF 8636515ec619Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8637515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8638515ec619Smrg _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' 8639515ec619Smrg else 8640515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8641515ec619Smrg fi 8642515ec619Smrg ;; 86437a3b38f7Smrg 8644515ec619Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8645515ec619Smrg case `$LD -v 2>&1` in 8646515ec619Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8647515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8648515ec619Smrg cat <<_LT_EOF 1>&2 86497a3b38f7Smrg 8650515ec619Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8651515ec619Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 8652515ec619Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 8653515ec619Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8654515ec619Smrg*** your PATH or compiler configuration so that the native linker is 8655515ec619Smrg*** used, and then restart. 86567a3b38f7Smrg 8657515ec619Smrg_LT_EOF 8658515ec619Smrg ;; 8659515ec619Smrg *) 8660515ec619Smrg # For security reasons, it is highly recommended that you always 8661515ec619Smrg # use absolute paths for naming shared libraries, and exclude the 8662515ec619Smrg # DT_RUNPATH tag from executables and libraries. But doing so 8663515ec619Smrg # requires that you compile everything twice, which is a pain. 8664515ec619Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8665515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8666515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8667515ec619Smrg _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' 8668515ec619Smrg else 8669515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8670515ec619Smrg fi 8671515ec619Smrg ;; 8672515ec619Smrg esac 8673515ec619Smrg ;; 86747a3b38f7Smrg 8675515ec619Smrg sunos4*) 8676515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8677515ec619Smrg wlarc= 8678515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8679515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 86806fc0178dSmrg ;; 8681515ec619Smrg 86826fc0178dSmrg *) 8683515ec619Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8684515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8685515ec619Smrg _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' 8686515ec619Smrg else 8687515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8688515ec619Smrg fi 86896fc0178dSmrg ;; 86906fc0178dSmrg esac 86916fc0178dSmrg 8692515ec619Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8693515ec619Smrg runpath_var= 8694515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8695515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8696515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8697515ec619Smrg fi 8698515ec619Smrg else 8699515ec619Smrg # PORTME fill in a description of your system's linker (not GNU ld) 8700515ec619Smrg case $host_os in 8701515ec619Smrg aix3*) 8702515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8703515ec619Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8704515ec619Smrg _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' 8705515ec619Smrg # Note: this linker hardcodes the directories in LIBPATH if there 8706515ec619Smrg # are no directories specified by -L. 8707515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8708515ec619Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8709515ec619Smrg # Neither direct hardcoding nor static linking is supported with a 8710515ec619Smrg # broken collect2. 8711515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8712515ec619Smrg fi 8713fc544a13Smrg ;; 8714ff559fabSmrg 8715515ec619Smrg aix[[4-9]]*) 8716515ec619Smrg if test ia64 = "$host_cpu"; then 8717515ec619Smrg # On IA64, the linker does run time linking by default, so we don't 8718515ec619Smrg # have to do anything special. 8719515ec619Smrg aix_use_runtimelinking=no 8720515ec619Smrg exp_sym_flag='-Bexport' 8721515ec619Smrg no_entry_flag= 8722515ec619Smrg else 8723515ec619Smrg # If we're using GNU nm, then we don't want the "-C" option. 8724515ec619Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8725515ec619Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8726515ec619Smrg # weak defined symbols like other global defined symbols, whereas 8727515ec619Smrg # GNU nm marks them as "W". 8728515ec619Smrg # While the 'weak' keyword is ignored in the Export File, we need 8729515ec619Smrg # it in the Import File for the 'aix-soname' feature, so we have 8730515ec619Smrg # to replace the "-B" option with "-P" for AIX nm. 8731515ec619Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8732515ec619Smrg _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' 8733515ec619Smrg else 8734515ec619Smrg _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' 8735515ec619Smrg fi 8736515ec619Smrg aix_use_runtimelinking=no 8737ff559fabSmrg 8738515ec619Smrg # Test if we are trying to use run time linking or normal 8739515ec619Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8740515ec619Smrg # have runtime linking enabled, and use it for executables. 8741515ec619Smrg # For shared libraries, we enable/disable runtime linking 8742515ec619Smrg # depending on the kind of the shared library created - 8743515ec619Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 8744515ec619Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8745515ec619Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 8746515ec619Smrg # lib.a static archive 8747515ec619Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 8748515ec619Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 8749515ec619Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8750515ec619Smrg # lib.a(lib.so.V) shared, rtl:no 8751515ec619Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8752515ec619Smrg # lib.a static archive 8753515ec619Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8754515ec619Smrg for ld_flag in $LDFLAGS; do 8755515ec619Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8756515ec619Smrg aix_use_runtimelinking=yes 8757515ec619Smrg break 8758515ec619Smrg fi 8759515ec619Smrg done 8760515ec619Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8761515ec619Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 8762515ec619Smrg # so we don't have lib.a shared libs to link our executables. 8763515ec619Smrg # We have to force runtime linking in this case. 8764515ec619Smrg aix_use_runtimelinking=yes 8765515ec619Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 8766515ec619Smrg fi 8767515ec619Smrg ;; 8768515ec619Smrg esac 8769ff559fabSmrg 8770515ec619Smrg exp_sym_flag='-bexport' 8771515ec619Smrg no_entry_flag='-bnoentry' 8772515ec619Smrg fi 8773ff559fabSmrg 8774515ec619Smrg # When large executables or shared objects are built, AIX ld can 8775515ec619Smrg # have problems creating the table of contents. If linking a library 8776515ec619Smrg # or program results in "error TOC overflow" add -mminimal-toc to 8777515ec619Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8778515ec619Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8779ff559fabSmrg 8780515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='' 8781515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8782515ec619Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8783515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8784515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8785515ec619Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8786515ec619Smrg case $with_aix_soname,$aix_use_runtimelinking in 8787515ec619Smrg aix,*) ;; # traditional, no import file 8788515ec619Smrg svr4,* | *,yes) # use import file 8789515ec619Smrg # The Import File defines what to hardcode. 8790515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8791515ec619Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8792515ec619Smrg ;; 8793515ec619Smrg esac 8794ff559fabSmrg 8795515ec619Smrg if test yes = "$GCC"; then 8796515ec619Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8797515ec619Smrg # We only want to do this on AIX 4.2 and lower, the check 8798515ec619Smrg # below for broken collect2 doesn't work under 4.3+ 8799515ec619Smrg collect2name=`$CC -print-prog-name=collect2` 8800515ec619Smrg if test -f "$collect2name" && 8801515ec619Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8802515ec619Smrg then 8803515ec619Smrg # We have reworked collect2 8804515ec619Smrg : 8805515ec619Smrg else 8806515ec619Smrg # We have old collect2 8807515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8808515ec619Smrg # It fails to find uninstalled libraries when the uninstalled 8809515ec619Smrg # path is not listed in the libpath. Setting hardcode_minus_L 8810515ec619Smrg # to unsupported forces relinking 8811515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8812515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8813515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8814515ec619Smrg fi 8815515ec619Smrg ;; 8816515ec619Smrg esac 8817515ec619Smrg shared_flag='-shared' 8818515ec619Smrg if test yes = "$aix_use_runtimelinking"; then 8819515ec619Smrg shared_flag="$shared_flag "'$wl-G' 8820515ec619Smrg fi 8821515ec619Smrg # Need to ensure runtime linking is disabled for the traditional 8822515ec619Smrg # shared library, or the linker may eventually find shared libraries 8823515ec619Smrg # /with/ Import File - we do not want to mix them. 8824515ec619Smrg shared_flag_aix='-shared' 8825515ec619Smrg shared_flag_svr4='-shared $wl-G' 8826515ec619Smrg else 8827515ec619Smrg # not using gcc 8828515ec619Smrg if test ia64 = "$host_cpu"; then 8829515ec619Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8830515ec619Smrg # chokes on -Wl,-G. The following line is correct: 8831515ec619Smrg shared_flag='-G' 8832515ec619Smrg else 8833515ec619Smrg if test yes = "$aix_use_runtimelinking"; then 8834515ec619Smrg shared_flag='$wl-G' 8835515ec619Smrg else 8836515ec619Smrg shared_flag='$wl-bM:SRE' 8837515ec619Smrg fi 8838515ec619Smrg shared_flag_aix='$wl-bM:SRE' 8839515ec619Smrg shared_flag_svr4='$wl-G' 8840515ec619Smrg fi 8841515ec619Smrg fi 884244dda7b2Smrg 8843515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8844515ec619Smrg # It seems that -bexpall does not export symbols beginning with 8845515ec619Smrg # underscore (_), so it is better to generate a list of symbols to export. 8846515ec619Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8847515ec619Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8848515ec619Smrg # Warning - without using the other runtime loading flags (-brtl), 8849515ec619Smrg # -berok will link without error, but may produce a broken library. 8850515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8851515ec619Smrg # Determine the default libpath from the value encoded in an 8852515ec619Smrg # empty executable. 8853515ec619Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8854515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8855515ec619Smrg _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 8856515ec619Smrg else 8857515ec619Smrg if test ia64 = "$host_cpu"; then 8858515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8859515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8860515ec619Smrg _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" 8861515ec619Smrg else 8862515ec619Smrg # Determine the default libpath from the value encoded in an 8863515ec619Smrg # empty executable. 8864515ec619Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8865515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8866515ec619Smrg # Warning - without using the other run time loading flags, 8867515ec619Smrg # -berok will link without error, but may produce a broken library. 8868515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8869515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8870515ec619Smrg if test yes = "$with_gnu_ld"; then 8871515ec619Smrg # We only use this code for GNU lds that support --whole-archive. 8872515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8873515ec619Smrg else 8874515ec619Smrg # Exported symbols can be pulled into shared objects from archives 8875515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8876515ec619Smrg fi 8877515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8878515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8879515ec619Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 8880515ec619Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8881515ec619Smrg if test svr4 != "$with_aix_soname"; then 8882515ec619Smrg # This is similar to how AIX traditionally builds its shared libraries. 8883515ec619Smrg _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' 8884515ec619Smrg fi 8885515ec619Smrg if test aix != "$with_aix_soname"; then 8886515ec619Smrg _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' 8887515ec619Smrg else 8888515ec619Smrg # used by -dlpreopen to get the symbols 8889515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8890515ec619Smrg fi 8891515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8892515ec619Smrg fi 8893515ec619Smrg fi 8894515ec619Smrg ;; 889544dda7b2Smrg 8896515ec619Smrg amigaos*) 8897515ec619Smrg case $host_cpu in 8898515ec619Smrg powerpc) 8899515ec619Smrg # see comment about AmigaOS4 .so support 8900515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8901515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8902515ec619Smrg ;; 8903515ec619Smrg m68k) 8904515ec619Smrg _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)' 8905515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8906515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8907515ec619Smrg ;; 8908515ec619Smrg esac 8909515ec619Smrg ;; 891044dda7b2Smrg 8911515ec619Smrg bsdi[[45]]*) 8912515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 8913515ec619Smrg ;; 8914515ec619Smrg 8915515ec619Smrg cygwin* | mingw* | pw32* | cegcc*) 8916515ec619Smrg # When not using gcc, we currently assume that we are using 8917515ec619Smrg # Microsoft Visual C++ or Intel C++ Compiler. 8918515ec619Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 8919515ec619Smrg # no search path for DLLs. 8920515ec619Smrg case $cc_basename in 8921515ec619Smrg cl* | icl*) 8922515ec619Smrg # Native MSVC or ICC 8923515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8924515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8925515ec619Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8926515ec619Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8927515ec619Smrg # Tell ltmain to make .lib files, not .a files. 8928515ec619Smrg libext=lib 8929515ec619Smrg # Tell ltmain to make .dll files, not .so files. 8930515ec619Smrg shrext_cmds=.dll 8931515ec619Smrg # FIXME: Setting linknames here is a bad hack. 8932515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 8933515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8934515ec619Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 8935515ec619Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 8936515ec619Smrg else 8937515ec619Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 8938515ec619Smrg fi~ 8939515ec619Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 8940515ec619Smrg linknames=' 8941515ec619Smrg # The linker will not automatically build a static lib if we build a DLL. 8942515ec619Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8943515ec619Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8944515ec619Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8945515ec619Smrg _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' 8946515ec619Smrg # Don't use ranlib 8947515ec619Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 8948515ec619Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 8949515ec619Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 8950515ec619Smrg case $lt_outputfile in 8951515ec619Smrg *.exe|*.EXE) ;; 8952515ec619Smrg *) 8953515ec619Smrg lt_outputfile=$lt_outputfile.exe 8954515ec619Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 8955515ec619Smrg ;; 8956515ec619Smrg esac~ 8957515ec619Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 8958515ec619Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 8959515ec619Smrg $RM "$lt_outputfile.manifest"; 8960515ec619Smrg fi' 8961515ec619Smrg ;; 8962515ec619Smrg *) 8963515ec619Smrg # Assume MSVC and ICC wrapper 8964515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8965515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8966515ec619Smrg # Tell ltmain to make .lib files, not .a files. 8967515ec619Smrg libext=lib 8968515ec619Smrg # Tell ltmain to make .dll files, not .so files. 8969515ec619Smrg shrext_cmds=.dll 8970515ec619Smrg # FIXME: Setting linknames here is a bad hack. 8971515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 8972515ec619Smrg # The linker will automatically build a .lib file if we build a DLL. 8973515ec619Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8974515ec619Smrg # FIXME: Should let the user specify the lib program. 8975515ec619Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 8976515ec619Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8977515ec619Smrg ;; 8978515ec619Smrg esac 8979515ec619Smrg ;; 898044dda7b2Smrg 8981515ec619Smrg darwin* | rhapsody*) 8982515ec619Smrg _LT_DARWIN_LINKER_FEATURES($1) 8983515ec619Smrg ;; 898444dda7b2Smrg 8985515ec619Smrg dgux*) 8986515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8987515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8988515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8989515ec619Smrg ;; 8990ff559fabSmrg 8991515ec619Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 8992515ec619Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 8993515ec619Smrg # does not break anything, and helps significantly (at the cost of a little 8994515ec619Smrg # extra space). 8995515ec619Smrg freebsd2.2*) 8996515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 8997515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8998515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8999515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9000515ec619Smrg ;; 9001ff559fabSmrg 9002515ec619Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9003515ec619Smrg freebsd2.*) 9004515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9005515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9006515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9007515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9008515ec619Smrg ;; 9009ff559fabSmrg 9010515ec619Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9011515ec619Smrg freebsd* | dragonfly* | midnightbsd*) 9012515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9013515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9014515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9015515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9016515ec619Smrg ;; 9017ff559fabSmrg 9018515ec619Smrg hpux9*) 9019515ec619Smrg if test yes = "$GCC"; then 9020515ec619Smrg _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' 9021515ec619Smrg else 9022515ec619Smrg _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' 9023515ec619Smrg fi 9024515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9025515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9026515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9027ff559fabSmrg 9028515ec619Smrg # hardcode_minus_L: Not really in the search PATH, 9029515ec619Smrg # but as the default location of the library. 9030515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9031515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9032515ec619Smrg ;; 9033ff559fabSmrg 9034515ec619Smrg hpux10*) 9035515ec619Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9036515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9037515ec619Smrg else 9038515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9039515ec619Smrg fi 9040515ec619Smrg if test no = "$with_gnu_ld"; then 9041515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9042515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9043515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9044515ec619Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9045515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9046515ec619Smrg # hardcode_minus_L: Not really in the search PATH, 9047515ec619Smrg # but as the default location of the library. 9048515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9049515ec619Smrg fi 9050515ec619Smrg ;; 9051ff559fabSmrg 9052515ec619Smrg hpux11*) 9053515ec619Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9054515ec619Smrg case $host_cpu in 9055515ec619Smrg hppa*64*) 9056515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9057515ec619Smrg ;; 9058515ec619Smrg ia64*) 9059515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9060515ec619Smrg ;; 9061515ec619Smrg *) 9062515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9063515ec619Smrg ;; 9064515ec619Smrg esac 9065515ec619Smrg else 9066515ec619Smrg case $host_cpu in 9067515ec619Smrg hppa*64*) 9068515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9069515ec619Smrg ;; 9070515ec619Smrg ia64*) 9071515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9072515ec619Smrg ;; 9073515ec619Smrg *) 9074515ec619Smrg m4_if($1, [], [ 9075515ec619Smrg # Older versions of the 11.00 compiler do not understand -b yet 9076515ec619Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9077515ec619Smrg _LT_LINKER_OPTION([if $CC understands -b], 9078515ec619Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9079515ec619Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9080515ec619Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9081515ec619Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9082515ec619Smrg ;; 9083515ec619Smrg esac 9084515ec619Smrg fi 9085515ec619Smrg if test no = "$with_gnu_ld"; then 9086515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9087515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 90887a3b38f7Smrg 9089515ec619Smrg case $host_cpu in 9090515ec619Smrg hppa*64*|ia64*) 9091515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9092515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9093515ec619Smrg ;; 9094515ec619Smrg *) 9095515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9096515ec619Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9097515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9098ff559fabSmrg 9099515ec619Smrg # hardcode_minus_L: Not really in the search PATH, 9100515ec619Smrg # but as the default location of the library. 9101515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9102515ec619Smrg ;; 9103515ec619Smrg esac 9104515ec619Smrg fi 9105515ec619Smrg ;; 9106ff559fabSmrg 9107515ec619Smrg irix5* | irix6* | nonstopux*) 9108515ec619Smrg if test yes = "$GCC"; then 9109515ec619Smrg _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' 9110515ec619Smrg # Try to use the -exported_symbol ld option, if it does not 9111515ec619Smrg # work, assume that -exports_file does not work either and 9112515ec619Smrg # implicitly export all symbols. 9113515ec619Smrg # This should be the same for all languages, so no per-tag cache variable. 9114515ec619Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9115515ec619Smrg [lt_cv_irix_exported_symbol], 9116515ec619Smrg [save_LDFLAGS=$LDFLAGS 9117515ec619Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9118515ec619Smrg AC_LINK_IFELSE( 9119515ec619Smrg [AC_LANG_SOURCE( 9120515ec619Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9121515ec619Smrg [C++], [[int foo (void) { return 0; }]], 9122515ec619Smrg [Fortran 77], [[ 9123515ec619Smrg subroutine foo 9124515ec619Smrg end]], 9125515ec619Smrg [Fortran], [[ 9126515ec619Smrg subroutine foo 9127515ec619Smrg end]])])], 9128515ec619Smrg [lt_cv_irix_exported_symbol=yes], 9129515ec619Smrg [lt_cv_irix_exported_symbol=no]) 9130515ec619Smrg LDFLAGS=$save_LDFLAGS]) 9131515ec619Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 9132515ec619Smrg _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' 9133515ec619Smrg fi 9134515ec619Smrg else 9135515ec619Smrg _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' 9136515ec619Smrg _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' 9137515ec619Smrg fi 9138515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9139515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9140515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9141515ec619Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 9142515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9143515ec619Smrg ;; 9144ff559fabSmrg 9145515ec619Smrg linux*) 9146515ec619Smrg case $cc_basename in 9147515ec619Smrg tcc*) 9148515ec619Smrg # Fabrice Bellard et al's Tiny C Compiler 9149515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9150515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9151515ec619Smrg ;; 9152515ec619Smrg esac 9153515ec619Smrg ;; 9154ff559fabSmrg 9155515ec619Smrg netbsd*) 9156515ec619Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9157515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9158515ec619Smrg else 9159515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9160515ec619Smrg fi 9161515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9162515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9163515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9164515ec619Smrg ;; 9165ff559fabSmrg 9166515ec619Smrg newsos6) 9167515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9168515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9169515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9170515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9171515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9172515ec619Smrg ;; 9173ff559fabSmrg 9174515ec619Smrg *nto* | *qnx*) 9175515ec619Smrg ;; 9176ff559fabSmrg 9177515ec619Smrg openbsd* | bitrig*) 9178515ec619Smrg if test -f /usr/libexec/ld.so; then 9179515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9180515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9181515ec619Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9182515ec619Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9183515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9184515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9185515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9186515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9187515ec619Smrg else 9188515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9189515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9190515ec619Smrg fi 9191515ec619Smrg else 9192515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9193515ec619Smrg fi 9194515ec619Smrg ;; 9195ff559fabSmrg 9196515ec619Smrg os2*) 9197515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9198515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9199515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9200515ec619Smrg shrext_cmds=.dll 9201515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9202515ec619Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9203515ec619Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9204515ec619Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9205515ec619Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9206515ec619Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9207515ec619Smrg emximp -o $lib $output_objdir/$libname.def' 9208515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9209515ec619Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9210515ec619Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9211515ec619Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9212515ec619Smrg prefix_cmds="$SED"~ 9213515ec619Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9214515ec619Smrg prefix_cmds="$prefix_cmds -e 1d"; 9215515ec619Smrg fi~ 9216515ec619Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9217515ec619Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9218515ec619Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9219515ec619Smrg emximp -o $lib $output_objdir/$libname.def' 9220515ec619Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9221515ec619Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9222515ec619Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9223515ec619Smrg ;; 9224ff559fabSmrg 9225515ec619Smrg osf3*) 9226515ec619Smrg if test yes = "$GCC"; then 9227515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9228515ec619Smrg _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' 9229515ec619Smrg else 9230515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9231515ec619Smrg _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' 9232515ec619Smrg fi 9233515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9234515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9235515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9236515ec619Smrg ;; 9237ff559fabSmrg 9238515ec619Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9239515ec619Smrg if test yes = "$GCC"; then 9240515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9241515ec619Smrg _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' 9242515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9243515ec619Smrg else 9244515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9245515ec619Smrg _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' 9246515ec619Smrg _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~ 9247515ec619Smrg $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' 9248ff559fabSmrg 9249515ec619Smrg # Both c and cxx compiler support -rpath directly 9250515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9251515ec619Smrg fi 9252515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9253515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9254515ec619Smrg ;; 9255ff559fabSmrg 9256515ec619Smrg solaris*) 9257515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9258515ec619Smrg if test yes = "$GCC"; then 9259515ec619Smrg wlarc='$wl' 9260515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9261515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9262515ec619Smrg $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' 9263515ec619Smrg else 9264515ec619Smrg case `$CC -V 2>&1` in 9265515ec619Smrg *"Compilers 5.0"*) 9266515ec619Smrg wlarc='' 9267515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9268515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9269515ec619Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9270515ec619Smrg ;; 9271515ec619Smrg *) 9272515ec619Smrg wlarc='$wl' 9273515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9274515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9275515ec619Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9276515ec619Smrg ;; 9277515ec619Smrg esac 9278515ec619Smrg fi 9279515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9280515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9281515ec619Smrg case $host_os in 9282515ec619Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9283515ec619Smrg *) 9284515ec619Smrg # The compiler driver will combine and reorder linker options, 9285515ec619Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9286515ec619Smrg # but is careful enough not to reorder. 9287515ec619Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9288515ec619Smrg if test yes = "$GCC"; then 9289515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9290515ec619Smrg else 9291515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9292515ec619Smrg fi 9293515ec619Smrg ;; 9294515ec619Smrg esac 9295515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9296515ec619Smrg ;; 9297ff559fabSmrg 9298515ec619Smrg sunos4*) 9299515ec619Smrg if test sequent = "$host_vendor"; then 9300515ec619Smrg # Use $CC to link under sequent, because it throws in some extra .o 9301515ec619Smrg # files that make .init and .fini sections work. 9302515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9303515ec619Smrg else 9304515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9305515ec619Smrg fi 9306515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9307515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9308515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9309515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9310515ec619Smrg ;; 9311ff559fabSmrg 9312515ec619Smrg sysv4) 9313515ec619Smrg case $host_vendor in 9314515ec619Smrg sni) 9315515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9316515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9317515ec619Smrg ;; 9318515ec619Smrg siemens) 9319515ec619Smrg ## LD is ld it makes a PLAMLIB 9320515ec619Smrg ## CC just makes a GrossModule. 9321515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9322515ec619Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9323515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9324515ec619Smrg ;; 9325515ec619Smrg motorola) 9326515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9327515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9328515ec619Smrg ;; 9329515ec619Smrg esac 9330515ec619Smrg runpath_var='LD_RUN_PATH' 9331515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9332515ec619Smrg ;; 9333ff559fabSmrg 9334515ec619Smrg sysv4.3*) 9335515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9336515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9337515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9338515ec619Smrg ;; 9339ff559fabSmrg 9340515ec619Smrg sysv4*MP*) 9341515ec619Smrg if test -d /usr/nec; then 9342515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9343515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9344515ec619Smrg runpath_var=LD_RUN_PATH 9345515ec619Smrg hardcode_runpath_var=yes 9346515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9347515ec619Smrg fi 9348515ec619Smrg ;; 9349ff559fabSmrg 9350515ec619Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9351515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9352515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9353515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9354515ec619Smrg runpath_var='LD_RUN_PATH' 9355ff559fabSmrg 9356515ec619Smrg if test yes = "$GCC"; then 9357515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9358515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9359515ec619Smrg else 9360515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9361515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9362515ec619Smrg fi 9363515ec619Smrg ;; 9364ff559fabSmrg 9365515ec619Smrg sysv5* | sco3.2v5* | sco5v6*) 9366515ec619Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 9367515ec619Smrg # link with -lc, and that would cause any symbols used from libc to 9368515ec619Smrg # always be unresolved, which means just about no library would 9369515ec619Smrg # ever link correctly. If we're not using GNU ld we use -z text 9370515ec619Smrg # though, which does catch some bad symbols but isn't as heavy-handed 9371515ec619Smrg # as -z defs. 9372515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9373515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9374515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9375515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9376515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9377515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9378515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9379515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9380515ec619Smrg runpath_var='LD_RUN_PATH' 9381ff559fabSmrg 9382515ec619Smrg if test yes = "$GCC"; then 9383515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9384515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9385515ec619Smrg else 9386515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9387515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9388515ec619Smrg fi 9389515ec619Smrg ;; 93906fc0178dSmrg 9391515ec619Smrg uts4*) 9392515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9393515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9394515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9395515ec619Smrg ;; 93966fc0178dSmrg 9397515ec619Smrg *) 9398515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9399515ec619Smrg ;; 9400515ec619Smrg esac 94016fc0178dSmrg 9402515ec619Smrg if test sni = "$host_vendor"; then 9403515ec619Smrg case $host in 9404515ec619Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9405515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9406515ec619Smrg ;; 9407515ec619Smrg esac 9408515ec619Smrg fi 9409515ec619Smrg fi 9410515ec619Smrg]) 9411515ec619SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9412515ec619Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9413515ec619Smrg 9414515ec619Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9415515ec619Smrg 9416515ec619Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9417515ec619Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9418515ec619Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 9419515ec619Smrg [The commands to extract the exported symbol list from a shared archive]) 9420515ec619Smrg 9421515ec619Smrg# 9422515ec619Smrg# Do we need to explicitly link libc? 9423515ec619Smrg# 9424515ec619Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9425515ec619Smrgx|xyes) 9426515ec619Smrg # Assume -lc should be added 9427515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9428515ec619Smrg 9429515ec619Smrg if test yes,yes = "$GCC,$enable_shared"; then 9430515ec619Smrg case $_LT_TAGVAR(archive_cmds, $1) in 9431515ec619Smrg *'~'*) 9432515ec619Smrg # FIXME: we may have to deal with multi-command sequences. 9433515ec619Smrg ;; 9434515ec619Smrg '$CC '*) 9435515ec619Smrg # Test whether the compiler implicitly links with -lc since on some 9436515ec619Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 9437515ec619Smrg # to ld, don't add -lc before -lgcc. 9438515ec619Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9439515ec619Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9440515ec619Smrg [$RM conftest* 9441515ec619Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9442515ec619Smrg 9443515ec619Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9444515ec619Smrg soname=conftest 9445515ec619Smrg lib=conftest 9446515ec619Smrg libobjs=conftest.$ac_objext 9447515ec619Smrg deplibs= 9448515ec619Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9449515ec619Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9450515ec619Smrg compiler_flags=-v 9451515ec619Smrg linker_flags=-v 9452515ec619Smrg verstring= 9453515ec619Smrg output_objdir=. 9454515ec619Smrg libname=conftest 9455515ec619Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9456515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 9457515ec619Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9458515ec619Smrg then 9459515ec619Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9460515ec619Smrg else 9461515ec619Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9462515ec619Smrg fi 9463515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9464fc544a13Smrg else 9465515ec619Smrg cat conftest.err 1>&5 9466fc544a13Smrg fi 9467515ec619Smrg $RM conftest* 9468515ec619Smrg ]) 9469515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9470515ec619Smrg ;; 9471515ec619Smrg esac 9472515ec619Smrg fi 9473515ec619Smrg ;; 9474515ec619Smrgesac 9475515ec619Smrg 9476515ec619Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9477515ec619Smrg [Whether or not to add -lc for building shared libraries]) 9478515ec619Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9479515ec619Smrg [enable_shared_with_static_runtimes], [0], 9480515ec619Smrg [Whether or not to disallow shared libs when runtime libs are static]) 9481515ec619Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9482515ec619Smrg [Compiler flag to allow reflexive dlopens]) 9483515ec619Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9484515ec619Smrg [Compiler flag to generate shared objects directly from archives]) 9485515ec619Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 9486515ec619Smrg [Whether the compiler copes with passing no objects directly]) 9487515ec619Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9488515ec619Smrg [Create an old-style archive from a shared archive]) 9489515ec619Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9490515ec619Smrg [Create a temporary old-style archive to link instead of a shared archive]) 9491515ec619Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9492515ec619Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9493515ec619Smrg_LT_TAGDECL([], [module_cmds], [2], 9494515ec619Smrg [Commands used to build a loadable module if different from building 9495515ec619Smrg a shared archive.]) 9496515ec619Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 9497515ec619Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 9498515ec619Smrg [Whether we are building with GNU ld or not]) 9499515ec619Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 9500515ec619Smrg [Flag that allows shared libraries with undefined symbols to be built]) 9501515ec619Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 9502515ec619Smrg [Flag that enforces no undefined symbols]) 9503515ec619Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9504515ec619Smrg [Flag to hardcode $libdir into a binary during linking. 9505515ec619Smrg This must work even if $libdir does not exist]) 9506515ec619Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9507515ec619Smrg [Whether we need a single "-rpath" flag with a separated argument]) 9508515ec619Smrg_LT_TAGDECL([], [hardcode_direct], [0], 9509515ec619Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9510515ec619Smrg DIR into the resulting binary]) 9511515ec619Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9512515ec619Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9513515ec619Smrg DIR into the resulting binary and the resulting library dependency is 9514515ec619Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 9515515ec619Smrg library is relocated]) 9516515ec619Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 9517515ec619Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9518515ec619Smrg into the resulting binary]) 9519515ec619Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9520515ec619Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9521515ec619Smrg into the resulting binary]) 9522515ec619Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 9523515ec619Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 9524515ec619Smrg into the library and all subsequent libraries and executables linked 9525515ec619Smrg against it]) 9526515ec619Smrg_LT_TAGDECL([], [inherit_rpath], [0], 9527515ec619Smrg [Set to yes if linker adds runtime paths of dependent libraries 9528515ec619Smrg to runtime path list]) 9529515ec619Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 9530515ec619Smrg [Whether libtool must link a program against all its dependency libraries]) 9531515ec619Smrg_LT_TAGDECL([], [always_export_symbols], [0], 9532515ec619Smrg [Set to "yes" if exported symbols are required]) 9533515ec619Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 9534515ec619Smrg [The commands to list exported symbols]) 9535515ec619Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 9536515ec619Smrg [Symbols that should not be listed in the preloaded symbols]) 9537515ec619Smrg_LT_TAGDECL([], [include_expsyms], [1], 9538515ec619Smrg [Symbols that must always be exported]) 9539515ec619Smrg_LT_TAGDECL([], [prelink_cmds], [2], 9540515ec619Smrg [Commands necessary for linking programs (against libraries) with templates]) 9541515ec619Smrg_LT_TAGDECL([], [postlink_cmds], [2], 9542515ec619Smrg [Commands necessary for finishing linking programs]) 9543515ec619Smrg_LT_TAGDECL([], [file_list_spec], [1], 9544515ec619Smrg [Specify filename containing input files]) 9545515ec619Smrgdnl FIXME: Not yet implemented 9546515ec619Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9547515ec619Smrgdnl [Compiler flag to generate thread safe objects]) 9548515ec619Smrg])# _LT_LINKER_SHLIBS 9549515ec619Smrg 9550515ec619Smrg 9551515ec619Smrg# _LT_LANG_C_CONFIG([TAG]) 9552515ec619Smrg# ------------------------ 9553515ec619Smrg# Ensure that the configuration variables for a C compiler are suitably 9554515ec619Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 9555515ec619Smrg# the compiler configuration to 'libtool'. 9556515ec619Smrgm4_defun([_LT_LANG_C_CONFIG], 9557515ec619Smrg[m4_require([_LT_DECL_EGREP])dnl 9558515ec619Smrglt_save_CC=$CC 9559515ec619SmrgAC_LANG_PUSH(C) 9560fc544a13Smrg 9561515ec619Smrg# Source file extension for C test sources. 9562515ec619Smrgac_ext=c 9563fc544a13Smrg 9564515ec619Smrg# Object file extension for compiled C test sources. 9565515ec619Smrgobjext=o 9566515ec619Smrg_LT_TAGVAR(objext, $1)=$objext 9567fc544a13Smrg 9568515ec619Smrg# Code to be used in simple compile tests 9569515ec619Smrglt_simple_compile_test_code="int some_variable = 0;" 9570fc544a13Smrg 9571515ec619Smrg# Code to be used in simple link tests 9572515ec619Smrglt_simple_link_test_code='int main(){return(0);}' 9573fc544a13Smrg 9574515ec619Smrg_LT_TAG_COMPILER 9575515ec619Smrg# Save the default compiler, since it gets overwritten when the other 9576515ec619Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9577515ec619Smrgcompiler_DEFAULT=$CC 9578fc544a13Smrg 9579515ec619Smrg# save warnings/boilerplate of simple test code 9580515ec619Smrg_LT_COMPILER_BOILERPLATE 9581515ec619Smrg_LT_LINKER_BOILERPLATE 9582fc544a13Smrg 9583515ec619Smrgif test -n "$compiler"; then 9584515ec619Smrg _LT_COMPILER_NO_RTTI($1) 9585515ec619Smrg _LT_COMPILER_PIC($1) 9586515ec619Smrg _LT_COMPILER_C_O($1) 9587515ec619Smrg _LT_COMPILER_FILE_LOCKS($1) 9588515ec619Smrg _LT_LINKER_SHLIBS($1) 9589515ec619Smrg _LT_SYS_DYNAMIC_LINKER($1) 9590515ec619Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9591515ec619Smrg LT_SYS_DLOPEN_SELF 9592515ec619Smrg _LT_CMD_STRIPLIB 9593fc544a13Smrg 9594515ec619Smrg # Report what library types will actually be built 9595515ec619Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9596515ec619Smrg AC_MSG_RESULT([$can_build_shared]) 9597fc544a13Smrg 9598515ec619Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9599515ec619Smrg test no = "$can_build_shared" && enable_shared=no 9600fc544a13Smrg 9601515ec619Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9602515ec619Smrg # are all built from PIC. 9603515ec619Smrg case $host_os in 9604515ec619Smrg aix3*) 9605515ec619Smrg test yes = "$enable_shared" && enable_static=no 9606515ec619Smrg if test -n "$RANLIB"; then 9607515ec619Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9608515ec619Smrg postinstall_cmds='$RANLIB $lib' 9609515ec619Smrg fi 9610515ec619Smrg ;; 9611fc544a13Smrg 9612515ec619Smrg aix[[4-9]]*) 9613515ec619Smrg if test ia64 != "$host_cpu"; then 9614515ec619Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9615515ec619Smrg yes,aix,yes) ;; # shared object as lib.so file only 9616515ec619Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 9617515ec619Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 9618515ec619Smrg esac 9619515ec619Smrg fi 9620515ec619Smrg ;; 9621515ec619Smrg esac 9622515ec619Smrg AC_MSG_RESULT([$enable_shared]) 9623fc544a13Smrg 9624515ec619Smrg AC_MSG_CHECKING([whether to build static libraries]) 9625515ec619Smrg # Make sure either enable_shared or enable_static is yes. 9626515ec619Smrg test yes = "$enable_shared" || enable_static=yes 9627515ec619Smrg AC_MSG_RESULT([$enable_static]) 9628fc544a13Smrg 9629515ec619Smrg _LT_CONFIG($1) 9630515ec619Smrgfi 9631515ec619SmrgAC_LANG_POP 9632515ec619SmrgCC=$lt_save_CC 9633515ec619Smrg])# _LT_LANG_C_CONFIG 9634fc544a13Smrg 9635fc544a13Smrg 9636515ec619Smrg# _LT_LANG_CXX_CONFIG([TAG]) 9637515ec619Smrg# -------------------------- 9638515ec619Smrg# Ensure that the configuration variables for a C++ compiler are suitably 9639515ec619Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 9640515ec619Smrg# the compiler configuration to 'libtool'. 9641515ec619Smrgm4_defun([_LT_LANG_CXX_CONFIG], 9642515ec619Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9643515ec619Smrgm4_require([_LT_DECL_EGREP])dnl 9644515ec619Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9645515ec619Smrgif test -n "$CXX" && ( test no != "$CXX" && 9646515ec619Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9647515ec619Smrg (test g++ != "$CXX"))); then 9648515ec619Smrg AC_PROG_CXXCPP 9649fc544a13Smrgelse 9650515ec619Smrg _lt_caught_CXX_error=yes 9651515ec619Smrgfi 9652515ec619Smrg 9653515ec619SmrgAC_LANG_PUSH(C++) 9654515ec619Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9655515ec619Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9656515ec619Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9657515ec619Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9658515ec619Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 9659515ec619Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9660515ec619Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9661515ec619Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9662515ec619Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9663515ec619Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9664515ec619Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9665515ec619Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9666515ec619Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9667515ec619Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9668515ec619Smrg_LT_TAGVAR(module_cmds, $1)= 9669515ec619Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9670515ec619Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9671515ec619Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9672515ec619Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9673515ec619Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9674515ec619Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9675515ec619Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9676515ec619Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 96776fc0178dSmrg 9678515ec619Smrg# Source file extension for C++ test sources. 9679515ec619Smrgac_ext=cpp 96806fc0178dSmrg 9681515ec619Smrg# Object file extension for compiled C++ test sources. 9682515ec619Smrgobjext=o 9683515ec619Smrg_LT_TAGVAR(objext, $1)=$objext 9684515ec619Smrg 9685515ec619Smrg# No sense in running all these tests if we already determined that 9686515ec619Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 9687515ec619Smrg# are currently assumed to apply to all compilers on this platform, 9688515ec619Smrg# and will be corrupted by setting them based on a non-working compiler. 9689515ec619Smrgif test yes != "$_lt_caught_CXX_error"; then 9690515ec619Smrg # Code to be used in simple compile tests 9691515ec619Smrg lt_simple_compile_test_code="int some_variable = 0;" 9692515ec619Smrg 9693515ec619Smrg # Code to be used in simple link tests 9694515ec619Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9695515ec619Smrg 9696515ec619Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9697515ec619Smrg _LT_TAG_COMPILER 9698515ec619Smrg 9699515ec619Smrg # save warnings/boilerplate of simple test code 9700515ec619Smrg _LT_COMPILER_BOILERPLATE 9701515ec619Smrg _LT_LINKER_BOILERPLATE 97026fc0178dSmrg 9703515ec619Smrg # Allow CC to be a program name with arguments. 9704515ec619Smrg lt_save_CC=$CC 9705515ec619Smrg lt_save_CFLAGS=$CFLAGS 9706515ec619Smrg lt_save_LD=$LD 9707515ec619Smrg lt_save_GCC=$GCC 9708515ec619Smrg GCC=$GXX 9709515ec619Smrg lt_save_with_gnu_ld=$with_gnu_ld 9710515ec619Smrg lt_save_path_LD=$lt_cv_path_LD 9711515ec619Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9712515ec619Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9713515ec619Smrg else 9714515ec619Smrg $as_unset lt_cv_prog_gnu_ld 9715515ec619Smrg fi 9716515ec619Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 9717515ec619Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 9718515ec619Smrg else 9719515ec619Smrg $as_unset lt_cv_path_LD 9720515ec619Smrg fi 9721515ec619Smrg test -z "${LDCXX+set}" || LD=$LDCXX 9722515ec619Smrg CC=${CXX-"c++"} 9723515ec619Smrg CFLAGS=$CXXFLAGS 9724515ec619Smrg compiler=$CC 9725515ec619Smrg _LT_TAGVAR(compiler, $1)=$CC 9726515ec619Smrg _LT_CC_BASENAME([$compiler]) 97276fc0178dSmrg 9728515ec619Smrg if test -n "$compiler"; then 9729515ec619Smrg # We don't want -fno-exception when compiling C++ code, so set the 9730515ec619Smrg # no_builtin_flag separately 9731515ec619Smrg if test yes = "$GXX"; then 9732515ec619Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9733515ec619Smrg else 9734515ec619Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9735515ec619Smrg fi 97366fc0178dSmrg 9737515ec619Smrg if test yes = "$GXX"; then 9738515ec619Smrg # Set up default GNU C++ configuration 97396fc0178dSmrg 9740515ec619Smrg LT_PATH_LD 97416fc0178dSmrg 9742515ec619Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 9743515ec619Smrg # archiving commands below assume that GNU ld is being used. 9744515ec619Smrg if test yes = "$with_gnu_ld"; then 9745515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9746515ec619Smrg _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' 97476fc0178dSmrg 9748515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9749515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 97506fc0178dSmrg 9751515ec619Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 9752515ec619Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9753515ec619Smrg # investigate it a little bit more. (MM) 9754515ec619Smrg wlarc='$wl' 97556fc0178dSmrg 9756515ec619Smrg # ancient GNU ld didn't support --whole-archive et. al. 9757515ec619Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9758515ec619Smrg $GREP 'no-whole-archive' > /dev/null; then 9759515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9760515ec619Smrg else 9761515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9762515ec619Smrg fi 9763515ec619Smrg else 9764515ec619Smrg with_gnu_ld=no 9765515ec619Smrg wlarc= 9766fc544a13Smrg 9767515ec619Smrg # A generic and very simple default shared library creation 9768515ec619Smrg # command for GNU C++ for the case where it uses the native 9769515ec619Smrg # linker, instead of GNU ld. If possible, this setting should 9770515ec619Smrg # overridden to take advantage of the native linker features on 9771515ec619Smrg # the platform it is being used on. 9772515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9773515ec619Smrg fi 977444dda7b2Smrg 9775515ec619Smrg # Commands to make compiler produce verbose output that lists 9776515ec619Smrg # what "hidden" libraries, object files and flags are used when 9777515ec619Smrg # linking a shared library. 9778515ec619Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 977944dda7b2Smrg 9780515ec619Smrg else 9781515ec619Smrg GXX=no 9782515ec619Smrg with_gnu_ld=no 9783515ec619Smrg wlarc= 9784515ec619Smrg fi 9785ff559fabSmrg 9786515ec619Smrg # PORTME: fill in a description of your system's C++ link characteristics 9787515ec619Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9788515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9789515ec619Smrg case $host_os in 9790515ec619Smrg aix3*) 9791515ec619Smrg # FIXME: insert proper C++ library support 9792515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9793515ec619Smrg ;; 9794515ec619Smrg aix[[4-9]]*) 9795515ec619Smrg if test ia64 = "$host_cpu"; then 9796515ec619Smrg # On IA64, the linker does run time linking by default, so we don't 9797515ec619Smrg # have to do anything special. 9798515ec619Smrg aix_use_runtimelinking=no 9799515ec619Smrg exp_sym_flag='-Bexport' 9800515ec619Smrg no_entry_flag= 9801515ec619Smrg else 9802515ec619Smrg aix_use_runtimelinking=no 9803ff559fabSmrg 9804515ec619Smrg # Test if we are trying to use run time linking or normal 9805515ec619Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9806515ec619Smrg # have runtime linking enabled, and use it for executables. 9807515ec619Smrg # For shared libraries, we enable/disable runtime linking 9808515ec619Smrg # depending on the kind of the shared library created - 9809515ec619Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 9810515ec619Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9811515ec619Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 9812515ec619Smrg # lib.a static archive 9813515ec619Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9814515ec619Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 9815515ec619Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9816515ec619Smrg # lib.a(lib.so.V) shared, rtl:no 9817515ec619Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9818515ec619Smrg # lib.a static archive 9819515ec619Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9820515ec619Smrg for ld_flag in $LDFLAGS; do 9821515ec619Smrg case $ld_flag in 9822515ec619Smrg *-brtl*) 9823515ec619Smrg aix_use_runtimelinking=yes 9824515ec619Smrg break 9825515ec619Smrg ;; 9826515ec619Smrg esac 9827515ec619Smrg done 9828515ec619Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9829515ec619Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9830515ec619Smrg # so we don't have lib.a shared libs to link our executables. 9831515ec619Smrg # We have to force runtime linking in this case. 9832515ec619Smrg aix_use_runtimelinking=yes 9833515ec619Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9834515ec619Smrg fi 9835515ec619Smrg ;; 9836515ec619Smrg esac 9837ff559fabSmrg 9838515ec619Smrg exp_sym_flag='-bexport' 9839515ec619Smrg no_entry_flag='-bnoentry' 9840515ec619Smrg fi 9841ff559fabSmrg 9842515ec619Smrg # When large executables or shared objects are built, AIX ld can 9843515ec619Smrg # have problems creating the table of contents. If linking a library 9844515ec619Smrg # or program results in "error TOC overflow" add -mminimal-toc to 9845515ec619Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9846515ec619Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 9847ff559fabSmrg 9848515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='' 9849515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9850515ec619Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9851515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9852515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9853515ec619Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9854515ec619Smrg case $with_aix_soname,$aix_use_runtimelinking in 9855515ec619Smrg aix,*) ;; # no import file 9856515ec619Smrg svr4,* | *,yes) # use import file 9857515ec619Smrg # The Import File defines what to hardcode. 9858515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9859515ec619Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9860515ec619Smrg ;; 9861515ec619Smrg esac 9862ff559fabSmrg 9863515ec619Smrg if test yes = "$GXX"; then 9864515ec619Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9865515ec619Smrg # We only want to do this on AIX 4.2 and lower, the check 9866515ec619Smrg # below for broken collect2 doesn't work under 4.3+ 9867515ec619Smrg collect2name=`$CC -print-prog-name=collect2` 9868515ec619Smrg if test -f "$collect2name" && 9869515ec619Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9870515ec619Smrg then 9871515ec619Smrg # We have reworked collect2 9872515ec619Smrg : 9873515ec619Smrg else 9874515ec619Smrg # We have old collect2 9875515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9876515ec619Smrg # It fails to find uninstalled libraries when the uninstalled 9877515ec619Smrg # path is not listed in the libpath. Setting hardcode_minus_L 9878515ec619Smrg # to unsupported forces relinking 9879515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9880515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9881515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9882515ec619Smrg fi 9883515ec619Smrg esac 9884515ec619Smrg shared_flag='-shared' 9885515ec619Smrg if test yes = "$aix_use_runtimelinking"; then 9886515ec619Smrg shared_flag=$shared_flag' $wl-G' 9887515ec619Smrg fi 9888515ec619Smrg # Need to ensure runtime linking is disabled for the traditional 9889515ec619Smrg # shared library, or the linker may eventually find shared libraries 9890515ec619Smrg # /with/ Import File - we do not want to mix them. 9891515ec619Smrg shared_flag_aix='-shared' 9892515ec619Smrg shared_flag_svr4='-shared $wl-G' 9893515ec619Smrg else 9894515ec619Smrg # not using gcc 9895515ec619Smrg if test ia64 = "$host_cpu"; then 9896515ec619Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9897515ec619Smrg # chokes on -Wl,-G. The following line is correct: 9898515ec619Smrg shared_flag='-G' 9899515ec619Smrg else 9900515ec619Smrg if test yes = "$aix_use_runtimelinking"; then 9901515ec619Smrg shared_flag='$wl-G' 9902515ec619Smrg else 9903515ec619Smrg shared_flag='$wl-bM:SRE' 9904515ec619Smrg fi 9905515ec619Smrg shared_flag_aix='$wl-bM:SRE' 9906515ec619Smrg shared_flag_svr4='$wl-G' 9907515ec619Smrg fi 9908515ec619Smrg fi 990944dda7b2Smrg 9910515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9911515ec619Smrg # It seems that -bexpall does not export symbols beginning with 9912515ec619Smrg # underscore (_), so it is better to generate a list of symbols to 9913515ec619Smrg # export. 9914515ec619Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9915515ec619Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9916515ec619Smrg # Warning - without using the other runtime loading flags (-brtl), 9917515ec619Smrg # -berok will link without error, but may produce a broken library. 9918515ec619Smrg # The "-G" linker flag allows undefined symbols. 9919515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 9920515ec619Smrg # Determine the default libpath from the value encoded in an empty 9921515ec619Smrg # executable. 9922515ec619Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9923515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 992444dda7b2Smrg 9925515ec619Smrg _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 9926515ec619Smrg else 9927515ec619Smrg if test ia64 = "$host_cpu"; then 9928515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9929515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 9930515ec619Smrg _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" 9931515ec619Smrg else 9932515ec619Smrg # Determine the default libpath from the value encoded in an 9933515ec619Smrg # empty executable. 9934515ec619Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9935515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9936515ec619Smrg # Warning - without using the other run time loading flags, 9937515ec619Smrg # -berok will link without error, but may produce a broken library. 9938515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 9939515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 9940515ec619Smrg if test yes = "$with_gnu_ld"; then 9941515ec619Smrg # We only use this code for GNU lds that support --whole-archive. 9942515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9943515ec619Smrg else 9944515ec619Smrg # Exported symbols can be pulled into shared objects from archives 9945515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 9946515ec619Smrg fi 9947515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9948515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 9949515ec619Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 9950515ec619Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 9951515ec619Smrg if test svr4 != "$with_aix_soname"; then 9952515ec619Smrg # This is similar to how AIX traditionally builds its shared 9953515ec619Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 9954515ec619Smrg _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' 9955515ec619Smrg fi 9956515ec619Smrg if test aix != "$with_aix_soname"; then 9957515ec619Smrg _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' 9958515ec619Smrg else 9959515ec619Smrg # used by -dlpreopen to get the symbols 9960515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 9961515ec619Smrg fi 9962515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 9963515ec619Smrg fi 9964515ec619Smrg fi 9965515ec619Smrg ;; 996644dda7b2Smrg 9967515ec619Smrg beos*) 9968515ec619Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9969515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9970515ec619Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 9971515ec619Smrg # support --undefined. This deserves some investigation. FIXME 9972515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9973515ec619Smrg else 9974515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9975515ec619Smrg fi 9976515ec619Smrg ;; 997744dda7b2Smrg 9978515ec619Smrg chorus*) 9979515ec619Smrg case $cc_basename in 9980515ec619Smrg *) 9981515ec619Smrg # FIXME: insert proper C++ library support 9982515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9983515ec619Smrg ;; 9984515ec619Smrg esac 9985515ec619Smrg ;; 9986515ec619Smrg 9987515ec619Smrg cygwin* | mingw* | pw32* | cegcc*) 9988515ec619Smrg case $GXX,$cc_basename in 9989515ec619Smrg ,cl* | no,cl* | ,icl* | no,icl*) 9990515ec619Smrg # Native MSVC or ICC 9991515ec619Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 9992515ec619Smrg # no search path for DLLs. 9993515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9994515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9995515ec619Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9996515ec619Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9997515ec619Smrg # Tell ltmain to make .lib files, not .a files. 9998515ec619Smrg libext=lib 9999515ec619Smrg # Tell ltmain to make .dll files, not .so files. 10000515ec619Smrg shrext_cmds=.dll 10001515ec619Smrg # FIXME: Setting linknames here is a bad hack. 10002515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10003515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10004515ec619Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 10005515ec619Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10006515ec619Smrg else 10007515ec619Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10008515ec619Smrg fi~ 10009515ec619Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10010515ec619Smrg linknames=' 10011515ec619Smrg # The linker will not automatically build a static lib if we build a DLL. 10012515ec619Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10013515ec619Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10014515ec619Smrg # Don't use ranlib 10015515ec619Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10016515ec619Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10017515ec619Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10018515ec619Smrg case $lt_outputfile in 10019515ec619Smrg *.exe|*.EXE) ;; 10020515ec619Smrg *) 10021515ec619Smrg lt_outputfile=$lt_outputfile.exe 10022515ec619Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 10023515ec619Smrg ;; 10024515ec619Smrg esac~ 10025515ec619Smrg func_to_tool_file "$lt_outputfile"~ 10026515ec619Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10027515ec619Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10028515ec619Smrg $RM "$lt_outputfile.manifest"; 10029515ec619Smrg fi' 10030515ec619Smrg ;; 10031515ec619Smrg *) 10032515ec619Smrg # g++ 10033515ec619Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10034515ec619Smrg # as there is no search path for DLLs. 10035515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10036515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10037515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10038515ec619Smrg _LT_TAGVAR(always_export_symbols, $1)=no 10039515ec619Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10040515ec619Smrg 10041515ec619Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10042515ec619Smrg _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' 10043515ec619Smrg # If the export-symbols file already is a .def file, use it as 10044515ec619Smrg # is; otherwise, prepend EXPORTS... 10045515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10046515ec619Smrg cp $export_symbols $output_objdir/$soname.def; 10047515ec619Smrg else 10048515ec619Smrg echo EXPORTS > $output_objdir/$soname.def; 10049515ec619Smrg cat $export_symbols >> $output_objdir/$soname.def; 10050515ec619Smrg fi~ 10051515ec619Smrg $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' 10052515ec619Smrg else 10053515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10054515ec619Smrg fi 10055515ec619Smrg ;; 10056515ec619Smrg esac 10057515ec619Smrg ;; 10058515ec619Smrg darwin* | rhapsody*) 10059515ec619Smrg _LT_DARWIN_LINKER_FEATURES($1) 10060515ec619Smrg ;; 1006144dda7b2Smrg 10062515ec619Smrg os2*) 10063515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10064515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10065515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10066515ec619Smrg shrext_cmds=.dll 10067515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10068515ec619Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10069515ec619Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10070515ec619Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10071515ec619Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10072515ec619Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10073515ec619Smrg emximp -o $lib $output_objdir/$libname.def' 10074515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10075515ec619Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10076515ec619Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10077515ec619Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10078515ec619Smrg prefix_cmds="$SED"~ 10079515ec619Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10080515ec619Smrg prefix_cmds="$prefix_cmds -e 1d"; 10081515ec619Smrg fi~ 10082515ec619Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10083515ec619Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10084515ec619Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10085515ec619Smrg emximp -o $lib $output_objdir/$libname.def' 10086515ec619Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10087515ec619Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10088515ec619Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10089515ec619Smrg ;; 1009044dda7b2Smrg 10091515ec619Smrg dgux*) 10092515ec619Smrg case $cc_basename in 10093515ec619Smrg ec++*) 10094515ec619Smrg # FIXME: insert proper C++ library support 10095515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10096515ec619Smrg ;; 10097515ec619Smrg ghcx*) 10098515ec619Smrg # Green Hills C++ Compiler 10099515ec619Smrg # FIXME: insert proper C++ library support 10100515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10101515ec619Smrg ;; 10102515ec619Smrg *) 10103515ec619Smrg # FIXME: insert proper C++ library support 10104515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10105515ec619Smrg ;; 10106515ec619Smrg esac 10107515ec619Smrg ;; 1010844dda7b2Smrg 10109515ec619Smrg freebsd2.*) 10110515ec619Smrg # C++ shared libraries reported to be fairly broken before 10111515ec619Smrg # switch to ELF 10112515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10113515ec619Smrg ;; 1011444dda7b2Smrg 10115515ec619Smrg freebsd-elf*) 10116515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10117515ec619Smrg ;; 10118ff559fabSmrg 10119515ec619Smrg freebsd* | dragonfly* | midnightbsd*) 10120515ec619Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10121515ec619Smrg # conventions 10122515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10123515ec619Smrg ;; 10124ff559fabSmrg 10125515ec619Smrg haiku*) 10126515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10127515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10128515ec619Smrg ;; 10129ff559fabSmrg 10130515ec619Smrg hpux9*) 10131515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10132515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10133515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10134515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10135515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10136515ec619Smrg # but as the default 10137515ec619Smrg # location of the library. 10138ff559fabSmrg 10139515ec619Smrg case $cc_basename in 10140515ec619Smrg CC*) 10141515ec619Smrg # FIXME: insert proper C++ library support 10142515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10143515ec619Smrg ;; 10144515ec619Smrg aCC*) 10145515ec619Smrg _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' 10146515ec619Smrg # Commands to make compiler produce verbose output that lists 10147515ec619Smrg # what "hidden" libraries, object files and flags are used when 10148515ec619Smrg # linking a shared library. 10149515ec619Smrg # 10150515ec619Smrg # There doesn't appear to be a way to prevent this compiler from 10151515ec619Smrg # explicitly linking system object files so we need to strip them 10152515ec619Smrg # from the output so that they don't get included in the library 10153515ec619Smrg # dependencies. 10154515ec619Smrg 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"' 10155515ec619Smrg ;; 10156515ec619Smrg *) 10157515ec619Smrg if test yes = "$GXX"; then 10158515ec619Smrg _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' 10159515ec619Smrg else 10160515ec619Smrg # FIXME: insert proper C++ library support 10161515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10162515ec619Smrg fi 10163515ec619Smrg ;; 10164515ec619Smrg esac 10165515ec619Smrg ;; 10166ff559fabSmrg 10167515ec619Smrg hpux10*|hpux11*) 10168515ec619Smrg if test no = "$with_gnu_ld"; then 10169515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10170515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10171ff559fabSmrg 10172515ec619Smrg case $host_cpu in 10173515ec619Smrg hppa*64*|ia64*) 10174515ec619Smrg ;; 10175515ec619Smrg *) 10176515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10177515ec619Smrg ;; 10178515ec619Smrg esac 10179515ec619Smrg fi 10180515ec619Smrg case $host_cpu in 10181515ec619Smrg hppa*64*|ia64*) 10182515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10183515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10184515ec619Smrg ;; 10185515ec619Smrg *) 10186515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10187515ec619Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10188515ec619Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10189515ec619Smrg # but as the default 10190515ec619Smrg # location of the library. 10191515ec619Smrg ;; 10192515ec619Smrg esac 10193ff559fabSmrg 10194515ec619Smrg case $cc_basename in 10195515ec619Smrg CC*) 10196515ec619Smrg # FIXME: insert proper C++ library support 10197515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10198515ec619Smrg ;; 10199515ec619Smrg aCC*) 10200515ec619Smrg case $host_cpu in 10201515ec619Smrg hppa*64*) 10202515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10203515ec619Smrg ;; 10204515ec619Smrg ia64*) 10205515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10206515ec619Smrg ;; 10207515ec619Smrg *) 10208515ec619Smrg _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' 10209515ec619Smrg ;; 10210515ec619Smrg esac 10211515ec619Smrg # Commands to make compiler produce verbose output that lists 10212515ec619Smrg # what "hidden" libraries, object files and flags are used when 10213515ec619Smrg # linking a shared library. 10214515ec619Smrg # 10215515ec619Smrg # There doesn't appear to be a way to prevent this compiler from 10216515ec619Smrg # explicitly linking system object files so we need to strip them 10217515ec619Smrg # from the output so that they don't get included in the library 10218515ec619Smrg # dependencies. 10219515ec619Smrg 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"' 10220515ec619Smrg ;; 10221515ec619Smrg *) 10222515ec619Smrg if test yes = "$GXX"; then 10223515ec619Smrg if test no = "$with_gnu_ld"; then 10224515ec619Smrg case $host_cpu in 10225515ec619Smrg hppa*64*) 10226515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10227515ec619Smrg ;; 10228515ec619Smrg ia64*) 10229515ec619Smrg _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' 10230515ec619Smrg ;; 10231515ec619Smrg *) 10232515ec619Smrg _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' 10233515ec619Smrg ;; 10234515ec619Smrg esac 10235515ec619Smrg fi 10236515ec619Smrg else 10237515ec619Smrg # FIXME: insert proper C++ library support 10238515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10239515ec619Smrg fi 10240515ec619Smrg ;; 10241515ec619Smrg esac 10242515ec619Smrg ;; 10243ff559fabSmrg 10244515ec619Smrg interix[[3-9]]*) 10245515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10246515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10247515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10248515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10249515ec619Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10250515ec619Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10251515ec619Smrg # default) and relocated if they conflict, which is a slow very memory 10252515ec619Smrg # consuming and fragmenting process. To avoid this, we pick a random, 10253515ec619Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10254515ec619Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10255515ec619Smrg _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' 10256515ec619Smrg _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' 10257515ec619Smrg ;; 10258515ec619Smrg irix5* | irix6*) 10259515ec619Smrg case $cc_basename in 10260515ec619Smrg CC*) 10261515ec619Smrg # SGI C++ 10262515ec619Smrg _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' 10263ff559fabSmrg 10264515ec619Smrg # Archives containing C++ object files must be created using 10265515ec619Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10266515ec619Smrg # necessary to make sure instantiated templates are included 10267515ec619Smrg # in the archive. 10268515ec619Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10269515ec619Smrg ;; 10270515ec619Smrg *) 10271515ec619Smrg if test yes = "$GXX"; then 10272515ec619Smrg if test no = "$with_gnu_ld"; then 10273515ec619Smrg _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' 10274515ec619Smrg else 10275515ec619Smrg _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' 10276515ec619Smrg fi 10277515ec619Smrg fi 10278515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10279515ec619Smrg ;; 10280515ec619Smrg esac 10281515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10282515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10283515ec619Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 10284515ec619Smrg ;; 10285ff559fabSmrg 10286515ec619Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10287515ec619Smrg case $cc_basename in 10288515ec619Smrg KCC*) 10289515ec619Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10290ff559fabSmrg 10291515ec619Smrg # KCC will only create a shared library if the output file 10292515ec619Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10293515ec619Smrg # to its proper name (with version) after linking. 10294515ec619Smrg _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' 10295515ec619Smrg _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' 10296515ec619Smrg # Commands to make compiler produce verbose output that lists 10297515ec619Smrg # what "hidden" libraries, object files and flags are used when 10298515ec619Smrg # linking a shared library. 10299515ec619Smrg # 10300515ec619Smrg # There doesn't appear to be a way to prevent this compiler from 10301515ec619Smrg # explicitly linking system object files so we need to strip them 10302515ec619Smrg # from the output so that they don't get included in the library 10303515ec619Smrg # dependencies. 10304515ec619Smrg 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"' 10305ff559fabSmrg 10306515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10307515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10308ff559fabSmrg 10309515ec619Smrg # Archives containing C++ object files must be created using 10310515ec619Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10311515ec619Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10312515ec619Smrg ;; 10313515ec619Smrg icpc* | ecpc* ) 10314515ec619Smrg # Intel C++ 10315515ec619Smrg with_gnu_ld=yes 10316515ec619Smrg # version 8.0 and above of icpc choke on multiply defined symbols 10317515ec619Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10318515ec619Smrg # earlier do not add the objects themselves. 10319515ec619Smrg case `$CC -V 2>&1` in 10320515ec619Smrg *"Version 7."*) 10321515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10322515ec619Smrg _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' 10323515ec619Smrg ;; 10324515ec619Smrg *) # Version 8.0 or newer 10325515ec619Smrg tmp_idyn= 10326515ec619Smrg case $host_cpu in 10327515ec619Smrg ia64*) tmp_idyn=' -i_dynamic';; 10328515ec619Smrg esac 10329515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10330515ec619Smrg _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' 10331515ec619Smrg ;; 10332515ec619Smrg esac 10333515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10334515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10335515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10336515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10337515ec619Smrg ;; 10338515ec619Smrg pgCC* | pgcpp*) 10339515ec619Smrg # Portland Group C++ compiler 10340515ec619Smrg case `$CC -V` in 10341515ec619Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10342515ec619Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10343515ec619Smrg rm -rf $tpldir~ 10344515ec619Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10345515ec619Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10346515ec619Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10347515ec619Smrg rm -rf $tpldir~ 10348515ec619Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10349515ec619Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10350515ec619Smrg $RANLIB $oldlib' 10351515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10352515ec619Smrg rm -rf $tpldir~ 10353515ec619Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10354515ec619Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10355515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10356515ec619Smrg rm -rf $tpldir~ 10357515ec619Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10358515ec619Smrg $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' 10359515ec619Smrg ;; 10360515ec619Smrg *) # Version 6 and above use weak symbols 10361515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10362515ec619Smrg _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' 10363515ec619Smrg ;; 10364515ec619Smrg esac 10365ff559fabSmrg 10366515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10367515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10368515ec619Smrg _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' 10369515ec619Smrg ;; 10370515ec619Smrg cxx*) 10371515ec619Smrg # Compaq C++ 10372515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10373515ec619Smrg _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' 10374ff559fabSmrg 10375515ec619Smrg runpath_var=LD_RUN_PATH 10376515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10377515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10378ff559fabSmrg 10379515ec619Smrg # Commands to make compiler produce verbose output that lists 10380515ec619Smrg # what "hidden" libraries, object files and flags are used when 10381515ec619Smrg # linking a shared library. 10382515ec619Smrg # 10383515ec619Smrg # There doesn't appear to be a way to prevent this compiler from 10384515ec619Smrg # explicitly linking system object files so we need to strip them 10385515ec619Smrg # from the output so that they don't get included in the library 10386515ec619Smrg # dependencies. 10387515ec619Smrg 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' 10388515ec619Smrg ;; 10389515ec619Smrg xl* | mpixl* | bgxl*) 10390515ec619Smrg # IBM XL 8.0 on PPC, with GNU ld 10391515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10392515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10393515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10394515ec619Smrg if test yes = "$supports_anon_versioning"; then 10395515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10396515ec619Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10397515ec619Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 10398515ec619Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10399515ec619Smrg fi 10400515ec619Smrg ;; 10401515ec619Smrg *) 10402515ec619Smrg case `$CC -V 2>&1 | $SED 5q` in 10403515ec619Smrg *Sun\ C*) 10404515ec619Smrg # Sun C++ 5.9 10405515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10406515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10407515ec619Smrg _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' 10408515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10409515ec619Smrg _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' 10410515ec619Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 10411ff559fabSmrg 10412515ec619Smrg # Not sure whether something based on 10413515ec619Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10414515ec619Smrg # would be better. 10415515ec619Smrg output_verbose_link_cmd='func_echo_all' 10416ff559fabSmrg 10417515ec619Smrg # Archives containing C++ object files must be created using 10418515ec619Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10419515ec619Smrg # necessary to make sure instantiated templates are included 10420515ec619Smrg # in the archive. 10421515ec619Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10422515ec619Smrg ;; 10423515ec619Smrg esac 10424515ec619Smrg ;; 10425515ec619Smrg esac 10426515ec619Smrg ;; 1042744dda7b2Smrg 10428515ec619Smrg lynxos*) 10429515ec619Smrg # FIXME: insert proper C++ library support 10430515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10431515ec619Smrg ;; 1043244dda7b2Smrg 10433515ec619Smrg m88k*) 10434515ec619Smrg # FIXME: insert proper C++ library support 10435515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10436515ec619Smrg ;; 104377a3b38f7Smrg 10438515ec619Smrg mvs*) 10439515ec619Smrg case $cc_basename in 10440515ec619Smrg cxx*) 10441515ec619Smrg # FIXME: insert proper C++ library support 10442515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10443515ec619Smrg ;; 10444515ec619Smrg *) 10445515ec619Smrg # FIXME: insert proper C++ library support 10446515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10447515ec619Smrg ;; 10448515ec619Smrg esac 10449515ec619Smrg ;; 104507a3b38f7Smrg 10451515ec619Smrg netbsd*) 10452515ec619Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10453515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10454515ec619Smrg wlarc= 10455515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10456515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10457515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10458515ec619Smrg fi 10459515ec619Smrg # Workaround some broken pre-1.5 toolchains 10460515ec619Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10461515ec619Smrg ;; 10462ff559fabSmrg 10463515ec619Smrg *nto* | *qnx*) 10464515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10465515ec619Smrg ;; 10466ff559fabSmrg 10467515ec619Smrg openbsd* | bitrig*) 10468515ec619Smrg if test -f /usr/libexec/ld.so; then 10469515ec619Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10470515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10471515ec619Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10472515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10473515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10474515ec619Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10475515ec619Smrg _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' 10476515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10477515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10478515ec619Smrg fi 10479515ec619Smrg output_verbose_link_cmd=func_echo_all 10480515ec619Smrg else 10481515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10482515ec619Smrg fi 10483515ec619Smrg ;; 10484ff559fabSmrg 10485515ec619Smrg osf3* | osf4* | osf5*) 10486515ec619Smrg case $cc_basename in 10487515ec619Smrg KCC*) 10488515ec619Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10489ff559fabSmrg 10490515ec619Smrg # KCC will only create a shared library if the output file 10491515ec619Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10492515ec619Smrg # to its proper name (with version) after linking. 10493515ec619Smrg _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' 10494ff559fabSmrg 10495515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10496515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10497ff559fabSmrg 10498515ec619Smrg # Archives containing C++ object files must be created using 10499515ec619Smrg # the KAI C++ compiler. 10500515ec619Smrg case $host in 10501515ec619Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10502515ec619Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10503515ec619Smrg esac 10504515ec619Smrg ;; 10505515ec619Smrg RCC*) 10506515ec619Smrg # Rational C++ 2.4.1 10507515ec619Smrg # FIXME: insert proper C++ library support 10508515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10509515ec619Smrg ;; 10510515ec619Smrg cxx*) 10511515ec619Smrg case $host in 10512515ec619Smrg osf3*) 10513515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10514515ec619Smrg _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' 10515515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10516515ec619Smrg ;; 10517515ec619Smrg *) 10518515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10519515ec619Smrg _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' 10520515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10521515ec619Smrg echo "-hidden">> $lib.exp~ 10522515ec619Smrg $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~ 10523515ec619Smrg $RM $lib.exp' 10524515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10525515ec619Smrg ;; 10526515ec619Smrg esac 10527ff559fabSmrg 10528515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10529ff559fabSmrg 10530515ec619Smrg # Commands to make compiler produce verbose output that lists 10531515ec619Smrg # what "hidden" libraries, object files and flags are used when 10532515ec619Smrg # linking a shared library. 10533515ec619Smrg # 10534515ec619Smrg # There doesn't appear to be a way to prevent this compiler from 10535515ec619Smrg # explicitly linking system object files so we need to strip them 10536515ec619Smrg # from the output so that they don't get included in the library 10537515ec619Smrg # dependencies. 10538515ec619Smrg 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"' 10539515ec619Smrg ;; 10540515ec619Smrg *) 10541515ec619Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 10542515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10543515ec619Smrg case $host in 10544515ec619Smrg osf3*) 10545515ec619Smrg _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' 10546515ec619Smrg ;; 10547515ec619Smrg *) 10548515ec619Smrg _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' 10549515ec619Smrg ;; 10550515ec619Smrg esac 10551ff559fabSmrg 10552515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10553515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10554ff559fabSmrg 10555515ec619Smrg # Commands to make compiler produce verbose output that lists 10556515ec619Smrg # what "hidden" libraries, object files and flags are used when 10557515ec619Smrg # linking a shared library. 10558515ec619Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 1055944dda7b2Smrg 10560515ec619Smrg else 10561515ec619Smrg # FIXME: insert proper C++ library support 10562515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10563515ec619Smrg fi 10564515ec619Smrg ;; 10565515ec619Smrg esac 10566515ec619Smrg ;; 1056744dda7b2Smrg 10568515ec619Smrg psos*) 10569515ec619Smrg # FIXME: insert proper C++ library support 10570515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10571515ec619Smrg ;; 1057244dda7b2Smrg 10573515ec619Smrg sunos4*) 10574515ec619Smrg case $cc_basename in 10575515ec619Smrg CC*) 10576515ec619Smrg # Sun C++ 4.x 10577515ec619Smrg # FIXME: insert proper C++ library support 10578515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10579515ec619Smrg ;; 10580515ec619Smrg lcc*) 10581515ec619Smrg # Lucid 10582515ec619Smrg # FIXME: insert proper C++ library support 10583515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10584515ec619Smrg ;; 10585515ec619Smrg *) 10586515ec619Smrg # FIXME: insert proper C++ library support 10587515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10588515ec619Smrg ;; 10589515ec619Smrg esac 10590515ec619Smrg ;; 10591ff559fabSmrg 10592515ec619Smrg solaris*) 10593515ec619Smrg case $cc_basename in 10594515ec619Smrg CC* | sunCC*) 10595515ec619Smrg # Sun C++ 4.2, 5.x and Centerline C++ 10596515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10597515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10598515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10599515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10600515ec619Smrg $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' 10601ff559fabSmrg 10602515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10603515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10604515ec619Smrg case $host_os in 10605515ec619Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10606515ec619Smrg *) 10607515ec619Smrg # The compiler driver will combine and reorder linker options, 10608515ec619Smrg # but understands '-z linker_flag'. 10609515ec619Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10610515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10611515ec619Smrg ;; 10612515ec619Smrg esac 10613515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10614ff559fabSmrg 10615515ec619Smrg output_verbose_link_cmd='func_echo_all' 10616515ec619Smrg 10617515ec619Smrg # Archives containing C++ object files must be created using 10618515ec619Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10619515ec619Smrg # necessary to make sure instantiated templates are included 10620515ec619Smrg # in the archive. 10621515ec619Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10622515ec619Smrg ;; 10623515ec619Smrg gcx*) 10624515ec619Smrg # Green Hills C++ Compiler 10625515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10626fc544a13Smrg 10627515ec619Smrg # The C++ compiler must be used to create the archive. 10628515ec619Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10629515ec619Smrg ;; 10630515ec619Smrg *) 10631515ec619Smrg # GNU C++ compiler with Solaris linker 10632515ec619Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 10633515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10634515ec619Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10635515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10636515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10637515ec619Smrg $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' 10638fc544a13Smrg 10639515ec619Smrg # Commands to make compiler produce verbose output that lists 10640515ec619Smrg # what "hidden" libraries, object files and flags are used when 10641515ec619Smrg # linking a shared library. 10642515ec619Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10643515ec619Smrg else 10644515ec619Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 10645515ec619Smrg # platform. 10646515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10647515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10648515ec619Smrg $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' 106497a3b38f7Smrg 10650515ec619Smrg # Commands to make compiler produce verbose output that lists 10651515ec619Smrg # what "hidden" libraries, object files and flags are used when 10652515ec619Smrg # linking a shared library. 10653515ec619Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10654515ec619Smrg fi 106557a3b38f7Smrg 10656515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10657515ec619Smrg case $host_os in 10658515ec619Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10659515ec619Smrg *) 10660515ec619Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10661515ec619Smrg ;; 10662515ec619Smrg esac 10663515ec619Smrg fi 10664515ec619Smrg ;; 10665515ec619Smrg esac 10666515ec619Smrg ;; 106677a3b38f7Smrg 10668515ec619Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10669515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10670515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10671515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10672515ec619Smrg runpath_var='LD_RUN_PATH' 10673ff559fabSmrg 10674515ec619Smrg case $cc_basename in 10675515ec619Smrg CC*) 10676515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10677515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10678515ec619Smrg ;; 10679515ec619Smrg *) 10680515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10681515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10682515ec619Smrg ;; 10683515ec619Smrg esac 10684515ec619Smrg ;; 10685ff559fabSmrg 10686515ec619Smrg sysv5* | sco3.2v5* | sco5v6*) 10687515ec619Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 10688515ec619Smrg # link with -lc, and that would cause any symbols used from libc to 10689515ec619Smrg # always be unresolved, which means just about no library would 10690515ec619Smrg # ever link correctly. If we're not using GNU ld we use -z text 10691515ec619Smrg # though, which does catch some bad symbols but isn't as heavy-handed 10692515ec619Smrg # as -z defs. 10693515ec619Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10694515ec619Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10695515ec619Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10696515ec619Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10697515ec619Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10698515ec619Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10699515ec619Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10700515ec619Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10701515ec619Smrg runpath_var='LD_RUN_PATH' 10702ff559fabSmrg 10703515ec619Smrg case $cc_basename in 10704515ec619Smrg CC*) 10705515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10706515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10707515ec619Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10708515ec619Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 10709515ec619Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10710515ec619Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 10711515ec619Smrg ;; 10712515ec619Smrg *) 10713515ec619Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10714515ec619Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10715515ec619Smrg ;; 10716515ec619Smrg esac 10717515ec619Smrg ;; 10718515ec619Smrg 10719515ec619Smrg tandem*) 10720515ec619Smrg case $cc_basename in 10721515ec619Smrg NCC*) 10722515ec619Smrg # NonStop-UX NCC 3.20 10723515ec619Smrg # FIXME: insert proper C++ library support 10724515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10725515ec619Smrg ;; 10726515ec619Smrg *) 10727515ec619Smrg # FIXME: insert proper C++ library support 10728515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10729515ec619Smrg ;; 10730515ec619Smrg esac 10731515ec619Smrg ;; 10732515ec619Smrg 10733515ec619Smrg vxworks*) 10734515ec619Smrg # FIXME: insert proper C++ library support 10735515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10736515ec619Smrg ;; 10737515ec619Smrg 10738515ec619Smrg *) 10739515ec619Smrg # FIXME: insert proper C++ library support 10740515ec619Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10741515ec619Smrg ;; 10742515ec619Smrg esac 10743ff559fabSmrg 10744515ec619Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10745515ec619Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10746ff559fabSmrg 10747515ec619Smrg _LT_TAGVAR(GCC, $1)=$GXX 10748515ec619Smrg _LT_TAGVAR(LD, $1)=$LD 10749ff559fabSmrg 10750515ec619Smrg ## CAVEAT EMPTOR: 10751515ec619Smrg ## There is no encapsulation within the following macros, do not change 10752515ec619Smrg ## the running order or otherwise move them around unless you know exactly 10753515ec619Smrg ## what you are doing... 10754515ec619Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 10755515ec619Smrg _LT_COMPILER_PIC($1) 10756515ec619Smrg _LT_COMPILER_C_O($1) 10757515ec619Smrg _LT_COMPILER_FILE_LOCKS($1) 10758515ec619Smrg _LT_LINKER_SHLIBS($1) 10759515ec619Smrg _LT_SYS_DYNAMIC_LINKER($1) 10760515ec619Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 10761fc544a13Smrg 10762515ec619Smrg _LT_CONFIG($1) 10763515ec619Smrg fi # test -n "$compiler" 10764fc544a13Smrg 10765515ec619Smrg CC=$lt_save_CC 10766515ec619Smrg CFLAGS=$lt_save_CFLAGS 10767515ec619Smrg LDCXX=$LD 10768515ec619Smrg LD=$lt_save_LD 10769515ec619Smrg GCC=$lt_save_GCC 10770515ec619Smrg with_gnu_ld=$lt_save_with_gnu_ld 10771515ec619Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 10772515ec619Smrg lt_cv_path_LD=$lt_save_path_LD 10773515ec619Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10774515ec619Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10775515ec619Smrgfi # test yes != "$_lt_caught_CXX_error" 10776ff559fabSmrg 10777515ec619SmrgAC_LANG_POP 10778515ec619Smrg])# _LT_LANG_CXX_CONFIG 10779ff559fabSmrg 10780515ec619Smrg 10781515ec619Smrg# _LT_FUNC_STRIPNAME_CNF 10782515ec619Smrg# ---------------------- 10783515ec619Smrg# func_stripname_cnf prefix suffix name 10784515ec619Smrg# strip PREFIX and SUFFIX off of NAME. 10785515ec619Smrg# PREFIX and SUFFIX must not contain globbing or regex special 10786515ec619Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 10787515ec619Smrg# dot (in which case that matches only a dot). 10788862f5301Smrg# 10789515ec619Smrg# This function is identical to the (non-XSI) version of func_stripname, 10790515ec619Smrg# except this one can be used by m4 code that may be executed by configure, 10791515ec619Smrg# rather than the libtool script. 10792515ec619Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10793515ec619SmrgAC_REQUIRE([_LT_DECL_SED]) 10794515ec619SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10795515ec619Smrgfunc_stripname_cnf () 10796515ec619Smrg{ 10797515ec619Smrg case @S|@2 in 10798515ec619Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10799515ec619Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10800515ec619Smrg esac 10801515ec619Smrg} # func_stripname_cnf 10802515ec619Smrg])# _LT_FUNC_STRIPNAME_CNF 10803515ec619Smrg 10804515ec619Smrg 10805515ec619Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10806515ec619Smrg# --------------------------------- 10807515ec619Smrg# Figure out "hidden" library dependencies from verbose 10808515ec619Smrg# compiler output when linking a shared library. 10809515ec619Smrg# Parse the compiler output and extract the necessary 10810515ec619Smrg# objects, libraries and library flags. 10811515ec619Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10812515ec619Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10813515ec619SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10814515ec619Smrg# Dependencies to place before and after the object being linked: 10815515ec619Smrg_LT_TAGVAR(predep_objects, $1)= 10816515ec619Smrg_LT_TAGVAR(postdep_objects, $1)= 10817515ec619Smrg_LT_TAGVAR(predeps, $1)= 10818515ec619Smrg_LT_TAGVAR(postdeps, $1)= 10819515ec619Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 10820515ec619Smrg 10821515ec619Smrgdnl we can't use the lt_simple_compile_test_code here, 10822515ec619Smrgdnl because it contains code intended for an executable, 10823515ec619Smrgdnl not a library. It's possible we should let each 10824515ec619Smrgdnl tag define a new lt_????_link_test_code variable, 10825515ec619Smrgdnl but it's only used here... 10826515ec619Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10827515ec619Smrgint a; 10828515ec619Smrgvoid foo (void) { a = 0; } 10829515ec619Smrg_LT_EOF 10830515ec619Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10831515ec619Smrgclass Foo 10832515ec619Smrg{ 10833515ec619Smrgpublic: 10834515ec619Smrg Foo (void) { a = 0; } 10835515ec619Smrgprivate: 10836515ec619Smrg int a; 10837515ec619Smrg}; 10838515ec619Smrg_LT_EOF 10839515ec619Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10840515ec619Smrg subroutine foo 10841515ec619Smrg implicit none 10842515ec619Smrg integer*4 a 10843515ec619Smrg a=0 10844515ec619Smrg return 10845515ec619Smrg end 10846515ec619Smrg_LT_EOF 10847515ec619Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10848515ec619Smrg subroutine foo 10849515ec619Smrg implicit none 10850515ec619Smrg integer a 10851515ec619Smrg a=0 10852515ec619Smrg return 10853515ec619Smrg end 10854515ec619Smrg_LT_EOF 10855515ec619Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10856515ec619Smrgpublic class foo { 10857515ec619Smrg private int a; 10858515ec619Smrg public void bar (void) { 10859515ec619Smrg a = 0; 10860515ec619Smrg } 10861515ec619Smrg}; 10862515ec619Smrg_LT_EOF 10863515ec619Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10864515ec619Smrgpackage foo 10865515ec619Smrgfunc foo() { 10866515ec619Smrg} 10867515ec619Smrg_LT_EOF 10868515ec619Smrg]) 10869ff559fabSmrg 10870515ec619Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 10871515ec619Smrgcase "$CC $CFLAGS " in #( 10872515ec619Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10873515ec619Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10874515ec619Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 10875515ec619Smrgesac 1087644dda7b2Smrg 10877515ec619Smrgdnl Parse the compiler output and extract the necessary 10878515ec619Smrgdnl objects, libraries and library flags. 10879515ec619Smrgif AC_TRY_EVAL(ac_compile); then 10880515ec619Smrg # Parse the compiler output and extract the necessary 10881515ec619Smrg # objects, libraries and library flags. 108827a3b38f7Smrg 10883515ec619Smrg # Sentinel used to keep track of whether or not we are before 10884515ec619Smrg # the conftest object file. 10885515ec619Smrg pre_test_object_deps_done=no 108867a3b38f7Smrg 10887515ec619Smrg for p in `eval "$output_verbose_link_cmd"`; do 10888515ec619Smrg case $prev$p in 10889fc544a13Smrg 10890515ec619Smrg -L* | -R* | -l*) 10891515ec619Smrg # Some compilers place space between "-{L,R}" and the path. 10892515ec619Smrg # Remove the space. 10893515ec619Smrg if test x-L = "$p" || 10894515ec619Smrg test x-R = "$p"; then 10895515ec619Smrg prev=$p 10896515ec619Smrg continue 10897515ec619Smrg fi 10898ff559fabSmrg 10899515ec619Smrg # Expand the sysroot to ease extracting the directories later. 10900515ec619Smrg if test -z "$prev"; then 10901515ec619Smrg case $p in 10902515ec619Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 10903515ec619Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 10904515ec619Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 10905515ec619Smrg esac 10906515ec619Smrg fi 10907515ec619Smrg case $p in 10908515ec619Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 10909515ec619Smrg esac 10910515ec619Smrg if test no = "$pre_test_object_deps_done"; then 10911515ec619Smrg case $prev in 10912515ec619Smrg -L | -R) 10913515ec619Smrg # Internal compiler library paths should come after those 10914515ec619Smrg # provided the user. The postdeps already come after the 10915515ec619Smrg # user supplied libs so there is no need to process them. 10916515ec619Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 10917515ec619Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 10918515ec619Smrg else 10919515ec619Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 10920515ec619Smrg fi 10921515ec619Smrg ;; 10922515ec619Smrg # The "-l" case would never come before the object being 10923515ec619Smrg # linked, so don't bother handling this case. 10924515ec619Smrg esac 10925515ec619Smrg else 10926515ec619Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 10927515ec619Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 10928515ec619Smrg else 10929515ec619Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 10930515ec619Smrg fi 10931515ec619Smrg fi 10932515ec619Smrg prev= 10933515ec619Smrg ;; 10934515ec619Smrg 10935515ec619Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 10936515ec619Smrg *.$objext) 10937515ec619Smrg # This assumes that the test object file only shows up 10938515ec619Smrg # once in the compiler output. 10939515ec619Smrg if test "$p" = "conftest.$objext"; then 10940515ec619Smrg pre_test_object_deps_done=yes 10941515ec619Smrg continue 10942515ec619Smrg fi 10943515ec619Smrg 10944515ec619Smrg if test no = "$pre_test_object_deps_done"; then 10945515ec619Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 10946515ec619Smrg _LT_TAGVAR(predep_objects, $1)=$p 10947515ec619Smrg else 10948515ec619Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 10949515ec619Smrg fi 10950515ec619Smrg else 10951515ec619Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 10952515ec619Smrg _LT_TAGVAR(postdep_objects, $1)=$p 10953515ec619Smrg else 10954515ec619Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 10955515ec619Smrg fi 10956515ec619Smrg fi 10957515ec619Smrg ;; 10958ff559fabSmrg 10959515ec619Smrg *) ;; # Ignore the rest. 10960ff559fabSmrg 10961515ec619Smrg esac 10962515ec619Smrg done 10963ff559fabSmrg 10964515ec619Smrg # Clean up. 10965515ec619Smrg rm -f a.out a.exe 10966515ec619Smrgelse 10967515ec619Smrg echo "libtool.m4: error: problem compiling $1 test program" 109686fc0178dSmrgfi 109696fc0178dSmrg 10970515ec619Smrg$RM -f confest.$objext 10971515ec619SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 109726fc0178dSmrg 10973515ec619Smrg# PORTME: override above test on systems where it is broken 10974515ec619Smrgm4_if([$1], [CXX], 10975515ec619Smrg[case $host_os in 10976515ec619Smrginterix[[3-9]]*) 10977515ec619Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 10978515ec619Smrg # hack all around it, let's just trust "g++" to DTRT. 10979515ec619Smrg _LT_TAGVAR(predep_objects,$1)= 10980515ec619Smrg _LT_TAGVAR(postdep_objects,$1)= 10981515ec619Smrg _LT_TAGVAR(postdeps,$1)= 10982515ec619Smrg ;; 10983515ec619Smrgesac 10984515ec619Smrg]) 10985515ec619Smrg 10986515ec619Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 10987515ec619Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 10988515ec619Smrgesac 10989515ec619Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 10990515ec619Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 10991515ec619Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 109926fc0178dSmrgfi 10993515ec619Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 10994515ec619Smrg [The directories searched by this compiler when creating a shared library]) 10995515ec619Smrg_LT_TAGDECL([], [predep_objects], [1], 10996515ec619Smrg [Dependencies to place before and after the objects being linked to 10997515ec619Smrg create a shared library]) 10998515ec619Smrg_LT_TAGDECL([], [postdep_objects], [1]) 10999515ec619Smrg_LT_TAGDECL([], [predeps], [1]) 11000515ec619Smrg_LT_TAGDECL([], [postdeps], [1]) 11001515ec619Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11002515ec619Smrg [The library search path used internally by the compiler when linking 11003515ec619Smrg a shared library]) 11004515ec619Smrg])# _LT_SYS_HIDDEN_LIBDEPS 110056fc0178dSmrg 11006515ec619Smrg 11007515ec619Smrg# _LT_LANG_F77_CONFIG([TAG]) 11008515ec619Smrg# -------------------------- 11009515ec619Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 11010515ec619Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11011515ec619Smrg# to write the compiler configuration to 'libtool'. 11012515ec619Smrgm4_defun([_LT_LANG_F77_CONFIG], 11013515ec619Smrg[AC_LANG_PUSH(Fortran 77) 11014515ec619Smrgif test -z "$F77" || test no = "$F77"; then 11015515ec619Smrg _lt_disable_F77=yes 110166fc0178dSmrgfi 110176fc0178dSmrg 11018515ec619Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11019515ec619Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11020515ec619Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11021515ec619Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11022515ec619Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11023515ec619Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11024515ec619Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11025515ec619Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11026515ec619Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11027515ec619Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11028515ec619Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11029515ec619Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11030515ec619Smrg_LT_TAGVAR(module_cmds, $1)= 11031515ec619Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11032515ec619Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11033515ec619Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11034515ec619Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11035515ec619Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11036515ec619Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11037515ec619Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11038515ec619Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11039515ec619Smrg 11040515ec619Smrg# Source file extension for f77 test sources. 11041515ec619Smrgac_ext=f 11042515ec619Smrg 11043515ec619Smrg# Object file extension for compiled f77 test sources. 11044515ec619Smrgobjext=o 11045515ec619Smrg_LT_TAGVAR(objext, $1)=$objext 11046515ec619Smrg 11047515ec619Smrg# No sense in running all these tests if we already determined that 11048515ec619Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 11049515ec619Smrg# are currently assumed to apply to all compilers on this platform, 11050515ec619Smrg# and will be corrupted by setting them based on a non-working compiler. 11051515ec619Smrgif test yes != "$_lt_disable_F77"; then 11052515ec619Smrg # Code to be used in simple compile tests 11053515ec619Smrg lt_simple_compile_test_code="\ 11054515ec619Smrg subroutine t 11055515ec619Smrg return 11056515ec619Smrg end 11057515ec619Smrg" 11058515ec619Smrg 11059515ec619Smrg # Code to be used in simple link tests 11060515ec619Smrg lt_simple_link_test_code="\ 11061515ec619Smrg program t 11062515ec619Smrg end 11063515ec619Smrg" 11064515ec619Smrg 11065515ec619Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11066515ec619Smrg _LT_TAG_COMPILER 11067515ec619Smrg 11068515ec619Smrg # save warnings/boilerplate of simple test code 11069515ec619Smrg _LT_COMPILER_BOILERPLATE 11070515ec619Smrg _LT_LINKER_BOILERPLATE 11071515ec619Smrg 11072515ec619Smrg # Allow CC to be a program name with arguments. 11073515ec619Smrg lt_save_CC=$CC 11074515ec619Smrg lt_save_GCC=$GCC 11075515ec619Smrg lt_save_CFLAGS=$CFLAGS 11076515ec619Smrg CC=${F77-"f77"} 11077515ec619Smrg CFLAGS=$FFLAGS 11078515ec619Smrg compiler=$CC 11079515ec619Smrg _LT_TAGVAR(compiler, $1)=$CC 11080515ec619Smrg _LT_CC_BASENAME([$compiler]) 11081515ec619Smrg GCC=$G77 11082515ec619Smrg if test -n "$compiler"; then 11083515ec619Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11084515ec619Smrg AC_MSG_RESULT([$can_build_shared]) 110856fc0178dSmrg 11086515ec619Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11087515ec619Smrg test no = "$can_build_shared" && enable_shared=no 110886fc0178dSmrg 11089515ec619Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11090515ec619Smrg # are all built from PIC. 11091515ec619Smrg case $host_os in 11092515ec619Smrg aix3*) 11093515ec619Smrg test yes = "$enable_shared" && enable_static=no 11094515ec619Smrg if test -n "$RANLIB"; then 11095515ec619Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11096515ec619Smrg postinstall_cmds='$RANLIB $lib' 11097515ec619Smrg fi 110986fc0178dSmrg ;; 11099515ec619Smrg aix[[4-9]]*) 11100515ec619Smrg if test ia64 != "$host_cpu"; then 11101515ec619Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11102515ec619Smrg yes,aix,yes) ;; # shared object as lib.so file only 11103515ec619Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11104515ec619Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11105515ec619Smrg esac 11106515ec619Smrg fi 111076fc0178dSmrg ;; 11108515ec619Smrg esac 11109515ec619Smrg AC_MSG_RESULT([$enable_shared]) 111106fc0178dSmrg 11111515ec619Smrg AC_MSG_CHECKING([whether to build static libraries]) 11112515ec619Smrg # Make sure either enable_shared or enable_static is yes. 11113515ec619Smrg test yes = "$enable_shared" || enable_static=yes 11114515ec619Smrg AC_MSG_RESULT([$enable_static]) 111156fc0178dSmrg 11116515ec619Smrg _LT_TAGVAR(GCC, $1)=$G77 11117515ec619Smrg _LT_TAGVAR(LD, $1)=$LD 111186fc0178dSmrg 11119515ec619Smrg ## CAVEAT EMPTOR: 11120515ec619Smrg ## There is no encapsulation within the following macros, do not change 11121515ec619Smrg ## the running order or otherwise move them around unless you know exactly 11122515ec619Smrg ## what you are doing... 11123515ec619Smrg _LT_COMPILER_PIC($1) 11124515ec619Smrg _LT_COMPILER_C_O($1) 11125515ec619Smrg _LT_COMPILER_FILE_LOCKS($1) 11126515ec619Smrg _LT_LINKER_SHLIBS($1) 11127515ec619Smrg _LT_SYS_DYNAMIC_LINKER($1) 11128515ec619Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 111296fc0178dSmrg 11130515ec619Smrg _LT_CONFIG($1) 11131515ec619Smrg fi # test -n "$compiler" 111326fc0178dSmrg 11133515ec619Smrg GCC=$lt_save_GCC 11134515ec619Smrg CC=$lt_save_CC 11135515ec619Smrg CFLAGS=$lt_save_CFLAGS 11136515ec619Smrgfi # test yes != "$_lt_disable_F77" 11137515ec619Smrg 11138515ec619SmrgAC_LANG_POP 11139515ec619Smrg])# _LT_LANG_F77_CONFIG 11140515ec619Smrg 11141515ec619Smrg 11142515ec619Smrg# _LT_LANG_FC_CONFIG([TAG]) 11143515ec619Smrg# ------------------------- 11144515ec619Smrg# Ensure that the configuration variables for a Fortran compiler are 11145515ec619Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11146515ec619Smrg# to write the compiler configuration to 'libtool'. 11147515ec619Smrgm4_defun([_LT_LANG_FC_CONFIG], 11148515ec619Smrg[AC_LANG_PUSH(Fortran) 11149515ec619Smrg 11150515ec619Smrgif test -z "$FC" || test no = "$FC"; then 11151515ec619Smrg _lt_disable_FC=yes 111526fc0178dSmrgfi 111536fc0178dSmrg 11154515ec619Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11155515ec619Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11156515ec619Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11157515ec619Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11158515ec619Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11159515ec619Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11160515ec619Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11161515ec619Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11162515ec619Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11163515ec619Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11164515ec619Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11165515ec619Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11166515ec619Smrg_LT_TAGVAR(module_cmds, $1)= 11167515ec619Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11168515ec619Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11169515ec619Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11170515ec619Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11171515ec619Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11172515ec619Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11173515ec619Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11174515ec619Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 111756fc0178dSmrg 11176515ec619Smrg# Source file extension for fc test sources. 11177515ec619Smrgac_ext=${ac_fc_srcext-f} 111786fc0178dSmrg 11179515ec619Smrg# Object file extension for compiled fc test sources. 11180515ec619Smrgobjext=o 11181515ec619Smrg_LT_TAGVAR(objext, $1)=$objext 111826fc0178dSmrg 11183515ec619Smrg# No sense in running all these tests if we already determined that 11184515ec619Smrg# the FC compiler isn't working. Some variables (like enable_shared) 11185515ec619Smrg# are currently assumed to apply to all compilers on this platform, 11186515ec619Smrg# and will be corrupted by setting them based on a non-working compiler. 11187515ec619Smrgif test yes != "$_lt_disable_FC"; then 11188515ec619Smrg # Code to be used in simple compile tests 11189515ec619Smrg lt_simple_compile_test_code="\ 11190515ec619Smrg subroutine t 11191515ec619Smrg return 11192515ec619Smrg end 11193515ec619Smrg" 111946fc0178dSmrg 11195515ec619Smrg # Code to be used in simple link tests 11196515ec619Smrg lt_simple_link_test_code="\ 11197515ec619Smrg program t 11198515ec619Smrg end 11199515ec619Smrg" 112006fc0178dSmrg 11201515ec619Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11202515ec619Smrg _LT_TAG_COMPILER 112036fc0178dSmrg 11204515ec619Smrg # save warnings/boilerplate of simple test code 11205515ec619Smrg _LT_COMPILER_BOILERPLATE 11206515ec619Smrg _LT_LINKER_BOILERPLATE 112076fc0178dSmrg 11208515ec619Smrg # Allow CC to be a program name with arguments. 11209515ec619Smrg lt_save_CC=$CC 11210515ec619Smrg lt_save_GCC=$GCC 11211515ec619Smrg lt_save_CFLAGS=$CFLAGS 11212515ec619Smrg CC=${FC-"f95"} 11213515ec619Smrg CFLAGS=$FCFLAGS 11214515ec619Smrg compiler=$CC 11215515ec619Smrg GCC=$ac_cv_fc_compiler_gnu 112166fc0178dSmrg 11217515ec619Smrg _LT_TAGVAR(compiler, $1)=$CC 11218515ec619Smrg _LT_CC_BASENAME([$compiler]) 112196fc0178dSmrg 11220515ec619Smrg if test -n "$compiler"; then 11221515ec619Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11222515ec619Smrg AC_MSG_RESULT([$can_build_shared]) 112236fc0178dSmrg 11224515ec619Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11225515ec619Smrg test no = "$can_build_shared" && enable_shared=no 112266fc0178dSmrg 11227515ec619Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11228515ec619Smrg # are all built from PIC. 11229515ec619Smrg case $host_os in 11230515ec619Smrg aix3*) 11231515ec619Smrg test yes = "$enable_shared" && enable_static=no 11232515ec619Smrg if test -n "$RANLIB"; then 11233515ec619Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11234515ec619Smrg postinstall_cmds='$RANLIB $lib' 11235515ec619Smrg fi 11236515ec619Smrg ;; 11237515ec619Smrg aix[[4-9]]*) 11238515ec619Smrg if test ia64 != "$host_cpu"; then 11239515ec619Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11240515ec619Smrg yes,aix,yes) ;; # shared object as lib.so file only 11241515ec619Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11242515ec619Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11243515ec619Smrg esac 11244515ec619Smrg fi 11245515ec619Smrg ;; 11246515ec619Smrg esac 11247515ec619Smrg AC_MSG_RESULT([$enable_shared]) 112486fc0178dSmrg 11249515ec619Smrg AC_MSG_CHECKING([whether to build static libraries]) 11250515ec619Smrg # Make sure either enable_shared or enable_static is yes. 11251515ec619Smrg test yes = "$enable_shared" || enable_static=yes 11252515ec619Smrg AC_MSG_RESULT([$enable_static]) 112536fc0178dSmrg 11254515ec619Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11255515ec619Smrg _LT_TAGVAR(LD, $1)=$LD 112566fc0178dSmrg 11257515ec619Smrg ## CAVEAT EMPTOR: 11258515ec619Smrg ## There is no encapsulation within the following macros, do not change 11259515ec619Smrg ## the running order or otherwise move them around unless you know exactly 11260515ec619Smrg ## what you are doing... 11261515ec619Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 11262515ec619Smrg _LT_COMPILER_PIC($1) 11263515ec619Smrg _LT_COMPILER_C_O($1) 11264515ec619Smrg _LT_COMPILER_FILE_LOCKS($1) 11265515ec619Smrg _LT_LINKER_SHLIBS($1) 11266515ec619Smrg _LT_SYS_DYNAMIC_LINKER($1) 11267515ec619Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 112686fc0178dSmrg 11269515ec619Smrg _LT_CONFIG($1) 11270515ec619Smrg fi # test -n "$compiler" 112716fc0178dSmrg 11272515ec619Smrg GCC=$lt_save_GCC 11273515ec619Smrg CC=$lt_save_CC 11274515ec619Smrg CFLAGS=$lt_save_CFLAGS 11275515ec619Smrgfi # test yes != "$_lt_disable_FC" 112766fc0178dSmrg 11277515ec619SmrgAC_LANG_POP 11278515ec619Smrg])# _LT_LANG_FC_CONFIG 112796fc0178dSmrg 112806fc0178dSmrg 11281515ec619Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 11282515ec619Smrg# -------------------------- 11283515ec619Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11284515ec619Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11285515ec619Smrg# to write the compiler configuration to 'libtool'. 11286515ec619Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 11287515ec619Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11288515ec619SmrgAC_LANG_SAVE 112896fc0178dSmrg 11290515ec619Smrg# Source file extension for Java test sources. 11291515ec619Smrgac_ext=java 112926fc0178dSmrg 11293515ec619Smrg# Object file extension for compiled Java test sources. 11294515ec619Smrgobjext=o 11295515ec619Smrg_LT_TAGVAR(objext, $1)=$objext 112966fc0178dSmrg 11297515ec619Smrg# Code to be used in simple compile tests 11298515ec619Smrglt_simple_compile_test_code="class foo {}" 112996fc0178dSmrg 11300515ec619Smrg# Code to be used in simple link tests 11301515ec619Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 113026fc0178dSmrg 11303515ec619Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11304515ec619Smrg_LT_TAG_COMPILER 113056fc0178dSmrg 11306515ec619Smrg# save warnings/boilerplate of simple test code 11307515ec619Smrg_LT_COMPILER_BOILERPLATE 11308515ec619Smrg_LT_LINKER_BOILERPLATE 113096fc0178dSmrg 11310515ec619Smrg# Allow CC to be a program name with arguments. 11311515ec619Smrglt_save_CC=$CC 11312515ec619Smrglt_save_CFLAGS=$CFLAGS 11313515ec619Smrglt_save_GCC=$GCC 11314515ec619SmrgGCC=yes 11315515ec619SmrgCC=${GCJ-"gcj"} 11316515ec619SmrgCFLAGS=$GCJFLAGS 11317515ec619Smrgcompiler=$CC 11318515ec619Smrg_LT_TAGVAR(compiler, $1)=$CC 11319515ec619Smrg_LT_TAGVAR(LD, $1)=$LD 11320515ec619Smrg_LT_CC_BASENAME([$compiler]) 113216fc0178dSmrg 11322515ec619Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11323515ec619Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 113246fc0178dSmrg 11325515ec619Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11326515ec619Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11327515ec619Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11328515ec619Smrg 11329515ec619Smrgif test -n "$compiler"; then 11330515ec619Smrg _LT_COMPILER_NO_RTTI($1) 11331515ec619Smrg _LT_COMPILER_PIC($1) 11332515ec619Smrg _LT_COMPILER_C_O($1) 11333515ec619Smrg _LT_COMPILER_FILE_LOCKS($1) 11334515ec619Smrg _LT_LINKER_SHLIBS($1) 11335515ec619Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11336515ec619Smrg 11337515ec619Smrg _LT_CONFIG($1) 113386fc0178dSmrgfi 113396fc0178dSmrg 11340515ec619SmrgAC_LANG_RESTORE 11341515ec619Smrg 11342515ec619SmrgGCC=$lt_save_GCC 11343515ec619SmrgCC=$lt_save_CC 11344515ec619SmrgCFLAGS=$lt_save_CFLAGS 11345515ec619Smrg])# _LT_LANG_GCJ_CONFIG 113466fc0178dSmrg 113476fc0178dSmrg 11348515ec619Smrg# _LT_LANG_GO_CONFIG([TAG]) 11349515ec619Smrg# -------------------------- 11350515ec619Smrg# Ensure that the configuration variables for the GNU Go compiler 11351515ec619Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11352515ec619Smrg# to write the compiler configuration to 'libtool'. 11353515ec619Smrgm4_defun([_LT_LANG_GO_CONFIG], 11354515ec619Smrg[AC_REQUIRE([LT_PROG_GO])dnl 11355515ec619SmrgAC_LANG_SAVE 113566fc0178dSmrg 11357515ec619Smrg# Source file extension for Go test sources. 11358515ec619Smrgac_ext=go 113596fc0178dSmrg 11360515ec619Smrg# Object file extension for compiled Go test sources. 11361515ec619Smrgobjext=o 11362515ec619Smrg_LT_TAGVAR(objext, $1)=$objext 113636fc0178dSmrg 11364515ec619Smrg# Code to be used in simple compile tests 11365515ec619Smrglt_simple_compile_test_code="package main; func main() { }" 113666fc0178dSmrg 11367515ec619Smrg# Code to be used in simple link tests 11368515ec619Smrglt_simple_link_test_code='package main; func main() { }' 113696fc0178dSmrg 11370515ec619Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11371515ec619Smrg_LT_TAG_COMPILER 113726fc0178dSmrg 11373515ec619Smrg# save warnings/boilerplate of simple test code 11374515ec619Smrg_LT_COMPILER_BOILERPLATE 11375515ec619Smrg_LT_LINKER_BOILERPLATE 113766fc0178dSmrg 11377515ec619Smrg# Allow CC to be a program name with arguments. 11378515ec619Smrglt_save_CC=$CC 11379515ec619Smrglt_save_CFLAGS=$CFLAGS 11380515ec619Smrglt_save_GCC=$GCC 11381515ec619SmrgGCC=yes 11382515ec619SmrgCC=${GOC-"gccgo"} 11383515ec619SmrgCFLAGS=$GOFLAGS 11384515ec619Smrgcompiler=$CC 11385515ec619Smrg_LT_TAGVAR(compiler, $1)=$CC 11386515ec619Smrg_LT_TAGVAR(LD, $1)=$LD 11387515ec619Smrg_LT_CC_BASENAME([$compiler]) 113886fc0178dSmrg 11389515ec619Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 11390515ec619Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 113916fc0178dSmrg 11392515ec619Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11393515ec619Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11394515ec619Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 113956fc0178dSmrg 11396515ec619Smrgif test -n "$compiler"; then 11397515ec619Smrg _LT_COMPILER_NO_RTTI($1) 11398515ec619Smrg _LT_COMPILER_PIC($1) 11399515ec619Smrg _LT_COMPILER_C_O($1) 11400515ec619Smrg _LT_COMPILER_FILE_LOCKS($1) 11401515ec619Smrg _LT_LINKER_SHLIBS($1) 11402515ec619Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 114036fc0178dSmrg 11404515ec619Smrg _LT_CONFIG($1) 114056fc0178dSmrgfi 114066fc0178dSmrg 11407515ec619SmrgAC_LANG_RESTORE 114086fc0178dSmrg 11409515ec619SmrgGCC=$lt_save_GCC 11410515ec619SmrgCC=$lt_save_CC 11411515ec619SmrgCFLAGS=$lt_save_CFLAGS 11412515ec619Smrg])# _LT_LANG_GO_CONFIG 11413515ec619Smrg 11414515ec619Smrg 11415515ec619Smrg# _LT_LANG_RC_CONFIG([TAG]) 11416515ec619Smrg# ------------------------- 11417515ec619Smrg# Ensure that the configuration variables for the Windows resource compiler 11418515ec619Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11419515ec619Smrg# to write the compiler configuration to 'libtool'. 11420515ec619Smrgm4_defun([_LT_LANG_RC_CONFIG], 11421515ec619Smrg[AC_REQUIRE([LT_PROG_RC])dnl 11422515ec619SmrgAC_LANG_SAVE 11423515ec619Smrg 11424515ec619Smrg# Source file extension for RC test sources. 11425515ec619Smrgac_ext=rc 11426515ec619Smrg 11427515ec619Smrg# Object file extension for compiled RC test sources. 11428515ec619Smrgobjext=o 11429515ec619Smrg_LT_TAGVAR(objext, $1)=$objext 11430515ec619Smrg 11431515ec619Smrg# Code to be used in simple compile tests 11432515ec619Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 114336fc0178dSmrg 11434515ec619Smrg# Code to be used in simple link tests 11435515ec619Smrglt_simple_link_test_code=$lt_simple_compile_test_code 114366fc0178dSmrg 11437515ec619Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11438515ec619Smrg_LT_TAG_COMPILER 114396fc0178dSmrg 11440515ec619Smrg# save warnings/boilerplate of simple test code 11441515ec619Smrg_LT_COMPILER_BOILERPLATE 11442515ec619Smrg_LT_LINKER_BOILERPLATE 114436fc0178dSmrg 11444515ec619Smrg# Allow CC to be a program name with arguments. 11445515ec619Smrglt_save_CC=$CC 11446515ec619Smrglt_save_CFLAGS=$CFLAGS 11447515ec619Smrglt_save_GCC=$GCC 11448515ec619SmrgGCC= 11449515ec619SmrgCC=${RC-"windres"} 11450515ec619SmrgCFLAGS= 11451515ec619Smrgcompiler=$CC 11452515ec619Smrg_LT_TAGVAR(compiler, $1)=$CC 11453515ec619Smrg_LT_CC_BASENAME([$compiler]) 11454515ec619Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 114556fc0178dSmrg 11456515ec619Smrgif test -n "$compiler"; then 11457515ec619Smrg : 11458515ec619Smrg _LT_CONFIG($1) 11459515ec619Smrgfi 114606fc0178dSmrg 11461515ec619SmrgGCC=$lt_save_GCC 11462515ec619SmrgAC_LANG_RESTORE 11463515ec619SmrgCC=$lt_save_CC 11464515ec619SmrgCFLAGS=$lt_save_CFLAGS 11465515ec619Smrg])# _LT_LANG_RC_CONFIG 114666fc0178dSmrg 114676fc0178dSmrg 11468515ec619Smrg# LT_PROG_GCJ 11469515ec619Smrg# ----------- 11470515ec619SmrgAC_DEFUN([LT_PROG_GCJ], 11471515ec619Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11472515ec619Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11473515ec619Smrg [AC_CHECK_TOOL(GCJ, gcj,) 11474515ec619Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11475515ec619Smrg AC_SUBST(GCJFLAGS)])])[]dnl 11476515ec619Smrg]) 114776fc0178dSmrg 11478515ec619Smrg# Old name: 11479515ec619SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11480515ec619Smrgdnl aclocal-1.4 backwards compatibility: 11481515ec619Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 114826fc0178dSmrg 114836fc0178dSmrg 11484515ec619Smrg# LT_PROG_GO 11485515ec619Smrg# ---------- 11486515ec619SmrgAC_DEFUN([LT_PROG_GO], 11487515ec619Smrg[AC_CHECK_TOOL(GOC, gccgo,) 114886fc0178dSmrg]) 114896fc0178dSmrg 114906fc0178dSmrg 11491515ec619Smrg# LT_PROG_RC 11492515ec619Smrg# ---------- 11493515ec619SmrgAC_DEFUN([LT_PROG_RC], 11494515ec619Smrg[AC_CHECK_TOOL(RC, windres,) 11495515ec619Smrg]) 114966fc0178dSmrg 11497515ec619Smrg# Old name: 11498515ec619SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11499515ec619Smrgdnl aclocal-1.4 backwards compatibility: 11500515ec619Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 115016fc0178dSmrg 115026fc0178dSmrg 11503515ec619Smrg# _LT_DECL_EGREP 11504515ec619Smrg# -------------- 11505515ec619Smrg# If we don't have a new enough Autoconf to choose the best grep 11506515ec619Smrg# available, choose the one first in the user's PATH. 11507515ec619Smrgm4_defun([_LT_DECL_EGREP], 11508515ec619Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 11509515ec619SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 11510515ec619Smrgtest -z "$GREP" && GREP=grep 11511515ec619Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11512515ec619Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11513515ec619Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11514515ec619Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11515515ec619SmrgAC_SUBST([GREP]) 11516515ec619Smrg]) 115176fc0178dSmrg 115186fc0178dSmrg 11519515ec619Smrg# _LT_DECL_OBJDUMP 11520515ec619Smrg# -------------- 11521515ec619Smrg# If we don't have a new enough Autoconf to choose the best objdump 11522515ec619Smrg# available, choose the one first in the user's PATH. 11523515ec619Smrgm4_defun([_LT_DECL_OBJDUMP], 11524515ec619Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11525515ec619Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11526515ec619Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11527515ec619SmrgAC_SUBST([OBJDUMP]) 11528515ec619Smrg]) 115296fc0178dSmrg 11530515ec619Smrg# _LT_DECL_DLLTOOL 11531515ec619Smrg# ---------------- 11532515ec619Smrg# Ensure DLLTOOL variable is set. 11533515ec619Smrgm4_defun([_LT_DECL_DLLTOOL], 11534515ec619Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11535515ec619Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11536515ec619Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11537515ec619SmrgAC_SUBST([DLLTOOL]) 11538515ec619Smrg]) 115396fc0178dSmrg 11540515ec619Smrg# _LT_DECL_FILECMD 11541515ec619Smrg# ---------------- 11542515ec619Smrg# Check for a file(cmd) program that can be used to detect file type and magic 11543515ec619Smrgm4_defun([_LT_DECL_FILECMD], 11544515ec619Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 11545515ec619Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11546515ec619Smrg])# _LD_DECL_FILECMD 115476fc0178dSmrg 11548515ec619Smrg# _LT_DECL_SED 11549515ec619Smrg# ------------ 11550515ec619Smrg# Check for a fully-functional sed program, that truncates 11551515ec619Smrg# as few characters as possible. Prefer GNU sed if found. 11552515ec619Smrgm4_defun([_LT_DECL_SED], 11553515ec619Smrg[AC_PROG_SED 11554515ec619Smrgtest -z "$SED" && SED=sed 11555515ec619SmrgXsed="$SED -e 1s/^X//" 11556515ec619Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11557515ec619Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11558515ec619Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11559515ec619Smrg])# _LT_DECL_SED 115606fc0178dSmrg 11561515ec619Smrgm4_ifndef([AC_PROG_SED], [ 11562515ec619Smrg# NOTE: This macro has been submitted for inclusion into # 11563515ec619Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 11564515ec619Smrg# a released version of Autoconf we should remove this # 11565515ec619Smrg# macro and use it instead. # 115666fc0178dSmrg 11567515ec619Smrgm4_defun([AC_PROG_SED], 11568515ec619Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 11569515ec619SmrgAC_CACHE_VAL(lt_cv_path_SED, 11570515ec619Smrg[# Loop through the user's path and test for sed and gsed. 11571515ec619Smrg# Then use that list of sed's as ones to test for truncation. 11572515ec619Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11573515ec619Smrgfor as_dir in $PATH 11574515ec619Smrgdo 11575515ec619Smrg IFS=$as_save_IFS 11576515ec619Smrg test -z "$as_dir" && as_dir=. 11577515ec619Smrg for lt_ac_prog in sed gsed; do 11578515ec619Smrg for ac_exec_ext in '' $ac_executable_extensions; do 11579515ec619Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11580515ec619Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 115816fc0178dSmrg fi 11582515ec619Smrg done 11583515ec619Smrg done 11584515ec619Smrgdone 11585515ec619SmrgIFS=$as_save_IFS 11586515ec619Smrglt_ac_max=0 11587515ec619Smrglt_ac_count=0 11588515ec619Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11589515ec619Smrg# along with /bin/sed that truncates output. 11590515ec619Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11591515ec619Smrg test ! -f "$lt_ac_sed" && continue 11592515ec619Smrg cat /dev/null > conftest.in 11593515ec619Smrg lt_ac_count=0 11594515ec619Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11595515ec619Smrg # Check for GNU sed and select it if it is found. 11596515ec619Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11597515ec619Smrg lt_cv_path_SED=$lt_ac_sed 11598515ec619Smrg break 11599515ec619Smrg fi 11600515ec619Smrg while true; do 11601515ec619Smrg cat conftest.in conftest.in >conftest.tmp 11602515ec619Smrg mv conftest.tmp conftest.in 11603515ec619Smrg cp conftest.in conftest.nl 11604515ec619Smrg echo >>conftest.nl 11605515ec619Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11606515ec619Smrg cmp -s conftest.out conftest.nl || break 11607515ec619Smrg # 10000 chars as input seems more than enough 11608515ec619Smrg test 10 -lt "$lt_ac_count" && break 11609515ec619Smrg lt_ac_count=`expr $lt_ac_count + 1` 11610515ec619Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 11611515ec619Smrg lt_ac_max=$lt_ac_count 11612515ec619Smrg lt_cv_path_SED=$lt_ac_sed 116136fc0178dSmrg fi 116146fc0178dSmrg done 11615515ec619Smrgdone 11616515ec619Smrg]) 11617515ec619SmrgSED=$lt_cv_path_SED 11618515ec619SmrgAC_SUBST([SED]) 11619515ec619SmrgAC_MSG_RESULT([$SED]) 11620515ec619Smrg])#AC_PROG_SED 11621515ec619Smrg])#m4_ifndef 116226fc0178dSmrg 11623515ec619Smrg# Old name: 11624515ec619SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11625515ec619Smrgdnl aclocal-1.4 backwards compatibility: 11626515ec619Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 11627515ec619Smrg 11628515ec619Smrg 11629515ec619Smrg# _LT_CHECK_SHELL_FEATURES 11630515ec619Smrg# ------------------------ 11631515ec619Smrg# Find out whether the shell is Bourne or XSI compatible, 11632515ec619Smrg# or has some other useful features. 11633515ec619Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 11634515ec619Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11635515ec619Smrg lt_unset=unset 116366fc0178dSmrgelse 11637515ec619Smrg lt_unset=false 116386fc0178dSmrgfi 11639515ec619Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11640515ec619Smrg 11641515ec619Smrg# test EBCDIC or ASCII 11642515ec619Smrgcase `echo X|tr X '\101'` in 11643515ec619Smrg A) # ASCII based system 11644515ec619Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11645515ec619Smrg lt_SP2NL='tr \040 \012' 11646515ec619Smrg lt_NL2SP='tr \015\012 \040\040' 11647515ec619Smrg ;; 11648515ec619Smrg *) # EBCDIC based system 11649515ec619Smrg lt_SP2NL='tr \100 \n' 11650515ec619Smrg lt_NL2SP='tr \r\n \100\100' 11651515ec619Smrg ;; 11652515ec619Smrgesac 11653515ec619Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11654515ec619Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11655515ec619Smrg])# _LT_CHECK_SHELL_FEATURES 11656515ec619Smrg 11657515ec619Smrg 11658515ec619Smrg# _LT_PATH_CONVERSION_FUNCTIONS 11659515ec619Smrg# ----------------------------- 11660515ec619Smrg# Determine what file name conversion functions should be used by 11661515ec619Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11662515ec619Smrg# for certain cross-compile configurations and native mingw. 11663515ec619Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11664515ec619Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11665515ec619SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11666515ec619SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 11667515ec619SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 11668515ec619Smrg[case $host in 11669515ec619Smrg *-*-mingw* ) 11670515ec619Smrg case $build in 11671515ec619Smrg *-*-mingw* ) # actually msys 11672515ec619Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11673515ec619Smrg ;; 11674515ec619Smrg *-*-cygwin* ) 11675515ec619Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11676515ec619Smrg ;; 11677515ec619Smrg * ) # otherwise, assume *nix 11678515ec619Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11679515ec619Smrg ;; 11680515ec619Smrg esac 11681515ec619Smrg ;; 11682515ec619Smrg *-*-cygwin* ) 11683515ec619Smrg case $build in 11684515ec619Smrg *-*-mingw* ) # actually msys 11685515ec619Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11686515ec619Smrg ;; 11687515ec619Smrg *-*-cygwin* ) 11688515ec619Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 11689515ec619Smrg ;; 11690515ec619Smrg * ) # otherwise, assume *nix 11691515ec619Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11692515ec619Smrg ;; 11693515ec619Smrg esac 11694515ec619Smrg ;; 11695515ec619Smrg * ) # unhandled hosts (and "normal" native builds) 11696515ec619Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 11697515ec619Smrg ;; 11698515ec619Smrgesac 116996fc0178dSmrg]) 11700515ec619Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 11701515ec619SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11702515ec619Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11703515ec619Smrg [0], [convert $build file names to $host format])dnl 11704515ec619Smrg 11705515ec619SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11706515ec619SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11707515ec619Smrg[#assume ordinary cross tools, or native build. 11708515ec619Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 11709515ec619Smrgcase $host in 11710515ec619Smrg *-*-mingw* ) 11711515ec619Smrg case $build in 11712515ec619Smrg *-*-mingw* ) # actually msys 11713515ec619Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11714515ec619Smrg ;; 11715515ec619Smrg esac 11716515ec619Smrg ;; 11717515ec619Smrgesac 117186fc0178dSmrg]) 11719515ec619Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 11720515ec619SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11721515ec619Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11722515ec619Smrg [0], [convert $build files to toolchain format])dnl 11723515ec619Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 117246fc0178dSmrg 11725515ec619Smrg# Helper functions for option handling. -*- Autoconf -*- 11726515ec619Smrg# 11727515ec619Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11728515ec619Smrg# Software Foundation, Inc. 11729515ec619Smrg# Written by Gary V. Vaughan, 2004 11730515ec619Smrg# 11731515ec619Smrg# This file is free software; the Free Software Foundation gives 11732515ec619Smrg# unlimited permission to copy and/or distribute it, with or without 11733515ec619Smrg# modifications, as long as this notice is preserved. 117346fc0178dSmrg 11735515ec619Smrg# serial 8 ltoptions.m4 11736515ec619Smrg 11737515ec619Smrg# This is to help aclocal find these macros, as it can't see m4_define. 11738515ec619SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11739515ec619Smrg 11740515ec619Smrg 11741515ec619Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11742515ec619Smrg# ------------------------------------------ 11743515ec619Smrgm4_define([_LT_MANGLE_OPTION], 11744515ec619Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11745515ec619Smrg 11746515ec619Smrg 11747515ec619Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11748515ec619Smrg# --------------------------------------- 11749515ec619Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11750515ec619Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11751515ec619Smrg# saved as a flag. 11752515ec619Smrgm4_define([_LT_SET_OPTION], 11753515ec619Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11754515ec619Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11755515ec619Smrg _LT_MANGLE_DEFUN([$1], [$2]), 11756515ec619Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 117576fc0178dSmrg]) 117586fc0178dSmrg 117596fc0178dSmrg 11760515ec619Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11761515ec619Smrg# ------------------------------------------------------------ 11762515ec619Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11763515ec619Smrgm4_define([_LT_IF_OPTION], 11764515ec619Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11765515ec619Smrg 11766515ec619Smrg 11767515ec619Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11768515ec619Smrg# ------------------------------------------------------- 11769515ec619Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11770515ec619Smrg# are set. 11771515ec619Smrgm4_define([_LT_UNLESS_OPTIONS], 11772515ec619Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11773515ec619Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11774515ec619Smrg [m4_define([$0_found])])])[]dnl 11775515ec619Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11776515ec619Smrg])[]dnl 117776fc0178dSmrg]) 117786fc0178dSmrg 117796fc0178dSmrg 11780515ec619Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11781515ec619Smrg# ---------------------------------------- 11782515ec619Smrg# OPTION-LIST is a space-separated list of Libtool options associated 11783515ec619Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 11784515ec619Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11785515ec619Smrg# the unknown option and exit. 11786515ec619Smrgm4_defun([_LT_SET_OPTIONS], 11787515ec619Smrg[# Set options 11788515ec619Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11789515ec619Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 11790515ec619Smrg 11791515ec619Smrgm4_if([$1],[LT_INIT],[ 11792515ec619Smrg dnl 11793515ec619Smrg dnl Simply set some default values (i.e off) if boolean options were not 11794515ec619Smrg dnl specified: 11795515ec619Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11796515ec619Smrg ]) 11797515ec619Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11798515ec619Smrg ]) 11799515ec619Smrg dnl 11800515ec619Smrg dnl If no reference was made to various pairs of opposing options, then 11801515ec619Smrg dnl we run the default mode handler for the pair. For example, if neither 11802515ec619Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11803515ec619Smrg dnl archives by default: 11804515ec619Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11805515ec619Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11806515ec619Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11807515ec619Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11808515ec619Smrg [_LT_ENABLE_FAST_INSTALL]) 11809515ec619Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11810515ec619Smrg [_LT_WITH_AIX_SONAME([aix])]) 11811515ec619Smrg ]) 11812515ec619Smrg])# _LT_SET_OPTIONS 118136fc0178dSmrg 118146fc0178dSmrg 118156fc0178dSmrg 11816515ec619Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11817515ec619Smrg# ----------------------------------------- 11818515ec619Smrgm4_define([_LT_MANGLE_DEFUN], 11819515ec619Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 118206fc0178dSmrg 11821515ec619Smrg 11822515ec619Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11823515ec619Smrg# ----------------------------------------------- 11824515ec619Smrgm4_define([LT_OPTION_DEFINE], 11825515ec619Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11826515ec619Smrg])# LT_OPTION_DEFINE 11827515ec619Smrg 11828515ec619Smrg 11829515ec619Smrg# dlopen 11830515ec619Smrg# ------ 11831515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 118326fc0178dSmrg]) 118336fc0178dSmrg 11834515ec619SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 11835515ec619Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 11836515ec619SmrgAC_DIAGNOSE([obsolete], 11837515ec619Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11838515ec619Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 11839515ec619Smrg]) 118406fc0178dSmrg 11841515ec619Smrgdnl aclocal-1.4 backwards compatibility: 11842515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 118436fc0178dSmrg 118446fc0178dSmrg 11845515ec619Smrg# win32-dll 11846515ec619Smrg# --------- 11847515ec619Smrg# Declare package support for building win32 dll's. 11848515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 11849515ec619Smrg[enable_win32_dll=yes 11850515ec619Smrg 11851515ec619Smrgcase $host in 11852515ec619Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11853515ec619Smrg AC_CHECK_TOOL(AS, as, false) 11854515ec619Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11855515ec619Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 11856515ec619Smrg ;; 11857515ec619Smrgesac 11858515ec619Smrg 11859515ec619Smrgtest -z "$AS" && AS=as 11860515ec619Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 11861515ec619Smrg 11862515ec619Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11863515ec619Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11864515ec619Smrg 11865515ec619Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11866515ec619Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11867515ec619Smrg])# win32-dll 11868515ec619Smrg 11869515ec619SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11870515ec619Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11871515ec619Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 11872515ec619SmrgAC_DIAGNOSE([obsolete], 11873515ec619Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11874515ec619Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 118756fc0178dSmrg]) 118766fc0178dSmrg 11877515ec619Smrgdnl aclocal-1.4 backwards compatibility: 11878515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 11879515ec619Smrg 11880515ec619Smrg 11881515ec619Smrg# _LT_ENABLE_SHARED([DEFAULT]) 11882515ec619Smrg# ---------------------------- 11883515ec619Smrg# implement the --enable-shared flag, and supports the 'shared' and 11884515ec619Smrg# 'disable-shared' LT_INIT options. 11885515ec619Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11886515ec619Smrgm4_define([_LT_ENABLE_SHARED], 11887515ec619Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11888515ec619SmrgAC_ARG_ENABLE([shared], 11889515ec619Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11890515ec619Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11891515ec619Smrg [p=${PACKAGE-default} 11892515ec619Smrg case $enableval in 11893515ec619Smrg yes) enable_shared=yes ;; 11894515ec619Smrg no) enable_shared=no ;; 11895515ec619Smrg *) 11896515ec619Smrg enable_shared=no 11897515ec619Smrg # Look at the argument we got. We use all the common list separators. 11898515ec619Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11899515ec619Smrg for pkg in $enableval; do 11900515ec619Smrg IFS=$lt_save_ifs 11901515ec619Smrg if test "X$pkg" = "X$p"; then 11902515ec619Smrg enable_shared=yes 11903515ec619Smrg fi 11904515ec619Smrg done 11905515ec619Smrg IFS=$lt_save_ifs 11906515ec619Smrg ;; 11907515ec619Smrg esac], 11908515ec619Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 119096fc0178dSmrg 11910515ec619Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 11911515ec619Smrg [Whether or not to build shared libraries]) 11912515ec619Smrg])# _LT_ENABLE_SHARED 11913ff559fabSmrg 11914515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 11915515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 11916ff559fabSmrg 11917515ec619Smrg# Old names: 11918515ec619SmrgAC_DEFUN([AC_ENABLE_SHARED], 11919515ec619Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 11920515ec619Smrg]) 11921ff559fabSmrg 11922515ec619SmrgAC_DEFUN([AC_DISABLE_SHARED], 11923515ec619Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 119246fc0178dSmrg]) 11925ff559fabSmrg 11926515ec619SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 11927515ec619SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 11928ff559fabSmrg 11929515ec619Smrgdnl aclocal-1.4 backwards compatibility: 11930515ec619Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 11931515ec619Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 11932ff559fabSmrg 11933ff559fabSmrg 11934ff559fabSmrg 11935515ec619Smrg# _LT_ENABLE_STATIC([DEFAULT]) 11936515ec619Smrg# ---------------------------- 11937515ec619Smrg# implement the --enable-static flag, and support the 'static' and 11938515ec619Smrg# 'disable-static' LT_INIT options. 11939515ec619Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11940515ec619Smrgm4_define([_LT_ENABLE_STATIC], 11941515ec619Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 11942515ec619SmrgAC_ARG_ENABLE([static], 11943515ec619Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 11944515ec619Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 11945515ec619Smrg [p=${PACKAGE-default} 11946515ec619Smrg case $enableval in 11947515ec619Smrg yes) enable_static=yes ;; 11948515ec619Smrg no) enable_static=no ;; 11949515ec619Smrg *) 11950515ec619Smrg enable_static=no 11951515ec619Smrg # Look at the argument we got. We use all the common list separators. 11952515ec619Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11953515ec619Smrg for pkg in $enableval; do 11954515ec619Smrg IFS=$lt_save_ifs 11955515ec619Smrg if test "X$pkg" = "X$p"; then 11956515ec619Smrg enable_static=yes 11957515ec619Smrg fi 11958515ec619Smrg done 11959515ec619Smrg IFS=$lt_save_ifs 11960515ec619Smrg ;; 11961515ec619Smrg esac], 11962515ec619Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 11963ff559fabSmrg 11964515ec619Smrg _LT_DECL([build_old_libs], [enable_static], [0], 11965515ec619Smrg [Whether or not to build static libraries]) 11966515ec619Smrg])# _LT_ENABLE_STATIC 119677a3b38f7Smrg 11968515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 11969515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 119707a3b38f7Smrg 11971515ec619Smrg# Old names: 11972515ec619SmrgAC_DEFUN([AC_ENABLE_STATIC], 11973515ec619Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 11974515ec619Smrg]) 11975ff559fabSmrg 11976515ec619SmrgAC_DEFUN([AC_DISABLE_STATIC], 11977515ec619Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 11978515ec619Smrg]) 11979ff559fabSmrg 11980515ec619SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 11981515ec619SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 119826fc0178dSmrg 11983515ec619Smrgdnl aclocal-1.4 backwards compatibility: 11984515ec619Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 11985515ec619Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 119867a3b38f7Smrg 119877a3b38f7Smrg 119887a3b38f7Smrg 11989515ec619Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 11990515ec619Smrg# ---------------------------------- 11991515ec619Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 11992515ec619Smrg# and 'disable-fast-install' LT_INIT options. 11993515ec619Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11994515ec619Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 11995515ec619Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 11996515ec619SmrgAC_ARG_ENABLE([fast-install], 11997515ec619Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 11998515ec619Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 11999515ec619Smrg [p=${PACKAGE-default} 12000515ec619Smrg case $enableval in 12001515ec619Smrg yes) enable_fast_install=yes ;; 12002515ec619Smrg no) enable_fast_install=no ;; 12003515ec619Smrg *) 12004515ec619Smrg enable_fast_install=no 12005515ec619Smrg # Look at the argument we got. We use all the common list separators. 12006515ec619Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12007515ec619Smrg for pkg in $enableval; do 12008515ec619Smrg IFS=$lt_save_ifs 12009515ec619Smrg if test "X$pkg" = "X$p"; then 12010515ec619Smrg enable_fast_install=yes 12011515ec619Smrg fi 12012515ec619Smrg done 12013515ec619Smrg IFS=$lt_save_ifs 12014515ec619Smrg ;; 12015515ec619Smrg esac], 12016515ec619Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12017ff559fabSmrg 12018515ec619Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 12019515ec619Smrg [Whether or not to optimize for fast installation])dnl 12020515ec619Smrg])# _LT_ENABLE_FAST_INSTALL 12021ff559fabSmrg 12022515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12023515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 120247a3b38f7Smrg 12025515ec619Smrg# Old names: 12026515ec619SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 12027515ec619Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12028515ec619SmrgAC_DIAGNOSE([obsolete], 12029515ec619Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12030515ec619Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 120316fc0178dSmrg]) 1203244dda7b2Smrg 12033515ec619SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 12034515ec619Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12035515ec619SmrgAC_DIAGNOSE([obsolete], 12036515ec619Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12037515ec619Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 12038515ec619Smrg]) 1203944dda7b2Smrg 12040515ec619Smrgdnl aclocal-1.4 backwards compatibility: 12041515ec619Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12042515ec619Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 120437a3b38f7Smrg 12044862f5301Smrg 12045515ec619Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 12046515ec619Smrg# ---------------------------------- 12047515ec619Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12048515ec619Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12049515ec619Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12050515ec619Smrgm4_define([_LT_WITH_AIX_SONAME], 12051515ec619Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12052515ec619Smrgshared_archive_member_spec= 12053515ec619Smrgcase $host,$enable_shared in 12054515ec619Smrgpower*-*-aix[[5-9]]*,yes) 12055515ec619Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12056515ec619Smrg AC_ARG_WITH([aix-soname], 12057515ec619Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12058515ec619Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12059515ec619Smrg [case $withval in 12060515ec619Smrg aix|svr4|both) 12061515ec619Smrg ;; 12062515ec619Smrg *) 12063515ec619Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12064515ec619Smrg ;; 12065515ec619Smrg esac 12066515ec619Smrg lt_cv_with_aix_soname=$with_aix_soname], 12067515ec619Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 12068515ec619Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12069515ec619Smrg with_aix_soname=$lt_cv_with_aix_soname]) 12070515ec619Smrg AC_MSG_RESULT([$with_aix_soname]) 12071515ec619Smrg if test aix != "$with_aix_soname"; then 12072515ec619Smrg # For the AIX way of multilib, we name the shared archive member 12073515ec619Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12074515ec619Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12075515ec619Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12076515ec619Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 12077515ec619Smrg if test 64 = "${OBJECT_MODE-32}"; then 12078515ec619Smrg shared_archive_member_spec=shr_64 12079515ec619Smrg else 12080515ec619Smrg shared_archive_member_spec=shr 12081515ec619Smrg fi 12082515ec619Smrg fi 12083515ec619Smrg ;; 12084515ec619Smrg*) 12085515ec619Smrg with_aix_soname=aix 12086515ec619Smrg ;; 12087515ec619Smrgesac 120887a3b38f7Smrg 12089515ec619Smrg_LT_DECL([], [shared_archive_member_spec], [0], 12090515ec619Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12091515ec619Smrg])# _LT_WITH_AIX_SONAME 12092862f5301Smrg 12093515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12094515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12095515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12096862f5301Smrg 12097862f5301Smrg 12098515ec619Smrg# _LT_WITH_PIC([MODE]) 120996fc0178dSmrg# -------------------- 12100515ec619Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12101515ec619Smrg# LT_INIT options. 12102515ec619Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12103515ec619Smrgm4_define([_LT_WITH_PIC], 12104515ec619Smrg[AC_ARG_WITH([pic], 12105515ec619Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12106515ec619Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12107515ec619Smrg [lt_p=${PACKAGE-default} 12108515ec619Smrg case $withval in 12109515ec619Smrg yes|no) pic_mode=$withval ;; 12110515ec619Smrg *) 12111515ec619Smrg pic_mode=default 12112515ec619Smrg # Look at the argument we got. We use all the common list separators. 12113515ec619Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12114515ec619Smrg for lt_pkg in $withval; do 12115515ec619Smrg IFS=$lt_save_ifs 12116515ec619Smrg if test "X$lt_pkg" = "X$lt_p"; then 12117515ec619Smrg pic_mode=yes 12118515ec619Smrg fi 12119515ec619Smrg done 12120515ec619Smrg IFS=$lt_save_ifs 12121515ec619Smrg ;; 12122515ec619Smrg esac], 12123515ec619Smrg [pic_mode=m4_default([$1], [default])]) 12124862f5301Smrg 12125515ec619Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12126515ec619Smrg])# _LT_WITH_PIC 12127862f5301Smrg 12128515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12129515ec619SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12130ff559fabSmrg 12131515ec619Smrg# Old name: 12132515ec619SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 12133515ec619Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 12134515ec619SmrgAC_DIAGNOSE([obsolete], 12135515ec619Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12136515ec619Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 12137515ec619Smrg]) 12138862f5301Smrg 12139515ec619Smrgdnl aclocal-1.4 backwards compatibility: 12140515ec619Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12141ff559fabSmrg 121426fc0178dSmrg 12143515ec619Smrgm4_define([_LTDL_MODE], []) 12144515ec619SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12145515ec619Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 12146515ec619SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 12147515ec619Smrg [m4_define([_LTDL_MODE], [recursive])]) 12148515ec619SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 12149515ec619Smrg [m4_define([_LTDL_MODE], [subproject])]) 12150515ec619Smrg 12151515ec619Smrgm4_define([_LTDL_TYPE], []) 12152515ec619SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 12153515ec619Smrg [m4_define([_LTDL_TYPE], [installable])]) 12154515ec619SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 12155515ec619Smrg [m4_define([_LTDL_TYPE], [convenience])]) 12156515ec619Smrg 12157515ec619Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 121586fc0178dSmrg# 12159515ec619Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12160515ec619Smrg# Foundation, Inc. 12161515ec619Smrg# Written by Gary V. Vaughan, 2004 12162515ec619Smrg# 12163515ec619Smrg# This file is free software; the Free Software Foundation gives 12164515ec619Smrg# unlimited permission to copy and/or distribute it, with or without 12165515ec619Smrg# modifications, as long as this notice is preserved. 121666fc0178dSmrg 12167515ec619Smrg# serial 6 ltsugar.m4 12168862f5301Smrg 12169515ec619Smrg# This is to help aclocal find these macros, as it can't see m4_define. 12170515ec619SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12171ff559fabSmrg 12172862f5301Smrg 12173515ec619Smrg# lt_join(SEP, ARG1, [ARG2...]) 12174515ec619Smrg# ----------------------------- 12175515ec619Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12176515ec619Smrg# associated separator. 12177515ec619Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12178515ec619Smrg# versions in m4sugar had bugs. 12179515ec619Smrgm4_define([lt_join], 12180515ec619Smrg[m4_if([$#], [1], [], 12181515ec619Smrg [$#], [2], [[$2]], 12182515ec619Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12183515ec619Smrgm4_define([_lt_join], 12184515ec619Smrg[m4_if([$#$2], [2], [], 12185515ec619Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12186862f5301Smrg 12187862f5301Smrg 12188515ec619Smrg# lt_car(LIST) 12189515ec619Smrg# lt_cdr(LIST) 12190515ec619Smrg# ------------ 12191515ec619Smrg# Manipulate m4 lists. 12192515ec619Smrg# These macros are necessary as long as will still need to support 12193515ec619Smrg# Autoconf-2.59, which quotes differently. 12194515ec619Smrgm4_define([lt_car], [[$1]]) 12195515ec619Smrgm4_define([lt_cdr], 12196515ec619Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12197515ec619Smrg [$#], 1, [], 12198515ec619Smrg [m4_dquote(m4_shift($@))])]) 12199515ec619Smrgm4_define([lt_unquote], $1) 12200515ec619Smrg 1220144dda7b2Smrg 12202515ec619Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12203515ec619Smrg# ------------------------------------------ 12204515ec619Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12205515ec619Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 12206515ec619Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12207515ec619Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12208515ec619Smrg# than defined and empty). 12209862f5301Smrg# 12210515ec619Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 12211515ec619Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12212515ec619Smrgm4_define([lt_append], 12213515ec619Smrg[m4_define([$1], 12214515ec619Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12215ff559fabSmrg 122166fc0178dSmrg 122176fc0178dSmrg 12218515ec619Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12219515ec619Smrg# ---------------------------------------------------------- 12220515ec619Smrg# Produce a SEP delimited list of all paired combinations of elements of 12221515ec619Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12222515ec619Smrg# has the form PREFIXmINFIXSUFFIXn. 12223515ec619Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 12224515ec619Smrgm4_define([lt_combine], 12225515ec619Smrg[m4_if(m4_eval([$# > 3]), [1], 12226515ec619Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12227515ec619Smrg[[m4_foreach([_Lt_prefix], [$2], 12228515ec619Smrg [m4_foreach([_Lt_suffix], 12229515ec619Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12230515ec619Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12231515ec619Smrg 12232515ec619Smrg 12233515ec619Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12234515ec619Smrg# ----------------------------------------------------------------------- 12235515ec619Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12236515ec619Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12237515ec619Smrgm4_define([lt_if_append_uniq], 12238515ec619Smrg[m4_ifdef([$1], 12239515ec619Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12240515ec619Smrg [lt_append([$1], [$2], [$3])$4], 12241515ec619Smrg [$5])], 12242515ec619Smrg [lt_append([$1], [$2], [$3])$4])]) 12243515ec619Smrg 12244515ec619Smrg 12245515ec619Smrg# lt_dict_add(DICT, KEY, VALUE) 12246515ec619Smrg# ----------------------------- 12247515ec619Smrgm4_define([lt_dict_add], 12248515ec619Smrg[m4_define([$1($2)], [$3])]) 122497a3b38f7Smrg 12250ff559fabSmrg 12251515ec619Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12252515ec619Smrg# -------------------------------------------- 12253515ec619Smrgm4_define([lt_dict_add_subkey], 12254515ec619Smrg[m4_define([$1($2:$3)], [$4])]) 1225544dda7b2Smrg 1225644dda7b2Smrg 12257515ec619Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12258515ec619Smrg# ---------------------------------- 12259515ec619Smrgm4_define([lt_dict_fetch], 12260515ec619Smrg[m4_ifval([$3], 12261515ec619Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12262515ec619Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12263ff559fabSmrg 12264ff559fabSmrg 12265515ec619Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12266515ec619Smrg# ----------------------------------------------------------------- 12267515ec619Smrgm4_define([lt_if_dict_fetch], 12268515ec619Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12269515ec619Smrg [$5], 12270515ec619Smrg [$6])]) 1227144dda7b2Smrg 12272fc544a13Smrg 12273515ec619Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12274515ec619Smrg# -------------------------------------------------------------- 12275515ec619Smrgm4_define([lt_dict_filter], 12276515ec619Smrg[m4_if([$5], [], [], 12277515ec619Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 12278515ec619Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12279515ec619Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12280515ec619Smrg]) 1228144dda7b2Smrg 12282515ec619Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12283515ec619Smrg# 12284515ec619Smrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12285515ec619Smrg# Inc. 12286515ec619Smrg# Written by Scott James Remnant, 2004 12287515ec619Smrg# 12288515ec619Smrg# This file is free software; the Free Software Foundation gives 12289515ec619Smrg# unlimited permission to copy and/or distribute it, with or without 12290515ec619Smrg# modifications, as long as this notice is preserved. 122916fc0178dSmrg 12292515ec619Smrg# @configure_input@ 122936fc0178dSmrg 12294515ec619Smrg# serial 4245 ltversion.m4 12295515ec619Smrg# This file is part of GNU Libtool 122966fc0178dSmrg 12297515ec619Smrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12298515ec619Smrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 122996fc0178dSmrg 12300515ec619SmrgAC_DEFUN([LTVERSION_VERSION], 12301515ec619Smrg[macro_version='2.4.7' 12302515ec619Smrgmacro_revision='2.4.7' 12303515ec619Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12304515ec619Smrg_LT_DECL(, macro_revision, 0) 12305515ec619Smrg]) 123066fc0178dSmrg 12307515ec619Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12308515ec619Smrg# 12309515ec619Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12310515ec619Smrg# Software Foundation, Inc. 12311515ec619Smrg# Written by Scott James Remnant, 2004. 12312515ec619Smrg# 12313515ec619Smrg# This file is free software; the Free Software Foundation gives 12314515ec619Smrg# unlimited permission to copy and/or distribute it, with or without 12315515ec619Smrg# modifications, as long as this notice is preserved. 123166fc0178dSmrg 12317515ec619Smrg# serial 5 lt~obsolete.m4 123186fc0178dSmrg 12319515ec619Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 12320515ec619Smrg# 12321515ec619Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12322515ec619Smrg# which have later been changed to m4_define as they aren't part of the 12323515ec619Smrg# exported API, or moved to Autoconf or Automake where they belong. 12324515ec619Smrg# 12325515ec619Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12326515ec619Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12327515ec619Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 12328515ec619Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12329515ec619Smrg# and doesn't know about Autoconf macros at all.) 12330515ec619Smrg# 12331515ec619Smrg# So we provide this file, which has a silly filename so it's always 12332515ec619Smrg# included after everything else. This provides aclocal with the 12333515ec619Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12334515ec619Smrg# because those macros already exist, or will be overwritten later. 12335515ec619Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12336515ec619Smrg# 12337515ec619Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12338515ec619Smrg# Yes, that means every name once taken will need to remain here until 12339515ec619Smrg# we give up compatibility with versions before 1.7, at which point 12340515ec619Smrg# we need to keep only those names which we still refer to. 123416fc0178dSmrg 12342515ec619Smrg# This is to help aclocal find these macros, as it can't see m4_define. 12343515ec619SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 123446fc0178dSmrg 12345515ec619Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12346515ec619Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12347515ec619Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12348515ec619Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12349515ec619Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12350515ec619Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12351515ec619Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12352515ec619Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12353515ec619Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12354515ec619Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12355515ec619Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12356515ec619Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12357515ec619Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12358515ec619Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12359515ec619Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12360515ec619Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12361515ec619Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12362515ec619Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12363515ec619Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12364515ec619Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12365515ec619Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12366515ec619Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12367515ec619Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12368515ec619Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12369515ec619Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12370515ec619Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12371515ec619Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12372515ec619Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12373515ec619Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12374515ec619Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12375515ec619Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12376515ec619Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12377515ec619Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12378515ec619Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12379515ec619Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12380515ec619Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12381515ec619Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12382515ec619Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12383515ec619Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12384515ec619Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12385515ec619Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12386515ec619Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12387515ec619Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12388515ec619Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12389515ec619Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12390515ec619Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12391515ec619Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12392515ec619Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12393515ec619Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12394515ec619Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12395515ec619Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12396515ec619Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12397515ec619Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12398515ec619Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12399515ec619Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12400515ec619Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12401515ec619Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12402515ec619Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12403515ec619Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12404515ec619Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12405515ec619Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12406ff559fabSmrg 12407