122663e35Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 27322289dSmrg 322663e35Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 41d54945dSmrg 51d54945dSmrg# This file is free software; the Free Software Foundation 61d54945dSmrg# gives unlimited permission to copy and/or distribute it, 71d54945dSmrg# with or without modifications, as long as this notice is preserved. 81d54945dSmrg 91d54945dSmrg# This program is distributed in the hope that it will be useful, 101d54945dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 111d54945dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 121d54945dSmrg# PARTICULAR PURPOSE. 131d54945dSmrg 147322289dSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15ba85709eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16ba85709eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1722663e35Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 1822663e35Smrg[m4_warning([this file was generated for autoconf 2.71. 19ba85709eSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20ba85709eSmrgIf you have problems, you may need to regenerate the build system entirely. 217322289dSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22ba85709eSmrg 2322663e35Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24d769e936Smrg# 2522663e35Smrg# This file is free software; the Free Software Foundation 2622663e35Smrg# gives unlimited permission to copy and/or distribute it, 2722663e35Smrg# with or without modifications, as long as this notice is preserved. 287322289dSmrg 2922663e35Smrg# AM_AUTOMAKE_VERSION(VERSION) 3022663e35Smrg# ---------------------------- 3122663e35Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3222663e35Smrg# generated from the m4 files accompanying Automake X.Y. 3322663e35Smrg# (This private macro should not be called outside this file.) 3422663e35SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3522663e35Smrg[am__api_version='1.16' 3622663e35Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3722663e35Smrgdnl require some minimum version. Point them to the right macro. 3822663e35Smrgm4_if([$1], [1.16.5], [], 3922663e35Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40d769e936Smrg]) 411d54945dSmrg 4222663e35Smrg# _AM_AUTOCONF_VERSION(VERSION) 4322663e35Smrg# ----------------------------- 4422663e35Smrg# aclocal traces this macro to find the Autoconf version. 4522663e35Smrg# This is a private macro too. Using m4_define simplifies 4622663e35Smrg# the logic in aclocal, which can simply ignore this definition. 4722663e35Smrgm4_define([_AM_AUTOCONF_VERSION], []) 481d54945dSmrg 4922663e35Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 5022663e35Smrg# ------------------------------- 5122663e35Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5222663e35Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5322663e35SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5422663e35Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 5522663e35Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5622663e35Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5722663e35Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 581d54945dSmrg 5922663e35Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60786a6f21Smrg 6122663e35Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 6222663e35Smrg# 6322663e35Smrg# This file is free software; the Free Software Foundation 6422663e35Smrg# gives unlimited permission to copy and/or distribute it, 6522663e35Smrg# with or without modifications, as long as this notice is preserved. 66786a6f21Smrg 6722663e35Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6822663e35Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 6922663e35Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 7022663e35Smrg# 7122663e35Smrg# Of course, Automake must honor this variable whenever it calls a 7222663e35Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7322663e35Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7422663e35Smrg# depending on how configure is run. This is pretty annoying, since 7522663e35Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7622663e35Smrg# source directory, any form will work fine, but in subdirectories a 7722663e35Smrg# relative path needs to be adjusted first. 7822663e35Smrg# 7922663e35Smrg# $ac_aux_dir/missing 8022663e35Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8122663e35Smrg# $top_srcdir/$ac_aux_dir/missing 8222663e35Smrg# fails if $ac_aux_dir is absolute, 8322663e35Smrg# fails when called from a subdirectory in a VPATH build with 8422663e35Smrg# a relative $ac_aux_dir 8522663e35Smrg# 8622663e35Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8722663e35Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8822663e35Smrg# harmless because $srcdir is '.', but things will broke when you 8922663e35Smrg# start a VPATH build or use an absolute $srcdir. 9022663e35Smrg# 9122663e35Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9222663e35Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9322663e35Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9422663e35Smrg# and then we would define $MISSING as 9522663e35Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9622663e35Smrg# This will work as long as MISSING is not called from configure, because 9722663e35Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9822663e35Smrg# However there are other variables, like CC, which are often used in 9922663e35Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10022663e35Smrg# 10122663e35Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10222663e35Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10322663e35Smrg# configured tree to be moved without reconfiguration. 10422663e35Smrg 10522663e35SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10622663e35Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 10722663e35Smrg# Expand $ac_aux_dir to an absolute path. 10822663e35Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 109d769e936Smrg]) 110d769e936Smrg 11122663e35Smrg# AM_CONDITIONAL -*- Autoconf -*- 112d769e936Smrg 11322663e35Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 11422663e35Smrg# 11522663e35Smrg# This file is free software; the Free Software Foundation 11622663e35Smrg# gives unlimited permission to copy and/or distribute it, 11722663e35Smrg# with or without modifications, as long as this notice is preserved. 118d769e936Smrg 11922663e35Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12022663e35Smrg# ------------------------------------- 12122663e35Smrg# Define a conditional. 12222663e35SmrgAC_DEFUN([AM_CONDITIONAL], 12322663e35Smrg[AC_PREREQ([2.52])dnl 12422663e35Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12522663e35Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12622663e35SmrgAC_SUBST([$1_TRUE])dnl 12722663e35SmrgAC_SUBST([$1_FALSE])dnl 12822663e35Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 12922663e35Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13022663e35Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13122663e35Smrgif $2; then 13222663e35Smrg $1_TRUE= 13322663e35Smrg $1_FALSE='#' 13422663e35Smrgelse 13522663e35Smrg $1_TRUE='#' 13622663e35Smrg $1_FALSE= 13722663e35Smrgfi 13822663e35SmrgAC_CONFIG_COMMANDS_PRE( 13922663e35Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14022663e35Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14122663e35SmrgUsually this means the macro was only invoked conditionally.]]) 14222663e35Smrgfi])]) 143d769e936Smrg 14422663e35Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 14522663e35Smrg# 14622663e35Smrg# This file is free software; the Free Software Foundation 14722663e35Smrg# gives unlimited permission to copy and/or distribute it, 14822663e35Smrg# with or without modifications, as long as this notice is preserved. 149d769e936Smrg 1501d54945dSmrg 15122663e35Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 15222663e35Smrg# written in clear, in which case automake, when reading aclocal.m4, 15322663e35Smrg# will think it sees a *use*, and therefore will trigger all it's 15422663e35Smrg# C support machinery. Also note that it means that autoscan, seeing 15522663e35Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1561d54945dSmrg 1571d54945dSmrg 15822663e35Smrg# _AM_DEPENDENCIES(NAME) 15922663e35Smrg# ---------------------- 16022663e35Smrg# See how the compiler implements dependency checking. 16122663e35Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 16222663e35Smrg# We try a few techniques and use that to set a single cache variable. 16322663e35Smrg# 16422663e35Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 16522663e35Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 16622663e35Smrg# dependency, and given that the user is not expected to run this macro, 16722663e35Smrg# just rely on AC_PROG_CC. 16822663e35SmrgAC_DEFUN([_AM_DEPENDENCIES], 16922663e35Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17022663e35SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17122663e35SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17222663e35SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 173786a6f21Smrg 17422663e35Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 17522663e35Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 17622663e35Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 17722663e35Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 17822663e35Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 17922663e35Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18022663e35Smrg [depcc="$$1" am_compiler_list=]) 181786a6f21Smrg 18222663e35SmrgAC_CACHE_CHECK([dependency style of $depcc], 18322663e35Smrg [am_cv_$1_dependencies_compiler_type], 18422663e35Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18522663e35Smrg # We make a subdir and do the tests there. Otherwise we can end up 18622663e35Smrg # making bogus files that we don't know about and never remove. For 18722663e35Smrg # instance it was reported that on HP-UX the gcc test will end up 18822663e35Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 18922663e35Smrg # in D". 19022663e35Smrg rm -rf conftest.dir 19122663e35Smrg mkdir conftest.dir 19222663e35Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19322663e35Smrg # using a relative directory. 19422663e35Smrg cp "$am_depcomp" conftest.dir 19522663e35Smrg cd conftest.dir 19622663e35Smrg # We will build objects and dependencies in a subdirectory because 19722663e35Smrg # it helps to detect inapplicable dependency modes. For instance 19822663e35Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 19922663e35Smrg # side effect of compilation, but ICC will put the dependencies in 20022663e35Smrg # the current directory while Tru64 will put them in the object 20122663e35Smrg # directory. 20222663e35Smrg mkdir sub 203d769e936Smrg 20422663e35Smrg am_cv_$1_dependencies_compiler_type=none 20522663e35Smrg if test "$am_compiler_list" = ""; then 20622663e35Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 20722663e35Smrg fi 20822663e35Smrg am__universal=false 20922663e35Smrg m4_case([$1], [CC], 21022663e35Smrg [case " $depcc " in #( 21122663e35Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21222663e35Smrg esac], 21322663e35Smrg [CXX], 21422663e35Smrg [case " $depcc " in #( 21522663e35Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21622663e35Smrg esac]) 217d769e936Smrg 21822663e35Smrg for depmode in $am_compiler_list; do 21922663e35Smrg # Setup a source with many dependencies, because some compilers 22022663e35Smrg # like to wrap large dependency lists on column 80 (with \), and 22122663e35Smrg # we should not choose a depcomp mode which is confused by this. 22222663e35Smrg # 22322663e35Smrg # We need to recreate these files for each test, as the compiler may 22422663e35Smrg # overwrite some of them when testing with obscure command lines. 22522663e35Smrg # This happens at least with the AIX C compiler. 22622663e35Smrg : > sub/conftest.c 22722663e35Smrg for i in 1 2 3 4 5 6; do 22822663e35Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 22922663e35Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 23022663e35Smrg # Solaris 10 /bin/sh. 23122663e35Smrg echo '/* dummy */' > sub/conftst$i.h 2327322289dSmrg done 23322663e35Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2347322289dSmrg 23522663e35Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 23622663e35Smrg # mode. It turns out that the SunPro C++ compiler does not properly 23722663e35Smrg # handle '-M -o', and we need to detect this. Also, some Intel 23822663e35Smrg # versions had trouble with output in subdirs. 23922663e35Smrg am__obj=sub/conftest.${OBJEXT-o} 24022663e35Smrg am__minus_obj="-o $am__obj" 24122663e35Smrg case $depmode in 24222663e35Smrg gcc) 24322663e35Smrg # This depmode causes a compiler race in universal mode. 24422663e35Smrg test "$am__universal" = false || continue 24522663e35Smrg ;; 24622663e35Smrg nosideeffect) 24722663e35Smrg # After this tag, mechanisms are not by side-effect, so they'll 24822663e35Smrg # only be used when explicitly requested. 24922663e35Smrg if test "x$enable_dependency_tracking" = xyes; then 25022663e35Smrg continue 25122663e35Smrg else 25222663e35Smrg break 25322663e35Smrg fi 25422663e35Smrg ;; 25522663e35Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 25622663e35Smrg # This compiler won't grok '-c -o', but also, the minuso test has 25722663e35Smrg # not run yet. These depmodes are late enough in the game, and 25822663e35Smrg # so weak that their functioning should not be impacted. 25922663e35Smrg am__obj=conftest.${OBJEXT-o} 26022663e35Smrg am__minus_obj= 26122663e35Smrg ;; 26222663e35Smrg none) break ;; 26322663e35Smrg esac 26422663e35Smrg if depmode=$depmode \ 26522663e35Smrg source=sub/conftest.c object=$am__obj \ 26622663e35Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 26722663e35Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 26822663e35Smrg >/dev/null 2>conftest.err && 26922663e35Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27022663e35Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27122663e35Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27222663e35Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27322663e35Smrg # icc doesn't choke on unknown options, it will just issue warnings 27422663e35Smrg # or remarks (even with -Werror). So we grep stderr for any message 27522663e35Smrg # that says an option was ignored or not supported. 27622663e35Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 27722663e35Smrg # icc: Command line warning: ignoring option '-M'; no argument required 27822663e35Smrg # The diagnosis changed in icc 8.0: 27922663e35Smrg # icc: Command line remark: option '-MP' not supported 28022663e35Smrg if (grep 'ignoring option' conftest.err || 28122663e35Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28222663e35Smrg am_cv_$1_dependencies_compiler_type=$depmode 28322663e35Smrg break 28422663e35Smrg fi 28522663e35Smrg fi 28622663e35Smrg done 2877322289dSmrg 28822663e35Smrg cd .. 28922663e35Smrg rm -rf conftest.dir 29022663e35Smrgelse 29122663e35Smrg am_cv_$1_dependencies_compiler_type=none 29222663e35Smrgfi 29322663e35Smrg]) 29422663e35SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29522663e35SmrgAM_CONDITIONAL([am__fastdep$1], [ 29622663e35Smrg test "x$enable_dependency_tracking" != xno \ 29722663e35Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298d769e936Smrg]) 299d769e936Smrg 300d769e936Smrg 30122663e35Smrg# AM_SET_DEPDIR 30222663e35Smrg# ------------- 30322663e35Smrg# Choose a directory name for dependency files. 30422663e35Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 30522663e35SmrgAC_DEFUN([AM_SET_DEPDIR], 30622663e35Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 30722663e35SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 30822663e35Smrg]) 309ec713c28Smrg 310d769e936Smrg 31122663e35Smrg# AM_DEP_TRACK 31222663e35Smrg# ------------ 31322663e35SmrgAC_DEFUN([AM_DEP_TRACK], 31422663e35Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 31522663e35SmrgAS_HELP_STRING( 31622663e35Smrg [--enable-dependency-tracking], 31722663e35Smrg [do not reject slow dependency extractors]) 31822663e35SmrgAS_HELP_STRING( 31922663e35Smrg [--disable-dependency-tracking], 32022663e35Smrg [speeds up one-time build])]) 32122663e35Smrgif test "x$enable_dependency_tracking" != xno; then 32222663e35Smrg am_depcomp="$ac_aux_dir/depcomp" 32322663e35Smrg AMDEPBACKSLASH='\' 32422663e35Smrg am__nodep='_no' 325d769e936Smrgfi 32622663e35SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32722663e35SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32822663e35Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32922663e35SmrgAC_SUBST([am__nodep])dnl 33022663e35Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 331d769e936Smrg]) 332786a6f21Smrg 33322663e35Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 334d769e936Smrg 33522663e35Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 33622663e35Smrg# 33722663e35Smrg# This file is free software; the Free Software Foundation 33822663e35Smrg# gives unlimited permission to copy and/or distribute it, 33922663e35Smrg# with or without modifications, as long as this notice is preserved. 3401d54945dSmrg 34122663e35Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 34222663e35Smrg# ------------------------------ 34322663e35SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34422663e35Smrg[{ 34522663e35Smrg # Older Autoconf quotes --file arguments for eval, but not when files 34622663e35Smrg # are listed without --file. Let's play safe and only enable the eval 34722663e35Smrg # if we detect the quoting. 34822663e35Smrg # TODO: see whether this extra hack can be removed once we start 34922663e35Smrg # requiring Autoconf 2.70 or later. 35022663e35Smrg AS_CASE([$CONFIG_FILES], 35122663e35Smrg [*\'*], [eval set x "$CONFIG_FILES"], 35222663e35Smrg [*], [set x $CONFIG_FILES]) 35322663e35Smrg shift 35422663e35Smrg # Used to flag and report bootstrapping failures. 35522663e35Smrg am_rc=0 35622663e35Smrg for am_mf 35722663e35Smrg do 35822663e35Smrg # Strip MF so we end up with the name of the file. 35922663e35Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 36022663e35Smrg # Check whether this is an Automake generated Makefile which includes 36122663e35Smrg # dependency-tracking related rules and includes. 36222663e35Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 36322663e35Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36422663e35Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 36522663e35Smrg || continue 36622663e35Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 36722663e35Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 36822663e35Smrg AM_RUN_LOG([cd "$am_dirpart" \ 36922663e35Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 37022663e35Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 37122663e35Smrg done 37222663e35Smrg if test $am_rc -ne 0; then 37322663e35Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 37422663e35Smrg for automatic dependency tracking. If GNU make was not used, consider 37522663e35Smrg re-running the configure script with MAKE="gmake" (or whatever is 37622663e35Smrg necessary). You can also try re-running configure with the 37722663e35Smrg '--disable-dependency-tracking' option to at least be able to build 37822663e35Smrg the package (albeit without support for automatic dependency tracking).]) 3791d54945dSmrg fi 38022663e35Smrg AS_UNSET([am_dirpart]) 38122663e35Smrg AS_UNSET([am_filepart]) 38222663e35Smrg AS_UNSET([am_mf]) 38322663e35Smrg AS_UNSET([am_rc]) 38422663e35Smrg rm -f conftest-deps.mk 38522663e35Smrg} 38622663e35Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3871d54945dSmrg 3881d54945dSmrg 38922663e35Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39022663e35Smrg# ----------------------------- 39122663e35Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 39222663e35Smrg# 39322663e35Smrg# This code is only required when automatic dependency tracking is enabled. 39422663e35Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 39522663e35Smrg# order to bootstrap the dependency handling code. 39622663e35SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 39722663e35Smrg[AC_CONFIG_COMMANDS([depfiles], 39822663e35Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 39922663e35Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 400ec713c28Smrg 40122663e35Smrg# Do all the work for Automake. -*- Autoconf -*- 4021d54945dSmrg 40322663e35Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 40422663e35Smrg# 40522663e35Smrg# This file is free software; the Free Software Foundation 40622663e35Smrg# gives unlimited permission to copy and/or distribute it, 40722663e35Smrg# with or without modifications, as long as this notice is preserved. 4081d54945dSmrg 40922663e35Smrg# This macro actually does too much. Some checks are only needed if 41022663e35Smrg# your package does certain things. But this isn't really a big deal. 4111d54945dSmrg 41222663e35Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 41322663e35Smrgm4_define([AC_PROG_CC], 41422663e35Smrgm4_defn([AC_PROG_CC]) 41522663e35Smrg[_AM_PROG_CC_C_O 41622663e35Smrg]) 4171d54945dSmrg 41822663e35Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 41922663e35Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 42022663e35Smrg# ----------------------------------------------- 42122663e35Smrg# The call with PACKAGE and VERSION arguments is the old style 42222663e35Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 42322663e35Smrg# and VERSION should now be passed to AC_INIT and removed from 42422663e35Smrg# the call to AM_INIT_AUTOMAKE. 42522663e35Smrg# We support both call styles for the transition. After 42622663e35Smrg# the next Automake release, Autoconf can make the AC_INIT 42722663e35Smrg# arguments mandatory, and then we can depend on a new Autoconf 42822663e35Smrg# release and drop the old call support. 42922663e35SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 43022663e35Smrg[AC_PREREQ([2.65])dnl 43122663e35Smrgm4_ifdef([_$0_ALREADY_INIT], 43222663e35Smrg [m4_fatal([$0 expanded multiple times 43322663e35Smrg]m4_defn([_$0_ALREADY_INIT]))], 43422663e35Smrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 43522663e35Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 43622663e35Smrgdnl the ones we care about. 43722663e35Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 43822663e35SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 43922663e35SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 44022663e35Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 44122663e35Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 44222663e35Smrg # is not polluted with repeated "-I." 44322663e35Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 44422663e35Smrg # test to see if srcdir already configured 44522663e35Smrg if test -f $srcdir/config.status; then 44622663e35Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 44722663e35Smrg fi 44822663e35Smrgfi 449786a6f21Smrg 45022663e35Smrg# test whether we have cygpath 45122663e35Smrgif test -z "$CYGPATH_W"; then 45222663e35Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 45322663e35Smrg CYGPATH_W='cygpath -w' 45422663e35Smrg else 45522663e35Smrg CYGPATH_W=echo 45622663e35Smrg fi 45722663e35Smrgfi 45822663e35SmrgAC_SUBST([CYGPATH_W]) 459786a6f21Smrg 46022663e35Smrg# Define the identity of the package. 46122663e35Smrgdnl Distinguish between old-style and new-style calls. 46222663e35Smrgm4_ifval([$2], 46322663e35Smrg[AC_DIAGNOSE([obsolete], 46422663e35Smrg [$0: two- and three-arguments forms are deprecated.]) 46522663e35Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 46622663e35Smrg AC_SUBST([PACKAGE], [$1])dnl 46722663e35Smrg AC_SUBST([VERSION], [$2])], 46822663e35Smrg[_AM_SET_OPTIONS([$1])dnl 46922663e35Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 47022663e35Smrgm4_if( 47122663e35Smrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 47222663e35Smrg [ok:ok],, 47322663e35Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 47422663e35Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 47522663e35Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476786a6f21Smrg 47722663e35Smrg_AM_IF_OPTION([no-define],, 47822663e35Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 47922663e35Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 480786a6f21Smrg 48122663e35Smrg# Some tools Automake needs. 48222663e35SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 48322663e35SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 48422663e35SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 48522663e35SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 48622663e35SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 48722663e35SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 48822663e35SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 48922663e35SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49022663e35SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 49122663e35SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 49222663e35Smrg# For better backward compatibility. To be removed once Automake 1.9.x 49322663e35Smrg# dies out for good. For more background, see: 49422663e35Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 49522663e35Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 49622663e35SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 49722663e35Smrg# We need awk for the "check" target (and possibly the TAP driver). The 49822663e35Smrg# system "awk" is bad on some platforms. 49922663e35SmrgAC_REQUIRE([AC_PROG_AWK])dnl 50022663e35SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50122663e35SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50222663e35Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50322663e35Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50422663e35Smrg [_AM_PROG_TAR([v7])])]) 50522663e35Smrg_AM_IF_OPTION([no-dependencies],, 50622663e35Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 50722663e35Smrg [_AM_DEPENDENCIES([CC])], 50822663e35Smrg [m4_define([AC_PROG_CC], 50922663e35Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 51022663e35SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51122663e35Smrg [_AM_DEPENDENCIES([CXX])], 51222663e35Smrg [m4_define([AC_PROG_CXX], 51322663e35Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 51422663e35SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51522663e35Smrg [_AM_DEPENDENCIES([OBJC])], 51622663e35Smrg [m4_define([AC_PROG_OBJC], 51722663e35Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 51822663e35SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 51922663e35Smrg [_AM_DEPENDENCIES([OBJCXX])], 52022663e35Smrg [m4_define([AC_PROG_OBJCXX], 52122663e35Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 522d769e936Smrg]) 52322663e35Smrg# Variables for tags utilities; see am/tags.am 52422663e35Smrgif test -z "$CTAGS"; then 52522663e35Smrg CTAGS=ctags 52622663e35Smrgfi 52722663e35SmrgAC_SUBST([CTAGS]) 52822663e35Smrgif test -z "$ETAGS"; then 52922663e35Smrg ETAGS=etags 53022663e35Smrgfi 53122663e35SmrgAC_SUBST([ETAGS]) 53222663e35Smrgif test -z "$CSCOPE"; then 53322663e35Smrg CSCOPE=cscope 53422663e35Smrgfi 53522663e35SmrgAC_SUBST([CSCOPE]) 5361d54945dSmrg 53722663e35SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 53822663e35Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 53922663e35Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 54022663e35Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 54122663e35SmrgAC_CONFIG_COMMANDS_PRE(dnl 54222663e35Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 54322663e35Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5441d54945dSmrg 54522663e35Smrg# POSIX will say in a future version that running "rm -f" with no argument 54622663e35Smrg# is OK; and we want to be able to make that assumption in our Makefile 54722663e35Smrg# recipes. So use an aggressive probe to check that the usage we want is 54822663e35Smrg# actually supported "in the wild" to an acceptable degree. 54922663e35Smrg# See automake bug#10828. 55022663e35Smrg# To make any issue more visible, cause the running configure to be aborted 55122663e35Smrg# by default if the 'rm' program in use doesn't match our expectations; the 55222663e35Smrg# user can still override this though. 55322663e35Smrgif rm -f && rm -fr && rm -rf; then : OK; else 55422663e35Smrg cat >&2 <<'END' 55522663e35SmrgOops! 5561d54945dSmrg 55722663e35SmrgYour 'rm' program seems unable to run without file operands specified 55822663e35Smrgon the command line, even when the '-f' option is present. This is contrary 55922663e35Smrgto the behaviour of most rm programs out there, and not conforming with 56022663e35Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 5611d54945dSmrg 56222663e35SmrgPlease tell bug-automake@gnu.org about your system, including the value 56322663e35Smrgof your $PATH and any error possibly output before this message. This 56422663e35Smrgcan help us improve future automake versions. 5651d54945dSmrg 56622663e35SmrgEND 56722663e35Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 56822663e35Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 56922663e35Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 57022663e35Smrg echo >&2 57122663e35Smrg else 57222663e35Smrg cat >&2 <<'END' 57322663e35SmrgAborting the configuration process, to ensure you take notice of the issue. 574d769e936Smrg 57522663e35SmrgYou can download and install GNU coreutils to get an 'rm' implementation 57622663e35Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 577d769e936Smrg 57822663e35SmrgIf you want to complete the configuration process using your problematic 57922663e35Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 58022663e35Smrgto "yes", and re-run configure. 581d769e936Smrg 58222663e35SmrgEND 58322663e35Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 58422663e35Smrg fi 58522663e35Smrgfi 58622663e35Smrgdnl The trailing newline in this macro's definition is deliberate, for 58722663e35Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 58822663e35Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 589d769e936Smrg]) 5901d54945dSmrg 59122663e35Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 59222663e35Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 59322663e35Smrgdnl mangled by Autoconf and run in a shell conditional statement. 59422663e35Smrgm4_define([_AC_COMPILER_EXEEXT], 59522663e35Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 596ba85709eSmrg 59722663e35Smrg# When config.status generates a header, we must update the stamp-h file. 59822663e35Smrg# This file resides in the same directory as the config header 59922663e35Smrg# that is generated. The stamp files are numbered to have different names. 600d769e936Smrg 60122663e35Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 60222663e35Smrg# loop where config.status creates the headers, so we can generate 60322663e35Smrg# our stamp files there. 60422663e35SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 60522663e35Smrg[# Compute $1's index in $config_headers. 60622663e35Smrg_am_arg=$1 60722663e35Smrg_am_stamp_count=1 60822663e35Smrgfor _am_header in $config_headers :; do 60922663e35Smrg case $_am_header in 61022663e35Smrg $_am_arg | $_am_arg:* ) 61122663e35Smrg break ;; 61222663e35Smrg * ) 61322663e35Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 61422663e35Smrg esac 61522663e35Smrgdone 61622663e35Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617d769e936Smrg 61822663e35Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 61922663e35Smrg# 62022663e35Smrg# This file is free software; the Free Software Foundation 62122663e35Smrg# gives unlimited permission to copy and/or distribute it, 62222663e35Smrg# with or without modifications, as long as this notice is preserved. 623d769e936Smrg 62422663e35Smrg# AM_PROG_INSTALL_SH 62522663e35Smrg# ------------------ 62622663e35Smrg# Define $install_sh. 62722663e35SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 62822663e35Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 62922663e35Smrgif test x"${install_sh+set}" != xset; then 63022663e35Smrg case $am_aux_dir in 63122663e35Smrg *\ * | *\ *) 63222663e35Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 63322663e35Smrg *) 63422663e35Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 63522663e35Smrg esac 63622663e35Smrgfi 63722663e35SmrgAC_SUBST([install_sh])]) 6381d54945dSmrg 63922663e35Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 64022663e35Smrg# 64122663e35Smrg# This file is free software; the Free Software Foundation 64222663e35Smrg# gives unlimited permission to copy and/or distribute it, 64322663e35Smrg# with or without modifications, as long as this notice is preserved. 6441d54945dSmrg 64522663e35Smrg# Check whether the underlying file-system supports filenames 64622663e35Smrg# with a leading dot. For instance MS-DOS doesn't. 64722663e35SmrgAC_DEFUN([AM_SET_LEADING_DOT], 64822663e35Smrg[rm -rf .tst 2>/dev/null 64922663e35Smrgmkdir .tst 2>/dev/null 65022663e35Smrgif test -d .tst; then 65122663e35Smrg am__leading_dot=. 65222663e35Smrgelse 65322663e35Smrg am__leading_dot=_ 65422663e35Smrgfi 65522663e35Smrgrmdir .tst 2>/dev/null 65622663e35SmrgAC_SUBST([am__leading_dot])]) 6571d54945dSmrg 65822663e35Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6591d54945dSmrg 66022663e35Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 66122663e35Smrg# 66222663e35Smrg# This file is free software; the Free Software Foundation 66322663e35Smrg# gives unlimited permission to copy and/or distribute it, 66422663e35Smrg# with or without modifications, as long as this notice is preserved. 6651d54945dSmrg 66622663e35Smrg# AM_MAKE_INCLUDE() 66722663e35Smrg# ----------------- 66822663e35Smrg# Check whether make has an 'include' directive that can support all 66922663e35Smrg# the idioms we need for our automatic dependency tracking code. 67022663e35SmrgAC_DEFUN([AM_MAKE_INCLUDE], 67122663e35Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 67222663e35Smrgcat > confinc.mk << 'END' 67322663e35Smrgam__doit: 67422663e35Smrg @echo this is the am__doit target >confinc.out 67522663e35Smrg.PHONY: am__doit 67622663e35SmrgEND 67722663e35Smrgam__include="#" 67822663e35Smrgam__quote= 67922663e35Smrg# BSD make does it like this. 68022663e35Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 68122663e35Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 68222663e35Smrgecho 'include confinc.mk # ignored' > confmf.GNU 68322663e35Smrg_am_result=no 68422663e35Smrgfor s in GNU BSD; do 68522663e35Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 68622663e35Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 68722663e35Smrg ['0:this is the am__doit target'], 68822663e35Smrg [AS_CASE([$s], 68922663e35Smrg [BSD], [am__include='.include' am__quote='"'], 69022663e35Smrg [am__include='include' am__quote=''])]) 69122663e35Smrg if test "$am__include" != "#"; then 69222663e35Smrg _am_result="yes ($s style)" 69322663e35Smrg break 69422663e35Smrg fi 69522663e35Smrgdone 69622663e35Smrgrm -f confinc.* confmf.* 69722663e35SmrgAC_MSG_RESULT([${_am_result}]) 69822663e35SmrgAC_SUBST([am__include])]) 69922663e35SmrgAC_SUBST([am__quote])]) 7001d54945dSmrg 70122663e35Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7021d54945dSmrg 70322663e35Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 70422663e35Smrg# 70522663e35Smrg# This file is free software; the Free Software Foundation 70622663e35Smrg# gives unlimited permission to copy and/or distribute it, 70722663e35Smrg# with or without modifications, as long as this notice is preserved. 7081d54945dSmrg 70922663e35Smrg# AM_MISSING_PROG(NAME, PROGRAM) 71022663e35Smrg# ------------------------------ 71122663e35SmrgAC_DEFUN([AM_MISSING_PROG], 71222663e35Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 71322663e35Smrg$1=${$1-"${am_missing_run}$2"} 71422663e35SmrgAC_SUBST($1)]) 71522663e35Smrg 71622663e35Smrg# AM_MISSING_HAS_RUN 71722663e35Smrg# ------------------ 71822663e35Smrg# Define MISSING if not defined so far and test if it is modern enough. 71922663e35Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 72022663e35SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 72122663e35Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 72222663e35SmrgAC_REQUIRE_AUX_FILE([missing])dnl 72322663e35Smrgif test x"${MISSING+set}" != xset; then 72422663e35Smrg MISSING="\${SHELL} '$am_aux_dir/missing'" 72522663e35Smrgfi 72622663e35Smrg# Use eval to expand $SHELL 72722663e35Smrgif eval "$MISSING --is-lightweight"; then 72822663e35Smrg am_missing_run="$MISSING " 72922663e35Smrgelse 73022663e35Smrg am_missing_run= 73122663e35Smrg AC_MSG_WARN(['missing' script is too old or missing]) 73222663e35Smrgfi 73322663e35Smrg]) 7341d54945dSmrg 73522663e35Smrg# Helper functions for option handling. -*- Autoconf -*- 7361d54945dSmrg 73722663e35Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 73822663e35Smrg# 73922663e35Smrg# This file is free software; the Free Software Foundation 74022663e35Smrg# gives unlimited permission to copy and/or distribute it, 74122663e35Smrg# with or without modifications, as long as this notice is preserved. 7421d54945dSmrg 74322663e35Smrg# _AM_MANGLE_OPTION(NAME) 74422663e35Smrg# ----------------------- 74522663e35SmrgAC_DEFUN([_AM_MANGLE_OPTION], 74622663e35Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7471d54945dSmrg 74822663e35Smrg# _AM_SET_OPTION(NAME) 74922663e35Smrg# -------------------- 75022663e35Smrg# Set option NAME. Presently that only means defining a flag for this option. 75122663e35SmrgAC_DEFUN([_AM_SET_OPTION], 75222663e35Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 7531d54945dSmrg 75422663e35Smrg# _AM_SET_OPTIONS(OPTIONS) 75522663e35Smrg# ------------------------ 75622663e35Smrg# OPTIONS is a space-separated list of Automake options. 75722663e35SmrgAC_DEFUN([_AM_SET_OPTIONS], 75822663e35Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759ec713c28Smrg 76022663e35Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 76122663e35Smrg# ------------------------------------------- 76222663e35Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 76322663e35SmrgAC_DEFUN([_AM_IF_OPTION], 76422663e35Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7651d54945dSmrg 76622663e35Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 76722663e35Smrg# 76822663e35Smrg# This file is free software; the Free Software Foundation 76922663e35Smrg# gives unlimited permission to copy and/or distribute it, 77022663e35Smrg# with or without modifications, as long as this notice is preserved. 7711d54945dSmrg 77222663e35Smrg# _AM_PROG_CC_C_O 77322663e35Smrg# --------------- 77422663e35Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 77522663e35Smrg# to automatically call this. 77622663e35SmrgAC_DEFUN([_AM_PROG_CC_C_O], 77722663e35Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 77822663e35SmrgAC_REQUIRE_AUX_FILE([compile])dnl 77922663e35SmrgAC_LANG_PUSH([C])dnl 78022663e35SmrgAC_CACHE_CHECK( 78122663e35Smrg [whether $CC understands -c and -o together], 78222663e35Smrg [am_cv_prog_cc_c_o], 78322663e35Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 78422663e35Smrg # Make sure it works both with $CC and with simple cc. 78522663e35Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 78622663e35Smrg # compilers refuse to overwrite an existing .o file with -o, 78722663e35Smrg # though they will create one. 78822663e35Smrg am_cv_prog_cc_c_o=yes 78922663e35Smrg for am_i in 1 2; do 79022663e35Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 79122663e35Smrg && test -f conftest2.$ac_objext; then 79222663e35Smrg : OK 79322663e35Smrg else 79422663e35Smrg am_cv_prog_cc_c_o=no 79522663e35Smrg break 79622663e35Smrg fi 79722663e35Smrg done 79822663e35Smrg rm -f core conftest* 79922663e35Smrg unset am_i]) 80022663e35Smrgif test "$am_cv_prog_cc_c_o" != yes; then 80122663e35Smrg # Losing compiler, so override with the script. 80222663e35Smrg # FIXME: It is wrong to rewrite CC. 80322663e35Smrg # But if we don't then we get into trouble of one sort or another. 80422663e35Smrg # A longer-term fix would be to have automake use am__CC in this case, 80522663e35Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 80622663e35Smrg CC="$am_aux_dir/compile $CC" 80722663e35Smrgfi 80822663e35SmrgAC_LANG_POP([C])]) 8091d54945dSmrg 81022663e35Smrg# For backward compatibility. 81122663e35SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 8121d54945dSmrg 81322663e35Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 814d769e936Smrg# 81522663e35Smrg# This file is free software; the Free Software Foundation 81622663e35Smrg# gives unlimited permission to copy and/or distribute it, 81722663e35Smrg# with or without modifications, as long as this notice is preserved. 818d769e936Smrg 81922663e35Smrg# AM_RUN_LOG(COMMAND) 82022663e35Smrg# ------------------- 82122663e35Smrg# Run COMMAND, save the exit status in ac_status, and log it. 82222663e35Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 82322663e35SmrgAC_DEFUN([AM_RUN_LOG], 82422663e35Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 82522663e35Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 82622663e35Smrg ac_status=$? 82722663e35Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 82822663e35Smrg (exit $ac_status); }]) 829d769e936Smrg 83022663e35Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 831d769e936Smrg 83222663e35Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833d769e936Smrg# 83422663e35Smrg# This file is free software; the Free Software Foundation 83522663e35Smrg# gives unlimited permission to copy and/or distribute it, 83622663e35Smrg# with or without modifications, as long as this notice is preserved. 837d769e936Smrg 83822663e35Smrg# AM_SANITY_CHECK 83922663e35Smrg# --------------- 84022663e35SmrgAC_DEFUN([AM_SANITY_CHECK], 84122663e35Smrg[AC_MSG_CHECKING([whether build environment is sane]) 84222663e35Smrg# Reject unsafe characters in $srcdir or the absolute working directory 84322663e35Smrg# name. Accept space and tab only in the latter. 84422663e35Smrgam_lf=' 84522663e35Smrg' 84622663e35Smrgcase `pwd` in 84722663e35Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 84822663e35Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 84922663e35Smrgesac 85022663e35Smrgcase $srcdir in 85122663e35Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 85222663e35Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 85322663e35Smrgesac 854d769e936Smrg 85522663e35Smrg# Do 'set' in a subshell so we don't clobber the current shell's 85622663e35Smrg# arguments. Must try -L first in case configure is actually a 85722663e35Smrg# symlink; some systems play weird games with the mod time of symlinks 85822663e35Smrg# (eg FreeBSD returns the mod time of the symlink's containing 85922663e35Smrg# directory). 86022663e35Smrgif ( 86122663e35Smrg am_has_slept=no 86222663e35Smrg for am_try in 1 2; do 86322663e35Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 86422663e35Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 86522663e35Smrg if test "$[*]" = "X"; then 86622663e35Smrg # -L didn't work. 86722663e35Smrg set X `ls -t "$srcdir/configure" conftest.file` 86822663e35Smrg fi 86922663e35Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 87022663e35Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 871d769e936Smrg 87222663e35Smrg # If neither matched, then we have a broken ls. This can happen 87322663e35Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 87422663e35Smrg # broken ls alias from the environment. This has actually 87522663e35Smrg # happened. Such a system could not be considered "sane". 87622663e35Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 87722663e35Smrg alias in your environment]) 87822663e35Smrg fi 87922663e35Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 88022663e35Smrg break 88122663e35Smrg fi 88222663e35Smrg # Just in case. 88322663e35Smrg sleep 1 88422663e35Smrg am_has_slept=yes 88522663e35Smrg done 88622663e35Smrg test "$[2]" = conftest.file 88722663e35Smrg ) 88822663e35Smrgthen 88922663e35Smrg # Ok. 89022663e35Smrg : 89122663e35Smrgelse 89222663e35Smrg AC_MSG_ERROR([newly created file is older than distributed files! 89322663e35SmrgCheck your system clock]) 89422663e35Smrgfi 89522663e35SmrgAC_MSG_RESULT([yes]) 89622663e35Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 89722663e35Smrg# generated files are strictly newer. 89822663e35Smrgam_sleep_pid= 89922663e35Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 90022663e35Smrg ( sleep 1 ) & 90122663e35Smrg am_sleep_pid=$! 90222663e35Smrgfi 90322663e35SmrgAC_CONFIG_COMMANDS_PRE( 90422663e35Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 90522663e35Smrg if test -n "$am_sleep_pid"; then 90622663e35Smrg # Hide warnings about reused PIDs. 90722663e35Smrg wait $am_sleep_pid 2>/dev/null 90822663e35Smrg fi 90922663e35Smrg AC_MSG_RESULT([done])]) 91022663e35Smrgrm -f conftest.file 91122663e35Smrg]) 912d769e936Smrg 91322663e35Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 91422663e35Smrg# 91522663e35Smrg# This file is free software; the Free Software Foundation 91622663e35Smrg# gives unlimited permission to copy and/or distribute it, 91722663e35Smrg# with or without modifications, as long as this notice is preserved. 918d769e936Smrg 91922663e35Smrg# AM_SILENT_RULES([DEFAULT]) 92022663e35Smrg# -------------------------- 92122663e35Smrg# Enable less verbose build rules; with the default set to DEFAULT 92222663e35Smrg# ("yes" being less verbose, "no" or empty being verbose). 92322663e35SmrgAC_DEFUN([AM_SILENT_RULES], 92422663e35Smrg[AC_ARG_ENABLE([silent-rules], [dnl 92522663e35SmrgAS_HELP_STRING( 92622663e35Smrg [--enable-silent-rules], 92722663e35Smrg [less verbose build output (undo: "make V=1")]) 92822663e35SmrgAS_HELP_STRING( 92922663e35Smrg [--disable-silent-rules], 93022663e35Smrg [verbose build output (undo: "make V=0")])dnl 93122663e35Smrg]) 93222663e35Smrgcase $enable_silent_rules in @%:@ ((( 93322663e35Smrg yes) AM_DEFAULT_VERBOSITY=0;; 93422663e35Smrg no) AM_DEFAULT_VERBOSITY=1;; 93522663e35Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 93622663e35Smrgesac 93722663e35Smrgdnl 93822663e35Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 93922663e35Smrgdnl do not support nested variable expansions. 94022663e35Smrgdnl See automake bug#9928 and bug#10237. 94122663e35Smrgam_make=${MAKE-make} 94222663e35SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 94322663e35Smrg [am_cv_make_support_nested_variables], 94422663e35Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 94522663e35SmrgBAR0=false 94622663e35SmrgBAR1=true 94722663e35SmrgV=1 94822663e35Smrgam__doit: 94922663e35Smrg @$(TRUE) 95022663e35Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 95122663e35Smrg am_cv_make_support_nested_variables=yes 95222663e35Smrgelse 95322663e35Smrg am_cv_make_support_nested_variables=no 95422663e35Smrgfi]) 95522663e35Smrgif test $am_cv_make_support_nested_variables = yes; then 95622663e35Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 95722663e35Smrg AM_V='$(V)' 95822663e35Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 95922663e35Smrgelse 96022663e35Smrg AM_V=$AM_DEFAULT_VERBOSITY 96122663e35Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 96222663e35Smrgfi 96322663e35SmrgAC_SUBST([AM_V])dnl 96422663e35SmrgAM_SUBST_NOTMAKE([AM_V])dnl 96522663e35SmrgAC_SUBST([AM_DEFAULT_V])dnl 96622663e35SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 96722663e35SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 96822663e35SmrgAM_BACKSLASH='\' 96922663e35SmrgAC_SUBST([AM_BACKSLASH])dnl 97022663e35Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 97122663e35Smrg]) 972d769e936Smrg 97322663e35Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 97422663e35Smrg# 97522663e35Smrg# This file is free software; the Free Software Foundation 97622663e35Smrg# gives unlimited permission to copy and/or distribute it, 97722663e35Smrg# with or without modifications, as long as this notice is preserved. 978d769e936Smrg 97922663e35Smrg# AM_PROG_INSTALL_STRIP 98022663e35Smrg# --------------------- 98122663e35Smrg# One issue with vendor 'install' (even GNU) is that you can't 98222663e35Smrg# specify the program used to strip binaries. This is especially 98322663e35Smrg# annoying in cross-compiling environments, where the build's strip 98422663e35Smrg# is unlikely to handle the host's binaries. 98522663e35Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 98622663e35Smrg# always use install-sh in "make install-strip", and initialize 98722663e35Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 98822663e35SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 98922663e35Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 99022663e35Smrg# Installed binaries are usually stripped using 'strip' when the user 99122663e35Smrg# run "make install-strip". However 'strip' might not be the right 99222663e35Smrg# tool to use in cross-compilation environments, therefore Automake 99322663e35Smrg# will honor the 'STRIP' environment variable to overrule this program. 99422663e35Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 99522663e35Smrgif test "$cross_compiling" != no; then 99622663e35Smrg AC_CHECK_TOOL([STRIP], [strip], :) 99722663e35Smrgfi 99822663e35SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 99922663e35SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000d769e936Smrg 100122663e35Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 100222663e35Smrg# 100322663e35Smrg# This file is free software; the Free Software Foundation 100422663e35Smrg# gives unlimited permission to copy and/or distribute it, 100522663e35Smrg# with or without modifications, as long as this notice is preserved. 1006d769e936Smrg 100722663e35Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 100822663e35Smrg# --------------------------- 100922663e35Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 101022663e35Smrg# This macro is traced by Automake. 101122663e35SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1012d769e936Smrg 101322663e35Smrg# AM_SUBST_NOTMAKE(VARIABLE) 101422663e35Smrg# -------------------------- 101522663e35Smrg# Public sister of _AM_SUBST_NOTMAKE. 101622663e35SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017d769e936Smrg 101822663e35Smrg# Check how to create a tarball. -*- Autoconf -*- 1019d769e936Smrg 102022663e35Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 102122663e35Smrg# 102222663e35Smrg# This file is free software; the Free Software Foundation 102322663e35Smrg# gives unlimited permission to copy and/or distribute it, 102422663e35Smrg# with or without modifications, as long as this notice is preserved. 10251d54945dSmrg 102622663e35Smrg# _AM_PROG_TAR(FORMAT) 102722663e35Smrg# -------------------- 102822663e35Smrg# Check how to create a tarball in format FORMAT. 102922663e35Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 103022663e35Smrg# 103122663e35Smrg# Substitute a variable $(am__tar) that is a command 103222663e35Smrg# writing to stdout a FORMAT-tarball containing the directory 103322663e35Smrg# $tardir. 103422663e35Smrg# tardir=directory && $(am__tar) > result.tar 103522663e35Smrg# 103622663e35Smrg# Substitute a variable $(am__untar) that extract such 103722663e35Smrg# a tarball read from stdin. 103822663e35Smrg# $(am__untar) < result.tar 103922663e35Smrg# 104022663e35SmrgAC_DEFUN([_AM_PROG_TAR], 104122663e35Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 104222663e35Smrg# in the wild :-( We should find a proper way to deprecate it ... 104322663e35SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1044ec713c28Smrg 104522663e35Smrg# We'll loop over all known methods to create a tar archive until one works. 104622663e35Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047d769e936Smrg 104822663e35Smrgm4_if([$1], [v7], 104922663e35Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1050d769e936Smrg 105122663e35Smrg [m4_case([$1], 105222663e35Smrg [ustar], 105322663e35Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 105422663e35Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 105522663e35Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 105622663e35Smrg # and bug#13588). 105722663e35Smrg am_max_uid=2097151 # 2^21 - 1 105822663e35Smrg am_max_gid=$am_max_uid 105922663e35Smrg # The $UID and $GID variables are not portable, so we need to resort 106022663e35Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 106122663e35Smrg # below are definitely unexpected, so allow the users to see them 106222663e35Smrg # (that is, avoid stderr redirection). 106322663e35Smrg am_uid=`id -u || echo unknown` 106422663e35Smrg am_gid=`id -g || echo unknown` 106522663e35Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 106622663e35Smrg if test $am_uid -le $am_max_uid; then 106722663e35Smrg AC_MSG_RESULT([yes]) 106822663e35Smrg else 106922663e35Smrg AC_MSG_RESULT([no]) 107022663e35Smrg _am_tools=none 107122663e35Smrg fi 107222663e35Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 107322663e35Smrg if test $am_gid -le $am_max_gid; then 107422663e35Smrg AC_MSG_RESULT([yes]) 107522663e35Smrg else 107622663e35Smrg AC_MSG_RESULT([no]) 107722663e35Smrg _am_tools=none 107822663e35Smrg fi], 10791d54945dSmrg 108022663e35Smrg [pax], 108122663e35Smrg [], 1082786a6f21Smrg 108322663e35Smrg [m4_fatal([Unknown tar format])]) 10841d54945dSmrg 108522663e35Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10861d54945dSmrg 108722663e35Smrg # Go ahead even if we have the value already cached. We do so because we 108822663e35Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 108922663e35Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10901d54945dSmrg 109122663e35Smrg for _am_tool in $_am_tools; do 109222663e35Smrg case $_am_tool in 109322663e35Smrg gnutar) 109422663e35Smrg for _am_tar in tar gnutar gtar; do 109522663e35Smrg AM_RUN_LOG([$_am_tar --version]) && break 109622663e35Smrg done 109722663e35Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 109822663e35Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 109922663e35Smrg am__untar="$_am_tar -xf -" 110022663e35Smrg ;; 110122663e35Smrg plaintar) 110222663e35Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 110322663e35Smrg # ustar tarball either. 110422663e35Smrg (tar --version) >/dev/null 2>&1 && continue 110522663e35Smrg am__tar='tar chf - "$$tardir"' 110622663e35Smrg am__tar_='tar chf - "$tardir"' 110722663e35Smrg am__untar='tar xf -' 110822663e35Smrg ;; 110922663e35Smrg pax) 111022663e35Smrg am__tar='pax -L -x $1 -w "$$tardir"' 111122663e35Smrg am__tar_='pax -L -x $1 -w "$tardir"' 111222663e35Smrg am__untar='pax -r' 111322663e35Smrg ;; 111422663e35Smrg cpio) 111522663e35Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 111622663e35Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 111722663e35Smrg am__untar='cpio -i -H $1 -d' 111822663e35Smrg ;; 111922663e35Smrg none) 112022663e35Smrg am__tar=false 112122663e35Smrg am__tar_=false 112222663e35Smrg am__untar=false 112322663e35Smrg ;; 112422663e35Smrg esac 11251d54945dSmrg 112622663e35Smrg # If the value was cached, stop now. We just wanted to have am__tar 112722663e35Smrg # and am__untar set. 112822663e35Smrg test -n "${am_cv_prog_tar_$1}" && break 1129786a6f21Smrg 113022663e35Smrg # tar/untar a dummy directory, and stop if the command works. 113122663e35Smrg rm -rf conftest.dir 113222663e35Smrg mkdir conftest.dir 113322663e35Smrg echo GrepMe > conftest.dir/file 113422663e35Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 113522663e35Smrg rm -rf conftest.dir 113622663e35Smrg if test -s conftest.tar; then 113722663e35Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 113822663e35Smrg AM_RUN_LOG([cat conftest.dir/file]) 113922663e35Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 114022663e35Smrg fi 114122663e35Smrg done 114222663e35Smrg rm -rf conftest.dir 1143d769e936Smrg 114422663e35Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 114522663e35Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1146d769e936Smrg 114722663e35SmrgAC_SUBST([am__tar]) 114822663e35SmrgAC_SUBST([am__untar]) 114922663e35Smrg]) # _AM_PROG_TAR 11501d54945dSmrg 115122663e35Smrgdnl Copyright 2005 Red Hat, Inc 115222663e35Smrgdnl 115322663e35Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 115422663e35Smrgdnl documentation for any purpose is hereby granted without fee, provided that 115522663e35Smrgdnl the above copyright notice appear in all copies and that both that 115622663e35Smrgdnl copyright notice and this permission notice appear in supporting 115722663e35Smrgdnl documentation. 115822663e35Smrgdnl 115922663e35Smrgdnl The above copyright notice and this permission notice shall be included 116022663e35Smrgdnl in all copies or substantial portions of the Software. 116122663e35Smrgdnl 116222663e35Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 116322663e35Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 116422663e35Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 116522663e35Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 116622663e35Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 116722663e35Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 116822663e35Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 116922663e35Smrgdnl 117022663e35Smrgdnl Except as contained in this notice, the name of the copyright holders shall 117122663e35Smrgdnl not be used in advertising or otherwise to promote the sale, use or 117222663e35Smrgdnl other dealings in this Software without prior written authorization 117322663e35Smrgdnl from the copyright holders. 117422663e35Smrgdnl 1175d769e936Smrg 117622663e35Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 117722663e35Smrg# -------------------------- 117822663e35Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 117922663e35Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 1180d769e936Smrg 118122663e35SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 118222663e35Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 118322663e35Smrg SAVE_CFLAGS="$CFLAGS" 118422663e35Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 118522663e35Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 118622663e35Smrg#include "xorg-server.h" 118722663e35Smrg#if !defined $1 118822663e35Smrg#error $1 not defined 118922663e35Smrg#endif 119022663e35Smrg ]])], 119122663e35Smrg [_EXT_CHECK=yes], 119222663e35Smrg [_EXT_CHECK=no]) 119322663e35Smrg CFLAGS="$SAVE_CFLAGS" 119422663e35Smrg AC_MSG_CHECKING([if $1 is defined]) 119522663e35Smrg AC_MSG_RESULT([$_EXT_CHECK]) 119622663e35Smrg if test "$_EXT_CHECK" != no; then 119722663e35Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 119822663e35Smrg fi 119922663e35Smrg]) 1200d769e936Smrg 120122663e35Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 120222663e35Smrgdnl serial 11 (pkg-config-0.29) 120322663e35Smrgdnl 120422663e35Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 120522663e35Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 120622663e35Smrgdnl 120722663e35Smrgdnl This program is free software; you can redistribute it and/or modify 120822663e35Smrgdnl it under the terms of the GNU General Public License as published by 120922663e35Smrgdnl the Free Software Foundation; either version 2 of the License, or 121022663e35Smrgdnl (at your option) any later version. 121122663e35Smrgdnl 121222663e35Smrgdnl This program is distributed in the hope that it will be useful, but 121322663e35Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 121422663e35Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 121522663e35Smrgdnl General Public License for more details. 121622663e35Smrgdnl 121722663e35Smrgdnl You should have received a copy of the GNU General Public License 121822663e35Smrgdnl along with this program; if not, write to the Free Software 121922663e35Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 122022663e35Smrgdnl 02111-1307, USA. 122122663e35Smrgdnl 122222663e35Smrgdnl As a special exception to the GNU General Public License, if you 122322663e35Smrgdnl distribute this file as part of a program that contains a 122422663e35Smrgdnl configuration script generated by Autoconf, you may include it under 122522663e35Smrgdnl the same distribution terms that you use for the rest of that 122622663e35Smrgdnl program. 1227d769e936Smrg 122822663e35Smrgdnl PKG_PREREQ(MIN-VERSION) 122922663e35Smrgdnl ----------------------- 123022663e35Smrgdnl Since: 0.29 123122663e35Smrgdnl 123222663e35Smrgdnl Verify that the version of the pkg-config macros are at least 123322663e35Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 123422663e35Smrgdnl installed version of pkg-config, this checks the developer's version 123522663e35Smrgdnl of pkg.m4 when generating configure. 123622663e35Smrgdnl 123722663e35Smrgdnl To ensure that this macro is defined, also add: 123822663e35Smrgdnl m4_ifndef([PKG_PREREQ], 123922663e35Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 124022663e35Smrgdnl 124122663e35Smrgdnl See the "Since" comment for each macro you use to see what version 124222663e35Smrgdnl of the macros you require. 124322663e35Smrgm4_defun([PKG_PREREQ], 124422663e35Smrg[m4_define([PKG_MACROS_VERSION], [0.29]) 124522663e35Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 124622663e35Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 124722663e35Smrg])dnl PKG_PREREQ 1248d769e936Smrg 124922663e35Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 125022663e35Smrgdnl ---------------------------------- 125122663e35Smrgdnl Since: 0.16 125222663e35Smrgdnl 125322663e35Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 125422663e35Smrgdnl first found in the path. Checks that the version of pkg-config found 125522663e35Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 125622663e35Smrgdnl used since that's the first version where most current features of 125722663e35Smrgdnl pkg-config existed. 125822663e35SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 125922663e35Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 126022663e35Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 126122663e35Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 126222663e35SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 126322663e35SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 126422663e35SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 12651d54945dSmrg 126622663e35Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 126722663e35Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 126822663e35Smrgfi 126922663e35Smrgif test -n "$PKG_CONFIG"; then 127022663e35Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 127122663e35Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 127222663e35Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 127322663e35Smrg AC_MSG_RESULT([yes]) 127422663e35Smrg else 127522663e35Smrg AC_MSG_RESULT([no]) 127622663e35Smrg PKG_CONFIG="" 127722663e35Smrg fi 127822663e35Smrgfi[]dnl 127922663e35Smrg])dnl PKG_PROG_PKG_CONFIG 12801d54945dSmrg 128122663e35Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 128222663e35Smrgdnl ------------------------------------------------------------------- 128322663e35Smrgdnl Since: 0.18 128422663e35Smrgdnl 128522663e35Smrgdnl Check to see whether a particular set of modules exists. Similar to 128622663e35Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 128722663e35Smrgdnl 128822663e35Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 128922663e35Smrgdnl only at the first occurence in configure.ac, so if the first place 129022663e35Smrgdnl it's called might be skipped (such as if it is within an "if", you 129122663e35Smrgdnl have to call PKG_CHECK_EXISTS manually 129222663e35SmrgAC_DEFUN([PKG_CHECK_EXISTS], 129322663e35Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 129422663e35Smrgif test -n "$PKG_CONFIG" && \ 129522663e35Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 129622663e35Smrg m4_default([$2], [:]) 129722663e35Smrgm4_ifvaln([$3], [else 129822663e35Smrg $3])dnl 129922663e35Smrgfi]) 13007322289dSmrg 130122663e35Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 130222663e35Smrgdnl --------------------------------------------- 130322663e35Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 130422663e35Smrgdnl pkg_failed based on the result. 130522663e35Smrgm4_define([_PKG_CONFIG], 130622663e35Smrg[if test -n "$$1"; then 130722663e35Smrg pkg_cv_[]$1="$$1" 130822663e35Smrg elif test -n "$PKG_CONFIG"; then 130922663e35Smrg PKG_CHECK_EXISTS([$3], 131022663e35Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 131122663e35Smrg test "x$?" != "x0" && pkg_failed=yes ], 131222663e35Smrg [pkg_failed=yes]) 131322663e35Smrg else 131422663e35Smrg pkg_failed=untried 131522663e35Smrgfi[]dnl 131622663e35Smrg])dnl _PKG_CONFIG 13177322289dSmrg 131822663e35Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 131922663e35Smrgdnl --------------------------- 132022663e35Smrgdnl Internal check to see if pkg-config supports short errors. 132122663e35SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 132222663e35Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 132322663e35Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 132422663e35Smrg _pkg_short_errors_supported=yes 132522663e35Smrgelse 132622663e35Smrg _pkg_short_errors_supported=no 132722663e35Smrgfi[]dnl 132822663e35Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 13291d54945dSmrg 13307322289dSmrg 133122663e35Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 133222663e35Smrgdnl [ACTION-IF-NOT-FOUND]) 133322663e35Smrgdnl -------------------------------------------------------------- 133422663e35Smrgdnl Since: 0.4.0 133522663e35Smrgdnl 133622663e35Smrgdnl Note that if there is a possibility the first call to 133722663e35Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 133822663e35Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 133922663e35SmrgAC_DEFUN([PKG_CHECK_MODULES], 134022663e35Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 134122663e35SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 134222663e35SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 13431d54945dSmrg 134422663e35Smrgpkg_failed=no 134522663e35SmrgAC_MSG_CHECKING([for $1]) 13467322289dSmrg 134722663e35Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 134822663e35Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 13497322289dSmrg 135022663e35Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 135122663e35Smrgand $1[]_LIBS to avoid the need to call pkg-config. 135222663e35SmrgSee the pkg-config man page for more details.]) 13537322289dSmrg 135422663e35Smrgif test $pkg_failed = yes; then 135522663e35Smrg AC_MSG_RESULT([no]) 135622663e35Smrg _PKG_SHORT_ERRORS_SUPPORTED 135722663e35Smrg if test $_pkg_short_errors_supported = yes; then 135822663e35Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 135922663e35Smrg else 136022663e35Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 136122663e35Smrg fi 136222663e35Smrg # Put the nasty error message in config.log where it belongs 136322663e35Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 13647322289dSmrg 136522663e35Smrg m4_default([$4], [AC_MSG_ERROR( 136622663e35Smrg[Package requirements ($2) were not met: 13677322289dSmrg 136822663e35Smrg$$1_PKG_ERRORS 13691d54945dSmrg 137022663e35SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 137122663e35Smrginstalled software in a non-standard prefix. 13721d54945dSmrg 137322663e35Smrg_PKG_TEXT])[]dnl 137422663e35Smrg ]) 137522663e35Smrgelif test $pkg_failed = untried; then 137622663e35Smrg AC_MSG_RESULT([no]) 137722663e35Smrg m4_default([$4], [AC_MSG_FAILURE( 137822663e35Smrg[The pkg-config script could not be found or is too old. Make sure it 137922663e35Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 138022663e35Smrgpath to pkg-config. 13811d54945dSmrg 138222663e35Smrg_PKG_TEXT 1383d769e936Smrg 138422663e35SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 138522663e35Smrg ]) 138622663e35Smrgelse 138722663e35Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 138822663e35Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 138922663e35Smrg AC_MSG_RESULT([yes]) 139022663e35Smrg $3 139122663e35Smrgfi[]dnl 139222663e35Smrg])dnl PKG_CHECK_MODULES 1393d769e936Smrg 13941d54945dSmrg 139522663e35Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 139622663e35Smrgdnl [ACTION-IF-NOT-FOUND]) 139722663e35Smrgdnl --------------------------------------------------------------------- 139822663e35Smrgdnl Since: 0.29 139922663e35Smrgdnl 140022663e35Smrgdnl Checks for existence of MODULES and gathers its build flags with 140122663e35Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 140222663e35Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 140322663e35Smrgdnl 140422663e35Smrgdnl Note that if there is a possibility the first call to 140522663e35Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 140622663e35Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 140722663e35Smrgdnl configure.ac. 140822663e35SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 140922663e35Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 141022663e35Smrg_save_PKG_CONFIG=$PKG_CONFIG 141122663e35SmrgPKG_CONFIG="$PKG_CONFIG --static" 141222663e35SmrgPKG_CHECK_MODULES($@) 141322663e35SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 141422663e35Smrg])dnl PKG_CHECK_MODULES_STATIC 1415d769e936Smrg 1416d769e936Smrg 141722663e35Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 141822663e35Smrgdnl ------------------------- 141922663e35Smrgdnl Since: 0.27 142022663e35Smrgdnl 142122663e35Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 142222663e35Smrgdnl should install pkg-config .pc files. By default the directory is 142322663e35Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 142422663e35Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 142522663e35Smrgdnl parameter. 142622663e35SmrgAC_DEFUN([PKG_INSTALLDIR], 142722663e35Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 142822663e35Smrgm4_pushdef([pkg_description], 142922663e35Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 143022663e35SmrgAC_ARG_WITH([pkgconfigdir], 143122663e35Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 143222663e35Smrg [with_pkgconfigdir=]pkg_default) 143322663e35SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 143422663e35Smrgm4_popdef([pkg_default]) 143522663e35Smrgm4_popdef([pkg_description]) 143622663e35Smrg])dnl PKG_INSTALLDIR 1437d769e936Smrg 14381d54945dSmrg 143922663e35Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 144022663e35Smrgdnl -------------------------------- 144122663e35Smrgdnl Since: 0.27 144222663e35Smrgdnl 144322663e35Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 144422663e35Smrgdnl module should install arch-independent pkg-config .pc files. By 144522663e35Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 144622663e35Smrgdnl changed by passing DIRECTORY. The user can override through the 144722663e35Smrgdnl --with-noarch-pkgconfigdir parameter. 144822663e35SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 144922663e35Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 145022663e35Smrgm4_pushdef([pkg_description], 145122663e35Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 145222663e35SmrgAC_ARG_WITH([noarch-pkgconfigdir], 145322663e35Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 145422663e35Smrg [with_noarch_pkgconfigdir=]pkg_default) 145522663e35SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 145622663e35Smrgm4_popdef([pkg_default]) 145722663e35Smrgm4_popdef([pkg_description]) 145822663e35Smrg])dnl PKG_NOARCH_INSTALLDIR 14591d54945dSmrg 1460d769e936Smrg 146122663e35Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 146222663e35Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 146322663e35Smrgdnl ------------------------------------------- 146422663e35Smrgdnl Since: 0.28 146522663e35Smrgdnl 146622663e35Smrgdnl Retrieves the value of the pkg-config variable for the given module. 146722663e35SmrgAC_DEFUN([PKG_CHECK_VAR], 146822663e35Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 146922663e35SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1470d769e936Smrg 147122663e35Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 147222663e35SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 14731d54945dSmrg 147422663e35SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 147522663e35Smrg])dnl PKG_CHECK_VAR 14761d54945dSmrg 147722663e35Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 147822663e35Smrgdnl 147922663e35Smrgdnl Copyright (c) 2005, 2023, Oracle and/or its affiliates. 148022663e35Smrgdnl 148122663e35Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 148222663e35Smrgdnl copy of this software and associated documentation files (the "Software"), 148322663e35Smrgdnl to deal in the Software without restriction, including without limitation 148422663e35Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 148522663e35Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 148622663e35Smrgdnl Software is furnished to do so, subject to the following conditions: 148722663e35Smrgdnl 148822663e35Smrgdnl The above copyright notice and this permission notice (including the next 148922663e35Smrgdnl paragraph) shall be included in all copies or substantial portions of the 149022663e35Smrgdnl Software. 149122663e35Smrgdnl 149222663e35Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 149322663e35Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 149422663e35Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 149522663e35Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 149622663e35Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 149722663e35Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 149822663e35Smrgdnl DEALINGS IN THE SOFTWARE. 149922663e35Smrg 150022663e35Smrg# XORG_MACROS_VERSION(required-version) 150122663e35Smrg# ------------------------------------- 150222663e35Smrg# Minimum version: 1.1.0 150322663e35Smrg# 150422663e35Smrg# If you're using a macro added in Version 1.1 or newer, include this in 150522663e35Smrg# your configure.ac with the minimum required version, such as: 150622663e35Smrg# XORG_MACROS_VERSION(1.1) 150722663e35Smrg# 150822663e35Smrg# To ensure that this macro is defined, also add: 150922663e35Smrg# m4_ifndef([XORG_MACROS_VERSION], 151022663e35Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 151122663e35Smrg# 151222663e35Smrg# 151322663e35Smrg# See the "minimum version" comment for each macro you use to see what 151422663e35Smrg# version you require. 151522663e35Smrgm4_defun([XORG_MACROS_VERSION],[ 151622663e35Smrgm4_define([vers_have], [1.20.0]) 151722663e35Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 151822663e35Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 151922663e35Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 152022663e35Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 152122663e35Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 152222663e35Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 152322663e35Smrgm4_undefine([vers_have]) 152422663e35Smrgm4_undefine([maj_have]) 152522663e35Smrgm4_undefine([maj_needed]) 152622663e35Smrg]) # XORG_MACROS_VERSION 152722663e35Smrg 152822663e35Smrg# XORG_PROG_RAWCPP() 152922663e35Smrg# ------------------ 153022663e35Smrg# Minimum version: 1.0.0 153122663e35Smrg# 153222663e35Smrg# Find cpp program and necessary flags for use in pre-processing text files 153322663e35Smrg# such as man pages and config files 153422663e35SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 153522663e35SmrgAC_REQUIRE([AC_PROG_CPP]) 153622663e35SmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 153722663e35Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 153822663e35Smrg 153922663e35Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 154022663e35Smrg# which is not the best choice for supporting other OS'es, but covers most 154122663e35Smrg# of the ones we need for now. 154222663e35SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 154322663e35SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 154422663e35Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 154522663e35Smrg AC_MSG_RESULT([no]) 154622663e35Smrgelse 154722663e35Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 154822663e35Smrg RAWCPPFLAGS=-undef 154922663e35Smrg AC_MSG_RESULT([yes]) 155022663e35Smrg # under Cygwin unix is still defined even with -undef 155122663e35Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 155222663e35Smrg RAWCPPFLAGS="-undef -ansi" 155322663e35Smrg AC_MSG_RESULT([yes, with -ansi]) 155422663e35Smrg else 155522663e35Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 155622663e35Smrg fi 1557d769e936Smrgfi 155822663e35Smrgrm -f conftest.$ac_ext 15591d54945dSmrg 156022663e35SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 156122663e35SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 156222663e35Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 156322663e35Smrg AC_MSG_RESULT([no]) 156422663e35Smrgelse 156522663e35Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 156622663e35Smrg TRADITIONALCPPFLAGS="-traditional" 156722663e35Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 156822663e35Smrg AC_MSG_RESULT([yes]) 156922663e35Smrg else 157022663e35Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 157122663e35Smrg fi 157222663e35Smrgfi 157322663e35Smrgrm -f conftest.$ac_ext 157422663e35SmrgAC_SUBST(RAWCPPFLAGS) 157522663e35SmrgAC_SUBST(TRADITIONALCPPFLAGS) 157622663e35Smrg]) # XORG_PROG_RAWCPP 15771d54945dSmrg 157822663e35Smrg# XORG_MANPAGE_SECTIONS() 1579d769e936Smrg# ----------------------- 158022663e35Smrg# Minimum version: 1.0.0 158122663e35Smrg# 158222663e35Smrg# Determine which sections man pages go in for the different man page types 158322663e35Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 158422663e35Smrg# Not sure if there's any better way than just hardcoding by OS name. 158522663e35Smrg# Override default settings by setting environment variables 158622663e35Smrg# Added MAN_SUBSTS in version 1.8 158722663e35Smrg# Added AC_PROG_SED in version 1.8 1588d769e936Smrg 158922663e35SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 159022663e35SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 159122663e35SmrgAC_REQUIRE([AC_PROG_SED]) 1592d769e936Smrg 159322663e35Smrgcase $host_os in 159422663e35Smrg solaris*) 159522663e35Smrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 159622663e35Smrg # check for a man page file found in later versions that use 159722663e35Smrg # traditional section numbers instead 159822663e35Smrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 159922663e35Smrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 160022663e35Smrg ;; 160122663e35Smrg *) SYSV_MAN_SECTIONS=false ;; 160222663e35Smrgesac 1603d769e936Smrg 160422663e35Smrgif test x$APP_MAN_SUFFIX = x ; then 160522663e35Smrg APP_MAN_SUFFIX=1 160622663e35Smrgfi 160722663e35Smrgif test x$APP_MAN_DIR = x ; then 160822663e35Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 160922663e35Smrgfi 1610d769e936Smrg 161122663e35Smrgif test x$LIB_MAN_SUFFIX = x ; then 161222663e35Smrg LIB_MAN_SUFFIX=3 161322663e35Smrgfi 161422663e35Smrgif test x$LIB_MAN_DIR = x ; then 161522663e35Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 161622663e35Smrgfi 1617d769e936Smrg 161822663e35Smrgif test x$FILE_MAN_SUFFIX = x ; then 161922663e35Smrg case $SYSV_MAN_SECTIONS in 162022663e35Smrg true) FILE_MAN_SUFFIX=4 ;; 162122663e35Smrg *) FILE_MAN_SUFFIX=5 ;; 162222663e35Smrg esac 162322663e35Smrgfi 162422663e35Smrgif test x$FILE_MAN_DIR = x ; then 162522663e35Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 162622663e35Smrgfi 1627d769e936Smrg 162822663e35Smrgif test x$MISC_MAN_SUFFIX = x ; then 162922663e35Smrg case $SYSV_MAN_SECTIONS in 163022663e35Smrg true) MISC_MAN_SUFFIX=5 ;; 163122663e35Smrg *) MISC_MAN_SUFFIX=7 ;; 163222663e35Smrg esac 163322663e35Smrgfi 163422663e35Smrgif test x$MISC_MAN_DIR = x ; then 163522663e35Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 163622663e35Smrgfi 1637d769e936Smrg 163822663e35Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 163922663e35Smrg case $SYSV_MAN_SECTIONS in 164022663e35Smrg true) DRIVER_MAN_SUFFIX=7 ;; 164122663e35Smrg *) DRIVER_MAN_SUFFIX=4 ;; 164222663e35Smrg esac 164322663e35Smrgfi 164422663e35Smrgif test x$DRIVER_MAN_DIR = x ; then 164522663e35Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 164622663e35Smrgfi 16471d54945dSmrg 164822663e35Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 164922663e35Smrg case $SYSV_MAN_SECTIONS in 165022663e35Smrg true) ADMIN_MAN_SUFFIX=1m ;; 165122663e35Smrg *) ADMIN_MAN_SUFFIX=8 ;; 165222663e35Smrg esac 165322663e35Smrgfi 165422663e35Smrgif test x$ADMIN_MAN_DIR = x ; then 165522663e35Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 165622663e35Smrgfi 16571d54945dSmrg 16581d54945dSmrg 165922663e35SmrgAC_SUBST([APP_MAN_SUFFIX]) 166022663e35SmrgAC_SUBST([LIB_MAN_SUFFIX]) 166122663e35SmrgAC_SUBST([FILE_MAN_SUFFIX]) 166222663e35SmrgAC_SUBST([MISC_MAN_SUFFIX]) 166322663e35SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 166422663e35SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 166522663e35SmrgAC_SUBST([APP_MAN_DIR]) 166622663e35SmrgAC_SUBST([LIB_MAN_DIR]) 166722663e35SmrgAC_SUBST([FILE_MAN_DIR]) 166822663e35SmrgAC_SUBST([MISC_MAN_DIR]) 166922663e35SmrgAC_SUBST([DRIVER_MAN_DIR]) 167022663e35SmrgAC_SUBST([ADMIN_MAN_DIR]) 1671ec713c28Smrg 167222663e35SmrgXORG_MAN_PAGE="X Version 11" 167322663e35SmrgAC_SUBST([XORG_MAN_PAGE]) 167422663e35SmrgMAN_SUBSTS="\ 167522663e35Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 167622663e35Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 167722663e35Smrg -e 's|__xservername__|Xorg|g' \ 167822663e35Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 167922663e35Smrg -e 's|__projectroot__|\$(prefix)|g' \ 168022663e35Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 168122663e35Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 168222663e35Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 168322663e35Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 168422663e35Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 168522663e35Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 168622663e35Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 168722663e35SmrgAC_SUBST([MAN_SUBSTS]) 16881d54945dSmrg 168922663e35Smrg]) # XORG_MANPAGE_SECTIONS 16901d54945dSmrg 169122663e35Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1692d769e936Smrg# ------------------------ 169322663e35Smrg# Minimum version: 1.7.0 169422663e35Smrg# 169522663e35Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 169622663e35Smrg# provided by xorg-sgml-doctools, if installed. 169722663e35SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 169822663e35SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 169922663e35SmrgXORG_SGML_PATH= 170022663e35SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 170122663e35Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 170222663e35Smrg [m4_ifval([$1],[:], 170322663e35Smrg [if test x"$cross_compiling" != x"yes" ; then 170422663e35Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 170522663e35Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 170622663e35Smrg fi]) 170722663e35Smrg ]) 17081d54945dSmrg 170922663e35Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 171022663e35Smrg# the path and the name of the doc stylesheet 171122663e35Smrgif test "x$XORG_SGML_PATH" != "x" ; then 171222663e35Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 171322663e35Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 171422663e35Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 171522663e35Smrgelse 171622663e35Smrg AC_MSG_RESULT([no]) 171722663e35Smrgfi 17181d54945dSmrg 171922663e35SmrgAC_SUBST(XORG_SGML_PATH) 172022663e35SmrgAC_SUBST(STYLESHEET_SRCDIR) 172122663e35SmrgAC_SUBST(XSL_STYLESHEET) 172222663e35SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 172322663e35Smrg]) # XORG_CHECK_SGML_DOCTOOLS 17241d54945dSmrg 172522663e35Smrg# XORG_CHECK_LINUXDOC 172622663e35Smrg# ------------------- 172722663e35Smrg# Minimum version: 1.0.0 172822663e35Smrg# 172922663e35Smrg# Defines the variable MAKE_TEXT if the necessary tools and 173022663e35Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 173122663e35Smrg# Whether or not the necessary tools and files are found can be checked 173222663e35Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 173322663e35SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 173422663e35SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 173522663e35SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 17361d54945dSmrg 173722663e35SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 17381d54945dSmrg 173922663e35SmrgAC_MSG_CHECKING([whether to build documentation]) 17401d54945dSmrg 174122663e35Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 174222663e35Smrg BUILDDOC=yes 174322663e35Smrgelse 174422663e35Smrg BUILDDOC=no 174522663e35Smrgfi 17461d54945dSmrg 174722663e35SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1748d769e936Smrg 174922663e35SmrgAC_MSG_RESULT([$BUILDDOC]) 17501d54945dSmrg 175122663e35SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 175222663e35Smrg 175322663e35Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 175422663e35Smrg BUILDPDFDOC=yes 1755d769e936Smrgelse 175622663e35Smrg BUILDPDFDOC=no 1757d769e936Smrgfi 17581d54945dSmrg 175922663e35SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17601d54945dSmrg 176122663e35SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 176222663e35Smrg 176322663e35SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 176422663e35SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 176522663e35SmrgMAKE_PDF="$PS2PDF" 176622663e35SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 17671d54945dSmrg 176822663e35SmrgAC_SUBST(MAKE_TEXT) 176922663e35SmrgAC_SUBST(MAKE_PS) 177022663e35SmrgAC_SUBST(MAKE_PDF) 177122663e35SmrgAC_SUBST(MAKE_HTML) 177222663e35Smrg]) # XORG_CHECK_LINUXDOC 1773d769e936Smrg 177422663e35Smrg# XORG_CHECK_DOCBOOK 177522663e35Smrg# ------------------- 177622663e35Smrg# Minimum version: 1.0.0 177722663e35Smrg# 177822663e35Smrg# Checks for the ability to build output formats from SGML DocBook source. 177922663e35Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 178022663e35Smrg# indicates whether the necessary tools and files are found and, if set, 178122663e35Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 178222663e35SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 178322663e35SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1784d769e936Smrg 178522663e35SmrgBUILDTXTDOC=no 178622663e35SmrgBUILDPDFDOC=no 178722663e35SmrgBUILDPSDOC=no 178822663e35SmrgBUILDHTMLDOC=no 1789d769e936Smrg 179022663e35SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 179122663e35SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 179222663e35SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 179322663e35SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 179422663e35Smrg 179522663e35SmrgAC_MSG_CHECKING([whether to build text documentation]) 179622663e35Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 179722663e35Smrg test x$BUILD_TXTDOC != xno; then 179822663e35Smrg BUILDTXTDOC=yes 1799d769e936Smrgfi 180022663e35SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 180122663e35SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1802d769e936Smrg 180322663e35SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 180422663e35Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 180522663e35Smrg test x$BUILD_PDFDOC != xno; then 180622663e35Smrg BUILDPDFDOC=yes 180722663e35Smrgfi 180822663e35SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 180922663e35SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1810d769e936Smrg 181122663e35SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 181222663e35Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 181322663e35Smrg test x$BUILD_PSDOC != xno; then 181422663e35Smrg BUILDPSDOC=yes 181522663e35Smrgfi 181622663e35SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 181722663e35SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1818d769e936Smrg 181922663e35SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 182022663e35Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 182122663e35Smrg test x$BUILD_HTMLDOC != xno; then 182222663e35Smrg BUILDHTMLDOC=yes 182322663e35Smrgfi 182422663e35SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 182522663e35SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1826d769e936Smrg 182722663e35SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 182822663e35SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 182922663e35SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 183022663e35SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1831d769e936Smrg 183222663e35SmrgAC_SUBST(MAKE_TEXT) 183322663e35SmrgAC_SUBST(MAKE_PS) 183422663e35SmrgAC_SUBST(MAKE_PDF) 183522663e35SmrgAC_SUBST(MAKE_HTML) 183622663e35Smrg]) # XORG_CHECK_DOCBOOK 1837d769e936Smrg 183822663e35Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1839d769e936Smrg# ---------------- 184022663e35Smrg# Minimum version: 1.5.0 184122663e35Smrg# Minimum version for optional DEFAULT argument: 1.11.0 184222663e35Smrg# 184322663e35Smrg# Documentation tools are not always available on all platforms and sometimes 184422663e35Smrg# not at the appropriate level. This macro enables a module to test for the 184522663e35Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 184622663e35Smrg# the --with-xmlto option, it allows maximum flexibility in making decisions 184722663e35Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 184822663e35Smrg# --with-xmlto assumes 'auto'. 184922663e35Smrg# 185022663e35Smrg# Interface to module: 185122663e35Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 185222663e35Smrg# XMLTO: returns the path of the xmlto program found 185322663e35Smrg# returns the path set by the user in the environment 185422663e35Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 185522663e35Smrg# 'no' user instructs the module not to use xmlto 185622663e35Smrg# 185722663e35Smrg# Added in version 1.10.0 185822663e35Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 185922663e35Smrg# xmlto for text output requires either lynx, links, or w3m browsers 186022663e35Smrg# 186122663e35Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 186222663e35Smrg# 186322663e35SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 186422663e35SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 186522663e35Smrgm4_define([_defopt], m4_default([$2], [auto])) 186622663e35SmrgAC_ARG_WITH(xmlto, 186722663e35Smrg AS_HELP_STRING([--with-xmlto], 186822663e35Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 186922663e35Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 187022663e35Smrgm4_undefine([_defopt]) 1871d769e936Smrg 187222663e35Smrgif test "x$use_xmlto" = x"auto"; then 187322663e35Smrg AC_PATH_PROG([XMLTO], [xmlto]) 187422663e35Smrg if test "x$XMLTO" = "x"; then 187522663e35Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 187622663e35Smrg have_xmlto=no 187722663e35Smrg else 187822663e35Smrg have_xmlto=yes 187922663e35Smrg fi 188022663e35Smrgelif test "x$use_xmlto" = x"yes" ; then 188122663e35Smrg AC_PATH_PROG([XMLTO], [xmlto]) 188222663e35Smrg if test "x$XMLTO" = "x"; then 188322663e35Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 188422663e35Smrg fi 188522663e35Smrg have_xmlto=yes 188622663e35Smrgelif test "x$use_xmlto" = x"no" ; then 188722663e35Smrg if test "x$XMLTO" != "x"; then 188822663e35Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 188922663e35Smrg fi 189022663e35Smrg have_xmlto=no 189122663e35Smrgelse 189222663e35Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 189322663e35Smrgfi 1894d769e936Smrg 189522663e35Smrg# Test for a minimum version of xmlto, if provided. 189622663e35Smrgm4_ifval([$1], 189722663e35Smrg[if test "$have_xmlto" = yes; then 189822663e35Smrg # scrape the xmlto version 189922663e35Smrg AC_MSG_CHECKING([the xmlto version]) 190022663e35Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 190122663e35Smrg AC_MSG_RESULT([$xmlto_version]) 190222663e35Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 190322663e35Smrg [if test "x$use_xmlto" = xauto; then 190422663e35Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 190522663e35Smrg have_xmlto=no 190622663e35Smrg else 190722663e35Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 190822663e35Smrg fi]) 190922663e35Smrgfi]) 1910d769e936Smrg 191122663e35Smrg# Test for the ability of xmlto to generate a text target 191222663e35Smrg# 191322663e35Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 191422663e35Smrg# following test for empty XML docbook files. 191522663e35Smrg# For compatibility reasons use the following empty XML docbook file and if 191622663e35Smrg# it fails try it again with a non-empty XML file. 191722663e35Smrghave_xmlto_text=no 191822663e35Smrgcat > conftest.xml << "EOF" 191922663e35SmrgEOF 192022663e35SmrgAS_IF([test "$have_xmlto" = yes], 192122663e35Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 192222663e35Smrg [have_xmlto_text=yes], 192322663e35Smrg [# Try it again with a non-empty XML file. 192422663e35Smrg cat > conftest.xml << "EOF" 192522663e35Smrg<x></x> 192622663e35SmrgEOF 192722663e35Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 192822663e35Smrg [have_xmlto_text=yes], 192922663e35Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 193022663e35Smrgrm -f conftest.xml 193122663e35SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 193222663e35SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 193322663e35Smrg]) # XORG_WITH_XMLTO 19341d54945dSmrg 193522663e35Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 193622663e35Smrg# -------------------------------------------- 193722663e35Smrg# Minimum version: 1.12.0 193822663e35Smrg# Minimum version for optional DEFAULT argument: 1.12.0 193922663e35Smrg# 194022663e35Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 194122663e35Smrg# XML-based language used for the transformation of XML documents. 194222663e35Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 194322663e35Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 194422663e35Smrg# The XSLT processor is often used as a standalone tool for transformations. 194522663e35Smrg# It should not be assumed that this tool is used only to work with documnetation. 194622663e35Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 194722663e35Smrg# 194822663e35Smrg# Interface to module: 194922663e35Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 195022663e35Smrg# XSLTPROC: returns the path of the xsltproc program found 195122663e35Smrg# returns the path set by the user in the environment 195222663e35Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 195322663e35Smrg# 'no' user instructs the module not to use xsltproc 195422663e35Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 195522663e35Smrg# 195622663e35Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 195722663e35Smrg# 195822663e35SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 195922663e35SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 196022663e35Smrg# Preserves the interface, should it be implemented later 196122663e35Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 196222663e35Smrgm4_define([_defopt], m4_default([$2], [auto])) 196322663e35SmrgAC_ARG_WITH(xsltproc, 196422663e35Smrg AS_HELP_STRING([--with-xsltproc], 196522663e35Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 196622663e35Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 196722663e35Smrgm4_undefine([_defopt]) 19687322289dSmrg 196922663e35Smrgif test "x$use_xsltproc" = x"auto"; then 197022663e35Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 197122663e35Smrg if test "x$XSLTPROC" = "x"; then 197222663e35Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 197322663e35Smrg have_xsltproc=no 197422663e35Smrg else 197522663e35Smrg have_xsltproc=yes 197622663e35Smrg fi 197722663e35Smrgelif test "x$use_xsltproc" = x"yes" ; then 197822663e35Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 197922663e35Smrg if test "x$XSLTPROC" = "x"; then 198022663e35Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 198122663e35Smrg fi 198222663e35Smrg have_xsltproc=yes 198322663e35Smrgelif test "x$use_xsltproc" = x"no" ; then 198422663e35Smrg if test "x$XSLTPROC" != "x"; then 198522663e35Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 198622663e35Smrg fi 198722663e35Smrg have_xsltproc=no 1988d769e936Smrgelse 198922663e35Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 19901d54945dSmrgfi 1991d769e936Smrg 199222663e35SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 199322663e35Smrg]) # XORG_WITH_XSLTPROC 19941d54945dSmrg 199522663e35Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 199622663e35Smrg# ---------------------------------------- 199722663e35Smrg# Minimum version: 1.15.0 199822663e35Smrg# 199922663e35Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 200022663e35Smrg# scanning arbitrary text files, extracting information from those text files, 200122663e35Smrg# and printing reports based on that information. 200222663e35Smrg# 200322663e35Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 200422663e35Smrg# 200522663e35Smrg# Interface to module: 200622663e35Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 200722663e35Smrg# PERL: returns the path of the perl program found 200822663e35Smrg# returns the path set by the user in the environment 200922663e35Smrg# --with-perl: 'yes' user instructs the module to use perl 201022663e35Smrg# 'no' user instructs the module not to use perl 201122663e35Smrg# have_perl: returns yes if perl found in PATH or no 201222663e35Smrg# 201322663e35Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 201422663e35Smrg# 201522663e35SmrgAC_DEFUN([XORG_WITH_PERL],[ 201622663e35SmrgAC_ARG_VAR([PERL], [Path to perl command]) 201722663e35Smrg# Preserves the interface, should it be implemented later 201822663e35Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 201922663e35Smrgm4_define([_defopt], m4_default([$2], [auto])) 202022663e35SmrgAC_ARG_WITH(perl, 202122663e35Smrg AS_HELP_STRING([--with-perl], 202222663e35Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 202322663e35Smrg [use_perl=$withval], [use_perl=]_defopt) 202422663e35Smrgm4_undefine([_defopt]) 2025786a6f21Smrg 202622663e35Smrgif test "x$use_perl" = x"auto"; then 202722663e35Smrg AC_PATH_PROG([PERL], [perl]) 202822663e35Smrg if test "x$PERL" = "x"; then 202922663e35Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 203022663e35Smrg have_perl=no 203122663e35Smrg else 203222663e35Smrg have_perl=yes 20331d54945dSmrg fi 203422663e35Smrgelif test "x$use_perl" = x"yes" ; then 203522663e35Smrg AC_PATH_PROG([PERL], [perl]) 203622663e35Smrg if test "x$PERL" = "x"; then 203722663e35Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 203822663e35Smrg fi 203922663e35Smrg have_perl=yes 204022663e35Smrgelif test "x$use_perl" = x"no" ; then 204122663e35Smrg if test "x$PERL" != "x"; then 204222663e35Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 204322663e35Smrg fi 204422663e35Smrg have_perl=no 20451d54945dSmrgelse 204622663e35Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 20471d54945dSmrgfi 20481d54945dSmrg 204922663e35SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 205022663e35Smrg]) # XORG_WITH_PERL 20511d54945dSmrg 205222663e35Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 205322663e35Smrg# ---------------- 205422663e35Smrg# Minimum version: 1.5.0 205522663e35Smrg# Minimum version for optional DEFAULT argument: 1.11.0 205622663e35Smrg# 205722663e35Smrg# Documentation tools are not always available on all platforms and sometimes 205822663e35Smrg# not at the appropriate level. This macro enables a module to test for the 205922663e35Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 206022663e35Smrg# the --with-asciidoc option, it allows maximum flexibility in making decisions 206122663e35Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 206222663e35Smrg# --with-asciidoc assumes 'auto'. 206322663e35Smrg# 206422663e35Smrg# Interface to module: 206522663e35Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 206622663e35Smrg# ASCIIDOC: returns the path of the asciidoc program found 206722663e35Smrg# returns the path set by the user in the environment 206822663e35Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 206922663e35Smrg# 'no' user instructs the module not to use asciidoc 207022663e35Smrg# 207122663e35Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 207222663e35Smrg# 207322663e35SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 207422663e35SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 207522663e35Smrgm4_define([_defopt], m4_default([$2], [auto])) 207622663e35SmrgAC_ARG_WITH(asciidoc, 207722663e35Smrg AS_HELP_STRING([--with-asciidoc], 207822663e35Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 207922663e35Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 208022663e35Smrgm4_undefine([_defopt]) 2081d769e936Smrg 208222663e35Smrgif test "x$use_asciidoc" = x"auto"; then 208322663e35Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 208422663e35Smrg if test "x$ASCIIDOC" = "x"; then 208522663e35Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 208622663e35Smrg have_asciidoc=no 208722663e35Smrg else 208822663e35Smrg have_asciidoc=yes 2089d769e936Smrg fi 209022663e35Smrgelif test "x$use_asciidoc" = x"yes" ; then 209122663e35Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 209222663e35Smrg if test "x$ASCIIDOC" = "x"; then 209322663e35Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 209422663e35Smrg fi 209522663e35Smrg have_asciidoc=yes 209622663e35Smrgelif test "x$use_asciidoc" = x"no" ; then 209722663e35Smrg if test "x$ASCIIDOC" != "x"; then 209822663e35Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 209922663e35Smrg fi 210022663e35Smrg have_asciidoc=no 2101d769e936Smrgelse 210222663e35Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2103d769e936Smrgfi 210422663e35Smrgm4_ifval([$1], 210522663e35Smrg[if test "$have_asciidoc" = yes; then 210622663e35Smrg # scrape the asciidoc version 210722663e35Smrg AC_MSG_CHECKING([the asciidoc version]) 210822663e35Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 210922663e35Smrg AC_MSG_RESULT([$asciidoc_version]) 211022663e35Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 211122663e35Smrg [if test "x$use_asciidoc" = xauto; then 211222663e35Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 211322663e35Smrg have_asciidoc=no 211422663e35Smrg else 211522663e35Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 211622663e35Smrg fi]) 211722663e35Smrgfi]) 211822663e35SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 211922663e35Smrg]) # XORG_WITH_ASCIIDOC 2120d769e936Smrg 212122663e35Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 212222663e35Smrg# ------------------------------------------- 212322663e35Smrg# Minimum version: 1.5.0 212422663e35Smrg# Minimum version for optional DEFAULT argument: 1.11.0 212522663e35Smrg# Minimum version for optional DOT checking: 1.18.0 212622663e35Smrg# 212722663e35Smrg# Documentation tools are not always available on all platforms and sometimes 212822663e35Smrg# not at the appropriate level. This macro enables a module to test for the 212922663e35Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 213022663e35Smrg# the --with-doxygen option, it allows maximum flexibility in making decisions 213122663e35Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 213222663e35Smrg# --with-doxygen assumes 'auto'. 213322663e35Smrg# 213422663e35Smrg# Interface to module: 213522663e35Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 213622663e35Smrg# DOXYGEN: returns the path of the doxygen program found 213722663e35Smrg# returns the path set by the user in the environment 213822663e35Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 213922663e35Smrg# 'no' user instructs the module not to use doxygen 214022663e35Smrg# 214122663e35Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 214222663e35Smrg# 214322663e35SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 214422663e35SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 214522663e35SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 214622663e35Smrgm4_define([_defopt], m4_default([$2], [auto])) 214722663e35SmrgAC_ARG_WITH(doxygen, 214822663e35Smrg AS_HELP_STRING([--with-doxygen], 214922663e35Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 215022663e35Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 215122663e35Smrgm4_undefine([_defopt]) 2152d769e936Smrg 215322663e35Smrgif test "x$use_doxygen" = x"auto"; then 215422663e35Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 215522663e35Smrg if test "x$DOXYGEN" = "x"; then 215622663e35Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 215722663e35Smrg have_doxygen=no 215822663e35Smrg else 215922663e35Smrg have_doxygen=yes 216022663e35Smrg fi 216122663e35Smrgelif test "x$use_doxygen" = x"yes" ; then 216222663e35Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 216322663e35Smrg if test "x$DOXYGEN" = "x"; then 216422663e35Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 216522663e35Smrg fi 216622663e35Smrg have_doxygen=yes 216722663e35Smrgelif test "x$use_doxygen" = x"no" ; then 216822663e35Smrg if test "x$DOXYGEN" != "x"; then 216922663e35Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 217022663e35Smrg fi 217122663e35Smrg have_doxygen=no 217222663e35Smrgelse 217322663e35Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 217422663e35Smrgfi 217522663e35Smrgm4_ifval([$1], 217622663e35Smrg[if test "$have_doxygen" = yes; then 217722663e35Smrg # scrape the doxygen version 217822663e35Smrg AC_MSG_CHECKING([the doxygen version]) 217922663e35Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 218022663e35Smrg AC_MSG_RESULT([$doxygen_version]) 218122663e35Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 218222663e35Smrg [if test "x$use_doxygen" = xauto; then 218322663e35Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 218422663e35Smrg have_doxygen=no 218522663e35Smrg else 218622663e35Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 218722663e35Smrg fi]) 218822663e35Smrgfi]) 2189d769e936Smrg 219022663e35Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 219122663e35Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 219222663e35Smrgdnl HAVE_DOT = @HAVE_DOT@ 219322663e35SmrgHAVE_DOT=no 219422663e35Smrgif test "x$have_doxygen" = "xyes"; then 219522663e35Smrg AC_PATH_PROG([DOT], [dot]) 219622663e35Smrg if test "x$DOT" != "x"; then 219722663e35Smrg HAVE_DOT=yes 2198d769e936Smrg fi 219922663e35Smrgfi 2200d769e936Smrg 220122663e35SmrgAC_SUBST([HAVE_DOT]) 220222663e35SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 220322663e35SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 220422663e35Smrg]) # XORG_WITH_DOXYGEN 2205d769e936Smrg 220622663e35Smrg# XORG_WITH_GROFF([DEFAULT]) 220722663e35Smrg# ---------------- 220822663e35Smrg# Minimum version: 1.6.0 220922663e35Smrg# Minimum version for optional DEFAULT argument: 1.11.0 221022663e35Smrg# 221122663e35Smrg# Documentation tools are not always available on all platforms and sometimes 221222663e35Smrg# not at the appropriate level. This macro enables a module to test for the 221322663e35Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 221422663e35Smrg# the --with-groff option, it allows maximum flexibility in making decisions 221522663e35Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 221622663e35Smrg# --with-groff assumes 'auto'. 221722663e35Smrg# 221822663e35Smrg# Interface to module: 221922663e35Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 222022663e35Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 222122663e35Smrg# HAVE_GROFF_MS: the -ms macros package 222222663e35Smrg# GROFF: returns the path of the groff program found 222322663e35Smrg# returns the path set by the user in the environment 222422663e35Smrg# --with-groff: 'yes' user instructs the module to use groff 222522663e35Smrg# 'no' user instructs the module not to use groff 222622663e35Smrg# 222722663e35Smrg# Added in version 1.9.0: 222822663e35Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 222922663e35Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 223022663e35Smrg# psselect from the psutils package. 223122663e35Smrg# the ghostcript package. Refer to the grohtml man pages 223222663e35Smrg# 223322663e35Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 223422663e35Smrg# 223522663e35Smrg# OS and distros often splits groff in a basic and full package, the former 223622663e35Smrg# having the groff program and the later having devices, fonts and macros 223722663e35Smrg# Checking for the groff executable is not enough. 223822663e35Smrg# 223922663e35Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 224022663e35Smrg# unset HAVE_GROFF or GROFF env variables. 224122663e35Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 224222663e35Smrg# 224322663e35SmrgAC_DEFUN([XORG_WITH_GROFF],[ 224422663e35SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 224522663e35Smrgm4_define([_defopt], m4_default([$1], [auto])) 224622663e35SmrgAC_ARG_WITH(groff, 224722663e35Smrg AS_HELP_STRING([--with-groff], 224822663e35Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 224922663e35Smrg [use_groff=$withval], [use_groff=]_defopt) 225022663e35Smrgm4_undefine([_defopt]) 225122663e35Smrg 225222663e35Smrgif test "x$use_groff" = x"auto"; then 225322663e35Smrg AC_PATH_PROG([GROFF], [groff]) 225422663e35Smrg if test "x$GROFF" = "x"; then 225522663e35Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 225622663e35Smrg have_groff=no 225722663e35Smrg else 225822663e35Smrg have_groff=yes 225922663e35Smrg fi 226022663e35Smrgelif test "x$use_groff" = x"yes" ; then 226122663e35Smrg AC_PATH_PROG([GROFF], [groff]) 226222663e35Smrg if test "x$GROFF" = "x"; then 226322663e35Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 226422663e35Smrg fi 226522663e35Smrg have_groff=yes 226622663e35Smrgelif test "x$use_groff" = x"no" ; then 226722663e35Smrg if test "x$GROFF" != "x"; then 226822663e35Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 226922663e35Smrg fi 227022663e35Smrg have_groff=no 227122663e35Smrgelse 227222663e35Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 227322663e35Smrgfi 227422663e35Smrg 227522663e35Smrg# We have groff, test for the presence of the macro packages 227622663e35Smrgif test "x$have_groff" = x"yes"; then 227722663e35Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 227822663e35Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 227922663e35Smrg groff_ms_works=yes 2280d769e936Smrg else 228122663e35Smrg groff_ms_works=no 2282d769e936Smrg fi 228322663e35Smrg AC_MSG_RESULT([$groff_ms_works]) 228422663e35Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 228522663e35Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 228622663e35Smrg groff_mm_works=yes 2287d769e936Smrg else 228822663e35Smrg groff_mm_works=no 2289d769e936Smrg fi 229022663e35Smrg AC_MSG_RESULT([$groff_mm_works]) 2291d769e936Smrgfi 2292d769e936Smrg 229322663e35Smrg# We have groff, test for HTML dependencies, one command per package 229422663e35Smrgif test "x$have_groff" = x"yes"; then 229522663e35Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 229622663e35Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 229722663e35Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 229822663e35Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 229922663e35Smrg have_groff_html=yes 230022663e35Smrg else 230122663e35Smrg have_groff_html=no 230222663e35Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 230322663e35Smrg fi 230422663e35Smrgfi 2305d769e936Smrg 230622663e35Smrg# Set Automake conditionals for Makefiles 230722663e35SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 230822663e35SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 230922663e35SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 231022663e35SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 231122663e35Smrg]) # XORG_WITH_GROFF 2312d769e936Smrg 231322663e35Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 231422663e35Smrg# --------------------------------------- 231522663e35Smrg# Minimum version: 1.6.0 231622663e35Smrg# Minimum version for optional DEFAULT argument: 1.11.0 231722663e35Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 231822663e35Smrg# 231922663e35Smrg# Documentation tools are not always available on all platforms and sometimes 232022663e35Smrg# not at the appropriate level. This macro enables a module to test for the 232122663e35Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 232222663e35Smrg# the --with-fop option, it allows maximum flexibility in making decisions 232322663e35Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 232422663e35Smrg# --with-fop assumes 'auto'. 232522663e35Smrg# 232622663e35Smrg# Interface to module: 232722663e35Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 232822663e35Smrg# FOP: returns the path of the fop program found 232922663e35Smrg# returns the path set by the user in the environment 233022663e35Smrg# --with-fop: 'yes' user instructs the module to use fop 233122663e35Smrg# 'no' user instructs the module not to use fop 233222663e35Smrg# 233322663e35Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 233422663e35Smrg# 233522663e35SmrgAC_DEFUN([XORG_WITH_FOP],[ 233622663e35SmrgAC_ARG_VAR([FOP], [Path to fop command]) 233722663e35Smrgm4_define([_defopt], m4_default([$2], [auto])) 233822663e35SmrgAC_ARG_WITH(fop, 233922663e35Smrg AS_HELP_STRING([--with-fop], 234022663e35Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 234122663e35Smrg [use_fop=$withval], [use_fop=]_defopt) 234222663e35Smrgm4_undefine([_defopt]) 2343d769e936Smrg 234422663e35Smrgif test "x$use_fop" = x"auto"; then 234522663e35Smrg AC_PATH_PROG([FOP], [fop]) 234622663e35Smrg if test "x$FOP" = "x"; then 234722663e35Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 234822663e35Smrg have_fop=no 234922663e35Smrg else 235022663e35Smrg have_fop=yes 235122663e35Smrg fi 235222663e35Smrgelif test "x$use_fop" = x"yes" ; then 235322663e35Smrg AC_PATH_PROG([FOP], [fop]) 235422663e35Smrg if test "x$FOP" = "x"; then 235522663e35Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 235622663e35Smrg fi 235722663e35Smrg have_fop=yes 235822663e35Smrgelif test "x$use_fop" = x"no" ; then 235922663e35Smrg if test "x$FOP" != "x"; then 236022663e35Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 236122663e35Smrg fi 236222663e35Smrg have_fop=no 2363d769e936Smrgelse 236422663e35Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 236522663e35Smrgfi 2366d769e936Smrg 236722663e35Smrg# Test for a minimum version of fop, if provided. 236822663e35Smrgm4_ifval([$1], 236922663e35Smrg[if test "$have_fop" = yes; then 237022663e35Smrg # scrape the fop version 237122663e35Smrg AC_MSG_CHECKING([for fop minimum version]) 237222663e35Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 237322663e35Smrg AC_MSG_RESULT([$fop_version]) 237422663e35Smrg AS_VERSION_COMPARE([$fop_version], [$1], 237522663e35Smrg [if test "x$use_fop" = xauto; then 237622663e35Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 237722663e35Smrg have_fop=no 237822663e35Smrg else 237922663e35Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 238022663e35Smrg fi]) 238122663e35Smrgfi]) 238222663e35SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 238322663e35Smrg]) # XORG_WITH_FOP 2384d769e936Smrg 238522663e35Smrg# XORG_WITH_M4([MIN-VERSION]) 238622663e35Smrg# --------------------------- 238722663e35Smrg# Minimum version: 1.19.0 238822663e35Smrg# 238922663e35Smrg# This macro attempts to locate an m4 macro processor which supports 239022663e35Smrg# -I option and is only useful for modules relying on M4 in order to 239122663e35Smrg# expand macros in source code files. 239222663e35Smrg# 239322663e35Smrg# Interface to module: 239422663e35Smrg# M4: returns the path of the m4 program found 239522663e35Smrg# returns the path set by the user in the environment 239622663e35Smrg# 239722663e35SmrgAC_DEFUN([XORG_WITH_M4], [ 239822663e35SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 239922663e35Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 240022663e35Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 240122663e35Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 240222663e35Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 240322663e35Smrg [$PATH:/usr/gnu/bin])]) 2404d769e936Smrg 240522663e35SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 240622663e35Smrg]) # XORG_WITH_M4 2407d769e936Smrg 240822663e35Smrg# XORG_WITH_PS2PDF([DEFAULT]) 240922663e35Smrg# ---------------- 241022663e35Smrg# Minimum version: 1.6.0 241122663e35Smrg# Minimum version for optional DEFAULT argument: 1.11.0 241222663e35Smrg# 241322663e35Smrg# Documentation tools are not always available on all platforms and sometimes 241422663e35Smrg# not at the appropriate level. This macro enables a module to test for the 241522663e35Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 241622663e35Smrg# the --with-ps2pdf option, it allows maximum flexibility in making decisions 241722663e35Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 241822663e35Smrg# --with-ps2pdf assumes 'auto'. 241922663e35Smrg# 242022663e35Smrg# Interface to module: 242122663e35Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 242222663e35Smrg# PS2PDF: returns the path of the ps2pdf program found 242322663e35Smrg# returns the path set by the user in the environment 242422663e35Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 242522663e35Smrg# 'no' user instructs the module not to use ps2pdf 242622663e35Smrg# 242722663e35Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 242822663e35Smrg# 242922663e35SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 243022663e35SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 243122663e35Smrgm4_define([_defopt], m4_default([$1], [auto])) 243222663e35SmrgAC_ARG_WITH(ps2pdf, 243322663e35Smrg AS_HELP_STRING([--with-ps2pdf], 243422663e35Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 243522663e35Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 243622663e35Smrgm4_undefine([_defopt]) 2437d769e936Smrg 243822663e35Smrgif test "x$use_ps2pdf" = x"auto"; then 243922663e35Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 244022663e35Smrg if test "x$PS2PDF" = "x"; then 244122663e35Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 244222663e35Smrg have_ps2pdf=no 244322663e35Smrg else 244422663e35Smrg have_ps2pdf=yes 244522663e35Smrg fi 244622663e35Smrgelif test "x$use_ps2pdf" = x"yes" ; then 244722663e35Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 244822663e35Smrg if test "x$PS2PDF" = "x"; then 244922663e35Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 245022663e35Smrg fi 245122663e35Smrg have_ps2pdf=yes 245222663e35Smrgelif test "x$use_ps2pdf" = x"no" ; then 245322663e35Smrg if test "x$PS2PDF" != "x"; then 245422663e35Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 245522663e35Smrg fi 245622663e35Smrg have_ps2pdf=no 245722663e35Smrgelse 245822663e35Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2459d769e936Smrgfi 246022663e35SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 246122663e35Smrg]) # XORG_WITH_PS2PDF 2462d769e936Smrg 246322663e35Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 246422663e35Smrg# ---------------- 246522663e35Smrg# Minimum version: 1.6.0 246622663e35Smrg# 246722663e35Smrg# Documentation tools are not always available on all platforms and sometimes 246822663e35Smrg# not at the appropriate level. This macro enables a builder to skip all 246922663e35Smrg# documentation targets except traditional man pages. 247022663e35Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 247122663e35Smrg# maximum flexibility in controlling documentation building. 247222663e35Smrg# Refer to: 247322663e35Smrg# XORG_WITH_XMLTO --with-xmlto 247422663e35Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 247522663e35Smrg# XORG_WITH_DOXYGEN --with-doxygen 247622663e35Smrg# XORG_WITH_FOP --with-fop 247722663e35Smrg# XORG_WITH_GROFF --with-groff 247822663e35Smrg# XORG_WITH_PS2PDF --with-ps2pdf 247922663e35Smrg# 248022663e35Smrg# Interface to module: 248122663e35Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 248222663e35Smrg# --enable-docs: 'yes' user instructs the module to generate docs 248322663e35Smrg# 'no' user instructs the module not to generate docs 248422663e35Smrg# parm1: specify the default value, yes or no. 248522663e35Smrg# 248622663e35SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 248722663e35Smrgm4_define([docs_default], m4_default([$1], [yes])) 248822663e35SmrgAC_ARG_ENABLE(docs, 248922663e35Smrg AS_HELP_STRING([--enable-docs], 249022663e35Smrg [Enable building the documentation (default: ]docs_default[)]), 249122663e35Smrg [build_docs=$enableval], [build_docs=]docs_default) 249222663e35Smrgm4_undefine([docs_default]) 249322663e35SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 249422663e35SmrgAC_MSG_CHECKING([whether to build documentation]) 249522663e35SmrgAC_MSG_RESULT([$build_docs]) 249622663e35Smrg]) # XORG_ENABLE_DOCS 2497d769e936Smrg 249822663e35Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 249922663e35Smrg# ---------------- 250022663e35Smrg# Minimum version: 1.6.0 250122663e35Smrg# 250222663e35Smrg# This macro enables a builder to skip all developer documentation. 250322663e35Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 250422663e35Smrg# maximum flexibility in controlling documentation building. 250522663e35Smrg# Refer to: 250622663e35Smrg# XORG_WITH_XMLTO --with-xmlto 250722663e35Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 250822663e35Smrg# XORG_WITH_DOXYGEN --with-doxygen 250922663e35Smrg# XORG_WITH_FOP --with-fop 251022663e35Smrg# XORG_WITH_GROFF --with-groff 251122663e35Smrg# XORG_WITH_PS2PDF --with-ps2pdf 251222663e35Smrg# 251322663e35Smrg# Interface to module: 251422663e35Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 251522663e35Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 251622663e35Smrg# 'no' user instructs the module not to generate developer docs 251722663e35Smrg# parm1: specify the default value, yes or no. 251822663e35Smrg# 251922663e35SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 252022663e35Smrgm4_define([devel_default], m4_default([$1], [yes])) 252122663e35SmrgAC_ARG_ENABLE(devel-docs, 252222663e35Smrg AS_HELP_STRING([--enable-devel-docs], 252322663e35Smrg [Enable building the developer documentation (default: ]devel_default[)]), 252422663e35Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 252522663e35Smrgm4_undefine([devel_default]) 252622663e35SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 252722663e35SmrgAC_MSG_CHECKING([whether to build developer documentation]) 252822663e35SmrgAC_MSG_RESULT([$build_devel_docs]) 252922663e35Smrg]) # XORG_ENABLE_DEVEL_DOCS 2530d769e936Smrg 253122663e35Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 253222663e35Smrg# ---------------- 253322663e35Smrg# Minimum version: 1.6.0 253422663e35Smrg# 253522663e35Smrg# This macro enables a builder to skip all functional specification targets. 253622663e35Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 253722663e35Smrg# maximum flexibility in controlling documentation building. 253822663e35Smrg# Refer to: 253922663e35Smrg# XORG_WITH_XMLTO --with-xmlto 254022663e35Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 254122663e35Smrg# XORG_WITH_DOXYGEN --with-doxygen 254222663e35Smrg# XORG_WITH_FOP --with-fop 254322663e35Smrg# XORG_WITH_GROFF --with-groff 254422663e35Smrg# XORG_WITH_PS2PDF --with-ps2pdf 254522663e35Smrg# 254622663e35Smrg# Interface to module: 254722663e35Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 254822663e35Smrg# --enable-specs: 'yes' user instructs the module to generate specs 254922663e35Smrg# 'no' user instructs the module not to generate specs 255022663e35Smrg# parm1: specify the default value, yes or no. 255122663e35Smrg# 255222663e35SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 255322663e35Smrgm4_define([spec_default], m4_default([$1], [yes])) 255422663e35SmrgAC_ARG_ENABLE(specs, 255522663e35Smrg AS_HELP_STRING([--enable-specs], 255622663e35Smrg [Enable building the specs (default: ]spec_default[)]), 255722663e35Smrg [build_specs=$enableval], [build_specs=]spec_default) 255822663e35Smrgm4_undefine([spec_default]) 255922663e35SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 256022663e35SmrgAC_MSG_CHECKING([whether to build functional specifications]) 256122663e35SmrgAC_MSG_RESULT([$build_specs]) 256222663e35Smrg]) # XORG_ENABLE_SPECS 2563d769e936Smrg 256422663e35Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 256522663e35Smrg# ---------------------------------------------- 256622663e35Smrg# Minimum version: 1.13.0 256722663e35Smrg# 256822663e35Smrg# This macro enables a builder to enable/disable unit testing 256922663e35Smrg# It makes no assumption about the test cases implementation 257022663e35Smrg# Test cases may or may not use Automake "Support for test suites" 257122663e35Smrg# They may or may not use the software utility library GLib 257222663e35Smrg# 257322663e35Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 257422663e35Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 257522663e35Smrg# The variable enable_unit_tests is used by other macros in this file. 257622663e35Smrg# 257722663e35Smrg# Interface to module: 257822663e35Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 257922663e35Smrg# enable_unit_tests: used in configure.ac for additional configuration 258022663e35Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 258122663e35Smrg# 'no' user instructs the module not to build tests 258222663e35Smrg# parm1: specify the default value, yes or no. 258322663e35Smrg# 258422663e35SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 258522663e35SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 258622663e35SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 258722663e35SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 258822663e35Smrgm4_define([_defopt], m4_default([$1], [auto])) 258922663e35SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 259022663e35Smrg [Enable building unit test cases (default: ]_defopt[)]), 259122663e35Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 259222663e35Smrgm4_undefine([_defopt]) 259322663e35SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 259422663e35SmrgAC_MSG_CHECKING([whether to build unit test cases]) 259522663e35SmrgAC_MSG_RESULT([$enable_unit_tests]) 259622663e35Smrg]) # XORG_ENABLE_UNIT_TESTS 2597d769e936Smrg 259822663e35Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 259922663e35Smrg# ------------------------------------------------------ 260022663e35Smrg# Minimum version: 1.17.0 260122663e35Smrg# 260222663e35Smrg# This macro enables a builder to enable/disable integration testing 260322663e35Smrg# It makes no assumption about the test cases' implementation 260422663e35Smrg# Test cases may or may not use Automake "Support for test suites" 260522663e35Smrg# 260622663e35Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 260722663e35Smrg# usually requires less dependencies and may be built and run under less 260822663e35Smrg# stringent environments than integration tests. 260922663e35Smrg# 261022663e35Smrg# Interface to module: 261122663e35Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 261222663e35Smrg# enable_integration_tests: used in configure.ac for additional configuration 261322663e35Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 261422663e35Smrg# 'no' user instructs the module not to build tests 261522663e35Smrg# parm1: specify the default value, yes or no. 261622663e35Smrg# 261722663e35SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 261822663e35SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 261922663e35Smrgm4_define([_defopt], m4_default([$1], [auto])) 262022663e35SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 262122663e35Smrg [Enable building integration test cases (default: ]_defopt[)]), 262222663e35Smrg [enable_integration_tests=$enableval], 262322663e35Smrg [enable_integration_tests=]_defopt) 262422663e35Smrgm4_undefine([_defopt]) 262522663e35SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 262622663e35Smrg [test "x$enable_integration_tests" != xno]) 262722663e35SmrgAC_MSG_CHECKING([whether to build unit test cases]) 262822663e35SmrgAC_MSG_RESULT([$enable_integration_tests]) 262922663e35Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 26307322289dSmrg 263122663e35Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 263222663e35Smrg# ---------------------------------------- 263322663e35Smrg# Minimum version: 1.13.0 263422663e35Smrg# 263522663e35Smrg# GLib is a library which provides advanced data structures and functions. 263622663e35Smrg# This macro enables a module to test for the presence of Glib. 263722663e35Smrg# 263822663e35Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 263922663e35Smrg# Otherwise the value of $enable_unit_tests is blank. 264022663e35Smrg# 264122663e35Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 264222663e35Smrg# test support usually requires less dependencies and may be built and run under 264322663e35Smrg# less stringent environments than integration tests. 264422663e35Smrg# 264522663e35Smrg# Interface to module: 264622663e35Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 264722663e35Smrg# with_glib: used in configure.ac to know if GLib has been found 264822663e35Smrg# --with-glib: 'yes' user instructs the module to use glib 264922663e35Smrg# 'no' user instructs the module not to use glib 265022663e35Smrg# 265122663e35SmrgAC_DEFUN([XORG_WITH_GLIB],[ 265222663e35SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 265322663e35Smrgm4_define([_defopt], m4_default([$2], [auto])) 265422663e35SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 265522663e35Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 265622663e35Smrg [with_glib=$withval], [with_glib=]_defopt) 265722663e35Smrgm4_undefine([_defopt]) 2658d769e936Smrg 265922663e35Smrghave_glib=no 266022663e35Smrg# Do not probe GLib if user explicitly disabled unit testing 266122663e35Smrgif test "x$enable_unit_tests" != x"no"; then 266222663e35Smrg # Do not probe GLib if user explicitly disabled it 266322663e35Smrg if test "x$with_glib" != x"no"; then 266422663e35Smrg m4_ifval( 266522663e35Smrg [$1], 266622663e35Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 266722663e35Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 266822663e35Smrg ) 2669d769e936Smrg fi 267022663e35Smrgfi 2671d769e936Smrg 267222663e35Smrg# Not having GLib when unit testing has been explicitly requested is an error 267322663e35Smrgif test "x$enable_unit_tests" = x"yes"; then 267422663e35Smrg if test "x$have_glib" = x"no"; then 267522663e35Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 267622663e35Smrg fi 267722663e35Smrgfi 2678d769e936Smrg 267922663e35Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 268022663e35Smrgif test "x$enable_unit_tests" = x"no"; then 268122663e35Smrg if test "x$with_glib" = x"yes"; then 268222663e35Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 268322663e35Smrg fi 268422663e35Smrgfi 2685d769e936Smrg 268622663e35Smrg# Not having GLib when it has been explicitly requested is an error 268722663e35Smrgif test "x$with_glib" = x"yes"; then 268822663e35Smrg if test "x$have_glib" = x"no"; then 268922663e35Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 269022663e35Smrg fi 2691d769e936Smrgfi 2692d769e936Smrg 269322663e35SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 269422663e35Smrg]) # XORG_WITH_GLIB 2695d769e936Smrg 269622663e35Smrg# XORG_LD_WRAP([required|optional]) 269722663e35Smrg# --------------------------------- 269822663e35Smrg# Minimum version: 1.13.0 269922663e35Smrg# 270022663e35Smrg# Check if linker supports -wrap, passed via compiler flags 270122663e35Smrg# 270222663e35Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 270322663e35Smrg# Otherwise the value of $enable_unit_tests is blank. 270422663e35Smrg# 270522663e35Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 270622663e35Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 270722663e35Smrg# available, an argument of "optional" allows use when some unit tests require 270822663e35Smrg# ld -wrap and others do not. 270922663e35Smrg# 271022663e35SmrgAC_DEFUN([XORG_LD_WRAP],[ 271122663e35SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 271222663e35Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 271322663e35Smrg void __wrap_exit(int status) { return; }], 271422663e35Smrg [exit(0);])]) 271522663e35Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 271622663e35Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 271722663e35Smrg if test "x$have_ld_wrap" = x"no"; then 271822663e35Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 271922663e35Smrg fi 272022663e35Smrgfi 272122663e35SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 272222663e35Smrg# 272322663e35Smrg]) # XORG_LD_WRAP 2724d769e936Smrg 272522663e35Smrg# XORG_CHECK_LINKER_FLAGS 272622663e35Smrg# ----------------------- 272722663e35Smrg# SYNOPSIS 272822663e35Smrg# 272922663e35Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 273022663e35Smrg# 273122663e35Smrg# DESCRIPTION 273222663e35Smrg# 273322663e35Smrg# Check whether the given linker FLAGS work with the current language's 273422663e35Smrg# linker, or whether they give an error. 273522663e35Smrg# 273622663e35Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 273722663e35Smrg# success/failure. 273822663e35Smrg# 273922663e35Smrg# PROGRAM-SOURCE is the program source to link with, if needed 274022663e35Smrg# 274122663e35Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 274222663e35Smrg# 274322663e35Smrg# LICENSE 274422663e35Smrg# 274522663e35Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 274622663e35Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 274722663e35Smrg# Copyright (c) 2009 Matteo Frigo 274822663e35Smrg# 274922663e35Smrg# This program is free software: you can redistribute it and/or modify it 275022663e35Smrg# under the terms of the GNU General Public License as published by the 275122663e35Smrg# Free Software Foundation, either version 3 of the License, or (at your 275222663e35Smrg# option) any later version. 275322663e35Smrg# 275422663e35Smrg# This program is distributed in the hope that it will be useful, but 275522663e35Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 275622663e35Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 275722663e35Smrg# Public License for more details. 275822663e35Smrg# 275922663e35Smrg# You should have received a copy of the GNU General Public License along 276022663e35Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 276122663e35Smrg# 276222663e35Smrg# As a special exception, the respective Autoconf Macro's copyright owner 276322663e35Smrg# gives unlimited permission to copy, distribute and modify the configure 276422663e35Smrg# scripts that are the output of Autoconf when processing the Macro. You 276522663e35Smrg# need not follow the terms of the GNU General Public License when using 276622663e35Smrg# or distributing such scripts, even though portions of the text of the 276722663e35Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 276822663e35Smrg# all other use of the material that constitutes the Autoconf Macro. 276922663e35Smrg# 277022663e35Smrg# This special exception to the GPL applies to versions of the Autoconf 277122663e35Smrg# Macro released by the Autoconf Archive. When you make and distribute a 277222663e35Smrg# modified version of the Autoconf Macro, you may extend this special 277322663e35Smrg# exception to the GPL to apply to your modified version as well.# 277422663e35SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 277522663e35Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 277622663e35Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 277722663e35SmrgAS_LITERAL_IF([$1], 277822663e35Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 277922663e35Smrg ax_save_FLAGS=$LDFLAGS 278022663e35Smrg LDFLAGS="$1" 278122663e35Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 278222663e35Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 278322663e35Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 278422663e35Smrg LDFLAGS=$ax_save_FLAGS])], 278522663e35Smrg [ax_save_FLAGS=$LDFLAGS 278622663e35Smrg LDFLAGS="$1" 278722663e35Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 278822663e35Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 278922663e35Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 279022663e35Smrg LDFLAGS=$ax_save_FLAGS]) 279122663e35Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 279222663e35SmrgAC_MSG_RESULT($xorg_check_linker_flags) 279322663e35Smrgif test "x$xorg_check_linker_flags" = xyes; then 279422663e35Smrg m4_default([$2], :) 279522663e35Smrgelse 279622663e35Smrg m4_default([$3], :) 279722663e35Smrgfi 279822663e35Smrg]) # XORG_CHECK_LINKER_FLAGS 2799d769e936Smrg 280022663e35Smrg# XORG_MEMORY_CHECK_FLAGS 280122663e35Smrg# ----------------------- 280222663e35Smrg# Minimum version: 1.16.0 280322663e35Smrg# 280422663e35Smrg# This macro attempts to find appropriate memory checking functionality 280522663e35Smrg# for various platforms which unit testing code may use to catch various 280622663e35Smrg# forms of memory allocation and access errors in testing. 280722663e35Smrg# 280822663e35Smrg# Interface to module: 280922663e35Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 281022663e35Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 281122663e35Smrg# 281222663e35Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 281322663e35Smrg# 281422663e35SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2815d769e936Smrg 281622663e35SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 281722663e35SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 281822663e35Smrg [Environment variables to enable memory checking in tests]) 2819d769e936Smrg 282022663e35Smrg# Check for different types of support on different platforms 282122663e35Smrgcase $host_os in 282222663e35Smrg solaris*) 282322663e35Smrg AC_CHECK_LIB([umem], [umem_alloc], 282422663e35Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 282522663e35Smrg ;; 282622663e35Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 282722663e35Smrg # both directly and inverted, so should not be 0 or 255. 282822663e35Smrg malloc_debug_env='MALLOC_PERTURB_=15' 282922663e35Smrg ;; 283022663e35Smrg darwin*) 283122663e35Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 283222663e35Smrg ;; 283322663e35Smrg *bsd*) 283422663e35Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 283522663e35Smrg ;; 283622663e35Smrgesac 2837d769e936Smrg 283822663e35Smrg# User supplied flags override default flags 283922663e35Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 284022663e35Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2841d769e936Smrgfi 2842d769e936Smrg 284322663e35SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 284422663e35Smrg]) # XORG_WITH_LINT 2845d769e936Smrg 284622663e35Smrg# XORG_CHECK_MALLOC_ZERO 284722663e35Smrg# ---------------------- 284822663e35Smrg# Minimum version: 1.0.0 284922663e35Smrg# 285022663e35Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 285122663e35Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 285222663e35Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 285322663e35SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 285422663e35SmrgAC_ARG_ENABLE(malloc0returnsnull, 285522663e35Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 285622663e35Smrg [malloc(0) returns NULL (default: auto)]), 285722663e35Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 285822663e35Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 285922663e35Smrg 286022663e35SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 286122663e35Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 286222663e35SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 286322663e35Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 286422663e35Smrg#include <stdlib.h> 286522663e35Smrg],[ 286622663e35Smrg char *m0, *r0, *c0, *p; 286722663e35Smrg m0 = malloc(0); 286822663e35Smrg p = malloc(10); 286922663e35Smrg r0 = realloc(p,0); 287022663e35Smrg c0 = calloc(0,10); 287122663e35Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 287222663e35Smrg])], 287322663e35Smrg [xorg_cv_malloc0_returns_null=yes], 287422663e35Smrg [xorg_cv_malloc0_returns_null=no])]) 287522663e35SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2876d769e936Smrgfi 287722663e35SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 28781d54945dSmrg 287922663e35Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 288022663e35Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 288122663e35Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 288222663e35Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 288322663e35Smrgelse 288422663e35Smrg MALLOC_ZERO_CFLAGS="" 288522663e35Smrg XMALLOC_ZERO_CFLAGS="" 288622663e35Smrg XTMALLOC_ZERO_CFLAGS="" 288722663e35Smrgfi 28881d54945dSmrg 288922663e35SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 289022663e35SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 289122663e35SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 289222663e35Smrg]) # XORG_CHECK_MALLOC_ZERO 28931d54945dSmrg 289422663e35Smrg# XORG_WITH_LINT() 289522663e35Smrg# ---------------- 289622663e35Smrg# Minimum version: 1.1.0 289722663e35Smrg# 289822663e35Smrg# This macro enables the use of a tool that flags some suspicious and 289922663e35Smrg# non-portable constructs (likely to be bugs) in C language source code. 290022663e35Smrg# It will attempt to locate the tool and use appropriate options. 290122663e35Smrg# There are various lint type tools on different platforms. 290222663e35Smrg# 290322663e35Smrg# Interface to module: 290422663e35Smrg# LINT: returns the path to the tool found on the platform 290522663e35Smrg# or the value set to LINT on the configure cmd line 290622663e35Smrg# also an Automake conditional 290722663e35Smrg# LINT_FLAGS: an Automake variable with appropriate flags 290822663e35Smrg# 290922663e35Smrg# --with-lint: 'yes' user instructs the module to use lint 291022663e35Smrg# 'no' user instructs the module not to use lint (default) 291122663e35Smrg# 291222663e35Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 291322663e35Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 291422663e35Smrg# 291522663e35SmrgAC_DEFUN([XORG_WITH_LINT],[ 291622663e35Smrg 291722663e35SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 291822663e35SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 291922663e35SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 292022663e35Smrg [Use a lint-style source code checker (default: disabled)])], 292122663e35Smrg [use_lint=$withval], [use_lint=no]) 292222663e35Smrg 292322663e35Smrg# Obtain platform specific info like program name and options 292422663e35Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 292522663e35Smrgcase $host_os in 292622663e35Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 292722663e35Smrg lint_name=splint 292822663e35Smrg lint_options="-badflag" 292922663e35Smrg ;; 293022663e35Smrg *freebsd* | *netbsd*) 293122663e35Smrg lint_name=lint 293222663e35Smrg lint_options="-u -b" 293322663e35Smrg ;; 293422663e35Smrg *solaris*) 293522663e35Smrg lint_name=lint 293622663e35Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 293722663e35Smrg ;; 293822663e35Smrgesac 293922663e35Smrg 294022663e35Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 294122663e35Smrgif test "x$use_lint" = x"yes" ; then 294222663e35Smrg AC_PATH_PROG([LINT], [$lint_name]) 294322663e35Smrg if test "x$LINT" = "x"; then 294422663e35Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 294522663e35Smrg fi 294622663e35Smrgelif test "x$use_lint" = x"no" ; then 294722663e35Smrg if test "x$LINT" != "x"; then 294822663e35Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 294922663e35Smrg fi 29501d54945dSmrgelse 295122663e35Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 29521d54945dSmrgfi 29531d54945dSmrg 295422663e35Smrg# User supplied flags override default flags 295522663e35Smrgif test "x$LINT_FLAGS" != "x"; then 295622663e35Smrg lint_options=$LINT_FLAGS 29571d54945dSmrgfi 29581d54945dSmrg 295922663e35SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 296022663e35SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 29611d54945dSmrg 296222663e35Smrg]) # XORG_WITH_LINT 296322663e35Smrg 296422663e35Smrg# XORG_LINT_LIBRARY(LIBNAME) 296522663e35Smrg# -------------------------- 296622663e35Smrg# Minimum version: 1.1.0 296722663e35Smrg# 296822663e35Smrg# Sets up flags for building lint libraries for checking programs that call 296922663e35Smrg# functions in the library. 297022663e35Smrg# 297122663e35Smrg# Interface to module: 297222663e35Smrg# LINTLIB - Automake variable with the name of lint library file to make 297322663e35Smrg# MAKE_LINT_LIB - Automake conditional 297422663e35Smrg# 297522663e35Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 297622663e35Smrg# - 'no' user instructs the module not to create a lint library (default) 297722663e35Smrg 297822663e35SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 297922663e35SmrgAC_REQUIRE([XORG_WITH_LINT]) 298022663e35SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 298122663e35Smrg [Create lint library (default: disabled)])], 298222663e35Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 298322663e35Smrg 298422663e35Smrgif test "x$make_lint_lib" = x"yes" ; then 298522663e35Smrg LINTLIB=llib-l$1.ln 298622663e35Smrg if test "x$LINT" = "x"; then 298722663e35Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 298822663e35Smrg fi 298922663e35Smrgelif test "x$make_lint_lib" != x"no" ; then 299022663e35Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2991d769e936Smrgfi 2992d769e936Smrg 299322663e35SmrgAC_SUBST(LINTLIB) 299422663e35SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2995d769e936Smrg 299622663e35Smrg]) # XORG_LINT_LIBRARY 29977322289dSmrg 299822663e35Smrg# XORG_COMPILER_BRAND 299922663e35Smrg# ------------------- 300022663e35Smrg# Minimum version: 1.14.0 300122663e35Smrg# 300222663e35Smrg# Checks for various brands of compilers and sets flags as appropriate: 300322663e35Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 300422663e35Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 300522663e35Smrg# clang compiler - sets CLANGCC to "yes" 300622663e35Smrg# Intel compiler - sets INTELCC to "yes" 300722663e35Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 300822663e35Smrg# 300922663e35SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 301022663e35SmrgAC_LANG_CASE( 301122663e35Smrg [C], [ 301222663e35Smrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 301322663e35Smrg dnl and complains that AC_PROG_CC_C99 is obsolete 301422663e35Smrg m4_version_prereq([2.70], 301522663e35Smrg [AC_REQUIRE([AC_PROG_CC])], 301622663e35Smrg [AC_REQUIRE([AC_PROG_CC_C99])]) 301722663e35Smrg ], 301822663e35Smrg [C++], [ 301922663e35Smrg AC_REQUIRE([AC_PROG_CXX]) 302022663e35Smrg ] 302122663e35Smrg) 302222663e35SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 302322663e35SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 302422663e35SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 302522663e35Smrg]) # XORG_COMPILER_BRAND 30267322289dSmrg 302722663e35Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 302822663e35Smrg# --------------- 302922663e35Smrg# Minimum version: 1.16.0 303022663e35Smrg# 303122663e35Smrg# Test if the compiler works when passed the given flag as a command line argument. 303222663e35Smrg# If it succeeds, the flag is appended to the given variable. If not, it tries the 303322663e35Smrg# next flag in the list until there are no more options. 303422663e35Smrg# 303522663e35Smrg# Note that this does not guarantee that the compiler supports the flag as some 303622663e35Smrg# compilers will simply ignore arguments that they do not understand, but we do 303722663e35Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 303822663e35Smrg# -Werror=unused-command-line-argument 303922663e35Smrg# 304022663e35SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 304122663e35Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 304222663e35Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 30431d54945dSmrg 304422663e35SmrgAC_LANG_COMPILER_REQUIRE 30451d54945dSmrg 304622663e35SmrgAC_LANG_CASE( 304722663e35Smrg [C], [ 304822663e35Smrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 304922663e35Smrg dnl and complains that AC_PROG_CC_C99 is obsolete 305022663e35Smrg m4_version_prereq([2.70], 305122663e35Smrg [AC_REQUIRE([AC_PROG_CC])], 305222663e35Smrg [AC_REQUIRE([AC_PROG_CC_C99])]) 305322663e35Smrg define([PREFIX], [C]) 305422663e35Smrg define([CACHE_PREFIX], [cc]) 305522663e35Smrg define([COMPILER], [$CC]) 305622663e35Smrg ], 305722663e35Smrg [C++], [ 305822663e35Smrg define([PREFIX], [CXX]) 305922663e35Smrg define([CACHE_PREFIX], [cxx]) 306022663e35Smrg define([COMPILER], [$CXX]) 306122663e35Smrg ] 306222663e35Smrg) 30637322289dSmrg 306422663e35Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 30651d54945dSmrg 306622663e35Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 306722663e35Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 306822663e35Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 306922663e35Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 307022663e35Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 307122663e35Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 307222663e35Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 307322663e35Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 307422663e35Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 307522663e35Smrgfi 30761d54945dSmrg 307722663e35Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 307822663e35Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 307922663e35Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 308022663e35Smrg fi 308122663e35Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 308222663e35Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 308322663e35Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 308422663e35Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 308522663e35Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 308622663e35Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 308722663e35Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 308822663e35Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 308922663e35Smrgfi 30907322289dSmrg 309122663e35Smrgfound="no" 309222663e35Smrgm4_foreach([flag], m4_cdr($@), [ 309322663e35Smrg if test $found = "no" ; then 309422663e35Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 309522663e35Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 309622663e35Smrg fi 30971d54945dSmrg 309822663e35Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 309922663e35Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 310022663e35Smrg fi 31011d54945dSmrg 310222663e35Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 31031d54945dSmrg 310422663e35Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 310522663e35Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 310622663e35Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 310722663e35Smrg AC_CACHE_VAL($cacheid, 310822663e35Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 310922663e35Smrg [eval $cacheid=yes], 311022663e35Smrg [eval $cacheid=no])]) 31111d54945dSmrg 311222663e35Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 31131d54945dSmrg 311422663e35Smrg eval supported=\$$cacheid 311522663e35Smrg AC_MSG_RESULT([$supported]) 311622663e35Smrg if test "$supported" = "yes" ; then 311722663e35Smrg $1="$$1 ]flag[" 311822663e35Smrg found="yes" 311922663e35Smrg fi 312022663e35Smrg fi 312122663e35Smrg]) 312222663e35Smrg]) # XORG_TESTSET_CFLAG 3123d769e936Smrg 312422663e35Smrg# XORG_COMPILER_FLAGS 312522663e35Smrg# --------------- 312622663e35Smrg# Minimum version: 1.16.0 312722663e35Smrg# 312822663e35Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 312922663e35Smrg# arguments supported by the selected compiler which do NOT alter the generated 313022663e35Smrg# code. These arguments will cause the compiler to print various warnings 313122663e35Smrg# during compilation AND turn a conservative set of warnings into errors. 313222663e35Smrg# 313322663e35Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 313422663e35Smrg# future versions of util-macros as options are added to new compilers. 313522663e35Smrg# 313622663e35SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 313722663e35SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3138d769e936Smrg 313922663e35SmrgAC_ARG_ENABLE(selective-werror, 314022663e35Smrg AS_HELP_STRING([--disable-selective-werror], 314122663e35Smrg [Turn off selective compiler errors. (default: enabled)]), 314222663e35Smrg [SELECTIVE_WERROR=$enableval], 314322663e35Smrg [SELECTIVE_WERROR=yes]) 3144d769e936Smrg 314522663e35SmrgAC_LANG_CASE( 314622663e35Smrg [C], [ 314722663e35Smrg define([PREFIX], [C]) 314822663e35Smrg ], 314922663e35Smrg [C++], [ 315022663e35Smrg define([PREFIX], [CXX]) 315122663e35Smrg ] 315222663e35Smrg) 315322663e35Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 315422663e35Smrgif test "x$SUNCC" = "xyes"; then 315522663e35Smrg [BASE_]PREFIX[FLAGS]="-v" 315622663e35Smrgelse 315722663e35Smrg [BASE_]PREFIX[FLAGS]="" 315822663e35Smrgfi 31591d54945dSmrg 316022663e35Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 316122663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 316222663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 316322663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 316422663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 31651d54945dSmrg 316622663e35SmrgAC_LANG_CASE( 316722663e35Smrg [C], [ 316822663e35Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 316922663e35Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 317022663e35Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 317122663e35Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 317222663e35Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 317322663e35Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 317422663e35Smrg ] 317522663e35Smrg) 31761d54945dSmrg 317722663e35Smrg# This chunk adds additional warnings that could catch undesired effects. 317822663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 317922663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 318022663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 318122663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 318222663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 318322663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 318422663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 31851d54945dSmrg 318622663e35Smrg# These are currently disabled because they are noisy. They will be enabled 318722663e35Smrg# in the future once the codebase is sufficiently modernized to silence 318822663e35Smrg# them. For now, I don't want them to drown out the other warnings. 318922663e35Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 319022663e35Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 319122663e35Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 31921d54945dSmrg 319322663e35Smrg# Turn some warnings into errors, so we don't accidentally get successful builds 319422663e35Smrg# when there are problems that should be fixed. 31951d54945dSmrg 319622663e35Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 319722663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 319822663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 319922663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 320022663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 320122663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 320222663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 320322663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 320422663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 320522663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 320622663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 320722663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 320822663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 320922663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 321022663e35Smrgelse 321122663e35SmrgAC_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]) 321222663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 321322663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 321422663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 321522663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 321622663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 321722663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 321822663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 321922663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 322022663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 322122663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 322222663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 322322663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 322422663e35SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 322522663e35Smrgfi 32261d54945dSmrg 322722663e35SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 322822663e35Smrg]) # XORG_COMPILER_FLAGS 32291d54945dSmrg 323022663e35Smrg# XORG_CWARNFLAGS 323122663e35Smrg# --------------- 323222663e35Smrg# Minimum version: 1.2.0 323322663e35Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 323422663e35Smrg# 323522663e35Smrg# Defines CWARNFLAGS to enable C compiler warnings. 323622663e35Smrg# 323722663e35Smrg# This function is deprecated because it defines -fno-strict-aliasing 323822663e35Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 323922663e35Smrg# is needed, then it should be added explicitly in the module when 324022663e35Smrg# it is updated to use BASE_CFLAGS. 324122663e35Smrg# 324222663e35SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 324322663e35SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 324422663e35SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 324522663e35SmrgAC_LANG_CASE( 324622663e35Smrg [C], [ 324722663e35Smrg CWARNFLAGS="$BASE_CFLAGS" 324822663e35Smrg if test "x$GCC" = xyes ; then 324922663e35Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 325022663e35Smrg fi 325122663e35Smrg AC_SUBST(CWARNFLAGS) 325222663e35Smrg ] 325322663e35Smrg) 325422663e35Smrg]) # XORG_CWARNFLAGS 32551d54945dSmrg 325622663e35Smrg# XORG_STRICT_OPTION 325722663e35Smrg# ----------------------- 325822663e35Smrg# Minimum version: 1.3.0 325922663e35Smrg# 326022663e35Smrg# Add configure option to enable strict compilation flags, such as treating 326122663e35Smrg# warnings as fatal errors. 326222663e35Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 326322663e35Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 326422663e35Smrg# 326522663e35Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 326622663e35Smrg# when strict compilation is unconditionally desired. 326722663e35SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 326822663e35SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 326922663e35SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 32707322289dSmrg 327122663e35SmrgAC_ARG_ENABLE(strict-compilation, 327222663e35Smrg AS_HELP_STRING([--enable-strict-compilation], 327322663e35Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 327422663e35Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 32757322289dSmrg 327622663e35SmrgAC_LANG_CASE( 327722663e35Smrg [C], [ 327822663e35Smrg define([PREFIX], [C]) 327922663e35Smrg ], 328022663e35Smrg [C++], [ 328122663e35Smrg define([PREFIX], [CXX]) 328222663e35Smrg ] 328322663e35Smrg) 32847322289dSmrg 328522663e35Smrg[STRICT_]PREFIX[FLAGS]="" 328622663e35SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 328722663e35SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3288d769e936Smrg 328922663e35Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 329022663e35Smrg# activate it with -Werror, so we add it here explicitly. 329122663e35SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3292d769e936Smrg 329322663e35Smrgif test "x$STRICT_COMPILE" = "xyes"; then 329422663e35Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 329522663e35Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 329622663e35Smrgfi 329722663e35SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 329822663e35SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 329922663e35SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 330022663e35Smrg]) # XORG_STRICT_OPTION 3301d769e936Smrg 330222663e35Smrg# XORG_DEFAULT_NOCODE_OPTIONS 330322663e35Smrg# --------------------------- 330422663e35Smrg# Minimum version: 1.20.0 330522663e35Smrg# 330622663e35Smrg# Defines default options for X.Org modules which don't compile code, 330722663e35Smrg# such as fonts, bitmaps, cursors, and docs. 330822663e35Smrg# 330922663e35SmrgAC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [ 331022663e35SmrgAC_REQUIRE([AC_PROG_INSTALL]) 331122663e35SmrgXORG_RELEASE_VERSION 331222663e35SmrgXORG_CHANGELOG 331322663e35SmrgXORG_INSTALL 331422663e35SmrgXORG_MANPAGE_SECTIONS 331522663e35Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 331622663e35Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 331722663e35Smrg]) # XORG_DEFAULT_NOCODE_OPTIONS 33181d54945dSmrg 331922663e35Smrg# XORG_DEFAULT_OPTIONS 332022663e35Smrg# -------------------- 332122663e35Smrg# Minimum version: 1.3.0 332222663e35Smrg# 332322663e35Smrg# Defines default options for X.Org modules which compile code. 332422663e35Smrg# 332522663e35SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 332622663e35SmrgAC_REQUIRE([AC_PROG_INSTALL]) 332722663e35SmrgXORG_COMPILER_FLAGS 332822663e35SmrgXORG_CWARNFLAGS 332922663e35SmrgXORG_STRICT_OPTION 333022663e35SmrgXORG_DEFAULT_NOCODE_OPTIONS 333122663e35Smrg]) # XORG_DEFAULT_OPTIONS 33321d54945dSmrg 333322663e35Smrg# XORG_INSTALL() 333422663e35Smrg# ---------------- 333522663e35Smrg# Minimum version: 1.4.0 333622663e35Smrg# 333722663e35Smrg# Defines the variable INSTALL_CMD as the command to copy 333822663e35Smrg# INSTALL from $prefix/share/util-macros. 333922663e35Smrg# 334022663e35SmrgAC_DEFUN([XORG_INSTALL], [ 334122663e35SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 334222663e35Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 334322663e35SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 334422663e35Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 334522663e35Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 334622663e35Smrgtouch \$(top_srcdir)/INSTALL; \ 334722663e35Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 334822663e35SmrgAC_SUBST([INSTALL_CMD]) 334922663e35Smrg]) # XORG_INSTALL 335022663e35Smrgdnl Copyright 2005 Red Hat, Inc 335122663e35Smrgdnl 335222663e35Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 335322663e35Smrgdnl documentation for any purpose is hereby granted without fee, provided that 335422663e35Smrgdnl the above copyright notice appear in all copies and that both that 335522663e35Smrgdnl copyright notice and this permission notice appear in supporting 335622663e35Smrgdnl documentation. 335722663e35Smrgdnl 335822663e35Smrgdnl The above copyright notice and this permission notice shall be included 335922663e35Smrgdnl in all copies or substantial portions of the Software. 336022663e35Smrgdnl 336122663e35Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 336222663e35Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 336322663e35Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 336422663e35Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 336522663e35Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 336622663e35Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 336722663e35Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 336822663e35Smrgdnl 336922663e35Smrgdnl Except as contained in this notice, the name of the copyright holders shall 337022663e35Smrgdnl not be used in advertising or otherwise to promote the sale, use or 337122663e35Smrgdnl other dealings in this Software without prior written authorization 337222663e35Smrgdnl from the copyright holders. 337322663e35Smrgdnl 3374024581f2Smrg 337522663e35Smrg# XORG_RELEASE_VERSION 337622663e35Smrg# -------------------- 337722663e35Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 33781d54945dSmrg 337922663e35SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 338022663e35Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 338122663e35Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 338222663e35Smrg [Major version of this package]) 338322663e35Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 338422663e35Smrg if test "x$PVM" = "x"; then 338522663e35Smrg PVM="0" 338622663e35Smrg fi 338722663e35Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 338822663e35Smrg [$PVM], 338922663e35Smrg [Minor version of this package]) 339022663e35Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 339122663e35Smrg if test "x$PVP" = "x"; then 339222663e35Smrg PVP="0" 339322663e35Smrg fi 339422663e35Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 339522663e35Smrg [$PVP], 339622663e35Smrg [Patch version of this package]) 339722663e35Smrg]) 33981d54945dSmrg 339922663e35Smrg# XORG_CHANGELOG() 340022663e35Smrg# ---------------- 340122663e35Smrg# Minimum version: 1.2.0 340222663e35Smrg# 340322663e35Smrg# Defines the variable CHANGELOG_CMD as the command to generate 340422663e35Smrg# ChangeLog from git. 340522663e35Smrg# 340622663e35Smrg# 340722663e35SmrgAC_DEFUN([XORG_CHANGELOG], [ 340822663e35SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 340922663e35Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 341022663e35Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 341122663e35Smrgtouch \$(top_srcdir)/ChangeLog; \ 341222663e35Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 341322663e35SmrgAC_SUBST([CHANGELOG_CMD]) 341422663e35Smrg]) # XORG_CHANGELOG 34151d54945dSmrg 341622663e35Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 341722663e35Smrg# 341822663e35Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 341922663e35Smrg# Foundation, Inc. 342022663e35Smrg# Written by Gordon Matzigkeit, 1996 342122663e35Smrg# 342222663e35Smrg# This file is free software; the Free Software Foundation gives 342322663e35Smrg# unlimited permission to copy and/or distribute it, with or without 342422663e35Smrg# modifications, as long as this notice is preserved. 34251d54945dSmrg 342622663e35Smrgm4_define([_LT_COPYING], [dnl 342722663e35Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 342822663e35Smrg# This is free software; see the source for copying conditions. There is NO 342922663e35Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 34301d54945dSmrg 343122663e35Smrg# GNU Libtool is free software; you can redistribute it and/or modify 343222663e35Smrg# it under the terms of the GNU General Public License as published by 343322663e35Smrg# the Free Software Foundation; either version 2 of of the License, or 343422663e35Smrg# (at your option) any later version. 343522663e35Smrg# 343622663e35Smrg# As a special exception to the GNU General Public License, if you 343722663e35Smrg# distribute this file as part of a program or library that is built 343822663e35Smrg# using GNU Libtool, you may include this file under the same 343922663e35Smrg# distribution terms that you use for the rest of that program. 344022663e35Smrg# 344122663e35Smrg# GNU Libtool is distributed in the hope that it will be useful, but 344222663e35Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 344322663e35Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 344422663e35Smrg# GNU General Public License for more details. 344522663e35Smrg# 344622663e35Smrg# You should have received a copy of the GNU General Public License 344722663e35Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 344822663e35Smrg]) 34491d54945dSmrg 345022663e35Smrg# serial 59 LT_INIT 3451ba85709eSmrg 34521d54945dSmrg 345322663e35Smrg# LT_PREREQ(VERSION) 345422663e35Smrg# ------------------ 345522663e35Smrg# Complain and exit if this libtool version is less that VERSION. 345622663e35Smrgm4_defun([LT_PREREQ], 345722663e35Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 345822663e35Smrg [m4_default([$3], 345922663e35Smrg [m4_fatal([Libtool version $1 or higher is required], 346022663e35Smrg 63)])], 346122663e35Smrg [$2])]) 34621d54945dSmrg 34631d54945dSmrg 346422663e35Smrg# _LT_CHECK_BUILDDIR 346522663e35Smrg# ------------------ 346622663e35Smrg# Complain if the absolute build directory name contains unusual characters 346722663e35Smrgm4_defun([_LT_CHECK_BUILDDIR], 346822663e35Smrg[case `pwd` in 346922663e35Smrg *\ * | *\ *) 347022663e35Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 347122663e35Smrgesac 347222663e35Smrg]) 34731d54945dSmrg 34741d54945dSmrg 347522663e35Smrg# LT_INIT([OPTIONS]) 347622663e35Smrg# ------------------ 347722663e35SmrgAC_DEFUN([LT_INIT], 347822663e35Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 347922663e35SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 348022663e35SmrgAC_BEFORE([$0], [LT_LANG])dnl 348122663e35SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 348222663e35SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 348322663e35Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 3484d769e936Smrg 348522663e35Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 348622663e35Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 348722663e35Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 348822663e35Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 348922663e35Smrgdnl unless we require an AC_DEFUNed macro: 349022663e35SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 349122663e35SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 349222663e35SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 349322663e35SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 349422663e35Smrgm4_require([_LT_PROG_LTMAIN])dnl 34951d54945dSmrg 349622663e35Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 34971d54945dSmrg 349822663e35Smrgdnl Parse OPTIONS 349922663e35Smrg_LT_SET_OPTIONS([$0], [$1]) 3500ec713c28Smrg 350122663e35Smrg# This can be used to rebuild libtool when needed 350222663e35SmrgLIBTOOL_DEPS=$ltmain 35037322289dSmrg 350422663e35Smrg# Always use our own libtool. 350522663e35SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 350622663e35SmrgAC_SUBST(LIBTOOL)dnl 3507ec713c28Smrg 350822663e35Smrg_LT_SETUP 35097322289dSmrg 351022663e35Smrg# Only expand once: 351122663e35Smrgm4_define([LT_INIT]) 351222663e35Smrg])# LT_INIT 35137322289dSmrg 351422663e35Smrg# Old names: 351522663e35SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 351622663e35SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 351722663e35Smrgdnl aclocal-1.4 backwards compatibility: 351822663e35Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 351922663e35Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 35207322289dSmrg 3521d769e936Smrg 352222663e35Smrg# _LT_PREPARE_CC_BASENAME 352322663e35Smrg# ----------------------- 352422663e35Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 352522663e35Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 352622663e35Smrgfunc_cc_basename () 352722663e35Smrg{ 352822663e35Smrg for cc_temp in @S|@*""; do 352922663e35Smrg case $cc_temp in 353022663e35Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 353122663e35Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 353222663e35Smrg \-*) ;; 353322663e35Smrg *) break;; 353422663e35Smrg esac 353522663e35Smrg done 353622663e35Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 353722663e35Smrg} 353822663e35Smrg])# _LT_PREPARE_CC_BASENAME 3539d769e936Smrg 35401d54945dSmrg 354122663e35Smrg# _LT_CC_BASENAME(CC) 354222663e35Smrg# ------------------- 354322663e35Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 354422663e35Smrg# but that macro is also expanded into generated libtool script, which 354522663e35Smrg# arranges for $SED and $ECHO to be set by different means. 354622663e35Smrgm4_defun([_LT_CC_BASENAME], 354722663e35Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 354822663e35SmrgAC_REQUIRE([_LT_DECL_SED])dnl 354922663e35SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 355022663e35Smrgfunc_cc_basename $1 355122663e35Smrgcc_basename=$func_cc_basename_result 355222663e35Smrg]) 35531d54945dSmrg 35541d54945dSmrg 355522663e35Smrg# _LT_FILEUTILS_DEFAULTS 355622663e35Smrg# ---------------------- 355722663e35Smrg# It is okay to use these file commands and assume they have been set 355822663e35Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 355922663e35Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 356022663e35Smrg[: ${CP="cp -f"} 356122663e35Smrg: ${MV="mv -f"} 356222663e35Smrg: ${RM="rm -f"} 356322663e35Smrg])# _LT_FILEUTILS_DEFAULTS 35641d54945dSmrg 35651d54945dSmrg 356622663e35Smrg# _LT_SETUP 356722663e35Smrg# --------- 356822663e35Smrgm4_defun([_LT_SETUP], 356922663e35Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3570ec713c28SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 357122663e35SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 357222663e35SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3573d769e936Smrg 357422663e35Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 357522663e35Smrgdnl 357622663e35Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 357722663e35Smrg_LT_DECL([], [host], [0])dnl 357822663e35Smrg_LT_DECL([], [host_os], [0])dnl 357922663e35Smrgdnl 358022663e35Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 358122663e35Smrg_LT_DECL([], [build], [0])dnl 358222663e35Smrg_LT_DECL([], [build_os], [0])dnl 358322663e35Smrgdnl 358422663e35SmrgAC_REQUIRE([AC_PROG_CC])dnl 358522663e35SmrgAC_REQUIRE([LT_PATH_LD])dnl 358622663e35SmrgAC_REQUIRE([LT_PATH_NM])dnl 358722663e35Smrgdnl 358822663e35SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 358922663e35Smrgtest -z "$LN_S" && LN_S="ln -s" 359022663e35Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 359122663e35Smrgdnl 359222663e35SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 359322663e35Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 359422663e35Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 359522663e35Smrgdnl 359622663e35Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 359722663e35Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 359822663e35Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 359922663e35Smrgm4_require([_LT_CMD_RELOAD])dnl 360022663e35Smrgm4_require([_LT_DECL_FILECMD])dnl 360122663e35Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 360222663e35Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 360322663e35Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 360422663e35Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 360522663e35Smrgm4_require([_LT_WITH_SYSROOT])dnl 360622663e35Smrgm4_require([_LT_CMD_TRUNCATE])dnl 3607d769e936Smrg 360822663e35Smrg_LT_CONFIG_LIBTOOL_INIT([ 360922663e35Smrg# See if we are running on zsh, and set the options that allow our 361022663e35Smrg# commands through without removal of \ escapes INIT. 361122663e35Smrgif test -n "\${ZSH_VERSION+set}"; then 361222663e35Smrg setopt NO_GLOB_SUBST 36131d54945dSmrgfi 361422663e35Smrg]) 361522663e35Smrgif test -n "${ZSH_VERSION+set}"; then 361622663e35Smrg setopt NO_GLOB_SUBST 36171d54945dSmrgfi 36181d54945dSmrg 361922663e35Smrg_LT_CHECK_OBJDIR 3620d769e936Smrg 362122663e35Smrgm4_require([_LT_TAG_COMPILER])dnl 3622d769e936Smrg 362322663e35Smrgcase $host_os in 362422663e35Smrgaix3*) 362522663e35Smrg # AIX sometimes has problems with the GCC collect2 program. For some 362622663e35Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 362722663e35Smrg # vanish in a puff of smoke. 362822663e35Smrg if test set != "${COLLECT_NAMES+set}"; then 362922663e35Smrg COLLECT_NAMES= 363022663e35Smrg export COLLECT_NAMES 363122663e35Smrg fi 36321d54945dSmrg ;; 363322663e35Smrgesac 36341d54945dSmrg 363522663e35Smrg# Global variables: 363622663e35Smrgofile=libtool 363722663e35Smrgcan_build_shared=yes 36381d54945dSmrg 363922663e35Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 364022663e35Smrg# ICC, which need '.lib'). 364122663e35Smrglibext=a 36421d54945dSmrg 364322663e35Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 36441d54945dSmrg 364522663e35Smrgold_CC=$CC 364622663e35Smrgold_CFLAGS=$CFLAGS 36477322289dSmrg 364822663e35Smrg# Set sane defaults for various variables 364922663e35Smrgtest -z "$CC" && CC=cc 365022663e35Smrgtest -z "$LTCC" && LTCC=$CC 365122663e35Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 365222663e35Smrgtest -z "$LD" && LD=ld 365322663e35Smrgtest -z "$ac_objext" && ac_objext=o 36547322289dSmrg 365522663e35Smrg_LT_CC_BASENAME([$compiler]) 36561d54945dSmrg 365722663e35Smrg# Only perform the check for file, if the check method requires it 365822663e35Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 365922663e35Smrgcase $deplibs_check_method in 366022663e35Smrgfile_magic*) 366122663e35Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 366222663e35Smrg _LT_PATH_MAGIC 36631d54945dSmrg fi 36641d54945dSmrg ;; 36651d54945dSmrgesac 3666d769e936Smrg 366722663e35Smrg# Use C for the default configuration in the libtool script 366822663e35SmrgLT_SUPPORTED_TAG([CC]) 366922663e35Smrg_LT_LANG_C_CONFIG 367022663e35Smrg_LT_LANG_DEFAULT_CONFIG 367122663e35Smrg_LT_CONFIG_COMMANDS 367222663e35Smrg])# _LT_SETUP 36731d54945dSmrg 36741d54945dSmrg 367522663e35Smrg# _LT_PREPARE_SED_QUOTE_VARS 367622663e35Smrg# -------------------------- 367722663e35Smrg# Define a few sed substitution that help us do robust quoting. 367822663e35Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 367922663e35Smrg[# Backslashify metacharacters that are still active within 368022663e35Smrg# double-quoted strings. 368122663e35Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 36821d54945dSmrg 368322663e35Smrg# Same as above, but do not quote variable references. 368422663e35Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 36851d54945dSmrg 368622663e35Smrg# Sed substitution to delay expansion of an escaped shell variable in a 368722663e35Smrg# double_quote_subst'ed string. 368822663e35Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 36891d54945dSmrg 369022663e35Smrg# Sed substitution to delay expansion of an escaped single quote. 369122663e35Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3692ec713c28Smrg 369322663e35Smrg# Sed substitution to avoid accidental globbing in evaled expressions 369422663e35Smrgno_glob_subst='s/\*/\\\*/g' 369522663e35Smrg]) 36961d54945dSmrg 369722663e35Smrg# _LT_PROG_LTMAIN 369822663e35Smrg# --------------- 369922663e35Smrg# Note that this code is called both from 'configure', and 'config.status' 370022663e35Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 370122663e35Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 370222663e35Smrg# so we pass a copy along to make sure it has a sensible value anyway. 370322663e35Smrgm4_defun([_LT_PROG_LTMAIN], 370422663e35Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 370522663e35Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 370622663e35Smrgltmain=$ac_aux_dir/ltmain.sh 370722663e35Smrg])# _LT_PROG_LTMAIN 37081d54945dSmrg 37091d54945dSmrg 37101d54945dSmrg 371122663e35Smrg# So that we can recreate a full libtool script including additional 371222663e35Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 371322663e35Smrg# in macros and then make a single call at the end using the 'libtool' 371422663e35Smrg# label. 371522663e35Smrg 371622663e35Smrg 371722663e35Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 371822663e35Smrg# ---------------------------------------- 371922663e35Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 372022663e35Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 372122663e35Smrg[m4_ifval([$1], 372222663e35Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 372322663e35Smrg [$1 372422663e35Smrg])])]) 372522663e35Smrg 372622663e35Smrg# Initialize. 372722663e35Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 372822663e35Smrg 372922663e35Smrg 373022663e35Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 373122663e35Smrg# ------------------------------ 373222663e35Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 373322663e35Smrgm4_define([_LT_CONFIG_LIBTOOL], 373422663e35Smrg[m4_ifval([$1], 373522663e35Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 373622663e35Smrg [$1 373722663e35Smrg])])]) 373822663e35Smrg 373922663e35Smrg# Initialize. 374022663e35Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 374122663e35Smrg 374222663e35Smrg 374322663e35Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 374422663e35Smrg# ----------------------------------------------------- 374522663e35Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 374622663e35Smrg[_LT_CONFIG_LIBTOOL([$1]) 374722663e35Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 374822663e35Smrg]) 374922663e35Smrg 375022663e35Smrg 375122663e35Smrg# _LT_FORMAT_COMMENT([COMMENT]) 375222663e35Smrg# ----------------------------- 375322663e35Smrg# Add leading comment marks to the start of each line, and a trailing 375422663e35Smrg# full-stop to the whole comment if one is not present already. 375522663e35Smrgm4_define([_LT_FORMAT_COMMENT], 375622663e35Smrg[m4_ifval([$1], [ 375722663e35Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 375822663e35Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 375922663e35Smrg)]) 376022663e35Smrg 376122663e35Smrg 376222663e35Smrg 376322663e35Smrg 376422663e35Smrg 376522663e35Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 376622663e35Smrg# ------------------------------------------------------------------- 376722663e35Smrg# CONFIGNAME is the name given to the value in the libtool script. 376822663e35Smrg# VARNAME is the (base) name used in the configure script. 376922663e35Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 377022663e35Smrg# VARNAME. Any other value will be used directly. 377122663e35Smrgm4_define([_LT_DECL], 377222663e35Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 377322663e35Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 377422663e35Smrg [m4_ifval([$1], [$1], [$2])]) 377522663e35Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 377622663e35Smrg m4_ifval([$4], 377722663e35Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 377822663e35Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 377922663e35Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 378022663e35Smrg]) 378122663e35Smrg 378222663e35Smrg 378322663e35Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 378422663e35Smrg# -------------------------------------------------------- 378522663e35Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 378622663e35Smrg 378722663e35Smrg 378822663e35Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 378922663e35Smrg# ------------------------------------------------ 379022663e35Smrgm4_define([lt_decl_tag_varnames], 379122663e35Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 379222663e35Smrg 379322663e35Smrg 379422663e35Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 379522663e35Smrg# --------------------------------------------------------- 379622663e35Smrgm4_define([_lt_decl_filter], 379722663e35Smrg[m4_case([$#], 379822663e35Smrg [0], [m4_fatal([$0: too few arguments: $#])], 379922663e35Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 380022663e35Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 380122663e35Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 380222663e35Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 380322663e35Smrg]) 380422663e35Smrg 380522663e35Smrg 380622663e35Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 380722663e35Smrg# -------------------------------------------------- 380822663e35Smrgm4_define([lt_decl_quote_varnames], 380922663e35Smrg[_lt_decl_filter([value], [1], $@)]) 381022663e35Smrg 381122663e35Smrg 381222663e35Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 381322663e35Smrg# --------------------------------------------------- 381422663e35Smrgm4_define([lt_decl_dquote_varnames], 381522663e35Smrg[_lt_decl_filter([value], [2], $@)]) 381622663e35Smrg 381722663e35Smrg 381822663e35Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 381922663e35Smrg# --------------------------------------------------- 382022663e35Smrgm4_define([lt_decl_varnames_tagged], 382122663e35Smrg[m4_assert([$# <= 2])dnl 382222663e35Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 382322663e35Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 382422663e35Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 382522663e35Smrgm4_define([_lt_decl_varnames_tagged], 382622663e35Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 382722663e35Smrg 382822663e35Smrg 382922663e35Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 383022663e35Smrg# ------------------------------------------------ 383122663e35Smrgm4_define([lt_decl_all_varnames], 383222663e35Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 383322663e35Smrg m4_if([$2], [], 383422663e35Smrg m4_quote(lt_decl_varnames), 383522663e35Smrg m4_quote(m4_shift($@))))[]dnl 383622663e35Smrg]) 383722663e35Smrgm4_define([_lt_decl_all_varnames], 383822663e35Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 383922663e35Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 384022663e35Smrg]) 384122663e35Smrg 384222663e35Smrg 384322663e35Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 384422663e35Smrg# ------------------------------------ 384522663e35Smrg# Quote a variable value, and forward it to 'config.status' so that its 384622663e35Smrg# declaration there will have the same value as in 'configure'. VARNAME 384722663e35Smrg# must have a single quote delimited value for this to work. 384822663e35Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 384922663e35Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 385022663e35Smrg 385122663e35Smrg 385222663e35Smrg# _LT_CONFIG_STATUS_DECLARATIONS 385322663e35Smrg# ------------------------------ 385422663e35Smrg# We delimit libtool config variables with single quotes, so when 385522663e35Smrg# we write them to config.status, we have to be sure to quote all 385622663e35Smrg# embedded single quotes properly. In configure, this macro expands 385722663e35Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 385822663e35Smrg# 385922663e35Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 386022663e35Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 386122663e35Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 386222663e35Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 386322663e35Smrg 38641d54945dSmrg 386522663e35Smrg# _LT_LIBTOOL_TAGS 386622663e35Smrg# ---------------- 386722663e35Smrg# Output comment and list of tags supported by the script 386822663e35Smrgm4_defun([_LT_LIBTOOL_TAGS], 386922663e35Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 387022663e35Smrgavailable_tags='_LT_TAGS'dnl 387122663e35Smrg]) 3872ec713c28Smrg 38731d54945dSmrg 387422663e35Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 387522663e35Smrg# ----------------------------------- 387622663e35Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 387722663e35Smrg# expand to a commented shell variable setting: 387822663e35Smrg# 387922663e35Smrg# # Some comment about what VAR is for. 388022663e35Smrg# visible_name=$lt_internal_name 388122663e35Smrgm4_define([_LT_LIBTOOL_DECLARE], 388222663e35Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 388322663e35Smrg [description])))[]dnl 388422663e35Smrgm4_pushdef([_libtool_name], 388522663e35Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 388622663e35Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 388722663e35Smrg [0], [_libtool_name=[$]$1], 388822663e35Smrg [1], [_libtool_name=$lt_[]$1], 388922663e35Smrg [2], [_libtool_name=$lt_[]$1], 389022663e35Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 389122663e35Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 389222663e35Smrg]) 3893ec713c28Smrg 38947322289dSmrg 389522663e35Smrg# _LT_LIBTOOL_CONFIG_VARS 389622663e35Smrg# ----------------------- 389722663e35Smrg# Produce commented declarations of non-tagged libtool config variables 389822663e35Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 389922663e35Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 390022663e35Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 390122663e35Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 390222663e35Smrg[m4_foreach([_lt_var], 390322663e35Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 390422663e35Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 39051d54945dSmrg 39061d54945dSmrg 390722663e35Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 390822663e35Smrg# ------------------------- 390922663e35Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 391022663e35Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 391122663e35Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 39121d54945dSmrg 39131d54945dSmrg 391422663e35Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 391522663e35Smrg# ------------------------------ 391622663e35Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 39171d54945dSmrg 39181d54945dSmrg 391922663e35Smrg# _LT_CONFIG_COMMANDS 392022663e35Smrg# ------------------- 392122663e35Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 392222663e35Smrg# variables for single and double quote escaping we saved from calls 392322663e35Smrg# to _LT_DECL, we can put quote escaped variables declarations 392422663e35Smrg# into 'config.status', and then the shell code to quote escape them in 392522663e35Smrg# for loops in 'config.status'. Finally, any additional code accumulated 392622663e35Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 392722663e35Smrgm4_defun([_LT_CONFIG_COMMANDS], 392822663e35Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 392922663e35Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 393022663e35Smrg dnl instead of duplicating it all over again into config.status, 393122663e35Smrg dnl then we will have config.status run $CONFIG_LT later, so it 393222663e35Smrg dnl needs to know what name is stored there: 393322663e35Smrg [AC_CONFIG_COMMANDS([libtool], 393422663e35Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 393522663e35Smrg dnl If the libtool generation code is destined for config.status, 393622663e35Smrg dnl expand the accumulated commands and init code now: 393722663e35Smrg [AC_CONFIG_COMMANDS([libtool], 393822663e35Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 393922663e35Smrg])#_LT_CONFIG_COMMANDS 39401d54945dSmrg 39411d54945dSmrg 394222663e35Smrg# Initialize. 394322663e35Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 394422663e35Smrg[ 39451d54945dSmrg 394622663e35Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 394722663e35Smrg# if CDPATH is set. 394822663e35Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 39491d54945dSmrg 395022663e35Smrgsed_quote_subst='$sed_quote_subst' 395122663e35Smrgdouble_quote_subst='$double_quote_subst' 395222663e35Smrgdelay_variable_subst='$delay_variable_subst' 395322663e35Smrg_LT_CONFIG_STATUS_DECLARATIONS 395422663e35SmrgLTCC='$LTCC' 395522663e35SmrgLTCFLAGS='$LTCFLAGS' 395622663e35Smrgcompiler='$compiler_DEFAULT' 39571d54945dSmrg 395822663e35Smrg# A function that is used when there is no print builtin or printf. 395922663e35Smrgfunc_fallback_echo () 396022663e35Smrg{ 396122663e35Smrg eval 'cat <<_LTECHO_EOF 396222663e35Smrg\$[]1 396322663e35Smrg_LTECHO_EOF' 396422663e35Smrg} 39651d54945dSmrg 396622663e35Smrg# Quote evaled strings. 396722663e35Smrgfor var in lt_decl_all_varnames([[ \ 396822663e35Smrg]], lt_decl_quote_varnames); do 396922663e35Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 397022663e35Smrg *[[\\\\\\\`\\"\\\$]]*) 397122663e35Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3972d769e936Smrg ;; 397322663e35Smrg *) 397422663e35Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3975d769e936Smrg ;; 397622663e35Smrg esac 397722663e35Smrgdone 39781d54945dSmrg 397922663e35Smrg# Double-quote double-evaled strings. 398022663e35Smrgfor var in lt_decl_all_varnames([[ \ 398122663e35Smrg]], lt_decl_dquote_varnames); do 398222663e35Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 398322663e35Smrg *[[\\\\\\\`\\"\\\$]]*) 398422663e35Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 3985786a6f21Smrg ;; 3986ec713c28Smrg *) 398722663e35Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3988786a6f21Smrg ;; 3989ec713c28Smrg esac 399022663e35Smrgdone 399122663e35Smrg 399222663e35Smrg_LT_OUTPUT_LIBTOOL_INIT 3993d769e936Smrg]) 39941d54945dSmrg 399522663e35Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 399622663e35Smrg# ------------------------------------ 399722663e35Smrg# Generate a child script FILE with all initialization necessary to 399822663e35Smrg# reuse the environment learned by the parent script, and make the 399922663e35Smrg# file executable. If COMMENT is supplied, it is inserted after the 400022663e35Smrg# '#!' sequence but before initialization text begins. After this 400122663e35Smrg# macro, additional text can be appended to FILE to form the body of 400222663e35Smrg# the child script. The macro ends with non-zero status if the 400322663e35Smrg# file could not be fully written (such as if the disk is full). 400422663e35Smrgm4_ifdef([AS_INIT_GENERATED], 400522663e35Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 400622663e35Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 400722663e35Smrg[m4_require([AS_PREPARE])]dnl 400822663e35Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 400922663e35Smrg[lt_write_fail=0 401022663e35Smrgcat >$1 <<_ASEOF || lt_write_fail=1 401122663e35Smrg#! $SHELL 401222663e35Smrg# Generated by $as_me. 401322663e35Smrg$2 401422663e35SmrgSHELL=\${CONFIG_SHELL-$SHELL} 401522663e35Smrgexport SHELL 401622663e35Smrg_ASEOF 401722663e35Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 401822663e35SmrgAS_SHELL_SANITIZE 401922663e35Smrg_AS_PREPARE 402022663e35Smrgexec AS_MESSAGE_FD>&1 402122663e35Smrg_ASEOF 402222663e35Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 402322663e35Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 40241d54945dSmrg 402522663e35Smrg# LT_OUTPUT 402622663e35Smrg# --------- 402722663e35Smrg# This macro allows early generation of the libtool script (before 402822663e35Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 402922663e35Smrg# tests. 403022663e35SmrgAC_DEFUN([LT_OUTPUT], 403122663e35Smrg[: ${CONFIG_LT=./config.lt} 403222663e35SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 403322663e35Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 403422663e35Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 4035d769e936Smrg 403622663e35Smrgcat >>"$CONFIG_LT" <<\_LTEOF 403722663e35Smrglt_cl_silent=false 403822663e35Smrgexec AS_MESSAGE_LOG_FD>>config.log 403922663e35Smrg{ 404022663e35Smrg echo 404122663e35Smrg AS_BOX([Running $as_me.]) 404222663e35Smrg} >&AS_MESSAGE_LOG_FD 40431d54945dSmrg 404422663e35Smrglt_cl_help="\ 404522663e35Smrg'$as_me' creates a local libtool stub from the current configuration, 404622663e35Smrgfor use in further configure time tests before the real libtool is 404722663e35Smrggenerated. 40481d54945dSmrg 404922663e35SmrgUsage: $[0] [[OPTIONS]] 405022663e35Smrg 405122663e35Smrg -h, --help print this help, then exit 405222663e35Smrg -V, --version print version number, then exit 405322663e35Smrg -q, --quiet do not print progress messages 405422663e35Smrg -d, --debug don't remove temporary files 40551d54945dSmrg 405622663e35SmrgReport bugs to <bug-libtool@gnu.org>." 40571d54945dSmrg 405822663e35Smrglt_cl_version="\ 405922663e35Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 406022663e35Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 406122663e35Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 40621d54945dSmrg 406322663e35SmrgCopyright (C) 2011 Free Software Foundation, Inc. 406422663e35SmrgThis config.lt script is free software; the Free Software Foundation 406522663e35Smrggives unlimited permision to copy, distribute and modify it." 40661d54945dSmrg 406722663e35Smrgwhile test 0 != $[#] 406822663e35Smrgdo 406922663e35Smrg case $[1] in 407022663e35Smrg --version | --v* | -V ) 407122663e35Smrg echo "$lt_cl_version"; exit 0 ;; 407222663e35Smrg --help | --h* | -h ) 407322663e35Smrg echo "$lt_cl_help"; exit 0 ;; 407422663e35Smrg --debug | --d* | -d ) 407522663e35Smrg debug=: ;; 407622663e35Smrg --quiet | --q* | --silent | --s* | -q ) 407722663e35Smrg lt_cl_silent=: ;; 40781d54945dSmrg 407922663e35Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 408022663e35SmrgTry '$[0] --help' for more information.]) ;; 40811d54945dSmrg 408222663e35Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 408322663e35SmrgTry '$[0] --help' for more information.]) ;; 408422663e35Smrg esac 408522663e35Smrg shift 408622663e35Smrgdone 40871d54945dSmrg 408822663e35Smrgif $lt_cl_silent; then 408922663e35Smrg exec AS_MESSAGE_FD>/dev/null 409022663e35Smrgfi 409122663e35Smrg_LTEOF 40921d54945dSmrg 409322663e35Smrgcat >>"$CONFIG_LT" <<_LTEOF 409422663e35Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 409522663e35Smrg_LTEOF 40961d54945dSmrg 409722663e35Smrgcat >>"$CONFIG_LT" <<\_LTEOF 409822663e35SmrgAC_MSG_NOTICE([creating $ofile]) 409922663e35Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 410022663e35SmrgAS_EXIT(0) 410122663e35Smrg_LTEOF 410222663e35Smrgchmod +x "$CONFIG_LT" 41031d54945dSmrg 410422663e35Smrg# configure is writing to config.log, but config.lt does its own redirection, 410522663e35Smrg# appending to config.log, which fails on DOS, as config.log is still kept 410622663e35Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 410722663e35Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 410822663e35Smrglt_cl_success=: 410922663e35Smrgtest yes = "$silent" && 411022663e35Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 411122663e35Smrgexec AS_MESSAGE_LOG_FD>/dev/null 411222663e35Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 411322663e35Smrgexec AS_MESSAGE_LOG_FD>>config.log 411422663e35Smrg$lt_cl_success || AS_EXIT(1) 411522663e35Smrg])# LT_OUTPUT 41161d54945dSmrg 4117d769e936Smrg 411822663e35Smrg# _LT_CONFIG(TAG) 411922663e35Smrg# --------------- 412022663e35Smrg# If TAG is the built-in tag, create an initial libtool script with a 412122663e35Smrg# default configuration from the untagged config vars. Otherwise add code 412222663e35Smrg# to config.status for appending the configuration named by TAG from the 412322663e35Smrg# matching tagged config vars. 412422663e35Smrgm4_defun([_LT_CONFIG], 412522663e35Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 412622663e35Smrg_LT_CONFIG_SAVE_COMMANDS([ 412722663e35Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 412822663e35Smrg m4_if(_LT_TAG, [C], [ 412922663e35Smrg # See if we are running on zsh, and set the options that allow our 413022663e35Smrg # commands through without removal of \ escapes. 413122663e35Smrg if test -n "${ZSH_VERSION+set}"; then 413222663e35Smrg setopt NO_GLOB_SUBST 413322663e35Smrg fi 41341d54945dSmrg 413522663e35Smrg cfgfile=${ofile}T 413622663e35Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 413722663e35Smrg $RM "$cfgfile" 41381d54945dSmrg 413922663e35Smrg cat <<_LT_EOF >> "$cfgfile" 414022663e35Smrg#! $SHELL 414122663e35Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 414222663e35Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 414322663e35Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 41447322289dSmrg 414522663e35Smrg# Provide generalized library-building support services. 414622663e35Smrg# Written by Gordon Matzigkeit, 1996 414722663e35Smrg 414822663e35Smrg_LT_COPYING 414922663e35Smrg_LT_LIBTOOL_TAGS 415022663e35Smrg 415122663e35Smrg# Configured defaults for sys_lib_dlsearch_path munging. 415222663e35Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 415322663e35Smrg 415422663e35Smrg# ### BEGIN LIBTOOL CONFIG 415522663e35Smrg_LT_LIBTOOL_CONFIG_VARS 415622663e35Smrg_LT_LIBTOOL_TAG_VARS 415722663e35Smrg# ### END LIBTOOL CONFIG 41581d54945dSmrg 415922663e35Smrg_LT_EOF 41601d54945dSmrg 416122663e35Smrg cat <<'_LT_EOF' >> "$cfgfile" 4162ba85709eSmrg 416322663e35Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 41641d54945dSmrg 416522663e35Smrg_LT_PREPARE_MUNGE_PATH_LIST 416622663e35Smrg_LT_PREPARE_CC_BASENAME 41671d54945dSmrg 416822663e35Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 41691d54945dSmrg 417022663e35Smrg_LT_EOF 41711d54945dSmrg 417222663e35Smrg case $host_os in 417322663e35Smrg aix3*) 417422663e35Smrg cat <<\_LT_EOF >> "$cfgfile" 417522663e35Smrg# AIX sometimes has problems with the GCC collect2 program. For some 417622663e35Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 417722663e35Smrg# vanish in a puff of smoke. 417822663e35Smrgif test set != "${COLLECT_NAMES+set}"; then 417922663e35Smrg COLLECT_NAMES= 418022663e35Smrg export COLLECT_NAMES 418122663e35Smrgfi 4182d769e936Smrg_LT_EOF 418322663e35Smrg ;; 418422663e35Smrg esac 41851d54945dSmrg 418622663e35Smrg _LT_PROG_LTMAIN 41871d54945dSmrg 418822663e35Smrg # We use sed instead of cat because bash on DJGPP gets confused if 418922663e35Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 419022663e35Smrg # text mode, it properly converts lines to CR/LF. This bash problem 419122663e35Smrg # is reportedly fixed, but why not run on old versions too? 419222663e35Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 419322663e35Smrg || (rm -f "$cfgfile"; exit 1) 419422663e35Smrg 419522663e35Smrg mv -f "$cfgfile" "$ofile" || 419622663e35Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 419722663e35Smrg chmod +x "$ofile" 419822663e35Smrg], 419922663e35Smrg[cat <<_LT_EOF >> "$ofile" 42001d54945dSmrg 420122663e35Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 420222663e35Smrgdnl in a comment (ie after a #). 420322663e35Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 420422663e35Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 420522663e35Smrg# ### END LIBTOOL TAG CONFIG: $1 4206d769e936Smrg_LT_EOF 420722663e35Smrg])dnl /m4_if 420822663e35Smrg], 420922663e35Smrg[m4_if([$1], [], [ 421022663e35Smrg PACKAGE='$PACKAGE' 421122663e35Smrg VERSION='$VERSION' 421222663e35Smrg RM='$RM' 421322663e35Smrg ofile='$ofile'], []) 421422663e35Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 421522663e35Smrg])# _LT_CONFIG 42161d54945dSmrg 42171d54945dSmrg 421822663e35Smrg# LT_SUPPORTED_TAG(TAG) 421922663e35Smrg# --------------------- 422022663e35Smrg# Trace this macro to discover what tags are supported by the libtool 422122663e35Smrg# --tag option, using: 422222663e35Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 422322663e35SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 42241d54945dSmrg 42251d54945dSmrg 422622663e35Smrg# C support is built-in for now 422722663e35Smrgm4_define([_LT_LANG_C_enabled], []) 422822663e35Smrgm4_define([_LT_TAGS], []) 422922663e35Smrg 423022663e35Smrg 423122663e35Smrg# LT_LANG(LANG) 423222663e35Smrg# ------------- 423322663e35Smrg# Enable libtool support for the given language if not already enabled. 423422663e35SmrgAC_DEFUN([LT_LANG], 423522663e35Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 423622663e35Smrgm4_case([$1], 423722663e35Smrg [C], [_LT_LANG(C)], 423822663e35Smrg [C++], [_LT_LANG(CXX)], 423922663e35Smrg [Go], [_LT_LANG(GO)], 424022663e35Smrg [Java], [_LT_LANG(GCJ)], 424122663e35Smrg [Fortran 77], [_LT_LANG(F77)], 424222663e35Smrg [Fortran], [_LT_LANG(FC)], 424322663e35Smrg [Windows Resource], [_LT_LANG(RC)], 424422663e35Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 424522663e35Smrg [_LT_LANG($1)], 424622663e35Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 424722663e35Smrg])# LT_LANG 424822663e35Smrg 424922663e35Smrg 425022663e35Smrg# _LT_LANG(LANGNAME) 425122663e35Smrg# ------------------ 425222663e35Smrgm4_defun([_LT_LANG], 425322663e35Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 425422663e35Smrg [LT_SUPPORTED_TAG([$1])dnl 425522663e35Smrg m4_append([_LT_TAGS], [$1 ])dnl 425622663e35Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 425722663e35Smrg _LT_LANG_$1_CONFIG($1)])dnl 425822663e35Smrg])# _LT_LANG 425922663e35Smrg 426022663e35Smrg 426122663e35Smrgm4_ifndef([AC_PROG_GO], [ 426222663e35Smrg# NOTE: This macro has been submitted for inclusion into # 426322663e35Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 426422663e35Smrg# a released version of Autoconf we should remove this # 426522663e35Smrg# macro and use it instead. # 426622663e35Smrgm4_defun([AC_PROG_GO], 426722663e35Smrg[AC_LANG_PUSH(Go)dnl 426822663e35SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 426922663e35SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 427022663e35Smrg_AC_ARG_VAR_LDFLAGS()dnl 427122663e35SmrgAC_CHECK_TOOL(GOC, gccgo) 427222663e35Smrgif test -z "$GOC"; then 427322663e35Smrg if test -n "$ac_tool_prefix"; then 427422663e35Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 427522663e35Smrg fi 427622663e35Smrgfi 427722663e35Smrgif test -z "$GOC"; then 427822663e35Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 427922663e35Smrgfi 428022663e35Smrg])#m4_defun 428122663e35Smrg])#m4_ifndef 428222663e35Smrg 42831d54945dSmrg 428422663e35Smrg# _LT_LANG_DEFAULT_CONFIG 428522663e35Smrg# ----------------------- 428622663e35Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 428722663e35Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 428822663e35Smrg [LT_LANG(CXX)], 428922663e35Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 42901d54945dSmrg 429122663e35SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 429222663e35Smrg [LT_LANG(F77)], 429322663e35Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 42941d54945dSmrg 429522663e35SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 429622663e35Smrg [LT_LANG(FC)], 429722663e35Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 42981d54945dSmrg 429922663e35Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 430022663e35Smrgdnl pulling things in needlessly. 430122663e35SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 430222663e35Smrg [LT_LANG(GCJ)], 430322663e35Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 430422663e35Smrg [LT_LANG(GCJ)], 430522663e35Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 430622663e35Smrg [LT_LANG(GCJ)], 430722663e35Smrg [m4_ifdef([AC_PROG_GCJ], 430822663e35Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 430922663e35Smrg m4_ifdef([A][M_PROG_GCJ], 431022663e35Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 431122663e35Smrg m4_ifdef([LT_PROG_GCJ], 431222663e35Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 43131d54945dSmrg 431422663e35SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 431522663e35Smrg [LT_LANG(GO)], 431622663e35Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 43171d54945dSmrg 431822663e35SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 431922663e35Smrg [LT_LANG(RC)], 432022663e35Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 432122663e35Smrg])# _LT_LANG_DEFAULT_CONFIG 43221d54945dSmrg 432322663e35Smrg# Obsolete macros: 432422663e35SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 432522663e35SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 432622663e35SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 432722663e35SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 432822663e35SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 432922663e35Smrgdnl aclocal-1.4 backwards compatibility: 433022663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 433122663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 433222663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 433322663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 433422663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 433522663e35Smrg 433622663e35Smrg 433722663e35Smrg# _LT_TAG_COMPILER 433822663e35Smrg# ---------------- 433922663e35Smrgm4_defun([_LT_TAG_COMPILER], 434022663e35Smrg[AC_REQUIRE([AC_PROG_CC])dnl 43411d54945dSmrg 434222663e35Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 434322663e35Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 434422663e35Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 434522663e35Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 43461d54945dSmrg 434722663e35Smrg# If no C compiler was specified, use CC. 434822663e35SmrgLTCC=${LTCC-"$CC"} 43491d54945dSmrg 435022663e35Smrg# If no C compiler flags were specified, use CFLAGS. 435122663e35SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 43521d54945dSmrg 435322663e35Smrg# Allow CC to be a program name with arguments. 435422663e35Smrgcompiler=$CC 435522663e35Smrg])# _LT_TAG_COMPILER 43561d54945dSmrg 43571d54945dSmrg 435822663e35Smrg# _LT_COMPILER_BOILERPLATE 435922663e35Smrg# ------------------------ 436022663e35Smrg# Check for compiler boilerplate output or warnings with 436122663e35Smrg# the simple compiler test code. 436222663e35Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 436322663e35Smrg[m4_require([_LT_DECL_SED])dnl 436422663e35Smrgac_outfile=conftest.$ac_objext 436522663e35Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 436622663e35Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 436722663e35Smrg_lt_compiler_boilerplate=`cat conftest.err` 436822663e35Smrg$RM conftest* 436922663e35Smrg])# _LT_COMPILER_BOILERPLATE 43701d54945dSmrg 43711d54945dSmrg 437222663e35Smrg# _LT_LINKER_BOILERPLATE 437322663e35Smrg# ---------------------- 437422663e35Smrg# Check for linker boilerplate output or warnings with 437522663e35Smrg# the simple link test code. 437622663e35Smrgm4_defun([_LT_LINKER_BOILERPLATE], 437722663e35Smrg[m4_require([_LT_DECL_SED])dnl 437822663e35Smrgac_outfile=conftest.$ac_objext 437922663e35Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 438022663e35Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 438122663e35Smrg_lt_linker_boilerplate=`cat conftest.err` 438222663e35Smrg$RM -r conftest* 438322663e35Smrg])# _LT_LINKER_BOILERPLATE 438422663e35Smrg 438522663e35Smrg# _LT_REQUIRED_DARWIN_CHECKS 438622663e35Smrg# ------------------------- 438722663e35Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 438822663e35Smrg case $host_os in 438922663e35Smrg rhapsody* | darwin*) 439022663e35Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 439122663e35Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 439222663e35Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 439322663e35Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 439422663e35Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 439522663e35Smrg _LT_DECL([], [DSYMUTIL], [1], 439622663e35Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 439722663e35Smrg _LT_DECL([], [NMEDIT], [1], 439822663e35Smrg [Tool to change global to local symbols on Mac OS X]) 439922663e35Smrg _LT_DECL([], [LIPO], [1], 440022663e35Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 440122663e35Smrg _LT_DECL([], [OTOOL], [1], 440222663e35Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 440322663e35Smrg _LT_DECL([], [OTOOL64], [1], 440422663e35Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 440522663e35Smrg 440622663e35Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 440722663e35Smrg [lt_cv_apple_cc_single_mod=no 440822663e35Smrg if test -z "$LT_MULTI_MODULE"; then 440922663e35Smrg # By default we will add the -single_module flag. You can override 441022663e35Smrg # by either setting the environment variable LT_MULTI_MODULE 441122663e35Smrg # non-empty at configure time, or by adding -multi_module to the 441222663e35Smrg # link flags. 441322663e35Smrg rm -rf libconftest.dylib* 441422663e35Smrg echo "int foo(void){return 1;}" > conftest.c 441522663e35Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 441622663e35Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 441722663e35Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 441822663e35Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 441922663e35Smrg _lt_result=$? 442022663e35Smrg # If there is a non-empty error log, and "single_module" 442122663e35Smrg # appears in it, assume the flag caused a linker warning 442222663e35Smrg if test -s conftest.err && $GREP single_module conftest.err; then 442322663e35Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 442422663e35Smrg # Otherwise, if the output was created with a 0 exit code from 442522663e35Smrg # the compiler, it worked. 442622663e35Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 442722663e35Smrg lt_cv_apple_cc_single_mod=yes 442822663e35Smrg else 442922663e35Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 443022663e35Smrg fi 443122663e35Smrg rm -rf libconftest.dylib* 443222663e35Smrg rm -f conftest.* 443322663e35Smrg fi]) 443422663e35Smrg 443522663e35Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 443622663e35Smrg [lt_cv_ld_exported_symbols_list], 443722663e35Smrg [lt_cv_ld_exported_symbols_list=no 443822663e35Smrg save_LDFLAGS=$LDFLAGS 443922663e35Smrg echo "_main" > conftest.sym 444022663e35Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 444122663e35Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 444222663e35Smrg [lt_cv_ld_exported_symbols_list=yes], 444322663e35Smrg [lt_cv_ld_exported_symbols_list=no]) 444422663e35Smrg LDFLAGS=$save_LDFLAGS 444522663e35Smrg ]) 444622663e35Smrg 444722663e35Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 444822663e35Smrg [lt_cv_ld_force_load=no 444922663e35Smrg cat > conftest.c << _LT_EOF 445022663e35Smrgint forced_loaded() { return 2;} 445122663e35Smrg_LT_EOF 445222663e35Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 445322663e35Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 445422663e35Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 445522663e35Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 445622663e35Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 445722663e35Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 445822663e35Smrg cat > conftest.c << _LT_EOF 445922663e35Smrgint main() { return 0;} 446022663e35Smrg_LT_EOF 446122663e35Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 446222663e35Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 446322663e35Smrg _lt_result=$? 446422663e35Smrg if test -s conftest.err && $GREP force_load conftest.err; then 446522663e35Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 446622663e35Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 446722663e35Smrg lt_cv_ld_force_load=yes 4468d769e936Smrg else 446922663e35Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4470d769e936Smrg fi 447122663e35Smrg rm -f conftest.err libconftest.a conftest conftest.c 447222663e35Smrg rm -rf conftest.dSYM 447322663e35Smrg ]) 447422663e35Smrg case $host_os in 447522663e35Smrg rhapsody* | darwin1.[[012]]) 447622663e35Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 447722663e35Smrg darwin1.*) 447822663e35Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 447922663e35Smrg darwin*) 448022663e35Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 448122663e35Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 448222663e35Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 448322663e35Smrg *) 448422663e35Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 448522663e35Smrg esac 448622663e35Smrg ;; 448722663e35Smrg esac 448822663e35Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 448922663e35Smrg _lt_dar_single_mod='$single_module' 449022663e35Smrg fi 449122663e35Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 449222663e35Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 449322663e35Smrg else 449422663e35Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 449522663e35Smrg fi 449622663e35Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 449722663e35Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 449822663e35Smrg else 449922663e35Smrg _lt_dsymutil= 450022663e35Smrg fi 450122663e35Smrg ;; 450222663e35Smrg esac 450322663e35Smrg]) 450422663e35Smrg 450522663e35Smrg 450622663e35Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 450722663e35Smrg# --------------------------------- 450822663e35Smrg# Checks for linker and compiler features on darwin 450922663e35Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 451022663e35Smrg[ 451122663e35Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 451222663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 451322663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=no 451422663e35Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 451522663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 451622663e35Smrg if test yes = "$lt_cv_ld_force_load"; then 451722663e35Smrg _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\"`' 451822663e35Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 451922663e35Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 452022663e35Smrg else 452122663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 452222663e35Smrg fi 452322663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 452422663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 452522663e35Smrg case $cc_basename in 452622663e35Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 452722663e35Smrg *) _lt_dar_can_shared=$GCC ;; 452822663e35Smrg esac 452922663e35Smrg if test yes = "$_lt_dar_can_shared"; then 453022663e35Smrg output_verbose_link_cmd=func_echo_all 453122663e35Smrg _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" 453222663e35Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 453322663e35Smrg _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" 453422663e35Smrg _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" 453522663e35Smrg m4_if([$1], [CXX], 453622663e35Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 453722663e35Smrg _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" 453822663e35Smrg _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" 453922663e35Smrg fi 454022663e35Smrg],[]) 454122663e35Smrg else 454222663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 454322663e35Smrg fi 454422663e35Smrg]) 45451d54945dSmrg 454622663e35Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 454722663e35Smrg# ---------------------------------- 454822663e35Smrg# Links a minimal program and checks the executable 454922663e35Smrg# for the system default hardcoded library path. In most cases, 455022663e35Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 455122663e35Smrg# the location of the communication and MPI libs are included too. 455222663e35Smrg# If we don't find anything, use the default library path according 455322663e35Smrg# to the aix ld manual. 455422663e35Smrg# Store the results from the different compilers for each TAGNAME. 455522663e35Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 455622663e35Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 455722663e35Smrg[m4_require([_LT_DECL_SED])dnl 455822663e35Smrgif test set = "${lt_cv_aix_libpath+set}"; then 455922663e35Smrg aix_libpath=$lt_cv_aix_libpath 456022663e35Smrgelse 456122663e35Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 456222663e35Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 456322663e35Smrg lt_aix_libpath_sed='[ 456422663e35Smrg /Import File Strings/,/^$/ { 456522663e35Smrg /^0/ { 456622663e35Smrg s/^0 *\([^ ]*\) *$/\1/ 456722663e35Smrg p 456822663e35Smrg } 456922663e35Smrg }]' 457022663e35Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 457122663e35Smrg # Check for a 64-bit object if we didn't find anything. 457222663e35Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 457322663e35Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 457422663e35Smrg fi],[]) 457522663e35Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 457622663e35Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 457722663e35Smrg fi 457822663e35Smrg ]) 457922663e35Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 458022663e35Smrgfi 458122663e35Smrg])# _LT_SYS_MODULE_PATH_AIX 45821d54945dSmrg 45831d54945dSmrg 458422663e35Smrg# _LT_SHELL_INIT(ARG) 458522663e35Smrg# ------------------- 458622663e35Smrgm4_define([_LT_SHELL_INIT], 458722663e35Smrg[m4_divert_text([M4SH-INIT], [$1 458822663e35Smrg])])# _LT_SHELL_INIT 45891d54945dSmrg 45901d54945dSmrg 45911d54945dSmrg 459222663e35Smrg# _LT_PROG_ECHO_BACKSLASH 459322663e35Smrg# ----------------------- 459422663e35Smrg# Find how we can fake an echo command that does not interpret backslash. 459522663e35Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 459622663e35Smrg# of the generated configure script that will find a shell with a builtin 459722663e35Smrg# printf (that we can use as an echo command). 459822663e35Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 459922663e35Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 460022663e35SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 460122663e35SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 46021d54945dSmrg 460322663e35SmrgAC_MSG_CHECKING([how to print strings]) 460422663e35Smrg# Test print first, because it will be a builtin if present. 460522663e35Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 460622663e35Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 460722663e35Smrg ECHO='print -r --' 460822663e35Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 460922663e35Smrg ECHO='printf %s\n' 461022663e35Smrgelse 461122663e35Smrg # Use this function as a fallback that always works. 461222663e35Smrg func_fallback_echo () 461322663e35Smrg { 461422663e35Smrg eval 'cat <<_LTECHO_EOF 461522663e35Smrg$[]1 461622663e35Smrg_LTECHO_EOF' 461722663e35Smrg } 461822663e35Smrg ECHO='func_fallback_echo' 461922663e35Smrgfi 46207322289dSmrg 462122663e35Smrg# func_echo_all arg... 462222663e35Smrg# Invoke $ECHO with all args, space-separated. 462322663e35Smrgfunc_echo_all () 462422663e35Smrg{ 462522663e35Smrg $ECHO "$*" 462622663e35Smrg} 46271d54945dSmrg 462822663e35Smrgcase $ECHO in 462922663e35Smrg printf*) AC_MSG_RESULT([printf]) ;; 463022663e35Smrg print*) AC_MSG_RESULT([print -r]) ;; 463122663e35Smrg *) AC_MSG_RESULT([cat]) ;; 463222663e35Smrgesac 46331d54945dSmrg 463422663e35Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 463522663e35Smrg[_AS_DETECT_SUGGESTED([ 463622663e35Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 463722663e35Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 463822663e35Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 463922663e35Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 464022663e35Smrg PATH=/empty FPATH=/empty; export PATH FPATH 464122663e35Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 464222663e35Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 46431d54945dSmrg 464422663e35Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 464522663e35Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 464622663e35Smrg])# _LT_PROG_ECHO_BACKSLASH 46471d54945dSmrg 46481d54945dSmrg 464922663e35Smrg# _LT_WITH_SYSROOT 465022663e35Smrg# ---------------- 465122663e35SmrgAC_DEFUN([_LT_WITH_SYSROOT], 465222663e35Smrg[m4_require([_LT_DECL_SED])dnl 465322663e35SmrgAC_MSG_CHECKING([for sysroot]) 465422663e35SmrgAC_ARG_WITH([sysroot], 465522663e35Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 465622663e35Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 465722663e35Smrg if not specified).])], 465822663e35Smrg[], [with_sysroot=no]) 46591d54945dSmrg 466022663e35Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 466122663e35Smrgdnl in case the user passed a directory name. 466222663e35Smrglt_sysroot= 466322663e35Smrgcase $with_sysroot in #( 466422663e35Smrg yes) 466522663e35Smrg if test yes = "$GCC"; then 466622663e35Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 466722663e35Smrg fi 466822663e35Smrg ;; #( 466922663e35Smrg /*) 467022663e35Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 467122663e35Smrg ;; #( 467222663e35Smrg no|'') 467322663e35Smrg ;; #( 467422663e35Smrg *) 467522663e35Smrg AC_MSG_RESULT([$with_sysroot]) 467622663e35Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 467722663e35Smrg ;; 467822663e35Smrgesac 46791d54945dSmrg 468022663e35Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 468122663e35Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 468222663e35Smrg[dependent libraries, and where our libraries should be installed.])]) 46831d54945dSmrg 468422663e35Smrg# _LT_ENABLE_LOCK 468522663e35Smrg# --------------- 468622663e35Smrgm4_defun([_LT_ENABLE_LOCK], 468722663e35Smrg[AC_ARG_ENABLE([libtool-lock], 468822663e35Smrg [AS_HELP_STRING([--disable-libtool-lock], 468922663e35Smrg [avoid locking (might break parallel builds)])]) 469022663e35Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 469122663e35Smrg 469222663e35Smrg# Some flags need to be propagated to the compiler or linker for good 469322663e35Smrg# libtool support. 469422663e35Smrgcase $host in 469522663e35Smrgia64-*-hpux*) 469622663e35Smrg # Find out what ABI is being produced by ac_compile, and set mode 469722663e35Smrg # options accordingly. 469822663e35Smrg echo 'int i;' > conftest.$ac_ext 469922663e35Smrg if AC_TRY_EVAL(ac_compile); then 470022663e35Smrg case `$FILECMD conftest.$ac_objext` in 470122663e35Smrg *ELF-32*) 470222663e35Smrg HPUX_IA64_MODE=32 470322663e35Smrg ;; 470422663e35Smrg *ELF-64*) 470522663e35Smrg HPUX_IA64_MODE=64 470622663e35Smrg ;; 470722663e35Smrg esac 470822663e35Smrg fi 470922663e35Smrg rm -rf conftest* 471022663e35Smrg ;; 471122663e35Smrg*-*-irix6*) 471222663e35Smrg # Find out what ABI is being produced by ac_compile, and set linker 471322663e35Smrg # options accordingly. 471422663e35Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 471522663e35Smrg if AC_TRY_EVAL(ac_compile); then 471622663e35Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 471722663e35Smrg case `$FILECMD conftest.$ac_objext` in 471822663e35Smrg *32-bit*) 471922663e35Smrg LD="${LD-ld} -melf32bsmip" 4720d769e936Smrg ;; 472122663e35Smrg *N32*) 472222663e35Smrg LD="${LD-ld} -melf32bmipn32" 472322663e35Smrg ;; 472422663e35Smrg *64-bit*) 472522663e35Smrg LD="${LD-ld} -melf64bmip" 472622663e35Smrg ;; 472722663e35Smrg esac 472822663e35Smrg else 472922663e35Smrg case `$FILECMD conftest.$ac_objext` in 473022663e35Smrg *32-bit*) 473122663e35Smrg LD="${LD-ld} -32" 473222663e35Smrg ;; 473322663e35Smrg *N32*) 473422663e35Smrg LD="${LD-ld} -n32" 4735d769e936Smrg ;; 473622663e35Smrg *64-bit*) 473722663e35Smrg LD="${LD-ld} -64" 473822663e35Smrg ;; 473922663e35Smrg esac 474022663e35Smrg fi 474122663e35Smrg fi 474222663e35Smrg rm -rf conftest* 474322663e35Smrg ;; 474422663e35Smrg 474522663e35Smrgmips64*-*linux*) 474622663e35Smrg # Find out what ABI is being produced by ac_compile, and set linker 474722663e35Smrg # options accordingly. 474822663e35Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 474922663e35Smrg if AC_TRY_EVAL(ac_compile); then 475022663e35Smrg emul=elf 475122663e35Smrg case `$FILECMD conftest.$ac_objext` in 475222663e35Smrg *32-bit*) 475322663e35Smrg emul="${emul}32" 475422663e35Smrg ;; 475522663e35Smrg *64-bit*) 475622663e35Smrg emul="${emul}64" 475722663e35Smrg ;; 475822663e35Smrg esac 475922663e35Smrg case `$FILECMD conftest.$ac_objext` in 476022663e35Smrg *MSB*) 476122663e35Smrg emul="${emul}btsmip" 476222663e35Smrg ;; 476322663e35Smrg *LSB*) 476422663e35Smrg emul="${emul}ltsmip" 476522663e35Smrg ;; 476622663e35Smrg esac 476722663e35Smrg case `$FILECMD conftest.$ac_objext` in 476822663e35Smrg *N32*) 476922663e35Smrg emul="${emul}n32" 477022663e35Smrg ;; 477122663e35Smrg esac 477222663e35Smrg LD="${LD-ld} -m $emul" 477322663e35Smrg fi 477422663e35Smrg rm -rf conftest* 477522663e35Smrg ;; 477622663e35Smrg 477722663e35Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 477822663e35Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 477922663e35Smrg # Find out what ABI is being produced by ac_compile, and set linker 478022663e35Smrg # options accordingly. Note that the listed cases only cover the 478122663e35Smrg # situations where additional linker options are needed (such as when 478222663e35Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 478322663e35Smrg # vice versa); the common cases where no linker options are needed do 478422663e35Smrg # not appear in the list. 478522663e35Smrg echo 'int i;' > conftest.$ac_ext 478622663e35Smrg if AC_TRY_EVAL(ac_compile); then 478722663e35Smrg case `$FILECMD conftest.o` in 478822663e35Smrg *32-bit*) 478922663e35Smrg case $host in 479022663e35Smrg x86_64-*kfreebsd*-gnu) 479122663e35Smrg LD="${LD-ld} -m elf_i386_fbsd" 479222663e35Smrg ;; 479322663e35Smrg x86_64-*linux*) 479422663e35Smrg case `$FILECMD conftest.o` in 479522663e35Smrg *x86-64*) 479622663e35Smrg LD="${LD-ld} -m elf32_x86_64" 479722663e35Smrg ;; 479822663e35Smrg *) 479922663e35Smrg LD="${LD-ld} -m elf_i386" 480022663e35Smrg ;; 480122663e35Smrg esac 480222663e35Smrg ;; 480322663e35Smrg powerpc64le-*linux*) 480422663e35Smrg LD="${LD-ld} -m elf32lppclinux" 480522663e35Smrg ;; 480622663e35Smrg powerpc64-*linux*) 480722663e35Smrg LD="${LD-ld} -m elf32ppclinux" 480822663e35Smrg ;; 480922663e35Smrg s390x-*linux*) 481022663e35Smrg LD="${LD-ld} -m elf_s390" 481122663e35Smrg ;; 481222663e35Smrg sparc64-*linux*) 481322663e35Smrg LD="${LD-ld} -m elf32_sparc" 481422663e35Smrg ;; 481522663e35Smrg esac 481622663e35Smrg ;; 481722663e35Smrg *64-bit*) 481822663e35Smrg case $host in 481922663e35Smrg x86_64-*kfreebsd*-gnu) 482022663e35Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 482122663e35Smrg ;; 482222663e35Smrg x86_64-*linux*) 482322663e35Smrg LD="${LD-ld} -m elf_x86_64" 482422663e35Smrg ;; 482522663e35Smrg powerpcle-*linux*) 482622663e35Smrg LD="${LD-ld} -m elf64lppc" 482722663e35Smrg ;; 482822663e35Smrg powerpc-*linux*) 482922663e35Smrg LD="${LD-ld} -m elf64ppc" 483022663e35Smrg ;; 483122663e35Smrg s390*-*linux*|s390*-*tpf*) 483222663e35Smrg LD="${LD-ld} -m elf64_s390" 483322663e35Smrg ;; 483422663e35Smrg sparc*-*linux*) 483522663e35Smrg LD="${LD-ld} -m elf64_sparc" 483622663e35Smrg ;; 4837d769e936Smrg esac 483822663e35Smrg ;; 483922663e35Smrg esac 484022663e35Smrg fi 484122663e35Smrg rm -rf conftest* 484222663e35Smrg ;; 484322663e35Smrg 484422663e35Smrg*-*-sco3.2v5*) 484522663e35Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 484622663e35Smrg SAVE_CFLAGS=$CFLAGS 484722663e35Smrg CFLAGS="$CFLAGS -belf" 484822663e35Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 484922663e35Smrg [AC_LANG_PUSH(C) 485022663e35Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 485122663e35Smrg AC_LANG_POP]) 485222663e35Smrg if test yes != "$lt_cv_cc_needs_belf"; then 485322663e35Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 485422663e35Smrg CFLAGS=$SAVE_CFLAGS 485522663e35Smrg fi 485622663e35Smrg ;; 485722663e35Smrg*-*solaris*) 485822663e35Smrg # Find out what ABI is being produced by ac_compile, and set linker 485922663e35Smrg # options accordingly. 486022663e35Smrg echo 'int i;' > conftest.$ac_ext 486122663e35Smrg if AC_TRY_EVAL(ac_compile); then 486222663e35Smrg case `$FILECMD conftest.o` in 486322663e35Smrg *64-bit*) 486422663e35Smrg case $lt_cv_prog_gnu_ld in 486522663e35Smrg yes*) 486622663e35Smrg case $host in 486722663e35Smrg i?86-*-solaris*|x86_64-*-solaris*) 486822663e35Smrg LD="${LD-ld} -m elf_x86_64" 486922663e35Smrg ;; 487022663e35Smrg sparc*-*-solaris*) 487122663e35Smrg LD="${LD-ld} -m elf64_sparc" 487222663e35Smrg ;; 487322663e35Smrg esac 487422663e35Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 487522663e35Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 487622663e35Smrg LD=${LD-ld}_sol2 487722663e35Smrg fi 487822663e35Smrg ;; 4879d769e936Smrg *) 488022663e35Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 488122663e35Smrg LD="${LD-ld} -64" 4882d769e936Smrg fi 4883d769e936Smrg ;; 4884d769e936Smrg esac 4885d769e936Smrg ;; 488622663e35Smrg esac 488722663e35Smrg fi 488822663e35Smrg rm -rf conftest* 488922663e35Smrg ;; 489022663e35Smrgesac 48911d54945dSmrg 489222663e35Smrgneed_locks=$enable_libtool_lock 489322663e35Smrg])# _LT_ENABLE_LOCK 48941d54945dSmrg 48951d54945dSmrg 489622663e35Smrg# _LT_PROG_AR 489722663e35Smrg# ----------- 489822663e35Smrgm4_defun([_LT_PROG_AR], 489922663e35Smrg[AC_CHECK_TOOLS(AR, [ar], false) 490022663e35Smrg: ${AR=ar} 490122663e35Smrg_LT_DECL([], [AR], [1], [The archiver]) 49021d54945dSmrg 490322663e35Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 490422663e35Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 490522663e35Smrg# higher priority because thats what people were doing historically (setting 490622663e35Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 490722663e35Smrg# variable obsoleted/removed. 49081d54945dSmrg 490922663e35Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 491022663e35Smrglt_ar_flags=$AR_FLAGS 491122663e35Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 49121d54945dSmrg 491322663e35Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 491422663e35Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 491522663e35Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 491622663e35Smrg [Flags to create an archive]) 491722663e35Smrg 491822663e35SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 491922663e35Smrg [lt_cv_ar_at_file=no 492022663e35Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 492122663e35Smrg [echo conftest.$ac_objext > conftest.lst 492222663e35Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 492322663e35Smrg AC_TRY_EVAL([lt_ar_try]) 492422663e35Smrg if test 0 -eq "$ac_status"; then 492522663e35Smrg # Ensure the archiver fails upon bogus file names. 492622663e35Smrg rm -f conftest.$ac_objext libconftest.a 492722663e35Smrg AC_TRY_EVAL([lt_ar_try]) 492822663e35Smrg if test 0 -ne "$ac_status"; then 492922663e35Smrg lt_cv_ar_at_file=@ 493022663e35Smrg fi 4931d769e936Smrg fi 493222663e35Smrg rm -f conftest.* libconftest.a 493322663e35Smrg ]) 493422663e35Smrg ]) 49351d54945dSmrg 493622663e35Smrgif test no = "$lt_cv_ar_at_file"; then 493722663e35Smrg archiver_list_spec= 493822663e35Smrgelse 493922663e35Smrg archiver_list_spec=$lt_cv_ar_at_file 494022663e35Smrgfi 494122663e35Smrg_LT_DECL([], [archiver_list_spec], [1], 494222663e35Smrg [How to feed a file listing to the archiver]) 494322663e35Smrg])# _LT_PROG_AR 49441d54945dSmrg 49451d54945dSmrg 494622663e35Smrg# _LT_CMD_OLD_ARCHIVE 494722663e35Smrg# ------------------- 494822663e35Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 494922663e35Smrg[_LT_PROG_AR 49501d54945dSmrg 495122663e35SmrgAC_CHECK_TOOL(STRIP, strip, :) 495222663e35Smrgtest -z "$STRIP" && STRIP=: 495322663e35Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 49541d54945dSmrg 495522663e35SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 495622663e35Smrgtest -z "$RANLIB" && RANLIB=: 495722663e35Smrg_LT_DECL([], [RANLIB], [1], 495822663e35Smrg [Commands used to install an old-style archive]) 495922663e35Smrg 496022663e35Smrg# Determine commands to create old-style static archives. 496122663e35Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 496222663e35Smrgold_postinstall_cmds='chmod 644 $oldlib' 496322663e35Smrgold_postuninstall_cmds= 496422663e35Smrg 496522663e35Smrgif test -n "$RANLIB"; then 496622663e35Smrg case $host_os in 496722663e35Smrg bitrig* | openbsd*) 496822663e35Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 496922663e35Smrg ;; 497022663e35Smrg *) 497122663e35Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 497222663e35Smrg ;; 497322663e35Smrg esac 497422663e35Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 497522663e35Smrgfi 497622663e35Smrg 497722663e35Smrgcase $host_os in 497822663e35Smrg darwin*) 497922663e35Smrg lock_old_archive_extraction=yes ;; 498022663e35Smrg *) 498122663e35Smrg lock_old_archive_extraction=no ;; 498222663e35Smrgesac 498322663e35Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 498422663e35Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 498522663e35Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 498622663e35Smrg [Commands used to build an old-style archive]) 498722663e35Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 498822663e35Smrg [Whether to use a lock for old archive extraction]) 498922663e35Smrg])# _LT_CMD_OLD_ARCHIVE 499022663e35Smrg 499122663e35Smrg 499222663e35Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 499322663e35Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 499422663e35Smrg# ---------------------------------------------------------------- 499522663e35Smrg# Check whether the given compiler option works 499622663e35SmrgAC_DEFUN([_LT_COMPILER_OPTION], 499722663e35Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 499822663e35Smrgm4_require([_LT_DECL_SED])dnl 499922663e35SmrgAC_CACHE_CHECK([$1], [$2], 500022663e35Smrg [$2=no 500122663e35Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 500222663e35Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 500322663e35Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 500422663e35Smrg # Insert the option either (1) after the last *FLAGS variable, or 500522663e35Smrg # (2) before a word containing "conftest.", or (3) at the end. 500622663e35Smrg # Note that $ac_compile itself does not contain backslashes and begins 500722663e35Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 500822663e35Smrg # The option is referenced via a variable to avoid confusing sed. 500922663e35Smrg lt_compile=`echo "$ac_compile" | $SED \ 501022663e35Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 501122663e35Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 501222663e35Smrg -e 's:$: $lt_compiler_flag:'` 501322663e35Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 501422663e35Smrg (eval "$lt_compile" 2>conftest.err) 501522663e35Smrg ac_status=$? 501622663e35Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 501722663e35Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 501822663e35Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 501922663e35Smrg # The compiler can only warn and ignore the option if not recognized 502022663e35Smrg # So say no if there are warnings other than the usual output. 502122663e35Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 502222663e35Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 502322663e35Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 502422663e35Smrg $2=yes 502522663e35Smrg fi 502622663e35Smrg fi 502722663e35Smrg $RM conftest* 5028d769e936Smrg]) 50291d54945dSmrg 503022663e35Smrgif test yes = "[$]$2"; then 503122663e35Smrg m4_if([$5], , :, [$5]) 503222663e35Smrgelse 503322663e35Smrg m4_if([$6], , :, [$6]) 503422663e35Smrgfi 503522663e35Smrg])# _LT_COMPILER_OPTION 50361d54945dSmrg 503722663e35Smrg# Old name: 503822663e35SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 503922663e35Smrgdnl aclocal-1.4 backwards compatibility: 504022663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 5041d769e936Smrg 50421d54945dSmrg 504322663e35Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 504422663e35Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 504522663e35Smrg# ---------------------------------------------------- 504622663e35Smrg# Check whether the given linker option works 504722663e35SmrgAC_DEFUN([_LT_LINKER_OPTION], 504822663e35Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 504922663e35Smrgm4_require([_LT_DECL_SED])dnl 505022663e35SmrgAC_CACHE_CHECK([$1], [$2], 505122663e35Smrg [$2=no 505222663e35Smrg save_LDFLAGS=$LDFLAGS 505322663e35Smrg LDFLAGS="$LDFLAGS $3" 505422663e35Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 505522663e35Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 505622663e35Smrg # The linker can only warn and ignore the option if not recognized 505722663e35Smrg # So say no if there are warnings 505822663e35Smrg if test -s conftest.err; then 505922663e35Smrg # Append any errors to the config.log. 506022663e35Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 506122663e35Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 506222663e35Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 506322663e35Smrg if diff conftest.exp conftest.er2 >/dev/null; then 506422663e35Smrg $2=yes 506522663e35Smrg fi 506622663e35Smrg else 506722663e35Smrg $2=yes 506822663e35Smrg fi 506922663e35Smrg fi 507022663e35Smrg $RM -r conftest* 507122663e35Smrg LDFLAGS=$save_LDFLAGS 507222663e35Smrg]) 5073d769e936Smrg 507422663e35Smrgif test yes = "[$]$2"; then 507522663e35Smrg m4_if([$4], , :, [$4]) 507622663e35Smrgelse 507722663e35Smrg m4_if([$5], , :, [$5]) 507822663e35Smrgfi 507922663e35Smrg])# _LT_LINKER_OPTION 5080d769e936Smrg 508122663e35Smrg# Old name: 508222663e35SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 508322663e35Smrgdnl aclocal-1.4 backwards compatibility: 508422663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 50851d54945dSmrg 50861d54945dSmrg 508722663e35Smrg# LT_CMD_MAX_LEN 508822663e35Smrg#--------------- 508922663e35SmrgAC_DEFUN([LT_CMD_MAX_LEN], 509022663e35Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 509122663e35Smrg# find the maximum length of command line arguments 509222663e35SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 509322663e35SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 509422663e35Smrg i=0 509522663e35Smrg teststring=ABCD 50961d54945dSmrg 509722663e35Smrg case $build_os in 509822663e35Smrg msdosdjgpp*) 509922663e35Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 510022663e35Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 510122663e35Smrg # during glob expansion). Even if it were fixed, the result of this 510222663e35Smrg # check would be larger than it should be. 510322663e35Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 510422663e35Smrg ;; 5105786a6f21Smrg 510622663e35Smrg gnu*) 510722663e35Smrg # Under GNU Hurd, this test is not required because there is 510822663e35Smrg # no limit to the length of command line arguments. 510922663e35Smrg # Libtool will interpret -1 as no limit whatsoever 511022663e35Smrg lt_cv_sys_max_cmd_len=-1; 511122663e35Smrg ;; 5112786a6f21Smrg 511322663e35Smrg cygwin* | mingw* | cegcc*) 511422663e35Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 511522663e35Smrg # about 5 minutes as the teststring grows exponentially. 511622663e35Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 511722663e35Smrg # you end up with a "frozen" computer, even though with patience 511822663e35Smrg # the test eventually succeeds (with a max line length of 256k). 511922663e35Smrg # Instead, let's just punt: use the minimum linelength reported by 512022663e35Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 512122663e35Smrg lt_cv_sys_max_cmd_len=8192; 512222663e35Smrg ;; 5123786a6f21Smrg 512422663e35Smrg mint*) 512522663e35Smrg # On MiNT this can take a long time and run out of memory. 512622663e35Smrg lt_cv_sys_max_cmd_len=8192; 512722663e35Smrg ;; 5128786a6f21Smrg 512922663e35Smrg amigaos*) 513022663e35Smrg # On AmigaOS with pdksh, this test takes hours, literally. 513122663e35Smrg # So we just punt and use a minimum line length of 8192. 513222663e35Smrg lt_cv_sys_max_cmd_len=8192; 513322663e35Smrg ;; 5134d769e936Smrg 513522663e35Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 513622663e35Smrg # This has been around since 386BSD, at least. Likely further. 513722663e35Smrg if test -x /sbin/sysctl; then 513822663e35Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 513922663e35Smrg elif test -x /usr/sbin/sysctl; then 514022663e35Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 514122663e35Smrg else 514222663e35Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 514322663e35Smrg fi 514422663e35Smrg # And add a safety zone 514522663e35Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 514622663e35Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 514722663e35Smrg ;; 5148d769e936Smrg 514922663e35Smrg interix*) 515022663e35Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 515122663e35Smrg lt_cv_sys_max_cmd_len=196608 515222663e35Smrg ;; 5153d769e936Smrg 515422663e35Smrg os2*) 515522663e35Smrg # The test takes a long time on OS/2. 515622663e35Smrg lt_cv_sys_max_cmd_len=8192 5157d769e936Smrg ;; 5158786a6f21Smrg 515922663e35Smrg osf*) 516022663e35Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 516122663e35Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 516222663e35Smrg # nice to cause kernel panics so lets avoid the loop below. 516322663e35Smrg # First set a reasonable default. 516422663e35Smrg lt_cv_sys_max_cmd_len=16384 516522663e35Smrg # 516622663e35Smrg if test -x /sbin/sysconfig; then 516722663e35Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 516822663e35Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 51697322289dSmrg esac 5170d769e936Smrg fi 5171ec713c28Smrg ;; 517222663e35Smrg sco3.2v5*) 517322663e35Smrg lt_cv_sys_max_cmd_len=102400 517422663e35Smrg ;; 517522663e35Smrg sysv5* | sco5v6* | sysv4.2uw2*) 517622663e35Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 517722663e35Smrg if test -n "$kargmax"; then 517822663e35Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 517922663e35Smrg else 518022663e35Smrg lt_cv_sys_max_cmd_len=32768 518122663e35Smrg fi 518222663e35Smrg ;; 518322663e35Smrg *) 518422663e35Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 518522663e35Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 518622663e35Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 518722663e35Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 518822663e35Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 518922663e35Smrg else 519022663e35Smrg # Make teststring a little bigger before we do anything with it. 519122663e35Smrg # a 1K string should be a reasonable start. 519222663e35Smrg for i in 1 2 3 4 5 6 7 8; do 519322663e35Smrg teststring=$teststring$teststring 519422663e35Smrg done 519522663e35Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 519622663e35Smrg # If test is not a shell built-in, we'll probably end up computing a 519722663e35Smrg # maximum length that is only half of the actual maximum length, but 519822663e35Smrg # we can't tell. 519922663e35Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 520022663e35Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 520122663e35Smrg test 17 != "$i" # 1/2 MB should be enough 520222663e35Smrg do 520322663e35Smrg i=`expr $i + 1` 520422663e35Smrg teststring=$teststring$teststring 520522663e35Smrg done 520622663e35Smrg # Only check the string length outside the loop. 520722663e35Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 520822663e35Smrg teststring= 520922663e35Smrg # Add a significant safety factor because C++ compilers can tack on 521022663e35Smrg # massive amounts of additional arguments before passing them to the 521122663e35Smrg # linker. It appears as though 1/2 is a usable value. 521222663e35Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 521322663e35Smrg fi 521422663e35Smrg ;; 5215ec713c28Smrg esac 521622663e35Smrg]) 521722663e35Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 521822663e35Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 521922663e35Smrgelse 522022663e35Smrg AC_MSG_RESULT(none) 522122663e35Smrgfi 522222663e35Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 522322663e35Smrg_LT_DECL([], [max_cmd_len], [0], 522422663e35Smrg [What is the maximum length of a command?]) 522522663e35Smrg])# LT_CMD_MAX_LEN 5226786a6f21Smrg 522722663e35Smrg# Old name: 522822663e35SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 522922663e35Smrgdnl aclocal-1.4 backwards compatibility: 523022663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 52311d54945dSmrg 5232786a6f21Smrg 523322663e35Smrg# _LT_HEADER_DLFCN 523422663e35Smrg# ---------------- 523522663e35Smrgm4_defun([_LT_HEADER_DLFCN], 523622663e35Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 523722663e35Smrg])# _LT_HEADER_DLFCN 5238786a6f21Smrg 5239786a6f21Smrg 524022663e35Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 524122663e35Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 524222663e35Smrg# ---------------------------------------------------------------- 524322663e35Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 524422663e35Smrg[m4_require([_LT_HEADER_DLFCN])dnl 524522663e35Smrgif test yes = "$cross_compiling"; then : 524622663e35Smrg [$4] 524722663e35Smrgelse 524822663e35Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 524922663e35Smrg lt_status=$lt_dlunknown 525022663e35Smrg cat > conftest.$ac_ext <<_LT_EOF 525122663e35Smrg[#line $LINENO "configure" 525222663e35Smrg#include "confdefs.h" 5253786a6f21Smrg 525422663e35Smrg#if HAVE_DLFCN_H 525522663e35Smrg#include <dlfcn.h> 525622663e35Smrg#endif 52571d54945dSmrg 525822663e35Smrg#include <stdio.h> 5259d769e936Smrg 526022663e35Smrg#ifdef RTLD_GLOBAL 526122663e35Smrg# define LT_DLGLOBAL RTLD_GLOBAL 526222663e35Smrg#else 526322663e35Smrg# ifdef DL_GLOBAL 526422663e35Smrg# define LT_DLGLOBAL DL_GLOBAL 526522663e35Smrg# else 526622663e35Smrg# define LT_DLGLOBAL 0 526722663e35Smrg# endif 526822663e35Smrg#endif 5269d769e936Smrg 527022663e35Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 527122663e35Smrg find out it does not work in some platform. */ 527222663e35Smrg#ifndef LT_DLLAZY_OR_NOW 527322663e35Smrg# ifdef RTLD_LAZY 527422663e35Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 527522663e35Smrg# else 527622663e35Smrg# ifdef DL_LAZY 527722663e35Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 527822663e35Smrg# else 527922663e35Smrg# ifdef RTLD_NOW 528022663e35Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 528122663e35Smrg# else 528222663e35Smrg# ifdef DL_NOW 528322663e35Smrg# define LT_DLLAZY_OR_NOW DL_NOW 528422663e35Smrg# else 528522663e35Smrg# define LT_DLLAZY_OR_NOW 0 528622663e35Smrg# endif 528722663e35Smrg# endif 528822663e35Smrg# endif 528922663e35Smrg# endif 529022663e35Smrg#endif 5291d769e936Smrg 529222663e35Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 529322663e35Smrg correspondingly for the symbols needed. */ 529422663e35Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 529522663e35Smrgint fnord () __attribute__((visibility("default"))); 529622663e35Smrg#endif 5297d769e936Smrg 529822663e35Smrgint fnord () { return 42; } 529922663e35Smrgint main () 530022663e35Smrg{ 530122663e35Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 530222663e35Smrg int status = $lt_dlunknown; 5303d769e936Smrg 530422663e35Smrg if (self) 530522663e35Smrg { 530622663e35Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 530722663e35Smrg else 530822663e35Smrg { 530922663e35Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 531022663e35Smrg else puts (dlerror ()); 531122663e35Smrg } 531222663e35Smrg /* dlclose (self); */ 531322663e35Smrg } 5314d769e936Smrg else 531522663e35Smrg puts (dlerror ()); 531622663e35Smrg 531722663e35Smrg return status; 531822663e35Smrg}] 531922663e35Smrg_LT_EOF 532022663e35Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 532122663e35Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 532222663e35Smrg lt_status=$? 532322663e35Smrg case x$lt_status in 532422663e35Smrg x$lt_dlno_uscore) $1 ;; 532522663e35Smrg x$lt_dlneed_uscore) $2 ;; 532622663e35Smrg x$lt_dlunknown|x*) $3 ;; 532722663e35Smrg esac 532822663e35Smrg else : 532922663e35Smrg # compilation failed 533022663e35Smrg $3 5331d769e936Smrg fi 533222663e35Smrgfi 533322663e35Smrgrm -fr conftest* 533422663e35Smrg])# _LT_TRY_DLOPEN_SELF 5335786a6f21Smrg 5336786a6f21Smrg 533722663e35Smrg# LT_SYS_DLOPEN_SELF 533822663e35Smrg# ------------------ 533922663e35SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 534022663e35Smrg[m4_require([_LT_HEADER_DLFCN])dnl 534122663e35Smrgif test yes != "$enable_dlopen"; then 534222663e35Smrg enable_dlopen=unknown 534322663e35Smrg enable_dlopen_self=unknown 534422663e35Smrg enable_dlopen_self_static=unknown 534522663e35Smrgelse 534622663e35Smrg lt_cv_dlopen=no 534722663e35Smrg lt_cv_dlopen_libs= 5348786a6f21Smrg 534922663e35Smrg case $host_os in 535022663e35Smrg beos*) 535122663e35Smrg lt_cv_dlopen=load_add_on 535222663e35Smrg lt_cv_dlopen_libs= 535322663e35Smrg lt_cv_dlopen_self=yes 535422663e35Smrg ;; 5355786a6f21Smrg 535622663e35Smrg mingw* | pw32* | cegcc*) 535722663e35Smrg lt_cv_dlopen=LoadLibrary 535822663e35Smrg lt_cv_dlopen_libs= 535922663e35Smrg ;; 5360786a6f21Smrg 536122663e35Smrg cygwin*) 536222663e35Smrg lt_cv_dlopen=dlopen 536322663e35Smrg lt_cv_dlopen_libs= 536422663e35Smrg ;; 5365786a6f21Smrg 536622663e35Smrg darwin*) 536722663e35Smrg # if libdl is installed we need to link against it 536822663e35Smrg AC_CHECK_LIB([dl], [dlopen], 536922663e35Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 537022663e35Smrg lt_cv_dlopen=dyld 537122663e35Smrg lt_cv_dlopen_libs= 537222663e35Smrg lt_cv_dlopen_self=yes 537322663e35Smrg ]) 537422663e35Smrg ;; 5375786a6f21Smrg 537622663e35Smrg tpf*) 537722663e35Smrg # Don't try to run any link tests for TPF. We know it's impossible 537822663e35Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 537922663e35Smrg lt_cv_dlopen=dlopen 538022663e35Smrg lt_cv_dlopen_libs= 538122663e35Smrg lt_cv_dlopen_self=no 538222663e35Smrg ;; 5383d769e936Smrg 538422663e35Smrg *) 538522663e35Smrg AC_CHECK_FUNC([shl_load], 538622663e35Smrg [lt_cv_dlopen=shl_load], 538722663e35Smrg [AC_CHECK_LIB([dld], [shl_load], 538822663e35Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 538922663e35Smrg [AC_CHECK_FUNC([dlopen], 539022663e35Smrg [lt_cv_dlopen=dlopen], 539122663e35Smrg [AC_CHECK_LIB([dl], [dlopen], 539222663e35Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 539322663e35Smrg [AC_CHECK_LIB([svld], [dlopen], 539422663e35Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 539522663e35Smrg [AC_CHECK_LIB([dld], [dld_link], 539622663e35Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 539722663e35Smrg ]) 539822663e35Smrg ]) 539922663e35Smrg ]) 540022663e35Smrg ]) 540122663e35Smrg ]) 540222663e35Smrg ;; 540322663e35Smrg esac 5404d769e936Smrg 540522663e35Smrg if test no = "$lt_cv_dlopen"; then 540622663e35Smrg enable_dlopen=no 540722663e35Smrg else 540822663e35Smrg enable_dlopen=yes 540922663e35Smrg fi 5410d769e936Smrg 541122663e35Smrg case $lt_cv_dlopen in 541222663e35Smrg dlopen) 541322663e35Smrg save_CPPFLAGS=$CPPFLAGS 541422663e35Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 54151d54945dSmrg 541622663e35Smrg save_LDFLAGS=$LDFLAGS 541722663e35Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5418d769e936Smrg 541922663e35Smrg save_LIBS=$LIBS 542022663e35Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 54211d54945dSmrg 542222663e35Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 542322663e35Smrg lt_cv_dlopen_self, [dnl 542422663e35Smrg _LT_TRY_DLOPEN_SELF( 542522663e35Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 542622663e35Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 542722663e35Smrg ]) 54281d54945dSmrg 542922663e35Smrg if test yes = "$lt_cv_dlopen_self"; then 543022663e35Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 543122663e35Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 543222663e35Smrg lt_cv_dlopen_self_static, [dnl 543322663e35Smrg _LT_TRY_DLOPEN_SELF( 543422663e35Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 543522663e35Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 543622663e35Smrg ]) 543722663e35Smrg fi 5438d769e936Smrg 543922663e35Smrg CPPFLAGS=$save_CPPFLAGS 544022663e35Smrg LDFLAGS=$save_LDFLAGS 544122663e35Smrg LIBS=$save_LIBS 544222663e35Smrg ;; 544322663e35Smrg esac 5444d769e936Smrg 544522663e35Smrg case $lt_cv_dlopen_self in 544622663e35Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 544722663e35Smrg *) enable_dlopen_self=unknown ;; 544822663e35Smrg esac 54491d54945dSmrg 545022663e35Smrg case $lt_cv_dlopen_self_static in 545122663e35Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 545222663e35Smrg *) enable_dlopen_self_static=unknown ;; 545322663e35Smrg esac 545422663e35Smrgfi 545522663e35Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 545622663e35Smrg [Whether dlopen is supported]) 545722663e35Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 545822663e35Smrg [Whether dlopen of programs is supported]) 545922663e35Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 546022663e35Smrg [Whether dlopen of statically linked programs is supported]) 546122663e35Smrg])# LT_SYS_DLOPEN_SELF 5462d769e936Smrg 546322663e35Smrg# Old name: 546422663e35SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 546522663e35Smrgdnl aclocal-1.4 backwards compatibility: 546622663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 54671d54945dSmrg 5468d769e936Smrg 546922663e35Smrg# _LT_COMPILER_C_O([TAGNAME]) 547022663e35Smrg# --------------------------- 547122663e35Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 547222663e35Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 547322663e35Smrgm4_defun([_LT_COMPILER_C_O], 547422663e35Smrg[m4_require([_LT_DECL_SED])dnl 547522663e35Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 547622663e35Smrgm4_require([_LT_TAG_COMPILER])dnl 547722663e35SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 547822663e35Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 547922663e35Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 548022663e35Smrg $RM -r conftest 2>/dev/null 548122663e35Smrg mkdir conftest 548222663e35Smrg cd conftest 548322663e35Smrg mkdir out 548422663e35Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5485d769e936Smrg 548622663e35Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 548722663e35Smrg # Insert the option either (1) after the last *FLAGS variable, or 548822663e35Smrg # (2) before a word containing "conftest.", or (3) at the end. 548922663e35Smrg # Note that $ac_compile itself does not contain backslashes and begins 549022663e35Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 549122663e35Smrg lt_compile=`echo "$ac_compile" | $SED \ 549222663e35Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 549322663e35Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 549422663e35Smrg -e 's:$: $lt_compiler_flag:'` 549522663e35Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 549622663e35Smrg (eval "$lt_compile" 2>out/conftest.err) 549722663e35Smrg ac_status=$? 549822663e35Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 549922663e35Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 550022663e35Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 550122663e35Smrg then 550222663e35Smrg # The compiler can only warn and ignore the option if not recognized 550322663e35Smrg # So say no if there are warnings 550422663e35Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 550522663e35Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 550622663e35Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 550722663e35Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 550822663e35Smrg fi 550922663e35Smrg fi 551022663e35Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 551122663e35Smrg $RM conftest* 551222663e35Smrg # SGI C++ compiler will create directory out/ii_files/ for 551322663e35Smrg # template instantiation 551422663e35Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 551522663e35Smrg $RM out/* && rmdir out 551622663e35Smrg cd .. 551722663e35Smrg $RM -r conftest 551822663e35Smrg $RM conftest* 551922663e35Smrg]) 552022663e35Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 552122663e35Smrg [Does compiler simultaneously support -c and -o options?]) 552222663e35Smrg])# _LT_COMPILER_C_O 5523d769e936Smrg 5524d769e936Smrg 552522663e35Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 552622663e35Smrg# ---------------------------------- 552722663e35Smrg# Check to see if we can do hard links to lock some files if needed 552822663e35Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 552922663e35Smrg[m4_require([_LT_ENABLE_LOCK])dnl 553022663e35Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 553122663e35Smrg_LT_COMPILER_C_O([$1]) 55327322289dSmrg 553322663e35Smrghard_links=nottested 553422663e35Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 553522663e35Smrg # do not overwrite the value of need_locks provided by the user 553622663e35Smrg AC_MSG_CHECKING([if we can lock with hard links]) 553722663e35Smrg hard_links=yes 553822663e35Smrg $RM conftest* 553922663e35Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 554022663e35Smrg touch conftest.a 554122663e35Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 554222663e35Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 554322663e35Smrg AC_MSG_RESULT([$hard_links]) 554422663e35Smrg if test no = "$hard_links"; then 554522663e35Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 554622663e35Smrg need_locks=warn 554722663e35Smrg fi 554822663e35Smrgelse 554922663e35Smrg need_locks=no 555022663e35Smrgfi 555122663e35Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 555222663e35Smrg])# _LT_COMPILER_FILE_LOCKS 5553d769e936Smrg 5554d769e936Smrg 555522663e35Smrg# _LT_CHECK_OBJDIR 555622663e35Smrg# ---------------- 555722663e35Smrgm4_defun([_LT_CHECK_OBJDIR], 555822663e35Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 555922663e35Smrg[rm -f .libs 2>/dev/null 556022663e35Smrgmkdir .libs 2>/dev/null 556122663e35Smrgif test -d .libs; then 556222663e35Smrg lt_cv_objdir=.libs 556322663e35Smrgelse 556422663e35Smrg # MS-DOS does not allow filenames that begin with a dot. 556522663e35Smrg lt_cv_objdir=_libs 556622663e35Smrgfi 556722663e35Smrgrmdir .libs 2>/dev/null]) 556822663e35Smrgobjdir=$lt_cv_objdir 556922663e35Smrg_LT_DECL([], [objdir], [0], 557022663e35Smrg [The name of the directory that contains temporary libtool files])dnl 557122663e35Smrgm4_pattern_allow([LT_OBJDIR])dnl 557222663e35SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 557322663e35Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 557422663e35Smrg])# _LT_CHECK_OBJDIR 5575d769e936Smrg 5576d769e936Smrg 557722663e35Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 557822663e35Smrg# -------------------------------------- 557922663e35Smrg# Check hardcoding attributes. 558022663e35Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 558122663e35Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 558222663e35Smrg_LT_TAGVAR(hardcode_action, $1)= 558322663e35Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 558422663e35Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 558522663e35Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 5586d769e936Smrg 558722663e35Smrg # We can hardcode non-existent directories. 558822663e35Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 558922663e35Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 559022663e35Smrg # have to relink, otherwise we might link with an installed library 559122663e35Smrg # when we should be linking with a yet-to-be-installed one 559222663e35Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 559322663e35Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 559422663e35Smrg # Linking always hardcodes the temporary library directory. 559522663e35Smrg _LT_TAGVAR(hardcode_action, $1)=relink 559622663e35Smrg else 559722663e35Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 559822663e35Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 559922663e35Smrg fi 560022663e35Smrgelse 560122663e35Smrg # We cannot hardcode anything, or else we can only hardcode existing 560222663e35Smrg # directories. 560322663e35Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 560422663e35Smrgfi 560522663e35SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5606d769e936Smrg 560722663e35Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 560822663e35Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 560922663e35Smrg # Fast installation is not supported 561022663e35Smrg enable_fast_install=no 561122663e35Smrgelif test yes = "$shlibpath_overrides_runpath" || 561222663e35Smrg test no = "$enable_shared"; then 561322663e35Smrg # Fast installation is not necessary 561422663e35Smrg enable_fast_install=needless 561522663e35Smrgfi 561622663e35Smrg_LT_TAGDECL([], [hardcode_action], [0], 561722663e35Smrg [How to hardcode a shared library path into an executable]) 561822663e35Smrg])# _LT_LINKER_HARDCODE_LIBPATH 561922663e35Smrg 562022663e35Smrg 562122663e35Smrg# _LT_CMD_STRIPLIB 562222663e35Smrg# ---------------- 562322663e35Smrgm4_defun([_LT_CMD_STRIPLIB], 562422663e35Smrg[m4_require([_LT_DECL_EGREP]) 562522663e35Smrgstriplib= 562622663e35Smrgold_striplib= 562722663e35SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 562822663e35Smrgif test -z "$STRIP"; then 562922663e35Smrg AC_MSG_RESULT([no]) 563022663e35Smrgelse 563122663e35Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 563222663e35Smrg old_striplib="$STRIP --strip-debug" 563322663e35Smrg striplib="$STRIP --strip-unneeded" 563422663e35Smrg AC_MSG_RESULT([yes]) 563522663e35Smrg else 563622663e35Smrg case $host_os in 563722663e35Smrg darwin*) 563822663e35Smrg # FIXME - insert some real tests, host_os isn't really good enough 563922663e35Smrg striplib="$STRIP -x" 564022663e35Smrg old_striplib="$STRIP -S" 564122663e35Smrg AC_MSG_RESULT([yes]) 564222663e35Smrg ;; 564322663e35Smrg freebsd*) 564422663e35Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 564522663e35Smrg old_striplib="$STRIP --strip-debug" 564622663e35Smrg striplib="$STRIP --strip-unneeded" 564722663e35Smrg AC_MSG_RESULT([yes]) 564822663e35Smrg else 564922663e35Smrg AC_MSG_RESULT([no]) 565022663e35Smrg fi 565122663e35Smrg ;; 565222663e35Smrg *) 565322663e35Smrg AC_MSG_RESULT([no]) 565422663e35Smrg ;; 565522663e35Smrg esac 565622663e35Smrg fi 565722663e35Smrgfi 565822663e35Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 565922663e35Smrg_LT_DECL([], [striplib], [1]) 566022663e35Smrg])# _LT_CMD_STRIPLIB 566122663e35Smrg 566222663e35Smrg 566322663e35Smrg# _LT_PREPARE_MUNGE_PATH_LIST 566422663e35Smrg# --------------------------- 566522663e35Smrg# Make sure func_munge_path_list() is defined correctly. 566622663e35Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 566722663e35Smrg[[# func_munge_path_list VARIABLE PATH 566822663e35Smrg# ----------------------------------- 566922663e35Smrg# VARIABLE is name of variable containing _space_ separated list of 567022663e35Smrg# directories to be munged by the contents of PATH, which is string 567122663e35Smrg# having a format: 567222663e35Smrg# "DIR[:DIR]:" 567322663e35Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 567422663e35Smrg# ":DIR[:DIR]" 567522663e35Smrg# string "DIR[ DIR]" will be appended to VARIABLE 567622663e35Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 567722663e35Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 567822663e35Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 567922663e35Smrg# "DIR[:DIR]" 568022663e35Smrg# VARIABLE will be replaced by "DIR[ DIR]" 568122663e35Smrgfunc_munge_path_list () 568222663e35Smrg{ 568322663e35Smrg case x@S|@2 in 568422663e35Smrg x) 568522663e35Smrg ;; 568622663e35Smrg *:) 568722663e35Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 568822663e35Smrg ;; 568922663e35Smrg x:*) 569022663e35Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 569122663e35Smrg ;; 569222663e35Smrg *::*) 569322663e35Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 569422663e35Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 569522663e35Smrg ;; 569622663e35Smrg *) 569722663e35Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5698d769e936Smrg ;; 569922663e35Smrg esac 570022663e35Smrg} 570122663e35Smrg]])# _LT_PREPARE_PATH_LIST 5702d769e936Smrg 5703d769e936Smrg 570422663e35Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 570522663e35Smrg# ----------------------------- 570622663e35Smrg# PORTME Fill in your ld.so characteristics 570722663e35Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 570822663e35Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 570922663e35Smrgm4_require([_LT_DECL_EGREP])dnl 571022663e35Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 571122663e35Smrgm4_require([_LT_DECL_OBJDUMP])dnl 571222663e35Smrgm4_require([_LT_DECL_SED])dnl 571322663e35Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 571422663e35Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 571522663e35SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 571622663e35Smrgm4_if([$1], 571722663e35Smrg [], [ 571822663e35Smrgif test yes = "$GCC"; then 571922663e35Smrg case $host_os in 572022663e35Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 572122663e35Smrg *) lt_awk_arg='/^libraries:/' ;; 572222663e35Smrg esac 572322663e35Smrg case $host_os in 572422663e35Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 572522663e35Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 572622663e35Smrg esac 572722663e35Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 572822663e35Smrg case $lt_search_path_spec in 572922663e35Smrg *\;*) 573022663e35Smrg # if the path contains ";" then we assume it to be the separator 573122663e35Smrg # otherwise default to the standard path separator (i.e. ":") - it is 573222663e35Smrg # assumed that no part of a normal pathname contains ";" but that should 573322663e35Smrg # okay in the real world where ";" in dirpaths is itself problematic. 573422663e35Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 573522663e35Smrg ;; 573622663e35Smrg *) 573722663e35Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 573822663e35Smrg ;; 573922663e35Smrg esac 574022663e35Smrg # Ok, now we have the path, separated by spaces, we can step through it 574122663e35Smrg # and add multilib dir if necessary... 574222663e35Smrg lt_tmp_lt_search_path_spec= 574322663e35Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 574422663e35Smrg # ...but if some path component already ends with the multilib dir we assume 574522663e35Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 574622663e35Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 574722663e35Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 574822663e35Smrg lt_multi_os_dir= 574922663e35Smrg ;; 575022663e35Smrg esac 575122663e35Smrg for lt_sys_path in $lt_search_path_spec; do 575222663e35Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 575322663e35Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 575422663e35Smrg elif test -n "$lt_multi_os_dir"; then 575522663e35Smrg test -d "$lt_sys_path" && \ 575622663e35Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 575722663e35Smrg fi 575822663e35Smrg done 575922663e35Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 576022663e35SmrgBEGIN {RS = " "; FS = "/|\n";} { 576122663e35Smrg lt_foo = ""; 576222663e35Smrg lt_count = 0; 576322663e35Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 576422663e35Smrg if ($lt_i != "" && $lt_i != ".") { 576522663e35Smrg if ($lt_i == "..") { 576622663e35Smrg lt_count++; 576722663e35Smrg } else { 576822663e35Smrg if (lt_count == 0) { 576922663e35Smrg lt_foo = "/" $lt_i lt_foo; 577022663e35Smrg } else { 577122663e35Smrg lt_count--; 577222663e35Smrg } 577322663e35Smrg } 577422663e35Smrg } 577522663e35Smrg } 577622663e35Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 577722663e35Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 577822663e35Smrg}'` 577922663e35Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 578022663e35Smrg # for these hosts. 578122663e35Smrg case $host_os in 578222663e35Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 578322663e35Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 578422663e35Smrg esac 578522663e35Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 578622663e35Smrgelse 578722663e35Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 578822663e35Smrgfi]) 578922663e35Smrglibrary_names_spec= 579022663e35Smrglibname_spec='lib$name' 579122663e35Smrgsoname_spec= 579222663e35Smrgshrext_cmds=.so 579322663e35Smrgpostinstall_cmds= 579422663e35Smrgpostuninstall_cmds= 579522663e35Smrgfinish_cmds= 579622663e35Smrgfinish_eval= 579722663e35Smrgshlibpath_var= 579822663e35Smrgshlibpath_overrides_runpath=unknown 579922663e35Smrgversion_type=none 580022663e35Smrgdynamic_linker="$host_os ld.so" 580122663e35Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 580222663e35Smrgneed_lib_prefix=unknown 580322663e35Smrghardcode_into_libs=no 5804d769e936Smrg 580522663e35Smrg# when you set need_version to no, make sure it does not cause -set_version 580622663e35Smrg# flags to be left without arguments 580722663e35Smrgneed_version=unknown 5808d769e936Smrg 580922663e35SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 581022663e35Smrg[User-defined run-time library search path.]) 5811d769e936Smrg 581222663e35Smrgcase $host_os in 581322663e35Smrgaix3*) 581422663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 581522663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 581622663e35Smrg shlibpath_var=LIBPATH 5817d769e936Smrg 581822663e35Smrg # AIX 3 has no versioning support, so we append a major version to the name. 581922663e35Smrg soname_spec='$libname$release$shared_ext$major' 582022663e35Smrg ;; 5821d769e936Smrg 582222663e35Smrgaix[[4-9]]*) 582322663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 582422663e35Smrg need_lib_prefix=no 582522663e35Smrg need_version=no 582622663e35Smrg hardcode_into_libs=yes 582722663e35Smrg if test ia64 = "$host_cpu"; then 582822663e35Smrg # AIX 5 supports IA64 582922663e35Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 583022663e35Smrg shlibpath_var=LD_LIBRARY_PATH 583122663e35Smrg else 583222663e35Smrg # With GCC up to 2.95.x, collect2 would create an import file 583322663e35Smrg # for dependence libraries. The import file would start with 583422663e35Smrg # the line '#! .'. This would cause the generated library to 583522663e35Smrg # depend on '.', always an invalid library. This was fixed in 583622663e35Smrg # development snapshots of GCC prior to 3.0. 583722663e35Smrg case $host_os in 583822663e35Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 583922663e35Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 584022663e35Smrg echo ' yes ' 584122663e35Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 584222663e35Smrg : 584322663e35Smrg else 584422663e35Smrg can_build_shared=no 584522663e35Smrg fi 584622663e35Smrg ;; 584722663e35Smrg esac 584822663e35Smrg # Using Import Files as archive members, it is possible to support 584922663e35Smrg # filename-based versioning of shared library archives on AIX. While 585022663e35Smrg # this would work for both with and without runtime linking, it will 585122663e35Smrg # prevent static linking of such archives. So we do filename-based 585222663e35Smrg # shared library versioning with .so extension only, which is used 585322663e35Smrg # when both runtime linking and shared linking is enabled. 585422663e35Smrg # Unfortunately, runtime linking may impact performance, so we do 585522663e35Smrg # not want this to be the default eventually. Also, we use the 585622663e35Smrg # versioned .so libs for executables only if there is the -brtl 585722663e35Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 585822663e35Smrg # To allow for filename-based versioning support, we need to create 585922663e35Smrg # libNAME.so.V as an archive file, containing: 586022663e35Smrg # *) an Import File, referring to the versioned filename of the 586122663e35Smrg # archive as well as the shared archive member, telling the 586222663e35Smrg # bitwidth (32 or 64) of that shared object, and providing the 586322663e35Smrg # list of exported symbols of that shared object, eventually 586422663e35Smrg # decorated with the 'weak' keyword 586522663e35Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 586622663e35Smrg # it being seen by the linker. 586722663e35Smrg # At run time we better use the real file rather than another symlink, 586822663e35Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5869d769e936Smrg 587022663e35Smrg case $with_aix_soname,$aix_use_runtimelinking in 587122663e35Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 587222663e35Smrg # soname into executable. Probably we can add versioning support to 587322663e35Smrg # collect2, so additional links can be useful in future. 587422663e35Smrg aix,yes) # traditional libtool 587522663e35Smrg dynamic_linker='AIX unversionable lib.so' 587622663e35Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 587722663e35Smrg # instead of lib<name>.a to let people know that these are not 587822663e35Smrg # typical AIX shared libraries. 587922663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 588022663e35Smrg ;; 588122663e35Smrg aix,no) # traditional AIX only 588222663e35Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 588322663e35Smrg # We preserve .a as extension for shared libraries through AIX4.2 588422663e35Smrg # and later when we are not doing run time linking. 588522663e35Smrg library_names_spec='$libname$release.a $libname.a' 588622663e35Smrg soname_spec='$libname$release$shared_ext$major' 588722663e35Smrg ;; 588822663e35Smrg svr4,*) # full svr4 only 588922663e35Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 589022663e35Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 589122663e35Smrg # We do not specify a path in Import Files, so LIBPATH fires. 589222663e35Smrg shlibpath_overrides_runpath=yes 589322663e35Smrg ;; 589422663e35Smrg *,yes) # both, prefer svr4 589522663e35Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 589622663e35Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 589722663e35Smrg # unpreferred sharedlib libNAME.a needs extra handling 589822663e35Smrg 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"' 589922663e35Smrg 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"' 590022663e35Smrg # We do not specify a path in Import Files, so LIBPATH fires. 590122663e35Smrg shlibpath_overrides_runpath=yes 590222663e35Smrg ;; 590322663e35Smrg *,no) # both, prefer aix 590422663e35Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 590522663e35Smrg library_names_spec='$libname$release.a $libname.a' 590622663e35Smrg soname_spec='$libname$release$shared_ext$major' 590722663e35Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 590822663e35Smrg 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)' 590922663e35Smrg 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"' 591022663e35Smrg ;; 591122663e35Smrg esac 591222663e35Smrg shlibpath_var=LIBPATH 591322663e35Smrg fi 591422663e35Smrg ;; 5915d769e936Smrg 591622663e35Smrgamigaos*) 591722663e35Smrg case $host_cpu in 591822663e35Smrg powerpc) 591922663e35Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 592022663e35Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 592122663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 592222663e35Smrg ;; 592322663e35Smrg m68k) 592422663e35Smrg library_names_spec='$libname.ixlibrary $libname.a' 592522663e35Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 592622663e35Smrg 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' 592722663e35Smrg ;; 592822663e35Smrg esac 592922663e35Smrg ;; 5930d769e936Smrg 593122663e35Smrgbeos*) 593222663e35Smrg library_names_spec='$libname$shared_ext' 593322663e35Smrg dynamic_linker="$host_os ld.so" 593422663e35Smrg shlibpath_var=LIBRARY_PATH 593522663e35Smrg ;; 5936d769e936Smrg 593722663e35Smrgbsdi[[45]]*) 593822663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 593922663e35Smrg need_version=no 594022663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 594122663e35Smrg soname_spec='$libname$release$shared_ext$major' 594222663e35Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 594322663e35Smrg shlibpath_var=LD_LIBRARY_PATH 594422663e35Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 594522663e35Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 594622663e35Smrg # the default ld.so.conf also contains /usr/contrib/lib and 594722663e35Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 594822663e35Smrg # libtool to hard-code these into programs 594922663e35Smrg ;; 5950d769e936Smrg 595122663e35Smrgcygwin* | mingw* | pw32* | cegcc*) 595222663e35Smrg version_type=windows 595322663e35Smrg shrext_cmds=.dll 595422663e35Smrg need_version=no 595522663e35Smrg need_lib_prefix=no 595622663e35Smrg 595722663e35Smrg case $GCC,$cc_basename in 595822663e35Smrg yes,*) 595922663e35Smrg # gcc 596022663e35Smrg library_names_spec='$libname.dll.a' 596122663e35Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 596222663e35Smrg postinstall_cmds='base_file=`basename \$file`~ 596322663e35Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 596422663e35Smrg dldir=$destdir/`dirname \$dlpath`~ 596522663e35Smrg test -d \$dldir || mkdir -p \$dldir~ 596622663e35Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 596722663e35Smrg chmod a+x \$dldir/$dlname~ 596822663e35Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 596922663e35Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 597022663e35Smrg fi' 597122663e35Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 597222663e35Smrg dlpath=$dir/\$dldll~ 597322663e35Smrg $RM \$dlpath' 597422663e35Smrg shlibpath_overrides_runpath=yes 5975d769e936Smrg 597622663e35Smrg case $host_os in 597722663e35Smrg cygwin*) 597822663e35Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 597922663e35Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 598022663e35Smrgm4_if([$1], [],[ 598122663e35Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 598222663e35Smrg ;; 598322663e35Smrg mingw* | cegcc*) 598422663e35Smrg # MinGW DLLs use traditional 'lib' prefix 598522663e35Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 598622663e35Smrg ;; 598722663e35Smrg pw32*) 598822663e35Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 598922663e35Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 599022663e35Smrg ;; 599122663e35Smrg esac 599222663e35Smrg dynamic_linker='Win32 ld.exe' 599322663e35Smrg ;; 5994d769e936Smrg 599522663e35Smrg *,cl* | *,icl*) 599622663e35Smrg # Native MSVC or ICC 599722663e35Smrg libname_spec='$name' 599822663e35Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 599922663e35Smrg library_names_spec='$libname.dll.lib' 6000d769e936Smrg 600122663e35Smrg case $build_os in 600222663e35Smrg mingw*) 600322663e35Smrg sys_lib_search_path_spec= 600422663e35Smrg lt_save_ifs=$IFS 600522663e35Smrg IFS=';' 600622663e35Smrg for lt_path in $LIB 600722663e35Smrg do 600822663e35Smrg IFS=$lt_save_ifs 600922663e35Smrg # Let DOS variable expansion print the short 8.3 style file name. 601022663e35Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 601122663e35Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 601222663e35Smrg done 601322663e35Smrg IFS=$lt_save_ifs 601422663e35Smrg # Convert to MSYS style. 601522663e35Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 601622663e35Smrg ;; 601722663e35Smrg cygwin*) 601822663e35Smrg # Convert to unix form, then to dos form, then back to unix form 601922663e35Smrg # but this time dos style (no spaces!) so that the unix form looks 602022663e35Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 602122663e35Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 602222663e35Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 602322663e35Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 602422663e35Smrg ;; 602522663e35Smrg *) 602622663e35Smrg sys_lib_search_path_spec=$LIB 602722663e35Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 602822663e35Smrg # It is most probably a Windows format PATH. 602922663e35Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 603022663e35Smrg else 603122663e35Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 603222663e35Smrg fi 603322663e35Smrg # FIXME: find the short name or the path components, as spaces are 603422663e35Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 603522663e35Smrg ;; 603622663e35Smrg esac 6037d769e936Smrg 603822663e35Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 603922663e35Smrg postinstall_cmds='base_file=`basename \$file`~ 604022663e35Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 604122663e35Smrg dldir=$destdir/`dirname \$dlpath`~ 604222663e35Smrg test -d \$dldir || mkdir -p \$dldir~ 604322663e35Smrg $install_prog $dir/$dlname \$dldir/$dlname' 604422663e35Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 604522663e35Smrg dlpath=$dir/\$dldll~ 604622663e35Smrg $RM \$dlpath' 604722663e35Smrg shlibpath_overrides_runpath=yes 604822663e35Smrg dynamic_linker='Win32 link.exe' 604922663e35Smrg ;; 6050d769e936Smrg 605122663e35Smrg *) 605222663e35Smrg # Assume MSVC and ICC wrapper 605322663e35Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 605422663e35Smrg dynamic_linker='Win32 ld.exe' 605522663e35Smrg ;; 605622663e35Smrg esac 605722663e35Smrg # FIXME: first we should search . and the directory the executable is in 605822663e35Smrg shlibpath_var=PATH 605922663e35Smrg ;; 6060d769e936Smrg 606122663e35Smrgdarwin* | rhapsody*) 606222663e35Smrg dynamic_linker="$host_os dyld" 606322663e35Smrg version_type=darwin 606422663e35Smrg need_lib_prefix=no 606522663e35Smrg need_version=no 606622663e35Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 606722663e35Smrg soname_spec='$libname$release$major$shared_ext' 606822663e35Smrg shlibpath_overrides_runpath=yes 606922663e35Smrg shlibpath_var=DYLD_LIBRARY_PATH 607022663e35Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 607122663e35Smrgm4_if([$1], [],[ 607222663e35Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 607322663e35Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 607422663e35Smrg ;; 6075d769e936Smrg 607622663e35Smrgdgux*) 607722663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 607822663e35Smrg need_lib_prefix=no 607922663e35Smrg need_version=no 608022663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 608122663e35Smrg soname_spec='$libname$release$shared_ext$major' 608222663e35Smrg shlibpath_var=LD_LIBRARY_PATH 608322663e35Smrg ;; 6084d769e936Smrg 608522663e35Smrgfreebsd* | dragonfly* | midnightbsd*) 608622663e35Smrg # DragonFly does not have aout. When/if they implement a new 608722663e35Smrg # versioning mechanism, adjust this. 608822663e35Smrg if test -x /usr/bin/objformat; then 608922663e35Smrg objformat=`/usr/bin/objformat` 609022663e35Smrg else 609122663e35Smrg case $host_os in 609222663e35Smrg freebsd[[23]].*) objformat=aout ;; 609322663e35Smrg *) objformat=elf ;; 609422663e35Smrg esac 609522663e35Smrg fi 609622663e35Smrg version_type=freebsd-$objformat 609722663e35Smrg case $version_type in 609822663e35Smrg freebsd-elf*) 609922663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 610022663e35Smrg soname_spec='$libname$release$shared_ext$major' 610122663e35Smrg need_version=no 610222663e35Smrg need_lib_prefix=no 610322663e35Smrg ;; 610422663e35Smrg freebsd-*) 610522663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 610622663e35Smrg need_version=yes 610722663e35Smrg ;; 610822663e35Smrg esac 610922663e35Smrg shlibpath_var=LD_LIBRARY_PATH 611022663e35Smrg case $host_os in 611122663e35Smrg freebsd2.*) 611222663e35Smrg shlibpath_overrides_runpath=yes 611322663e35Smrg ;; 611422663e35Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 611522663e35Smrg shlibpath_overrides_runpath=yes 611622663e35Smrg hardcode_into_libs=yes 611722663e35Smrg ;; 611822663e35Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 611922663e35Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 612022663e35Smrg shlibpath_overrides_runpath=no 612122663e35Smrg hardcode_into_libs=yes 612222663e35Smrg ;; 612322663e35Smrg *) # from 4.6 on, and DragonFly 612422663e35Smrg shlibpath_overrides_runpath=yes 612522663e35Smrg hardcode_into_libs=yes 612622663e35Smrg ;; 612722663e35Smrg esac 612822663e35Smrg ;; 6129d769e936Smrg 613022663e35Smrghaiku*) 613122663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 613222663e35Smrg need_lib_prefix=no 613322663e35Smrg need_version=no 613422663e35Smrg dynamic_linker="$host_os runtime_loader" 613522663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 613622663e35Smrg soname_spec='$libname$release$shared_ext$major' 613722663e35Smrg shlibpath_var=LIBRARY_PATH 613822663e35Smrg shlibpath_overrides_runpath=no 613922663e35Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 614022663e35Smrg hardcode_into_libs=yes 614122663e35Smrg ;; 6142d769e936Smrg 614322663e35Smrghpux9* | hpux10* | hpux11*) 614422663e35Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 614522663e35Smrg # link against other versions. 614622663e35Smrg version_type=sunos 614722663e35Smrg need_lib_prefix=no 614822663e35Smrg need_version=no 614922663e35Smrg case $host_cpu in 615022663e35Smrg ia64*) 615122663e35Smrg shrext_cmds='.so' 615222663e35Smrg hardcode_into_libs=yes 615322663e35Smrg dynamic_linker="$host_os dld.so" 615422663e35Smrg shlibpath_var=LD_LIBRARY_PATH 615522663e35Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 615622663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 615722663e35Smrg soname_spec='$libname$release$shared_ext$major' 615822663e35Smrg if test 32 = "$HPUX_IA64_MODE"; then 615922663e35Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 616022663e35Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 616122663e35Smrg else 616222663e35Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 616322663e35Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 616422663e35Smrg fi 616522663e35Smrg ;; 616622663e35Smrg hppa*64*) 616722663e35Smrg shrext_cmds='.sl' 616822663e35Smrg hardcode_into_libs=yes 616922663e35Smrg dynamic_linker="$host_os dld.sl" 617022663e35Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 617122663e35Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 617222663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 617322663e35Smrg soname_spec='$libname$release$shared_ext$major' 617422663e35Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 617522663e35Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 617622663e35Smrg ;; 617722663e35Smrg *) 617822663e35Smrg shrext_cmds='.sl' 617922663e35Smrg dynamic_linker="$host_os dld.sl" 618022663e35Smrg shlibpath_var=SHLIB_PATH 618122663e35Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 618222663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 618322663e35Smrg soname_spec='$libname$release$shared_ext$major' 618422663e35Smrg ;; 618522663e35Smrg esac 618622663e35Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 618722663e35Smrg postinstall_cmds='chmod 555 $lib' 618822663e35Smrg # or fails outright, so override atomically: 618922663e35Smrg install_override_mode=555 619022663e35Smrg ;; 6191d769e936Smrg 619222663e35Smrginterix[[3-9]]*) 619322663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 619422663e35Smrg need_lib_prefix=no 619522663e35Smrg need_version=no 619622663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 619722663e35Smrg soname_spec='$libname$release$shared_ext$major' 619822663e35Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 619922663e35Smrg shlibpath_var=LD_LIBRARY_PATH 620022663e35Smrg shlibpath_overrides_runpath=no 620122663e35Smrg hardcode_into_libs=yes 620222663e35Smrg ;; 6203d769e936Smrg 620422663e35Smrgirix5* | irix6* | nonstopux*) 620522663e35Smrg case $host_os in 620622663e35Smrg nonstopux*) version_type=nonstopux ;; 620722663e35Smrg *) 620822663e35Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 620922663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 621022663e35Smrg else 621122663e35Smrg version_type=irix 621222663e35Smrg fi ;; 621322663e35Smrg esac 621422663e35Smrg need_lib_prefix=no 621522663e35Smrg need_version=no 621622663e35Smrg soname_spec='$libname$release$shared_ext$major' 621722663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 621822663e35Smrg case $host_os in 621922663e35Smrg irix5* | nonstopux*) 622022663e35Smrg libsuff= shlibsuff= 622122663e35Smrg ;; 622222663e35Smrg *) 622322663e35Smrg case $LD in # libtool.m4 will add one of these switches to LD 622422663e35Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 622522663e35Smrg libsuff= shlibsuff= libmagic=32-bit;; 622622663e35Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 622722663e35Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 622822663e35Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 622922663e35Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 623022663e35Smrg *) libsuff= shlibsuff= libmagic=never-match;; 623122663e35Smrg esac 623222663e35Smrg ;; 623322663e35Smrg esac 623422663e35Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 623522663e35Smrg shlibpath_overrides_runpath=no 623622663e35Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 623722663e35Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 623822663e35Smrg hardcode_into_libs=yes 623922663e35Smrg ;; 6240d769e936Smrg 624122663e35Smrg# No shared lib support for Linux oldld, aout, or coff. 624222663e35Smrglinux*oldld* | linux*aout* | linux*coff*) 624322663e35Smrg dynamic_linker=no 624422663e35Smrg ;; 6245d769e936Smrg 624622663e35Smrglinux*android*) 624722663e35Smrg version_type=none # Android doesn't support versioned libraries. 624822663e35Smrg need_lib_prefix=no 624922663e35Smrg need_version=no 625022663e35Smrg library_names_spec='$libname$release$shared_ext' 625122663e35Smrg soname_spec='$libname$release$shared_ext' 625222663e35Smrg finish_cmds= 625322663e35Smrg shlibpath_var=LD_LIBRARY_PATH 625422663e35Smrg shlibpath_overrides_runpath=yes 6255d769e936Smrg 625622663e35Smrg # This implies no fast_install, which is unacceptable. 625722663e35Smrg # Some rework will be needed to allow for fast_install 625822663e35Smrg # before this can be enabled. 625922663e35Smrg hardcode_into_libs=yes 6260d769e936Smrg 626122663e35Smrg dynamic_linker='Android linker' 626222663e35Smrg # Don't embed -rpath directories since the linker doesn't support them. 626322663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 626422663e35Smrg ;; 6265d769e936Smrg 626622663e35Smrg# This must be glibc/ELF. 626722663e35Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 626822663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 626922663e35Smrg need_lib_prefix=no 627022663e35Smrg need_version=no 627122663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 627222663e35Smrg soname_spec='$libname$release$shared_ext$major' 627322663e35Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 627422663e35Smrg shlibpath_var=LD_LIBRARY_PATH 627522663e35Smrg shlibpath_overrides_runpath=no 6276d769e936Smrg 627722663e35Smrg # Some binutils ld are patched to set DT_RUNPATH 627822663e35Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 627922663e35Smrg [lt_cv_shlibpath_overrides_runpath=no 628022663e35Smrg save_LDFLAGS=$LDFLAGS 628122663e35Smrg save_libdir=$libdir 628222663e35Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 628322663e35Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 628422663e35Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 628522663e35Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 628622663e35Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 628722663e35Smrg LDFLAGS=$save_LDFLAGS 628822663e35Smrg libdir=$save_libdir 628922663e35Smrg ]) 629022663e35Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6291d769e936Smrg 629222663e35Smrg # This implies no fast_install, which is unacceptable. 629322663e35Smrg # Some rework will be needed to allow for fast_install 629422663e35Smrg # before this can be enabled. 629522663e35Smrg hardcode_into_libs=yes 62961d54945dSmrg 629722663e35Smrg # Ideally, we could use ldconfig to report *all* directores which are 629822663e35Smrg # searched for libraries, however this is still not possible. Aside from not 629922663e35Smrg # being certain /sbin/ldconfig is available, command 630022663e35Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 630122663e35Smrg # even though it is searched at run-time. Try to do the best guess by 630222663e35Smrg # appending ld.so.conf contents (and includes) to the search path. 630322663e35Smrg if test -f /etc/ld.so.conf; then 630422663e35Smrg 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' ' '` 630522663e35Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 630622663e35Smrg fi 6307d769e936Smrg 630822663e35Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 630922663e35Smrg # powerpc, because MkLinux only supported shared libraries with the 631022663e35Smrg # GNU dynamic linker. Since this was broken with cross compilers, 631122663e35Smrg # most powerpc-linux boxes support dynamic linking these days and 631222663e35Smrg # people can always --disable-shared, the test was removed, and we 631322663e35Smrg # assume the GNU/Linux dynamic linker is in use. 631422663e35Smrg dynamic_linker='GNU/Linux ld.so' 631522663e35Smrg ;; 63161d54945dSmrg 631722663e35Smrgnetbsd*) 631822663e35Smrg version_type=sunos 631922663e35Smrg need_lib_prefix=no 632022663e35Smrg need_version=no 632122663e35Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 632222663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 632322663e35Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 632422663e35Smrg dynamic_linker='NetBSD (a.out) ld.so' 632522663e35Smrg else 632622663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 632722663e35Smrg soname_spec='$libname$release$shared_ext$major' 632822663e35Smrg dynamic_linker='NetBSD ld.elf_so' 632922663e35Smrg fi 633022663e35Smrg shlibpath_var=LD_LIBRARY_PATH 633122663e35Smrg shlibpath_overrides_runpath=yes 633222663e35Smrg hardcode_into_libs=yes 633322663e35Smrg ;; 63341d54945dSmrg 633522663e35Smrgnewsos6) 633622663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 633722663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 633822663e35Smrg shlibpath_var=LD_LIBRARY_PATH 633922663e35Smrg shlibpath_overrides_runpath=yes 634022663e35Smrg ;; 63411d54945dSmrg 634222663e35Smrg*nto* | *qnx*) 634322663e35Smrg version_type=qnx 634422663e35Smrg need_lib_prefix=no 634522663e35Smrg need_version=no 634622663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 634722663e35Smrg soname_spec='$libname$release$shared_ext$major' 634822663e35Smrg shlibpath_var=LD_LIBRARY_PATH 634922663e35Smrg shlibpath_overrides_runpath=no 635022663e35Smrg hardcode_into_libs=yes 635122663e35Smrg dynamic_linker='ldqnx.so' 635222663e35Smrg ;; 6353d769e936Smrg 635422663e35Smrgopenbsd* | bitrig*) 635522663e35Smrg version_type=sunos 635622663e35Smrg sys_lib_dlsearch_path_spec=/usr/lib 635722663e35Smrg need_lib_prefix=no 635822663e35Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 635922663e35Smrg need_version=no 636022663e35Smrg else 636122663e35Smrg need_version=yes 636222663e35Smrg fi 636322663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 636422663e35Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 636522663e35Smrg shlibpath_var=LD_LIBRARY_PATH 636622663e35Smrg shlibpath_overrides_runpath=yes 636722663e35Smrg ;; 6368d769e936Smrg 636922663e35Smrgos2*) 637022663e35Smrg libname_spec='$name' 637122663e35Smrg version_type=windows 637222663e35Smrg shrext_cmds=.dll 637322663e35Smrg need_version=no 637422663e35Smrg need_lib_prefix=no 637522663e35Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 637622663e35Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 637722663e35Smrg v=$($ECHO $release$versuffix | tr -d .-); 637822663e35Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 637922663e35Smrg $ECHO $n$v`$shared_ext' 638022663e35Smrg library_names_spec='${libname}_dll.$libext' 638122663e35Smrg dynamic_linker='OS/2 ld.exe' 638222663e35Smrg shlibpath_var=BEGINLIBPATH 638322663e35Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 638422663e35Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 638522663e35Smrg postinstall_cmds='base_file=`basename \$file`~ 638622663e35Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 638722663e35Smrg dldir=$destdir/`dirname \$dlpath`~ 638822663e35Smrg test -d \$dldir || mkdir -p \$dldir~ 638922663e35Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 639022663e35Smrg chmod a+x \$dldir/$dlname~ 639122663e35Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 639222663e35Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 639322663e35Smrg fi' 639422663e35Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 639522663e35Smrg dlpath=$dir/\$dldll~ 639622663e35Smrg $RM \$dlpath' 639722663e35Smrg ;; 6398d769e936Smrg 639922663e35Smrgosf3* | osf4* | osf5*) 640022663e35Smrg version_type=osf 640122663e35Smrg need_lib_prefix=no 640222663e35Smrg need_version=no 640322663e35Smrg soname_spec='$libname$release$shared_ext$major' 640422663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 640522663e35Smrg shlibpath_var=LD_LIBRARY_PATH 640622663e35Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 640722663e35Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 640822663e35Smrg ;; 64091d54945dSmrg 641022663e35Smrgrdos*) 641122663e35Smrg dynamic_linker=no 641222663e35Smrg ;; 64131d54945dSmrg 641422663e35Smrgsolaris*) 641522663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 641622663e35Smrg need_lib_prefix=no 641722663e35Smrg need_version=no 641822663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 641922663e35Smrg soname_spec='$libname$release$shared_ext$major' 642022663e35Smrg shlibpath_var=LD_LIBRARY_PATH 642122663e35Smrg shlibpath_overrides_runpath=yes 642222663e35Smrg hardcode_into_libs=yes 642322663e35Smrg # ldd complains unless libraries are executable 642422663e35Smrg postinstall_cmds='chmod +x $lib' 642522663e35Smrg ;; 64261d54945dSmrg 642722663e35Smrgsunos4*) 642822663e35Smrg version_type=sunos 642922663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 643022663e35Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 643122663e35Smrg shlibpath_var=LD_LIBRARY_PATH 643222663e35Smrg shlibpath_overrides_runpath=yes 643322663e35Smrg if test yes = "$with_gnu_ld"; then 643422663e35Smrg need_lib_prefix=no 643522663e35Smrg fi 643622663e35Smrg need_version=yes 643722663e35Smrg ;; 64381d54945dSmrg 643922663e35Smrgsysv4 | sysv4.3*) 644022663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 644122663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 644222663e35Smrg soname_spec='$libname$release$shared_ext$major' 644322663e35Smrg shlibpath_var=LD_LIBRARY_PATH 644422663e35Smrg case $host_vendor in 644522663e35Smrg sni) 644622663e35Smrg shlibpath_overrides_runpath=no 644722663e35Smrg need_lib_prefix=no 644822663e35Smrg runpath_var=LD_RUN_PATH 6449ec713c28Smrg ;; 645022663e35Smrg siemens) 645122663e35Smrg need_lib_prefix=no 645222663e35Smrg ;; 645322663e35Smrg motorola) 645422663e35Smrg need_lib_prefix=no 645522663e35Smrg need_version=no 645622663e35Smrg shlibpath_overrides_runpath=no 645722663e35Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 645822663e35Smrg ;; 645922663e35Smrg esac 646022663e35Smrg ;; 6461ba85709eSmrg 646222663e35Smrgsysv4*MP*) 646322663e35Smrg if test -d /usr/nec; then 646422663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 646522663e35Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 646622663e35Smrg soname_spec='$libname$shared_ext.$major' 646722663e35Smrg shlibpath_var=LD_LIBRARY_PATH 646822663e35Smrg fi 646922663e35Smrg ;; 64701d54945dSmrg 647122663e35Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 647222663e35Smrg version_type=sco 647322663e35Smrg need_lib_prefix=no 647422663e35Smrg need_version=no 647522663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 647622663e35Smrg soname_spec='$libname$release$shared_ext$major' 647722663e35Smrg shlibpath_var=LD_LIBRARY_PATH 647822663e35Smrg shlibpath_overrides_runpath=yes 647922663e35Smrg hardcode_into_libs=yes 648022663e35Smrg if test yes = "$with_gnu_ld"; then 648122663e35Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 648222663e35Smrg else 648322663e35Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 648422663e35Smrg case $host_os in 648522663e35Smrg sco3.2v5*) 648622663e35Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 648722663e35Smrg ;; 6488d769e936Smrg esac 648922663e35Smrg fi 649022663e35Smrg sys_lib_dlsearch_path_spec='/usr/lib' 649122663e35Smrg ;; 64921d54945dSmrg 649322663e35Smrgtpf*) 649422663e35Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 649522663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 649622663e35Smrg need_lib_prefix=no 649722663e35Smrg need_version=no 649822663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 649922663e35Smrg shlibpath_var=LD_LIBRARY_PATH 650022663e35Smrg shlibpath_overrides_runpath=no 650122663e35Smrg hardcode_into_libs=yes 650222663e35Smrg ;; 6503d769e936Smrg 650422663e35Smrguts4*) 650522663e35Smrg version_type=linux # correct to gnu/linux during the next big refactor 650622663e35Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 650722663e35Smrg soname_spec='$libname$release$shared_ext$major' 650822663e35Smrg shlibpath_var=LD_LIBRARY_PATH 650922663e35Smrg ;; 6510d769e936Smrg 651122663e35Smrg*) 651222663e35Smrg dynamic_linker=no 651322663e35Smrg ;; 651422663e35Smrgesac 651522663e35SmrgAC_MSG_RESULT([$dynamic_linker]) 651622663e35Smrgtest no = "$dynamic_linker" && can_build_shared=no 6517d769e936Smrg 651822663e35Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 651922663e35Smrgif test yes = "$GCC"; then 652022663e35Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 652122663e35Smrgfi 65221d54945dSmrg 652322663e35Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 652422663e35Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 652522663e35Smrgfi 65261d54945dSmrg 652722663e35Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 652822663e35Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 652922663e35Smrgfi 65301d54945dSmrg 653122663e35Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 653222663e35Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 65331d54945dSmrg 653422663e35Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 653522663e35Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 65367322289dSmrg 653722663e35Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 653822663e35Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6539d769e936Smrg 654022663e35Smrg_LT_DECL([], [variables_saved_for_relink], [1], 654122663e35Smrg [Variables whose values should be saved in libtool wrapper scripts and 654222663e35Smrg restored at link time]) 654322663e35Smrg_LT_DECL([], [need_lib_prefix], [0], 654422663e35Smrg [Do we need the "lib" prefix for modules?]) 654522663e35Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 654622663e35Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 654722663e35Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 654822663e35Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 654922663e35Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 655022663e35Smrg [Is shlibpath searched before the hard-coded library search path?]) 655122663e35Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 655222663e35Smrg_LT_DECL([], [library_names_spec], [1], 655322663e35Smrg [[List of archive names. First name is the real one, the rest are links. 655422663e35Smrg The last name is the one that the linker finds with -lNAME]]) 655522663e35Smrg_LT_DECL([], [soname_spec], [1], 655622663e35Smrg [[The coded name of the library, if different from the real name]]) 655722663e35Smrg_LT_DECL([], [install_override_mode], [1], 655822663e35Smrg [Permission mode override for installation of shared libraries]) 655922663e35Smrg_LT_DECL([], [postinstall_cmds], [2], 656022663e35Smrg [Command to use after installation of a shared archive]) 656122663e35Smrg_LT_DECL([], [postuninstall_cmds], [2], 656222663e35Smrg [Command to use after uninstallation of a shared archive]) 656322663e35Smrg_LT_DECL([], [finish_cmds], [2], 656422663e35Smrg [Commands used to finish a libtool library installation in a directory]) 656522663e35Smrg_LT_DECL([], [finish_eval], [1], 656622663e35Smrg [[As "finish_cmds", except a single script fragment to be evaled but 656722663e35Smrg not shown]]) 656822663e35Smrg_LT_DECL([], [hardcode_into_libs], [0], 656922663e35Smrg [Whether we should hardcode library paths into libraries]) 657022663e35Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 657122663e35Smrg [Compile-time system search path for libraries]) 657222663e35Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 657322663e35Smrg [Detected run-time system search path for libraries]) 657422663e35Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 657522663e35Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 657622663e35Smrg])# _LT_SYS_DYNAMIC_LINKER 65771d54945dSmrg 65781d54945dSmrg 657922663e35Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 658022663e35Smrg# -------------------------- 658122663e35Smrg# find a file program that can recognize shared library 658222663e35SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 658322663e35Smrg[m4_require([_LT_DECL_EGREP])dnl 658422663e35SmrgAC_MSG_CHECKING([for $1]) 658522663e35SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 658622663e35Smrg[case $MAGIC_CMD in 658722663e35Smrg[[\\/*] | ?:[\\/]*]) 658822663e35Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 658922663e35Smrg ;; 659022663e35Smrg*) 659122663e35Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 659222663e35Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 659322663e35Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 659422663e35Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 659522663e35Smrgdnl not every word. This closes a longstanding sh security hole. 659622663e35Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 659722663e35Smrg for ac_dir in $ac_dummy; do 659822663e35Smrg IFS=$lt_save_ifs 659922663e35Smrg test -z "$ac_dir" && ac_dir=. 660022663e35Smrg if test -f "$ac_dir/$1"; then 660122663e35Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 660222663e35Smrg if test -n "$file_magic_test_file"; then 660322663e35Smrg case $deplibs_check_method in 660422663e35Smrg "file_magic "*) 660522663e35Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 660622663e35Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 660722663e35Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 660822663e35Smrg $EGREP "$file_magic_regex" > /dev/null; then 660922663e35Smrg : 661022663e35Smrg else 661122663e35Smrg cat <<_LT_EOF 1>&2 6612786a6f21Smrg 661322663e35Smrg*** Warning: the command libtool uses to detect shared libraries, 661422663e35Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 661522663e35Smrg*** The result is that libtool may fail to recognize shared libraries 661622663e35Smrg*** as such. This will affect the creation of libtool libraries that 661722663e35Smrg*** depend on shared libraries, but programs linked with such libtool 661822663e35Smrg*** libraries will work regardless of this problem. Nevertheless, you 661922663e35Smrg*** may want to report the problem to your system manager and/or to 662022663e35Smrg*** bug-libtool@gnu.org 6621786a6f21Smrg 662222663e35Smrg_LT_EOF 662322663e35Smrg fi ;; 662422663e35Smrg esac 662522663e35Smrg fi 662622663e35Smrg break 662722663e35Smrg fi 662822663e35Smrg done 662922663e35Smrg IFS=$lt_save_ifs 663022663e35Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 663122663e35Smrg ;; 663222663e35Smrgesac]) 663322663e35SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 663422663e35Smrgif test -n "$MAGIC_CMD"; then 663522663e35Smrg AC_MSG_RESULT($MAGIC_CMD) 663622663e35Smrgelse 663722663e35Smrg AC_MSG_RESULT(no) 663822663e35Smrgfi 663922663e35Smrg_LT_DECL([], [MAGIC_CMD], [0], 664022663e35Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 664122663e35Smrg])# _LT_PATH_TOOL_PREFIX 66421d54945dSmrg 664322663e35Smrg# Old name: 664422663e35SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 664522663e35Smrgdnl aclocal-1.4 backwards compatibility: 664622663e35Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 66471d54945dSmrg 66481d54945dSmrg 664922663e35Smrg# _LT_PATH_MAGIC 665022663e35Smrg# -------------- 665122663e35Smrg# find a file program that can recognize a shared library 665222663e35Smrgm4_defun([_LT_PATH_MAGIC], 665322663e35Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 665422663e35Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 665522663e35Smrg if test -n "$ac_tool_prefix"; then 665622663e35Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 665722663e35Smrg else 665822663e35Smrg MAGIC_CMD=: 665922663e35Smrg fi 666022663e35Smrgfi 666122663e35Smrg])# _LT_PATH_MAGIC 66621d54945dSmrg 66631d54945dSmrg 666422663e35Smrg# LT_PATH_LD 666522663e35Smrg# ---------- 666622663e35Smrg# find the pathname to the GNU or non-GNU linker 666722663e35SmrgAC_DEFUN([LT_PATH_LD], 666822663e35Smrg[AC_REQUIRE([AC_PROG_CC])dnl 666922663e35SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 667022663e35SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 667122663e35Smrgm4_require([_LT_DECL_SED])dnl 667222663e35Smrgm4_require([_LT_DECL_EGREP])dnl 667322663e35Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 66741d54945dSmrg 667522663e35SmrgAC_ARG_WITH([gnu-ld], 667622663e35Smrg [AS_HELP_STRING([--with-gnu-ld], 667722663e35Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 667822663e35Smrg [test no = "$withval" || with_gnu_ld=yes], 667922663e35Smrg [with_gnu_ld=no])dnl 66801d54945dSmrg 668122663e35Smrgac_prog=ld 668222663e35Smrgif test yes = "$GCC"; then 668322663e35Smrg # Check if gcc -print-prog-name=ld gives a path. 668422663e35Smrg AC_MSG_CHECKING([for ld used by $CC]) 668522663e35Smrg case $host in 668622663e35Smrg *-*-mingw*) 668722663e35Smrg # gcc leaves a trailing carriage return, which upsets mingw 668822663e35Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 668922663e35Smrg *) 669022663e35Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 669122663e35Smrg esac 669222663e35Smrg case $ac_prog in 669322663e35Smrg # Accept absolute paths. 669422663e35Smrg [[\\/]]* | ?:[[\\/]]*) 669522663e35Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 669622663e35Smrg # Canonicalize the pathname of ld 669722663e35Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 669822663e35Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 669922663e35Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 670022663e35Smrg done 670122663e35Smrg test -z "$LD" && LD=$ac_prog 670222663e35Smrg ;; 670322663e35Smrg "") 670422663e35Smrg # If it fails, then pretend we aren't using GCC. 670522663e35Smrg ac_prog=ld 670622663e35Smrg ;; 670722663e35Smrg *) 670822663e35Smrg # If it is relative, then search for the first ld in PATH. 670922663e35Smrg with_gnu_ld=unknown 671022663e35Smrg ;; 671122663e35Smrg esac 671222663e35Smrgelif test yes = "$with_gnu_ld"; then 671322663e35Smrg AC_MSG_CHECKING([for GNU ld]) 6714d769e936Smrgelse 671522663e35Smrg AC_MSG_CHECKING([for non-GNU ld]) 6716d769e936Smrgfi 671722663e35SmrgAC_CACHE_VAL(lt_cv_path_LD, 671822663e35Smrg[if test -z "$LD"; then 671922663e35Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 672022663e35Smrg for ac_dir in $PATH; do 672122663e35Smrg IFS=$lt_save_ifs 672222663e35Smrg test -z "$ac_dir" && ac_dir=. 672322663e35Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 672422663e35Smrg lt_cv_path_LD=$ac_dir/$ac_prog 672522663e35Smrg # Check to see if the program is GNU ld. I'd rather use --version, 672622663e35Smrg # but apparently some variants of GNU ld only accept -v. 672722663e35Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 672822663e35Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 672922663e35Smrg *GNU* | *'with BFD'*) 673022663e35Smrg test no != "$with_gnu_ld" && break 673122663e35Smrg ;; 673222663e35Smrg *) 673322663e35Smrg test yes != "$with_gnu_ld" && break 673422663e35Smrg ;; 673522663e35Smrg esac 673622663e35Smrg fi 673722663e35Smrg done 673822663e35Smrg IFS=$lt_save_ifs 673922663e35Smrgelse 674022663e35Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 674122663e35Smrgfi]) 674222663e35SmrgLD=$lt_cv_path_LD 674322663e35Smrgif test -n "$LD"; then 674422663e35Smrg AC_MSG_RESULT($LD) 674522663e35Smrgelse 674622663e35Smrg AC_MSG_RESULT(no) 674722663e35Smrgfi 674822663e35Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 674922663e35Smrg_LT_PATH_LD_GNU 675022663e35SmrgAC_SUBST([LD]) 67511d54945dSmrg 675222663e35Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 675322663e35Smrg])# LT_PATH_LD 67541d54945dSmrg 675522663e35Smrg# Old names: 675622663e35SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 675722663e35SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 675822663e35Smrgdnl aclocal-1.4 backwards compatibility: 675922663e35Smrgdnl AC_DEFUN([AM_PROG_LD], []) 676022663e35Smrgdnl AC_DEFUN([AC_PROG_LD], []) 676122663e35Smrg 676222663e35Smrg 676322663e35Smrg# _LT_PATH_LD_GNU 676422663e35Smrg#- -------------- 676522663e35Smrgm4_defun([_LT_PATH_LD_GNU], 676622663e35Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 676722663e35Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 676822663e35Smrgcase `$LD -v 2>&1 </dev/null` in 676922663e35Smrg*GNU* | *'with BFD'*) 677022663e35Smrg lt_cv_prog_gnu_ld=yes 677122663e35Smrg ;; 677222663e35Smrg*) 677322663e35Smrg lt_cv_prog_gnu_ld=no 6774d769e936Smrg ;; 677522663e35Smrgesac]) 677622663e35Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 677722663e35Smrg])# _LT_PATH_LD_GNU 677822663e35Smrg 677922663e35Smrg 678022663e35Smrg# _LT_CMD_RELOAD 678122663e35Smrg# -------------- 678222663e35Smrg# find reload flag for linker 678322663e35Smrg# -- PORTME Some linkers may need a different reload flag. 678422663e35Smrgm4_defun([_LT_CMD_RELOAD], 678522663e35Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 678622663e35Smrg lt_cv_ld_reload_flag, 678722663e35Smrg [lt_cv_ld_reload_flag='-r']) 678822663e35Smrgreload_flag=$lt_cv_ld_reload_flag 678922663e35Smrgcase $reload_flag in 679022663e35Smrg"" | " "*) ;; 679122663e35Smrg*) reload_flag=" $reload_flag" ;; 679222663e35Smrgesac 679322663e35Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 679422663e35Smrgcase $host_os in 679522663e35Smrg cygwin* | mingw* | pw32* | cegcc*) 679622663e35Smrg if test yes != "$GCC"; then 679722663e35Smrg reload_cmds=false 679822663e35Smrg fi 679922663e35Smrg ;; 680022663e35Smrg darwin*) 680122663e35Smrg if test yes = "$GCC"; then 680222663e35Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 680322663e35Smrg else 680422663e35Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 680522663e35Smrg fi 680622663e35Smrg ;; 6807d769e936Smrgesac 680822663e35Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 680922663e35Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 681022663e35Smrg])# _LT_CMD_RELOAD 68111d54945dSmrg 681222663e35Smrg 681322663e35Smrg# _LT_PATH_DD 681422663e35Smrg# ----------- 681522663e35Smrg# find a working dd 681622663e35Smrgm4_defun([_LT_PATH_DD], 681722663e35Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 681822663e35Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 681922663e35Smrgcat conftest.i conftest.i >conftest2.i 682022663e35Smrg: ${lt_DD:=$DD} 682122663e35SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 682222663e35Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 682322663e35Smrg cmp -s conftest.i conftest.out \ 682422663e35Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 682522663e35Smrgfi]) 682622663e35Smrgrm -f conftest.i conftest2.i conftest.out]) 682722663e35Smrg])# _LT_PATH_DD 6828d769e936Smrg 6829d769e936Smrg 683022663e35Smrg# _LT_CMD_TRUNCATE 683122663e35Smrg# ---------------- 683222663e35Smrg# find command to truncate a binary pipe 683322663e35Smrgm4_defun([_LT_CMD_TRUNCATE], 683422663e35Smrg[m4_require([_LT_PATH_DD]) 683522663e35SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 683622663e35Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 683722663e35Smrgcat conftest.i conftest.i >conftest2.i 683822663e35Smrglt_cv_truncate_bin= 683922663e35Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 684022663e35Smrg cmp -s conftest.i conftest.out \ 684122663e35Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6842d769e936Smrgfi 684322663e35Smrgrm -f conftest.i conftest2.i conftest.out 684422663e35Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 684522663e35Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 684622663e35Smrg [Command to truncate a binary pipe]) 684722663e35Smrg])# _LT_CMD_TRUNCATE 68481d54945dSmrg 68491d54945dSmrg 685022663e35Smrg# _LT_CHECK_MAGIC_METHOD 685122663e35Smrg# ---------------------- 685222663e35Smrg# how to check for library dependencies 685322663e35Smrg# -- PORTME fill in with the dynamic library characteristics 685422663e35Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 685522663e35Smrg[m4_require([_LT_DECL_EGREP]) 685622663e35Smrgm4_require([_LT_DECL_OBJDUMP]) 685722663e35SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 685822663e35Smrglt_cv_deplibs_check_method, 685922663e35Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 686022663e35Smrglt_cv_file_magic_test_file= 686122663e35Smrglt_cv_deplibs_check_method='unknown' 686222663e35Smrg# Need to set the preceding variable on all platforms that support 686322663e35Smrg# interlibrary dependencies. 686422663e35Smrg# 'none' -- dependencies not supported. 686522663e35Smrg# 'unknown' -- same as none, but documents that we really don't know. 686622663e35Smrg# 'pass_all' -- all dependencies passed with no checks. 686722663e35Smrg# 'test_compile' -- check by making test program. 686822663e35Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 686922663e35Smrg# that responds to the $file_magic_cmd with a given extended regex. 687022663e35Smrg# If you have 'file' or equivalent on your system and you're not sure 687122663e35Smrg# whether 'pass_all' will *always* work, you probably want this one. 68721d54945dSmrg 687322663e35Smrgcase $host_os in 687422663e35Smrgaix[[4-9]]*) 687522663e35Smrg lt_cv_deplibs_check_method=pass_all 687622663e35Smrg ;; 6877d769e936Smrg 687822663e35Smrgbeos*) 687922663e35Smrg lt_cv_deplibs_check_method=pass_all 688022663e35Smrg ;; 68811d54945dSmrg 688222663e35Smrgbsdi[[45]]*) 688322663e35Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 688422663e35Smrg lt_cv_file_magic_cmd='$FILECMD -L' 688522663e35Smrg lt_cv_file_magic_test_file=/shlib/libc.so 688622663e35Smrg ;; 68871d54945dSmrg 688822663e35Smrgcygwin*) 688922663e35Smrg # func_win32_libid is a shell function defined in ltmain.sh 689022663e35Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 689122663e35Smrg lt_cv_file_magic_cmd='func_win32_libid' 689222663e35Smrg ;; 6893d769e936Smrg 689422663e35Smrgmingw* | pw32*) 689522663e35Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 689622663e35Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 689722663e35Smrg # unless we find 'file', for example because we are cross-compiling. 689822663e35Smrg if ( file / ) >/dev/null 2>&1; then 689922663e35Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 690022663e35Smrg lt_cv_file_magic_cmd='func_win32_libid' 690122663e35Smrg else 690222663e35Smrg # Keep this pattern in sync with the one in func_win32_libid. 690322663e35Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 690422663e35Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 690522663e35Smrg fi 690622663e35Smrg ;; 6907d769e936Smrg 690822663e35Smrgcegcc*) 690922663e35Smrg # use the weaker test based on 'objdump'. See mingw*. 691022663e35Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 691122663e35Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 691222663e35Smrg ;; 69131d54945dSmrg 691422663e35Smrgdarwin* | rhapsody*) 691522663e35Smrg lt_cv_deplibs_check_method=pass_all 691622663e35Smrg ;; 69171d54945dSmrg 691822663e35Smrgfreebsd* | dragonfly* | midnightbsd*) 691922663e35Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 692022663e35Smrg case $host_cpu in 692122663e35Smrg i*86 ) 692222663e35Smrg # Not sure whether the presence of OpenBSD here was a mistake. 692322663e35Smrg # Let's accept both of them until this is cleared up. 692422663e35Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 692522663e35Smrg lt_cv_file_magic_cmd=$FILECMD 692622663e35Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 692722663e35Smrg ;; 6928d769e936Smrg esac 692922663e35Smrg else 693022663e35Smrg lt_cv_deplibs_check_method=pass_all 693122663e35Smrg fi 693222663e35Smrg ;; 6933d769e936Smrg 693422663e35Smrghaiku*) 693522663e35Smrg lt_cv_deplibs_check_method=pass_all 693622663e35Smrg ;; 6937d769e936Smrg 693822663e35Smrghpux10.20* | hpux11*) 693922663e35Smrg lt_cv_file_magic_cmd=$FILECMD 694022663e35Smrg case $host_cpu in 694122663e35Smrg ia64*) 694222663e35Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 694322663e35Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 694422663e35Smrg ;; 694522663e35Smrg hppa*64*) 694622663e35Smrg [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]'] 694722663e35Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 694822663e35Smrg ;; 694922663e35Smrg *) 695022663e35Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 695122663e35Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 695222663e35Smrg ;; 695322663e35Smrg esac 695422663e35Smrg ;; 6955d769e936Smrg 695622663e35Smrginterix[[3-9]]*) 695722663e35Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 695822663e35Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 695922663e35Smrg ;; 6960d769e936Smrg 696122663e35Smrgirix5* | irix6* | nonstopux*) 696222663e35Smrg case $LD in 696322663e35Smrg *-32|*"-32 ") libmagic=32-bit;; 696422663e35Smrg *-n32|*"-n32 ") libmagic=N32;; 696522663e35Smrg *-64|*"-64 ") libmagic=64-bit;; 696622663e35Smrg *) libmagic=never-match;; 696722663e35Smrg esac 696822663e35Smrg lt_cv_deplibs_check_method=pass_all 696922663e35Smrg ;; 69701d54945dSmrg 697122663e35Smrg# This must be glibc/ELF. 697222663e35Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 697322663e35Smrg lt_cv_deplibs_check_method=pass_all 697422663e35Smrg ;; 69751d54945dSmrg 697622663e35Smrgnetbsd*) 697722663e35Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 697822663e35Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 697922663e35Smrg else 698022663e35Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 698122663e35Smrg fi 698222663e35Smrg ;; 6983786a6f21Smrg 698422663e35Smrgnewos6*) 698522663e35Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 698622663e35Smrg lt_cv_file_magic_cmd=$FILECMD 698722663e35Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 698822663e35Smrg ;; 6989d769e936Smrg 699022663e35Smrg*nto* | *qnx*) 699122663e35Smrg lt_cv_deplibs_check_method=pass_all 699222663e35Smrg ;; 6993786a6f21Smrg 699422663e35Smrgopenbsd* | bitrig*) 699522663e35Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 699622663e35Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 699722663e35Smrg else 699822663e35Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 699922663e35Smrg fi 700022663e35Smrg ;; 7001d769e936Smrg 700222663e35Smrgosf3* | osf4* | osf5*) 700322663e35Smrg lt_cv_deplibs_check_method=pass_all 700422663e35Smrg ;; 7005d769e936Smrg 700622663e35Smrgrdos*) 700722663e35Smrg lt_cv_deplibs_check_method=pass_all 700822663e35Smrg ;; 7009d769e936Smrg 701022663e35Smrgsolaris*) 701122663e35Smrg lt_cv_deplibs_check_method=pass_all 701222663e35Smrg ;; 7013786a6f21Smrg 701422663e35Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 701522663e35Smrg lt_cv_deplibs_check_method=pass_all 701622663e35Smrg ;; 7017786a6f21Smrg 701822663e35Smrgsysv4 | sysv4.3*) 701922663e35Smrg case $host_vendor in 702022663e35Smrg motorola) 702122663e35Smrg 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]]' 702222663e35Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 702322663e35Smrg ;; 702422663e35Smrg ncr) 702522663e35Smrg lt_cv_deplibs_check_method=pass_all 702622663e35Smrg ;; 702722663e35Smrg sequent) 702822663e35Smrg lt_cv_file_magic_cmd='/bin/file' 702922663e35Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 703022663e35Smrg ;; 703122663e35Smrg sni) 703222663e35Smrg lt_cv_file_magic_cmd='/bin/file' 703322663e35Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 703422663e35Smrg lt_cv_file_magic_test_file=/lib/libc.so 703522663e35Smrg ;; 703622663e35Smrg siemens) 703722663e35Smrg lt_cv_deplibs_check_method=pass_all 703822663e35Smrg ;; 703922663e35Smrg pc) 704022663e35Smrg lt_cv_deplibs_check_method=pass_all 704122663e35Smrg ;; 704222663e35Smrg esac 704322663e35Smrg ;; 7044d769e936Smrg 704522663e35Smrgtpf*) 704622663e35Smrg lt_cv_deplibs_check_method=pass_all 704722663e35Smrg ;; 704822663e35Smrgos2*) 704922663e35Smrg lt_cv_deplibs_check_method=pass_all 705022663e35Smrg ;; 705122663e35Smrgesac 705222663e35Smrg]) 7053d769e936Smrg 705422663e35Smrgfile_magic_glob= 705522663e35Smrgwant_nocaseglob=no 705622663e35Smrgif test "$build" = "$host"; then 705722663e35Smrg case $host_os in 705822663e35Smrg mingw* | pw32*) 705922663e35Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 706022663e35Smrg want_nocaseglob=yes 706122663e35Smrg else 706222663e35Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 706322663e35Smrg fi 706422663e35Smrg ;; 706522663e35Smrg esac 706622663e35Smrgfi 7067d769e936Smrg 706822663e35Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 706922663e35Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 707022663e35Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 7071d769e936Smrg 707222663e35Smrg_LT_DECL([], [deplibs_check_method], [1], 707322663e35Smrg [Method to check whether dependent libraries are shared objects]) 707422663e35Smrg_LT_DECL([], [file_magic_cmd], [1], 707522663e35Smrg [Command to use when deplibs_check_method = "file_magic"]) 707622663e35Smrg_LT_DECL([], [file_magic_glob], [1], 707722663e35Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 707822663e35Smrg_LT_DECL([], [want_nocaseglob], [1], 707922663e35Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 708022663e35Smrg])# _LT_CHECK_MAGIC_METHOD 7081d769e936Smrg 7082d769e936Smrg 708322663e35Smrg# LT_PATH_NM 708422663e35Smrg# ---------- 708522663e35Smrg# find the pathname to a BSD- or MS-compatible name lister 708622663e35SmrgAC_DEFUN([LT_PATH_NM], 708722663e35Smrg[AC_REQUIRE([AC_PROG_CC])dnl 708822663e35SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 708922663e35Smrg[if test -n "$NM"; then 709022663e35Smrg # Let the user override the test. 709122663e35Smrg lt_cv_path_NM=$NM 709222663e35Smrgelse 709322663e35Smrg lt_nm_to_check=${ac_tool_prefix}nm 709422663e35Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 709522663e35Smrg lt_nm_to_check="$lt_nm_to_check nm" 709622663e35Smrg fi 709722663e35Smrg for lt_tmp_nm in $lt_nm_to_check; do 709822663e35Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 709922663e35Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 710022663e35Smrg IFS=$lt_save_ifs 710122663e35Smrg test -z "$ac_dir" && ac_dir=. 710222663e35Smrg tmp_nm=$ac_dir/$lt_tmp_nm 710322663e35Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 710422663e35Smrg # Check to see if the nm accepts a BSD-compat flag. 710522663e35Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 710622663e35Smrg # nm: unknown option "B" ignored 710722663e35Smrg # Tru64's nm complains that /dev/null is an invalid object file 710822663e35Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 710922663e35Smrg case $build_os in 711022663e35Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 711122663e35Smrg *) lt_bad_file=/dev/null ;; 711222663e35Smrg esac 711322663e35Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 711422663e35Smrg *$lt_bad_file* | *'Invalid file or object type'*) 711522663e35Smrg lt_cv_path_NM="$tmp_nm -B" 711622663e35Smrg break 2 711722663e35Smrg ;; 711822663e35Smrg *) 711922663e35Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 712022663e35Smrg */dev/null*) 712122663e35Smrg lt_cv_path_NM="$tmp_nm -p" 712222663e35Smrg break 2 712322663e35Smrg ;; 712422663e35Smrg *) 712522663e35Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 712622663e35Smrg continue # so that we can try to find one that supports BSD flags 712722663e35Smrg ;; 71287322289dSmrg esac 712922663e35Smrg ;; 713022663e35Smrg esac 713122663e35Smrg fi 713222663e35Smrg done 713322663e35Smrg IFS=$lt_save_ifs 713422663e35Smrg done 713522663e35Smrg : ${lt_cv_path_NM=no} 713622663e35Smrgfi]) 713722663e35Smrgif test no != "$lt_cv_path_NM"; then 713822663e35Smrg NM=$lt_cv_path_NM 713922663e35Smrgelse 714022663e35Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 714122663e35Smrg if test -n "$DUMPBIN"; then : 714222663e35Smrg # Let the user override the test. 714322663e35Smrg else 714422663e35Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 714522663e35Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 714622663e35Smrg *COFF*) 714722663e35Smrg DUMPBIN="$DUMPBIN -symbols -headers" 714822663e35Smrg ;; 714922663e35Smrg *) 715022663e35Smrg DUMPBIN=: 715122663e35Smrg ;; 7152d769e936Smrg esac 715322663e35Smrg fi 715422663e35Smrg AC_SUBST([DUMPBIN]) 715522663e35Smrg if test : != "$DUMPBIN"; then 715622663e35Smrg NM=$DUMPBIN 715722663e35Smrg fi 715822663e35Smrgfi 715922663e35Smrgtest -z "$NM" && NM=nm 716022663e35SmrgAC_SUBST([NM]) 716122663e35Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7162d769e936Smrg 716322663e35SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 716422663e35Smrg [lt_cv_nm_interface="BSD nm" 716522663e35Smrg echo "int some_variable = 0;" > conftest.$ac_ext 716622663e35Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 716722663e35Smrg (eval "$ac_compile" 2>conftest.err) 716822663e35Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 716922663e35Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 717022663e35Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 717122663e35Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 717222663e35Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 717322663e35Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 717422663e35Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 717522663e35Smrg lt_cv_nm_interface="MS dumpbin" 717622663e35Smrg fi 717722663e35Smrg rm -f conftest*]) 717822663e35Smrg])# LT_PATH_NM 7179d769e936Smrg 718022663e35Smrg# Old names: 718122663e35SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 718222663e35SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 718322663e35Smrgdnl aclocal-1.4 backwards compatibility: 718422663e35Smrgdnl AC_DEFUN([AM_PROG_NM], []) 718522663e35Smrgdnl AC_DEFUN([AC_PROG_NM], []) 7186d769e936Smrg 718722663e35Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 718822663e35Smrg# -------------------------------- 718922663e35Smrg# how to determine the name of the shared library 719022663e35Smrg# associated with a specific link library. 719122663e35Smrg# -- PORTME fill in with the dynamic library characteristics 719222663e35Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 719322663e35Smrg[m4_require([_LT_DECL_EGREP]) 719422663e35Smrgm4_require([_LT_DECL_OBJDUMP]) 719522663e35Smrgm4_require([_LT_DECL_DLLTOOL]) 719622663e35SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 719722663e35Smrglt_cv_sharedlib_from_linklib_cmd, 719822663e35Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7199d769e936Smrg 720022663e35Smrgcase $host_os in 720122663e35Smrgcygwin* | mingw* | pw32* | cegcc*) 720222663e35Smrg # two different shell functions defined in ltmain.sh; 720322663e35Smrg # decide which one to use based on capabilities of $DLLTOOL 720422663e35Smrg case `$DLLTOOL --help 2>&1` in 720522663e35Smrg *--identify-strict*) 720622663e35Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 720722663e35Smrg ;; 720822663e35Smrg *) 720922663e35Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 721022663e35Smrg ;; 721122663e35Smrg esac 721222663e35Smrg ;; 721322663e35Smrg*) 721422663e35Smrg # fallback: assume linklib IS sharedlib 721522663e35Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 721622663e35Smrg ;; 721722663e35Smrgesac 721822663e35Smrg]) 721922663e35Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 722022663e35Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7221d769e936Smrg 722222663e35Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 722322663e35Smrg [Command to associate shared and link libraries]) 722422663e35Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 72251d54945dSmrg 72261d54945dSmrg 722722663e35Smrg# _LT_PATH_MANIFEST_TOOL 722822663e35Smrg# ---------------------- 722922663e35Smrg# locate the manifest tool 723022663e35Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 723122663e35Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 723222663e35Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 723322663e35SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 723422663e35Smrg [lt_cv_path_mainfest_tool=no 723522663e35Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 723622663e35Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 723722663e35Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 723822663e35Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 723922663e35Smrg lt_cv_path_mainfest_tool=yes 724022663e35Smrg fi 724122663e35Smrg rm -f conftest*]) 724222663e35Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 724322663e35Smrg MANIFEST_TOOL=: 724422663e35Smrgfi 724522663e35Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 724622663e35Smrg])# _LT_PATH_MANIFEST_TOOL 72471d54945dSmrg 72481d54945dSmrg 724922663e35Smrg# _LT_DLL_DEF_P([FILE]) 725022663e35Smrg# --------------------- 725122663e35Smrg# True iff FILE is a Windows DLL '.def' file. 725222663e35Smrg# Keep in sync with func_dll_def_p in the libtool script 725322663e35SmrgAC_DEFUN([_LT_DLL_DEF_P], 725422663e35Smrg[dnl 725522663e35Smrg test DEF = "`$SED -n dnl 725622663e35Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 725722663e35Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 725822663e35Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 725922663e35Smrg -e q dnl Only consider the first "real" line 726022663e35Smrg $1`" dnl 726122663e35Smrg])# _LT_DLL_DEF_P 72621d54945dSmrg 72631d54945dSmrg 726422663e35Smrg# LT_LIB_M 726522663e35Smrg# -------- 726622663e35Smrg# check for math library 726722663e35SmrgAC_DEFUN([LT_LIB_M], 726822663e35Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 726922663e35SmrgLIBM= 727022663e35Smrgcase $host in 727122663e35Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 727222663e35Smrg # These system don't have libm, or don't need it 727322663e35Smrg ;; 727422663e35Smrg*-ncr-sysv4.3*) 727522663e35Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 727622663e35Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 727722663e35Smrg ;; 727822663e35Smrg*) 727922663e35Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 728022663e35Smrg ;; 728122663e35Smrgesac 728222663e35SmrgAC_SUBST([LIBM]) 728322663e35Smrg])# LT_LIB_M 72841d54945dSmrg 728522663e35Smrg# Old name: 728622663e35SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 728722663e35Smrgdnl aclocal-1.4 backwards compatibility: 728822663e35Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7289d769e936Smrg 7290d769e936Smrg 729122663e35Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 729222663e35Smrg# ------------------------------- 729322663e35Smrgm4_defun([_LT_COMPILER_NO_RTTI], 729422663e35Smrg[m4_require([_LT_TAG_COMPILER])dnl 7295d769e936Smrg 729622663e35Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 72971d54945dSmrg 729822663e35Smrgif test yes = "$GCC"; then 729922663e35Smrg case $cc_basename in 730022663e35Smrg nvcc*) 730122663e35Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 730222663e35Smrg *) 730322663e35Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 730422663e35Smrg esac 73051d54945dSmrg 730622663e35Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 730722663e35Smrg lt_cv_prog_compiler_rtti_exceptions, 730822663e35Smrg [-fno-rtti -fno-exceptions], [], 730922663e35Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 731022663e35Smrgfi 731122663e35Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 731222663e35Smrg [Compiler flag to turn off builtin functions]) 731322663e35Smrg])# _LT_COMPILER_NO_RTTI 73141d54945dSmrg 73151d54945dSmrg 731622663e35Smrg# _LT_CMD_GLOBAL_SYMBOLS 731722663e35Smrg# ---------------------- 731822663e35Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 731922663e35Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 732022663e35SmrgAC_REQUIRE([AC_PROG_CC])dnl 732122663e35SmrgAC_REQUIRE([AC_PROG_AWK])dnl 732222663e35SmrgAC_REQUIRE([LT_PATH_NM])dnl 732322663e35SmrgAC_REQUIRE([LT_PATH_LD])dnl 732422663e35Smrgm4_require([_LT_DECL_SED])dnl 732522663e35Smrgm4_require([_LT_DECL_EGREP])dnl 732622663e35Smrgm4_require([_LT_TAG_COMPILER])dnl 73271d54945dSmrg 732822663e35Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 732922663e35SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 733022663e35SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 733122663e35Smrg[ 733222663e35Smrg# These are sane defaults that work on at least a few old systems. 733322663e35Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 73341d54945dSmrg 733522663e35Smrg# Character class describing NM global symbol codes. 733622663e35Smrgsymcode='[[BCDEGRST]]' 73371d54945dSmrg 733822663e35Smrg# Regexp to match symbols that can be accessed directly from C. 733922663e35Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 73401d54945dSmrg 734122663e35Smrg# Define system-specific variables. 734222663e35Smrgcase $host_os in 734322663e35Smrgaix*) 734422663e35Smrg symcode='[[BCDT]]' 734522663e35Smrg ;; 734622663e35Smrgcygwin* | mingw* | pw32* | cegcc*) 734722663e35Smrg symcode='[[ABCDGISTW]]' 734822663e35Smrg ;; 734922663e35Smrghpux*) 735022663e35Smrg if test ia64 = "$host_cpu"; then 735122663e35Smrg symcode='[[ABCDEGRST]]' 735222663e35Smrg fi 735322663e35Smrg ;; 735422663e35Smrgirix* | nonstopux*) 735522663e35Smrg symcode='[[BCDEGRST]]' 735622663e35Smrg ;; 735722663e35Smrgosf*) 735822663e35Smrg symcode='[[BCDEGQRST]]' 735922663e35Smrg ;; 736022663e35Smrgsolaris*) 736122663e35Smrg symcode='[[BDRT]]' 736222663e35Smrg ;; 736322663e35Smrgsco3.2v5*) 736422663e35Smrg symcode='[[DT]]' 736522663e35Smrg ;; 736622663e35Smrgsysv4.2uw2*) 736722663e35Smrg symcode='[[DT]]' 736822663e35Smrg ;; 736922663e35Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 737022663e35Smrg symcode='[[ABDT]]' 737122663e35Smrg ;; 737222663e35Smrgsysv4) 737322663e35Smrg symcode='[[DFNSTU]]' 737422663e35Smrg ;; 737522663e35Smrgesac 73761d54945dSmrg 737722663e35Smrg# If we're using GNU nm, then use its standard symbol codes. 737822663e35Smrgcase `$NM -V 2>&1` in 737922663e35Smrg*GNU* | *'with BFD'*) 738022663e35Smrg symcode='[[ABCDGIRSTW]]' ;; 738122663e35Smrgesac 73821d54945dSmrg 738322663e35Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 738422663e35Smrg # Gets list of data symbols to import. 738522663e35Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 738622663e35Smrg # Adjust the below global symbol transforms to fixup imported variables. 738722663e35Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 738822663e35Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 738922663e35Smrg lt_c_name_lib_hook="\ 739022663e35Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 739122663e35Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 739222663e35Smrgelse 739322663e35Smrg # Disable hooks by default. 739422663e35Smrg lt_cv_sys_global_symbol_to_import= 739522663e35Smrg lt_cdecl_hook= 739622663e35Smrg lt_c_name_hook= 739722663e35Smrg lt_c_name_lib_hook= 739822663e35Smrgfi 73991d54945dSmrg 740022663e35Smrg# Transform an extracted symbol line into a proper C declaration. 740122663e35Smrg# Some systems (esp. on ia64) link data and code symbols differently, 740222663e35Smrg# so use this general approach. 740322663e35Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 740422663e35Smrg$lt_cdecl_hook\ 740522663e35Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 740622663e35Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 74071d54945dSmrg 740822663e35Smrg# Transform an extracted symbol line into symbol name and symbol address 740922663e35Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 741022663e35Smrg$lt_c_name_hook\ 741122663e35Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 741222663e35Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 74131d54945dSmrg 741422663e35Smrg# Transform an extracted symbol line into symbol name with lib prefix and 741522663e35Smrg# symbol address. 741622663e35Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 741722663e35Smrg$lt_c_name_lib_hook\ 741822663e35Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 741922663e35Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 742022663e35Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 74211d54945dSmrg 742222663e35Smrg# Handle CRLF in mingw tool chain 742322663e35Smrgopt_cr= 742422663e35Smrgcase $build_os in 742522663e35Smrgmingw*) 742622663e35Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 742722663e35Smrg ;; 742822663e35Smrgesac 74291d54945dSmrg 743022663e35Smrg# Try without a prefix underscore, then with it. 743122663e35Smrgfor ac_symprfx in "" "_"; do 74321d54945dSmrg 743322663e35Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 743422663e35Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 74351d54945dSmrg 743622663e35Smrg # Write the raw and C identifiers. 743722663e35Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 743822663e35Smrg # Fake it for dumpbin and say T for any non-static function, 743922663e35Smrg # D for any global variable and I for any imported variable. 744022663e35Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 744122663e35Smrg # which start with @ or ?. 744222663e35Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 744322663e35Smrg" {last_section=section; section=\$ 3};"\ 744422663e35Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 744522663e35Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 744622663e35Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 744722663e35Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 744822663e35Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 744922663e35Smrg" \$ 0!~/External *\|/{next};"\ 745022663e35Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 745122663e35Smrg" {if(hide[section]) next};"\ 745222663e35Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 745322663e35Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 745422663e35Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 745522663e35Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 745622663e35Smrg" ' prfx=^$ac_symprfx]" 745722663e35Smrg else 745822663e35Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 745922663e35Smrg fi 746022663e35Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 74611d54945dSmrg 746222663e35Smrg # Check to see that the pipe works correctly. 746322663e35Smrg pipe_works=no 7464786a6f21Smrg 746522663e35Smrg rm -f conftest* 746622663e35Smrg cat > conftest.$ac_ext <<_LT_EOF 746722663e35Smrg#ifdef __cplusplus 746822663e35Smrgextern "C" { 746922663e35Smrg#endif 747022663e35Smrgchar nm_test_var; 747122663e35Smrgvoid nm_test_func(void); 747222663e35Smrgvoid nm_test_func(void){} 747322663e35Smrg#ifdef __cplusplus 747422663e35Smrg} 747522663e35Smrg#endif 747622663e35Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 747722663e35Smrg_LT_EOF 74781d54945dSmrg 747922663e35Smrg if AC_TRY_EVAL(ac_compile); then 748022663e35Smrg # Now try to grab the symbols. 748122663e35Smrg nlist=conftest.nm 748222663e35Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 748322663e35Smrg # Try sorting and uniquifying the output. 748422663e35Smrg if sort "$nlist" | uniq > "$nlist"T; then 748522663e35Smrg mv -f "$nlist"T "$nlist" 748622663e35Smrg else 748722663e35Smrg rm -f "$nlist"T 748822663e35Smrg fi 74891d54945dSmrg 749022663e35Smrg # Make sure that we snagged all the symbols we need. 749122663e35Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 749222663e35Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 749322663e35Smrg cat <<_LT_EOF > conftest.$ac_ext 749422663e35Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 749522663e35Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 749622663e35Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 749722663e35Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 749822663e35Smrg# define LT@&t@_DLSYM_CONST 749922663e35Smrg#elif defined __osf__ 750022663e35Smrg/* This system does not cope well with relocations in const data. */ 750122663e35Smrg# define LT@&t@_DLSYM_CONST 750222663e35Smrg#else 750322663e35Smrg# define LT@&t@_DLSYM_CONST const 750422663e35Smrg#endif 75051d54945dSmrg 750622663e35Smrg#ifdef __cplusplus 750722663e35Smrgextern "C" { 750822663e35Smrg#endif 75091d54945dSmrg 751022663e35Smrg_LT_EOF 751122663e35Smrg # Now generate the symbol file. 751222663e35Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 75131d54945dSmrg 751422663e35Smrg cat <<_LT_EOF >> conftest.$ac_ext 75151d54945dSmrg 751622663e35Smrg/* The mapping between symbol names and symbols. */ 751722663e35SmrgLT@&t@_DLSYM_CONST struct { 751822663e35Smrg const char *name; 751922663e35Smrg void *address; 752022663e35Smrg} 752122663e35Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 752222663e35Smrg{ 752322663e35Smrg { "@PROGRAM@", (void *) 0 }, 752422663e35Smrg_LT_EOF 752522663e35Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 752622663e35Smrg cat <<\_LT_EOF >> conftest.$ac_ext 752722663e35Smrg {0, (void *) 0} 752822663e35Smrg}; 75291d54945dSmrg 753022663e35Smrg/* This works around a problem in FreeBSD linker */ 753122663e35Smrg#ifdef FREEBSD_WORKAROUND 753222663e35Smrgstatic const void *lt_preloaded_setup() { 753322663e35Smrg return lt__PROGRAM__LTX_preloaded_symbols; 753422663e35Smrg} 753522663e35Smrg#endif 753622663e35Smrg 753722663e35Smrg#ifdef __cplusplus 753822663e35Smrg} 753922663e35Smrg#endif 754022663e35Smrg_LT_EOF 754122663e35Smrg # Now try linking the two files. 754222663e35Smrg mv conftest.$ac_objext conftstm.$ac_objext 754322663e35Smrg lt_globsym_save_LIBS=$LIBS 754422663e35Smrg lt_globsym_save_CFLAGS=$CFLAGS 754522663e35Smrg LIBS=conftstm.$ac_objext 754622663e35Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 754722663e35Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 754822663e35Smrg pipe_works=yes 754922663e35Smrg fi 755022663e35Smrg LIBS=$lt_globsym_save_LIBS 755122663e35Smrg CFLAGS=$lt_globsym_save_CFLAGS 755222663e35Smrg else 755322663e35Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 755422663e35Smrg fi 755522663e35Smrg else 755622663e35Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 755722663e35Smrg fi 755822663e35Smrg else 755922663e35Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 756022663e35Smrg fi 756122663e35Smrg else 756222663e35Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 756322663e35Smrg cat conftest.$ac_ext >&5 756422663e35Smrg fi 756522663e35Smrg rm -rf conftest* conftst* 75661d54945dSmrg 756722663e35Smrg # Do not use the global_symbol_pipe unless it works. 756822663e35Smrg if test yes = "$pipe_works"; then 756922663e35Smrg break 757022663e35Smrg else 757122663e35Smrg lt_cv_sys_global_symbol_pipe= 757222663e35Smrg fi 757322663e35Smrgdone 757422663e35Smrg]) 757522663e35Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 757622663e35Smrg lt_cv_sys_global_symbol_to_cdecl= 757722663e35Smrgfi 757822663e35Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 757922663e35Smrg AC_MSG_RESULT(failed) 758022663e35Smrgelse 758122663e35Smrg AC_MSG_RESULT(ok) 758222663e35Smrgfi 75831d54945dSmrg 758422663e35Smrg# Response file support. 758522663e35Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 758622663e35Smrg nm_file_list_spec='@' 758722663e35Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 758822663e35Smrg nm_file_list_spec='@' 758922663e35Smrgfi 7590786a6f21Smrg 759122663e35Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 759222663e35Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 759322663e35Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 759422663e35Smrg [Transform the output of nm in a proper C declaration]) 759522663e35Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 759622663e35Smrg [Transform the output of nm into a list of symbols to manually relocate]) 759722663e35Smrg_LT_DECL([global_symbol_to_c_name_address], 759822663e35Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 759922663e35Smrg [Transform the output of nm in a C name address pair]) 760022663e35Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 760122663e35Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 760222663e35Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 760322663e35Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 760422663e35Smrg [The name lister interface]) 760522663e35Smrg_LT_DECL([], [nm_file_list_spec], [1], 760622663e35Smrg [Specify filename containing input files for $NM]) 760722663e35Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 76081d54945dSmrg 76091d54945dSmrg 761022663e35Smrg# _LT_COMPILER_PIC([TAGNAME]) 761122663e35Smrg# --------------------------- 761222663e35Smrgm4_defun([_LT_COMPILER_PIC], 761322663e35Smrg[m4_require([_LT_TAG_COMPILER])dnl 761422663e35Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 761522663e35Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 761622663e35Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 7617d769e936Smrg 761822663e35Smrgm4_if([$1], [CXX], [ 761922663e35Smrg # C++ specific cases for pic, static, wl, etc. 762022663e35Smrg if test yes = "$GXX"; then 762122663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 762222663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 76231d54945dSmrg 762422663e35Smrg case $host_os in 762522663e35Smrg aix*) 762622663e35Smrg # All AIX code is PIC. 762722663e35Smrg if test ia64 = "$host_cpu"; then 762822663e35Smrg # AIX 5 now supports IA64 processor 762922663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 763022663e35Smrg fi 763122663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 763222663e35Smrg ;; 76331d54945dSmrg 763422663e35Smrg amigaos*) 763522663e35Smrg case $host_cpu in 763622663e35Smrg powerpc) 763722663e35Smrg # see comment about AmigaOS4 .so support 763822663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 763922663e35Smrg ;; 764022663e35Smrg m68k) 764122663e35Smrg # FIXME: we need at least 68020 code to build shared libraries, but 764222663e35Smrg # adding the '-m68020' flag to GCC prevents building anything better, 764322663e35Smrg # like '-m68040'. 764422663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 764522663e35Smrg ;; 764622663e35Smrg esac 764722663e35Smrg ;; 7648d769e936Smrg 764922663e35Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 765022663e35Smrg # PIC is the default for these OSes. 765122663e35Smrg ;; 765222663e35Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 765322663e35Smrg # This hack is so that the source file can tell whether it is being 765422663e35Smrg # built for inclusion in a dll (and should export symbols for example). 765522663e35Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 765622663e35Smrg # (--disable-auto-import) libraries 765722663e35Smrg m4_if([$1], [GCJ], [], 765822663e35Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 765922663e35Smrg case $host_os in 766022663e35Smrg os2*) 766122663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 766222663e35Smrg ;; 766322663e35Smrg esac 766422663e35Smrg ;; 766522663e35Smrg darwin* | rhapsody*) 766622663e35Smrg # PIC is the default on this platform 766722663e35Smrg # Common symbols not allowed in MH_DYLIB files 766822663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 766922663e35Smrg ;; 767022663e35Smrg *djgpp*) 767122663e35Smrg # DJGPP does not support shared libraries at all 767222663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 767322663e35Smrg ;; 767422663e35Smrg haiku*) 767522663e35Smrg # PIC is the default for Haiku. 767622663e35Smrg # The "-static" flag exists, but is broken. 767722663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 767822663e35Smrg ;; 767922663e35Smrg interix[[3-9]]*) 768022663e35Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 768122663e35Smrg # Instead, we relocate shared libraries at runtime. 768222663e35Smrg ;; 768322663e35Smrg sysv4*MP*) 768422663e35Smrg if test -d /usr/nec; then 768522663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 768622663e35Smrg fi 768722663e35Smrg ;; 768822663e35Smrg hpux*) 768922663e35Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 769022663e35Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 769122663e35Smrg # sets the default TLS model and affects inlining. 769222663e35Smrg case $host_cpu in 769322663e35Smrg hppa*64*) 769422663e35Smrg ;; 769522663e35Smrg *) 769622663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 769722663e35Smrg ;; 769822663e35Smrg esac 769922663e35Smrg ;; 770022663e35Smrg *qnx* | *nto*) 770122663e35Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 770222663e35Smrg # it will coredump. 770322663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 770422663e35Smrg ;; 770522663e35Smrg *) 770622663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 770722663e35Smrg ;; 770822663e35Smrg esac 770922663e35Smrg else 771022663e35Smrg case $host_os in 771122663e35Smrg aix[[4-9]]*) 771222663e35Smrg # All AIX code is PIC. 771322663e35Smrg if test ia64 = "$host_cpu"; then 771422663e35Smrg # AIX 5 now supports IA64 processor 771522663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 771622663e35Smrg else 771722663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 771822663e35Smrg fi 771922663e35Smrg ;; 772022663e35Smrg chorus*) 772122663e35Smrg case $cc_basename in 772222663e35Smrg cxch68*) 772322663e35Smrg # Green Hills C++ Compiler 772422663e35Smrg # _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" 772522663e35Smrg ;; 772622663e35Smrg esac 772722663e35Smrg ;; 772822663e35Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 772922663e35Smrg # This hack is so that the source file can tell whether it is being 773022663e35Smrg # built for inclusion in a dll (and should export symbols for example). 773122663e35Smrg m4_if([$1], [GCJ], [], 773222663e35Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 773322663e35Smrg ;; 773422663e35Smrg dgux*) 773522663e35Smrg case $cc_basename in 773622663e35Smrg ec++*) 773722663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 773822663e35Smrg ;; 773922663e35Smrg ghcx*) 774022663e35Smrg # Green Hills C++ Compiler 774122663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 774222663e35Smrg ;; 774322663e35Smrg *) 774422663e35Smrg ;; 774522663e35Smrg esac 774622663e35Smrg ;; 774722663e35Smrg freebsd* | dragonfly* | midnightbsd*) 774822663e35Smrg # FreeBSD uses GNU C++ 774922663e35Smrg ;; 775022663e35Smrg hpux9* | hpux10* | hpux11*) 775122663e35Smrg case $cc_basename in 775222663e35Smrg CC*) 775322663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 775422663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 775522663e35Smrg if test ia64 != "$host_cpu"; then 775622663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 775722663e35Smrg fi 775822663e35Smrg ;; 775922663e35Smrg aCC*) 776022663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 776122663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 776222663e35Smrg case $host_cpu in 776322663e35Smrg hppa*64*|ia64*) 776422663e35Smrg # +Z the default 776522663e35Smrg ;; 776622663e35Smrg *) 776722663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 776822663e35Smrg ;; 776922663e35Smrg esac 777022663e35Smrg ;; 777122663e35Smrg *) 777222663e35Smrg ;; 777322663e35Smrg esac 777422663e35Smrg ;; 777522663e35Smrg interix*) 777622663e35Smrg # This is c89, which is MS Visual C++ (no shared libs) 777722663e35Smrg # Anyone wants to do a port? 777822663e35Smrg ;; 777922663e35Smrg irix5* | irix6* | nonstopux*) 778022663e35Smrg case $cc_basename in 778122663e35Smrg CC*) 778222663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 778322663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 778422663e35Smrg # CC pic flag -KPIC is the default. 778522663e35Smrg ;; 778622663e35Smrg *) 778722663e35Smrg ;; 778822663e35Smrg esac 778922663e35Smrg ;; 779022663e35Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 779122663e35Smrg case $cc_basename in 779222663e35Smrg KCC*) 779322663e35Smrg # KAI C++ Compiler 779422663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 779522663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 779622663e35Smrg ;; 779722663e35Smrg ecpc* ) 779822663e35Smrg # old Intel C++ for x86_64, which still supported -KPIC. 779922663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 780022663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 780122663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 780222663e35Smrg ;; 780322663e35Smrg icpc* ) 780422663e35Smrg # Intel C++, used to be incompatible with GCC. 780522663e35Smrg # ICC 10 doesn't accept -KPIC any more. 780622663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 780722663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 780822663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 780922663e35Smrg ;; 781022663e35Smrg pgCC* | pgcpp*) 781122663e35Smrg # Portland Group C++ compiler 781222663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 781322663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 781422663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 781522663e35Smrg ;; 781622663e35Smrg cxx*) 781722663e35Smrg # Compaq C++ 781822663e35Smrg # Make sure the PIC flag is empty. It appears that all Alpha 781922663e35Smrg # Linux and Compaq Tru64 Unix objects are PIC. 782022663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 782122663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 782222663e35Smrg ;; 782322663e35Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 782422663e35Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 782522663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 782622663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 782722663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 782822663e35Smrg ;; 782922663e35Smrg *) 783022663e35Smrg case `$CC -V 2>&1 | $SED 5q` in 783122663e35Smrg *Sun\ C*) 783222663e35Smrg # Sun C++ 5.9 783322663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 783422663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 783522663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 783622663e35Smrg ;; 783722663e35Smrg esac 783822663e35Smrg ;; 783922663e35Smrg esac 784022663e35Smrg ;; 784122663e35Smrg lynxos*) 784222663e35Smrg ;; 784322663e35Smrg m88k*) 784422663e35Smrg ;; 784522663e35Smrg mvs*) 784622663e35Smrg case $cc_basename in 784722663e35Smrg cxx*) 784822663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 784922663e35Smrg ;; 785022663e35Smrg *) 785122663e35Smrg ;; 785222663e35Smrg esac 785322663e35Smrg ;; 785422663e35Smrg netbsd*) 785522663e35Smrg ;; 785622663e35Smrg *qnx* | *nto*) 785722663e35Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 785822663e35Smrg # it will coredump. 785922663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 786022663e35Smrg ;; 786122663e35Smrg osf3* | osf4* | osf5*) 786222663e35Smrg case $cc_basename in 786322663e35Smrg KCC*) 786422663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 786522663e35Smrg ;; 786622663e35Smrg RCC*) 786722663e35Smrg # Rational C++ 2.4.1 786822663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 786922663e35Smrg ;; 787022663e35Smrg cxx*) 787122663e35Smrg # Digital/Compaq C++ 787222663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 787322663e35Smrg # Make sure the PIC flag is empty. It appears that all Alpha 787422663e35Smrg # Linux and Compaq Tru64 Unix objects are PIC. 787522663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 787622663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 787722663e35Smrg ;; 787822663e35Smrg *) 787922663e35Smrg ;; 788022663e35Smrg esac 788122663e35Smrg ;; 788222663e35Smrg psos*) 788322663e35Smrg ;; 788422663e35Smrg solaris*) 788522663e35Smrg case $cc_basename in 788622663e35Smrg CC* | sunCC*) 788722663e35Smrg # Sun C++ 4.2, 5.x and Centerline C++ 788822663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 788922663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 789022663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 789122663e35Smrg ;; 789222663e35Smrg gcx*) 789322663e35Smrg # Green Hills C++ Compiler 789422663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 789522663e35Smrg ;; 789622663e35Smrg *) 789722663e35Smrg ;; 789822663e35Smrg esac 789922663e35Smrg ;; 790022663e35Smrg sunos4*) 790122663e35Smrg case $cc_basename in 790222663e35Smrg CC*) 790322663e35Smrg # Sun C++ 4.x 790422663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 790522663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 790622663e35Smrg ;; 790722663e35Smrg lcc*) 790822663e35Smrg # Lucid 790922663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 791022663e35Smrg ;; 791122663e35Smrg *) 791222663e35Smrg ;; 791322663e35Smrg esac 791422663e35Smrg ;; 791522663e35Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 791622663e35Smrg case $cc_basename in 791722663e35Smrg CC*) 791822663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 791922663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 792022663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 792122663e35Smrg ;; 792222663e35Smrg esac 792322663e35Smrg ;; 792422663e35Smrg tandem*) 792522663e35Smrg case $cc_basename in 792622663e35Smrg NCC*) 792722663e35Smrg # NonStop-UX NCC 3.20 792822663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 792922663e35Smrg ;; 793022663e35Smrg *) 793122663e35Smrg ;; 793222663e35Smrg esac 793322663e35Smrg ;; 793422663e35Smrg vxworks*) 793522663e35Smrg ;; 793622663e35Smrg *) 793722663e35Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 793822663e35Smrg ;; 793922663e35Smrg esac 794022663e35Smrg fi 794122663e35Smrg], 794222663e35Smrg[ 794322663e35Smrg if test yes = "$GCC"; then 794422663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 794522663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 79461d54945dSmrg 794722663e35Smrg case $host_os in 794822663e35Smrg aix*) 794922663e35Smrg # All AIX code is PIC. 795022663e35Smrg if test ia64 = "$host_cpu"; then 795122663e35Smrg # AIX 5 now supports IA64 processor 795222663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 795322663e35Smrg fi 795422663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 795522663e35Smrg ;; 79561d54945dSmrg 795722663e35Smrg amigaos*) 795822663e35Smrg case $host_cpu in 795922663e35Smrg powerpc) 796022663e35Smrg # see comment about AmigaOS4 .so support 796122663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 796222663e35Smrg ;; 796322663e35Smrg m68k) 796422663e35Smrg # FIXME: we need at least 68020 code to build shared libraries, but 796522663e35Smrg # adding the '-m68020' flag to GCC prevents building anything better, 796622663e35Smrg # like '-m68040'. 796722663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 796822663e35Smrg ;; 796922663e35Smrg esac 797022663e35Smrg ;; 79711d54945dSmrg 797222663e35Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 797322663e35Smrg # PIC is the default for these OSes. 797422663e35Smrg ;; 79751d54945dSmrg 797622663e35Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 797722663e35Smrg # This hack is so that the source file can tell whether it is being 797822663e35Smrg # built for inclusion in a dll (and should export symbols for example). 797922663e35Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 798022663e35Smrg # (--disable-auto-import) libraries 798122663e35Smrg m4_if([$1], [GCJ], [], 798222663e35Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 798322663e35Smrg case $host_os in 798422663e35Smrg os2*) 798522663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 798622663e35Smrg ;; 798722663e35Smrg esac 798822663e35Smrg ;; 79891d54945dSmrg 799022663e35Smrg darwin* | rhapsody*) 799122663e35Smrg # PIC is the default on this platform 799222663e35Smrg # Common symbols not allowed in MH_DYLIB files 799322663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 799422663e35Smrg ;; 7995d769e936Smrg 799622663e35Smrg haiku*) 799722663e35Smrg # PIC is the default for Haiku. 799822663e35Smrg # The "-static" flag exists, but is broken. 799922663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 800022663e35Smrg ;; 8001d769e936Smrg 800222663e35Smrg hpux*) 800322663e35Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 800422663e35Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 800522663e35Smrg # sets the default TLS model and affects inlining. 800622663e35Smrg case $host_cpu in 800722663e35Smrg hppa*64*) 800822663e35Smrg # +Z the default 800922663e35Smrg ;; 801022663e35Smrg *) 801122663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 801222663e35Smrg ;; 801322663e35Smrg esac 801422663e35Smrg ;; 80151d54945dSmrg 801622663e35Smrg interix[[3-9]]*) 801722663e35Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 801822663e35Smrg # Instead, we relocate shared libraries at runtime. 801922663e35Smrg ;; 8020ba85709eSmrg 802122663e35Smrg msdosdjgpp*) 802222663e35Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 802322663e35Smrg # on systems that don't support them. 802422663e35Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 802522663e35Smrg enable_shared=no 802622663e35Smrg ;; 8027ba85709eSmrg 802822663e35Smrg *nto* | *qnx*) 802922663e35Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 803022663e35Smrg # it will coredump. 803122663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 803222663e35Smrg ;; 8033ba85709eSmrg 803422663e35Smrg sysv4*MP*) 803522663e35Smrg if test -d /usr/nec; then 803622663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 803722663e35Smrg fi 803822663e35Smrg ;; 8039ba85709eSmrg 804022663e35Smrg *) 804122663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 804222663e35Smrg ;; 804322663e35Smrg esac 8044d769e936Smrg 804522663e35Smrg case $cc_basename in 804622663e35Smrg nvcc*) # Cuda Compiler Driver 2.2 804722663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 804822663e35Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 804922663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8050ec713c28Smrg fi 805122663e35Smrg ;; 805222663e35Smrg esac 805322663e35Smrg else 805422663e35Smrg # PORTME Check for flag to pass linker flags through the system compiler. 805522663e35Smrg case $host_os in 805622663e35Smrg aix*) 805722663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 805822663e35Smrg if test ia64 = "$host_cpu"; then 805922663e35Smrg # AIX 5 now supports IA64 processor 806022663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 806122663e35Smrg else 806222663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 806322663e35Smrg fi 806422663e35Smrg ;; 8065d769e936Smrg 806622663e35Smrg darwin* | rhapsody*) 806722663e35Smrg # PIC is the default on this platform 806822663e35Smrg # Common symbols not allowed in MH_DYLIB files 806922663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 807022663e35Smrg case $cc_basename in 807122663e35Smrg nagfor*) 807222663e35Smrg # NAG Fortran compiler 807322663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 807422663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 807522663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 807622663e35Smrg ;; 807722663e35Smrg esac 807822663e35Smrg ;; 8079d769e936Smrg 808022663e35Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 808122663e35Smrg # This hack is so that the source file can tell whether it is being 808222663e35Smrg # built for inclusion in a dll (and should export symbols for example). 808322663e35Smrg m4_if([$1], [GCJ], [], 808422663e35Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 808522663e35Smrg case $host_os in 808622663e35Smrg os2*) 808722663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 808822663e35Smrg ;; 808922663e35Smrg esac 809022663e35Smrg ;; 8091d769e936Smrg 809222663e35Smrg hpux9* | hpux10* | hpux11*) 809322663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 809422663e35Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 809522663e35Smrg # not for PA HP-UX. 809622663e35Smrg case $host_cpu in 809722663e35Smrg hppa*64*|ia64*) 809822663e35Smrg # +Z the default 809922663e35Smrg ;; 810022663e35Smrg *) 810122663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 810222663e35Smrg ;; 810322663e35Smrg esac 810422663e35Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 810522663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 810622663e35Smrg ;; 8107d769e936Smrg 810822663e35Smrg irix5* | irix6* | nonstopux*) 810922663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 811022663e35Smrg # PIC (with -KPIC) is the default. 811122663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 811222663e35Smrg ;; 8113d769e936Smrg 811422663e35Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 811522663e35Smrg case $cc_basename in 811622663e35Smrg # old Intel for x86_64, which still supported -KPIC. 811722663e35Smrg ecc*) 811822663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 811922663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 812022663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8121d769e936Smrg ;; 812222663e35Smrg # icc used to be incompatible with GCC. 812322663e35Smrg # ICC 10 doesn't accept -KPIC any more. 812422663e35Smrg icc* | ifort*) 812522663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 812622663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 812722663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8128d769e936Smrg ;; 812922663e35Smrg # Lahey Fortran 8.1. 813022663e35Smrg lf95*) 813122663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 813222663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 813322663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 813422663e35Smrg ;; 813522663e35Smrg nagfor*) 813622663e35Smrg # NAG Fortran compiler 813722663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 813822663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 813922663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 814022663e35Smrg ;; 814122663e35Smrg tcc*) 814222663e35Smrg # Fabrice Bellard et al's Tiny C Compiler 814322663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 814422663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 814522663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 814622663e35Smrg ;; 814722663e35Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 814822663e35Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 814922663e35Smrg # which looks to be a dead project) 815022663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 815122663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 815222663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8153d769e936Smrg ;; 815422663e35Smrg ccc*) 815522663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 815622663e35Smrg # All Alpha code is PIC. 815722663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8158d769e936Smrg ;; 815922663e35Smrg xl* | bgxl* | bgf* | mpixl*) 816022663e35Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 816122663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 816222663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 816322663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 816422663e35Smrg ;; 816522663e35Smrg *) 816622663e35Smrg case `$CC -V 2>&1 | $SED 5q` in 816722663e35Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 816822663e35Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 816922663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 817022663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 817122663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 817222663e35Smrg ;; 817322663e35Smrg *Sun\ F* | *Sun*Fortran*) 817422663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 817522663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 817622663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 817722663e35Smrg ;; 817822663e35Smrg *Sun\ C*) 817922663e35Smrg # Sun C 5.9 818022663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 818122663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 818222663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 818322663e35Smrg ;; 818422663e35Smrg *Intel*\ [[CF]]*Compiler*) 818522663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 818622663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 818722663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 818822663e35Smrg ;; 818922663e35Smrg *Portland\ Group*) 819022663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 819122663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 819222663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 819322663e35Smrg ;; 819422663e35Smrg esac 819522663e35Smrg ;; 819622663e35Smrg esac 819722663e35Smrg ;; 8198d769e936Smrg 819922663e35Smrg newsos6) 820022663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 820122663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 820222663e35Smrg ;; 8203d769e936Smrg 820422663e35Smrg *nto* | *qnx*) 820522663e35Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 820622663e35Smrg # it will coredump. 820722663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 820822663e35Smrg ;; 8209d769e936Smrg 821022663e35Smrg osf3* | osf4* | osf5*) 821122663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 821222663e35Smrg # All OSF/1 code is PIC. 821322663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 821422663e35Smrg ;; 8215d769e936Smrg 821622663e35Smrg rdos*) 821722663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 821822663e35Smrg ;; 8219d769e936Smrg 822022663e35Smrg solaris*) 822122663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 822222663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 822322663e35Smrg case $cc_basename in 822422663e35Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 822522663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 822622663e35Smrg *) 822722663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 822822663e35Smrg esac 822922663e35Smrg ;; 8230d769e936Smrg 823122663e35Smrg sunos4*) 823222663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 823322663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 823422663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 823522663e35Smrg ;; 8236d769e936Smrg 823722663e35Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 823822663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 823922663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 824022663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 824122663e35Smrg ;; 8242d769e936Smrg 824322663e35Smrg sysv4*MP*) 824422663e35Smrg if test -d /usr/nec; then 824522663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 824622663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 824722663e35Smrg fi 824822663e35Smrg ;; 8249d769e936Smrg 825022663e35Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 825122663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 825222663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 825322663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 825422663e35Smrg ;; 8255d769e936Smrg 825622663e35Smrg unicos*) 825722663e35Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 825822663e35Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 825922663e35Smrg ;; 8260d769e936Smrg 826122663e35Smrg uts4*) 826222663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 826322663e35Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 826422663e35Smrg ;; 8265d769e936Smrg 826622663e35Smrg *) 826722663e35Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 826822663e35Smrg ;; 826922663e35Smrg esac 827022663e35Smrg fi 8271d769e936Smrg]) 827222663e35Smrgcase $host_os in 827322663e35Smrg # For platforms that do not support PIC, -DPIC is meaningless: 827422663e35Smrg *djgpp*) 827522663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 827622663e35Smrg ;; 827722663e35Smrg *) 827822663e35Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 827922663e35Smrg ;; 828022663e35Smrgesac 8281d769e936Smrg 828222663e35SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 828322663e35Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 828422663e35Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 828522663e35Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8286d769e936Smrg 828722663e35Smrg# 828822663e35Smrg# Check to make sure the PIC flag actually works. 828922663e35Smrg# 829022663e35Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 829122663e35Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 829222663e35Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 829322663e35Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 829422663e35Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 829522663e35Smrg "" | " "*) ;; 829622663e35Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 829722663e35Smrg esac], 829822663e35Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 829922663e35Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 830022663e35Smrgfi 830122663e35Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 830222663e35Smrg [Additional compiler flags for building library objects]) 8303d769e936Smrg 830422663e35Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 830522663e35Smrg [How to pass a linker flag through the compiler]) 830622663e35Smrg# 830722663e35Smrg# Check to make sure the static flag actually works. 830822663e35Smrg# 830922663e35Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 831022663e35Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 831122663e35Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 831222663e35Smrg $lt_tmp_static_flag, 831322663e35Smrg [], 831422663e35Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 831522663e35Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 831622663e35Smrg [Compiler flag to prevent dynamic linking]) 831722663e35Smrg])# _LT_COMPILER_PIC 8318d769e936Smrg 8319d769e936Smrg 832022663e35Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 832122663e35Smrg# ---------------------------- 832222663e35Smrg# See if the linker supports building shared libraries. 832322663e35Smrgm4_defun([_LT_LINKER_SHLIBS], 832422663e35Smrg[AC_REQUIRE([LT_PATH_LD])dnl 832522663e35SmrgAC_REQUIRE([LT_PATH_NM])dnl 832622663e35Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 832722663e35Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 832822663e35Smrgm4_require([_LT_DECL_EGREP])dnl 832922663e35Smrgm4_require([_LT_DECL_SED])dnl 833022663e35Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 833122663e35Smrgm4_require([_LT_TAG_COMPILER])dnl 833222663e35SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 833322663e35Smrgm4_if([$1], [CXX], [ 833422663e35Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 833522663e35Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 833622663e35Smrg case $host_os in 833722663e35Smrg aix[[4-9]]*) 833822663e35Smrg # If we're using GNU nm, then we don't want the "-C" option. 833922663e35Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 834022663e35Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 834122663e35Smrg # weak defined symbols like other global defined symbols, whereas 834222663e35Smrg # GNU nm marks them as "W". 834322663e35Smrg # While the 'weak' keyword is ignored in the Export File, we need 834422663e35Smrg # it in the Import File for the 'aix-soname' feature, so we have 834522663e35Smrg # to replace the "-B" option with "-P" for AIX nm. 834622663e35Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 834722663e35Smrg _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' 834822663e35Smrg else 834922663e35Smrg _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' 835022663e35Smrg fi 835122663e35Smrg ;; 835222663e35Smrg pw32*) 835322663e35Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 835422663e35Smrg ;; 835522663e35Smrg cygwin* | mingw* | cegcc*) 835622663e35Smrg case $cc_basename in 835722663e35Smrg cl* | icl*) 835822663e35Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 835922663e35Smrg ;; 836022663e35Smrg *) 836122663e35Smrg _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' 836222663e35Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 836322663e35Smrg ;; 836422663e35Smrg esac 836522663e35Smrg ;; 836622663e35Smrg *) 836722663e35Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 836822663e35Smrg ;; 836922663e35Smrg esac 837022663e35Smrg], [ 837122663e35Smrg runpath_var= 837222663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 837322663e35Smrg _LT_TAGVAR(always_export_symbols, $1)=no 837422663e35Smrg _LT_TAGVAR(archive_cmds, $1)= 837522663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 837622663e35Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 837722663e35Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 837822663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 837922663e35Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 838022663e35Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 838122663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=no 838222663e35Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 838322663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 838422663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 838522663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 838622663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 838722663e35Smrg _LT_TAGVAR(inherit_rpath, $1)=no 838822663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 838922663e35Smrg _LT_TAGVAR(module_cmds, $1)= 839022663e35Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 839122663e35Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 839222663e35Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 839322663e35Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 839422663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 839522663e35Smrg # include_expsyms should be a list of space-separated symbols to be *always* 839622663e35Smrg # included in the symbol list 839722663e35Smrg _LT_TAGVAR(include_expsyms, $1)= 839822663e35Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 839922663e35Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 840022663e35Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 840122663e35Smrg # as well as any symbol that contains 'd'. 840222663e35Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 840322663e35Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 840422663e35Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 840522663e35Smrg # the symbol is explicitly referenced. Since portable code cannot 840622663e35Smrg # rely on this symbol name, it's probably fine to never include it in 840722663e35Smrg # preloaded symbol tables. 840822663e35Smrg # Exclude shared library initialization/finalization symbols. 840922663e35Smrgdnl Note also adjust exclude_expsyms for C++ above. 841022663e35Smrg extract_expsyms_cmds= 8411d769e936Smrg 841222663e35Smrg case $host_os in 841322663e35Smrg cygwin* | mingw* | pw32* | cegcc*) 841422663e35Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 841522663e35Smrg # When not using gcc, we currently assume that we are using 841622663e35Smrg # Microsoft Visual C++ or Intel C++ Compiler. 841722663e35Smrg if test yes != "$GCC"; then 841822663e35Smrg with_gnu_ld=no 841922663e35Smrg fi 842022663e35Smrg ;; 842122663e35Smrg interix*) 842222663e35Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 842322663e35Smrg with_gnu_ld=yes 842422663e35Smrg ;; 842522663e35Smrg openbsd* | bitrig*) 842622663e35Smrg with_gnu_ld=no 842722663e35Smrg ;; 842822663e35Smrg esac 8429d769e936Smrg 843022663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8431d769e936Smrg 843222663e35Smrg # On some targets, GNU ld is compatible enough with the native linker 843322663e35Smrg # that we're better off using the native interface for both. 843422663e35Smrg lt_use_gnu_ld_interface=no 843522663e35Smrg if test yes = "$with_gnu_ld"; then 843622663e35Smrg case $host_os in 843722663e35Smrg aix*) 843822663e35Smrg # The AIX port of GNU ld has always aspired to compatibility 843922663e35Smrg # with the native linker. However, as the warning in the GNU ld 844022663e35Smrg # block says, versions before 2.19.5* couldn't really create working 844122663e35Smrg # shared libraries, regardless of the interface used. 844222663e35Smrg case `$LD -v 2>&1` in 844322663e35Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 844422663e35Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 844522663e35Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 844622663e35Smrg *) 844722663e35Smrg lt_use_gnu_ld_interface=yes 844822663e35Smrg ;; 844922663e35Smrg esac 845022663e35Smrg ;; 845122663e35Smrg *) 845222663e35Smrg lt_use_gnu_ld_interface=yes 845322663e35Smrg ;; 845422663e35Smrg esac 845522663e35Smrg fi 8456d769e936Smrg 845722663e35Smrg if test yes = "$lt_use_gnu_ld_interface"; then 845822663e35Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 845922663e35Smrg wlarc='$wl' 8460d769e936Smrg 846122663e35Smrg # Set some defaults for GNU ld with shared library support. These 846222663e35Smrg # are reset later if shared libraries are not supported. Putting them 846322663e35Smrg # here allows them to be overridden if necessary. 846422663e35Smrg runpath_var=LD_RUN_PATH 846522663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 846622663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 846722663e35Smrg # ancient GNU ld didn't support --whole-archive et. al. 846822663e35Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 846922663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 847022663e35Smrg else 847122663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 847222663e35Smrg fi 847322663e35Smrg supports_anon_versioning=no 847422663e35Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 847522663e35Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 847622663e35Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 847722663e35Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 847822663e35Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 847922663e35Smrg *\ 2.11.*) ;; # other 2.11 versions 848022663e35Smrg *) supports_anon_versioning=yes ;; 848122663e35Smrg esac 8482d769e936Smrg 848322663e35Smrg # See if GNU ld supports shared libraries. 848422663e35Smrg case $host_os in 848522663e35Smrg aix[[3-9]]*) 848622663e35Smrg # On AIX/PPC, the GNU linker is very broken 848722663e35Smrg if test ia64 != "$host_cpu"; then 848822663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 848922663e35Smrg cat <<_LT_EOF 1>&2 8490d769e936Smrg 849122663e35Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 849222663e35Smrg*** to be unable to reliably create shared libraries on AIX. 849322663e35Smrg*** Therefore, libtool is disabling shared libraries support. If you 849422663e35Smrg*** really care for shared libraries, you may want to install binutils 849522663e35Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 849622663e35Smrg*** You will then need to restart the configuration process. 8497d769e936Smrg 849822663e35Smrg_LT_EOF 849922663e35Smrg fi 850022663e35Smrg ;; 8501d769e936Smrg 850222663e35Smrg amigaos*) 850322663e35Smrg case $host_cpu in 850422663e35Smrg powerpc) 850522663e35Smrg # see comment about AmigaOS4 .so support 850622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 850722663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 850822663e35Smrg ;; 850922663e35Smrg m68k) 851022663e35Smrg _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)' 851122663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 851222663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 851322663e35Smrg ;; 851422663e35Smrg esac 851522663e35Smrg ;; 8516d769e936Smrg 851722663e35Smrg beos*) 851822663e35Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 851922663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 852022663e35Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 852122663e35Smrg # support --undefined. This deserves some investigation. FIXME 852222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 852322663e35Smrg else 852422663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 852522663e35Smrg fi 852622663e35Smrg ;; 8527d769e936Smrg 852822663e35Smrg cygwin* | mingw* | pw32* | cegcc*) 852922663e35Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 853022663e35Smrg # as there is no search path for DLLs. 853122663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 853222663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 853322663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 853422663e35Smrg _LT_TAGVAR(always_export_symbols, $1)=no 853522663e35Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 853622663e35Smrg _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' 853722663e35Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8538d769e936Smrg 853922663e35Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 854022663e35Smrg _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' 854122663e35Smrg # If the export-symbols file already is a .def file, use it as 854222663e35Smrg # is; otherwise, prepend EXPORTS... 854322663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 854422663e35Smrg cp $export_symbols $output_objdir/$soname.def; 854522663e35Smrg else 854622663e35Smrg echo EXPORTS > $output_objdir/$soname.def; 854722663e35Smrg cat $export_symbols >> $output_objdir/$soname.def; 854822663e35Smrg fi~ 854922663e35Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 855022663e35Smrg else 855122663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 855222663e35Smrg fi 855322663e35Smrg ;; 8554d769e936Smrg 855522663e35Smrg haiku*) 855622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 855722663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 855822663e35Smrg ;; 8559d769e936Smrg 856022663e35Smrg os2*) 856122663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 856222663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 856322663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 856422663e35Smrg shrext_cmds=.dll 856522663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 856622663e35Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 856722663e35Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 856822663e35Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 856922663e35Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 857022663e35Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 857122663e35Smrg emximp -o $lib $output_objdir/$libname.def' 857222663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 857322663e35Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 857422663e35Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 857522663e35Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 857622663e35Smrg prefix_cmds="$SED"~ 857722663e35Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 857822663e35Smrg prefix_cmds="$prefix_cmds -e 1d"; 857922663e35Smrg fi~ 858022663e35Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 858122663e35Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 858222663e35Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 858322663e35Smrg emximp -o $lib $output_objdir/$libname.def' 858422663e35Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 858522663e35Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 858622663e35Smrg _LT_TAGVAR(file_list_spec, $1)='@' 858722663e35Smrg ;; 8588d769e936Smrg 858922663e35Smrg interix[[3-9]]*) 859022663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=no 859122663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 859222663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 859322663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 859422663e35Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 859522663e35Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 859622663e35Smrg # default) and relocated if they conflict, which is a slow very memory 859722663e35Smrg # consuming and fragmenting process. To avoid this, we pick a random, 859822663e35Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 859922663e35Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 860022663e35Smrg _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' 860122663e35Smrg _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' 8602d769e936Smrg ;; 8603d769e936Smrg 860422663e35Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 860522663e35Smrg tmp_diet=no 860622663e35Smrg if test linux-dietlibc = "$host_os"; then 860722663e35Smrg case $cc_basename in 860822663e35Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 860922663e35Smrg esac 861022663e35Smrg fi 861122663e35Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 861222663e35Smrg && test no = "$tmp_diet" 861322663e35Smrg then 861422663e35Smrg tmp_addflag=' $pic_flag' 861522663e35Smrg tmp_sharedflag='-shared' 861622663e35Smrg case $cc_basename,$host_cpu in 861722663e35Smrg pgcc*) # Portland Group C compiler 861822663e35Smrg _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' 861922663e35Smrg tmp_addflag=' $pic_flag' 862022663e35Smrg ;; 862122663e35Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 862222663e35Smrg # Portland Group f77 and f90 compilers 862322663e35Smrg _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' 862422663e35Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 862522663e35Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 862622663e35Smrg tmp_addflag=' -i_dynamic' ;; 862722663e35Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 862822663e35Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 862922663e35Smrg ifc* | ifort*) # Intel Fortran compiler 863022663e35Smrg tmp_addflag=' -nofor_main' ;; 863122663e35Smrg lf95*) # Lahey Fortran 8.1 863222663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 863322663e35Smrg tmp_sharedflag='--shared' ;; 863422663e35Smrg nagfor*) # NAGFOR 5.3 863522663e35Smrg tmp_sharedflag='-Wl,-shared' ;; 863622663e35Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 863722663e35Smrg tmp_sharedflag='-qmkshrobj' 863822663e35Smrg tmp_addflag= ;; 863922663e35Smrg nvcc*) # Cuda Compiler Driver 2.2 864022663e35Smrg _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' 864122663e35Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 864222663e35Smrg ;; 864322663e35Smrg esac 864422663e35Smrg case `$CC -V 2>&1 | $SED 5q` in 864522663e35Smrg *Sun\ C*) # Sun C 5.9 864622663e35Smrg _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' 864722663e35Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 864822663e35Smrg tmp_sharedflag='-G' ;; 864922663e35Smrg *Sun\ F*) # Sun Fortran 8.3 865022663e35Smrg tmp_sharedflag='-G' ;; 865122663e35Smrg esac 865222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8653d769e936Smrg 865422663e35Smrg if test yes = "$supports_anon_versioning"; then 865522663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 865622663e35Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 865722663e35Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 865822663e35Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 865922663e35Smrg fi 8660d769e936Smrg 866122663e35Smrg case $cc_basename in 866222663e35Smrg tcc*) 866322663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 866422663e35Smrg ;; 866522663e35Smrg xlf* | bgf* | bgxlf* | mpixlf*) 866622663e35Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 866722663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 866822663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 866922663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 867022663e35Smrg if test yes = "$supports_anon_versioning"; then 867122663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 867222663e35Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 867322663e35Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 867422663e35Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 867522663e35Smrg fi 867622663e35Smrg ;; 867722663e35Smrg esac 867822663e35Smrg else 867922663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 868022663e35Smrg fi 868122663e35Smrg ;; 8682d769e936Smrg 868322663e35Smrg netbsd*) 868422663e35Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 868522663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 868622663e35Smrg wlarc= 868722663e35Smrg else 868822663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 868922663e35Smrg _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' 869022663e35Smrg fi 869122663e35Smrg ;; 8692d769e936Smrg 869322663e35Smrg solaris*) 869422663e35Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 869522663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 869622663e35Smrg cat <<_LT_EOF 1>&2 8697d769e936Smrg 869822663e35Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 869922663e35Smrg*** create shared libraries on Solaris systems. Therefore, libtool 870022663e35Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 870122663e35Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 870222663e35Smrg*** your PATH or compiler configuration so that the native linker is 870322663e35Smrg*** used, and then restart. 8704d769e936Smrg 870522663e35Smrg_LT_EOF 870622663e35Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 870722663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 870822663e35Smrg _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' 870922663e35Smrg else 871022663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 871122663e35Smrg fi 871222663e35Smrg ;; 8713d769e936Smrg 871422663e35Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 871522663e35Smrg case `$LD -v 2>&1` in 871622663e35Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 871722663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 871822663e35Smrg cat <<_LT_EOF 1>&2 8719d769e936Smrg 872022663e35Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 872122663e35Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 872222663e35Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 872322663e35Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 872422663e35Smrg*** your PATH or compiler configuration so that the native linker is 872522663e35Smrg*** used, and then restart. 872622663e35Smrg 872722663e35Smrg_LT_EOF 872822663e35Smrg ;; 872922663e35Smrg *) 873022663e35Smrg # For security reasons, it is highly recommended that you always 873122663e35Smrg # use absolute paths for naming shared libraries, and exclude the 873222663e35Smrg # DT_RUNPATH tag from executables and libraries. But doing so 873322663e35Smrg # requires that you compile everything twice, which is a pain. 873422663e35Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 873522663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 873622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 873722663e35Smrg _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' 873822663e35Smrg else 873922663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 874022663e35Smrg fi 874122663e35Smrg ;; 874222663e35Smrg esac 8743d769e936Smrg ;; 8744d769e936Smrg 874522663e35Smrg sunos4*) 874622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 874722663e35Smrg wlarc= 874822663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 874922663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 875022663e35Smrg ;; 8751d769e936Smrg 875222663e35Smrg *) 875322663e35Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 875422663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 875522663e35Smrg _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' 875622663e35Smrg else 875722663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 875822663e35Smrg fi 875922663e35Smrg ;; 876022663e35Smrg esac 8761d769e936Smrg 876222663e35Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 876322663e35Smrg runpath_var= 876422663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 876522663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 876622663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 876722663e35Smrg fi 876822663e35Smrg else 876922663e35Smrg # PORTME fill in a description of your system's linker (not GNU ld) 877022663e35Smrg case $host_os in 877122663e35Smrg aix3*) 877222663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 877322663e35Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 877422663e35Smrg _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' 877522663e35Smrg # Note: this linker hardcodes the directories in LIBPATH if there 877622663e35Smrg # are no directories specified by -L. 877722663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 877822663e35Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 877922663e35Smrg # Neither direct hardcoding nor static linking is supported with a 878022663e35Smrg # broken collect2. 878122663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 878222663e35Smrg fi 878322663e35Smrg ;; 8784d769e936Smrg 878522663e35Smrg aix[[4-9]]*) 878622663e35Smrg if test ia64 = "$host_cpu"; then 878722663e35Smrg # On IA64, the linker does run time linking by default, so we don't 878822663e35Smrg # have to do anything special. 878922663e35Smrg aix_use_runtimelinking=no 879022663e35Smrg exp_sym_flag='-Bexport' 879122663e35Smrg no_entry_flag= 879222663e35Smrg else 879322663e35Smrg # If we're using GNU nm, then we don't want the "-C" option. 879422663e35Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 879522663e35Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 879622663e35Smrg # weak defined symbols like other global defined symbols, whereas 879722663e35Smrg # GNU nm marks them as "W". 879822663e35Smrg # While the 'weak' keyword is ignored in the Export File, we need 879922663e35Smrg # it in the Import File for the 'aix-soname' feature, so we have 880022663e35Smrg # to replace the "-B" option with "-P" for AIX nm. 880122663e35Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 880222663e35Smrg _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' 880322663e35Smrg else 880422663e35Smrg _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' 880522663e35Smrg fi 880622663e35Smrg aix_use_runtimelinking=no 8807d769e936Smrg 880822663e35Smrg # Test if we are trying to use run time linking or normal 880922663e35Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 881022663e35Smrg # have runtime linking enabled, and use it for executables. 881122663e35Smrg # For shared libraries, we enable/disable runtime linking 881222663e35Smrg # depending on the kind of the shared library created - 881322663e35Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 881422663e35Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 881522663e35Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 881622663e35Smrg # lib.a static archive 881722663e35Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 881822663e35Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 881922663e35Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 882022663e35Smrg # lib.a(lib.so.V) shared, rtl:no 882122663e35Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 882222663e35Smrg # lib.a static archive 882322663e35Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 882422663e35Smrg for ld_flag in $LDFLAGS; do 882522663e35Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 882622663e35Smrg aix_use_runtimelinking=yes 882722663e35Smrg break 882822663e35Smrg fi 882922663e35Smrg done 883022663e35Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 883122663e35Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 883222663e35Smrg # so we don't have lib.a shared libs to link our executables. 883322663e35Smrg # We have to force runtime linking in this case. 883422663e35Smrg aix_use_runtimelinking=yes 883522663e35Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 883622663e35Smrg fi 883722663e35Smrg ;; 883822663e35Smrg esac 8839d769e936Smrg 884022663e35Smrg exp_sym_flag='-bexport' 884122663e35Smrg no_entry_flag='-bnoentry' 884222663e35Smrg fi 884322663e35Smrg 884422663e35Smrg # When large executables or shared objects are built, AIX ld can 884522663e35Smrg # have problems creating the table of contents. If linking a library 884622663e35Smrg # or program results in "error TOC overflow" add -mminimal-toc to 884722663e35Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 884822663e35Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8849d769e936Smrg 885022663e35Smrg _LT_TAGVAR(archive_cmds, $1)='' 885122663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 885222663e35Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 885322663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 885422663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 885522663e35Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 885622663e35Smrg case $with_aix_soname,$aix_use_runtimelinking in 885722663e35Smrg aix,*) ;; # traditional, no import file 885822663e35Smrg svr4,* | *,yes) # use import file 885922663e35Smrg # The Import File defines what to hardcode. 886022663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=no 886122663e35Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 886222663e35Smrg ;; 886322663e35Smrg esac 8864d769e936Smrg 886522663e35Smrg if test yes = "$GCC"; then 886622663e35Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 886722663e35Smrg # We only want to do this on AIX 4.2 and lower, the check 886822663e35Smrg # below for broken collect2 doesn't work under 4.3+ 886922663e35Smrg collect2name=`$CC -print-prog-name=collect2` 887022663e35Smrg if test -f "$collect2name" && 887122663e35Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 887222663e35Smrg then 887322663e35Smrg # We have reworked collect2 887422663e35Smrg : 887522663e35Smrg else 887622663e35Smrg # We have old collect2 887722663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 887822663e35Smrg # It fails to find uninstalled libraries when the uninstalled 887922663e35Smrg # path is not listed in the libpath. Setting hardcode_minus_L 888022663e35Smrg # to unsupported forces relinking 888122663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 888222663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 888322663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 888422663e35Smrg fi 888522663e35Smrg ;; 888622663e35Smrg esac 888722663e35Smrg shared_flag='-shared' 888822663e35Smrg if test yes = "$aix_use_runtimelinking"; then 888922663e35Smrg shared_flag="$shared_flag "'$wl-G' 889022663e35Smrg fi 889122663e35Smrg # Need to ensure runtime linking is disabled for the traditional 889222663e35Smrg # shared library, or the linker may eventually find shared libraries 889322663e35Smrg # /with/ Import File - we do not want to mix them. 889422663e35Smrg shared_flag_aix='-shared' 889522663e35Smrg shared_flag_svr4='-shared $wl-G' 889622663e35Smrg else 889722663e35Smrg # not using gcc 889822663e35Smrg if test ia64 = "$host_cpu"; then 889922663e35Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 890022663e35Smrg # chokes on -Wl,-G. The following line is correct: 890122663e35Smrg shared_flag='-G' 890222663e35Smrg else 890322663e35Smrg if test yes = "$aix_use_runtimelinking"; then 890422663e35Smrg shared_flag='$wl-G' 890522663e35Smrg else 890622663e35Smrg shared_flag='$wl-bM:SRE' 890722663e35Smrg fi 890822663e35Smrg shared_flag_aix='$wl-bM:SRE' 890922663e35Smrg shared_flag_svr4='$wl-G' 891022663e35Smrg fi 891122663e35Smrg fi 8912d769e936Smrg 891322663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 891422663e35Smrg # It seems that -bexpall does not export symbols beginning with 891522663e35Smrg # underscore (_), so it is better to generate a list of symbols to export. 891622663e35Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 891722663e35Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 891822663e35Smrg # Warning - without using the other runtime loading flags (-brtl), 891922663e35Smrg # -berok will link without error, but may produce a broken library. 892022663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 892122663e35Smrg # Determine the default libpath from the value encoded in an 892222663e35Smrg # empty executable. 892322663e35Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 892422663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 892522663e35Smrg _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 892622663e35Smrg else 892722663e35Smrg if test ia64 = "$host_cpu"; then 892822663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 892922663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 893022663e35Smrg _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" 893122663e35Smrg else 893222663e35Smrg # Determine the default libpath from the value encoded in an 893322663e35Smrg # empty executable. 893422663e35Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 893522663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 893622663e35Smrg # Warning - without using the other run time loading flags, 893722663e35Smrg # -berok will link without error, but may produce a broken library. 893822663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 893922663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 894022663e35Smrg if test yes = "$with_gnu_ld"; then 894122663e35Smrg # We only use this code for GNU lds that support --whole-archive. 894222663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 894322663e35Smrg else 894422663e35Smrg # Exported symbols can be pulled into shared objects from archives 894522663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 894622663e35Smrg fi 894722663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 894822663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 894922663e35Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 895022663e35Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 895122663e35Smrg if test svr4 != "$with_aix_soname"; then 895222663e35Smrg # This is similar to how AIX traditionally builds its shared libraries. 895322663e35Smrg _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' 895422663e35Smrg fi 895522663e35Smrg if test aix != "$with_aix_soname"; then 895622663e35Smrg _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' 895722663e35Smrg else 895822663e35Smrg # used by -dlpreopen to get the symbols 895922663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 896022663e35Smrg fi 896122663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 8962d769e936Smrg fi 896322663e35Smrg fi 8964d769e936Smrg ;; 8965d769e936Smrg 896622663e35Smrg amigaos*) 896722663e35Smrg case $host_cpu in 896822663e35Smrg powerpc) 896922663e35Smrg # see comment about AmigaOS4 .so support 897022663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 897122663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 897222663e35Smrg ;; 897322663e35Smrg m68k) 897422663e35Smrg _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)' 897522663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 897622663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 897722663e35Smrg ;; 897822663e35Smrg esac 897922663e35Smrg ;; 8980d769e936Smrg 898122663e35Smrg bsdi[[45]]*) 898222663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 898322663e35Smrg ;; 8984d769e936Smrg 898522663e35Smrg cygwin* | mingw* | pw32* | cegcc*) 898622663e35Smrg # When not using gcc, we currently assume that we are using 898722663e35Smrg # Microsoft Visual C++ or Intel C++ Compiler. 898822663e35Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 898922663e35Smrg # no search path for DLLs. 899022663e35Smrg case $cc_basename in 899122663e35Smrg cl* | icl*) 899222663e35Smrg # Native MSVC or ICC 899322663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 899422663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 899522663e35Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 899622663e35Smrg _LT_TAGVAR(file_list_spec, $1)='@' 899722663e35Smrg # Tell ltmain to make .lib files, not .a files. 899822663e35Smrg libext=lib 899922663e35Smrg # Tell ltmain to make .dll files, not .so files. 900022663e35Smrg shrext_cmds=.dll 900122663e35Smrg # FIXME: Setting linknames here is a bad hack. 900222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 900322663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 900422663e35Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 900522663e35Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 900622663e35Smrg else 900722663e35Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 900822663e35Smrg fi~ 900922663e35Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 901022663e35Smrg linknames=' 901122663e35Smrg # The linker will not automatically build a static lib if we build a DLL. 901222663e35Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 901322663e35Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 901422663e35Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 901522663e35Smrg _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' 901622663e35Smrg # Don't use ranlib 901722663e35Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 901822663e35Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 901922663e35Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 902022663e35Smrg case $lt_outputfile in 902122663e35Smrg *.exe|*.EXE) ;; 902222663e35Smrg *) 902322663e35Smrg lt_outputfile=$lt_outputfile.exe 902422663e35Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 902522663e35Smrg ;; 902622663e35Smrg esac~ 902722663e35Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 902822663e35Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 902922663e35Smrg $RM "$lt_outputfile.manifest"; 903022663e35Smrg fi' 903122663e35Smrg ;; 903222663e35Smrg *) 903322663e35Smrg # Assume MSVC and ICC wrapper 903422663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 903522663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 903622663e35Smrg # Tell ltmain to make .lib files, not .a files. 903722663e35Smrg libext=lib 903822663e35Smrg # Tell ltmain to make .dll files, not .so files. 903922663e35Smrg shrext_cmds=.dll 904022663e35Smrg # FIXME: Setting linknames here is a bad hack. 904122663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 904222663e35Smrg # The linker will automatically build a .lib file if we build a DLL. 904322663e35Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 904422663e35Smrg # FIXME: Should let the user specify the lib program. 904522663e35Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 904622663e35Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 904722663e35Smrg ;; 904822663e35Smrg esac 904922663e35Smrg ;; 9050d769e936Smrg 905122663e35Smrg darwin* | rhapsody*) 905222663e35Smrg _LT_DARWIN_LINKER_FEATURES($1) 905322663e35Smrg ;; 9054d769e936Smrg 905522663e35Smrg dgux*) 905622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 905722663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 905822663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 905922663e35Smrg ;; 9060d769e936Smrg 906122663e35Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 906222663e35Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 906322663e35Smrg # does not break anything, and helps significantly (at the cost of a little 906422663e35Smrg # extra space). 906522663e35Smrg freebsd2.2*) 906622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 906722663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 906822663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 906922663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 907022663e35Smrg ;; 9071d769e936Smrg 907222663e35Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 907322663e35Smrg freebsd2.*) 907422663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 907522663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 907622663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 907722663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90787322289dSmrg ;; 907922663e35Smrg 908022663e35Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 908122663e35Smrg freebsd* | dragonfly* | midnightbsd*) 908222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 908322663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 908422663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 908522663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90867322289dSmrg ;; 90877322289dSmrg 908822663e35Smrg hpux9*) 908922663e35Smrg if test yes = "$GCC"; then 909022663e35Smrg _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' 909122663e35Smrg else 909222663e35Smrg _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' 909322663e35Smrg fi 909422663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 909522663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 909622663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 90977322289dSmrg 909822663e35Smrg # hardcode_minus_L: Not really in the search PATH, 909922663e35Smrg # but as the default location of the library. 910022663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 910122663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 910222663e35Smrg ;; 910322663e35Smrg 910422663e35Smrg hpux10*) 910522663e35Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 910622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 910722663e35Smrg else 910822663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 910922663e35Smrg fi 911022663e35Smrg if test no = "$with_gnu_ld"; then 911122663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 911222663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 911322663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 911422663e35Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 911522663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 911622663e35Smrg # hardcode_minus_L: Not really in the search PATH, 911722663e35Smrg # but as the default location of the library. 911822663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 911922663e35Smrg fi 912022663e35Smrg ;; 912122663e35Smrg 912222663e35Smrg hpux11*) 912322663e35Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 912422663e35Smrg case $host_cpu in 912522663e35Smrg hppa*64*) 912622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 912722663e35Smrg ;; 912822663e35Smrg ia64*) 912922663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 913022663e35Smrg ;; 913122663e35Smrg *) 913222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 913322663e35Smrg ;; 913422663e35Smrg esac 913522663e35Smrg else 913622663e35Smrg case $host_cpu in 913722663e35Smrg hppa*64*) 913822663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 913922663e35Smrg ;; 914022663e35Smrg ia64*) 914122663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 914222663e35Smrg ;; 914322663e35Smrg *) 914422663e35Smrg m4_if($1, [], [ 914522663e35Smrg # Older versions of the 11.00 compiler do not understand -b yet 914622663e35Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 914722663e35Smrg _LT_LINKER_OPTION([if $CC understands -b], 914822663e35Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 914922663e35Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 915022663e35Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 915122663e35Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 915222663e35Smrg ;; 915322663e35Smrg esac 915422663e35Smrg fi 915522663e35Smrg if test no = "$with_gnu_ld"; then 915622663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 915722663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 915822663e35Smrg 915922663e35Smrg case $host_cpu in 916022663e35Smrg hppa*64*|ia64*) 916122663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=no 916222663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 916322663e35Smrg ;; 916422663e35Smrg *) 916522663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 916622663e35Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 916722663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 91687322289dSmrg 916922663e35Smrg # hardcode_minus_L: Not really in the search PATH, 917022663e35Smrg # but as the default location of the library. 917122663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 917222663e35Smrg ;; 917322663e35Smrg esac 917422663e35Smrg fi 917522663e35Smrg ;; 91767322289dSmrg 917722663e35Smrg irix5* | irix6* | nonstopux*) 917822663e35Smrg if test yes = "$GCC"; then 917922663e35Smrg _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' 918022663e35Smrg # Try to use the -exported_symbol ld option, if it does not 918122663e35Smrg # work, assume that -exports_file does not work either and 918222663e35Smrg # implicitly export all symbols. 918322663e35Smrg # This should be the same for all languages, so no per-tag cache variable. 918422663e35Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 918522663e35Smrg [lt_cv_irix_exported_symbol], 918622663e35Smrg [save_LDFLAGS=$LDFLAGS 918722663e35Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 918822663e35Smrg AC_LINK_IFELSE( 918922663e35Smrg [AC_LANG_SOURCE( 919022663e35Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 919122663e35Smrg [C++], [[int foo (void) { return 0; }]], 919222663e35Smrg [Fortran 77], [[ 919322663e35Smrg subroutine foo 919422663e35Smrg end]], 919522663e35Smrg [Fortran], [[ 919622663e35Smrg subroutine foo 919722663e35Smrg end]])])], 919822663e35Smrg [lt_cv_irix_exported_symbol=yes], 919922663e35Smrg [lt_cv_irix_exported_symbol=no]) 920022663e35Smrg LDFLAGS=$save_LDFLAGS]) 920122663e35Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 920222663e35Smrg _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' 9203d769e936Smrg fi 920422663e35Smrg else 920522663e35Smrg _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' 920622663e35Smrg _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' 920722663e35Smrg fi 920822663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 920922663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 921022663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 921122663e35Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 921222663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9213d769e936Smrg ;; 9214d769e936Smrg 921522663e35Smrg linux*) 921622663e35Smrg case $cc_basename in 921722663e35Smrg tcc*) 921822663e35Smrg # Fabrice Bellard et al's Tiny C Compiler 921922663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 922022663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 922122663e35Smrg ;; 922222663e35Smrg esac 922322663e35Smrg ;; 9224d769e936Smrg 922522663e35Smrg netbsd*) 922622663e35Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 922722663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 922822663e35Smrg else 922922663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 923022663e35Smrg fi 923122663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 923222663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 923322663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 923422663e35Smrg ;; 9235d769e936Smrg 923622663e35Smrg newsos6) 923722663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 923822663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 923922663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 924022663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 924122663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 924222663e35Smrg ;; 9243d769e936Smrg 924422663e35Smrg *nto* | *qnx*) 924522663e35Smrg ;; 9246d769e936Smrg 924722663e35Smrg openbsd* | bitrig*) 924822663e35Smrg if test -f /usr/libexec/ld.so; then 924922663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 925022663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 925122663e35Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 925222663e35Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 925322663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 925422663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 925522663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 925622663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 925722663e35Smrg else 925822663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 925922663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 926022663e35Smrg fi 926122663e35Smrg else 926222663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 926322663e35Smrg fi 926422663e35Smrg ;; 9265d769e936Smrg 926622663e35Smrg os2*) 926722663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 926822663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 926922663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 927022663e35Smrg shrext_cmds=.dll 927122663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 927222663e35Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 927322663e35Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 927422663e35Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 927522663e35Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 927622663e35Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 927722663e35Smrg emximp -o $lib $output_objdir/$libname.def' 927822663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 927922663e35Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 928022663e35Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 928122663e35Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 928222663e35Smrg prefix_cmds="$SED"~ 928322663e35Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 928422663e35Smrg prefix_cmds="$prefix_cmds -e 1d"; 928522663e35Smrg fi~ 928622663e35Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 928722663e35Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 928822663e35Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 928922663e35Smrg emximp -o $lib $output_objdir/$libname.def' 929022663e35Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 929122663e35Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 929222663e35Smrg _LT_TAGVAR(file_list_spec, $1)='@' 929322663e35Smrg ;; 9294d769e936Smrg 929522663e35Smrg osf3*) 929622663e35Smrg if test yes = "$GCC"; then 929722663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 929822663e35Smrg _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' 929922663e35Smrg else 930022663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 930122663e35Smrg _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' 930222663e35Smrg fi 930322663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 930422663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 930522663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 930622663e35Smrg ;; 9307d769e936Smrg 930822663e35Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 930922663e35Smrg if test yes = "$GCC"; then 931022663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 931122663e35Smrg _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' 931222663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 931322663e35Smrg else 931422663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 931522663e35Smrg _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' 931622663e35Smrg _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~ 931722663e35Smrg $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' 9318d769e936Smrg 931922663e35Smrg # Both c and cxx compiler support -rpath directly 932022663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 932122663e35Smrg fi 932222663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 932322663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 932422663e35Smrg ;; 9325d769e936Smrg 932622663e35Smrg solaris*) 932722663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 932822663e35Smrg if test yes = "$GCC"; then 932922663e35Smrg wlarc='$wl' 933022663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 933122663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 933222663e35Smrg $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' 933322663e35Smrg else 933422663e35Smrg case `$CC -V 2>&1` in 933522663e35Smrg *"Compilers 5.0"*) 933622663e35Smrg wlarc='' 933722663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 933822663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 933922663e35Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 934022663e35Smrg ;; 934122663e35Smrg *) 934222663e35Smrg wlarc='$wl' 934322663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 934422663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 934522663e35Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 934622663e35Smrg ;; 934722663e35Smrg esac 934822663e35Smrg fi 934922663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 935022663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 935122663e35Smrg case $host_os in 935222663e35Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 935322663e35Smrg *) 935422663e35Smrg # The compiler driver will combine and reorder linker options, 935522663e35Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 935622663e35Smrg # but is careful enough not to reorder. 935722663e35Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 935822663e35Smrg if test yes = "$GCC"; then 935922663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 936022663e35Smrg else 936122663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 936222663e35Smrg fi 936322663e35Smrg ;; 936422663e35Smrg esac 936522663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 936622663e35Smrg ;; 9367d769e936Smrg 936822663e35Smrg sunos4*) 936922663e35Smrg if test sequent = "$host_vendor"; then 937022663e35Smrg # Use $CC to link under sequent, because it throws in some extra .o 937122663e35Smrg # files that make .init and .fini sections work. 937222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 937322663e35Smrg else 937422663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 937522663e35Smrg fi 937622663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 937722663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 937822663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 937922663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 938022663e35Smrg ;; 9381d769e936Smrg 938222663e35Smrg sysv4) 938322663e35Smrg case $host_vendor in 938422663e35Smrg sni) 938522663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 938622663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 938722663e35Smrg ;; 938822663e35Smrg siemens) 938922663e35Smrg ## LD is ld it makes a PLAMLIB 939022663e35Smrg ## CC just makes a GrossModule. 939122663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 939222663e35Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 939322663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=no 939422663e35Smrg ;; 939522663e35Smrg motorola) 939622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 939722663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 939822663e35Smrg ;; 939922663e35Smrg esac 940022663e35Smrg runpath_var='LD_RUN_PATH' 940122663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 940222663e35Smrg ;; 9403d769e936Smrg 940422663e35Smrg sysv4.3*) 940522663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 940622663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 940722663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 940822663e35Smrg ;; 9409d769e936Smrg 941022663e35Smrg sysv4*MP*) 941122663e35Smrg if test -d /usr/nec; then 941222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 941322663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 941422663e35Smrg runpath_var=LD_RUN_PATH 941522663e35Smrg hardcode_runpath_var=yes 941622663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 941722663e35Smrg fi 941822663e35Smrg ;; 9419d769e936Smrg 942022663e35Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 942122663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 942222663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 942322663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 942422663e35Smrg runpath_var='LD_RUN_PATH' 9425d769e936Smrg 942622663e35Smrg if test yes = "$GCC"; then 942722663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 942822663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 942922663e35Smrg else 943022663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 943122663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 943222663e35Smrg fi 943322663e35Smrg ;; 9434d769e936Smrg 943522663e35Smrg sysv5* | sco3.2v5* | sco5v6*) 943622663e35Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 943722663e35Smrg # link with -lc, and that would cause any symbols used from libc to 943822663e35Smrg # always be unresolved, which means just about no library would 943922663e35Smrg # ever link correctly. If we're not using GNU ld we use -z text 944022663e35Smrg # though, which does catch some bad symbols but isn't as heavy-handed 944122663e35Smrg # as -z defs. 944222663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 944322663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 944422663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 944522663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 944622663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 944722663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 944822663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 944922663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 945022663e35Smrg runpath_var='LD_RUN_PATH' 9451d769e936Smrg 945222663e35Smrg if test yes = "$GCC"; then 945322663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 945422663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 945522663e35Smrg else 945622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 945722663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 945822663e35Smrg fi 945922663e35Smrg ;; 9460d769e936Smrg 946122663e35Smrg uts4*) 946222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 946322663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 946422663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 946522663e35Smrg ;; 9466d769e936Smrg 946722663e35Smrg *) 946822663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 946922663e35Smrg ;; 947022663e35Smrg esac 9471d769e936Smrg 947222663e35Smrg if test sni = "$host_vendor"; then 947322663e35Smrg case $host in 947422663e35Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 947522663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 947622663e35Smrg ;; 947722663e35Smrg esac 947822663e35Smrg fi 947922663e35Smrg fi 948022663e35Smrg]) 948122663e35SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 948222663e35Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9483d769e936Smrg 948422663e35Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9485d769e936Smrg 948622663e35Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 948722663e35Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 948822663e35Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 948922663e35Smrg [The commands to extract the exported symbol list from a shared archive]) 9490d769e936Smrg 949122663e35Smrg# 949222663e35Smrg# Do we need to explicitly link libc? 949322663e35Smrg# 949422663e35Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 949522663e35Smrgx|xyes) 949622663e35Smrg # Assume -lc should be added 949722663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9498d769e936Smrg 949922663e35Smrg if test yes,yes = "$GCC,$enable_shared"; then 950022663e35Smrg case $_LT_TAGVAR(archive_cmds, $1) in 950122663e35Smrg *'~'*) 950222663e35Smrg # FIXME: we may have to deal with multi-command sequences. 950322663e35Smrg ;; 950422663e35Smrg '$CC '*) 950522663e35Smrg # Test whether the compiler implicitly links with -lc since on some 950622663e35Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 950722663e35Smrg # to ld, don't add -lc before -lgcc. 950822663e35Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 950922663e35Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 951022663e35Smrg [$RM conftest* 951122663e35Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9512d769e936Smrg 951322663e35Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 951422663e35Smrg soname=conftest 951522663e35Smrg lib=conftest 951622663e35Smrg libobjs=conftest.$ac_objext 951722663e35Smrg deplibs= 951822663e35Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 951922663e35Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 952022663e35Smrg compiler_flags=-v 952122663e35Smrg linker_flags=-v 952222663e35Smrg verstring= 952322663e35Smrg output_objdir=. 952422663e35Smrg libname=conftest 952522663e35Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 952622663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 952722663e35Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 952822663e35Smrg then 952922663e35Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 953022663e35Smrg else 953122663e35Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 953222663e35Smrg fi 953322663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 953422663e35Smrg else 953522663e35Smrg cat conftest.err 1>&5 953622663e35Smrg fi 953722663e35Smrg $RM conftest* 953822663e35Smrg ]) 953922663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 954022663e35Smrg ;; 954122663e35Smrg esac 954222663e35Smrg fi 954322663e35Smrg ;; 954422663e35Smrgesac 9545d769e936Smrg 954622663e35Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 954722663e35Smrg [Whether or not to add -lc for building shared libraries]) 954822663e35Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 954922663e35Smrg [enable_shared_with_static_runtimes], [0], 955022663e35Smrg [Whether or not to disallow shared libs when runtime libs are static]) 955122663e35Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 955222663e35Smrg [Compiler flag to allow reflexive dlopens]) 955322663e35Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 955422663e35Smrg [Compiler flag to generate shared objects directly from archives]) 955522663e35Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 955622663e35Smrg [Whether the compiler copes with passing no objects directly]) 955722663e35Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 955822663e35Smrg [Create an old-style archive from a shared archive]) 955922663e35Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 956022663e35Smrg [Create a temporary old-style archive to link instead of a shared archive]) 956122663e35Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 956222663e35Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 956322663e35Smrg_LT_TAGDECL([], [module_cmds], [2], 956422663e35Smrg [Commands used to build a loadable module if different from building 956522663e35Smrg a shared archive.]) 956622663e35Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 956722663e35Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 956822663e35Smrg [Whether we are building with GNU ld or not]) 956922663e35Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 957022663e35Smrg [Flag that allows shared libraries with undefined symbols to be built]) 957122663e35Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 957222663e35Smrg [Flag that enforces no undefined symbols]) 957322663e35Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 957422663e35Smrg [Flag to hardcode $libdir into a binary during linking. 957522663e35Smrg This must work even if $libdir does not exist]) 957622663e35Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 957722663e35Smrg [Whether we need a single "-rpath" flag with a separated argument]) 957822663e35Smrg_LT_TAGDECL([], [hardcode_direct], [0], 957922663e35Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 958022663e35Smrg DIR into the resulting binary]) 958122663e35Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 958222663e35Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 958322663e35Smrg DIR into the resulting binary and the resulting library dependency is 958422663e35Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 958522663e35Smrg library is relocated]) 958622663e35Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 958722663e35Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 958822663e35Smrg into the resulting binary]) 958922663e35Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 959022663e35Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 959122663e35Smrg into the resulting binary]) 959222663e35Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 959322663e35Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 959422663e35Smrg into the library and all subsequent libraries and executables linked 959522663e35Smrg against it]) 959622663e35Smrg_LT_TAGDECL([], [inherit_rpath], [0], 959722663e35Smrg [Set to yes if linker adds runtime paths of dependent libraries 959822663e35Smrg to runtime path list]) 959922663e35Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 960022663e35Smrg [Whether libtool must link a program against all its dependency libraries]) 960122663e35Smrg_LT_TAGDECL([], [always_export_symbols], [0], 960222663e35Smrg [Set to "yes" if exported symbols are required]) 960322663e35Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 960422663e35Smrg [The commands to list exported symbols]) 960522663e35Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 960622663e35Smrg [Symbols that should not be listed in the preloaded symbols]) 960722663e35Smrg_LT_TAGDECL([], [include_expsyms], [1], 960822663e35Smrg [Symbols that must always be exported]) 960922663e35Smrg_LT_TAGDECL([], [prelink_cmds], [2], 961022663e35Smrg [Commands necessary for linking programs (against libraries) with templates]) 961122663e35Smrg_LT_TAGDECL([], [postlink_cmds], [2], 961222663e35Smrg [Commands necessary for finishing linking programs]) 961322663e35Smrg_LT_TAGDECL([], [file_list_spec], [1], 961422663e35Smrg [Specify filename containing input files]) 961522663e35Smrgdnl FIXME: Not yet implemented 961622663e35Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 961722663e35Smrgdnl [Compiler flag to generate thread safe objects]) 961822663e35Smrg])# _LT_LINKER_SHLIBS 9619d769e936Smrg 9620d769e936Smrg 962122663e35Smrg# _LT_LANG_C_CONFIG([TAG]) 962222663e35Smrg# ------------------------ 962322663e35Smrg# Ensure that the configuration variables for a C compiler are suitably 962422663e35Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 962522663e35Smrg# the compiler configuration to 'libtool'. 962622663e35Smrgm4_defun([_LT_LANG_C_CONFIG], 962722663e35Smrg[m4_require([_LT_DECL_EGREP])dnl 962822663e35Smrglt_save_CC=$CC 962922663e35SmrgAC_LANG_PUSH(C) 9630d769e936Smrg 963122663e35Smrg# Source file extension for C test sources. 963222663e35Smrgac_ext=c 9633d769e936Smrg 963422663e35Smrg# Object file extension for compiled C test sources. 963522663e35Smrgobjext=o 963622663e35Smrg_LT_TAGVAR(objext, $1)=$objext 9637d769e936Smrg 963822663e35Smrg# Code to be used in simple compile tests 963922663e35Smrglt_simple_compile_test_code="int some_variable = 0;" 9640786a6f21Smrg 964122663e35Smrg# Code to be used in simple link tests 964222663e35Smrglt_simple_link_test_code='int main(){return(0);}' 9643d769e936Smrg 964422663e35Smrg_LT_TAG_COMPILER 964522663e35Smrg# Save the default compiler, since it gets overwritten when the other 964622663e35Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 964722663e35Smrgcompiler_DEFAULT=$CC 9648d769e936Smrg 964922663e35Smrg# save warnings/boilerplate of simple test code 965022663e35Smrg_LT_COMPILER_BOILERPLATE 965122663e35Smrg_LT_LINKER_BOILERPLATE 9652d769e936Smrg 965322663e35Smrgif test -n "$compiler"; then 965422663e35Smrg _LT_COMPILER_NO_RTTI($1) 965522663e35Smrg _LT_COMPILER_PIC($1) 965622663e35Smrg _LT_COMPILER_C_O($1) 965722663e35Smrg _LT_COMPILER_FILE_LOCKS($1) 965822663e35Smrg _LT_LINKER_SHLIBS($1) 965922663e35Smrg _LT_SYS_DYNAMIC_LINKER($1) 966022663e35Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 966122663e35Smrg LT_SYS_DLOPEN_SELF 966222663e35Smrg _LT_CMD_STRIPLIB 9663d769e936Smrg 966422663e35Smrg # Report what library types will actually be built 966522663e35Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 966622663e35Smrg AC_MSG_RESULT([$can_build_shared]) 9667d769e936Smrg 966822663e35Smrg AC_MSG_CHECKING([whether to build shared libraries]) 966922663e35Smrg test no = "$can_build_shared" && enable_shared=no 9670024581f2Smrg 967122663e35Smrg # On AIX, shared libraries and static libraries use the same namespace, and 967222663e35Smrg # are all built from PIC. 967322663e35Smrg case $host_os in 967422663e35Smrg aix3*) 967522663e35Smrg test yes = "$enable_shared" && enable_static=no 967622663e35Smrg if test -n "$RANLIB"; then 967722663e35Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 967822663e35Smrg postinstall_cmds='$RANLIB $lib' 967922663e35Smrg fi 968022663e35Smrg ;; 9681024581f2Smrg 968222663e35Smrg aix[[4-9]]*) 968322663e35Smrg if test ia64 != "$host_cpu"; then 968422663e35Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 968522663e35Smrg yes,aix,yes) ;; # shared object as lib.so file only 968622663e35Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 968722663e35Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 968822663e35Smrg esac 968922663e35Smrg fi 969022663e35Smrg ;; 969122663e35Smrg esac 969222663e35Smrg AC_MSG_RESULT([$enable_shared]) 9693d769e936Smrg 969422663e35Smrg AC_MSG_CHECKING([whether to build static libraries]) 969522663e35Smrg # Make sure either enable_shared or enable_static is yes. 969622663e35Smrg test yes = "$enable_shared" || enable_static=yes 969722663e35Smrg AC_MSG_RESULT([$enable_static]) 96981d54945dSmrg 969922663e35Smrg _LT_CONFIG($1) 970022663e35Smrgfi 970122663e35SmrgAC_LANG_POP 970222663e35SmrgCC=$lt_save_CC 970322663e35Smrg])# _LT_LANG_C_CONFIG 97041d54945dSmrg 97051d54945dSmrg 970622663e35Smrg# _LT_LANG_CXX_CONFIG([TAG]) 970722663e35Smrg# -------------------------- 970822663e35Smrg# Ensure that the configuration variables for a C++ compiler are suitably 970922663e35Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 971022663e35Smrg# the compiler configuration to 'libtool'. 971122663e35Smrgm4_defun([_LT_LANG_CXX_CONFIG], 971222663e35Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 971322663e35Smrgm4_require([_LT_DECL_EGREP])dnl 971422663e35Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 971522663e35Smrgif test -n "$CXX" && ( test no != "$CXX" && 971622663e35Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 971722663e35Smrg (test g++ != "$CXX"))); then 971822663e35Smrg AC_PROG_CXXCPP 97191d54945dSmrgelse 972022663e35Smrg _lt_caught_CXX_error=yes 972122663e35Smrgfi 97221d54945dSmrg 972322663e35SmrgAC_LANG_PUSH(C++) 972422663e35Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 972522663e35Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 972622663e35Smrg_LT_TAGVAR(always_export_symbols, $1)=no 972722663e35Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 972822663e35Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 972922663e35Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 973022663e35Smrg_LT_TAGVAR(hardcode_direct, $1)=no 973122663e35Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 973222663e35Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 973322663e35Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 973422663e35Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 973522663e35Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 973622663e35Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 973722663e35Smrg_LT_TAGVAR(inherit_rpath, $1)=no 973822663e35Smrg_LT_TAGVAR(module_cmds, $1)= 973922663e35Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 974022663e35Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 974122663e35Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 974222663e35Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 974322663e35Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 974422663e35Smrg_LT_TAGVAR(no_undefined_flag, $1)= 974522663e35Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 974622663e35Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 97471d54945dSmrg 974822663e35Smrg# Source file extension for C++ test sources. 974922663e35Smrgac_ext=cpp 97501d54945dSmrg 975122663e35Smrg# Object file extension for compiled C++ test sources. 975222663e35Smrgobjext=o 975322663e35Smrg_LT_TAGVAR(objext, $1)=$objext 97541d54945dSmrg 975522663e35Smrg# No sense in running all these tests if we already determined that 975622663e35Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 975722663e35Smrg# are currently assumed to apply to all compilers on this platform, 975822663e35Smrg# and will be corrupted by setting them based on a non-working compiler. 975922663e35Smrgif test yes != "$_lt_caught_CXX_error"; then 976022663e35Smrg # Code to be used in simple compile tests 976122663e35Smrg lt_simple_compile_test_code="int some_variable = 0;" 97621d54945dSmrg 976322663e35Smrg # Code to be used in simple link tests 976422663e35Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 97651d54945dSmrg 976622663e35Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 976722663e35Smrg _LT_TAG_COMPILER 97681d54945dSmrg 976922663e35Smrg # save warnings/boilerplate of simple test code 977022663e35Smrg _LT_COMPILER_BOILERPLATE 977122663e35Smrg _LT_LINKER_BOILERPLATE 97721d54945dSmrg 977322663e35Smrg # Allow CC to be a program name with arguments. 977422663e35Smrg lt_save_CC=$CC 977522663e35Smrg lt_save_CFLAGS=$CFLAGS 977622663e35Smrg lt_save_LD=$LD 977722663e35Smrg lt_save_GCC=$GCC 977822663e35Smrg GCC=$GXX 977922663e35Smrg lt_save_with_gnu_ld=$with_gnu_ld 978022663e35Smrg lt_save_path_LD=$lt_cv_path_LD 978122663e35Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 978222663e35Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 978322663e35Smrg else 978422663e35Smrg $as_unset lt_cv_prog_gnu_ld 978522663e35Smrg fi 978622663e35Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 978722663e35Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 978822663e35Smrg else 978922663e35Smrg $as_unset lt_cv_path_LD 979022663e35Smrg fi 979122663e35Smrg test -z "${LDCXX+set}" || LD=$LDCXX 979222663e35Smrg CC=${CXX-"c++"} 979322663e35Smrg CFLAGS=$CXXFLAGS 979422663e35Smrg compiler=$CC 979522663e35Smrg _LT_TAGVAR(compiler, $1)=$CC 979622663e35Smrg _LT_CC_BASENAME([$compiler]) 97971d54945dSmrg 979822663e35Smrg if test -n "$compiler"; then 979922663e35Smrg # We don't want -fno-exception when compiling C++ code, so set the 980022663e35Smrg # no_builtin_flag separately 980122663e35Smrg if test yes = "$GXX"; then 980222663e35Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 980322663e35Smrg else 980422663e35Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 980522663e35Smrg fi 98061d54945dSmrg 980722663e35Smrg if test yes = "$GXX"; then 980822663e35Smrg # Set up default GNU C++ configuration 98091d54945dSmrg 981022663e35Smrg LT_PATH_LD 98111d54945dSmrg 981222663e35Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 981322663e35Smrg # archiving commands below assume that GNU ld is being used. 981422663e35Smrg if test yes = "$with_gnu_ld"; then 981522663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 981622663e35Smrg _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' 98171d54945dSmrg 981822663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 981922663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 98207322289dSmrg 982122663e35Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 982222663e35Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 982322663e35Smrg # investigate it a little bit more. (MM) 982422663e35Smrg wlarc='$wl' 9825024581f2Smrg 982622663e35Smrg # ancient GNU ld didn't support --whole-archive et. al. 982722663e35Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 982822663e35Smrg $GREP 'no-whole-archive' > /dev/null; then 982922663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 983022663e35Smrg else 983122663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 983222663e35Smrg fi 983322663e35Smrg else 983422663e35Smrg with_gnu_ld=no 983522663e35Smrg wlarc= 9836024581f2Smrg 983722663e35Smrg # A generic and very simple default shared library creation 983822663e35Smrg # command for GNU C++ for the case where it uses the native 983922663e35Smrg # linker, instead of GNU ld. If possible, this setting should 984022663e35Smrg # overridden to take advantage of the native linker features on 984122663e35Smrg # the platform it is being used on. 984222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 984322663e35Smrg fi 98447322289dSmrg 984522663e35Smrg # Commands to make compiler produce verbose output that lists 984622663e35Smrg # what "hidden" libraries, object files and flags are used when 984722663e35Smrg # linking a shared library. 984822663e35Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 98497322289dSmrg 985022663e35Smrg else 985122663e35Smrg GXX=no 985222663e35Smrg with_gnu_ld=no 985322663e35Smrg wlarc= 985422663e35Smrg fi 98557322289dSmrg 985622663e35Smrg # PORTME: fill in a description of your system's C++ link characteristics 985722663e35Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 985822663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 985922663e35Smrg case $host_os in 986022663e35Smrg aix3*) 986122663e35Smrg # FIXME: insert proper C++ library support 986222663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 986322663e35Smrg ;; 986422663e35Smrg aix[[4-9]]*) 986522663e35Smrg if test ia64 = "$host_cpu"; then 986622663e35Smrg # On IA64, the linker does run time linking by default, so we don't 986722663e35Smrg # have to do anything special. 986822663e35Smrg aix_use_runtimelinking=no 986922663e35Smrg exp_sym_flag='-Bexport' 987022663e35Smrg no_entry_flag= 987122663e35Smrg else 987222663e35Smrg aix_use_runtimelinking=no 98737322289dSmrg 987422663e35Smrg # Test if we are trying to use run time linking or normal 987522663e35Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 987622663e35Smrg # have runtime linking enabled, and use it for executables. 987722663e35Smrg # For shared libraries, we enable/disable runtime linking 987822663e35Smrg # depending on the kind of the shared library created - 987922663e35Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 988022663e35Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 988122663e35Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 988222663e35Smrg # lib.a static archive 988322663e35Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 988422663e35Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 988522663e35Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 988622663e35Smrg # lib.a(lib.so.V) shared, rtl:no 988722663e35Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 988822663e35Smrg # lib.a static archive 988922663e35Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 989022663e35Smrg for ld_flag in $LDFLAGS; do 989122663e35Smrg case $ld_flag in 989222663e35Smrg *-brtl*) 989322663e35Smrg aix_use_runtimelinking=yes 989422663e35Smrg break 989522663e35Smrg ;; 989622663e35Smrg esac 989722663e35Smrg done 989822663e35Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 989922663e35Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 990022663e35Smrg # so we don't have lib.a shared libs to link our executables. 990122663e35Smrg # We have to force runtime linking in this case. 990222663e35Smrg aix_use_runtimelinking=yes 990322663e35Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 990422663e35Smrg fi 990522663e35Smrg ;; 990622663e35Smrg esac 99077322289dSmrg 990822663e35Smrg exp_sym_flag='-bexport' 990922663e35Smrg no_entry_flag='-bnoentry' 991022663e35Smrg fi 99117322289dSmrg 991222663e35Smrg # When large executables or shared objects are built, AIX ld can 991322663e35Smrg # have problems creating the table of contents. If linking a library 991422663e35Smrg # or program results in "error TOC overflow" add -mminimal-toc to 991522663e35Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 991622663e35Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 99177322289dSmrg 991822663e35Smrg _LT_TAGVAR(archive_cmds, $1)='' 991922663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 992022663e35Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 992122663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 992222663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 992322663e35Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 992422663e35Smrg case $with_aix_soname,$aix_use_runtimelinking in 992522663e35Smrg aix,*) ;; # no import file 992622663e35Smrg svr4,* | *,yes) # use import file 992722663e35Smrg # The Import File defines what to hardcode. 992822663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=no 992922663e35Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 993022663e35Smrg ;; 993122663e35Smrg esac 9932ba85709eSmrg 993322663e35Smrg if test yes = "$GXX"; then 993422663e35Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 993522663e35Smrg # We only want to do this on AIX 4.2 and lower, the check 993622663e35Smrg # below for broken collect2 doesn't work under 4.3+ 993722663e35Smrg collect2name=`$CC -print-prog-name=collect2` 993822663e35Smrg if test -f "$collect2name" && 993922663e35Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 994022663e35Smrg then 994122663e35Smrg # We have reworked collect2 994222663e35Smrg : 994322663e35Smrg else 994422663e35Smrg # We have old collect2 994522663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 994622663e35Smrg # It fails to find uninstalled libraries when the uninstalled 994722663e35Smrg # path is not listed in the libpath. Setting hardcode_minus_L 994822663e35Smrg # to unsupported forces relinking 994922663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 995022663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 995122663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 995222663e35Smrg fi 995322663e35Smrg esac 995422663e35Smrg shared_flag='-shared' 995522663e35Smrg if test yes = "$aix_use_runtimelinking"; then 995622663e35Smrg shared_flag=$shared_flag' $wl-G' 995722663e35Smrg fi 995822663e35Smrg # Need to ensure runtime linking is disabled for the traditional 995922663e35Smrg # shared library, or the linker may eventually find shared libraries 996022663e35Smrg # /with/ Import File - we do not want to mix them. 996122663e35Smrg shared_flag_aix='-shared' 996222663e35Smrg shared_flag_svr4='-shared $wl-G' 996322663e35Smrg else 996422663e35Smrg # not using gcc 996522663e35Smrg if test ia64 = "$host_cpu"; then 996622663e35Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 996722663e35Smrg # chokes on -Wl,-G. The following line is correct: 996822663e35Smrg shared_flag='-G' 996922663e35Smrg else 997022663e35Smrg if test yes = "$aix_use_runtimelinking"; then 997122663e35Smrg shared_flag='$wl-G' 997222663e35Smrg else 997322663e35Smrg shared_flag='$wl-bM:SRE' 997422663e35Smrg fi 997522663e35Smrg shared_flag_aix='$wl-bM:SRE' 997622663e35Smrg shared_flag_svr4='$wl-G' 997722663e35Smrg fi 997822663e35Smrg fi 99791d54945dSmrg 998022663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 998122663e35Smrg # It seems that -bexpall does not export symbols beginning with 998222663e35Smrg # underscore (_), so it is better to generate a list of symbols to 998322663e35Smrg # export. 998422663e35Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 998522663e35Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 998622663e35Smrg # Warning - without using the other runtime loading flags (-brtl), 998722663e35Smrg # -berok will link without error, but may produce a broken library. 998822663e35Smrg # The "-G" linker flag allows undefined symbols. 998922663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 999022663e35Smrg # Determine the default libpath from the value encoded in an empty 999122663e35Smrg # executable. 999222663e35Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 999322663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 99941d54945dSmrg 999522663e35Smrg _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 999622663e35Smrg else 999722663e35Smrg if test ia64 = "$host_cpu"; then 999822663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 999922663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 1000022663e35Smrg _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" 1000122663e35Smrg else 1000222663e35Smrg # Determine the default libpath from the value encoded in an 1000322663e35Smrg # empty executable. 1000422663e35Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 1000522663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 1000622663e35Smrg # Warning - without using the other run time loading flags, 1000722663e35Smrg # -berok will link without error, but may produce a broken library. 1000822663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 1000922663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 1001022663e35Smrg if test yes = "$with_gnu_ld"; then 1001122663e35Smrg # We only use this code for GNU lds that support --whole-archive. 1001222663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 1001322663e35Smrg else 1001422663e35Smrg # Exported symbols can be pulled into shared objects from archives 1001522663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 1001622663e35Smrg fi 1001722663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 1001822663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 1001922663e35Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 1002022663e35Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 1002122663e35Smrg if test svr4 != "$with_aix_soname"; then 1002222663e35Smrg # This is similar to how AIX traditionally builds its shared 1002322663e35Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 1002422663e35Smrg _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' 1002522663e35Smrg fi 1002622663e35Smrg if test aix != "$with_aix_soname"; then 1002722663e35Smrg _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' 1002822663e35Smrg else 1002922663e35Smrg # used by -dlpreopen to get the symbols 1003022663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 1003122663e35Smrg fi 1003222663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 1003322663e35Smrg fi 1003422663e35Smrg fi 1003522663e35Smrg ;; 100361d54945dSmrg 1003722663e35Smrg beos*) 1003822663e35Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 1003922663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 1004022663e35Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 1004122663e35Smrg # support --undefined. This deserves some investigation. FIXME 1004222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 100431d54945dSmrg else 1004422663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 100451d54945dSmrg fi 1004622663e35Smrg ;; 100471d54945dSmrg 1004822663e35Smrg chorus*) 1004922663e35Smrg case $cc_basename in 1005022663e35Smrg *) 1005122663e35Smrg # FIXME: insert proper C++ library support 1005222663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1005322663e35Smrg ;; 1005422663e35Smrg esac 1005522663e35Smrg ;; 100561d54945dSmrg 1005722663e35Smrg cygwin* | mingw* | pw32* | cegcc*) 1005822663e35Smrg case $GXX,$cc_basename in 1005922663e35Smrg ,cl* | no,cl* | ,icl* | no,icl*) 1006022663e35Smrg # Native MSVC or ICC 1006122663e35Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 1006222663e35Smrg # no search path for DLLs. 1006322663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 1006422663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 1006522663e35Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 1006622663e35Smrg _LT_TAGVAR(file_list_spec, $1)='@' 1006722663e35Smrg # Tell ltmain to make .lib files, not .a files. 1006822663e35Smrg libext=lib 1006922663e35Smrg # Tell ltmain to make .dll files, not .so files. 1007022663e35Smrg shrext_cmds=.dll 1007122663e35Smrg # FIXME: Setting linknames here is a bad hack. 1007222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 1007322663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 1007422663e35Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 1007522663e35Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 1007622663e35Smrg else 1007722663e35Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 1007822663e35Smrg fi~ 1007922663e35Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 1008022663e35Smrg linknames=' 1008122663e35Smrg # The linker will not automatically build a static lib if we build a DLL. 1008222663e35Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 1008322663e35Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 1008422663e35Smrg # Don't use ranlib 1008522663e35Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 1008622663e35Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 1008722663e35Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 1008822663e35Smrg case $lt_outputfile in 1008922663e35Smrg *.exe|*.EXE) ;; 1009022663e35Smrg *) 1009122663e35Smrg lt_outputfile=$lt_outputfile.exe 1009222663e35Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 1009322663e35Smrg ;; 1009422663e35Smrg esac~ 1009522663e35Smrg func_to_tool_file "$lt_outputfile"~ 1009622663e35Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 1009722663e35Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 1009822663e35Smrg $RM "$lt_outputfile.manifest"; 1009922663e35Smrg fi' 1010022663e35Smrg ;; 1010122663e35Smrg *) 1010222663e35Smrg # g++ 1010322663e35Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 1010422663e35Smrg # as there is no search path for DLLs. 1010522663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 1010622663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 1010722663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 1010822663e35Smrg _LT_TAGVAR(always_export_symbols, $1)=no 1010922663e35Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 101101d54945dSmrg 1011122663e35Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 1011222663e35Smrg _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' 1011322663e35Smrg # If the export-symbols file already is a .def file, use it as 1011422663e35Smrg # is; otherwise, prepend EXPORTS... 1011522663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 1011622663e35Smrg cp $export_symbols $output_objdir/$soname.def; 1011722663e35Smrg else 1011822663e35Smrg echo EXPORTS > $output_objdir/$soname.def; 1011922663e35Smrg cat $export_symbols >> $output_objdir/$soname.def; 1012022663e35Smrg fi~ 1012122663e35Smrg $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' 1012222663e35Smrg else 1012322663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1012422663e35Smrg fi 1012522663e35Smrg ;; 1012622663e35Smrg esac 1012722663e35Smrg ;; 1012822663e35Smrg darwin* | rhapsody*) 1012922663e35Smrg _LT_DARWIN_LINKER_FEATURES($1) 1013022663e35Smrg ;; 1013122663e35Smrg 1013222663e35Smrg os2*) 1013322663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 1013422663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 1013522663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 1013622663e35Smrg shrext_cmds=.dll 1013722663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 1013822663e35Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 1013922663e35Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 1014022663e35Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 1014122663e35Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 1014222663e35Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 1014322663e35Smrg emximp -o $lib $output_objdir/$libname.def' 1014422663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 1014522663e35Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 1014622663e35Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 1014722663e35Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 1014822663e35Smrg prefix_cmds="$SED"~ 1014922663e35Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 1015022663e35Smrg prefix_cmds="$prefix_cmds -e 1d"; 1015122663e35Smrg fi~ 1015222663e35Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 1015322663e35Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 1015422663e35Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 1015522663e35Smrg emximp -o $lib $output_objdir/$libname.def' 1015622663e35Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 1015722663e35Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 1015822663e35Smrg _LT_TAGVAR(file_list_spec, $1)='@' 1015922663e35Smrg ;; 1016022663e35Smrg 1016122663e35Smrg dgux*) 1016222663e35Smrg case $cc_basename in 1016322663e35Smrg ec++*) 1016422663e35Smrg # FIXME: insert proper C++ library support 1016522663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1016622663e35Smrg ;; 1016722663e35Smrg ghcx*) 1016822663e35Smrg # Green Hills C++ Compiler 1016922663e35Smrg # FIXME: insert proper C++ library support 1017022663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1017122663e35Smrg ;; 1017222663e35Smrg *) 1017322663e35Smrg # FIXME: insert proper C++ library support 1017422663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1017522663e35Smrg ;; 1017622663e35Smrg esac 1017722663e35Smrg ;; 101781d54945dSmrg 1017922663e35Smrg freebsd2.*) 1018022663e35Smrg # C++ shared libraries reported to be fairly broken before 1018122663e35Smrg # switch to ELF 1018222663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1018322663e35Smrg ;; 101841d54945dSmrg 1018522663e35Smrg freebsd-elf*) 1018622663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1018722663e35Smrg ;; 101881d54945dSmrg 1018922663e35Smrg freebsd* | dragonfly* | midnightbsd*) 1019022663e35Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 1019122663e35Smrg # conventions 1019222663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 1019322663e35Smrg ;; 101941d54945dSmrg 1019522663e35Smrg haiku*) 1019622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 1019722663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1019822663e35Smrg ;; 101991d54945dSmrg 1020022663e35Smrg hpux9*) 1020122663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 1020222663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 1020322663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 1020422663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 1020522663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 1020622663e35Smrg # but as the default 1020722663e35Smrg # location of the library. 102081d54945dSmrg 1020922663e35Smrg case $cc_basename in 1021022663e35Smrg CC*) 1021122663e35Smrg # FIXME: insert proper C++ library support 1021222663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1021322663e35Smrg ;; 1021422663e35Smrg aCC*) 1021522663e35Smrg _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' 1021622663e35Smrg # Commands to make compiler produce verbose output that lists 1021722663e35Smrg # what "hidden" libraries, object files and flags are used when 1021822663e35Smrg # linking a shared library. 1021922663e35Smrg # 1022022663e35Smrg # There doesn't appear to be a way to prevent this compiler from 1022122663e35Smrg # explicitly linking system object files so we need to strip them 1022222663e35Smrg # from the output so that they don't get included in the library 1022322663e35Smrg # dependencies. 1022422663e35Smrg 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"' 1022522663e35Smrg ;; 1022622663e35Smrg *) 1022722663e35Smrg if test yes = "$GXX"; then 1022822663e35Smrg _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' 1022922663e35Smrg else 1023022663e35Smrg # FIXME: insert proper C++ library support 1023122663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1023222663e35Smrg fi 1023322663e35Smrg ;; 1023422663e35Smrg esac 1023522663e35Smrg ;; 102361d54945dSmrg 1023722663e35Smrg hpux10*|hpux11*) 1023822663e35Smrg if test no = "$with_gnu_ld"; then 1023922663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 1024022663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10241d769e936Smrg 1024222663e35Smrg case $host_cpu in 1024322663e35Smrg hppa*64*|ia64*) 1024422663e35Smrg ;; 1024522663e35Smrg *) 1024622663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 1024722663e35Smrg ;; 1024822663e35Smrg esac 1024922663e35Smrg fi 1025022663e35Smrg case $host_cpu in 1025122663e35Smrg hppa*64*|ia64*) 1025222663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1025322663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 1025422663e35Smrg ;; 1025522663e35Smrg *) 1025622663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 1025722663e35Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 1025822663e35Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 1025922663e35Smrg # but as the default 1026022663e35Smrg # location of the library. 1026122663e35Smrg ;; 1026222663e35Smrg esac 10263d769e936Smrg 1026422663e35Smrg case $cc_basename in 1026522663e35Smrg CC*) 1026622663e35Smrg # FIXME: insert proper C++ library support 1026722663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1026822663e35Smrg ;; 1026922663e35Smrg aCC*) 1027022663e35Smrg case $host_cpu in 1027122663e35Smrg hppa*64*) 1027222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 1027322663e35Smrg ;; 1027422663e35Smrg ia64*) 1027522663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 1027622663e35Smrg ;; 1027722663e35Smrg *) 1027822663e35Smrg _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' 1027922663e35Smrg ;; 1028022663e35Smrg esac 1028122663e35Smrg # Commands to make compiler produce verbose output that lists 1028222663e35Smrg # what "hidden" libraries, object files and flags are used when 1028322663e35Smrg # linking a shared library. 1028422663e35Smrg # 1028522663e35Smrg # There doesn't appear to be a way to prevent this compiler from 1028622663e35Smrg # explicitly linking system object files so we need to strip them 1028722663e35Smrg # from the output so that they don't get included in the library 1028822663e35Smrg # dependencies. 1028922663e35Smrg 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"' 1029022663e35Smrg ;; 1029122663e35Smrg *) 1029222663e35Smrg if test yes = "$GXX"; then 1029322663e35Smrg if test no = "$with_gnu_ld"; then 1029422663e35Smrg case $host_cpu in 1029522663e35Smrg hppa*64*) 1029622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 1029722663e35Smrg ;; 1029822663e35Smrg ia64*) 1029922663e35Smrg _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' 1030022663e35Smrg ;; 1030122663e35Smrg *) 1030222663e35Smrg _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' 1030322663e35Smrg ;; 1030422663e35Smrg esac 1030522663e35Smrg fi 1030622663e35Smrg else 1030722663e35Smrg # FIXME: insert proper C++ library support 1030822663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1030922663e35Smrg fi 1031022663e35Smrg ;; 1031122663e35Smrg esac 1031222663e35Smrg ;; 103131d54945dSmrg 1031422663e35Smrg interix[[3-9]]*) 1031522663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1031622663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 1031722663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 1031822663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 1031922663e35Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 1032022663e35Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 1032122663e35Smrg # default) and relocated if they conflict, which is a slow very memory 1032222663e35Smrg # consuming and fragmenting process. To avoid this, we pick a random, 1032322663e35Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 1032422663e35Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 1032522663e35Smrg _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' 1032622663e35Smrg _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' 1032722663e35Smrg ;; 1032822663e35Smrg irix5* | irix6*) 1032922663e35Smrg case $cc_basename in 1033022663e35Smrg CC*) 1033122663e35Smrg # SGI C++ 1033222663e35Smrg _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' 10333d769e936Smrg 1033422663e35Smrg # Archives containing C++ object files must be created using 1033522663e35Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 1033622663e35Smrg # necessary to make sure instantiated templates are included 1033722663e35Smrg # in the archive. 1033822663e35Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 1033922663e35Smrg ;; 1034022663e35Smrg *) 1034122663e35Smrg if test yes = "$GXX"; then 1034222663e35Smrg if test no = "$with_gnu_ld"; then 1034322663e35Smrg _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' 1034422663e35Smrg else 1034522663e35Smrg _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' 1034622663e35Smrg fi 1034722663e35Smrg fi 1034822663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1034922663e35Smrg ;; 1035022663e35Smrg esac 1035122663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 1035222663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 1035322663e35Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 1035422663e35Smrg ;; 10355d769e936Smrg 1035622663e35Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 1035722663e35Smrg case $cc_basename in 1035822663e35Smrg KCC*) 1035922663e35Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10360d769e936Smrg 1036122663e35Smrg # KCC will only create a shared library if the output file 1036222663e35Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 1036322663e35Smrg # to its proper name (with version) after linking. 1036422663e35Smrg _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' 1036522663e35Smrg _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' 1036622663e35Smrg # Commands to make compiler produce verbose output that lists 1036722663e35Smrg # what "hidden" libraries, object files and flags are used when 1036822663e35Smrg # linking a shared library. 1036922663e35Smrg # 1037022663e35Smrg # There doesn't appear to be a way to prevent this compiler from 1037122663e35Smrg # explicitly linking system object files so we need to strip them 1037222663e35Smrg # from the output so that they don't get included in the library 1037322663e35Smrg # dependencies. 1037422663e35Smrg 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"' 103751d54945dSmrg 1037622663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 1037722663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 103781d54945dSmrg 1037922663e35Smrg # Archives containing C++ object files must be created using 1038022663e35Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 1038122663e35Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 1038222663e35Smrg ;; 1038322663e35Smrg icpc* | ecpc* ) 1038422663e35Smrg # Intel C++ 1038522663e35Smrg with_gnu_ld=yes 1038622663e35Smrg # version 8.0 and above of icpc choke on multiply defined symbols 1038722663e35Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 1038822663e35Smrg # earlier do not add the objects themselves. 1038922663e35Smrg case `$CC -V 2>&1` in 1039022663e35Smrg *"Version 7."*) 1039122663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 1039222663e35Smrg _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' 1039322663e35Smrg ;; 1039422663e35Smrg *) # Version 8.0 or newer 1039522663e35Smrg tmp_idyn= 1039622663e35Smrg case $host_cpu in 1039722663e35Smrg ia64*) tmp_idyn=' -i_dynamic';; 1039822663e35Smrg esac 1039922663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 1040022663e35Smrg _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' 1040122663e35Smrg ;; 1040222663e35Smrg esac 1040322663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1040422663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 1040522663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 1040622663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 1040722663e35Smrg ;; 1040822663e35Smrg pgCC* | pgcpp*) 1040922663e35Smrg # Portland Group C++ compiler 1041022663e35Smrg case `$CC -V` in 1041122663e35Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 1041222663e35Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 1041322663e35Smrg rm -rf $tpldir~ 1041422663e35Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 1041522663e35Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 1041622663e35Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 1041722663e35Smrg rm -rf $tpldir~ 1041822663e35Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 1041922663e35Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 1042022663e35Smrg $RANLIB $oldlib' 1042122663e35Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 1042222663e35Smrg rm -rf $tpldir~ 1042322663e35Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 1042422663e35Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 1042522663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 1042622663e35Smrg rm -rf $tpldir~ 1042722663e35Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 1042822663e35Smrg $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' 1042922663e35Smrg ;; 1043022663e35Smrg *) # Version 6 and above use weak symbols 1043122663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 1043222663e35Smrg _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' 1043322663e35Smrg ;; 1043422663e35Smrg esac 104351d54945dSmrg 1043622663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 1043722663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 1043822663e35Smrg _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' 1043922663e35Smrg ;; 1044022663e35Smrg cxx*) 1044122663e35Smrg # Compaq C++ 1044222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 1044322663e35Smrg _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' 104441d54945dSmrg 1044522663e35Smrg runpath_var=LD_RUN_PATH 1044622663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 1044722663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 104481d54945dSmrg 1044922663e35Smrg # Commands to make compiler produce verbose output that lists 1045022663e35Smrg # what "hidden" libraries, object files and flags are used when 1045122663e35Smrg # linking a shared library. 1045222663e35Smrg # 1045322663e35Smrg # There doesn't appear to be a way to prevent this compiler from 1045422663e35Smrg # explicitly linking system object files so we need to strip them 1045522663e35Smrg # from the output so that they don't get included in the library 1045622663e35Smrg # dependencies. 1045722663e35Smrg 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' 1045822663e35Smrg ;; 1045922663e35Smrg xl* | mpixl* | bgxl*) 1046022663e35Smrg # IBM XL 8.0 on PPC, with GNU ld 1046122663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 1046222663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 1046322663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 1046422663e35Smrg if test yes = "$supports_anon_versioning"; then 1046522663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 1046622663e35Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 1046722663e35Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 1046822663e35Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 1046922663e35Smrg fi 1047022663e35Smrg ;; 1047122663e35Smrg *) 1047222663e35Smrg case `$CC -V 2>&1 | $SED 5q` in 1047322663e35Smrg *Sun\ C*) 1047422663e35Smrg # Sun C++ 5.9 1047522663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 1047622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 1047722663e35Smrg _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' 1047822663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 1047922663e35Smrg _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' 1048022663e35Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 104811d54945dSmrg 1048222663e35Smrg # Not sure whether something based on 1048322663e35Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 1048422663e35Smrg # would be better. 1048522663e35Smrg output_verbose_link_cmd='func_echo_all' 104861d54945dSmrg 1048722663e35Smrg # Archives containing C++ object files must be created using 1048822663e35Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 1048922663e35Smrg # necessary to make sure instantiated templates are included 1049022663e35Smrg # in the archive. 1049122663e35Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 1049222663e35Smrg ;; 1049322663e35Smrg esac 1049422663e35Smrg ;; 1049522663e35Smrg esac 1049622663e35Smrg ;; 104971d54945dSmrg 1049822663e35Smrg lynxos*) 1049922663e35Smrg # FIXME: insert proper C++ library support 1050022663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1050122663e35Smrg ;; 105021d54945dSmrg 1050322663e35Smrg m88k*) 1050422663e35Smrg # FIXME: insert proper C++ library support 1050522663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1050622663e35Smrg ;; 105071d54945dSmrg 1050822663e35Smrg mvs*) 1050922663e35Smrg case $cc_basename in 1051022663e35Smrg cxx*) 1051122663e35Smrg # FIXME: insert proper C++ library support 1051222663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1051322663e35Smrg ;; 1051422663e35Smrg *) 1051522663e35Smrg # FIXME: insert proper C++ library support 1051622663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1051722663e35Smrg ;; 1051822663e35Smrg esac 1051922663e35Smrg ;; 105201d54945dSmrg 1052122663e35Smrg netbsd*) 1052222663e35Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 1052322663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 1052422663e35Smrg wlarc= 1052522663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 1052622663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 1052722663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 1052822663e35Smrg fi 1052922663e35Smrg # Workaround some broken pre-1.5 toolchains 1053022663e35Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 1053122663e35Smrg ;; 105321d54945dSmrg 1053322663e35Smrg *nto* | *qnx*) 1053422663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 1053522663e35Smrg ;; 10536d769e936Smrg 1053722663e35Smrg openbsd* | bitrig*) 1053822663e35Smrg if test -f /usr/libexec/ld.so; then 1053922663e35Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 1054022663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 1054122663e35Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 1054222663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 1054322663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 1054422663e35Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 1054522663e35Smrg _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' 1054622663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 1054722663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 1054822663e35Smrg fi 1054922663e35Smrg output_verbose_link_cmd=func_echo_all 1055022663e35Smrg else 1055122663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1055222663e35Smrg fi 1055322663e35Smrg ;; 10554ba85709eSmrg 1055522663e35Smrg osf3* | osf4* | osf5*) 1055622663e35Smrg case $cc_basename in 1055722663e35Smrg KCC*) 1055822663e35Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 1055922663e35Smrg 1056022663e35Smrg # KCC will only create a shared library if the output file 1056122663e35Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 1056222663e35Smrg # to its proper name (with version) after linking. 1056322663e35Smrg _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' 10564ba85709eSmrg 1056522663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 1056622663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10567ba85709eSmrg 1056822663e35Smrg # Archives containing C++ object files must be created using 1056922663e35Smrg # the KAI C++ compiler. 1057022663e35Smrg case $host in 1057122663e35Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 1057222663e35Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 1057322663e35Smrg esac 1057422663e35Smrg ;; 1057522663e35Smrg RCC*) 1057622663e35Smrg # Rational C++ 2.4.1 1057722663e35Smrg # FIXME: insert proper C++ library support 1057822663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1057922663e35Smrg ;; 1058022663e35Smrg cxx*) 1058122663e35Smrg case $host in 1058222663e35Smrg osf3*) 1058322663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 1058422663e35Smrg _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' 1058522663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 1058622663e35Smrg ;; 1058722663e35Smrg *) 1058822663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 1058922663e35Smrg _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' 1059022663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 1059122663e35Smrg echo "-hidden">> $lib.exp~ 1059222663e35Smrg $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~ 1059322663e35Smrg $RM $lib.exp' 1059422663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 1059522663e35Smrg ;; 1059622663e35Smrg esac 10597d769e936Smrg 1059822663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10599d769e936Smrg 1060022663e35Smrg # Commands to make compiler produce verbose output that lists 1060122663e35Smrg # what "hidden" libraries, object files and flags are used when 1060222663e35Smrg # linking a shared library. 1060322663e35Smrg # 1060422663e35Smrg # There doesn't appear to be a way to prevent this compiler from 1060522663e35Smrg # explicitly linking system object files so we need to strip them 1060622663e35Smrg # from the output so that they don't get included in the library 1060722663e35Smrg # dependencies. 1060822663e35Smrg 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"' 1060922663e35Smrg ;; 1061022663e35Smrg *) 1061122663e35Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 1061222663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 1061322663e35Smrg case $host in 1061422663e35Smrg osf3*) 1061522663e35Smrg _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' 1061622663e35Smrg ;; 1061722663e35Smrg *) 1061822663e35Smrg _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' 1061922663e35Smrg ;; 1062022663e35Smrg esac 10621d769e936Smrg 1062222663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 1062322663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10624d769e936Smrg 1062522663e35Smrg # Commands to make compiler produce verbose output that lists 1062622663e35Smrg # what "hidden" libraries, object files and flags are used when 1062722663e35Smrg # linking a shared library. 1062822663e35Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10629d769e936Smrg 1063022663e35Smrg else 1063122663e35Smrg # FIXME: insert proper C++ library support 1063222663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1063322663e35Smrg fi 1063422663e35Smrg ;; 1063522663e35Smrg esac 1063622663e35Smrg ;; 10637d769e936Smrg 1063822663e35Smrg psos*) 1063922663e35Smrg # FIXME: insert proper C++ library support 1064022663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1064122663e35Smrg ;; 10642d769e936Smrg 1064322663e35Smrg sunos4*) 1064422663e35Smrg case $cc_basename in 1064522663e35Smrg CC*) 1064622663e35Smrg # Sun C++ 4.x 1064722663e35Smrg # FIXME: insert proper C++ library support 1064822663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1064922663e35Smrg ;; 1065022663e35Smrg lcc*) 1065122663e35Smrg # Lucid 1065222663e35Smrg # FIXME: insert proper C++ library support 1065322663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1065422663e35Smrg ;; 1065522663e35Smrg *) 1065622663e35Smrg # FIXME: insert proper C++ library support 1065722663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1065822663e35Smrg ;; 1065922663e35Smrg esac 1066022663e35Smrg ;; 10661d769e936Smrg 1066222663e35Smrg solaris*) 1066322663e35Smrg case $cc_basename in 1066422663e35Smrg CC* | sunCC*) 1066522663e35Smrg # Sun C++ 4.2, 5.x and Centerline C++ 1066622663e35Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 1066722663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 1066822663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 1066922663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 1067022663e35Smrg $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' 10671d769e936Smrg 1067222663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 1067322663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 1067422663e35Smrg case $host_os in 1067522663e35Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 1067622663e35Smrg *) 1067722663e35Smrg # The compiler driver will combine and reorder linker options, 1067822663e35Smrg # but understands '-z linker_flag'. 1067922663e35Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 1068022663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 1068122663e35Smrg ;; 1068222663e35Smrg esac 1068322663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10684d769e936Smrg 1068522663e35Smrg output_verbose_link_cmd='func_echo_all' 10686d769e936Smrg 1068722663e35Smrg # Archives containing C++ object files must be created using 1068822663e35Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 1068922663e35Smrg # necessary to make sure instantiated templates are included 1069022663e35Smrg # in the archive. 1069122663e35Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 1069222663e35Smrg ;; 1069322663e35Smrg gcx*) 1069422663e35Smrg # Green Hills C++ Compiler 1069522663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10696d769e936Smrg 1069722663e35Smrg # The C++ compiler must be used to create the archive. 1069822663e35Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 1069922663e35Smrg ;; 1070022663e35Smrg *) 1070122663e35Smrg # GNU C++ compiler with Solaris linker 1070222663e35Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 1070322663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 1070422663e35Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 1070522663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 1070622663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 1070722663e35Smrg $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' 10708d769e936Smrg 1070922663e35Smrg # Commands to make compiler produce verbose output that lists 1071022663e35Smrg # what "hidden" libraries, object files and flags are used when 1071122663e35Smrg # linking a shared library. 1071222663e35Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 1071322663e35Smrg else 1071422663e35Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 1071522663e35Smrg # platform. 1071622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 1071722663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 1071822663e35Smrg $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' 10719d769e936Smrg 1072022663e35Smrg # Commands to make compiler produce verbose output that lists 1072122663e35Smrg # what "hidden" libraries, object files and flags are used when 1072222663e35Smrg # linking a shared library. 1072322663e35Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 1072422663e35Smrg fi 10725d769e936Smrg 1072622663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 1072722663e35Smrg case $host_os in 1072822663e35Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 1072922663e35Smrg *) 1073022663e35Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 1073122663e35Smrg ;; 1073222663e35Smrg esac 1073322663e35Smrg fi 1073422663e35Smrg ;; 1073522663e35Smrg esac 1073622663e35Smrg ;; 10737d769e936Smrg 1073822663e35Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 1073922663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 1074022663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1074122663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 1074222663e35Smrg runpath_var='LD_RUN_PATH' 1074322663e35Smrg 1074422663e35Smrg case $cc_basename in 1074522663e35Smrg CC*) 1074622663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 1074722663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 1074822663e35Smrg ;; 1074922663e35Smrg *) 1075022663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 1075122663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 1075222663e35Smrg ;; 1075322663e35Smrg esac 1075422663e35Smrg ;; 1075522663e35Smrg 1075622663e35Smrg sysv5* | sco3.2v5* | sco5v6*) 1075722663e35Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 1075822663e35Smrg # link with -lc, and that would cause any symbols used from libc to 1075922663e35Smrg # always be unresolved, which means just about no library would 1076022663e35Smrg # ever link correctly. If we're not using GNU ld we use -z text 1076122663e35Smrg # though, which does catch some bad symbols but isn't as heavy-handed 1076222663e35Smrg # as -z defs. 1076322663e35Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 1076422663e35Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 1076522663e35Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1076622663e35Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 1076722663e35Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 1076822663e35Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 1076922663e35Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1077022663e35Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 1077122663e35Smrg runpath_var='LD_RUN_PATH' 1077222663e35Smrg 1077322663e35Smrg case $cc_basename in 1077422663e35Smrg CC*) 1077522663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 1077622663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 1077722663e35Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 1077822663e35Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 1077922663e35Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 1078022663e35Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 1078122663e35Smrg ;; 1078222663e35Smrg *) 1078322663e35Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 1078422663e35Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 1078522663e35Smrg ;; 1078622663e35Smrg esac 1078722663e35Smrg ;; 1078822663e35Smrg 1078922663e35Smrg tandem*) 1079022663e35Smrg case $cc_basename in 1079122663e35Smrg NCC*) 1079222663e35Smrg # NonStop-UX NCC 3.20 1079322663e35Smrg # FIXME: insert proper C++ library support 1079422663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1079522663e35Smrg ;; 1079622663e35Smrg *) 1079722663e35Smrg # FIXME: insert proper C++ library support 1079822663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1079922663e35Smrg ;; 1080022663e35Smrg esac 1080122663e35Smrg ;; 10802d769e936Smrg 1080322663e35Smrg vxworks*) 1080422663e35Smrg # FIXME: insert proper C++ library support 1080522663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1080622663e35Smrg ;; 10807d769e936Smrg 1080822663e35Smrg *) 1080922663e35Smrg # FIXME: insert proper C++ library support 1081022663e35Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1081122663e35Smrg ;; 1081222663e35Smrg esac 108137322289dSmrg 1081422663e35Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 1081522663e35Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 108167322289dSmrg 1081722663e35Smrg _LT_TAGVAR(GCC, $1)=$GXX 1081822663e35Smrg _LT_TAGVAR(LD, $1)=$LD 10819d769e936Smrg 1082022663e35Smrg ## CAVEAT EMPTOR: 1082122663e35Smrg ## There is no encapsulation within the following macros, do not change 1082222663e35Smrg ## the running order or otherwise move them around unless you know exactly 1082322663e35Smrg ## what you are doing... 1082422663e35Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 1082522663e35Smrg _LT_COMPILER_PIC($1) 1082622663e35Smrg _LT_COMPILER_C_O($1) 1082722663e35Smrg _LT_COMPILER_FILE_LOCKS($1) 1082822663e35Smrg _LT_LINKER_SHLIBS($1) 1082922663e35Smrg _LT_SYS_DYNAMIC_LINKER($1) 1083022663e35Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 10831d769e936Smrg 1083222663e35Smrg _LT_CONFIG($1) 1083322663e35Smrg fi # test -n "$compiler" 10834d769e936Smrg 1083522663e35Smrg CC=$lt_save_CC 1083622663e35Smrg CFLAGS=$lt_save_CFLAGS 1083722663e35Smrg LDCXX=$LD 1083822663e35Smrg LD=$lt_save_LD 1083922663e35Smrg GCC=$lt_save_GCC 1084022663e35Smrg with_gnu_ld=$lt_save_with_gnu_ld 1084122663e35Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 1084222663e35Smrg lt_cv_path_LD=$lt_save_path_LD 1084322663e35Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 1084422663e35Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 1084522663e35Smrgfi # test yes != "$_lt_caught_CXX_error" 10846d769e936Smrg 1084722663e35SmrgAC_LANG_POP 1084822663e35Smrg])# _LT_LANG_CXX_CONFIG 1084922663e35Smrg 1085022663e35Smrg 1085122663e35Smrg# _LT_FUNC_STRIPNAME_CNF 1085222663e35Smrg# ---------------------- 1085322663e35Smrg# func_stripname_cnf prefix suffix name 1085422663e35Smrg# strip PREFIX and SUFFIX off of NAME. 1085522663e35Smrg# PREFIX and SUFFIX must not contain globbing or regex special 1085622663e35Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 1085722663e35Smrg# dot (in which case that matches only a dot). 1085822663e35Smrg# 1085922663e35Smrg# This function is identical to the (non-XSI) version of func_stripname, 1086022663e35Smrg# except this one can be used by m4 code that may be executed by configure, 1086122663e35Smrg# rather than the libtool script. 1086222663e35Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 1086322663e35SmrgAC_REQUIRE([_LT_DECL_SED]) 1086422663e35SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 1086522663e35Smrgfunc_stripname_cnf () 1086622663e35Smrg{ 1086722663e35Smrg case @S|@2 in 1086822663e35Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 1086922663e35Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 1087022663e35Smrg esac 1087122663e35Smrg} # func_stripname_cnf 1087222663e35Smrg])# _LT_FUNC_STRIPNAME_CNF 1087322663e35Smrg 1087422663e35Smrg 1087522663e35Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 1087622663e35Smrg# --------------------------------- 1087722663e35Smrg# Figure out "hidden" library dependencies from verbose 1087822663e35Smrg# compiler output when linking a shared library. 1087922663e35Smrg# Parse the compiler output and extract the necessary 1088022663e35Smrg# objects, libraries and library flags. 1088122663e35Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 1088222663e35Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1088322663e35SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 1088422663e35Smrg# Dependencies to place before and after the object being linked: 1088522663e35Smrg_LT_TAGVAR(predep_objects, $1)= 1088622663e35Smrg_LT_TAGVAR(postdep_objects, $1)= 1088722663e35Smrg_LT_TAGVAR(predeps, $1)= 1088822663e35Smrg_LT_TAGVAR(postdeps, $1)= 1088922663e35Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 10890d769e936Smrg 1089122663e35Smrgdnl we can't use the lt_simple_compile_test_code here, 1089222663e35Smrgdnl because it contains code intended for an executable, 1089322663e35Smrgdnl not a library. It's possible we should let each 1089422663e35Smrgdnl tag define a new lt_????_link_test_code variable, 1089522663e35Smrgdnl but it's only used here... 1089622663e35Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 1089722663e35Smrgint a; 1089822663e35Smrgvoid foo (void) { a = 0; } 1089922663e35Smrg_LT_EOF 1090022663e35Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 1090122663e35Smrgclass Foo 1090222663e35Smrg{ 1090322663e35Smrgpublic: 1090422663e35Smrg Foo (void) { a = 0; } 1090522663e35Smrgprivate: 1090622663e35Smrg int a; 1090722663e35Smrg}; 1090822663e35Smrg_LT_EOF 1090922663e35Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 1091022663e35Smrg subroutine foo 1091122663e35Smrg implicit none 1091222663e35Smrg integer*4 a 1091322663e35Smrg a=0 1091422663e35Smrg return 1091522663e35Smrg end 1091622663e35Smrg_LT_EOF 1091722663e35Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 1091822663e35Smrg subroutine foo 1091922663e35Smrg implicit none 1092022663e35Smrg integer a 1092122663e35Smrg a=0 1092222663e35Smrg return 1092322663e35Smrg end 1092422663e35Smrg_LT_EOF 1092522663e35Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 1092622663e35Smrgpublic class foo { 1092722663e35Smrg private int a; 1092822663e35Smrg public void bar (void) { 1092922663e35Smrg a = 0; 1093022663e35Smrg } 1093122663e35Smrg}; 1093222663e35Smrg_LT_EOF 1093322663e35Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 1093422663e35Smrgpackage foo 1093522663e35Smrgfunc foo() { 1093622663e35Smrg} 1093722663e35Smrg_LT_EOF 1093822663e35Smrg]) 10939d769e936Smrg 1094022663e35Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 1094122663e35Smrgcase "$CC $CFLAGS " in #( 1094222663e35Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 1094322663e35Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 1094422663e35Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 1094522663e35Smrgesac 10946d769e936Smrg 1094722663e35Smrgdnl Parse the compiler output and extract the necessary 1094822663e35Smrgdnl objects, libraries and library flags. 1094922663e35Smrgif AC_TRY_EVAL(ac_compile); then 1095022663e35Smrg # Parse the compiler output and extract the necessary 1095122663e35Smrg # objects, libraries and library flags. 10952d769e936Smrg 1095322663e35Smrg # Sentinel used to keep track of whether or not we are before 1095422663e35Smrg # the conftest object file. 1095522663e35Smrg pre_test_object_deps_done=no 10956d769e936Smrg 1095722663e35Smrg for p in `eval "$output_verbose_link_cmd"`; do 1095822663e35Smrg case $prev$p in 109597322289dSmrg 1096022663e35Smrg -L* | -R* | -l*) 1096122663e35Smrg # Some compilers place space between "-{L,R}" and the path. 1096222663e35Smrg # Remove the space. 1096322663e35Smrg if test x-L = "$p" || 1096422663e35Smrg test x-R = "$p"; then 1096522663e35Smrg prev=$p 1096622663e35Smrg continue 1096722663e35Smrg fi 109687322289dSmrg 1096922663e35Smrg # Expand the sysroot to ease extracting the directories later. 1097022663e35Smrg if test -z "$prev"; then 1097122663e35Smrg case $p in 1097222663e35Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 1097322663e35Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 1097422663e35Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 1097522663e35Smrg esac 1097622663e35Smrg fi 1097722663e35Smrg case $p in 1097822663e35Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 1097922663e35Smrg esac 1098022663e35Smrg if test no = "$pre_test_object_deps_done"; then 1098122663e35Smrg case $prev in 1098222663e35Smrg -L | -R) 1098322663e35Smrg # Internal compiler library paths should come after those 1098422663e35Smrg # provided the user. The postdeps already come after the 1098522663e35Smrg # user supplied libs so there is no need to process them. 1098622663e35Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 1098722663e35Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 1098822663e35Smrg else 1098922663e35Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 1099022663e35Smrg fi 1099122663e35Smrg ;; 1099222663e35Smrg # The "-l" case would never come before the object being 1099322663e35Smrg # linked, so don't bother handling this case. 1099422663e35Smrg esac 1099522663e35Smrg else 1099622663e35Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 1099722663e35Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 1099822663e35Smrg else 1099922663e35Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 1100022663e35Smrg fi 1100122663e35Smrg fi 1100222663e35Smrg prev= 1100322663e35Smrg ;; 11004d769e936Smrg 1100522663e35Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 1100622663e35Smrg *.$objext) 1100722663e35Smrg # This assumes that the test object file only shows up 1100822663e35Smrg # once in the compiler output. 1100922663e35Smrg if test "$p" = "conftest.$objext"; then 1101022663e35Smrg pre_test_object_deps_done=yes 1101122663e35Smrg continue 1101222663e35Smrg fi 11013d769e936Smrg 1101422663e35Smrg if test no = "$pre_test_object_deps_done"; then 1101522663e35Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 1101622663e35Smrg _LT_TAGVAR(predep_objects, $1)=$p 1101722663e35Smrg else 1101822663e35Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 1101922663e35Smrg fi 1102022663e35Smrg else 1102122663e35Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 1102222663e35Smrg _LT_TAGVAR(postdep_objects, $1)=$p 1102322663e35Smrg else 1102422663e35Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 1102522663e35Smrg fi 1102622663e35Smrg fi 1102722663e35Smrg ;; 11028d769e936Smrg 1102922663e35Smrg *) ;; # Ignore the rest. 11030d769e936Smrg 1103122663e35Smrg esac 1103222663e35Smrg done 11033d769e936Smrg 1103422663e35Smrg # Clean up. 1103522663e35Smrg rm -f a.out a.exe 1103622663e35Smrgelse 1103722663e35Smrg echo "libtool.m4: error: problem compiling $1 test program" 1103822663e35Smrgfi 11039d769e936Smrg 1104022663e35Smrg$RM -f confest.$objext 1104122663e35SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 11042d769e936Smrg 1104322663e35Smrg# PORTME: override above test on systems where it is broken 1104422663e35Smrgm4_if([$1], [CXX], 1104522663e35Smrg[case $host_os in 1104622663e35Smrginterix[[3-9]]*) 1104722663e35Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 1104822663e35Smrg # hack all around it, let's just trust "g++" to DTRT. 1104922663e35Smrg _LT_TAGVAR(predep_objects,$1)= 1105022663e35Smrg _LT_TAGVAR(postdep_objects,$1)= 1105122663e35Smrg _LT_TAGVAR(postdeps,$1)= 1105222663e35Smrg ;; 1105322663e35Smrgesac 1105422663e35Smrg]) 11055d769e936Smrg 1105622663e35Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 1105722663e35Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 1105822663e35Smrgesac 1105922663e35Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 1106022663e35Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 1106122663e35Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11062d769e936Smrgfi 1106322663e35Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 1106422663e35Smrg [The directories searched by this compiler when creating a shared library]) 1106522663e35Smrg_LT_TAGDECL([], [predep_objects], [1], 1106622663e35Smrg [Dependencies to place before and after the objects being linked to 1106722663e35Smrg create a shared library]) 1106822663e35Smrg_LT_TAGDECL([], [postdep_objects], [1]) 1106922663e35Smrg_LT_TAGDECL([], [predeps], [1]) 1107022663e35Smrg_LT_TAGDECL([], [postdeps], [1]) 1107122663e35Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 1107222663e35Smrg [The library search path used internally by the compiler when linking 1107322663e35Smrg a shared library]) 1107422663e35Smrg])# _LT_SYS_HIDDEN_LIBDEPS 11075d769e936Smrg 11076d769e936Smrg 1107722663e35Smrg# _LT_LANG_F77_CONFIG([TAG]) 1107822663e35Smrg# -------------------------- 1107922663e35Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 1108022663e35Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 1108122663e35Smrg# to write the compiler configuration to 'libtool'. 1108222663e35Smrgm4_defun([_LT_LANG_F77_CONFIG], 1108322663e35Smrg[AC_LANG_PUSH(Fortran 77) 1108422663e35Smrgif test -z "$F77" || test no = "$F77"; then 1108522663e35Smrg _lt_disable_F77=yes 11086d769e936Smrgfi 11087d769e936Smrg 1108822663e35Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 1108922663e35Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 1109022663e35Smrg_LT_TAGVAR(always_export_symbols, $1)=no 1109122663e35Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 1109222663e35Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 1109322663e35Smrg_LT_TAGVAR(hardcode_direct, $1)=no 1109422663e35Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 1109522663e35Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 1109622663e35Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 1109722663e35Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 1109822663e35Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 1109922663e35Smrg_LT_TAGVAR(inherit_rpath, $1)=no 1110022663e35Smrg_LT_TAGVAR(module_cmds, $1)= 1110122663e35Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 1110222663e35Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 1110322663e35Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 1110422663e35Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 1110522663e35Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 1110622663e35Smrg_LT_TAGVAR(no_undefined_flag, $1)= 1110722663e35Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 1110822663e35Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11109d769e936Smrg 1111022663e35Smrg# Source file extension for f77 test sources. 1111122663e35Smrgac_ext=f 11112d769e936Smrg 1111322663e35Smrg# Object file extension for compiled f77 test sources. 1111422663e35Smrgobjext=o 1111522663e35Smrg_LT_TAGVAR(objext, $1)=$objext 11116d769e936Smrg 1111722663e35Smrg# No sense in running all these tests if we already determined that 1111822663e35Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 1111922663e35Smrg# are currently assumed to apply to all compilers on this platform, 1112022663e35Smrg# and will be corrupted by setting them based on a non-working compiler. 1112122663e35Smrgif test yes != "$_lt_disable_F77"; then 1112222663e35Smrg # Code to be used in simple compile tests 1112322663e35Smrg lt_simple_compile_test_code="\ 1112422663e35Smrg subroutine t 1112522663e35Smrg return 1112622663e35Smrg end 1112722663e35Smrg" 11128d769e936Smrg 1112922663e35Smrg # Code to be used in simple link tests 1113022663e35Smrg lt_simple_link_test_code="\ 1113122663e35Smrg program t 1113222663e35Smrg end 1113322663e35Smrg" 11134d769e936Smrg 1113522663e35Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 1113622663e35Smrg _LT_TAG_COMPILER 11137ba85709eSmrg 1113822663e35Smrg # save warnings/boilerplate of simple test code 1113922663e35Smrg _LT_COMPILER_BOILERPLATE 1114022663e35Smrg _LT_LINKER_BOILERPLATE 11141ba85709eSmrg 1114222663e35Smrg # Allow CC to be a program name with arguments. 1114322663e35Smrg lt_save_CC=$CC 1114422663e35Smrg lt_save_GCC=$GCC 1114522663e35Smrg lt_save_CFLAGS=$CFLAGS 1114622663e35Smrg CC=${F77-"f77"} 1114722663e35Smrg CFLAGS=$FFLAGS 1114822663e35Smrg compiler=$CC 1114922663e35Smrg _LT_TAGVAR(compiler, $1)=$CC 1115022663e35Smrg _LT_CC_BASENAME([$compiler]) 1115122663e35Smrg GCC=$G77 1115222663e35Smrg if test -n "$compiler"; then 1115322663e35Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 1115422663e35Smrg AC_MSG_RESULT([$can_build_shared]) 11155ba85709eSmrg 1115622663e35Smrg AC_MSG_CHECKING([whether to build shared libraries]) 1115722663e35Smrg test no = "$can_build_shared" && enable_shared=no 1115822663e35Smrg 1115922663e35Smrg # On AIX, shared libraries and static libraries use the same namespace, and 1116022663e35Smrg # are all built from PIC. 1116122663e35Smrg case $host_os in 1116222663e35Smrg aix3*) 1116322663e35Smrg test yes = "$enable_shared" && enable_static=no 1116422663e35Smrg if test -n "$RANLIB"; then 1116522663e35Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 1116622663e35Smrg postinstall_cmds='$RANLIB $lib' 1116722663e35Smrg fi 1116822663e35Smrg ;; 1116922663e35Smrg aix[[4-9]]*) 1117022663e35Smrg if test ia64 != "$host_cpu"; then 1117122663e35Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 1117222663e35Smrg yes,aix,yes) ;; # shared object as lib.so file only 1117322663e35Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 1117422663e35Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 1117522663e35Smrg esac 1117622663e35Smrg fi 1117722663e35Smrg ;; 1117822663e35Smrg esac 1117922663e35Smrg AC_MSG_RESULT([$enable_shared]) 11180ba85709eSmrg 1118122663e35Smrg AC_MSG_CHECKING([whether to build static libraries]) 1118222663e35Smrg # Make sure either enable_shared or enable_static is yes. 1118322663e35Smrg test yes = "$enable_shared" || enable_static=yes 1118422663e35Smrg AC_MSG_RESULT([$enable_static]) 111851d54945dSmrg 1118622663e35Smrg _LT_TAGVAR(GCC, $1)=$G77 1118722663e35Smrg _LT_TAGVAR(LD, $1)=$LD 111881d54945dSmrg 1118922663e35Smrg ## CAVEAT EMPTOR: 1119022663e35Smrg ## There is no encapsulation within the following macros, do not change 1119122663e35Smrg ## the running order or otherwise move them around unless you know exactly 1119222663e35Smrg ## what you are doing... 1119322663e35Smrg _LT_COMPILER_PIC($1) 1119422663e35Smrg _LT_COMPILER_C_O($1) 1119522663e35Smrg _LT_COMPILER_FILE_LOCKS($1) 1119622663e35Smrg _LT_LINKER_SHLIBS($1) 1119722663e35Smrg _LT_SYS_DYNAMIC_LINKER($1) 1119822663e35Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 111991d54945dSmrg 1120022663e35Smrg _LT_CONFIG($1) 1120122663e35Smrg fi # test -n "$compiler" 112021d54945dSmrg 1120322663e35Smrg GCC=$lt_save_GCC 1120422663e35Smrg CC=$lt_save_CC 1120522663e35Smrg CFLAGS=$lt_save_CFLAGS 1120622663e35Smrgfi # test yes != "$_lt_disable_F77" 11207ba85709eSmrg 1120822663e35SmrgAC_LANG_POP 1120922663e35Smrg])# _LT_LANG_F77_CONFIG 11210d769e936Smrg 11211d769e936Smrg 1121222663e35Smrg# _LT_LANG_FC_CONFIG([TAG]) 1121322663e35Smrg# ------------------------- 1121422663e35Smrg# Ensure that the configuration variables for a Fortran compiler are 1121522663e35Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 1121622663e35Smrg# to write the compiler configuration to 'libtool'. 1121722663e35Smrgm4_defun([_LT_LANG_FC_CONFIG], 1121822663e35Smrg[AC_LANG_PUSH(Fortran) 11219d769e936Smrg 1122022663e35Smrgif test -z "$FC" || test no = "$FC"; then 1122122663e35Smrg _lt_disable_FC=yes 11222ba85709eSmrgfi 11223ba85709eSmrg 1122422663e35Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 1122522663e35Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 1122622663e35Smrg_LT_TAGVAR(always_export_symbols, $1)=no 1122722663e35Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 1122822663e35Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 1122922663e35Smrg_LT_TAGVAR(hardcode_direct, $1)=no 1123022663e35Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 1123122663e35Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 1123222663e35Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 1123322663e35Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 1123422663e35Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 1123522663e35Smrg_LT_TAGVAR(inherit_rpath, $1)=no 1123622663e35Smrg_LT_TAGVAR(module_cmds, $1)= 1123722663e35Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 1123822663e35Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 1123922663e35Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 1124022663e35Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 1124122663e35Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 1124222663e35Smrg_LT_TAGVAR(no_undefined_flag, $1)= 1124322663e35Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 1124422663e35Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11245ba85709eSmrg 1124622663e35Smrg# Source file extension for fc test sources. 1124722663e35Smrgac_ext=${ac_fc_srcext-f} 11248d769e936Smrg 1124922663e35Smrg# Object file extension for compiled fc test sources. 1125022663e35Smrgobjext=o 1125122663e35Smrg_LT_TAGVAR(objext, $1)=$objext 11252d769e936Smrg 1125322663e35Smrg# No sense in running all these tests if we already determined that 1125422663e35Smrg# the FC compiler isn't working. Some variables (like enable_shared) 1125522663e35Smrg# are currently assumed to apply to all compilers on this platform, 1125622663e35Smrg# and will be corrupted by setting them based on a non-working compiler. 1125722663e35Smrgif test yes != "$_lt_disable_FC"; then 1125822663e35Smrg # Code to be used in simple compile tests 1125922663e35Smrg lt_simple_compile_test_code="\ 1126022663e35Smrg subroutine t 1126122663e35Smrg return 1126222663e35Smrg end 1126322663e35Smrg" 11264ba85709eSmrg 1126522663e35Smrg # Code to be used in simple link tests 1126622663e35Smrg lt_simple_link_test_code="\ 1126722663e35Smrg program t 1126822663e35Smrg end 1126922663e35Smrg" 11270ba85709eSmrg 1127122663e35Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 1127222663e35Smrg _LT_TAG_COMPILER 11273d769e936Smrg 1127422663e35Smrg # save warnings/boilerplate of simple test code 1127522663e35Smrg _LT_COMPILER_BOILERPLATE 1127622663e35Smrg _LT_LINKER_BOILERPLATE 11277d769e936Smrg 1127822663e35Smrg # Allow CC to be a program name with arguments. 1127922663e35Smrg lt_save_CC=$CC 1128022663e35Smrg lt_save_GCC=$GCC 1128122663e35Smrg lt_save_CFLAGS=$CFLAGS 1128222663e35Smrg CC=${FC-"f95"} 1128322663e35Smrg CFLAGS=$FCFLAGS 1128422663e35Smrg compiler=$CC 1128522663e35Smrg GCC=$ac_cv_fc_compiler_gnu 11286d769e936Smrg 1128722663e35Smrg _LT_TAGVAR(compiler, $1)=$CC 1128822663e35Smrg _LT_CC_BASENAME([$compiler]) 11289d769e936Smrg 1129022663e35Smrg if test -n "$compiler"; then 1129122663e35Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 1129222663e35Smrg AC_MSG_RESULT([$can_build_shared]) 11293d769e936Smrg 1129422663e35Smrg AC_MSG_CHECKING([whether to build shared libraries]) 1129522663e35Smrg test no = "$can_build_shared" && enable_shared=no 11296d769e936Smrg 1129722663e35Smrg # On AIX, shared libraries and static libraries use the same namespace, and 1129822663e35Smrg # are all built from PIC. 1129922663e35Smrg case $host_os in 1130022663e35Smrg aix3*) 1130122663e35Smrg test yes = "$enable_shared" && enable_static=no 1130222663e35Smrg if test -n "$RANLIB"; then 1130322663e35Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 1130422663e35Smrg postinstall_cmds='$RANLIB $lib' 1130522663e35Smrg fi 1130622663e35Smrg ;; 1130722663e35Smrg aix[[4-9]]*) 1130822663e35Smrg if test ia64 != "$host_cpu"; then 1130922663e35Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 1131022663e35Smrg yes,aix,yes) ;; # shared object as lib.so file only 1131122663e35Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 1131222663e35Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 1131322663e35Smrg esac 11314d769e936Smrg fi 1131522663e35Smrg ;; 1131622663e35Smrg esac 1131722663e35Smrg AC_MSG_RESULT([$enable_shared]) 11318d769e936Smrg 1131922663e35Smrg AC_MSG_CHECKING([whether to build static libraries]) 1132022663e35Smrg # Make sure either enable_shared or enable_static is yes. 1132122663e35Smrg test yes = "$enable_shared" || enable_static=yes 1132222663e35Smrg AC_MSG_RESULT([$enable_static]) 11323d769e936Smrg 1132422663e35Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 1132522663e35Smrg _LT_TAGVAR(LD, $1)=$LD 11326d769e936Smrg 1132722663e35Smrg ## CAVEAT EMPTOR: 1132822663e35Smrg ## There is no encapsulation within the following macros, do not change 1132922663e35Smrg ## the running order or otherwise move them around unless you know exactly 1133022663e35Smrg ## what you are doing... 1133122663e35Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 1133222663e35Smrg _LT_COMPILER_PIC($1) 1133322663e35Smrg _LT_COMPILER_C_O($1) 1133422663e35Smrg _LT_COMPILER_FILE_LOCKS($1) 1133522663e35Smrg _LT_LINKER_SHLIBS($1) 1133622663e35Smrg _LT_SYS_DYNAMIC_LINKER($1) 1133722663e35Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11338d769e936Smrg 1133922663e35Smrg _LT_CONFIG($1) 1134022663e35Smrg fi # test -n "$compiler" 11341d769e936Smrg 1134222663e35Smrg GCC=$lt_save_GCC 1134322663e35Smrg CC=$lt_save_CC 1134422663e35Smrg CFLAGS=$lt_save_CFLAGS 1134522663e35Smrgfi # test yes != "$_lt_disable_FC" 11346d769e936Smrg 1134722663e35SmrgAC_LANG_POP 1134822663e35Smrg])# _LT_LANG_FC_CONFIG 11349d769e936Smrg 11350d769e936Smrg 1135122663e35Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 1135222663e35Smrg# -------------------------- 1135322663e35Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 1135422663e35Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 1135522663e35Smrg# to write the compiler configuration to 'libtool'. 1135622663e35Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 1135722663e35Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 1135822663e35SmrgAC_LANG_SAVE 11359d769e936Smrg 1136022663e35Smrg# Source file extension for Java test sources. 1136122663e35Smrgac_ext=java 11362d769e936Smrg 1136322663e35Smrg# Object file extension for compiled Java test sources. 1136422663e35Smrgobjext=o 1136522663e35Smrg_LT_TAGVAR(objext, $1)=$objext 11366d769e936Smrg 1136722663e35Smrg# Code to be used in simple compile tests 1136822663e35Smrglt_simple_compile_test_code="class foo {}" 11369d769e936Smrg 1137022663e35Smrg# Code to be used in simple link tests 1137122663e35Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11372d769e936Smrg 1137322663e35Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 1137422663e35Smrg_LT_TAG_COMPILER 11375d769e936Smrg 1137622663e35Smrg# save warnings/boilerplate of simple test code 1137722663e35Smrg_LT_COMPILER_BOILERPLATE 1137822663e35Smrg_LT_LINKER_BOILERPLATE 11379d769e936Smrg 1138022663e35Smrg# Allow CC to be a program name with arguments. 1138122663e35Smrglt_save_CC=$CC 1138222663e35Smrglt_save_CFLAGS=$CFLAGS 1138322663e35Smrglt_save_GCC=$GCC 1138422663e35SmrgGCC=yes 1138522663e35SmrgCC=${GCJ-"gcj"} 1138622663e35SmrgCFLAGS=$GCJFLAGS 1138722663e35Smrgcompiler=$CC 1138822663e35Smrg_LT_TAGVAR(compiler, $1)=$CC 1138922663e35Smrg_LT_TAGVAR(LD, $1)=$LD 1139022663e35Smrg_LT_CC_BASENAME([$compiler]) 1139122663e35Smrg 1139222663e35Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 1139322663e35Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 1139422663e35Smrg 1139522663e35Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 1139622663e35Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 1139722663e35Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 1139822663e35Smrg 1139922663e35Smrgif test -n "$compiler"; then 1140022663e35Smrg _LT_COMPILER_NO_RTTI($1) 1140122663e35Smrg _LT_COMPILER_PIC($1) 1140222663e35Smrg _LT_COMPILER_C_O($1) 1140322663e35Smrg _LT_COMPILER_FILE_LOCKS($1) 1140422663e35Smrg _LT_LINKER_SHLIBS($1) 1140522663e35Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 1140622663e35Smrg 1140722663e35Smrg _LT_CONFIG($1) 11408d769e936Smrgfi 11409d769e936Smrg 1141022663e35SmrgAC_LANG_RESTORE 11411d769e936Smrg 1141222663e35SmrgGCC=$lt_save_GCC 1141322663e35SmrgCC=$lt_save_CC 1141422663e35SmrgCFLAGS=$lt_save_CFLAGS 1141522663e35Smrg])# _LT_LANG_GCJ_CONFIG 11416d769e936Smrg 11417d769e936Smrg 1141822663e35Smrg# _LT_LANG_GO_CONFIG([TAG]) 1141922663e35Smrg# -------------------------- 1142022663e35Smrg# Ensure that the configuration variables for the GNU Go compiler 1142122663e35Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 1142222663e35Smrg# to write the compiler configuration to 'libtool'. 1142322663e35Smrgm4_defun([_LT_LANG_GO_CONFIG], 1142422663e35Smrg[AC_REQUIRE([LT_PROG_GO])dnl 1142522663e35SmrgAC_LANG_SAVE 11426d769e936Smrg 1142722663e35Smrg# Source file extension for Go test sources. 1142822663e35Smrgac_ext=go 11429d769e936Smrg 1143022663e35Smrg# Object file extension for compiled Go test sources. 1143122663e35Smrgobjext=o 1143222663e35Smrg_LT_TAGVAR(objext, $1)=$objext 11433d769e936Smrg 1143422663e35Smrg# Code to be used in simple compile tests 1143522663e35Smrglt_simple_compile_test_code="package main; func main() { }" 11436d769e936Smrg 1143722663e35Smrg# Code to be used in simple link tests 1143822663e35Smrglt_simple_link_test_code='package main; func main() { }' 11439d769e936Smrg 1144022663e35Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 1144122663e35Smrg_LT_TAG_COMPILER 11442d769e936Smrg 1144322663e35Smrg# save warnings/boilerplate of simple test code 1144422663e35Smrg_LT_COMPILER_BOILERPLATE 1144522663e35Smrg_LT_LINKER_BOILERPLATE 114461d54945dSmrg 1144722663e35Smrg# Allow CC to be a program name with arguments. 1144822663e35Smrglt_save_CC=$CC 1144922663e35Smrglt_save_CFLAGS=$CFLAGS 1145022663e35Smrglt_save_GCC=$GCC 1145122663e35SmrgGCC=yes 1145222663e35SmrgCC=${GOC-"gccgo"} 1145322663e35SmrgCFLAGS=$GOFLAGS 1145422663e35Smrgcompiler=$CC 1145522663e35Smrg_LT_TAGVAR(compiler, $1)=$CC 1145622663e35Smrg_LT_TAGVAR(LD, $1)=$LD 1145722663e35Smrg_LT_CC_BASENAME([$compiler]) 114587322289dSmrg 1145922663e35Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 1146022663e35Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 114611d54945dSmrg 1146222663e35Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 1146322663e35Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 1146422663e35Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11465786a6f21Smrg 1146622663e35Smrgif test -n "$compiler"; then 1146722663e35Smrg _LT_COMPILER_NO_RTTI($1) 1146822663e35Smrg _LT_COMPILER_PIC($1) 1146922663e35Smrg _LT_COMPILER_C_O($1) 1147022663e35Smrg _LT_COMPILER_FILE_LOCKS($1) 1147122663e35Smrg _LT_LINKER_SHLIBS($1) 1147222663e35Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 1147322663e35Smrg 1147422663e35Smrg _LT_CONFIG($1) 1147522663e35Smrgfi 1147622663e35Smrg 1147722663e35SmrgAC_LANG_RESTORE 1147822663e35Smrg 1147922663e35SmrgGCC=$lt_save_GCC 1148022663e35SmrgCC=$lt_save_CC 1148122663e35SmrgCFLAGS=$lt_save_CFLAGS 1148222663e35Smrg])# _LT_LANG_GO_CONFIG 1148322663e35Smrg 1148422663e35Smrg 1148522663e35Smrg# _LT_LANG_RC_CONFIG([TAG]) 1148622663e35Smrg# ------------------------- 1148722663e35Smrg# Ensure that the configuration variables for the Windows resource compiler 1148822663e35Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 1148922663e35Smrg# to write the compiler configuration to 'libtool'. 1149022663e35Smrgm4_defun([_LT_LANG_RC_CONFIG], 1149122663e35Smrg[AC_REQUIRE([LT_PROG_RC])dnl 1149222663e35SmrgAC_LANG_SAVE 11493d769e936Smrg 1149422663e35Smrg# Source file extension for RC test sources. 1149522663e35Smrgac_ext=rc 11496d769e936Smrg 1149722663e35Smrg# Object file extension for compiled RC test sources. 1149822663e35Smrgobjext=o 1149922663e35Smrg_LT_TAGVAR(objext, $1)=$objext 11500d769e936Smrg 1150122663e35Smrg# Code to be used in simple compile tests 1150222663e35Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 115031d54945dSmrg 1150422663e35Smrg# Code to be used in simple link tests 1150522663e35Smrglt_simple_link_test_code=$lt_simple_compile_test_code 11506ba85709eSmrg 1150722663e35Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 1150822663e35Smrg_LT_TAG_COMPILER 115091d54945dSmrg 1151022663e35Smrg# save warnings/boilerplate of simple test code 1151122663e35Smrg_LT_COMPILER_BOILERPLATE 1151222663e35Smrg_LT_LINKER_BOILERPLATE 115131d54945dSmrg 1151422663e35Smrg# Allow CC to be a program name with arguments. 1151522663e35Smrglt_save_CC=$CC 1151622663e35Smrglt_save_CFLAGS=$CFLAGS 1151722663e35Smrglt_save_GCC=$GCC 1151822663e35SmrgGCC= 1151922663e35SmrgCC=${RC-"windres"} 1152022663e35SmrgCFLAGS= 1152122663e35Smrgcompiler=$CC 1152222663e35Smrg_LT_TAGVAR(compiler, $1)=$CC 1152322663e35Smrg_LT_CC_BASENAME([$compiler]) 1152422663e35Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 115251d54945dSmrg 1152622663e35Smrgif test -n "$compiler"; then 1152722663e35Smrg : 1152822663e35Smrg _LT_CONFIG($1) 1152922663e35Smrgfi 115301d54945dSmrg 1153122663e35SmrgGCC=$lt_save_GCC 1153222663e35SmrgAC_LANG_RESTORE 1153322663e35SmrgCC=$lt_save_CC 1153422663e35SmrgCFLAGS=$lt_save_CFLAGS 1153522663e35Smrg])# _LT_LANG_RC_CONFIG 115361d54945dSmrg 1153722663e35Smrg 1153822663e35Smrg# LT_PROG_GCJ 1153922663e35Smrg# ----------- 1154022663e35SmrgAC_DEFUN([LT_PROG_GCJ], 1154122663e35Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 1154222663e35Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 1154322663e35Smrg [AC_CHECK_TOOL(GCJ, gcj,) 1154422663e35Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 1154522663e35Smrg AC_SUBST(GCJFLAGS)])])[]dnl 115461d54945dSmrg]) 115471d54945dSmrg 1154822663e35Smrg# Old name: 1154922663e35SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 1155022663e35Smrgdnl aclocal-1.4 backwards compatibility: 1155122663e35Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 115521d54945dSmrg 115531d54945dSmrg 1155422663e35Smrg# LT_PROG_GO 1155522663e35Smrg# ---------- 1155622663e35SmrgAC_DEFUN([LT_PROG_GO], 1155722663e35Smrg[AC_CHECK_TOOL(GOC, gccgo,) 1155822663e35Smrg]) 115591d54945dSmrg 115601d54945dSmrg 1156122663e35Smrg# LT_PROG_RC 1156222663e35Smrg# ---------- 1156322663e35SmrgAC_DEFUN([LT_PROG_RC], 1156422663e35Smrg[AC_CHECK_TOOL(RC, windres,) 1156522663e35Smrg]) 115661d54945dSmrg 1156722663e35Smrg# Old name: 1156822663e35SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 1156922663e35Smrgdnl aclocal-1.4 backwards compatibility: 1157022663e35Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 115711d54945dSmrg 115721d54945dSmrg 1157322663e35Smrg# _LT_DECL_EGREP 1157422663e35Smrg# -------------- 1157522663e35Smrg# If we don't have a new enough Autoconf to choose the best grep 1157622663e35Smrg# available, choose the one first in the user's PATH. 1157722663e35Smrgm4_defun([_LT_DECL_EGREP], 1157822663e35Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 1157922663e35SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 1158022663e35Smrgtest -z "$GREP" && GREP=grep 1158122663e35Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 1158222663e35Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 1158322663e35Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 1158422663e35Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 1158522663e35SmrgAC_SUBST([GREP]) 1158622663e35Smrg]) 115871d54945dSmrg 115881d54945dSmrg 1158922663e35Smrg# _LT_DECL_OBJDUMP 1159022663e35Smrg# -------------- 1159122663e35Smrg# If we don't have a new enough Autoconf to choose the best objdump 1159222663e35Smrg# available, choose the one first in the user's PATH. 1159322663e35Smrgm4_defun([_LT_DECL_OBJDUMP], 1159422663e35Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 1159522663e35Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1159622663e35Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 1159722663e35SmrgAC_SUBST([OBJDUMP]) 1159822663e35Smrg]) 1159922663e35Smrg 1160022663e35Smrg# _LT_DECL_DLLTOOL 1160122663e35Smrg# ---------------- 1160222663e35Smrg# Ensure DLLTOOL variable is set. 1160322663e35Smrgm4_defun([_LT_DECL_DLLTOOL], 1160422663e35Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1160522663e35Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1160622663e35Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 1160722663e35SmrgAC_SUBST([DLLTOOL]) 1160822663e35Smrg]) 1160922663e35Smrg 1161022663e35Smrg# _LT_DECL_FILECMD 1161122663e35Smrg# ---------------- 1161222663e35Smrg# Check for a file(cmd) program that can be used to detect file type and magic 1161322663e35Smrgm4_defun([_LT_DECL_FILECMD], 1161422663e35Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 1161522663e35Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 1161622663e35Smrg])# _LD_DECL_FILECMD 116171d54945dSmrg 1161822663e35Smrg# _LT_DECL_SED 1161922663e35Smrg# ------------ 1162022663e35Smrg# Check for a fully-functional sed program, that truncates 1162122663e35Smrg# as few characters as possible. Prefer GNU sed if found. 1162222663e35Smrgm4_defun([_LT_DECL_SED], 1162322663e35Smrg[AC_PROG_SED 1162422663e35Smrgtest -z "$SED" && SED=sed 1162522663e35SmrgXsed="$SED -e 1s/^X//" 1162622663e35Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 1162722663e35Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 1162822663e35Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 1162922663e35Smrg])# _LT_DECL_SED 11630ec713c28Smrg 1163122663e35Smrgm4_ifndef([AC_PROG_SED], [ 1163222663e35Smrg# NOTE: This macro has been submitted for inclusion into # 1163322663e35Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 1163422663e35Smrg# a released version of Autoconf we should remove this # 1163522663e35Smrg# macro and use it instead. # 116361d54945dSmrg 1163722663e35Smrgm4_defun([AC_PROG_SED], 1163822663e35Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 1163922663e35SmrgAC_CACHE_VAL(lt_cv_path_SED, 1164022663e35Smrg[# Loop through the user's path and test for sed and gsed. 1164122663e35Smrg# Then use that list of sed's as ones to test for truncation. 1164222663e35Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1164322663e35Smrgfor as_dir in $PATH 1164422663e35Smrgdo 1164522663e35Smrg IFS=$as_save_IFS 1164622663e35Smrg test -z "$as_dir" && as_dir=. 1164722663e35Smrg for lt_ac_prog in sed gsed; do 1164822663e35Smrg for ac_exec_ext in '' $ac_executable_extensions; do 1164922663e35Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 1165022663e35Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 116511d54945dSmrg fi 1165222663e35Smrg done 1165322663e35Smrg done 1165422663e35Smrgdone 1165522663e35SmrgIFS=$as_save_IFS 1165622663e35Smrglt_ac_max=0 1165722663e35Smrglt_ac_count=0 1165822663e35Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 1165922663e35Smrg# along with /bin/sed that truncates output. 1166022663e35Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 1166122663e35Smrg test ! -f "$lt_ac_sed" && continue 1166222663e35Smrg cat /dev/null > conftest.in 1166322663e35Smrg lt_ac_count=0 1166422663e35Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 1166522663e35Smrg # Check for GNU sed and select it if it is found. 1166622663e35Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 1166722663e35Smrg lt_cv_path_SED=$lt_ac_sed 1166822663e35Smrg break 1166922663e35Smrg fi 1167022663e35Smrg while true; do 1167122663e35Smrg cat conftest.in conftest.in >conftest.tmp 1167222663e35Smrg mv conftest.tmp conftest.in 1167322663e35Smrg cp conftest.in conftest.nl 1167422663e35Smrg echo >>conftest.nl 1167522663e35Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 1167622663e35Smrg cmp -s conftest.out conftest.nl || break 1167722663e35Smrg # 10000 chars as input seems more than enough 1167822663e35Smrg test 10 -lt "$lt_ac_count" && break 1167922663e35Smrg lt_ac_count=`expr $lt_ac_count + 1` 1168022663e35Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 1168122663e35Smrg lt_ac_max=$lt_ac_count 1168222663e35Smrg lt_cv_path_SED=$lt_ac_sed 116831d54945dSmrg fi 116841d54945dSmrg done 1168522663e35Smrgdone 1168622663e35Smrg]) 1168722663e35SmrgSED=$lt_cv_path_SED 1168822663e35SmrgAC_SUBST([SED]) 1168922663e35SmrgAC_MSG_RESULT([$SED]) 1169022663e35Smrg])#AC_PROG_SED 1169122663e35Smrg])#m4_ifndef 116921d54945dSmrg 1169322663e35Smrg# Old name: 1169422663e35SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 1169522663e35Smrgdnl aclocal-1.4 backwards compatibility: 1169622663e35Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 1169722663e35Smrg 1169822663e35Smrg 1169922663e35Smrg# _LT_CHECK_SHELL_FEATURES 1170022663e35Smrg# ------------------------ 1170122663e35Smrg# Find out whether the shell is Bourne or XSI compatible, 1170222663e35Smrg# or has some other useful features. 1170322663e35Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 1170422663e35Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 1170522663e35Smrg lt_unset=unset 117061d54945dSmrgelse 1170722663e35Smrg lt_unset=false 117081d54945dSmrgfi 1170922663e35Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 1171022663e35Smrg 1171122663e35Smrg# test EBCDIC or ASCII 1171222663e35Smrgcase `echo X|tr X '\101'` in 1171322663e35Smrg A) # ASCII based system 1171422663e35Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 1171522663e35Smrg lt_SP2NL='tr \040 \012' 1171622663e35Smrg lt_NL2SP='tr \015\012 \040\040' 1171722663e35Smrg ;; 1171822663e35Smrg *) # EBCDIC based system 1171922663e35Smrg lt_SP2NL='tr \100 \n' 1172022663e35Smrg lt_NL2SP='tr \r\n \100\100' 1172122663e35Smrg ;; 1172222663e35Smrgesac 1172322663e35Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 1172422663e35Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 1172522663e35Smrg])# _LT_CHECK_SHELL_FEATURES 1172622663e35Smrg 1172722663e35Smrg 1172822663e35Smrg# _LT_PATH_CONVERSION_FUNCTIONS 1172922663e35Smrg# ----------------------------- 1173022663e35Smrg# Determine what file name conversion functions should be used by 1173122663e35Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 1173222663e35Smrg# for certain cross-compile configurations and native mingw. 1173322663e35Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 1173422663e35Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1173522663e35SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1173622663e35SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 1173722663e35SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 1173822663e35Smrg[case $host in 1173922663e35Smrg *-*-mingw* ) 1174022663e35Smrg case $build in 1174122663e35Smrg *-*-mingw* ) # actually msys 1174222663e35Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 1174322663e35Smrg ;; 1174422663e35Smrg *-*-cygwin* ) 1174522663e35Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 1174622663e35Smrg ;; 1174722663e35Smrg * ) # otherwise, assume *nix 1174822663e35Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 1174922663e35Smrg ;; 1175022663e35Smrg esac 1175122663e35Smrg ;; 1175222663e35Smrg *-*-cygwin* ) 1175322663e35Smrg case $build in 1175422663e35Smrg *-*-mingw* ) # actually msys 1175522663e35Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 1175622663e35Smrg ;; 1175722663e35Smrg *-*-cygwin* ) 1175822663e35Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 1175922663e35Smrg ;; 1176022663e35Smrg * ) # otherwise, assume *nix 1176122663e35Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 1176222663e35Smrg ;; 1176322663e35Smrg esac 1176422663e35Smrg ;; 1176522663e35Smrg * ) # unhandled hosts (and "normal" native builds) 1176622663e35Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 1176722663e35Smrg ;; 1176822663e35Smrgesac 117691d54945dSmrg]) 1177022663e35Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 1177122663e35SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 1177222663e35Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 1177322663e35Smrg [0], [convert $build file names to $host format])dnl 1177422663e35Smrg 1177522663e35SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 1177622663e35SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 1177722663e35Smrg[#assume ordinary cross tools, or native build. 1177822663e35Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 1177922663e35Smrgcase $host in 1178022663e35Smrg *-*-mingw* ) 1178122663e35Smrg case $build in 1178222663e35Smrg *-*-mingw* ) # actually msys 1178322663e35Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 1178422663e35Smrg ;; 1178522663e35Smrg esac 1178622663e35Smrg ;; 1178722663e35Smrgesac 117881d54945dSmrg]) 1178922663e35Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 1179022663e35SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 1179122663e35Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 1179222663e35Smrg [0], [convert $build files to toolchain format])dnl 1179322663e35Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 117941d54945dSmrg 1179522663e35Smrg# Helper functions for option handling. -*- Autoconf -*- 1179622663e35Smrg# 1179722663e35Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 1179822663e35Smrg# Software Foundation, Inc. 1179922663e35Smrg# Written by Gary V. Vaughan, 2004 1180022663e35Smrg# 1180122663e35Smrg# This file is free software; the Free Software Foundation gives 1180222663e35Smrg# unlimited permission to copy and/or distribute it, with or without 1180322663e35Smrg# modifications, as long as this notice is preserved. 118041d54945dSmrg 1180522663e35Smrg# serial 8 ltoptions.m4 1180622663e35Smrg 1180722663e35Smrg# This is to help aclocal find these macros, as it can't see m4_define. 1180822663e35SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 1180922663e35Smrg 1181022663e35Smrg 1181122663e35Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 1181222663e35Smrg# ------------------------------------------ 1181322663e35Smrgm4_define([_LT_MANGLE_OPTION], 1181422663e35Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 1181522663e35Smrg 1181622663e35Smrg 1181722663e35Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 1181822663e35Smrg# --------------------------------------- 1181922663e35Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 1182022663e35Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 1182122663e35Smrg# saved as a flag. 1182222663e35Smrgm4_define([_LT_SET_OPTION], 1182322663e35Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 1182422663e35Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 1182522663e35Smrg _LT_MANGLE_DEFUN([$1], [$2]), 1182622663e35Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 118271d54945dSmrg]) 118281d54945dSmrg 118291d54945dSmrg 1183022663e35Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 1183122663e35Smrg# ------------------------------------------------------------ 1183222663e35Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1183322663e35Smrgm4_define([_LT_IF_OPTION], 1183422663e35Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 1183522663e35Smrg 1183622663e35Smrg 1183722663e35Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 1183822663e35Smrg# ------------------------------------------------------- 1183922663e35Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 1184022663e35Smrg# are set. 1184122663e35Smrgm4_define([_LT_UNLESS_OPTIONS], 1184222663e35Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 1184322663e35Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 1184422663e35Smrg [m4_define([$0_found])])])[]dnl 1184522663e35Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 1184622663e35Smrg])[]dnl 118471d54945dSmrg]) 118481d54945dSmrg 118491d54945dSmrg 1185022663e35Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 1185122663e35Smrg# ---------------------------------------- 1185222663e35Smrg# OPTION-LIST is a space-separated list of Libtool options associated 1185322663e35Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 1185422663e35Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 1185522663e35Smrg# the unknown option and exit. 1185622663e35Smrgm4_defun([_LT_SET_OPTIONS], 1185722663e35Smrg[# Set options 1185822663e35Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 1185922663e35Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 1186022663e35Smrg 1186122663e35Smrgm4_if([$1],[LT_INIT],[ 1186222663e35Smrg dnl 1186322663e35Smrg dnl Simply set some default values (i.e off) if boolean options were not 1186422663e35Smrg dnl specified: 1186522663e35Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 1186622663e35Smrg ]) 1186722663e35Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 1186822663e35Smrg ]) 1186922663e35Smrg dnl 1187022663e35Smrg dnl If no reference was made to various pairs of opposing options, then 1187122663e35Smrg dnl we run the default mode handler for the pair. For example, if neither 1187222663e35Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 1187322663e35Smrg dnl archives by default: 1187422663e35Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 1187522663e35Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 1187622663e35Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 1187722663e35Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 1187822663e35Smrg [_LT_ENABLE_FAST_INSTALL]) 1187922663e35Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 1188022663e35Smrg [_LT_WITH_AIX_SONAME([aix])]) 1188122663e35Smrg ]) 1188222663e35Smrg])# _LT_SET_OPTIONS 118831d54945dSmrg 118841d54945dSmrg 118851d54945dSmrg 1188622663e35Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 1188722663e35Smrg# ----------------------------------------- 1188822663e35Smrgm4_define([_LT_MANGLE_DEFUN], 1188922663e35Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 118901d54945dSmrg 1189122663e35Smrg 1189222663e35Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 1189322663e35Smrg# ----------------------------------------------- 1189422663e35Smrgm4_define([LT_OPTION_DEFINE], 1189522663e35Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 1189622663e35Smrg])# LT_OPTION_DEFINE 1189722663e35Smrg 1189822663e35Smrg 1189922663e35Smrg# dlopen 1190022663e35Smrg# ------ 1190122663e35SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 119021d54945dSmrg]) 119031d54945dSmrg 1190422663e35SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 1190522663e35Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 1190622663e35SmrgAC_DIAGNOSE([obsolete], 1190722663e35Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1190822663e35Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 1190922663e35Smrg]) 119101d54945dSmrg 1191122663e35Smrgdnl aclocal-1.4 backwards compatibility: 1191222663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 119131d54945dSmrg 119141d54945dSmrg 1191522663e35Smrg# win32-dll 1191622663e35Smrg# --------- 1191722663e35Smrg# Declare package support for building win32 dll's. 1191822663e35SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 1191922663e35Smrg[enable_win32_dll=yes 1192022663e35Smrg 1192122663e35Smrgcase $host in 1192222663e35Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 1192322663e35Smrg AC_CHECK_TOOL(AS, as, false) 1192422663e35Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1192522663e35Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 1192622663e35Smrg ;; 1192722663e35Smrgesac 1192822663e35Smrg 1192922663e35Smrgtest -z "$AS" && AS=as 1193022663e35Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 1193122663e35Smrg 1193222663e35Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1193322663e35Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 1193422663e35Smrg 1193522663e35Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1193622663e35Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 1193722663e35Smrg])# win32-dll 1193822663e35Smrg 1193922663e35SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 1194022663e35Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1194122663e35Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 1194222663e35SmrgAC_DIAGNOSE([obsolete], 1194322663e35Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1194422663e35Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 119457322289dSmrg]) 119467322289dSmrg 1194722663e35Smrgdnl aclocal-1.4 backwards compatibility: 1194822663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 1194922663e35Smrg 1195022663e35Smrg 1195122663e35Smrg# _LT_ENABLE_SHARED([DEFAULT]) 1195222663e35Smrg# ---------------------------- 1195322663e35Smrg# implement the --enable-shared flag, and supports the 'shared' and 1195422663e35Smrg# 'disable-shared' LT_INIT options. 1195522663e35Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 1195622663e35Smrgm4_define([_LT_ENABLE_SHARED], 1195722663e35Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 1195822663e35SmrgAC_ARG_ENABLE([shared], 1195922663e35Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1196022663e35Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 1196122663e35Smrg [p=${PACKAGE-default} 1196222663e35Smrg case $enableval in 1196322663e35Smrg yes) enable_shared=yes ;; 1196422663e35Smrg no) enable_shared=no ;; 1196522663e35Smrg *) 1196622663e35Smrg enable_shared=no 1196722663e35Smrg # Look at the argument we got. We use all the common list separators. 1196822663e35Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 1196922663e35Smrg for pkg in $enableval; do 1197022663e35Smrg IFS=$lt_save_ifs 1197122663e35Smrg if test "X$pkg" = "X$p"; then 1197222663e35Smrg enable_shared=yes 1197322663e35Smrg fi 1197422663e35Smrg done 1197522663e35Smrg IFS=$lt_save_ifs 1197622663e35Smrg ;; 1197722663e35Smrg esac], 1197822663e35Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 119791d54945dSmrg 1198022663e35Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 1198122663e35Smrg [Whether or not to build shared libraries]) 1198222663e35Smrg])# _LT_ENABLE_SHARED 119831d54945dSmrg 1198422663e35SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 1198522663e35SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 119861d54945dSmrg 1198722663e35Smrg# Old names: 1198822663e35SmrgAC_DEFUN([AC_ENABLE_SHARED], 1198922663e35Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 1199022663e35Smrg]) 119911d54945dSmrg 1199222663e35SmrgAC_DEFUN([AC_DISABLE_SHARED], 1199322663e35Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 119941d54945dSmrg]) 119957322289dSmrg 1199622663e35SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 1199722663e35SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 119987322289dSmrg 1199922663e35Smrgdnl aclocal-1.4 backwards compatibility: 1200022663e35Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 1200122663e35Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 120027322289dSmrg 120037322289dSmrg 120047322289dSmrg 1200522663e35Smrg# _LT_ENABLE_STATIC([DEFAULT]) 1200622663e35Smrg# ---------------------------- 1200722663e35Smrg# implement the --enable-static flag, and support the 'static' and 1200822663e35Smrg# 'disable-static' LT_INIT options. 1200922663e35Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 1201022663e35Smrgm4_define([_LT_ENABLE_STATIC], 1201122663e35Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 1201222663e35SmrgAC_ARG_ENABLE([static], 1201322663e35Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 1201422663e35Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 1201522663e35Smrg [p=${PACKAGE-default} 1201622663e35Smrg case $enableval in 1201722663e35Smrg yes) enable_static=yes ;; 1201822663e35Smrg no) enable_static=no ;; 1201922663e35Smrg *) 1202022663e35Smrg enable_static=no 1202122663e35Smrg # Look at the argument we got. We use all the common list separators. 1202222663e35Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 1202322663e35Smrg for pkg in $enableval; do 1202422663e35Smrg IFS=$lt_save_ifs 1202522663e35Smrg if test "X$pkg" = "X$p"; then 1202622663e35Smrg enable_static=yes 1202722663e35Smrg fi 1202822663e35Smrg done 1202922663e35Smrg IFS=$lt_save_ifs 1203022663e35Smrg ;; 1203122663e35Smrg esac], 1203222663e35Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 120337322289dSmrg 1203422663e35Smrg _LT_DECL([build_old_libs], [enable_static], [0], 1203522663e35Smrg [Whether or not to build static libraries]) 1203622663e35Smrg])# _LT_ENABLE_STATIC 120377322289dSmrg 1203822663e35SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 1203922663e35SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 120401d54945dSmrg 1204122663e35Smrg# Old names: 1204222663e35SmrgAC_DEFUN([AC_ENABLE_STATIC], 1204322663e35Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 1204422663e35Smrg]) 12045ec713c28Smrg 1204622663e35SmrgAC_DEFUN([AC_DISABLE_STATIC], 1204722663e35Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 1204822663e35Smrg]) 120491d54945dSmrg 1205022663e35SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 1205122663e35SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 120521d54945dSmrg 1205322663e35Smrgdnl aclocal-1.4 backwards compatibility: 1205422663e35Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 1205522663e35Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 120561d54945dSmrg 120571d54945dSmrg 120581d54945dSmrg 1205922663e35Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 1206022663e35Smrg# ---------------------------------- 1206122663e35Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 1206222663e35Smrg# and 'disable-fast-install' LT_INIT options. 1206322663e35Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 1206422663e35Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 1206522663e35Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 1206622663e35SmrgAC_ARG_ENABLE([fast-install], 1206722663e35Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 1206822663e35Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 1206922663e35Smrg [p=${PACKAGE-default} 1207022663e35Smrg case $enableval in 1207122663e35Smrg yes) enable_fast_install=yes ;; 1207222663e35Smrg no) enable_fast_install=no ;; 1207322663e35Smrg *) 1207422663e35Smrg enable_fast_install=no 1207522663e35Smrg # Look at the argument we got. We use all the common list separators. 1207622663e35Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 1207722663e35Smrg for pkg in $enableval; do 1207822663e35Smrg IFS=$lt_save_ifs 1207922663e35Smrg if test "X$pkg" = "X$p"; then 1208022663e35Smrg enable_fast_install=yes 1208122663e35Smrg fi 1208222663e35Smrg done 1208322663e35Smrg IFS=$lt_save_ifs 1208422663e35Smrg ;; 1208522663e35Smrg esac], 1208622663e35Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 120871d54945dSmrg 1208822663e35Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 1208922663e35Smrg [Whether or not to optimize for fast installation])dnl 1209022663e35Smrg])# _LT_ENABLE_FAST_INSTALL 120911d54945dSmrg 1209222663e35SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 1209322663e35SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 120941d54945dSmrg 1209522663e35Smrg# Old names: 1209622663e35SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 1209722663e35Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 1209822663e35SmrgAC_DIAGNOSE([obsolete], 1209922663e35Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 1210022663e35Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 121011d54945dSmrg]) 121021d54945dSmrg 1210322663e35SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 1210422663e35Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 1210522663e35SmrgAC_DIAGNOSE([obsolete], 1210622663e35Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 1210722663e35Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 1210822663e35Smrg]) 121091d54945dSmrg 1211022663e35Smrgdnl aclocal-1.4 backwards compatibility: 1211122663e35Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 1211222663e35Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 121131d54945dSmrg 121141d54945dSmrg 1211522663e35Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 1211622663e35Smrg# ---------------------------------- 1211722663e35Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 1211822663e35Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 1211922663e35Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 1212022663e35Smrgm4_define([_LT_WITH_AIX_SONAME], 1212122663e35Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 1212222663e35Smrgshared_archive_member_spec= 1212322663e35Smrgcase $host,$enable_shared in 1212422663e35Smrgpower*-*-aix[[5-9]]*,yes) 1212522663e35Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 1212622663e35Smrg AC_ARG_WITH([aix-soname], 1212722663e35Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 1212822663e35Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 1212922663e35Smrg [case $withval in 1213022663e35Smrg aix|svr4|both) 1213122663e35Smrg ;; 1213222663e35Smrg *) 1213322663e35Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 1213422663e35Smrg ;; 1213522663e35Smrg esac 1213622663e35Smrg lt_cv_with_aix_soname=$with_aix_soname], 1213722663e35Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 1213822663e35Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 1213922663e35Smrg with_aix_soname=$lt_cv_with_aix_soname]) 1214022663e35Smrg AC_MSG_RESULT([$with_aix_soname]) 1214122663e35Smrg if test aix != "$with_aix_soname"; then 1214222663e35Smrg # For the AIX way of multilib, we name the shared archive member 1214322663e35Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 1214422663e35Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 1214522663e35Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 1214622663e35Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 1214722663e35Smrg if test 64 = "${OBJECT_MODE-32}"; then 1214822663e35Smrg shared_archive_member_spec=shr_64 1214922663e35Smrg else 1215022663e35Smrg shared_archive_member_spec=shr 1215122663e35Smrg fi 1215222663e35Smrg fi 1215322663e35Smrg ;; 1215422663e35Smrg*) 1215522663e35Smrg with_aix_soname=aix 1215622663e35Smrg ;; 1215722663e35Smrgesac 121581d54945dSmrg 1215922663e35Smrg_LT_DECL([], [shared_archive_member_spec], [0], 1216022663e35Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 1216122663e35Smrg])# _LT_WITH_AIX_SONAME 121621d54945dSmrg 1216322663e35SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 1216422663e35SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 1216522663e35SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 121661d54945dSmrg 121671d54945dSmrg 1216822663e35Smrg# _LT_WITH_PIC([MODE]) 12169d769e936Smrg# -------------------- 1217022663e35Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 1217122663e35Smrg# LT_INIT options. 1217222663e35Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 1217322663e35Smrgm4_define([_LT_WITH_PIC], 1217422663e35Smrg[AC_ARG_WITH([pic], 1217522663e35Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 1217622663e35Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 1217722663e35Smrg [lt_p=${PACKAGE-default} 1217822663e35Smrg case $withval in 1217922663e35Smrg yes|no) pic_mode=$withval ;; 1218022663e35Smrg *) 1218122663e35Smrg pic_mode=default 1218222663e35Smrg # Look at the argument we got. We use all the common list separators. 1218322663e35Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 1218422663e35Smrg for lt_pkg in $withval; do 1218522663e35Smrg IFS=$lt_save_ifs 1218622663e35Smrg if test "X$lt_pkg" = "X$lt_p"; then 1218722663e35Smrg pic_mode=yes 1218822663e35Smrg fi 1218922663e35Smrg done 1219022663e35Smrg IFS=$lt_save_ifs 1219122663e35Smrg ;; 1219222663e35Smrg esac], 1219322663e35Smrg [pic_mode=m4_default([$1], [default])]) 121941d54945dSmrg 1219522663e35Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 1219622663e35Smrg])# _LT_WITH_PIC 121971d54945dSmrg 1219822663e35SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 1219922663e35SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 122001d54945dSmrg 1220122663e35Smrg# Old name: 1220222663e35SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 1220322663e35Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 1220422663e35SmrgAC_DIAGNOSE([obsolete], 1220522663e35Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1220622663e35Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 1220722663e35Smrg]) 122087322289dSmrg 1220922663e35Smrgdnl aclocal-1.4 backwards compatibility: 1221022663e35Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 122117322289dSmrg 122121d54945dSmrg 1221322663e35Smrgm4_define([_LTDL_MODE], []) 1221422663e35SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 1221522663e35Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 1221622663e35SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 1221722663e35Smrg [m4_define([_LTDL_MODE], [recursive])]) 1221822663e35SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 1221922663e35Smrg [m4_define([_LTDL_MODE], [subproject])]) 1222022663e35Smrg 1222122663e35Smrgm4_define([_LTDL_TYPE], []) 1222222663e35SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 1222322663e35Smrg [m4_define([_LTDL_TYPE], [installable])]) 1222422663e35SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 1222522663e35Smrg [m4_define([_LTDL_TYPE], [convenience])]) 1222622663e35Smrg 1222722663e35Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 122281d54945dSmrg# 1222922663e35Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 1223022663e35Smrg# Foundation, Inc. 1223122663e35Smrg# Written by Gary V. Vaughan, 2004 1223222663e35Smrg# 1223322663e35Smrg# This file is free software; the Free Software Foundation gives 1223422663e35Smrg# unlimited permission to copy and/or distribute it, with or without 1223522663e35Smrg# modifications, as long as this notice is preserved. 122361d54945dSmrg 1223722663e35Smrg# serial 6 ltsugar.m4 122387322289dSmrg 1223922663e35Smrg# This is to help aclocal find these macros, as it can't see m4_define. 1224022663e35SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 122417322289dSmrg 122421d54945dSmrg 1224322663e35Smrg# lt_join(SEP, ARG1, [ARG2...]) 1224422663e35Smrg# ----------------------------- 1224522663e35Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 1224622663e35Smrg# associated separator. 1224722663e35Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 1224822663e35Smrg# versions in m4sugar had bugs. 1224922663e35Smrgm4_define([lt_join], 1225022663e35Smrg[m4_if([$#], [1], [], 1225122663e35Smrg [$#], [2], [[$2]], 1225222663e35Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 1225322663e35Smrgm4_define([_lt_join], 1225422663e35Smrg[m4_if([$#$2], [2], [], 1225522663e35Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12256ec713c28Smrg 122577322289dSmrg 1225822663e35Smrg# lt_car(LIST) 1225922663e35Smrg# lt_cdr(LIST) 1226022663e35Smrg# ------------ 1226122663e35Smrg# Manipulate m4 lists. 1226222663e35Smrg# These macros are necessary as long as will still need to support 1226322663e35Smrg# Autoconf-2.59, which quotes differently. 1226422663e35Smrgm4_define([lt_car], [[$1]]) 1226522663e35Smrgm4_define([lt_cdr], 1226622663e35Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 1226722663e35Smrg [$#], 1, [], 1226822663e35Smrg [m4_dquote(m4_shift($@))])]) 1226922663e35Smrgm4_define([lt_unquote], $1) 1227022663e35Smrg 122711d54945dSmrg 1227222663e35Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 1227322663e35Smrg# ------------------------------------------ 1227422663e35Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 1227522663e35Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 1227622663e35Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 1227722663e35Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 1227822663e35Smrg# than defined and empty). 12279d769e936Smrg# 1228022663e35Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 1228122663e35Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 1228222663e35Smrgm4_define([lt_append], 1228322663e35Smrg[m4_define([$1], 1228422663e35Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12285d769e936Smrg 12286d769e936Smrg 122871d54945dSmrg 1228822663e35Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 1228922663e35Smrg# ---------------------------------------------------------- 1229022663e35Smrg# Produce a SEP delimited list of all paired combinations of elements of 1229122663e35Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 1229222663e35Smrg# has the form PREFIXmINFIXSUFFIXn. 1229322663e35Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 1229422663e35Smrgm4_define([lt_combine], 1229522663e35Smrg[m4_if(m4_eval([$# > 3]), [1], 1229622663e35Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 1229722663e35Smrg[[m4_foreach([_Lt_prefix], [$2], 1229822663e35Smrg [m4_foreach([_Lt_suffix], 1229922663e35Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 1230022663e35Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 1230122663e35Smrg 1230222663e35Smrg 1230322663e35Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 1230422663e35Smrg# ----------------------------------------------------------------------- 1230522663e35Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 1230622663e35Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 1230722663e35Smrgm4_define([lt_if_append_uniq], 1230822663e35Smrg[m4_ifdef([$1], 1230922663e35Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 1231022663e35Smrg [lt_append([$1], [$2], [$3])$4], 1231122663e35Smrg [$5])], 1231222663e35Smrg [lt_append([$1], [$2], [$3])$4])]) 1231322663e35Smrg 1231422663e35Smrg 1231522663e35Smrg# lt_dict_add(DICT, KEY, VALUE) 1231622663e35Smrg# ----------------------------- 1231722663e35Smrgm4_define([lt_dict_add], 1231822663e35Smrg[m4_define([$1($2)], [$3])]) 123191d54945dSmrg 12320ba85709eSmrg 1232122663e35Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 1232222663e35Smrg# -------------------------------------------- 1232322663e35Smrgm4_define([lt_dict_add_subkey], 1232422663e35Smrg[m4_define([$1($2:$3)], [$4])]) 12325ba85709eSmrg 12326ec713c28Smrg 1232722663e35Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 1232822663e35Smrg# ---------------------------------- 1232922663e35Smrgm4_define([lt_dict_fetch], 1233022663e35Smrg[m4_ifval([$3], 1233122663e35Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 1233222663e35Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 123331d54945dSmrg 123341d54945dSmrg 1233522663e35Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 1233622663e35Smrg# ----------------------------------------------------------------- 1233722663e35Smrgm4_define([lt_if_dict_fetch], 1233822663e35Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 1233922663e35Smrg [$5], 1234022663e35Smrg [$6])]) 123417322289dSmrg 123421d54945dSmrg 1234322663e35Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 1234422663e35Smrg# -------------------------------------------------------------- 1234522663e35Smrgm4_define([lt_dict_filter], 1234622663e35Smrg[m4_if([$5], [], [], 1234722663e35Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 1234822663e35Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 1234922663e35Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 1235022663e35Smrg]) 123517322289dSmrg 1235222663e35Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 1235322663e35Smrg# 1235422663e35Smrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 1235522663e35Smrg# Inc. 1235622663e35Smrg# Written by Scott James Remnant, 2004 1235722663e35Smrg# 1235822663e35Smrg# This file is free software; the Free Software Foundation gives 1235922663e35Smrg# unlimited permission to copy and/or distribute it, with or without 1236022663e35Smrg# modifications, as long as this notice is preserved. 123611d54945dSmrg 1236222663e35Smrg# @configure_input@ 123637322289dSmrg 1236422663e35Smrg# serial 4245 ltversion.m4 1236522663e35Smrg# This file is part of GNU Libtool 123667322289dSmrg 1236722663e35Smrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 1236822663e35Smrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 123697322289dSmrg 1237022663e35SmrgAC_DEFUN([LTVERSION_VERSION], 1237122663e35Smrg[macro_version='2.4.7' 1237222663e35Smrgmacro_revision='2.4.7' 1237322663e35Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 1237422663e35Smrg_LT_DECL(, macro_revision, 0) 1237522663e35Smrg]) 123767322289dSmrg 1237722663e35Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 1237822663e35Smrg# 1237922663e35Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 1238022663e35Smrg# Software Foundation, Inc. 1238122663e35Smrg# Written by Scott James Remnant, 2004. 1238222663e35Smrg# 1238322663e35Smrg# This file is free software; the Free Software Foundation gives 1238422663e35Smrg# unlimited permission to copy and/or distribute it, with or without 1238522663e35Smrg# modifications, as long as this notice is preserved. 123867322289dSmrg 1238722663e35Smrg# serial 5 lt~obsolete.m4 123887322289dSmrg 1238922663e35Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 1239022663e35Smrg# 1239122663e35Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 1239222663e35Smrg# which have later been changed to m4_define as they aren't part of the 1239322663e35Smrg# exported API, or moved to Autoconf or Automake where they belong. 1239422663e35Smrg# 1239522663e35Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 1239622663e35Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 1239722663e35Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 1239822663e35Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 1239922663e35Smrg# and doesn't know about Autoconf macros at all.) 1240022663e35Smrg# 1240122663e35Smrg# So we provide this file, which has a silly filename so it's always 1240222663e35Smrg# included after everything else. This provides aclocal with the 1240322663e35Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 1240422663e35Smrg# because those macros already exist, or will be overwritten later. 1240522663e35Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 1240622663e35Smrg# 1240722663e35Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 1240822663e35Smrg# Yes, that means every name once taken will need to remain here until 1240922663e35Smrg# we give up compatibility with versions before 1.7, at which point 1241022663e35Smrg# we need to keep only those names which we still refer to. 124111d54945dSmrg 1241222663e35Smrg# This is to help aclocal find these macros, as it can't see m4_define. 1241322663e35SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 124147322289dSmrg 1241522663e35Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 1241622663e35Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 1241722663e35Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 1241822663e35Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 1241922663e35Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 1242022663e35Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 1242122663e35Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 1242222663e35Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 1242322663e35Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 1242422663e35Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 1242522663e35Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 1242622663e35Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 1242722663e35Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 1242822663e35Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 1242922663e35Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 1243022663e35Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 1243122663e35Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 1243222663e35Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 1243322663e35Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 1243422663e35Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 1243522663e35Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 1243622663e35Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 1243722663e35Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 1243822663e35Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 1243922663e35Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 1244022663e35Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 1244122663e35Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 1244222663e35Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 1244322663e35Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 1244422663e35Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 1244522663e35Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 1244622663e35Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 1244722663e35Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 1244822663e35Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 1244922663e35Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 1245022663e35Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 1245122663e35Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 1245222663e35Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 1245322663e35Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 1245422663e35Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 1245522663e35Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 1245622663e35Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 1245722663e35Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 1245822663e35Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 1245922663e35Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 1246022663e35Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 1246122663e35Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 1246222663e35Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 1246322663e35Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 1246422663e35Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 1246522663e35Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 1246622663e35Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 1246722663e35Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 1246822663e35Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 1246922663e35Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 1247022663e35Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 1247122663e35Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 1247222663e35Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 1247322663e35Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 1247422663e35Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 1247522663e35Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 124761d54945dSmrg 12477