aclocal.m4 revision beef1b22
1beef1b22Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2df9ffc95Smrg 3beef1b22Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 409885543Smrg 509885543Smrg# This file is free software; the Free Software Foundation 609885543Smrg# gives unlimited permission to copy and/or distribute it, 709885543Smrg# with or without modifications, as long as this notice is preserved. 809885543Smrg 909885543Smrg# This program is distributed in the hope that it will be useful, 1009885543Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1109885543Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1209885543Smrg# PARTICULAR PURPOSE. 1309885543Smrg 14df9ffc95Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 157104f784Smrgm4_ifndef([AC_AUTOCONF_VERSION], 167104f784Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17beef1b22Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18beef1b22Smrg[m4_warning([this file was generated for autoconf 2.71. 197104f784SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 207104f784SmrgIf you have problems, you may need to regenerate the build system entirely. 21df9ffc95SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 227104f784Smrg 23beef1b22Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24e4f6584cSmrg# 25beef1b22Smrg# This file is free software; the Free Software Foundation 26beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 27beef1b22Smrg# with or without modifications, as long as this notice is preserved. 28f395c03eSmrg 29beef1b22Smrg# AM_AUTOMAKE_VERSION(VERSION) 30beef1b22Smrg# ---------------------------- 31beef1b22Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32beef1b22Smrg# generated from the m4 files accompanying Automake X.Y. 33beef1b22Smrg# (This private macro should not be called outside this file.) 34beef1b22SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35beef1b22Smrg[am__api_version='1.16' 36beef1b22Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37beef1b22Smrgdnl require some minimum version. Point them to the right macro. 38beef1b22Smrgm4_if([$1], [1.16.5], [], 39beef1b22Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40e4f6584cSmrg]) 41b698ba48Smrg 42beef1b22Smrg# _AM_AUTOCONF_VERSION(VERSION) 43beef1b22Smrg# ----------------------------- 44beef1b22Smrg# aclocal traces this macro to find the Autoconf version. 45beef1b22Smrg# This is a private macro too. Using m4_define simplifies 46beef1b22Smrg# the logic in aclocal, which can simply ignore this definition. 47beef1b22Smrgm4_define([_AM_AUTOCONF_VERSION], []) 482ec8c4b4Smrg 49beef1b22Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50beef1b22Smrg# ------------------------------- 51beef1b22Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52beef1b22Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53beef1b22SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54beef1b22Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 55beef1b22Smrgm4_ifndef([AC_AUTOCONF_VERSION], 56beef1b22Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57beef1b22Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5809885543Smrg 59beef1b22Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6009885543Smrg 61beef1b22Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62beef1b22Smrg# 63beef1b22Smrg# This file is free software; the Free Software Foundation 64beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 65beef1b22Smrg# with or without modifications, as long as this notice is preserved. 6609885543Smrg 67beef1b22Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68beef1b22Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69beef1b22Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70beef1b22Smrg# 71beef1b22Smrg# Of course, Automake must honor this variable whenever it calls a 72beef1b22Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 73beef1b22Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74beef1b22Smrg# depending on how configure is run. This is pretty annoying, since 75beef1b22Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76beef1b22Smrg# source directory, any form will work fine, but in subdirectories a 77beef1b22Smrg# relative path needs to be adjusted first. 78beef1b22Smrg# 79beef1b22Smrg# $ac_aux_dir/missing 80beef1b22Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 81beef1b22Smrg# $top_srcdir/$ac_aux_dir/missing 82beef1b22Smrg# fails if $ac_aux_dir is absolute, 83beef1b22Smrg# fails when called from a subdirectory in a VPATH build with 84beef1b22Smrg# a relative $ac_aux_dir 85beef1b22Smrg# 86beef1b22Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87beef1b22Smrg# are both prefixed by $srcdir. In an in-source build this is usually 88beef1b22Smrg# harmless because $srcdir is '.', but things will broke when you 89beef1b22Smrg# start a VPATH build or use an absolute $srcdir. 90beef1b22Smrg# 91beef1b22Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92beef1b22Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93beef1b22Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94beef1b22Smrg# and then we would define $MISSING as 95beef1b22Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 96beef1b22Smrg# This will work as long as MISSING is not called from configure, because 97beef1b22Smrg# unfortunately $(top_srcdir) has no meaning in configure. 98beef1b22Smrg# However there are other variables, like CC, which are often used in 99beef1b22Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100beef1b22Smrg# 101beef1b22Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 102beef1b22Smrg# absolute PATH. The drawback is that using absolute paths prevent a 103beef1b22Smrg# configured tree to be moved without reconfiguration. 104beef1b22Smrg 105beef1b22SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106beef1b22Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107beef1b22Smrg# Expand $ac_aux_dir to an absolute path. 108beef1b22Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1097b58d2e0Smrg]) 11009885543Smrg 111beef1b22Smrg# AM_CONDITIONAL -*- Autoconf -*- 11209885543Smrg 113beef1b22Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114beef1b22Smrg# 115beef1b22Smrg# This file is free software; the Free Software Foundation 116beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 117beef1b22Smrg# with or without modifications, as long as this notice is preserved. 11809885543Smrg 119beef1b22Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120beef1b22Smrg# ------------------------------------- 121beef1b22Smrg# Define a conditional. 122beef1b22SmrgAC_DEFUN([AM_CONDITIONAL], 123beef1b22Smrg[AC_PREREQ([2.52])dnl 124beef1b22Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125beef1b22Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126beef1b22SmrgAC_SUBST([$1_TRUE])dnl 127beef1b22SmrgAC_SUBST([$1_FALSE])dnl 128beef1b22Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129beef1b22Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130beef1b22Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131beef1b22Smrgif $2; then 132beef1b22Smrg $1_TRUE= 133beef1b22Smrg $1_FALSE='#' 134beef1b22Smrgelse 135beef1b22Smrg $1_TRUE='#' 136beef1b22Smrg $1_FALSE= 137beef1b22Smrgfi 138beef1b22SmrgAC_CONFIG_COMMANDS_PRE( 139beef1b22Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140beef1b22Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 141beef1b22SmrgUsually this means the macro was only invoked conditionally.]]) 142beef1b22Smrgfi])]) 143b698ba48Smrg 144beef1b22Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145beef1b22Smrg# 146beef1b22Smrg# This file is free software; the Free Software Foundation 147beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 148beef1b22Smrg# with or without modifications, as long as this notice is preserved. 149b12e5c03Smrg 15009885543Smrg 151beef1b22Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152beef1b22Smrg# written in clear, in which case automake, when reading aclocal.m4, 153beef1b22Smrg# will think it sees a *use*, and therefore will trigger all it's 154beef1b22Smrg# C support machinery. Also note that it means that autoscan, seeing 155beef1b22Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 15609885543Smrg 157b698ba48Smrg 158beef1b22Smrg# _AM_DEPENDENCIES(NAME) 159beef1b22Smrg# ---------------------- 160beef1b22Smrg# See how the compiler implements dependency checking. 161beef1b22Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162beef1b22Smrg# We try a few techniques and use that to set a single cache variable. 163beef1b22Smrg# 164beef1b22Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165beef1b22Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166beef1b22Smrg# dependency, and given that the user is not expected to run this macro, 167beef1b22Smrg# just rely on AC_PROG_CC. 168beef1b22SmrgAC_DEFUN([_AM_DEPENDENCIES], 169beef1b22Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170beef1b22SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171beef1b22SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172beef1b22SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 17309885543Smrg 174beef1b22Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175beef1b22Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176beef1b22Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177beef1b22Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178beef1b22Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179beef1b22Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180beef1b22Smrg [depcc="$$1" am_compiler_list=]) 18109885543Smrg 182beef1b22SmrgAC_CACHE_CHECK([dependency style of $depcc], 183beef1b22Smrg [am_cv_$1_dependencies_compiler_type], 184beef1b22Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185beef1b22Smrg # We make a subdir and do the tests there. Otherwise we can end up 186beef1b22Smrg # making bogus files that we don't know about and never remove. For 187beef1b22Smrg # instance it was reported that on HP-UX the gcc test will end up 188beef1b22Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 189beef1b22Smrg # in D". 190beef1b22Smrg rm -rf conftest.dir 191beef1b22Smrg mkdir conftest.dir 192beef1b22Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 193beef1b22Smrg # using a relative directory. 194beef1b22Smrg cp "$am_depcomp" conftest.dir 195beef1b22Smrg cd conftest.dir 196beef1b22Smrg # We will build objects and dependencies in a subdirectory because 197beef1b22Smrg # it helps to detect inapplicable dependency modes. For instance 198beef1b22Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 199beef1b22Smrg # side effect of compilation, but ICC will put the dependencies in 200beef1b22Smrg # the current directory while Tru64 will put them in the object 201beef1b22Smrg # directory. 202beef1b22Smrg mkdir sub 203b698ba48Smrg 204beef1b22Smrg am_cv_$1_dependencies_compiler_type=none 205beef1b22Smrg if test "$am_compiler_list" = ""; then 206beef1b22Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207beef1b22Smrg fi 208beef1b22Smrg am__universal=false 209beef1b22Smrg m4_case([$1], [CC], 210beef1b22Smrg [case " $depcc " in #( 211beef1b22Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212beef1b22Smrg esac], 213beef1b22Smrg [CXX], 214beef1b22Smrg [case " $depcc " in #( 215beef1b22Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216beef1b22Smrg esac]) 2177b58d2e0Smrg 218beef1b22Smrg for depmode in $am_compiler_list; do 219beef1b22Smrg # Setup a source with many dependencies, because some compilers 220beef1b22Smrg # like to wrap large dependency lists on column 80 (with \), and 221beef1b22Smrg # we should not choose a depcomp mode which is confused by this. 222beef1b22Smrg # 223beef1b22Smrg # We need to recreate these files for each test, as the compiler may 224beef1b22Smrg # overwrite some of them when testing with obscure command lines. 225beef1b22Smrg # This happens at least with the AIX C compiler. 226beef1b22Smrg : > sub/conftest.c 227beef1b22Smrg for i in 1 2 3 4 5 6; do 228beef1b22Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229beef1b22Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230beef1b22Smrg # Solaris 10 /bin/sh. 231beef1b22Smrg echo '/* dummy */' > sub/conftst$i.h 232f395c03eSmrg done 233beef1b22Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234f395c03eSmrg 235beef1b22Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236beef1b22Smrg # mode. It turns out that the SunPro C++ compiler does not properly 237beef1b22Smrg # handle '-M -o', and we need to detect this. Also, some Intel 238beef1b22Smrg # versions had trouble with output in subdirs. 239beef1b22Smrg am__obj=sub/conftest.${OBJEXT-o} 240beef1b22Smrg am__minus_obj="-o $am__obj" 241beef1b22Smrg case $depmode in 242beef1b22Smrg gcc) 243beef1b22Smrg # This depmode causes a compiler race in universal mode. 244beef1b22Smrg test "$am__universal" = false || continue 245beef1b22Smrg ;; 246beef1b22Smrg nosideeffect) 247beef1b22Smrg # After this tag, mechanisms are not by side-effect, so they'll 248beef1b22Smrg # only be used when explicitly requested. 249beef1b22Smrg if test "x$enable_dependency_tracking" = xyes; then 250beef1b22Smrg continue 251beef1b22Smrg else 252beef1b22Smrg break 253beef1b22Smrg fi 254beef1b22Smrg ;; 255beef1b22Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256beef1b22Smrg # This compiler won't grok '-c -o', but also, the minuso test has 257beef1b22Smrg # not run yet. These depmodes are late enough in the game, and 258beef1b22Smrg # so weak that their functioning should not be impacted. 259beef1b22Smrg am__obj=conftest.${OBJEXT-o} 260beef1b22Smrg am__minus_obj= 261beef1b22Smrg ;; 262beef1b22Smrg none) break ;; 263beef1b22Smrg esac 264beef1b22Smrg if depmode=$depmode \ 265beef1b22Smrg source=sub/conftest.c object=$am__obj \ 266beef1b22Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267beef1b22Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268beef1b22Smrg >/dev/null 2>conftest.err && 269beef1b22Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270beef1b22Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271beef1b22Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272beef1b22Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273beef1b22Smrg # icc doesn't choke on unknown options, it will just issue warnings 274beef1b22Smrg # or remarks (even with -Werror). So we grep stderr for any message 275beef1b22Smrg # that says an option was ignored or not supported. 276beef1b22Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277beef1b22Smrg # icc: Command line warning: ignoring option '-M'; no argument required 278beef1b22Smrg # The diagnosis changed in icc 8.0: 279beef1b22Smrg # icc: Command line remark: option '-MP' not supported 280beef1b22Smrg if (grep 'ignoring option' conftest.err || 281beef1b22Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282beef1b22Smrg am_cv_$1_dependencies_compiler_type=$depmode 283beef1b22Smrg break 284beef1b22Smrg fi 285beef1b22Smrg fi 286beef1b22Smrg done 287f395c03eSmrg 288beef1b22Smrg cd .. 289beef1b22Smrg rm -rf conftest.dir 290beef1b22Smrgelse 291beef1b22Smrg am_cv_$1_dependencies_compiler_type=none 292beef1b22Smrgfi 293beef1b22Smrg]) 294beef1b22SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295beef1b22SmrgAM_CONDITIONAL([am__fastdep$1], [ 296beef1b22Smrg test "x$enable_dependency_tracking" != xno \ 297beef1b22Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298e4f6584cSmrg]) 299b698ba48Smrg 30009885543Smrg 301beef1b22Smrg# AM_SET_DEPDIR 302beef1b22Smrg# ------------- 303beef1b22Smrg# Choose a directory name for dependency files. 304beef1b22Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305beef1b22SmrgAC_DEFUN([AM_SET_DEPDIR], 306beef1b22Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307beef1b22SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308beef1b22Smrg]) 309b12e5c03Smrg 3107b58d2e0Smrg 311beef1b22Smrg# AM_DEP_TRACK 312beef1b22Smrg# ------------ 313beef1b22SmrgAC_DEFUN([AM_DEP_TRACK], 314beef1b22Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 315beef1b22SmrgAS_HELP_STRING( 316beef1b22Smrg [--enable-dependency-tracking], 317beef1b22Smrg [do not reject slow dependency extractors]) 318beef1b22SmrgAS_HELP_STRING( 319beef1b22Smrg [--disable-dependency-tracking], 320beef1b22Smrg [speeds up one-time build])]) 321beef1b22Smrgif test "x$enable_dependency_tracking" != xno; then 322beef1b22Smrg am_depcomp="$ac_aux_dir/depcomp" 323beef1b22Smrg AMDEPBACKSLASH='\' 324beef1b22Smrg am__nodep='_no' 325e4f6584cSmrgfi 326beef1b22SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327beef1b22SmrgAC_SUBST([AMDEPBACKSLASH])dnl 328beef1b22Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329beef1b22SmrgAC_SUBST([am__nodep])dnl 330beef1b22Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 331e4f6584cSmrg]) 3322ec8c4b4Smrg 333beef1b22Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3342ec8c4b4Smrg 335beef1b22Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 336beef1b22Smrg# 337beef1b22Smrg# This file is free software; the Free Software Foundation 338beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 339beef1b22Smrg# with or without modifications, as long as this notice is preserved. 3402ec8c4b4Smrg 341beef1b22Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 342beef1b22Smrg# ------------------------------ 343beef1b22SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344beef1b22Smrg[{ 345beef1b22Smrg # Older Autoconf quotes --file arguments for eval, but not when files 346beef1b22Smrg # are listed without --file. Let's play safe and only enable the eval 347beef1b22Smrg # if we detect the quoting. 348beef1b22Smrg # TODO: see whether this extra hack can be removed once we start 349beef1b22Smrg # requiring Autoconf 2.70 or later. 350beef1b22Smrg AS_CASE([$CONFIG_FILES], 351beef1b22Smrg [*\'*], [eval set x "$CONFIG_FILES"], 352beef1b22Smrg [*], [set x $CONFIG_FILES]) 353beef1b22Smrg shift 354beef1b22Smrg # Used to flag and report bootstrapping failures. 355beef1b22Smrg am_rc=0 356beef1b22Smrg for am_mf 357beef1b22Smrg do 358beef1b22Smrg # Strip MF so we end up with the name of the file. 359beef1b22Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360beef1b22Smrg # Check whether this is an Automake generated Makefile which includes 361beef1b22Smrg # dependency-tracking related rules and includes. 362beef1b22Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 363beef1b22Smrg # limit of 2048, but all sed's we know have understand at least 4000. 364beef1b22Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365beef1b22Smrg || continue 366beef1b22Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 367beef1b22Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 368beef1b22Smrg AM_RUN_LOG([cd "$am_dirpart" \ 369beef1b22Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 370beef1b22Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 371beef1b22Smrg done 372beef1b22Smrg if test $am_rc -ne 0; then 373beef1b22Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374beef1b22Smrg for automatic dependency tracking. If GNU make was not used, consider 375beef1b22Smrg re-running the configure script with MAKE="gmake" (or whatever is 376beef1b22Smrg necessary). You can also try re-running configure with the 377beef1b22Smrg '--disable-dependency-tracking' option to at least be able to build 378beef1b22Smrg the package (albeit without support for automatic dependency tracking).]) 3797b58d2e0Smrg fi 380beef1b22Smrg AS_UNSET([am_dirpart]) 381beef1b22Smrg AS_UNSET([am_filepart]) 382beef1b22Smrg AS_UNSET([am_mf]) 383beef1b22Smrg AS_UNSET([am_rc]) 384beef1b22Smrg rm -f conftest-deps.mk 385beef1b22Smrg} 386beef1b22Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 38709885543Smrg 38809885543Smrg 389beef1b22Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 390beef1b22Smrg# ----------------------------- 391beef1b22Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 392beef1b22Smrg# 393beef1b22Smrg# This code is only required when automatic dependency tracking is enabled. 394beef1b22Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395beef1b22Smrg# order to bootstrap the dependency handling code. 396beef1b22SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397beef1b22Smrg[AC_CONFIG_COMMANDS([depfiles], 398beef1b22Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399beef1b22Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 40009885543Smrg 401beef1b22Smrg# Do all the work for Automake. -*- Autoconf -*- 40209885543Smrg 403beef1b22Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 404beef1b22Smrg# 405beef1b22Smrg# This file is free software; the Free Software Foundation 406beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 407beef1b22Smrg# with or without modifications, as long as this notice is preserved. 4087104f784Smrg 409beef1b22Smrg# This macro actually does too much. Some checks are only needed if 410beef1b22Smrg# your package does certain things. But this isn't really a big deal. 41109885543Smrg 412beef1b22Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 413beef1b22Smrgm4_define([AC_PROG_CC], 414beef1b22Smrgm4_defn([AC_PROG_CC]) 415beef1b22Smrg[_AM_PROG_CC_C_O 416beef1b22Smrg]) 41709885543Smrg 418beef1b22Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419beef1b22Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 420beef1b22Smrg# ----------------------------------------------- 421beef1b22Smrg# The call with PACKAGE and VERSION arguments is the old style 422beef1b22Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 423beef1b22Smrg# and VERSION should now be passed to AC_INIT and removed from 424beef1b22Smrg# the call to AM_INIT_AUTOMAKE. 425beef1b22Smrg# We support both call styles for the transition. After 426beef1b22Smrg# the next Automake release, Autoconf can make the AC_INIT 427beef1b22Smrg# arguments mandatory, and then we can depend on a new Autoconf 428beef1b22Smrg# release and drop the old call support. 429beef1b22SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 430beef1b22Smrg[AC_PREREQ([2.65])dnl 431beef1b22Smrgm4_ifdef([_$0_ALREADY_INIT], 432beef1b22Smrg [m4_fatal([$0 expanded multiple times 433beef1b22Smrg]m4_defn([_$0_ALREADY_INIT]))], 434beef1b22Smrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435beef1b22Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 436beef1b22Smrgdnl the ones we care about. 437beef1b22Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438beef1b22SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439beef1b22SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 440beef1b22Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 441beef1b22Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442beef1b22Smrg # is not polluted with repeated "-I." 443beef1b22Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444beef1b22Smrg # test to see if srcdir already configured 445beef1b22Smrg if test -f $srcdir/config.status; then 446beef1b22Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 447beef1b22Smrg fi 448beef1b22Smrgfi 449b12e5c03Smrg 450beef1b22Smrg# test whether we have cygpath 451beef1b22Smrgif test -z "$CYGPATH_W"; then 452beef1b22Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 453beef1b22Smrg CYGPATH_W='cygpath -w' 454beef1b22Smrg else 455beef1b22Smrg CYGPATH_W=echo 456beef1b22Smrg fi 457beef1b22Smrgfi 458beef1b22SmrgAC_SUBST([CYGPATH_W]) 459b12e5c03Smrg 460beef1b22Smrg# Define the identity of the package. 461beef1b22Smrgdnl Distinguish between old-style and new-style calls. 462beef1b22Smrgm4_ifval([$2], 463beef1b22Smrg[AC_DIAGNOSE([obsolete], 464beef1b22Smrg [$0: two- and three-arguments forms are deprecated.]) 465beef1b22Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466beef1b22Smrg AC_SUBST([PACKAGE], [$1])dnl 467beef1b22Smrg AC_SUBST([VERSION], [$2])], 468beef1b22Smrg[_AM_SET_OPTIONS([$1])dnl 469beef1b22Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 470beef1b22Smrgm4_if( 471beef1b22Smrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 472beef1b22Smrg [ok:ok],, 473beef1b22Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474beef1b22Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475beef1b22Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476b12e5c03Smrg 477beef1b22Smrg_AM_IF_OPTION([no-define],, 478beef1b22Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 479beef1b22Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 480b12e5c03Smrg 481beef1b22Smrg# Some tools Automake needs. 482beef1b22SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 483beef1b22SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 484beef1b22SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 485beef1b22SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 486beef1b22SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 487beef1b22SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 488beef1b22SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 489beef1b22SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490beef1b22SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 491beef1b22SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 492beef1b22Smrg# For better backward compatibility. To be removed once Automake 1.9.x 493beef1b22Smrg# dies out for good. For more background, see: 494beef1b22Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495beef1b22Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 496beef1b22SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497beef1b22Smrg# We need awk for the "check" target (and possibly the TAP driver). The 498beef1b22Smrg# system "awk" is bad on some platforms. 499beef1b22SmrgAC_REQUIRE([AC_PROG_AWK])dnl 500beef1b22SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 501beef1b22SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 502beef1b22Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503beef1b22Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504beef1b22Smrg [_AM_PROG_TAR([v7])])]) 505beef1b22Smrg_AM_IF_OPTION([no-dependencies],, 506beef1b22Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 507beef1b22Smrg [_AM_DEPENDENCIES([CC])], 508beef1b22Smrg [m4_define([AC_PROG_CC], 509beef1b22Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510beef1b22SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 511beef1b22Smrg [_AM_DEPENDENCIES([CXX])], 512beef1b22Smrg [m4_define([AC_PROG_CXX], 513beef1b22Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514beef1b22SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 515beef1b22Smrg [_AM_DEPENDENCIES([OBJC])], 516beef1b22Smrg [m4_define([AC_PROG_OBJC], 517beef1b22Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 518beef1b22SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 519beef1b22Smrg [_AM_DEPENDENCIES([OBJCXX])], 520beef1b22Smrg [m4_define([AC_PROG_OBJCXX], 521beef1b22Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 522b12e5c03Smrg]) 523beef1b22Smrg# Variables for tags utilities; see am/tags.am 524beef1b22Smrgif test -z "$CTAGS"; then 525beef1b22Smrg CTAGS=ctags 526beef1b22Smrgfi 527beef1b22SmrgAC_SUBST([CTAGS]) 528beef1b22Smrgif test -z "$ETAGS"; then 529beef1b22Smrg ETAGS=etags 530beef1b22Smrgfi 531beef1b22SmrgAC_SUBST([ETAGS]) 532beef1b22Smrgif test -z "$CSCOPE"; then 533beef1b22Smrg CSCOPE=cscope 534beef1b22Smrgfi 535beef1b22SmrgAC_SUBST([CSCOPE]) 536b12e5c03Smrg 537beef1b22SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 538beef1b22Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 539beef1b22Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 540beef1b22Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541beef1b22SmrgAC_CONFIG_COMMANDS_PRE(dnl 542beef1b22Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 543beef1b22Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 54409885543Smrg 545beef1b22Smrg# POSIX will say in a future version that running "rm -f" with no argument 546beef1b22Smrg# is OK; and we want to be able to make that assumption in our Makefile 547beef1b22Smrg# recipes. So use an aggressive probe to check that the usage we want is 548beef1b22Smrg# actually supported "in the wild" to an acceptable degree. 549beef1b22Smrg# See automake bug#10828. 550beef1b22Smrg# To make any issue more visible, cause the running configure to be aborted 551beef1b22Smrg# by default if the 'rm' program in use doesn't match our expectations; the 552beef1b22Smrg# user can still override this though. 553beef1b22Smrgif rm -f && rm -fr && rm -rf; then : OK; else 554beef1b22Smrg cat >&2 <<'END' 555beef1b22SmrgOops! 55609885543Smrg 557beef1b22SmrgYour 'rm' program seems unable to run without file operands specified 558beef1b22Smrgon the command line, even when the '-f' option is present. This is contrary 559beef1b22Smrgto the behaviour of most rm programs out there, and not conforming with 560beef1b22Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 56109885543Smrg 562beef1b22SmrgPlease tell bug-automake@gnu.org about your system, including the value 563beef1b22Smrgof your $PATH and any error possibly output before this message. This 564beef1b22Smrgcan help us improve future automake versions. 56509885543Smrg 566beef1b22SmrgEND 567beef1b22Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 568beef1b22Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 569beef1b22Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 570beef1b22Smrg echo >&2 571beef1b22Smrg else 572beef1b22Smrg cat >&2 <<'END' 573beef1b22SmrgAborting the configuration process, to ensure you take notice of the issue. 57409885543Smrg 575beef1b22SmrgYou can download and install GNU coreutils to get an 'rm' implementation 576beef1b22Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 57709885543Smrg 578beef1b22SmrgIf you want to complete the configuration process using your problematic 579beef1b22Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 580beef1b22Smrgto "yes", and re-run configure. 58109885543Smrg 582beef1b22SmrgEND 583beef1b22Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 584beef1b22Smrg fi 585beef1b22Smrgfi 586beef1b22Smrgdnl The trailing newline in this macro's definition is deliberate, for 587beef1b22Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 588beef1b22Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 5897b58d2e0Smrg]) 59009885543Smrg 591beef1b22Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592beef1b22Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593beef1b22Smrgdnl mangled by Autoconf and run in a shell conditional statement. 594beef1b22Smrgm4_define([_AC_COMPILER_EXEEXT], 595beef1b22Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 59609885543Smrg 597beef1b22Smrg# When config.status generates a header, we must update the stamp-h file. 598beef1b22Smrg# This file resides in the same directory as the config header 599beef1b22Smrg# that is generated. The stamp files are numbered to have different names. 60009885543Smrg 601beef1b22Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602beef1b22Smrg# loop where config.status creates the headers, so we can generate 603beef1b22Smrg# our stamp files there. 604beef1b22SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605beef1b22Smrg[# Compute $1's index in $config_headers. 606beef1b22Smrg_am_arg=$1 607beef1b22Smrg_am_stamp_count=1 608beef1b22Smrgfor _am_header in $config_headers :; do 609beef1b22Smrg case $_am_header in 610beef1b22Smrg $_am_arg | $_am_arg:* ) 611beef1b22Smrg break ;; 612beef1b22Smrg * ) 613beef1b22Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614beef1b22Smrg esac 615beef1b22Smrgdone 616beef1b22Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 61709885543Smrg 618beef1b22Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 619beef1b22Smrg# 620beef1b22Smrg# This file is free software; the Free Software Foundation 621beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 622beef1b22Smrg# with or without modifications, as long as this notice is preserved. 623b698ba48Smrg 624beef1b22Smrg# AM_PROG_INSTALL_SH 625beef1b22Smrg# ------------------ 626beef1b22Smrg# Define $install_sh. 627beef1b22SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 628beef1b22Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629beef1b22Smrgif test x"${install_sh+set}" != xset; then 630beef1b22Smrg case $am_aux_dir in 631beef1b22Smrg *\ * | *\ *) 632beef1b22Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633beef1b22Smrg *) 634beef1b22Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 635beef1b22Smrg esac 636beef1b22Smrgfi 637beef1b22SmrgAC_SUBST([install_sh])]) 63809885543Smrg 639beef1b22Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 640beef1b22Smrg# 641beef1b22Smrg# This file is free software; the Free Software Foundation 642beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 643beef1b22Smrg# with or without modifications, as long as this notice is preserved. 644e4f6584cSmrg 645beef1b22Smrg# Check whether the underlying file-system supports filenames 646beef1b22Smrg# with a leading dot. For instance MS-DOS doesn't. 647beef1b22SmrgAC_DEFUN([AM_SET_LEADING_DOT], 648beef1b22Smrg[rm -rf .tst 2>/dev/null 649beef1b22Smrgmkdir .tst 2>/dev/null 650beef1b22Smrgif test -d .tst; then 651beef1b22Smrg am__leading_dot=. 652beef1b22Smrgelse 653beef1b22Smrg am__leading_dot=_ 654beef1b22Smrgfi 655beef1b22Smrgrmdir .tst 2>/dev/null 656beef1b22SmrgAC_SUBST([am__leading_dot])]) 6572ec8c4b4Smrg 658beef1b22Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 65909885543Smrg 660beef1b22Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661beef1b22Smrg# 662beef1b22Smrg# This file is free software; the Free Software Foundation 663beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 664beef1b22Smrg# with or without modifications, as long as this notice is preserved. 66509885543Smrg 666beef1b22Smrg# AM_MAKE_INCLUDE() 667beef1b22Smrg# ----------------- 668beef1b22Smrg# Check whether make has an 'include' directive that can support all 669beef1b22Smrg# the idioms we need for our automatic dependency tracking code. 670beef1b22SmrgAC_DEFUN([AM_MAKE_INCLUDE], 671beef1b22Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672beef1b22Smrgcat > confinc.mk << 'END' 673beef1b22Smrgam__doit: 674beef1b22Smrg @echo this is the am__doit target >confinc.out 675beef1b22Smrg.PHONY: am__doit 676beef1b22SmrgEND 677beef1b22Smrgam__include="#" 678beef1b22Smrgam__quote= 679beef1b22Smrg# BSD make does it like this. 680beef1b22Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 681beef1b22Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682beef1b22Smrgecho 'include confinc.mk # ignored' > confmf.GNU 683beef1b22Smrg_am_result=no 684beef1b22Smrgfor s in GNU BSD; do 685beef1b22Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686beef1b22Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687beef1b22Smrg ['0:this is the am__doit target'], 688beef1b22Smrg [AS_CASE([$s], 689beef1b22Smrg [BSD], [am__include='.include' am__quote='"'], 690beef1b22Smrg [am__include='include' am__quote=''])]) 691beef1b22Smrg if test "$am__include" != "#"; then 692beef1b22Smrg _am_result="yes ($s style)" 693beef1b22Smrg break 694beef1b22Smrg fi 695beef1b22Smrgdone 696beef1b22Smrgrm -f confinc.* confmf.* 697beef1b22SmrgAC_MSG_RESULT([${_am_result}]) 698beef1b22SmrgAC_SUBST([am__include])]) 699beef1b22SmrgAC_SUBST([am__quote])]) 70009885543Smrg 701beef1b22Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 70209885543Smrg 703beef1b22Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704beef1b22Smrg# 705beef1b22Smrg# This file is free software; the Free Software Foundation 706beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 707beef1b22Smrg# with or without modifications, as long as this notice is preserved. 7082ec8c4b4Smrg 709beef1b22Smrg# AM_MISSING_PROG(NAME, PROGRAM) 710beef1b22Smrg# ------------------------------ 711beef1b22SmrgAC_DEFUN([AM_MISSING_PROG], 712beef1b22Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713beef1b22Smrg$1=${$1-"${am_missing_run}$2"} 714beef1b22SmrgAC_SUBST($1)]) 715beef1b22Smrg 716beef1b22Smrg# AM_MISSING_HAS_RUN 717beef1b22Smrg# ------------------ 718beef1b22Smrg# Define MISSING if not defined so far and test if it is modern enough. 719beef1b22Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 720beef1b22SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 721beef1b22Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722beef1b22SmrgAC_REQUIRE_AUX_FILE([missing])dnl 723beef1b22Smrgif test x"${MISSING+set}" != xset; then 724beef1b22Smrg MISSING="\${SHELL} '$am_aux_dir/missing'" 725beef1b22Smrgfi 726beef1b22Smrg# Use eval to expand $SHELL 727beef1b22Smrgif eval "$MISSING --is-lightweight"; then 728beef1b22Smrg am_missing_run="$MISSING " 729beef1b22Smrgelse 730beef1b22Smrg am_missing_run= 731beef1b22Smrg AC_MSG_WARN(['missing' script is too old or missing]) 732beef1b22Smrgfi 733beef1b22Smrg]) 73409885543Smrg 735beef1b22Smrg# Helper functions for option handling. -*- Autoconf -*- 73609885543Smrg 737beef1b22Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738beef1b22Smrg# 739beef1b22Smrg# This file is free software; the Free Software Foundation 740beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 741beef1b22Smrg# with or without modifications, as long as this notice is preserved. 74209885543Smrg 743beef1b22Smrg# _AM_MANGLE_OPTION(NAME) 744beef1b22Smrg# ----------------------- 745beef1b22SmrgAC_DEFUN([_AM_MANGLE_OPTION], 746beef1b22Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 74709885543Smrg 748beef1b22Smrg# _AM_SET_OPTION(NAME) 749beef1b22Smrg# -------------------- 750beef1b22Smrg# Set option NAME. Presently that only means defining a flag for this option. 751beef1b22SmrgAC_DEFUN([_AM_SET_OPTION], 752beef1b22Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 75309885543Smrg 754beef1b22Smrg# _AM_SET_OPTIONS(OPTIONS) 755beef1b22Smrg# ------------------------ 756beef1b22Smrg# OPTIONS is a space-separated list of Automake options. 757beef1b22SmrgAC_DEFUN([_AM_SET_OPTIONS], 758beef1b22Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 75909885543Smrg 760beef1b22Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761beef1b22Smrg# ------------------------------------------- 762beef1b22Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763beef1b22SmrgAC_DEFUN([_AM_IF_OPTION], 764beef1b22Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 76509885543Smrg 766beef1b22Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 767beef1b22Smrg# 768beef1b22Smrg# This file is free software; the Free Software Foundation 769beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 770beef1b22Smrg# with or without modifications, as long as this notice is preserved. 77109885543Smrg 772beef1b22Smrg# _AM_PROG_CC_C_O 773beef1b22Smrg# --------------- 774beef1b22Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 775beef1b22Smrg# to automatically call this. 776beef1b22SmrgAC_DEFUN([_AM_PROG_CC_C_O], 777beef1b22Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 778beef1b22SmrgAC_REQUIRE_AUX_FILE([compile])dnl 779beef1b22SmrgAC_LANG_PUSH([C])dnl 780beef1b22SmrgAC_CACHE_CHECK( 781beef1b22Smrg [whether $CC understands -c and -o together], 782beef1b22Smrg [am_cv_prog_cc_c_o], 783beef1b22Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 784beef1b22Smrg # Make sure it works both with $CC and with simple cc. 785beef1b22Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 786beef1b22Smrg # compilers refuse to overwrite an existing .o file with -o, 787beef1b22Smrg # though they will create one. 788beef1b22Smrg am_cv_prog_cc_c_o=yes 789beef1b22Smrg for am_i in 1 2; do 790beef1b22Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 791beef1b22Smrg && test -f conftest2.$ac_objext; then 792beef1b22Smrg : OK 793beef1b22Smrg else 794beef1b22Smrg am_cv_prog_cc_c_o=no 795beef1b22Smrg break 796beef1b22Smrg fi 797beef1b22Smrg done 798beef1b22Smrg rm -f core conftest* 799beef1b22Smrg unset am_i]) 800beef1b22Smrgif test "$am_cv_prog_cc_c_o" != yes; then 801beef1b22Smrg # Losing compiler, so override with the script. 802beef1b22Smrg # FIXME: It is wrong to rewrite CC. 803beef1b22Smrg # But if we don't then we get into trouble of one sort or another. 804beef1b22Smrg # A longer-term fix would be to have automake use am__CC in this case, 805beef1b22Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 806beef1b22Smrg CC="$am_aux_dir/compile $CC" 807beef1b22Smrgfi 808beef1b22SmrgAC_LANG_POP([C])]) 80909885543Smrg 810beef1b22Smrg# For backward compatibility. 811beef1b22SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 8127b58d2e0Smrg 813beef1b22Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 814e4f6584cSmrg# 815beef1b22Smrg# This file is free software; the Free Software Foundation 816beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 817beef1b22Smrg# with or without modifications, as long as this notice is preserved. 81809885543Smrg 819beef1b22Smrg# AM_RUN_LOG(COMMAND) 820beef1b22Smrg# ------------------- 821beef1b22Smrg# Run COMMAND, save the exit status in ac_status, and log it. 822beef1b22Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 823beef1b22SmrgAC_DEFUN([AM_RUN_LOG], 824beef1b22Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 825beef1b22Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 826beef1b22Smrg ac_status=$? 827beef1b22Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 828beef1b22Smrg (exit $ac_status); }]) 82909885543Smrg 830beef1b22Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 83109885543Smrg 832beef1b22Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833e4f6584cSmrg# 834beef1b22Smrg# This file is free software; the Free Software Foundation 835beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 836beef1b22Smrg# with or without modifications, as long as this notice is preserved. 83709885543Smrg 838beef1b22Smrg# AM_SANITY_CHECK 839beef1b22Smrg# --------------- 840beef1b22SmrgAC_DEFUN([AM_SANITY_CHECK], 841beef1b22Smrg[AC_MSG_CHECKING([whether build environment is sane]) 842beef1b22Smrg# Reject unsafe characters in $srcdir or the absolute working directory 843beef1b22Smrg# name. Accept space and tab only in the latter. 844beef1b22Smrgam_lf=' 845beef1b22Smrg' 846beef1b22Smrgcase `pwd` in 847beef1b22Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 848beef1b22Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 849beef1b22Smrgesac 850beef1b22Smrgcase $srcdir in 851beef1b22Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 852beef1b22Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853beef1b22Smrgesac 85409885543Smrg 855beef1b22Smrg# Do 'set' in a subshell so we don't clobber the current shell's 856beef1b22Smrg# arguments. Must try -L first in case configure is actually a 857beef1b22Smrg# symlink; some systems play weird games with the mod time of symlinks 858beef1b22Smrg# (eg FreeBSD returns the mod time of the symlink's containing 859beef1b22Smrg# directory). 860beef1b22Smrgif ( 861beef1b22Smrg am_has_slept=no 862beef1b22Smrg for am_try in 1 2; do 863beef1b22Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 864beef1b22Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 865beef1b22Smrg if test "$[*]" = "X"; then 866beef1b22Smrg # -L didn't work. 867beef1b22Smrg set X `ls -t "$srcdir/configure" conftest.file` 868beef1b22Smrg fi 869beef1b22Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 870beef1b22Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 87109885543Smrg 872beef1b22Smrg # If neither matched, then we have a broken ls. This can happen 873beef1b22Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 874beef1b22Smrg # broken ls alias from the environment. This has actually 875beef1b22Smrg # happened. Such a system could not be considered "sane". 876beef1b22Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 877beef1b22Smrg alias in your environment]) 878beef1b22Smrg fi 879beef1b22Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 880beef1b22Smrg break 881beef1b22Smrg fi 882beef1b22Smrg # Just in case. 883beef1b22Smrg sleep 1 884beef1b22Smrg am_has_slept=yes 885beef1b22Smrg done 886beef1b22Smrg test "$[2]" = conftest.file 887beef1b22Smrg ) 888beef1b22Smrgthen 889beef1b22Smrg # Ok. 890beef1b22Smrg : 891beef1b22Smrgelse 892beef1b22Smrg AC_MSG_ERROR([newly created file is older than distributed files! 893beef1b22SmrgCheck your system clock]) 894beef1b22Smrgfi 895beef1b22SmrgAC_MSG_RESULT([yes]) 896beef1b22Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 897beef1b22Smrg# generated files are strictly newer. 898beef1b22Smrgam_sleep_pid= 899beef1b22Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 900beef1b22Smrg ( sleep 1 ) & 901beef1b22Smrg am_sleep_pid=$! 902beef1b22Smrgfi 903beef1b22SmrgAC_CONFIG_COMMANDS_PRE( 904beef1b22Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 905beef1b22Smrg if test -n "$am_sleep_pid"; then 906beef1b22Smrg # Hide warnings about reused PIDs. 907beef1b22Smrg wait $am_sleep_pid 2>/dev/null 908beef1b22Smrg fi 909beef1b22Smrg AC_MSG_RESULT([done])]) 910beef1b22Smrgrm -f conftest.file 911beef1b22Smrg]) 91209885543Smrg 913beef1b22Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914beef1b22Smrg# 915beef1b22Smrg# This file is free software; the Free Software Foundation 916beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 917beef1b22Smrg# with or without modifications, as long as this notice is preserved. 91809885543Smrg 919beef1b22Smrg# AM_SILENT_RULES([DEFAULT]) 920beef1b22Smrg# -------------------------- 921beef1b22Smrg# Enable less verbose build rules; with the default set to DEFAULT 922beef1b22Smrg# ("yes" being less verbose, "no" or empty being verbose). 923beef1b22SmrgAC_DEFUN([AM_SILENT_RULES], 924beef1b22Smrg[AC_ARG_ENABLE([silent-rules], [dnl 925beef1b22SmrgAS_HELP_STRING( 926beef1b22Smrg [--enable-silent-rules], 927beef1b22Smrg [less verbose build output (undo: "make V=1")]) 928beef1b22SmrgAS_HELP_STRING( 929beef1b22Smrg [--disable-silent-rules], 930beef1b22Smrg [verbose build output (undo: "make V=0")])dnl 931beef1b22Smrg]) 932beef1b22Smrgcase $enable_silent_rules in @%:@ ((( 933beef1b22Smrg yes) AM_DEFAULT_VERBOSITY=0;; 934beef1b22Smrg no) AM_DEFAULT_VERBOSITY=1;; 935beef1b22Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936beef1b22Smrgesac 937beef1b22Smrgdnl 938beef1b22Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 939beef1b22Smrgdnl do not support nested variable expansions. 940beef1b22Smrgdnl See automake bug#9928 and bug#10237. 941beef1b22Smrgam_make=${MAKE-make} 942beef1b22SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 943beef1b22Smrg [am_cv_make_support_nested_variables], 944beef1b22Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 945beef1b22SmrgBAR0=false 946beef1b22SmrgBAR1=true 947beef1b22SmrgV=1 948beef1b22Smrgam__doit: 949beef1b22Smrg @$(TRUE) 950beef1b22Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 951beef1b22Smrg am_cv_make_support_nested_variables=yes 952beef1b22Smrgelse 953beef1b22Smrg am_cv_make_support_nested_variables=no 954beef1b22Smrgfi]) 955beef1b22Smrgif test $am_cv_make_support_nested_variables = yes; then 956beef1b22Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 957beef1b22Smrg AM_V='$(V)' 958beef1b22Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 959beef1b22Smrgelse 960beef1b22Smrg AM_V=$AM_DEFAULT_VERBOSITY 961beef1b22Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 962beef1b22Smrgfi 963beef1b22SmrgAC_SUBST([AM_V])dnl 964beef1b22SmrgAM_SUBST_NOTMAKE([AM_V])dnl 965beef1b22SmrgAC_SUBST([AM_DEFAULT_V])dnl 966beef1b22SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967beef1b22SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968beef1b22SmrgAM_BACKSLASH='\' 969beef1b22SmrgAC_SUBST([AM_BACKSLASH])dnl 970beef1b22Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 971beef1b22Smrg]) 97209885543Smrg 973beef1b22Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974beef1b22Smrg# 975beef1b22Smrg# This file is free software; the Free Software Foundation 976beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 977beef1b22Smrg# with or without modifications, as long as this notice is preserved. 97809885543Smrg 979beef1b22Smrg# AM_PROG_INSTALL_STRIP 980beef1b22Smrg# --------------------- 981beef1b22Smrg# One issue with vendor 'install' (even GNU) is that you can't 982beef1b22Smrg# specify the program used to strip binaries. This is especially 983beef1b22Smrg# annoying in cross-compiling environments, where the build's strip 984beef1b22Smrg# is unlikely to handle the host's binaries. 985beef1b22Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 986beef1b22Smrg# always use install-sh in "make install-strip", and initialize 987beef1b22Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 988beef1b22SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 989beef1b22Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 990beef1b22Smrg# Installed binaries are usually stripped using 'strip' when the user 991beef1b22Smrg# run "make install-strip". However 'strip' might not be the right 992beef1b22Smrg# tool to use in cross-compilation environments, therefore Automake 993beef1b22Smrg# will honor the 'STRIP' environment variable to overrule this program. 994beef1b22Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995beef1b22Smrgif test "$cross_compiling" != no; then 996beef1b22Smrg AC_CHECK_TOOL([STRIP], [strip], :) 997beef1b22Smrgfi 998beef1b22SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999beef1b22SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000e4f6584cSmrg 1001beef1b22Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002beef1b22Smrg# 1003beef1b22Smrg# This file is free software; the Free Software Foundation 1004beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 1005beef1b22Smrg# with or without modifications, as long as this notice is preserved. 100609885543Smrg 1007beef1b22Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1008beef1b22Smrg# --------------------------- 1009beef1b22Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010beef1b22Smrg# This macro is traced by Automake. 1011beef1b22SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1012e4f6584cSmrg 1013beef1b22Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1014beef1b22Smrg# -------------------------- 1015beef1b22Smrg# Public sister of _AM_SUBST_NOTMAKE. 1016beef1b22SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 101709885543Smrg 1018beef1b22Smrg# Check how to create a tarball. -*- Autoconf -*- 1019b12e5c03Smrg 1020beef1b22Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021beef1b22Smrg# 1022beef1b22Smrg# This file is free software; the Free Software Foundation 1023beef1b22Smrg# gives unlimited permission to copy and/or distribute it, 1024beef1b22Smrg# with or without modifications, as long as this notice is preserved. 102509885543Smrg 1026beef1b22Smrg# _AM_PROG_TAR(FORMAT) 1027beef1b22Smrg# -------------------- 1028beef1b22Smrg# Check how to create a tarball in format FORMAT. 1029beef1b22Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030beef1b22Smrg# 1031beef1b22Smrg# Substitute a variable $(am__tar) that is a command 1032beef1b22Smrg# writing to stdout a FORMAT-tarball containing the directory 1033beef1b22Smrg# $tardir. 1034beef1b22Smrg# tardir=directory && $(am__tar) > result.tar 1035beef1b22Smrg# 1036beef1b22Smrg# Substitute a variable $(am__untar) that extract such 1037beef1b22Smrg# a tarball read from stdin. 1038beef1b22Smrg# $(am__untar) < result.tar 1039beef1b22Smrg# 1040beef1b22SmrgAC_DEFUN([_AM_PROG_TAR], 1041beef1b22Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1042beef1b22Smrg# in the wild :-( We should find a proper way to deprecate it ... 1043beef1b22SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 104409885543Smrg 1045beef1b22Smrg# We'll loop over all known methods to create a tar archive until one works. 1046beef1b22Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 104709885543Smrg 1048beef1b22Smrgm4_if([$1], [v7], 1049beef1b22Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 105009885543Smrg 1051beef1b22Smrg [m4_case([$1], 1052beef1b22Smrg [ustar], 1053beef1b22Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1054beef1b22Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1055beef1b22Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1056beef1b22Smrg # and bug#13588). 1057beef1b22Smrg am_max_uid=2097151 # 2^21 - 1 1058beef1b22Smrg am_max_gid=$am_max_uid 1059beef1b22Smrg # The $UID and $GID variables are not portable, so we need to resort 1060beef1b22Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1061beef1b22Smrg # below are definitely unexpected, so allow the users to see them 1062beef1b22Smrg # (that is, avoid stderr redirection). 1063beef1b22Smrg am_uid=`id -u || echo unknown` 1064beef1b22Smrg am_gid=`id -g || echo unknown` 1065beef1b22Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1066beef1b22Smrg if test $am_uid -le $am_max_uid; then 1067beef1b22Smrg AC_MSG_RESULT([yes]) 1068beef1b22Smrg else 1069beef1b22Smrg AC_MSG_RESULT([no]) 1070beef1b22Smrg _am_tools=none 1071beef1b22Smrg fi 1072beef1b22Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1073beef1b22Smrg if test $am_gid -le $am_max_gid; then 1074beef1b22Smrg AC_MSG_RESULT([yes]) 1075beef1b22Smrg else 1076beef1b22Smrg AC_MSG_RESULT([no]) 1077beef1b22Smrg _am_tools=none 1078beef1b22Smrg fi], 10792ec8c4b4Smrg 1080beef1b22Smrg [pax], 1081beef1b22Smrg [], 108209885543Smrg 1083beef1b22Smrg [m4_fatal([Unknown tar format])]) 108409885543Smrg 1085beef1b22Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 108609885543Smrg 1087beef1b22Smrg # Go ahead even if we have the value already cached. We do so because we 1088beef1b22Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1089beef1b22Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 109009885543Smrg 1091beef1b22Smrg for _am_tool in $_am_tools; do 1092beef1b22Smrg case $_am_tool in 1093beef1b22Smrg gnutar) 1094beef1b22Smrg for _am_tar in tar gnutar gtar; do 1095beef1b22Smrg AM_RUN_LOG([$_am_tar --version]) && break 1096beef1b22Smrg done 1097beef1b22Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1098beef1b22Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1099beef1b22Smrg am__untar="$_am_tar -xf -" 1100beef1b22Smrg ;; 1101beef1b22Smrg plaintar) 1102beef1b22Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1103beef1b22Smrg # ustar tarball either. 1104beef1b22Smrg (tar --version) >/dev/null 2>&1 && continue 1105beef1b22Smrg am__tar='tar chf - "$$tardir"' 1106beef1b22Smrg am__tar_='tar chf - "$tardir"' 1107beef1b22Smrg am__untar='tar xf -' 1108beef1b22Smrg ;; 1109beef1b22Smrg pax) 1110beef1b22Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1111beef1b22Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1112beef1b22Smrg am__untar='pax -r' 1113beef1b22Smrg ;; 1114beef1b22Smrg cpio) 1115beef1b22Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1116beef1b22Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1117beef1b22Smrg am__untar='cpio -i -H $1 -d' 1118beef1b22Smrg ;; 1119beef1b22Smrg none) 1120beef1b22Smrg am__tar=false 1121beef1b22Smrg am__tar_=false 1122beef1b22Smrg am__untar=false 1123beef1b22Smrg ;; 1124beef1b22Smrg esac 112509885543Smrg 1126beef1b22Smrg # If the value was cached, stop now. We just wanted to have am__tar 1127beef1b22Smrg # and am__untar set. 1128beef1b22Smrg test -n "${am_cv_prog_tar_$1}" && break 112909885543Smrg 1130beef1b22Smrg # tar/untar a dummy directory, and stop if the command works. 1131beef1b22Smrg rm -rf conftest.dir 1132beef1b22Smrg mkdir conftest.dir 1133beef1b22Smrg echo GrepMe > conftest.dir/file 1134beef1b22Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1135beef1b22Smrg rm -rf conftest.dir 1136beef1b22Smrg if test -s conftest.tar; then 1137beef1b22Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1138beef1b22Smrg AM_RUN_LOG([cat conftest.dir/file]) 1139beef1b22Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1140beef1b22Smrg fi 1141beef1b22Smrg done 1142beef1b22Smrg rm -rf conftest.dir 1143e4f6584cSmrg 1144beef1b22Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1145beef1b22Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1146e4f6584cSmrg 1147beef1b22SmrgAC_SUBST([am__tar]) 1148beef1b22SmrgAC_SUBST([am__untar]) 1149beef1b22Smrg]) # _AM_PROG_TAR 11507b58d2e0Smrg 1151beef1b22Smrgdnl Copyright 2005 Red Hat, Inc 1152beef1b22Smrgdnl 1153beef1b22Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1154beef1b22Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1155beef1b22Smrgdnl the above copyright notice appear in all copies and that both that 1156beef1b22Smrgdnl copyright notice and this permission notice appear in supporting 1157beef1b22Smrgdnl documentation. 1158beef1b22Smrgdnl 1159beef1b22Smrgdnl The above copyright notice and this permission notice shall be included 1160beef1b22Smrgdnl in all copies or substantial portions of the Software. 1161beef1b22Smrgdnl 1162beef1b22Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1163beef1b22Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1164beef1b22Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1165beef1b22Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1166beef1b22Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1167beef1b22Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1168beef1b22Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1169beef1b22Smrgdnl 1170beef1b22Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1171beef1b22Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1172beef1b22Smrgdnl other dealings in this Software without prior written authorization 1173beef1b22Smrgdnl from the copyright holders. 1174beef1b22Smrgdnl 117509885543Smrg 1176beef1b22Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 1177beef1b22Smrg# -------------------------- 1178beef1b22Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 1179beef1b22Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 118009885543Smrg 1181beef1b22SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 1182beef1b22Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1183beef1b22Smrg SAVE_CFLAGS="$CFLAGS" 1184beef1b22Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 1185beef1b22Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1186beef1b22Smrg#include "xorg-server.h" 1187beef1b22Smrg#if !defined $1 1188beef1b22Smrg#error $1 not defined 1189beef1b22Smrg#endif 1190beef1b22Smrg ]])], 1191beef1b22Smrg [_EXT_CHECK=yes], 1192beef1b22Smrg [_EXT_CHECK=no]) 1193beef1b22Smrg CFLAGS="$SAVE_CFLAGS" 1194beef1b22Smrg AC_MSG_CHECKING([if $1 is defined]) 1195beef1b22Smrg AC_MSG_RESULT([$_EXT_CHECK]) 1196beef1b22Smrg if test "$_EXT_CHECK" != no; then 1197beef1b22Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 1198beef1b22Smrg fi 1199beef1b22Smrg]) 120009885543Smrg 1201beef1b22Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1202beef1b22Smrgdnl serial 11 (pkg-config-0.29) 1203beef1b22Smrgdnl 1204beef1b22Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1205beef1b22Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1206beef1b22Smrgdnl 1207beef1b22Smrgdnl This program is free software; you can redistribute it and/or modify 1208beef1b22Smrgdnl it under the terms of the GNU General Public License as published by 1209beef1b22Smrgdnl the Free Software Foundation; either version 2 of the License, or 1210beef1b22Smrgdnl (at your option) any later version. 1211beef1b22Smrgdnl 1212beef1b22Smrgdnl This program is distributed in the hope that it will be useful, but 1213beef1b22Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 1214beef1b22Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1215beef1b22Smrgdnl General Public License for more details. 1216beef1b22Smrgdnl 1217beef1b22Smrgdnl You should have received a copy of the GNU General Public License 1218beef1b22Smrgdnl along with this program; if not, write to the Free Software 1219beef1b22Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1220beef1b22Smrgdnl 02111-1307, USA. 1221beef1b22Smrgdnl 1222beef1b22Smrgdnl As a special exception to the GNU General Public License, if you 1223beef1b22Smrgdnl distribute this file as part of a program that contains a 1224beef1b22Smrgdnl configuration script generated by Autoconf, you may include it under 1225beef1b22Smrgdnl the same distribution terms that you use for the rest of that 1226beef1b22Smrgdnl program. 1227beef1b22Smrg 1228beef1b22Smrgdnl PKG_PREREQ(MIN-VERSION) 1229beef1b22Smrgdnl ----------------------- 1230beef1b22Smrgdnl Since: 0.29 1231beef1b22Smrgdnl 1232beef1b22Smrgdnl Verify that the version of the pkg-config macros are at least 1233beef1b22Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1234beef1b22Smrgdnl installed version of pkg-config, this checks the developer's version 1235beef1b22Smrgdnl of pkg.m4 when generating configure. 1236beef1b22Smrgdnl 1237beef1b22Smrgdnl To ensure that this macro is defined, also add: 1238beef1b22Smrgdnl m4_ifndef([PKG_PREREQ], 1239beef1b22Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1240beef1b22Smrgdnl 1241beef1b22Smrgdnl See the "Since" comment for each macro you use to see what version 1242beef1b22Smrgdnl of the macros you require. 1243beef1b22Smrgm4_defun([PKG_PREREQ], 1244beef1b22Smrg[m4_define([PKG_MACROS_VERSION], [0.29]) 1245beef1b22Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1246beef1b22Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1247beef1b22Smrg])dnl PKG_PREREQ 1248beef1b22Smrg 1249beef1b22Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1250beef1b22Smrgdnl ---------------------------------- 1251beef1b22Smrgdnl Since: 0.16 1252beef1b22Smrgdnl 1253beef1b22Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1254beef1b22Smrgdnl first found in the path. Checks that the version of pkg-config found 1255beef1b22Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1256beef1b22Smrgdnl used since that's the first version where most current features of 1257beef1b22Smrgdnl pkg-config existed. 1258beef1b22SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1259beef1b22Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1260beef1b22Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1261beef1b22Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1262beef1b22SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1263beef1b22SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1264beef1b22SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1265e4f6584cSmrg 1266beef1b22Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1267beef1b22Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1268beef1b22Smrgfi 1269beef1b22Smrgif test -n "$PKG_CONFIG"; then 1270beef1b22Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 1271beef1b22Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1272beef1b22Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1273beef1b22Smrg AC_MSG_RESULT([yes]) 1274beef1b22Smrg else 1275beef1b22Smrg AC_MSG_RESULT([no]) 1276beef1b22Smrg PKG_CONFIG="" 1277beef1b22Smrg fi 1278beef1b22Smrgfi[]dnl 1279beef1b22Smrg])dnl PKG_PROG_PKG_CONFIG 1280e4f6584cSmrg 1281beef1b22Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1282beef1b22Smrgdnl ------------------------------------------------------------------- 1283beef1b22Smrgdnl Since: 0.18 1284beef1b22Smrgdnl 1285beef1b22Smrgdnl Check to see whether a particular set of modules exists. Similar to 1286beef1b22Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1287beef1b22Smrgdnl 1288beef1b22Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1289beef1b22Smrgdnl only at the first occurence in configure.ac, so if the first place 1290beef1b22Smrgdnl it's called might be skipped (such as if it is within an "if", you 1291beef1b22Smrgdnl have to call PKG_CHECK_EXISTS manually 1292beef1b22SmrgAC_DEFUN([PKG_CHECK_EXISTS], 1293beef1b22Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1294beef1b22Smrgif test -n "$PKG_CONFIG" && \ 1295beef1b22Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1296beef1b22Smrg m4_default([$2], [:]) 1297beef1b22Smrgm4_ifvaln([$3], [else 1298beef1b22Smrg $3])dnl 1299beef1b22Smrgfi]) 130009885543Smrg 1301beef1b22Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1302beef1b22Smrgdnl --------------------------------------------- 1303beef1b22Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1304beef1b22Smrgdnl pkg_failed based on the result. 1305beef1b22Smrgm4_define([_PKG_CONFIG], 1306beef1b22Smrg[if test -n "$$1"; then 1307beef1b22Smrg pkg_cv_[]$1="$$1" 1308beef1b22Smrg elif test -n "$PKG_CONFIG"; then 1309beef1b22Smrg PKG_CHECK_EXISTS([$3], 1310beef1b22Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1311beef1b22Smrg test "x$?" != "x0" && pkg_failed=yes ], 1312beef1b22Smrg [pkg_failed=yes]) 1313beef1b22Smrg else 1314beef1b22Smrg pkg_failed=untried 1315beef1b22Smrgfi[]dnl 1316beef1b22Smrg])dnl _PKG_CONFIG 131709885543Smrg 1318beef1b22Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 1319beef1b22Smrgdnl --------------------------- 1320beef1b22Smrgdnl Internal check to see if pkg-config supports short errors. 1321beef1b22SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1322beef1b22Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1323beef1b22Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1324beef1b22Smrg _pkg_short_errors_supported=yes 1325beef1b22Smrgelse 1326beef1b22Smrg _pkg_short_errors_supported=no 1327beef1b22Smrgfi[]dnl 1328beef1b22Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1329f395c03eSmrg 1330f395c03eSmrg 1331beef1b22Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1332beef1b22Smrgdnl [ACTION-IF-NOT-FOUND]) 1333beef1b22Smrgdnl -------------------------------------------------------------- 1334beef1b22Smrgdnl Since: 0.4.0 1335beef1b22Smrgdnl 1336beef1b22Smrgdnl Note that if there is a possibility the first call to 1337beef1b22Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1338beef1b22Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1339beef1b22SmrgAC_DEFUN([PKG_CHECK_MODULES], 1340beef1b22Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1341beef1b22SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1342beef1b22SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1343e4f6584cSmrg 1344beef1b22Smrgpkg_failed=no 1345beef1b22SmrgAC_MSG_CHECKING([for $1]) 1346f395c03eSmrg 1347beef1b22Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1348beef1b22Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 13497b58d2e0Smrg 1350beef1b22Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1351beef1b22Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1352beef1b22SmrgSee the pkg-config man page for more details.]) 1353f395c03eSmrg 1354beef1b22Smrgif test $pkg_failed = yes; then 1355beef1b22Smrg AC_MSG_RESULT([no]) 1356beef1b22Smrg _PKG_SHORT_ERRORS_SUPPORTED 1357beef1b22Smrg if test $_pkg_short_errors_supported = yes; then 1358beef1b22Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1359beef1b22Smrg else 1360beef1b22Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1361beef1b22Smrg fi 1362beef1b22Smrg # Put the nasty error message in config.log where it belongs 1363beef1b22Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1364f395c03eSmrg 1365beef1b22Smrg m4_default([$4], [AC_MSG_ERROR( 1366beef1b22Smrg[Package requirements ($2) were not met: 1367f395c03eSmrg 1368beef1b22Smrg$$1_PKG_ERRORS 1369f395c03eSmrg 1370beef1b22SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1371beef1b22Smrginstalled software in a non-standard prefix. 1372f395c03eSmrg 1373beef1b22Smrg_PKG_TEXT])[]dnl 1374beef1b22Smrg ]) 1375beef1b22Smrgelif test $pkg_failed = untried; then 1376beef1b22Smrg AC_MSG_RESULT([no]) 1377beef1b22Smrg m4_default([$4], [AC_MSG_FAILURE( 1378beef1b22Smrg[The pkg-config script could not be found or is too old. Make sure it 1379beef1b22Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1380beef1b22Smrgpath to pkg-config. 13817b58d2e0Smrg 1382beef1b22Smrg_PKG_TEXT 138309885543Smrg 1384beef1b22SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1385beef1b22Smrg ]) 1386beef1b22Smrgelse 1387beef1b22Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1388beef1b22Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1389beef1b22Smrg AC_MSG_RESULT([yes]) 1390beef1b22Smrg $3 1391beef1b22Smrgfi[]dnl 1392beef1b22Smrg])dnl PKG_CHECK_MODULES 139309885543Smrg 139409885543Smrg 1395beef1b22Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1396beef1b22Smrgdnl [ACTION-IF-NOT-FOUND]) 1397beef1b22Smrgdnl --------------------------------------------------------------------- 1398beef1b22Smrgdnl Since: 0.29 1399beef1b22Smrgdnl 1400beef1b22Smrgdnl Checks for existence of MODULES and gathers its build flags with 1401beef1b22Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1402beef1b22Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 1403beef1b22Smrgdnl 1404beef1b22Smrgdnl Note that if there is a possibility the first call to 1405beef1b22Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1406beef1b22Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1407beef1b22Smrgdnl configure.ac. 1408beef1b22SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 1409beef1b22Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1410beef1b22Smrg_save_PKG_CONFIG=$PKG_CONFIG 1411beef1b22SmrgPKG_CONFIG="$PKG_CONFIG --static" 1412beef1b22SmrgPKG_CHECK_MODULES($@) 1413beef1b22SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 1414beef1b22Smrg])dnl PKG_CHECK_MODULES_STATIC 141509885543Smrg 141609885543Smrg 1417beef1b22Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 1418beef1b22Smrgdnl ------------------------- 1419beef1b22Smrgdnl Since: 0.27 1420beef1b22Smrgdnl 1421beef1b22Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 1422beef1b22Smrgdnl should install pkg-config .pc files. By default the directory is 1423beef1b22Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 1424beef1b22Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 1425beef1b22Smrgdnl parameter. 1426beef1b22SmrgAC_DEFUN([PKG_INSTALLDIR], 1427beef1b22Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1428beef1b22Smrgm4_pushdef([pkg_description], 1429beef1b22Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 1430beef1b22SmrgAC_ARG_WITH([pkgconfigdir], 1431beef1b22Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1432beef1b22Smrg [with_pkgconfigdir=]pkg_default) 1433beef1b22SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1434beef1b22Smrgm4_popdef([pkg_default]) 1435beef1b22Smrgm4_popdef([pkg_description]) 1436beef1b22Smrg])dnl PKG_INSTALLDIR 143709885543Smrg 143809885543Smrg 1439beef1b22Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1440beef1b22Smrgdnl -------------------------------- 1441beef1b22Smrgdnl Since: 0.27 1442beef1b22Smrgdnl 1443beef1b22Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 1444beef1b22Smrgdnl module should install arch-independent pkg-config .pc files. By 1445beef1b22Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 1446beef1b22Smrgdnl changed by passing DIRECTORY. The user can override through the 1447beef1b22Smrgdnl --with-noarch-pkgconfigdir parameter. 1448beef1b22SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 1449beef1b22Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1450beef1b22Smrgm4_pushdef([pkg_description], 1451beef1b22Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1452beef1b22SmrgAC_ARG_WITH([noarch-pkgconfigdir], 1453beef1b22Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1454beef1b22Smrg [with_noarch_pkgconfigdir=]pkg_default) 1455beef1b22SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1456beef1b22Smrgm4_popdef([pkg_default]) 1457beef1b22Smrgm4_popdef([pkg_description]) 1458beef1b22Smrg])dnl PKG_NOARCH_INSTALLDIR 145909885543Smrg 146009885543Smrg 1461beef1b22Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1462beef1b22Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1463beef1b22Smrgdnl ------------------------------------------- 1464beef1b22Smrgdnl Since: 0.28 1465beef1b22Smrgdnl 1466beef1b22Smrgdnl Retrieves the value of the pkg-config variable for the given module. 1467beef1b22SmrgAC_DEFUN([PKG_CHECK_VAR], 1468beef1b22Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1469beef1b22SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 147009885543Smrg 1471beef1b22Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1472beef1b22SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 147309885543Smrg 1474beef1b22SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 1475beef1b22Smrg])dnl PKG_CHECK_VAR 147609885543Smrg 1477beef1b22Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1478beef1b22Smrgdnl 1479beef1b22Smrgdnl Copyright (c) 2005, 2023, Oracle and/or its affiliates. 1480beef1b22Smrgdnl 1481beef1b22Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1482beef1b22Smrgdnl copy of this software and associated documentation files (the "Software"), 1483beef1b22Smrgdnl to deal in the Software without restriction, including without limitation 1484beef1b22Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1485beef1b22Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1486beef1b22Smrgdnl Software is furnished to do so, subject to the following conditions: 1487beef1b22Smrgdnl 1488beef1b22Smrgdnl The above copyright notice and this permission notice (including the next 1489beef1b22Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1490beef1b22Smrgdnl Software. 1491beef1b22Smrgdnl 1492beef1b22Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1493beef1b22Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1494beef1b22Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1495beef1b22Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1496beef1b22Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1497beef1b22Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1498beef1b22Smrgdnl DEALINGS IN THE SOFTWARE. 1499e4f6584cSmrg 1500beef1b22Smrg# XORG_MACROS_VERSION(required-version) 1501beef1b22Smrg# ------------------------------------- 1502beef1b22Smrg# Minimum version: 1.1.0 1503beef1b22Smrg# 1504beef1b22Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1505beef1b22Smrg# your configure.ac with the minimum required version, such as: 1506beef1b22Smrg# XORG_MACROS_VERSION(1.1) 1507beef1b22Smrg# 1508beef1b22Smrg# To ensure that this macro is defined, also add: 1509beef1b22Smrg# m4_ifndef([XORG_MACROS_VERSION], 1510beef1b22Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1511beef1b22Smrg# 1512beef1b22Smrg# 1513beef1b22Smrg# See the "minimum version" comment for each macro you use to see what 1514beef1b22Smrg# version you require. 1515beef1b22Smrgm4_defun([XORG_MACROS_VERSION],[ 1516beef1b22Smrgm4_define([vers_have], [1.20.0]) 1517beef1b22Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1518beef1b22Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1519beef1b22Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1520beef1b22Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1521beef1b22Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1522beef1b22Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1523beef1b22Smrgm4_undefine([vers_have]) 1524beef1b22Smrgm4_undefine([maj_have]) 1525beef1b22Smrgm4_undefine([maj_needed]) 1526beef1b22Smrg]) # XORG_MACROS_VERSION 152709885543Smrg 1528beef1b22Smrg# XORG_PROG_RAWCPP() 1529beef1b22Smrg# ------------------ 1530beef1b22Smrg# Minimum version: 1.0.0 1531beef1b22Smrg# 1532beef1b22Smrg# Find cpp program and necessary flags for use in pre-processing text files 1533beef1b22Smrg# such as man pages and config files 1534beef1b22SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1535beef1b22SmrgAC_REQUIRE([AC_PROG_CPP]) 1536beef1b22SmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1537beef1b22Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1538beef1b22Smrg 1539beef1b22Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1540beef1b22Smrg# which is not the best choice for supporting other OS'es, but covers most 1541beef1b22Smrg# of the ones we need for now. 1542beef1b22SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1543beef1b22SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1544beef1b22Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1545beef1b22Smrg AC_MSG_RESULT([no]) 1546beef1b22Smrgelse 1547beef1b22Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1548beef1b22Smrg RAWCPPFLAGS=-undef 1549beef1b22Smrg AC_MSG_RESULT([yes]) 1550beef1b22Smrg # under Cygwin unix is still defined even with -undef 1551beef1b22Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1552beef1b22Smrg RAWCPPFLAGS="-undef -ansi" 1553beef1b22Smrg AC_MSG_RESULT([yes, with -ansi]) 1554beef1b22Smrg else 1555beef1b22Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1556beef1b22Smrg fi 1557b12e5c03Smrgfi 1558beef1b22Smrgrm -f conftest.$ac_ext 1559b12e5c03Smrg 1560beef1b22SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1561beef1b22SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1562beef1b22Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1563beef1b22Smrg AC_MSG_RESULT([no]) 1564beef1b22Smrgelse 1565beef1b22Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1566beef1b22Smrg TRADITIONALCPPFLAGS="-traditional" 1567beef1b22Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1568beef1b22Smrg AC_MSG_RESULT([yes]) 1569beef1b22Smrg else 1570beef1b22Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1571beef1b22Smrg fi 1572beef1b22Smrgfi 1573beef1b22Smrgrm -f conftest.$ac_ext 1574beef1b22SmrgAC_SUBST(RAWCPPFLAGS) 1575beef1b22SmrgAC_SUBST(TRADITIONALCPPFLAGS) 1576beef1b22Smrg]) # XORG_PROG_RAWCPP 1577b12e5c03Smrg 1578beef1b22Smrg# XORG_MANPAGE_SECTIONS() 15797b58d2e0Smrg# ----------------------- 1580beef1b22Smrg# Minimum version: 1.0.0 1581beef1b22Smrg# 1582beef1b22Smrg# Determine which sections man pages go in for the different man page types 1583beef1b22Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1584beef1b22Smrg# Not sure if there's any better way than just hardcoding by OS name. 1585beef1b22Smrg# Override default settings by setting environment variables 1586beef1b22Smrg# Added MAN_SUBSTS in version 1.8 1587beef1b22Smrg# Added AC_PROG_SED in version 1.8 1588e4f6584cSmrg 1589beef1b22SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1590beef1b22SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1591beef1b22SmrgAC_REQUIRE([AC_PROG_SED]) 159209885543Smrg 1593beef1b22Smrgcase $host_os in 1594beef1b22Smrg solaris*) 1595beef1b22Smrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1596beef1b22Smrg # check for a man page file found in later versions that use 1597beef1b22Smrg # traditional section numbers instead 1598beef1b22Smrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1599beef1b22Smrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1600beef1b22Smrg ;; 1601beef1b22Smrg *) SYSV_MAN_SECTIONS=false ;; 1602beef1b22Smrgesac 1603e4f6584cSmrg 1604beef1b22Smrgif test x$APP_MAN_SUFFIX = x ; then 1605beef1b22Smrg APP_MAN_SUFFIX=1 1606beef1b22Smrgfi 1607beef1b22Smrgif test x$APP_MAN_DIR = x ; then 1608beef1b22Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1609beef1b22Smrgfi 161009885543Smrg 1611beef1b22Smrgif test x$LIB_MAN_SUFFIX = x ; then 1612beef1b22Smrg LIB_MAN_SUFFIX=3 1613beef1b22Smrgfi 1614beef1b22Smrgif test x$LIB_MAN_DIR = x ; then 1615beef1b22Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1616beef1b22Smrgfi 1617b12e5c03Smrg 1618beef1b22Smrgif test x$FILE_MAN_SUFFIX = x ; then 1619beef1b22Smrg case $SYSV_MAN_SECTIONS in 1620beef1b22Smrg true) FILE_MAN_SUFFIX=4 ;; 1621beef1b22Smrg *) FILE_MAN_SUFFIX=5 ;; 1622beef1b22Smrg esac 1623beef1b22Smrgfi 1624beef1b22Smrgif test x$FILE_MAN_DIR = x ; then 1625beef1b22Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1626beef1b22Smrgfi 16277b58d2e0Smrg 1628beef1b22Smrgif test x$MISC_MAN_SUFFIX = x ; then 1629beef1b22Smrg case $SYSV_MAN_SECTIONS in 1630beef1b22Smrg true) MISC_MAN_SUFFIX=5 ;; 1631beef1b22Smrg *) MISC_MAN_SUFFIX=7 ;; 1632beef1b22Smrg esac 1633beef1b22Smrgfi 1634beef1b22Smrgif test x$MISC_MAN_DIR = x ; then 1635beef1b22Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1636beef1b22Smrgfi 16377b58d2e0Smrg 1638beef1b22Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1639beef1b22Smrg case $SYSV_MAN_SECTIONS in 1640beef1b22Smrg true) DRIVER_MAN_SUFFIX=7 ;; 1641beef1b22Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1642beef1b22Smrg esac 1643beef1b22Smrgfi 1644beef1b22Smrgif test x$DRIVER_MAN_DIR = x ; then 1645beef1b22Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1646beef1b22Smrgfi 16477b58d2e0Smrg 1648beef1b22Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1649beef1b22Smrg case $SYSV_MAN_SECTIONS in 1650beef1b22Smrg true) ADMIN_MAN_SUFFIX=1m ;; 1651beef1b22Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1652beef1b22Smrg esac 1653beef1b22Smrgfi 1654beef1b22Smrgif test x$ADMIN_MAN_DIR = x ; then 1655beef1b22Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1656beef1b22Smrgfi 1657e4f6584cSmrg 165809885543Smrg 1659beef1b22SmrgAC_SUBST([APP_MAN_SUFFIX]) 1660beef1b22SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1661beef1b22SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1662beef1b22SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1663beef1b22SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1664beef1b22SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1665beef1b22SmrgAC_SUBST([APP_MAN_DIR]) 1666beef1b22SmrgAC_SUBST([LIB_MAN_DIR]) 1667beef1b22SmrgAC_SUBST([FILE_MAN_DIR]) 1668beef1b22SmrgAC_SUBST([MISC_MAN_DIR]) 1669beef1b22SmrgAC_SUBST([DRIVER_MAN_DIR]) 1670beef1b22SmrgAC_SUBST([ADMIN_MAN_DIR]) 1671e4f6584cSmrg 1672beef1b22SmrgXORG_MAN_PAGE="X Version 11" 1673beef1b22SmrgAC_SUBST([XORG_MAN_PAGE]) 1674beef1b22SmrgMAN_SUBSTS="\ 1675beef1b22Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1676beef1b22Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1677beef1b22Smrg -e 's|__xservername__|Xorg|g' \ 1678beef1b22Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1679beef1b22Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1680beef1b22Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1681beef1b22Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1682beef1b22Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1683beef1b22Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1684beef1b22Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1685beef1b22Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1686beef1b22Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1687beef1b22SmrgAC_SUBST([MAN_SUBSTS]) 1688e4f6584cSmrg 1689beef1b22Smrg]) # XORG_MANPAGE_SECTIONS 169009885543Smrg 1691beef1b22Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 16927b58d2e0Smrg# ------------------------ 1693beef1b22Smrg# Minimum version: 1.7.0 1694beef1b22Smrg# 1695beef1b22Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1696beef1b22Smrg# provided by xorg-sgml-doctools, if installed. 1697beef1b22SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1698beef1b22SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1699beef1b22SmrgXORG_SGML_PATH= 1700beef1b22SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1701beef1b22Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1702beef1b22Smrg [m4_ifval([$1],[:], 1703beef1b22Smrg [if test x"$cross_compiling" != x"yes" ; then 1704beef1b22Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1705beef1b22Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1706beef1b22Smrg fi]) 1707b12e5c03Smrg ]) 170809885543Smrg 1709beef1b22Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1710beef1b22Smrg# the path and the name of the doc stylesheet 1711beef1b22Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1712beef1b22Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1713beef1b22Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1714beef1b22Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1715b12e5c03Smrgelse 1716beef1b22Smrg AC_MSG_RESULT([no]) 1717b12e5c03Smrgfi 1718e4f6584cSmrg 1719beef1b22SmrgAC_SUBST(XORG_SGML_PATH) 1720beef1b22SmrgAC_SUBST(STYLESHEET_SRCDIR) 1721beef1b22SmrgAC_SUBST(XSL_STYLESHEET) 1722beef1b22SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1723beef1b22Smrg]) # XORG_CHECK_SGML_DOCTOOLS 1724b698ba48Smrg 1725beef1b22Smrg# XORG_CHECK_LINUXDOC 17267b58d2e0Smrg# ------------------- 1727beef1b22Smrg# Minimum version: 1.0.0 1728beef1b22Smrg# 1729beef1b22Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1730beef1b22Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1731beef1b22Smrg# Whether or not the necessary tools and files are found can be checked 1732beef1b22Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1733beef1b22SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1734beef1b22SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1735beef1b22SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1736b12e5c03Smrg 1737beef1b22SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1738b698ba48Smrg 1739beef1b22SmrgAC_MSG_CHECKING([whether to build documentation]) 1740b698ba48Smrg 1741beef1b22Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1742beef1b22Smrg BUILDDOC=yes 1743beef1b22Smrgelse 1744beef1b22Smrg BUILDDOC=no 1745beef1b22Smrgfi 1746b12e5c03Smrg 1747beef1b22SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1748beef1b22Smrg 1749beef1b22SmrgAC_MSG_RESULT([$BUILDDOC]) 1750beef1b22Smrg 1751beef1b22SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1752beef1b22Smrg 1753beef1b22Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1754beef1b22Smrg BUILDPDFDOC=yes 17557b58d2e0Smrgelse 1756beef1b22Smrg BUILDPDFDOC=no 1757e4f6584cSmrgfi 175809885543Smrg 1759beef1b22SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 176009885543Smrg 1761beef1b22SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 176209885543Smrg 1763beef1b22SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1764beef1b22SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1765beef1b22SmrgMAKE_PDF="$PS2PDF" 1766beef1b22SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 176709885543Smrg 1768beef1b22SmrgAC_SUBST(MAKE_TEXT) 1769beef1b22SmrgAC_SUBST(MAKE_PS) 1770beef1b22SmrgAC_SUBST(MAKE_PDF) 1771beef1b22SmrgAC_SUBST(MAKE_HTML) 1772beef1b22Smrg]) # XORG_CHECK_LINUXDOC 177309885543Smrg 1774beef1b22Smrg# XORG_CHECK_DOCBOOK 1775beef1b22Smrg# ------------------- 1776beef1b22Smrg# Minimum version: 1.0.0 1777beef1b22Smrg# 1778beef1b22Smrg# Checks for the ability to build output formats from SGML DocBook source. 1779beef1b22Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1780beef1b22Smrg# indicates whether the necessary tools and files are found and, if set, 1781beef1b22Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1782beef1b22SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1783beef1b22SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 178409885543Smrg 1785beef1b22SmrgBUILDTXTDOC=no 1786beef1b22SmrgBUILDPDFDOC=no 1787beef1b22SmrgBUILDPSDOC=no 1788beef1b22SmrgBUILDHTMLDOC=no 1789b12e5c03Smrg 1790beef1b22SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1791beef1b22SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1792beef1b22SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1793beef1b22SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1794b12e5c03Smrg 1795beef1b22SmrgAC_MSG_CHECKING([whether to build text documentation]) 1796beef1b22Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1797beef1b22Smrg test x$BUILD_TXTDOC != xno; then 1798beef1b22Smrg BUILDTXTDOC=yes 1799beef1b22Smrgfi 1800beef1b22SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1801beef1b22SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1802b12e5c03Smrg 1803beef1b22SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1804beef1b22Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1805beef1b22Smrg test x$BUILD_PDFDOC != xno; then 1806beef1b22Smrg BUILDPDFDOC=yes 1807beef1b22Smrgfi 1808beef1b22SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1809beef1b22SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1810e4f6584cSmrg 1811beef1b22SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1812beef1b22Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1813beef1b22Smrg test x$BUILD_PSDOC != xno; then 1814beef1b22Smrg BUILDPSDOC=yes 1815beef1b22Smrgfi 1816beef1b22SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1817beef1b22SmrgAC_MSG_RESULT([$BUILDPSDOC]) 181809885543Smrg 1819beef1b22SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1820beef1b22Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1821beef1b22Smrg test x$BUILD_HTMLDOC != xno; then 1822beef1b22Smrg BUILDHTMLDOC=yes 1823beef1b22Smrgfi 1824beef1b22SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1825beef1b22SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1826e4f6584cSmrg 1827beef1b22SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1828beef1b22SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1829beef1b22SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1830beef1b22SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1831e4f6584cSmrg 1832beef1b22SmrgAC_SUBST(MAKE_TEXT) 1833beef1b22SmrgAC_SUBST(MAKE_PS) 1834beef1b22SmrgAC_SUBST(MAKE_PDF) 1835beef1b22SmrgAC_SUBST(MAKE_HTML) 1836beef1b22Smrg]) # XORG_CHECK_DOCBOOK 1837b12e5c03Smrg 1838beef1b22Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1839beef1b22Smrg# ---------------- 1840beef1b22Smrg# Minimum version: 1.5.0 1841beef1b22Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1842beef1b22Smrg# 1843beef1b22Smrg# Documentation tools are not always available on all platforms and sometimes 1844beef1b22Smrg# not at the appropriate level. This macro enables a module to test for the 1845beef1b22Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1846beef1b22Smrg# the --with-xmlto option, it allows maximum flexibility in making decisions 1847beef1b22Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1848beef1b22Smrg# --with-xmlto assumes 'auto'. 1849beef1b22Smrg# 1850beef1b22Smrg# Interface to module: 1851beef1b22Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1852beef1b22Smrg# XMLTO: returns the path of the xmlto program found 1853beef1b22Smrg# returns the path set by the user in the environment 1854beef1b22Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1855beef1b22Smrg# 'no' user instructs the module not to use xmlto 1856beef1b22Smrg# 1857beef1b22Smrg# Added in version 1.10.0 1858beef1b22Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1859beef1b22Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1860beef1b22Smrg# 1861beef1b22Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1862beef1b22Smrg# 1863beef1b22SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1864beef1b22SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1865beef1b22Smrgm4_define([_defopt], m4_default([$2], [auto])) 1866beef1b22SmrgAC_ARG_WITH(xmlto, 1867beef1b22Smrg AS_HELP_STRING([--with-xmlto], 1868beef1b22Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1869beef1b22Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1870beef1b22Smrgm4_undefine([_defopt]) 1871b12e5c03Smrg 1872beef1b22Smrgif test "x$use_xmlto" = x"auto"; then 1873beef1b22Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1874beef1b22Smrg if test "x$XMLTO" = "x"; then 1875beef1b22Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1876beef1b22Smrg have_xmlto=no 1877beef1b22Smrg else 1878beef1b22Smrg have_xmlto=yes 1879beef1b22Smrg fi 1880beef1b22Smrgelif test "x$use_xmlto" = x"yes" ; then 1881beef1b22Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1882beef1b22Smrg if test "x$XMLTO" = "x"; then 1883beef1b22Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1884beef1b22Smrg fi 1885beef1b22Smrg have_xmlto=yes 1886beef1b22Smrgelif test "x$use_xmlto" = x"no" ; then 1887beef1b22Smrg if test "x$XMLTO" != "x"; then 1888beef1b22Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1889beef1b22Smrg fi 1890beef1b22Smrg have_xmlto=no 1891b12e5c03Smrgelse 1892beef1b22Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1893b12e5c03Smrgfi 1894e4f6584cSmrg 1895beef1b22Smrg# Test for a minimum version of xmlto, if provided. 1896beef1b22Smrgm4_ifval([$1], 1897beef1b22Smrg[if test "$have_xmlto" = yes; then 1898beef1b22Smrg # scrape the xmlto version 1899beef1b22Smrg AC_MSG_CHECKING([the xmlto version]) 1900beef1b22Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1901beef1b22Smrg AC_MSG_RESULT([$xmlto_version]) 1902beef1b22Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1903beef1b22Smrg [if test "x$use_xmlto" = xauto; then 1904beef1b22Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1905beef1b22Smrg have_xmlto=no 1906beef1b22Smrg else 1907beef1b22Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1908beef1b22Smrg fi]) 1909beef1b22Smrgfi]) 191009885543Smrg 1911beef1b22Smrg# Test for the ability of xmlto to generate a text target 1912beef1b22Smrg# 1913beef1b22Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1914beef1b22Smrg# following test for empty XML docbook files. 1915beef1b22Smrg# For compatibility reasons use the following empty XML docbook file and if 1916beef1b22Smrg# it fails try it again with a non-empty XML file. 1917beef1b22Smrghave_xmlto_text=no 1918beef1b22Smrgcat > conftest.xml << "EOF" 1919beef1b22SmrgEOF 1920beef1b22SmrgAS_IF([test "$have_xmlto" = yes], 1921beef1b22Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1922beef1b22Smrg [have_xmlto_text=yes], 1923beef1b22Smrg [# Try it again with a non-empty XML file. 1924beef1b22Smrg cat > conftest.xml << "EOF" 1925beef1b22Smrg<x></x> 1926beef1b22SmrgEOF 1927beef1b22Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1928beef1b22Smrg [have_xmlto_text=yes], 1929beef1b22Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1930beef1b22Smrgrm -f conftest.xml 1931beef1b22SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1932beef1b22SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1933beef1b22Smrg]) # XORG_WITH_XMLTO 19342ec8c4b4Smrg 1935beef1b22Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1936beef1b22Smrg# -------------------------------------------- 1937beef1b22Smrg# Minimum version: 1.12.0 1938beef1b22Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1939beef1b22Smrg# 1940beef1b22Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1941beef1b22Smrg# XML-based language used for the transformation of XML documents. 1942beef1b22Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1943beef1b22Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1944beef1b22Smrg# The XSLT processor is often used as a standalone tool for transformations. 1945beef1b22Smrg# It should not be assumed that this tool is used only to work with documnetation. 1946beef1b22Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1947beef1b22Smrg# 1948beef1b22Smrg# Interface to module: 1949beef1b22Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1950beef1b22Smrg# XSLTPROC: returns the path of the xsltproc program found 1951beef1b22Smrg# returns the path set by the user in the environment 1952beef1b22Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1953beef1b22Smrg# 'no' user instructs the module not to use xsltproc 1954beef1b22Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1955beef1b22Smrg# 1956beef1b22Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1957beef1b22Smrg# 1958beef1b22SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1959beef1b22SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1960beef1b22Smrg# Preserves the interface, should it be implemented later 1961beef1b22Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1962beef1b22Smrgm4_define([_defopt], m4_default([$2], [auto])) 1963beef1b22SmrgAC_ARG_WITH(xsltproc, 1964beef1b22Smrg AS_HELP_STRING([--with-xsltproc], 1965beef1b22Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1966beef1b22Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1967beef1b22Smrgm4_undefine([_defopt]) 196809885543Smrg 1969beef1b22Smrgif test "x$use_xsltproc" = x"auto"; then 1970beef1b22Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1971beef1b22Smrg if test "x$XSLTPROC" = "x"; then 1972beef1b22Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1973beef1b22Smrg have_xsltproc=no 1974beef1b22Smrg else 1975beef1b22Smrg have_xsltproc=yes 1976beef1b22Smrg fi 1977beef1b22Smrgelif test "x$use_xsltproc" = x"yes" ; then 1978beef1b22Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1979beef1b22Smrg if test "x$XSLTPROC" = "x"; then 1980beef1b22Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1981beef1b22Smrg fi 1982beef1b22Smrg have_xsltproc=yes 1983beef1b22Smrgelif test "x$use_xsltproc" = x"no" ; then 1984beef1b22Smrg if test "x$XSLTPROC" != "x"; then 1985beef1b22Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1986beef1b22Smrg fi 1987beef1b22Smrg have_xsltproc=no 1988beef1b22Smrgelse 1989beef1b22Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 19907b58d2e0Smrgfi 1991b12e5c03Smrg 1992beef1b22SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1993beef1b22Smrg]) # XORG_WITH_XSLTPROC 199409885543Smrg 1995beef1b22Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1996beef1b22Smrg# ---------------------------------------- 1997beef1b22Smrg# Minimum version: 1.15.0 1998beef1b22Smrg# 1999beef1b22Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 2000beef1b22Smrg# scanning arbitrary text files, extracting information from those text files, 2001beef1b22Smrg# and printing reports based on that information. 2002beef1b22Smrg# 2003beef1b22Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 2004beef1b22Smrg# 2005beef1b22Smrg# Interface to module: 2006beef1b22Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 2007beef1b22Smrg# PERL: returns the path of the perl program found 2008beef1b22Smrg# returns the path set by the user in the environment 2009beef1b22Smrg# --with-perl: 'yes' user instructs the module to use perl 2010beef1b22Smrg# 'no' user instructs the module not to use perl 2011beef1b22Smrg# have_perl: returns yes if perl found in PATH or no 2012beef1b22Smrg# 2013beef1b22Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 2014beef1b22Smrg# 2015beef1b22SmrgAC_DEFUN([XORG_WITH_PERL],[ 2016beef1b22SmrgAC_ARG_VAR([PERL], [Path to perl command]) 2017beef1b22Smrg# Preserves the interface, should it be implemented later 2018beef1b22Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 2019beef1b22Smrgm4_define([_defopt], m4_default([$2], [auto])) 2020beef1b22SmrgAC_ARG_WITH(perl, 2021beef1b22Smrg AS_HELP_STRING([--with-perl], 2022beef1b22Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 2023beef1b22Smrg [use_perl=$withval], [use_perl=]_defopt) 2024beef1b22Smrgm4_undefine([_defopt]) 2025e4f6584cSmrg 2026beef1b22Smrgif test "x$use_perl" = x"auto"; then 2027beef1b22Smrg AC_PATH_PROG([PERL], [perl]) 2028beef1b22Smrg if test "x$PERL" = "x"; then 2029beef1b22Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 2030beef1b22Smrg have_perl=no 2031beef1b22Smrg else 2032beef1b22Smrg have_perl=yes 20337b58d2e0Smrg fi 2034beef1b22Smrgelif test "x$use_perl" = x"yes" ; then 2035beef1b22Smrg AC_PATH_PROG([PERL], [perl]) 2036beef1b22Smrg if test "x$PERL" = "x"; then 2037beef1b22Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 2038beef1b22Smrg fi 2039beef1b22Smrg have_perl=yes 2040beef1b22Smrgelif test "x$use_perl" = x"no" ; then 2041beef1b22Smrg if test "x$PERL" != "x"; then 2042beef1b22Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 2043beef1b22Smrg fi 2044beef1b22Smrg have_perl=no 20457b58d2e0Smrgelse 2046beef1b22Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 2047e4f6584cSmrgfi 2048e4f6584cSmrg 2049beef1b22SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2050beef1b22Smrg]) # XORG_WITH_PERL 205109885543Smrg 2052beef1b22Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2053beef1b22Smrg# ---------------- 2054beef1b22Smrg# Minimum version: 1.5.0 2055beef1b22Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2056beef1b22Smrg# 2057beef1b22Smrg# Documentation tools are not always available on all platforms and sometimes 2058beef1b22Smrg# not at the appropriate level. This macro enables a module to test for the 2059beef1b22Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2060beef1b22Smrg# the --with-asciidoc option, it allows maximum flexibility in making decisions 2061beef1b22Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2062beef1b22Smrg# --with-asciidoc assumes 'auto'. 2063beef1b22Smrg# 2064beef1b22Smrg# Interface to module: 2065beef1b22Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2066beef1b22Smrg# ASCIIDOC: returns the path of the asciidoc program found 2067beef1b22Smrg# returns the path set by the user in the environment 2068beef1b22Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2069beef1b22Smrg# 'no' user instructs the module not to use asciidoc 2070beef1b22Smrg# 2071beef1b22Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2072beef1b22Smrg# 2073beef1b22SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 2074beef1b22SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2075beef1b22Smrgm4_define([_defopt], m4_default([$2], [auto])) 2076beef1b22SmrgAC_ARG_WITH(asciidoc, 2077beef1b22Smrg AS_HELP_STRING([--with-asciidoc], 2078beef1b22Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2079beef1b22Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2080beef1b22Smrgm4_undefine([_defopt]) 208109885543Smrg 2082beef1b22Smrgif test "x$use_asciidoc" = x"auto"; then 2083beef1b22Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2084beef1b22Smrg if test "x$ASCIIDOC" = "x"; then 2085beef1b22Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2086beef1b22Smrg have_asciidoc=no 2087beef1b22Smrg else 2088beef1b22Smrg have_asciidoc=yes 20897b58d2e0Smrg fi 2090beef1b22Smrgelif test "x$use_asciidoc" = x"yes" ; then 2091beef1b22Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2092beef1b22Smrg if test "x$ASCIIDOC" = "x"; then 2093beef1b22Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2094beef1b22Smrg fi 2095beef1b22Smrg have_asciidoc=yes 2096beef1b22Smrgelif test "x$use_asciidoc" = x"no" ; then 2097beef1b22Smrg if test "x$ASCIIDOC" != "x"; then 2098beef1b22Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2099beef1b22Smrg fi 2100beef1b22Smrg have_asciidoc=no 21017b58d2e0Smrgelse 2102beef1b22Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 21037b58d2e0Smrgfi 2104beef1b22Smrgm4_ifval([$1], 2105beef1b22Smrg[if test "$have_asciidoc" = yes; then 2106beef1b22Smrg # scrape the asciidoc version 2107beef1b22Smrg AC_MSG_CHECKING([the asciidoc version]) 2108beef1b22Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2109beef1b22Smrg AC_MSG_RESULT([$asciidoc_version]) 2110beef1b22Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 2111beef1b22Smrg [if test "x$use_asciidoc" = xauto; then 2112beef1b22Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2113beef1b22Smrg have_asciidoc=no 2114beef1b22Smrg else 2115beef1b22Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2116beef1b22Smrg fi]) 2117beef1b22Smrgfi]) 2118beef1b22SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2119beef1b22Smrg]) # XORG_WITH_ASCIIDOC 2120e4f6584cSmrg 2121beef1b22Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2122beef1b22Smrg# ------------------------------------------- 2123beef1b22Smrg# Minimum version: 1.5.0 2124beef1b22Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2125beef1b22Smrg# Minimum version for optional DOT checking: 1.18.0 2126beef1b22Smrg# 2127beef1b22Smrg# Documentation tools are not always available on all platforms and sometimes 2128beef1b22Smrg# not at the appropriate level. This macro enables a module to test for the 2129beef1b22Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2130beef1b22Smrg# the --with-doxygen option, it allows maximum flexibility in making decisions 2131beef1b22Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 2132beef1b22Smrg# --with-doxygen assumes 'auto'. 2133beef1b22Smrg# 2134beef1b22Smrg# Interface to module: 2135beef1b22Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2136beef1b22Smrg# DOXYGEN: returns the path of the doxygen program found 2137beef1b22Smrg# returns the path set by the user in the environment 2138beef1b22Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 2139beef1b22Smrg# 'no' user instructs the module not to use doxygen 2140beef1b22Smrg# 2141beef1b22Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2142beef1b22Smrg# 2143beef1b22SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 2144beef1b22SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2145beef1b22SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2146beef1b22Smrgm4_define([_defopt], m4_default([$2], [auto])) 2147beef1b22SmrgAC_ARG_WITH(doxygen, 2148beef1b22Smrg AS_HELP_STRING([--with-doxygen], 2149beef1b22Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2150beef1b22Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 2151beef1b22Smrgm4_undefine([_defopt]) 215209885543Smrg 2153beef1b22Smrgif test "x$use_doxygen" = x"auto"; then 2154beef1b22Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2155beef1b22Smrg if test "x$DOXYGEN" = "x"; then 2156beef1b22Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2157beef1b22Smrg have_doxygen=no 2158beef1b22Smrg else 2159beef1b22Smrg have_doxygen=yes 2160beef1b22Smrg fi 2161beef1b22Smrgelif test "x$use_doxygen" = x"yes" ; then 2162beef1b22Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2163beef1b22Smrg if test "x$DOXYGEN" = "x"; then 2164beef1b22Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2165beef1b22Smrg fi 2166beef1b22Smrg have_doxygen=yes 2167beef1b22Smrgelif test "x$use_doxygen" = x"no" ; then 2168beef1b22Smrg if test "x$DOXYGEN" != "x"; then 2169beef1b22Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2170beef1b22Smrg fi 2171beef1b22Smrg have_doxygen=no 2172beef1b22Smrgelse 2173beef1b22Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2174beef1b22Smrgfi 2175beef1b22Smrgm4_ifval([$1], 2176beef1b22Smrg[if test "$have_doxygen" = yes; then 2177beef1b22Smrg # scrape the doxygen version 2178beef1b22Smrg AC_MSG_CHECKING([the doxygen version]) 2179beef1b22Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 2180beef1b22Smrg AC_MSG_RESULT([$doxygen_version]) 2181beef1b22Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 2182beef1b22Smrg [if test "x$use_doxygen" = xauto; then 2183beef1b22Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2184beef1b22Smrg have_doxygen=no 2185beef1b22Smrg else 2186beef1b22Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2187beef1b22Smrg fi]) 2188beef1b22Smrgfi]) 218909885543Smrg 2190beef1b22Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2191beef1b22Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2192beef1b22Smrgdnl HAVE_DOT = @HAVE_DOT@ 2193beef1b22SmrgHAVE_DOT=no 2194beef1b22Smrgif test "x$have_doxygen" = "xyes"; then 2195beef1b22Smrg AC_PATH_PROG([DOT], [dot]) 2196beef1b22Smrg if test "x$DOT" != "x"; then 2197beef1b22Smrg HAVE_DOT=yes 2198beef1b22Smrg fi 2199beef1b22Smrgfi 220009885543Smrg 2201beef1b22SmrgAC_SUBST([HAVE_DOT]) 2202beef1b22SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2203beef1b22SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2204beef1b22Smrg]) # XORG_WITH_DOXYGEN 2205b12e5c03Smrg 2206beef1b22Smrg# XORG_WITH_GROFF([DEFAULT]) 2207beef1b22Smrg# ---------------- 2208beef1b22Smrg# Minimum version: 1.6.0 2209beef1b22Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2210beef1b22Smrg# 2211beef1b22Smrg# Documentation tools are not always available on all platforms and sometimes 2212beef1b22Smrg# not at the appropriate level. This macro enables a module to test for the 2213beef1b22Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2214beef1b22Smrg# the --with-groff option, it allows maximum flexibility in making decisions 2215beef1b22Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 2216beef1b22Smrg# --with-groff assumes 'auto'. 2217beef1b22Smrg# 2218beef1b22Smrg# Interface to module: 2219beef1b22Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2220beef1b22Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2221beef1b22Smrg# HAVE_GROFF_MS: the -ms macros package 2222beef1b22Smrg# GROFF: returns the path of the groff program found 2223beef1b22Smrg# returns the path set by the user in the environment 2224beef1b22Smrg# --with-groff: 'yes' user instructs the module to use groff 2225beef1b22Smrg# 'no' user instructs the module not to use groff 2226beef1b22Smrg# 2227beef1b22Smrg# Added in version 1.9.0: 2228beef1b22Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2229beef1b22Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2230beef1b22Smrg# psselect from the psutils package. 2231beef1b22Smrg# the ghostcript package. Refer to the grohtml man pages 2232beef1b22Smrg# 2233beef1b22Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2234beef1b22Smrg# 2235beef1b22Smrg# OS and distros often splits groff in a basic and full package, the former 2236beef1b22Smrg# having the groff program and the later having devices, fonts and macros 2237beef1b22Smrg# Checking for the groff executable is not enough. 2238beef1b22Smrg# 2239beef1b22Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 2240beef1b22Smrg# unset HAVE_GROFF or GROFF env variables. 2241beef1b22Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2242beef1b22Smrg# 2243beef1b22SmrgAC_DEFUN([XORG_WITH_GROFF],[ 2244beef1b22SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2245beef1b22Smrgm4_define([_defopt], m4_default([$1], [auto])) 2246beef1b22SmrgAC_ARG_WITH(groff, 2247beef1b22Smrg AS_HELP_STRING([--with-groff], 2248beef1b22Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2249beef1b22Smrg [use_groff=$withval], [use_groff=]_defopt) 2250beef1b22Smrgm4_undefine([_defopt]) 225109885543Smrg 2252beef1b22Smrgif test "x$use_groff" = x"auto"; then 2253beef1b22Smrg AC_PATH_PROG([GROFF], [groff]) 2254beef1b22Smrg if test "x$GROFF" = "x"; then 2255beef1b22Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2256beef1b22Smrg have_groff=no 2257beef1b22Smrg else 2258beef1b22Smrg have_groff=yes 2259beef1b22Smrg fi 2260beef1b22Smrgelif test "x$use_groff" = x"yes" ; then 2261beef1b22Smrg AC_PATH_PROG([GROFF], [groff]) 2262beef1b22Smrg if test "x$GROFF" = "x"; then 2263beef1b22Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2264beef1b22Smrg fi 2265beef1b22Smrg have_groff=yes 2266beef1b22Smrgelif test "x$use_groff" = x"no" ; then 2267beef1b22Smrg if test "x$GROFF" != "x"; then 2268beef1b22Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2269beef1b22Smrg fi 2270beef1b22Smrg have_groff=no 2271beef1b22Smrgelse 2272beef1b22Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2273beef1b22Smrgfi 2274beef1b22Smrg 2275beef1b22Smrg# We have groff, test for the presence of the macro packages 2276beef1b22Smrgif test "x$have_groff" = x"yes"; then 2277beef1b22Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2278beef1b22Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2279beef1b22Smrg groff_ms_works=yes 22807b58d2e0Smrg else 2281beef1b22Smrg groff_ms_works=no 22827b58d2e0Smrg fi 2283beef1b22Smrg AC_MSG_RESULT([$groff_ms_works]) 2284beef1b22Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2285beef1b22Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2286beef1b22Smrg groff_mm_works=yes 2287beef1b22Smrg else 2288beef1b22Smrg groff_mm_works=no 2289beef1b22Smrg fi 2290beef1b22Smrg AC_MSG_RESULT([$groff_mm_works]) 2291beef1b22Smrgfi 2292e4f6584cSmrg 2293beef1b22Smrg# We have groff, test for HTML dependencies, one command per package 2294beef1b22Smrgif test "x$have_groff" = x"yes"; then 2295beef1b22Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2296beef1b22Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2297beef1b22Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2298beef1b22Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2299beef1b22Smrg have_groff_html=yes 2300beef1b22Smrg else 2301beef1b22Smrg have_groff_html=no 2302beef1b22Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2303beef1b22Smrg fi 2304beef1b22Smrgfi 230509885543Smrg 2306beef1b22Smrg# Set Automake conditionals for Makefiles 2307beef1b22SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2308beef1b22SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2309beef1b22SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2310beef1b22SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2311beef1b22Smrg]) # XORG_WITH_GROFF 2312b12e5c03Smrg 2313beef1b22Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2314beef1b22Smrg# --------------------------------------- 2315beef1b22Smrg# Minimum version: 1.6.0 2316beef1b22Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2317beef1b22Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2318beef1b22Smrg# 2319beef1b22Smrg# Documentation tools are not always available on all platforms and sometimes 2320beef1b22Smrg# not at the appropriate level. This macro enables a module to test for the 2321beef1b22Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2322beef1b22Smrg# the --with-fop option, it allows maximum flexibility in making decisions 2323beef1b22Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 2324beef1b22Smrg# --with-fop assumes 'auto'. 2325beef1b22Smrg# 2326beef1b22Smrg# Interface to module: 2327beef1b22Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2328beef1b22Smrg# FOP: returns the path of the fop program found 2329beef1b22Smrg# returns the path set by the user in the environment 2330beef1b22Smrg# --with-fop: 'yes' user instructs the module to use fop 2331beef1b22Smrg# 'no' user instructs the module not to use fop 2332beef1b22Smrg# 2333beef1b22Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2334beef1b22Smrg# 2335beef1b22SmrgAC_DEFUN([XORG_WITH_FOP],[ 2336beef1b22SmrgAC_ARG_VAR([FOP], [Path to fop command]) 2337beef1b22Smrgm4_define([_defopt], m4_default([$2], [auto])) 2338beef1b22SmrgAC_ARG_WITH(fop, 2339beef1b22Smrg AS_HELP_STRING([--with-fop], 2340beef1b22Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2341beef1b22Smrg [use_fop=$withval], [use_fop=]_defopt) 2342beef1b22Smrgm4_undefine([_defopt]) 2343beef1b22Smrg 2344beef1b22Smrgif test "x$use_fop" = x"auto"; then 2345beef1b22Smrg AC_PATH_PROG([FOP], [fop]) 2346beef1b22Smrg if test "x$FOP" = "x"; then 2347beef1b22Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2348beef1b22Smrg have_fop=no 2349beef1b22Smrg else 2350beef1b22Smrg have_fop=yes 2351beef1b22Smrg fi 2352beef1b22Smrgelif test "x$use_fop" = x"yes" ; then 2353beef1b22Smrg AC_PATH_PROG([FOP], [fop]) 2354beef1b22Smrg if test "x$FOP" = "x"; then 2355beef1b22Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2356beef1b22Smrg fi 2357beef1b22Smrg have_fop=yes 2358beef1b22Smrgelif test "x$use_fop" = x"no" ; then 2359beef1b22Smrg if test "x$FOP" != "x"; then 2360beef1b22Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2361beef1b22Smrg fi 2362beef1b22Smrg have_fop=no 23637b58d2e0Smrgelse 2364beef1b22Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 23657b58d2e0Smrgfi 236609885543Smrg 2367beef1b22Smrg# Test for a minimum version of fop, if provided. 2368beef1b22Smrgm4_ifval([$1], 2369beef1b22Smrg[if test "$have_fop" = yes; then 2370beef1b22Smrg # scrape the fop version 2371beef1b22Smrg AC_MSG_CHECKING([for fop minimum version]) 2372beef1b22Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2373beef1b22Smrg AC_MSG_RESULT([$fop_version]) 2374beef1b22Smrg AS_VERSION_COMPARE([$fop_version], [$1], 2375beef1b22Smrg [if test "x$use_fop" = xauto; then 2376beef1b22Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2377beef1b22Smrg have_fop=no 2378beef1b22Smrg else 2379beef1b22Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2380beef1b22Smrg fi]) 2381beef1b22Smrgfi]) 2382beef1b22SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2383beef1b22Smrg]) # XORG_WITH_FOP 2384beef1b22Smrg 2385beef1b22Smrg# XORG_WITH_M4([MIN-VERSION]) 2386beef1b22Smrg# --------------------------- 2387beef1b22Smrg# Minimum version: 1.19.0 2388beef1b22Smrg# 2389beef1b22Smrg# This macro attempts to locate an m4 macro processor which supports 2390beef1b22Smrg# -I option and is only useful for modules relying on M4 in order to 2391beef1b22Smrg# expand macros in source code files. 2392beef1b22Smrg# 2393beef1b22Smrg# Interface to module: 2394beef1b22Smrg# M4: returns the path of the m4 program found 2395beef1b22Smrg# returns the path set by the user in the environment 2396beef1b22Smrg# 2397beef1b22SmrgAC_DEFUN([XORG_WITH_M4], [ 2398beef1b22SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2399beef1b22Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2400beef1b22Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2401beef1b22Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2402beef1b22Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 2403beef1b22Smrg [$PATH:/usr/gnu/bin])]) 240409885543Smrg 2405beef1b22SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 2406beef1b22Smrg]) # XORG_WITH_M4 2407b698ba48Smrg 2408beef1b22Smrg# XORG_WITH_PS2PDF([DEFAULT]) 24097b58d2e0Smrg# ---------------- 2410beef1b22Smrg# Minimum version: 1.6.0 2411beef1b22Smrg# Minimum version for optional DEFAULT argument: 1.11.0 2412beef1b22Smrg# 2413beef1b22Smrg# Documentation tools are not always available on all platforms and sometimes 2414beef1b22Smrg# not at the appropriate level. This macro enables a module to test for the 2415beef1b22Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 2416beef1b22Smrg# the --with-ps2pdf option, it allows maximum flexibility in making decisions 2417beef1b22Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2418beef1b22Smrg# --with-ps2pdf assumes 'auto'. 2419beef1b22Smrg# 2420beef1b22Smrg# Interface to module: 2421beef1b22Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2422beef1b22Smrg# PS2PDF: returns the path of the ps2pdf program found 2423beef1b22Smrg# returns the path set by the user in the environment 2424beef1b22Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2425beef1b22Smrg# 'no' user instructs the module not to use ps2pdf 2426beef1b22Smrg# 2427beef1b22Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2428beef1b22Smrg# 2429beef1b22SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2430beef1b22SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2431beef1b22Smrgm4_define([_defopt], m4_default([$1], [auto])) 2432beef1b22SmrgAC_ARG_WITH(ps2pdf, 2433beef1b22Smrg AS_HELP_STRING([--with-ps2pdf], 2434beef1b22Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2435beef1b22Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2436beef1b22Smrgm4_undefine([_defopt]) 2437b698ba48Smrg 2438beef1b22Smrgif test "x$use_ps2pdf" = x"auto"; then 2439beef1b22Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2440beef1b22Smrg if test "x$PS2PDF" = "x"; then 2441beef1b22Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2442beef1b22Smrg have_ps2pdf=no 2443beef1b22Smrg else 2444beef1b22Smrg have_ps2pdf=yes 2445beef1b22Smrg fi 2446beef1b22Smrgelif test "x$use_ps2pdf" = x"yes" ; then 2447beef1b22Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2448beef1b22Smrg if test "x$PS2PDF" = "x"; then 2449beef1b22Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2450beef1b22Smrg fi 2451beef1b22Smrg have_ps2pdf=yes 2452beef1b22Smrgelif test "x$use_ps2pdf" = x"no" ; then 2453beef1b22Smrg if test "x$PS2PDF" != "x"; then 2454beef1b22Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2455beef1b22Smrg fi 2456beef1b22Smrg have_ps2pdf=no 24577b58d2e0Smrgelse 2458beef1b22Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2459beef1b22Smrgfi 2460beef1b22SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2461beef1b22Smrg]) # XORG_WITH_PS2PDF 2462e4f6584cSmrg 2463beef1b22Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 2464beef1b22Smrg# ---------------- 2465beef1b22Smrg# Minimum version: 1.6.0 2466beef1b22Smrg# 2467beef1b22Smrg# Documentation tools are not always available on all platforms and sometimes 2468beef1b22Smrg# not at the appropriate level. This macro enables a builder to skip all 2469beef1b22Smrg# documentation targets except traditional man pages. 2470beef1b22Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2471beef1b22Smrg# maximum flexibility in controlling documentation building. 2472beef1b22Smrg# Refer to: 2473beef1b22Smrg# XORG_WITH_XMLTO --with-xmlto 2474beef1b22Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2475beef1b22Smrg# XORG_WITH_DOXYGEN --with-doxygen 2476beef1b22Smrg# XORG_WITH_FOP --with-fop 2477beef1b22Smrg# XORG_WITH_GROFF --with-groff 2478beef1b22Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2479beef1b22Smrg# 2480beef1b22Smrg# Interface to module: 2481beef1b22Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2482beef1b22Smrg# --enable-docs: 'yes' user instructs the module to generate docs 2483beef1b22Smrg# 'no' user instructs the module not to generate docs 2484beef1b22Smrg# parm1: specify the default value, yes or no. 2485beef1b22Smrg# 2486beef1b22SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2487beef1b22Smrgm4_define([docs_default], m4_default([$1], [yes])) 2488beef1b22SmrgAC_ARG_ENABLE(docs, 2489beef1b22Smrg AS_HELP_STRING([--enable-docs], 2490beef1b22Smrg [Enable building the documentation (default: ]docs_default[)]), 2491beef1b22Smrg [build_docs=$enableval], [build_docs=]docs_default) 2492beef1b22Smrgm4_undefine([docs_default]) 2493beef1b22SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2494beef1b22SmrgAC_MSG_CHECKING([whether to build documentation]) 2495beef1b22SmrgAC_MSG_RESULT([$build_docs]) 2496beef1b22Smrg]) # XORG_ENABLE_DOCS 2497e4f6584cSmrg 2498beef1b22Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2499beef1b22Smrg# ---------------- 2500beef1b22Smrg# Minimum version: 1.6.0 2501beef1b22Smrg# 2502beef1b22Smrg# This macro enables a builder to skip all developer documentation. 2503beef1b22Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2504beef1b22Smrg# maximum flexibility in controlling documentation building. 2505beef1b22Smrg# Refer to: 2506beef1b22Smrg# XORG_WITH_XMLTO --with-xmlto 2507beef1b22Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2508beef1b22Smrg# XORG_WITH_DOXYGEN --with-doxygen 2509beef1b22Smrg# XORG_WITH_FOP --with-fop 2510beef1b22Smrg# XORG_WITH_GROFF --with-groff 2511beef1b22Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2512beef1b22Smrg# 2513beef1b22Smrg# Interface to module: 2514beef1b22Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2515beef1b22Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2516beef1b22Smrg# 'no' user instructs the module not to generate developer docs 2517beef1b22Smrg# parm1: specify the default value, yes or no. 2518beef1b22Smrg# 2519beef1b22SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2520beef1b22Smrgm4_define([devel_default], m4_default([$1], [yes])) 2521beef1b22SmrgAC_ARG_ENABLE(devel-docs, 2522beef1b22Smrg AS_HELP_STRING([--enable-devel-docs], 2523beef1b22Smrg [Enable building the developer documentation (default: ]devel_default[)]), 2524beef1b22Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2525beef1b22Smrgm4_undefine([devel_default]) 2526beef1b22SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2527beef1b22SmrgAC_MSG_CHECKING([whether to build developer documentation]) 2528beef1b22SmrgAC_MSG_RESULT([$build_devel_docs]) 2529beef1b22Smrg]) # XORG_ENABLE_DEVEL_DOCS 2530e4f6584cSmrg 2531beef1b22Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 2532beef1b22Smrg# ---------------- 2533beef1b22Smrg# Minimum version: 1.6.0 2534beef1b22Smrg# 2535beef1b22Smrg# This macro enables a builder to skip all functional specification targets. 2536beef1b22Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2537beef1b22Smrg# maximum flexibility in controlling documentation building. 2538beef1b22Smrg# Refer to: 2539beef1b22Smrg# XORG_WITH_XMLTO --with-xmlto 2540beef1b22Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2541beef1b22Smrg# XORG_WITH_DOXYGEN --with-doxygen 2542beef1b22Smrg# XORG_WITH_FOP --with-fop 2543beef1b22Smrg# XORG_WITH_GROFF --with-groff 2544beef1b22Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2545beef1b22Smrg# 2546beef1b22Smrg# Interface to module: 2547beef1b22Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2548beef1b22Smrg# --enable-specs: 'yes' user instructs the module to generate specs 2549beef1b22Smrg# 'no' user instructs the module not to generate specs 2550beef1b22Smrg# parm1: specify the default value, yes or no. 2551beef1b22Smrg# 2552beef1b22SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2553beef1b22Smrgm4_define([spec_default], m4_default([$1], [yes])) 2554beef1b22SmrgAC_ARG_ENABLE(specs, 2555beef1b22Smrg AS_HELP_STRING([--enable-specs], 2556beef1b22Smrg [Enable building the specs (default: ]spec_default[)]), 2557beef1b22Smrg [build_specs=$enableval], [build_specs=]spec_default) 2558beef1b22Smrgm4_undefine([spec_default]) 2559beef1b22SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2560beef1b22SmrgAC_MSG_CHECKING([whether to build functional specifications]) 2561beef1b22SmrgAC_MSG_RESULT([$build_specs]) 2562beef1b22Smrg]) # XORG_ENABLE_SPECS 2563b12e5c03Smrg 2564beef1b22Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2565beef1b22Smrg# ---------------------------------------------- 2566beef1b22Smrg# Minimum version: 1.13.0 2567beef1b22Smrg# 2568beef1b22Smrg# This macro enables a builder to enable/disable unit testing 2569beef1b22Smrg# It makes no assumption about the test cases implementation 2570beef1b22Smrg# Test cases may or may not use Automake "Support for test suites" 2571beef1b22Smrg# They may or may not use the software utility library GLib 2572beef1b22Smrg# 2573beef1b22Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2574beef1b22Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2575beef1b22Smrg# The variable enable_unit_tests is used by other macros in this file. 2576beef1b22Smrg# 2577beef1b22Smrg# Interface to module: 2578beef1b22Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2579beef1b22Smrg# enable_unit_tests: used in configure.ac for additional configuration 2580beef1b22Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2581beef1b22Smrg# 'no' user instructs the module not to build tests 2582beef1b22Smrg# parm1: specify the default value, yes or no. 2583beef1b22Smrg# 2584beef1b22SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2585beef1b22SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2586beef1b22SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2587beef1b22SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2588beef1b22Smrgm4_define([_defopt], m4_default([$1], [auto])) 2589beef1b22SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2590beef1b22Smrg [Enable building unit test cases (default: ]_defopt[)]), 2591beef1b22Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2592beef1b22Smrgm4_undefine([_defopt]) 2593beef1b22SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2594beef1b22SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2595beef1b22SmrgAC_MSG_RESULT([$enable_unit_tests]) 2596beef1b22Smrg]) # XORG_ENABLE_UNIT_TESTS 2597b698ba48Smrg 2598beef1b22Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2599beef1b22Smrg# ------------------------------------------------------ 2600beef1b22Smrg# Minimum version: 1.17.0 2601beef1b22Smrg# 2602beef1b22Smrg# This macro enables a builder to enable/disable integration testing 2603beef1b22Smrg# It makes no assumption about the test cases' implementation 2604beef1b22Smrg# Test cases may or may not use Automake "Support for test suites" 2605beef1b22Smrg# 2606beef1b22Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2607beef1b22Smrg# usually requires less dependencies and may be built and run under less 2608beef1b22Smrg# stringent environments than integration tests. 2609beef1b22Smrg# 2610beef1b22Smrg# Interface to module: 2611beef1b22Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2612beef1b22Smrg# enable_integration_tests: used in configure.ac for additional configuration 2613beef1b22Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2614beef1b22Smrg# 'no' user instructs the module not to build tests 2615beef1b22Smrg# parm1: specify the default value, yes or no. 2616beef1b22Smrg# 2617beef1b22SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2618beef1b22SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2619beef1b22Smrgm4_define([_defopt], m4_default([$1], [auto])) 2620beef1b22SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2621beef1b22Smrg [Enable building integration test cases (default: ]_defopt[)]), 2622beef1b22Smrg [enable_integration_tests=$enableval], 2623beef1b22Smrg [enable_integration_tests=]_defopt) 2624beef1b22Smrgm4_undefine([_defopt]) 2625beef1b22SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2626beef1b22Smrg [test "x$enable_integration_tests" != xno]) 2627beef1b22SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2628beef1b22SmrgAC_MSG_RESULT([$enable_integration_tests]) 2629beef1b22Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 263009885543Smrg 2631beef1b22Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2632beef1b22Smrg# ---------------------------------------- 2633beef1b22Smrg# Minimum version: 1.13.0 2634beef1b22Smrg# 2635beef1b22Smrg# GLib is a library which provides advanced data structures and functions. 2636beef1b22Smrg# This macro enables a module to test for the presence of Glib. 2637beef1b22Smrg# 2638beef1b22Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2639beef1b22Smrg# Otherwise the value of $enable_unit_tests is blank. 2640beef1b22Smrg# 2641beef1b22Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2642beef1b22Smrg# test support usually requires less dependencies and may be built and run under 2643beef1b22Smrg# less stringent environments than integration tests. 2644beef1b22Smrg# 2645beef1b22Smrg# Interface to module: 2646beef1b22Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 2647beef1b22Smrg# with_glib: used in configure.ac to know if GLib has been found 2648beef1b22Smrg# --with-glib: 'yes' user instructs the module to use glib 2649beef1b22Smrg# 'no' user instructs the module not to use glib 2650beef1b22Smrg# 2651beef1b22SmrgAC_DEFUN([XORG_WITH_GLIB],[ 2652beef1b22SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2653beef1b22Smrgm4_define([_defopt], m4_default([$2], [auto])) 2654beef1b22SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2655beef1b22Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 2656beef1b22Smrg [with_glib=$withval], [with_glib=]_defopt) 2657beef1b22Smrgm4_undefine([_defopt]) 2658beef1b22Smrg 2659beef1b22Smrghave_glib=no 2660beef1b22Smrg# Do not probe GLib if user explicitly disabled unit testing 2661beef1b22Smrgif test "x$enable_unit_tests" != x"no"; then 2662beef1b22Smrg # Do not probe GLib if user explicitly disabled it 2663beef1b22Smrg if test "x$with_glib" != x"no"; then 2664beef1b22Smrg m4_ifval( 2665beef1b22Smrg [$1], 2666beef1b22Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2667beef1b22Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2668beef1b22Smrg ) 26697b58d2e0Smrg fi 26707b58d2e0Smrgfi 2671e4f6584cSmrg 2672beef1b22Smrg# Not having GLib when unit testing has been explicitly requested is an error 2673beef1b22Smrgif test "x$enable_unit_tests" = x"yes"; then 2674beef1b22Smrg if test "x$have_glib" = x"no"; then 2675beef1b22Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2676beef1b22Smrg fi 2677beef1b22Smrgfi 2678e4f6584cSmrg 2679beef1b22Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 2680beef1b22Smrgif test "x$enable_unit_tests" = x"no"; then 2681beef1b22Smrg if test "x$with_glib" = x"yes"; then 2682beef1b22Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2683beef1b22Smrg fi 2684beef1b22Smrgfi 2685e4f6584cSmrg 2686beef1b22Smrg# Not having GLib when it has been explicitly requested is an error 2687beef1b22Smrgif test "x$with_glib" = x"yes"; then 2688beef1b22Smrg if test "x$have_glib" = x"no"; then 2689beef1b22Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2690beef1b22Smrg fi 2691beef1b22Smrgfi 2692e4f6584cSmrg 2693beef1b22SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2694beef1b22Smrg]) # XORG_WITH_GLIB 2695e4f6584cSmrg 2696beef1b22Smrg# XORG_LD_WRAP([required|optional]) 2697beef1b22Smrg# --------------------------------- 2698beef1b22Smrg# Minimum version: 1.13.0 2699beef1b22Smrg# 2700beef1b22Smrg# Check if linker supports -wrap, passed via compiler flags 2701beef1b22Smrg# 2702beef1b22Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2703beef1b22Smrg# Otherwise the value of $enable_unit_tests is blank. 2704beef1b22Smrg# 2705beef1b22Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2706beef1b22Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2707beef1b22Smrg# available, an argument of "optional" allows use when some unit tests require 2708beef1b22Smrg# ld -wrap and others do not. 2709beef1b22Smrg# 2710beef1b22SmrgAC_DEFUN([XORG_LD_WRAP],[ 2711beef1b22SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2712beef1b22Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 2713beef1b22Smrg void __wrap_exit(int status) { return; }], 2714beef1b22Smrg [exit(0);])]) 2715beef1b22Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 2716beef1b22Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2717beef1b22Smrg if test "x$have_ld_wrap" = x"no"; then 2718beef1b22Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 27197b58d2e0Smrg fi 2720beef1b22Smrgfi 2721beef1b22SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2722beef1b22Smrg# 2723beef1b22Smrg]) # XORG_LD_WRAP 272409885543Smrg 2725beef1b22Smrg# XORG_CHECK_LINKER_FLAGS 2726beef1b22Smrg# ----------------------- 2727beef1b22Smrg# SYNOPSIS 2728beef1b22Smrg# 2729beef1b22Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2730beef1b22Smrg# 2731beef1b22Smrg# DESCRIPTION 2732beef1b22Smrg# 2733beef1b22Smrg# Check whether the given linker FLAGS work with the current language's 2734beef1b22Smrg# linker, or whether they give an error. 2735beef1b22Smrg# 2736beef1b22Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2737beef1b22Smrg# success/failure. 2738beef1b22Smrg# 2739beef1b22Smrg# PROGRAM-SOURCE is the program source to link with, if needed 2740beef1b22Smrg# 2741beef1b22Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2742beef1b22Smrg# 2743beef1b22Smrg# LICENSE 2744beef1b22Smrg# 2745beef1b22Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2746beef1b22Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2747beef1b22Smrg# Copyright (c) 2009 Matteo Frigo 2748beef1b22Smrg# 2749beef1b22Smrg# This program is free software: you can redistribute it and/or modify it 2750beef1b22Smrg# under the terms of the GNU General Public License as published by the 2751beef1b22Smrg# Free Software Foundation, either version 3 of the License, or (at your 2752beef1b22Smrg# option) any later version. 2753beef1b22Smrg# 2754beef1b22Smrg# This program is distributed in the hope that it will be useful, but 2755beef1b22Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2756beef1b22Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2757beef1b22Smrg# Public License for more details. 2758beef1b22Smrg# 2759beef1b22Smrg# You should have received a copy of the GNU General Public License along 2760beef1b22Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2761beef1b22Smrg# 2762beef1b22Smrg# As a special exception, the respective Autoconf Macro's copyright owner 2763beef1b22Smrg# gives unlimited permission to copy, distribute and modify the configure 2764beef1b22Smrg# scripts that are the output of Autoconf when processing the Macro. You 2765beef1b22Smrg# need not follow the terms of the GNU General Public License when using 2766beef1b22Smrg# or distributing such scripts, even though portions of the text of the 2767beef1b22Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 2768beef1b22Smrg# all other use of the material that constitutes the Autoconf Macro. 2769beef1b22Smrg# 2770beef1b22Smrg# This special exception to the GPL applies to versions of the Autoconf 2771beef1b22Smrg# Macro released by the Autoconf Archive. When you make and distribute a 2772beef1b22Smrg# modified version of the Autoconf Macro, you may extend this special 2773beef1b22Smrg# exception to the GPL to apply to your modified version as well.# 2774beef1b22SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2775beef1b22Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2776beef1b22Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2777beef1b22SmrgAS_LITERAL_IF([$1], 2778beef1b22Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2779beef1b22Smrg ax_save_FLAGS=$LDFLAGS 2780beef1b22Smrg LDFLAGS="$1" 2781beef1b22Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2782beef1b22Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2783beef1b22Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2784beef1b22Smrg LDFLAGS=$ax_save_FLAGS])], 2785beef1b22Smrg [ax_save_FLAGS=$LDFLAGS 2786beef1b22Smrg LDFLAGS="$1" 2787beef1b22Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2788beef1b22Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2789beef1b22Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2790beef1b22Smrg LDFLAGS=$ax_save_FLAGS]) 2791beef1b22Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2792beef1b22SmrgAC_MSG_RESULT($xorg_check_linker_flags) 2793beef1b22Smrgif test "x$xorg_check_linker_flags" = xyes; then 2794beef1b22Smrg m4_default([$2], :) 2795beef1b22Smrgelse 2796beef1b22Smrg m4_default([$3], :) 2797beef1b22Smrgfi 2798beef1b22Smrg]) # XORG_CHECK_LINKER_FLAGS 279909885543Smrg 2800beef1b22Smrg# XORG_MEMORY_CHECK_FLAGS 2801beef1b22Smrg# ----------------------- 2802beef1b22Smrg# Minimum version: 1.16.0 2803beef1b22Smrg# 2804beef1b22Smrg# This macro attempts to find appropriate memory checking functionality 2805beef1b22Smrg# for various platforms which unit testing code may use to catch various 2806beef1b22Smrg# forms of memory allocation and access errors in testing. 2807beef1b22Smrg# 2808beef1b22Smrg# Interface to module: 2809beef1b22Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2810beef1b22Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2811beef1b22Smrg# 2812beef1b22Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2813beef1b22Smrg# 2814beef1b22SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2815b698ba48Smrg 2816beef1b22SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2817beef1b22SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2818beef1b22Smrg [Environment variables to enable memory checking in tests]) 2819b698ba48Smrg 2820beef1b22Smrg# Check for different types of support on different platforms 2821beef1b22Smrgcase $host_os in 2822beef1b22Smrg solaris*) 2823beef1b22Smrg AC_CHECK_LIB([umem], [umem_alloc], 2824beef1b22Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2825beef1b22Smrg ;; 2826beef1b22Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2827beef1b22Smrg # both directly and inverted, so should not be 0 or 255. 2828beef1b22Smrg malloc_debug_env='MALLOC_PERTURB_=15' 2829beef1b22Smrg ;; 2830beef1b22Smrg darwin*) 2831beef1b22Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2832beef1b22Smrg ;; 2833beef1b22Smrg *bsd*) 2834beef1b22Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2835beef1b22Smrg ;; 2836beef1b22Smrgesac 2837b698ba48Smrg 2838beef1b22Smrg# User supplied flags override default flags 2839beef1b22Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2840beef1b22Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 28417b58d2e0Smrgfi 2842b698ba48Smrg 2843beef1b22SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2844beef1b22Smrg]) # XORG_WITH_LINT 2845b698ba48Smrg 2846beef1b22Smrg# XORG_CHECK_MALLOC_ZERO 2847beef1b22Smrg# ---------------------- 2848beef1b22Smrg# Minimum version: 1.0.0 2849beef1b22Smrg# 2850beef1b22Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2851beef1b22Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 2852beef1b22Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2853beef1b22SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2854beef1b22SmrgAC_ARG_ENABLE(malloc0returnsnull, 2855beef1b22Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 2856beef1b22Smrg [malloc(0) returns NULL (default: auto)]), 2857beef1b22Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2858beef1b22Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2859b698ba48Smrg 2860beef1b22SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2861beef1b22Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2862beef1b22SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2863beef1b22Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2864beef1b22Smrg#include <stdlib.h> 2865beef1b22Smrg],[ 2866beef1b22Smrg char *m0, *r0, *c0, *p; 2867beef1b22Smrg m0 = malloc(0); 2868beef1b22Smrg p = malloc(10); 2869beef1b22Smrg r0 = realloc(p,0); 2870beef1b22Smrg c0 = calloc(0,10); 2871beef1b22Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2872beef1b22Smrg])], 2873beef1b22Smrg [xorg_cv_malloc0_returns_null=yes], 2874beef1b22Smrg [xorg_cv_malloc0_returns_null=no])]) 2875beef1b22SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2876beef1b22Smrgfi 2877beef1b22SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2878b698ba48Smrg 2879beef1b22Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2880beef1b22Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2881beef1b22Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2882beef1b22Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 28837b58d2e0Smrgelse 2884beef1b22Smrg MALLOC_ZERO_CFLAGS="" 2885beef1b22Smrg XMALLOC_ZERO_CFLAGS="" 2886beef1b22Smrg XTMALLOC_ZERO_CFLAGS="" 28877b58d2e0Smrgfi 2888b698ba48Smrg 2889beef1b22SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2890beef1b22SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2891beef1b22SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2892beef1b22Smrg]) # XORG_CHECK_MALLOC_ZERO 2893b698ba48Smrg 2894beef1b22Smrg# XORG_WITH_LINT() 2895e4f6584cSmrg# ---------------- 2896beef1b22Smrg# Minimum version: 1.1.0 2897beef1b22Smrg# 2898beef1b22Smrg# This macro enables the use of a tool that flags some suspicious and 2899beef1b22Smrg# non-portable constructs (likely to be bugs) in C language source code. 2900beef1b22Smrg# It will attempt to locate the tool and use appropriate options. 2901beef1b22Smrg# There are various lint type tools on different platforms. 2902beef1b22Smrg# 2903beef1b22Smrg# Interface to module: 2904beef1b22Smrg# LINT: returns the path to the tool found on the platform 2905beef1b22Smrg# or the value set to LINT on the configure cmd line 2906beef1b22Smrg# also an Automake conditional 2907beef1b22Smrg# LINT_FLAGS: an Automake variable with appropriate flags 2908beef1b22Smrg# 2909beef1b22Smrg# --with-lint: 'yes' user instructs the module to use lint 2910beef1b22Smrg# 'no' user instructs the module not to use lint (default) 2911beef1b22Smrg# 2912beef1b22Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2913beef1b22Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2914beef1b22Smrg# 2915beef1b22SmrgAC_DEFUN([XORG_WITH_LINT],[ 291609885543Smrg 2917beef1b22SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2918beef1b22SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2919beef1b22SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2920beef1b22Smrg [Use a lint-style source code checker (default: disabled)])], 2921beef1b22Smrg [use_lint=$withval], [use_lint=no]) 2922b698ba48Smrg 2923beef1b22Smrg# Obtain platform specific info like program name and options 2924beef1b22Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2925beef1b22Smrgcase $host_os in 2926beef1b22Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2927beef1b22Smrg lint_name=splint 2928beef1b22Smrg lint_options="-badflag" 2929beef1b22Smrg ;; 2930beef1b22Smrg *freebsd* | *netbsd*) 2931beef1b22Smrg lint_name=lint 2932beef1b22Smrg lint_options="-u -b" 2933beef1b22Smrg ;; 2934beef1b22Smrg *solaris*) 2935beef1b22Smrg lint_name=lint 2936beef1b22Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2937beef1b22Smrg ;; 2938beef1b22Smrgesac 293909885543Smrg 2940beef1b22Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2941beef1b22Smrgif test "x$use_lint" = x"yes" ; then 2942beef1b22Smrg AC_PATH_PROG([LINT], [$lint_name]) 2943beef1b22Smrg if test "x$LINT" = "x"; then 2944beef1b22Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2945beef1b22Smrg fi 2946beef1b22Smrgelif test "x$use_lint" = x"no" ; then 2947beef1b22Smrg if test "x$LINT" != "x"; then 2948beef1b22Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2949beef1b22Smrg fi 29507b58d2e0Smrgelse 2951beef1b22Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 29527b58d2e0Smrgfi 295309885543Smrg 2954beef1b22Smrg# User supplied flags override default flags 2955beef1b22Smrgif test "x$LINT_FLAGS" != "x"; then 2956beef1b22Smrg lint_options=$LINT_FLAGS 29577b58d2e0Smrgfi 2958b698ba48Smrg 2959beef1b22SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2960beef1b22SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2961b698ba48Smrg 2962beef1b22Smrg]) # XORG_WITH_LINT 2963e4f6584cSmrg 2964beef1b22Smrg# XORG_LINT_LIBRARY(LIBNAME) 2965beef1b22Smrg# -------------------------- 2966beef1b22Smrg# Minimum version: 1.1.0 2967beef1b22Smrg# 2968beef1b22Smrg# Sets up flags for building lint libraries for checking programs that call 2969beef1b22Smrg# functions in the library. 2970beef1b22Smrg# 2971beef1b22Smrg# Interface to module: 2972beef1b22Smrg# LINTLIB - Automake variable with the name of lint library file to make 2973beef1b22Smrg# MAKE_LINT_LIB - Automake conditional 2974beef1b22Smrg# 2975beef1b22Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2976beef1b22Smrg# - 'no' user instructs the module not to create a lint library (default) 2977f395c03eSmrg 2978beef1b22SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2979beef1b22SmrgAC_REQUIRE([XORG_WITH_LINT]) 2980beef1b22SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2981beef1b22Smrg [Create lint library (default: disabled)])], 2982beef1b22Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2983f395c03eSmrg 2984beef1b22Smrgif test "x$make_lint_lib" = x"yes" ; then 2985beef1b22Smrg LINTLIB=llib-l$1.ln 2986beef1b22Smrg if test "x$LINT" = "x"; then 2987beef1b22Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2988beef1b22Smrg fi 2989beef1b22Smrgelif test "x$make_lint_lib" != x"no" ; then 2990beef1b22Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2991beef1b22Smrgfi 2992e4f6584cSmrg 2993beef1b22SmrgAC_SUBST(LINTLIB) 2994beef1b22SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2995b698ba48Smrg 2996beef1b22Smrg]) # XORG_LINT_LIBRARY 2997f395c03eSmrg 2998beef1b22Smrg# XORG_COMPILER_BRAND 2999beef1b22Smrg# ------------------- 3000beef1b22Smrg# Minimum version: 1.14.0 3001beef1b22Smrg# 3002beef1b22Smrg# Checks for various brands of compilers and sets flags as appropriate: 3003beef1b22Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 3004beef1b22Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 3005beef1b22Smrg# clang compiler - sets CLANGCC to "yes" 3006beef1b22Smrg# Intel compiler - sets INTELCC to "yes" 3007beef1b22Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 3008beef1b22Smrg# 3009beef1b22SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 3010beef1b22SmrgAC_LANG_CASE( 3011beef1b22Smrg [C], [ 3012beef1b22Smrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 3013beef1b22Smrg dnl and complains that AC_PROG_CC_C99 is obsolete 3014beef1b22Smrg m4_version_prereq([2.70], 3015beef1b22Smrg [AC_REQUIRE([AC_PROG_CC])], 3016beef1b22Smrg [AC_REQUIRE([AC_PROG_CC_C99])]) 3017beef1b22Smrg ], 3018beef1b22Smrg [C++], [ 3019beef1b22Smrg AC_REQUIRE([AC_PROG_CXX]) 3020beef1b22Smrg ] 3021beef1b22Smrg) 3022beef1b22SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 3023beef1b22SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 3024beef1b22SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 3025beef1b22Smrg]) # XORG_COMPILER_BRAND 3026b698ba48Smrg 3027beef1b22Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 3028beef1b22Smrg# --------------- 3029beef1b22Smrg# Minimum version: 1.16.0 3030beef1b22Smrg# 3031beef1b22Smrg# Test if the compiler works when passed the given flag as a command line argument. 3032beef1b22Smrg# If it succeeds, the flag is appended to the given variable. If not, it tries the 3033beef1b22Smrg# next flag in the list until there are no more options. 3034beef1b22Smrg# 3035beef1b22Smrg# Note that this does not guarantee that the compiler supports the flag as some 3036beef1b22Smrg# compilers will simply ignore arguments that they do not understand, but we do 3037beef1b22Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 3038beef1b22Smrg# -Werror=unused-command-line-argument 3039beef1b22Smrg# 3040beef1b22SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 3041beef1b22Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3042beef1b22Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3043e4f6584cSmrg 3044beef1b22SmrgAC_LANG_COMPILER_REQUIRE 3045f395c03eSmrg 3046beef1b22SmrgAC_LANG_CASE( 3047beef1b22Smrg [C], [ 3048beef1b22Smrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 3049beef1b22Smrg dnl and complains that AC_PROG_CC_C99 is obsolete 3050beef1b22Smrg m4_version_prereq([2.70], 3051beef1b22Smrg [AC_REQUIRE([AC_PROG_CC])], 3052beef1b22Smrg [AC_REQUIRE([AC_PROG_CC_C99])]) 3053beef1b22Smrg define([PREFIX], [C]) 3054beef1b22Smrg define([CACHE_PREFIX], [cc]) 3055beef1b22Smrg define([COMPILER], [$CC]) 3056beef1b22Smrg ], 3057beef1b22Smrg [C++], [ 3058beef1b22Smrg define([PREFIX], [CXX]) 3059beef1b22Smrg define([CACHE_PREFIX], [cxx]) 3060beef1b22Smrg define([COMPILER], [$CXX]) 3061beef1b22Smrg ] 3062beef1b22Smrg) 3063b698ba48Smrg 3064beef1b22Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3065e4f6584cSmrg 3066beef1b22Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3067beef1b22Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3068beef1b22Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3069beef1b22Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3070beef1b22Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3071beef1b22Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3072beef1b22Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3073beef1b22Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3074beef1b22Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3075beef1b22Smrgfi 3076e4f6584cSmrg 3077beef1b22Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3078beef1b22Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3079beef1b22Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3080beef1b22Smrg fi 3081beef1b22Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3082beef1b22Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3083beef1b22Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3084beef1b22Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3085beef1b22Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3086beef1b22Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3087beef1b22Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3088beef1b22Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3089beef1b22Smrgfi 3090e4f6584cSmrg 3091beef1b22Smrgfound="no" 3092beef1b22Smrgm4_foreach([flag], m4_cdr($@), [ 3093beef1b22Smrg if test $found = "no" ; then 3094beef1b22Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3095beef1b22Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3096beef1b22Smrg fi 3097e4f6584cSmrg 3098beef1b22Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3099beef1b22Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3100beef1b22Smrg fi 3101e4f6584cSmrg 3102beef1b22Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3103b12e5c03Smrg 3104beef1b22Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3105beef1b22Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3106beef1b22Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3107beef1b22Smrg AC_CACHE_VAL($cacheid, 3108beef1b22Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3109beef1b22Smrg [eval $cacheid=yes], 3110beef1b22Smrg [eval $cacheid=no])]) 3111b12e5c03Smrg 3112beef1b22Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3113b12e5c03Smrg 3114beef1b22Smrg eval supported=\$$cacheid 3115beef1b22Smrg AC_MSG_RESULT([$supported]) 3116beef1b22Smrg if test "$supported" = "yes" ; then 3117beef1b22Smrg $1="$$1 ]flag[" 3118beef1b22Smrg found="yes" 3119beef1b22Smrg fi 3120beef1b22Smrg fi 3121beef1b22Smrg]) 3122beef1b22Smrg]) # XORG_TESTSET_CFLAG 3123e4f6584cSmrg 3124beef1b22Smrg# XORG_COMPILER_FLAGS 3125beef1b22Smrg# --------------- 3126beef1b22Smrg# Minimum version: 1.16.0 3127beef1b22Smrg# 3128beef1b22Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3129beef1b22Smrg# arguments supported by the selected compiler which do NOT alter the generated 3130beef1b22Smrg# code. These arguments will cause the compiler to print various warnings 3131beef1b22Smrg# during compilation AND turn a conservative set of warnings into errors. 3132beef1b22Smrg# 3133beef1b22Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3134beef1b22Smrg# future versions of util-macros as options are added to new compilers. 3135beef1b22Smrg# 3136beef1b22SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 3137beef1b22SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3138e4f6584cSmrg 3139beef1b22SmrgAC_ARG_ENABLE(selective-werror, 3140beef1b22Smrg AS_HELP_STRING([--disable-selective-werror], 3141beef1b22Smrg [Turn off selective compiler errors. (default: enabled)]), 3142beef1b22Smrg [SELECTIVE_WERROR=$enableval], 3143beef1b22Smrg [SELECTIVE_WERROR=yes]) 3144e4f6584cSmrg 3145beef1b22SmrgAC_LANG_CASE( 3146beef1b22Smrg [C], [ 3147beef1b22Smrg define([PREFIX], [C]) 3148beef1b22Smrg ], 3149beef1b22Smrg [C++], [ 3150beef1b22Smrg define([PREFIX], [CXX]) 3151beef1b22Smrg ] 3152beef1b22Smrg) 3153beef1b22Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 3154beef1b22Smrgif test "x$SUNCC" = "xyes"; then 3155beef1b22Smrg [BASE_]PREFIX[FLAGS]="-v" 3156beef1b22Smrgelse 3157beef1b22Smrg [BASE_]PREFIX[FLAGS]="" 3158beef1b22Smrgfi 3159f395c03eSmrg 3160beef1b22Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3161beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3162beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3163beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3164beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3165e4f6584cSmrg 3166beef1b22SmrgAC_LANG_CASE( 3167beef1b22Smrg [C], [ 3168beef1b22Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3169beef1b22Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3170beef1b22Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3171beef1b22Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3172beef1b22Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3173beef1b22Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3174beef1b22Smrg ] 3175beef1b22Smrg) 3176e4f6584cSmrg 3177beef1b22Smrg# This chunk adds additional warnings that could catch undesired effects. 3178beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3179beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3180beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3181beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3182beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3183beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3184beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3185e4f6584cSmrg 3186beef1b22Smrg# These are currently disabled because they are noisy. They will be enabled 3187beef1b22Smrg# in the future once the codebase is sufficiently modernized to silence 3188beef1b22Smrg# them. For now, I don't want them to drown out the other warnings. 3189beef1b22Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3190beef1b22Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3191beef1b22Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 3192e4f6584cSmrg 3193beef1b22Smrg# Turn some warnings into errors, so we don't accidentally get successful builds 3194beef1b22Smrg# when there are problems that should be fixed. 3195b698ba48Smrg 3196beef1b22Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 3197beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3198beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3199beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3200beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3201beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3202beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3203beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3204beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3205beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3206beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3207beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3208beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3209beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3210beef1b22Smrgelse 3211beef1b22SmrgAC_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]) 3212beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3213beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3214beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3215beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3216beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3217beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3218beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3219beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3220beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3221beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3222beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3223beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3224beef1b22SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3225beef1b22Smrgfi 3226b698ba48Smrg 3227beef1b22SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3228beef1b22Smrg]) # XORG_COMPILER_FLAGS 3229f395c03eSmrg 3230beef1b22Smrg# XORG_CWARNFLAGS 3231beef1b22Smrg# --------------- 3232beef1b22Smrg# Minimum version: 1.2.0 3233beef1b22Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3234beef1b22Smrg# 3235beef1b22Smrg# Defines CWARNFLAGS to enable C compiler warnings. 3236beef1b22Smrg# 3237beef1b22Smrg# This function is deprecated because it defines -fno-strict-aliasing 3238beef1b22Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3239beef1b22Smrg# is needed, then it should be added explicitly in the module when 3240beef1b22Smrg# it is updated to use BASE_CFLAGS. 3241beef1b22Smrg# 3242beef1b22SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3243beef1b22SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3244beef1b22SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3245beef1b22SmrgAC_LANG_CASE( 3246beef1b22Smrg [C], [ 3247beef1b22Smrg CWARNFLAGS="$BASE_CFLAGS" 3248beef1b22Smrg if test "x$GCC" = xyes ; then 3249beef1b22Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3250beef1b22Smrg fi 3251beef1b22Smrg AC_SUBST(CWARNFLAGS) 3252beef1b22Smrg ] 3253beef1b22Smrg) 3254beef1b22Smrg]) # XORG_CWARNFLAGS 3255f395c03eSmrg 3256beef1b22Smrg# XORG_STRICT_OPTION 3257beef1b22Smrg# ----------------------- 3258beef1b22Smrg# Minimum version: 1.3.0 3259beef1b22Smrg# 3260beef1b22Smrg# Add configure option to enable strict compilation flags, such as treating 3261beef1b22Smrg# warnings as fatal errors. 3262beef1b22Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3263beef1b22Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3264beef1b22Smrg# 3265beef1b22Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3266beef1b22Smrg# when strict compilation is unconditionally desired. 3267beef1b22SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3268beef1b22SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3269beef1b22SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3270f395c03eSmrg 3271beef1b22SmrgAC_ARG_ENABLE(strict-compilation, 3272beef1b22Smrg AS_HELP_STRING([--enable-strict-compilation], 3273beef1b22Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3274beef1b22Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3275b12e5c03Smrg 3276beef1b22SmrgAC_LANG_CASE( 3277beef1b22Smrg [C], [ 3278beef1b22Smrg define([PREFIX], [C]) 3279beef1b22Smrg ], 3280beef1b22Smrg [C++], [ 3281beef1b22Smrg define([PREFIX], [CXX]) 3282beef1b22Smrg ] 3283beef1b22Smrg) 3284b698ba48Smrg 3285beef1b22Smrg[STRICT_]PREFIX[FLAGS]="" 3286beef1b22SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3287beef1b22SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3288b698ba48Smrg 3289beef1b22Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3290beef1b22Smrg# activate it with -Werror, so we add it here explicitly. 3291beef1b22SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3292b698ba48Smrg 3293beef1b22Smrgif test "x$STRICT_COMPILE" = "xyes"; then 3294beef1b22Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3295beef1b22Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3296beef1b22Smrgfi 3297beef1b22SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3298beef1b22SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3299beef1b22SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3300beef1b22Smrg]) # XORG_STRICT_OPTION 3301e4f6584cSmrg 3302beef1b22Smrg# XORG_DEFAULT_NOCODE_OPTIONS 3303beef1b22Smrg# --------------------------- 3304beef1b22Smrg# Minimum version: 1.20.0 3305beef1b22Smrg# 3306beef1b22Smrg# Defines default options for X.Org modules which don't compile code, 3307beef1b22Smrg# such as fonts, bitmaps, cursors, and docs. 3308beef1b22Smrg# 3309beef1b22SmrgAC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [ 3310beef1b22SmrgAC_REQUIRE([AC_PROG_INSTALL]) 3311beef1b22SmrgXORG_RELEASE_VERSION 3312beef1b22SmrgXORG_CHANGELOG 3313beef1b22SmrgXORG_INSTALL 3314beef1b22SmrgXORG_MANPAGE_SECTIONS 3315beef1b22Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3316beef1b22Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3317beef1b22Smrg]) # XORG_DEFAULT_NOCODE_OPTIONS 3318e4f6584cSmrg 3319beef1b22Smrg# XORG_DEFAULT_OPTIONS 3320beef1b22Smrg# -------------------- 3321beef1b22Smrg# Minimum version: 1.3.0 3322beef1b22Smrg# 3323beef1b22Smrg# Defines default options for X.Org modules which compile code. 3324beef1b22Smrg# 3325beef1b22SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3326beef1b22SmrgAC_REQUIRE([AC_PROG_INSTALL]) 3327beef1b22SmrgXORG_COMPILER_FLAGS 3328beef1b22SmrgXORG_CWARNFLAGS 3329beef1b22SmrgXORG_STRICT_OPTION 3330beef1b22SmrgXORG_DEFAULT_NOCODE_OPTIONS 3331beef1b22Smrg]) # XORG_DEFAULT_OPTIONS 3332e4f6584cSmrg 3333beef1b22Smrg# XORG_INSTALL() 3334beef1b22Smrg# ---------------- 3335beef1b22Smrg# Minimum version: 1.4.0 3336beef1b22Smrg# 3337beef1b22Smrg# Defines the variable INSTALL_CMD as the command to copy 3338beef1b22Smrg# INSTALL from $prefix/share/util-macros. 3339beef1b22Smrg# 3340beef1b22SmrgAC_DEFUN([XORG_INSTALL], [ 3341beef1b22SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3342beef1b22Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3343beef1b22SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3344beef1b22Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3345beef1b22Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3346beef1b22Smrgtouch \$(top_srcdir)/INSTALL; \ 3347beef1b22Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3348beef1b22SmrgAC_SUBST([INSTALL_CMD]) 3349beef1b22Smrg]) # XORG_INSTALL 3350beef1b22Smrgdnl Copyright 2005 Red Hat, Inc 3351beef1b22Smrgdnl 3352beef1b22Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3353beef1b22Smrgdnl documentation for any purpose is hereby granted without fee, provided that 3354beef1b22Smrgdnl the above copyright notice appear in all copies and that both that 3355beef1b22Smrgdnl copyright notice and this permission notice appear in supporting 3356beef1b22Smrgdnl documentation. 3357beef1b22Smrgdnl 3358beef1b22Smrgdnl The above copyright notice and this permission notice shall be included 3359beef1b22Smrgdnl in all copies or substantial portions of the Software. 3360beef1b22Smrgdnl 3361beef1b22Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3362beef1b22Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3363beef1b22Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3364beef1b22Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3365beef1b22Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3366beef1b22Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3367beef1b22Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 3368beef1b22Smrgdnl 3369beef1b22Smrgdnl Except as contained in this notice, the name of the copyright holders shall 3370beef1b22Smrgdnl not be used in advertising or otherwise to promote the sale, use or 3371beef1b22Smrgdnl other dealings in this Software without prior written authorization 3372beef1b22Smrgdnl from the copyright holders. 3373beef1b22Smrgdnl 3374e4f6584cSmrg 3375beef1b22Smrg# XORG_RELEASE_VERSION 3376beef1b22Smrg# -------------------- 3377beef1b22Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 3378e4f6584cSmrg 3379beef1b22SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3380beef1b22Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3381beef1b22Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3382beef1b22Smrg [Major version of this package]) 3383beef1b22Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3384beef1b22Smrg if test "x$PVM" = "x"; then 3385beef1b22Smrg PVM="0" 3386beef1b22Smrg fi 3387beef1b22Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3388beef1b22Smrg [$PVM], 3389beef1b22Smrg [Minor version of this package]) 3390beef1b22Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3391beef1b22Smrg if test "x$PVP" = "x"; then 3392beef1b22Smrg PVP="0" 3393beef1b22Smrg fi 3394beef1b22Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3395beef1b22Smrg [$PVP], 3396beef1b22Smrg [Patch version of this package]) 3397beef1b22Smrg]) 3398e4f6584cSmrg 3399beef1b22Smrg# XORG_CHANGELOG() 3400beef1b22Smrg# ---------------- 3401beef1b22Smrg# Minimum version: 1.2.0 3402beef1b22Smrg# 3403beef1b22Smrg# Defines the variable CHANGELOG_CMD as the command to generate 3404beef1b22Smrg# ChangeLog from git. 3405beef1b22Smrg# 3406beef1b22Smrg# 3407beef1b22SmrgAC_DEFUN([XORG_CHANGELOG], [ 3408beef1b22SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3409beef1b22Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3410beef1b22Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3411beef1b22Smrgtouch \$(top_srcdir)/ChangeLog; \ 3412beef1b22Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3413beef1b22SmrgAC_SUBST([CHANGELOG_CMD]) 3414beef1b22Smrg]) # XORG_CHANGELOG 3415e4f6584cSmrg 3416beef1b22Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3417beef1b22Smrg# 3418beef1b22Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3419beef1b22Smrg# Foundation, Inc. 3420beef1b22Smrg# Written by Gordon Matzigkeit, 1996 3421beef1b22Smrg# 3422beef1b22Smrg# This file is free software; the Free Software Foundation gives 3423beef1b22Smrg# unlimited permission to copy and/or distribute it, with or without 3424beef1b22Smrg# modifications, as long as this notice is preserved. 3425e4f6584cSmrg 3426beef1b22Smrgm4_define([_LT_COPYING], [dnl 3427beef1b22Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 3428beef1b22Smrg# This is free software; see the source for copying conditions. There is NO 3429beef1b22Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3430e4f6584cSmrg 3431beef1b22Smrg# GNU Libtool is free software; you can redistribute it and/or modify 3432beef1b22Smrg# it under the terms of the GNU General Public License as published by 3433beef1b22Smrg# the Free Software Foundation; either version 2 of of the License, or 3434beef1b22Smrg# (at your option) any later version. 3435beef1b22Smrg# 3436beef1b22Smrg# As a special exception to the GNU General Public License, if you 3437beef1b22Smrg# distribute this file as part of a program or library that is built 3438beef1b22Smrg# using GNU Libtool, you may include this file under the same 3439beef1b22Smrg# distribution terms that you use for the rest of that program. 3440beef1b22Smrg# 3441beef1b22Smrg# GNU Libtool is distributed in the hope that it will be useful, but 3442beef1b22Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3443beef1b22Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3444beef1b22Smrg# GNU General Public License for more details. 3445beef1b22Smrg# 3446beef1b22Smrg# You should have received a copy of the GNU General Public License 3447beef1b22Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3448beef1b22Smrg]) 3449e4f6584cSmrg 3450beef1b22Smrg# serial 59 LT_INIT 3451e4f6584cSmrg 3452e4f6584cSmrg 3453beef1b22Smrg# LT_PREREQ(VERSION) 3454beef1b22Smrg# ------------------ 3455beef1b22Smrg# Complain and exit if this libtool version is less that VERSION. 3456beef1b22Smrgm4_defun([LT_PREREQ], 3457beef1b22Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3458beef1b22Smrg [m4_default([$3], 3459beef1b22Smrg [m4_fatal([Libtool version $1 or higher is required], 3460beef1b22Smrg 63)])], 3461beef1b22Smrg [$2])]) 3462e4f6584cSmrg 3463e4f6584cSmrg 3464beef1b22Smrg# _LT_CHECK_BUILDDIR 3465beef1b22Smrg# ------------------ 3466beef1b22Smrg# Complain if the absolute build directory name contains unusual characters 3467beef1b22Smrgm4_defun([_LT_CHECK_BUILDDIR], 3468beef1b22Smrg[case `pwd` in 3469beef1b22Smrg *\ * | *\ *) 3470beef1b22Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 34717b58d2e0Smrgesac 3472beef1b22Smrg]) 3473e4f6584cSmrg 3474e4f6584cSmrg 3475beef1b22Smrg# LT_INIT([OPTIONS]) 3476beef1b22Smrg# ------------------ 3477beef1b22SmrgAC_DEFUN([LT_INIT], 3478beef1b22Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3479beef1b22SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3480beef1b22SmrgAC_BEFORE([$0], [LT_LANG])dnl 3481beef1b22SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 3482beef1b22SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 3483beef1b22Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 3484f395c03eSmrg 3485beef1b22Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 3486beef1b22Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3487beef1b22Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3488beef1b22Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3489beef1b22Smrgdnl unless we require an AC_DEFUNed macro: 3490beef1b22SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 3491beef1b22SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 3492beef1b22SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 3493beef1b22SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 3494beef1b22Smrgm4_require([_LT_PROG_LTMAIN])dnl 3495e4f6584cSmrg 3496beef1b22Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3497f395c03eSmrg 3498beef1b22Smrgdnl Parse OPTIONS 3499beef1b22Smrg_LT_SET_OPTIONS([$0], [$1]) 3500f395c03eSmrg 3501beef1b22Smrg# This can be used to rebuild libtool when needed 3502beef1b22SmrgLIBTOOL_DEPS=$ltmain 3503f395c03eSmrg 3504beef1b22Smrg# Always use our own libtool. 3505beef1b22SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 3506beef1b22SmrgAC_SUBST(LIBTOOL)dnl 3507e4f6584cSmrg 3508beef1b22Smrg_LT_SETUP 3509e4f6584cSmrg 3510beef1b22Smrg# Only expand once: 3511beef1b22Smrgm4_define([LT_INIT]) 3512beef1b22Smrg])# LT_INIT 3513b698ba48Smrg 3514beef1b22Smrg# Old names: 3515beef1b22SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3516beef1b22SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 35177b58d2e0Smrgdnl aclocal-1.4 backwards compatibility: 3518beef1b22Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3519beef1b22Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3520b698ba48Smrg 3521b698ba48Smrg 3522beef1b22Smrg# _LT_PREPARE_CC_BASENAME 3523beef1b22Smrg# ----------------------- 3524beef1b22Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 3525beef1b22Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3526beef1b22Smrgfunc_cc_basename () 3527beef1b22Smrg{ 3528beef1b22Smrg for cc_temp in @S|@*""; do 3529beef1b22Smrg case $cc_temp in 3530beef1b22Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3531beef1b22Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3532beef1b22Smrg \-*) ;; 3533beef1b22Smrg *) break;; 3534beef1b22Smrg esac 3535beef1b22Smrg done 3536beef1b22Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3537beef1b22Smrg} 3538beef1b22Smrg])# _LT_PREPARE_CC_BASENAME 3539b698ba48Smrg 354009885543Smrg 3541beef1b22Smrg# _LT_CC_BASENAME(CC) 3542beef1b22Smrg# ------------------- 3543beef1b22Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3544beef1b22Smrg# but that macro is also expanded into generated libtool script, which 3545beef1b22Smrg# arranges for $SED and $ECHO to be set by different means. 3546beef1b22Smrgm4_defun([_LT_CC_BASENAME], 3547beef1b22Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3548beef1b22SmrgAC_REQUIRE([_LT_DECL_SED])dnl 3549beef1b22SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3550beef1b22Smrgfunc_cc_basename $1 3551beef1b22Smrgcc_basename=$func_cc_basename_result 3552beef1b22Smrg]) 35537b58d2e0Smrg 355409885543Smrg 3555beef1b22Smrg# _LT_FILEUTILS_DEFAULTS 3556beef1b22Smrg# ---------------------- 3557beef1b22Smrg# It is okay to use these file commands and assume they have been set 3558beef1b22Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3559beef1b22Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 3560beef1b22Smrg[: ${CP="cp -f"} 3561beef1b22Smrg: ${MV="mv -f"} 3562beef1b22Smrg: ${RM="rm -f"} 3563beef1b22Smrg])# _LT_FILEUTILS_DEFAULTS 356409885543Smrg 356509885543Smrg 3566beef1b22Smrg# _LT_SETUP 3567beef1b22Smrg# --------- 3568beef1b22Smrgm4_defun([_LT_SETUP], 3569beef1b22Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3570beef1b22SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3571beef1b22SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3572beef1b22SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 35737104f784Smrg 3574beef1b22Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3575beef1b22Smrgdnl 3576beef1b22Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 3577beef1b22Smrg_LT_DECL([], [host], [0])dnl 3578beef1b22Smrg_LT_DECL([], [host_os], [0])dnl 3579beef1b22Smrgdnl 3580beef1b22Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 3581beef1b22Smrg_LT_DECL([], [build], [0])dnl 3582beef1b22Smrg_LT_DECL([], [build_os], [0])dnl 3583beef1b22Smrgdnl 3584beef1b22SmrgAC_REQUIRE([AC_PROG_CC])dnl 3585beef1b22SmrgAC_REQUIRE([LT_PATH_LD])dnl 3586beef1b22SmrgAC_REQUIRE([LT_PATH_NM])dnl 3587beef1b22Smrgdnl 3588beef1b22SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 3589beef1b22Smrgtest -z "$LN_S" && LN_S="ln -s" 3590beef1b22Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3591beef1b22Smrgdnl 3592beef1b22SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 3593beef1b22Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3594beef1b22Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3595beef1b22Smrgdnl 3596beef1b22Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3597beef1b22Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3598beef1b22Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3599beef1b22Smrgm4_require([_LT_CMD_RELOAD])dnl 3600beef1b22Smrgm4_require([_LT_DECL_FILECMD])dnl 3601beef1b22Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 3602beef1b22Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3603beef1b22Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 3604beef1b22Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3605beef1b22Smrgm4_require([_LT_WITH_SYSROOT])dnl 3606beef1b22Smrgm4_require([_LT_CMD_TRUNCATE])dnl 3607f395c03eSmrg 3608beef1b22Smrg_LT_CONFIG_LIBTOOL_INIT([ 3609beef1b22Smrg# See if we are running on zsh, and set the options that allow our 3610beef1b22Smrg# commands through without removal of \ escapes INIT. 3611beef1b22Smrgif test -n "\${ZSH_VERSION+set}"; then 3612beef1b22Smrg setopt NO_GLOB_SUBST 3613beef1b22Smrgfi 3614beef1b22Smrg]) 3615beef1b22Smrgif test -n "${ZSH_VERSION+set}"; then 3616beef1b22Smrg setopt NO_GLOB_SUBST 3617f395c03eSmrgfi 3618f395c03eSmrg 3619beef1b22Smrg_LT_CHECK_OBJDIR 3620f395c03eSmrg 3621beef1b22Smrgm4_require([_LT_TAG_COMPILER])dnl 362209885543Smrg 36237b58d2e0Smrgcase $host_os in 3624beef1b22Smrgaix3*) 3625beef1b22Smrg # AIX sometimes has problems with the GCC collect2 program. For some 3626beef1b22Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 3627beef1b22Smrg # vanish in a puff of smoke. 3628beef1b22Smrg if test set != "${COLLECT_NAMES+set}"; then 3629beef1b22Smrg COLLECT_NAMES= 3630beef1b22Smrg export COLLECT_NAMES 3631beef1b22Smrg fi 36327b58d2e0Smrg ;; 3633beef1b22Smrgesac 363409885543Smrg 3635beef1b22Smrg# Global variables: 3636beef1b22Smrgofile=libtool 3637beef1b22Smrgcan_build_shared=yes 363809885543Smrg 3639beef1b22Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 3640beef1b22Smrg# ICC, which need '.lib'). 3641beef1b22Smrglibext=a 364209885543Smrg 3643beef1b22Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3644b698ba48Smrg 3645beef1b22Smrgold_CC=$CC 3646beef1b22Smrgold_CFLAGS=$CFLAGS 364709885543Smrg 3648beef1b22Smrg# Set sane defaults for various variables 3649beef1b22Smrgtest -z "$CC" && CC=cc 3650beef1b22Smrgtest -z "$LTCC" && LTCC=$CC 3651beef1b22Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3652beef1b22Smrgtest -z "$LD" && LD=ld 3653beef1b22Smrgtest -z "$ac_objext" && ac_objext=o 36547b58d2e0Smrg 3655beef1b22Smrg_LT_CC_BASENAME([$compiler]) 36567b58d2e0Smrg 3657beef1b22Smrg# Only perform the check for file, if the check method requires it 3658beef1b22Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 3659beef1b22Smrgcase $deplibs_check_method in 3660beef1b22Smrgfile_magic*) 3661beef1b22Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3662beef1b22Smrg _LT_PATH_MAGIC 3663e4f6584cSmrg fi 36647b58d2e0Smrg ;; 3665beef1b22Smrgesac 366609885543Smrg 3667beef1b22Smrg# Use C for the default configuration in the libtool script 3668beef1b22SmrgLT_SUPPORTED_TAG([CC]) 3669beef1b22Smrg_LT_LANG_C_CONFIG 3670beef1b22Smrg_LT_LANG_DEFAULT_CONFIG 3671beef1b22Smrg_LT_CONFIG_COMMANDS 3672beef1b22Smrg])# _LT_SETUP 3673b12e5c03Smrg 367409885543Smrg 3675beef1b22Smrg# _LT_PREPARE_SED_QUOTE_VARS 3676beef1b22Smrg# -------------------------- 3677beef1b22Smrg# Define a few sed substitution that help us do robust quoting. 3678beef1b22Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3679beef1b22Smrg[# Backslashify metacharacters that are still active within 3680beef1b22Smrg# double-quoted strings. 3681beef1b22Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 368209885543Smrg 3683beef1b22Smrg# Same as above, but do not quote variable references. 3684beef1b22Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 3685e4f6584cSmrg 3686beef1b22Smrg# Sed substitution to delay expansion of an escaped shell variable in a 3687beef1b22Smrg# double_quote_subst'ed string. 3688beef1b22Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 36897b58d2e0Smrg 3690beef1b22Smrg# Sed substitution to delay expansion of an escaped single quote. 3691beef1b22Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 36927b58d2e0Smrg 3693beef1b22Smrg# Sed substitution to avoid accidental globbing in evaled expressions 3694beef1b22Smrgno_glob_subst='s/\*/\\\*/g' 3695beef1b22Smrg]) 36967b58d2e0Smrg 3697beef1b22Smrg# _LT_PROG_LTMAIN 3698beef1b22Smrg# --------------- 3699beef1b22Smrg# Note that this code is called both from 'configure', and 'config.status' 3700beef1b22Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3701beef1b22Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3702beef1b22Smrg# so we pass a copy along to make sure it has a sensible value anyway. 3703beef1b22Smrgm4_defun([_LT_PROG_LTMAIN], 3704beef1b22Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3705beef1b22Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3706beef1b22Smrgltmain=$ac_aux_dir/ltmain.sh 3707beef1b22Smrg])# _LT_PROG_LTMAIN 37087b58d2e0Smrg 3709b698ba48Smrg 371009885543Smrg 3711beef1b22Smrg# So that we can recreate a full libtool script including additional 3712beef1b22Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3713beef1b22Smrg# in macros and then make a single call at the end using the 'libtool' 3714beef1b22Smrg# label. 371509885543Smrg 371609885543Smrg 3717beef1b22Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3718beef1b22Smrg# ---------------------------------------- 3719beef1b22Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3720beef1b22Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3721beef1b22Smrg[m4_ifval([$1], 3722beef1b22Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3723beef1b22Smrg [$1 3724beef1b22Smrg])])]) 372509885543Smrg 3726beef1b22Smrg# Initialize. 3727beef1b22Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 372809885543Smrg 372909885543Smrg 3730beef1b22Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3731beef1b22Smrg# ------------------------------ 3732beef1b22Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3733beef1b22Smrgm4_define([_LT_CONFIG_LIBTOOL], 3734beef1b22Smrg[m4_ifval([$1], 3735beef1b22Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3736beef1b22Smrg [$1 3737beef1b22Smrg])])]) 3738b12e5c03Smrg 3739beef1b22Smrg# Initialize. 3740beef1b22Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3741b12e5c03Smrg 374209885543Smrg 3743beef1b22Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3744beef1b22Smrg# ----------------------------------------------------- 3745beef1b22Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3746beef1b22Smrg[_LT_CONFIG_LIBTOOL([$1]) 3747beef1b22Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3748beef1b22Smrg]) 374909885543Smrg 375009885543Smrg 3751beef1b22Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3752beef1b22Smrg# ----------------------------- 3753beef1b22Smrg# Add leading comment marks to the start of each line, and a trailing 3754beef1b22Smrg# full-stop to the whole comment if one is not present already. 3755beef1b22Smrgm4_define([_LT_FORMAT_COMMENT], 3756beef1b22Smrg[m4_ifval([$1], [ 3757beef1b22Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3758beef1b22Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3759beef1b22Smrg)]) 376009885543Smrg 376109885543Smrg 3762b12e5c03Smrg 3763beef1b22Smrg 3764beef1b22Smrg 3765beef1b22Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3766beef1b22Smrg# ------------------------------------------------------------------- 3767beef1b22Smrg# CONFIGNAME is the name given to the value in the libtool script. 3768beef1b22Smrg# VARNAME is the (base) name used in the configure script. 3769beef1b22Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3770beef1b22Smrg# VARNAME. Any other value will be used directly. 3771beef1b22Smrgm4_define([_LT_DECL], 3772beef1b22Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3773beef1b22Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3774beef1b22Smrg [m4_ifval([$1], [$1], [$2])]) 3775beef1b22Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3776beef1b22Smrg m4_ifval([$4], 3777beef1b22Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3778beef1b22Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3779beef1b22Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3780b12e5c03Smrg]) 3781b12e5c03Smrg 3782b12e5c03Smrg 3783beef1b22Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3784beef1b22Smrg# -------------------------------------------------------- 3785beef1b22Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3786b12e5c03Smrg 3787b12e5c03Smrg 3788beef1b22Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3789beef1b22Smrg# ------------------------------------------------ 3790beef1b22Smrgm4_define([lt_decl_tag_varnames], 3791beef1b22Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 379209885543Smrg 3793f395c03eSmrg 3794beef1b22Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3795beef1b22Smrg# --------------------------------------------------------- 3796beef1b22Smrgm4_define([_lt_decl_filter], 3797beef1b22Smrg[m4_case([$#], 3798beef1b22Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3799beef1b22Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3800beef1b22Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3801beef1b22Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3802beef1b22Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3803beef1b22Smrg]) 3804f395c03eSmrg 38052ec8c4b4Smrg 3806beef1b22Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3807beef1b22Smrg# -------------------------------------------------- 3808beef1b22Smrgm4_define([lt_decl_quote_varnames], 3809beef1b22Smrg[_lt_decl_filter([value], [1], $@)]) 381009885543Smrg 381109885543Smrg 3812beef1b22Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3813beef1b22Smrg# --------------------------------------------------- 3814beef1b22Smrgm4_define([lt_decl_dquote_varnames], 3815beef1b22Smrg[_lt_decl_filter([value], [2], $@)]) 381609885543Smrg 381709885543Smrg 3818beef1b22Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3819beef1b22Smrg# --------------------------------------------------- 3820beef1b22Smrgm4_define([lt_decl_varnames_tagged], 3821beef1b22Smrg[m4_assert([$# <= 2])dnl 3822beef1b22Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 3823beef1b22Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3824beef1b22Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3825beef1b22Smrgm4_define([_lt_decl_varnames_tagged], 3826beef1b22Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 382709885543Smrg 382809885543Smrg 3829beef1b22Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3830beef1b22Smrg# ------------------------------------------------ 3831beef1b22Smrgm4_define([lt_decl_all_varnames], 3832beef1b22Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3833beef1b22Smrg m4_if([$2], [], 3834beef1b22Smrg m4_quote(lt_decl_varnames), 3835beef1b22Smrg m4_quote(m4_shift($@))))[]dnl 3836beef1b22Smrg]) 3837beef1b22Smrgm4_define([_lt_decl_all_varnames], 3838beef1b22Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 3839beef1b22Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3840beef1b22Smrg]) 384109885543Smrg 384209885543Smrg 3843beef1b22Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3844beef1b22Smrg# ------------------------------------ 3845beef1b22Smrg# Quote a variable value, and forward it to 'config.status' so that its 3846beef1b22Smrg# declaration there will have the same value as in 'configure'. VARNAME 3847beef1b22Smrg# must have a single quote delimited value for this to work. 3848beef1b22Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3849beef1b22Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 385009885543Smrg 385109885543Smrg 3852beef1b22Smrg# _LT_CONFIG_STATUS_DECLARATIONS 3853beef1b22Smrg# ------------------------------ 3854beef1b22Smrg# We delimit libtool config variables with single quotes, so when 3855beef1b22Smrg# we write them to config.status, we have to be sure to quote all 3856beef1b22Smrg# embedded single quotes properly. In configure, this macro expands 3857beef1b22Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3858beef1b22Smrg# 3859beef1b22Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3860beef1b22Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3861beef1b22Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3862beef1b22Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 386309885543Smrg 386409885543Smrg 3865beef1b22Smrg# _LT_LIBTOOL_TAGS 3866beef1b22Smrg# ---------------- 3867beef1b22Smrg# Output comment and list of tags supported by the script 3868beef1b22Smrgm4_defun([_LT_LIBTOOL_TAGS], 3869beef1b22Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3870beef1b22Smrgavailable_tags='_LT_TAGS'dnl 3871beef1b22Smrg]) 3872f395c03eSmrg 387309885543Smrg 3874beef1b22Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3875beef1b22Smrg# ----------------------------------- 3876beef1b22Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3877beef1b22Smrg# expand to a commented shell variable setting: 3878beef1b22Smrg# 3879beef1b22Smrg# # Some comment about what VAR is for. 3880beef1b22Smrg# visible_name=$lt_internal_name 3881beef1b22Smrgm4_define([_LT_LIBTOOL_DECLARE], 3882beef1b22Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3883beef1b22Smrg [description])))[]dnl 3884beef1b22Smrgm4_pushdef([_libtool_name], 3885beef1b22Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3886beef1b22Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3887beef1b22Smrg [0], [_libtool_name=[$]$1], 3888beef1b22Smrg [1], [_libtool_name=$lt_[]$1], 3889beef1b22Smrg [2], [_libtool_name=$lt_[]$1], 3890beef1b22Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3891beef1b22Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3892beef1b22Smrg]) 3893f395c03eSmrg 389409885543Smrg 3895beef1b22Smrg# _LT_LIBTOOL_CONFIG_VARS 3896beef1b22Smrg# ----------------------- 3897beef1b22Smrg# Produce commented declarations of non-tagged libtool config variables 3898beef1b22Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 3899beef1b22Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3900beef1b22Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 3901beef1b22Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 3902beef1b22Smrg[m4_foreach([_lt_var], 3903beef1b22Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3904beef1b22Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 390509885543Smrg 390609885543Smrg 3907beef1b22Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 3908beef1b22Smrg# ------------------------- 3909beef1b22Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 3910beef1b22Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3911beef1b22Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 391209885543Smrg 391309885543Smrg 3914beef1b22Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 3915beef1b22Smrg# ------------------------------ 3916beef1b22Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 391709885543Smrg 391809885543Smrg 3919beef1b22Smrg# _LT_CONFIG_COMMANDS 3920beef1b22Smrg# ------------------- 3921beef1b22Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3922beef1b22Smrg# variables for single and double quote escaping we saved from calls 3923beef1b22Smrg# to _LT_DECL, we can put quote escaped variables declarations 3924beef1b22Smrg# into 'config.status', and then the shell code to quote escape them in 3925beef1b22Smrg# for loops in 'config.status'. Finally, any additional code accumulated 3926beef1b22Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3927beef1b22Smrgm4_defun([_LT_CONFIG_COMMANDS], 3928beef1b22Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3929beef1b22Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3930beef1b22Smrg dnl instead of duplicating it all over again into config.status, 3931beef1b22Smrg dnl then we will have config.status run $CONFIG_LT later, so it 3932beef1b22Smrg dnl needs to know what name is stored there: 3933beef1b22Smrg [AC_CONFIG_COMMANDS([libtool], 3934beef1b22Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3935beef1b22Smrg dnl If the libtool generation code is destined for config.status, 3936beef1b22Smrg dnl expand the accumulated commands and init code now: 3937beef1b22Smrg [AC_CONFIG_COMMANDS([libtool], 3938beef1b22Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3939beef1b22Smrg])#_LT_CONFIG_COMMANDS 394009885543Smrg 3941b12e5c03Smrg 3942beef1b22Smrg# Initialize. 3943beef1b22Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3944beef1b22Smrg[ 394509885543Smrg 3946beef1b22Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3947beef1b22Smrg# if CDPATH is set. 3948beef1b22Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 394909885543Smrg 3950beef1b22Smrgsed_quote_subst='$sed_quote_subst' 3951beef1b22Smrgdouble_quote_subst='$double_quote_subst' 3952beef1b22Smrgdelay_variable_subst='$delay_variable_subst' 3953beef1b22Smrg_LT_CONFIG_STATUS_DECLARATIONS 3954beef1b22SmrgLTCC='$LTCC' 3955beef1b22SmrgLTCFLAGS='$LTCFLAGS' 3956beef1b22Smrgcompiler='$compiler_DEFAULT' 395709885543Smrg 3958beef1b22Smrg# A function that is used when there is no print builtin or printf. 3959beef1b22Smrgfunc_fallback_echo () 39607b58d2e0Smrg{ 3961beef1b22Smrg eval 'cat <<_LTECHO_EOF 3962beef1b22Smrg\$[]1 3963beef1b22Smrg_LTECHO_EOF' 39647b58d2e0Smrg} 396509885543Smrg 3966beef1b22Smrg# Quote evaled strings. 3967beef1b22Smrgfor var in lt_decl_all_varnames([[ \ 3968beef1b22Smrg]], lt_decl_quote_varnames); do 3969beef1b22Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3970beef1b22Smrg *[[\\\\\\\`\\"\\\$]]*) 3971beef1b22Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3972beef1b22Smrg ;; 3973beef1b22Smrg *) 3974beef1b22Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3975beef1b22Smrg ;; 3976beef1b22Smrg esac 3977beef1b22Smrgdone 397809885543Smrg 3979beef1b22Smrg# Double-quote double-evaled strings. 3980beef1b22Smrgfor var in lt_decl_all_varnames([[ \ 3981beef1b22Smrg]], lt_decl_dquote_varnames); do 3982beef1b22Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3983beef1b22Smrg *[[\\\\\\\`\\"\\\$]]*) 3984beef1b22Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3985beef1b22Smrg ;; 3986beef1b22Smrg *) 3987beef1b22Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3988beef1b22Smrg ;; 3989beef1b22Smrg esac 3990beef1b22Smrgdone 3991beef1b22Smrg 3992beef1b22Smrg_LT_OUTPUT_LIBTOOL_INIT 3993beef1b22Smrg]) 3994beef1b22Smrg 3995beef1b22Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3996beef1b22Smrg# ------------------------------------ 3997beef1b22Smrg# Generate a child script FILE with all initialization necessary to 3998beef1b22Smrg# reuse the environment learned by the parent script, and make the 3999beef1b22Smrg# file executable. If COMMENT is supplied, it is inserted after the 4000beef1b22Smrg# '#!' sequence but before initialization text begins. After this 4001beef1b22Smrg# macro, additional text can be appended to FILE to form the body of 4002beef1b22Smrg# the child script. The macro ends with non-zero status if the 4003beef1b22Smrg# file could not be fully written (such as if the disk is full). 4004beef1b22Smrgm4_ifdef([AS_INIT_GENERATED], 4005beef1b22Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 4006beef1b22Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 4007beef1b22Smrg[m4_require([AS_PREPARE])]dnl 4008beef1b22Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 4009beef1b22Smrg[lt_write_fail=0 4010beef1b22Smrgcat >$1 <<_ASEOF || lt_write_fail=1 4011beef1b22Smrg#! $SHELL 4012beef1b22Smrg# Generated by $as_me. 4013beef1b22Smrg$2 4014beef1b22SmrgSHELL=\${CONFIG_SHELL-$SHELL} 4015beef1b22Smrgexport SHELL 4016beef1b22Smrg_ASEOF 4017beef1b22Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 4018beef1b22SmrgAS_SHELL_SANITIZE 4019beef1b22Smrg_AS_PREPARE 4020beef1b22Smrgexec AS_MESSAGE_FD>&1 4021beef1b22Smrg_ASEOF 4022beef1b22Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 4023beef1b22Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 4024beef1b22Smrg 4025beef1b22Smrg# LT_OUTPUT 4026beef1b22Smrg# --------- 4027beef1b22Smrg# This macro allows early generation of the libtool script (before 4028beef1b22Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 4029beef1b22Smrg# tests. 4030beef1b22SmrgAC_DEFUN([LT_OUTPUT], 4031beef1b22Smrg[: ${CONFIG_LT=./config.lt} 4032beef1b22SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 4033beef1b22Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4034beef1b22Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 4035beef1b22Smrg 4036beef1b22Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4037beef1b22Smrglt_cl_silent=false 4038beef1b22Smrgexec AS_MESSAGE_LOG_FD>>config.log 4039beef1b22Smrg{ 4040beef1b22Smrg echo 4041beef1b22Smrg AS_BOX([Running $as_me.]) 4042beef1b22Smrg} >&AS_MESSAGE_LOG_FD 4043beef1b22Smrg 4044beef1b22Smrglt_cl_help="\ 4045beef1b22Smrg'$as_me' creates a local libtool stub from the current configuration, 4046beef1b22Smrgfor use in further configure time tests before the real libtool is 4047beef1b22Smrggenerated. 4048beef1b22Smrg 4049beef1b22SmrgUsage: $[0] [[OPTIONS]] 4050beef1b22Smrg 4051beef1b22Smrg -h, --help print this help, then exit 4052beef1b22Smrg -V, --version print version number, then exit 4053beef1b22Smrg -q, --quiet do not print progress messages 4054beef1b22Smrg -d, --debug don't remove temporary files 4055beef1b22Smrg 4056beef1b22SmrgReport bugs to <bug-libtool@gnu.org>." 4057beef1b22Smrg 4058beef1b22Smrglt_cl_version="\ 4059beef1b22Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4060beef1b22Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4061beef1b22Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 4062beef1b22Smrg 4063beef1b22SmrgCopyright (C) 2011 Free Software Foundation, Inc. 4064beef1b22SmrgThis config.lt script is free software; the Free Software Foundation 4065beef1b22Smrggives unlimited permision to copy, distribute and modify it." 4066beef1b22Smrg 4067beef1b22Smrgwhile test 0 != $[#] 4068beef1b22Smrgdo 4069beef1b22Smrg case $[1] in 4070beef1b22Smrg --version | --v* | -V ) 4071beef1b22Smrg echo "$lt_cl_version"; exit 0 ;; 4072beef1b22Smrg --help | --h* | -h ) 4073beef1b22Smrg echo "$lt_cl_help"; exit 0 ;; 4074beef1b22Smrg --debug | --d* | -d ) 4075beef1b22Smrg debug=: ;; 4076beef1b22Smrg --quiet | --q* | --silent | --s* | -q ) 4077beef1b22Smrg lt_cl_silent=: ;; 4078beef1b22Smrg 4079beef1b22Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4080beef1b22SmrgTry '$[0] --help' for more information.]) ;; 4081beef1b22Smrg 4082beef1b22Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4083beef1b22SmrgTry '$[0] --help' for more information.]) ;; 4084beef1b22Smrg esac 4085beef1b22Smrg shift 4086beef1b22Smrgdone 4087beef1b22Smrg 4088beef1b22Smrgif $lt_cl_silent; then 4089beef1b22Smrg exec AS_MESSAGE_FD>/dev/null 4090b12e5c03Smrgfi 4091beef1b22Smrg_LTEOF 4092b12e5c03Smrg 4093beef1b22Smrgcat >>"$CONFIG_LT" <<_LTEOF 4094beef1b22Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4095beef1b22Smrg_LTEOF 409609885543Smrg 4097beef1b22Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4098beef1b22SmrgAC_MSG_NOTICE([creating $ofile]) 4099beef1b22Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 4100beef1b22SmrgAS_EXIT(0) 4101beef1b22Smrg_LTEOF 4102beef1b22Smrgchmod +x "$CONFIG_LT" 410309885543Smrg 4104beef1b22Smrg# configure is writing to config.log, but config.lt does its own redirection, 4105beef1b22Smrg# appending to config.log, which fails on DOS, as config.log is still kept 4106beef1b22Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4107beef1b22Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4108beef1b22Smrglt_cl_success=: 4109beef1b22Smrgtest yes = "$silent" && 4110beef1b22Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 4111beef1b22Smrgexec AS_MESSAGE_LOG_FD>/dev/null 4112beef1b22Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4113beef1b22Smrgexec AS_MESSAGE_LOG_FD>>config.log 4114beef1b22Smrg$lt_cl_success || AS_EXIT(1) 4115beef1b22Smrg])# LT_OUTPUT 411609885543Smrg 411709885543Smrg 4118beef1b22Smrg# _LT_CONFIG(TAG) 4119beef1b22Smrg# --------------- 4120beef1b22Smrg# If TAG is the built-in tag, create an initial libtool script with a 4121beef1b22Smrg# default configuration from the untagged config vars. Otherwise add code 4122beef1b22Smrg# to config.status for appending the configuration named by TAG from the 4123beef1b22Smrg# matching tagged config vars. 4124beef1b22Smrgm4_defun([_LT_CONFIG], 4125beef1b22Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4126beef1b22Smrg_LT_CONFIG_SAVE_COMMANDS([ 4127beef1b22Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4128beef1b22Smrg m4_if(_LT_TAG, [C], [ 4129beef1b22Smrg # See if we are running on zsh, and set the options that allow our 4130beef1b22Smrg # commands through without removal of \ escapes. 4131beef1b22Smrg if test -n "${ZSH_VERSION+set}"; then 4132beef1b22Smrg setopt NO_GLOB_SUBST 4133beef1b22Smrg fi 413409885543Smrg 4135beef1b22Smrg cfgfile=${ofile}T 4136beef1b22Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4137beef1b22Smrg $RM "$cfgfile" 413809885543Smrg 4139beef1b22Smrg cat <<_LT_EOF >> "$cfgfile" 4140beef1b22Smrg#! $SHELL 4141beef1b22Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4142beef1b22Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4143beef1b22Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4144e4f6584cSmrg 4145beef1b22Smrg# Provide generalized library-building support services. 4146beef1b22Smrg# Written by Gordon Matzigkeit, 1996 4147b12e5c03Smrg 4148beef1b22Smrg_LT_COPYING 4149beef1b22Smrg_LT_LIBTOOL_TAGS 4150f395c03eSmrg 4151beef1b22Smrg# Configured defaults for sys_lib_dlsearch_path munging. 4152beef1b22Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4153e4f6584cSmrg 4154beef1b22Smrg# ### BEGIN LIBTOOL CONFIG 4155beef1b22Smrg_LT_LIBTOOL_CONFIG_VARS 4156beef1b22Smrg_LT_LIBTOOL_TAG_VARS 4157beef1b22Smrg# ### END LIBTOOL CONFIG 41582ec8c4b4Smrg 4159beef1b22Smrg_LT_EOF 41602ec8c4b4Smrg 4161beef1b22Smrg cat <<'_LT_EOF' >> "$cfgfile" 41622ec8c4b4Smrg 4163beef1b22Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 41642ec8c4b4Smrg 4165beef1b22Smrg_LT_PREPARE_MUNGE_PATH_LIST 4166beef1b22Smrg_LT_PREPARE_CC_BASENAME 41672ec8c4b4Smrg 4168beef1b22Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 41692ec8c4b4Smrg 41707b58d2e0Smrg_LT_EOF 4171e4f6584cSmrg 4172beef1b22Smrg case $host_os in 4173beef1b22Smrg aix3*) 4174beef1b22Smrg cat <<\_LT_EOF >> "$cfgfile" 4175beef1b22Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4176beef1b22Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4177beef1b22Smrg# vanish in a puff of smoke. 4178beef1b22Smrgif test set != "${COLLECT_NAMES+set}"; then 4179beef1b22Smrg COLLECT_NAMES= 4180beef1b22Smrg export COLLECT_NAMES 4181beef1b22Smrgfi 41827b58d2e0Smrg_LT_EOF 4183beef1b22Smrg ;; 4184beef1b22Smrg esac 41852ec8c4b4Smrg 4186beef1b22Smrg _LT_PROG_LTMAIN 4187beef1b22Smrg 4188beef1b22Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4189beef1b22Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4190beef1b22Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4191beef1b22Smrg # is reportedly fixed, but why not run on old versions too? 4192beef1b22Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4193beef1b22Smrg || (rm -f "$cfgfile"; exit 1) 41942ec8c4b4Smrg 4195beef1b22Smrg mv -f "$cfgfile" "$ofile" || 4196beef1b22Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4197beef1b22Smrg chmod +x "$ofile" 4198beef1b22Smrg], 4199beef1b22Smrg[cat <<_LT_EOF >> "$ofile" 42002ec8c4b4Smrg 4201beef1b22Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4202beef1b22Smrgdnl in a comment (ie after a #). 4203beef1b22Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4204beef1b22Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4205beef1b22Smrg# ### END LIBTOOL TAG CONFIG: $1 4206beef1b22Smrg_LT_EOF 4207beef1b22Smrg])dnl /m4_if 4208beef1b22Smrg], 4209beef1b22Smrg[m4_if([$1], [], [ 4210beef1b22Smrg PACKAGE='$PACKAGE' 4211beef1b22Smrg VERSION='$VERSION' 4212beef1b22Smrg RM='$RM' 4213beef1b22Smrg ofile='$ofile'], []) 4214beef1b22Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4215beef1b22Smrg])# _LT_CONFIG 42162ec8c4b4Smrg 42172ec8c4b4Smrg 4218beef1b22Smrg# LT_SUPPORTED_TAG(TAG) 4219beef1b22Smrg# --------------------- 4220beef1b22Smrg# Trace this macro to discover what tags are supported by the libtool 4221beef1b22Smrg# --tag option, using: 4222beef1b22Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4223beef1b22SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 422409885543Smrg 42252ec8c4b4Smrg 4226beef1b22Smrg# C support is built-in for now 4227beef1b22Smrgm4_define([_LT_LANG_C_enabled], []) 4228beef1b22Smrgm4_define([_LT_TAGS], []) 42292ec8c4b4Smrg 42302ec8c4b4Smrg 4231beef1b22Smrg# LT_LANG(LANG) 4232beef1b22Smrg# ------------- 4233beef1b22Smrg# Enable libtool support for the given language if not already enabled. 4234beef1b22SmrgAC_DEFUN([LT_LANG], 4235beef1b22Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4236beef1b22Smrgm4_case([$1], 4237beef1b22Smrg [C], [_LT_LANG(C)], 4238beef1b22Smrg [C++], [_LT_LANG(CXX)], 4239beef1b22Smrg [Go], [_LT_LANG(GO)], 4240beef1b22Smrg [Java], [_LT_LANG(GCJ)], 4241beef1b22Smrg [Fortran 77], [_LT_LANG(F77)], 4242beef1b22Smrg [Fortran], [_LT_LANG(FC)], 4243beef1b22Smrg [Windows Resource], [_LT_LANG(RC)], 4244beef1b22Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4245beef1b22Smrg [_LT_LANG($1)], 4246beef1b22Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4247beef1b22Smrg])# LT_LANG 424809885543Smrg 4249e4f6584cSmrg 4250beef1b22Smrg# _LT_LANG(LANGNAME) 4251beef1b22Smrg# ------------------ 4252beef1b22Smrgm4_defun([_LT_LANG], 4253beef1b22Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4254beef1b22Smrg [LT_SUPPORTED_TAG([$1])dnl 4255beef1b22Smrg m4_append([_LT_TAGS], [$1 ])dnl 4256beef1b22Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4257beef1b22Smrg _LT_LANG_$1_CONFIG($1)])dnl 4258beef1b22Smrg])# _LT_LANG 4259beef1b22Smrg 4260e4f6584cSmrg 4261beef1b22Smrgm4_ifndef([AC_PROG_GO], [ 4262beef1b22Smrg# NOTE: This macro has been submitted for inclusion into # 4263beef1b22Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4264beef1b22Smrg# a released version of Autoconf we should remove this # 4265beef1b22Smrg# macro and use it instead. # 4266beef1b22Smrgm4_defun([AC_PROG_GO], 4267beef1b22Smrg[AC_LANG_PUSH(Go)dnl 4268beef1b22SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4269beef1b22SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4270beef1b22Smrg_AC_ARG_VAR_LDFLAGS()dnl 4271beef1b22SmrgAC_CHECK_TOOL(GOC, gccgo) 4272beef1b22Smrgif test -z "$GOC"; then 4273beef1b22Smrg if test -n "$ac_tool_prefix"; then 4274beef1b22Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4275beef1b22Smrg fi 4276beef1b22Smrgfi 4277beef1b22Smrgif test -z "$GOC"; then 4278beef1b22Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4279beef1b22Smrgfi 4280beef1b22Smrg])#m4_defun 4281beef1b22Smrg])#m4_ifndef 42827b58d2e0Smrg 42837b58d2e0Smrg 4284beef1b22Smrg# _LT_LANG_DEFAULT_CONFIG 4285beef1b22Smrg# ----------------------- 4286beef1b22Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4287beef1b22Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4288beef1b22Smrg [LT_LANG(CXX)], 4289beef1b22Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 42907b58d2e0Smrg 4291beef1b22SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4292beef1b22Smrg [LT_LANG(F77)], 4293beef1b22Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 42947b58d2e0Smrg 4295beef1b22SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4296beef1b22Smrg [LT_LANG(FC)], 4297beef1b22Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 42987b58d2e0Smrg 4299beef1b22Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4300beef1b22Smrgdnl pulling things in needlessly. 4301beef1b22SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4302beef1b22Smrg [LT_LANG(GCJ)], 4303beef1b22Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4304beef1b22Smrg [LT_LANG(GCJ)], 4305beef1b22Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4306beef1b22Smrg [LT_LANG(GCJ)], 4307beef1b22Smrg [m4_ifdef([AC_PROG_GCJ], 4308beef1b22Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4309beef1b22Smrg m4_ifdef([A][M_PROG_GCJ], 4310beef1b22Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4311beef1b22Smrg m4_ifdef([LT_PROG_GCJ], 4312beef1b22Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 43137b58d2e0Smrg 4314beef1b22SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4315beef1b22Smrg [LT_LANG(GO)], 4316beef1b22Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 43177b58d2e0Smrg 4318beef1b22SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4319beef1b22Smrg [LT_LANG(RC)], 4320beef1b22Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4321beef1b22Smrg])# _LT_LANG_DEFAULT_CONFIG 43227b58d2e0Smrg 4323beef1b22Smrg# Obsolete macros: 4324beef1b22SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4325beef1b22SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4326beef1b22SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4327beef1b22SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4328beef1b22SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4329beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 4330beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4331beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4332beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4333beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4334beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 43357b58d2e0Smrg 43367b58d2e0Smrg 4337beef1b22Smrg# _LT_TAG_COMPILER 4338beef1b22Smrg# ---------------- 4339beef1b22Smrgm4_defun([_LT_TAG_COMPILER], 4340beef1b22Smrg[AC_REQUIRE([AC_PROG_CC])dnl 4341beef1b22Smrg 4342beef1b22Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4343beef1b22Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4344beef1b22Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4345beef1b22Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 43467b58d2e0Smrg 4347beef1b22Smrg# If no C compiler was specified, use CC. 4348beef1b22SmrgLTCC=${LTCC-"$CC"} 43497b58d2e0Smrg 4350beef1b22Smrg# If no C compiler flags were specified, use CFLAGS. 4351beef1b22SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 43527b58d2e0Smrg 4353beef1b22Smrg# Allow CC to be a program name with arguments. 4354beef1b22Smrgcompiler=$CC 4355beef1b22Smrg])# _LT_TAG_COMPILER 43567b58d2e0Smrg 4357f395c03eSmrg 4358beef1b22Smrg# _LT_COMPILER_BOILERPLATE 4359beef1b22Smrg# ------------------------ 4360beef1b22Smrg# Check for compiler boilerplate output or warnings with 4361beef1b22Smrg# the simple compiler test code. 4362beef1b22Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 4363beef1b22Smrg[m4_require([_LT_DECL_SED])dnl 4364beef1b22Smrgac_outfile=conftest.$ac_objext 4365beef1b22Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4366beef1b22Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4367beef1b22Smrg_lt_compiler_boilerplate=`cat conftest.err` 4368beef1b22Smrg$RM conftest* 4369beef1b22Smrg])# _LT_COMPILER_BOILERPLATE 43707b58d2e0Smrg 43717b58d2e0Smrg 4372beef1b22Smrg# _LT_LINKER_BOILERPLATE 4373beef1b22Smrg# ---------------------- 4374beef1b22Smrg# Check for linker boilerplate output or warnings with 4375beef1b22Smrg# the simple link test code. 4376beef1b22Smrgm4_defun([_LT_LINKER_BOILERPLATE], 4377beef1b22Smrg[m4_require([_LT_DECL_SED])dnl 4378beef1b22Smrgac_outfile=conftest.$ac_objext 4379beef1b22Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4380beef1b22Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4381beef1b22Smrg_lt_linker_boilerplate=`cat conftest.err` 4382beef1b22Smrg$RM -r conftest* 4383beef1b22Smrg])# _LT_LINKER_BOILERPLATE 43847b58d2e0Smrg 4385beef1b22Smrg# _LT_REQUIRED_DARWIN_CHECKS 4386beef1b22Smrg# ------------------------- 4387beef1b22Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4388beef1b22Smrg case $host_os in 4389beef1b22Smrg rhapsody* | darwin*) 4390beef1b22Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4391beef1b22Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4392beef1b22Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4393beef1b22Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4394beef1b22Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4395beef1b22Smrg _LT_DECL([], [DSYMUTIL], [1], 4396beef1b22Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4397beef1b22Smrg _LT_DECL([], [NMEDIT], [1], 4398beef1b22Smrg [Tool to change global to local symbols on Mac OS X]) 4399beef1b22Smrg _LT_DECL([], [LIPO], [1], 4400beef1b22Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 4401beef1b22Smrg _LT_DECL([], [OTOOL], [1], 4402beef1b22Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4403beef1b22Smrg _LT_DECL([], [OTOOL64], [1], 4404beef1b22Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4405beef1b22Smrg 4406beef1b22Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4407beef1b22Smrg [lt_cv_apple_cc_single_mod=no 4408beef1b22Smrg if test -z "$LT_MULTI_MODULE"; then 4409beef1b22Smrg # By default we will add the -single_module flag. You can override 4410beef1b22Smrg # by either setting the environment variable LT_MULTI_MODULE 4411beef1b22Smrg # non-empty at configure time, or by adding -multi_module to the 4412beef1b22Smrg # link flags. 4413beef1b22Smrg rm -rf libconftest.dylib* 4414beef1b22Smrg echo "int foo(void){return 1;}" > conftest.c 4415beef1b22Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4416beef1b22Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4417beef1b22Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4418beef1b22Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4419beef1b22Smrg _lt_result=$? 4420beef1b22Smrg # If there is a non-empty error log, and "single_module" 4421beef1b22Smrg # appears in it, assume the flag caused a linker warning 4422beef1b22Smrg if test -s conftest.err && $GREP single_module conftest.err; then 4423beef1b22Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4424beef1b22Smrg # Otherwise, if the output was created with a 0 exit code from 4425beef1b22Smrg # the compiler, it worked. 4426beef1b22Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4427beef1b22Smrg lt_cv_apple_cc_single_mod=yes 44287b58d2e0Smrg else 4429beef1b22Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 44307b58d2e0Smrg fi 4431beef1b22Smrg rm -rf libconftest.dylib* 4432beef1b22Smrg rm -f conftest.* 4433beef1b22Smrg fi]) 4434beef1b22Smrg 4435beef1b22Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4436beef1b22Smrg [lt_cv_ld_exported_symbols_list], 4437beef1b22Smrg [lt_cv_ld_exported_symbols_list=no 4438beef1b22Smrg save_LDFLAGS=$LDFLAGS 4439beef1b22Smrg echo "_main" > conftest.sym 4440beef1b22Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4441beef1b22Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4442beef1b22Smrg [lt_cv_ld_exported_symbols_list=yes], 4443beef1b22Smrg [lt_cv_ld_exported_symbols_list=no]) 4444beef1b22Smrg LDFLAGS=$save_LDFLAGS 4445beef1b22Smrg ]) 4446beef1b22Smrg 4447beef1b22Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4448beef1b22Smrg [lt_cv_ld_force_load=no 4449beef1b22Smrg cat > conftest.c << _LT_EOF 4450beef1b22Smrgint forced_loaded() { return 2;} 4451beef1b22Smrg_LT_EOF 4452beef1b22Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4453beef1b22Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4454beef1b22Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4455beef1b22Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4456beef1b22Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4457beef1b22Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4458beef1b22Smrg cat > conftest.c << _LT_EOF 4459beef1b22Smrgint main() { return 0;} 4460beef1b22Smrg_LT_EOF 4461beef1b22Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4462beef1b22Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4463beef1b22Smrg _lt_result=$? 4464beef1b22Smrg if test -s conftest.err && $GREP force_load conftest.err; then 4465beef1b22Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4466beef1b22Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4467beef1b22Smrg lt_cv_ld_force_load=yes 44687b58d2e0Smrg else 4469beef1b22Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 44707b58d2e0Smrg fi 4471beef1b22Smrg rm -f conftest.err libconftest.a conftest conftest.c 4472beef1b22Smrg rm -rf conftest.dSYM 4473beef1b22Smrg ]) 4474beef1b22Smrg case $host_os in 4475beef1b22Smrg rhapsody* | darwin1.[[012]]) 4476beef1b22Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4477beef1b22Smrg darwin1.*) 4478beef1b22Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4479beef1b22Smrg darwin*) 4480beef1b22Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 4481beef1b22Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4482beef1b22Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4483beef1b22Smrg *) 4484beef1b22Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4485beef1b22Smrg esac 4486beef1b22Smrg ;; 4487beef1b22Smrg esac 4488beef1b22Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 4489beef1b22Smrg _lt_dar_single_mod='$single_module' 4490beef1b22Smrg fi 4491beef1b22Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 4492beef1b22Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 4493beef1b22Smrg else 4494beef1b22Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 4495beef1b22Smrg fi 4496beef1b22Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4497beef1b22Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 4498beef1b22Smrg else 4499beef1b22Smrg _lt_dsymutil= 4500beef1b22Smrg fi 4501beef1b22Smrg ;; 4502beef1b22Smrg esac 4503beef1b22Smrg]) 4504beef1b22Smrg 4505beef1b22Smrg 4506beef1b22Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 4507beef1b22Smrg# --------------------------------- 4508beef1b22Smrg# Checks for linker and compiler features on darwin 4509beef1b22Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 4510beef1b22Smrg[ 4511beef1b22Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4512beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4513beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4514beef1b22Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 4515beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4516beef1b22Smrg if test yes = "$lt_cv_ld_force_load"; then 4517beef1b22Smrg _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\"`' 4518beef1b22Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4519beef1b22Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 4520beef1b22Smrg else 4521beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4522beef1b22Smrg fi 4523beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4524beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4525beef1b22Smrg case $cc_basename in 4526beef1b22Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4527beef1b22Smrg *) _lt_dar_can_shared=$GCC ;; 4528beef1b22Smrg esac 4529beef1b22Smrg if test yes = "$_lt_dar_can_shared"; then 4530beef1b22Smrg output_verbose_link_cmd=func_echo_all 4531beef1b22Smrg _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" 4532beef1b22Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4533beef1b22Smrg _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" 4534beef1b22Smrg _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" 4535beef1b22Smrg m4_if([$1], [CXX], 4536beef1b22Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4537beef1b22Smrg _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" 4538beef1b22Smrg _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" 4539beef1b22Smrg fi 4540beef1b22Smrg],[]) 4541beef1b22Smrg else 4542beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4543beef1b22Smrg fi 4544beef1b22Smrg]) 45457b58d2e0Smrg 4546beef1b22Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4547beef1b22Smrg# ---------------------------------- 4548beef1b22Smrg# Links a minimal program and checks the executable 4549beef1b22Smrg# for the system default hardcoded library path. In most cases, 4550beef1b22Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 4551beef1b22Smrg# the location of the communication and MPI libs are included too. 4552beef1b22Smrg# If we don't find anything, use the default library path according 4553beef1b22Smrg# to the aix ld manual. 4554beef1b22Smrg# Store the results from the different compilers for each TAGNAME. 4555beef1b22Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 4556beef1b22Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 4557beef1b22Smrg[m4_require([_LT_DECL_SED])dnl 4558beef1b22Smrgif test set = "${lt_cv_aix_libpath+set}"; then 4559beef1b22Smrg aix_libpath=$lt_cv_aix_libpath 4560beef1b22Smrgelse 4561beef1b22Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4562beef1b22Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4563beef1b22Smrg lt_aix_libpath_sed='[ 4564beef1b22Smrg /Import File Strings/,/^$/ { 4565beef1b22Smrg /^0/ { 4566beef1b22Smrg s/^0 *\([^ ]*\) *$/\1/ 4567beef1b22Smrg p 4568beef1b22Smrg } 4569beef1b22Smrg }]' 4570beef1b22Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4571beef1b22Smrg # Check for a 64-bit object if we didn't find anything. 4572beef1b22Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4573beef1b22Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4574beef1b22Smrg fi],[]) 4575beef1b22Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4576beef1b22Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4577beef1b22Smrg fi 4578beef1b22Smrg ]) 4579beef1b22Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 4580beef1b22Smrgfi 4581beef1b22Smrg])# _LT_SYS_MODULE_PATH_AIX 45827b58d2e0Smrg 45837b58d2e0Smrg 4584beef1b22Smrg# _LT_SHELL_INIT(ARG) 4585beef1b22Smrg# ------------------- 4586beef1b22Smrgm4_define([_LT_SHELL_INIT], 4587beef1b22Smrg[m4_divert_text([M4SH-INIT], [$1 4588beef1b22Smrg])])# _LT_SHELL_INIT 45897b58d2e0Smrg 45907b58d2e0Smrg 45917b58d2e0Smrg 4592beef1b22Smrg# _LT_PROG_ECHO_BACKSLASH 4593beef1b22Smrg# ----------------------- 4594beef1b22Smrg# Find how we can fake an echo command that does not interpret backslash. 4595beef1b22Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 4596beef1b22Smrg# of the generated configure script that will find a shell with a builtin 4597beef1b22Smrg# printf (that we can use as an echo command). 4598beef1b22Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 4599beef1b22Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4600beef1b22SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4601beef1b22SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 46027b58d2e0Smrg 4603beef1b22SmrgAC_MSG_CHECKING([how to print strings]) 4604beef1b22Smrg# Test print first, because it will be a builtin if present. 4605beef1b22Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4606beef1b22Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4607beef1b22Smrg ECHO='print -r --' 4608beef1b22Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4609beef1b22Smrg ECHO='printf %s\n' 4610beef1b22Smrgelse 4611beef1b22Smrg # Use this function as a fallback that always works. 4612beef1b22Smrg func_fallback_echo () 4613beef1b22Smrg { 4614beef1b22Smrg eval 'cat <<_LTECHO_EOF 4615beef1b22Smrg$[]1 4616beef1b22Smrg_LTECHO_EOF' 4617beef1b22Smrg } 4618beef1b22Smrg ECHO='func_fallback_echo' 4619beef1b22Smrgfi 46207b58d2e0Smrg 4621beef1b22Smrg# func_echo_all arg... 4622beef1b22Smrg# Invoke $ECHO with all args, space-separated. 4623beef1b22Smrgfunc_echo_all () 4624beef1b22Smrg{ 4625beef1b22Smrg $ECHO "$*" 4626beef1b22Smrg} 46277b58d2e0Smrg 4628beef1b22Smrgcase $ECHO in 4629beef1b22Smrg printf*) AC_MSG_RESULT([printf]) ;; 4630beef1b22Smrg print*) AC_MSG_RESULT([print -r]) ;; 4631beef1b22Smrg *) AC_MSG_RESULT([cat]) ;; 4632beef1b22Smrgesac 46337b58d2e0Smrg 4634beef1b22Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 4635beef1b22Smrg[_AS_DETECT_SUGGESTED([ 4636beef1b22Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4637beef1b22Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4638beef1b22Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4639beef1b22Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4640beef1b22Smrg PATH=/empty FPATH=/empty; export PATH FPATH 4641beef1b22Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 4642beef1b22Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4643beef1b22Smrg 4644beef1b22Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4645beef1b22Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4646beef1b22Smrg])# _LT_PROG_ECHO_BACKSLASH 46477b58d2e0Smrg 46487b58d2e0Smrg 4649beef1b22Smrg# _LT_WITH_SYSROOT 4650beef1b22Smrg# ---------------- 4651beef1b22SmrgAC_DEFUN([_LT_WITH_SYSROOT], 4652beef1b22Smrg[m4_require([_LT_DECL_SED])dnl 4653beef1b22SmrgAC_MSG_CHECKING([for sysroot]) 4654beef1b22SmrgAC_ARG_WITH([sysroot], 4655beef1b22Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4656beef1b22Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 4657beef1b22Smrg if not specified).])], 4658beef1b22Smrg[], [with_sysroot=no]) 46597b58d2e0Smrg 4660beef1b22Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 4661beef1b22Smrgdnl in case the user passed a directory name. 4662beef1b22Smrglt_sysroot= 4663beef1b22Smrgcase $with_sysroot in #( 4664beef1b22Smrg yes) 4665beef1b22Smrg if test yes = "$GCC"; then 4666beef1b22Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4667beef1b22Smrg fi 4668beef1b22Smrg ;; #( 4669beef1b22Smrg /*) 4670beef1b22Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4671beef1b22Smrg ;; #( 4672beef1b22Smrg no|'') 4673beef1b22Smrg ;; #( 4674beef1b22Smrg *) 4675beef1b22Smrg AC_MSG_RESULT([$with_sysroot]) 4676beef1b22Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 4677beef1b22Smrg ;; 4678beef1b22Smrgesac 46797b58d2e0Smrg 4680beef1b22Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 4681beef1b22Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4682beef1b22Smrg[dependent libraries, and where our libraries should be installed.])]) 46837b58d2e0Smrg 4684beef1b22Smrg# _LT_ENABLE_LOCK 4685beef1b22Smrg# --------------- 4686beef1b22Smrgm4_defun([_LT_ENABLE_LOCK], 4687beef1b22Smrg[AC_ARG_ENABLE([libtool-lock], 4688beef1b22Smrg [AS_HELP_STRING([--disable-libtool-lock], 4689beef1b22Smrg [avoid locking (might break parallel builds)])]) 4690beef1b22Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 46917b58d2e0Smrg 4692beef1b22Smrg# Some flags need to be propagated to the compiler or linker for good 4693beef1b22Smrg# libtool support. 4694beef1b22Smrgcase $host in 4695beef1b22Smrgia64-*-hpux*) 4696beef1b22Smrg # Find out what ABI is being produced by ac_compile, and set mode 4697beef1b22Smrg # options accordingly. 4698beef1b22Smrg echo 'int i;' > conftest.$ac_ext 4699beef1b22Smrg if AC_TRY_EVAL(ac_compile); then 4700beef1b22Smrg case `$FILECMD conftest.$ac_objext` in 4701beef1b22Smrg *ELF-32*) 4702beef1b22Smrg HPUX_IA64_MODE=32 4703beef1b22Smrg ;; 4704beef1b22Smrg *ELF-64*) 4705beef1b22Smrg HPUX_IA64_MODE=64 47067b58d2e0Smrg ;; 4707beef1b22Smrg esac 4708beef1b22Smrg fi 4709beef1b22Smrg rm -rf conftest* 4710beef1b22Smrg ;; 4711beef1b22Smrg*-*-irix6*) 4712beef1b22Smrg # Find out what ABI is being produced by ac_compile, and set linker 4713beef1b22Smrg # options accordingly. 4714beef1b22Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4715beef1b22Smrg if AC_TRY_EVAL(ac_compile); then 4716beef1b22Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 4717beef1b22Smrg case `$FILECMD conftest.$ac_objext` in 4718beef1b22Smrg *32-bit*) 4719beef1b22Smrg LD="${LD-ld} -melf32bsmip" 4720beef1b22Smrg ;; 4721beef1b22Smrg *N32*) 4722beef1b22Smrg LD="${LD-ld} -melf32bmipn32" 4723beef1b22Smrg ;; 4724beef1b22Smrg *64-bit*) 4725beef1b22Smrg LD="${LD-ld} -melf64bmip" 4726beef1b22Smrg ;; 4727beef1b22Smrg esac 4728beef1b22Smrg else 4729beef1b22Smrg case `$FILECMD conftest.$ac_objext` in 4730beef1b22Smrg *32-bit*) 4731beef1b22Smrg LD="${LD-ld} -32" 4732beef1b22Smrg ;; 4733beef1b22Smrg *N32*) 4734beef1b22Smrg LD="${LD-ld} -n32" 4735beef1b22Smrg ;; 4736beef1b22Smrg *64-bit*) 4737beef1b22Smrg LD="${LD-ld} -64" 4738beef1b22Smrg ;; 47397b58d2e0Smrg esac 47407b58d2e0Smrg fi 47417b58d2e0Smrg fi 4742beef1b22Smrg rm -rf conftest* 4743beef1b22Smrg ;; 47447b58d2e0Smrg 4745beef1b22Smrgmips64*-*linux*) 4746beef1b22Smrg # Find out what ABI is being produced by ac_compile, and set linker 4747beef1b22Smrg # options accordingly. 4748beef1b22Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4749beef1b22Smrg if AC_TRY_EVAL(ac_compile); then 4750beef1b22Smrg emul=elf 4751beef1b22Smrg case `$FILECMD conftest.$ac_objext` in 4752beef1b22Smrg *32-bit*) 4753beef1b22Smrg emul="${emul}32" 4754beef1b22Smrg ;; 4755beef1b22Smrg *64-bit*) 4756beef1b22Smrg emul="${emul}64" 4757beef1b22Smrg ;; 4758beef1b22Smrg esac 4759beef1b22Smrg case `$FILECMD conftest.$ac_objext` in 4760beef1b22Smrg *MSB*) 4761beef1b22Smrg emul="${emul}btsmip" 4762beef1b22Smrg ;; 4763beef1b22Smrg *LSB*) 4764beef1b22Smrg emul="${emul}ltsmip" 4765beef1b22Smrg ;; 4766beef1b22Smrg esac 4767beef1b22Smrg case `$FILECMD conftest.$ac_objext` in 4768beef1b22Smrg *N32*) 4769beef1b22Smrg emul="${emul}n32" 4770beef1b22Smrg ;; 4771beef1b22Smrg esac 4772beef1b22Smrg LD="${LD-ld} -m $emul" 4773beef1b22Smrg fi 4774beef1b22Smrg rm -rf conftest* 4775beef1b22Smrg ;; 4776b12e5c03Smrg 4777beef1b22Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4778beef1b22Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4779beef1b22Smrg # Find out what ABI is being produced by ac_compile, and set linker 4780beef1b22Smrg # options accordingly. Note that the listed cases only cover the 4781beef1b22Smrg # situations where additional linker options are needed (such as when 4782beef1b22Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4783beef1b22Smrg # vice versa); the common cases where no linker options are needed do 4784beef1b22Smrg # not appear in the list. 4785beef1b22Smrg echo 'int i;' > conftest.$ac_ext 4786beef1b22Smrg if AC_TRY_EVAL(ac_compile); then 4787beef1b22Smrg case `$FILECMD conftest.o` in 4788beef1b22Smrg *32-bit*) 4789beef1b22Smrg case $host in 4790beef1b22Smrg x86_64-*kfreebsd*-gnu) 4791beef1b22Smrg LD="${LD-ld} -m elf_i386_fbsd" 4792beef1b22Smrg ;; 4793beef1b22Smrg x86_64-*linux*) 4794beef1b22Smrg case `$FILECMD conftest.o` in 4795beef1b22Smrg *x86-64*) 4796beef1b22Smrg LD="${LD-ld} -m elf32_x86_64" 4797beef1b22Smrg ;; 4798beef1b22Smrg *) 4799beef1b22Smrg LD="${LD-ld} -m elf_i386" 4800beef1b22Smrg ;; 4801beef1b22Smrg esac 4802beef1b22Smrg ;; 4803beef1b22Smrg powerpc64le-*linux*) 4804beef1b22Smrg LD="${LD-ld} -m elf32lppclinux" 4805beef1b22Smrg ;; 4806beef1b22Smrg powerpc64-*linux*) 4807beef1b22Smrg LD="${LD-ld} -m elf32ppclinux" 4808beef1b22Smrg ;; 4809beef1b22Smrg s390x-*linux*) 4810beef1b22Smrg LD="${LD-ld} -m elf_s390" 4811beef1b22Smrg ;; 4812beef1b22Smrg sparc64-*linux*) 4813beef1b22Smrg LD="${LD-ld} -m elf32_sparc" 4814beef1b22Smrg ;; 4815beef1b22Smrg esac 4816beef1b22Smrg ;; 4817beef1b22Smrg *64-bit*) 4818beef1b22Smrg case $host in 4819beef1b22Smrg x86_64-*kfreebsd*-gnu) 4820beef1b22Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 4821beef1b22Smrg ;; 4822beef1b22Smrg x86_64-*linux*) 4823beef1b22Smrg LD="${LD-ld} -m elf_x86_64" 4824beef1b22Smrg ;; 4825beef1b22Smrg powerpcle-*linux*) 4826beef1b22Smrg LD="${LD-ld} -m elf64lppc" 4827beef1b22Smrg ;; 4828beef1b22Smrg powerpc-*linux*) 4829beef1b22Smrg LD="${LD-ld} -m elf64ppc" 4830beef1b22Smrg ;; 4831beef1b22Smrg s390*-*linux*|s390*-*tpf*) 4832beef1b22Smrg LD="${LD-ld} -m elf64_s390" 4833beef1b22Smrg ;; 4834beef1b22Smrg sparc*-*linux*) 4835beef1b22Smrg LD="${LD-ld} -m elf64_sparc" 4836beef1b22Smrg ;; 4837beef1b22Smrg esac 4838beef1b22Smrg ;; 4839beef1b22Smrg esac 4840beef1b22Smrg fi 4841beef1b22Smrg rm -rf conftest* 4842beef1b22Smrg ;; 4843beef1b22Smrg 4844beef1b22Smrg*-*-sco3.2v5*) 4845beef1b22Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4846beef1b22Smrg SAVE_CFLAGS=$CFLAGS 4847beef1b22Smrg CFLAGS="$CFLAGS -belf" 4848beef1b22Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4849beef1b22Smrg [AC_LANG_PUSH(C) 4850beef1b22Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4851beef1b22Smrg AC_LANG_POP]) 4852beef1b22Smrg if test yes != "$lt_cv_cc_needs_belf"; then 4853beef1b22Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4854beef1b22Smrg CFLAGS=$SAVE_CFLAGS 4855beef1b22Smrg fi 4856beef1b22Smrg ;; 4857beef1b22Smrg*-*solaris*) 4858beef1b22Smrg # Find out what ABI is being produced by ac_compile, and set linker 4859beef1b22Smrg # options accordingly. 4860beef1b22Smrg echo 'int i;' > conftest.$ac_ext 4861beef1b22Smrg if AC_TRY_EVAL(ac_compile); then 4862beef1b22Smrg case `$FILECMD conftest.o` in 4863beef1b22Smrg *64-bit*) 4864beef1b22Smrg case $lt_cv_prog_gnu_ld in 4865beef1b22Smrg yes*) 4866beef1b22Smrg case $host in 4867beef1b22Smrg i?86-*-solaris*|x86_64-*-solaris*) 4868beef1b22Smrg LD="${LD-ld} -m elf_x86_64" 4869beef1b22Smrg ;; 4870beef1b22Smrg sparc*-*-solaris*) 4871beef1b22Smrg LD="${LD-ld} -m elf64_sparc" 4872beef1b22Smrg ;; 4873beef1b22Smrg esac 4874beef1b22Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4875beef1b22Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4876beef1b22Smrg LD=${LD-ld}_sol2 4877beef1b22Smrg fi 4878beef1b22Smrg ;; 4879beef1b22Smrg *) 4880beef1b22Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4881beef1b22Smrg LD="${LD-ld} -64" 4882b12e5c03Smrg fi 4883beef1b22Smrg ;; 4884beef1b22Smrg esac 48857b58d2e0Smrg ;; 48867b58d2e0Smrg esac 48877b58d2e0Smrg fi 4888beef1b22Smrg rm -rf conftest* 48897b58d2e0Smrg ;; 48907b58d2e0Smrgesac 48917b58d2e0Smrg 4892beef1b22Smrgneed_locks=$enable_libtool_lock 4893beef1b22Smrg])# _LT_ENABLE_LOCK 48947b58d2e0Smrg 48957b58d2e0Smrg 4896beef1b22Smrg# _LT_PROG_AR 4897beef1b22Smrg# ----------- 4898beef1b22Smrgm4_defun([_LT_PROG_AR], 4899beef1b22Smrg[AC_CHECK_TOOLS(AR, [ar], false) 4900beef1b22Smrg: ${AR=ar} 4901beef1b22Smrg_LT_DECL([], [AR], [1], [The archiver]) 49027b58d2e0Smrg 4903beef1b22Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 4904beef1b22Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 4905beef1b22Smrg# higher priority because thats what people were doing historically (setting 4906beef1b22Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 4907beef1b22Smrg# variable obsoleted/removed. 49087b58d2e0Smrg 4909beef1b22Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 4910beef1b22Smrglt_ar_flags=$AR_FLAGS 4911beef1b22Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 49127b58d2e0Smrg 4913beef1b22Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 4914beef1b22Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 4915beef1b22Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 4916beef1b22Smrg [Flags to create an archive]) 49177b58d2e0Smrg 4918beef1b22SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4919beef1b22Smrg [lt_cv_ar_at_file=no 4920beef1b22Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4921beef1b22Smrg [echo conftest.$ac_objext > conftest.lst 4922beef1b22Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4923beef1b22Smrg AC_TRY_EVAL([lt_ar_try]) 4924beef1b22Smrg if test 0 -eq "$ac_status"; then 4925beef1b22Smrg # Ensure the archiver fails upon bogus file names. 4926beef1b22Smrg rm -f conftest.$ac_objext libconftest.a 4927beef1b22Smrg AC_TRY_EVAL([lt_ar_try]) 4928beef1b22Smrg if test 0 -ne "$ac_status"; then 4929beef1b22Smrg lt_cv_ar_at_file=@ 4930beef1b22Smrg fi 4931beef1b22Smrg fi 4932beef1b22Smrg rm -f conftest.* libconftest.a 4933beef1b22Smrg ]) 4934beef1b22Smrg ]) 49357b58d2e0Smrg 4936beef1b22Smrgif test no = "$lt_cv_ar_at_file"; then 4937beef1b22Smrg archiver_list_spec= 4938beef1b22Smrgelse 4939beef1b22Smrg archiver_list_spec=$lt_cv_ar_at_file 4940beef1b22Smrgfi 4941beef1b22Smrg_LT_DECL([], [archiver_list_spec], [1], 4942beef1b22Smrg [How to feed a file listing to the archiver]) 4943beef1b22Smrg])# _LT_PROG_AR 49447b58d2e0Smrg 49457b58d2e0Smrg 4946beef1b22Smrg# _LT_CMD_OLD_ARCHIVE 4947beef1b22Smrg# ------------------- 4948beef1b22Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 4949beef1b22Smrg[_LT_PROG_AR 49507b58d2e0Smrg 4951beef1b22SmrgAC_CHECK_TOOL(STRIP, strip, :) 4952beef1b22Smrgtest -z "$STRIP" && STRIP=: 4953beef1b22Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 49547b58d2e0Smrg 4955beef1b22SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 4956beef1b22Smrgtest -z "$RANLIB" && RANLIB=: 4957beef1b22Smrg_LT_DECL([], [RANLIB], [1], 4958beef1b22Smrg [Commands used to install an old-style archive]) 49597b58d2e0Smrg 4960beef1b22Smrg# Determine commands to create old-style static archives. 4961beef1b22Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4962beef1b22Smrgold_postinstall_cmds='chmod 644 $oldlib' 4963beef1b22Smrgold_postuninstall_cmds= 49647b58d2e0Smrg 4965beef1b22Smrgif test -n "$RANLIB"; then 4966beef1b22Smrg case $host_os in 4967beef1b22Smrg bitrig* | openbsd*) 4968beef1b22Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 49697b58d2e0Smrg ;; 4970beef1b22Smrg *) 4971beef1b22Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 4972beef1b22Smrg ;; 4973beef1b22Smrg esac 4974beef1b22Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 49757b58d2e0Smrgfi 4976beef1b22Smrg 4977beef1b22Smrgcase $host_os in 4978beef1b22Smrg darwin*) 4979beef1b22Smrg lock_old_archive_extraction=yes ;; 4980beef1b22Smrg *) 4981beef1b22Smrg lock_old_archive_extraction=no ;; 4982beef1b22Smrgesac 4983beef1b22Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 4984beef1b22Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 4985beef1b22Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 4986beef1b22Smrg [Commands used to build an old-style archive]) 4987beef1b22Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 4988beef1b22Smrg [Whether to use a lock for old archive extraction]) 4989beef1b22Smrg])# _LT_CMD_OLD_ARCHIVE 49907b58d2e0Smrg 49917b58d2e0Smrg 4992beef1b22Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4993beef1b22Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4994beef1b22Smrg# ---------------------------------------------------------------- 4995beef1b22Smrg# Check whether the given compiler option works 4996beef1b22SmrgAC_DEFUN([_LT_COMPILER_OPTION], 4997b12e5c03Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4998beef1b22Smrgm4_require([_LT_DECL_SED])dnl 4999beef1b22SmrgAC_CACHE_CHECK([$1], [$2], 5000beef1b22Smrg [$2=no 5001beef1b22Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 5002beef1b22Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5003beef1b22Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 5004beef1b22Smrg # Insert the option either (1) after the last *FLAGS variable, or 5005beef1b22Smrg # (2) before a word containing "conftest.", or (3) at the end. 5006beef1b22Smrg # Note that $ac_compile itself does not contain backslashes and begins 5007beef1b22Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5008beef1b22Smrg # The option is referenced via a variable to avoid confusing sed. 5009beef1b22Smrg lt_compile=`echo "$ac_compile" | $SED \ 5010beef1b22Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5011beef1b22Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5012beef1b22Smrg -e 's:$: $lt_compiler_flag:'` 5013beef1b22Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5014beef1b22Smrg (eval "$lt_compile" 2>conftest.err) 5015beef1b22Smrg ac_status=$? 5016beef1b22Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5017beef1b22Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5018beef1b22Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 5019beef1b22Smrg # The compiler can only warn and ignore the option if not recognized 5020beef1b22Smrg # So say no if there are warnings other than the usual output. 5021beef1b22Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5022beef1b22Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5023beef1b22Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5024beef1b22Smrg $2=yes 5025beef1b22Smrg fi 5026beef1b22Smrg fi 5027beef1b22Smrg $RM conftest* 5028beef1b22Smrg]) 5029beef1b22Smrg 5030beef1b22Smrgif test yes = "[$]$2"; then 5031beef1b22Smrg m4_if([$5], , :, [$5]) 5032b12e5c03Smrgelse 5033beef1b22Smrg m4_if([$6], , :, [$6]) 5034b12e5c03Smrgfi 5035beef1b22Smrg])# _LT_COMPILER_OPTION 50367b58d2e0Smrg 5037beef1b22Smrg# Old name: 5038beef1b22SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5039beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 5040beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 50417b58d2e0Smrg 50427b58d2e0Smrg 5043beef1b22Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5044beef1b22Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 5045beef1b22Smrg# ---------------------------------------------------- 5046beef1b22Smrg# Check whether the given linker option works 5047beef1b22SmrgAC_DEFUN([_LT_LINKER_OPTION], 5048beef1b22Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5049beef1b22Smrgm4_require([_LT_DECL_SED])dnl 5050beef1b22SmrgAC_CACHE_CHECK([$1], [$2], 5051beef1b22Smrg [$2=no 5052beef1b22Smrg save_LDFLAGS=$LDFLAGS 5053beef1b22Smrg LDFLAGS="$LDFLAGS $3" 5054beef1b22Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 5055beef1b22Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5056beef1b22Smrg # The linker can only warn and ignore the option if not recognized 5057beef1b22Smrg # So say no if there are warnings 5058beef1b22Smrg if test -s conftest.err; then 5059beef1b22Smrg # Append any errors to the config.log. 5060beef1b22Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 5061beef1b22Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5062beef1b22Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5063beef1b22Smrg if diff conftest.exp conftest.er2 >/dev/null; then 5064beef1b22Smrg $2=yes 5065beef1b22Smrg fi 5066beef1b22Smrg else 5067beef1b22Smrg $2=yes 5068beef1b22Smrg fi 5069beef1b22Smrg fi 5070beef1b22Smrg $RM -r conftest* 5071beef1b22Smrg LDFLAGS=$save_LDFLAGS 5072beef1b22Smrg]) 50737b58d2e0Smrg 5074beef1b22Smrgif test yes = "[$]$2"; then 5075beef1b22Smrg m4_if([$4], , :, [$4]) 5076beef1b22Smrgelse 5077beef1b22Smrg m4_if([$5], , :, [$5]) 5078beef1b22Smrgfi 5079beef1b22Smrg])# _LT_LINKER_OPTION 50802ec8c4b4Smrg 5081beef1b22Smrg# Old name: 5082beef1b22SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5083beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 5084beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 50857b58d2e0Smrg 50867b58d2e0Smrg 5087beef1b22Smrg# LT_CMD_MAX_LEN 5088beef1b22Smrg#--------------- 5089beef1b22SmrgAC_DEFUN([LT_CMD_MAX_LEN], 5090beef1b22Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5091beef1b22Smrg# find the maximum length of command line arguments 5092beef1b22SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5093beef1b22SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5094beef1b22Smrg i=0 5095beef1b22Smrg teststring=ABCD 50967b58d2e0Smrg 5097beef1b22Smrg case $build_os in 5098beef1b22Smrg msdosdjgpp*) 5099beef1b22Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5100beef1b22Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5101beef1b22Smrg # during glob expansion). Even if it were fixed, the result of this 5102beef1b22Smrg # check would be larger than it should be. 5103beef1b22Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5104beef1b22Smrg ;; 51057b58d2e0Smrg 5106beef1b22Smrg gnu*) 5107beef1b22Smrg # Under GNU Hurd, this test is not required because there is 5108beef1b22Smrg # no limit to the length of command line arguments. 5109beef1b22Smrg # Libtool will interpret -1 as no limit whatsoever 5110beef1b22Smrg lt_cv_sys_max_cmd_len=-1; 5111beef1b22Smrg ;; 51127b58d2e0Smrg 5113beef1b22Smrg cygwin* | mingw* | cegcc*) 5114beef1b22Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5115beef1b22Smrg # about 5 minutes as the teststring grows exponentially. 5116beef1b22Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 5117beef1b22Smrg # you end up with a "frozen" computer, even though with patience 5118beef1b22Smrg # the test eventually succeeds (with a max line length of 256k). 5119beef1b22Smrg # Instead, let's just punt: use the minimum linelength reported by 5120beef1b22Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 5121beef1b22Smrg lt_cv_sys_max_cmd_len=8192; 5122beef1b22Smrg ;; 51237b58d2e0Smrg 5124beef1b22Smrg mint*) 5125beef1b22Smrg # On MiNT this can take a long time and run out of memory. 5126beef1b22Smrg lt_cv_sys_max_cmd_len=8192; 5127beef1b22Smrg ;; 51287b58d2e0Smrg 5129beef1b22Smrg amigaos*) 5130beef1b22Smrg # On AmigaOS with pdksh, this test takes hours, literally. 5131beef1b22Smrg # So we just punt and use a minimum line length of 8192. 5132beef1b22Smrg lt_cv_sys_max_cmd_len=8192; 5133beef1b22Smrg ;; 51342ec8c4b4Smrg 5135beef1b22Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5136beef1b22Smrg # This has been around since 386BSD, at least. Likely further. 5137beef1b22Smrg if test -x /sbin/sysctl; then 5138beef1b22Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5139beef1b22Smrg elif test -x /usr/sbin/sysctl; then 5140beef1b22Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5141beef1b22Smrg else 5142beef1b22Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5143beef1b22Smrg fi 5144beef1b22Smrg # And add a safety zone 5145beef1b22Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5146beef1b22Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5147beef1b22Smrg ;; 5148beef1b22Smrg 5149beef1b22Smrg interix*) 5150beef1b22Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5151beef1b22Smrg lt_cv_sys_max_cmd_len=196608 5152beef1b22Smrg ;; 5153beef1b22Smrg 5154beef1b22Smrg os2*) 5155beef1b22Smrg # The test takes a long time on OS/2. 5156beef1b22Smrg lt_cv_sys_max_cmd_len=8192 5157beef1b22Smrg ;; 51587b58d2e0Smrg 5159beef1b22Smrg osf*) 5160beef1b22Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5161beef1b22Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5162beef1b22Smrg # nice to cause kernel panics so lets avoid the loop below. 5163beef1b22Smrg # First set a reasonable default. 5164beef1b22Smrg lt_cv_sys_max_cmd_len=16384 5165beef1b22Smrg # 5166beef1b22Smrg if test -x /sbin/sysconfig; then 5167beef1b22Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5168beef1b22Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5169beef1b22Smrg esac 5170beef1b22Smrg fi 5171beef1b22Smrg ;; 5172beef1b22Smrg sco3.2v5*) 5173beef1b22Smrg lt_cv_sys_max_cmd_len=102400 5174beef1b22Smrg ;; 5175beef1b22Smrg sysv5* | sco5v6* | sysv4.2uw2*) 5176beef1b22Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5177beef1b22Smrg if test -n "$kargmax"; then 5178beef1b22Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 51797b58d2e0Smrg else 5180beef1b22Smrg lt_cv_sys_max_cmd_len=32768 5181beef1b22Smrg fi 5182beef1b22Smrg ;; 5183beef1b22Smrg *) 5184beef1b22Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5185beef1b22Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5186beef1b22Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5187beef1b22Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5188beef1b22Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5189beef1b22Smrg else 5190beef1b22Smrg # Make teststring a little bigger before we do anything with it. 5191beef1b22Smrg # a 1K string should be a reasonable start. 5192beef1b22Smrg for i in 1 2 3 4 5 6 7 8; do 5193beef1b22Smrg teststring=$teststring$teststring 5194beef1b22Smrg done 5195beef1b22Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5196beef1b22Smrg # If test is not a shell built-in, we'll probably end up computing a 5197beef1b22Smrg # maximum length that is only half of the actual maximum length, but 5198beef1b22Smrg # we can't tell. 5199beef1b22Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5200beef1b22Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5201beef1b22Smrg test 17 != "$i" # 1/2 MB should be enough 5202beef1b22Smrg do 5203beef1b22Smrg i=`expr $i + 1` 5204beef1b22Smrg teststring=$teststring$teststring 5205beef1b22Smrg done 5206beef1b22Smrg # Only check the string length outside the loop. 5207beef1b22Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5208beef1b22Smrg teststring= 5209beef1b22Smrg # Add a significant safety factor because C++ compilers can tack on 5210beef1b22Smrg # massive amounts of additional arguments before passing them to the 5211beef1b22Smrg # linker. It appears as though 1/2 is a usable value. 5212beef1b22Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 52137b58d2e0Smrg fi 5214beef1b22Smrg ;; 5215beef1b22Smrg esac 5216beef1b22Smrg]) 5217beef1b22Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 5218beef1b22Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5219beef1b22Smrgelse 5220beef1b22Smrg AC_MSG_RESULT(none) 5221beef1b22Smrgfi 5222beef1b22Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5223beef1b22Smrg_LT_DECL([], [max_cmd_len], [0], 5224beef1b22Smrg [What is the maximum length of a command?]) 5225beef1b22Smrg])# LT_CMD_MAX_LEN 52267b58d2e0Smrg 5227beef1b22Smrg# Old name: 5228beef1b22SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5229beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 5230beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 52312ec8c4b4Smrg 52322ec8c4b4Smrg 5233beef1b22Smrg# _LT_HEADER_DLFCN 5234beef1b22Smrg# ---------------- 5235beef1b22Smrgm4_defun([_LT_HEADER_DLFCN], 5236beef1b22Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5237beef1b22Smrg])# _LT_HEADER_DLFCN 52382ec8c4b4Smrg 5239e4f6584cSmrg 5240beef1b22Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5241beef1b22Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5242beef1b22Smrg# ---------------------------------------------------------------- 5243beef1b22Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 5244beef1b22Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5245beef1b22Smrgif test yes = "$cross_compiling"; then : 5246beef1b22Smrg [$4] 5247beef1b22Smrgelse 5248beef1b22Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5249beef1b22Smrg lt_status=$lt_dlunknown 5250beef1b22Smrg cat > conftest.$ac_ext <<_LT_EOF 5251beef1b22Smrg[#line $LINENO "configure" 5252beef1b22Smrg#include "confdefs.h" 52532ec8c4b4Smrg 5254beef1b22Smrg#if HAVE_DLFCN_H 5255beef1b22Smrg#include <dlfcn.h> 5256beef1b22Smrg#endif 5257beef1b22Smrg 5258beef1b22Smrg#include <stdio.h> 5259beef1b22Smrg 5260beef1b22Smrg#ifdef RTLD_GLOBAL 5261beef1b22Smrg# define LT_DLGLOBAL RTLD_GLOBAL 5262beef1b22Smrg#else 5263beef1b22Smrg# ifdef DL_GLOBAL 5264beef1b22Smrg# define LT_DLGLOBAL DL_GLOBAL 5265beef1b22Smrg# else 5266beef1b22Smrg# define LT_DLGLOBAL 0 5267beef1b22Smrg# endif 5268beef1b22Smrg#endif 52692ec8c4b4Smrg 5270beef1b22Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5271beef1b22Smrg find out it does not work in some platform. */ 5272beef1b22Smrg#ifndef LT_DLLAZY_OR_NOW 5273beef1b22Smrg# ifdef RTLD_LAZY 5274beef1b22Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5275beef1b22Smrg# else 5276beef1b22Smrg# ifdef DL_LAZY 5277beef1b22Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 5278beef1b22Smrg# else 5279beef1b22Smrg# ifdef RTLD_NOW 5280beef1b22Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5281beef1b22Smrg# else 5282beef1b22Smrg# ifdef DL_NOW 5283beef1b22Smrg# define LT_DLLAZY_OR_NOW DL_NOW 5284beef1b22Smrg# else 5285beef1b22Smrg# define LT_DLLAZY_OR_NOW 0 5286beef1b22Smrg# endif 5287beef1b22Smrg# endif 5288beef1b22Smrg# endif 5289beef1b22Smrg# endif 5290beef1b22Smrg#endif 52912ec8c4b4Smrg 5292beef1b22Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 5293beef1b22Smrg correspondingly for the symbols needed. */ 5294beef1b22Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5295beef1b22Smrgint fnord () __attribute__((visibility("default"))); 5296beef1b22Smrg#endif 5297e4f6584cSmrg 5298beef1b22Smrgint fnord () { return 42; } 5299beef1b22Smrgint main () 5300beef1b22Smrg{ 5301beef1b22Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5302beef1b22Smrg int status = $lt_dlunknown; 53032ec8c4b4Smrg 5304beef1b22Smrg if (self) 5305beef1b22Smrg { 5306beef1b22Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5307beef1b22Smrg else 5308beef1b22Smrg { 5309beef1b22Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5310beef1b22Smrg else puts (dlerror ()); 5311beef1b22Smrg } 5312beef1b22Smrg /* dlclose (self); */ 5313beef1b22Smrg } 5314beef1b22Smrg else 5315beef1b22Smrg puts (dlerror ()); 53162ec8c4b4Smrg 5317beef1b22Smrg return status; 5318beef1b22Smrg}] 5319beef1b22Smrg_LT_EOF 5320beef1b22Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5321beef1b22Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5322beef1b22Smrg lt_status=$? 5323beef1b22Smrg case x$lt_status in 5324beef1b22Smrg x$lt_dlno_uscore) $1 ;; 5325beef1b22Smrg x$lt_dlneed_uscore) $2 ;; 5326beef1b22Smrg x$lt_dlunknown|x*) $3 ;; 5327beef1b22Smrg esac 5328beef1b22Smrg else : 5329beef1b22Smrg # compilation failed 5330beef1b22Smrg $3 5331beef1b22Smrg fi 5332beef1b22Smrgfi 5333beef1b22Smrgrm -fr conftest* 5334beef1b22Smrg])# _LT_TRY_DLOPEN_SELF 5335b12e5c03Smrg 53362ec8c4b4Smrg 5337beef1b22Smrg# LT_SYS_DLOPEN_SELF 5338beef1b22Smrg# ------------------ 5339beef1b22SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5340beef1b22Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5341beef1b22Smrgif test yes != "$enable_dlopen"; then 5342beef1b22Smrg enable_dlopen=unknown 5343beef1b22Smrg enable_dlopen_self=unknown 5344beef1b22Smrg enable_dlopen_self_static=unknown 5345beef1b22Smrgelse 5346beef1b22Smrg lt_cv_dlopen=no 5347beef1b22Smrg lt_cv_dlopen_libs= 5348beef1b22Smrg 5349beef1b22Smrg case $host_os in 5350beef1b22Smrg beos*) 5351beef1b22Smrg lt_cv_dlopen=load_add_on 5352beef1b22Smrg lt_cv_dlopen_libs= 5353beef1b22Smrg lt_cv_dlopen_self=yes 5354beef1b22Smrg ;; 5355f395c03eSmrg 5356beef1b22Smrg mingw* | pw32* | cegcc*) 5357beef1b22Smrg lt_cv_dlopen=LoadLibrary 5358beef1b22Smrg lt_cv_dlopen_libs= 5359beef1b22Smrg ;; 53602ec8c4b4Smrg 5361beef1b22Smrg cygwin*) 5362beef1b22Smrg lt_cv_dlopen=dlopen 5363beef1b22Smrg lt_cv_dlopen_libs= 5364beef1b22Smrg ;; 53657b58d2e0Smrg 5366beef1b22Smrg darwin*) 5367beef1b22Smrg # if libdl is installed we need to link against it 5368beef1b22Smrg AC_CHECK_LIB([dl], [dlopen], 5369beef1b22Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5370beef1b22Smrg lt_cv_dlopen=dyld 5371beef1b22Smrg lt_cv_dlopen_libs= 5372beef1b22Smrg lt_cv_dlopen_self=yes 5373beef1b22Smrg ]) 5374beef1b22Smrg ;; 53757b58d2e0Smrg 5376beef1b22Smrg tpf*) 5377beef1b22Smrg # Don't try to run any link tests for TPF. We know it's impossible 5378beef1b22Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 5379beef1b22Smrg lt_cv_dlopen=dlopen 5380beef1b22Smrg lt_cv_dlopen_libs= 5381beef1b22Smrg lt_cv_dlopen_self=no 5382beef1b22Smrg ;; 53837b58d2e0Smrg 5384beef1b22Smrg *) 5385beef1b22Smrg AC_CHECK_FUNC([shl_load], 5386beef1b22Smrg [lt_cv_dlopen=shl_load], 5387beef1b22Smrg [AC_CHECK_LIB([dld], [shl_load], 5388beef1b22Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5389beef1b22Smrg [AC_CHECK_FUNC([dlopen], 5390beef1b22Smrg [lt_cv_dlopen=dlopen], 5391beef1b22Smrg [AC_CHECK_LIB([dl], [dlopen], 5392beef1b22Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5393beef1b22Smrg [AC_CHECK_LIB([svld], [dlopen], 5394beef1b22Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5395beef1b22Smrg [AC_CHECK_LIB([dld], [dld_link], 5396beef1b22Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5397beef1b22Smrg ]) 5398beef1b22Smrg ]) 5399beef1b22Smrg ]) 5400beef1b22Smrg ]) 5401beef1b22Smrg ]) 5402beef1b22Smrg ;; 5403beef1b22Smrg esac 5404b12e5c03Smrg 5405beef1b22Smrg if test no = "$lt_cv_dlopen"; then 5406beef1b22Smrg enable_dlopen=no 5407beef1b22Smrg else 5408beef1b22Smrg enable_dlopen=yes 5409beef1b22Smrg fi 54107b58d2e0Smrg 5411beef1b22Smrg case $lt_cv_dlopen in 5412beef1b22Smrg dlopen) 5413beef1b22Smrg save_CPPFLAGS=$CPPFLAGS 5414beef1b22Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 54152ec8c4b4Smrg 5416beef1b22Smrg save_LDFLAGS=$LDFLAGS 5417beef1b22Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5418e4f6584cSmrg 5419beef1b22Smrg save_LIBS=$LIBS 5420beef1b22Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 5421e4f6584cSmrg 5422beef1b22Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 5423beef1b22Smrg lt_cv_dlopen_self, [dnl 5424beef1b22Smrg _LT_TRY_DLOPEN_SELF( 5425beef1b22Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5426beef1b22Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5427beef1b22Smrg ]) 54282ec8c4b4Smrg 5429beef1b22Smrg if test yes = "$lt_cv_dlopen_self"; then 5430beef1b22Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5431beef1b22Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5432beef1b22Smrg lt_cv_dlopen_self_static, [dnl 5433beef1b22Smrg _LT_TRY_DLOPEN_SELF( 5434beef1b22Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5435beef1b22Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5436beef1b22Smrg ]) 5437beef1b22Smrg fi 54382ec8c4b4Smrg 5439beef1b22Smrg CPPFLAGS=$save_CPPFLAGS 5440beef1b22Smrg LDFLAGS=$save_LDFLAGS 5441beef1b22Smrg LIBS=$save_LIBS 5442beef1b22Smrg ;; 5443beef1b22Smrg esac 54442ec8c4b4Smrg 5445beef1b22Smrg case $lt_cv_dlopen_self in 5446beef1b22Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5447beef1b22Smrg *) enable_dlopen_self=unknown ;; 5448beef1b22Smrg esac 54492ec8c4b4Smrg 5450beef1b22Smrg case $lt_cv_dlopen_self_static in 5451beef1b22Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5452beef1b22Smrg *) enable_dlopen_self_static=unknown ;; 5453beef1b22Smrg esac 5454beef1b22Smrgfi 5455beef1b22Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 5456beef1b22Smrg [Whether dlopen is supported]) 5457beef1b22Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5458beef1b22Smrg [Whether dlopen of programs is supported]) 5459beef1b22Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5460beef1b22Smrg [Whether dlopen of statically linked programs is supported]) 5461beef1b22Smrg])# LT_SYS_DLOPEN_SELF 54622ec8c4b4Smrg 5463beef1b22Smrg# Old name: 5464beef1b22SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5465beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 5466beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 54672ec8c4b4Smrg 54682ec8c4b4Smrg 5469beef1b22Smrg# _LT_COMPILER_C_O([TAGNAME]) 5470beef1b22Smrg# --------------------------- 5471beef1b22Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 5472beef1b22Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5473beef1b22Smrgm4_defun([_LT_COMPILER_C_O], 5474beef1b22Smrg[m4_require([_LT_DECL_SED])dnl 5475beef1b22Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5476beef1b22Smrgm4_require([_LT_TAG_COMPILER])dnl 5477beef1b22SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5478beef1b22Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5479beef1b22Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5480beef1b22Smrg $RM -r conftest 2>/dev/null 5481beef1b22Smrg mkdir conftest 5482beef1b22Smrg cd conftest 5483beef1b22Smrg mkdir out 5484beef1b22Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 54852ec8c4b4Smrg 5486beef1b22Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 5487beef1b22Smrg # Insert the option either (1) after the last *FLAGS variable, or 5488beef1b22Smrg # (2) before a word containing "conftest.", or (3) at the end. 5489beef1b22Smrg # Note that $ac_compile itself does not contain backslashes and begins 5490beef1b22Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5491beef1b22Smrg lt_compile=`echo "$ac_compile" | $SED \ 5492beef1b22Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5493beef1b22Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5494beef1b22Smrg -e 's:$: $lt_compiler_flag:'` 5495beef1b22Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5496beef1b22Smrg (eval "$lt_compile" 2>out/conftest.err) 5497beef1b22Smrg ac_status=$? 5498beef1b22Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 5499beef1b22Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5500beef1b22Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 5501beef1b22Smrg then 5502beef1b22Smrg # The compiler can only warn and ignore the option if not recognized 5503beef1b22Smrg # So say no if there are warnings 5504beef1b22Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5505beef1b22Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5506beef1b22Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5507beef1b22Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5508beef1b22Smrg fi 5509beef1b22Smrg fi 5510beef1b22Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 5511beef1b22Smrg $RM conftest* 5512beef1b22Smrg # SGI C++ compiler will create directory out/ii_files/ for 5513beef1b22Smrg # template instantiation 5514beef1b22Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5515beef1b22Smrg $RM out/* && rmdir out 5516beef1b22Smrg cd .. 5517beef1b22Smrg $RM -r conftest 5518beef1b22Smrg $RM conftest* 5519beef1b22Smrg]) 5520beef1b22Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5521beef1b22Smrg [Does compiler simultaneously support -c and -o options?]) 5522beef1b22Smrg])# _LT_COMPILER_C_O 55232ec8c4b4Smrg 5524e4f6584cSmrg 5525beef1b22Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5526beef1b22Smrg# ---------------------------------- 5527beef1b22Smrg# Check to see if we can do hard links to lock some files if needed 5528beef1b22Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 5529beef1b22Smrg[m4_require([_LT_ENABLE_LOCK])dnl 5530beef1b22Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5531beef1b22Smrg_LT_COMPILER_C_O([$1]) 553209885543Smrg 5533beef1b22Smrghard_links=nottested 5534beef1b22Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5535beef1b22Smrg # do not overwrite the value of need_locks provided by the user 5536beef1b22Smrg AC_MSG_CHECKING([if we can lock with hard links]) 5537beef1b22Smrg hard_links=yes 5538beef1b22Smrg $RM conftest* 5539beef1b22Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5540beef1b22Smrg touch conftest.a 5541beef1b22Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 5542beef1b22Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5543beef1b22Smrg AC_MSG_RESULT([$hard_links]) 5544beef1b22Smrg if test no = "$hard_links"; then 5545beef1b22Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5546beef1b22Smrg need_locks=warn 5547beef1b22Smrg fi 5548beef1b22Smrgelse 5549beef1b22Smrg need_locks=no 5550beef1b22Smrgfi 5551beef1b22Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5552beef1b22Smrg])# _LT_COMPILER_FILE_LOCKS 555309885543Smrg 555409885543Smrg 5555beef1b22Smrg# _LT_CHECK_OBJDIR 5556beef1b22Smrg# ---------------- 5557beef1b22Smrgm4_defun([_LT_CHECK_OBJDIR], 5558beef1b22Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5559beef1b22Smrg[rm -f .libs 2>/dev/null 5560beef1b22Smrgmkdir .libs 2>/dev/null 5561beef1b22Smrgif test -d .libs; then 5562beef1b22Smrg lt_cv_objdir=.libs 5563beef1b22Smrgelse 5564beef1b22Smrg # MS-DOS does not allow filenames that begin with a dot. 5565beef1b22Smrg lt_cv_objdir=_libs 5566beef1b22Smrgfi 5567beef1b22Smrgrmdir .libs 2>/dev/null]) 5568beef1b22Smrgobjdir=$lt_cv_objdir 5569beef1b22Smrg_LT_DECL([], [objdir], [0], 5570beef1b22Smrg [The name of the directory that contains temporary libtool files])dnl 5571beef1b22Smrgm4_pattern_allow([LT_OBJDIR])dnl 5572beef1b22SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5573beef1b22Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 5574beef1b22Smrg])# _LT_CHECK_OBJDIR 5575beef1b22Smrg 5576e4f6584cSmrg 5577beef1b22Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5578beef1b22Smrg# -------------------------------------- 5579beef1b22Smrg# Check hardcoding attributes. 5580beef1b22Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5581beef1b22Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5582beef1b22Smrg_LT_TAGVAR(hardcode_action, $1)= 5583beef1b22Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5584beef1b22Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 5585beef1b22Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 558609885543Smrg 5587beef1b22Smrg # We can hardcode non-existent directories. 5588beef1b22Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5589beef1b22Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 5590beef1b22Smrg # have to relink, otherwise we might link with an installed library 5591beef1b22Smrg # when we should be linking with a yet-to-be-installed one 5592beef1b22Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5593beef1b22Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5594beef1b22Smrg # Linking always hardcodes the temporary library directory. 5595beef1b22Smrg _LT_TAGVAR(hardcode_action, $1)=relink 5596beef1b22Smrg else 5597beef1b22Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 5598beef1b22Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 5599beef1b22Smrg fi 5600beef1b22Smrgelse 5601beef1b22Smrg # We cannot hardcode anything, or else we can only hardcode existing 5602beef1b22Smrg # directories. 5603beef1b22Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 5604beef1b22Smrgfi 5605beef1b22SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 560609885543Smrg 5607beef1b22Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5608beef1b22Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5609beef1b22Smrg # Fast installation is not supported 5610beef1b22Smrg enable_fast_install=no 5611beef1b22Smrgelif test yes = "$shlibpath_overrides_runpath" || 5612beef1b22Smrg test no = "$enable_shared"; then 5613beef1b22Smrg # Fast installation is not necessary 5614beef1b22Smrg enable_fast_install=needless 5615beef1b22Smrgfi 5616beef1b22Smrg_LT_TAGDECL([], [hardcode_action], [0], 5617beef1b22Smrg [How to hardcode a shared library path into an executable]) 5618beef1b22Smrg])# _LT_LINKER_HARDCODE_LIBPATH 561909885543Smrg 562009885543Smrg 5621beef1b22Smrg# _LT_CMD_STRIPLIB 5622beef1b22Smrg# ---------------- 5623beef1b22Smrgm4_defun([_LT_CMD_STRIPLIB], 5624beef1b22Smrg[m4_require([_LT_DECL_EGREP]) 5625beef1b22Smrgstriplib= 5626beef1b22Smrgold_striplib= 5627beef1b22SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 5628beef1b22Smrgif test -z "$STRIP"; then 5629beef1b22Smrg AC_MSG_RESULT([no]) 5630beef1b22Smrgelse 5631beef1b22Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5632beef1b22Smrg old_striplib="$STRIP --strip-debug" 5633beef1b22Smrg striplib="$STRIP --strip-unneeded" 5634beef1b22Smrg AC_MSG_RESULT([yes]) 5635beef1b22Smrg else 5636beef1b22Smrg case $host_os in 5637beef1b22Smrg darwin*) 5638beef1b22Smrg # FIXME - insert some real tests, host_os isn't really good enough 5639beef1b22Smrg striplib="$STRIP -x" 5640beef1b22Smrg old_striplib="$STRIP -S" 5641beef1b22Smrg AC_MSG_RESULT([yes]) 5642beef1b22Smrg ;; 5643beef1b22Smrg freebsd*) 5644beef1b22Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5645beef1b22Smrg old_striplib="$STRIP --strip-debug" 5646beef1b22Smrg striplib="$STRIP --strip-unneeded" 5647beef1b22Smrg AC_MSG_RESULT([yes]) 5648beef1b22Smrg else 5649beef1b22Smrg AC_MSG_RESULT([no]) 5650beef1b22Smrg fi 5651beef1b22Smrg ;; 5652beef1b22Smrg *) 5653beef1b22Smrg AC_MSG_RESULT([no]) 5654beef1b22Smrg ;; 5655beef1b22Smrg esac 5656beef1b22Smrg fi 5657beef1b22Smrgfi 5658beef1b22Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5659beef1b22Smrg_LT_DECL([], [striplib], [1]) 5660beef1b22Smrg])# _LT_CMD_STRIPLIB 566109885543Smrg 566209885543Smrg 5663beef1b22Smrg# _LT_PREPARE_MUNGE_PATH_LIST 5664beef1b22Smrg# --------------------------- 5665beef1b22Smrg# Make sure func_munge_path_list() is defined correctly. 5666beef1b22Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5667beef1b22Smrg[[# func_munge_path_list VARIABLE PATH 5668beef1b22Smrg# ----------------------------------- 5669beef1b22Smrg# VARIABLE is name of variable containing _space_ separated list of 5670beef1b22Smrg# directories to be munged by the contents of PATH, which is string 5671beef1b22Smrg# having a format: 5672beef1b22Smrg# "DIR[:DIR]:" 5673beef1b22Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 5674beef1b22Smrg# ":DIR[:DIR]" 5675beef1b22Smrg# string "DIR[ DIR]" will be appended to VARIABLE 5676beef1b22Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 5677beef1b22Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5678beef1b22Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 5679beef1b22Smrg# "DIR[:DIR]" 5680beef1b22Smrg# VARIABLE will be replaced by "DIR[ DIR]" 5681beef1b22Smrgfunc_munge_path_list () 5682beef1b22Smrg{ 5683beef1b22Smrg case x@S|@2 in 5684beef1b22Smrg x) 5685beef1b22Smrg ;; 5686beef1b22Smrg *:) 5687beef1b22Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5688beef1b22Smrg ;; 5689beef1b22Smrg x:*) 5690beef1b22Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5691beef1b22Smrg ;; 5692beef1b22Smrg *::*) 5693beef1b22Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5694beef1b22Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5695beef1b22Smrg ;; 5696beef1b22Smrg *) 5697beef1b22Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5698beef1b22Smrg ;; 5699beef1b22Smrg esac 5700beef1b22Smrg} 5701beef1b22Smrg]])# _LT_PREPARE_PATH_LIST 570209885543Smrg 570309885543Smrg 5704beef1b22Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 5705beef1b22Smrg# ----------------------------- 5706beef1b22Smrg# PORTME Fill in your ld.so characteristics 5707beef1b22Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 5708beef1b22Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5709beef1b22Smrgm4_require([_LT_DECL_EGREP])dnl 5710beef1b22Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5711beef1b22Smrgm4_require([_LT_DECL_OBJDUMP])dnl 5712beef1b22Smrgm4_require([_LT_DECL_SED])dnl 5713beef1b22Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 5714beef1b22Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5715beef1b22SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 5716beef1b22Smrgm4_if([$1], 5717beef1b22Smrg [], [ 5718beef1b22Smrgif test yes = "$GCC"; then 5719beef1b22Smrg case $host_os in 5720beef1b22Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5721beef1b22Smrg *) lt_awk_arg='/^libraries:/' ;; 5722beef1b22Smrg esac 5723beef1b22Smrg case $host_os in 5724beef1b22Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5725beef1b22Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 5726beef1b22Smrg esac 5727beef1b22Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5728beef1b22Smrg case $lt_search_path_spec in 5729beef1b22Smrg *\;*) 5730beef1b22Smrg # if the path contains ";" then we assume it to be the separator 5731beef1b22Smrg # otherwise default to the standard path separator (i.e. ":") - it is 5732beef1b22Smrg # assumed that no part of a normal pathname contains ";" but that should 5733beef1b22Smrg # okay in the real world where ";" in dirpaths is itself problematic. 5734beef1b22Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5735beef1b22Smrg ;; 5736beef1b22Smrg *) 5737beef1b22Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5738beef1b22Smrg ;; 5739beef1b22Smrg esac 5740beef1b22Smrg # Ok, now we have the path, separated by spaces, we can step through it 5741beef1b22Smrg # and add multilib dir if necessary... 5742beef1b22Smrg lt_tmp_lt_search_path_spec= 5743beef1b22Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5744beef1b22Smrg # ...but if some path component already ends with the multilib dir we assume 5745beef1b22Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5746beef1b22Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 5747beef1b22Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5748beef1b22Smrg lt_multi_os_dir= 5749beef1b22Smrg ;; 5750beef1b22Smrg esac 5751beef1b22Smrg for lt_sys_path in $lt_search_path_spec; do 5752beef1b22Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 5753beef1b22Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5754beef1b22Smrg elif test -n "$lt_multi_os_dir"; then 5755beef1b22Smrg test -d "$lt_sys_path" && \ 5756beef1b22Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5757beef1b22Smrg fi 5758beef1b22Smrg done 5759beef1b22Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5760beef1b22SmrgBEGIN {RS = " "; FS = "/|\n";} { 5761beef1b22Smrg lt_foo = ""; 5762beef1b22Smrg lt_count = 0; 5763beef1b22Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 5764beef1b22Smrg if ($lt_i != "" && $lt_i != ".") { 5765beef1b22Smrg if ($lt_i == "..") { 5766beef1b22Smrg lt_count++; 5767beef1b22Smrg } else { 5768beef1b22Smrg if (lt_count == 0) { 5769beef1b22Smrg lt_foo = "/" $lt_i lt_foo; 5770beef1b22Smrg } else { 5771beef1b22Smrg lt_count--; 5772beef1b22Smrg } 5773beef1b22Smrg } 5774beef1b22Smrg } 5775beef1b22Smrg } 5776beef1b22Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5777beef1b22Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5778beef1b22Smrg}'` 5779beef1b22Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 5780beef1b22Smrg # for these hosts. 5781beef1b22Smrg case $host_os in 5782beef1b22Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5783beef1b22Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5784beef1b22Smrg esac 5785beef1b22Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5786beef1b22Smrgelse 5787beef1b22Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5788beef1b22Smrgfi]) 5789beef1b22Smrglibrary_names_spec= 5790beef1b22Smrglibname_spec='lib$name' 5791beef1b22Smrgsoname_spec= 5792beef1b22Smrgshrext_cmds=.so 5793beef1b22Smrgpostinstall_cmds= 5794beef1b22Smrgpostuninstall_cmds= 5795beef1b22Smrgfinish_cmds= 5796beef1b22Smrgfinish_eval= 5797beef1b22Smrgshlibpath_var= 5798beef1b22Smrgshlibpath_overrides_runpath=unknown 5799beef1b22Smrgversion_type=none 5800beef1b22Smrgdynamic_linker="$host_os ld.so" 5801beef1b22Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 5802beef1b22Smrgneed_lib_prefix=unknown 5803beef1b22Smrghardcode_into_libs=no 5804beef1b22Smrg 5805beef1b22Smrg# when you set need_version to no, make sure it does not cause -set_version 5806beef1b22Smrg# flags to be left without arguments 5807beef1b22Smrgneed_version=unknown 5808e4f6584cSmrg 5809beef1b22SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5810beef1b22Smrg[User-defined run-time library search path.]) 581109885543Smrg 5812beef1b22Smrgcase $host_os in 5813beef1b22Smrgaix3*) 5814beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 5815beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5816beef1b22Smrg shlibpath_var=LIBPATH 58172ec8c4b4Smrg 5818beef1b22Smrg # AIX 3 has no versioning support, so we append a major version to the name. 5819beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 5820beef1b22Smrg ;; 58212ec8c4b4Smrg 5822beef1b22Smrgaix[[4-9]]*) 5823beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 5824beef1b22Smrg need_lib_prefix=no 5825beef1b22Smrg need_version=no 5826beef1b22Smrg hardcode_into_libs=yes 5827beef1b22Smrg if test ia64 = "$host_cpu"; then 5828beef1b22Smrg # AIX 5 supports IA64 5829beef1b22Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5830beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 5831beef1b22Smrg else 5832beef1b22Smrg # With GCC up to 2.95.x, collect2 would create an import file 5833beef1b22Smrg # for dependence libraries. The import file would start with 5834beef1b22Smrg # the line '#! .'. This would cause the generated library to 5835beef1b22Smrg # depend on '.', always an invalid library. This was fixed in 5836beef1b22Smrg # development snapshots of GCC prior to 3.0. 5837beef1b22Smrg case $host_os in 5838beef1b22Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 5839beef1b22Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5840beef1b22Smrg echo ' yes ' 5841beef1b22Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5842beef1b22Smrg : 5843beef1b22Smrg else 5844beef1b22Smrg can_build_shared=no 5845beef1b22Smrg fi 5846beef1b22Smrg ;; 5847beef1b22Smrg esac 5848beef1b22Smrg # Using Import Files as archive members, it is possible to support 5849beef1b22Smrg # filename-based versioning of shared library archives on AIX. While 5850beef1b22Smrg # this would work for both with and without runtime linking, it will 5851beef1b22Smrg # prevent static linking of such archives. So we do filename-based 5852beef1b22Smrg # shared library versioning with .so extension only, which is used 5853beef1b22Smrg # when both runtime linking and shared linking is enabled. 5854beef1b22Smrg # Unfortunately, runtime linking may impact performance, so we do 5855beef1b22Smrg # not want this to be the default eventually. Also, we use the 5856beef1b22Smrg # versioned .so libs for executables only if there is the -brtl 5857beef1b22Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5858beef1b22Smrg # To allow for filename-based versioning support, we need to create 5859beef1b22Smrg # libNAME.so.V as an archive file, containing: 5860beef1b22Smrg # *) an Import File, referring to the versioned filename of the 5861beef1b22Smrg # archive as well as the shared archive member, telling the 5862beef1b22Smrg # bitwidth (32 or 64) of that shared object, and providing the 5863beef1b22Smrg # list of exported symbols of that shared object, eventually 5864beef1b22Smrg # decorated with the 'weak' keyword 5865beef1b22Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 5866beef1b22Smrg # it being seen by the linker. 5867beef1b22Smrg # At run time we better use the real file rather than another symlink, 5868beef1b22Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5869e4f6584cSmrg 5870beef1b22Smrg case $with_aix_soname,$aix_use_runtimelinking in 5871beef1b22Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5872beef1b22Smrg # soname into executable. Probably we can add versioning support to 5873beef1b22Smrg # collect2, so additional links can be useful in future. 5874beef1b22Smrg aix,yes) # traditional libtool 5875beef1b22Smrg dynamic_linker='AIX unversionable lib.so' 5876beef1b22Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5877beef1b22Smrg # instead of lib<name>.a to let people know that these are not 5878beef1b22Smrg # typical AIX shared libraries. 5879beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5880beef1b22Smrg ;; 5881beef1b22Smrg aix,no) # traditional AIX only 5882beef1b22Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5883beef1b22Smrg # We preserve .a as extension for shared libraries through AIX4.2 5884beef1b22Smrg # and later when we are not doing run time linking. 5885beef1b22Smrg library_names_spec='$libname$release.a $libname.a' 5886beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 5887beef1b22Smrg ;; 5888beef1b22Smrg svr4,*) # full svr4 only 5889beef1b22Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5890beef1b22Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5891beef1b22Smrg # We do not specify a path in Import Files, so LIBPATH fires. 5892beef1b22Smrg shlibpath_overrides_runpath=yes 5893beef1b22Smrg ;; 5894beef1b22Smrg *,yes) # both, prefer svr4 5895beef1b22Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 5896beef1b22Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5897beef1b22Smrg # unpreferred sharedlib libNAME.a needs extra handling 5898beef1b22Smrg 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"' 5899beef1b22Smrg 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"' 5900beef1b22Smrg # We do not specify a path in Import Files, so LIBPATH fires. 5901beef1b22Smrg shlibpath_overrides_runpath=yes 5902beef1b22Smrg ;; 5903beef1b22Smrg *,no) # both, prefer aix 5904beef1b22Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 5905beef1b22Smrg library_names_spec='$libname$release.a $libname.a' 5906beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 5907beef1b22Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 5908beef1b22Smrg 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)' 5909beef1b22Smrg 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"' 5910beef1b22Smrg ;; 5911beef1b22Smrg esac 5912beef1b22Smrg shlibpath_var=LIBPATH 5913beef1b22Smrg fi 5914beef1b22Smrg ;; 59157b58d2e0Smrg 5916beef1b22Smrgamigaos*) 5917beef1b22Smrg case $host_cpu in 5918beef1b22Smrg powerpc) 5919beef1b22Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 5920beef1b22Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5921beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5922beef1b22Smrg ;; 5923beef1b22Smrg m68k) 5924beef1b22Smrg library_names_spec='$libname.ixlibrary $libname.a' 5925beef1b22Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 5926beef1b22Smrg 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' 5927beef1b22Smrg ;; 5928beef1b22Smrg esac 5929beef1b22Smrg ;; 59307b58d2e0Smrg 5931beef1b22Smrgbeos*) 5932beef1b22Smrg library_names_spec='$libname$shared_ext' 5933beef1b22Smrg dynamic_linker="$host_os ld.so" 5934beef1b22Smrg shlibpath_var=LIBRARY_PATH 5935beef1b22Smrg ;; 59362ec8c4b4Smrg 5937beef1b22Smrgbsdi[[45]]*) 5938beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 5939beef1b22Smrg need_version=no 5940beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 5941beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 5942beef1b22Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5943beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 5944beef1b22Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5945beef1b22Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5946beef1b22Smrg # the default ld.so.conf also contains /usr/contrib/lib and 5947beef1b22Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5948beef1b22Smrg # libtool to hard-code these into programs 5949beef1b22Smrg ;; 59502ec8c4b4Smrg 5951beef1b22Smrgcygwin* | mingw* | pw32* | cegcc*) 5952beef1b22Smrg version_type=windows 5953beef1b22Smrg shrext_cmds=.dll 5954beef1b22Smrg need_version=no 5955beef1b22Smrg need_lib_prefix=no 595609885543Smrg 5957beef1b22Smrg case $GCC,$cc_basename in 5958beef1b22Smrg yes,*) 5959beef1b22Smrg # gcc 5960beef1b22Smrg library_names_spec='$libname.dll.a' 5961beef1b22Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5962beef1b22Smrg postinstall_cmds='base_file=`basename \$file`~ 5963beef1b22Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 5964beef1b22Smrg dldir=$destdir/`dirname \$dlpath`~ 5965beef1b22Smrg test -d \$dldir || mkdir -p \$dldir~ 5966beef1b22Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 5967beef1b22Smrg chmod a+x \$dldir/$dlname~ 5968beef1b22Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5969beef1b22Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5970beef1b22Smrg fi' 5971beef1b22Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5972beef1b22Smrg dlpath=$dir/\$dldll~ 5973beef1b22Smrg $RM \$dlpath' 5974beef1b22Smrg shlibpath_overrides_runpath=yes 597509885543Smrg 5976beef1b22Smrg case $host_os in 5977beef1b22Smrg cygwin*) 5978beef1b22Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5979beef1b22Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5980beef1b22Smrgm4_if([$1], [],[ 5981beef1b22Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5982beef1b22Smrg ;; 5983beef1b22Smrg mingw* | cegcc*) 5984beef1b22Smrg # MinGW DLLs use traditional 'lib' prefix 5985beef1b22Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5986beef1b22Smrg ;; 5987beef1b22Smrg pw32*) 5988beef1b22Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 5989beef1b22Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5990beef1b22Smrg ;; 5991beef1b22Smrg esac 5992beef1b22Smrg dynamic_linker='Win32 ld.exe' 5993beef1b22Smrg ;; 599409885543Smrg 5995beef1b22Smrg *,cl* | *,icl*) 5996beef1b22Smrg # Native MSVC or ICC 5997beef1b22Smrg libname_spec='$name' 5998beef1b22Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 5999beef1b22Smrg library_names_spec='$libname.dll.lib' 600009885543Smrg 6001beef1b22Smrg case $build_os in 6002beef1b22Smrg mingw*) 6003beef1b22Smrg sys_lib_search_path_spec= 6004beef1b22Smrg lt_save_ifs=$IFS 6005beef1b22Smrg IFS=';' 6006beef1b22Smrg for lt_path in $LIB 6007beef1b22Smrg do 6008beef1b22Smrg IFS=$lt_save_ifs 6009beef1b22Smrg # Let DOS variable expansion print the short 8.3 style file name. 6010beef1b22Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 6011beef1b22Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 6012beef1b22Smrg done 6013beef1b22Smrg IFS=$lt_save_ifs 6014beef1b22Smrg # Convert to MSYS style. 6015beef1b22Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 6016beef1b22Smrg ;; 6017beef1b22Smrg cygwin*) 6018beef1b22Smrg # Convert to unix form, then to dos form, then back to unix form 6019beef1b22Smrg # but this time dos style (no spaces!) so that the unix form looks 6020beef1b22Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 6021beef1b22Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6022beef1b22Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6023beef1b22Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6024beef1b22Smrg ;; 6025beef1b22Smrg *) 6026beef1b22Smrg sys_lib_search_path_spec=$LIB 6027beef1b22Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6028beef1b22Smrg # It is most probably a Windows format PATH. 6029beef1b22Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6030beef1b22Smrg else 6031beef1b22Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6032beef1b22Smrg fi 6033beef1b22Smrg # FIXME: find the short name or the path components, as spaces are 6034beef1b22Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 6035beef1b22Smrg ;; 6036beef1b22Smrg esac 603709885543Smrg 6038beef1b22Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 6039beef1b22Smrg postinstall_cmds='base_file=`basename \$file`~ 6040beef1b22Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6041beef1b22Smrg dldir=$destdir/`dirname \$dlpath`~ 6042beef1b22Smrg test -d \$dldir || mkdir -p \$dldir~ 6043beef1b22Smrg $install_prog $dir/$dlname \$dldir/$dlname' 6044beef1b22Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6045beef1b22Smrg dlpath=$dir/\$dldll~ 6046beef1b22Smrg $RM \$dlpath' 6047beef1b22Smrg shlibpath_overrides_runpath=yes 6048beef1b22Smrg dynamic_linker='Win32 link.exe' 6049beef1b22Smrg ;; 60507b58d2e0Smrg 6051beef1b22Smrg *) 6052beef1b22Smrg # Assume MSVC and ICC wrapper 6053beef1b22Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6054beef1b22Smrg dynamic_linker='Win32 ld.exe' 6055beef1b22Smrg ;; 6056beef1b22Smrg esac 6057beef1b22Smrg # FIXME: first we should search . and the directory the executable is in 6058beef1b22Smrg shlibpath_var=PATH 6059beef1b22Smrg ;; 60607b58d2e0Smrg 6061beef1b22Smrgdarwin* | rhapsody*) 6062beef1b22Smrg dynamic_linker="$host_os dyld" 6063beef1b22Smrg version_type=darwin 6064beef1b22Smrg need_lib_prefix=no 6065beef1b22Smrg need_version=no 6066beef1b22Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6067beef1b22Smrg soname_spec='$libname$release$major$shared_ext' 6068beef1b22Smrg shlibpath_overrides_runpath=yes 6069beef1b22Smrg shlibpath_var=DYLD_LIBRARY_PATH 6070beef1b22Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6071beef1b22Smrgm4_if([$1], [],[ 6072beef1b22Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6073beef1b22Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6074beef1b22Smrg ;; 607509885543Smrg 6076beef1b22Smrgdgux*) 6077beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6078beef1b22Smrg need_lib_prefix=no 6079beef1b22Smrg need_version=no 6080beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6081beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6082beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6083beef1b22Smrg ;; 608409885543Smrg 6085beef1b22Smrgfreebsd* | dragonfly* | midnightbsd*) 6086beef1b22Smrg # DragonFly does not have aout. When/if they implement a new 6087beef1b22Smrg # versioning mechanism, adjust this. 6088beef1b22Smrg if test -x /usr/bin/objformat; then 6089beef1b22Smrg objformat=`/usr/bin/objformat` 6090beef1b22Smrg else 6091beef1b22Smrg case $host_os in 6092beef1b22Smrg freebsd[[23]].*) objformat=aout ;; 6093beef1b22Smrg *) objformat=elf ;; 6094beef1b22Smrg esac 6095beef1b22Smrg fi 6096beef1b22Smrg version_type=freebsd-$objformat 6097beef1b22Smrg case $version_type in 6098beef1b22Smrg freebsd-elf*) 6099beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6100beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6101beef1b22Smrg need_version=no 6102beef1b22Smrg need_lib_prefix=no 6103beef1b22Smrg ;; 6104beef1b22Smrg freebsd-*) 6105beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6106beef1b22Smrg need_version=yes 6107b698ba48Smrg ;; 6108beef1b22Smrg esac 6109beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6110beef1b22Smrg case $host_os in 6111beef1b22Smrg freebsd2.*) 6112beef1b22Smrg shlibpath_overrides_runpath=yes 6113beef1b22Smrg ;; 6114beef1b22Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6115beef1b22Smrg shlibpath_overrides_runpath=yes 6116beef1b22Smrg hardcode_into_libs=yes 6117beef1b22Smrg ;; 6118beef1b22Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6119beef1b22Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6120beef1b22Smrg shlibpath_overrides_runpath=no 6121beef1b22Smrg hardcode_into_libs=yes 6122beef1b22Smrg ;; 6123beef1b22Smrg *) # from 4.6 on, and DragonFly 6124beef1b22Smrg shlibpath_overrides_runpath=yes 6125beef1b22Smrg hardcode_into_libs=yes 6126beef1b22Smrg ;; 6127beef1b22Smrg esac 6128beef1b22Smrg ;; 6129beef1b22Smrg 6130beef1b22Smrghaiku*) 6131beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6132beef1b22Smrg need_lib_prefix=no 6133beef1b22Smrg need_version=no 6134beef1b22Smrg dynamic_linker="$host_os runtime_loader" 6135beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6136beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6137beef1b22Smrg shlibpath_var=LIBRARY_PATH 6138beef1b22Smrg shlibpath_overrides_runpath=no 6139beef1b22Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6140beef1b22Smrg hardcode_into_libs=yes 6141beef1b22Smrg ;; 61427b58d2e0Smrg 6143beef1b22Smrghpux9* | hpux10* | hpux11*) 6144beef1b22Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 6145beef1b22Smrg # link against other versions. 6146beef1b22Smrg version_type=sunos 6147beef1b22Smrg need_lib_prefix=no 6148beef1b22Smrg need_version=no 6149beef1b22Smrg case $host_cpu in 6150beef1b22Smrg ia64*) 6151beef1b22Smrg shrext_cmds='.so' 6152beef1b22Smrg hardcode_into_libs=yes 6153beef1b22Smrg dynamic_linker="$host_os dld.so" 6154beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6155beef1b22Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6156beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6157beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6158beef1b22Smrg if test 32 = "$HPUX_IA64_MODE"; then 6159beef1b22Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6160beef1b22Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6161beef1b22Smrg else 6162beef1b22Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6163beef1b22Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6164beef1b22Smrg fi 6165beef1b22Smrg ;; 6166beef1b22Smrg hppa*64*) 6167beef1b22Smrg shrext_cmds='.sl' 6168beef1b22Smrg hardcode_into_libs=yes 6169beef1b22Smrg dynamic_linker="$host_os dld.sl" 6170beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6171beef1b22Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6172beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6173beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6174beef1b22Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6175beef1b22Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6176beef1b22Smrg ;; 6177beef1b22Smrg *) 6178beef1b22Smrg shrext_cmds='.sl' 6179beef1b22Smrg dynamic_linker="$host_os dld.sl" 6180beef1b22Smrg shlibpath_var=SHLIB_PATH 6181beef1b22Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6182beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6183beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6184beef1b22Smrg ;; 6185beef1b22Smrg esac 6186beef1b22Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6187beef1b22Smrg postinstall_cmds='chmod 555 $lib' 6188beef1b22Smrg # or fails outright, so override atomically: 6189beef1b22Smrg install_override_mode=555 6190beef1b22Smrg ;; 61917b58d2e0Smrg 6192beef1b22Smrginterix[[3-9]]*) 6193beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6194beef1b22Smrg need_lib_prefix=no 6195beef1b22Smrg need_version=no 6196beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6197beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6198beef1b22Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6199beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6200beef1b22Smrg shlibpath_overrides_runpath=no 6201beef1b22Smrg hardcode_into_libs=yes 6202beef1b22Smrg ;; 62037b58d2e0Smrg 6204beef1b22Smrgirix5* | irix6* | nonstopux*) 6205beef1b22Smrg case $host_os in 6206beef1b22Smrg nonstopux*) version_type=nonstopux ;; 6207beef1b22Smrg *) 6208beef1b22Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 6209beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6210beef1b22Smrg else 6211beef1b22Smrg version_type=irix 6212beef1b22Smrg fi ;; 6213beef1b22Smrg esac 6214beef1b22Smrg need_lib_prefix=no 6215beef1b22Smrg need_version=no 6216beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6217beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6218beef1b22Smrg case $host_os in 6219beef1b22Smrg irix5* | nonstopux*) 6220beef1b22Smrg libsuff= shlibsuff= 6221beef1b22Smrg ;; 6222beef1b22Smrg *) 6223beef1b22Smrg case $LD in # libtool.m4 will add one of these switches to LD 6224beef1b22Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6225beef1b22Smrg libsuff= shlibsuff= libmagic=32-bit;; 6226beef1b22Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6227beef1b22Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6228beef1b22Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6229beef1b22Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6230beef1b22Smrg *) libsuff= shlibsuff= libmagic=never-match;; 6231b698ba48Smrg esac 6232beef1b22Smrg ;; 6233beef1b22Smrg esac 6234beef1b22Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6235beef1b22Smrg shlibpath_overrides_runpath=no 6236beef1b22Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6237beef1b22Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6238beef1b22Smrg hardcode_into_libs=yes 6239beef1b22Smrg ;; 624009885543Smrg 6241beef1b22Smrg# No shared lib support for Linux oldld, aout, or coff. 6242beef1b22Smrglinux*oldld* | linux*aout* | linux*coff*) 6243beef1b22Smrg dynamic_linker=no 6244beef1b22Smrg ;; 62457b58d2e0Smrg 6246beef1b22Smrglinux*android*) 6247beef1b22Smrg version_type=none # Android doesn't support versioned libraries. 6248beef1b22Smrg need_lib_prefix=no 6249beef1b22Smrg need_version=no 6250beef1b22Smrg library_names_spec='$libname$release$shared_ext' 6251beef1b22Smrg soname_spec='$libname$release$shared_ext' 6252beef1b22Smrg finish_cmds= 6253beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6254beef1b22Smrg shlibpath_overrides_runpath=yes 62557b58d2e0Smrg 6256beef1b22Smrg # This implies no fast_install, which is unacceptable. 6257beef1b22Smrg # Some rework will be needed to allow for fast_install 6258beef1b22Smrg # before this can be enabled. 6259beef1b22Smrg hardcode_into_libs=yes 62607b58d2e0Smrg 6261beef1b22Smrg dynamic_linker='Android linker' 6262beef1b22Smrg # Don't embed -rpath directories since the linker doesn't support them. 6263beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6264beef1b22Smrg ;; 626509885543Smrg 6266beef1b22Smrg# This must be glibc/ELF. 6267beef1b22Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6268beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6269beef1b22Smrg need_lib_prefix=no 6270beef1b22Smrg need_version=no 6271beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6272beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6273beef1b22Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6274beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6275beef1b22Smrg shlibpath_overrides_runpath=no 627609885543Smrg 6277beef1b22Smrg # Some binutils ld are patched to set DT_RUNPATH 6278beef1b22Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6279beef1b22Smrg [lt_cv_shlibpath_overrides_runpath=no 6280beef1b22Smrg save_LDFLAGS=$LDFLAGS 6281beef1b22Smrg save_libdir=$libdir 6282beef1b22Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6283beef1b22Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6284beef1b22Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6285beef1b22Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6286beef1b22Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6287beef1b22Smrg LDFLAGS=$save_LDFLAGS 6288beef1b22Smrg libdir=$save_libdir 6289beef1b22Smrg ]) 6290beef1b22Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 629109885543Smrg 6292beef1b22Smrg # This implies no fast_install, which is unacceptable. 6293beef1b22Smrg # Some rework will be needed to allow for fast_install 6294beef1b22Smrg # before this can be enabled. 6295beef1b22Smrg hardcode_into_libs=yes 6296b12e5c03Smrg 6297beef1b22Smrg # Ideally, we could use ldconfig to report *all* directores which are 6298beef1b22Smrg # searched for libraries, however this is still not possible. Aside from not 6299beef1b22Smrg # being certain /sbin/ldconfig is available, command 6300beef1b22Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6301beef1b22Smrg # even though it is searched at run-time. Try to do the best guess by 6302beef1b22Smrg # appending ld.so.conf contents (and includes) to the search path. 6303beef1b22Smrg if test -f /etc/ld.so.conf; then 6304beef1b22Smrg 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' ' '` 6305beef1b22Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6306beef1b22Smrg fi 6307f395c03eSmrg 6308beef1b22Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6309beef1b22Smrg # powerpc, because MkLinux only supported shared libraries with the 6310beef1b22Smrg # GNU dynamic linker. Since this was broken with cross compilers, 6311beef1b22Smrg # most powerpc-linux boxes support dynamic linking these days and 6312beef1b22Smrg # people can always --disable-shared, the test was removed, and we 6313beef1b22Smrg # assume the GNU/Linux dynamic linker is in use. 6314beef1b22Smrg dynamic_linker='GNU/Linux ld.so' 6315beef1b22Smrg ;; 631609885543Smrg 6317beef1b22Smrgnetbsd*) 6318beef1b22Smrg version_type=sunos 6319beef1b22Smrg need_lib_prefix=no 6320beef1b22Smrg need_version=no 6321beef1b22Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6322beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6323beef1b22Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6324beef1b22Smrg dynamic_linker='NetBSD (a.out) ld.so' 6325beef1b22Smrg else 6326beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6327beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6328beef1b22Smrg dynamic_linker='NetBSD ld.elf_so' 6329beef1b22Smrg fi 6330beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6331beef1b22Smrg shlibpath_overrides_runpath=yes 6332beef1b22Smrg hardcode_into_libs=yes 6333beef1b22Smrg ;; 6334b12e5c03Smrg 6335beef1b22Smrgnewsos6) 6336beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6337beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6338beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6339beef1b22Smrg shlibpath_overrides_runpath=yes 6340beef1b22Smrg ;; 6341b12e5c03Smrg 6342beef1b22Smrg*nto* | *qnx*) 6343beef1b22Smrg version_type=qnx 6344beef1b22Smrg need_lib_prefix=no 6345beef1b22Smrg need_version=no 6346beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6347beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6348beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6349beef1b22Smrg shlibpath_overrides_runpath=no 6350beef1b22Smrg hardcode_into_libs=yes 6351beef1b22Smrg dynamic_linker='ldqnx.so' 6352beef1b22Smrg ;; 635309885543Smrg 6354beef1b22Smrgopenbsd* | bitrig*) 6355beef1b22Smrg version_type=sunos 6356beef1b22Smrg sys_lib_dlsearch_path_spec=/usr/lib 6357beef1b22Smrg need_lib_prefix=no 6358beef1b22Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6359beef1b22Smrg need_version=no 6360beef1b22Smrg else 6361beef1b22Smrg need_version=yes 6362beef1b22Smrg fi 6363beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6364beef1b22Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6365beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6366beef1b22Smrg shlibpath_overrides_runpath=yes 6367beef1b22Smrg ;; 636809885543Smrg 6369beef1b22Smrgos2*) 6370beef1b22Smrg libname_spec='$name' 6371beef1b22Smrg version_type=windows 6372beef1b22Smrg shrext_cmds=.dll 6373beef1b22Smrg need_version=no 6374beef1b22Smrg need_lib_prefix=no 6375beef1b22Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6376beef1b22Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6377beef1b22Smrg v=$($ECHO $release$versuffix | tr -d .-); 6378beef1b22Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6379beef1b22Smrg $ECHO $n$v`$shared_ext' 6380beef1b22Smrg library_names_spec='${libname}_dll.$libext' 6381beef1b22Smrg dynamic_linker='OS/2 ld.exe' 6382beef1b22Smrg shlibpath_var=BEGINLIBPATH 6383beef1b22Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6384beef1b22Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6385beef1b22Smrg postinstall_cmds='base_file=`basename \$file`~ 6386beef1b22Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6387beef1b22Smrg dldir=$destdir/`dirname \$dlpath`~ 6388beef1b22Smrg test -d \$dldir || mkdir -p \$dldir~ 6389beef1b22Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 6390beef1b22Smrg chmod a+x \$dldir/$dlname~ 6391beef1b22Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6392beef1b22Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6393beef1b22Smrg fi' 6394beef1b22Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6395beef1b22Smrg dlpath=$dir/\$dldll~ 6396beef1b22Smrg $RM \$dlpath' 6397beef1b22Smrg ;; 639809885543Smrg 6399beef1b22Smrgosf3* | osf4* | osf5*) 6400beef1b22Smrg version_type=osf 6401beef1b22Smrg need_lib_prefix=no 6402beef1b22Smrg need_version=no 6403beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6404beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6405beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6406beef1b22Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6407beef1b22Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6408beef1b22Smrg ;; 640909885543Smrg 6410beef1b22Smrgrdos*) 6411beef1b22Smrg dynamic_linker=no 6412beef1b22Smrg ;; 641309885543Smrg 6414beef1b22Smrgsolaris*) 6415beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6416beef1b22Smrg need_lib_prefix=no 6417beef1b22Smrg need_version=no 6418beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6419beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6420beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6421beef1b22Smrg shlibpath_overrides_runpath=yes 6422beef1b22Smrg hardcode_into_libs=yes 6423beef1b22Smrg # ldd complains unless libraries are executable 6424beef1b22Smrg postinstall_cmds='chmod +x $lib' 6425beef1b22Smrg ;; 64267b58d2e0Smrg 6427beef1b22Smrgsunos4*) 6428beef1b22Smrg version_type=sunos 6429beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6430beef1b22Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6431beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6432beef1b22Smrg shlibpath_overrides_runpath=yes 6433beef1b22Smrg if test yes = "$with_gnu_ld"; then 6434beef1b22Smrg need_lib_prefix=no 6435beef1b22Smrg fi 6436beef1b22Smrg need_version=yes 6437beef1b22Smrg ;; 6438beef1b22Smrg 6439beef1b22Smrgsysv4 | sysv4.3*) 6440beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6441beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6442beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6443beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6444beef1b22Smrg case $host_vendor in 6445beef1b22Smrg sni) 6446beef1b22Smrg shlibpath_overrides_runpath=no 6447beef1b22Smrg need_lib_prefix=no 6448beef1b22Smrg runpath_var=LD_RUN_PATH 6449beef1b22Smrg ;; 6450beef1b22Smrg siemens) 6451beef1b22Smrg need_lib_prefix=no 6452beef1b22Smrg ;; 6453beef1b22Smrg motorola) 6454beef1b22Smrg need_lib_prefix=no 6455beef1b22Smrg need_version=no 6456beef1b22Smrg shlibpath_overrides_runpath=no 6457beef1b22Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6458beef1b22Smrg ;; 6459beef1b22Smrg esac 6460beef1b22Smrg ;; 646109885543Smrg 6462beef1b22Smrgsysv4*MP*) 6463beef1b22Smrg if test -d /usr/nec; then 6464beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6465beef1b22Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6466beef1b22Smrg soname_spec='$libname$shared_ext.$major' 6467beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6468beef1b22Smrg fi 6469beef1b22Smrg ;; 647009885543Smrg 6471beef1b22Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6472beef1b22Smrg version_type=sco 6473beef1b22Smrg need_lib_prefix=no 6474beef1b22Smrg need_version=no 6475beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6476beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6477beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6478beef1b22Smrg shlibpath_overrides_runpath=yes 6479beef1b22Smrg hardcode_into_libs=yes 6480beef1b22Smrg if test yes = "$with_gnu_ld"; then 6481beef1b22Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6482beef1b22Smrg else 6483beef1b22Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6484beef1b22Smrg case $host_os in 6485beef1b22Smrg sco3.2v5*) 6486beef1b22Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6487beef1b22Smrg ;; 64887b58d2e0Smrg esac 6489beef1b22Smrg fi 6490beef1b22Smrg sys_lib_dlsearch_path_spec='/usr/lib' 6491beef1b22Smrg ;; 649209885543Smrg 6493beef1b22Smrgtpf*) 6494beef1b22Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6495beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6496beef1b22Smrg need_lib_prefix=no 6497beef1b22Smrg need_version=no 6498beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6499beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6500beef1b22Smrg shlibpath_overrides_runpath=no 6501beef1b22Smrg hardcode_into_libs=yes 6502beef1b22Smrg ;; 650309885543Smrg 6504beef1b22Smrguts4*) 6505beef1b22Smrg version_type=linux # correct to gnu/linux during the next big refactor 6506beef1b22Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6507beef1b22Smrg soname_spec='$libname$release$shared_ext$major' 6508beef1b22Smrg shlibpath_var=LD_LIBRARY_PATH 6509beef1b22Smrg ;; 651009885543Smrg 6511beef1b22Smrg*) 6512beef1b22Smrg dynamic_linker=no 65137b58d2e0Smrg ;; 65147b58d2e0Smrgesac 6515beef1b22SmrgAC_MSG_RESULT([$dynamic_linker]) 6516beef1b22Smrgtest no = "$dynamic_linker" && can_build_shared=no 651709885543Smrg 6518beef1b22Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6519beef1b22Smrgif test yes = "$GCC"; then 6520beef1b22Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 65217b58d2e0Smrgfi 652209885543Smrg 6523beef1b22Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6524beef1b22Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6525beef1b22Smrgfi 65262ec8c4b4Smrg 6527beef1b22Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6528beef1b22Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6529b12e5c03Smrgfi 65307b58d2e0Smrg 6531beef1b22Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6532beef1b22Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 653309885543Smrg 6534beef1b22Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6535beef1b22Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 653609885543Smrg 6537beef1b22Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6538beef1b22Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6539e4f6584cSmrg 6540beef1b22Smrg_LT_DECL([], [variables_saved_for_relink], [1], 6541beef1b22Smrg [Variables whose values should be saved in libtool wrapper scripts and 6542beef1b22Smrg restored at link time]) 6543beef1b22Smrg_LT_DECL([], [need_lib_prefix], [0], 6544beef1b22Smrg [Do we need the "lib" prefix for modules?]) 6545beef1b22Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6546beef1b22Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 6547beef1b22Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6548beef1b22Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6549beef1b22Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 6550beef1b22Smrg [Is shlibpath searched before the hard-coded library search path?]) 6551beef1b22Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6552beef1b22Smrg_LT_DECL([], [library_names_spec], [1], 6553beef1b22Smrg [[List of archive names. First name is the real one, the rest are links. 6554beef1b22Smrg The last name is the one that the linker finds with -lNAME]]) 6555beef1b22Smrg_LT_DECL([], [soname_spec], [1], 6556beef1b22Smrg [[The coded name of the library, if different from the real name]]) 6557beef1b22Smrg_LT_DECL([], [install_override_mode], [1], 6558beef1b22Smrg [Permission mode override for installation of shared libraries]) 6559beef1b22Smrg_LT_DECL([], [postinstall_cmds], [2], 6560beef1b22Smrg [Command to use after installation of a shared archive]) 6561beef1b22Smrg_LT_DECL([], [postuninstall_cmds], [2], 6562beef1b22Smrg [Command to use after uninstallation of a shared archive]) 6563beef1b22Smrg_LT_DECL([], [finish_cmds], [2], 6564beef1b22Smrg [Commands used to finish a libtool library installation in a directory]) 6565beef1b22Smrg_LT_DECL([], [finish_eval], [1], 6566beef1b22Smrg [[As "finish_cmds", except a single script fragment to be evaled but 6567beef1b22Smrg not shown]]) 6568beef1b22Smrg_LT_DECL([], [hardcode_into_libs], [0], 6569beef1b22Smrg [Whether we should hardcode library paths into libraries]) 6570beef1b22Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 6571beef1b22Smrg [Compile-time system search path for libraries]) 6572beef1b22Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6573beef1b22Smrg [Detected run-time system search path for libraries]) 6574beef1b22Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6575beef1b22Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6576beef1b22Smrg])# _LT_SYS_DYNAMIC_LINKER 657709885543Smrg 657809885543Smrg 6579beef1b22Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 6580beef1b22Smrg# -------------------------- 6581beef1b22Smrg# find a file program that can recognize shared library 6582beef1b22SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 6583beef1b22Smrg[m4_require([_LT_DECL_EGREP])dnl 6584beef1b22SmrgAC_MSG_CHECKING([for $1]) 6585beef1b22SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6586beef1b22Smrg[case $MAGIC_CMD in 6587beef1b22Smrg[[\\/*] | ?:[\\/]*]) 6588beef1b22Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6589beef1b22Smrg ;; 6590beef1b22Smrg*) 6591beef1b22Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 6592beef1b22Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6593beef1b22Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 6594beef1b22Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 6595beef1b22Smrgdnl not every word. This closes a longstanding sh security hole. 6596beef1b22Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 6597beef1b22Smrg for ac_dir in $ac_dummy; do 6598beef1b22Smrg IFS=$lt_save_ifs 6599beef1b22Smrg test -z "$ac_dir" && ac_dir=. 6600beef1b22Smrg if test -f "$ac_dir/$1"; then 6601beef1b22Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6602beef1b22Smrg if test -n "$file_magic_test_file"; then 6603beef1b22Smrg case $deplibs_check_method in 6604beef1b22Smrg "file_magic "*) 6605beef1b22Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6606beef1b22Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6607beef1b22Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6608beef1b22Smrg $EGREP "$file_magic_regex" > /dev/null; then 6609beef1b22Smrg : 6610beef1b22Smrg else 6611beef1b22Smrg cat <<_LT_EOF 1>&2 661209885543Smrg 6613beef1b22Smrg*** Warning: the command libtool uses to detect shared libraries, 6614beef1b22Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 6615beef1b22Smrg*** The result is that libtool may fail to recognize shared libraries 6616beef1b22Smrg*** as such. This will affect the creation of libtool libraries that 6617beef1b22Smrg*** depend on shared libraries, but programs linked with such libtool 6618beef1b22Smrg*** libraries will work regardless of this problem. Nevertheless, you 6619beef1b22Smrg*** may want to report the problem to your system manager and/or to 6620beef1b22Smrg*** bug-libtool@gnu.org 6621beef1b22Smrg 6622beef1b22Smrg_LT_EOF 6623beef1b22Smrg fi ;; 6624beef1b22Smrg esac 6625beef1b22Smrg fi 6626beef1b22Smrg break 6627beef1b22Smrg fi 6628beef1b22Smrg done 6629beef1b22Smrg IFS=$lt_save_ifs 6630beef1b22Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 6631beef1b22Smrg ;; 6632beef1b22Smrgesac]) 6633beef1b22SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 6634beef1b22Smrgif test -n "$MAGIC_CMD"; then 6635beef1b22Smrg AC_MSG_RESULT($MAGIC_CMD) 6636beef1b22Smrgelse 6637beef1b22Smrg AC_MSG_RESULT(no) 6638beef1b22Smrgfi 6639beef1b22Smrg_LT_DECL([], [MAGIC_CMD], [0], 6640beef1b22Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6641beef1b22Smrg])# _LT_PATH_TOOL_PREFIX 664209885543Smrg 6643beef1b22Smrg# Old name: 6644beef1b22SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6645beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 6646beef1b22Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 664709885543Smrg 664809885543Smrg 6649beef1b22Smrg# _LT_PATH_MAGIC 6650beef1b22Smrg# -------------- 6651beef1b22Smrg# find a file program that can recognize a shared library 6652beef1b22Smrgm4_defun([_LT_PATH_MAGIC], 6653beef1b22Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6654beef1b22Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 6655beef1b22Smrg if test -n "$ac_tool_prefix"; then 6656beef1b22Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6657beef1b22Smrg else 6658beef1b22Smrg MAGIC_CMD=: 6659beef1b22Smrg fi 6660beef1b22Smrgfi 6661beef1b22Smrg])# _LT_PATH_MAGIC 666209885543Smrg 666309885543Smrg 6664beef1b22Smrg# LT_PATH_LD 6665beef1b22Smrg# ---------- 6666beef1b22Smrg# find the pathname to the GNU or non-GNU linker 6667beef1b22SmrgAC_DEFUN([LT_PATH_LD], 6668beef1b22Smrg[AC_REQUIRE([AC_PROG_CC])dnl 6669beef1b22SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 6670beef1b22SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 6671beef1b22Smrgm4_require([_LT_DECL_SED])dnl 6672beef1b22Smrgm4_require([_LT_DECL_EGREP])dnl 6673beef1b22Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 667409885543Smrg 6675beef1b22SmrgAC_ARG_WITH([gnu-ld], 6676beef1b22Smrg [AS_HELP_STRING([--with-gnu-ld], 6677beef1b22Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6678beef1b22Smrg [test no = "$withval" || with_gnu_ld=yes], 6679beef1b22Smrg [with_gnu_ld=no])dnl 668009885543Smrg 6681beef1b22Smrgac_prog=ld 6682beef1b22Smrgif test yes = "$GCC"; then 6683beef1b22Smrg # Check if gcc -print-prog-name=ld gives a path. 6684beef1b22Smrg AC_MSG_CHECKING([for ld used by $CC]) 6685beef1b22Smrg case $host in 6686beef1b22Smrg *-*-mingw*) 6687beef1b22Smrg # gcc leaves a trailing carriage return, which upsets mingw 6688beef1b22Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6689beef1b22Smrg *) 6690beef1b22Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6691beef1b22Smrg esac 6692beef1b22Smrg case $ac_prog in 6693beef1b22Smrg # Accept absolute paths. 6694beef1b22Smrg [[\\/]]* | ?:[[\\/]]*) 6695beef1b22Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 6696beef1b22Smrg # Canonicalize the pathname of ld 6697beef1b22Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6698beef1b22Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6699beef1b22Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6700beef1b22Smrg done 6701beef1b22Smrg test -z "$LD" && LD=$ac_prog 6702beef1b22Smrg ;; 6703beef1b22Smrg "") 6704beef1b22Smrg # If it fails, then pretend we aren't using GCC. 6705beef1b22Smrg ac_prog=ld 6706beef1b22Smrg ;; 6707beef1b22Smrg *) 6708beef1b22Smrg # If it is relative, then search for the first ld in PATH. 6709beef1b22Smrg with_gnu_ld=unknown 6710beef1b22Smrg ;; 6711beef1b22Smrg esac 6712beef1b22Smrgelif test yes = "$with_gnu_ld"; then 6713beef1b22Smrg AC_MSG_CHECKING([for GNU ld]) 6714beef1b22Smrgelse 6715beef1b22Smrg AC_MSG_CHECKING([for non-GNU ld]) 6716beef1b22Smrgfi 6717beef1b22SmrgAC_CACHE_VAL(lt_cv_path_LD, 6718beef1b22Smrg[if test -z "$LD"; then 6719beef1b22Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6720beef1b22Smrg for ac_dir in $PATH; do 6721beef1b22Smrg IFS=$lt_save_ifs 6722beef1b22Smrg test -z "$ac_dir" && ac_dir=. 6723beef1b22Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6724beef1b22Smrg lt_cv_path_LD=$ac_dir/$ac_prog 6725beef1b22Smrg # Check to see if the program is GNU ld. I'd rather use --version, 6726beef1b22Smrg # but apparently some variants of GNU ld only accept -v. 6727beef1b22Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 6728beef1b22Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6729beef1b22Smrg *GNU* | *'with BFD'*) 6730beef1b22Smrg test no != "$with_gnu_ld" && break 6731beef1b22Smrg ;; 6732beef1b22Smrg *) 6733beef1b22Smrg test yes != "$with_gnu_ld" && break 6734beef1b22Smrg ;; 6735beef1b22Smrg esac 6736beef1b22Smrg fi 6737beef1b22Smrg done 6738beef1b22Smrg IFS=$lt_save_ifs 6739beef1b22Smrgelse 6740beef1b22Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 6741beef1b22Smrgfi]) 6742beef1b22SmrgLD=$lt_cv_path_LD 6743beef1b22Smrgif test -n "$LD"; then 6744beef1b22Smrg AC_MSG_RESULT($LD) 6745beef1b22Smrgelse 6746beef1b22Smrg AC_MSG_RESULT(no) 6747beef1b22Smrgfi 6748beef1b22Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6749beef1b22Smrg_LT_PATH_LD_GNU 6750beef1b22SmrgAC_SUBST([LD]) 675109885543Smrg 6752beef1b22Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6753beef1b22Smrg])# LT_PATH_LD 67547b58d2e0Smrg 6755beef1b22Smrg# Old names: 6756beef1b22SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6757beef1b22SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6758beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 6759beef1b22Smrgdnl AC_DEFUN([AM_PROG_LD], []) 6760beef1b22Smrgdnl AC_DEFUN([AC_PROG_LD], []) 676109885543Smrg 676209885543Smrg 6763beef1b22Smrg# _LT_PATH_LD_GNU 6764beef1b22Smrg#- -------------- 6765beef1b22Smrgm4_defun([_LT_PATH_LD_GNU], 6766beef1b22Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6767beef1b22Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6768beef1b22Smrgcase `$LD -v 2>&1 </dev/null` in 6769beef1b22Smrg*GNU* | *'with BFD'*) 6770beef1b22Smrg lt_cv_prog_gnu_ld=yes 6771beef1b22Smrg ;; 6772beef1b22Smrg*) 6773beef1b22Smrg lt_cv_prog_gnu_ld=no 6774beef1b22Smrg ;; 6775beef1b22Smrgesac]) 6776beef1b22Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 6777beef1b22Smrg])# _LT_PATH_LD_GNU 6778b12e5c03Smrg 6779e4f6584cSmrg 6780beef1b22Smrg# _LT_CMD_RELOAD 6781beef1b22Smrg# -------------- 6782beef1b22Smrg# find reload flag for linker 6783beef1b22Smrg# -- PORTME Some linkers may need a different reload flag. 6784beef1b22Smrgm4_defun([_LT_CMD_RELOAD], 6785beef1b22Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 6786beef1b22Smrg lt_cv_ld_reload_flag, 6787beef1b22Smrg [lt_cv_ld_reload_flag='-r']) 6788beef1b22Smrgreload_flag=$lt_cv_ld_reload_flag 6789beef1b22Smrgcase $reload_flag in 6790beef1b22Smrg"" | " "*) ;; 6791beef1b22Smrg*) reload_flag=" $reload_flag" ;; 6792beef1b22Smrgesac 6793beef1b22Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 6794beef1b22Smrgcase $host_os in 6795beef1b22Smrg cygwin* | mingw* | pw32* | cegcc*) 6796beef1b22Smrg if test yes != "$GCC"; then 6797beef1b22Smrg reload_cmds=false 6798beef1b22Smrg fi 6799beef1b22Smrg ;; 6800beef1b22Smrg darwin*) 6801beef1b22Smrg if test yes = "$GCC"; then 6802beef1b22Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6803beef1b22Smrg else 6804beef1b22Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 6805beef1b22Smrg fi 6806beef1b22Smrg ;; 6807beef1b22Smrgesac 6808beef1b22Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6809beef1b22Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 6810beef1b22Smrg])# _LT_CMD_RELOAD 6811e4f6584cSmrg 6812e4f6584cSmrg 6813beef1b22Smrg# _LT_PATH_DD 6814beef1b22Smrg# ----------- 6815beef1b22Smrg# find a working dd 6816beef1b22Smrgm4_defun([_LT_PATH_DD], 6817beef1b22Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6818beef1b22Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6819beef1b22Smrgcat conftest.i conftest.i >conftest2.i 6820beef1b22Smrg: ${lt_DD:=$DD} 6821beef1b22SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6822beef1b22Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6823beef1b22Smrg cmp -s conftest.i conftest.out \ 6824beef1b22Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6825beef1b22Smrgfi]) 6826beef1b22Smrgrm -f conftest.i conftest2.i conftest.out]) 6827beef1b22Smrg])# _LT_PATH_DD 682809885543Smrg 682909885543Smrg 6830beef1b22Smrg# _LT_CMD_TRUNCATE 6831beef1b22Smrg# ---------------- 6832beef1b22Smrg# find command to truncate a binary pipe 6833beef1b22Smrgm4_defun([_LT_CMD_TRUNCATE], 6834beef1b22Smrg[m4_require([_LT_PATH_DD]) 6835beef1b22SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6836beef1b22Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6837beef1b22Smrgcat conftest.i conftest.i >conftest2.i 6838beef1b22Smrglt_cv_truncate_bin= 6839beef1b22Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6840beef1b22Smrg cmp -s conftest.i conftest.out \ 6841beef1b22Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6842beef1b22Smrgfi 6843beef1b22Smrgrm -f conftest.i conftest2.i conftest.out 6844beef1b22Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6845beef1b22Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6846beef1b22Smrg [Command to truncate a binary pipe]) 6847beef1b22Smrg])# _LT_CMD_TRUNCATE 684809885543Smrg 684909885543Smrg 6850beef1b22Smrg# _LT_CHECK_MAGIC_METHOD 6851beef1b22Smrg# ---------------------- 6852beef1b22Smrg# how to check for library dependencies 6853beef1b22Smrg# -- PORTME fill in with the dynamic library characteristics 6854beef1b22Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 6855beef1b22Smrg[m4_require([_LT_DECL_EGREP]) 6856beef1b22Smrgm4_require([_LT_DECL_OBJDUMP]) 6857beef1b22SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 6858beef1b22Smrglt_cv_deplibs_check_method, 6859beef1b22Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 6860beef1b22Smrglt_cv_file_magic_test_file= 6861beef1b22Smrglt_cv_deplibs_check_method='unknown' 6862beef1b22Smrg# Need to set the preceding variable on all platforms that support 6863beef1b22Smrg# interlibrary dependencies. 6864beef1b22Smrg# 'none' -- dependencies not supported. 6865beef1b22Smrg# 'unknown' -- same as none, but documents that we really don't know. 6866beef1b22Smrg# 'pass_all' -- all dependencies passed with no checks. 6867beef1b22Smrg# 'test_compile' -- check by making test program. 6868beef1b22Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 6869beef1b22Smrg# that responds to the $file_magic_cmd with a given extended regex. 6870beef1b22Smrg# If you have 'file' or equivalent on your system and you're not sure 6871beef1b22Smrg# whether 'pass_all' will *always* work, you probably want this one. 68727b58d2e0Smrg 6873beef1b22Smrgcase $host_os in 6874beef1b22Smrgaix[[4-9]]*) 6875beef1b22Smrg lt_cv_deplibs_check_method=pass_all 6876beef1b22Smrg ;; 6877e4f6584cSmrg 6878beef1b22Smrgbeos*) 6879beef1b22Smrg lt_cv_deplibs_check_method=pass_all 6880beef1b22Smrg ;; 6881e4f6584cSmrg 6882beef1b22Smrgbsdi[[45]]*) 6883beef1b22Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6884beef1b22Smrg lt_cv_file_magic_cmd='$FILECMD -L' 6885beef1b22Smrg lt_cv_file_magic_test_file=/shlib/libc.so 6886beef1b22Smrg ;; 688709885543Smrg 6888beef1b22Smrgcygwin*) 6889beef1b22Smrg # func_win32_libid is a shell function defined in ltmain.sh 6890beef1b22Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6891beef1b22Smrg lt_cv_file_magic_cmd='func_win32_libid' 6892beef1b22Smrg ;; 689309885543Smrg 6894beef1b22Smrgmingw* | pw32*) 6895beef1b22Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 6896beef1b22Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 6897beef1b22Smrg # unless we find 'file', for example because we are cross-compiling. 6898beef1b22Smrg if ( file / ) >/dev/null 2>&1; then 6899beef1b22Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6900beef1b22Smrg lt_cv_file_magic_cmd='func_win32_libid' 6901beef1b22Smrg else 6902beef1b22Smrg # Keep this pattern in sync with the one in func_win32_libid. 6903beef1b22Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 6904beef1b22Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6905beef1b22Smrg fi 6906beef1b22Smrg ;; 6907beef1b22Smrg 6908beef1b22Smrgcegcc*) 6909beef1b22Smrg # use the weaker test based on 'objdump'. See mingw*. 6910beef1b22Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 6911beef1b22Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 6912beef1b22Smrg ;; 6913beef1b22Smrg 6914beef1b22Smrgdarwin* | rhapsody*) 6915beef1b22Smrg lt_cv_deplibs_check_method=pass_all 6916beef1b22Smrg ;; 6917beef1b22Smrg 6918beef1b22Smrgfreebsd* | dragonfly* | midnightbsd*) 6919beef1b22Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6920beef1b22Smrg case $host_cpu in 6921beef1b22Smrg i*86 ) 6922beef1b22Smrg # Not sure whether the presence of OpenBSD here was a mistake. 6923beef1b22Smrg # Let's accept both of them until this is cleared up. 6924beef1b22Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 6925beef1b22Smrg lt_cv_file_magic_cmd=$FILECMD 6926beef1b22Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 6927beef1b22Smrg ;; 69287b58d2e0Smrg esac 6929beef1b22Smrg else 6930beef1b22Smrg lt_cv_deplibs_check_method=pass_all 6931beef1b22Smrg fi 6932beef1b22Smrg ;; 69337b58d2e0Smrg 6934beef1b22Smrghaiku*) 6935beef1b22Smrg lt_cv_deplibs_check_method=pass_all 6936beef1b22Smrg ;; 69377b58d2e0Smrg 6938beef1b22Smrghpux10.20* | hpux11*) 6939beef1b22Smrg lt_cv_file_magic_cmd=$FILECMD 6940beef1b22Smrg case $host_cpu in 6941beef1b22Smrg ia64*) 6942beef1b22Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 6943beef1b22Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 6944beef1b22Smrg ;; 6945beef1b22Smrg hppa*64*) 6946beef1b22Smrg [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]'] 6947beef1b22Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 6948beef1b22Smrg ;; 6949beef1b22Smrg *) 6950beef1b22Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 6951beef1b22Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 6952beef1b22Smrg ;; 6953beef1b22Smrg esac 6954beef1b22Smrg ;; 69557b58d2e0Smrg 6956beef1b22Smrginterix[[3-9]]*) 6957beef1b22Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 6958beef1b22Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 6959beef1b22Smrg ;; 69607b58d2e0Smrg 6961beef1b22Smrgirix5* | irix6* | nonstopux*) 6962beef1b22Smrg case $LD in 6963beef1b22Smrg *-32|*"-32 ") libmagic=32-bit;; 6964beef1b22Smrg *-n32|*"-n32 ") libmagic=N32;; 6965beef1b22Smrg *-64|*"-64 ") libmagic=64-bit;; 6966beef1b22Smrg *) libmagic=never-match;; 6967beef1b22Smrg esac 6968beef1b22Smrg lt_cv_deplibs_check_method=pass_all 6969beef1b22Smrg ;; 69707b58d2e0Smrg 6971beef1b22Smrg# This must be glibc/ELF. 6972beef1b22Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6973beef1b22Smrg lt_cv_deplibs_check_method=pass_all 6974beef1b22Smrg ;; 69757b58d2e0Smrg 6976beef1b22Smrgnetbsd*) 6977beef1b22Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 6978beef1b22Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6979beef1b22Smrg else 6980beef1b22Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 6981beef1b22Smrg fi 6982beef1b22Smrg ;; 6983beef1b22Smrg 6984beef1b22Smrgnewos6*) 6985beef1b22Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 6986beef1b22Smrg lt_cv_file_magic_cmd=$FILECMD 6987beef1b22Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 6988beef1b22Smrg ;; 69897b58d2e0Smrg 6990beef1b22Smrg*nto* | *qnx*) 6991beef1b22Smrg lt_cv_deplibs_check_method=pass_all 6992beef1b22Smrg ;; 69937b58d2e0Smrg 6994beef1b22Smrgopenbsd* | bitrig*) 6995beef1b22Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6996beef1b22Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6997beef1b22Smrg else 6998beef1b22Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6999beef1b22Smrg fi 7000beef1b22Smrg ;; 70017b58d2e0Smrg 7002beef1b22Smrgosf3* | osf4* | osf5*) 7003beef1b22Smrg lt_cv_deplibs_check_method=pass_all 7004beef1b22Smrg ;; 70057b58d2e0Smrg 7006beef1b22Smrgrdos*) 7007beef1b22Smrg lt_cv_deplibs_check_method=pass_all 7008beef1b22Smrg ;; 700909885543Smrg 7010beef1b22Smrgsolaris*) 7011beef1b22Smrg lt_cv_deplibs_check_method=pass_all 7012beef1b22Smrg ;; 701309885543Smrg 7014beef1b22Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7015beef1b22Smrg lt_cv_deplibs_check_method=pass_all 7016beef1b22Smrg ;; 701709885543Smrg 7018beef1b22Smrgsysv4 | sysv4.3*) 7019beef1b22Smrg case $host_vendor in 7020beef1b22Smrg motorola) 7021beef1b22Smrg 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]]' 7022beef1b22Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7023beef1b22Smrg ;; 7024beef1b22Smrg ncr) 7025beef1b22Smrg lt_cv_deplibs_check_method=pass_all 7026beef1b22Smrg ;; 7027beef1b22Smrg sequent) 7028beef1b22Smrg lt_cv_file_magic_cmd='/bin/file' 7029beef1b22Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7030beef1b22Smrg ;; 7031beef1b22Smrg sni) 7032beef1b22Smrg lt_cv_file_magic_cmd='/bin/file' 7033beef1b22Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7034beef1b22Smrg lt_cv_file_magic_test_file=/lib/libc.so 7035beef1b22Smrg ;; 7036beef1b22Smrg siemens) 7037beef1b22Smrg lt_cv_deplibs_check_method=pass_all 7038beef1b22Smrg ;; 7039beef1b22Smrg pc) 7040beef1b22Smrg lt_cv_deplibs_check_method=pass_all 7041beef1b22Smrg ;; 7042beef1b22Smrg esac 7043beef1b22Smrg ;; 704409885543Smrg 7045beef1b22Smrgtpf*) 7046beef1b22Smrg lt_cv_deplibs_check_method=pass_all 7047beef1b22Smrg ;; 7048beef1b22Smrgos2*) 7049beef1b22Smrg lt_cv_deplibs_check_method=pass_all 7050beef1b22Smrg ;; 7051beef1b22Smrgesac 7052beef1b22Smrg]) 705309885543Smrg 7054beef1b22Smrgfile_magic_glob= 7055beef1b22Smrgwant_nocaseglob=no 7056beef1b22Smrgif test "$build" = "$host"; then 7057beef1b22Smrg case $host_os in 7058beef1b22Smrg mingw* | pw32*) 7059beef1b22Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7060beef1b22Smrg want_nocaseglob=yes 7061beef1b22Smrg else 7062beef1b22Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7063beef1b22Smrg fi 7064beef1b22Smrg ;; 7065beef1b22Smrg esac 7066beef1b22Smrgfi 70677b58d2e0Smrg 7068beef1b22Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 7069beef1b22Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 7070beef1b22Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 70717b58d2e0Smrg 7072beef1b22Smrg_LT_DECL([], [deplibs_check_method], [1], 7073beef1b22Smrg [Method to check whether dependent libraries are shared objects]) 7074beef1b22Smrg_LT_DECL([], [file_magic_cmd], [1], 7075beef1b22Smrg [Command to use when deplibs_check_method = "file_magic"]) 7076beef1b22Smrg_LT_DECL([], [file_magic_glob], [1], 7077beef1b22Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 7078beef1b22Smrg_LT_DECL([], [want_nocaseglob], [1], 7079beef1b22Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7080beef1b22Smrg])# _LT_CHECK_MAGIC_METHOD 70817b58d2e0Smrg 7082e4f6584cSmrg 7083beef1b22Smrg# LT_PATH_NM 7084beef1b22Smrg# ---------- 7085beef1b22Smrg# find the pathname to a BSD- or MS-compatible name lister 7086beef1b22SmrgAC_DEFUN([LT_PATH_NM], 7087beef1b22Smrg[AC_REQUIRE([AC_PROG_CC])dnl 7088beef1b22SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7089beef1b22Smrg[if test -n "$NM"; then 7090beef1b22Smrg # Let the user override the test. 7091beef1b22Smrg lt_cv_path_NM=$NM 7092beef1b22Smrgelse 7093beef1b22Smrg lt_nm_to_check=${ac_tool_prefix}nm 7094beef1b22Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7095beef1b22Smrg lt_nm_to_check="$lt_nm_to_check nm" 7096beef1b22Smrg fi 7097beef1b22Smrg for lt_tmp_nm in $lt_nm_to_check; do 7098beef1b22Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7099beef1b22Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7100beef1b22Smrg IFS=$lt_save_ifs 7101beef1b22Smrg test -z "$ac_dir" && ac_dir=. 7102beef1b22Smrg tmp_nm=$ac_dir/$lt_tmp_nm 7103beef1b22Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7104beef1b22Smrg # Check to see if the nm accepts a BSD-compat flag. 7105beef1b22Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7106beef1b22Smrg # nm: unknown option "B" ignored 7107beef1b22Smrg # Tru64's nm complains that /dev/null is an invalid object file 7108beef1b22Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7109beef1b22Smrg case $build_os in 7110beef1b22Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7111beef1b22Smrg *) lt_bad_file=/dev/null ;; 7112beef1b22Smrg esac 7113beef1b22Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7114beef1b22Smrg *$lt_bad_file* | *'Invalid file or object type'*) 7115beef1b22Smrg lt_cv_path_NM="$tmp_nm -B" 7116beef1b22Smrg break 2 7117beef1b22Smrg ;; 7118beef1b22Smrg *) 7119beef1b22Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7120beef1b22Smrg */dev/null*) 7121beef1b22Smrg lt_cv_path_NM="$tmp_nm -p" 7122beef1b22Smrg break 2 7123beef1b22Smrg ;; 7124beef1b22Smrg *) 7125beef1b22Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7126beef1b22Smrg continue # so that we can try to find one that supports BSD flags 7127beef1b22Smrg ;; 7128beef1b22Smrg esac 7129beef1b22Smrg ;; 7130beef1b22Smrg esac 7131beef1b22Smrg fi 7132beef1b22Smrg done 7133beef1b22Smrg IFS=$lt_save_ifs 7134beef1b22Smrg done 7135beef1b22Smrg : ${lt_cv_path_NM=no} 7136beef1b22Smrgfi]) 7137beef1b22Smrgif test no != "$lt_cv_path_NM"; then 7138beef1b22Smrg NM=$lt_cv_path_NM 7139beef1b22Smrgelse 7140beef1b22Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 7141beef1b22Smrg if test -n "$DUMPBIN"; then : 7142beef1b22Smrg # Let the user override the test. 7143beef1b22Smrg else 7144beef1b22Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7145beef1b22Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7146beef1b22Smrg *COFF*) 7147beef1b22Smrg DUMPBIN="$DUMPBIN -symbols -headers" 7148beef1b22Smrg ;; 7149beef1b22Smrg *) 7150beef1b22Smrg DUMPBIN=: 7151beef1b22Smrg ;; 7152beef1b22Smrg esac 7153beef1b22Smrg fi 7154beef1b22Smrg AC_SUBST([DUMPBIN]) 7155beef1b22Smrg if test : != "$DUMPBIN"; then 7156beef1b22Smrg NM=$DUMPBIN 7157beef1b22Smrg fi 71587b58d2e0Smrgfi 7159beef1b22Smrgtest -z "$NM" && NM=nm 7160beef1b22SmrgAC_SUBST([NM]) 7161beef1b22Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7162e4f6584cSmrg 7163beef1b22SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7164beef1b22Smrg [lt_cv_nm_interface="BSD nm" 7165beef1b22Smrg echo "int some_variable = 0;" > conftest.$ac_ext 7166beef1b22Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7167beef1b22Smrg (eval "$ac_compile" 2>conftest.err) 7168beef1b22Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7169beef1b22Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7170beef1b22Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7171beef1b22Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7172beef1b22Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7173beef1b22Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 7174beef1b22Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7175beef1b22Smrg lt_cv_nm_interface="MS dumpbin" 7176beef1b22Smrg fi 7177beef1b22Smrg rm -f conftest*]) 7178beef1b22Smrg])# LT_PATH_NM 7179e4f6584cSmrg 7180beef1b22Smrg# Old names: 7181beef1b22SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7182beef1b22SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7183beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 7184beef1b22Smrgdnl AC_DEFUN([AM_PROG_NM], []) 7185beef1b22Smrgdnl AC_DEFUN([AC_PROG_NM], []) 71862ec8c4b4Smrg 7187beef1b22Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7188beef1b22Smrg# -------------------------------- 7189beef1b22Smrg# how to determine the name of the shared library 7190beef1b22Smrg# associated with a specific link library. 7191beef1b22Smrg# -- PORTME fill in with the dynamic library characteristics 7192beef1b22Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7193beef1b22Smrg[m4_require([_LT_DECL_EGREP]) 7194beef1b22Smrgm4_require([_LT_DECL_OBJDUMP]) 7195beef1b22Smrgm4_require([_LT_DECL_DLLTOOL]) 7196beef1b22SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7197beef1b22Smrglt_cv_sharedlib_from_linklib_cmd, 7198beef1b22Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7199e4f6584cSmrg 7200beef1b22Smrgcase $host_os in 7201beef1b22Smrgcygwin* | mingw* | pw32* | cegcc*) 7202beef1b22Smrg # two different shell functions defined in ltmain.sh; 7203beef1b22Smrg # decide which one to use based on capabilities of $DLLTOOL 7204beef1b22Smrg case `$DLLTOOL --help 2>&1` in 7205beef1b22Smrg *--identify-strict*) 7206beef1b22Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7207beef1b22Smrg ;; 7208beef1b22Smrg *) 7209beef1b22Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7210beef1b22Smrg ;; 7211beef1b22Smrg esac 7212beef1b22Smrg ;; 7213beef1b22Smrg*) 7214beef1b22Smrg # fallback: assume linklib IS sharedlib 7215beef1b22Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7216beef1b22Smrg ;; 7217beef1b22Smrgesac 7218beef1b22Smrg]) 7219beef1b22Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7220beef1b22Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7221b12e5c03Smrg 7222beef1b22Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7223beef1b22Smrg [Command to associate shared and link libraries]) 7224beef1b22Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7225b12e5c03Smrg 7226b12e5c03Smrg 7227beef1b22Smrg# _LT_PATH_MANIFEST_TOOL 7228beef1b22Smrg# ---------------------- 7229beef1b22Smrg# locate the manifest tool 7230beef1b22Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7231beef1b22Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7232beef1b22Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7233beef1b22SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7234beef1b22Smrg [lt_cv_path_mainfest_tool=no 7235beef1b22Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7236beef1b22Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7237beef1b22Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7238beef1b22Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7239beef1b22Smrg lt_cv_path_mainfest_tool=yes 7240beef1b22Smrg fi 7241beef1b22Smrg rm -f conftest*]) 7242beef1b22Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 7243beef1b22Smrg MANIFEST_TOOL=: 7244beef1b22Smrgfi 7245beef1b22Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7246beef1b22Smrg])# _LT_PATH_MANIFEST_TOOL 7247b12e5c03Smrg 7248b12e5c03Smrg 7249beef1b22Smrg# _LT_DLL_DEF_P([FILE]) 7250beef1b22Smrg# --------------------- 7251beef1b22Smrg# True iff FILE is a Windows DLL '.def' file. 7252beef1b22Smrg# Keep in sync with func_dll_def_p in the libtool script 7253beef1b22SmrgAC_DEFUN([_LT_DLL_DEF_P], 7254beef1b22Smrg[dnl 7255beef1b22Smrg test DEF = "`$SED -n dnl 7256beef1b22Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7257beef1b22Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7258beef1b22Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7259beef1b22Smrg -e q dnl Only consider the first "real" line 7260beef1b22Smrg $1`" dnl 7261beef1b22Smrg])# _LT_DLL_DEF_P 7262b12e5c03Smrg 7263b12e5c03Smrg 7264beef1b22Smrg# LT_LIB_M 7265beef1b22Smrg# -------- 7266beef1b22Smrg# check for math library 7267beef1b22SmrgAC_DEFUN([LT_LIB_M], 7268beef1b22Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7269beef1b22SmrgLIBM= 7270beef1b22Smrgcase $host in 7271beef1b22Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7272beef1b22Smrg # These system don't have libm, or don't need it 7273beef1b22Smrg ;; 7274beef1b22Smrg*-ncr-sysv4.3*) 7275beef1b22Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7276beef1b22Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7277beef1b22Smrg ;; 7278beef1b22Smrg*) 7279beef1b22Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7280beef1b22Smrg ;; 7281beef1b22Smrgesac 7282beef1b22SmrgAC_SUBST([LIBM]) 7283beef1b22Smrg])# LT_LIB_M 7284b12e5c03Smrg 7285beef1b22Smrg# Old name: 7286beef1b22SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7287beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 7288beef1b22Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7289b12e5c03Smrg 7290b12e5c03Smrg 7291beef1b22Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7292beef1b22Smrg# ------------------------------- 7293beef1b22Smrgm4_defun([_LT_COMPILER_NO_RTTI], 7294beef1b22Smrg[m4_require([_LT_TAG_COMPILER])dnl 7295b12e5c03Smrg 7296beef1b22Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7297beef1b22Smrg 7298beef1b22Smrgif test yes = "$GCC"; then 7299beef1b22Smrg case $cc_basename in 7300beef1b22Smrg nvcc*) 7301beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7302beef1b22Smrg *) 7303beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7304beef1b22Smrg esac 7305beef1b22Smrg 7306beef1b22Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7307beef1b22Smrg lt_cv_prog_compiler_rtti_exceptions, 7308beef1b22Smrg [-fno-rtti -fno-exceptions], [], 7309beef1b22Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7310b12e5c03Smrgfi 7311beef1b22Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7312beef1b22Smrg [Compiler flag to turn off builtin functions]) 7313beef1b22Smrg])# _LT_COMPILER_NO_RTTI 7314b12e5c03Smrg 7315b12e5c03Smrg 7316beef1b22Smrg# _LT_CMD_GLOBAL_SYMBOLS 7317beef1b22Smrg# ---------------------- 7318beef1b22Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7319beef1b22Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7320beef1b22SmrgAC_REQUIRE([AC_PROG_CC])dnl 7321beef1b22SmrgAC_REQUIRE([AC_PROG_AWK])dnl 7322beef1b22SmrgAC_REQUIRE([LT_PATH_NM])dnl 7323beef1b22SmrgAC_REQUIRE([LT_PATH_LD])dnl 7324beef1b22Smrgm4_require([_LT_DECL_SED])dnl 7325beef1b22Smrgm4_require([_LT_DECL_EGREP])dnl 7326beef1b22Smrgm4_require([_LT_TAG_COMPILER])dnl 7327b12e5c03Smrg 7328beef1b22Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7329beef1b22SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7330beef1b22SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7331beef1b22Smrg[ 7332beef1b22Smrg# These are sane defaults that work on at least a few old systems. 7333beef1b22Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7334b12e5c03Smrg 7335beef1b22Smrg# Character class describing NM global symbol codes. 7336beef1b22Smrgsymcode='[[BCDEGRST]]' 733709885543Smrg 7338beef1b22Smrg# Regexp to match symbols that can be accessed directly from C. 7339beef1b22Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 73407104f784Smrg 7341beef1b22Smrg# Define system-specific variables. 7342beef1b22Smrgcase $host_os in 7343beef1b22Smrgaix*) 7344beef1b22Smrg symcode='[[BCDT]]' 7345beef1b22Smrg ;; 7346beef1b22Smrgcygwin* | mingw* | pw32* | cegcc*) 7347beef1b22Smrg symcode='[[ABCDGISTW]]' 7348beef1b22Smrg ;; 7349beef1b22Smrghpux*) 7350beef1b22Smrg if test ia64 = "$host_cpu"; then 7351beef1b22Smrg symcode='[[ABCDEGRST]]' 7352beef1b22Smrg fi 7353beef1b22Smrg ;; 7354beef1b22Smrgirix* | nonstopux*) 7355beef1b22Smrg symcode='[[BCDEGRST]]' 7356beef1b22Smrg ;; 7357beef1b22Smrgosf*) 7358beef1b22Smrg symcode='[[BCDEGQRST]]' 7359beef1b22Smrg ;; 7360beef1b22Smrgsolaris*) 7361beef1b22Smrg symcode='[[BDRT]]' 7362beef1b22Smrg ;; 7363beef1b22Smrgsco3.2v5*) 7364beef1b22Smrg symcode='[[DT]]' 7365beef1b22Smrg ;; 7366beef1b22Smrgsysv4.2uw2*) 7367beef1b22Smrg symcode='[[DT]]' 7368beef1b22Smrg ;; 7369beef1b22Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7370beef1b22Smrg symcode='[[ABDT]]' 7371beef1b22Smrg ;; 7372beef1b22Smrgsysv4) 7373beef1b22Smrg symcode='[[DFNSTU]]' 7374beef1b22Smrg ;; 7375beef1b22Smrgesac 73767104f784Smrg 7377beef1b22Smrg# If we're using GNU nm, then use its standard symbol codes. 7378beef1b22Smrgcase `$NM -V 2>&1` in 7379beef1b22Smrg*GNU* | *'with BFD'*) 7380beef1b22Smrg symcode='[[ABCDGIRSTW]]' ;; 7381beef1b22Smrgesac 73827104f784Smrg 7383beef1b22Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7384beef1b22Smrg # Gets list of data symbols to import. 7385beef1b22Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7386beef1b22Smrg # Adjust the below global symbol transforms to fixup imported variables. 7387beef1b22Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7388beef1b22Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7389beef1b22Smrg lt_c_name_lib_hook="\ 7390beef1b22Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7391beef1b22Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 7392beef1b22Smrgelse 7393beef1b22Smrg # Disable hooks by default. 7394beef1b22Smrg lt_cv_sys_global_symbol_to_import= 7395beef1b22Smrg lt_cdecl_hook= 7396beef1b22Smrg lt_c_name_hook= 7397beef1b22Smrg lt_c_name_lib_hook= 7398beef1b22Smrgfi 73997104f784Smrg 7400beef1b22Smrg# Transform an extracted symbol line into a proper C declaration. 7401beef1b22Smrg# Some systems (esp. on ia64) link data and code symbols differently, 7402beef1b22Smrg# so use this general approach. 7403beef1b22Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7404beef1b22Smrg$lt_cdecl_hook\ 7405beef1b22Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7406beef1b22Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7407e4f6584cSmrg 7408beef1b22Smrg# Transform an extracted symbol line into symbol name and symbol address 7409beef1b22Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7410beef1b22Smrg$lt_c_name_hook\ 7411beef1b22Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7412beef1b22Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7413e4f6584cSmrg 7414beef1b22Smrg# Transform an extracted symbol line into symbol name with lib prefix and 7415beef1b22Smrg# symbol address. 7416beef1b22Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7417beef1b22Smrg$lt_c_name_lib_hook\ 7418beef1b22Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7419beef1b22Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7420beef1b22Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7421beef1b22Smrg 7422beef1b22Smrg# Handle CRLF in mingw tool chain 7423beef1b22Smrgopt_cr= 7424beef1b22Smrgcase $build_os in 7425beef1b22Smrgmingw*) 7426beef1b22Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7427beef1b22Smrg ;; 7428beef1b22Smrgesac 7429e4f6584cSmrg 7430beef1b22Smrg# Try without a prefix underscore, then with it. 7431beef1b22Smrgfor ac_symprfx in "" "_"; do 74327b58d2e0Smrg 7433beef1b22Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7434beef1b22Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 74357b58d2e0Smrg 7436beef1b22Smrg # Write the raw and C identifiers. 7437beef1b22Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7438beef1b22Smrg # Fake it for dumpbin and say T for any non-static function, 7439beef1b22Smrg # D for any global variable and I for any imported variable. 7440beef1b22Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7441beef1b22Smrg # which start with @ or ?. 7442beef1b22Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7443beef1b22Smrg" {last_section=section; section=\$ 3};"\ 7444beef1b22Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7445beef1b22Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7446beef1b22Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7447beef1b22Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7448beef1b22Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7449beef1b22Smrg" \$ 0!~/External *\|/{next};"\ 7450beef1b22Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7451beef1b22Smrg" {if(hide[section]) next};"\ 7452beef1b22Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7453beef1b22Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7454beef1b22Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7455beef1b22Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7456beef1b22Smrg" ' prfx=^$ac_symprfx]" 7457beef1b22Smrg else 7458beef1b22Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7459beef1b22Smrg fi 7460beef1b22Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 74617b58d2e0Smrg 7462beef1b22Smrg # Check to see that the pipe works correctly. 7463beef1b22Smrg pipe_works=no 74647b58d2e0Smrg 7465beef1b22Smrg rm -f conftest* 7466beef1b22Smrg cat > conftest.$ac_ext <<_LT_EOF 7467beef1b22Smrg#ifdef __cplusplus 7468beef1b22Smrgextern "C" { 7469beef1b22Smrg#endif 7470beef1b22Smrgchar nm_test_var; 7471beef1b22Smrgvoid nm_test_func(void); 7472beef1b22Smrgvoid nm_test_func(void){} 7473beef1b22Smrg#ifdef __cplusplus 7474beef1b22Smrg} 7475beef1b22Smrg#endif 7476beef1b22Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 7477beef1b22Smrg_LT_EOF 7478e4f6584cSmrg 7479beef1b22Smrg if AC_TRY_EVAL(ac_compile); then 7480beef1b22Smrg # Now try to grab the symbols. 7481beef1b22Smrg nlist=conftest.nm 7482beef1b22Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7483beef1b22Smrg # Try sorting and uniquifying the output. 7484beef1b22Smrg if sort "$nlist" | uniq > "$nlist"T; then 7485beef1b22Smrg mv -f "$nlist"T "$nlist" 7486beef1b22Smrg else 7487beef1b22Smrg rm -f "$nlist"T 7488beef1b22Smrg fi 7489e4f6584cSmrg 7490beef1b22Smrg # Make sure that we snagged all the symbols we need. 7491beef1b22Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7492beef1b22Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7493beef1b22Smrg cat <<_LT_EOF > conftest.$ac_ext 7494beef1b22Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7495beef1b22Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7496beef1b22Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 7497beef1b22Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 7498beef1b22Smrg# define LT@&t@_DLSYM_CONST 7499beef1b22Smrg#elif defined __osf__ 7500beef1b22Smrg/* This system does not cope well with relocations in const data. */ 7501beef1b22Smrg# define LT@&t@_DLSYM_CONST 7502beef1b22Smrg#else 7503beef1b22Smrg# define LT@&t@_DLSYM_CONST const 7504beef1b22Smrg#endif 7505b12e5c03Smrg 7506beef1b22Smrg#ifdef __cplusplus 7507beef1b22Smrgextern "C" { 7508beef1b22Smrg#endif 7509b12e5c03Smrg 7510beef1b22Smrg_LT_EOF 7511beef1b22Smrg # Now generate the symbol file. 7512beef1b22Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7513e4f6584cSmrg 7514beef1b22Smrg cat <<_LT_EOF >> conftest.$ac_ext 7515e4f6584cSmrg 7516beef1b22Smrg/* The mapping between symbol names and symbols. */ 7517beef1b22SmrgLT@&t@_DLSYM_CONST struct { 7518beef1b22Smrg const char *name; 7519beef1b22Smrg void *address; 7520beef1b22Smrg} 7521beef1b22Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 7522beef1b22Smrg{ 7523beef1b22Smrg { "@PROGRAM@", (void *) 0 }, 7524beef1b22Smrg_LT_EOF 7525beef1b22Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7526beef1b22Smrg cat <<\_LT_EOF >> conftest.$ac_ext 7527beef1b22Smrg {0, (void *) 0} 7528beef1b22Smrg}; 7529e4f6584cSmrg 7530beef1b22Smrg/* This works around a problem in FreeBSD linker */ 7531beef1b22Smrg#ifdef FREEBSD_WORKAROUND 7532beef1b22Smrgstatic const void *lt_preloaded_setup() { 7533beef1b22Smrg return lt__PROGRAM__LTX_preloaded_symbols; 7534beef1b22Smrg} 7535beef1b22Smrg#endif 7536e4f6584cSmrg 7537beef1b22Smrg#ifdef __cplusplus 7538beef1b22Smrg} 7539beef1b22Smrg#endif 7540beef1b22Smrg_LT_EOF 7541beef1b22Smrg # Now try linking the two files. 7542beef1b22Smrg mv conftest.$ac_objext conftstm.$ac_objext 7543beef1b22Smrg lt_globsym_save_LIBS=$LIBS 7544beef1b22Smrg lt_globsym_save_CFLAGS=$CFLAGS 7545beef1b22Smrg LIBS=conftstm.$ac_objext 7546beef1b22Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7547beef1b22Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7548beef1b22Smrg pipe_works=yes 7549beef1b22Smrg fi 7550beef1b22Smrg LIBS=$lt_globsym_save_LIBS 7551beef1b22Smrg CFLAGS=$lt_globsym_save_CFLAGS 7552beef1b22Smrg else 7553beef1b22Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7554beef1b22Smrg fi 7555beef1b22Smrg else 7556beef1b22Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7557beef1b22Smrg fi 7558beef1b22Smrg else 7559beef1b22Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 7560beef1b22Smrg fi 7561beef1b22Smrg else 7562beef1b22Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7563beef1b22Smrg cat conftest.$ac_ext >&5 7564beef1b22Smrg fi 7565beef1b22Smrg rm -rf conftest* conftst* 7566e4f6584cSmrg 7567beef1b22Smrg # Do not use the global_symbol_pipe unless it works. 7568beef1b22Smrg if test yes = "$pipe_works"; then 7569beef1b22Smrg break 7570beef1b22Smrg else 7571beef1b22Smrg lt_cv_sys_global_symbol_pipe= 7572beef1b22Smrg fi 7573beef1b22Smrgdone 75747b58d2e0Smrg]) 7575beef1b22Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 7576beef1b22Smrg lt_cv_sys_global_symbol_to_cdecl= 7577beef1b22Smrgfi 7578beef1b22Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7579beef1b22Smrg AC_MSG_RESULT(failed) 7580beef1b22Smrgelse 7581beef1b22Smrg AC_MSG_RESULT(ok) 7582beef1b22Smrgfi 75832ec8c4b4Smrg 7584beef1b22Smrg# Response file support. 7585beef1b22Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7586beef1b22Smrg nm_file_list_spec='@' 7587beef1b22Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7588beef1b22Smrg nm_file_list_spec='@' 7589beef1b22Smrgfi 759009885543Smrg 7591beef1b22Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7592beef1b22Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 7593beef1b22Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7594beef1b22Smrg [Transform the output of nm in a proper C declaration]) 7595beef1b22Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7596beef1b22Smrg [Transform the output of nm into a list of symbols to manually relocate]) 7597beef1b22Smrg_LT_DECL([global_symbol_to_c_name_address], 7598beef1b22Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 7599beef1b22Smrg [Transform the output of nm in a C name address pair]) 7600beef1b22Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7601beef1b22Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7602beef1b22Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 7603beef1b22Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7604beef1b22Smrg [The name lister interface]) 7605beef1b22Smrg_LT_DECL([], [nm_file_list_spec], [1], 7606beef1b22Smrg [Specify filename containing input files for $NM]) 7607beef1b22Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 7608beef1b22Smrg 7609beef1b22Smrg 7610beef1b22Smrg# _LT_COMPILER_PIC([TAGNAME]) 7611beef1b22Smrg# --------------------------- 7612beef1b22Smrgm4_defun([_LT_COMPILER_PIC], 7613beef1b22Smrg[m4_require([_LT_TAG_COMPILER])dnl 7614beef1b22Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7615beef1b22Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7616beef1b22Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 7617beef1b22Smrg 7618beef1b22Smrgm4_if([$1], [CXX], [ 7619beef1b22Smrg # C++ specific cases for pic, static, wl, etc. 7620beef1b22Smrg if test yes = "$GXX"; then 7621beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7622beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 762309885543Smrg 7624beef1b22Smrg case $host_os in 7625beef1b22Smrg aix*) 7626beef1b22Smrg # All AIX code is PIC. 7627beef1b22Smrg if test ia64 = "$host_cpu"; then 7628beef1b22Smrg # AIX 5 now supports IA64 processor 7629beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7630beef1b22Smrg fi 7631beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7632beef1b22Smrg ;; 7633beef1b22Smrg 7634beef1b22Smrg amigaos*) 7635beef1b22Smrg case $host_cpu in 7636beef1b22Smrg powerpc) 7637beef1b22Smrg # see comment about AmigaOS4 .so support 7638beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7639beef1b22Smrg ;; 7640beef1b22Smrg m68k) 7641beef1b22Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7642beef1b22Smrg # adding the '-m68020' flag to GCC prevents building anything better, 7643beef1b22Smrg # like '-m68040'. 7644beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7645beef1b22Smrg ;; 7646beef1b22Smrg esac 7647beef1b22Smrg ;; 7648beef1b22Smrg 7649beef1b22Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7650beef1b22Smrg # PIC is the default for these OSes. 7651beef1b22Smrg ;; 7652beef1b22Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7653beef1b22Smrg # This hack is so that the source file can tell whether it is being 7654beef1b22Smrg # built for inclusion in a dll (and should export symbols for example). 7655beef1b22Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7656beef1b22Smrg # (--disable-auto-import) libraries 7657beef1b22Smrg m4_if([$1], [GCJ], [], 7658beef1b22Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7659beef1b22Smrg case $host_os in 7660beef1b22Smrg os2*) 7661beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7662beef1b22Smrg ;; 7663beef1b22Smrg esac 7664beef1b22Smrg ;; 7665beef1b22Smrg darwin* | rhapsody*) 7666beef1b22Smrg # PIC is the default on this platform 7667beef1b22Smrg # Common symbols not allowed in MH_DYLIB files 7668beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7669beef1b22Smrg ;; 7670beef1b22Smrg *djgpp*) 7671beef1b22Smrg # DJGPP does not support shared libraries at all 7672beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7673beef1b22Smrg ;; 7674beef1b22Smrg haiku*) 7675beef1b22Smrg # PIC is the default for Haiku. 7676beef1b22Smrg # The "-static" flag exists, but is broken. 7677beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7678beef1b22Smrg ;; 7679beef1b22Smrg interix[[3-9]]*) 7680beef1b22Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7681beef1b22Smrg # Instead, we relocate shared libraries at runtime. 7682beef1b22Smrg ;; 7683beef1b22Smrg sysv4*MP*) 7684beef1b22Smrg if test -d /usr/nec; then 7685beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7686beef1b22Smrg fi 7687beef1b22Smrg ;; 7688beef1b22Smrg hpux*) 7689beef1b22Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7690beef1b22Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7691beef1b22Smrg # sets the default TLS model and affects inlining. 7692beef1b22Smrg case $host_cpu in 7693beef1b22Smrg hppa*64*) 7694beef1b22Smrg ;; 7695beef1b22Smrg *) 7696beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7697beef1b22Smrg ;; 7698beef1b22Smrg esac 7699beef1b22Smrg ;; 7700beef1b22Smrg *qnx* | *nto*) 7701beef1b22Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7702beef1b22Smrg # it will coredump. 7703beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7704beef1b22Smrg ;; 7705beef1b22Smrg *) 7706beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7707beef1b22Smrg ;; 7708beef1b22Smrg esac 7709beef1b22Smrg else 7710beef1b22Smrg case $host_os in 7711beef1b22Smrg aix[[4-9]]*) 7712beef1b22Smrg # All AIX code is PIC. 7713beef1b22Smrg if test ia64 = "$host_cpu"; then 7714beef1b22Smrg # AIX 5 now supports IA64 processor 7715beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7716beef1b22Smrg else 7717beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7718beef1b22Smrg fi 7719beef1b22Smrg ;; 7720beef1b22Smrg chorus*) 7721beef1b22Smrg case $cc_basename in 7722beef1b22Smrg cxch68*) 7723beef1b22Smrg # Green Hills C++ Compiler 7724beef1b22Smrg # _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" 7725beef1b22Smrg ;; 7726beef1b22Smrg esac 7727beef1b22Smrg ;; 7728beef1b22Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7729beef1b22Smrg # This hack is so that the source file can tell whether it is being 7730beef1b22Smrg # built for inclusion in a dll (and should export symbols for example). 7731beef1b22Smrg m4_if([$1], [GCJ], [], 7732beef1b22Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7733beef1b22Smrg ;; 7734beef1b22Smrg dgux*) 7735beef1b22Smrg case $cc_basename in 7736beef1b22Smrg ec++*) 7737beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7738beef1b22Smrg ;; 7739beef1b22Smrg ghcx*) 7740beef1b22Smrg # Green Hills C++ Compiler 7741beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7742beef1b22Smrg ;; 7743beef1b22Smrg *) 7744beef1b22Smrg ;; 7745beef1b22Smrg esac 7746beef1b22Smrg ;; 7747beef1b22Smrg freebsd* | dragonfly* | midnightbsd*) 7748beef1b22Smrg # FreeBSD uses GNU C++ 7749beef1b22Smrg ;; 7750beef1b22Smrg hpux9* | hpux10* | hpux11*) 7751beef1b22Smrg case $cc_basename in 7752beef1b22Smrg CC*) 7753beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7754beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7755beef1b22Smrg if test ia64 != "$host_cpu"; then 7756beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7757beef1b22Smrg fi 7758beef1b22Smrg ;; 7759beef1b22Smrg aCC*) 7760beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7761beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7762beef1b22Smrg case $host_cpu in 7763beef1b22Smrg hppa*64*|ia64*) 7764beef1b22Smrg # +Z the default 7765beef1b22Smrg ;; 7766beef1b22Smrg *) 7767beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7768beef1b22Smrg ;; 7769beef1b22Smrg esac 7770beef1b22Smrg ;; 7771beef1b22Smrg *) 7772beef1b22Smrg ;; 7773beef1b22Smrg esac 7774beef1b22Smrg ;; 7775beef1b22Smrg interix*) 7776beef1b22Smrg # This is c89, which is MS Visual C++ (no shared libs) 7777beef1b22Smrg # Anyone wants to do a port? 7778beef1b22Smrg ;; 7779beef1b22Smrg irix5* | irix6* | nonstopux*) 7780beef1b22Smrg case $cc_basename in 7781beef1b22Smrg CC*) 7782beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7783beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7784beef1b22Smrg # CC pic flag -KPIC is the default. 7785beef1b22Smrg ;; 7786beef1b22Smrg *) 7787beef1b22Smrg ;; 7788beef1b22Smrg esac 7789beef1b22Smrg ;; 7790beef1b22Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7791beef1b22Smrg case $cc_basename in 7792beef1b22Smrg KCC*) 7793beef1b22Smrg # KAI C++ Compiler 7794beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7795beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7796beef1b22Smrg ;; 7797beef1b22Smrg ecpc* ) 7798beef1b22Smrg # old Intel C++ for x86_64, which still supported -KPIC. 7799beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7800beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7801beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7802beef1b22Smrg ;; 7803beef1b22Smrg icpc* ) 7804beef1b22Smrg # Intel C++, used to be incompatible with GCC. 7805beef1b22Smrg # ICC 10 doesn't accept -KPIC any more. 7806beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7807beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7808beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7809beef1b22Smrg ;; 7810beef1b22Smrg pgCC* | pgcpp*) 7811beef1b22Smrg # Portland Group C++ compiler 7812beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7813beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7814beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7815beef1b22Smrg ;; 7816beef1b22Smrg cxx*) 7817beef1b22Smrg # Compaq C++ 7818beef1b22Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7819beef1b22Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7820beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7821beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7822beef1b22Smrg ;; 7823beef1b22Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7824beef1b22Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 7825beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7826beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7827beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7828beef1b22Smrg ;; 7829beef1b22Smrg *) 7830beef1b22Smrg case `$CC -V 2>&1 | $SED 5q` in 7831beef1b22Smrg *Sun\ C*) 7832beef1b22Smrg # Sun C++ 5.9 7833beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7834beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7835beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7836beef1b22Smrg ;; 7837beef1b22Smrg esac 7838beef1b22Smrg ;; 7839beef1b22Smrg esac 7840beef1b22Smrg ;; 7841beef1b22Smrg lynxos*) 7842beef1b22Smrg ;; 7843beef1b22Smrg m88k*) 7844beef1b22Smrg ;; 7845beef1b22Smrg mvs*) 7846beef1b22Smrg case $cc_basename in 7847beef1b22Smrg cxx*) 7848beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7849beef1b22Smrg ;; 7850beef1b22Smrg *) 7851beef1b22Smrg ;; 7852beef1b22Smrg esac 7853beef1b22Smrg ;; 7854beef1b22Smrg netbsd*) 7855beef1b22Smrg ;; 7856beef1b22Smrg *qnx* | *nto*) 7857beef1b22Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7858beef1b22Smrg # it will coredump. 7859beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7860beef1b22Smrg ;; 7861beef1b22Smrg osf3* | osf4* | osf5*) 7862beef1b22Smrg case $cc_basename in 7863beef1b22Smrg KCC*) 7864beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7865beef1b22Smrg ;; 7866beef1b22Smrg RCC*) 7867beef1b22Smrg # Rational C++ 2.4.1 7868beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7869beef1b22Smrg ;; 7870beef1b22Smrg cxx*) 7871beef1b22Smrg # Digital/Compaq C++ 7872beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7873beef1b22Smrg # Make sure the PIC flag is empty. It appears that all Alpha 7874beef1b22Smrg # Linux and Compaq Tru64 Unix objects are PIC. 7875beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7876beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7877beef1b22Smrg ;; 7878beef1b22Smrg *) 7879beef1b22Smrg ;; 7880beef1b22Smrg esac 7881beef1b22Smrg ;; 7882beef1b22Smrg psos*) 7883beef1b22Smrg ;; 7884beef1b22Smrg solaris*) 7885beef1b22Smrg case $cc_basename in 7886beef1b22Smrg CC* | sunCC*) 7887beef1b22Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7888beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7889beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7890beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7891beef1b22Smrg ;; 7892beef1b22Smrg gcx*) 7893beef1b22Smrg # Green Hills C++ Compiler 7894beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7895beef1b22Smrg ;; 7896beef1b22Smrg *) 7897beef1b22Smrg ;; 7898beef1b22Smrg esac 7899beef1b22Smrg ;; 7900beef1b22Smrg sunos4*) 7901beef1b22Smrg case $cc_basename in 7902beef1b22Smrg CC*) 7903beef1b22Smrg # Sun C++ 4.x 7904beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7905beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7906beef1b22Smrg ;; 7907beef1b22Smrg lcc*) 7908beef1b22Smrg # Lucid 7909beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7910beef1b22Smrg ;; 7911beef1b22Smrg *) 7912beef1b22Smrg ;; 7913beef1b22Smrg esac 7914beef1b22Smrg ;; 7915beef1b22Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7916beef1b22Smrg case $cc_basename in 7917beef1b22Smrg CC*) 7918beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7919beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7920beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7921beef1b22Smrg ;; 7922beef1b22Smrg esac 7923beef1b22Smrg ;; 7924beef1b22Smrg tandem*) 7925beef1b22Smrg case $cc_basename in 7926beef1b22Smrg NCC*) 7927beef1b22Smrg # NonStop-UX NCC 3.20 7928beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7929beef1b22Smrg ;; 7930beef1b22Smrg *) 7931beef1b22Smrg ;; 7932beef1b22Smrg esac 7933beef1b22Smrg ;; 7934beef1b22Smrg vxworks*) 7935beef1b22Smrg ;; 7936beef1b22Smrg *) 7937beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7938beef1b22Smrg ;; 7939beef1b22Smrg esac 7940beef1b22Smrg fi 7941beef1b22Smrg], 7942beef1b22Smrg[ 7943beef1b22Smrg if test yes = "$GCC"; then 7944beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7945beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 794609885543Smrg 7947beef1b22Smrg case $host_os in 7948beef1b22Smrg aix*) 7949beef1b22Smrg # All AIX code is PIC. 7950beef1b22Smrg if test ia64 = "$host_cpu"; then 7951beef1b22Smrg # AIX 5 now supports IA64 processor 7952beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 79537b58d2e0Smrg fi 7954beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7955beef1b22Smrg ;; 795609885543Smrg 7957beef1b22Smrg amigaos*) 7958beef1b22Smrg case $host_cpu in 7959beef1b22Smrg powerpc) 7960beef1b22Smrg # see comment about AmigaOS4 .so support 7961beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7962beef1b22Smrg ;; 7963beef1b22Smrg m68k) 7964beef1b22Smrg # FIXME: we need at least 68020 code to build shared libraries, but 7965beef1b22Smrg # adding the '-m68020' flag to GCC prevents building anything better, 7966beef1b22Smrg # like '-m68040'. 7967beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7968beef1b22Smrg ;; 7969beef1b22Smrg esac 7970beef1b22Smrg ;; 797109885543Smrg 7972beef1b22Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7973beef1b22Smrg # PIC is the default for these OSes. 7974beef1b22Smrg ;; 7975e4f6584cSmrg 7976beef1b22Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 7977beef1b22Smrg # This hack is so that the source file can tell whether it is being 7978beef1b22Smrg # built for inclusion in a dll (and should export symbols for example). 7979beef1b22Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7980beef1b22Smrg # (--disable-auto-import) libraries 7981beef1b22Smrg m4_if([$1], [GCJ], [], 7982beef1b22Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7983beef1b22Smrg case $host_os in 7984beef1b22Smrg os2*) 7985beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7986beef1b22Smrg ;; 7987beef1b22Smrg esac 7988beef1b22Smrg ;; 7989e4f6584cSmrg 7990beef1b22Smrg darwin* | rhapsody*) 7991beef1b22Smrg # PIC is the default on this platform 7992beef1b22Smrg # Common symbols not allowed in MH_DYLIB files 7993beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7994beef1b22Smrg ;; 79957b58d2e0Smrg 7996beef1b22Smrg haiku*) 7997beef1b22Smrg # PIC is the default for Haiku. 7998beef1b22Smrg # The "-static" flag exists, but is broken. 7999beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 8000beef1b22Smrg ;; 80017b58d2e0Smrg 8002beef1b22Smrg hpux*) 8003beef1b22Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8004beef1b22Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8005beef1b22Smrg # sets the default TLS model and affects inlining. 8006beef1b22Smrg case $host_cpu in 8007beef1b22Smrg hppa*64*) 8008beef1b22Smrg # +Z the default 8009beef1b22Smrg ;; 8010beef1b22Smrg *) 8011beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8012beef1b22Smrg ;; 8013beef1b22Smrg esac 8014beef1b22Smrg ;; 8015b12e5c03Smrg 8016beef1b22Smrg interix[[3-9]]*) 8017beef1b22Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8018beef1b22Smrg # Instead, we relocate shared libraries at runtime. 8019beef1b22Smrg ;; 802009885543Smrg 8021beef1b22Smrg msdosdjgpp*) 8022beef1b22Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 8023beef1b22Smrg # on systems that don't support them. 8024beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8025beef1b22Smrg enable_shared=no 8026beef1b22Smrg ;; 8027e4f6584cSmrg 8028beef1b22Smrg *nto* | *qnx*) 8029beef1b22Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8030beef1b22Smrg # it will coredump. 8031beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8032beef1b22Smrg ;; 8033e4f6584cSmrg 8034beef1b22Smrg sysv4*MP*) 8035beef1b22Smrg if test -d /usr/nec; then 8036beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8037beef1b22Smrg fi 8038beef1b22Smrg ;; 8039e4f6584cSmrg 8040beef1b22Smrg *) 8041beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8042beef1b22Smrg ;; 8043beef1b22Smrg esac 804409885543Smrg 8045beef1b22Smrg case $cc_basename in 8046beef1b22Smrg nvcc*) # Cuda Compiler Driver 2.2 8047beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8048beef1b22Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8049beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8050beef1b22Smrg fi 8051beef1b22Smrg ;; 8052beef1b22Smrg esac 8053beef1b22Smrg else 8054beef1b22Smrg # PORTME Check for flag to pass linker flags through the system compiler. 8055beef1b22Smrg case $host_os in 8056beef1b22Smrg aix*) 8057beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8058beef1b22Smrg if test ia64 = "$host_cpu"; then 8059beef1b22Smrg # AIX 5 now supports IA64 processor 8060beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8061beef1b22Smrg else 8062beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8063beef1b22Smrg fi 8064beef1b22Smrg ;; 806509885543Smrg 8066beef1b22Smrg darwin* | rhapsody*) 8067beef1b22Smrg # PIC is the default on this platform 8068beef1b22Smrg # Common symbols not allowed in MH_DYLIB files 8069beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8070beef1b22Smrg case $cc_basename in 8071beef1b22Smrg nagfor*) 8072beef1b22Smrg # NAG Fortran compiler 8073beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8074beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8075beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8076beef1b22Smrg ;; 8077beef1b22Smrg esac 8078beef1b22Smrg ;; 807909885543Smrg 8080beef1b22Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8081beef1b22Smrg # This hack is so that the source file can tell whether it is being 8082beef1b22Smrg # built for inclusion in a dll (and should export symbols for example). 8083beef1b22Smrg m4_if([$1], [GCJ], [], 8084beef1b22Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8085beef1b22Smrg case $host_os in 8086beef1b22Smrg os2*) 8087beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8088beef1b22Smrg ;; 8089beef1b22Smrg esac 8090beef1b22Smrg ;; 8091e4f6584cSmrg 8092beef1b22Smrg hpux9* | hpux10* | hpux11*) 8093beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8094beef1b22Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8095beef1b22Smrg # not for PA HP-UX. 8096beef1b22Smrg case $host_cpu in 8097beef1b22Smrg hppa*64*|ia64*) 8098beef1b22Smrg # +Z the default 8099beef1b22Smrg ;; 8100beef1b22Smrg *) 8101beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8102beef1b22Smrg ;; 8103beef1b22Smrg esac 8104beef1b22Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8105beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8106beef1b22Smrg ;; 8107e4f6584cSmrg 8108beef1b22Smrg irix5* | irix6* | nonstopux*) 8109beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8110beef1b22Smrg # PIC (with -KPIC) is the default. 8111beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8112beef1b22Smrg ;; 811309885543Smrg 8114beef1b22Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8115beef1b22Smrg case $cc_basename in 8116beef1b22Smrg # old Intel for x86_64, which still supported -KPIC. 8117beef1b22Smrg ecc*) 8118beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8119beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8120beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8121beef1b22Smrg ;; 8122beef1b22Smrg # icc used to be incompatible with GCC. 8123beef1b22Smrg # ICC 10 doesn't accept -KPIC any more. 8124beef1b22Smrg icc* | ifort*) 8125beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8126beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8127beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8128beef1b22Smrg ;; 8129beef1b22Smrg # Lahey Fortran 8.1. 8130beef1b22Smrg lf95*) 8131beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8132beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8133beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8134beef1b22Smrg ;; 8135beef1b22Smrg nagfor*) 8136beef1b22Smrg # NAG Fortran compiler 8137beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8138beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8139beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8140beef1b22Smrg ;; 8141beef1b22Smrg tcc*) 8142beef1b22Smrg # Fabrice Bellard et al's Tiny C Compiler 8143beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8144beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8145beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8146beef1b22Smrg ;; 8147beef1b22Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8148beef1b22Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 8149beef1b22Smrg # which looks to be a dead project) 8150beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8151beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8152beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8153beef1b22Smrg ;; 8154beef1b22Smrg ccc*) 8155beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8156beef1b22Smrg # All Alpha code is PIC. 8157beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8158beef1b22Smrg ;; 8159beef1b22Smrg xl* | bgxl* | bgf* | mpixl*) 8160beef1b22Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8161beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8162beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8163beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8164beef1b22Smrg ;; 8165beef1b22Smrg *) 8166beef1b22Smrg case `$CC -V 2>&1 | $SED 5q` in 8167beef1b22Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8168beef1b22Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8169beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8170beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8171beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8172beef1b22Smrg ;; 8173beef1b22Smrg *Sun\ F* | *Sun*Fortran*) 8174beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8175beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8176beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8177beef1b22Smrg ;; 8178beef1b22Smrg *Sun\ C*) 8179beef1b22Smrg # Sun C 5.9 8180beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8181beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8182beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8183beef1b22Smrg ;; 8184beef1b22Smrg *Intel*\ [[CF]]*Compiler*) 8185beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8186beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8187beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8188beef1b22Smrg ;; 8189beef1b22Smrg *Portland\ Group*) 8190beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8191beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8192beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8193beef1b22Smrg ;; 8194beef1b22Smrg esac 8195beef1b22Smrg ;; 8196beef1b22Smrg esac 8197beef1b22Smrg ;; 819809885543Smrg 8199beef1b22Smrg newsos6) 8200beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8201beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8202beef1b22Smrg ;; 820309885543Smrg 8204beef1b22Smrg *nto* | *qnx*) 8205beef1b22Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8206beef1b22Smrg # it will coredump. 8207beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8208beef1b22Smrg ;; 8209e4f6584cSmrg 8210beef1b22Smrg osf3* | osf4* | osf5*) 8211beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8212beef1b22Smrg # All OSF/1 code is PIC. 8213beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8214beef1b22Smrg ;; 821509885543Smrg 8216beef1b22Smrg rdos*) 8217beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8218beef1b22Smrg ;; 821909885543Smrg 8220beef1b22Smrg solaris*) 8221beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8222beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8223beef1b22Smrg case $cc_basename in 8224beef1b22Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8225beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8226beef1b22Smrg *) 8227beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8228beef1b22Smrg esac 8229beef1b22Smrg ;; 823009885543Smrg 8231beef1b22Smrg sunos4*) 8232beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8233beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8234beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8235beef1b22Smrg ;; 823609885543Smrg 8237beef1b22Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 8238beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8239beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8240beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8241beef1b22Smrg ;; 82427b58d2e0Smrg 8243beef1b22Smrg sysv4*MP*) 8244beef1b22Smrg if test -d /usr/nec; then 8245beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8246beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8247beef1b22Smrg fi 8248beef1b22Smrg ;; 82497b58d2e0Smrg 8250beef1b22Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8251beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8252beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8253beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8254beef1b22Smrg ;; 82557b58d2e0Smrg 8256beef1b22Smrg unicos*) 8257beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8258beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8259beef1b22Smrg ;; 82607b58d2e0Smrg 8261beef1b22Smrg uts4*) 8262beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8263beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8264beef1b22Smrg ;; 8265e4f6584cSmrg 8266beef1b22Smrg *) 8267beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8268beef1b22Smrg ;; 8269beef1b22Smrg esac 8270beef1b22Smrg fi 82717b58d2e0Smrg]) 8272beef1b22Smrgcase $host_os in 8273beef1b22Smrg # For platforms that do not support PIC, -DPIC is meaningless: 8274beef1b22Smrg *djgpp*) 8275beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8276beef1b22Smrg ;; 8277beef1b22Smrg *) 8278beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8279beef1b22Smrg ;; 8280beef1b22Smrgesac 8281e4f6584cSmrg 8282beef1b22SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8283beef1b22Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8284beef1b22Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8285beef1b22Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8286e4f6584cSmrg 8287beef1b22Smrg# 8288beef1b22Smrg# Check to make sure the PIC flag actually works. 8289beef1b22Smrg# 8290beef1b22Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8291beef1b22Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8292beef1b22Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8293beef1b22Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8294beef1b22Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8295beef1b22Smrg "" | " "*) ;; 8296beef1b22Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8297beef1b22Smrg esac], 8298beef1b22Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8299beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8300beef1b22Smrgfi 8301beef1b22Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8302beef1b22Smrg [Additional compiler flags for building library objects]) 8303e4f6584cSmrg 8304beef1b22Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8305beef1b22Smrg [How to pass a linker flag through the compiler]) 8306beef1b22Smrg# 8307beef1b22Smrg# Check to make sure the static flag actually works. 8308beef1b22Smrg# 8309beef1b22Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8310beef1b22Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8311beef1b22Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8312beef1b22Smrg $lt_tmp_static_flag, 8313beef1b22Smrg [], 8314beef1b22Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8315beef1b22Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8316beef1b22Smrg [Compiler flag to prevent dynamic linking]) 8317beef1b22Smrg])# _LT_COMPILER_PIC 8318e4f6584cSmrg 8319e4f6584cSmrg 8320beef1b22Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 8321beef1b22Smrg# ---------------------------- 8322beef1b22Smrg# See if the linker supports building shared libraries. 8323beef1b22Smrgm4_defun([_LT_LINKER_SHLIBS], 8324beef1b22Smrg[AC_REQUIRE([LT_PATH_LD])dnl 8325beef1b22SmrgAC_REQUIRE([LT_PATH_NM])dnl 8326beef1b22Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8327beef1b22Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8328beef1b22Smrgm4_require([_LT_DECL_EGREP])dnl 8329beef1b22Smrgm4_require([_LT_DECL_SED])dnl 8330beef1b22Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8331beef1b22Smrgm4_require([_LT_TAG_COMPILER])dnl 8332beef1b22SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8333beef1b22Smrgm4_if([$1], [CXX], [ 8334beef1b22Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8335beef1b22Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8336beef1b22Smrg case $host_os in 8337beef1b22Smrg aix[[4-9]]*) 8338beef1b22Smrg # If we're using GNU nm, then we don't want the "-C" option. 8339beef1b22Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8340beef1b22Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8341beef1b22Smrg # weak defined symbols like other global defined symbols, whereas 8342beef1b22Smrg # GNU nm marks them as "W". 8343beef1b22Smrg # While the 'weak' keyword is ignored in the Export File, we need 8344beef1b22Smrg # it in the Import File for the 'aix-soname' feature, so we have 8345beef1b22Smrg # to replace the "-B" option with "-P" for AIX nm. 8346beef1b22Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8347beef1b22Smrg _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' 8348beef1b22Smrg else 8349beef1b22Smrg _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' 8350beef1b22Smrg fi 8351beef1b22Smrg ;; 8352beef1b22Smrg pw32*) 8353beef1b22Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8354beef1b22Smrg ;; 8355beef1b22Smrg cygwin* | mingw* | cegcc*) 8356beef1b22Smrg case $cc_basename in 8357beef1b22Smrg cl* | icl*) 8358beef1b22Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8359beef1b22Smrg ;; 8360beef1b22Smrg *) 8361beef1b22Smrg _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' 8362beef1b22Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8363beef1b22Smrg ;; 8364beef1b22Smrg esac 8365beef1b22Smrg ;; 8366beef1b22Smrg *) 8367beef1b22Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8368beef1b22Smrg ;; 8369beef1b22Smrg esac 8370beef1b22Smrg], [ 8371beef1b22Smrg runpath_var= 8372beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 8373beef1b22Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8374beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)= 8375beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8376beef1b22Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 8377beef1b22Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8378beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8379beef1b22Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8380beef1b22Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 8381beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8382beef1b22Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8383beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8384beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8385beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8386beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8387beef1b22Smrg _LT_TAGVAR(inherit_rpath, $1)=no 8388beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8389beef1b22Smrg _LT_TAGVAR(module_cmds, $1)= 8390beef1b22Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 8391beef1b22Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8392beef1b22Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8393beef1b22Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8394beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8395beef1b22Smrg # include_expsyms should be a list of space-separated symbols to be *always* 8396beef1b22Smrg # included in the symbol list 8397beef1b22Smrg _LT_TAGVAR(include_expsyms, $1)= 8398beef1b22Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 8399beef1b22Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8400beef1b22Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8401beef1b22Smrg # as well as any symbol that contains 'd'. 8402beef1b22Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8403beef1b22Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8404beef1b22Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 8405beef1b22Smrg # the symbol is explicitly referenced. Since portable code cannot 8406beef1b22Smrg # rely on this symbol name, it's probably fine to never include it in 8407beef1b22Smrg # preloaded symbol tables. 8408beef1b22Smrg # Exclude shared library initialization/finalization symbols. 8409beef1b22Smrgdnl Note also adjust exclude_expsyms for C++ above. 8410beef1b22Smrg extract_expsyms_cmds= 8411beef1b22Smrg 8412beef1b22Smrg case $host_os in 8413beef1b22Smrg cygwin* | mingw* | pw32* | cegcc*) 8414beef1b22Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8415beef1b22Smrg # When not using gcc, we currently assume that we are using 8416beef1b22Smrg # Microsoft Visual C++ or Intel C++ Compiler. 8417beef1b22Smrg if test yes != "$GCC"; then 8418beef1b22Smrg with_gnu_ld=no 8419beef1b22Smrg fi 8420beef1b22Smrg ;; 8421beef1b22Smrg interix*) 8422beef1b22Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8423beef1b22Smrg with_gnu_ld=yes 8424beef1b22Smrg ;; 8425beef1b22Smrg openbsd* | bitrig*) 8426beef1b22Smrg with_gnu_ld=no 8427beef1b22Smrg ;; 8428beef1b22Smrg esac 8429beef1b22Smrg 8430beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8431e4f6584cSmrg 8432beef1b22Smrg # On some targets, GNU ld is compatible enough with the native linker 8433beef1b22Smrg # that we're better off using the native interface for both. 8434beef1b22Smrg lt_use_gnu_ld_interface=no 8435beef1b22Smrg if test yes = "$with_gnu_ld"; then 8436beef1b22Smrg case $host_os in 8437beef1b22Smrg aix*) 8438beef1b22Smrg # The AIX port of GNU ld has always aspired to compatibility 8439beef1b22Smrg # with the native linker. However, as the warning in the GNU ld 8440beef1b22Smrg # block says, versions before 2.19.5* couldn't really create working 8441beef1b22Smrg # shared libraries, regardless of the interface used. 8442beef1b22Smrg case `$LD -v 2>&1` in 8443beef1b22Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8444beef1b22Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8445beef1b22Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8446beef1b22Smrg *) 8447beef1b22Smrg lt_use_gnu_ld_interface=yes 8448beef1b22Smrg ;; 8449beef1b22Smrg esac 8450beef1b22Smrg ;; 8451beef1b22Smrg *) 8452beef1b22Smrg lt_use_gnu_ld_interface=yes 8453beef1b22Smrg ;; 8454beef1b22Smrg esac 8455beef1b22Smrg fi 8456e4f6584cSmrg 8457beef1b22Smrg if test yes = "$lt_use_gnu_ld_interface"; then 8458beef1b22Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 8459beef1b22Smrg wlarc='$wl' 8460e4f6584cSmrg 8461beef1b22Smrg # Set some defaults for GNU ld with shared library support. These 8462beef1b22Smrg # are reset later if shared libraries are not supported. Putting them 8463beef1b22Smrg # here allows them to be overridden if necessary. 8464beef1b22Smrg runpath_var=LD_RUN_PATH 8465beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8466beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8467beef1b22Smrg # ancient GNU ld didn't support --whole-archive et. al. 8468beef1b22Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8469beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8470beef1b22Smrg else 8471beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8472beef1b22Smrg fi 8473beef1b22Smrg supports_anon_versioning=no 8474beef1b22Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8475beef1b22Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 8476beef1b22Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8477beef1b22Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8478beef1b22Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8479beef1b22Smrg *\ 2.11.*) ;; # other 2.11 versions 8480beef1b22Smrg *) supports_anon_versioning=yes ;; 8481beef1b22Smrg esac 8482e4f6584cSmrg 8483beef1b22Smrg # See if GNU ld supports shared libraries. 8484beef1b22Smrg case $host_os in 8485beef1b22Smrg aix[[3-9]]*) 8486beef1b22Smrg # On AIX/PPC, the GNU linker is very broken 8487beef1b22Smrg if test ia64 != "$host_cpu"; then 8488beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8489beef1b22Smrg cat <<_LT_EOF 1>&2 8490e4f6584cSmrg 8491beef1b22Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 8492beef1b22Smrg*** to be unable to reliably create shared libraries on AIX. 8493beef1b22Smrg*** Therefore, libtool is disabling shared libraries support. If you 8494beef1b22Smrg*** really care for shared libraries, you may want to install binutils 8495beef1b22Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8496beef1b22Smrg*** You will then need to restart the configuration process. 8497e4f6584cSmrg 8498beef1b22Smrg_LT_EOF 8499beef1b22Smrg fi 85007b58d2e0Smrg ;; 8501e4f6584cSmrg 8502beef1b22Smrg amigaos*) 8503beef1b22Smrg case $host_cpu in 8504beef1b22Smrg powerpc) 8505beef1b22Smrg # see comment about AmigaOS4 .so support 8506beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8507beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8508beef1b22Smrg ;; 8509beef1b22Smrg m68k) 8510beef1b22Smrg _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)' 8511beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8512beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8513beef1b22Smrg ;; 8514beef1b22Smrg esac 8515beef1b22Smrg ;; 8516e4f6584cSmrg 8517beef1b22Smrg beos*) 8518beef1b22Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8519beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8520beef1b22Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8521beef1b22Smrg # support --undefined. This deserves some investigation. FIXME 8522beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8523beef1b22Smrg else 8524beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8525beef1b22Smrg fi 8526beef1b22Smrg ;; 8527e4f6584cSmrg 8528beef1b22Smrg cygwin* | mingw* | pw32* | cegcc*) 8529beef1b22Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8530beef1b22Smrg # as there is no search path for DLLs. 8531beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8532beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8533beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8534beef1b22Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8535beef1b22Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8536beef1b22Smrg _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' 8537beef1b22Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8538e4f6584cSmrg 8539beef1b22Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8540beef1b22Smrg _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' 8541beef1b22Smrg # If the export-symbols file already is a .def file, use it as 8542beef1b22Smrg # is; otherwise, prepend EXPORTS... 8543beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8544beef1b22Smrg cp $export_symbols $output_objdir/$soname.def; 8545beef1b22Smrg else 8546beef1b22Smrg echo EXPORTS > $output_objdir/$soname.def; 8547beef1b22Smrg cat $export_symbols >> $output_objdir/$soname.def; 8548beef1b22Smrg fi~ 8549beef1b22Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8550beef1b22Smrg else 8551beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8552beef1b22Smrg fi 8553beef1b22Smrg ;; 8554e4f6584cSmrg 8555beef1b22Smrg haiku*) 8556beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8557beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8558beef1b22Smrg ;; 85597b58d2e0Smrg 8560beef1b22Smrg os2*) 8561beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8562beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8563beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8564beef1b22Smrg shrext_cmds=.dll 8565beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8566beef1b22Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8567beef1b22Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8568beef1b22Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8569beef1b22Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8570beef1b22Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8571beef1b22Smrg emximp -o $lib $output_objdir/$libname.def' 8572beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8573beef1b22Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8574beef1b22Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8575beef1b22Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8576beef1b22Smrg prefix_cmds="$SED"~ 8577beef1b22Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 8578beef1b22Smrg prefix_cmds="$prefix_cmds -e 1d"; 8579beef1b22Smrg fi~ 8580beef1b22Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8581beef1b22Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8582beef1b22Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8583beef1b22Smrg emximp -o $lib $output_objdir/$libname.def' 8584beef1b22Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8585beef1b22Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8586beef1b22Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8587beef1b22Smrg ;; 8588beef1b22Smrg 8589beef1b22Smrg interix[[3-9]]*) 8590beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8591beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8592beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8593beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8594beef1b22Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8595beef1b22Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8596beef1b22Smrg # default) and relocated if they conflict, which is a slow very memory 8597beef1b22Smrg # consuming and fragmenting process. To avoid this, we pick a random, 8598beef1b22Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8599beef1b22Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8600beef1b22Smrg _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' 8601beef1b22Smrg _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' 8602beef1b22Smrg ;; 8603e4f6584cSmrg 8604beef1b22Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8605beef1b22Smrg tmp_diet=no 8606beef1b22Smrg if test linux-dietlibc = "$host_os"; then 8607beef1b22Smrg case $cc_basename in 8608beef1b22Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8609beef1b22Smrg esac 8610beef1b22Smrg fi 8611beef1b22Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8612beef1b22Smrg && test no = "$tmp_diet" 8613beef1b22Smrg then 8614beef1b22Smrg tmp_addflag=' $pic_flag' 8615beef1b22Smrg tmp_sharedflag='-shared' 8616beef1b22Smrg case $cc_basename,$host_cpu in 8617beef1b22Smrg pgcc*) # Portland Group C compiler 8618beef1b22Smrg _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' 8619beef1b22Smrg tmp_addflag=' $pic_flag' 8620beef1b22Smrg ;; 8621beef1b22Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 8622beef1b22Smrg # Portland Group f77 and f90 compilers 8623beef1b22Smrg _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' 8624beef1b22Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 8625beef1b22Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8626beef1b22Smrg tmp_addflag=' -i_dynamic' ;; 8627beef1b22Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8628beef1b22Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 8629beef1b22Smrg ifc* | ifort*) # Intel Fortran compiler 8630beef1b22Smrg tmp_addflag=' -nofor_main' ;; 8631beef1b22Smrg lf95*) # Lahey Fortran 8.1 8632beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8633beef1b22Smrg tmp_sharedflag='--shared' ;; 8634beef1b22Smrg nagfor*) # NAGFOR 5.3 8635beef1b22Smrg tmp_sharedflag='-Wl,-shared' ;; 8636beef1b22Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8637beef1b22Smrg tmp_sharedflag='-qmkshrobj' 8638beef1b22Smrg tmp_addflag= ;; 8639beef1b22Smrg nvcc*) # Cuda Compiler Driver 2.2 8640beef1b22Smrg _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' 8641beef1b22Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8642beef1b22Smrg ;; 8643beef1b22Smrg esac 8644beef1b22Smrg case `$CC -V 2>&1 | $SED 5q` in 8645beef1b22Smrg *Sun\ C*) # Sun C 5.9 8646beef1b22Smrg _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' 8647beef1b22Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8648beef1b22Smrg tmp_sharedflag='-G' ;; 8649beef1b22Smrg *Sun\ F*) # Sun Fortran 8.3 8650beef1b22Smrg tmp_sharedflag='-G' ;; 8651beef1b22Smrg esac 8652beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8653e4f6584cSmrg 8654beef1b22Smrg if test yes = "$supports_anon_versioning"; then 8655beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8656beef1b22Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8657beef1b22Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8658beef1b22Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8659beef1b22Smrg fi 8660e4f6584cSmrg 8661beef1b22Smrg case $cc_basename in 8662beef1b22Smrg tcc*) 8663beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8664beef1b22Smrg ;; 8665beef1b22Smrg xlf* | bgf* | bgxlf* | mpixlf*) 8666beef1b22Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8667beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8668beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8669beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8670beef1b22Smrg if test yes = "$supports_anon_versioning"; then 8671beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8672beef1b22Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8673beef1b22Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8674beef1b22Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8675beef1b22Smrg fi 8676beef1b22Smrg ;; 8677beef1b22Smrg esac 8678beef1b22Smrg else 8679beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8680beef1b22Smrg fi 8681e4f6584cSmrg ;; 868209885543Smrg 8683beef1b22Smrg netbsd*) 8684beef1b22Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8685beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8686beef1b22Smrg wlarc= 8687beef1b22Smrg else 8688beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8689beef1b22Smrg _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' 8690beef1b22Smrg fi 8691beef1b22Smrg ;; 869209885543Smrg 8693beef1b22Smrg solaris*) 8694beef1b22Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8695beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8696beef1b22Smrg cat <<_LT_EOF 1>&2 869709885543Smrg 8698beef1b22Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8699beef1b22Smrg*** create shared libraries on Solaris systems. Therefore, libtool 8700beef1b22Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 8701beef1b22Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 8702beef1b22Smrg*** your PATH or compiler configuration so that the native linker is 8703beef1b22Smrg*** used, and then restart. 870409885543Smrg 8705beef1b22Smrg_LT_EOF 8706beef1b22Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8707beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8708beef1b22Smrg _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' 8709beef1b22Smrg else 8710beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8711beef1b22Smrg fi 8712beef1b22Smrg ;; 871309885543Smrg 8714beef1b22Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8715beef1b22Smrg case `$LD -v 2>&1` in 8716beef1b22Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8717beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8718beef1b22Smrg cat <<_LT_EOF 1>&2 871909885543Smrg 8720beef1b22Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8721beef1b22Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 8722beef1b22Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 8723beef1b22Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8724beef1b22Smrg*** your PATH or compiler configuration so that the native linker is 8725beef1b22Smrg*** used, and then restart. 8726e4f6584cSmrg 8727beef1b22Smrg_LT_EOF 8728beef1b22Smrg ;; 8729beef1b22Smrg *) 8730beef1b22Smrg # For security reasons, it is highly recommended that you always 8731beef1b22Smrg # use absolute paths for naming shared libraries, and exclude the 8732beef1b22Smrg # DT_RUNPATH tag from executables and libraries. But doing so 8733beef1b22Smrg # requires that you compile everything twice, which is a pain. 8734beef1b22Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8735beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8736beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8737beef1b22Smrg _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' 8738beef1b22Smrg else 8739beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8740beef1b22Smrg fi 8741beef1b22Smrg ;; 8742beef1b22Smrg esac 8743beef1b22Smrg ;; 8744e4f6584cSmrg 8745beef1b22Smrg sunos4*) 8746beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8747beef1b22Smrg wlarc= 8748beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8749beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8750beef1b22Smrg ;; 8751e4f6584cSmrg 87527b58d2e0Smrg *) 8753beef1b22Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8754beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8755beef1b22Smrg _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' 8756beef1b22Smrg else 8757beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8758beef1b22Smrg fi 87597b58d2e0Smrg ;; 8760beef1b22Smrg esac 8761e4f6584cSmrg 8762beef1b22Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8763beef1b22Smrg runpath_var= 8764beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8765beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8766beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8767beef1b22Smrg fi 8768beef1b22Smrg else 8769beef1b22Smrg # PORTME fill in a description of your system's linker (not GNU ld) 8770beef1b22Smrg case $host_os in 8771beef1b22Smrg aix3*) 8772beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8773beef1b22Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8774beef1b22Smrg _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' 8775beef1b22Smrg # Note: this linker hardcodes the directories in LIBPATH if there 8776beef1b22Smrg # are no directories specified by -L. 8777beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8778beef1b22Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8779beef1b22Smrg # Neither direct hardcoding nor static linking is supported with a 8780beef1b22Smrg # broken collect2. 8781beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8782beef1b22Smrg fi 8783beef1b22Smrg ;; 878409885543Smrg 8785beef1b22Smrg aix[[4-9]]*) 8786beef1b22Smrg if test ia64 = "$host_cpu"; then 8787beef1b22Smrg # On IA64, the linker does run time linking by default, so we don't 8788beef1b22Smrg # have to do anything special. 8789beef1b22Smrg aix_use_runtimelinking=no 8790beef1b22Smrg exp_sym_flag='-Bexport' 8791beef1b22Smrg no_entry_flag= 8792beef1b22Smrg else 8793beef1b22Smrg # If we're using GNU nm, then we don't want the "-C" option. 8794beef1b22Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8795beef1b22Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8796beef1b22Smrg # weak defined symbols like other global defined symbols, whereas 8797beef1b22Smrg # GNU nm marks them as "W". 8798beef1b22Smrg # While the 'weak' keyword is ignored in the Export File, we need 8799beef1b22Smrg # it in the Import File for the 'aix-soname' feature, so we have 8800beef1b22Smrg # to replace the "-B" option with "-P" for AIX nm. 8801beef1b22Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8802beef1b22Smrg _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' 8803beef1b22Smrg else 8804beef1b22Smrg _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' 8805beef1b22Smrg fi 8806beef1b22Smrg aix_use_runtimelinking=no 880709885543Smrg 8808beef1b22Smrg # Test if we are trying to use run time linking or normal 8809beef1b22Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8810beef1b22Smrg # have runtime linking enabled, and use it for executables. 8811beef1b22Smrg # For shared libraries, we enable/disable runtime linking 8812beef1b22Smrg # depending on the kind of the shared library created - 8813beef1b22Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 8814beef1b22Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8815beef1b22Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 8816beef1b22Smrg # lib.a static archive 8817beef1b22Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 8818beef1b22Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 8819beef1b22Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8820beef1b22Smrg # lib.a(lib.so.V) shared, rtl:no 8821beef1b22Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8822beef1b22Smrg # lib.a static archive 8823beef1b22Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8824beef1b22Smrg for ld_flag in $LDFLAGS; do 8825beef1b22Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8826beef1b22Smrg aix_use_runtimelinking=yes 8827beef1b22Smrg break 8828beef1b22Smrg fi 8829beef1b22Smrg done 8830beef1b22Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8831beef1b22Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 8832beef1b22Smrg # so we don't have lib.a shared libs to link our executables. 8833beef1b22Smrg # We have to force runtime linking in this case. 8834beef1b22Smrg aix_use_runtimelinking=yes 8835beef1b22Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 8836beef1b22Smrg fi 8837beef1b22Smrg ;; 8838beef1b22Smrg esac 8839beef1b22Smrg 8840beef1b22Smrg exp_sym_flag='-bexport' 8841beef1b22Smrg no_entry_flag='-bnoentry' 8842beef1b22Smrg fi 884309885543Smrg 8844beef1b22Smrg # When large executables or shared objects are built, AIX ld can 8845beef1b22Smrg # have problems creating the table of contents. If linking a library 8846beef1b22Smrg # or program results in "error TOC overflow" add -mminimal-toc to 8847beef1b22Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8848beef1b22Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 884909885543Smrg 8850beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='' 8851beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8852beef1b22Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8853beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8854beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8855beef1b22Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8856beef1b22Smrg case $with_aix_soname,$aix_use_runtimelinking in 8857beef1b22Smrg aix,*) ;; # traditional, no import file 8858beef1b22Smrg svr4,* | *,yes) # use import file 8859beef1b22Smrg # The Import File defines what to hardcode. 8860beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8861beef1b22Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8862beef1b22Smrg ;; 8863beef1b22Smrg esac 88647b58d2e0Smrg 8865beef1b22Smrg if test yes = "$GCC"; then 8866beef1b22Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8867beef1b22Smrg # We only want to do this on AIX 4.2 and lower, the check 8868beef1b22Smrg # below for broken collect2 doesn't work under 4.3+ 8869beef1b22Smrg collect2name=`$CC -print-prog-name=collect2` 8870beef1b22Smrg if test -f "$collect2name" && 8871beef1b22Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8872beef1b22Smrg then 8873beef1b22Smrg # We have reworked collect2 8874beef1b22Smrg : 8875beef1b22Smrg else 8876beef1b22Smrg # We have old collect2 8877beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8878beef1b22Smrg # It fails to find uninstalled libraries when the uninstalled 8879beef1b22Smrg # path is not listed in the libpath. Setting hardcode_minus_L 8880beef1b22Smrg # to unsupported forces relinking 8881beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8882beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8883beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8884beef1b22Smrg fi 8885beef1b22Smrg ;; 8886beef1b22Smrg esac 8887beef1b22Smrg shared_flag='-shared' 8888beef1b22Smrg if test yes = "$aix_use_runtimelinking"; then 8889beef1b22Smrg shared_flag="$shared_flag "'$wl-G' 8890beef1b22Smrg fi 8891beef1b22Smrg # Need to ensure runtime linking is disabled for the traditional 8892beef1b22Smrg # shared library, or the linker may eventually find shared libraries 8893beef1b22Smrg # /with/ Import File - we do not want to mix them. 8894beef1b22Smrg shared_flag_aix='-shared' 8895beef1b22Smrg shared_flag_svr4='-shared $wl-G' 8896beef1b22Smrg else 8897beef1b22Smrg # not using gcc 8898beef1b22Smrg if test ia64 = "$host_cpu"; then 8899beef1b22Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8900beef1b22Smrg # chokes on -Wl,-G. The following line is correct: 8901beef1b22Smrg shared_flag='-G' 8902beef1b22Smrg else 8903beef1b22Smrg if test yes = "$aix_use_runtimelinking"; then 8904beef1b22Smrg shared_flag='$wl-G' 8905beef1b22Smrg else 8906beef1b22Smrg shared_flag='$wl-bM:SRE' 8907beef1b22Smrg fi 8908beef1b22Smrg shared_flag_aix='$wl-bM:SRE' 8909beef1b22Smrg shared_flag_svr4='$wl-G' 8910beef1b22Smrg fi 8911beef1b22Smrg fi 89127b58d2e0Smrg 8913beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 8914beef1b22Smrg # It seems that -bexpall does not export symbols beginning with 8915beef1b22Smrg # underscore (_), so it is better to generate a list of symbols to export. 8916beef1b22Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8917beef1b22Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 8918beef1b22Smrg # Warning - without using the other runtime loading flags (-brtl), 8919beef1b22Smrg # -berok will link without error, but may produce a broken library. 8920beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8921beef1b22Smrg # Determine the default libpath from the value encoded in an 8922beef1b22Smrg # empty executable. 8923beef1b22Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8924beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8925beef1b22Smrg _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 8926beef1b22Smrg else 8927beef1b22Smrg if test ia64 = "$host_cpu"; then 8928beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 8929beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8930beef1b22Smrg _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" 8931beef1b22Smrg else 8932beef1b22Smrg # Determine the default libpath from the value encoded in an 8933beef1b22Smrg # empty executable. 8934beef1b22Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8935beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 8936beef1b22Smrg # Warning - without using the other run time loading flags, 8937beef1b22Smrg # -berok will link without error, but may produce a broken library. 8938beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 8939beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 8940beef1b22Smrg if test yes = "$with_gnu_ld"; then 8941beef1b22Smrg # We only use this code for GNU lds that support --whole-archive. 8942beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 8943beef1b22Smrg else 8944beef1b22Smrg # Exported symbols can be pulled into shared objects from archives 8945beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8946beef1b22Smrg fi 8947beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8948beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 8949beef1b22Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 8950beef1b22Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 8951beef1b22Smrg if test svr4 != "$with_aix_soname"; then 8952beef1b22Smrg # This is similar to how AIX traditionally builds its shared libraries. 8953beef1b22Smrg _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' 8954beef1b22Smrg fi 8955beef1b22Smrg if test aix != "$with_aix_soname"; then 8956beef1b22Smrg _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' 8957beef1b22Smrg else 8958beef1b22Smrg # used by -dlpreopen to get the symbols 8959beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 8960beef1b22Smrg fi 8961beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8962beef1b22Smrg fi 8963beef1b22Smrg fi 8964f395c03eSmrg ;; 8965f395c03eSmrg 8966beef1b22Smrg amigaos*) 8967beef1b22Smrg case $host_cpu in 8968beef1b22Smrg powerpc) 8969beef1b22Smrg # see comment about AmigaOS4 .so support 8970beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8971beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8972beef1b22Smrg ;; 8973beef1b22Smrg m68k) 8974beef1b22Smrg _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)' 8975beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8976beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8977beef1b22Smrg ;; 8978beef1b22Smrg esac 8979beef1b22Smrg ;; 8980f395c03eSmrg 8981beef1b22Smrg bsdi[[45]]*) 8982beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 8983beef1b22Smrg ;; 8984f395c03eSmrg 8985beef1b22Smrg cygwin* | mingw* | pw32* | cegcc*) 8986beef1b22Smrg # When not using gcc, we currently assume that we are using 8987beef1b22Smrg # Microsoft Visual C++ or Intel C++ Compiler. 8988beef1b22Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 8989beef1b22Smrg # no search path for DLLs. 8990beef1b22Smrg case $cc_basename in 8991beef1b22Smrg cl* | icl*) 8992beef1b22Smrg # Native MSVC or ICC 8993beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8994beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8995beef1b22Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8996beef1b22Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8997beef1b22Smrg # Tell ltmain to make .lib files, not .a files. 8998beef1b22Smrg libext=lib 8999beef1b22Smrg # Tell ltmain to make .dll files, not .so files. 9000beef1b22Smrg shrext_cmds=.dll 9001beef1b22Smrg # FIXME: Setting linknames here is a bad hack. 9002beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 9003beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9004beef1b22Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 9005beef1b22Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 9006beef1b22Smrg else 9007beef1b22Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 9008beef1b22Smrg fi~ 9009beef1b22Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 9010beef1b22Smrg linknames=' 9011beef1b22Smrg # The linker will not automatically build a static lib if we build a DLL. 9012beef1b22Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9013beef1b22Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9014beef1b22Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9015beef1b22Smrg _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' 9016beef1b22Smrg # Don't use ranlib 9017beef1b22Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 9018beef1b22Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 9019beef1b22Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 9020beef1b22Smrg case $lt_outputfile in 9021beef1b22Smrg *.exe|*.EXE) ;; 9022beef1b22Smrg *) 9023beef1b22Smrg lt_outputfile=$lt_outputfile.exe 9024beef1b22Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 9025beef1b22Smrg ;; 9026beef1b22Smrg esac~ 9027beef1b22Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9028beef1b22Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9029beef1b22Smrg $RM "$lt_outputfile.manifest"; 9030beef1b22Smrg fi' 9031beef1b22Smrg ;; 9032beef1b22Smrg *) 9033beef1b22Smrg # Assume MSVC and ICC wrapper 9034beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9035beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9036beef1b22Smrg # Tell ltmain to make .lib files, not .a files. 9037beef1b22Smrg libext=lib 9038beef1b22Smrg # Tell ltmain to make .dll files, not .so files. 9039beef1b22Smrg shrext_cmds=.dll 9040beef1b22Smrg # FIXME: Setting linknames here is a bad hack. 9041beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9042beef1b22Smrg # The linker will automatically build a .lib file if we build a DLL. 9043beef1b22Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9044beef1b22Smrg # FIXME: Should let the user specify the lib program. 9045beef1b22Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9046beef1b22Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9047beef1b22Smrg ;; 9048beef1b22Smrg esac 9049b12e5c03Smrg ;; 905009885543Smrg 9051beef1b22Smrg darwin* | rhapsody*) 9052beef1b22Smrg _LT_DARWIN_LINKER_FEATURES($1) 9053beef1b22Smrg ;; 905409885543Smrg 9055beef1b22Smrg dgux*) 9056beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9057beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9058beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9059beef1b22Smrg ;; 906009885543Smrg 9061beef1b22Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9062beef1b22Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 9063beef1b22Smrg # does not break anything, and helps significantly (at the cost of a little 9064beef1b22Smrg # extra space). 9065beef1b22Smrg freebsd2.2*) 9066beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9067beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9068beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9069beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9070beef1b22Smrg ;; 907109885543Smrg 9072beef1b22Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9073beef1b22Smrg freebsd2.*) 9074beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9075beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9076beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9077beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9078beef1b22Smrg ;; 907909885543Smrg 9080beef1b22Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9081beef1b22Smrg freebsd* | dragonfly* | midnightbsd*) 9082beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9083beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9084beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9085beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9086beef1b22Smrg ;; 908709885543Smrg 9088beef1b22Smrg hpux9*) 9089beef1b22Smrg if test yes = "$GCC"; then 9090beef1b22Smrg _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' 9091beef1b22Smrg else 9092beef1b22Smrg _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' 9093beef1b22Smrg fi 9094beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9095beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9096beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 909709885543Smrg 9098beef1b22Smrg # hardcode_minus_L: Not really in the search PATH, 9099beef1b22Smrg # but as the default location of the library. 9100beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9101beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9102beef1b22Smrg ;; 910309885543Smrg 9104beef1b22Smrg hpux10*) 9105beef1b22Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9106beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9107beef1b22Smrg else 9108beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9109beef1b22Smrg fi 9110beef1b22Smrg if test no = "$with_gnu_ld"; then 9111beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9112beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9113beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9114beef1b22Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9115beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9116beef1b22Smrg # hardcode_minus_L: Not really in the search PATH, 9117beef1b22Smrg # but as the default location of the library. 9118beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9119beef1b22Smrg fi 9120beef1b22Smrg ;; 9121e4f6584cSmrg 9122beef1b22Smrg hpux11*) 9123beef1b22Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9124beef1b22Smrg case $host_cpu in 9125beef1b22Smrg hppa*64*) 9126beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9127beef1b22Smrg ;; 9128beef1b22Smrg ia64*) 9129beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9130beef1b22Smrg ;; 9131beef1b22Smrg *) 9132beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9133beef1b22Smrg ;; 9134beef1b22Smrg esac 9135beef1b22Smrg else 9136beef1b22Smrg case $host_cpu in 9137beef1b22Smrg hppa*64*) 9138beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9139beef1b22Smrg ;; 9140beef1b22Smrg ia64*) 9141beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9142beef1b22Smrg ;; 9143beef1b22Smrg *) 9144beef1b22Smrg m4_if($1, [], [ 9145beef1b22Smrg # Older versions of the 11.00 compiler do not understand -b yet 9146beef1b22Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9147beef1b22Smrg _LT_LINKER_OPTION([if $CC understands -b], 9148beef1b22Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9149beef1b22Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9150beef1b22Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9151beef1b22Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9152beef1b22Smrg ;; 9153beef1b22Smrg esac 9154beef1b22Smrg fi 9155beef1b22Smrg if test no = "$with_gnu_ld"; then 9156beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9157beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 915809885543Smrg 9159beef1b22Smrg case $host_cpu in 9160beef1b22Smrg hppa*64*|ia64*) 9161beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9162beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9163beef1b22Smrg ;; 9164beef1b22Smrg *) 9165beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9166beef1b22Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9167beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 916809885543Smrg 9169beef1b22Smrg # hardcode_minus_L: Not really in the search PATH, 9170beef1b22Smrg # but as the default location of the library. 9171beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9172beef1b22Smrg ;; 9173beef1b22Smrg esac 9174beef1b22Smrg fi 9175beef1b22Smrg ;; 917609885543Smrg 9177beef1b22Smrg irix5* | irix6* | nonstopux*) 9178beef1b22Smrg if test yes = "$GCC"; then 9179beef1b22Smrg _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' 9180beef1b22Smrg # Try to use the -exported_symbol ld option, if it does not 9181beef1b22Smrg # work, assume that -exports_file does not work either and 9182beef1b22Smrg # implicitly export all symbols. 9183beef1b22Smrg # This should be the same for all languages, so no per-tag cache variable. 9184beef1b22Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9185beef1b22Smrg [lt_cv_irix_exported_symbol], 9186beef1b22Smrg [save_LDFLAGS=$LDFLAGS 9187beef1b22Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9188beef1b22Smrg AC_LINK_IFELSE( 9189beef1b22Smrg [AC_LANG_SOURCE( 9190beef1b22Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9191beef1b22Smrg [C++], [[int foo (void) { return 0; }]], 9192beef1b22Smrg [Fortran 77], [[ 9193beef1b22Smrg subroutine foo 9194beef1b22Smrg end]], 9195beef1b22Smrg [Fortran], [[ 9196beef1b22Smrg subroutine foo 9197beef1b22Smrg end]])])], 9198beef1b22Smrg [lt_cv_irix_exported_symbol=yes], 9199beef1b22Smrg [lt_cv_irix_exported_symbol=no]) 9200beef1b22Smrg LDFLAGS=$save_LDFLAGS]) 9201beef1b22Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 9202beef1b22Smrg _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' 9203beef1b22Smrg fi 9204beef1b22Smrg else 9205beef1b22Smrg _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' 9206beef1b22Smrg _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' 9207beef1b22Smrg fi 9208beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9209beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9210beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9211beef1b22Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 9212beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9213beef1b22Smrg ;; 921409885543Smrg 9215beef1b22Smrg linux*) 9216beef1b22Smrg case $cc_basename in 9217beef1b22Smrg tcc*) 9218beef1b22Smrg # Fabrice Bellard et al's Tiny C Compiler 9219beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9220beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9221beef1b22Smrg ;; 9222beef1b22Smrg esac 9223beef1b22Smrg ;; 922409885543Smrg 9225beef1b22Smrg netbsd*) 9226beef1b22Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9227beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9228beef1b22Smrg else 9229beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9230beef1b22Smrg fi 9231beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9232beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9233beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9234beef1b22Smrg ;; 923509885543Smrg 9236beef1b22Smrg newsos6) 9237beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9238beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9239beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9240beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9241beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9242beef1b22Smrg ;; 924309885543Smrg 9244beef1b22Smrg *nto* | *qnx*) 9245beef1b22Smrg ;; 924609885543Smrg 9247beef1b22Smrg openbsd* | bitrig*) 9248beef1b22Smrg if test -f /usr/libexec/ld.so; then 9249beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9250beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9251beef1b22Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9252beef1b22Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9253beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9254beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9255beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9256beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9257beef1b22Smrg else 9258beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9259beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9260beef1b22Smrg fi 9261beef1b22Smrg else 9262beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9263beef1b22Smrg fi 9264beef1b22Smrg ;; 92657b58d2e0Smrg 9266beef1b22Smrg os2*) 9267beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9268beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9269beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9270beef1b22Smrg shrext_cmds=.dll 9271beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9272beef1b22Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9273beef1b22Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9274beef1b22Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9275beef1b22Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9276beef1b22Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9277beef1b22Smrg emximp -o $lib $output_objdir/$libname.def' 9278beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9279beef1b22Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9280beef1b22Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9281beef1b22Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9282beef1b22Smrg prefix_cmds="$SED"~ 9283beef1b22Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9284beef1b22Smrg prefix_cmds="$prefix_cmds -e 1d"; 9285beef1b22Smrg fi~ 9286beef1b22Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9287beef1b22Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9288beef1b22Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9289beef1b22Smrg emximp -o $lib $output_objdir/$libname.def' 9290beef1b22Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9291beef1b22Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9292beef1b22Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9293beef1b22Smrg ;; 9294e4f6584cSmrg 9295beef1b22Smrg osf3*) 9296beef1b22Smrg if test yes = "$GCC"; then 9297beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9298beef1b22Smrg _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' 9299beef1b22Smrg else 9300beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9301beef1b22Smrg _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' 9302beef1b22Smrg fi 9303beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9304beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9305beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9306beef1b22Smrg ;; 9307e4f6584cSmrg 9308beef1b22Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9309beef1b22Smrg if test yes = "$GCC"; then 9310beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9311beef1b22Smrg _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' 9312beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9313beef1b22Smrg else 9314beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9315beef1b22Smrg _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' 9316beef1b22Smrg _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~ 9317beef1b22Smrg $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' 931809885543Smrg 9319beef1b22Smrg # Both c and cxx compiler support -rpath directly 9320beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9321beef1b22Smrg fi 9322beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9323beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9324beef1b22Smrg ;; 932509885543Smrg 9326beef1b22Smrg solaris*) 9327beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9328beef1b22Smrg if test yes = "$GCC"; then 9329beef1b22Smrg wlarc='$wl' 9330beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9331beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9332beef1b22Smrg $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' 9333beef1b22Smrg else 9334beef1b22Smrg case `$CC -V 2>&1` in 9335beef1b22Smrg *"Compilers 5.0"*) 9336beef1b22Smrg wlarc='' 9337beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9338beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9339beef1b22Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9340beef1b22Smrg ;; 9341beef1b22Smrg *) 9342beef1b22Smrg wlarc='$wl' 9343beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9344beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9345beef1b22Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9346beef1b22Smrg ;; 9347beef1b22Smrg esac 9348beef1b22Smrg fi 9349beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9350beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9351beef1b22Smrg case $host_os in 9352beef1b22Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9353beef1b22Smrg *) 9354beef1b22Smrg # The compiler driver will combine and reorder linker options, 9355beef1b22Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9356beef1b22Smrg # but is careful enough not to reorder. 9357beef1b22Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9358beef1b22Smrg if test yes = "$GCC"; then 9359beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9360beef1b22Smrg else 9361beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9362beef1b22Smrg fi 9363beef1b22Smrg ;; 9364beef1b22Smrg esac 9365beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9366beef1b22Smrg ;; 936709885543Smrg 9368beef1b22Smrg sunos4*) 9369beef1b22Smrg if test sequent = "$host_vendor"; then 9370beef1b22Smrg # Use $CC to link under sequent, because it throws in some extra .o 9371beef1b22Smrg # files that make .init and .fini sections work. 9372beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9373beef1b22Smrg else 9374beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9375beef1b22Smrg fi 9376beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9377beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9378beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9379beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9380beef1b22Smrg ;; 938109885543Smrg 9382beef1b22Smrg sysv4) 9383beef1b22Smrg case $host_vendor in 9384beef1b22Smrg sni) 9385beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9386beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9387beef1b22Smrg ;; 9388beef1b22Smrg siemens) 9389beef1b22Smrg ## LD is ld it makes a PLAMLIB 9390beef1b22Smrg ## CC just makes a GrossModule. 9391beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9392beef1b22Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9393beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9394beef1b22Smrg ;; 9395beef1b22Smrg motorola) 9396beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9397beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9398beef1b22Smrg ;; 9399beef1b22Smrg esac 9400beef1b22Smrg runpath_var='LD_RUN_PATH' 9401beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9402beef1b22Smrg ;; 940309885543Smrg 9404beef1b22Smrg sysv4.3*) 9405beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9406beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9407beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9408beef1b22Smrg ;; 940909885543Smrg 9410beef1b22Smrg sysv4*MP*) 9411beef1b22Smrg if test -d /usr/nec; then 9412beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9413beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9414beef1b22Smrg runpath_var=LD_RUN_PATH 9415beef1b22Smrg hardcode_runpath_var=yes 9416beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9417beef1b22Smrg fi 9418beef1b22Smrg ;; 9419e4f6584cSmrg 9420beef1b22Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9421beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9422beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9423beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9424beef1b22Smrg runpath_var='LD_RUN_PATH' 942509885543Smrg 9426beef1b22Smrg if test yes = "$GCC"; then 9427beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9428beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9429beef1b22Smrg else 9430beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9431beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9432beef1b22Smrg fi 9433beef1b22Smrg ;; 943409885543Smrg 9435beef1b22Smrg sysv5* | sco3.2v5* | sco5v6*) 9436beef1b22Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 9437beef1b22Smrg # link with -lc, and that would cause any symbols used from libc to 9438beef1b22Smrg # always be unresolved, which means just about no library would 9439beef1b22Smrg # ever link correctly. If we're not using GNU ld we use -z text 9440beef1b22Smrg # though, which does catch some bad symbols but isn't as heavy-handed 9441beef1b22Smrg # as -z defs. 9442beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9443beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9444beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9445beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9446beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9447beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9448beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9449beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9450beef1b22Smrg runpath_var='LD_RUN_PATH' 945109885543Smrg 9452beef1b22Smrg if test yes = "$GCC"; then 9453beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9454beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9455beef1b22Smrg else 9456beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9457beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9458beef1b22Smrg fi 9459beef1b22Smrg ;; 946009885543Smrg 9461beef1b22Smrg uts4*) 9462beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9463beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9464beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9465beef1b22Smrg ;; 946609885543Smrg 9467beef1b22Smrg *) 9468beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9469beef1b22Smrg ;; 9470beef1b22Smrg esac 947109885543Smrg 9472beef1b22Smrg if test sni = "$host_vendor"; then 9473beef1b22Smrg case $host in 9474beef1b22Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9475beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9476beef1b22Smrg ;; 9477beef1b22Smrg esac 9478beef1b22Smrg fi 9479beef1b22Smrg fi 94807b58d2e0Smrg]) 9481beef1b22SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9482beef1b22Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9483e4f6584cSmrg 9484beef1b22Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 94857b58d2e0Smrg 9486beef1b22Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9487beef1b22Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9488beef1b22Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 9489beef1b22Smrg [The commands to extract the exported symbol list from a shared archive]) 94907b58d2e0Smrg 94917b58d2e0Smrg# 9492beef1b22Smrg# Do we need to explicitly link libc? 94937b58d2e0Smrg# 9494beef1b22Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9495beef1b22Smrgx|xyes) 9496beef1b22Smrg # Assume -lc should be added 9497beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 94987b58d2e0Smrg 9499beef1b22Smrg if test yes,yes = "$GCC,$enable_shared"; then 9500beef1b22Smrg case $_LT_TAGVAR(archive_cmds, $1) in 9501beef1b22Smrg *'~'*) 9502beef1b22Smrg # FIXME: we may have to deal with multi-command sequences. 9503beef1b22Smrg ;; 9504beef1b22Smrg '$CC '*) 9505beef1b22Smrg # Test whether the compiler implicitly links with -lc since on some 9506beef1b22Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 9507beef1b22Smrg # to ld, don't add -lc before -lgcc. 9508beef1b22Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9509beef1b22Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9510beef1b22Smrg [$RM conftest* 9511beef1b22Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 95127b58d2e0Smrg 9513beef1b22Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9514beef1b22Smrg soname=conftest 9515beef1b22Smrg lib=conftest 9516beef1b22Smrg libobjs=conftest.$ac_objext 9517beef1b22Smrg deplibs= 9518beef1b22Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9519beef1b22Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9520beef1b22Smrg compiler_flags=-v 9521beef1b22Smrg linker_flags=-v 9522beef1b22Smrg verstring= 9523beef1b22Smrg output_objdir=. 9524beef1b22Smrg libname=conftest 9525beef1b22Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9526beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 9527beef1b22Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9528beef1b22Smrg then 9529beef1b22Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9530beef1b22Smrg else 9531beef1b22Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9532beef1b22Smrg fi 9533beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9534beef1b22Smrg else 9535beef1b22Smrg cat conftest.err 1>&5 9536beef1b22Smrg fi 9537beef1b22Smrg $RM conftest* 9538beef1b22Smrg ]) 9539beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9540beef1b22Smrg ;; 9541beef1b22Smrg esac 9542beef1b22Smrg fi 9543beef1b22Smrg ;; 9544beef1b22Smrgesac 95457b58d2e0Smrg 9546beef1b22Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9547beef1b22Smrg [Whether or not to add -lc for building shared libraries]) 9548beef1b22Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9549beef1b22Smrg [enable_shared_with_static_runtimes], [0], 9550beef1b22Smrg [Whether or not to disallow shared libs when runtime libs are static]) 9551beef1b22Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9552beef1b22Smrg [Compiler flag to allow reflexive dlopens]) 9553beef1b22Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9554beef1b22Smrg [Compiler flag to generate shared objects directly from archives]) 9555beef1b22Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 9556beef1b22Smrg [Whether the compiler copes with passing no objects directly]) 9557beef1b22Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9558beef1b22Smrg [Create an old-style archive from a shared archive]) 9559beef1b22Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9560beef1b22Smrg [Create a temporary old-style archive to link instead of a shared archive]) 9561beef1b22Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9562beef1b22Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9563beef1b22Smrg_LT_TAGDECL([], [module_cmds], [2], 9564beef1b22Smrg [Commands used to build a loadable module if different from building 9565beef1b22Smrg a shared archive.]) 9566beef1b22Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 9567beef1b22Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 9568beef1b22Smrg [Whether we are building with GNU ld or not]) 9569beef1b22Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 9570beef1b22Smrg [Flag that allows shared libraries with undefined symbols to be built]) 9571beef1b22Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 9572beef1b22Smrg [Flag that enforces no undefined symbols]) 9573beef1b22Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9574beef1b22Smrg [Flag to hardcode $libdir into a binary during linking. 9575beef1b22Smrg This must work even if $libdir does not exist]) 9576beef1b22Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9577beef1b22Smrg [Whether we need a single "-rpath" flag with a separated argument]) 9578beef1b22Smrg_LT_TAGDECL([], [hardcode_direct], [0], 9579beef1b22Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9580beef1b22Smrg DIR into the resulting binary]) 9581beef1b22Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9582beef1b22Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9583beef1b22Smrg DIR into the resulting binary and the resulting library dependency is 9584beef1b22Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 9585beef1b22Smrg library is relocated]) 9586beef1b22Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 9587beef1b22Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9588beef1b22Smrg into the resulting binary]) 9589beef1b22Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9590beef1b22Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9591beef1b22Smrg into the resulting binary]) 9592beef1b22Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 9593beef1b22Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 9594beef1b22Smrg into the library and all subsequent libraries and executables linked 9595beef1b22Smrg against it]) 9596beef1b22Smrg_LT_TAGDECL([], [inherit_rpath], [0], 9597beef1b22Smrg [Set to yes if linker adds runtime paths of dependent libraries 9598beef1b22Smrg to runtime path list]) 9599beef1b22Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 9600beef1b22Smrg [Whether libtool must link a program against all its dependency libraries]) 9601beef1b22Smrg_LT_TAGDECL([], [always_export_symbols], [0], 9602beef1b22Smrg [Set to "yes" if exported symbols are required]) 9603beef1b22Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 9604beef1b22Smrg [The commands to list exported symbols]) 9605beef1b22Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 9606beef1b22Smrg [Symbols that should not be listed in the preloaded symbols]) 9607beef1b22Smrg_LT_TAGDECL([], [include_expsyms], [1], 9608beef1b22Smrg [Symbols that must always be exported]) 9609beef1b22Smrg_LT_TAGDECL([], [prelink_cmds], [2], 9610beef1b22Smrg [Commands necessary for linking programs (against libraries) with templates]) 9611beef1b22Smrg_LT_TAGDECL([], [postlink_cmds], [2], 9612beef1b22Smrg [Commands necessary for finishing linking programs]) 9613beef1b22Smrg_LT_TAGDECL([], [file_list_spec], [1], 9614beef1b22Smrg [Specify filename containing input files]) 9615beef1b22Smrgdnl FIXME: Not yet implemented 9616beef1b22Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9617beef1b22Smrgdnl [Compiler flag to generate thread safe objects]) 9618beef1b22Smrg])# _LT_LINKER_SHLIBS 9619e4f6584cSmrg 9620e4f6584cSmrg 9621beef1b22Smrg# _LT_LANG_C_CONFIG([TAG]) 9622beef1b22Smrg# ------------------------ 9623beef1b22Smrg# Ensure that the configuration variables for a C compiler are suitably 9624beef1b22Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 9625beef1b22Smrg# the compiler configuration to 'libtool'. 9626beef1b22Smrgm4_defun([_LT_LANG_C_CONFIG], 9627beef1b22Smrg[m4_require([_LT_DECL_EGREP])dnl 9628beef1b22Smrglt_save_CC=$CC 9629beef1b22SmrgAC_LANG_PUSH(C) 9630e4f6584cSmrg 9631beef1b22Smrg# Source file extension for C test sources. 9632beef1b22Smrgac_ext=c 9633e4f6584cSmrg 9634beef1b22Smrg# Object file extension for compiled C test sources. 9635beef1b22Smrgobjext=o 9636beef1b22Smrg_LT_TAGVAR(objext, $1)=$objext 963709885543Smrg 9638beef1b22Smrg# Code to be used in simple compile tests 9639beef1b22Smrglt_simple_compile_test_code="int some_variable = 0;" 9640e4f6584cSmrg 9641beef1b22Smrg# Code to be used in simple link tests 9642beef1b22Smrglt_simple_link_test_code='int main(){return(0);}' 9643e4f6584cSmrg 9644beef1b22Smrg_LT_TAG_COMPILER 9645beef1b22Smrg# Save the default compiler, since it gets overwritten when the other 9646beef1b22Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9647beef1b22Smrgcompiler_DEFAULT=$CC 9648e4f6584cSmrg 9649beef1b22Smrg# save warnings/boilerplate of simple test code 9650beef1b22Smrg_LT_COMPILER_BOILERPLATE 9651beef1b22Smrg_LT_LINKER_BOILERPLATE 9652e4f6584cSmrg 9653beef1b22Smrgif test -n "$compiler"; then 9654beef1b22Smrg _LT_COMPILER_NO_RTTI($1) 9655beef1b22Smrg _LT_COMPILER_PIC($1) 9656beef1b22Smrg _LT_COMPILER_C_O($1) 9657beef1b22Smrg _LT_COMPILER_FILE_LOCKS($1) 9658beef1b22Smrg _LT_LINKER_SHLIBS($1) 9659beef1b22Smrg _LT_SYS_DYNAMIC_LINKER($1) 9660beef1b22Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9661beef1b22Smrg LT_SYS_DLOPEN_SELF 9662beef1b22Smrg _LT_CMD_STRIPLIB 9663e4f6584cSmrg 9664beef1b22Smrg # Report what library types will actually be built 9665beef1b22Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9666beef1b22Smrg AC_MSG_RESULT([$can_build_shared]) 9667e4f6584cSmrg 9668beef1b22Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9669beef1b22Smrg test no = "$can_build_shared" && enable_shared=no 9670e4f6584cSmrg 9671beef1b22Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9672beef1b22Smrg # are all built from PIC. 9673beef1b22Smrg case $host_os in 9674beef1b22Smrg aix3*) 9675beef1b22Smrg test yes = "$enable_shared" && enable_static=no 9676beef1b22Smrg if test -n "$RANLIB"; then 9677beef1b22Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9678beef1b22Smrg postinstall_cmds='$RANLIB $lib' 9679beef1b22Smrg fi 9680beef1b22Smrg ;; 9681e4f6584cSmrg 9682beef1b22Smrg aix[[4-9]]*) 9683beef1b22Smrg if test ia64 != "$host_cpu"; then 9684beef1b22Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9685beef1b22Smrg yes,aix,yes) ;; # shared object as lib.so file only 9686beef1b22Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 9687beef1b22Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 9688beef1b22Smrg esac 9689beef1b22Smrg fi 9690beef1b22Smrg ;; 9691beef1b22Smrg esac 9692beef1b22Smrg AC_MSG_RESULT([$enable_shared]) 9693e4f6584cSmrg 9694beef1b22Smrg AC_MSG_CHECKING([whether to build static libraries]) 9695beef1b22Smrg # Make sure either enable_shared or enable_static is yes. 9696beef1b22Smrg test yes = "$enable_shared" || enable_static=yes 9697beef1b22Smrg AC_MSG_RESULT([$enable_static]) 9698e4f6584cSmrg 9699beef1b22Smrg _LT_CONFIG($1) 9700beef1b22Smrgfi 9701beef1b22SmrgAC_LANG_POP 9702beef1b22SmrgCC=$lt_save_CC 9703beef1b22Smrg])# _LT_LANG_C_CONFIG 9704e4f6584cSmrg 9705e4f6584cSmrg 9706beef1b22Smrg# _LT_LANG_CXX_CONFIG([TAG]) 9707beef1b22Smrg# -------------------------- 9708beef1b22Smrg# Ensure that the configuration variables for a C++ compiler are suitably 9709beef1b22Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 9710beef1b22Smrg# the compiler configuration to 'libtool'. 9711beef1b22Smrgm4_defun([_LT_LANG_CXX_CONFIG], 9712beef1b22Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9713beef1b22Smrgm4_require([_LT_DECL_EGREP])dnl 9714beef1b22Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9715beef1b22Smrgif test -n "$CXX" && ( test no != "$CXX" && 9716beef1b22Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9717beef1b22Smrg (test g++ != "$CXX"))); then 9718beef1b22Smrg AC_PROG_CXXCPP 97197b58d2e0Smrgelse 9720beef1b22Smrg _lt_caught_CXX_error=yes 9721beef1b22Smrgfi 9722e4f6584cSmrg 9723beef1b22SmrgAC_LANG_PUSH(C++) 9724beef1b22Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9725beef1b22Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9726beef1b22Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9727beef1b22Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9728beef1b22Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 9729beef1b22Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9730beef1b22Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9731beef1b22Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9732beef1b22Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9733beef1b22Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9734beef1b22Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9735beef1b22Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9736beef1b22Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9737beef1b22Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9738beef1b22Smrg_LT_TAGVAR(module_cmds, $1)= 9739beef1b22Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9740beef1b22Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9741beef1b22Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9742beef1b22Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9743beef1b22Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9744beef1b22Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9745beef1b22Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9746beef1b22Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9747df9ffc95Smrg 9748beef1b22Smrg# Source file extension for C++ test sources. 9749beef1b22Smrgac_ext=cpp 9750df9ffc95Smrg 9751beef1b22Smrg# Object file extension for compiled C++ test sources. 9752beef1b22Smrgobjext=o 9753beef1b22Smrg_LT_TAGVAR(objext, $1)=$objext 9754df9ffc95Smrg 9755beef1b22Smrg# No sense in running all these tests if we already determined that 9756beef1b22Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 9757beef1b22Smrg# are currently assumed to apply to all compilers on this platform, 9758beef1b22Smrg# and will be corrupted by setting them based on a non-working compiler. 9759beef1b22Smrgif test yes != "$_lt_caught_CXX_error"; then 9760beef1b22Smrg # Code to be used in simple compile tests 9761beef1b22Smrg lt_simple_compile_test_code="int some_variable = 0;" 9762df9ffc95Smrg 9763beef1b22Smrg # Code to be used in simple link tests 9764beef1b22Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9765df9ffc95Smrg 9766beef1b22Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9767beef1b22Smrg _LT_TAG_COMPILER 9768df9ffc95Smrg 9769beef1b22Smrg # save warnings/boilerplate of simple test code 9770beef1b22Smrg _LT_COMPILER_BOILERPLATE 9771beef1b22Smrg _LT_LINKER_BOILERPLATE 9772df9ffc95Smrg 9773beef1b22Smrg # Allow CC to be a program name with arguments. 9774beef1b22Smrg lt_save_CC=$CC 9775beef1b22Smrg lt_save_CFLAGS=$CFLAGS 9776beef1b22Smrg lt_save_LD=$LD 9777beef1b22Smrg lt_save_GCC=$GCC 9778beef1b22Smrg GCC=$GXX 9779beef1b22Smrg lt_save_with_gnu_ld=$with_gnu_ld 9780beef1b22Smrg lt_save_path_LD=$lt_cv_path_LD 9781beef1b22Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9782beef1b22Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9783beef1b22Smrg else 9784beef1b22Smrg $as_unset lt_cv_prog_gnu_ld 9785beef1b22Smrg fi 9786beef1b22Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 9787beef1b22Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 9788beef1b22Smrg else 9789beef1b22Smrg $as_unset lt_cv_path_LD 9790beef1b22Smrg fi 9791beef1b22Smrg test -z "${LDCXX+set}" || LD=$LDCXX 9792beef1b22Smrg CC=${CXX-"c++"} 9793beef1b22Smrg CFLAGS=$CXXFLAGS 9794beef1b22Smrg compiler=$CC 9795beef1b22Smrg _LT_TAGVAR(compiler, $1)=$CC 9796beef1b22Smrg _LT_CC_BASENAME([$compiler]) 9797df9ffc95Smrg 9798beef1b22Smrg if test -n "$compiler"; then 9799beef1b22Smrg # We don't want -fno-exception when compiling C++ code, so set the 9800beef1b22Smrg # no_builtin_flag separately 9801beef1b22Smrg if test yes = "$GXX"; then 9802beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9803beef1b22Smrg else 9804beef1b22Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9805beef1b22Smrg fi 9806e4f6584cSmrg 9807beef1b22Smrg if test yes = "$GXX"; then 9808beef1b22Smrg # Set up default GNU C++ configuration 9809e4f6584cSmrg 9810beef1b22Smrg LT_PATH_LD 9811e4f6584cSmrg 9812beef1b22Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 9813beef1b22Smrg # archiving commands below assume that GNU ld is being used. 9814beef1b22Smrg if test yes = "$with_gnu_ld"; then 9815beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9816beef1b22Smrg _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' 9817e4f6584cSmrg 9818beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9819beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9820e4f6584cSmrg 9821beef1b22Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 9822beef1b22Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9823beef1b22Smrg # investigate it a little bit more. (MM) 9824beef1b22Smrg wlarc='$wl' 9825e4f6584cSmrg 9826beef1b22Smrg # ancient GNU ld didn't support --whole-archive et. al. 9827beef1b22Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9828beef1b22Smrg $GREP 'no-whole-archive' > /dev/null; then 9829beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9830beef1b22Smrg else 9831beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9832beef1b22Smrg fi 9833beef1b22Smrg else 9834beef1b22Smrg with_gnu_ld=no 9835beef1b22Smrg wlarc= 9836e4f6584cSmrg 9837beef1b22Smrg # A generic and very simple default shared library creation 9838beef1b22Smrg # command for GNU C++ for the case where it uses the native 9839beef1b22Smrg # linker, instead of GNU ld. If possible, this setting should 9840beef1b22Smrg # overridden to take advantage of the native linker features on 9841beef1b22Smrg # the platform it is being used on. 9842beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9843beef1b22Smrg fi 9844e4f6584cSmrg 9845beef1b22Smrg # Commands to make compiler produce verbose output that lists 9846beef1b22Smrg # what "hidden" libraries, object files and flags are used when 9847beef1b22Smrg # linking a shared library. 9848beef1b22Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9849e4f6584cSmrg 9850beef1b22Smrg else 9851beef1b22Smrg GXX=no 9852beef1b22Smrg with_gnu_ld=no 9853beef1b22Smrg wlarc= 9854beef1b22Smrg fi 9855beef1b22Smrg 9856beef1b22Smrg # PORTME: fill in a description of your system's C++ link characteristics 9857beef1b22Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9858beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 98597b58d2e0Smrg case $host_os in 9860beef1b22Smrg aix3*) 9861beef1b22Smrg # FIXME: insert proper C++ library support 9862beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9863beef1b22Smrg ;; 9864beef1b22Smrg aix[[4-9]]*) 9865beef1b22Smrg if test ia64 = "$host_cpu"; then 9866beef1b22Smrg # On IA64, the linker does run time linking by default, so we don't 9867beef1b22Smrg # have to do anything special. 9868beef1b22Smrg aix_use_runtimelinking=no 9869beef1b22Smrg exp_sym_flag='-Bexport' 9870beef1b22Smrg no_entry_flag= 9871beef1b22Smrg else 9872beef1b22Smrg aix_use_runtimelinking=no 9873beef1b22Smrg 9874beef1b22Smrg # Test if we are trying to use run time linking or normal 9875beef1b22Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9876beef1b22Smrg # have runtime linking enabled, and use it for executables. 9877beef1b22Smrg # For shared libraries, we enable/disable runtime linking 9878beef1b22Smrg # depending on the kind of the shared library created - 9879beef1b22Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 9880beef1b22Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9881beef1b22Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 9882beef1b22Smrg # lib.a static archive 9883beef1b22Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9884beef1b22Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 9885beef1b22Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9886beef1b22Smrg # lib.a(lib.so.V) shared, rtl:no 9887beef1b22Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9888beef1b22Smrg # lib.a static archive 9889beef1b22Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9890beef1b22Smrg for ld_flag in $LDFLAGS; do 9891beef1b22Smrg case $ld_flag in 9892beef1b22Smrg *-brtl*) 9893beef1b22Smrg aix_use_runtimelinking=yes 9894beef1b22Smrg break 9895beef1b22Smrg ;; 9896beef1b22Smrg esac 9897beef1b22Smrg done 9898beef1b22Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9899beef1b22Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9900beef1b22Smrg # so we don't have lib.a shared libs to link our executables. 9901beef1b22Smrg # We have to force runtime linking in this case. 9902beef1b22Smrg aix_use_runtimelinking=yes 9903beef1b22Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9904beef1b22Smrg fi 9905beef1b22Smrg ;; 9906beef1b22Smrg esac 990709885543Smrg 9908beef1b22Smrg exp_sym_flag='-bexport' 9909beef1b22Smrg no_entry_flag='-bnoentry' 9910beef1b22Smrg fi 99117104f784Smrg 9912beef1b22Smrg # When large executables or shared objects are built, AIX ld can 9913beef1b22Smrg # have problems creating the table of contents. If linking a library 9914beef1b22Smrg # or program results in "error TOC overflow" add -mminimal-toc to 9915beef1b22Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9916beef1b22Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 991709885543Smrg 9918beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='' 9919beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9920beef1b22Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9921beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9922beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9923beef1b22Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9924beef1b22Smrg case $with_aix_soname,$aix_use_runtimelinking in 9925beef1b22Smrg aix,*) ;; # no import file 9926beef1b22Smrg svr4,* | *,yes) # use import file 9927beef1b22Smrg # The Import File defines what to hardcode. 9928beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9929beef1b22Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9930beef1b22Smrg ;; 9931beef1b22Smrg esac 99327104f784Smrg 9933beef1b22Smrg if test yes = "$GXX"; then 9934beef1b22Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9935beef1b22Smrg # We only want to do this on AIX 4.2 and lower, the check 9936beef1b22Smrg # below for broken collect2 doesn't work under 4.3+ 9937beef1b22Smrg collect2name=`$CC -print-prog-name=collect2` 9938beef1b22Smrg if test -f "$collect2name" && 9939beef1b22Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9940beef1b22Smrg then 9941beef1b22Smrg # We have reworked collect2 9942beef1b22Smrg : 9943beef1b22Smrg else 9944beef1b22Smrg # We have old collect2 9945beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9946beef1b22Smrg # It fails to find uninstalled libraries when the uninstalled 9947beef1b22Smrg # path is not listed in the libpath. Setting hardcode_minus_L 9948beef1b22Smrg # to unsupported forces relinking 9949beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9950beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9951beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9952beef1b22Smrg fi 9953beef1b22Smrg esac 9954beef1b22Smrg shared_flag='-shared' 9955beef1b22Smrg if test yes = "$aix_use_runtimelinking"; then 9956beef1b22Smrg shared_flag=$shared_flag' $wl-G' 9957beef1b22Smrg fi 9958beef1b22Smrg # Need to ensure runtime linking is disabled for the traditional 9959beef1b22Smrg # shared library, or the linker may eventually find shared libraries 9960beef1b22Smrg # /with/ Import File - we do not want to mix them. 9961beef1b22Smrg shared_flag_aix='-shared' 9962beef1b22Smrg shared_flag_svr4='-shared $wl-G' 9963beef1b22Smrg else 9964beef1b22Smrg # not using gcc 9965beef1b22Smrg if test ia64 = "$host_cpu"; then 9966beef1b22Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9967beef1b22Smrg # chokes on -Wl,-G. The following line is correct: 9968beef1b22Smrg shared_flag='-G' 9969beef1b22Smrg else 9970beef1b22Smrg if test yes = "$aix_use_runtimelinking"; then 9971beef1b22Smrg shared_flag='$wl-G' 9972beef1b22Smrg else 9973beef1b22Smrg shared_flag='$wl-bM:SRE' 9974beef1b22Smrg fi 9975beef1b22Smrg shared_flag_aix='$wl-bM:SRE' 9976beef1b22Smrg shared_flag_svr4='$wl-G' 9977beef1b22Smrg fi 9978beef1b22Smrg fi 997909885543Smrg 9980beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9981beef1b22Smrg # It seems that -bexpall does not export symbols beginning with 9982beef1b22Smrg # underscore (_), so it is better to generate a list of symbols to 9983beef1b22Smrg # export. 9984beef1b22Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9985beef1b22Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9986beef1b22Smrg # Warning - without using the other runtime loading flags (-brtl), 9987beef1b22Smrg # -berok will link without error, but may produce a broken library. 9988beef1b22Smrg # The "-G" linker flag allows undefined symbols. 9989beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 9990beef1b22Smrg # Determine the default libpath from the value encoded in an empty 9991beef1b22Smrg # executable. 9992beef1b22Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9993beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 999409885543Smrg 9995beef1b22Smrg _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 9996beef1b22Smrg else 9997beef1b22Smrg if test ia64 = "$host_cpu"; then 9998beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9999beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10000beef1b22Smrg _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" 10001beef1b22Smrg else 10002beef1b22Smrg # Determine the default libpath from the value encoded in an 10003beef1b22Smrg # empty executable. 10004beef1b22Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 10005beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10006beef1b22Smrg # Warning - without using the other run time loading flags, 10007beef1b22Smrg # -berok will link without error, but may produce a broken library. 10008beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 10009beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 10010beef1b22Smrg if test yes = "$with_gnu_ld"; then 10011beef1b22Smrg # We only use this code for GNU lds that support --whole-archive. 10012beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10013beef1b22Smrg else 10014beef1b22Smrg # Exported symbols can be pulled into shared objects from archives 10015beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 10016beef1b22Smrg fi 10017beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10018beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10019beef1b22Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 10020beef1b22Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10021beef1b22Smrg if test svr4 != "$with_aix_soname"; then 10022beef1b22Smrg # This is similar to how AIX traditionally builds its shared 10023beef1b22Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10024beef1b22Smrg _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' 10025beef1b22Smrg fi 10026beef1b22Smrg if test aix != "$with_aix_soname"; then 10027beef1b22Smrg _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' 10028beef1b22Smrg else 10029beef1b22Smrg # used by -dlpreopen to get the symbols 10030beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10031beef1b22Smrg fi 10032beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10033beef1b22Smrg fi 10034beef1b22Smrg fi 10035beef1b22Smrg ;; 1003609885543Smrg 10037beef1b22Smrg beos*) 10038beef1b22Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10039beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10040beef1b22Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10041beef1b22Smrg # support --undefined. This deserves some investigation. FIXME 10042beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10043beef1b22Smrg else 10044beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10045beef1b22Smrg fi 10046beef1b22Smrg ;; 1004709885543Smrg 10048beef1b22Smrg chorus*) 10049beef1b22Smrg case $cc_basename in 10050beef1b22Smrg *) 10051beef1b22Smrg # FIXME: insert proper C++ library support 10052beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10053beef1b22Smrg ;; 10054beef1b22Smrg esac 10055beef1b22Smrg ;; 1005609885543Smrg 10057beef1b22Smrg cygwin* | mingw* | pw32* | cegcc*) 10058beef1b22Smrg case $GXX,$cc_basename in 10059beef1b22Smrg ,cl* | no,cl* | ,icl* | no,icl*) 10060beef1b22Smrg # Native MSVC or ICC 10061beef1b22Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 10062beef1b22Smrg # no search path for DLLs. 10063beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10064beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10065beef1b22Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 10066beef1b22Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10067beef1b22Smrg # Tell ltmain to make .lib files, not .a files. 10068beef1b22Smrg libext=lib 10069beef1b22Smrg # Tell ltmain to make .dll files, not .so files. 10070beef1b22Smrg shrext_cmds=.dll 10071beef1b22Smrg # FIXME: Setting linknames here is a bad hack. 10072beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10073beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10074beef1b22Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 10075beef1b22Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10076beef1b22Smrg else 10077beef1b22Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10078beef1b22Smrg fi~ 10079beef1b22Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10080beef1b22Smrg linknames=' 10081beef1b22Smrg # The linker will not automatically build a static lib if we build a DLL. 10082beef1b22Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10083beef1b22Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10084beef1b22Smrg # Don't use ranlib 10085beef1b22Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10086beef1b22Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10087beef1b22Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10088beef1b22Smrg case $lt_outputfile in 10089beef1b22Smrg *.exe|*.EXE) ;; 10090beef1b22Smrg *) 10091beef1b22Smrg lt_outputfile=$lt_outputfile.exe 10092beef1b22Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 10093beef1b22Smrg ;; 10094beef1b22Smrg esac~ 10095beef1b22Smrg func_to_tool_file "$lt_outputfile"~ 10096beef1b22Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10097beef1b22Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10098beef1b22Smrg $RM "$lt_outputfile.manifest"; 10099beef1b22Smrg fi' 10100beef1b22Smrg ;; 10101beef1b22Smrg *) 10102beef1b22Smrg # g++ 10103beef1b22Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10104beef1b22Smrg # as there is no search path for DLLs. 10105beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10106beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10107beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10108beef1b22Smrg _LT_TAGVAR(always_export_symbols, $1)=no 10109beef1b22Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 1011009885543Smrg 10111beef1b22Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10112beef1b22Smrg _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' 10113beef1b22Smrg # If the export-symbols file already is a .def file, use it as 10114beef1b22Smrg # is; otherwise, prepend EXPORTS... 10115beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10116beef1b22Smrg cp $export_symbols $output_objdir/$soname.def; 10117beef1b22Smrg else 10118beef1b22Smrg echo EXPORTS > $output_objdir/$soname.def; 10119beef1b22Smrg cat $export_symbols >> $output_objdir/$soname.def; 10120beef1b22Smrg fi~ 10121beef1b22Smrg $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' 10122beef1b22Smrg else 10123beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10124beef1b22Smrg fi 10125beef1b22Smrg ;; 10126beef1b22Smrg esac 10127beef1b22Smrg ;; 10128beef1b22Smrg darwin* | rhapsody*) 10129beef1b22Smrg _LT_DARWIN_LINKER_FEATURES($1) 10130beef1b22Smrg ;; 1013109885543Smrg 10132beef1b22Smrg os2*) 10133beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10134beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10135beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10136beef1b22Smrg shrext_cmds=.dll 10137beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10138beef1b22Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10139beef1b22Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10140beef1b22Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10141beef1b22Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10142beef1b22Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10143beef1b22Smrg emximp -o $lib $output_objdir/$libname.def' 10144beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10145beef1b22Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10146beef1b22Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10147beef1b22Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10148beef1b22Smrg prefix_cmds="$SED"~ 10149beef1b22Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10150beef1b22Smrg prefix_cmds="$prefix_cmds -e 1d"; 10151beef1b22Smrg fi~ 10152beef1b22Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10153beef1b22Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10154beef1b22Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10155beef1b22Smrg emximp -o $lib $output_objdir/$libname.def' 10156beef1b22Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10157beef1b22Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10158beef1b22Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10159beef1b22Smrg ;; 1016009885543Smrg 10161beef1b22Smrg dgux*) 10162beef1b22Smrg case $cc_basename in 10163beef1b22Smrg ec++*) 10164beef1b22Smrg # FIXME: insert proper C++ library support 10165beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10166beef1b22Smrg ;; 10167beef1b22Smrg ghcx*) 10168beef1b22Smrg # Green Hills C++ Compiler 10169beef1b22Smrg # FIXME: insert proper C++ library support 10170beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10171beef1b22Smrg ;; 10172beef1b22Smrg *) 10173beef1b22Smrg # FIXME: insert proper C++ library support 10174beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10175beef1b22Smrg ;; 10176beef1b22Smrg esac 10177beef1b22Smrg ;; 1017809885543Smrg 10179beef1b22Smrg freebsd2.*) 10180beef1b22Smrg # C++ shared libraries reported to be fairly broken before 10181beef1b22Smrg # switch to ELF 10182beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10183beef1b22Smrg ;; 10184e4f6584cSmrg 10185beef1b22Smrg freebsd-elf*) 10186beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10187beef1b22Smrg ;; 1018809885543Smrg 10189beef1b22Smrg freebsd* | dragonfly* | midnightbsd*) 10190beef1b22Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10191beef1b22Smrg # conventions 10192beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10193beef1b22Smrg ;; 1019409885543Smrg 10195beef1b22Smrg haiku*) 10196beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10197beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10198beef1b22Smrg ;; 1019909885543Smrg 10200beef1b22Smrg hpux9*) 10201beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10202beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10203beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10204beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10205beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10206beef1b22Smrg # but as the default 10207beef1b22Smrg # location of the library. 1020809885543Smrg 10209beef1b22Smrg case $cc_basename in 10210beef1b22Smrg CC*) 10211beef1b22Smrg # FIXME: insert proper C++ library support 10212beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10213beef1b22Smrg ;; 10214beef1b22Smrg aCC*) 10215beef1b22Smrg _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' 10216beef1b22Smrg # Commands to make compiler produce verbose output that lists 10217beef1b22Smrg # what "hidden" libraries, object files and flags are used when 10218beef1b22Smrg # linking a shared library. 10219beef1b22Smrg # 10220beef1b22Smrg # There doesn't appear to be a way to prevent this compiler from 10221beef1b22Smrg # explicitly linking system object files so we need to strip them 10222beef1b22Smrg # from the output so that they don't get included in the library 10223beef1b22Smrg # dependencies. 10224beef1b22Smrg 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"' 10225beef1b22Smrg ;; 10226beef1b22Smrg *) 10227beef1b22Smrg if test yes = "$GXX"; then 10228beef1b22Smrg _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' 10229beef1b22Smrg else 10230beef1b22Smrg # FIXME: insert proper C++ library support 10231beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10232beef1b22Smrg fi 10233beef1b22Smrg ;; 10234beef1b22Smrg esac 10235beef1b22Smrg ;; 1023609885543Smrg 10237beef1b22Smrg hpux10*|hpux11*) 10238beef1b22Smrg if test no = "$with_gnu_ld"; then 10239beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10240beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 1024109885543Smrg 10242beef1b22Smrg case $host_cpu in 10243beef1b22Smrg hppa*64*|ia64*) 10244beef1b22Smrg ;; 10245beef1b22Smrg *) 10246beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10247beef1b22Smrg ;; 10248beef1b22Smrg esac 10249beef1b22Smrg fi 10250beef1b22Smrg case $host_cpu in 10251beef1b22Smrg hppa*64*|ia64*) 10252beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10253beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10254beef1b22Smrg ;; 10255beef1b22Smrg *) 10256beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10257beef1b22Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10258beef1b22Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10259beef1b22Smrg # but as the default 10260beef1b22Smrg # location of the library. 10261beef1b22Smrg ;; 10262beef1b22Smrg esac 1026309885543Smrg 10264beef1b22Smrg case $cc_basename in 10265beef1b22Smrg CC*) 10266beef1b22Smrg # FIXME: insert proper C++ library support 10267beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10268beef1b22Smrg ;; 10269beef1b22Smrg aCC*) 10270beef1b22Smrg case $host_cpu in 10271beef1b22Smrg hppa*64*) 10272beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10273beef1b22Smrg ;; 10274beef1b22Smrg ia64*) 10275beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10276beef1b22Smrg ;; 10277beef1b22Smrg *) 10278beef1b22Smrg _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' 10279beef1b22Smrg ;; 10280beef1b22Smrg esac 10281beef1b22Smrg # Commands to make compiler produce verbose output that lists 10282beef1b22Smrg # what "hidden" libraries, object files and flags are used when 10283beef1b22Smrg # linking a shared library. 10284beef1b22Smrg # 10285beef1b22Smrg # There doesn't appear to be a way to prevent this compiler from 10286beef1b22Smrg # explicitly linking system object files so we need to strip them 10287beef1b22Smrg # from the output so that they don't get included in the library 10288beef1b22Smrg # dependencies. 10289beef1b22Smrg 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"' 10290beef1b22Smrg ;; 10291beef1b22Smrg *) 10292beef1b22Smrg if test yes = "$GXX"; then 10293beef1b22Smrg if test no = "$with_gnu_ld"; then 10294beef1b22Smrg case $host_cpu in 10295beef1b22Smrg hppa*64*) 10296beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10297beef1b22Smrg ;; 10298beef1b22Smrg ia64*) 10299beef1b22Smrg _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' 10300beef1b22Smrg ;; 10301beef1b22Smrg *) 10302beef1b22Smrg _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' 10303beef1b22Smrg ;; 10304beef1b22Smrg esac 10305beef1b22Smrg fi 10306beef1b22Smrg else 10307beef1b22Smrg # FIXME: insert proper C++ library support 10308beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10309beef1b22Smrg fi 10310beef1b22Smrg ;; 10311beef1b22Smrg esac 10312beef1b22Smrg ;; 1031309885543Smrg 10314beef1b22Smrg interix[[3-9]]*) 10315beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10316beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10317beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10318beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10319beef1b22Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10320beef1b22Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10321beef1b22Smrg # default) and relocated if they conflict, which is a slow very memory 10322beef1b22Smrg # consuming and fragmenting process. To avoid this, we pick a random, 10323beef1b22Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10324beef1b22Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10325beef1b22Smrg _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' 10326beef1b22Smrg _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' 10327beef1b22Smrg ;; 10328beef1b22Smrg irix5* | irix6*) 10329beef1b22Smrg case $cc_basename in 10330beef1b22Smrg CC*) 10331beef1b22Smrg # SGI C++ 10332beef1b22Smrg _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' 10333b698ba48Smrg 10334beef1b22Smrg # Archives containing C++ object files must be created using 10335beef1b22Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10336beef1b22Smrg # necessary to make sure instantiated templates are included 10337beef1b22Smrg # in the archive. 10338beef1b22Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10339beef1b22Smrg ;; 10340beef1b22Smrg *) 10341beef1b22Smrg if test yes = "$GXX"; then 10342beef1b22Smrg if test no = "$with_gnu_ld"; then 10343beef1b22Smrg _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' 10344beef1b22Smrg else 10345beef1b22Smrg _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' 10346beef1b22Smrg fi 10347beef1b22Smrg fi 10348beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10349beef1b22Smrg ;; 10350beef1b22Smrg esac 10351beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10352beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10353beef1b22Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 10354beef1b22Smrg ;; 1035509885543Smrg 10356beef1b22Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10357beef1b22Smrg case $cc_basename in 10358beef1b22Smrg KCC*) 10359beef1b22Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 1036009885543Smrg 10361beef1b22Smrg # KCC will only create a shared library if the output file 10362beef1b22Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10363beef1b22Smrg # to its proper name (with version) after linking. 10364beef1b22Smrg _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' 10365beef1b22Smrg _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' 10366beef1b22Smrg # Commands to make compiler produce verbose output that lists 10367beef1b22Smrg # what "hidden" libraries, object files and flags are used when 10368beef1b22Smrg # linking a shared library. 10369beef1b22Smrg # 10370beef1b22Smrg # There doesn't appear to be a way to prevent this compiler from 10371beef1b22Smrg # explicitly linking system object files so we need to strip them 10372beef1b22Smrg # from the output so that they don't get included in the library 10373beef1b22Smrg # dependencies. 10374beef1b22Smrg 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"' 10375e4f6584cSmrg 10376beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10377beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10378e4f6584cSmrg 10379beef1b22Smrg # Archives containing C++ object files must be created using 10380beef1b22Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10381beef1b22Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10382beef1b22Smrg ;; 10383beef1b22Smrg icpc* | ecpc* ) 10384beef1b22Smrg # Intel C++ 10385beef1b22Smrg with_gnu_ld=yes 10386beef1b22Smrg # version 8.0 and above of icpc choke on multiply defined symbols 10387beef1b22Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10388beef1b22Smrg # earlier do not add the objects themselves. 10389beef1b22Smrg case `$CC -V 2>&1` in 10390beef1b22Smrg *"Version 7."*) 10391beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10392beef1b22Smrg _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' 10393beef1b22Smrg ;; 10394beef1b22Smrg *) # Version 8.0 or newer 10395beef1b22Smrg tmp_idyn= 10396beef1b22Smrg case $host_cpu in 10397beef1b22Smrg ia64*) tmp_idyn=' -i_dynamic';; 10398beef1b22Smrg esac 10399beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10400beef1b22Smrg _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' 10401beef1b22Smrg ;; 10402beef1b22Smrg esac 10403beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10404beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10405beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10406beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10407beef1b22Smrg ;; 10408beef1b22Smrg pgCC* | pgcpp*) 10409beef1b22Smrg # Portland Group C++ compiler 10410beef1b22Smrg case `$CC -V` in 10411beef1b22Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10412beef1b22Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10413beef1b22Smrg rm -rf $tpldir~ 10414beef1b22Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10415beef1b22Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10416beef1b22Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10417beef1b22Smrg rm -rf $tpldir~ 10418beef1b22Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10419beef1b22Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10420beef1b22Smrg $RANLIB $oldlib' 10421beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10422beef1b22Smrg rm -rf $tpldir~ 10423beef1b22Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10424beef1b22Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10425beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10426beef1b22Smrg rm -rf $tpldir~ 10427beef1b22Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10428beef1b22Smrg $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' 10429beef1b22Smrg ;; 10430beef1b22Smrg *) # Version 6 and above use weak symbols 10431beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10432beef1b22Smrg _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' 10433beef1b22Smrg ;; 10434beef1b22Smrg esac 10435e4f6584cSmrg 10436beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10437beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10438beef1b22Smrg _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' 10439beef1b22Smrg ;; 10440beef1b22Smrg cxx*) 10441beef1b22Smrg # Compaq C++ 10442beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10443beef1b22Smrg _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' 10444e4f6584cSmrg 10445beef1b22Smrg runpath_var=LD_RUN_PATH 10446beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10447beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10448e4f6584cSmrg 10449beef1b22Smrg # Commands to make compiler produce verbose output that lists 10450beef1b22Smrg # what "hidden" libraries, object files and flags are used when 10451beef1b22Smrg # linking a shared library. 10452beef1b22Smrg # 10453beef1b22Smrg # There doesn't appear to be a way to prevent this compiler from 10454beef1b22Smrg # explicitly linking system object files so we need to strip them 10455beef1b22Smrg # from the output so that they don't get included in the library 10456beef1b22Smrg # dependencies. 10457beef1b22Smrg 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' 10458beef1b22Smrg ;; 10459beef1b22Smrg xl* | mpixl* | bgxl*) 10460beef1b22Smrg # IBM XL 8.0 on PPC, with GNU ld 10461beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10462beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10463beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10464beef1b22Smrg if test yes = "$supports_anon_versioning"; then 10465beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10466beef1b22Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10467beef1b22Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 10468beef1b22Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10469beef1b22Smrg fi 10470beef1b22Smrg ;; 10471beef1b22Smrg *) 10472beef1b22Smrg case `$CC -V 2>&1 | $SED 5q` in 10473beef1b22Smrg *Sun\ C*) 10474beef1b22Smrg # Sun C++ 5.9 10475beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10476beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10477beef1b22Smrg _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' 10478beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10479beef1b22Smrg _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' 10480beef1b22Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 10481e4f6584cSmrg 10482beef1b22Smrg # Not sure whether something based on 10483beef1b22Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10484beef1b22Smrg # would be better. 10485beef1b22Smrg output_verbose_link_cmd='func_echo_all' 10486e4f6584cSmrg 10487beef1b22Smrg # Archives containing C++ object files must be created using 10488beef1b22Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10489beef1b22Smrg # necessary to make sure instantiated templates are included 10490beef1b22Smrg # in the archive. 10491beef1b22Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10492beef1b22Smrg ;; 10493beef1b22Smrg esac 10494beef1b22Smrg ;; 10495beef1b22Smrg esac 10496beef1b22Smrg ;; 1049709885543Smrg 10498beef1b22Smrg lynxos*) 10499beef1b22Smrg # FIXME: insert proper C++ library support 10500beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10501beef1b22Smrg ;; 1050209885543Smrg 10503beef1b22Smrg m88k*) 10504beef1b22Smrg # FIXME: insert proper C++ library support 10505beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10506beef1b22Smrg ;; 10507e4f6584cSmrg 10508beef1b22Smrg mvs*) 10509beef1b22Smrg case $cc_basename in 10510beef1b22Smrg cxx*) 10511beef1b22Smrg # FIXME: insert proper C++ library support 10512beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10513beef1b22Smrg ;; 10514beef1b22Smrg *) 10515beef1b22Smrg # FIXME: insert proper C++ library support 10516beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10517beef1b22Smrg ;; 10518beef1b22Smrg esac 10519beef1b22Smrg ;; 1052009885543Smrg 10521beef1b22Smrg netbsd*) 10522beef1b22Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10523beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10524beef1b22Smrg wlarc= 10525beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10526beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10527beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10528beef1b22Smrg fi 10529beef1b22Smrg # Workaround some broken pre-1.5 toolchains 10530beef1b22Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10531beef1b22Smrg ;; 10532b12e5c03Smrg 10533beef1b22Smrg *nto* | *qnx*) 10534beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10535beef1b22Smrg ;; 10536b12e5c03Smrg 10537beef1b22Smrg openbsd* | bitrig*) 10538beef1b22Smrg if test -f /usr/libexec/ld.so; then 10539beef1b22Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10540beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10541beef1b22Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10542beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10543beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10544beef1b22Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10545beef1b22Smrg _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' 10546beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10547beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10548beef1b22Smrg fi 10549beef1b22Smrg output_verbose_link_cmd=func_echo_all 10550beef1b22Smrg else 10551beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10552beef1b22Smrg fi 10553beef1b22Smrg ;; 10554b12e5c03Smrg 10555beef1b22Smrg osf3* | osf4* | osf5*) 10556beef1b22Smrg case $cc_basename in 10557beef1b22Smrg KCC*) 10558beef1b22Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10559b12e5c03Smrg 10560beef1b22Smrg # KCC will only create a shared library if the output file 10561beef1b22Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10562beef1b22Smrg # to its proper name (with version) after linking. 10563beef1b22Smrg _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' 10564b12e5c03Smrg 10565beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10566beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10567beef1b22Smrg 10568beef1b22Smrg # Archives containing C++ object files must be created using 10569beef1b22Smrg # the KAI C++ compiler. 10570beef1b22Smrg case $host in 10571beef1b22Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10572beef1b22Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10573beef1b22Smrg esac 10574beef1b22Smrg ;; 10575beef1b22Smrg RCC*) 10576beef1b22Smrg # Rational C++ 2.4.1 10577beef1b22Smrg # FIXME: insert proper C++ library support 10578beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10579beef1b22Smrg ;; 10580beef1b22Smrg cxx*) 10581beef1b22Smrg case $host in 10582beef1b22Smrg osf3*) 10583beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10584beef1b22Smrg _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' 10585beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10586beef1b22Smrg ;; 10587beef1b22Smrg *) 10588beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10589beef1b22Smrg _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' 10590beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10591beef1b22Smrg echo "-hidden">> $lib.exp~ 10592beef1b22Smrg $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~ 10593beef1b22Smrg $RM $lib.exp' 10594beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10595beef1b22Smrg ;; 10596beef1b22Smrg esac 10597beef1b22Smrg 10598beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10599beef1b22Smrg 10600beef1b22Smrg # Commands to make compiler produce verbose output that lists 10601beef1b22Smrg # what "hidden" libraries, object files and flags are used when 10602beef1b22Smrg # linking a shared library. 10603beef1b22Smrg # 10604beef1b22Smrg # There doesn't appear to be a way to prevent this compiler from 10605beef1b22Smrg # explicitly linking system object files so we need to strip them 10606beef1b22Smrg # from the output so that they don't get included in the library 10607beef1b22Smrg # dependencies. 10608beef1b22Smrg 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"' 10609beef1b22Smrg ;; 10610beef1b22Smrg *) 10611beef1b22Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 10612beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10613beef1b22Smrg case $host in 10614beef1b22Smrg osf3*) 10615beef1b22Smrg _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' 10616beef1b22Smrg ;; 10617beef1b22Smrg *) 10618beef1b22Smrg _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' 10619beef1b22Smrg ;; 10620beef1b22Smrg esac 10621b12e5c03Smrg 10622beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10623beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 1062409885543Smrg 10625beef1b22Smrg # Commands to make compiler produce verbose output that lists 10626beef1b22Smrg # what "hidden" libraries, object files and flags are used when 10627beef1b22Smrg # linking a shared library. 10628beef1b22Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 1062909885543Smrg 10630beef1b22Smrg else 10631beef1b22Smrg # FIXME: insert proper C++ library support 10632beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10633beef1b22Smrg fi 10634beef1b22Smrg ;; 10635beef1b22Smrg esac 10636beef1b22Smrg ;; 1063709885543Smrg 10638beef1b22Smrg psos*) 10639beef1b22Smrg # FIXME: insert proper C++ library support 10640beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10641beef1b22Smrg ;; 10642df9ffc95Smrg 10643beef1b22Smrg sunos4*) 10644beef1b22Smrg case $cc_basename in 10645beef1b22Smrg CC*) 10646beef1b22Smrg # Sun C++ 4.x 10647beef1b22Smrg # FIXME: insert proper C++ library support 10648beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10649beef1b22Smrg ;; 10650beef1b22Smrg lcc*) 10651beef1b22Smrg # Lucid 10652beef1b22Smrg # FIXME: insert proper C++ library support 10653beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10654beef1b22Smrg ;; 10655beef1b22Smrg *) 10656beef1b22Smrg # FIXME: insert proper C++ library support 10657beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10658beef1b22Smrg ;; 10659beef1b22Smrg esac 10660beef1b22Smrg ;; 10661df9ffc95Smrg 10662beef1b22Smrg solaris*) 10663beef1b22Smrg case $cc_basename in 10664beef1b22Smrg CC* | sunCC*) 10665beef1b22Smrg # Sun C++ 4.2, 5.x and Centerline C++ 10666beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10667beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10668beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10669beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10670beef1b22Smrg $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' 1067109885543Smrg 10672beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10673beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10674beef1b22Smrg case $host_os in 10675beef1b22Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10676beef1b22Smrg *) 10677beef1b22Smrg # The compiler driver will combine and reorder linker options, 10678beef1b22Smrg # but understands '-z linker_flag'. 10679beef1b22Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10680beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10681beef1b22Smrg ;; 10682beef1b22Smrg esac 10683beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1068409885543Smrg 10685beef1b22Smrg output_verbose_link_cmd='func_echo_all' 10686e4f6584cSmrg 10687beef1b22Smrg # Archives containing C++ object files must be created using 10688beef1b22Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10689beef1b22Smrg # necessary to make sure instantiated templates are included 10690beef1b22Smrg # in the archive. 10691beef1b22Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10692beef1b22Smrg ;; 10693beef1b22Smrg gcx*) 10694beef1b22Smrg # Green Hills C++ Compiler 10695beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10696e4f6584cSmrg 10697beef1b22Smrg # The C++ compiler must be used to create the archive. 10698beef1b22Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10699beef1b22Smrg ;; 10700beef1b22Smrg *) 10701beef1b22Smrg # GNU C++ compiler with Solaris linker 10702beef1b22Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 10703beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10704beef1b22Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10705beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10706beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10707beef1b22Smrg $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' 10708e4f6584cSmrg 10709beef1b22Smrg # Commands to make compiler produce verbose output that lists 10710beef1b22Smrg # what "hidden" libraries, object files and flags are used when 10711beef1b22Smrg # linking a shared library. 10712beef1b22Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10713beef1b22Smrg else 10714beef1b22Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 10715beef1b22Smrg # platform. 10716beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10717beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10718beef1b22Smrg $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' 10719e4f6584cSmrg 10720beef1b22Smrg # Commands to make compiler produce verbose output that lists 10721beef1b22Smrg # what "hidden" libraries, object files and flags are used when 10722beef1b22Smrg # linking a shared library. 10723beef1b22Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10724beef1b22Smrg fi 10725e4f6584cSmrg 10726beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10727beef1b22Smrg case $host_os in 10728beef1b22Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10729beef1b22Smrg *) 10730beef1b22Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10731beef1b22Smrg ;; 10732beef1b22Smrg esac 10733beef1b22Smrg fi 10734beef1b22Smrg ;; 10735beef1b22Smrg esac 10736beef1b22Smrg ;; 10737b12e5c03Smrg 10738beef1b22Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10739beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10740beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10741beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10742beef1b22Smrg runpath_var='LD_RUN_PATH' 10743e4f6584cSmrg 10744beef1b22Smrg case $cc_basename in 10745beef1b22Smrg CC*) 10746beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10747beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10748beef1b22Smrg ;; 10749beef1b22Smrg *) 10750beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10751beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10752beef1b22Smrg ;; 10753beef1b22Smrg esac 10754beef1b22Smrg ;; 10755df9ffc95Smrg 10756beef1b22Smrg sysv5* | sco3.2v5* | sco5v6*) 10757beef1b22Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 10758beef1b22Smrg # link with -lc, and that would cause any symbols used from libc to 10759beef1b22Smrg # always be unresolved, which means just about no library would 10760beef1b22Smrg # ever link correctly. If we're not using GNU ld we use -z text 10761beef1b22Smrg # though, which does catch some bad symbols but isn't as heavy-handed 10762beef1b22Smrg # as -z defs. 10763beef1b22Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10764beef1b22Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10765beef1b22Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10766beef1b22Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10767beef1b22Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10768beef1b22Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10769beef1b22Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10770beef1b22Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10771beef1b22Smrg runpath_var='LD_RUN_PATH' 10772beef1b22Smrg 10773beef1b22Smrg case $cc_basename in 10774beef1b22Smrg CC*) 10775beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10776beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10777beef1b22Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10778beef1b22Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 10779beef1b22Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10780beef1b22Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 10781beef1b22Smrg ;; 10782beef1b22Smrg *) 10783beef1b22Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10784beef1b22Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10785beef1b22Smrg ;; 10786beef1b22Smrg esac 10787beef1b22Smrg ;; 10788beef1b22Smrg 10789beef1b22Smrg tandem*) 10790beef1b22Smrg case $cc_basename in 10791beef1b22Smrg NCC*) 10792beef1b22Smrg # NonStop-UX NCC 3.20 10793beef1b22Smrg # FIXME: insert proper C++ library support 10794beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10795beef1b22Smrg ;; 10796beef1b22Smrg *) 10797beef1b22Smrg # FIXME: insert proper C++ library support 10798beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10799beef1b22Smrg ;; 10800beef1b22Smrg esac 10801beef1b22Smrg ;; 10802df9ffc95Smrg 10803beef1b22Smrg vxworks*) 10804beef1b22Smrg # FIXME: insert proper C++ library support 10805beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10806beef1b22Smrg ;; 10807e4f6584cSmrg 10808beef1b22Smrg *) 10809beef1b22Smrg # FIXME: insert proper C++ library support 10810beef1b22Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10811beef1b22Smrg ;; 10812beef1b22Smrg esac 1081309885543Smrg 10814beef1b22Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10815beef1b22Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 1081609885543Smrg 10817beef1b22Smrg _LT_TAGVAR(GCC, $1)=$GXX 10818beef1b22Smrg _LT_TAGVAR(LD, $1)=$LD 1081909885543Smrg 10820beef1b22Smrg ## CAVEAT EMPTOR: 10821beef1b22Smrg ## There is no encapsulation within the following macros, do not change 10822beef1b22Smrg ## the running order or otherwise move them around unless you know exactly 10823beef1b22Smrg ## what you are doing... 10824beef1b22Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 10825beef1b22Smrg _LT_COMPILER_PIC($1) 10826beef1b22Smrg _LT_COMPILER_C_O($1) 10827beef1b22Smrg _LT_COMPILER_FILE_LOCKS($1) 10828beef1b22Smrg _LT_LINKER_SHLIBS($1) 10829beef1b22Smrg _LT_SYS_DYNAMIC_LINKER($1) 10830beef1b22Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 1083109885543Smrg 10832beef1b22Smrg _LT_CONFIG($1) 10833beef1b22Smrg fi # test -n "$compiler" 10834b12e5c03Smrg 10835beef1b22Smrg CC=$lt_save_CC 10836beef1b22Smrg CFLAGS=$lt_save_CFLAGS 10837beef1b22Smrg LDCXX=$LD 10838beef1b22Smrg LD=$lt_save_LD 10839beef1b22Smrg GCC=$lt_save_GCC 10840beef1b22Smrg with_gnu_ld=$lt_save_with_gnu_ld 10841beef1b22Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 10842beef1b22Smrg lt_cv_path_LD=$lt_save_path_LD 10843beef1b22Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10844beef1b22Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10845beef1b22Smrgfi # test yes != "$_lt_caught_CXX_error" 10846b12e5c03Smrg 10847beef1b22SmrgAC_LANG_POP 10848beef1b22Smrg])# _LT_LANG_CXX_CONFIG 10849beef1b22Smrg 10850beef1b22Smrg 10851beef1b22Smrg# _LT_FUNC_STRIPNAME_CNF 10852beef1b22Smrg# ---------------------- 10853beef1b22Smrg# func_stripname_cnf prefix suffix name 10854beef1b22Smrg# strip PREFIX and SUFFIX off of NAME. 10855beef1b22Smrg# PREFIX and SUFFIX must not contain globbing or regex special 10856beef1b22Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 10857beef1b22Smrg# dot (in which case that matches only a dot). 10858b12e5c03Smrg# 10859beef1b22Smrg# This function is identical to the (non-XSI) version of func_stripname, 10860beef1b22Smrg# except this one can be used by m4 code that may be executed by configure, 10861beef1b22Smrg# rather than the libtool script. 10862beef1b22Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10863beef1b22SmrgAC_REQUIRE([_LT_DECL_SED]) 10864beef1b22SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10865beef1b22Smrgfunc_stripname_cnf () 10866beef1b22Smrg{ 10867beef1b22Smrg case @S|@2 in 10868beef1b22Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10869beef1b22Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10870beef1b22Smrg esac 10871beef1b22Smrg} # func_stripname_cnf 10872beef1b22Smrg])# _LT_FUNC_STRIPNAME_CNF 10873b12e5c03Smrg 10874b12e5c03Smrg 10875beef1b22Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10876beef1b22Smrg# --------------------------------- 10877beef1b22Smrg# Figure out "hidden" library dependencies from verbose 10878beef1b22Smrg# compiler output when linking a shared library. 10879beef1b22Smrg# Parse the compiler output and extract the necessary 10880beef1b22Smrg# objects, libraries and library flags. 10881beef1b22Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10882beef1b22Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10883beef1b22SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10884beef1b22Smrg# Dependencies to place before and after the object being linked: 10885beef1b22Smrg_LT_TAGVAR(predep_objects, $1)= 10886beef1b22Smrg_LT_TAGVAR(postdep_objects, $1)= 10887beef1b22Smrg_LT_TAGVAR(predeps, $1)= 10888beef1b22Smrg_LT_TAGVAR(postdeps, $1)= 10889beef1b22Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 10890b12e5c03Smrg 10891beef1b22Smrgdnl we can't use the lt_simple_compile_test_code here, 10892beef1b22Smrgdnl because it contains code intended for an executable, 10893beef1b22Smrgdnl not a library. It's possible we should let each 10894beef1b22Smrgdnl tag define a new lt_????_link_test_code variable, 10895beef1b22Smrgdnl but it's only used here... 10896beef1b22Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 10897beef1b22Smrgint a; 10898beef1b22Smrgvoid foo (void) { a = 0; } 10899beef1b22Smrg_LT_EOF 10900beef1b22Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 10901beef1b22Smrgclass Foo 10902beef1b22Smrg{ 10903beef1b22Smrgpublic: 10904beef1b22Smrg Foo (void) { a = 0; } 10905beef1b22Smrgprivate: 10906beef1b22Smrg int a; 10907beef1b22Smrg}; 10908beef1b22Smrg_LT_EOF 10909beef1b22Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 10910beef1b22Smrg subroutine foo 10911beef1b22Smrg implicit none 10912beef1b22Smrg integer*4 a 10913beef1b22Smrg a=0 10914beef1b22Smrg return 10915beef1b22Smrg end 10916beef1b22Smrg_LT_EOF 10917beef1b22Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 10918beef1b22Smrg subroutine foo 10919beef1b22Smrg implicit none 10920beef1b22Smrg integer a 10921beef1b22Smrg a=0 10922beef1b22Smrg return 10923beef1b22Smrg end 10924beef1b22Smrg_LT_EOF 10925beef1b22Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 10926beef1b22Smrgpublic class foo { 10927beef1b22Smrg private int a; 10928beef1b22Smrg public void bar (void) { 10929beef1b22Smrg a = 0; 10930beef1b22Smrg } 10931beef1b22Smrg}; 10932beef1b22Smrg_LT_EOF 10933beef1b22Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 10934beef1b22Smrgpackage foo 10935beef1b22Smrgfunc foo() { 10936beef1b22Smrg} 10937beef1b22Smrg_LT_EOF 10938beef1b22Smrg]) 10939b12e5c03Smrg 10940beef1b22Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 10941beef1b22Smrgcase "$CC $CFLAGS " in #( 10942beef1b22Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 10943beef1b22Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 10944beef1b22Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 10945beef1b22Smrgesac 10946b12e5c03Smrg 10947beef1b22Smrgdnl Parse the compiler output and extract the necessary 10948beef1b22Smrgdnl objects, libraries and library flags. 10949beef1b22Smrgif AC_TRY_EVAL(ac_compile); then 10950beef1b22Smrg # Parse the compiler output and extract the necessary 10951beef1b22Smrg # objects, libraries and library flags. 10952b12e5c03Smrg 10953beef1b22Smrg # Sentinel used to keep track of whether or not we are before 10954beef1b22Smrg # the conftest object file. 10955beef1b22Smrg pre_test_object_deps_done=no 10956beef1b22Smrg 10957beef1b22Smrg for p in `eval "$output_verbose_link_cmd"`; do 10958beef1b22Smrg case $prev$p in 10959beef1b22Smrg 10960beef1b22Smrg -L* | -R* | -l*) 10961beef1b22Smrg # Some compilers place space between "-{L,R}" and the path. 10962beef1b22Smrg # Remove the space. 10963beef1b22Smrg if test x-L = "$p" || 10964beef1b22Smrg test x-R = "$p"; then 10965beef1b22Smrg prev=$p 10966beef1b22Smrg continue 10967beef1b22Smrg fi 10968beef1b22Smrg 10969beef1b22Smrg # Expand the sysroot to ease extracting the directories later. 10970beef1b22Smrg if test -z "$prev"; then 10971beef1b22Smrg case $p in 10972beef1b22Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 10973beef1b22Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 10974beef1b22Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 10975beef1b22Smrg esac 10976beef1b22Smrg fi 10977beef1b22Smrg case $p in 10978beef1b22Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 10979beef1b22Smrg esac 10980beef1b22Smrg if test no = "$pre_test_object_deps_done"; then 10981beef1b22Smrg case $prev in 10982beef1b22Smrg -L | -R) 10983beef1b22Smrg # Internal compiler library paths should come after those 10984beef1b22Smrg # provided the user. The postdeps already come after the 10985beef1b22Smrg # user supplied libs so there is no need to process them. 10986beef1b22Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 10987beef1b22Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 10988beef1b22Smrg else 10989beef1b22Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 10990beef1b22Smrg fi 10991beef1b22Smrg ;; 10992beef1b22Smrg # The "-l" case would never come before the object being 10993beef1b22Smrg # linked, so don't bother handling this case. 10994beef1b22Smrg esac 10995beef1b22Smrg else 10996beef1b22Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 10997beef1b22Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 10998beef1b22Smrg else 10999beef1b22Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 11000beef1b22Smrg fi 11001beef1b22Smrg fi 11002beef1b22Smrg prev= 11003beef1b22Smrg ;; 11004beef1b22Smrg 11005beef1b22Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 11006beef1b22Smrg *.$objext) 11007beef1b22Smrg # This assumes that the test object file only shows up 11008beef1b22Smrg # once in the compiler output. 11009beef1b22Smrg if test "$p" = "conftest.$objext"; then 11010beef1b22Smrg pre_test_object_deps_done=yes 11011beef1b22Smrg continue 11012beef1b22Smrg fi 11013beef1b22Smrg 11014beef1b22Smrg if test no = "$pre_test_object_deps_done"; then 11015beef1b22Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 11016beef1b22Smrg _LT_TAGVAR(predep_objects, $1)=$p 11017beef1b22Smrg else 11018beef1b22Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 11019beef1b22Smrg fi 11020beef1b22Smrg else 11021beef1b22Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11022beef1b22Smrg _LT_TAGVAR(postdep_objects, $1)=$p 11023beef1b22Smrg else 11024beef1b22Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11025beef1b22Smrg fi 11026beef1b22Smrg fi 11027beef1b22Smrg ;; 11028b12e5c03Smrg 11029beef1b22Smrg *) ;; # Ignore the rest. 11030beef1b22Smrg 11031beef1b22Smrg esac 11032beef1b22Smrg done 11033beef1b22Smrg 11034beef1b22Smrg # Clean up. 11035beef1b22Smrg rm -f a.out a.exe 11036b12e5c03Smrgelse 11037beef1b22Smrg echo "libtool.m4: error: problem compiling $1 test program" 11038b12e5c03Smrgfi 11039b12e5c03Smrg 11040beef1b22Smrg$RM -f confest.$objext 11041beef1b22SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 11042b12e5c03Smrg 11043beef1b22Smrg# PORTME: override above test on systems where it is broken 11044beef1b22Smrgm4_if([$1], [CXX], 11045beef1b22Smrg[case $host_os in 11046beef1b22Smrginterix[[3-9]]*) 11047beef1b22Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 11048beef1b22Smrg # hack all around it, let's just trust "g++" to DTRT. 11049beef1b22Smrg _LT_TAGVAR(predep_objects,$1)= 11050beef1b22Smrg _LT_TAGVAR(postdep_objects,$1)= 11051beef1b22Smrg _LT_TAGVAR(postdeps,$1)= 11052beef1b22Smrg ;; 11053beef1b22Smrgesac 11054beef1b22Smrg]) 11055b12e5c03Smrg 11056beef1b22Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 11057beef1b22Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11058b12e5c03Smrgesac 11059beef1b22Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11060beef1b22Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11061beef1b22Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11062beef1b22Smrgfi 11063beef1b22Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11064beef1b22Smrg [The directories searched by this compiler when creating a shared library]) 11065beef1b22Smrg_LT_TAGDECL([], [predep_objects], [1], 11066beef1b22Smrg [Dependencies to place before and after the objects being linked to 11067beef1b22Smrg create a shared library]) 11068beef1b22Smrg_LT_TAGDECL([], [postdep_objects], [1]) 11069beef1b22Smrg_LT_TAGDECL([], [predeps], [1]) 11070beef1b22Smrg_LT_TAGDECL([], [postdeps], [1]) 11071beef1b22Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11072beef1b22Smrg [The library search path used internally by the compiler when linking 11073beef1b22Smrg a shared library]) 11074beef1b22Smrg])# _LT_SYS_HIDDEN_LIBDEPS 11075b12e5c03Smrg 11076beef1b22Smrg 11077beef1b22Smrg# _LT_LANG_F77_CONFIG([TAG]) 11078beef1b22Smrg# -------------------------- 11079beef1b22Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 11080beef1b22Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11081beef1b22Smrg# to write the compiler configuration to 'libtool'. 11082beef1b22Smrgm4_defun([_LT_LANG_F77_CONFIG], 11083beef1b22Smrg[AC_LANG_PUSH(Fortran 77) 11084beef1b22Smrgif test -z "$F77" || test no = "$F77"; then 11085beef1b22Smrg _lt_disable_F77=yes 11086b12e5c03Smrgfi 11087b12e5c03Smrg 11088beef1b22Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11089beef1b22Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11090beef1b22Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11091beef1b22Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11092beef1b22Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11093beef1b22Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11094beef1b22Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11095beef1b22Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11096beef1b22Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11097beef1b22Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11098beef1b22Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11099beef1b22Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11100beef1b22Smrg_LT_TAGVAR(module_cmds, $1)= 11101beef1b22Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11102beef1b22Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11103beef1b22Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11104beef1b22Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11105beef1b22Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11106beef1b22Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11107beef1b22Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11108beef1b22Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11109b12e5c03Smrg 11110beef1b22Smrg# Source file extension for f77 test sources. 11111beef1b22Smrgac_ext=f 1111209885543Smrg 11113beef1b22Smrg# Object file extension for compiled f77 test sources. 11114beef1b22Smrgobjext=o 11115beef1b22Smrg_LT_TAGVAR(objext, $1)=$objext 1111609885543Smrg 11117beef1b22Smrg# No sense in running all these tests if we already determined that 11118beef1b22Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 11119beef1b22Smrg# are currently assumed to apply to all compilers on this platform, 11120beef1b22Smrg# and will be corrupted by setting them based on a non-working compiler. 11121beef1b22Smrgif test yes != "$_lt_disable_F77"; then 11122beef1b22Smrg # Code to be used in simple compile tests 11123beef1b22Smrg lt_simple_compile_test_code="\ 11124beef1b22Smrg subroutine t 11125beef1b22Smrg return 11126beef1b22Smrg end 11127beef1b22Smrg" 11128beef1b22Smrg 11129beef1b22Smrg # Code to be used in simple link tests 11130beef1b22Smrg lt_simple_link_test_code="\ 11131beef1b22Smrg program t 11132beef1b22Smrg end 11133beef1b22Smrg" 11134beef1b22Smrg 11135beef1b22Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11136beef1b22Smrg _LT_TAG_COMPILER 11137beef1b22Smrg 11138beef1b22Smrg # save warnings/boilerplate of simple test code 11139beef1b22Smrg _LT_COMPILER_BOILERPLATE 11140beef1b22Smrg _LT_LINKER_BOILERPLATE 11141beef1b22Smrg 11142beef1b22Smrg # Allow CC to be a program name with arguments. 11143beef1b22Smrg lt_save_CC=$CC 11144beef1b22Smrg lt_save_GCC=$GCC 11145beef1b22Smrg lt_save_CFLAGS=$CFLAGS 11146beef1b22Smrg CC=${F77-"f77"} 11147beef1b22Smrg CFLAGS=$FFLAGS 11148beef1b22Smrg compiler=$CC 11149beef1b22Smrg _LT_TAGVAR(compiler, $1)=$CC 11150beef1b22Smrg _LT_CC_BASENAME([$compiler]) 11151beef1b22Smrg GCC=$G77 11152beef1b22Smrg if test -n "$compiler"; then 11153beef1b22Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11154beef1b22Smrg AC_MSG_RESULT([$can_build_shared]) 1115509885543Smrg 11156beef1b22Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11157beef1b22Smrg test no = "$can_build_shared" && enable_shared=no 1115809885543Smrg 11159beef1b22Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11160beef1b22Smrg # are all built from PIC. 11161beef1b22Smrg case $host_os in 11162beef1b22Smrg aix3*) 11163beef1b22Smrg test yes = "$enable_shared" && enable_static=no 11164beef1b22Smrg if test -n "$RANLIB"; then 11165beef1b22Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11166beef1b22Smrg postinstall_cmds='$RANLIB $lib' 11167beef1b22Smrg fi 11168beef1b22Smrg ;; 11169beef1b22Smrg aix[[4-9]]*) 11170beef1b22Smrg if test ia64 != "$host_cpu"; then 11171beef1b22Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11172beef1b22Smrg yes,aix,yes) ;; # shared object as lib.so file only 11173beef1b22Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11174beef1b22Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11175beef1b22Smrg esac 11176beef1b22Smrg fi 11177beef1b22Smrg ;; 11178beef1b22Smrg esac 11179beef1b22Smrg AC_MSG_RESULT([$enable_shared]) 1118009885543Smrg 11181beef1b22Smrg AC_MSG_CHECKING([whether to build static libraries]) 11182beef1b22Smrg # Make sure either enable_shared or enable_static is yes. 11183beef1b22Smrg test yes = "$enable_shared" || enable_static=yes 11184beef1b22Smrg AC_MSG_RESULT([$enable_static]) 1118509885543Smrg 11186beef1b22Smrg _LT_TAGVAR(GCC, $1)=$G77 11187beef1b22Smrg _LT_TAGVAR(LD, $1)=$LD 1118809885543Smrg 11189beef1b22Smrg ## CAVEAT EMPTOR: 11190beef1b22Smrg ## There is no encapsulation within the following macros, do not change 11191beef1b22Smrg ## the running order or otherwise move them around unless you know exactly 11192beef1b22Smrg ## what you are doing... 11193beef1b22Smrg _LT_COMPILER_PIC($1) 11194beef1b22Smrg _LT_COMPILER_C_O($1) 11195beef1b22Smrg _LT_COMPILER_FILE_LOCKS($1) 11196beef1b22Smrg _LT_LINKER_SHLIBS($1) 11197beef1b22Smrg _LT_SYS_DYNAMIC_LINKER($1) 11198beef1b22Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 1119909885543Smrg 11200beef1b22Smrg _LT_CONFIG($1) 11201beef1b22Smrg fi # test -n "$compiler" 11202e4f6584cSmrg 11203beef1b22Smrg GCC=$lt_save_GCC 11204beef1b22Smrg CC=$lt_save_CC 11205beef1b22Smrg CFLAGS=$lt_save_CFLAGS 11206beef1b22Smrgfi # test yes != "$_lt_disable_F77" 1120709885543Smrg 11208beef1b22SmrgAC_LANG_POP 11209beef1b22Smrg])# _LT_LANG_F77_CONFIG 1121009885543Smrg 11211b698ba48Smrg 11212beef1b22Smrg# _LT_LANG_FC_CONFIG([TAG]) 11213beef1b22Smrg# ------------------------- 11214beef1b22Smrg# Ensure that the configuration variables for a Fortran compiler are 11215beef1b22Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11216beef1b22Smrg# to write the compiler configuration to 'libtool'. 11217beef1b22Smrgm4_defun([_LT_LANG_FC_CONFIG], 11218beef1b22Smrg[AC_LANG_PUSH(Fortran) 1121909885543Smrg 11220beef1b22Smrgif test -z "$FC" || test no = "$FC"; then 11221beef1b22Smrg _lt_disable_FC=yes 112227b58d2e0Smrgfi 1122309885543Smrg 11224beef1b22Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11225beef1b22Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11226beef1b22Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11227beef1b22Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11228beef1b22Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11229beef1b22Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11230beef1b22Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11231beef1b22Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11232beef1b22Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11233beef1b22Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11234beef1b22Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11235beef1b22Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11236beef1b22Smrg_LT_TAGVAR(module_cmds, $1)= 11237beef1b22Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11238beef1b22Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11239beef1b22Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11240beef1b22Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11241beef1b22Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11242beef1b22Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11243beef1b22Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11244beef1b22Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 1124509885543Smrg 11246beef1b22Smrg# Source file extension for fc test sources. 11247beef1b22Smrgac_ext=${ac_fc_srcext-f} 1124809885543Smrg 11249beef1b22Smrg# Object file extension for compiled fc test sources. 11250beef1b22Smrgobjext=o 11251beef1b22Smrg_LT_TAGVAR(objext, $1)=$objext 11252b12e5c03Smrg 11253beef1b22Smrg# No sense in running all these tests if we already determined that 11254beef1b22Smrg# the FC compiler isn't working. Some variables (like enable_shared) 11255beef1b22Smrg# are currently assumed to apply to all compilers on this platform, 11256beef1b22Smrg# and will be corrupted by setting them based on a non-working compiler. 11257beef1b22Smrgif test yes != "$_lt_disable_FC"; then 11258beef1b22Smrg # Code to be used in simple compile tests 11259beef1b22Smrg lt_simple_compile_test_code="\ 11260beef1b22Smrg subroutine t 11261beef1b22Smrg return 11262beef1b22Smrg end 11263beef1b22Smrg" 11264b12e5c03Smrg 11265beef1b22Smrg # Code to be used in simple link tests 11266beef1b22Smrg lt_simple_link_test_code="\ 11267beef1b22Smrg program t 11268beef1b22Smrg end 11269beef1b22Smrg" 11270beef1b22Smrg 11271beef1b22Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11272beef1b22Smrg _LT_TAG_COMPILER 11273beef1b22Smrg 11274beef1b22Smrg # save warnings/boilerplate of simple test code 11275beef1b22Smrg _LT_COMPILER_BOILERPLATE 11276beef1b22Smrg _LT_LINKER_BOILERPLATE 11277beef1b22Smrg 11278beef1b22Smrg # Allow CC to be a program name with arguments. 11279beef1b22Smrg lt_save_CC=$CC 11280beef1b22Smrg lt_save_GCC=$GCC 11281beef1b22Smrg lt_save_CFLAGS=$CFLAGS 11282beef1b22Smrg CC=${FC-"f95"} 11283beef1b22Smrg CFLAGS=$FCFLAGS 11284beef1b22Smrg compiler=$CC 11285beef1b22Smrg GCC=$ac_cv_fc_compiler_gnu 11286b12e5c03Smrg 11287beef1b22Smrg _LT_TAGVAR(compiler, $1)=$CC 11288beef1b22Smrg _LT_CC_BASENAME([$compiler]) 11289b12e5c03Smrg 11290beef1b22Smrg if test -n "$compiler"; then 11291beef1b22Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11292beef1b22Smrg AC_MSG_RESULT([$can_build_shared]) 11293b12e5c03Smrg 11294beef1b22Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11295beef1b22Smrg test no = "$can_build_shared" && enable_shared=no 11296b12e5c03Smrg 11297beef1b22Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11298beef1b22Smrg # are all built from PIC. 11299beef1b22Smrg case $host_os in 11300beef1b22Smrg aix3*) 11301beef1b22Smrg test yes = "$enable_shared" && enable_static=no 11302beef1b22Smrg if test -n "$RANLIB"; then 11303beef1b22Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11304beef1b22Smrg postinstall_cmds='$RANLIB $lib' 11305beef1b22Smrg fi 11306beef1b22Smrg ;; 11307beef1b22Smrg aix[[4-9]]*) 11308beef1b22Smrg if test ia64 != "$host_cpu"; then 11309beef1b22Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11310beef1b22Smrg yes,aix,yes) ;; # shared object as lib.so file only 11311beef1b22Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11312beef1b22Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11313beef1b22Smrg esac 11314b12e5c03Smrg fi 11315beef1b22Smrg ;; 11316beef1b22Smrg esac 11317beef1b22Smrg AC_MSG_RESULT([$enable_shared]) 11318b12e5c03Smrg 11319beef1b22Smrg AC_MSG_CHECKING([whether to build static libraries]) 11320beef1b22Smrg # Make sure either enable_shared or enable_static is yes. 11321beef1b22Smrg test yes = "$enable_shared" || enable_static=yes 11322beef1b22Smrg AC_MSG_RESULT([$enable_static]) 11323b12e5c03Smrg 11324beef1b22Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11325beef1b22Smrg _LT_TAGVAR(LD, $1)=$LD 11326b12e5c03Smrg 11327beef1b22Smrg ## CAVEAT EMPTOR: 11328beef1b22Smrg ## There is no encapsulation within the following macros, do not change 11329beef1b22Smrg ## the running order or otherwise move them around unless you know exactly 11330beef1b22Smrg ## what you are doing... 11331beef1b22Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 11332beef1b22Smrg _LT_COMPILER_PIC($1) 11333beef1b22Smrg _LT_COMPILER_C_O($1) 11334beef1b22Smrg _LT_COMPILER_FILE_LOCKS($1) 11335beef1b22Smrg _LT_LINKER_SHLIBS($1) 11336beef1b22Smrg _LT_SYS_DYNAMIC_LINKER($1) 11337beef1b22Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11338b12e5c03Smrg 11339beef1b22Smrg _LT_CONFIG($1) 11340beef1b22Smrg fi # test -n "$compiler" 11341b12e5c03Smrg 11342beef1b22Smrg GCC=$lt_save_GCC 11343beef1b22Smrg CC=$lt_save_CC 11344beef1b22Smrg CFLAGS=$lt_save_CFLAGS 11345beef1b22Smrgfi # test yes != "$_lt_disable_FC" 11346b12e5c03Smrg 11347beef1b22SmrgAC_LANG_POP 11348beef1b22Smrg])# _LT_LANG_FC_CONFIG 11349b12e5c03Smrg 11350b12e5c03Smrg 11351beef1b22Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 11352beef1b22Smrg# -------------------------- 11353beef1b22Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11354beef1b22Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11355beef1b22Smrg# to write the compiler configuration to 'libtool'. 11356beef1b22Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 11357beef1b22Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11358beef1b22SmrgAC_LANG_SAVE 11359b12e5c03Smrg 11360beef1b22Smrg# Source file extension for Java test sources. 11361beef1b22Smrgac_ext=java 11362b12e5c03Smrg 11363beef1b22Smrg# Object file extension for compiled Java test sources. 11364beef1b22Smrgobjext=o 11365beef1b22Smrg_LT_TAGVAR(objext, $1)=$objext 11366b12e5c03Smrg 11367beef1b22Smrg# Code to be used in simple compile tests 11368beef1b22Smrglt_simple_compile_test_code="class foo {}" 11369b12e5c03Smrg 11370beef1b22Smrg# Code to be used in simple link tests 11371beef1b22Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11372b12e5c03Smrg 11373beef1b22Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11374beef1b22Smrg_LT_TAG_COMPILER 11375b12e5c03Smrg 11376beef1b22Smrg# save warnings/boilerplate of simple test code 11377beef1b22Smrg_LT_COMPILER_BOILERPLATE 11378beef1b22Smrg_LT_LINKER_BOILERPLATE 11379b12e5c03Smrg 11380beef1b22Smrg# Allow CC to be a program name with arguments. 11381beef1b22Smrglt_save_CC=$CC 11382beef1b22Smrglt_save_CFLAGS=$CFLAGS 11383beef1b22Smrglt_save_GCC=$GCC 11384beef1b22SmrgGCC=yes 11385beef1b22SmrgCC=${GCJ-"gcj"} 11386beef1b22SmrgCFLAGS=$GCJFLAGS 11387beef1b22Smrgcompiler=$CC 11388beef1b22Smrg_LT_TAGVAR(compiler, $1)=$CC 11389beef1b22Smrg_LT_TAGVAR(LD, $1)=$LD 11390beef1b22Smrg_LT_CC_BASENAME([$compiler]) 11391beef1b22Smrg 11392beef1b22Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11393beef1b22Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11394beef1b22Smrg 11395beef1b22Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11396beef1b22Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11397beef1b22Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11398beef1b22Smrg 11399beef1b22Smrgif test -n "$compiler"; then 11400beef1b22Smrg _LT_COMPILER_NO_RTTI($1) 11401beef1b22Smrg _LT_COMPILER_PIC($1) 11402beef1b22Smrg _LT_COMPILER_C_O($1) 11403beef1b22Smrg _LT_COMPILER_FILE_LOCKS($1) 11404beef1b22Smrg _LT_LINKER_SHLIBS($1) 11405beef1b22Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11406beef1b22Smrg 11407beef1b22Smrg _LT_CONFIG($1) 11408b12e5c03Smrgfi 11409b12e5c03Smrg 11410beef1b22SmrgAC_LANG_RESTORE 11411b12e5c03Smrg 11412beef1b22SmrgGCC=$lt_save_GCC 11413beef1b22SmrgCC=$lt_save_CC 11414beef1b22SmrgCFLAGS=$lt_save_CFLAGS 11415beef1b22Smrg])# _LT_LANG_GCJ_CONFIG 11416e4f6584cSmrg 114177b58d2e0Smrg 11418beef1b22Smrg# _LT_LANG_GO_CONFIG([TAG]) 11419beef1b22Smrg# -------------------------- 11420beef1b22Smrg# Ensure that the configuration variables for the GNU Go compiler 11421beef1b22Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11422beef1b22Smrg# to write the compiler configuration to 'libtool'. 11423beef1b22Smrgm4_defun([_LT_LANG_GO_CONFIG], 11424beef1b22Smrg[AC_REQUIRE([LT_PROG_GO])dnl 11425beef1b22SmrgAC_LANG_SAVE 11426b12e5c03Smrg 11427beef1b22Smrg# Source file extension for Go test sources. 11428beef1b22Smrgac_ext=go 11429b12e5c03Smrg 11430beef1b22Smrg# Object file extension for compiled Go test sources. 11431beef1b22Smrgobjext=o 11432beef1b22Smrg_LT_TAGVAR(objext, $1)=$objext 11433b12e5c03Smrg 11434beef1b22Smrg# Code to be used in simple compile tests 11435beef1b22Smrglt_simple_compile_test_code="package main; func main() { }" 11436b12e5c03Smrg 11437beef1b22Smrg# Code to be used in simple link tests 11438beef1b22Smrglt_simple_link_test_code='package main; func main() { }' 11439e4f6584cSmrg 11440beef1b22Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11441beef1b22Smrg_LT_TAG_COMPILER 11442e4f6584cSmrg 11443beef1b22Smrg# save warnings/boilerplate of simple test code 11444beef1b22Smrg_LT_COMPILER_BOILERPLATE 11445beef1b22Smrg_LT_LINKER_BOILERPLATE 11446e4f6584cSmrg 11447beef1b22Smrg# Allow CC to be a program name with arguments. 11448beef1b22Smrglt_save_CC=$CC 11449beef1b22Smrglt_save_CFLAGS=$CFLAGS 11450beef1b22Smrglt_save_GCC=$GCC 11451beef1b22SmrgGCC=yes 11452beef1b22SmrgCC=${GOC-"gccgo"} 11453beef1b22SmrgCFLAGS=$GOFLAGS 11454beef1b22Smrgcompiler=$CC 11455beef1b22Smrg_LT_TAGVAR(compiler, $1)=$CC 11456beef1b22Smrg_LT_TAGVAR(LD, $1)=$LD 11457beef1b22Smrg_LT_CC_BASENAME([$compiler]) 11458df9ffc95Smrg 11459beef1b22Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 11460beef1b22Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 1146109885543Smrg 11462beef1b22Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11463beef1b22Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11464beef1b22Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 1146509885543Smrg 11466beef1b22Smrgif test -n "$compiler"; then 11467beef1b22Smrg _LT_COMPILER_NO_RTTI($1) 11468beef1b22Smrg _LT_COMPILER_PIC($1) 11469beef1b22Smrg _LT_COMPILER_C_O($1) 11470beef1b22Smrg _LT_COMPILER_FILE_LOCKS($1) 11471beef1b22Smrg _LT_LINKER_SHLIBS($1) 11472beef1b22Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11473beef1b22Smrg 11474beef1b22Smrg _LT_CONFIG($1) 11475beef1b22Smrgfi 11476beef1b22Smrg 11477beef1b22SmrgAC_LANG_RESTORE 11478beef1b22Smrg 11479beef1b22SmrgGCC=$lt_save_GCC 11480beef1b22SmrgCC=$lt_save_CC 11481beef1b22SmrgCFLAGS=$lt_save_CFLAGS 11482beef1b22Smrg])# _LT_LANG_GO_CONFIG 11483beef1b22Smrg 11484beef1b22Smrg 11485beef1b22Smrg# _LT_LANG_RC_CONFIG([TAG]) 11486beef1b22Smrg# ------------------------- 11487beef1b22Smrg# Ensure that the configuration variables for the Windows resource compiler 11488beef1b22Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11489beef1b22Smrg# to write the compiler configuration to 'libtool'. 11490beef1b22Smrgm4_defun([_LT_LANG_RC_CONFIG], 11491beef1b22Smrg[AC_REQUIRE([LT_PROG_RC])dnl 11492beef1b22SmrgAC_LANG_SAVE 11493beef1b22Smrg 11494beef1b22Smrg# Source file extension for RC test sources. 11495beef1b22Smrgac_ext=rc 11496e4f6584cSmrg 11497beef1b22Smrg# Object file extension for compiled RC test sources. 11498beef1b22Smrgobjext=o 11499beef1b22Smrg_LT_TAGVAR(objext, $1)=$objext 11500e4f6584cSmrg 11501beef1b22Smrg# Code to be used in simple compile tests 11502beef1b22Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11503e4f6584cSmrg 11504beef1b22Smrg# Code to be used in simple link tests 11505beef1b22Smrglt_simple_link_test_code=$lt_simple_compile_test_code 11506e4f6584cSmrg 11507beef1b22Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11508beef1b22Smrg_LT_TAG_COMPILER 11509e4f6584cSmrg 11510beef1b22Smrg# save warnings/boilerplate of simple test code 11511beef1b22Smrg_LT_COMPILER_BOILERPLATE 11512beef1b22Smrg_LT_LINKER_BOILERPLATE 11513e4f6584cSmrg 11514beef1b22Smrg# Allow CC to be a program name with arguments. 11515beef1b22Smrglt_save_CC=$CC 11516beef1b22Smrglt_save_CFLAGS=$CFLAGS 11517beef1b22Smrglt_save_GCC=$GCC 11518beef1b22SmrgGCC= 11519beef1b22SmrgCC=${RC-"windres"} 11520beef1b22SmrgCFLAGS= 11521beef1b22Smrgcompiler=$CC 11522beef1b22Smrg_LT_TAGVAR(compiler, $1)=$CC 11523beef1b22Smrg_LT_CC_BASENAME([$compiler]) 11524beef1b22Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 115257b58d2e0Smrg 11526beef1b22Smrgif test -n "$compiler"; then 11527beef1b22Smrg : 11528beef1b22Smrg _LT_CONFIG($1) 11529beef1b22Smrgfi 115307b58d2e0Smrg 11531beef1b22SmrgGCC=$lt_save_GCC 11532beef1b22SmrgAC_LANG_RESTORE 11533beef1b22SmrgCC=$lt_save_CC 11534beef1b22SmrgCFLAGS=$lt_save_CFLAGS 11535beef1b22Smrg])# _LT_LANG_RC_CONFIG 11536e4f6584cSmrg 11537e4f6584cSmrg 11538beef1b22Smrg# LT_PROG_GCJ 11539beef1b22Smrg# ----------- 11540beef1b22SmrgAC_DEFUN([LT_PROG_GCJ], 11541beef1b22Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11542beef1b22Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11543beef1b22Smrg [AC_CHECK_TOOL(GCJ, gcj,) 11544beef1b22Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11545beef1b22Smrg AC_SUBST(GCJFLAGS)])])[]dnl 11546e4f6584cSmrg]) 11547e4f6584cSmrg 11548beef1b22Smrg# Old name: 11549beef1b22SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11550beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 11551beef1b22Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11552e4f6584cSmrg 11553e4f6584cSmrg 11554beef1b22Smrg# LT_PROG_GO 11555beef1b22Smrg# ---------- 11556beef1b22SmrgAC_DEFUN([LT_PROG_GO], 11557beef1b22Smrg[AC_CHECK_TOOL(GOC, gccgo,) 11558beef1b22Smrg]) 11559e4f6584cSmrg 11560e4f6584cSmrg 11561beef1b22Smrg# LT_PROG_RC 11562beef1b22Smrg# ---------- 11563beef1b22SmrgAC_DEFUN([LT_PROG_RC], 11564beef1b22Smrg[AC_CHECK_TOOL(RC, windres,) 11565beef1b22Smrg]) 1156609885543Smrg 11567beef1b22Smrg# Old name: 11568beef1b22SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11569beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 11570beef1b22Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 1157109885543Smrg 1157209885543Smrg 11573beef1b22Smrg# _LT_DECL_EGREP 11574beef1b22Smrg# -------------- 11575beef1b22Smrg# If we don't have a new enough Autoconf to choose the best grep 11576beef1b22Smrg# available, choose the one first in the user's PATH. 11577beef1b22Smrgm4_defun([_LT_DECL_EGREP], 11578beef1b22Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 11579beef1b22SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 11580beef1b22Smrgtest -z "$GREP" && GREP=grep 11581beef1b22Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11582beef1b22Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11583beef1b22Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11584beef1b22Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11585beef1b22SmrgAC_SUBST([GREP]) 11586beef1b22Smrg]) 1158709885543Smrg 1158809885543Smrg 11589beef1b22Smrg# _LT_DECL_OBJDUMP 11590beef1b22Smrg# -------------- 11591beef1b22Smrg# If we don't have a new enough Autoconf to choose the best objdump 11592beef1b22Smrg# available, choose the one first in the user's PATH. 11593beef1b22Smrgm4_defun([_LT_DECL_OBJDUMP], 11594beef1b22Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11595beef1b22Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11596beef1b22Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11597beef1b22SmrgAC_SUBST([OBJDUMP]) 11598beef1b22Smrg]) 1159909885543Smrg 11600beef1b22Smrg# _LT_DECL_DLLTOOL 11601beef1b22Smrg# ---------------- 11602beef1b22Smrg# Ensure DLLTOOL variable is set. 11603beef1b22Smrgm4_defun([_LT_DECL_DLLTOOL], 11604beef1b22Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11605beef1b22Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11606beef1b22Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11607beef1b22SmrgAC_SUBST([DLLTOOL]) 11608beef1b22Smrg]) 1160909885543Smrg 11610beef1b22Smrg# _LT_DECL_FILECMD 11611beef1b22Smrg# ---------------- 11612beef1b22Smrg# Check for a file(cmd) program that can be used to detect file type and magic 11613beef1b22Smrgm4_defun([_LT_DECL_FILECMD], 11614beef1b22Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 11615beef1b22Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11616beef1b22Smrg])# _LD_DECL_FILECMD 1161709885543Smrg 11618beef1b22Smrg# _LT_DECL_SED 11619beef1b22Smrg# ------------ 11620beef1b22Smrg# Check for a fully-functional sed program, that truncates 11621beef1b22Smrg# as few characters as possible. Prefer GNU sed if found. 11622beef1b22Smrgm4_defun([_LT_DECL_SED], 11623beef1b22Smrg[AC_PROG_SED 11624beef1b22Smrgtest -z "$SED" && SED=sed 11625beef1b22SmrgXsed="$SED -e 1s/^X//" 11626beef1b22Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11627beef1b22Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11628beef1b22Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11629beef1b22Smrg])# _LT_DECL_SED 11630beef1b22Smrg 11631beef1b22Smrgm4_ifndef([AC_PROG_SED], [ 11632beef1b22Smrg# NOTE: This macro has been submitted for inclusion into # 11633beef1b22Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 11634beef1b22Smrg# a released version of Autoconf we should remove this # 11635beef1b22Smrg# macro and use it instead. # 11636beef1b22Smrg 11637beef1b22Smrgm4_defun([AC_PROG_SED], 11638beef1b22Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 11639beef1b22SmrgAC_CACHE_VAL(lt_cv_path_SED, 11640beef1b22Smrg[# Loop through the user's path and test for sed and gsed. 11641beef1b22Smrg# Then use that list of sed's as ones to test for truncation. 11642beef1b22Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11643beef1b22Smrgfor as_dir in $PATH 11644beef1b22Smrgdo 11645beef1b22Smrg IFS=$as_save_IFS 11646beef1b22Smrg test -z "$as_dir" && as_dir=. 11647beef1b22Smrg for lt_ac_prog in sed gsed; do 11648beef1b22Smrg for ac_exec_ext in '' $ac_executable_extensions; do 11649beef1b22Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11650beef1b22Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 116517b58d2e0Smrg fi 11652beef1b22Smrg done 11653beef1b22Smrg done 11654beef1b22Smrgdone 11655beef1b22SmrgIFS=$as_save_IFS 11656beef1b22Smrglt_ac_max=0 11657beef1b22Smrglt_ac_count=0 11658beef1b22Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11659beef1b22Smrg# along with /bin/sed that truncates output. 11660beef1b22Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11661beef1b22Smrg test ! -f "$lt_ac_sed" && continue 11662beef1b22Smrg cat /dev/null > conftest.in 11663beef1b22Smrg lt_ac_count=0 11664beef1b22Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11665beef1b22Smrg # Check for GNU sed and select it if it is found. 11666beef1b22Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11667beef1b22Smrg lt_cv_path_SED=$lt_ac_sed 11668beef1b22Smrg break 11669beef1b22Smrg fi 11670beef1b22Smrg while true; do 11671beef1b22Smrg cat conftest.in conftest.in >conftest.tmp 11672beef1b22Smrg mv conftest.tmp conftest.in 11673beef1b22Smrg cp conftest.in conftest.nl 11674beef1b22Smrg echo >>conftest.nl 11675beef1b22Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11676beef1b22Smrg cmp -s conftest.out conftest.nl || break 11677beef1b22Smrg # 10000 chars as input seems more than enough 11678beef1b22Smrg test 10 -lt "$lt_ac_count" && break 11679beef1b22Smrg lt_ac_count=`expr $lt_ac_count + 1` 11680beef1b22Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 11681beef1b22Smrg lt_ac_max=$lt_ac_count 11682beef1b22Smrg lt_cv_path_SED=$lt_ac_sed 116837b58d2e0Smrg fi 116847b58d2e0Smrg done 11685beef1b22Smrgdone 11686beef1b22Smrg]) 11687beef1b22SmrgSED=$lt_cv_path_SED 11688beef1b22SmrgAC_SUBST([SED]) 11689beef1b22SmrgAC_MSG_RESULT([$SED]) 11690beef1b22Smrg])#AC_PROG_SED 11691beef1b22Smrg])#m4_ifndef 1169209885543Smrg 11693beef1b22Smrg# Old name: 11694beef1b22SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11695beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 11696beef1b22Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 11697beef1b22Smrg 11698beef1b22Smrg 11699beef1b22Smrg# _LT_CHECK_SHELL_FEATURES 11700beef1b22Smrg# ------------------------ 11701beef1b22Smrg# Find out whether the shell is Bourne or XSI compatible, 11702beef1b22Smrg# or has some other useful features. 11703beef1b22Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 11704beef1b22Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11705beef1b22Smrg lt_unset=unset 117067b58d2e0Smrgelse 11707beef1b22Smrg lt_unset=false 117087b58d2e0Smrgfi 11709beef1b22Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11710beef1b22Smrg 11711beef1b22Smrg# test EBCDIC or ASCII 11712beef1b22Smrgcase `echo X|tr X '\101'` in 11713beef1b22Smrg A) # ASCII based system 11714beef1b22Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11715beef1b22Smrg lt_SP2NL='tr \040 \012' 11716beef1b22Smrg lt_NL2SP='tr \015\012 \040\040' 11717beef1b22Smrg ;; 11718beef1b22Smrg *) # EBCDIC based system 11719beef1b22Smrg lt_SP2NL='tr \100 \n' 11720beef1b22Smrg lt_NL2SP='tr \r\n \100\100' 11721beef1b22Smrg ;; 11722beef1b22Smrgesac 11723beef1b22Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11724beef1b22Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11725beef1b22Smrg])# _LT_CHECK_SHELL_FEATURES 11726beef1b22Smrg 11727beef1b22Smrg 11728beef1b22Smrg# _LT_PATH_CONVERSION_FUNCTIONS 11729beef1b22Smrg# ----------------------------- 11730beef1b22Smrg# Determine what file name conversion functions should be used by 11731beef1b22Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11732beef1b22Smrg# for certain cross-compile configurations and native mingw. 11733beef1b22Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11734beef1b22Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11735beef1b22SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11736beef1b22SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 11737beef1b22SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 11738beef1b22Smrg[case $host in 11739beef1b22Smrg *-*-mingw* ) 11740beef1b22Smrg case $build in 11741beef1b22Smrg *-*-mingw* ) # actually msys 11742beef1b22Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 11743beef1b22Smrg ;; 11744beef1b22Smrg *-*-cygwin* ) 11745beef1b22Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 11746beef1b22Smrg ;; 11747beef1b22Smrg * ) # otherwise, assume *nix 11748beef1b22Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 11749beef1b22Smrg ;; 11750beef1b22Smrg esac 11751beef1b22Smrg ;; 11752beef1b22Smrg *-*-cygwin* ) 11753beef1b22Smrg case $build in 11754beef1b22Smrg *-*-mingw* ) # actually msys 11755beef1b22Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11756beef1b22Smrg ;; 11757beef1b22Smrg *-*-cygwin* ) 11758beef1b22Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 11759beef1b22Smrg ;; 11760beef1b22Smrg * ) # otherwise, assume *nix 11761beef1b22Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 11762beef1b22Smrg ;; 11763beef1b22Smrg esac 11764beef1b22Smrg ;; 11765beef1b22Smrg * ) # unhandled hosts (and "normal" native builds) 11766beef1b22Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 11767beef1b22Smrg ;; 11768beef1b22Smrgesac 117697b58d2e0Smrg]) 11770beef1b22Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 11771beef1b22SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11772beef1b22Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11773beef1b22Smrg [0], [convert $build file names to $host format])dnl 11774beef1b22Smrg 11775beef1b22SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11776beef1b22SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11777beef1b22Smrg[#assume ordinary cross tools, or native build. 11778beef1b22Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 11779beef1b22Smrgcase $host in 11780beef1b22Smrg *-*-mingw* ) 11781beef1b22Smrg case $build in 11782beef1b22Smrg *-*-mingw* ) # actually msys 11783beef1b22Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11784beef1b22Smrg ;; 11785beef1b22Smrg esac 11786beef1b22Smrg ;; 11787beef1b22Smrgesac 117887b58d2e0Smrg]) 11789beef1b22Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 11790beef1b22SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11791beef1b22Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11792beef1b22Smrg [0], [convert $build files to toolchain format])dnl 11793beef1b22Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 11794beef1b22Smrg 11795beef1b22Smrg# Helper functions for option handling. -*- Autoconf -*- 11796beef1b22Smrg# 11797beef1b22Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11798beef1b22Smrg# Software Foundation, Inc. 11799beef1b22Smrg# Written by Gary V. Vaughan, 2004 11800beef1b22Smrg# 11801beef1b22Smrg# This file is free software; the Free Software Foundation gives 11802beef1b22Smrg# unlimited permission to copy and/or distribute it, with or without 11803beef1b22Smrg# modifications, as long as this notice is preserved. 11804e4f6584cSmrg 11805beef1b22Smrg# serial 8 ltoptions.m4 11806e4f6584cSmrg 11807beef1b22Smrg# This is to help aclocal find these macros, as it can't see m4_define. 11808beef1b22SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11809beef1b22Smrg 11810beef1b22Smrg 11811beef1b22Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11812beef1b22Smrg# ------------------------------------------ 11813beef1b22Smrgm4_define([_LT_MANGLE_OPTION], 11814beef1b22Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11815beef1b22Smrg 11816beef1b22Smrg 11817beef1b22Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11818beef1b22Smrg# --------------------------------------- 11819beef1b22Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11820beef1b22Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11821beef1b22Smrg# saved as a flag. 11822beef1b22Smrgm4_define([_LT_SET_OPTION], 11823beef1b22Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11824beef1b22Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11825beef1b22Smrg _LT_MANGLE_DEFUN([$1], [$2]), 11826beef1b22Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 118277b58d2e0Smrg]) 11828e4f6584cSmrg 11829e4f6584cSmrg 11830beef1b22Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11831beef1b22Smrg# ------------------------------------------------------------ 11832beef1b22Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11833beef1b22Smrgm4_define([_LT_IF_OPTION], 11834beef1b22Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11835beef1b22Smrg 11836beef1b22Smrg 11837beef1b22Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11838beef1b22Smrg# ------------------------------------------------------- 11839beef1b22Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11840beef1b22Smrg# are set. 11841beef1b22Smrgm4_define([_LT_UNLESS_OPTIONS], 11842beef1b22Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11843beef1b22Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11844beef1b22Smrg [m4_define([$0_found])])])[]dnl 11845beef1b22Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11846beef1b22Smrg])[]dnl 1184709885543Smrg]) 1184809885543Smrg 1184909885543Smrg 11850beef1b22Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11851beef1b22Smrg# ---------------------------------------- 11852beef1b22Smrg# OPTION-LIST is a space-separated list of Libtool options associated 11853beef1b22Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 11854beef1b22Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11855beef1b22Smrg# the unknown option and exit. 11856beef1b22Smrgm4_defun([_LT_SET_OPTIONS], 11857beef1b22Smrg[# Set options 11858beef1b22Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11859beef1b22Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 1186009885543Smrg 11861beef1b22Smrgm4_if([$1],[LT_INIT],[ 11862beef1b22Smrg dnl 11863beef1b22Smrg dnl Simply set some default values (i.e off) if boolean options were not 11864beef1b22Smrg dnl specified: 11865beef1b22Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11866beef1b22Smrg ]) 11867beef1b22Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11868beef1b22Smrg ]) 11869beef1b22Smrg dnl 11870beef1b22Smrg dnl If no reference was made to various pairs of opposing options, then 11871beef1b22Smrg dnl we run the default mode handler for the pair. For example, if neither 11872beef1b22Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11873beef1b22Smrg dnl archives by default: 11874beef1b22Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11875beef1b22Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11876beef1b22Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11877beef1b22Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11878beef1b22Smrg [_LT_ENABLE_FAST_INSTALL]) 11879beef1b22Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11880beef1b22Smrg [_LT_WITH_AIX_SONAME([aix])]) 11881beef1b22Smrg ]) 11882beef1b22Smrg])# _LT_SET_OPTIONS 1188309885543Smrg 1188409885543Smrg 1188509885543Smrg 11886beef1b22Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11887beef1b22Smrg# ----------------------------------------- 11888beef1b22Smrgm4_define([_LT_MANGLE_DEFUN], 11889beef1b22Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11890beef1b22Smrg 11891beef1b22Smrg 11892beef1b22Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11893beef1b22Smrg# ----------------------------------------------- 11894beef1b22Smrgm4_define([LT_OPTION_DEFINE], 11895beef1b22Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 11896beef1b22Smrg])# LT_OPTION_DEFINE 11897beef1b22Smrg 11898beef1b22Smrg 11899beef1b22Smrg# dlopen 11900beef1b22Smrg# ------ 11901beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 1190209885543Smrg]) 1190309885543Smrg 11904beef1b22SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 11905beef1b22Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 11906beef1b22SmrgAC_DIAGNOSE([obsolete], 11907beef1b22Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11908beef1b22Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 11909beef1b22Smrg]) 1191009885543Smrg 11911beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 11912beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11913e4f6584cSmrg 11914e4f6584cSmrg 11915beef1b22Smrg# win32-dll 11916beef1b22Smrg# --------- 11917beef1b22Smrg# Declare package support for building win32 dll's. 11918beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 11919beef1b22Smrg[enable_win32_dll=yes 11920beef1b22Smrg 11921beef1b22Smrgcase $host in 11922beef1b22Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 11923beef1b22Smrg AC_CHECK_TOOL(AS, as, false) 11924beef1b22Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11925beef1b22Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 11926beef1b22Smrg ;; 11927beef1b22Smrgesac 11928beef1b22Smrg 11929beef1b22Smrgtest -z "$AS" && AS=as 11930beef1b22Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 11931beef1b22Smrg 11932beef1b22Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11933beef1b22Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 11934beef1b22Smrg 11935beef1b22Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11936beef1b22Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 11937beef1b22Smrg])# win32-dll 11938beef1b22Smrg 11939beef1b22SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 11940beef1b22Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11941beef1b22Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 11942beef1b22SmrgAC_DIAGNOSE([obsolete], 11943beef1b22Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 11944beef1b22Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 11945df9ffc95Smrg]) 11946df9ffc95Smrg 11947beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 11948beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 11949beef1b22Smrg 11950beef1b22Smrg 11951beef1b22Smrg# _LT_ENABLE_SHARED([DEFAULT]) 11952beef1b22Smrg# ---------------------------- 11953beef1b22Smrg# implement the --enable-shared flag, and supports the 'shared' and 11954beef1b22Smrg# 'disable-shared' LT_INIT options. 11955beef1b22Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 11956beef1b22Smrgm4_define([_LT_ENABLE_SHARED], 11957beef1b22Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 11958beef1b22SmrgAC_ARG_ENABLE([shared], 11959beef1b22Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 11960beef1b22Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 11961beef1b22Smrg [p=${PACKAGE-default} 11962beef1b22Smrg case $enableval in 11963beef1b22Smrg yes) enable_shared=yes ;; 11964beef1b22Smrg no) enable_shared=no ;; 11965beef1b22Smrg *) 11966beef1b22Smrg enable_shared=no 11967beef1b22Smrg # Look at the argument we got. We use all the common list separators. 11968beef1b22Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 11969beef1b22Smrg for pkg in $enableval; do 11970beef1b22Smrg IFS=$lt_save_ifs 11971beef1b22Smrg if test "X$pkg" = "X$p"; then 11972beef1b22Smrg enable_shared=yes 11973beef1b22Smrg fi 11974beef1b22Smrg done 11975beef1b22Smrg IFS=$lt_save_ifs 11976beef1b22Smrg ;; 11977beef1b22Smrg esac], 11978beef1b22Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 11979e4f6584cSmrg 11980beef1b22Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 11981beef1b22Smrg [Whether or not to build shared libraries]) 11982beef1b22Smrg])# _LT_ENABLE_SHARED 11983e4f6584cSmrg 11984beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 11985beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 11986e4f6584cSmrg 11987beef1b22Smrg# Old names: 11988beef1b22SmrgAC_DEFUN([AC_ENABLE_SHARED], 11989beef1b22Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 11990beef1b22Smrg]) 11991e4f6584cSmrg 11992beef1b22SmrgAC_DEFUN([AC_DISABLE_SHARED], 11993beef1b22Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 119947104f784Smrg]) 11995df9ffc95Smrg 11996beef1b22SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 11997beef1b22SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 11998df9ffc95Smrg 11999beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 12000beef1b22Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 12001beef1b22Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 12002df9ffc95Smrg 12003df9ffc95Smrg 12004df9ffc95Smrg 12005beef1b22Smrg# _LT_ENABLE_STATIC([DEFAULT]) 12006beef1b22Smrg# ---------------------------- 12007beef1b22Smrg# implement the --enable-static flag, and support the 'static' and 12008beef1b22Smrg# 'disable-static' LT_INIT options. 12009beef1b22Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12010beef1b22Smrgm4_define([_LT_ENABLE_STATIC], 12011beef1b22Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 12012beef1b22SmrgAC_ARG_ENABLE([static], 12013beef1b22Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 12014beef1b22Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 12015beef1b22Smrg [p=${PACKAGE-default} 12016beef1b22Smrg case $enableval in 12017beef1b22Smrg yes) enable_static=yes ;; 12018beef1b22Smrg no) enable_static=no ;; 12019beef1b22Smrg *) 12020beef1b22Smrg enable_static=no 12021beef1b22Smrg # Look at the argument we got. We use all the common list separators. 12022beef1b22Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12023beef1b22Smrg for pkg in $enableval; do 12024beef1b22Smrg IFS=$lt_save_ifs 12025beef1b22Smrg if test "X$pkg" = "X$p"; then 12026beef1b22Smrg enable_static=yes 12027beef1b22Smrg fi 12028beef1b22Smrg done 12029beef1b22Smrg IFS=$lt_save_ifs 12030beef1b22Smrg ;; 12031beef1b22Smrg esac], 12032beef1b22Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 12033df9ffc95Smrg 12034beef1b22Smrg _LT_DECL([build_old_libs], [enable_static], [0], 12035beef1b22Smrg [Whether or not to build static libraries]) 12036beef1b22Smrg])# _LT_ENABLE_STATIC 12037df9ffc95Smrg 12038beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 12039beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 12040beef1b22Smrg 12041beef1b22Smrg# Old names: 12042beef1b22SmrgAC_DEFUN([AC_ENABLE_STATIC], 12043beef1b22Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 12044e4f6584cSmrg]) 1204509885543Smrg 12046beef1b22SmrgAC_DEFUN([AC_DISABLE_STATIC], 12047beef1b22Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 12048beef1b22Smrg]) 1204909885543Smrg 12050beef1b22SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 12051beef1b22SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 1205209885543Smrg 12053beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 12054beef1b22Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 12055beef1b22Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 1205609885543Smrg 12057e4f6584cSmrg 12058e4f6584cSmrg 12059beef1b22Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 12060beef1b22Smrg# ---------------------------------- 12061beef1b22Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 12062beef1b22Smrg# and 'disable-fast-install' LT_INIT options. 12063beef1b22Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12064beef1b22Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 12065beef1b22Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 12066beef1b22SmrgAC_ARG_ENABLE([fast-install], 12067beef1b22Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 12068beef1b22Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 12069beef1b22Smrg [p=${PACKAGE-default} 12070beef1b22Smrg case $enableval in 12071beef1b22Smrg yes) enable_fast_install=yes ;; 12072beef1b22Smrg no) enable_fast_install=no ;; 12073beef1b22Smrg *) 12074beef1b22Smrg enable_fast_install=no 12075beef1b22Smrg # Look at the argument we got. We use all the common list separators. 12076beef1b22Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12077beef1b22Smrg for pkg in $enableval; do 12078beef1b22Smrg IFS=$lt_save_ifs 12079beef1b22Smrg if test "X$pkg" = "X$p"; then 12080beef1b22Smrg enable_fast_install=yes 12081beef1b22Smrg fi 12082beef1b22Smrg done 12083beef1b22Smrg IFS=$lt_save_ifs 12084beef1b22Smrg ;; 12085beef1b22Smrg esac], 12086beef1b22Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12087e4f6584cSmrg 12088beef1b22Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 12089beef1b22Smrg [Whether or not to optimize for fast installation])dnl 12090beef1b22Smrg])# _LT_ENABLE_FAST_INSTALL 12091e4f6584cSmrg 12092beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12093beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12094e4f6584cSmrg 12095beef1b22Smrg# Old names: 12096beef1b22SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 12097beef1b22Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12098beef1b22SmrgAC_DIAGNOSE([obsolete], 12099beef1b22Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12100beef1b22Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 12101beef1b22Smrg]) 12102e4f6584cSmrg 12103beef1b22SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 12104beef1b22Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12105beef1b22SmrgAC_DIAGNOSE([obsolete], 12106beef1b22Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12107beef1b22Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 12108beef1b22Smrg]) 1210909885543Smrg 12110beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 12111beef1b22Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12112beef1b22Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 1211309885543Smrg 121147b58d2e0Smrg 12115beef1b22Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 12116beef1b22Smrg# ---------------------------------- 12117beef1b22Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12118beef1b22Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12119beef1b22Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12120beef1b22Smrgm4_define([_LT_WITH_AIX_SONAME], 12121beef1b22Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12122beef1b22Smrgshared_archive_member_spec= 12123beef1b22Smrgcase $host,$enable_shared in 12124beef1b22Smrgpower*-*-aix[[5-9]]*,yes) 12125beef1b22Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12126beef1b22Smrg AC_ARG_WITH([aix-soname], 12127beef1b22Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12128beef1b22Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12129beef1b22Smrg [case $withval in 12130beef1b22Smrg aix|svr4|both) 12131beef1b22Smrg ;; 12132beef1b22Smrg *) 12133beef1b22Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12134beef1b22Smrg ;; 12135beef1b22Smrg esac 12136beef1b22Smrg lt_cv_with_aix_soname=$with_aix_soname], 12137beef1b22Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 12138beef1b22Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12139beef1b22Smrg with_aix_soname=$lt_cv_with_aix_soname]) 12140beef1b22Smrg AC_MSG_RESULT([$with_aix_soname]) 12141beef1b22Smrg if test aix != "$with_aix_soname"; then 12142beef1b22Smrg # For the AIX way of multilib, we name the shared archive member 12143beef1b22Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12144beef1b22Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12145beef1b22Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12146beef1b22Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 12147beef1b22Smrg if test 64 = "${OBJECT_MODE-32}"; then 12148beef1b22Smrg shared_archive_member_spec=shr_64 12149beef1b22Smrg else 12150beef1b22Smrg shared_archive_member_spec=shr 12151beef1b22Smrg fi 12152beef1b22Smrg fi 12153beef1b22Smrg ;; 12154beef1b22Smrg*) 12155beef1b22Smrg with_aix_soname=aix 121567b58d2e0Smrg ;; 121577b58d2e0Smrgesac 1215809885543Smrg 12159beef1b22Smrg_LT_DECL([], [shared_archive_member_spec], [0], 12160beef1b22Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12161beef1b22Smrg])# _LT_WITH_AIX_SONAME 12162e4f6584cSmrg 12163beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12164beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12165beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12166e4f6584cSmrg 12167e4f6584cSmrg 12168beef1b22Smrg# _LT_WITH_PIC([MODE]) 12169beef1b22Smrg# -------------------- 12170beef1b22Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12171beef1b22Smrg# LT_INIT options. 12172beef1b22Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12173beef1b22Smrgm4_define([_LT_WITH_PIC], 12174beef1b22Smrg[AC_ARG_WITH([pic], 12175beef1b22Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12176beef1b22Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12177beef1b22Smrg [lt_p=${PACKAGE-default} 12178beef1b22Smrg case $withval in 12179beef1b22Smrg yes|no) pic_mode=$withval ;; 12180beef1b22Smrg *) 12181beef1b22Smrg pic_mode=default 12182beef1b22Smrg # Look at the argument we got. We use all the common list separators. 12183beef1b22Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12184beef1b22Smrg for lt_pkg in $withval; do 12185beef1b22Smrg IFS=$lt_save_ifs 12186beef1b22Smrg if test "X$lt_pkg" = "X$lt_p"; then 12187beef1b22Smrg pic_mode=yes 12188beef1b22Smrg fi 12189beef1b22Smrg done 12190beef1b22Smrg IFS=$lt_save_ifs 12191beef1b22Smrg ;; 12192beef1b22Smrg esac], 12193beef1b22Smrg [pic_mode=m4_default([$1], [default])]) 12194e4f6584cSmrg 12195beef1b22Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12196beef1b22Smrg])# _LT_WITH_PIC 12197e4f6584cSmrg 12198beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12199beef1b22SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12200e4f6584cSmrg 12201beef1b22Smrg# Old name: 12202beef1b22SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 12203beef1b22Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 12204beef1b22SmrgAC_DIAGNOSE([obsolete], 12205beef1b22Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12206beef1b22Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 12207beef1b22Smrg]) 12208e4f6584cSmrg 12209beef1b22Smrgdnl aclocal-1.4 backwards compatibility: 12210beef1b22Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12211e4f6584cSmrg 122127104f784Smrg 12213beef1b22Smrgm4_define([_LTDL_MODE], []) 12214beef1b22SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12215beef1b22Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 12216beef1b22SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 12217beef1b22Smrg [m4_define([_LTDL_MODE], [recursive])]) 12218beef1b22SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 12219beef1b22Smrg [m4_define([_LTDL_MODE], [subproject])]) 12220df9ffc95Smrg 12221beef1b22Smrgm4_define([_LTDL_TYPE], []) 12222beef1b22SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 12223beef1b22Smrg [m4_define([_LTDL_TYPE], [installable])]) 12224beef1b22SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 12225beef1b22Smrg [m4_define([_LTDL_TYPE], [convenience])]) 12226df9ffc95Smrg 12227beef1b22Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 122287b58d2e0Smrg# 12229beef1b22Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12230beef1b22Smrg# Foundation, Inc. 12231beef1b22Smrg# Written by Gary V. Vaughan, 2004 12232beef1b22Smrg# 12233beef1b22Smrg# This file is free software; the Free Software Foundation gives 12234beef1b22Smrg# unlimited permission to copy and/or distribute it, with or without 12235beef1b22Smrg# modifications, as long as this notice is preserved. 12236b698ba48Smrg 12237beef1b22Smrg# serial 6 ltsugar.m4 12238df9ffc95Smrg 12239beef1b22Smrg# This is to help aclocal find these macros, as it can't see m4_define. 12240beef1b22SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12241df9ffc95Smrg 122427104f784Smrg 12243beef1b22Smrg# lt_join(SEP, ARG1, [ARG2...]) 12244beef1b22Smrg# ----------------------------- 12245beef1b22Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12246beef1b22Smrg# associated separator. 12247beef1b22Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12248beef1b22Smrg# versions in m4sugar had bugs. 12249beef1b22Smrgm4_define([lt_join], 12250beef1b22Smrg[m4_if([$#], [1], [], 12251beef1b22Smrg [$#], [2], [[$2]], 12252beef1b22Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12253beef1b22Smrgm4_define([_lt_join], 12254beef1b22Smrg[m4_if([$#$2], [2], [], 12255beef1b22Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12256b698ba48Smrg 12257df9ffc95Smrg 12258beef1b22Smrg# lt_car(LIST) 12259beef1b22Smrg# lt_cdr(LIST) 12260beef1b22Smrg# ------------ 12261beef1b22Smrg# Manipulate m4 lists. 12262beef1b22Smrg# These macros are necessary as long as will still need to support 12263beef1b22Smrg# Autoconf-2.59, which quotes differently. 12264beef1b22Smrgm4_define([lt_car], [[$1]]) 12265beef1b22Smrgm4_define([lt_cdr], 12266beef1b22Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12267beef1b22Smrg [$#], 1, [], 12268beef1b22Smrg [m4_dquote(m4_shift($@))])]) 12269beef1b22Smrgm4_define([lt_unquote], $1) 12270beef1b22Smrg 1227109885543Smrg 12272beef1b22Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12273beef1b22Smrg# ------------------------------------------ 12274beef1b22Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12275beef1b22Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 12276beef1b22Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12277beef1b22Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12278beef1b22Smrg# than defined and empty). 122797b58d2e0Smrg# 12280beef1b22Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 12281beef1b22Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12282beef1b22Smrgm4_define([lt_append], 12283beef1b22Smrg[m4_define([$1], 12284beef1b22Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12285e4f6584cSmrg 12286e4f6584cSmrg 122877b58d2e0Smrg 12288beef1b22Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12289beef1b22Smrg# ---------------------------------------------------------- 12290beef1b22Smrg# Produce a SEP delimited list of all paired combinations of elements of 12291beef1b22Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12292beef1b22Smrg# has the form PREFIXmINFIXSUFFIXn. 12293beef1b22Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 12294beef1b22Smrgm4_define([lt_combine], 12295beef1b22Smrg[m4_if(m4_eval([$# > 3]), [1], 12296beef1b22Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12297beef1b22Smrg[[m4_foreach([_Lt_prefix], [$2], 12298beef1b22Smrg [m4_foreach([_Lt_suffix], 12299beef1b22Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12300beef1b22Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12301beef1b22Smrg 12302beef1b22Smrg 12303beef1b22Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12304beef1b22Smrg# ----------------------------------------------------------------------- 12305beef1b22Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12306beef1b22Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12307beef1b22Smrgm4_define([lt_if_append_uniq], 12308beef1b22Smrg[m4_ifdef([$1], 12309beef1b22Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12310beef1b22Smrg [lt_append([$1], [$2], [$3])$4], 12311beef1b22Smrg [$5])], 12312beef1b22Smrg [lt_append([$1], [$2], [$3])$4])]) 12313beef1b22Smrg 12314beef1b22Smrg 12315beef1b22Smrg# lt_dict_add(DICT, KEY, VALUE) 12316beef1b22Smrg# ----------------------------- 12317beef1b22Smrgm4_define([lt_dict_add], 12318beef1b22Smrg[m4_define([$1($2)], [$3])]) 123197b58d2e0Smrg 1232009885543Smrg 12321beef1b22Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12322beef1b22Smrg# -------------------------------------------- 12323beef1b22Smrgm4_define([lt_dict_add_subkey], 12324beef1b22Smrg[m4_define([$1($2:$3)], [$4])]) 1232509885543Smrg 1232609885543Smrg 12327beef1b22Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12328beef1b22Smrg# ---------------------------------- 12329beef1b22Smrgm4_define([lt_dict_fetch], 12330beef1b22Smrg[m4_ifval([$3], 12331beef1b22Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12332beef1b22Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12333b698ba48Smrg 12334b698ba48Smrg 12335beef1b22Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12336beef1b22Smrg# ----------------------------------------------------------------- 12337beef1b22Smrgm4_define([lt_if_dict_fetch], 12338beef1b22Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12339beef1b22Smrg [$5], 12340beef1b22Smrg [$6])]) 12341df9ffc95Smrg 12342e4f6584cSmrg 12343beef1b22Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12344beef1b22Smrg# -------------------------------------------------------------- 12345beef1b22Smrgm4_define([lt_dict_filter], 12346beef1b22Smrg[m4_if([$5], [], [], 12347beef1b22Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 12348beef1b22Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12349beef1b22Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12350beef1b22Smrg]) 12351df9ffc95Smrg 12352beef1b22Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12353beef1b22Smrg# 12354beef1b22Smrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12355beef1b22Smrg# Inc. 12356beef1b22Smrg# Written by Scott James Remnant, 2004 12357beef1b22Smrg# 12358beef1b22Smrg# This file is free software; the Free Software Foundation gives 12359beef1b22Smrg# unlimited permission to copy and/or distribute it, with or without 12360beef1b22Smrg# modifications, as long as this notice is preserved. 12361e4f6584cSmrg 12362beef1b22Smrg# @configure_input@ 12363df9ffc95Smrg 12364beef1b22Smrg# serial 4245 ltversion.m4 12365beef1b22Smrg# This file is part of GNU Libtool 12366df9ffc95Smrg 12367beef1b22Smrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12368beef1b22Smrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 12369df9ffc95Smrg 12370beef1b22SmrgAC_DEFUN([LTVERSION_VERSION], 12371beef1b22Smrg[macro_version='2.4.7' 12372beef1b22Smrgmacro_revision='2.4.7' 12373beef1b22Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12374beef1b22Smrg_LT_DECL(, macro_revision, 0) 12375beef1b22Smrg]) 12376df9ffc95Smrg 12377beef1b22Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12378beef1b22Smrg# 12379beef1b22Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12380beef1b22Smrg# Software Foundation, Inc. 12381beef1b22Smrg# Written by Scott James Remnant, 2004. 12382beef1b22Smrg# 12383beef1b22Smrg# This file is free software; the Free Software Foundation gives 12384beef1b22Smrg# unlimited permission to copy and/or distribute it, with or without 12385beef1b22Smrg# modifications, as long as this notice is preserved. 12386df9ffc95Smrg 12387beef1b22Smrg# serial 5 lt~obsolete.m4 12388df9ffc95Smrg 12389beef1b22Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 12390beef1b22Smrg# 12391beef1b22Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12392beef1b22Smrg# which have later been changed to m4_define as they aren't part of the 12393beef1b22Smrg# exported API, or moved to Autoconf or Automake where they belong. 12394beef1b22Smrg# 12395beef1b22Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12396beef1b22Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12397beef1b22Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 12398beef1b22Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12399beef1b22Smrg# and doesn't know about Autoconf macros at all.) 12400beef1b22Smrg# 12401beef1b22Smrg# So we provide this file, which has a silly filename so it's always 12402beef1b22Smrg# included after everything else. This provides aclocal with the 12403beef1b22Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12404beef1b22Smrg# because those macros already exist, or will be overwritten later. 12405beef1b22Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12406beef1b22Smrg# 12407beef1b22Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12408beef1b22Smrg# Yes, that means every name once taken will need to remain here until 12409beef1b22Smrg# we give up compatibility with versions before 1.7, at which point 12410beef1b22Smrg# we need to keep only those names which we still refer to. 124117b58d2e0Smrg 12412beef1b22Smrg# This is to help aclocal find these macros, as it can't see m4_define. 12413beef1b22SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12414df9ffc95Smrg 12415beef1b22Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12416beef1b22Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12417beef1b22Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12418beef1b22Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12419beef1b22Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12420beef1b22Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12421beef1b22Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12422beef1b22Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12423beef1b22Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12424beef1b22Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12425beef1b22Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12426beef1b22Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12427beef1b22Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12428beef1b22Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12429beef1b22Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12430beef1b22Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12431beef1b22Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12432beef1b22Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12433beef1b22Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12434beef1b22Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12435beef1b22Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12436beef1b22Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12437beef1b22Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12438beef1b22Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12439beef1b22Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12440beef1b22Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12441beef1b22Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12442beef1b22Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12443beef1b22Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12444beef1b22Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12445beef1b22Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12446beef1b22Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12447beef1b22Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12448beef1b22Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12449beef1b22Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12450beef1b22Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12451beef1b22Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12452beef1b22Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12453beef1b22Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12454beef1b22Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12455beef1b22Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12456beef1b22Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12457beef1b22Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12458beef1b22Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12459beef1b22Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12460beef1b22Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12461beef1b22Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12462beef1b22Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12463beef1b22Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12464beef1b22Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12465beef1b22Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12466beef1b22Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12467beef1b22Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12468beef1b22Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12469beef1b22Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12470beef1b22Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12471beef1b22Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12472beef1b22Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12473beef1b22Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12474beef1b22Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12475beef1b22Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12476b698ba48Smrg 12477