aclocal.m4 revision da1f2d5d
1da1f2d5dSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 21bedbe3fSmrg 3da1f2d5dSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4ba6a1819Smrg 5ba6a1819Smrg# This file is free software; the Free Software Foundation 6ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 7ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 8ba6a1819Smrg 9ba6a1819Smrg# This program is distributed in the hope that it will be useful, 10ba6a1819Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ba6a1819Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ba6a1819Smrg# PARTICULAR PURPOSE. 13ba6a1819Smrg 141bedbe3fSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15549e21daSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16549e21daSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17da1f2d5dSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18da1f2d5dSmrg[m4_warning([this file was generated for autoconf 2.71. 19549e21daSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20549e21daSmrgIf you have problems, you may need to regenerate the build system entirely. 211bedbe3fSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22ba6a1819Smrg 23da1f2d5dSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24549e21daSmrg# 25549e21daSmrg# This file is free software; the Free Software Foundation 26549e21daSmrg# gives unlimited permission to copy and/or distribute it, 27549e21daSmrg# with or without modifications, as long as this notice is preserved. 282d8abe4fSmrg 29549e21daSmrg# AM_AUTOMAKE_VERSION(VERSION) 30549e21daSmrg# ---------------------------- 31549e21daSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32549e21daSmrg# generated from the m4 files accompanying Automake X.Y. 33549e21daSmrg# (This private macro should not be called outside this file.) 34549e21daSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35da1f2d5dSmrg[am__api_version='1.16' 36549e21daSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37549e21daSmrgdnl require some minimum version. Point them to the right macro. 38da1f2d5dSmrgm4_if([$1], [1.16.5], [], 39549e21daSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40549e21daSmrg]) 41549e21daSmrg 42549e21daSmrg# _AM_AUTOCONF_VERSION(VERSION) 43549e21daSmrg# ----------------------------- 44549e21daSmrg# aclocal traces this macro to find the Autoconf version. 45549e21daSmrg# This is a private macro too. Using m4_define simplifies 46549e21daSmrg# the logic in aclocal, which can simply ignore this definition. 47549e21daSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48549e21daSmrg 49549e21daSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50549e21daSmrg# ------------------------------- 51549e21daSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52549e21daSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53549e21daSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54da1f2d5dSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 55549e21daSmrgm4_ifndef([AC_AUTOCONF_VERSION], 56549e21daSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57549e21daSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58549e21daSmrg 59549e21daSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60549e21daSmrg 61da1f2d5dSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 622d8abe4fSmrg# 63549e21daSmrg# This file is free software; the Free Software Foundation 64549e21daSmrg# gives unlimited permission to copy and/or distribute it, 65549e21daSmrg# with or without modifications, as long as this notice is preserved. 66549e21daSmrg 67549e21daSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 681bedbe3fSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 691bedbe3fSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70549e21daSmrg# 71549e21daSmrg# Of course, Automake must honor this variable whenever it calls a 72549e21daSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 73549e21daSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74549e21daSmrg# depending on how configure is run. This is pretty annoying, since 75549e21daSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76549e21daSmrg# source directory, any form will work fine, but in subdirectories a 77549e21daSmrg# relative path needs to be adjusted first. 782d8abe4fSmrg# 79549e21daSmrg# $ac_aux_dir/missing 80549e21daSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 81549e21daSmrg# $top_srcdir/$ac_aux_dir/missing 82549e21daSmrg# fails if $ac_aux_dir is absolute, 83549e21daSmrg# fails when called from a subdirectory in a VPATH build with 84549e21daSmrg# a relative $ac_aux_dir 852d8abe4fSmrg# 86549e21daSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87549e21daSmrg# are both prefixed by $srcdir. In an in-source build this is usually 881bedbe3fSmrg# harmless because $srcdir is '.', but things will broke when you 89549e21daSmrg# start a VPATH build or use an absolute $srcdir. 902d8abe4fSmrg# 91549e21daSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92549e21daSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93549e21daSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94549e21daSmrg# and then we would define $MISSING as 95549e21daSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 96549e21daSmrg# This will work as long as MISSING is not called from configure, because 97549e21daSmrg# unfortunately $(top_srcdir) has no meaning in configure. 98549e21daSmrg# However there are other variables, like CC, which are often used in 99549e21daSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1002d8abe4fSmrg# 101549e21daSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 102549e21daSmrg# absolute PATH. The drawback is that using absolute paths prevent a 103549e21daSmrg# configured tree to be moved without reconfiguration. 1042d8abe4fSmrg 105549e21daSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106298453a4Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107298453a4Smrg# Expand $ac_aux_dir to an absolute path. 108298453a4Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 109549e21daSmrg]) 1102d8abe4fSmrg 111549e21daSmrg# AM_CONDITIONAL -*- Autoconf -*- 1122d8abe4fSmrg 113da1f2d5dSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 1142d8abe4fSmrg# 115549e21daSmrg# This file is free software; the Free Software Foundation 116549e21daSmrg# gives unlimited permission to copy and/or distribute it, 117549e21daSmrg# with or without modifications, as long as this notice is preserved. 1182d8abe4fSmrg 119549e21daSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120549e21daSmrg# ------------------------------------- 121549e21daSmrg# Define a conditional. 122549e21daSmrgAC_DEFUN([AM_CONDITIONAL], 1231bedbe3fSmrg[AC_PREREQ([2.52])dnl 1241bedbe3fSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1251bedbe3fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126549e21daSmrgAC_SUBST([$1_TRUE])dnl 127549e21daSmrgAC_SUBST([$1_FALSE])dnl 128549e21daSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129549e21daSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130549e21daSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131549e21daSmrgif $2; then 132549e21daSmrg $1_TRUE= 133549e21daSmrg $1_FALSE='#' 134549e21daSmrgelse 135549e21daSmrg $1_TRUE='#' 136549e21daSmrg $1_FALSE= 1372d8abe4fSmrgfi 138549e21daSmrgAC_CONFIG_COMMANDS_PRE( 139549e21daSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140549e21daSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 141549e21daSmrgUsually this means the macro was only invoked conditionally.]]) 142549e21daSmrgfi])]) 1432d8abe4fSmrg 144da1f2d5dSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 145549e21daSmrg# 146549e21daSmrg# This file is free software; the Free Software Foundation 147549e21daSmrg# gives unlimited permission to copy and/or distribute it, 148549e21daSmrg# with or without modifications, as long as this notice is preserved. 1492d8abe4fSmrg 1502d8abe4fSmrg 1511bedbe3fSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152549e21daSmrg# written in clear, in which case automake, when reading aclocal.m4, 153549e21daSmrg# will think it sees a *use*, and therefore will trigger all it's 154549e21daSmrg# C support machinery. Also note that it means that autoscan, seeing 155549e21daSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1562d8abe4fSmrg 1572d8abe4fSmrg 158549e21daSmrg# _AM_DEPENDENCIES(NAME) 159549e21daSmrg# ---------------------- 160549e21daSmrg# See how the compiler implements dependency checking. 1611bedbe3fSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162549e21daSmrg# We try a few techniques and use that to set a single cache variable. 163549e21daSmrg# 164549e21daSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165549e21daSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166549e21daSmrg# dependency, and given that the user is not expected to run this macro, 167549e21daSmrg# just rely on AC_PROG_CC. 168549e21daSmrgAC_DEFUN([_AM_DEPENDENCIES], 169549e21daSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170549e21daSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171549e21daSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172549e21daSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1732d8abe4fSmrg 1741bedbe3fSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1751bedbe3fSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1761bedbe3fSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1771bedbe3fSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1781bedbe3fSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1791bedbe3fSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1801bedbe3fSmrg [depcc="$$1" am_compiler_list=]) 1812d8abe4fSmrg 182549e21daSmrgAC_CACHE_CHECK([dependency style of $depcc], 183549e21daSmrg [am_cv_$1_dependencies_compiler_type], 184549e21daSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185549e21daSmrg # We make a subdir and do the tests there. Otherwise we can end up 186549e21daSmrg # making bogus files that we don't know about and never remove. For 187549e21daSmrg # instance it was reported that on HP-UX the gcc test will end up 1881bedbe3fSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 1891bedbe3fSmrg # in D". 1901bedbe3fSmrg rm -rf conftest.dir 191549e21daSmrg mkdir conftest.dir 192549e21daSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 193549e21daSmrg # using a relative directory. 194549e21daSmrg cp "$am_depcomp" conftest.dir 195549e21daSmrg cd conftest.dir 196549e21daSmrg # We will build objects and dependencies in a subdirectory because 197549e21daSmrg # it helps to detect inapplicable dependency modes. For instance 198549e21daSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 199549e21daSmrg # side effect of compilation, but ICC will put the dependencies in 200549e21daSmrg # the current directory while Tru64 will put them in the object 201549e21daSmrg # directory. 202549e21daSmrg mkdir sub 2032d8abe4fSmrg 204549e21daSmrg am_cv_$1_dependencies_compiler_type=none 205549e21daSmrg if test "$am_compiler_list" = ""; then 206549e21daSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207549e21daSmrg fi 208549e21daSmrg am__universal=false 209549e21daSmrg m4_case([$1], [CC], 210549e21daSmrg [case " $depcc " in #( 211549e21daSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212549e21daSmrg esac], 213549e21daSmrg [CXX], 214549e21daSmrg [case " $depcc " in #( 215549e21daSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216549e21daSmrg esac]) 2172d8abe4fSmrg 218549e21daSmrg for depmode in $am_compiler_list; do 219549e21daSmrg # Setup a source with many dependencies, because some compilers 220549e21daSmrg # like to wrap large dependency lists on column 80 (with \), and 221549e21daSmrg # we should not choose a depcomp mode which is confused by this. 222549e21daSmrg # 223549e21daSmrg # We need to recreate these files for each test, as the compiler may 224549e21daSmrg # overwrite some of them when testing with obscure command lines. 225549e21daSmrg # This happens at least with the AIX C compiler. 226549e21daSmrg : > sub/conftest.c 227549e21daSmrg for i in 1 2 3 4 5 6; do 228549e21daSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2291bedbe3fSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2301bedbe3fSmrg # Solaris 10 /bin/sh. 2311bedbe3fSmrg echo '/* dummy */' > sub/conftst$i.h 232549e21daSmrg done 233549e21daSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2342d8abe4fSmrg 2351bedbe3fSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236549e21daSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2371bedbe3fSmrg # handle '-M -o', and we need to detect this. Also, some Intel 2381bedbe3fSmrg # versions had trouble with output in subdirs. 239549e21daSmrg am__obj=sub/conftest.${OBJEXT-o} 240549e21daSmrg am__minus_obj="-o $am__obj" 241549e21daSmrg case $depmode in 242549e21daSmrg gcc) 243549e21daSmrg # This depmode causes a compiler race in universal mode. 244549e21daSmrg test "$am__universal" = false || continue 245549e21daSmrg ;; 246549e21daSmrg nosideeffect) 2471bedbe3fSmrg # After this tag, mechanisms are not by side-effect, so they'll 2481bedbe3fSmrg # only be used when explicitly requested. 249549e21daSmrg if test "x$enable_dependency_tracking" = xyes; then 250549e21daSmrg continue 251549e21daSmrg else 252549e21daSmrg break 253549e21daSmrg fi 254549e21daSmrg ;; 2551bedbe3fSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2561bedbe3fSmrg # This compiler won't grok '-c -o', but also, the minuso test has 257549e21daSmrg # not run yet. These depmodes are late enough in the game, and 258549e21daSmrg # so weak that their functioning should not be impacted. 259549e21daSmrg am__obj=conftest.${OBJEXT-o} 260549e21daSmrg am__minus_obj= 261549e21daSmrg ;; 262549e21daSmrg none) break ;; 263549e21daSmrg esac 264549e21daSmrg if depmode=$depmode \ 265549e21daSmrg source=sub/conftest.c object=$am__obj \ 266549e21daSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267549e21daSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268549e21daSmrg >/dev/null 2>conftest.err && 269549e21daSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270549e21daSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271549e21daSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272549e21daSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273549e21daSmrg # icc doesn't choke on unknown options, it will just issue warnings 274549e21daSmrg # or remarks (even with -Werror). So we grep stderr for any message 275549e21daSmrg # that says an option was ignored or not supported. 276549e21daSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277549e21daSmrg # icc: Command line warning: ignoring option '-M'; no argument required 278549e21daSmrg # The diagnosis changed in icc 8.0: 279549e21daSmrg # icc: Command line remark: option '-MP' not supported 280549e21daSmrg if (grep 'ignoring option' conftest.err || 281549e21daSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282549e21daSmrg am_cv_$1_dependencies_compiler_type=$depmode 283549e21daSmrg break 284549e21daSmrg fi 285549e21daSmrg fi 286549e21daSmrg done 2872d8abe4fSmrg 288549e21daSmrg cd .. 289549e21daSmrg rm -rf conftest.dir 2902d8abe4fSmrgelse 291549e21daSmrg am_cv_$1_dependencies_compiler_type=none 2922d8abe4fSmrgfi 293549e21daSmrg]) 294549e21daSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295549e21daSmrgAM_CONDITIONAL([am__fastdep$1], [ 296549e21daSmrg test "x$enable_dependency_tracking" != xno \ 297549e21daSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298549e21daSmrg]) 2992d8abe4fSmrg 3002d8abe4fSmrg 301549e21daSmrg# AM_SET_DEPDIR 302549e21daSmrg# ------------- 303549e21daSmrg# Choose a directory name for dependency files. 3041bedbe3fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305549e21daSmrgAC_DEFUN([AM_SET_DEPDIR], 306549e21daSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307549e21daSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308549e21daSmrg]) 3092d8abe4fSmrg 3102d8abe4fSmrg 311549e21daSmrg# AM_DEP_TRACK 312549e21daSmrg# ------------ 313549e21daSmrgAC_DEFUN([AM_DEP_TRACK], 3141bedbe3fSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3151bedbe3fSmrgAS_HELP_STRING( 3161bedbe3fSmrg [--enable-dependency-tracking], 3171bedbe3fSmrg [do not reject slow dependency extractors]) 3181bedbe3fSmrgAS_HELP_STRING( 3191bedbe3fSmrg [--disable-dependency-tracking], 3201bedbe3fSmrg [speeds up one-time build])]) 321549e21daSmrgif test "x$enable_dependency_tracking" != xno; then 322549e21daSmrg am_depcomp="$ac_aux_dir/depcomp" 323549e21daSmrg AMDEPBACKSLASH='\' 3241bedbe3fSmrg am__nodep='_no' 3252d8abe4fSmrgfi 326549e21daSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327549e21daSmrgAC_SUBST([AMDEPBACKSLASH])dnl 328549e21daSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3291bedbe3fSmrgAC_SUBST([am__nodep])dnl 3301bedbe3fSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 331549e21daSmrg]) 3322d8abe4fSmrg 333549e21daSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3342d8abe4fSmrg 335da1f2d5dSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 3362d8abe4fSmrg# 337549e21daSmrg# This file is free software; the Free Software Foundation 338549e21daSmrg# gives unlimited permission to copy and/or distribute it, 339549e21daSmrg# with or without modifications, as long as this notice is preserved. 3402d8abe4fSmrg 341549e21daSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 342549e21daSmrg# ------------------------------ 343549e21daSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 344549e21daSmrg[{ 3451bedbe3fSmrg # Older Autoconf quotes --file arguments for eval, but not when files 346549e21daSmrg # are listed without --file. Let's play safe and only enable the eval 347549e21daSmrg # if we detect the quoting. 348da1f2d5dSmrg # TODO: see whether this extra hack can be removed once we start 349da1f2d5dSmrg # requiring Autoconf 2.70 or later. 350da1f2d5dSmrg AS_CASE([$CONFIG_FILES], 351da1f2d5dSmrg [*\'*], [eval set x "$CONFIG_FILES"], 352da1f2d5dSmrg [*], [set x $CONFIG_FILES]) 353549e21daSmrg shift 354da1f2d5dSmrg # Used to flag and report bootstrapping failures. 355da1f2d5dSmrg am_rc=0 356da1f2d5dSmrg for am_mf 357549e21daSmrg do 358549e21daSmrg # Strip MF so we end up with the name of the file. 359da1f2d5dSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 360da1f2d5dSmrg # Check whether this is an Automake generated Makefile which includes 361da1f2d5dSmrg # dependency-tracking related rules and includes. 362da1f2d5dSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 363549e21daSmrg # limit of 2048, but all sed's we know have understand at least 4000. 364da1f2d5dSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 365da1f2d5dSmrg || continue 366da1f2d5dSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 367da1f2d5dSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 368da1f2d5dSmrg AM_RUN_LOG([cd "$am_dirpart" \ 369da1f2d5dSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 370da1f2d5dSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 371549e21daSmrg done 372da1f2d5dSmrg if test $am_rc -ne 0; then 373da1f2d5dSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 374da1f2d5dSmrg for automatic dependency tracking. If GNU make was not used, consider 375da1f2d5dSmrg re-running the configure script with MAKE="gmake" (or whatever is 376da1f2d5dSmrg necessary). You can also try re-running configure with the 377da1f2d5dSmrg '--disable-dependency-tracking' option to at least be able to build 378da1f2d5dSmrg the package (albeit without support for automatic dependency tracking).]) 379da1f2d5dSmrg fi 380da1f2d5dSmrg AS_UNSET([am_dirpart]) 381da1f2d5dSmrg AS_UNSET([am_filepart]) 382da1f2d5dSmrg AS_UNSET([am_mf]) 383da1f2d5dSmrg AS_UNSET([am_rc]) 384da1f2d5dSmrg rm -f conftest-deps.mk 385549e21daSmrg} 386549e21daSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3872d8abe4fSmrg 3882d8abe4fSmrg 389549e21daSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 390549e21daSmrg# ----------------------------- 391549e21daSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 392549e21daSmrg# 393da1f2d5dSmrg# This code is only required when automatic dependency tracking is enabled. 394da1f2d5dSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 395da1f2d5dSmrg# order to bootstrap the dependency handling code. 396549e21daSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 397549e21daSmrg[AC_CONFIG_COMMANDS([depfiles], 398549e21daSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 399da1f2d5dSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 4002d8abe4fSmrg 401549e21daSmrg# Do all the work for Automake. -*- Autoconf -*- 4022d8abe4fSmrg 403da1f2d5dSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4042d8abe4fSmrg# 405549e21daSmrg# This file is free software; the Free Software Foundation 406549e21daSmrg# gives unlimited permission to copy and/or distribute it, 407549e21daSmrg# with or without modifications, as long as this notice is preserved. 4082d8abe4fSmrg 409549e21daSmrg# This macro actually does too much. Some checks are only needed if 410549e21daSmrg# your package does certain things. But this isn't really a big deal. 411549e21daSmrg 4126af7124fSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 4136af7124fSmrgm4_define([AC_PROG_CC], 4146af7124fSmrgm4_defn([AC_PROG_CC]) 4156af7124fSmrg[_AM_PROG_CC_C_O 4166af7124fSmrg]) 4176af7124fSmrg 418549e21daSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 419549e21daSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 420549e21daSmrg# ----------------------------------------------- 421549e21daSmrg# The call with PACKAGE and VERSION arguments is the old style 422549e21daSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 423549e21daSmrg# and VERSION should now be passed to AC_INIT and removed from 424549e21daSmrg# the call to AM_INIT_AUTOMAKE. 425549e21daSmrg# We support both call styles for the transition. After 426549e21daSmrg# the next Automake release, Autoconf can make the AC_INIT 427549e21daSmrg# arguments mandatory, and then we can depend on a new Autoconf 428549e21daSmrg# release and drop the old call support. 429549e21daSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4301bedbe3fSmrg[AC_PREREQ([2.65])dnl 431da1f2d5dSmrgm4_ifdef([_$0_ALREADY_INIT], 432da1f2d5dSmrg [m4_fatal([$0 expanded multiple times 433da1f2d5dSmrg]m4_defn([_$0_ALREADY_INIT]))], 434da1f2d5dSmrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 435549e21daSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 436549e21daSmrgdnl the ones we care about. 437549e21daSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 438549e21daSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 439549e21daSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 440549e21daSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 441549e21daSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 442549e21daSmrg # is not polluted with repeated "-I." 443549e21daSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 444549e21daSmrg # test to see if srcdir already configured 445549e21daSmrg if test -f $srcdir/config.status; then 446549e21daSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 447549e21daSmrg fi 4482d8abe4fSmrgfi 4492d8abe4fSmrg 450549e21daSmrg# test whether we have cygpath 451549e21daSmrgif test -z "$CYGPATH_W"; then 452549e21daSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 453549e21daSmrg CYGPATH_W='cygpath -w' 454549e21daSmrg else 455549e21daSmrg CYGPATH_W=echo 456549e21daSmrg fi 4572d8abe4fSmrgfi 458549e21daSmrgAC_SUBST([CYGPATH_W]) 4592d8abe4fSmrg 460549e21daSmrg# Define the identity of the package. 461549e21daSmrgdnl Distinguish between old-style and new-style calls. 462549e21daSmrgm4_ifval([$2], 4631bedbe3fSmrg[AC_DIAGNOSE([obsolete], 4641bedbe3fSmrg [$0: two- and three-arguments forms are deprecated.]) 4651bedbe3fSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 466549e21daSmrg AC_SUBST([PACKAGE], [$1])dnl 467549e21daSmrg AC_SUBST([VERSION], [$2])], 468549e21daSmrg[_AM_SET_OPTIONS([$1])dnl 469549e21daSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4701bedbe3fSmrgm4_if( 471da1f2d5dSmrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 4721bedbe3fSmrg [ok:ok],, 473549e21daSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 474549e21daSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 475549e21daSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4762d8abe4fSmrg 477549e21daSmrg_AM_IF_OPTION([no-define],, 4781bedbe3fSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4791bedbe3fSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 4802d8abe4fSmrg 481549e21daSmrg# Some tools Automake needs. 482549e21daSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 483549e21daSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4841bedbe3fSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4851bedbe3fSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4861bedbe3fSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4871bedbe3fSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4881bedbe3fSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 489549e21daSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 490549e21daSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4911bedbe3fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4921bedbe3fSmrg# For better backward compatibility. To be removed once Automake 1.9.x 4931bedbe3fSmrg# dies out for good. For more background, see: 494da1f2d5dSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 495da1f2d5dSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 4961bedbe3fSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 497298453a4Smrg# We need awk for the "check" target (and possibly the TAP driver). The 498298453a4Smrg# system "awk" is bad on some platforms. 499549e21daSmrgAC_REQUIRE([AC_PROG_AWK])dnl 500549e21daSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 501549e21daSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 502549e21daSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 503549e21daSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 504549e21daSmrg [_AM_PROG_TAR([v7])])]) 505549e21daSmrg_AM_IF_OPTION([no-dependencies],, 506549e21daSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5071bedbe3fSmrg [_AM_DEPENDENCIES([CC])], 5081bedbe3fSmrg [m4_define([AC_PROG_CC], 5091bedbe3fSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 510549e21daSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5111bedbe3fSmrg [_AM_DEPENDENCIES([CXX])], 5121bedbe3fSmrg [m4_define([AC_PROG_CXX], 5131bedbe3fSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 514549e21daSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5151bedbe3fSmrg [_AM_DEPENDENCIES([OBJC])], 5161bedbe3fSmrg [m4_define([AC_PROG_OBJC], 5171bedbe3fSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5181bedbe3fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5191bedbe3fSmrg [_AM_DEPENDENCIES([OBJCXX])], 5201bedbe3fSmrg [m4_define([AC_PROG_OBJCXX], 5211bedbe3fSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 522549e21daSmrg]) 523da1f2d5dSmrg# Variables for tags utilities; see am/tags.am 524da1f2d5dSmrgif test -z "$CTAGS"; then 525da1f2d5dSmrg CTAGS=ctags 526da1f2d5dSmrgfi 527da1f2d5dSmrgAC_SUBST([CTAGS]) 528da1f2d5dSmrgif test -z "$ETAGS"; then 529da1f2d5dSmrg ETAGS=etags 530da1f2d5dSmrgfi 531da1f2d5dSmrgAC_SUBST([ETAGS]) 532da1f2d5dSmrgif test -z "$CSCOPE"; then 533da1f2d5dSmrg CSCOPE=cscope 534da1f2d5dSmrgfi 535da1f2d5dSmrgAC_SUBST([CSCOPE]) 536da1f2d5dSmrg 5371bedbe3fSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 5381bedbe3fSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 5391bedbe3fSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 5401bedbe3fSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 541549e21daSmrgAC_CONFIG_COMMANDS_PRE(dnl 542549e21daSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 543549e21daSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5446af7124fSmrg 5456af7124fSmrg# POSIX will say in a future version that running "rm -f" with no argument 5466af7124fSmrg# is OK; and we want to be able to make that assumption in our Makefile 5476af7124fSmrg# recipes. So use an aggressive probe to check that the usage we want is 5486af7124fSmrg# actually supported "in the wild" to an acceptable degree. 5496af7124fSmrg# See automake bug#10828. 5506af7124fSmrg# To make any issue more visible, cause the running configure to be aborted 5516af7124fSmrg# by default if the 'rm' program in use doesn't match our expectations; the 5526af7124fSmrg# user can still override this though. 5536af7124fSmrgif rm -f && rm -fr && rm -rf; then : OK; else 5546af7124fSmrg cat >&2 <<'END' 5556af7124fSmrgOops! 5566af7124fSmrg 5576af7124fSmrgYour 'rm' program seems unable to run without file operands specified 5586af7124fSmrgon the command line, even when the '-f' option is present. This is contrary 5596af7124fSmrgto the behaviour of most rm programs out there, and not conforming with 5606af7124fSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 5616af7124fSmrg 5626af7124fSmrgPlease tell bug-automake@gnu.org about your system, including the value 5636af7124fSmrgof your $PATH and any error possibly output before this message. This 5646af7124fSmrgcan help us improve future automake versions. 5656af7124fSmrg 5666af7124fSmrgEND 5676af7124fSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 5686af7124fSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 5696af7124fSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 5706af7124fSmrg echo >&2 5716af7124fSmrg else 5726af7124fSmrg cat >&2 <<'END' 5736af7124fSmrgAborting the configuration process, to ensure you take notice of the issue. 5746af7124fSmrg 5756af7124fSmrgYou can download and install GNU coreutils to get an 'rm' implementation 576da1f2d5dSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 5776af7124fSmrg 5786af7124fSmrgIf you want to complete the configuration process using your problematic 5796af7124fSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 5806af7124fSmrgto "yes", and re-run configure. 5816af7124fSmrg 5826af7124fSmrgEND 5836af7124fSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 5846af7124fSmrg fi 585298453a4Smrgfi 586298453a4Smrgdnl The trailing newline in this macro's definition is deliberate, for 587298453a4Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 588298453a4Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 589298453a4Smrg]) 5902d8abe4fSmrg 5911bedbe3fSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 592549e21daSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 593549e21daSmrgdnl mangled by Autoconf and run in a shell conditional statement. 594549e21daSmrgm4_define([_AC_COMPILER_EXEEXT], 595549e21daSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5962d8abe4fSmrg 597549e21daSmrg# When config.status generates a header, we must update the stamp-h file. 598549e21daSmrg# This file resides in the same directory as the config header 599549e21daSmrg# that is generated. The stamp files are numbered to have different names. 600549e21daSmrg 601549e21daSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 602549e21daSmrg# loop where config.status creates the headers, so we can generate 603549e21daSmrg# our stamp files there. 604549e21daSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 605549e21daSmrg[# Compute $1's index in $config_headers. 606549e21daSmrg_am_arg=$1 607549e21daSmrg_am_stamp_count=1 608549e21daSmrgfor _am_header in $config_headers :; do 609549e21daSmrg case $_am_header in 610549e21daSmrg $_am_arg | $_am_arg:* ) 611549e21daSmrg break ;; 612549e21daSmrg * ) 613549e21daSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 614549e21daSmrg esac 615549e21daSmrgdone 616549e21daSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617549e21daSmrg 618da1f2d5dSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 6192d8abe4fSmrg# 620549e21daSmrg# This file is free software; the Free Software Foundation 621549e21daSmrg# gives unlimited permission to copy and/or distribute it, 622549e21daSmrg# with or without modifications, as long as this notice is preserved. 6232d8abe4fSmrg 624549e21daSmrg# AM_PROG_INSTALL_SH 625549e21daSmrg# ------------------ 626549e21daSmrg# Define $install_sh. 627549e21daSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 628549e21daSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 629298453a4Smrgif test x"${install_sh+set}" != xset; then 630549e21daSmrg case $am_aux_dir in 631549e21daSmrg *\ * | *\ *) 632549e21daSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 633549e21daSmrg *) 634549e21daSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 635549e21daSmrg esac 6362d8abe4fSmrgfi 6371bedbe3fSmrgAC_SUBST([install_sh])]) 6382d8abe4fSmrg 639da1f2d5dSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 6402d8abe4fSmrg# 641549e21daSmrg# This file is free software; the Free Software Foundation 642549e21daSmrg# gives unlimited permission to copy and/or distribute it, 643549e21daSmrg# with or without modifications, as long as this notice is preserved. 644549e21daSmrg 645549e21daSmrg# Check whether the underlying file-system supports filenames 646549e21daSmrg# with a leading dot. For instance MS-DOS doesn't. 647549e21daSmrgAC_DEFUN([AM_SET_LEADING_DOT], 648549e21daSmrg[rm -rf .tst 2>/dev/null 649549e21daSmrgmkdir .tst 2>/dev/null 650549e21daSmrgif test -d .tst; then 651549e21daSmrg am__leading_dot=. 6522d8abe4fSmrgelse 653549e21daSmrg am__leading_dot=_ 6542d8abe4fSmrgfi 655549e21daSmrgrmdir .tst 2>/dev/null 656549e21daSmrgAC_SUBST([am__leading_dot])]) 6572d8abe4fSmrg 658549e21daSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 659ba6a1819Smrg 660da1f2d5dSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 661ba6a1819Smrg# 662ba6a1819Smrg# This file is free software; the Free Software Foundation 663ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 664ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 665ba6a1819Smrg 666549e21daSmrg# AM_MAKE_INCLUDE() 667549e21daSmrg# ----------------- 668da1f2d5dSmrg# Check whether make has an 'include' directive that can support all 669da1f2d5dSmrg# the idioms we need for our automatic dependency tracking code. 670549e21daSmrgAC_DEFUN([AM_MAKE_INCLUDE], 671da1f2d5dSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 672da1f2d5dSmrgcat > confinc.mk << 'END' 673549e21daSmrgam__doit: 674da1f2d5dSmrg @echo this is the am__doit target >confinc.out 675549e21daSmrg.PHONY: am__doit 676549e21daSmrgEND 677549e21daSmrgam__include="#" 678549e21daSmrgam__quote= 679da1f2d5dSmrg# BSD make does it like this. 680da1f2d5dSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 681da1f2d5dSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 682da1f2d5dSmrgecho 'include confinc.mk # ignored' > confmf.GNU 683da1f2d5dSmrg_am_result=no 684da1f2d5dSmrgfor s in GNU BSD; do 685da1f2d5dSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 686da1f2d5dSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 687da1f2d5dSmrg ['0:this is the am__doit target'], 688da1f2d5dSmrg [AS_CASE([$s], 689da1f2d5dSmrg [BSD], [am__include='.include' am__quote='"'], 690da1f2d5dSmrg [am__include='include' am__quote=''])]) 691da1f2d5dSmrg if test "$am__include" != "#"; then 692da1f2d5dSmrg _am_result="yes ($s style)" 693da1f2d5dSmrg break 694da1f2d5dSmrg fi 695da1f2d5dSmrgdone 696da1f2d5dSmrgrm -f confinc.* confmf.* 697da1f2d5dSmrgAC_MSG_RESULT([${_am_result}]) 698da1f2d5dSmrgAC_SUBST([am__include])]) 699da1f2d5dSmrgAC_SUBST([am__quote])]) 700ba6a1819Smrg 701549e21daSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702ba6a1819Smrg 703da1f2d5dSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704ba6a1819Smrg# 705ba6a1819Smrg# This file is free software; the Free Software Foundation 706ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 707ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 708ba6a1819Smrg 709549e21daSmrg# AM_MISSING_PROG(NAME, PROGRAM) 710549e21daSmrg# ------------------------------ 711549e21daSmrgAC_DEFUN([AM_MISSING_PROG], 712549e21daSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 713549e21daSmrg$1=${$1-"${am_missing_run}$2"} 714549e21daSmrgAC_SUBST($1)]) 715549e21daSmrg 716549e21daSmrg# AM_MISSING_HAS_RUN 717549e21daSmrg# ------------------ 7181bedbe3fSmrg# Define MISSING if not defined so far and test if it is modern enough. 7191bedbe3fSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 720549e21daSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 721549e21daSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722549e21daSmrgAC_REQUIRE_AUX_FILE([missing])dnl 723549e21daSmrgif test x"${MISSING+set}" != xset; then 724da1f2d5dSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 725549e21daSmrgfi 726549e21daSmrg# Use eval to expand $SHELL 7271bedbe3fSmrgif eval "$MISSING --is-lightweight"; then 7281bedbe3fSmrg am_missing_run="$MISSING " 729ba6a1819Smrgelse 730549e21daSmrg am_missing_run= 7311bedbe3fSmrg AC_MSG_WARN(['missing' script is too old or missing]) 732ba6a1819Smrgfi 733549e21daSmrg]) 734ba6a1819Smrg 735549e21daSmrg# Helper functions for option handling. -*- Autoconf -*- 736ba6a1819Smrg 737da1f2d5dSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 738ba6a1819Smrg# 739549e21daSmrg# This file is free software; the Free Software Foundation 740549e21daSmrg# gives unlimited permission to copy and/or distribute it, 741549e21daSmrg# with or without modifications, as long as this notice is preserved. 742ba6a1819Smrg 743549e21daSmrg# _AM_MANGLE_OPTION(NAME) 744549e21daSmrg# ----------------------- 745549e21daSmrgAC_DEFUN([_AM_MANGLE_OPTION], 746549e21daSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747ba6a1819Smrg 748549e21daSmrg# _AM_SET_OPTION(NAME) 7491bedbe3fSmrg# -------------------- 750549e21daSmrg# Set option NAME. Presently that only means defining a flag for this option. 751549e21daSmrgAC_DEFUN([_AM_SET_OPTION], 7521bedbe3fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753ba6a1819Smrg 754549e21daSmrg# _AM_SET_OPTIONS(OPTIONS) 7551bedbe3fSmrg# ------------------------ 756549e21daSmrg# OPTIONS is a space-separated list of Automake options. 757549e21daSmrgAC_DEFUN([_AM_SET_OPTIONS], 758549e21daSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759ba6a1819Smrg 760549e21daSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 761549e21daSmrg# ------------------------------------------- 762549e21daSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 763549e21daSmrgAC_DEFUN([_AM_IF_OPTION], 764549e21daSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 765ba6a1819Smrg 766da1f2d5dSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 7676af7124fSmrg# 7686af7124fSmrg# This file is free software; the Free Software Foundation 7696af7124fSmrg# gives unlimited permission to copy and/or distribute it, 7706af7124fSmrg# with or without modifications, as long as this notice is preserved. 7716af7124fSmrg 7726af7124fSmrg# _AM_PROG_CC_C_O 7736af7124fSmrg# --------------- 7746af7124fSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 7756af7124fSmrg# to automatically call this. 7766af7124fSmrgAC_DEFUN([_AM_PROG_CC_C_O], 7776af7124fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7786af7124fSmrgAC_REQUIRE_AUX_FILE([compile])dnl 7796af7124fSmrgAC_LANG_PUSH([C])dnl 7806af7124fSmrgAC_CACHE_CHECK( 7816af7124fSmrg [whether $CC understands -c and -o together], 7826af7124fSmrg [am_cv_prog_cc_c_o], 7836af7124fSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 7846af7124fSmrg # Make sure it works both with $CC and with simple cc. 7856af7124fSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 7866af7124fSmrg # compilers refuse to overwrite an existing .o file with -o, 7876af7124fSmrg # though they will create one. 7886af7124fSmrg am_cv_prog_cc_c_o=yes 7896af7124fSmrg for am_i in 1 2; do 7906af7124fSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 7916af7124fSmrg && test -f conftest2.$ac_objext; then 7926af7124fSmrg : OK 7936af7124fSmrg else 7946af7124fSmrg am_cv_prog_cc_c_o=no 7956af7124fSmrg break 7966af7124fSmrg fi 7976af7124fSmrg done 7986af7124fSmrg rm -f core conftest* 7996af7124fSmrg unset am_i]) 8006af7124fSmrgif test "$am_cv_prog_cc_c_o" != yes; then 8016af7124fSmrg # Losing compiler, so override with the script. 8026af7124fSmrg # FIXME: It is wrong to rewrite CC. 8036af7124fSmrg # But if we don't then we get into trouble of one sort or another. 8046af7124fSmrg # A longer-term fix would be to have automake use am__CC in this case, 8056af7124fSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 8066af7124fSmrg CC="$am_aux_dir/compile $CC" 8076af7124fSmrgfi 8086af7124fSmrgAC_LANG_POP([C])]) 8096af7124fSmrg 8106af7124fSmrg# For backward compatibility. 8116af7124fSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 8126af7124fSmrg 813da1f2d5dSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 8146af7124fSmrg# 8156af7124fSmrg# This file is free software; the Free Software Foundation 8166af7124fSmrg# gives unlimited permission to copy and/or distribute it, 8176af7124fSmrg# with or without modifications, as long as this notice is preserved. 8186af7124fSmrg 8196af7124fSmrg# AM_RUN_LOG(COMMAND) 8206af7124fSmrg# ------------------- 8216af7124fSmrg# Run COMMAND, save the exit status in ac_status, and log it. 8226af7124fSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 8236af7124fSmrgAC_DEFUN([AM_RUN_LOG], 8246af7124fSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 8256af7124fSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 8266af7124fSmrg ac_status=$? 8276af7124fSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 8286af7124fSmrg (exit $ac_status); }]) 8296af7124fSmrg 830549e21daSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 831ba6a1819Smrg 832da1f2d5dSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833ba6a1819Smrg# 834ba6a1819Smrg# This file is free software; the Free Software Foundation 835ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 836ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 837ba6a1819Smrg 838549e21daSmrg# AM_SANITY_CHECK 839549e21daSmrg# --------------- 840549e21daSmrgAC_DEFUN([AM_SANITY_CHECK], 841549e21daSmrg[AC_MSG_CHECKING([whether build environment is sane]) 842549e21daSmrg# Reject unsafe characters in $srcdir or the absolute working directory 843549e21daSmrg# name. Accept space and tab only in the latter. 844549e21daSmrgam_lf=' 845549e21daSmrg' 846549e21daSmrgcase `pwd` in 847549e21daSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 848549e21daSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 849549e21daSmrgesac 850549e21daSmrgcase $srcdir in 851549e21daSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8521bedbe3fSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 853549e21daSmrgesac 854ba6a1819Smrg 8551bedbe3fSmrg# Do 'set' in a subshell so we don't clobber the current shell's 856549e21daSmrg# arguments. Must try -L first in case configure is actually a 857549e21daSmrg# symlink; some systems play weird games with the mod time of symlinks 858549e21daSmrg# (eg FreeBSD returns the mod time of the symlink's containing 859549e21daSmrg# directory). 860549e21daSmrgif ( 8611bedbe3fSmrg am_has_slept=no 8621bedbe3fSmrg for am_try in 1 2; do 8631bedbe3fSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 8641bedbe3fSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8651bedbe3fSmrg if test "$[*]" = "X"; then 8661bedbe3fSmrg # -L didn't work. 8671bedbe3fSmrg set X `ls -t "$srcdir/configure" conftest.file` 8681bedbe3fSmrg fi 8691bedbe3fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8701bedbe3fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8711bedbe3fSmrg 8721bedbe3fSmrg # If neither matched, then we have a broken ls. This can happen 8731bedbe3fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8741bedbe3fSmrg # broken ls alias from the environment. This has actually 8751bedbe3fSmrg # happened. Such a system could not be considered "sane". 8761bedbe3fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8771bedbe3fSmrg alias in your environment]) 8781bedbe3fSmrg fi 8791bedbe3fSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 8801bedbe3fSmrg break 8811bedbe3fSmrg fi 8821bedbe3fSmrg # Just in case. 8831bedbe3fSmrg sleep 1 8841bedbe3fSmrg am_has_slept=yes 8851bedbe3fSmrg done 886549e21daSmrg test "$[2]" = conftest.file 887549e21daSmrg ) 888549e21daSmrgthen 889549e21daSmrg # Ok. 890549e21daSmrg : 891549e21daSmrgelse 892549e21daSmrg AC_MSG_ERROR([newly created file is older than distributed files! 893549e21daSmrgCheck your system clock]) 894549e21daSmrgfi 8951bedbe3fSmrgAC_MSG_RESULT([yes]) 8961bedbe3fSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 8971bedbe3fSmrg# generated files are strictly newer. 8981bedbe3fSmrgam_sleep_pid= 8991bedbe3fSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 9001bedbe3fSmrg ( sleep 1 ) & 9011bedbe3fSmrg am_sleep_pid=$! 9021bedbe3fSmrgfi 9031bedbe3fSmrgAC_CONFIG_COMMANDS_PRE( 9041bedbe3fSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 9051bedbe3fSmrg if test -n "$am_sleep_pid"; then 9061bedbe3fSmrg # Hide warnings about reused PIDs. 9071bedbe3fSmrg wait $am_sleep_pid 2>/dev/null 9081bedbe3fSmrg fi 9091bedbe3fSmrg AC_MSG_RESULT([done])]) 9101bedbe3fSmrgrm -f conftest.file 9111bedbe3fSmrg]) 912549e21daSmrg 913da1f2d5dSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 914ba6a1819Smrg# 915ba6a1819Smrg# This file is free software; the Free Software Foundation 916ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 917ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 918ba6a1819Smrg 919549e21daSmrg# AM_SILENT_RULES([DEFAULT]) 920549e21daSmrg# -------------------------- 921549e21daSmrg# Enable less verbose build rules; with the default set to DEFAULT 9221bedbe3fSmrg# ("yes" being less verbose, "no" or empty being verbose). 923549e21daSmrgAC_DEFUN([AM_SILENT_RULES], 9241bedbe3fSmrg[AC_ARG_ENABLE([silent-rules], [dnl 9251bedbe3fSmrgAS_HELP_STRING( 9261bedbe3fSmrg [--enable-silent-rules], 9271bedbe3fSmrg [less verbose build output (undo: "make V=1")]) 9281bedbe3fSmrgAS_HELP_STRING( 9291bedbe3fSmrg [--disable-silent-rules], 9301bedbe3fSmrg [verbose build output (undo: "make V=0")])dnl 9311bedbe3fSmrg]) 9321bedbe3fSmrgcase $enable_silent_rules in @%:@ ((( 9331bedbe3fSmrg yes) AM_DEFAULT_VERBOSITY=0;; 9341bedbe3fSmrg no) AM_DEFAULT_VERBOSITY=1;; 9351bedbe3fSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 936549e21daSmrgesac 9371bedbe3fSmrgdnl 9381bedbe3fSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 9391bedbe3fSmrgdnl do not support nested variable expansions. 9401bedbe3fSmrgdnl See automake bug#9928 and bug#10237. 9411bedbe3fSmrgam_make=${MAKE-make} 9421bedbe3fSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 9431bedbe3fSmrg [am_cv_make_support_nested_variables], 9441bedbe3fSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 9451bedbe3fSmrgBAR0=false 9461bedbe3fSmrgBAR1=true 9471bedbe3fSmrgV=1 9481bedbe3fSmrgam__doit: 9491bedbe3fSmrg @$(TRUE) 9501bedbe3fSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 9511bedbe3fSmrg am_cv_make_support_nested_variables=yes 9521bedbe3fSmrgelse 9531bedbe3fSmrg am_cv_make_support_nested_variables=no 9541bedbe3fSmrgfi]) 9551bedbe3fSmrgif test $am_cv_make_support_nested_variables = yes; then 9561bedbe3fSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 9571bedbe3fSmrg AM_V='$(V)' 9581bedbe3fSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 9591bedbe3fSmrgelse 9601bedbe3fSmrg AM_V=$AM_DEFAULT_VERBOSITY 9611bedbe3fSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 9621bedbe3fSmrgfi 9631bedbe3fSmrgAC_SUBST([AM_V])dnl 9641bedbe3fSmrgAM_SUBST_NOTMAKE([AM_V])dnl 9651bedbe3fSmrgAC_SUBST([AM_DEFAULT_V])dnl 9661bedbe3fSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 967549e21daSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 968549e21daSmrgAM_BACKSLASH='\' 969549e21daSmrgAC_SUBST([AM_BACKSLASH])dnl 970549e21daSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 971549e21daSmrg]) 972ba6a1819Smrg 973da1f2d5dSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 974ba6a1819Smrg# 975ba6a1819Smrg# This file is free software; the Free Software Foundation 976ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 977ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 978ba6a1819Smrg 979549e21daSmrg# AM_PROG_INSTALL_STRIP 980549e21daSmrg# --------------------- 9811bedbe3fSmrg# One issue with vendor 'install' (even GNU) is that you can't 982549e21daSmrg# specify the program used to strip binaries. This is especially 983549e21daSmrg# annoying in cross-compiling environments, where the build's strip 984549e21daSmrg# is unlikely to handle the host's binaries. 985549e21daSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9861bedbe3fSmrg# always use install-sh in "make install-strip", and initialize 987549e21daSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 988549e21daSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 989549e21daSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9901bedbe3fSmrg# Installed binaries are usually stripped using 'strip' when the user 9911bedbe3fSmrg# run "make install-strip". However 'strip' might not be the right 992549e21daSmrg# tool to use in cross-compilation environments, therefore Automake 9931bedbe3fSmrg# will honor the 'STRIP' environment variable to overrule this program. 9941bedbe3fSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 995549e21daSmrgif test "$cross_compiling" != no; then 996549e21daSmrg AC_CHECK_TOOL([STRIP], [strip], :) 997ba6a1819Smrgfi 998549e21daSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 999549e21daSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000ba6a1819Smrg 1001da1f2d5dSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002549e21daSmrg# 1003549e21daSmrg# This file is free software; the Free Software Foundation 1004549e21daSmrg# gives unlimited permission to copy and/or distribute it, 1005549e21daSmrg# with or without modifications, as long as this notice is preserved. 1006ba6a1819Smrg 1007549e21daSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1008549e21daSmrg# --------------------------- 1009549e21daSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1010549e21daSmrg# This macro is traced by Automake. 1011549e21daSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1012ba6a1819Smrg 1013549e21daSmrg# AM_SUBST_NOTMAKE(VARIABLE) 10141bedbe3fSmrg# -------------------------- 1015549e21daSmrg# Public sister of _AM_SUBST_NOTMAKE. 1016549e21daSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017ba6a1819Smrg 1018549e21daSmrg# Check how to create a tarball. -*- Autoconf -*- 1019ba6a1819Smrg 1020da1f2d5dSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1021ba6a1819Smrg# 1022ba6a1819Smrg# This file is free software; the Free Software Foundation 1023ba6a1819Smrg# gives unlimited permission to copy and/or distribute it, 1024ba6a1819Smrg# with or without modifications, as long as this notice is preserved. 1025ba6a1819Smrg 1026549e21daSmrg# _AM_PROG_TAR(FORMAT) 1027549e21daSmrg# -------------------- 1028549e21daSmrg# Check how to create a tarball in format FORMAT. 10291bedbe3fSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1030ba6a1819Smrg# 1031549e21daSmrg# Substitute a variable $(am__tar) that is a command 1032549e21daSmrg# writing to stdout a FORMAT-tarball containing the directory 1033549e21daSmrg# $tardir. 1034549e21daSmrg# tardir=directory && $(am__tar) > result.tar 1035549e21daSmrg# 1036549e21daSmrg# Substitute a variable $(am__untar) that extract such 1037549e21daSmrg# a tarball read from stdin. 1038549e21daSmrg# $(am__untar) < result.tar 10391bedbe3fSmrg# 1040549e21daSmrgAC_DEFUN([_AM_PROG_TAR], 10411bedbe3fSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10421bedbe3fSmrg# in the wild :-( We should find a proper way to deprecate it ... 10431bedbe3fSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 10441bedbe3fSmrg 10451bedbe3fSmrg# We'll loop over all known methods to create a tar archive until one works. 1046549e21daSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047ba6a1819Smrg 10481bedbe3fSmrgm4_if([$1], [v7], 10491bedbe3fSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10501bedbe3fSmrg 10511bedbe3fSmrg [m4_case([$1], 10521bedbe3fSmrg [ustar], 10531bedbe3fSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10541bedbe3fSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10551bedbe3fSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10561bedbe3fSmrg # and bug#13588). 10571bedbe3fSmrg am_max_uid=2097151 # 2^21 - 1 10581bedbe3fSmrg am_max_gid=$am_max_uid 10591bedbe3fSmrg # The $UID and $GID variables are not portable, so we need to resort 10601bedbe3fSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10611bedbe3fSmrg # below are definitely unexpected, so allow the users to see them 10621bedbe3fSmrg # (that is, avoid stderr redirection). 10631bedbe3fSmrg am_uid=`id -u || echo unknown` 10641bedbe3fSmrg am_gid=`id -g || echo unknown` 10651bedbe3fSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10661bedbe3fSmrg if test $am_uid -le $am_max_uid; then 10671bedbe3fSmrg AC_MSG_RESULT([yes]) 10681bedbe3fSmrg else 10691bedbe3fSmrg AC_MSG_RESULT([no]) 10701bedbe3fSmrg _am_tools=none 10711bedbe3fSmrg fi 10721bedbe3fSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10731bedbe3fSmrg if test $am_gid -le $am_max_gid; then 10741bedbe3fSmrg AC_MSG_RESULT([yes]) 10751bedbe3fSmrg else 10761bedbe3fSmrg AC_MSG_RESULT([no]) 10771bedbe3fSmrg _am_tools=none 10781bedbe3fSmrg fi], 10791bedbe3fSmrg 10801bedbe3fSmrg [pax], 10811bedbe3fSmrg [], 1082ba6a1819Smrg 10831bedbe3fSmrg [m4_fatal([Unknown tar format])]) 10841bedbe3fSmrg 10851bedbe3fSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10861bedbe3fSmrg 10871bedbe3fSmrg # Go ahead even if we have the value already cached. We do so because we 10881bedbe3fSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10891bedbe3fSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10901bedbe3fSmrg 10911bedbe3fSmrg for _am_tool in $_am_tools; do 10921bedbe3fSmrg case $_am_tool in 10931bedbe3fSmrg gnutar) 10941bedbe3fSmrg for _am_tar in tar gnutar gtar; do 10951bedbe3fSmrg AM_RUN_LOG([$_am_tar --version]) && break 10961bedbe3fSmrg done 10971bedbe3fSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10981bedbe3fSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10991bedbe3fSmrg am__untar="$_am_tar -xf -" 11001bedbe3fSmrg ;; 11011bedbe3fSmrg plaintar) 11021bedbe3fSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11031bedbe3fSmrg # ustar tarball either. 11041bedbe3fSmrg (tar --version) >/dev/null 2>&1 && continue 11051bedbe3fSmrg am__tar='tar chf - "$$tardir"' 11061bedbe3fSmrg am__tar_='tar chf - "$tardir"' 11071bedbe3fSmrg am__untar='tar xf -' 11081bedbe3fSmrg ;; 11091bedbe3fSmrg pax) 11101bedbe3fSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11111bedbe3fSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11121bedbe3fSmrg am__untar='pax -r' 11131bedbe3fSmrg ;; 11141bedbe3fSmrg cpio) 11151bedbe3fSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11161bedbe3fSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11171bedbe3fSmrg am__untar='cpio -i -H $1 -d' 11181bedbe3fSmrg ;; 11191bedbe3fSmrg none) 11201bedbe3fSmrg am__tar=false 11211bedbe3fSmrg am__tar_=false 11221bedbe3fSmrg am__untar=false 11231bedbe3fSmrg ;; 11241bedbe3fSmrg esac 11251bedbe3fSmrg 11261bedbe3fSmrg # If the value was cached, stop now. We just wanted to have am__tar 11271bedbe3fSmrg # and am__untar set. 11281bedbe3fSmrg test -n "${am_cv_prog_tar_$1}" && break 11291bedbe3fSmrg 11301bedbe3fSmrg # tar/untar a dummy directory, and stop if the command works. 11311bedbe3fSmrg rm -rf conftest.dir 11321bedbe3fSmrg mkdir conftest.dir 11331bedbe3fSmrg echo GrepMe > conftest.dir/file 11341bedbe3fSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11351bedbe3fSmrg rm -rf conftest.dir 11361bedbe3fSmrg if test -s conftest.tar; then 11371bedbe3fSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11381bedbe3fSmrg AM_RUN_LOG([cat conftest.dir/file]) 11391bedbe3fSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11401bedbe3fSmrg fi 11411bedbe3fSmrg done 1142549e21daSmrg rm -rf conftest.dir 1143ba6a1819Smrg 11441bedbe3fSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11451bedbe3fSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11461bedbe3fSmrg 1147549e21daSmrgAC_SUBST([am__tar]) 1148549e21daSmrgAC_SUBST([am__untar]) 1149549e21daSmrg]) # _AM_PROG_TAR 1150ba6a1819Smrg 1151fe4c343aSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1152fe4c343aSmrgdnl serial 11 (pkg-config-0.29) 1153fe4c343aSmrgdnl 1154fe4c343aSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1155fe4c343aSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 1156fe4c343aSmrgdnl 1157fe4c343aSmrgdnl This program is free software; you can redistribute it and/or modify 1158fe4c343aSmrgdnl it under the terms of the GNU General Public License as published by 1159fe4c343aSmrgdnl the Free Software Foundation; either version 2 of the License, or 1160fe4c343aSmrgdnl (at your option) any later version. 1161fe4c343aSmrgdnl 1162fe4c343aSmrgdnl This program is distributed in the hope that it will be useful, but 1163fe4c343aSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 1164fe4c343aSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1165fe4c343aSmrgdnl General Public License for more details. 1166fe4c343aSmrgdnl 1167fe4c343aSmrgdnl You should have received a copy of the GNU General Public License 1168fe4c343aSmrgdnl along with this program; if not, write to the Free Software 1169fe4c343aSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1170fe4c343aSmrgdnl 02111-1307, USA. 1171fe4c343aSmrgdnl 1172fe4c343aSmrgdnl As a special exception to the GNU General Public License, if you 1173fe4c343aSmrgdnl distribute this file as part of a program that contains a 1174fe4c343aSmrgdnl configuration script generated by Autoconf, you may include it under 1175fe4c343aSmrgdnl the same distribution terms that you use for the rest of that 1176fe4c343aSmrgdnl program. 1177fe4c343aSmrg 1178fe4c343aSmrgdnl PKG_PREREQ(MIN-VERSION) 1179fe4c343aSmrgdnl ----------------------- 1180fe4c343aSmrgdnl Since: 0.29 1181fe4c343aSmrgdnl 1182fe4c343aSmrgdnl Verify that the version of the pkg-config macros are at least 1183fe4c343aSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1184fe4c343aSmrgdnl installed version of pkg-config, this checks the developer's version 1185fe4c343aSmrgdnl of pkg.m4 when generating configure. 1186fe4c343aSmrgdnl 1187fe4c343aSmrgdnl To ensure that this macro is defined, also add: 1188fe4c343aSmrgdnl m4_ifndef([PKG_PREREQ], 1189fe4c343aSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1190fe4c343aSmrgdnl 1191fe4c343aSmrgdnl See the "Since" comment for each macro you use to see what version 1192fe4c343aSmrgdnl of the macros you require. 1193fe4c343aSmrgm4_defun([PKG_PREREQ], 1194fe4c343aSmrg[m4_define([PKG_MACROS_VERSION], [0.29]) 1195fe4c343aSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1196fe4c343aSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1197fe4c343aSmrg])dnl PKG_PREREQ 1198fe4c343aSmrg 1199fe4c343aSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1200fe4c343aSmrgdnl ---------------------------------- 1201fe4c343aSmrgdnl Since: 0.16 1202fe4c343aSmrgdnl 1203fe4c343aSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1204fe4c343aSmrgdnl first found in the path. Checks that the version of pkg-config found 1205fe4c343aSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1206fe4c343aSmrgdnl used since that's the first version where most current features of 1207fe4c343aSmrgdnl pkg-config existed. 1208fe4c343aSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1209fe4c343aSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1210fe4c343aSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1211fe4c343aSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1212fe4c343aSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1213fe4c343aSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1214fe4c343aSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1215ba6a1819Smrg 1216fe4c343aSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1217fe4c343aSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1218fe4c343aSmrgfi 1219fe4c343aSmrgif test -n "$PKG_CONFIG"; then 1220fe4c343aSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 1221fe4c343aSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1222fe4c343aSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1223fe4c343aSmrg AC_MSG_RESULT([yes]) 1224fe4c343aSmrg else 1225fe4c343aSmrg AC_MSG_RESULT([no]) 1226fe4c343aSmrg PKG_CONFIG="" 1227fe4c343aSmrg fi 1228fe4c343aSmrgfi[]dnl 1229fe4c343aSmrg])dnl PKG_PROG_PKG_CONFIG 1230ba6a1819Smrg 1231fe4c343aSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1232fe4c343aSmrgdnl ------------------------------------------------------------------- 1233fe4c343aSmrgdnl Since: 0.18 1234fe4c343aSmrgdnl 1235fe4c343aSmrgdnl Check to see whether a particular set of modules exists. Similar to 1236fe4c343aSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1237fe4c343aSmrgdnl 1238fe4c343aSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1239fe4c343aSmrgdnl only at the first occurence in configure.ac, so if the first place 1240fe4c343aSmrgdnl it's called might be skipped (such as if it is within an "if", you 1241fe4c343aSmrgdnl have to call PKG_CHECK_EXISTS manually 1242fe4c343aSmrgAC_DEFUN([PKG_CHECK_EXISTS], 1243fe4c343aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1244fe4c343aSmrgif test -n "$PKG_CONFIG" && \ 1245fe4c343aSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1246fe4c343aSmrg m4_default([$2], [:]) 1247fe4c343aSmrgm4_ifvaln([$3], [else 1248fe4c343aSmrg $3])dnl 1249fe4c343aSmrgfi]) 1250ba6a1819Smrg 1251fe4c343aSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1252fe4c343aSmrgdnl --------------------------------------------- 1253fe4c343aSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1254fe4c343aSmrgdnl pkg_failed based on the result. 1255fe4c343aSmrgm4_define([_PKG_CONFIG], 1256fe4c343aSmrg[if test -n "$$1"; then 1257fe4c343aSmrg pkg_cv_[]$1="$$1" 1258fe4c343aSmrg elif test -n "$PKG_CONFIG"; then 1259fe4c343aSmrg PKG_CHECK_EXISTS([$3], 1260fe4c343aSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1261fe4c343aSmrg test "x$?" != "x0" && pkg_failed=yes ], 1262fe4c343aSmrg [pkg_failed=yes]) 1263fe4c343aSmrg else 1264fe4c343aSmrg pkg_failed=untried 1265fe4c343aSmrgfi[]dnl 1266fe4c343aSmrg])dnl _PKG_CONFIG 1267ba6a1819Smrg 1268fe4c343aSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 1269fe4c343aSmrgdnl --------------------------- 1270fe4c343aSmrgdnl Internal check to see if pkg-config supports short errors. 1271fe4c343aSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1272fe4c343aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1273fe4c343aSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1274fe4c343aSmrg _pkg_short_errors_supported=yes 1275fe4c343aSmrgelse 1276fe4c343aSmrg _pkg_short_errors_supported=no 1277fe4c343aSmrgfi[]dnl 1278fe4c343aSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1279ba6a1819Smrg 1280ba6a1819Smrg 1281fe4c343aSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1282fe4c343aSmrgdnl [ACTION-IF-NOT-FOUND]) 1283fe4c343aSmrgdnl -------------------------------------------------------------- 1284fe4c343aSmrgdnl Since: 0.4.0 1285fe4c343aSmrgdnl 1286fe4c343aSmrgdnl Note that if there is a possibility the first call to 1287fe4c343aSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1288fe4c343aSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1289fe4c343aSmrgAC_DEFUN([PKG_CHECK_MODULES], 1290fe4c343aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1291fe4c343aSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1292fe4c343aSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1293ba6a1819Smrg 1294fe4c343aSmrgpkg_failed=no 1295fe4c343aSmrgAC_MSG_CHECKING([for $1]) 1296ba6a1819Smrg 1297fe4c343aSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1298fe4c343aSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1299ba6a1819Smrg 1300fe4c343aSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1301fe4c343aSmrgand $1[]_LIBS to avoid the need to call pkg-config. 1302fe4c343aSmrgSee the pkg-config man page for more details.]) 1303ba6a1819Smrg 1304fe4c343aSmrgif test $pkg_failed = yes; then 1305fe4c343aSmrg AC_MSG_RESULT([no]) 1306fe4c343aSmrg _PKG_SHORT_ERRORS_SUPPORTED 1307fe4c343aSmrg if test $_pkg_short_errors_supported = yes; then 1308fe4c343aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1309fe4c343aSmrg else 1310fe4c343aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1311fe4c343aSmrg fi 1312fe4c343aSmrg # Put the nasty error message in config.log where it belongs 1313fe4c343aSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1314ba6a1819Smrg 1315fe4c343aSmrg m4_default([$4], [AC_MSG_ERROR( 1316fe4c343aSmrg[Package requirements ($2) were not met: 1317ba6a1819Smrg 1318fe4c343aSmrg$$1_PKG_ERRORS 1319ba6a1819Smrg 1320fe4c343aSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1321fe4c343aSmrginstalled software in a non-standard prefix. 1322ba6a1819Smrg 1323fe4c343aSmrg_PKG_TEXT])[]dnl 1324fe4c343aSmrg ]) 1325fe4c343aSmrgelif test $pkg_failed = untried; then 1326fe4c343aSmrg AC_MSG_RESULT([no]) 1327fe4c343aSmrg m4_default([$4], [AC_MSG_FAILURE( 1328fe4c343aSmrg[The pkg-config script could not be found or is too old. Make sure it 1329fe4c343aSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 1330fe4c343aSmrgpath to pkg-config. 1331ba6a1819Smrg 1332fe4c343aSmrg_PKG_TEXT 1333ba6a1819Smrg 1334fe4c343aSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1335fe4c343aSmrg ]) 1336fe4c343aSmrgelse 1337fe4c343aSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1338fe4c343aSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1339fe4c343aSmrg AC_MSG_RESULT([yes]) 1340fe4c343aSmrg $3 1341fe4c343aSmrgfi[]dnl 1342fe4c343aSmrg])dnl PKG_CHECK_MODULES 1343ba6a1819Smrg 1344ba6a1819Smrg 1345fe4c343aSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1346fe4c343aSmrgdnl [ACTION-IF-NOT-FOUND]) 1347fe4c343aSmrgdnl --------------------------------------------------------------------- 1348fe4c343aSmrgdnl Since: 0.29 1349fe4c343aSmrgdnl 1350fe4c343aSmrgdnl Checks for existence of MODULES and gathers its build flags with 1351fe4c343aSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1352fe4c343aSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 1353fe4c343aSmrgdnl 1354fe4c343aSmrgdnl Note that if there is a possibility the first call to 1355fe4c343aSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1356fe4c343aSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1357fe4c343aSmrgdnl configure.ac. 1358fe4c343aSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 1359fe4c343aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1360fe4c343aSmrg_save_PKG_CONFIG=$PKG_CONFIG 1361fe4c343aSmrgPKG_CONFIG="$PKG_CONFIG --static" 1362fe4c343aSmrgPKG_CHECK_MODULES($@) 1363fe4c343aSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 1364fe4c343aSmrg])dnl PKG_CHECK_MODULES_STATIC 1365ba6a1819Smrg 1366ba6a1819Smrg 1367fe4c343aSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 1368fe4c343aSmrgdnl ------------------------- 1369fe4c343aSmrgdnl Since: 0.27 1370fe4c343aSmrgdnl 1371fe4c343aSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 1372fe4c343aSmrgdnl should install pkg-config .pc files. By default the directory is 1373fe4c343aSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 1374fe4c343aSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 1375fe4c343aSmrgdnl parameter. 1376fe4c343aSmrgAC_DEFUN([PKG_INSTALLDIR], 1377fe4c343aSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1378fe4c343aSmrgm4_pushdef([pkg_description], 1379fe4c343aSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 1380fe4c343aSmrgAC_ARG_WITH([pkgconfigdir], 1381fe4c343aSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1382fe4c343aSmrg [with_pkgconfigdir=]pkg_default) 1383fe4c343aSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1384fe4c343aSmrgm4_popdef([pkg_default]) 1385fe4c343aSmrgm4_popdef([pkg_description]) 1386fe4c343aSmrg])dnl PKG_INSTALLDIR 1387fe4c343aSmrg 1388fe4c343aSmrg 1389fe4c343aSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1390fe4c343aSmrgdnl -------------------------------- 1391fe4c343aSmrgdnl Since: 0.27 1392fe4c343aSmrgdnl 1393fe4c343aSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 1394fe4c343aSmrgdnl module should install arch-independent pkg-config .pc files. By 1395fe4c343aSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 1396fe4c343aSmrgdnl changed by passing DIRECTORY. The user can override through the 1397fe4c343aSmrgdnl --with-noarch-pkgconfigdir parameter. 1398fe4c343aSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 1399fe4c343aSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1400fe4c343aSmrgm4_pushdef([pkg_description], 1401fe4c343aSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1402fe4c343aSmrgAC_ARG_WITH([noarch-pkgconfigdir], 1403fe4c343aSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1404fe4c343aSmrg [with_noarch_pkgconfigdir=]pkg_default) 1405fe4c343aSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1406fe4c343aSmrgm4_popdef([pkg_default]) 1407fe4c343aSmrgm4_popdef([pkg_description]) 1408fe4c343aSmrg])dnl PKG_NOARCH_INSTALLDIR 1409fe4c343aSmrg 1410fe4c343aSmrg 1411fe4c343aSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1412fe4c343aSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1413fe4c343aSmrgdnl ------------------------------------------- 1414fe4c343aSmrgdnl Since: 0.28 1415fe4c343aSmrgdnl 1416fe4c343aSmrgdnl Retrieves the value of the pkg-config variable for the given module. 1417fe4c343aSmrgAC_DEFUN([PKG_CHECK_VAR], 1418fe4c343aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1419fe4c343aSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1420ba6a1819Smrg 1421fe4c343aSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1422fe4c343aSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 1423ba6a1819Smrg 1424fe4c343aSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 1425fe4c343aSmrg])dnl PKG_CHECK_VAR 1426ba6a1819Smrg 1427fe4c343aSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 14281bedbe3fSmrgdnl 1429fe4c343aSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 14301bedbe3fSmrgdnl 1431fe4c343aSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1432fe4c343aSmrgdnl copy of this software and associated documentation files (the "Software"), 1433fe4c343aSmrgdnl to deal in the Software without restriction, including without limitation 1434fe4c343aSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1435fe4c343aSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 1436fe4c343aSmrgdnl Software is furnished to do so, subject to the following conditions: 14371bedbe3fSmrgdnl 1438fe4c343aSmrgdnl The above copyright notice and this permission notice (including the next 1439fe4c343aSmrgdnl paragraph) shall be included in all copies or substantial portions of the 1440fe4c343aSmrgdnl Software. 14411bedbe3fSmrgdnl 1442fe4c343aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1443fe4c343aSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1444fe4c343aSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1445fe4c343aSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1446fe4c343aSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1447fe4c343aSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1448fe4c343aSmrgdnl DEALINGS IN THE SOFTWARE. 1449ba6a1819Smrg 1450fe4c343aSmrg# XORG_MACROS_VERSION(required-version) 1451fe4c343aSmrg# ------------------------------------- 1452fe4c343aSmrg# Minimum version: 1.1.0 1453fe4c343aSmrg# 1454fe4c343aSmrg# If you're using a macro added in Version 1.1 or newer, include this in 1455fe4c343aSmrg# your configure.ac with the minimum required version, such as: 1456fe4c343aSmrg# XORG_MACROS_VERSION(1.1) 1457fe4c343aSmrg# 1458fe4c343aSmrg# To ensure that this macro is defined, also add: 1459fe4c343aSmrg# m4_ifndef([XORG_MACROS_VERSION], 1460fe4c343aSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1461fe4c343aSmrg# 1462fe4c343aSmrg# 1463fe4c343aSmrg# See the "minimum version" comment for each macro you use to see what 1464fe4c343aSmrg# version you require. 1465fe4c343aSmrgm4_defun([XORG_MACROS_VERSION],[ 1466da1f2d5dSmrgm4_define([vers_have], [1.19.3]) 1467fe4c343aSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1468fe4c343aSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1469fe4c343aSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1470fe4c343aSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1471fe4c343aSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1472fe4c343aSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1473fe4c343aSmrgm4_undefine([vers_have]) 1474fe4c343aSmrgm4_undefine([maj_have]) 1475fe4c343aSmrgm4_undefine([maj_needed]) 1476fe4c343aSmrg]) # XORG_MACROS_VERSION 1477ba6a1819Smrg 1478fe4c343aSmrg# XORG_PROG_RAWCPP() 1479fe4c343aSmrg# ------------------ 1480fe4c343aSmrg# Minimum version: 1.0.0 1481fe4c343aSmrg# 1482fe4c343aSmrg# Find cpp program and necessary flags for use in pre-processing text files 1483fe4c343aSmrg# such as man pages and config files 1484fe4c343aSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1485fe4c343aSmrgAC_REQUIRE([AC_PROG_CPP]) 1486fe4c343aSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1487fe4c343aSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1488ba6a1819Smrg 1489fe4c343aSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1490fe4c343aSmrg# which is not the best choice for supporting other OS'es, but covers most 1491fe4c343aSmrg# of the ones we need for now. 1492fe4c343aSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1493fe4c343aSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1494fe4c343aSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1495fe4c343aSmrg AC_MSG_RESULT([no]) 1496fe4c343aSmrgelse 1497fe4c343aSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1498fe4c343aSmrg RAWCPPFLAGS=-undef 1499fe4c343aSmrg AC_MSG_RESULT([yes]) 1500fe4c343aSmrg # under Cygwin unix is still defined even with -undef 1501fe4c343aSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1502fe4c343aSmrg RAWCPPFLAGS="-undef -ansi" 1503fe4c343aSmrg AC_MSG_RESULT([yes, with -ansi]) 1504fe4c343aSmrg else 1505fe4c343aSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1506fe4c343aSmrg fi 1507fe4c343aSmrgfi 1508fe4c343aSmrgrm -f conftest.$ac_ext 1509ba6a1819Smrg 1510fe4c343aSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1511fe4c343aSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1512fe4c343aSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1513fe4c343aSmrg AC_MSG_RESULT([no]) 1514fe4c343aSmrgelse 1515fe4c343aSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1516fe4c343aSmrg TRADITIONALCPPFLAGS="-traditional" 1517fe4c343aSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1518fe4c343aSmrg AC_MSG_RESULT([yes]) 1519fe4c343aSmrg else 1520fe4c343aSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1521fe4c343aSmrg fi 1522fe4c343aSmrgfi 1523fe4c343aSmrgrm -f conftest.$ac_ext 1524fe4c343aSmrgAC_SUBST(RAWCPPFLAGS) 1525fe4c343aSmrgAC_SUBST(TRADITIONALCPPFLAGS) 1526fe4c343aSmrg]) # XORG_PROG_RAWCPP 1527ba6a1819Smrg 1528fe4c343aSmrg# XORG_MANPAGE_SECTIONS() 1529fe4c343aSmrg# ----------------------- 1530fe4c343aSmrg# Minimum version: 1.0.0 1531fe4c343aSmrg# 1532fe4c343aSmrg# Determine which sections man pages go in for the different man page types 1533fe4c343aSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1534fe4c343aSmrg# Not sure if there's any better way than just hardcoding by OS name. 1535fe4c343aSmrg# Override default settings by setting environment variables 1536fe4c343aSmrg# Added MAN_SUBSTS in version 1.8 1537fe4c343aSmrg# Added AC_PROG_SED in version 1.8 1538549e21daSmrg 1539fe4c343aSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1540fe4c343aSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1541fe4c343aSmrgAC_REQUIRE([AC_PROG_SED]) 1542549e21daSmrg 1543fe4c343aSmrgcase $host_os in 1544fe4c343aSmrg solaris*) 1545fe4c343aSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1546fe4c343aSmrg # check for a man page file found in later versions that use 1547fe4c343aSmrg # traditional section numbers instead 1548fe4c343aSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1549fe4c343aSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1550fe4c343aSmrg ;; 1551fe4c343aSmrg *) SYSV_MAN_SECTIONS=false ;; 1552fe4c343aSmrgesac 1553549e21daSmrg 1554fe4c343aSmrgif test x$APP_MAN_SUFFIX = x ; then 1555fe4c343aSmrg APP_MAN_SUFFIX=1 1556fe4c343aSmrgfi 1557fe4c343aSmrgif test x$APP_MAN_DIR = x ; then 1558fe4c343aSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1559fe4c343aSmrgfi 1560549e21daSmrg 1561fe4c343aSmrgif test x$LIB_MAN_SUFFIX = x ; then 1562fe4c343aSmrg LIB_MAN_SUFFIX=3 1563fe4c343aSmrgfi 1564fe4c343aSmrgif test x$LIB_MAN_DIR = x ; then 1565fe4c343aSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1566fe4c343aSmrgfi 1567ba6a1819Smrg 1568fe4c343aSmrgif test x$FILE_MAN_SUFFIX = x ; then 1569fe4c343aSmrg case $SYSV_MAN_SECTIONS in 1570fe4c343aSmrg true) FILE_MAN_SUFFIX=4 ;; 1571fe4c343aSmrg *) FILE_MAN_SUFFIX=5 ;; 1572fe4c343aSmrg esac 1573fe4c343aSmrgfi 1574fe4c343aSmrgif test x$FILE_MAN_DIR = x ; then 1575fe4c343aSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1576fe4c343aSmrgfi 1577549e21daSmrg 1578fe4c343aSmrgif test x$MISC_MAN_SUFFIX = x ; then 1579fe4c343aSmrg case $SYSV_MAN_SECTIONS in 1580fe4c343aSmrg true) MISC_MAN_SUFFIX=5 ;; 1581fe4c343aSmrg *) MISC_MAN_SUFFIX=7 ;; 1582fe4c343aSmrg esac 1583fe4c343aSmrgfi 1584fe4c343aSmrgif test x$MISC_MAN_DIR = x ; then 1585fe4c343aSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1586fe4c343aSmrgfi 1587549e21daSmrg 1588fe4c343aSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1589fe4c343aSmrg case $SYSV_MAN_SECTIONS in 1590fe4c343aSmrg true) DRIVER_MAN_SUFFIX=7 ;; 1591fe4c343aSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1592fe4c343aSmrg esac 1593fe4c343aSmrgfi 1594fe4c343aSmrgif test x$DRIVER_MAN_DIR = x ; then 1595fe4c343aSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1596fe4c343aSmrgfi 1597549e21daSmrg 1598fe4c343aSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1599fe4c343aSmrg case $SYSV_MAN_SECTIONS in 1600fe4c343aSmrg true) ADMIN_MAN_SUFFIX=1m ;; 1601fe4c343aSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1602fe4c343aSmrg esac 1603fe4c343aSmrgfi 1604fe4c343aSmrgif test x$ADMIN_MAN_DIR = x ; then 1605fe4c343aSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1606fe4c343aSmrgfi 1607ba6a1819Smrg 1608549e21daSmrg 1609fe4c343aSmrgAC_SUBST([APP_MAN_SUFFIX]) 1610fe4c343aSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1611fe4c343aSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1612fe4c343aSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1613fe4c343aSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1614fe4c343aSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1615fe4c343aSmrgAC_SUBST([APP_MAN_DIR]) 1616fe4c343aSmrgAC_SUBST([LIB_MAN_DIR]) 1617fe4c343aSmrgAC_SUBST([FILE_MAN_DIR]) 1618fe4c343aSmrgAC_SUBST([MISC_MAN_DIR]) 1619fe4c343aSmrgAC_SUBST([DRIVER_MAN_DIR]) 1620fe4c343aSmrgAC_SUBST([ADMIN_MAN_DIR]) 1621ba6a1819Smrg 1622fe4c343aSmrgXORG_MAN_PAGE="X Version 11" 1623fe4c343aSmrgAC_SUBST([XORG_MAN_PAGE]) 1624fe4c343aSmrgMAN_SUBSTS="\ 1625fe4c343aSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1626fe4c343aSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1627fe4c343aSmrg -e 's|__xservername__|Xorg|g' \ 1628fe4c343aSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 1629fe4c343aSmrg -e 's|__projectroot__|\$(prefix)|g' \ 1630fe4c343aSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1631fe4c343aSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1632fe4c343aSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1633fe4c343aSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1634fe4c343aSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1635fe4c343aSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1636fe4c343aSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1637fe4c343aSmrgAC_SUBST([MAN_SUBSTS]) 1638549e21daSmrg 1639fe4c343aSmrg]) # XORG_MANPAGE_SECTIONS 1640549e21daSmrg 1641fe4c343aSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1642fe4c343aSmrg# ------------------------ 1643fe4c343aSmrg# Minimum version: 1.7.0 1644fe4c343aSmrg# 1645fe4c343aSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1646fe4c343aSmrg# provided by xorg-sgml-doctools, if installed. 1647fe4c343aSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1648fe4c343aSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1649fe4c343aSmrgXORG_SGML_PATH= 1650fe4c343aSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1651fe4c343aSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1652fe4c343aSmrg [m4_ifval([$1],[:], 1653fe4c343aSmrg [if test x"$cross_compiling" != x"yes" ; then 1654fe4c343aSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1655fe4c343aSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 1656fe4c343aSmrg fi]) 1657fe4c343aSmrg ]) 1658ba6a1819Smrg 1659fe4c343aSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1660fe4c343aSmrg# the path and the name of the doc stylesheet 1661fe4c343aSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1662fe4c343aSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1663fe4c343aSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1664fe4c343aSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1665fe4c343aSmrgelse 1666fe4c343aSmrg AC_MSG_RESULT([no]) 1667fe4c343aSmrgfi 1668ba6a1819Smrg 1669fe4c343aSmrgAC_SUBST(XORG_SGML_PATH) 1670fe4c343aSmrgAC_SUBST(STYLESHEET_SRCDIR) 1671fe4c343aSmrgAC_SUBST(XSL_STYLESHEET) 1672fe4c343aSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1673fe4c343aSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1674549e21daSmrg 1675fe4c343aSmrg# XORG_CHECK_LINUXDOC 1676fe4c343aSmrg# ------------------- 1677fe4c343aSmrg# Minimum version: 1.0.0 1678fe4c343aSmrg# 1679fe4c343aSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1680fe4c343aSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1681fe4c343aSmrg# Whether or not the necessary tools and files are found can be checked 1682fe4c343aSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1683fe4c343aSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1684fe4c343aSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1685fe4c343aSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1686ba6a1819Smrg 1687fe4c343aSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1688549e21daSmrg 1689fe4c343aSmrgAC_MSG_CHECKING([whether to build documentation]) 1690549e21daSmrg 1691fe4c343aSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1692fe4c343aSmrg BUILDDOC=yes 1693fe4c343aSmrgelse 1694fe4c343aSmrg BUILDDOC=no 1695fe4c343aSmrgfi 1696ba6a1819Smrg 1697fe4c343aSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1698ba6a1819Smrg 1699fe4c343aSmrgAC_MSG_RESULT([$BUILDDOC]) 1700ba6a1819Smrg 1701fe4c343aSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1702ba6a1819Smrg 1703fe4c343aSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1704fe4c343aSmrg BUILDPDFDOC=yes 1705fe4c343aSmrgelse 1706fe4c343aSmrg BUILDPDFDOC=no 1707fe4c343aSmrgfi 1708ba6a1819Smrg 1709fe4c343aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1710ba6a1819Smrg 1711fe4c343aSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1712549e21daSmrg 1713fe4c343aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1714fe4c343aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1715fe4c343aSmrgMAKE_PDF="$PS2PDF" 1716fe4c343aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1717549e21daSmrg 1718fe4c343aSmrgAC_SUBST(MAKE_TEXT) 1719fe4c343aSmrgAC_SUBST(MAKE_PS) 1720fe4c343aSmrgAC_SUBST(MAKE_PDF) 1721fe4c343aSmrgAC_SUBST(MAKE_HTML) 1722fe4c343aSmrg]) # XORG_CHECK_LINUXDOC 1723549e21daSmrg 1724fe4c343aSmrg# XORG_CHECK_DOCBOOK 1725fe4c343aSmrg# ------------------- 1726fe4c343aSmrg# Minimum version: 1.0.0 1727fe4c343aSmrg# 1728fe4c343aSmrg# Checks for the ability to build output formats from SGML DocBook source. 1729fe4c343aSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1730fe4c343aSmrg# indicates whether the necessary tools and files are found and, if set, 1731fe4c343aSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1732fe4c343aSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1733fe4c343aSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1734ba6a1819Smrg 1735fe4c343aSmrgBUILDTXTDOC=no 1736fe4c343aSmrgBUILDPDFDOC=no 1737fe4c343aSmrgBUILDPSDOC=no 1738fe4c343aSmrgBUILDHTMLDOC=no 1739ba6a1819Smrg 1740fe4c343aSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1741fe4c343aSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1742fe4c343aSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1743fe4c343aSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1744ba6a1819Smrg 1745fe4c343aSmrgAC_MSG_CHECKING([whether to build text documentation]) 1746fe4c343aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1747fe4c343aSmrg test x$BUILD_TXTDOC != xno; then 1748fe4c343aSmrg BUILDTXTDOC=yes 1749fe4c343aSmrgfi 1750fe4c343aSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1751fe4c343aSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1752ba6a1819Smrg 1753fe4c343aSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1754fe4c343aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1755fe4c343aSmrg test x$BUILD_PDFDOC != xno; then 1756fe4c343aSmrg BUILDPDFDOC=yes 1757fe4c343aSmrgfi 1758fe4c343aSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1759fe4c343aSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1760549e21daSmrg 1761fe4c343aSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1762fe4c343aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1763fe4c343aSmrg test x$BUILD_PSDOC != xno; then 1764fe4c343aSmrg BUILDPSDOC=yes 1765fe4c343aSmrgfi 1766fe4c343aSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1767fe4c343aSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1768549e21daSmrg 1769fe4c343aSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1770fe4c343aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1771fe4c343aSmrg test x$BUILD_HTMLDOC != xno; then 1772fe4c343aSmrg BUILDHTMLDOC=yes 1773fe4c343aSmrgfi 1774fe4c343aSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1775fe4c343aSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1776ba6a1819Smrg 1777fe4c343aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1778fe4c343aSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1779fe4c343aSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1780fe4c343aSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1781ba6a1819Smrg 1782fe4c343aSmrgAC_SUBST(MAKE_TEXT) 1783fe4c343aSmrgAC_SUBST(MAKE_PS) 1784fe4c343aSmrgAC_SUBST(MAKE_PDF) 1785fe4c343aSmrgAC_SUBST(MAKE_HTML) 1786fe4c343aSmrg]) # XORG_CHECK_DOCBOOK 1787549e21daSmrg 1788fe4c343aSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1789fe4c343aSmrg# ---------------- 1790fe4c343aSmrg# Minimum version: 1.5.0 1791fe4c343aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1792fe4c343aSmrg# 1793fe4c343aSmrg# Documentation tools are not always available on all platforms and sometimes 1794fe4c343aSmrg# not at the appropriate level. This macro enables a module to test for the 1795fe4c343aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1796fe4c343aSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1797fe4c343aSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1798fe4c343aSmrg# --with-xmlto assumes 'auto'. 1799fe4c343aSmrg# 1800fe4c343aSmrg# Interface to module: 1801fe4c343aSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1802fe4c343aSmrg# XMLTO: returns the path of the xmlto program found 1803fe4c343aSmrg# returns the path set by the user in the environment 1804fe4c343aSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1805fe4c343aSmrg# 'no' user instructs the module not to use xmlto 1806fe4c343aSmrg# 1807fe4c343aSmrg# Added in version 1.10.0 1808fe4c343aSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1809fe4c343aSmrg# xmlto for text output requires either lynx, links, or w3m browsers 1810fe4c343aSmrg# 1811fe4c343aSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1812fe4c343aSmrg# 1813fe4c343aSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1814fe4c343aSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1815fe4c343aSmrgm4_define([_defopt], m4_default([$2], [auto])) 1816fe4c343aSmrgAC_ARG_WITH(xmlto, 1817fe4c343aSmrg AS_HELP_STRING([--with-xmlto], 1818fe4c343aSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1819fe4c343aSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1820fe4c343aSmrgm4_undefine([_defopt]) 1821549e21daSmrg 1822fe4c343aSmrgif test "x$use_xmlto" = x"auto"; then 1823fe4c343aSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1824fe4c343aSmrg if test "x$XMLTO" = "x"; then 1825fe4c343aSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1826fe4c343aSmrg have_xmlto=no 1827fe4c343aSmrg else 1828fe4c343aSmrg have_xmlto=yes 1829fe4c343aSmrg fi 1830fe4c343aSmrgelif test "x$use_xmlto" = x"yes" ; then 1831fe4c343aSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1832fe4c343aSmrg if test "x$XMLTO" = "x"; then 1833fe4c343aSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1834fe4c343aSmrg fi 1835fe4c343aSmrg have_xmlto=yes 1836fe4c343aSmrgelif test "x$use_xmlto" = x"no" ; then 1837fe4c343aSmrg if test "x$XMLTO" != "x"; then 1838fe4c343aSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1839fe4c343aSmrg fi 1840fe4c343aSmrg have_xmlto=no 1841fe4c343aSmrgelse 1842fe4c343aSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1843fe4c343aSmrgfi 1844549e21daSmrg 1845fe4c343aSmrg# Test for a minimum version of xmlto, if provided. 1846fe4c343aSmrgm4_ifval([$1], 1847fe4c343aSmrg[if test "$have_xmlto" = yes; then 1848fe4c343aSmrg # scrape the xmlto version 1849fe4c343aSmrg AC_MSG_CHECKING([the xmlto version]) 1850fe4c343aSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1851fe4c343aSmrg AC_MSG_RESULT([$xmlto_version]) 1852fe4c343aSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1853fe4c343aSmrg [if test "x$use_xmlto" = xauto; then 1854fe4c343aSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1855fe4c343aSmrg have_xmlto=no 1856fe4c343aSmrg else 1857fe4c343aSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1858fe4c343aSmrg fi]) 1859fe4c343aSmrgfi]) 1860549e21daSmrg 1861fe4c343aSmrg# Test for the ability of xmlto to generate a text target 1862549e21daSmrg# 1863fe4c343aSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1864fe4c343aSmrg# following test for empty XML docbook files. 1865fe4c343aSmrg# For compatibility reasons use the following empty XML docbook file and if 1866fe4c343aSmrg# it fails try it again with a non-empty XML file. 1867fe4c343aSmrghave_xmlto_text=no 1868fe4c343aSmrgcat > conftest.xml << "EOF" 1869fe4c343aSmrgEOF 1870fe4c343aSmrgAS_IF([test "$have_xmlto" = yes], 1871fe4c343aSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1872fe4c343aSmrg [have_xmlto_text=yes], 1873fe4c343aSmrg [# Try it again with a non-empty XML file. 1874fe4c343aSmrg cat > conftest.xml << "EOF" 1875fe4c343aSmrg<x></x> 1876fe4c343aSmrgEOF 1877fe4c343aSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1878fe4c343aSmrg [have_xmlto_text=yes], 1879fe4c343aSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1880fe4c343aSmrgrm -f conftest.xml 1881fe4c343aSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1882fe4c343aSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1883fe4c343aSmrg]) # XORG_WITH_XMLTO 1884ba6a1819Smrg 1885fe4c343aSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1886fe4c343aSmrg# -------------------------------------------- 1887fe4c343aSmrg# Minimum version: 1.12.0 1888fe4c343aSmrg# Minimum version for optional DEFAULT argument: 1.12.0 18891bedbe3fSmrg# 1890fe4c343aSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1891fe4c343aSmrg# XML-based language used for the transformation of XML documents. 1892fe4c343aSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1893fe4c343aSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1894fe4c343aSmrg# The XSLT processor is often used as a standalone tool for transformations. 1895fe4c343aSmrg# It should not be assumed that this tool is used only to work with documnetation. 1896fe4c343aSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1897fe4c343aSmrg# 1898fe4c343aSmrg# Interface to module: 1899fe4c343aSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1900fe4c343aSmrg# XSLTPROC: returns the path of the xsltproc program found 1901fe4c343aSmrg# returns the path set by the user in the environment 1902fe4c343aSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1903fe4c343aSmrg# 'no' user instructs the module not to use xsltproc 1904fe4c343aSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1905fe4c343aSmrg# 1906fe4c343aSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1907fe4c343aSmrg# 1908fe4c343aSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1909fe4c343aSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1910fe4c343aSmrg# Preserves the interface, should it be implemented later 1911fe4c343aSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1912fe4c343aSmrgm4_define([_defopt], m4_default([$2], [auto])) 1913fe4c343aSmrgAC_ARG_WITH(xsltproc, 1914fe4c343aSmrg AS_HELP_STRING([--with-xsltproc], 1915fe4c343aSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1916fe4c343aSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1917fe4c343aSmrgm4_undefine([_defopt]) 1918ba6a1819Smrg 1919fe4c343aSmrgif test "x$use_xsltproc" = x"auto"; then 1920fe4c343aSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1921fe4c343aSmrg if test "x$XSLTPROC" = "x"; then 1922fe4c343aSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1923fe4c343aSmrg have_xsltproc=no 1924fe4c343aSmrg else 1925fe4c343aSmrg have_xsltproc=yes 1926fe4c343aSmrg fi 1927fe4c343aSmrgelif test "x$use_xsltproc" = x"yes" ; then 1928fe4c343aSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1929fe4c343aSmrg if test "x$XSLTPROC" = "x"; then 1930fe4c343aSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1931fe4c343aSmrg fi 1932fe4c343aSmrg have_xsltproc=yes 1933fe4c343aSmrgelif test "x$use_xsltproc" = x"no" ; then 1934fe4c343aSmrg if test "x$XSLTPROC" != "x"; then 1935fe4c343aSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1936fe4c343aSmrg fi 1937fe4c343aSmrg have_xsltproc=no 1938fe4c343aSmrgelse 1939fe4c343aSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1940fe4c343aSmrgfi 1941ba6a1819Smrg 1942fe4c343aSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1943fe4c343aSmrg]) # XORG_WITH_XSLTPROC 1944ba6a1819Smrg 1945fe4c343aSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1946fe4c343aSmrg# ---------------------------------------- 1947fe4c343aSmrg# Minimum version: 1.15.0 1948fe4c343aSmrg# 1949fe4c343aSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 1950fe4c343aSmrg# scanning arbitrary text files, extracting information from those text files, 1951fe4c343aSmrg# and printing reports based on that information. 1952fe4c343aSmrg# 1953fe4c343aSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1954fe4c343aSmrg# 1955fe4c343aSmrg# Interface to module: 1956fe4c343aSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 1957fe4c343aSmrg# PERL: returns the path of the perl program found 1958fe4c343aSmrg# returns the path set by the user in the environment 1959fe4c343aSmrg# --with-perl: 'yes' user instructs the module to use perl 1960fe4c343aSmrg# 'no' user instructs the module not to use perl 1961fe4c343aSmrg# have_perl: returns yes if perl found in PATH or no 1962fe4c343aSmrg# 1963fe4c343aSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1964fe4c343aSmrg# 1965fe4c343aSmrgAC_DEFUN([XORG_WITH_PERL],[ 1966fe4c343aSmrgAC_ARG_VAR([PERL], [Path to perl command]) 1967fe4c343aSmrg# Preserves the interface, should it be implemented later 1968fe4c343aSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1969fe4c343aSmrgm4_define([_defopt], m4_default([$2], [auto])) 1970fe4c343aSmrgAC_ARG_WITH(perl, 1971fe4c343aSmrg AS_HELP_STRING([--with-perl], 1972fe4c343aSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 1973fe4c343aSmrg [use_perl=$withval], [use_perl=]_defopt) 1974fe4c343aSmrgm4_undefine([_defopt]) 1975ba6a1819Smrg 1976fe4c343aSmrgif test "x$use_perl" = x"auto"; then 1977fe4c343aSmrg AC_PATH_PROG([PERL], [perl]) 1978fe4c343aSmrg if test "x$PERL" = "x"; then 1979fe4c343aSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1980fe4c343aSmrg have_perl=no 1981fe4c343aSmrg else 1982fe4c343aSmrg have_perl=yes 1983fe4c343aSmrg fi 1984fe4c343aSmrgelif test "x$use_perl" = x"yes" ; then 1985fe4c343aSmrg AC_PATH_PROG([PERL], [perl]) 1986fe4c343aSmrg if test "x$PERL" = "x"; then 1987fe4c343aSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1988fe4c343aSmrg fi 1989fe4c343aSmrg have_perl=yes 1990fe4c343aSmrgelif test "x$use_perl" = x"no" ; then 1991fe4c343aSmrg if test "x$PERL" != "x"; then 1992fe4c343aSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1993fe4c343aSmrg fi 1994fe4c343aSmrg have_perl=no 1995fe4c343aSmrgelse 1996fe4c343aSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1997fe4c343aSmrgfi 1998549e21daSmrg 1999fe4c343aSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 2000fe4c343aSmrg]) # XORG_WITH_PERL 2001549e21daSmrg 2002fe4c343aSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 2003fe4c343aSmrg# ---------------- 2004fe4c343aSmrg# Minimum version: 1.5.0 2005fe4c343aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2006fe4c343aSmrg# 2007fe4c343aSmrg# Documentation tools are not always available on all platforms and sometimes 2008fe4c343aSmrg# not at the appropriate level. This macro enables a module to test for the 2009fe4c343aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2010fe4c343aSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 2011fe4c343aSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 2012fe4c343aSmrg# --with-asciidoc assumes 'auto'. 2013fe4c343aSmrg# 2014fe4c343aSmrg# Interface to module: 2015fe4c343aSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 2016fe4c343aSmrg# ASCIIDOC: returns the path of the asciidoc program found 2017fe4c343aSmrg# returns the path set by the user in the environment 2018fe4c343aSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 2019fe4c343aSmrg# 'no' user instructs the module not to use asciidoc 2020fe4c343aSmrg# 2021fe4c343aSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 2022fe4c343aSmrg# 2023fe4c343aSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 2024fe4c343aSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 2025fe4c343aSmrgm4_define([_defopt], m4_default([$2], [auto])) 2026fe4c343aSmrgAC_ARG_WITH(asciidoc, 2027fe4c343aSmrg AS_HELP_STRING([--with-asciidoc], 2028fe4c343aSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 2029fe4c343aSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 2030fe4c343aSmrgm4_undefine([_defopt]) 2031549e21daSmrg 2032fe4c343aSmrgif test "x$use_asciidoc" = x"auto"; then 2033fe4c343aSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2034fe4c343aSmrg if test "x$ASCIIDOC" = "x"; then 2035fe4c343aSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 2036fe4c343aSmrg have_asciidoc=no 2037fe4c343aSmrg else 2038fe4c343aSmrg have_asciidoc=yes 2039fe4c343aSmrg fi 2040fe4c343aSmrgelif test "x$use_asciidoc" = x"yes" ; then 2041fe4c343aSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 2042fe4c343aSmrg if test "x$ASCIIDOC" = "x"; then 2043fe4c343aSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 2044fe4c343aSmrg fi 2045fe4c343aSmrg have_asciidoc=yes 2046fe4c343aSmrgelif test "x$use_asciidoc" = x"no" ; then 2047fe4c343aSmrg if test "x$ASCIIDOC" != "x"; then 2048fe4c343aSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 2049fe4c343aSmrg fi 2050fe4c343aSmrg have_asciidoc=no 2051fe4c343aSmrgelse 2052fe4c343aSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2053fe4c343aSmrgfi 2054fe4c343aSmrgm4_ifval([$1], 2055fe4c343aSmrg[if test "$have_asciidoc" = yes; then 2056fe4c343aSmrg # scrape the asciidoc version 2057fe4c343aSmrg AC_MSG_CHECKING([the asciidoc version]) 2058fe4c343aSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 2059fe4c343aSmrg AC_MSG_RESULT([$asciidoc_version]) 2060fe4c343aSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 2061fe4c343aSmrg [if test "x$use_asciidoc" = xauto; then 2062fe4c343aSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 2063fe4c343aSmrg have_asciidoc=no 2064fe4c343aSmrg else 2065fe4c343aSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 2066fe4c343aSmrg fi]) 2067fe4c343aSmrgfi]) 2068fe4c343aSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 2069fe4c343aSmrg]) # XORG_WITH_ASCIIDOC 2070549e21daSmrg 2071fe4c343aSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 2072fe4c343aSmrg# ------------------------------------------- 2073fe4c343aSmrg# Minimum version: 1.5.0 2074fe4c343aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2075fe4c343aSmrg# Minimum version for optional DOT checking: 1.18.0 2076fe4c343aSmrg# 2077fe4c343aSmrg# Documentation tools are not always available on all platforms and sometimes 2078fe4c343aSmrg# not at the appropriate level. This macro enables a module to test for the 2079fe4c343aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2080fe4c343aSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 2081fe4c343aSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 2082fe4c343aSmrg# --with-doxygen assumes 'auto'. 2083fe4c343aSmrg# 2084fe4c343aSmrg# Interface to module: 2085fe4c343aSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 2086fe4c343aSmrg# DOXYGEN: returns the path of the doxygen program found 2087fe4c343aSmrg# returns the path set by the user in the environment 2088fe4c343aSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 2089fe4c343aSmrg# 'no' user instructs the module not to use doxygen 2090fe4c343aSmrg# 2091fe4c343aSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 2092fe4c343aSmrg# 2093fe4c343aSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 2094fe4c343aSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 2095fe4c343aSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 2096fe4c343aSmrgm4_define([_defopt], m4_default([$2], [auto])) 2097fe4c343aSmrgAC_ARG_WITH(doxygen, 2098fe4c343aSmrg AS_HELP_STRING([--with-doxygen], 2099fe4c343aSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 2100fe4c343aSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 2101fe4c343aSmrgm4_undefine([_defopt]) 2102549e21daSmrg 2103fe4c343aSmrgif test "x$use_doxygen" = x"auto"; then 2104fe4c343aSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2105fe4c343aSmrg if test "x$DOXYGEN" = "x"; then 2106fe4c343aSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 2107fe4c343aSmrg have_doxygen=no 2108fe4c343aSmrg else 2109fe4c343aSmrg have_doxygen=yes 2110fe4c343aSmrg fi 2111fe4c343aSmrgelif test "x$use_doxygen" = x"yes" ; then 2112fe4c343aSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 2113fe4c343aSmrg if test "x$DOXYGEN" = "x"; then 2114fe4c343aSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 2115fe4c343aSmrg fi 2116fe4c343aSmrg have_doxygen=yes 2117fe4c343aSmrgelif test "x$use_doxygen" = x"no" ; then 2118fe4c343aSmrg if test "x$DOXYGEN" != "x"; then 2119fe4c343aSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 2120fe4c343aSmrg fi 2121fe4c343aSmrg have_doxygen=no 2122fe4c343aSmrgelse 2123fe4c343aSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2124fe4c343aSmrgfi 2125fe4c343aSmrgm4_ifval([$1], 2126fe4c343aSmrg[if test "$have_doxygen" = yes; then 2127fe4c343aSmrg # scrape the doxygen version 2128fe4c343aSmrg AC_MSG_CHECKING([the doxygen version]) 2129fe4c343aSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 2130fe4c343aSmrg AC_MSG_RESULT([$doxygen_version]) 2131fe4c343aSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 2132fe4c343aSmrg [if test "x$use_doxygen" = xauto; then 2133fe4c343aSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 2134fe4c343aSmrg have_doxygen=no 2135fe4c343aSmrg else 2136fe4c343aSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 2137fe4c343aSmrg fi]) 2138fe4c343aSmrgfi]) 2139549e21daSmrg 2140fe4c343aSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 2141fe4c343aSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 2142fe4c343aSmrgdnl HAVE_DOT = @HAVE_DOT@ 2143fe4c343aSmrgHAVE_DOT=no 2144fe4c343aSmrgif test "x$have_doxygen" = "xyes"; then 2145fe4c343aSmrg AC_PATH_PROG([DOT], [dot]) 2146fe4c343aSmrg if test "x$DOT" != "x"; then 2147fe4c343aSmrg HAVE_DOT=yes 2148fe4c343aSmrg fi 2149fe4c343aSmrgfi 2150549e21daSmrg 2151fe4c343aSmrgAC_SUBST([HAVE_DOT]) 2152fe4c343aSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2153fe4c343aSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2154fe4c343aSmrg]) # XORG_WITH_DOXYGEN 2155549e21daSmrg 2156fe4c343aSmrg# XORG_WITH_GROFF([DEFAULT]) 2157fe4c343aSmrg# ---------------- 2158fe4c343aSmrg# Minimum version: 1.6.0 2159fe4c343aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2160fe4c343aSmrg# 2161fe4c343aSmrg# Documentation tools are not always available on all platforms and sometimes 2162fe4c343aSmrg# not at the appropriate level. This macro enables a module to test for the 2163fe4c343aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2164fe4c343aSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 2165fe4c343aSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 2166fe4c343aSmrg# --with-groff assumes 'auto'. 2167fe4c343aSmrg# 2168fe4c343aSmrg# Interface to module: 2169fe4c343aSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2170fe4c343aSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2171fe4c343aSmrg# HAVE_GROFF_MS: the -ms macros package 2172fe4c343aSmrg# GROFF: returns the path of the groff program found 2173fe4c343aSmrg# returns the path set by the user in the environment 2174fe4c343aSmrg# --with-groff: 'yes' user instructs the module to use groff 2175fe4c343aSmrg# 'no' user instructs the module not to use groff 2176fe4c343aSmrg# 2177fe4c343aSmrg# Added in version 1.9.0: 2178fe4c343aSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2179fe4c343aSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2180fe4c343aSmrg# psselect from the psutils package. 2181fe4c343aSmrg# the ghostcript package. Refer to the grohtml man pages 2182fe4c343aSmrg# 2183fe4c343aSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2184fe4c343aSmrg# 2185fe4c343aSmrg# OS and distros often splits groff in a basic and full package, the former 2186fe4c343aSmrg# having the groff program and the later having devices, fonts and macros 2187fe4c343aSmrg# Checking for the groff executable is not enough. 2188fe4c343aSmrg# 2189fe4c343aSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 2190fe4c343aSmrg# unset HAVE_GROFF or GROFF env variables. 2191fe4c343aSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2192fe4c343aSmrg# 2193fe4c343aSmrgAC_DEFUN([XORG_WITH_GROFF],[ 2194fe4c343aSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2195fe4c343aSmrgm4_define([_defopt], m4_default([$1], [auto])) 2196fe4c343aSmrgAC_ARG_WITH(groff, 2197fe4c343aSmrg AS_HELP_STRING([--with-groff], 2198fe4c343aSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2199fe4c343aSmrg [use_groff=$withval], [use_groff=]_defopt) 2200fe4c343aSmrgm4_undefine([_defopt]) 2201549e21daSmrg 2202fe4c343aSmrgif test "x$use_groff" = x"auto"; then 2203fe4c343aSmrg AC_PATH_PROG([GROFF], [groff]) 2204fe4c343aSmrg if test "x$GROFF" = "x"; then 2205fe4c343aSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2206fe4c343aSmrg have_groff=no 2207fe4c343aSmrg else 2208fe4c343aSmrg have_groff=yes 2209fe4c343aSmrg fi 2210fe4c343aSmrgelif test "x$use_groff" = x"yes" ; then 2211fe4c343aSmrg AC_PATH_PROG([GROFF], [groff]) 2212fe4c343aSmrg if test "x$GROFF" = "x"; then 2213fe4c343aSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2214fe4c343aSmrg fi 2215fe4c343aSmrg have_groff=yes 2216fe4c343aSmrgelif test "x$use_groff" = x"no" ; then 2217fe4c343aSmrg if test "x$GROFF" != "x"; then 2218fe4c343aSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2219fe4c343aSmrg fi 2220fe4c343aSmrg have_groff=no 2221fe4c343aSmrgelse 2222fe4c343aSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2223fe4c343aSmrgfi 2224549e21daSmrg 2225fe4c343aSmrg# We have groff, test for the presence of the macro packages 2226fe4c343aSmrgif test "x$have_groff" = x"yes"; then 2227fe4c343aSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2228fe4c343aSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2229fe4c343aSmrg groff_ms_works=yes 2230fe4c343aSmrg else 2231fe4c343aSmrg groff_ms_works=no 2232fe4c343aSmrg fi 2233fe4c343aSmrg AC_MSG_RESULT([$groff_ms_works]) 2234fe4c343aSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2235fe4c343aSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2236fe4c343aSmrg groff_mm_works=yes 2237fe4c343aSmrg else 2238fe4c343aSmrg groff_mm_works=no 2239fe4c343aSmrg fi 2240fe4c343aSmrg AC_MSG_RESULT([$groff_mm_works]) 2241fe4c343aSmrgfi 2242549e21daSmrg 2243fe4c343aSmrg# We have groff, test for HTML dependencies, one command per package 2244fe4c343aSmrgif test "x$have_groff" = x"yes"; then 2245fe4c343aSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2246fe4c343aSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2247fe4c343aSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2248fe4c343aSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2249fe4c343aSmrg have_groff_html=yes 2250fe4c343aSmrg else 2251fe4c343aSmrg have_groff_html=no 2252fe4c343aSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2253fe4c343aSmrg fi 2254fe4c343aSmrgfi 2255549e21daSmrg 2256fe4c343aSmrg# Set Automake conditionals for Makefiles 2257fe4c343aSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2258fe4c343aSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2259fe4c343aSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2260fe4c343aSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2261fe4c343aSmrg]) # XORG_WITH_GROFF 2262549e21daSmrg 2263fe4c343aSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2264fe4c343aSmrg# --------------------------------------- 2265fe4c343aSmrg# Minimum version: 1.6.0 2266fe4c343aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2267fe4c343aSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2268fe4c343aSmrg# 2269fe4c343aSmrg# Documentation tools are not always available on all platforms and sometimes 2270fe4c343aSmrg# not at the appropriate level. This macro enables a module to test for the 2271fe4c343aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2272fe4c343aSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 2273fe4c343aSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 2274fe4c343aSmrg# --with-fop assumes 'auto'. 2275fe4c343aSmrg# 2276fe4c343aSmrg# Interface to module: 2277fe4c343aSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2278fe4c343aSmrg# FOP: returns the path of the fop program found 2279fe4c343aSmrg# returns the path set by the user in the environment 2280fe4c343aSmrg# --with-fop: 'yes' user instructs the module to use fop 2281fe4c343aSmrg# 'no' user instructs the module not to use fop 2282fe4c343aSmrg# 2283fe4c343aSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2284fe4c343aSmrg# 2285fe4c343aSmrgAC_DEFUN([XORG_WITH_FOP],[ 2286fe4c343aSmrgAC_ARG_VAR([FOP], [Path to fop command]) 2287fe4c343aSmrgm4_define([_defopt], m4_default([$2], [auto])) 2288fe4c343aSmrgAC_ARG_WITH(fop, 2289fe4c343aSmrg AS_HELP_STRING([--with-fop], 2290fe4c343aSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2291fe4c343aSmrg [use_fop=$withval], [use_fop=]_defopt) 2292fe4c343aSmrgm4_undefine([_defopt]) 2293549e21daSmrg 2294fe4c343aSmrgif test "x$use_fop" = x"auto"; then 2295fe4c343aSmrg AC_PATH_PROG([FOP], [fop]) 2296fe4c343aSmrg if test "x$FOP" = "x"; then 2297fe4c343aSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2298fe4c343aSmrg have_fop=no 2299fe4c343aSmrg else 2300fe4c343aSmrg have_fop=yes 2301fe4c343aSmrg fi 2302fe4c343aSmrgelif test "x$use_fop" = x"yes" ; then 2303fe4c343aSmrg AC_PATH_PROG([FOP], [fop]) 2304fe4c343aSmrg if test "x$FOP" = "x"; then 2305fe4c343aSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2306fe4c343aSmrg fi 2307fe4c343aSmrg have_fop=yes 2308fe4c343aSmrgelif test "x$use_fop" = x"no" ; then 2309fe4c343aSmrg if test "x$FOP" != "x"; then 2310fe4c343aSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2311fe4c343aSmrg fi 2312fe4c343aSmrg have_fop=no 2313fe4c343aSmrgelse 2314fe4c343aSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 23151bedbe3fSmrgfi 2316549e21daSmrg 2317fe4c343aSmrg# Test for a minimum version of fop, if provided. 2318fe4c343aSmrgm4_ifval([$1], 2319fe4c343aSmrg[if test "$have_fop" = yes; then 2320fe4c343aSmrg # scrape the fop version 2321fe4c343aSmrg AC_MSG_CHECKING([for fop minimum version]) 2322fe4c343aSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2323fe4c343aSmrg AC_MSG_RESULT([$fop_version]) 2324fe4c343aSmrg AS_VERSION_COMPARE([$fop_version], [$1], 2325fe4c343aSmrg [if test "x$use_fop" = xauto; then 2326fe4c343aSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2327fe4c343aSmrg have_fop=no 2328fe4c343aSmrg else 2329fe4c343aSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2330fe4c343aSmrg fi]) 2331fe4c343aSmrgfi]) 2332fe4c343aSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2333fe4c343aSmrg]) # XORG_WITH_FOP 2334549e21daSmrg 2335fe4c343aSmrg# XORG_WITH_M4([MIN-VERSION]) 2336fe4c343aSmrg# --------------------------- 2337fe4c343aSmrg# Minimum version: 1.19.0 23381bedbe3fSmrg# 2339fe4c343aSmrg# This macro attempts to locate an m4 macro processor which supports 2340fe4c343aSmrg# -I option and is only useful for modules relying on M4 in order to 2341fe4c343aSmrg# expand macros in source code files. 2342fe4c343aSmrg# 2343fe4c343aSmrg# Interface to module: 2344fe4c343aSmrg# M4: returns the path of the m4 program found 2345fe4c343aSmrg# returns the path set by the user in the environment 2346fe4c343aSmrg# 2347fe4c343aSmrgAC_DEFUN([XORG_WITH_M4], [ 2348fe4c343aSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 2349fe4c343aSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 2350fe4c343aSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 2351fe4c343aSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 2352fe4c343aSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 2353fe4c343aSmrg [$PATH:/usr/gnu/bin])]) 2354ba6a1819Smrg 2355fe4c343aSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 2356fe4c343aSmrg]) # XORG_WITH_M4 2357ba6a1819Smrg 2358fe4c343aSmrg# XORG_WITH_PS2PDF([DEFAULT]) 2359fe4c343aSmrg# ---------------- 2360fe4c343aSmrg# Minimum version: 1.6.0 2361fe4c343aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2362fe4c343aSmrg# 2363fe4c343aSmrg# Documentation tools are not always available on all platforms and sometimes 2364fe4c343aSmrg# not at the appropriate level. This macro enables a module to test for the 2365fe4c343aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2366fe4c343aSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 2367fe4c343aSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2368fe4c343aSmrg# --with-ps2pdf assumes 'auto'. 2369fe4c343aSmrg# 2370fe4c343aSmrg# Interface to module: 2371fe4c343aSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2372fe4c343aSmrg# PS2PDF: returns the path of the ps2pdf program found 2373fe4c343aSmrg# returns the path set by the user in the environment 2374fe4c343aSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2375fe4c343aSmrg# 'no' user instructs the module not to use ps2pdf 2376fe4c343aSmrg# 2377fe4c343aSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2378fe4c343aSmrg# 2379fe4c343aSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2380fe4c343aSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2381fe4c343aSmrgm4_define([_defopt], m4_default([$1], [auto])) 2382fe4c343aSmrgAC_ARG_WITH(ps2pdf, 2383fe4c343aSmrg AS_HELP_STRING([--with-ps2pdf], 2384fe4c343aSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2385fe4c343aSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2386fe4c343aSmrgm4_undefine([_defopt]) 2387ba6a1819Smrg 2388fe4c343aSmrgif test "x$use_ps2pdf" = x"auto"; then 2389fe4c343aSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2390fe4c343aSmrg if test "x$PS2PDF" = "x"; then 2391fe4c343aSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2392fe4c343aSmrg have_ps2pdf=no 2393fe4c343aSmrg else 2394fe4c343aSmrg have_ps2pdf=yes 2395fe4c343aSmrg fi 2396fe4c343aSmrgelif test "x$use_ps2pdf" = x"yes" ; then 2397fe4c343aSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2398fe4c343aSmrg if test "x$PS2PDF" = "x"; then 2399fe4c343aSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2400fe4c343aSmrg fi 2401fe4c343aSmrg have_ps2pdf=yes 2402fe4c343aSmrgelif test "x$use_ps2pdf" = x"no" ; then 2403fe4c343aSmrg if test "x$PS2PDF" != "x"; then 2404fe4c343aSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2405fe4c343aSmrg fi 2406fe4c343aSmrg have_ps2pdf=no 2407fe4c343aSmrgelse 2408fe4c343aSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 24091bedbe3fSmrgfi 2410fe4c343aSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2411fe4c343aSmrg]) # XORG_WITH_PS2PDF 2412549e21daSmrg 2413fe4c343aSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 2414fe4c343aSmrg# ---------------- 2415fe4c343aSmrg# Minimum version: 1.6.0 2416fe4c343aSmrg# 2417fe4c343aSmrg# Documentation tools are not always available on all platforms and sometimes 2418fe4c343aSmrg# not at the appropriate level. This macro enables a builder to skip all 2419fe4c343aSmrg# documentation targets except traditional man pages. 2420fe4c343aSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2421fe4c343aSmrg# maximum flexibilty in controlling documentation building. 2422fe4c343aSmrg# Refer to: 2423fe4c343aSmrg# XORG_WITH_XMLTO --with-xmlto 2424fe4c343aSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2425fe4c343aSmrg# XORG_WITH_DOXYGEN --with-doxygen 2426fe4c343aSmrg# XORG_WITH_FOP --with-fop 2427fe4c343aSmrg# XORG_WITH_GROFF --with-groff 2428fe4c343aSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2429fe4c343aSmrg# 2430fe4c343aSmrg# Interface to module: 2431fe4c343aSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2432fe4c343aSmrg# --enable-docs: 'yes' user instructs the module to generate docs 2433fe4c343aSmrg# 'no' user instructs the module not to generate docs 2434fe4c343aSmrg# parm1: specify the default value, yes or no. 2435fe4c343aSmrg# 2436fe4c343aSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2437fe4c343aSmrgm4_define([docs_default], m4_default([$1], [yes])) 2438fe4c343aSmrgAC_ARG_ENABLE(docs, 2439fe4c343aSmrg AS_HELP_STRING([--enable-docs], 2440fe4c343aSmrg [Enable building the documentation (default: ]docs_default[)]), 2441fe4c343aSmrg [build_docs=$enableval], [build_docs=]docs_default) 2442fe4c343aSmrgm4_undefine([docs_default]) 2443fe4c343aSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2444fe4c343aSmrgAC_MSG_CHECKING([whether to build documentation]) 2445fe4c343aSmrgAC_MSG_RESULT([$build_docs]) 2446fe4c343aSmrg]) # XORG_ENABLE_DOCS 2447549e21daSmrg 2448fe4c343aSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2449fe4c343aSmrg# ---------------- 2450fe4c343aSmrg# Minimum version: 1.6.0 2451fe4c343aSmrg# 2452fe4c343aSmrg# This macro enables a builder to skip all developer documentation. 2453fe4c343aSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2454fe4c343aSmrg# maximum flexibilty in controlling documentation building. 2455fe4c343aSmrg# Refer to: 2456fe4c343aSmrg# XORG_WITH_XMLTO --with-xmlto 2457fe4c343aSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2458fe4c343aSmrg# XORG_WITH_DOXYGEN --with-doxygen 2459fe4c343aSmrg# XORG_WITH_FOP --with-fop 2460fe4c343aSmrg# XORG_WITH_GROFF --with-groff 2461fe4c343aSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2462fe4c343aSmrg# 2463fe4c343aSmrg# Interface to module: 2464fe4c343aSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2465fe4c343aSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2466fe4c343aSmrg# 'no' user instructs the module not to generate developer docs 2467fe4c343aSmrg# parm1: specify the default value, yes or no. 2468fe4c343aSmrg# 2469fe4c343aSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2470fe4c343aSmrgm4_define([devel_default], m4_default([$1], [yes])) 2471fe4c343aSmrgAC_ARG_ENABLE(devel-docs, 2472fe4c343aSmrg AS_HELP_STRING([--enable-devel-docs], 2473fe4c343aSmrg [Enable building the developer documentation (default: ]devel_default[)]), 2474fe4c343aSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2475fe4c343aSmrgm4_undefine([devel_default]) 2476fe4c343aSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2477fe4c343aSmrgAC_MSG_CHECKING([whether to build developer documentation]) 2478fe4c343aSmrgAC_MSG_RESULT([$build_devel_docs]) 2479fe4c343aSmrg]) # XORG_ENABLE_DEVEL_DOCS 2480ba6a1819Smrg 2481fe4c343aSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 2482fe4c343aSmrg# ---------------- 2483fe4c343aSmrg# Minimum version: 1.6.0 2484fe4c343aSmrg# 2485fe4c343aSmrg# This macro enables a builder to skip all functional specification targets. 2486fe4c343aSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2487fe4c343aSmrg# maximum flexibilty in controlling documentation building. 2488fe4c343aSmrg# Refer to: 2489fe4c343aSmrg# XORG_WITH_XMLTO --with-xmlto 2490fe4c343aSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2491fe4c343aSmrg# XORG_WITH_DOXYGEN --with-doxygen 2492fe4c343aSmrg# XORG_WITH_FOP --with-fop 2493fe4c343aSmrg# XORG_WITH_GROFF --with-groff 2494fe4c343aSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2495fe4c343aSmrg# 2496fe4c343aSmrg# Interface to module: 2497fe4c343aSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2498fe4c343aSmrg# --enable-specs: 'yes' user instructs the module to generate specs 2499fe4c343aSmrg# 'no' user instructs the module not to generate specs 2500fe4c343aSmrg# parm1: specify the default value, yes or no. 2501fe4c343aSmrg# 2502fe4c343aSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2503fe4c343aSmrgm4_define([spec_default], m4_default([$1], [yes])) 2504fe4c343aSmrgAC_ARG_ENABLE(specs, 2505fe4c343aSmrg AS_HELP_STRING([--enable-specs], 2506fe4c343aSmrg [Enable building the specs (default: ]spec_default[)]), 2507fe4c343aSmrg [build_specs=$enableval], [build_specs=]spec_default) 2508fe4c343aSmrgm4_undefine([spec_default]) 2509fe4c343aSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2510fe4c343aSmrgAC_MSG_CHECKING([whether to build functional specifications]) 2511fe4c343aSmrgAC_MSG_RESULT([$build_specs]) 2512fe4c343aSmrg]) # XORG_ENABLE_SPECS 2513549e21daSmrg 2514fe4c343aSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2515fe4c343aSmrg# ---------------------------------------------- 2516fe4c343aSmrg# Minimum version: 1.13.0 2517fe4c343aSmrg# 2518fe4c343aSmrg# This macro enables a builder to enable/disable unit testing 2519fe4c343aSmrg# It makes no assumption about the test cases implementation 2520fe4c343aSmrg# Test cases may or may not use Automake "Support for test suites" 2521fe4c343aSmrg# They may or may not use the software utility library GLib 2522fe4c343aSmrg# 2523fe4c343aSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2524fe4c343aSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2525fe4c343aSmrg# The variable enable_unit_tests is used by other macros in this file. 2526fe4c343aSmrg# 2527fe4c343aSmrg# Interface to module: 2528fe4c343aSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2529fe4c343aSmrg# enable_unit_tests: used in configure.ac for additional configuration 2530fe4c343aSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2531fe4c343aSmrg# 'no' user instructs the module not to build tests 2532fe4c343aSmrg# parm1: specify the default value, yes or no. 2533fe4c343aSmrg# 2534fe4c343aSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2535fe4c343aSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2536fe4c343aSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2537fe4c343aSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2538fe4c343aSmrgm4_define([_defopt], m4_default([$1], [auto])) 2539fe4c343aSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2540fe4c343aSmrg [Enable building unit test cases (default: ]_defopt[)]), 2541fe4c343aSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2542fe4c343aSmrgm4_undefine([_defopt]) 2543fe4c343aSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2544fe4c343aSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2545fe4c343aSmrgAC_MSG_RESULT([$enable_unit_tests]) 2546fe4c343aSmrg]) # XORG_ENABLE_UNIT_TESTS 2547ba6a1819Smrg 2548fe4c343aSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2549fe4c343aSmrg# ------------------------------------------------------ 2550fe4c343aSmrg# Minimum version: 1.17.0 2551fe4c343aSmrg# 2552fe4c343aSmrg# This macro enables a builder to enable/disable integration testing 2553fe4c343aSmrg# It makes no assumption about the test cases' implementation 2554fe4c343aSmrg# Test cases may or may not use Automake "Support for test suites" 2555fe4c343aSmrg# 2556fe4c343aSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2557fe4c343aSmrg# usually requires less dependencies and may be built and run under less 2558fe4c343aSmrg# stringent environments than integration tests. 2559fe4c343aSmrg# 2560fe4c343aSmrg# Interface to module: 2561fe4c343aSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2562fe4c343aSmrg# enable_integration_tests: used in configure.ac for additional configuration 2563fe4c343aSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2564fe4c343aSmrg# 'no' user instructs the module not to build tests 2565fe4c343aSmrg# parm1: specify the default value, yes or no. 2566fe4c343aSmrg# 2567fe4c343aSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2568fe4c343aSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2569fe4c343aSmrgm4_define([_defopt], m4_default([$1], [auto])) 2570fe4c343aSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2571fe4c343aSmrg [Enable building integration test cases (default: ]_defopt[)]), 2572fe4c343aSmrg [enable_integration_tests=$enableval], 2573fe4c343aSmrg [enable_integration_tests=]_defopt) 2574fe4c343aSmrgm4_undefine([_defopt]) 2575fe4c343aSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2576fe4c343aSmrg [test "x$enable_integration_tests" != xno]) 2577fe4c343aSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2578fe4c343aSmrgAC_MSG_RESULT([$enable_integration_tests]) 2579fe4c343aSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 2580ba6a1819Smrg 2581fe4c343aSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2582fe4c343aSmrg# ---------------------------------------- 2583fe4c343aSmrg# Minimum version: 1.13.0 2584fe4c343aSmrg# 2585fe4c343aSmrg# GLib is a library which provides advanced data structures and functions. 2586fe4c343aSmrg# This macro enables a module to test for the presence of Glib. 2587fe4c343aSmrg# 2588fe4c343aSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2589fe4c343aSmrg# Otherwise the value of $enable_unit_tests is blank. 2590fe4c343aSmrg# 2591fe4c343aSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2592fe4c343aSmrg# test support usually requires less dependencies and may be built and run under 2593fe4c343aSmrg# less stringent environments than integration tests. 2594fe4c343aSmrg# 2595fe4c343aSmrg# Interface to module: 2596fe4c343aSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 2597fe4c343aSmrg# with_glib: used in configure.ac to know if GLib has been found 2598fe4c343aSmrg# --with-glib: 'yes' user instructs the module to use glib 2599fe4c343aSmrg# 'no' user instructs the module not to use glib 2600fe4c343aSmrg# 2601fe4c343aSmrgAC_DEFUN([XORG_WITH_GLIB],[ 2602fe4c343aSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2603fe4c343aSmrgm4_define([_defopt], m4_default([$2], [auto])) 2604fe4c343aSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2605fe4c343aSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 2606fe4c343aSmrg [with_glib=$withval], [with_glib=]_defopt) 2607fe4c343aSmrgm4_undefine([_defopt]) 2608ba6a1819Smrg 2609fe4c343aSmrghave_glib=no 2610fe4c343aSmrg# Do not probe GLib if user explicitly disabled unit testing 2611fe4c343aSmrgif test "x$enable_unit_tests" != x"no"; then 2612fe4c343aSmrg # Do not probe GLib if user explicitly disabled it 2613fe4c343aSmrg if test "x$with_glib" != x"no"; then 2614fe4c343aSmrg m4_ifval( 2615fe4c343aSmrg [$1], 2616fe4c343aSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2617fe4c343aSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2618fe4c343aSmrg ) 2619fe4c343aSmrg fi 2620fe4c343aSmrgfi 2621ba6a1819Smrg 2622fe4c343aSmrg# Not having GLib when unit testing has been explicitly requested is an error 2623fe4c343aSmrgif test "x$enable_unit_tests" = x"yes"; then 2624fe4c343aSmrg if test "x$have_glib" = x"no"; then 2625fe4c343aSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2626fe4c343aSmrg fi 2627fe4c343aSmrgfi 2628ba6a1819Smrg 2629fe4c343aSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 2630fe4c343aSmrgif test "x$enable_unit_tests" = x"no"; then 2631fe4c343aSmrg if test "x$with_glib" = x"yes"; then 2632fe4c343aSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2633fe4c343aSmrg fi 2634fe4c343aSmrgfi 2635ba6a1819Smrg 2636fe4c343aSmrg# Not having GLib when it has been explicitly requested is an error 2637fe4c343aSmrgif test "x$with_glib" = x"yes"; then 2638fe4c343aSmrg if test "x$have_glib" = x"no"; then 2639fe4c343aSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2640fe4c343aSmrg fi 2641fe4c343aSmrgfi 2642ba6a1819Smrg 2643fe4c343aSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2644fe4c343aSmrg]) # XORG_WITH_GLIB 2645ba6a1819Smrg 2646fe4c343aSmrg# XORG_LD_WRAP([required|optional]) 2647fe4c343aSmrg# --------------------------------- 2648fe4c343aSmrg# Minimum version: 1.13.0 2649fe4c343aSmrg# 2650fe4c343aSmrg# Check if linker supports -wrap, passed via compiler flags 2651fe4c343aSmrg# 2652fe4c343aSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2653fe4c343aSmrg# Otherwise the value of $enable_unit_tests is blank. 2654fe4c343aSmrg# 2655fe4c343aSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2656fe4c343aSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2657fe4c343aSmrg# available, an argument of "optional" allows use when some unit tests require 2658fe4c343aSmrg# ld -wrap and others do not. 2659fe4c343aSmrg# 2660fe4c343aSmrgAC_DEFUN([XORG_LD_WRAP],[ 2661fe4c343aSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2662fe4c343aSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 2663fe4c343aSmrg void __wrap_exit(int status) { return; }], 2664fe4c343aSmrg [exit(0);])]) 2665fe4c343aSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 2666fe4c343aSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2667fe4c343aSmrg if test "x$have_ld_wrap" = x"no"; then 2668fe4c343aSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2669ba6a1819Smrg fi 26701bedbe3fSmrgfi 2671fe4c343aSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2672fe4c343aSmrg# 2673fe4c343aSmrg]) # XORG_LD_WRAP 2674ba6a1819Smrg 2675fe4c343aSmrg# XORG_CHECK_LINKER_FLAGS 26761bedbe3fSmrg# ----------------------- 2677fe4c343aSmrg# SYNOPSIS 2678fe4c343aSmrg# 2679fe4c343aSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2680fe4c343aSmrg# 2681fe4c343aSmrg# DESCRIPTION 2682fe4c343aSmrg# 2683fe4c343aSmrg# Check whether the given linker FLAGS work with the current language's 2684fe4c343aSmrg# linker, or whether they give an error. 2685fe4c343aSmrg# 2686fe4c343aSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2687fe4c343aSmrg# success/failure. 2688fe4c343aSmrg# 2689fe4c343aSmrg# PROGRAM-SOURCE is the program source to link with, if needed 2690fe4c343aSmrg# 2691fe4c343aSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2692fe4c343aSmrg# 2693fe4c343aSmrg# LICENSE 2694fe4c343aSmrg# 2695fe4c343aSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2696fe4c343aSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2697fe4c343aSmrg# Copyright (c) 2009 Matteo Frigo 2698fe4c343aSmrg# 2699fe4c343aSmrg# This program is free software: you can redistribute it and/or modify it 2700fe4c343aSmrg# under the terms of the GNU General Public License as published by the 2701fe4c343aSmrg# Free Software Foundation, either version 3 of the License, or (at your 2702fe4c343aSmrg# option) any later version. 2703fe4c343aSmrg# 2704fe4c343aSmrg# This program is distributed in the hope that it will be useful, but 2705fe4c343aSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2706fe4c343aSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2707fe4c343aSmrg# Public License for more details. 2708fe4c343aSmrg# 2709fe4c343aSmrg# You should have received a copy of the GNU General Public License along 2710fe4c343aSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2711fe4c343aSmrg# 2712fe4c343aSmrg# As a special exception, the respective Autoconf Macro's copyright owner 2713fe4c343aSmrg# gives unlimited permission to copy, distribute and modify the configure 2714fe4c343aSmrg# scripts that are the output of Autoconf when processing the Macro. You 2715fe4c343aSmrg# need not follow the terms of the GNU General Public License when using 2716fe4c343aSmrg# or distributing such scripts, even though portions of the text of the 2717fe4c343aSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 2718fe4c343aSmrg# all other use of the material that constitutes the Autoconf Macro. 2719fe4c343aSmrg# 2720fe4c343aSmrg# This special exception to the GPL applies to versions of the Autoconf 2721fe4c343aSmrg# Macro released by the Autoconf Archive. When you make and distribute a 2722fe4c343aSmrg# modified version of the Autoconf Macro, you may extend this special 2723fe4c343aSmrg# exception to the GPL to apply to your modified version as well.# 2724fe4c343aSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2725fe4c343aSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2726fe4c343aSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2727fe4c343aSmrgAS_LITERAL_IF([$1], 2728fe4c343aSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2729fe4c343aSmrg ax_save_FLAGS=$LDFLAGS 2730fe4c343aSmrg LDFLAGS="$1" 2731fe4c343aSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2732fe4c343aSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2733fe4c343aSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2734fe4c343aSmrg LDFLAGS=$ax_save_FLAGS])], 2735fe4c343aSmrg [ax_save_FLAGS=$LDFLAGS 2736fe4c343aSmrg LDFLAGS="$1" 2737fe4c343aSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2738fe4c343aSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2739fe4c343aSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2740fe4c343aSmrg LDFLAGS=$ax_save_FLAGS]) 2741fe4c343aSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2742fe4c343aSmrgAC_MSG_RESULT($xorg_check_linker_flags) 2743fe4c343aSmrgif test "x$xorg_check_linker_flags" = xyes; then 2744fe4c343aSmrg m4_default([$2], :) 2745fe4c343aSmrgelse 2746fe4c343aSmrg m4_default([$3], :) 2747fe4c343aSmrgfi 2748fe4c343aSmrg]) # XORG_CHECK_LINKER_FLAGS 2749ba6a1819Smrg 2750fe4c343aSmrg# XORG_MEMORY_CHECK_FLAGS 2751fe4c343aSmrg# ----------------------- 2752fe4c343aSmrg# Minimum version: 1.16.0 2753fe4c343aSmrg# 2754fe4c343aSmrg# This macro attempts to find appropriate memory checking functionality 2755fe4c343aSmrg# for various platforms which unit testing code may use to catch various 2756fe4c343aSmrg# forms of memory allocation and access errors in testing. 2757fe4c343aSmrg# 2758fe4c343aSmrg# Interface to module: 2759fe4c343aSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2760fe4c343aSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2761fe4c343aSmrg# 2762fe4c343aSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2763fe4c343aSmrg# 2764fe4c343aSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2765ba6a1819Smrg 2766fe4c343aSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2767fe4c343aSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2768fe4c343aSmrg [Environment variables to enable memory checking in tests]) 2769ba6a1819Smrg 2770fe4c343aSmrg# Check for different types of support on different platforms 2771fe4c343aSmrgcase $host_os in 2772fe4c343aSmrg solaris*) 2773fe4c343aSmrg AC_CHECK_LIB([umem], [umem_alloc], 2774fe4c343aSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2775fe4c343aSmrg ;; 2776fe4c343aSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2777fe4c343aSmrg # both directly and inverted, so should not be 0 or 255. 2778fe4c343aSmrg malloc_debug_env='MALLOC_PERTURB_=15' 2779fe4c343aSmrg ;; 2780fe4c343aSmrg darwin*) 2781fe4c343aSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2782fe4c343aSmrg ;; 2783fe4c343aSmrg *bsd*) 2784fe4c343aSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2785fe4c343aSmrg ;; 2786fe4c343aSmrgesac 2787ba6a1819Smrg 2788fe4c343aSmrg# User supplied flags override default flags 2789fe4c343aSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2790fe4c343aSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2791fe4c343aSmrgfi 2792ba6a1819Smrg 2793fe4c343aSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2794fe4c343aSmrg]) # XORG_WITH_LINT 2795549e21daSmrg 2796fe4c343aSmrg# XORG_CHECK_MALLOC_ZERO 2797fe4c343aSmrg# ---------------------- 2798fe4c343aSmrg# Minimum version: 1.0.0 2799fe4c343aSmrg# 2800fe4c343aSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2801fe4c343aSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 2802fe4c343aSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2803fe4c343aSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2804fe4c343aSmrgAC_ARG_ENABLE(malloc0returnsnull, 2805fe4c343aSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 2806fe4c343aSmrg [malloc(0) returns NULL (default: auto)]), 2807fe4c343aSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2808fe4c343aSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2809549e21daSmrg 2810fe4c343aSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2811fe4c343aSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2812fe4c343aSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2813fe4c343aSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2814fe4c343aSmrg#include <stdlib.h> 2815fe4c343aSmrg],[ 2816fe4c343aSmrg char *m0, *r0, *c0, *p; 2817fe4c343aSmrg m0 = malloc(0); 2818fe4c343aSmrg p = malloc(10); 2819fe4c343aSmrg r0 = realloc(p,0); 2820fe4c343aSmrg c0 = calloc(0,10); 2821fe4c343aSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2822fe4c343aSmrg])], 2823fe4c343aSmrg [xorg_cv_malloc0_returns_null=yes], 2824fe4c343aSmrg [xorg_cv_malloc0_returns_null=no])]) 2825fe4c343aSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2826fe4c343aSmrgfi 2827fe4c343aSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2828549e21daSmrg 2829fe4c343aSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2830fe4c343aSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2831fe4c343aSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2832fe4c343aSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2833fe4c343aSmrgelse 2834fe4c343aSmrg MALLOC_ZERO_CFLAGS="" 2835fe4c343aSmrg XMALLOC_ZERO_CFLAGS="" 2836fe4c343aSmrg XTMALLOC_ZERO_CFLAGS="" 2837fe4c343aSmrgfi 2838549e21daSmrg 2839fe4c343aSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2840fe4c343aSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2841fe4c343aSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2842fe4c343aSmrg]) # XORG_CHECK_MALLOC_ZERO 2843549e21daSmrg 2844fe4c343aSmrg# XORG_WITH_LINT() 2845fe4c343aSmrg# ---------------- 2846fe4c343aSmrg# Minimum version: 1.1.0 2847fe4c343aSmrg# 2848fe4c343aSmrg# This macro enables the use of a tool that flags some suspicious and 2849fe4c343aSmrg# non-portable constructs (likely to be bugs) in C language source code. 2850fe4c343aSmrg# It will attempt to locate the tool and use appropriate options. 2851fe4c343aSmrg# There are various lint type tools on different platforms. 2852fe4c343aSmrg# 2853fe4c343aSmrg# Interface to module: 2854fe4c343aSmrg# LINT: returns the path to the tool found on the platform 2855fe4c343aSmrg# or the value set to LINT on the configure cmd line 2856fe4c343aSmrg# also an Automake conditional 2857fe4c343aSmrg# LINT_FLAGS: an Automake variable with appropriate flags 2858fe4c343aSmrg# 2859fe4c343aSmrg# --with-lint: 'yes' user instructs the module to use lint 2860fe4c343aSmrg# 'no' user instructs the module not to use lint (default) 2861fe4c343aSmrg# 2862fe4c343aSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2863fe4c343aSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2864fe4c343aSmrg# 2865fe4c343aSmrgAC_DEFUN([XORG_WITH_LINT],[ 2866549e21daSmrg 2867fe4c343aSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2868fe4c343aSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2869fe4c343aSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2870fe4c343aSmrg [Use a lint-style source code checker (default: disabled)])], 2871fe4c343aSmrg [use_lint=$withval], [use_lint=no]) 2872549e21daSmrg 2873fe4c343aSmrg# Obtain platform specific info like program name and options 2874fe4c343aSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2875fe4c343aSmrgcase $host_os in 2876fe4c343aSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2877fe4c343aSmrg lint_name=splint 2878fe4c343aSmrg lint_options="-badflag" 2879fe4c343aSmrg ;; 2880fe4c343aSmrg *freebsd* | *netbsd*) 2881fe4c343aSmrg lint_name=lint 2882fe4c343aSmrg lint_options="-u -b" 2883fe4c343aSmrg ;; 2884fe4c343aSmrg *solaris*) 2885fe4c343aSmrg lint_name=lint 2886fe4c343aSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2887fe4c343aSmrg ;; 2888fe4c343aSmrgesac 2889549e21daSmrg 2890fe4c343aSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2891fe4c343aSmrgif test "x$use_lint" = x"yes" ; then 2892fe4c343aSmrg AC_PATH_PROG([LINT], [$lint_name]) 2893fe4c343aSmrg if test "x$LINT" = "x"; then 2894fe4c343aSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2895fe4c343aSmrg fi 2896fe4c343aSmrgelif test "x$use_lint" = x"no" ; then 2897fe4c343aSmrg if test "x$LINT" != "x"; then 2898fe4c343aSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2899fe4c343aSmrg fi 2900fe4c343aSmrgelse 2901fe4c343aSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2902fe4c343aSmrgfi 2903549e21daSmrg 2904fe4c343aSmrg# User supplied flags override default flags 2905fe4c343aSmrgif test "x$LINT_FLAGS" != "x"; then 2906fe4c343aSmrg lint_options=$LINT_FLAGS 2907fe4c343aSmrgfi 2908549e21daSmrg 2909fe4c343aSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2910fe4c343aSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2911549e21daSmrg 2912fe4c343aSmrg]) # XORG_WITH_LINT 2913549e21daSmrg 2914fe4c343aSmrg# XORG_LINT_LIBRARY(LIBNAME) 2915fe4c343aSmrg# -------------------------- 2916fe4c343aSmrg# Minimum version: 1.1.0 2917fe4c343aSmrg# 2918fe4c343aSmrg# Sets up flags for building lint libraries for checking programs that call 2919fe4c343aSmrg# functions in the library. 2920fe4c343aSmrg# 2921fe4c343aSmrg# Interface to module: 2922fe4c343aSmrg# LINTLIB - Automake variable with the name of lint library file to make 2923fe4c343aSmrg# MAKE_LINT_LIB - Automake conditional 2924fe4c343aSmrg# 2925fe4c343aSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2926fe4c343aSmrg# - 'no' user instructs the module not to create a lint library (default) 2927549e21daSmrg 2928fe4c343aSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2929fe4c343aSmrgAC_REQUIRE([XORG_WITH_LINT]) 2930fe4c343aSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2931fe4c343aSmrg [Create lint library (default: disabled)])], 2932fe4c343aSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2933549e21daSmrg 2934fe4c343aSmrgif test "x$make_lint_lib" = x"yes" ; then 2935fe4c343aSmrg LINTLIB=llib-l$1.ln 2936fe4c343aSmrg if test "x$LINT" = "x"; then 2937fe4c343aSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2938fe4c343aSmrg fi 2939fe4c343aSmrgelif test "x$make_lint_lib" != x"no" ; then 2940fe4c343aSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 29411bedbe3fSmrgfi 2942549e21daSmrg 2943fe4c343aSmrgAC_SUBST(LINTLIB) 2944fe4c343aSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2945549e21daSmrg 2946fe4c343aSmrg]) # XORG_LINT_LIBRARY 2947fe4c343aSmrg 2948fe4c343aSmrg# XORG_COMPILER_BRAND 29491bedbe3fSmrg# ------------------- 2950fe4c343aSmrg# Minimum version: 1.14.0 2951fe4c343aSmrg# 2952fe4c343aSmrg# Checks for various brands of compilers and sets flags as appropriate: 2953fe4c343aSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2954fe4c343aSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 2955fe4c343aSmrg# clang compiler - sets CLANGCC to "yes" 2956fe4c343aSmrg# Intel compiler - sets INTELCC to "yes" 2957fe4c343aSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2958fe4c343aSmrg# 2959fe4c343aSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 2960fe4c343aSmrgAC_LANG_CASE( 2961fe4c343aSmrg [C], [ 2962fe4c343aSmrg AC_REQUIRE([AC_PROG_CC_C99]) 2963fe4c343aSmrg ], 2964fe4c343aSmrg [C++], [ 2965fe4c343aSmrg AC_REQUIRE([AC_PROG_CXX]) 2966fe4c343aSmrg ] 2967fe4c343aSmrg) 2968fe4c343aSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2969fe4c343aSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2970fe4c343aSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2971fe4c343aSmrg]) # XORG_COMPILER_BRAND 2972549e21daSmrg 2973fe4c343aSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2974fe4c343aSmrg# --------------- 2975fe4c343aSmrg# Minimum version: 1.16.0 2976fe4c343aSmrg# 2977fe4c343aSmrg# Test if the compiler works when passed the given flag as a command line argument. 2978fe4c343aSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 2979fe4c343aSmrg# next flag in the list until there are no more options. 2980fe4c343aSmrg# 2981fe4c343aSmrg# Note that this does not guarantee that the compiler supports the flag as some 2982fe4c343aSmrg# compilers will simply ignore arguments that they do not understand, but we do 2983fe4c343aSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 2984fe4c343aSmrg# -Werror=unused-command-line-argument 2985fe4c343aSmrg# 2986fe4c343aSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 2987fe4c343aSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2988fe4c343aSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2989549e21daSmrg 2990fe4c343aSmrgAC_LANG_COMPILER_REQUIRE 2991549e21daSmrg 2992fe4c343aSmrgAC_LANG_CASE( 2993fe4c343aSmrg [C], [ 2994fe4c343aSmrg AC_REQUIRE([AC_PROG_CC_C99]) 2995fe4c343aSmrg define([PREFIX], [C]) 2996fe4c343aSmrg define([CACHE_PREFIX], [cc]) 2997fe4c343aSmrg define([COMPILER], [$CC]) 2998fe4c343aSmrg ], 2999fe4c343aSmrg [C++], [ 3000fe4c343aSmrg define([PREFIX], [CXX]) 3001fe4c343aSmrg define([CACHE_PREFIX], [cxx]) 3002fe4c343aSmrg define([COMPILER], [$CXX]) 3003fe4c343aSmrg ] 3004fe4c343aSmrg) 3005549e21daSmrg 3006fe4c343aSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3007549e21daSmrg 3008fe4c343aSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 3009fe4c343aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3010fe4c343aSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 3011fe4c343aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 3012fe4c343aSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3013fe4c343aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 3014fe4c343aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 3015fe4c343aSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 3016fe4c343aSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3017fe4c343aSmrgfi 3018549e21daSmrg 3019fe4c343aSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 3020fe4c343aSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 3021fe4c343aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3022fe4c343aSmrg fi 3023fe4c343aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3024fe4c343aSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 3025fe4c343aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 3026fe4c343aSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 3027fe4c343aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 3028fe4c343aSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 3029fe4c343aSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 3030fe4c343aSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3031fe4c343aSmrgfi 3032549e21daSmrg 3033fe4c343aSmrgfound="no" 3034fe4c343aSmrgm4_foreach([flag], m4_cdr($@), [ 3035fe4c343aSmrg if test $found = "no" ; then 3036fe4c343aSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 3037fe4c343aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 3038fe4c343aSmrg fi 3039549e21daSmrg 3040fe4c343aSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 3041fe4c343aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 3042fe4c343aSmrg fi 3043549e21daSmrg 3044fe4c343aSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3045549e21daSmrg 3046fe4c343aSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 3047fe4c343aSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 3048fe4c343aSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 3049fe4c343aSmrg AC_CACHE_VAL($cacheid, 3050fe4c343aSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 3051fe4c343aSmrg [eval $cacheid=yes], 3052fe4c343aSmrg [eval $cacheid=no])]) 30531bedbe3fSmrg 3054fe4c343aSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3055549e21daSmrg 3056fe4c343aSmrg eval supported=\$$cacheid 3057fe4c343aSmrg AC_MSG_RESULT([$supported]) 3058fe4c343aSmrg if test "$supported" = "yes" ; then 3059fe4c343aSmrg $1="$$1 ]flag[" 3060fe4c343aSmrg found="yes" 3061fe4c343aSmrg fi 3062fe4c343aSmrg fi 3063fe4c343aSmrg]) 3064fe4c343aSmrg]) # XORG_TESTSET_CFLAG 3065549e21daSmrg 3066fe4c343aSmrg# XORG_COMPILER_FLAGS 30671bedbe3fSmrg# --------------- 3068fe4c343aSmrg# Minimum version: 1.16.0 3069fe4c343aSmrg# 3070fe4c343aSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 3071fe4c343aSmrg# arguments supported by the selected compiler which do NOT alter the generated 3072fe4c343aSmrg# code. These arguments will cause the compiler to print various warnings 3073fe4c343aSmrg# during compilation AND turn a conservative set of warnings into errors. 3074fe4c343aSmrg# 3075fe4c343aSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 3076fe4c343aSmrg# future versions of util-macros as options are added to new compilers. 3077fe4c343aSmrg# 3078fe4c343aSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 3079fe4c343aSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3080549e21daSmrg 3081fe4c343aSmrgAC_ARG_ENABLE(selective-werror, 3082fe4c343aSmrg AS_HELP_STRING([--disable-selective-werror], 3083fe4c343aSmrg [Turn off selective compiler errors. (default: enabled)]), 3084fe4c343aSmrg [SELECTIVE_WERROR=$enableval], 3085fe4c343aSmrg [SELECTIVE_WERROR=yes]) 3086549e21daSmrg 3087fe4c343aSmrgAC_LANG_CASE( 3088fe4c343aSmrg [C], [ 3089fe4c343aSmrg define([PREFIX], [C]) 3090fe4c343aSmrg ], 3091fe4c343aSmrg [C++], [ 3092fe4c343aSmrg define([PREFIX], [CXX]) 3093fe4c343aSmrg ] 3094fe4c343aSmrg) 3095fe4c343aSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 3096fe4c343aSmrgif test "x$SUNCC" = "xyes"; then 3097fe4c343aSmrg [BASE_]PREFIX[FLAGS]="-v" 3098fe4c343aSmrgelse 3099fe4c343aSmrg [BASE_]PREFIX[FLAGS]="" 3100fe4c343aSmrgfi 3101549e21daSmrg 3102fe4c343aSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 3103fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 3104fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 3105fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 3106fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3107549e21daSmrg 3108fe4c343aSmrgAC_LANG_CASE( 3109fe4c343aSmrg [C], [ 3110fe4c343aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 3111fe4c343aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 3112fe4c343aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3113fe4c343aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3114fe4c343aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3115fe4c343aSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3116fe4c343aSmrg ] 3117fe4c343aSmrg) 3118549e21daSmrg 3119fe4c343aSmrg# This chunk adds additional warnings that could catch undesired effects. 3120fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 3121fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 3122fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 3123fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 3124fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 3125fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 3126fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3127549e21daSmrg 3128fe4c343aSmrg# These are currently disabled because they are noisy. They will be enabled 3129fe4c343aSmrg# in the future once the codebase is sufficiently modernized to silence 3130fe4c343aSmrg# them. For now, I don't want them to drown out the other warnings. 3131fe4c343aSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 3132fe4c343aSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 3133fe4c343aSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 31341bedbe3fSmrg 3135fe4c343aSmrg# Turn some warnings into errors, so we don't accidently get successful builds 3136fe4c343aSmrg# when there are problems that should be fixed. 3137549e21daSmrg 3138fe4c343aSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 3139fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3140fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3141fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3142fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3143fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3144fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3145fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3146fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3147fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3148fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3149fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3150fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3151fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 31521bedbe3fSmrgelse 3153fe4c343aSmrgAC_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]) 3154fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3155fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3156fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3157fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3158fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3159fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3160fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3161fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3162fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3163fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3164fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3165fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3166fe4c343aSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 31671bedbe3fSmrgfi 3168549e21daSmrg 3169fe4c343aSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3170fe4c343aSmrg]) # XORG_COMPILER_FLAGS 3171549e21daSmrg 3172fe4c343aSmrg# XORG_CWARNFLAGS 3173fe4c343aSmrg# --------------- 3174fe4c343aSmrg# Minimum version: 1.2.0 3175fe4c343aSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3176fe4c343aSmrg# 3177fe4c343aSmrg# Defines CWARNFLAGS to enable C compiler warnings. 3178fe4c343aSmrg# 3179fe4c343aSmrg# This function is deprecated because it defines -fno-strict-aliasing 3180fe4c343aSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3181fe4c343aSmrg# is needed, then it should be added explicitly in the module when 3182fe4c343aSmrg# it is updated to use BASE_CFLAGS. 3183fe4c343aSmrg# 3184fe4c343aSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3185fe4c343aSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3186fe4c343aSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3187fe4c343aSmrgAC_LANG_CASE( 3188fe4c343aSmrg [C], [ 3189fe4c343aSmrg CWARNFLAGS="$BASE_CFLAGS" 3190fe4c343aSmrg if test "x$GCC" = xyes ; then 3191fe4c343aSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3192fe4c343aSmrg fi 3193fe4c343aSmrg AC_SUBST(CWARNFLAGS) 3194fe4c343aSmrg ] 3195fe4c343aSmrg) 3196fe4c343aSmrg]) # XORG_CWARNFLAGS 3197549e21daSmrg 3198fe4c343aSmrg# XORG_STRICT_OPTION 3199fe4c343aSmrg# ----------------------- 3200fe4c343aSmrg# Minimum version: 1.3.0 3201fe4c343aSmrg# 3202fe4c343aSmrg# Add configure option to enable strict compilation flags, such as treating 3203fe4c343aSmrg# warnings as fatal errors. 3204fe4c343aSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3205fe4c343aSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3206fe4c343aSmrg# 3207fe4c343aSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3208fe4c343aSmrg# when strict compilation is unconditionally desired. 3209fe4c343aSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3210fe4c343aSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3211fe4c343aSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3212549e21daSmrg 3213fe4c343aSmrgAC_ARG_ENABLE(strict-compilation, 3214fe4c343aSmrg AS_HELP_STRING([--enable-strict-compilation], 3215fe4c343aSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3216fe4c343aSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3217549e21daSmrg 3218fe4c343aSmrgAC_LANG_CASE( 3219fe4c343aSmrg [C], [ 3220fe4c343aSmrg define([PREFIX], [C]) 3221fe4c343aSmrg ], 3222fe4c343aSmrg [C++], [ 3223fe4c343aSmrg define([PREFIX], [CXX]) 3224fe4c343aSmrg ] 3225fe4c343aSmrg) 3226549e21daSmrg 3227fe4c343aSmrg[STRICT_]PREFIX[FLAGS]="" 3228fe4c343aSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3229fe4c343aSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3230549e21daSmrg 3231fe4c343aSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3232fe4c343aSmrg# activate it with -Werror, so we add it here explicitly. 3233fe4c343aSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3234549e21daSmrg 3235fe4c343aSmrgif test "x$STRICT_COMPILE" = "xyes"; then 3236fe4c343aSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3237fe4c343aSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 32381bedbe3fSmrgfi 3239fe4c343aSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3240fe4c343aSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3241fe4c343aSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3242fe4c343aSmrg]) # XORG_STRICT_OPTION 3243549e21daSmrg 3244fe4c343aSmrg# XORG_DEFAULT_OPTIONS 3245fe4c343aSmrg# -------------------- 3246fe4c343aSmrg# Minimum version: 1.3.0 3247fe4c343aSmrg# 3248fe4c343aSmrg# Defines default options for X.Org modules. 3249fe4c343aSmrg# 3250fe4c343aSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3251fe4c343aSmrgAC_REQUIRE([AC_PROG_INSTALL]) 3252fe4c343aSmrgXORG_COMPILER_FLAGS 3253fe4c343aSmrgXORG_CWARNFLAGS 3254fe4c343aSmrgXORG_STRICT_OPTION 3255fe4c343aSmrgXORG_RELEASE_VERSION 3256fe4c343aSmrgXORG_CHANGELOG 3257fe4c343aSmrgXORG_INSTALL 3258fe4c343aSmrgXORG_MANPAGE_SECTIONS 3259fe4c343aSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3260fe4c343aSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3261fe4c343aSmrg]) # XORG_DEFAULT_OPTIONS 3262fe4c343aSmrg 3263fe4c343aSmrg# XORG_INSTALL() 3264fe4c343aSmrg# ---------------- 3265fe4c343aSmrg# Minimum version: 1.4.0 3266fe4c343aSmrg# 3267fe4c343aSmrg# Defines the variable INSTALL_CMD as the command to copy 3268fe4c343aSmrg# INSTALL from $prefix/share/util-macros. 3269fe4c343aSmrg# 3270fe4c343aSmrgAC_DEFUN([XORG_INSTALL], [ 3271fe4c343aSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3272fe4c343aSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3273fe4c343aSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3274fe4c343aSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3275fe4c343aSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 3276fe4c343aSmrgtouch \$(top_srcdir)/INSTALL; \ 3277fe4c343aSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 3278fe4c343aSmrgAC_SUBST([INSTALL_CMD]) 3279fe4c343aSmrg]) # XORG_INSTALL 3280fe4c343aSmrgdnl Copyright 2005 Red Hat, Inc 3281fe4c343aSmrgdnl 3282fe4c343aSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3283fe4c343aSmrgdnl documentation for any purpose is hereby granted without fee, provided that 3284fe4c343aSmrgdnl the above copyright notice appear in all copies and that both that 3285fe4c343aSmrgdnl copyright notice and this permission notice appear in supporting 3286fe4c343aSmrgdnl documentation. 3287fe4c343aSmrgdnl 3288fe4c343aSmrgdnl The above copyright notice and this permission notice shall be included 3289fe4c343aSmrgdnl in all copies or substantial portions of the Software. 3290fe4c343aSmrgdnl 3291fe4c343aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3292fe4c343aSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3293fe4c343aSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3294fe4c343aSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3295fe4c343aSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3296fe4c343aSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3297fe4c343aSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 3298fe4c343aSmrgdnl 3299fe4c343aSmrgdnl Except as contained in this notice, the name of the copyright holders shall 3300fe4c343aSmrgdnl not be used in advertising or otherwise to promote the sale, use or 3301fe4c343aSmrgdnl other dealings in this Software without prior written authorization 3302fe4c343aSmrgdnl from the copyright holders. 3303fe4c343aSmrgdnl 3304549e21daSmrg 3305fe4c343aSmrg# XORG_RELEASE_VERSION 3306fe4c343aSmrg# -------------------- 3307fe4c343aSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 3308549e21daSmrg 3309fe4c343aSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3310fe4c343aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3311fe4c343aSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3312fe4c343aSmrg [Major version of this package]) 3313fe4c343aSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3314fe4c343aSmrg if test "x$PVM" = "x"; then 3315fe4c343aSmrg PVM="0" 3316fe4c343aSmrg fi 3317fe4c343aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3318fe4c343aSmrg [$PVM], 3319fe4c343aSmrg [Minor version of this package]) 3320fe4c343aSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3321fe4c343aSmrg if test "x$PVP" = "x"; then 3322fe4c343aSmrg PVP="0" 3323fe4c343aSmrg fi 3324fe4c343aSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3325fe4c343aSmrg [$PVP], 3326fe4c343aSmrg [Patch version of this package]) 33271bedbe3fSmrg]) 3328549e21daSmrg 3329fe4c343aSmrg# XORG_CHANGELOG() 3330fe4c343aSmrg# ---------------- 3331fe4c343aSmrg# Minimum version: 1.2.0 3332fe4c343aSmrg# 3333fe4c343aSmrg# Defines the variable CHANGELOG_CMD as the command to generate 3334fe4c343aSmrg# ChangeLog from git. 3335fe4c343aSmrg# 3336fe4c343aSmrg# 3337fe4c343aSmrgAC_DEFUN([XORG_CHANGELOG], [ 3338fe4c343aSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 3339fe4c343aSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3340fe4c343aSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 3341fe4c343aSmrgtouch \$(top_srcdir)/ChangeLog; \ 3342fe4c343aSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 3343fe4c343aSmrgAC_SUBST([CHANGELOG_CMD]) 3344fe4c343aSmrg]) # XORG_CHANGELOG 3345549e21daSmrg 3346fe4c343aSmrgdnl 3347fe4c343aSmrgdnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3348fe4c343aSmrgdnl 3349fe4c343aSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 3350fe4c343aSmrgdnl copy of this software and associated documentation files (the "Software"), 3351fe4c343aSmrgdnl to deal in the Software without restriction, including without limitation 3352fe4c343aSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 3353fe4c343aSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 3354fe4c343aSmrgdnl Software is furnished to do so, subject to the following conditions: 3355fe4c343aSmrgdnl 3356fe4c343aSmrgdnl The above copyright notice and this permission notice (including the next 3357fe4c343aSmrgdnl paragraph) shall be included in all copies or substantial portions of the 3358fe4c343aSmrgdnl Software. 3359fe4c343aSmrgdnl 3360fe4c343aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 3361fe4c343aSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 3362fe4c343aSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 3363fe4c343aSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 3364fe4c343aSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 3365fe4c343aSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 3366fe4c343aSmrgdnl DEALINGS IN THE SOFTWARE. 3367fe4c343aSmrgdnl 3368549e21daSmrg 3369fe4c343aSmrg# XTRANS_TCP_FLAGS() 3370fe4c343aSmrg# ------------------ 3371fe4c343aSmrg# Find needed libraries for TCP sockets, and check for IPv6 support 3372fe4c343aSmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 3373fe4c343aSmrg # SVR4 hides these in libraries other than libc 3374fe4c343aSmrg AC_SEARCH_LIBS(socket, [socket]) 3375fe4c343aSmrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 3376fe4c343aSmrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 3377fe4c343aSmrg AC_CHECK_LIB([ws2_32],[main]) 3378fe4c343aSmrg fi 3379549e21daSmrg 3380fe4c343aSmrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 3381fe4c343aSmrg AC_ARG_ENABLE(ipv6, 3382fe4c343aSmrg AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 3383fe4c343aSmrg [IPV6CONN=$enableval], 3384fe4c343aSmrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 3385fe4c343aSmrg AC_MSG_CHECKING([if IPv6 support should be built]) 3386fe4c343aSmrg if test "$IPV6CONN" = "yes"; then 3387fe4c343aSmrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 3388fe4c343aSmrg fi 3389fe4c343aSmrg AC_MSG_RESULT($IPV6CONN) 3390549e21daSmrg 3391fe4c343aSmrg # 4.3BSD-Reno added a new member to struct sockaddr_in 3392fe4c343aSmrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 3393fe4c343aSmrg AC_DEFINE([BSD44SOCKETS],1, 3394fe4c343aSmrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 3395fe4c343aSmrg#include <sys/types.h> 3396fe4c343aSmrg#include <sys/socket.h> 3397fe4c343aSmrg#include <netinet/in.h> 3398fe4c343aSmrg ]) 3399549e21daSmrg 3400fe4c343aSmrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 3401fe4c343aSmrg AC_CHECK_TYPES([socklen_t], [], [], [ 3402fe4c343aSmrgAC_INCLUDES_DEFAULT 3403fe4c343aSmrg#include <sys/socket.h>]) 3404549e21daSmrg 3405fe4c343aSmrg # XPG4v2/UNIX95 added msg_control - check to see if we need to define 3406fe4c343aSmrg # _XOPEN_SOURCE to get it (such as on Solaris) 3407fe4c343aSmrg AC_CHECK_MEMBER([struct msghdr.msg_control], [], [], 3408fe4c343aSmrg [ 3409fe4c343aSmrgAC_INCLUDES_DEFAULT 3410fe4c343aSmrg#include <sys/socket.h> 3411fe4c343aSmrg ]) 3412fe4c343aSmrg # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03 3413fe4c343aSmrg if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then 3414fe4c343aSmrg unset ac_cv_member_struct_msghdr_msg_control 3415fe4c343aSmrg AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600]) 3416fe4c343aSmrg AC_CHECK_MEMBER([struct msghdr.msg_control], 3417fe4c343aSmrg [AC_DEFINE([_XOPEN_SOURCE], [600], 3418fe4c343aSmrg [Defined if needed to expose struct msghdr.msg_control]) 3419fe4c343aSmrg ], [], [ 3420fe4c343aSmrg#define _XOPEN_SOURCE 600 3421fe4c343aSmrgAC_INCLUDES_DEFAULT 3422fe4c343aSmrg#include <sys/socket.h> 3423fe4c343aSmrg ]) 3424fe4c343aSmrg fi 3425fe4c343aSmrg # If that didn't work, fall back to XPG5/UNIX98 with C89 3426fe4c343aSmrg if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then 3427fe4c343aSmrg unset ac_cv_member_struct_msghdr_msg_control 3428fe4c343aSmrg AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500]) 3429fe4c343aSmrg AC_CHECK_MEMBER([struct msghdr.msg_control], 3430fe4c343aSmrg [AC_DEFINE([_XOPEN_SOURCE], [500], 3431fe4c343aSmrg [Defined if needed to expose struct msghdr.msg_control]) 3432fe4c343aSmrg ], [], [ 3433fe4c343aSmrg#define _XOPEN_SOURCE 500 3434fe4c343aSmrgAC_INCLUDES_DEFAULT 3435fe4c343aSmrg#include <sys/socket.h> 3436fe4c343aSmrg ]) 3437fe4c343aSmrg fi 3438549e21daSmrg 3439549e21daSmrg 3440fe4c343aSmrg]) # XTRANS_TCP_FLAGS 3441549e21daSmrg 3442fe4c343aSmrg# XTRANS_CONNECTION_FLAGS() 3443fe4c343aSmrg# ------------------------- 3444fe4c343aSmrg# Standard checks for which Xtrans transports to use by the Xorg packages 3445fe4c343aSmrg# that use Xtrans functions 3446fe4c343aSmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 3447fe4c343aSmrg AC_REQUIRE([AC_CANONICAL_HOST]) 3448fe4c343aSmrg [case $host_os in 3449fe4c343aSmrg mingw*) unixdef="no" ;; 3450fe4c343aSmrg *) unixdef="yes" ;; 3451fe4c343aSmrg esac] 3452fe4c343aSmrg AC_ARG_ENABLE(unix-transport, 3453fe4c343aSmrg AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 3454fe4c343aSmrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 3455fe4c343aSmrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 3456fe4c343aSmrg if test "$UNIXCONN" = "yes"; then 3457fe4c343aSmrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 3458fe4c343aSmrg fi 3459fe4c343aSmrg AC_MSG_RESULT($UNIXCONN) 3460fe4c343aSmrg AC_ARG_ENABLE(tcp-transport, 3461fe4c343aSmrg AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 3462fe4c343aSmrg [TCPCONN=$enableval], [TCPCONN=yes]) 3463fe4c343aSmrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 3464fe4c343aSmrg AC_MSG_RESULT($TCPCONN) 3465fe4c343aSmrg if test "$TCPCONN" = "yes"; then 3466fe4c343aSmrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 3467fe4c343aSmrg XTRANS_TCP_FLAGS 3468fe4c343aSmrg fi 3469fe4c343aSmrg [case $host_os in 3470da1f2d5dSmrg solaris*) localdef="yes" ;; 3471fe4c343aSmrg *) localdef="no" ;; 3472fe4c343aSmrg esac] 3473fe4c343aSmrg AC_ARG_ENABLE(local-transport, 3474fe4c343aSmrg AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 3475fe4c343aSmrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 3476fe4c343aSmrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 3477fe4c343aSmrg AC_MSG_RESULT($LOCALCONN) 3478fe4c343aSmrg if test "$LOCALCONN" = "yes"; then 3479fe4c343aSmrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 3480fe4c343aSmrg fi 3481549e21daSmrg 3482fe4c343aSmrg # Other functions Xtrans may need 3483fe4c343aSmrg AC_CHECK_FUNCS([strcasecmp strlcpy]) 3484549e21daSmrg 3485fe4c343aSmrg]) # XTRANS_CONNECTION_FLAGS 3486549e21daSmrg 3487549e21daSmrg 3488fe4c343aSmrg# XTRANS_SECURE_RPC_FLAGS() 3489fe4c343aSmrg# ------------------------- 3490fe4c343aSmrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 3491fe4c343aSmrg# so that any necessary networking libraries are already found 3492fe4c343aSmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 3493fe4c343aSmrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 3494fe4c343aSmrg AC_ARG_ENABLE(secure-rpc, 3495fe4c343aSmrg AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 3496fe4c343aSmrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 3497549e21daSmrg 3498fe4c343aSmrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 3499fe4c343aSmrg FOUND_SECURE_RPC="no" 3500fe4c343aSmrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 3501fe4c343aSmrg [FOUND_SECURE_RPC="yes"]) 3502fe4c343aSmrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 3503fe4c343aSmrg if test "x$SECURE_RPC" = "xyes" ; then 3504fe4c343aSmrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 3505fe4c343aSmrg fi 3506fe4c343aSmrg SECURE_RPC="no" 3507fe4c343aSmrg else 3508fe4c343aSmrg dnl FreeBSD keeps getsecretkey in librpcsvc 3509fe4c343aSmrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 3510fe4c343aSmrg SECURE_RPC="yes" 3511fe4c343aSmrg fi 3512fe4c343aSmrg fi 3513fe4c343aSmrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 3514fe4c343aSmrg if test "x$SECURE_RPC" = "xyes" ; then 3515fe4c343aSmrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 3516fe4c343aSmrg fi 3517fe4c343aSmrg AC_MSG_RESULT($SECURE_RPC) 3518fe4c343aSmrg]) # XTRANS_SECURE_RPC_FLAGS 3519549e21daSmrg 3520549e21daSmrg 3521fe4c343aSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 3522fe4c343aSmrg# 3523da1f2d5dSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 3524da1f2d5dSmrg# Foundation, Inc. 3525fe4c343aSmrg# Written by Gordon Matzigkeit, 1996 3526fe4c343aSmrg# 3527fe4c343aSmrg# This file is free software; the Free Software Foundation gives 3528fe4c343aSmrg# unlimited permission to copy and/or distribute it, with or without 3529fe4c343aSmrg# modifications, as long as this notice is preserved. 3530549e21daSmrg 3531fe4c343aSmrgm4_define([_LT_COPYING], [dnl 3532fe4c343aSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 3533fe4c343aSmrg# This is free software; see the source for copying conditions. There is NO 3534fe4c343aSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3535549e21daSmrg 3536fe4c343aSmrg# GNU Libtool is free software; you can redistribute it and/or modify 3537fe4c343aSmrg# it under the terms of the GNU General Public License as published by 3538fe4c343aSmrg# the Free Software Foundation; either version 2 of of the License, or 3539fe4c343aSmrg# (at your option) any later version. 3540fe4c343aSmrg# 3541fe4c343aSmrg# As a special exception to the GNU General Public License, if you 3542fe4c343aSmrg# distribute this file as part of a program or library that is built 3543fe4c343aSmrg# using GNU Libtool, you may include this file under the same 3544fe4c343aSmrg# distribution terms that you use for the rest of that program. 3545fe4c343aSmrg# 3546fe4c343aSmrg# GNU Libtool is distributed in the hope that it will be useful, but 3547fe4c343aSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 3548fe4c343aSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3549fe4c343aSmrg# GNU General Public License for more details. 3550fe4c343aSmrg# 3551fe4c343aSmrg# You should have received a copy of the GNU General Public License 3552fe4c343aSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3553fe4c343aSmrg]) 3554549e21daSmrg 3555da1f2d5dSmrg# serial 59 LT_INIT 3556549e21daSmrg 3557549e21daSmrg 3558fe4c343aSmrg# LT_PREREQ(VERSION) 3559fe4c343aSmrg# ------------------ 3560fe4c343aSmrg# Complain and exit if this libtool version is less that VERSION. 3561fe4c343aSmrgm4_defun([LT_PREREQ], 3562fe4c343aSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 3563fe4c343aSmrg [m4_default([$3], 3564fe4c343aSmrg [m4_fatal([Libtool version $1 or higher is required], 3565fe4c343aSmrg 63)])], 3566fe4c343aSmrg [$2])]) 3567549e21daSmrg 3568549e21daSmrg 3569fe4c343aSmrg# _LT_CHECK_BUILDDIR 3570fe4c343aSmrg# ------------------ 3571fe4c343aSmrg# Complain if the absolute build directory name contains unusual characters 3572fe4c343aSmrgm4_defun([_LT_CHECK_BUILDDIR], 3573fe4c343aSmrg[case `pwd` in 3574fe4c343aSmrg *\ * | *\ *) 3575fe4c343aSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3576fe4c343aSmrgesac 3577fe4c343aSmrg]) 3578549e21daSmrg 3579549e21daSmrg 3580fe4c343aSmrg# LT_INIT([OPTIONS]) 35811bedbe3fSmrg# ------------------ 3582fe4c343aSmrgAC_DEFUN([LT_INIT], 3583fe4c343aSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 3584fe4c343aSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3585fe4c343aSmrgAC_BEFORE([$0], [LT_LANG])dnl 3586fe4c343aSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 3587fe4c343aSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 3588fe4c343aSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 3589ba6a1819Smrg 3590fe4c343aSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 3591fe4c343aSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 3592fe4c343aSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 3593fe4c343aSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 3594fe4c343aSmrgdnl unless we require an AC_DEFUNed macro: 3595fe4c343aSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 3596fe4c343aSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 3597fe4c343aSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 3598fe4c343aSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 3599fe4c343aSmrgm4_require([_LT_PROG_LTMAIN])dnl 3600ba6a1819Smrg 3601fe4c343aSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3602549e21daSmrg 3603fe4c343aSmrgdnl Parse OPTIONS 3604fe4c343aSmrg_LT_SET_OPTIONS([$0], [$1]) 36051bedbe3fSmrg 3606fe4c343aSmrg# This can be used to rebuild libtool when needed 3607fe4c343aSmrgLIBTOOL_DEPS=$ltmain 3608ba6a1819Smrg 3609fe4c343aSmrg# Always use our own libtool. 3610fe4c343aSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 3611fe4c343aSmrgAC_SUBST(LIBTOOL)dnl 3612ba6a1819Smrg 3613fe4c343aSmrg_LT_SETUP 3614ba6a1819Smrg 3615fe4c343aSmrg# Only expand once: 3616fe4c343aSmrgm4_define([LT_INIT]) 3617fe4c343aSmrg])# LT_INIT 3618ba6a1819Smrg 3619fe4c343aSmrg# Old names: 3620fe4c343aSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 3621fe4c343aSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 3622fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 3623fe4c343aSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 3624fe4c343aSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3625ba6a1819Smrg 3626ba6a1819Smrg 3627fe4c343aSmrg# _LT_PREPARE_CC_BASENAME 3628fe4c343aSmrg# ----------------------- 3629fe4c343aSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 3630fe4c343aSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3631fe4c343aSmrgfunc_cc_basename () 3632fe4c343aSmrg{ 3633fe4c343aSmrg for cc_temp in @S|@*""; do 3634fe4c343aSmrg case $cc_temp in 3635fe4c343aSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3636fe4c343aSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3637fe4c343aSmrg \-*) ;; 3638fe4c343aSmrg *) break;; 3639fe4c343aSmrg esac 3640fe4c343aSmrg done 3641fe4c343aSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3642fe4c343aSmrg} 3643fe4c343aSmrg])# _LT_PREPARE_CC_BASENAME 3644549e21daSmrg 36451bedbe3fSmrg 3646fe4c343aSmrg# _LT_CC_BASENAME(CC) 3647fe4c343aSmrg# ------------------- 3648fe4c343aSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 3649fe4c343aSmrg# but that macro is also expanded into generated libtool script, which 3650fe4c343aSmrg# arranges for $SED and $ECHO to be set by different means. 3651fe4c343aSmrgm4_defun([_LT_CC_BASENAME], 3652fe4c343aSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 3653fe4c343aSmrgAC_REQUIRE([_LT_DECL_SED])dnl 3654fe4c343aSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3655fe4c343aSmrgfunc_cc_basename $1 3656fe4c343aSmrgcc_basename=$func_cc_basename_result 3657fe4c343aSmrg]) 36581bedbe3fSmrg 3659ba6a1819Smrg 3660fe4c343aSmrg# _LT_FILEUTILS_DEFAULTS 3661fe4c343aSmrg# ---------------------- 3662fe4c343aSmrg# It is okay to use these file commands and assume they have been set 3663fe4c343aSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 3664fe4c343aSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 3665fe4c343aSmrg[: ${CP="cp -f"} 3666fe4c343aSmrg: ${MV="mv -f"} 3667fe4c343aSmrg: ${RM="rm -f"} 3668fe4c343aSmrg])# _LT_FILEUTILS_DEFAULTS 3669ba6a1819Smrg 3670ba6a1819Smrg 3671fe4c343aSmrg# _LT_SETUP 3672fe4c343aSmrg# --------- 3673fe4c343aSmrgm4_defun([_LT_SETUP], 3674fe4c343aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3675fe4c343aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3676fe4c343aSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3677fe4c343aSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3678fe4c343aSmrg 3679fe4c343aSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 3680fe4c343aSmrgdnl 3681fe4c343aSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 3682fe4c343aSmrg_LT_DECL([], [host], [0])dnl 3683fe4c343aSmrg_LT_DECL([], [host_os], [0])dnl 3684fe4c343aSmrgdnl 3685fe4c343aSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 3686fe4c343aSmrg_LT_DECL([], [build], [0])dnl 3687fe4c343aSmrg_LT_DECL([], [build_os], [0])dnl 3688fe4c343aSmrgdnl 3689fe4c343aSmrgAC_REQUIRE([AC_PROG_CC])dnl 3690fe4c343aSmrgAC_REQUIRE([LT_PATH_LD])dnl 3691fe4c343aSmrgAC_REQUIRE([LT_PATH_NM])dnl 3692fe4c343aSmrgdnl 3693fe4c343aSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 3694fe4c343aSmrgtest -z "$LN_S" && LN_S="ln -s" 3695fe4c343aSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3696fe4c343aSmrgdnl 3697fe4c343aSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 3698fe4c343aSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3699fe4c343aSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3700fe4c343aSmrgdnl 37011bedbe3fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3702fe4c343aSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3703fe4c343aSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 3704fe4c343aSmrgm4_require([_LT_CMD_RELOAD])dnl 3705da1f2d5dSmrgm4_require([_LT_DECL_FILECMD])dnl 3706fe4c343aSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 3707fe4c343aSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 3708fe4c343aSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 3709fe4c343aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3710fe4c343aSmrgm4_require([_LT_WITH_SYSROOT])dnl 3711fe4c343aSmrgm4_require([_LT_CMD_TRUNCATE])dnl 3712ba6a1819Smrg 3713fe4c343aSmrg_LT_CONFIG_LIBTOOL_INIT([ 3714fe4c343aSmrg# See if we are running on zsh, and set the options that allow our 3715fe4c343aSmrg# commands through without removal of \ escapes INIT. 3716fe4c343aSmrgif test -n "\${ZSH_VERSION+set}"; then 3717fe4c343aSmrg setopt NO_GLOB_SUBST 3718fe4c343aSmrgfi 37191bedbe3fSmrg]) 3720fe4c343aSmrgif test -n "${ZSH_VERSION+set}"; then 3721fe4c343aSmrg setopt NO_GLOB_SUBST 3722fe4c343aSmrgfi 3723ba6a1819Smrg 3724fe4c343aSmrg_LT_CHECK_OBJDIR 3725ba6a1819Smrg 3726fe4c343aSmrgm4_require([_LT_TAG_COMPILER])dnl 3727ba6a1819Smrg 3728fe4c343aSmrgcase $host_os in 3729fe4c343aSmrgaix3*) 3730fe4c343aSmrg # AIX sometimes has problems with the GCC collect2 program. For some 3731fe4c343aSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 3732fe4c343aSmrg # vanish in a puff of smoke. 3733fe4c343aSmrg if test set != "${COLLECT_NAMES+set}"; then 3734fe4c343aSmrg COLLECT_NAMES= 3735fe4c343aSmrg export COLLECT_NAMES 3736ba6a1819Smrg fi 3737fe4c343aSmrg ;; 3738fe4c343aSmrgesac 3739ba6a1819Smrg 3740fe4c343aSmrg# Global variables: 3741fe4c343aSmrgofile=libtool 3742fe4c343aSmrgcan_build_shared=yes 3743ba6a1819Smrg 3744da1f2d5dSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 3745da1f2d5dSmrg# ICC, which need '.lib'). 3746fe4c343aSmrglibext=a 3747549e21daSmrg 3748fe4c343aSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3749549e21daSmrg 3750fe4c343aSmrgold_CC=$CC 3751fe4c343aSmrgold_CFLAGS=$CFLAGS 3752549e21daSmrg 3753fe4c343aSmrg# Set sane defaults for various variables 3754fe4c343aSmrgtest -z "$CC" && CC=cc 3755fe4c343aSmrgtest -z "$LTCC" && LTCC=$CC 3756fe4c343aSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3757fe4c343aSmrgtest -z "$LD" && LD=ld 3758fe4c343aSmrgtest -z "$ac_objext" && ac_objext=o 3759fe4c343aSmrg 3760fe4c343aSmrg_LT_CC_BASENAME([$compiler]) 3761fe4c343aSmrg 3762fe4c343aSmrg# Only perform the check for file, if the check method requires it 3763fe4c343aSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 3764fe4c343aSmrgcase $deplibs_check_method in 3765fe4c343aSmrgfile_magic*) 3766fe4c343aSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3767fe4c343aSmrg _LT_PATH_MAGIC 37681bedbe3fSmrg fi 3769fe4c343aSmrg ;; 3770fe4c343aSmrgesac 3771549e21daSmrg 3772fe4c343aSmrg# Use C for the default configuration in the libtool script 3773fe4c343aSmrgLT_SUPPORTED_TAG([CC]) 3774fe4c343aSmrg_LT_LANG_C_CONFIG 3775fe4c343aSmrg_LT_LANG_DEFAULT_CONFIG 3776fe4c343aSmrg_LT_CONFIG_COMMANDS 3777fe4c343aSmrg])# _LT_SETUP 3778549e21daSmrg 3779549e21daSmrg 3780fe4c343aSmrg# _LT_PREPARE_SED_QUOTE_VARS 3781fe4c343aSmrg# -------------------------- 3782fe4c343aSmrg# Define a few sed substitution that help us do robust quoting. 3783fe4c343aSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3784fe4c343aSmrg[# Backslashify metacharacters that are still active within 3785fe4c343aSmrg# double-quoted strings. 3786fe4c343aSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3787ba6a1819Smrg 3788fe4c343aSmrg# Same as above, but do not quote variable references. 3789fe4c343aSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 3790ba6a1819Smrg 3791fe4c343aSmrg# Sed substitution to delay expansion of an escaped shell variable in a 3792fe4c343aSmrg# double_quote_subst'ed string. 3793fe4c343aSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3794549e21daSmrg 3795fe4c343aSmrg# Sed substitution to delay expansion of an escaped single quote. 3796fe4c343aSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3797ba6a1819Smrg 3798fe4c343aSmrg# Sed substitution to avoid accidental globbing in evaled expressions 3799fe4c343aSmrgno_glob_subst='s/\*/\\\*/g' 3800fe4c343aSmrg]) 3801ba6a1819Smrg 3802fe4c343aSmrg# _LT_PROG_LTMAIN 3803fe4c343aSmrg# --------------- 3804fe4c343aSmrg# Note that this code is called both from 'configure', and 'config.status' 3805fe4c343aSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3806fe4c343aSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3807fe4c343aSmrg# so we pass a copy along to make sure it has a sensible value anyway. 3808fe4c343aSmrgm4_defun([_LT_PROG_LTMAIN], 3809fe4c343aSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3810fe4c343aSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3811fe4c343aSmrgltmain=$ac_aux_dir/ltmain.sh 3812fe4c343aSmrg])# _LT_PROG_LTMAIN 3813ba6a1819Smrg 3814549e21daSmrg 3815ba6a1819Smrg 3816fe4c343aSmrg# So that we can recreate a full libtool script including additional 3817fe4c343aSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3818fe4c343aSmrg# in macros and then make a single call at the end using the 'libtool' 3819fe4c343aSmrg# label. 3820ba6a1819Smrg 3821ba6a1819Smrg 3822fe4c343aSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3823fe4c343aSmrg# ---------------------------------------- 3824fe4c343aSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3825fe4c343aSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3826fe4c343aSmrg[m4_ifval([$1], 3827fe4c343aSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3828fe4c343aSmrg [$1 3829fe4c343aSmrg])])]) 3830ba6a1819Smrg 3831fe4c343aSmrg# Initialize. 3832fe4c343aSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3833549e21daSmrg 38341bedbe3fSmrg 3835fe4c343aSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3836fe4c343aSmrg# ------------------------------ 3837fe4c343aSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3838fe4c343aSmrgm4_define([_LT_CONFIG_LIBTOOL], 3839fe4c343aSmrg[m4_ifval([$1], 3840fe4c343aSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3841fe4c343aSmrg [$1 3842fe4c343aSmrg])])]) 3843ba6a1819Smrg 3844fe4c343aSmrg# Initialize. 3845fe4c343aSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3846ba6a1819Smrg 3847ba6a1819Smrg 3848fe4c343aSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3849fe4c343aSmrg# ----------------------------------------------------- 3850fe4c343aSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3851fe4c343aSmrg[_LT_CONFIG_LIBTOOL([$1]) 3852fe4c343aSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3853fe4c343aSmrg]) 3854ba6a1819Smrg 3855ba6a1819Smrg 3856fe4c343aSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3857fe4c343aSmrg# ----------------------------- 3858fe4c343aSmrg# Add leading comment marks to the start of each line, and a trailing 3859fe4c343aSmrg# full-stop to the whole comment if one is not present already. 3860fe4c343aSmrgm4_define([_LT_FORMAT_COMMENT], 3861fe4c343aSmrg[m4_ifval([$1], [ 3862fe4c343aSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3863fe4c343aSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3864fe4c343aSmrg)]) 38651bedbe3fSmrg 38661bedbe3fSmrg 38671bedbe3fSmrg 3868ba6a1819Smrg 3869ba6a1819Smrg 3870fe4c343aSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3871fe4c343aSmrg# ------------------------------------------------------------------- 3872fe4c343aSmrg# CONFIGNAME is the name given to the value in the libtool script. 3873fe4c343aSmrg# VARNAME is the (base) name used in the configure script. 3874fe4c343aSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3875fe4c343aSmrg# VARNAME. Any other value will be used directly. 3876fe4c343aSmrgm4_define([_LT_DECL], 3877fe4c343aSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3878fe4c343aSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3879fe4c343aSmrg [m4_ifval([$1], [$1], [$2])]) 3880fe4c343aSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3881fe4c343aSmrg m4_ifval([$4], 3882fe4c343aSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3883fe4c343aSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3884fe4c343aSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3885fe4c343aSmrg]) 3886ba6a1819Smrg 3887ba6a1819Smrg 3888fe4c343aSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3889fe4c343aSmrg# -------------------------------------------------------- 3890fe4c343aSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3891ba6a1819Smrg 3892ba6a1819Smrg 3893fe4c343aSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3894fe4c343aSmrg# ------------------------------------------------ 3895fe4c343aSmrgm4_define([lt_decl_tag_varnames], 3896fe4c343aSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3897ba6a1819Smrg 3898ba6a1819Smrg 3899fe4c343aSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3900fe4c343aSmrg# --------------------------------------------------------- 3901fe4c343aSmrgm4_define([_lt_decl_filter], 3902fe4c343aSmrg[m4_case([$#], 3903fe4c343aSmrg [0], [m4_fatal([$0: too few arguments: $#])], 3904fe4c343aSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3905fe4c343aSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3906fe4c343aSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3907fe4c343aSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3908fe4c343aSmrg]) 3909549e21daSmrg 3910ba6a1819Smrg 3911fe4c343aSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3912fe4c343aSmrg# -------------------------------------------------- 3913fe4c343aSmrgm4_define([lt_decl_quote_varnames], 3914fe4c343aSmrg[_lt_decl_filter([value], [1], $@)]) 3915ba6a1819Smrg 3916ba6a1819Smrg 3917fe4c343aSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3918fe4c343aSmrg# --------------------------------------------------- 3919fe4c343aSmrgm4_define([lt_decl_dquote_varnames], 3920fe4c343aSmrg[_lt_decl_filter([value], [2], $@)]) 3921ba6a1819Smrg 3922ba6a1819Smrg 3923fe4c343aSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3924fe4c343aSmrg# --------------------------------------------------- 3925fe4c343aSmrgm4_define([lt_decl_varnames_tagged], 3926fe4c343aSmrg[m4_assert([$# <= 2])dnl 3927fe4c343aSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 3928fe4c343aSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3929fe4c343aSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3930fe4c343aSmrgm4_define([_lt_decl_varnames_tagged], 3931fe4c343aSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3932ba6a1819Smrg 3933ba6a1819Smrg 3934fe4c343aSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3935fe4c343aSmrg# ------------------------------------------------ 3936fe4c343aSmrgm4_define([lt_decl_all_varnames], 3937fe4c343aSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3938fe4c343aSmrg m4_if([$2], [], 3939fe4c343aSmrg m4_quote(lt_decl_varnames), 3940fe4c343aSmrg m4_quote(m4_shift($@))))[]dnl 3941fe4c343aSmrg]) 3942fe4c343aSmrgm4_define([_lt_decl_all_varnames], 3943fe4c343aSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 3944fe4c343aSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3945fe4c343aSmrg]) 3946ba6a1819Smrg 3947ba6a1819Smrg 3948fe4c343aSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3949fe4c343aSmrg# ------------------------------------ 3950fe4c343aSmrg# Quote a variable value, and forward it to 'config.status' so that its 3951fe4c343aSmrg# declaration there will have the same value as in 'configure'. VARNAME 3952fe4c343aSmrg# must have a single quote delimited value for this to work. 3953fe4c343aSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3954fe4c343aSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3955ba6a1819Smrg 3956ba6a1819Smrg 3957fe4c343aSmrg# _LT_CONFIG_STATUS_DECLARATIONS 3958fe4c343aSmrg# ------------------------------ 3959fe4c343aSmrg# We delimit libtool config variables with single quotes, so when 3960fe4c343aSmrg# we write them to config.status, we have to be sure to quote all 3961fe4c343aSmrg# embedded single quotes properly. In configure, this macro expands 3962fe4c343aSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3963fe4c343aSmrg# 3964fe4c343aSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3965fe4c343aSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3966fe4c343aSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3967fe4c343aSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3968ba6a1819Smrg 39691bedbe3fSmrg 3970fe4c343aSmrg# _LT_LIBTOOL_TAGS 3971fe4c343aSmrg# ---------------- 3972fe4c343aSmrg# Output comment and list of tags supported by the script 3973fe4c343aSmrgm4_defun([_LT_LIBTOOL_TAGS], 3974fe4c343aSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3975fe4c343aSmrgavailable_tags='_LT_TAGS'dnl 3976fe4c343aSmrg]) 39771bedbe3fSmrg 39781bedbe3fSmrg 3979fe4c343aSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3980fe4c343aSmrg# ----------------------------------- 3981fe4c343aSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3982fe4c343aSmrg# expand to a commented shell variable setting: 3983fe4c343aSmrg# 3984fe4c343aSmrg# # Some comment about what VAR is for. 3985fe4c343aSmrg# visible_name=$lt_internal_name 3986fe4c343aSmrgm4_define([_LT_LIBTOOL_DECLARE], 3987fe4c343aSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3988fe4c343aSmrg [description])))[]dnl 3989fe4c343aSmrgm4_pushdef([_libtool_name], 3990fe4c343aSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3991fe4c343aSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3992fe4c343aSmrg [0], [_libtool_name=[$]$1], 3993fe4c343aSmrg [1], [_libtool_name=$lt_[]$1], 3994fe4c343aSmrg [2], [_libtool_name=$lt_[]$1], 3995fe4c343aSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3996fe4c343aSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3997fe4c343aSmrg]) 39981bedbe3fSmrg 39991bedbe3fSmrg 4000fe4c343aSmrg# _LT_LIBTOOL_CONFIG_VARS 4001fe4c343aSmrg# ----------------------- 4002fe4c343aSmrg# Produce commented declarations of non-tagged libtool config variables 4003fe4c343aSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 4004fe4c343aSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4005fe4c343aSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4006fe4c343aSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4007fe4c343aSmrg[m4_foreach([_lt_var], 4008fe4c343aSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4009fe4c343aSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 40101bedbe3fSmrg 40111bedbe3fSmrg 4012fe4c343aSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 4013fe4c343aSmrg# ------------------------- 4014fe4c343aSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 4015fe4c343aSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 4016fe4c343aSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 4017ba6a1819Smrg 4018ba6a1819Smrg 4019fe4c343aSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 4020fe4c343aSmrg# ------------------------------ 4021fe4c343aSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 40221bedbe3fSmrg 40231bedbe3fSmrg 4024fe4c343aSmrg# _LT_CONFIG_COMMANDS 4025fe4c343aSmrg# ------------------- 4026fe4c343aSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 4027fe4c343aSmrg# variables for single and double quote escaping we saved from calls 4028fe4c343aSmrg# to _LT_DECL, we can put quote escaped variables declarations 4029fe4c343aSmrg# into 'config.status', and then the shell code to quote escape them in 4030fe4c343aSmrg# for loops in 'config.status'. Finally, any additional code accumulated 4031fe4c343aSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 4032fe4c343aSmrgm4_defun([_LT_CONFIG_COMMANDS], 4033fe4c343aSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 4034fe4c343aSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 4035fe4c343aSmrg dnl instead of duplicating it all over again into config.status, 4036fe4c343aSmrg dnl then we will have config.status run $CONFIG_LT later, so it 4037fe4c343aSmrg dnl needs to know what name is stored there: 4038fe4c343aSmrg [AC_CONFIG_COMMANDS([libtool], 4039fe4c343aSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 4040fe4c343aSmrg dnl If the libtool generation code is destined for config.status, 4041fe4c343aSmrg dnl expand the accumulated commands and init code now: 4042fe4c343aSmrg [AC_CONFIG_COMMANDS([libtool], 4043fe4c343aSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 4044fe4c343aSmrg])#_LT_CONFIG_COMMANDS 40451bedbe3fSmrg 40461bedbe3fSmrg 4047fe4c343aSmrg# Initialize. 4048fe4c343aSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 4049fe4c343aSmrg[ 40501bedbe3fSmrg 4051fe4c343aSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4052fe4c343aSmrg# if CDPATH is set. 4053fe4c343aSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4054ba6a1819Smrg 4055fe4c343aSmrgsed_quote_subst='$sed_quote_subst' 4056fe4c343aSmrgdouble_quote_subst='$double_quote_subst' 4057fe4c343aSmrgdelay_variable_subst='$delay_variable_subst' 4058fe4c343aSmrg_LT_CONFIG_STATUS_DECLARATIONS 4059fe4c343aSmrgLTCC='$LTCC' 4060fe4c343aSmrgLTCFLAGS='$LTCFLAGS' 4061fe4c343aSmrgcompiler='$compiler_DEFAULT' 4062ba6a1819Smrg 4063fe4c343aSmrg# A function that is used when there is no print builtin or printf. 4064fe4c343aSmrgfunc_fallback_echo () 4065fe4c343aSmrg{ 4066fe4c343aSmrg eval 'cat <<_LTECHO_EOF 4067fe4c343aSmrg\$[]1 4068fe4c343aSmrg_LTECHO_EOF' 4069fe4c343aSmrg} 4070ba6a1819Smrg 4071fe4c343aSmrg# Quote evaled strings. 4072fe4c343aSmrgfor var in lt_decl_all_varnames([[ \ 4073fe4c343aSmrg]], lt_decl_quote_varnames); do 4074fe4c343aSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4075fe4c343aSmrg *[[\\\\\\\`\\"\\\$]]*) 4076fe4c343aSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4077fe4c343aSmrg ;; 4078fe4c343aSmrg *) 4079fe4c343aSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4080fe4c343aSmrg ;; 4081fe4c343aSmrg esac 4082fe4c343aSmrgdone 4083ba6a1819Smrg 4084fe4c343aSmrg# Double-quote double-evaled strings. 4085fe4c343aSmrgfor var in lt_decl_all_varnames([[ \ 4086fe4c343aSmrg]], lt_decl_dquote_varnames); do 4087fe4c343aSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4088fe4c343aSmrg *[[\\\\\\\`\\"\\\$]]*) 4089fe4c343aSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4090fe4c343aSmrg ;; 4091fe4c343aSmrg *) 4092fe4c343aSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4093fe4c343aSmrg ;; 4094fe4c343aSmrg esac 4095fe4c343aSmrgdone 40961bedbe3fSmrg 4097fe4c343aSmrg_LT_OUTPUT_LIBTOOL_INIT 4098fe4c343aSmrg]) 40991bedbe3fSmrg 4100fe4c343aSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 4101fe4c343aSmrg# ------------------------------------ 4102fe4c343aSmrg# Generate a child script FILE with all initialization necessary to 4103fe4c343aSmrg# reuse the environment learned by the parent script, and make the 4104fe4c343aSmrg# file executable. If COMMENT is supplied, it is inserted after the 4105fe4c343aSmrg# '#!' sequence but before initialization text begins. After this 4106fe4c343aSmrg# macro, additional text can be appended to FILE to form the body of 4107fe4c343aSmrg# the child script. The macro ends with non-zero status if the 4108fe4c343aSmrg# file could not be fully written (such as if the disk is full). 4109fe4c343aSmrgm4_ifdef([AS_INIT_GENERATED], 4110fe4c343aSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 4111fe4c343aSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 4112fe4c343aSmrg[m4_require([AS_PREPARE])]dnl 4113fe4c343aSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 4114fe4c343aSmrg[lt_write_fail=0 4115fe4c343aSmrgcat >$1 <<_ASEOF || lt_write_fail=1 4116fe4c343aSmrg#! $SHELL 4117fe4c343aSmrg# Generated by $as_me. 4118fe4c343aSmrg$2 4119fe4c343aSmrgSHELL=\${CONFIG_SHELL-$SHELL} 4120fe4c343aSmrgexport SHELL 4121fe4c343aSmrg_ASEOF 4122fe4c343aSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 4123fe4c343aSmrgAS_SHELL_SANITIZE 4124fe4c343aSmrg_AS_PREPARE 4125fe4c343aSmrgexec AS_MESSAGE_FD>&1 4126fe4c343aSmrg_ASEOF 4127fe4c343aSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 4128fe4c343aSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 41291bedbe3fSmrg 4130fe4c343aSmrg# LT_OUTPUT 4131fe4c343aSmrg# --------- 4132fe4c343aSmrg# This macro allows early generation of the libtool script (before 4133fe4c343aSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 4134fe4c343aSmrg# tests. 4135fe4c343aSmrgAC_DEFUN([LT_OUTPUT], 4136fe4c343aSmrg[: ${CONFIG_LT=./config.lt} 4137fe4c343aSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 4138fe4c343aSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4139fe4c343aSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 4140ba6a1819Smrg 4141fe4c343aSmrgcat >>"$CONFIG_LT" <<\_LTEOF 4142fe4c343aSmrglt_cl_silent=false 4143fe4c343aSmrgexec AS_MESSAGE_LOG_FD>>config.log 4144fe4c343aSmrg{ 4145fe4c343aSmrg echo 4146fe4c343aSmrg AS_BOX([Running $as_me.]) 4147fe4c343aSmrg} >&AS_MESSAGE_LOG_FD 4148ba6a1819Smrg 4149fe4c343aSmrglt_cl_help="\ 4150fe4c343aSmrg'$as_me' creates a local libtool stub from the current configuration, 4151fe4c343aSmrgfor use in further configure time tests before the real libtool is 4152fe4c343aSmrggenerated. 4153ba6a1819Smrg 4154fe4c343aSmrgUsage: $[0] [[OPTIONS]] 4155ba6a1819Smrg 4156fe4c343aSmrg -h, --help print this help, then exit 4157fe4c343aSmrg -V, --version print version number, then exit 4158fe4c343aSmrg -q, --quiet do not print progress messages 4159fe4c343aSmrg -d, --debug don't remove temporary files 4160ba6a1819Smrg 4161fe4c343aSmrgReport bugs to <bug-libtool@gnu.org>." 4162ba6a1819Smrg 4163fe4c343aSmrglt_cl_version="\ 4164fe4c343aSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4165fe4c343aSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4166fe4c343aSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 4167ba6a1819Smrg 4168fe4c343aSmrgCopyright (C) 2011 Free Software Foundation, Inc. 4169fe4c343aSmrgThis config.lt script is free software; the Free Software Foundation 4170fe4c343aSmrggives unlimited permision to copy, distribute and modify it." 4171ba6a1819Smrg 4172fe4c343aSmrgwhile test 0 != $[#] 4173fe4c343aSmrgdo 4174fe4c343aSmrg case $[1] in 4175fe4c343aSmrg --version | --v* | -V ) 4176fe4c343aSmrg echo "$lt_cl_version"; exit 0 ;; 4177fe4c343aSmrg --help | --h* | -h ) 4178fe4c343aSmrg echo "$lt_cl_help"; exit 0 ;; 4179fe4c343aSmrg --debug | --d* | -d ) 4180fe4c343aSmrg debug=: ;; 4181fe4c343aSmrg --quiet | --q* | --silent | --s* | -q ) 4182fe4c343aSmrg lt_cl_silent=: ;; 4183ba6a1819Smrg 4184fe4c343aSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4185fe4c343aSmrgTry '$[0] --help' for more information.]) ;; 4186549e21daSmrg 4187fe4c343aSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4188fe4c343aSmrgTry '$[0] --help' for more information.]) ;; 4189ba6a1819Smrg esac 4190fe4c343aSmrg shift 4191fe4c343aSmrgdone 4192ba6a1819Smrg 4193fe4c343aSmrgif $lt_cl_silent; then 4194fe4c343aSmrg exec AS_MESSAGE_FD>/dev/null 4195fe4c343aSmrgfi 4196fe4c343aSmrg_LTEOF 4197ba6a1819Smrg 4198fe4c343aSmrgcat >>"$CONFIG_LT" <<_LTEOF 4199fe4c343aSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4200fe4c343aSmrg_LTEOF 4201ba6a1819Smrg 4202fe4c343aSmrgcat >>"$CONFIG_LT" <<\_LTEOF 4203fe4c343aSmrgAC_MSG_NOTICE([creating $ofile]) 4204fe4c343aSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 4205fe4c343aSmrgAS_EXIT(0) 4206fe4c343aSmrg_LTEOF 4207fe4c343aSmrgchmod +x "$CONFIG_LT" 4208ba6a1819Smrg 4209fe4c343aSmrg# configure is writing to config.log, but config.lt does its own redirection, 4210fe4c343aSmrg# appending to config.log, which fails on DOS, as config.log is still kept 4211fe4c343aSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4212fe4c343aSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4213fe4c343aSmrglt_cl_success=: 4214fe4c343aSmrgtest yes = "$silent" && 4215fe4c343aSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 4216fe4c343aSmrgexec AS_MESSAGE_LOG_FD>/dev/null 4217fe4c343aSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4218fe4c343aSmrgexec AS_MESSAGE_LOG_FD>>config.log 4219fe4c343aSmrg$lt_cl_success || AS_EXIT(1) 4220fe4c343aSmrg])# LT_OUTPUT 4221549e21daSmrg 4222ba6a1819Smrg 4223fe4c343aSmrg# _LT_CONFIG(TAG) 4224fe4c343aSmrg# --------------- 4225fe4c343aSmrg# If TAG is the built-in tag, create an initial libtool script with a 4226fe4c343aSmrg# default configuration from the untagged config vars. Otherwise add code 4227fe4c343aSmrg# to config.status for appending the configuration named by TAG from the 4228fe4c343aSmrg# matching tagged config vars. 4229fe4c343aSmrgm4_defun([_LT_CONFIG], 4230fe4c343aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4231fe4c343aSmrg_LT_CONFIG_SAVE_COMMANDS([ 4232fe4c343aSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4233fe4c343aSmrg m4_if(_LT_TAG, [C], [ 4234fe4c343aSmrg # See if we are running on zsh, and set the options that allow our 4235fe4c343aSmrg # commands through without removal of \ escapes. 4236fe4c343aSmrg if test -n "${ZSH_VERSION+set}"; then 4237fe4c343aSmrg setopt NO_GLOB_SUBST 4238fe4c343aSmrg fi 4239ba6a1819Smrg 4240fe4c343aSmrg cfgfile=${ofile}T 4241fe4c343aSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4242fe4c343aSmrg $RM "$cfgfile" 4243ba6a1819Smrg 4244fe4c343aSmrg cat <<_LT_EOF >> "$cfgfile" 4245fe4c343aSmrg#! $SHELL 4246fe4c343aSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4247fe4c343aSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4248fe4c343aSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4249ba6a1819Smrg 4250fe4c343aSmrg# Provide generalized library-building support services. 4251fe4c343aSmrg# Written by Gordon Matzigkeit, 1996 4252549e21daSmrg 4253fe4c343aSmrg_LT_COPYING 4254fe4c343aSmrg_LT_LIBTOOL_TAGS 4255ba6a1819Smrg 4256fe4c343aSmrg# Configured defaults for sys_lib_dlsearch_path munging. 4257fe4c343aSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4258ba6a1819Smrg 4259fe4c343aSmrg# ### BEGIN LIBTOOL CONFIG 4260fe4c343aSmrg_LT_LIBTOOL_CONFIG_VARS 4261fe4c343aSmrg_LT_LIBTOOL_TAG_VARS 4262fe4c343aSmrg# ### END LIBTOOL CONFIG 4263ba6a1819Smrg 4264fe4c343aSmrg_LT_EOF 4265fe4c343aSmrg 4266fe4c343aSmrg cat <<'_LT_EOF' >> "$cfgfile" 4267fe4c343aSmrg 4268fe4c343aSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4269fe4c343aSmrg 4270fe4c343aSmrg_LT_PREPARE_MUNGE_PATH_LIST 4271fe4c343aSmrg_LT_PREPARE_CC_BASENAME 4272fe4c343aSmrg 4273fe4c343aSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 4274fe4c343aSmrg 4275fe4c343aSmrg_LT_EOF 4276ba6a1819Smrg 42771bedbe3fSmrg case $host_os in 4278fe4c343aSmrg aix3*) 4279fe4c343aSmrg cat <<\_LT_EOF >> "$cfgfile" 4280fe4c343aSmrg# AIX sometimes has problems with the GCC collect2 program. For some 4281fe4c343aSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4282fe4c343aSmrg# vanish in a puff of smoke. 4283fe4c343aSmrgif test set != "${COLLECT_NAMES+set}"; then 4284fe4c343aSmrg COLLECT_NAMES= 4285fe4c343aSmrg export COLLECT_NAMES 4286fe4c343aSmrgfi 4287fe4c343aSmrg_LT_EOF 42881bedbe3fSmrg ;; 42891bedbe3fSmrg esac 4290ba6a1819Smrg 4291fe4c343aSmrg _LT_PROG_LTMAIN 4292ba6a1819Smrg 4293fe4c343aSmrg # We use sed instead of cat because bash on DJGPP gets confused if 4294fe4c343aSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4295fe4c343aSmrg # text mode, it properly converts lines to CR/LF. This bash problem 4296fe4c343aSmrg # is reportedly fixed, but why not run on old versions too? 4297da1f2d5dSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4298fe4c343aSmrg || (rm -f "$cfgfile"; exit 1) 4299ba6a1819Smrg 4300fe4c343aSmrg mv -f "$cfgfile" "$ofile" || 4301fe4c343aSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4302fe4c343aSmrg chmod +x "$ofile" 4303fe4c343aSmrg], 4304fe4c343aSmrg[cat <<_LT_EOF >> "$ofile" 4305ba6a1819Smrg 4306fe4c343aSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4307fe4c343aSmrgdnl in a comment (ie after a #). 4308fe4c343aSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4309fe4c343aSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4310fe4c343aSmrg# ### END LIBTOOL TAG CONFIG: $1 4311fe4c343aSmrg_LT_EOF 4312fe4c343aSmrg])dnl /m4_if 4313fe4c343aSmrg], 4314fe4c343aSmrg[m4_if([$1], [], [ 4315fe4c343aSmrg PACKAGE='$PACKAGE' 4316fe4c343aSmrg VERSION='$VERSION' 4317fe4c343aSmrg RM='$RM' 4318fe4c343aSmrg ofile='$ofile'], []) 4319fe4c343aSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4320fe4c343aSmrg])# _LT_CONFIG 4321ba6a1819Smrg 4322ba6a1819Smrg 4323fe4c343aSmrg# LT_SUPPORTED_TAG(TAG) 4324fe4c343aSmrg# --------------------- 4325fe4c343aSmrg# Trace this macro to discover what tags are supported by the libtool 4326fe4c343aSmrg# --tag option, using: 4327fe4c343aSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4328fe4c343aSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 4329549e21daSmrg 4330549e21daSmrg 4331fe4c343aSmrg# C support is built-in for now 4332fe4c343aSmrgm4_define([_LT_LANG_C_enabled], []) 4333fe4c343aSmrgm4_define([_LT_TAGS], []) 43341bedbe3fSmrg 43351bedbe3fSmrg 4336fe4c343aSmrg# LT_LANG(LANG) 4337fe4c343aSmrg# ------------- 4338fe4c343aSmrg# Enable libtool support for the given language if not already enabled. 4339fe4c343aSmrgAC_DEFUN([LT_LANG], 4340fe4c343aSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4341fe4c343aSmrgm4_case([$1], 4342fe4c343aSmrg [C], [_LT_LANG(C)], 4343fe4c343aSmrg [C++], [_LT_LANG(CXX)], 4344fe4c343aSmrg [Go], [_LT_LANG(GO)], 4345fe4c343aSmrg [Java], [_LT_LANG(GCJ)], 4346fe4c343aSmrg [Fortran 77], [_LT_LANG(F77)], 4347fe4c343aSmrg [Fortran], [_LT_LANG(FC)], 4348fe4c343aSmrg [Windows Resource], [_LT_LANG(RC)], 4349fe4c343aSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4350fe4c343aSmrg [_LT_LANG($1)], 4351fe4c343aSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4352fe4c343aSmrg])# LT_LANG 43531bedbe3fSmrg 4354ba6a1819Smrg 4355fe4c343aSmrg# _LT_LANG(LANGNAME) 4356fe4c343aSmrg# ------------------ 4357fe4c343aSmrgm4_defun([_LT_LANG], 4358fe4c343aSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4359fe4c343aSmrg [LT_SUPPORTED_TAG([$1])dnl 4360fe4c343aSmrg m4_append([_LT_TAGS], [$1 ])dnl 4361fe4c343aSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4362fe4c343aSmrg _LT_LANG_$1_CONFIG($1)])dnl 4363fe4c343aSmrg])# _LT_LANG 4364549e21daSmrg 4365ba6a1819Smrg 4366fe4c343aSmrgm4_ifndef([AC_PROG_GO], [ 4367fe4c343aSmrg# NOTE: This macro has been submitted for inclusion into # 4368fe4c343aSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4369fe4c343aSmrg# a released version of Autoconf we should remove this # 4370fe4c343aSmrg# macro and use it instead. # 4371fe4c343aSmrgm4_defun([AC_PROG_GO], 4372fe4c343aSmrg[AC_LANG_PUSH(Go)dnl 4373fe4c343aSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4374fe4c343aSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4375fe4c343aSmrg_AC_ARG_VAR_LDFLAGS()dnl 4376fe4c343aSmrgAC_CHECK_TOOL(GOC, gccgo) 4377fe4c343aSmrgif test -z "$GOC"; then 4378fe4c343aSmrg if test -n "$ac_tool_prefix"; then 4379fe4c343aSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4380fe4c343aSmrg fi 4381fe4c343aSmrgfi 4382fe4c343aSmrgif test -z "$GOC"; then 4383fe4c343aSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4384fe4c343aSmrgfi 4385fe4c343aSmrg])#m4_defun 4386fe4c343aSmrg])#m4_ifndef 4387ba6a1819Smrg 4388ba6a1819Smrg 4389fe4c343aSmrg# _LT_LANG_DEFAULT_CONFIG 4390fe4c343aSmrg# ----------------------- 4391fe4c343aSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4392fe4c343aSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4393fe4c343aSmrg [LT_LANG(CXX)], 4394fe4c343aSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4395ba6a1819Smrg 4396fe4c343aSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4397fe4c343aSmrg [LT_LANG(F77)], 4398fe4c343aSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 43991bedbe3fSmrg 4400fe4c343aSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4401fe4c343aSmrg [LT_LANG(FC)], 4402fe4c343aSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 44031bedbe3fSmrg 4404fe4c343aSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4405fe4c343aSmrgdnl pulling things in needlessly. 4406fe4c343aSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4407fe4c343aSmrg [LT_LANG(GCJ)], 4408fe4c343aSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4409fe4c343aSmrg [LT_LANG(GCJ)], 4410fe4c343aSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4411fe4c343aSmrg [LT_LANG(GCJ)], 4412fe4c343aSmrg [m4_ifdef([AC_PROG_GCJ], 4413fe4c343aSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 4414fe4c343aSmrg m4_ifdef([A][M_PROG_GCJ], 4415fe4c343aSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 4416fe4c343aSmrg m4_ifdef([LT_PROG_GCJ], 4417fe4c343aSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 44181bedbe3fSmrg 4419fe4c343aSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 4420fe4c343aSmrg [LT_LANG(GO)], 4421fe4c343aSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 44221bedbe3fSmrg 4423fe4c343aSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 4424fe4c343aSmrg [LT_LANG(RC)], 4425fe4c343aSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 4426fe4c343aSmrg])# _LT_LANG_DEFAULT_CONFIG 4427ba6a1819Smrg 4428fe4c343aSmrg# Obsolete macros: 4429fe4c343aSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 4430fe4c343aSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 4431fe4c343aSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 4432fe4c343aSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 4433fe4c343aSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 4434fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 4435fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 4436fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 4437fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 4438fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 4439fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 4440ba6a1819Smrg 4441ba6a1819Smrg 4442fe4c343aSmrg# _LT_TAG_COMPILER 4443fe4c343aSmrg# ---------------- 4444fe4c343aSmrgm4_defun([_LT_TAG_COMPILER], 4445fe4c343aSmrg[AC_REQUIRE([AC_PROG_CC])dnl 4446ba6a1819Smrg 4447fe4c343aSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 4448fe4c343aSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 4449fe4c343aSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 4450fe4c343aSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4451549e21daSmrg 4452fe4c343aSmrg# If no C compiler was specified, use CC. 4453fe4c343aSmrgLTCC=${LTCC-"$CC"} 4454ba6a1819Smrg 4455fe4c343aSmrg# If no C compiler flags were specified, use CFLAGS. 4456fe4c343aSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4457ba6a1819Smrg 4458fe4c343aSmrg# Allow CC to be a program name with arguments. 4459fe4c343aSmrgcompiler=$CC 4460fe4c343aSmrg])# _LT_TAG_COMPILER 4461ba6a1819Smrg 4462ba6a1819Smrg 4463fe4c343aSmrg# _LT_COMPILER_BOILERPLATE 4464fe4c343aSmrg# ------------------------ 4465fe4c343aSmrg# Check for compiler boilerplate output or warnings with 4466fe4c343aSmrg# the simple compiler test code. 4467fe4c343aSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 4468fe4c343aSmrg[m4_require([_LT_DECL_SED])dnl 4469fe4c343aSmrgac_outfile=conftest.$ac_objext 4470fe4c343aSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 4471fe4c343aSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4472fe4c343aSmrg_lt_compiler_boilerplate=`cat conftest.err` 4473fe4c343aSmrg$RM conftest* 4474fe4c343aSmrg])# _LT_COMPILER_BOILERPLATE 4475ba6a1819Smrg 4476ba6a1819Smrg 4477fe4c343aSmrg# _LT_LINKER_BOILERPLATE 4478fe4c343aSmrg# ---------------------- 4479fe4c343aSmrg# Check for linker boilerplate output or warnings with 4480fe4c343aSmrg# the simple link test code. 4481fe4c343aSmrgm4_defun([_LT_LINKER_BOILERPLATE], 4482fe4c343aSmrg[m4_require([_LT_DECL_SED])dnl 4483fe4c343aSmrgac_outfile=conftest.$ac_objext 4484fe4c343aSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 4485fe4c343aSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 4486fe4c343aSmrg_lt_linker_boilerplate=`cat conftest.err` 4487fe4c343aSmrg$RM -r conftest* 4488fe4c343aSmrg])# _LT_LINKER_BOILERPLATE 4489ba6a1819Smrg 4490fe4c343aSmrg# _LT_REQUIRED_DARWIN_CHECKS 4491fe4c343aSmrg# ------------------------- 4492fe4c343aSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 4493fe4c343aSmrg case $host_os in 4494fe4c343aSmrg rhapsody* | darwin*) 4495fe4c343aSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 4496fe4c343aSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 4497fe4c343aSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 4498fe4c343aSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 4499fe4c343aSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 4500fe4c343aSmrg _LT_DECL([], [DSYMUTIL], [1], 4501fe4c343aSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 4502fe4c343aSmrg _LT_DECL([], [NMEDIT], [1], 4503fe4c343aSmrg [Tool to change global to local symbols on Mac OS X]) 4504fe4c343aSmrg _LT_DECL([], [LIPO], [1], 4505fe4c343aSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 4506fe4c343aSmrg _LT_DECL([], [OTOOL], [1], 4507fe4c343aSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 4508fe4c343aSmrg _LT_DECL([], [OTOOL64], [1], 4509fe4c343aSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4510549e21daSmrg 4511fe4c343aSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 4512fe4c343aSmrg [lt_cv_apple_cc_single_mod=no 4513fe4c343aSmrg if test -z "$LT_MULTI_MODULE"; then 4514fe4c343aSmrg # By default we will add the -single_module flag. You can override 4515fe4c343aSmrg # by either setting the environment variable LT_MULTI_MODULE 4516fe4c343aSmrg # non-empty at configure time, or by adding -multi_module to the 4517fe4c343aSmrg # link flags. 4518fe4c343aSmrg rm -rf libconftest.dylib* 4519fe4c343aSmrg echo "int foo(void){return 1;}" > conftest.c 4520fe4c343aSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4521fe4c343aSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 4522fe4c343aSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 4523fe4c343aSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 4524fe4c343aSmrg _lt_result=$? 4525fe4c343aSmrg # If there is a non-empty error log, and "single_module" 4526fe4c343aSmrg # appears in it, assume the flag caused a linker warning 4527fe4c343aSmrg if test -s conftest.err && $GREP single_module conftest.err; then 4528fe4c343aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4529fe4c343aSmrg # Otherwise, if the output was created with a 0 exit code from 4530fe4c343aSmrg # the compiler, it worked. 4531fe4c343aSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 4532fe4c343aSmrg lt_cv_apple_cc_single_mod=yes 4533fe4c343aSmrg else 4534fe4c343aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4535fe4c343aSmrg fi 4536fe4c343aSmrg rm -rf libconftest.dylib* 4537fe4c343aSmrg rm -f conftest.* 4538fe4c343aSmrg fi]) 4539ba6a1819Smrg 4540fe4c343aSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 4541fe4c343aSmrg [lt_cv_ld_exported_symbols_list], 4542fe4c343aSmrg [lt_cv_ld_exported_symbols_list=no 4543fe4c343aSmrg save_LDFLAGS=$LDFLAGS 4544fe4c343aSmrg echo "_main" > conftest.sym 4545fe4c343aSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 4546fe4c343aSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4547fe4c343aSmrg [lt_cv_ld_exported_symbols_list=yes], 4548fe4c343aSmrg [lt_cv_ld_exported_symbols_list=no]) 4549fe4c343aSmrg LDFLAGS=$save_LDFLAGS 4550fe4c343aSmrg ]) 4551549e21daSmrg 4552fe4c343aSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 4553fe4c343aSmrg [lt_cv_ld_force_load=no 4554fe4c343aSmrg cat > conftest.c << _LT_EOF 4555fe4c343aSmrgint forced_loaded() { return 2;} 45561bedbe3fSmrg_LT_EOF 4557fe4c343aSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 4558fe4c343aSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 4559da1f2d5dSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 4560da1f2d5dSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 4561fe4c343aSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 4562fe4c343aSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 4563fe4c343aSmrg cat > conftest.c << _LT_EOF 4564fe4c343aSmrgint main() { return 0;} 45651bedbe3fSmrg_LT_EOF 4566fe4c343aSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 4567fe4c343aSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 4568fe4c343aSmrg _lt_result=$? 4569fe4c343aSmrg if test -s conftest.err && $GREP force_load conftest.err; then 4570fe4c343aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4571fe4c343aSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 4572fe4c343aSmrg lt_cv_ld_force_load=yes 45731bedbe3fSmrg else 4574fe4c343aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45751bedbe3fSmrg fi 4576fe4c343aSmrg rm -f conftest.err libconftest.a conftest conftest.c 4577fe4c343aSmrg rm -rf conftest.dSYM 4578fe4c343aSmrg ]) 4579fe4c343aSmrg case $host_os in 4580fe4c343aSmrg rhapsody* | darwin1.[[012]]) 4581fe4c343aSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 4582fe4c343aSmrg darwin1.*) 4583fe4c343aSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4584da1f2d5dSmrg darwin*) 4585da1f2d5dSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 4586da1f2d5dSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 4587da1f2d5dSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 4588da1f2d5dSmrg *) 4589da1f2d5dSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 4590fe4c343aSmrg esac 4591fe4c343aSmrg ;; 4592fe4c343aSmrg esac 4593fe4c343aSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 4594fe4c343aSmrg _lt_dar_single_mod='$single_module' 4595fe4c343aSmrg fi 4596fe4c343aSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 4597fe4c343aSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 45981bedbe3fSmrg else 4599fe4c343aSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 46001bedbe3fSmrg fi 4601fe4c343aSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 4602fe4c343aSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 4603fe4c343aSmrg else 4604fe4c343aSmrg _lt_dsymutil= 4605fe4c343aSmrg fi 4606fe4c343aSmrg ;; 4607fe4c343aSmrg esac 4608fe4c343aSmrg]) 46091bedbe3fSmrg 4610fe4c343aSmrg 4611fe4c343aSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 4612fe4c343aSmrg# --------------------------------- 4613fe4c343aSmrg# Checks for linker and compiler features on darwin 4614fe4c343aSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 4615fe4c343aSmrg[ 4616fe4c343aSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 4617fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 4618fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4619fe4c343aSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 4620fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4621fe4c343aSmrg if test yes = "$lt_cv_ld_force_load"; then 4622fe4c343aSmrg _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\"`' 4623fe4c343aSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 4624fe4c343aSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 46251bedbe3fSmrg else 4626fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 4627fe4c343aSmrg fi 4628fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4629fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 4630fe4c343aSmrg case $cc_basename in 4631fe4c343aSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 4632fe4c343aSmrg *) _lt_dar_can_shared=$GCC ;; 4633fe4c343aSmrg esac 4634fe4c343aSmrg if test yes = "$_lt_dar_can_shared"; then 4635fe4c343aSmrg output_verbose_link_cmd=func_echo_all 4636fe4c343aSmrg _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" 4637fe4c343aSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 4638da1f2d5dSmrg _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" 4639da1f2d5dSmrg _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" 4640fe4c343aSmrg m4_if([$1], [CXX], 4641fe4c343aSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 4642fe4c343aSmrg _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" 4643da1f2d5dSmrg _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" 4644fe4c343aSmrg fi 4645fe4c343aSmrg],[]) 4646fe4c343aSmrg else 4647fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 46481bedbe3fSmrg fi 4649ba6a1819Smrg]) 4650fe4c343aSmrg 4651fe4c343aSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 4652fe4c343aSmrg# ---------------------------------- 4653fe4c343aSmrg# Links a minimal program and checks the executable 4654fe4c343aSmrg# for the system default hardcoded library path. In most cases, 4655fe4c343aSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 4656fe4c343aSmrg# the location of the communication and MPI libs are included too. 4657fe4c343aSmrg# If we don't find anything, use the default library path according 4658fe4c343aSmrg# to the aix ld manual. 4659fe4c343aSmrg# Store the results from the different compilers for each TAGNAME. 4660fe4c343aSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 4661fe4c343aSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 4662fe4c343aSmrg[m4_require([_LT_DECL_SED])dnl 4663fe4c343aSmrgif test set = "${lt_cv_aix_libpath+set}"; then 4664fe4c343aSmrg aix_libpath=$lt_cv_aix_libpath 46651bedbe3fSmrgelse 4666fe4c343aSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 4667fe4c343aSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 4668fe4c343aSmrg lt_aix_libpath_sed='[ 4669fe4c343aSmrg /Import File Strings/,/^$/ { 4670fe4c343aSmrg /^0/ { 4671fe4c343aSmrg s/^0 *\([^ ]*\) *$/\1/ 4672fe4c343aSmrg p 4673fe4c343aSmrg } 4674fe4c343aSmrg }]' 4675fe4c343aSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4676fe4c343aSmrg # Check for a 64-bit object if we didn't find anything. 4677fe4c343aSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4678fe4c343aSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 4679fe4c343aSmrg fi],[]) 4680fe4c343aSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 4681fe4c343aSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 4682fe4c343aSmrg fi 4683fe4c343aSmrg ]) 4684fe4c343aSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 46851bedbe3fSmrgfi 4686fe4c343aSmrg])# _LT_SYS_MODULE_PATH_AIX 4687549e21daSmrg 4688fe4c343aSmrg 4689fe4c343aSmrg# _LT_SHELL_INIT(ARG) 4690fe4c343aSmrg# ------------------- 4691fe4c343aSmrgm4_define([_LT_SHELL_INIT], 4692fe4c343aSmrg[m4_divert_text([M4SH-INIT], [$1 4693fe4c343aSmrg])])# _LT_SHELL_INIT 4694fe4c343aSmrg 4695fe4c343aSmrg 4696fe4c343aSmrg 4697fe4c343aSmrg# _LT_PROG_ECHO_BACKSLASH 4698fe4c343aSmrg# ----------------------- 4699fe4c343aSmrg# Find how we can fake an echo command that does not interpret backslash. 4700fe4c343aSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 4701fe4c343aSmrg# of the generated configure script that will find a shell with a builtin 4702fe4c343aSmrg# printf (that we can use as an echo command). 4703fe4c343aSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 4704fe4c343aSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4705fe4c343aSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4706fe4c343aSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4707fe4c343aSmrg 4708fe4c343aSmrgAC_MSG_CHECKING([how to print strings]) 4709fe4c343aSmrg# Test print first, because it will be a builtin if present. 4710fe4c343aSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 4711fe4c343aSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4712fe4c343aSmrg ECHO='print -r --' 4713fe4c343aSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4714fe4c343aSmrg ECHO='printf %s\n' 4715fe4c343aSmrgelse 4716fe4c343aSmrg # Use this function as a fallback that always works. 4717fe4c343aSmrg func_fallback_echo () 4718fe4c343aSmrg { 4719fe4c343aSmrg eval 'cat <<_LTECHO_EOF 4720fe4c343aSmrg$[]1 4721fe4c343aSmrg_LTECHO_EOF' 4722fe4c343aSmrg } 4723fe4c343aSmrg ECHO='func_fallback_echo' 47241bedbe3fSmrgfi 4725ba6a1819Smrg 4726fe4c343aSmrg# func_echo_all arg... 4727fe4c343aSmrg# Invoke $ECHO with all args, space-separated. 4728fe4c343aSmrgfunc_echo_all () 4729fe4c343aSmrg{ 4730fe4c343aSmrg $ECHO "$*" 4731fe4c343aSmrg} 4732ba6a1819Smrg 4733fe4c343aSmrgcase $ECHO in 4734fe4c343aSmrg printf*) AC_MSG_RESULT([printf]) ;; 4735fe4c343aSmrg print*) AC_MSG_RESULT([print -r]) ;; 4736fe4c343aSmrg *) AC_MSG_RESULT([cat]) ;; 4737fe4c343aSmrgesac 4738ba6a1819Smrg 4739fe4c343aSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 4740fe4c343aSmrg[_AS_DETECT_SUGGESTED([ 4741fe4c343aSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4742fe4c343aSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4743fe4c343aSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4744fe4c343aSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4745fe4c343aSmrg PATH=/empty FPATH=/empty; export PATH FPATH 4746fe4c343aSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 4747fe4c343aSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4748ba6a1819Smrg 4749fe4c343aSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4750fe4c343aSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4751fe4c343aSmrg])# _LT_PROG_ECHO_BACKSLASH 4752ba6a1819Smrg 4753ba6a1819Smrg 4754fe4c343aSmrg# _LT_WITH_SYSROOT 4755fe4c343aSmrg# ---------------- 4756fe4c343aSmrgAC_DEFUN([_LT_WITH_SYSROOT], 4757da1f2d5dSmrg[m4_require([_LT_DECL_SED])dnl 4758da1f2d5dSmrgAC_MSG_CHECKING([for sysroot]) 4759fe4c343aSmrgAC_ARG_WITH([sysroot], 4760fe4c343aSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 4761fe4c343aSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 4762fe4c343aSmrg if not specified).])], 4763fe4c343aSmrg[], [with_sysroot=no]) 4764ba6a1819Smrg 4765fe4c343aSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 4766fe4c343aSmrgdnl in case the user passed a directory name. 4767fe4c343aSmrglt_sysroot= 4768fe4c343aSmrgcase $with_sysroot in #( 4769fe4c343aSmrg yes) 4770fe4c343aSmrg if test yes = "$GCC"; then 4771fe4c343aSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 4772fe4c343aSmrg fi 4773fe4c343aSmrg ;; #( 4774fe4c343aSmrg /*) 4775da1f2d5dSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 4776fe4c343aSmrg ;; #( 4777fe4c343aSmrg no|'') 4778fe4c343aSmrg ;; #( 4779fe4c343aSmrg *) 4780fe4c343aSmrg AC_MSG_RESULT([$with_sysroot]) 4781fe4c343aSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 4782fe4c343aSmrg ;; 4783fe4c343aSmrgesac 4784fe4c343aSmrg 4785fe4c343aSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 4786fe4c343aSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 4787fe4c343aSmrg[dependent libraries, and where our libraries should be installed.])]) 4788fe4c343aSmrg 4789fe4c343aSmrg# _LT_ENABLE_LOCK 4790fe4c343aSmrg# --------------- 4791fe4c343aSmrgm4_defun([_LT_ENABLE_LOCK], 4792fe4c343aSmrg[AC_ARG_ENABLE([libtool-lock], 4793fe4c343aSmrg [AS_HELP_STRING([--disable-libtool-lock], 4794fe4c343aSmrg [avoid locking (might break parallel builds)])]) 4795fe4c343aSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 4796fe4c343aSmrg 4797fe4c343aSmrg# Some flags need to be propagated to the compiler or linker for good 4798fe4c343aSmrg# libtool support. 4799fe4c343aSmrgcase $host in 4800fe4c343aSmrgia64-*-hpux*) 4801fe4c343aSmrg # Find out what ABI is being produced by ac_compile, and set mode 4802fe4c343aSmrg # options accordingly. 4803fe4c343aSmrg echo 'int i;' > conftest.$ac_ext 4804fe4c343aSmrg if AC_TRY_EVAL(ac_compile); then 4805da1f2d5dSmrg case `$FILECMD conftest.$ac_objext` in 4806fe4c343aSmrg *ELF-32*) 4807fe4c343aSmrg HPUX_IA64_MODE=32 4808ba6a1819Smrg ;; 4809fe4c343aSmrg *ELF-64*) 4810fe4c343aSmrg HPUX_IA64_MODE=64 4811549e21daSmrg ;; 4812549e21daSmrg esac 4813fe4c343aSmrg fi 4814fe4c343aSmrg rm -rf conftest* 4815fe4c343aSmrg ;; 4816fe4c343aSmrg*-*-irix6*) 4817fe4c343aSmrg # Find out what ABI is being produced by ac_compile, and set linker 4818fe4c343aSmrg # options accordingly. 4819fe4c343aSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4820fe4c343aSmrg if AC_TRY_EVAL(ac_compile); then 4821fe4c343aSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 4822da1f2d5dSmrg case `$FILECMD conftest.$ac_objext` in 4823fe4c343aSmrg *32-bit*) 4824fe4c343aSmrg LD="${LD-ld} -melf32bsmip" 4825ba6a1819Smrg ;; 4826fe4c343aSmrg *N32*) 4827fe4c343aSmrg LD="${LD-ld} -melf32bmipn32" 4828fe4c343aSmrg ;; 4829fe4c343aSmrg *64-bit*) 4830fe4c343aSmrg LD="${LD-ld} -melf64bmip" 48311bedbe3fSmrg ;; 4832fe4c343aSmrg esac 4833fe4c343aSmrg else 4834da1f2d5dSmrg case `$FILECMD conftest.$ac_objext` in 4835fe4c343aSmrg *32-bit*) 4836fe4c343aSmrg LD="${LD-ld} -32" 4837fe4c343aSmrg ;; 4838fe4c343aSmrg *N32*) 4839fe4c343aSmrg LD="${LD-ld} -n32" 4840fe4c343aSmrg ;; 4841fe4c343aSmrg *64-bit*) 4842fe4c343aSmrg LD="${LD-ld} -64" 4843fe4c343aSmrg ;; 4844fe4c343aSmrg esac 4845fe4c343aSmrg fi 4846fe4c343aSmrg fi 4847fe4c343aSmrg rm -rf conftest* 4848fe4c343aSmrg ;; 4849fe4c343aSmrg 4850fe4c343aSmrgmips64*-*linux*) 4851fe4c343aSmrg # Find out what ABI is being produced by ac_compile, and set linker 4852fe4c343aSmrg # options accordingly. 4853fe4c343aSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4854fe4c343aSmrg if AC_TRY_EVAL(ac_compile); then 4855fe4c343aSmrg emul=elf 4856da1f2d5dSmrg case `$FILECMD conftest.$ac_objext` in 4857fe4c343aSmrg *32-bit*) 4858fe4c343aSmrg emul="${emul}32" 4859549e21daSmrg ;; 4860fe4c343aSmrg *64-bit*) 4861fe4c343aSmrg emul="${emul}64" 4862549e21daSmrg ;; 4863fe4c343aSmrg esac 4864da1f2d5dSmrg case `$FILECMD conftest.$ac_objext` in 4865fe4c343aSmrg *MSB*) 4866fe4c343aSmrg emul="${emul}btsmip" 4867ba6a1819Smrg ;; 4868fe4c343aSmrg *LSB*) 4869fe4c343aSmrg emul="${emul}ltsmip" 4870ba6a1819Smrg ;; 4871fe4c343aSmrg esac 4872da1f2d5dSmrg case `$FILECMD conftest.$ac_objext` in 4873fe4c343aSmrg *N32*) 4874fe4c343aSmrg emul="${emul}n32" 4875ba6a1819Smrg ;; 4876fe4c343aSmrg esac 4877fe4c343aSmrg LD="${LD-ld} -m $emul" 4878fe4c343aSmrg fi 4879fe4c343aSmrg rm -rf conftest* 4880fe4c343aSmrg ;; 4881fe4c343aSmrg 4882fe4c343aSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 4883fe4c343aSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4884fe4c343aSmrg # Find out what ABI is being produced by ac_compile, and set linker 4885fe4c343aSmrg # options accordingly. Note that the listed cases only cover the 4886fe4c343aSmrg # situations where additional linker options are needed (such as when 4887fe4c343aSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 4888fe4c343aSmrg # vice versa); the common cases where no linker options are needed do 4889fe4c343aSmrg # not appear in the list. 4890fe4c343aSmrg echo 'int i;' > conftest.$ac_ext 4891fe4c343aSmrg if AC_TRY_EVAL(ac_compile); then 4892da1f2d5dSmrg case `$FILECMD conftest.o` in 4893fe4c343aSmrg *32-bit*) 4894fe4c343aSmrg case $host in 4895fe4c343aSmrg x86_64-*kfreebsd*-gnu) 4896fe4c343aSmrg LD="${LD-ld} -m elf_i386_fbsd" 4897549e21daSmrg ;; 4898fe4c343aSmrg x86_64-*linux*) 4899da1f2d5dSmrg case `$FILECMD conftest.o` in 4900fe4c343aSmrg *x86-64*) 4901fe4c343aSmrg LD="${LD-ld} -m elf32_x86_64" 4902fe4c343aSmrg ;; 4903fe4c343aSmrg *) 4904fe4c343aSmrg LD="${LD-ld} -m elf_i386" 4905fe4c343aSmrg ;; 4906549e21daSmrg esac 4907549e21daSmrg ;; 4908fe4c343aSmrg powerpc64le-*linux*) 4909fe4c343aSmrg LD="${LD-ld} -m elf32lppclinux" 49101bedbe3fSmrg ;; 4911fe4c343aSmrg powerpc64-*linux*) 4912fe4c343aSmrg LD="${LD-ld} -m elf32ppclinux" 49131bedbe3fSmrg ;; 4914fe4c343aSmrg s390x-*linux*) 4915fe4c343aSmrg LD="${LD-ld} -m elf_s390" 49161bedbe3fSmrg ;; 4917fe4c343aSmrg sparc64-*linux*) 4918fe4c343aSmrg LD="${LD-ld} -m elf32_sparc" 49191bedbe3fSmrg ;; 49201bedbe3fSmrg esac 49211bedbe3fSmrg ;; 4922fe4c343aSmrg *64-bit*) 4923fe4c343aSmrg case $host in 4924fe4c343aSmrg x86_64-*kfreebsd*-gnu) 4925fe4c343aSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 49261bedbe3fSmrg ;; 4927fe4c343aSmrg x86_64-*linux*) 4928fe4c343aSmrg LD="${LD-ld} -m elf_x86_64" 49291bedbe3fSmrg ;; 4930fe4c343aSmrg powerpcle-*linux*) 4931fe4c343aSmrg LD="${LD-ld} -m elf64lppc" 49321bedbe3fSmrg ;; 4933fe4c343aSmrg powerpc-*linux*) 4934fe4c343aSmrg LD="${LD-ld} -m elf64ppc" 49351bedbe3fSmrg ;; 4936fe4c343aSmrg s390*-*linux*|s390*-*tpf*) 4937fe4c343aSmrg LD="${LD-ld} -m elf64_s390" 49381bedbe3fSmrg ;; 4939fe4c343aSmrg sparc*-*linux*) 4940fe4c343aSmrg LD="${LD-ld} -m elf64_sparc" 49411bedbe3fSmrg ;; 49421bedbe3fSmrg esac 49431bedbe3fSmrg ;; 49441bedbe3fSmrg esac 49451bedbe3fSmrg fi 4946fe4c343aSmrg rm -rf conftest* 4947fe4c343aSmrg ;; 49481bedbe3fSmrg 4949fe4c343aSmrg*-*-sco3.2v5*) 4950fe4c343aSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4951fe4c343aSmrg SAVE_CFLAGS=$CFLAGS 4952fe4c343aSmrg CFLAGS="$CFLAGS -belf" 4953fe4c343aSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4954fe4c343aSmrg [AC_LANG_PUSH(C) 4955fe4c343aSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4956fe4c343aSmrg AC_LANG_POP]) 4957fe4c343aSmrg if test yes != "$lt_cv_cc_needs_belf"; then 4958fe4c343aSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4959fe4c343aSmrg CFLAGS=$SAVE_CFLAGS 4960fe4c343aSmrg fi 4961fe4c343aSmrg ;; 4962fe4c343aSmrg*-*solaris*) 4963fe4c343aSmrg # Find out what ABI is being produced by ac_compile, and set linker 4964fe4c343aSmrg # options accordingly. 4965fe4c343aSmrg echo 'int i;' > conftest.$ac_ext 4966fe4c343aSmrg if AC_TRY_EVAL(ac_compile); then 4967da1f2d5dSmrg case `$FILECMD conftest.o` in 4968fe4c343aSmrg *64-bit*) 4969fe4c343aSmrg case $lt_cv_prog_gnu_ld in 4970fe4c343aSmrg yes*) 4971fe4c343aSmrg case $host in 4972fe4c343aSmrg i?86-*-solaris*|x86_64-*-solaris*) 4973fe4c343aSmrg LD="${LD-ld} -m elf_x86_64" 4974fe4c343aSmrg ;; 4975fe4c343aSmrg sparc*-*-solaris*) 4976fe4c343aSmrg LD="${LD-ld} -m elf64_sparc" 4977fe4c343aSmrg ;; 4978fe4c343aSmrg esac 4979fe4c343aSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 4980fe4c343aSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 4981fe4c343aSmrg LD=${LD-ld}_sol2 4982fe4c343aSmrg fi 49831bedbe3fSmrg ;; 4984fe4c343aSmrg *) 4985fe4c343aSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4986fe4c343aSmrg LD="${LD-ld} -64" 4987fe4c343aSmrg fi 4988fe4c343aSmrg ;; 49891bedbe3fSmrg esac 49901bedbe3fSmrg ;; 4991fe4c343aSmrg esac 4992fe4c343aSmrg fi 4993fe4c343aSmrg rm -rf conftest* 4994fe4c343aSmrg ;; 4995fe4c343aSmrgesac 49961bedbe3fSmrg 4997fe4c343aSmrgneed_locks=$enable_libtool_lock 4998fe4c343aSmrg])# _LT_ENABLE_LOCK 49991bedbe3fSmrg 50001bedbe3fSmrg 5001fe4c343aSmrg# _LT_PROG_AR 5002fe4c343aSmrg# ----------- 5003fe4c343aSmrgm4_defun([_LT_PROG_AR], 5004fe4c343aSmrg[AC_CHECK_TOOLS(AR, [ar], false) 5005fe4c343aSmrg: ${AR=ar} 5006fe4c343aSmrg_LT_DECL([], [AR], [1], [The archiver]) 5007da1f2d5dSmrg 5008da1f2d5dSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 5009da1f2d5dSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 5010da1f2d5dSmrg# higher priority because thats what people were doing historically (setting 5011da1f2d5dSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 5012da1f2d5dSmrg# variable obsoleted/removed. 5013da1f2d5dSmrg 5014da1f2d5dSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 5015da1f2d5dSmrglt_ar_flags=$AR_FLAGS 5016da1f2d5dSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 5017da1f2d5dSmrg 5018da1f2d5dSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 5019da1f2d5dSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 5020da1f2d5dSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 5021da1f2d5dSmrg [Flags to create an archive]) 50221bedbe3fSmrg 5023fe4c343aSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 5024fe4c343aSmrg [lt_cv_ar_at_file=no 5025fe4c343aSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 5026fe4c343aSmrg [echo conftest.$ac_objext > conftest.lst 5027fe4c343aSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 5028fe4c343aSmrg AC_TRY_EVAL([lt_ar_try]) 5029fe4c343aSmrg if test 0 -eq "$ac_status"; then 5030fe4c343aSmrg # Ensure the archiver fails upon bogus file names. 5031fe4c343aSmrg rm -f conftest.$ac_objext libconftest.a 5032fe4c343aSmrg AC_TRY_EVAL([lt_ar_try]) 5033fe4c343aSmrg if test 0 -ne "$ac_status"; then 5034fe4c343aSmrg lt_cv_ar_at_file=@ 5035fe4c343aSmrg fi 5036fe4c343aSmrg fi 5037fe4c343aSmrg rm -f conftest.* libconftest.a 5038fe4c343aSmrg ]) 5039fe4c343aSmrg ]) 50401bedbe3fSmrg 5041fe4c343aSmrgif test no = "$lt_cv_ar_at_file"; then 5042fe4c343aSmrg archiver_list_spec= 5043fe4c343aSmrgelse 5044fe4c343aSmrg archiver_list_spec=$lt_cv_ar_at_file 5045fe4c343aSmrgfi 5046fe4c343aSmrg_LT_DECL([], [archiver_list_spec], [1], 5047fe4c343aSmrg [How to feed a file listing to the archiver]) 5048fe4c343aSmrg])# _LT_PROG_AR 50491bedbe3fSmrg 50501bedbe3fSmrg 5051fe4c343aSmrg# _LT_CMD_OLD_ARCHIVE 5052fe4c343aSmrg# ------------------- 5053fe4c343aSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 5054fe4c343aSmrg[_LT_PROG_AR 50551bedbe3fSmrg 5056fe4c343aSmrgAC_CHECK_TOOL(STRIP, strip, :) 5057fe4c343aSmrgtest -z "$STRIP" && STRIP=: 5058fe4c343aSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 50591bedbe3fSmrg 5060fe4c343aSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 5061fe4c343aSmrgtest -z "$RANLIB" && RANLIB=: 5062fe4c343aSmrg_LT_DECL([], [RANLIB], [1], 5063fe4c343aSmrg [Commands used to install an old-style archive]) 50641bedbe3fSmrg 5065fe4c343aSmrg# Determine commands to create old-style static archives. 5066fe4c343aSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 5067fe4c343aSmrgold_postinstall_cmds='chmod 644 $oldlib' 5068fe4c343aSmrgold_postuninstall_cmds= 50691bedbe3fSmrg 5070fe4c343aSmrgif test -n "$RANLIB"; then 5071fe4c343aSmrg case $host_os in 5072fe4c343aSmrg bitrig* | openbsd*) 5073fe4c343aSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 5074fe4c343aSmrg ;; 5075fe4c343aSmrg *) 5076fe4c343aSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 5077fe4c343aSmrg ;; 5078fe4c343aSmrg esac 5079fe4c343aSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 5080fe4c343aSmrgfi 50811bedbe3fSmrg 5082fe4c343aSmrgcase $host_os in 5083fe4c343aSmrg darwin*) 5084fe4c343aSmrg lock_old_archive_extraction=yes ;; 5085fe4c343aSmrg *) 5086fe4c343aSmrg lock_old_archive_extraction=no ;; 5087fe4c343aSmrgesac 5088fe4c343aSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 5089fe4c343aSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 5090fe4c343aSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 5091fe4c343aSmrg [Commands used to build an old-style archive]) 5092fe4c343aSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 5093fe4c343aSmrg [Whether to use a lock for old archive extraction]) 5094fe4c343aSmrg])# _LT_CMD_OLD_ARCHIVE 50951bedbe3fSmrg 50961bedbe3fSmrg 5097fe4c343aSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5098fe4c343aSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 5099fe4c343aSmrg# ---------------------------------------------------------------- 5100fe4c343aSmrg# Check whether the given compiler option works 5101fe4c343aSmrgAC_DEFUN([_LT_COMPILER_OPTION], 5102fe4c343aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5103fe4c343aSmrgm4_require([_LT_DECL_SED])dnl 5104fe4c343aSmrgAC_CACHE_CHECK([$1], [$2], 5105fe4c343aSmrg [$2=no 5106fe4c343aSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 5107fe4c343aSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5108fe4c343aSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 5109fe4c343aSmrg # Insert the option either (1) after the last *FLAGS variable, or 5110fe4c343aSmrg # (2) before a word containing "conftest.", or (3) at the end. 5111fe4c343aSmrg # Note that $ac_compile itself does not contain backslashes and begins 5112fe4c343aSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5113fe4c343aSmrg # The option is referenced via a variable to avoid confusing sed. 5114fe4c343aSmrg lt_compile=`echo "$ac_compile" | $SED \ 5115fe4c343aSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5116fe4c343aSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5117fe4c343aSmrg -e 's:$: $lt_compiler_flag:'` 5118fe4c343aSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5119fe4c343aSmrg (eval "$lt_compile" 2>conftest.err) 5120fe4c343aSmrg ac_status=$? 5121fe4c343aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 5122fe4c343aSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5123fe4c343aSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 5124fe4c343aSmrg # The compiler can only warn and ignore the option if not recognized 5125fe4c343aSmrg # So say no if there are warnings other than the usual output. 5126fe4c343aSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5127fe4c343aSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5128fe4c343aSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5129fe4c343aSmrg $2=yes 5130fe4c343aSmrg fi 5131fe4c343aSmrg fi 5132fe4c343aSmrg $RM conftest* 5133fe4c343aSmrg]) 51341bedbe3fSmrg 5135fe4c343aSmrgif test yes = "[$]$2"; then 5136fe4c343aSmrg m4_if([$5], , :, [$5]) 5137fe4c343aSmrgelse 5138fe4c343aSmrg m4_if([$6], , :, [$6]) 5139fe4c343aSmrgfi 5140fe4c343aSmrg])# _LT_COMPILER_OPTION 51411bedbe3fSmrg 5142fe4c343aSmrg# Old name: 5143fe4c343aSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5144fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 5145fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 51461bedbe3fSmrg 51471bedbe3fSmrg 5148fe4c343aSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5149fe4c343aSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 5150fe4c343aSmrg# ---------------------------------------------------- 5151fe4c343aSmrg# Check whether the given linker option works 5152fe4c343aSmrgAC_DEFUN([_LT_LINKER_OPTION], 5153fe4c343aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5154fe4c343aSmrgm4_require([_LT_DECL_SED])dnl 5155fe4c343aSmrgAC_CACHE_CHECK([$1], [$2], 5156fe4c343aSmrg [$2=no 5157fe4c343aSmrg save_LDFLAGS=$LDFLAGS 5158fe4c343aSmrg LDFLAGS="$LDFLAGS $3" 5159fe4c343aSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 5160fe4c343aSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5161fe4c343aSmrg # The linker can only warn and ignore the option if not recognized 5162fe4c343aSmrg # So say no if there are warnings 5163fe4c343aSmrg if test -s conftest.err; then 5164fe4c343aSmrg # Append any errors to the config.log. 5165fe4c343aSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 5166fe4c343aSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5167fe4c343aSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5168fe4c343aSmrg if diff conftest.exp conftest.er2 >/dev/null; then 5169fe4c343aSmrg $2=yes 5170fe4c343aSmrg fi 5171fe4c343aSmrg else 5172fe4c343aSmrg $2=yes 5173fe4c343aSmrg fi 5174fe4c343aSmrg fi 5175fe4c343aSmrg $RM -r conftest* 5176fe4c343aSmrg LDFLAGS=$save_LDFLAGS 5177fe4c343aSmrg]) 51781bedbe3fSmrg 5179fe4c343aSmrgif test yes = "[$]$2"; then 5180fe4c343aSmrg m4_if([$4], , :, [$4]) 5181fe4c343aSmrgelse 5182fe4c343aSmrg m4_if([$5], , :, [$5]) 5183fe4c343aSmrgfi 5184fe4c343aSmrg])# _LT_LINKER_OPTION 51851bedbe3fSmrg 5186fe4c343aSmrg# Old name: 5187fe4c343aSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5188fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 5189fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 51901bedbe3fSmrg 51911bedbe3fSmrg 5192fe4c343aSmrg# LT_CMD_MAX_LEN 5193fe4c343aSmrg#--------------- 5194fe4c343aSmrgAC_DEFUN([LT_CMD_MAX_LEN], 5195fe4c343aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5196fe4c343aSmrg# find the maximum length of command line arguments 5197fe4c343aSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5198fe4c343aSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5199fe4c343aSmrg i=0 5200fe4c343aSmrg teststring=ABCD 52011bedbe3fSmrg 5202fe4c343aSmrg case $build_os in 5203fe4c343aSmrg msdosdjgpp*) 5204fe4c343aSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5205fe4c343aSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5206fe4c343aSmrg # during glob expansion). Even if it were fixed, the result of this 5207fe4c343aSmrg # check would be larger than it should be. 5208fe4c343aSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5209fe4c343aSmrg ;; 52101bedbe3fSmrg 5211fe4c343aSmrg gnu*) 5212fe4c343aSmrg # Under GNU Hurd, this test is not required because there is 5213fe4c343aSmrg # no limit to the length of command line arguments. 5214fe4c343aSmrg # Libtool will interpret -1 as no limit whatsoever 5215fe4c343aSmrg lt_cv_sys_max_cmd_len=-1; 5216fe4c343aSmrg ;; 52171bedbe3fSmrg 5218fe4c343aSmrg cygwin* | mingw* | cegcc*) 5219fe4c343aSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5220fe4c343aSmrg # about 5 minutes as the teststring grows exponentially. 5221fe4c343aSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 5222fe4c343aSmrg # you end up with a "frozen" computer, even though with patience 5223fe4c343aSmrg # the test eventually succeeds (with a max line length of 256k). 5224fe4c343aSmrg # Instead, let's just punt: use the minimum linelength reported by 5225fe4c343aSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 5226fe4c343aSmrg lt_cv_sys_max_cmd_len=8192; 52271bedbe3fSmrg ;; 5228fe4c343aSmrg 5229fe4c343aSmrg mint*) 5230fe4c343aSmrg # On MiNT this can take a long time and run out of memory. 5231fe4c343aSmrg lt_cv_sys_max_cmd_len=8192; 52321bedbe3fSmrg ;; 52331bedbe3fSmrg 5234fe4c343aSmrg amigaos*) 5235fe4c343aSmrg # On AmigaOS with pdksh, this test takes hours, literally. 5236fe4c343aSmrg # So we just punt and use a minimum line length of 8192. 5237fe4c343aSmrg lt_cv_sys_max_cmd_len=8192; 5238fe4c343aSmrg ;; 52391bedbe3fSmrg 5240da1f2d5dSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5241fe4c343aSmrg # This has been around since 386BSD, at least. Likely further. 5242fe4c343aSmrg if test -x /sbin/sysctl; then 5243fe4c343aSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5244fe4c343aSmrg elif test -x /usr/sbin/sysctl; then 5245fe4c343aSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 52461bedbe3fSmrg else 5247fe4c343aSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 52481bedbe3fSmrg fi 5249fe4c343aSmrg # And add a safety zone 5250fe4c343aSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5251fe4c343aSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 52521bedbe3fSmrg ;; 5253fe4c343aSmrg 5254fe4c343aSmrg interix*) 5255fe4c343aSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5256fe4c343aSmrg lt_cv_sys_max_cmd_len=196608 52571bedbe3fSmrg ;; 5258fe4c343aSmrg 5259fe4c343aSmrg os2*) 5260fe4c343aSmrg # The test takes a long time on OS/2. 5261fe4c343aSmrg lt_cv_sys_max_cmd_len=8192 52621bedbe3fSmrg ;; 52631bedbe3fSmrg 5264fe4c343aSmrg osf*) 5265fe4c343aSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5266fe4c343aSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5267fe4c343aSmrg # nice to cause kernel panics so lets avoid the loop below. 5268fe4c343aSmrg # First set a reasonable default. 5269fe4c343aSmrg lt_cv_sys_max_cmd_len=16384 5270fe4c343aSmrg # 5271fe4c343aSmrg if test -x /sbin/sysconfig; then 5272fe4c343aSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5273fe4c343aSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5274fe4c343aSmrg esac 52751bedbe3fSmrg fi 52761bedbe3fSmrg ;; 5277fe4c343aSmrg sco3.2v5*) 5278fe4c343aSmrg lt_cv_sys_max_cmd_len=102400 52791bedbe3fSmrg ;; 5280fe4c343aSmrg sysv5* | sco5v6* | sysv4.2uw2*) 5281fe4c343aSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5282fe4c343aSmrg if test -n "$kargmax"; then 5283da1f2d5dSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5284fe4c343aSmrg else 5285fe4c343aSmrg lt_cv_sys_max_cmd_len=32768 5286fe4c343aSmrg fi 52871bedbe3fSmrg ;; 5288fe4c343aSmrg *) 5289fe4c343aSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5290fe4c343aSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5291fe4c343aSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5292fe4c343aSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5293fe4c343aSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 52941bedbe3fSmrg else 5295fe4c343aSmrg # Make teststring a little bigger before we do anything with it. 5296fe4c343aSmrg # a 1K string should be a reasonable start. 5297fe4c343aSmrg for i in 1 2 3 4 5 6 7 8; do 5298fe4c343aSmrg teststring=$teststring$teststring 5299fe4c343aSmrg done 5300fe4c343aSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5301fe4c343aSmrg # If test is not a shell built-in, we'll probably end up computing a 5302fe4c343aSmrg # maximum length that is only half of the actual maximum length, but 5303fe4c343aSmrg # we can't tell. 5304fe4c343aSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5305fe4c343aSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5306fe4c343aSmrg test 17 != "$i" # 1/2 MB should be enough 5307fe4c343aSmrg do 5308fe4c343aSmrg i=`expr $i + 1` 5309fe4c343aSmrg teststring=$teststring$teststring 5310fe4c343aSmrg done 5311fe4c343aSmrg # Only check the string length outside the loop. 5312fe4c343aSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5313fe4c343aSmrg teststring= 5314fe4c343aSmrg # Add a significant safety factor because C++ compilers can tack on 5315fe4c343aSmrg # massive amounts of additional arguments before passing them to the 5316fe4c343aSmrg # linker. It appears as though 1/2 is a usable value. 5317fe4c343aSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 53181bedbe3fSmrg fi 5319fe4c343aSmrg ;; 5320fe4c343aSmrg esac 5321fe4c343aSmrg]) 5322fe4c343aSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 5323fe4c343aSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5324fe4c343aSmrgelse 5325fe4c343aSmrg AC_MSG_RESULT(none) 5326fe4c343aSmrgfi 5327fe4c343aSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5328fe4c343aSmrg_LT_DECL([], [max_cmd_len], [0], 5329fe4c343aSmrg [What is the maximum length of a command?]) 5330fe4c343aSmrg])# LT_CMD_MAX_LEN 53311bedbe3fSmrg 5332fe4c343aSmrg# Old name: 5333fe4c343aSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5334fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 5335fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 53361bedbe3fSmrg 53371bedbe3fSmrg 5338fe4c343aSmrg# _LT_HEADER_DLFCN 5339fe4c343aSmrg# ---------------- 5340fe4c343aSmrgm4_defun([_LT_HEADER_DLFCN], 5341fe4c343aSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5342fe4c343aSmrg])# _LT_HEADER_DLFCN 53431bedbe3fSmrg 53441bedbe3fSmrg 5345fe4c343aSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5346fe4c343aSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5347fe4c343aSmrg# ---------------------------------------------------------------- 5348fe4c343aSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 5349fe4c343aSmrg[m4_require([_LT_HEADER_DLFCN])dnl 5350fe4c343aSmrgif test yes = "$cross_compiling"; then : 5351fe4c343aSmrg [$4] 5352fe4c343aSmrgelse 5353fe4c343aSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5354fe4c343aSmrg lt_status=$lt_dlunknown 5355fe4c343aSmrg cat > conftest.$ac_ext <<_LT_EOF 5356fe4c343aSmrg[#line $LINENO "configure" 5357fe4c343aSmrg#include "confdefs.h" 53581bedbe3fSmrg 5359fe4c343aSmrg#if HAVE_DLFCN_H 5360fe4c343aSmrg#include <dlfcn.h> 5361fe4c343aSmrg#endif 53621bedbe3fSmrg 5363fe4c343aSmrg#include <stdio.h> 53641bedbe3fSmrg 5365fe4c343aSmrg#ifdef RTLD_GLOBAL 5366fe4c343aSmrg# define LT_DLGLOBAL RTLD_GLOBAL 5367fe4c343aSmrg#else 5368fe4c343aSmrg# ifdef DL_GLOBAL 5369fe4c343aSmrg# define LT_DLGLOBAL DL_GLOBAL 5370fe4c343aSmrg# else 5371fe4c343aSmrg# define LT_DLGLOBAL 0 5372fe4c343aSmrg# endif 5373fe4c343aSmrg#endif 53741bedbe3fSmrg 5375fe4c343aSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5376fe4c343aSmrg find out it does not work in some platform. */ 5377fe4c343aSmrg#ifndef LT_DLLAZY_OR_NOW 5378fe4c343aSmrg# ifdef RTLD_LAZY 5379fe4c343aSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5380fe4c343aSmrg# else 5381fe4c343aSmrg# ifdef DL_LAZY 5382fe4c343aSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 5383fe4c343aSmrg# else 5384fe4c343aSmrg# ifdef RTLD_NOW 5385fe4c343aSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5386fe4c343aSmrg# else 5387fe4c343aSmrg# ifdef DL_NOW 5388fe4c343aSmrg# define LT_DLLAZY_OR_NOW DL_NOW 5389fe4c343aSmrg# else 5390fe4c343aSmrg# define LT_DLLAZY_OR_NOW 0 5391fe4c343aSmrg# endif 5392fe4c343aSmrg# endif 5393fe4c343aSmrg# endif 5394fe4c343aSmrg# endif 5395fe4c343aSmrg#endif 53961bedbe3fSmrg 5397fe4c343aSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 5398fe4c343aSmrg correspondingly for the symbols needed. */ 5399fe4c343aSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5400fe4c343aSmrgint fnord () __attribute__((visibility("default"))); 5401fe4c343aSmrg#endif 54021bedbe3fSmrg 5403fe4c343aSmrgint fnord () { return 42; } 5404fe4c343aSmrgint main () 5405fe4c343aSmrg{ 5406fe4c343aSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5407fe4c343aSmrg int status = $lt_dlunknown; 54081bedbe3fSmrg 5409fe4c343aSmrg if (self) 5410fe4c343aSmrg { 5411fe4c343aSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 54121bedbe3fSmrg else 5413fe4c343aSmrg { 5414fe4c343aSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 5415fe4c343aSmrg else puts (dlerror ()); 5416fe4c343aSmrg } 5417fe4c343aSmrg /* dlclose (self); */ 5418fe4c343aSmrg } 5419fe4c343aSmrg else 5420fe4c343aSmrg puts (dlerror ()); 54211bedbe3fSmrg 5422fe4c343aSmrg return status; 5423fe4c343aSmrg}] 5424fe4c343aSmrg_LT_EOF 5425fe4c343aSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 5426fe4c343aSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 5427fe4c343aSmrg lt_status=$? 5428fe4c343aSmrg case x$lt_status in 5429fe4c343aSmrg x$lt_dlno_uscore) $1 ;; 5430fe4c343aSmrg x$lt_dlneed_uscore) $2 ;; 5431fe4c343aSmrg x$lt_dlunknown|x*) $3 ;; 5432fe4c343aSmrg esac 5433fe4c343aSmrg else : 5434fe4c343aSmrg # compilation failed 5435fe4c343aSmrg $3 5436fe4c343aSmrg fi 5437fe4c343aSmrgfi 5438fe4c343aSmrgrm -fr conftest* 5439fe4c343aSmrg])# _LT_TRY_DLOPEN_SELF 54401bedbe3fSmrg 54411bedbe3fSmrg 5442fe4c343aSmrg# LT_SYS_DLOPEN_SELF 5443fe4c343aSmrg# ------------------ 5444fe4c343aSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 5445fe4c343aSmrg[m4_require([_LT_HEADER_DLFCN])dnl 5446fe4c343aSmrgif test yes != "$enable_dlopen"; then 5447fe4c343aSmrg enable_dlopen=unknown 5448fe4c343aSmrg enable_dlopen_self=unknown 5449fe4c343aSmrg enable_dlopen_self_static=unknown 5450fe4c343aSmrgelse 5451fe4c343aSmrg lt_cv_dlopen=no 5452fe4c343aSmrg lt_cv_dlopen_libs= 54531bedbe3fSmrg 5454fe4c343aSmrg case $host_os in 5455fe4c343aSmrg beos*) 5456fe4c343aSmrg lt_cv_dlopen=load_add_on 5457fe4c343aSmrg lt_cv_dlopen_libs= 5458fe4c343aSmrg lt_cv_dlopen_self=yes 5459fe4c343aSmrg ;; 54601bedbe3fSmrg 5461fe4c343aSmrg mingw* | pw32* | cegcc*) 5462fe4c343aSmrg lt_cv_dlopen=LoadLibrary 5463fe4c343aSmrg lt_cv_dlopen_libs= 5464fe4c343aSmrg ;; 54651bedbe3fSmrg 5466fe4c343aSmrg cygwin*) 5467fe4c343aSmrg lt_cv_dlopen=dlopen 5468fe4c343aSmrg lt_cv_dlopen_libs= 5469fe4c343aSmrg ;; 54701bedbe3fSmrg 5471fe4c343aSmrg darwin*) 5472fe4c343aSmrg # if libdl is installed we need to link against it 5473fe4c343aSmrg AC_CHECK_LIB([dl], [dlopen], 5474fe4c343aSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 5475fe4c343aSmrg lt_cv_dlopen=dyld 5476fe4c343aSmrg lt_cv_dlopen_libs= 5477fe4c343aSmrg lt_cv_dlopen_self=yes 5478fe4c343aSmrg ]) 5479fe4c343aSmrg ;; 54801bedbe3fSmrg 5481fe4c343aSmrg tpf*) 5482fe4c343aSmrg # Don't try to run any link tests for TPF. We know it's impossible 5483fe4c343aSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 5484fe4c343aSmrg lt_cv_dlopen=dlopen 5485fe4c343aSmrg lt_cv_dlopen_libs= 5486fe4c343aSmrg lt_cv_dlopen_self=no 5487fe4c343aSmrg ;; 5488549e21daSmrg 5489fe4c343aSmrg *) 5490fe4c343aSmrg AC_CHECK_FUNC([shl_load], 5491fe4c343aSmrg [lt_cv_dlopen=shl_load], 5492fe4c343aSmrg [AC_CHECK_LIB([dld], [shl_load], 5493fe4c343aSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 5494fe4c343aSmrg [AC_CHECK_FUNC([dlopen], 5495fe4c343aSmrg [lt_cv_dlopen=dlopen], 5496fe4c343aSmrg [AC_CHECK_LIB([dl], [dlopen], 5497fe4c343aSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 5498fe4c343aSmrg [AC_CHECK_LIB([svld], [dlopen], 5499fe4c343aSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 5500fe4c343aSmrg [AC_CHECK_LIB([dld], [dld_link], 5501fe4c343aSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 5502fe4c343aSmrg ]) 5503fe4c343aSmrg ]) 5504fe4c343aSmrg ]) 5505fe4c343aSmrg ]) 5506fe4c343aSmrg ]) 5507fe4c343aSmrg ;; 5508fe4c343aSmrg esac 5509fe4c343aSmrg 5510fe4c343aSmrg if test no = "$lt_cv_dlopen"; then 5511fe4c343aSmrg enable_dlopen=no 55121bedbe3fSmrg else 5513fe4c343aSmrg enable_dlopen=yes 5514fe4c343aSmrg fi 55151bedbe3fSmrg 5516fe4c343aSmrg case $lt_cv_dlopen in 5517fe4c343aSmrg dlopen) 5518fe4c343aSmrg save_CPPFLAGS=$CPPFLAGS 5519fe4c343aSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 55201bedbe3fSmrg 5521fe4c343aSmrg save_LDFLAGS=$LDFLAGS 5522fe4c343aSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 55231bedbe3fSmrg 5524fe4c343aSmrg save_LIBS=$LIBS 5525fe4c343aSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 55261bedbe3fSmrg 5527fe4c343aSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 5528fe4c343aSmrg lt_cv_dlopen_self, [dnl 5529fe4c343aSmrg _LT_TRY_DLOPEN_SELF( 5530fe4c343aSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 5531fe4c343aSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 5532fe4c343aSmrg ]) 55331bedbe3fSmrg 5534fe4c343aSmrg if test yes = "$lt_cv_dlopen_self"; then 5535fe4c343aSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 5536fe4c343aSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 5537fe4c343aSmrg lt_cv_dlopen_self_static, [dnl 5538fe4c343aSmrg _LT_TRY_DLOPEN_SELF( 5539fe4c343aSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 5540fe4c343aSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 5541fe4c343aSmrg ]) 5542fe4c343aSmrg fi 55431bedbe3fSmrg 5544fe4c343aSmrg CPPFLAGS=$save_CPPFLAGS 5545fe4c343aSmrg LDFLAGS=$save_LDFLAGS 5546fe4c343aSmrg LIBS=$save_LIBS 5547fe4c343aSmrg ;; 5548fe4c343aSmrg esac 55491bedbe3fSmrg 5550fe4c343aSmrg case $lt_cv_dlopen_self in 5551fe4c343aSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 5552fe4c343aSmrg *) enable_dlopen_self=unknown ;; 5553fe4c343aSmrg esac 5554ba6a1819Smrg 5555fe4c343aSmrg case $lt_cv_dlopen_self_static in 5556fe4c343aSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 5557fe4c343aSmrg *) enable_dlopen_self_static=unknown ;; 5558fe4c343aSmrg esac 5559fe4c343aSmrgfi 5560fe4c343aSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 5561fe4c343aSmrg [Whether dlopen is supported]) 5562fe4c343aSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 5563fe4c343aSmrg [Whether dlopen of programs is supported]) 5564fe4c343aSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 5565fe4c343aSmrg [Whether dlopen of statically linked programs is supported]) 5566fe4c343aSmrg])# LT_SYS_DLOPEN_SELF 5567ba6a1819Smrg 5568fe4c343aSmrg# Old name: 5569fe4c343aSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 5570fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 5571fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 5572ba6a1819Smrg 5573ba6a1819Smrg 5574fe4c343aSmrg# _LT_COMPILER_C_O([TAGNAME]) 5575fe4c343aSmrg# --------------------------- 5576fe4c343aSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 5577fe4c343aSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 5578fe4c343aSmrgm4_defun([_LT_COMPILER_C_O], 5579fe4c343aSmrg[m4_require([_LT_DECL_SED])dnl 5580fe4c343aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5581fe4c343aSmrgm4_require([_LT_TAG_COMPILER])dnl 5582fe4c343aSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 5583fe4c343aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 5584fe4c343aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 5585fe4c343aSmrg $RM -r conftest 2>/dev/null 5586fe4c343aSmrg mkdir conftest 5587fe4c343aSmrg cd conftest 5588fe4c343aSmrg mkdir out 5589fe4c343aSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5590ba6a1819Smrg 5591fe4c343aSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 5592fe4c343aSmrg # Insert the option either (1) after the last *FLAGS variable, or 5593fe4c343aSmrg # (2) before a word containing "conftest.", or (3) at the end. 5594fe4c343aSmrg # Note that $ac_compile itself does not contain backslashes and begins 5595fe4c343aSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5596fe4c343aSmrg lt_compile=`echo "$ac_compile" | $SED \ 5597fe4c343aSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5598fe4c343aSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5599fe4c343aSmrg -e 's:$: $lt_compiler_flag:'` 5600fe4c343aSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5601fe4c343aSmrg (eval "$lt_compile" 2>out/conftest.err) 5602fe4c343aSmrg ac_status=$? 5603fe4c343aSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 5604fe4c343aSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5605fe4c343aSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 5606fe4c343aSmrg then 5607fe4c343aSmrg # The compiler can only warn and ignore the option if not recognized 5608fe4c343aSmrg # So say no if there are warnings 5609fe4c343aSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 5610fe4c343aSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 5611fe4c343aSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 5612fe4c343aSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 5613fe4c343aSmrg fi 5614fe4c343aSmrg fi 5615fe4c343aSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 5616fe4c343aSmrg $RM conftest* 5617fe4c343aSmrg # SGI C++ compiler will create directory out/ii_files/ for 5618fe4c343aSmrg # template instantiation 5619fe4c343aSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 5620fe4c343aSmrg $RM out/* && rmdir out 5621fe4c343aSmrg cd .. 5622fe4c343aSmrg $RM -r conftest 5623fe4c343aSmrg $RM conftest* 5624fe4c343aSmrg]) 5625fe4c343aSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 5626fe4c343aSmrg [Does compiler simultaneously support -c and -o options?]) 5627fe4c343aSmrg])# _LT_COMPILER_C_O 5628ba6a1819Smrg 5629ba6a1819Smrg 5630fe4c343aSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 5631fe4c343aSmrg# ---------------------------------- 5632fe4c343aSmrg# Check to see if we can do hard links to lock some files if needed 5633fe4c343aSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 5634fe4c343aSmrg[m4_require([_LT_ENABLE_LOCK])dnl 5635fe4c343aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5636fe4c343aSmrg_LT_COMPILER_C_O([$1]) 5637ba6a1819Smrg 5638fe4c343aSmrghard_links=nottested 5639fe4c343aSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 5640fe4c343aSmrg # do not overwrite the value of need_locks provided by the user 5641fe4c343aSmrg AC_MSG_CHECKING([if we can lock with hard links]) 5642fe4c343aSmrg hard_links=yes 5643fe4c343aSmrg $RM conftest* 5644fe4c343aSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5645fe4c343aSmrg touch conftest.a 5646fe4c343aSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 5647fe4c343aSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 5648fe4c343aSmrg AC_MSG_RESULT([$hard_links]) 5649fe4c343aSmrg if test no = "$hard_links"; then 5650fe4c343aSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 5651fe4c343aSmrg need_locks=warn 5652fe4c343aSmrg fi 5653fe4c343aSmrgelse 5654fe4c343aSmrg need_locks=no 5655fe4c343aSmrgfi 5656fe4c343aSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 5657fe4c343aSmrg])# _LT_COMPILER_FILE_LOCKS 5658ba6a1819Smrg 5659549e21daSmrg 5660fe4c343aSmrg# _LT_CHECK_OBJDIR 5661fe4c343aSmrg# ---------------- 5662fe4c343aSmrgm4_defun([_LT_CHECK_OBJDIR], 5663fe4c343aSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 5664fe4c343aSmrg[rm -f .libs 2>/dev/null 5665fe4c343aSmrgmkdir .libs 2>/dev/null 5666fe4c343aSmrgif test -d .libs; then 5667fe4c343aSmrg lt_cv_objdir=.libs 5668fe4c343aSmrgelse 5669fe4c343aSmrg # MS-DOS does not allow filenames that begin with a dot. 5670fe4c343aSmrg lt_cv_objdir=_libs 5671fe4c343aSmrgfi 5672fe4c343aSmrgrmdir .libs 2>/dev/null]) 5673fe4c343aSmrgobjdir=$lt_cv_objdir 5674fe4c343aSmrg_LT_DECL([], [objdir], [0], 5675fe4c343aSmrg [The name of the directory that contains temporary libtool files])dnl 5676fe4c343aSmrgm4_pattern_allow([LT_OBJDIR])dnl 5677fe4c343aSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 5678fe4c343aSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 5679fe4c343aSmrg])# _LT_CHECK_OBJDIR 5680549e21daSmrg 5681549e21daSmrg 5682fe4c343aSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 5683fe4c343aSmrg# -------------------------------------- 5684fe4c343aSmrg# Check hardcoding attributes. 5685fe4c343aSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 5686fe4c343aSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 5687fe4c343aSmrg_LT_TAGVAR(hardcode_action, $1)= 5688fe4c343aSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 5689fe4c343aSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 5690fe4c343aSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 56911bedbe3fSmrg 5692fe4c343aSmrg # We can hardcode non-existent directories. 5693fe4c343aSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 5694fe4c343aSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 5695fe4c343aSmrg # have to relink, otherwise we might link with an installed library 5696fe4c343aSmrg # when we should be linking with a yet-to-be-installed one 5697fe4c343aSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 5698fe4c343aSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 5699fe4c343aSmrg # Linking always hardcodes the temporary library directory. 5700fe4c343aSmrg _LT_TAGVAR(hardcode_action, $1)=relink 5701fe4c343aSmrg else 5702fe4c343aSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 5703fe4c343aSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 5704fe4c343aSmrg fi 5705fe4c343aSmrgelse 5706fe4c343aSmrg # We cannot hardcode anything, or else we can only hardcode existing 5707fe4c343aSmrg # directories. 5708fe4c343aSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 5709fe4c343aSmrgfi 5710fe4c343aSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 57111bedbe3fSmrg 5712fe4c343aSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 5713fe4c343aSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 5714fe4c343aSmrg # Fast installation is not supported 5715fe4c343aSmrg enable_fast_install=no 5716fe4c343aSmrgelif test yes = "$shlibpath_overrides_runpath" || 5717fe4c343aSmrg test no = "$enable_shared"; then 5718fe4c343aSmrg # Fast installation is not necessary 5719fe4c343aSmrg enable_fast_install=needless 5720fe4c343aSmrgfi 5721fe4c343aSmrg_LT_TAGDECL([], [hardcode_action], [0], 5722fe4c343aSmrg [How to hardcode a shared library path into an executable]) 5723fe4c343aSmrg])# _LT_LINKER_HARDCODE_LIBPATH 57241bedbe3fSmrg 5725ba6a1819Smrg 5726fe4c343aSmrg# _LT_CMD_STRIPLIB 5727fe4c343aSmrg# ---------------- 5728fe4c343aSmrgm4_defun([_LT_CMD_STRIPLIB], 5729fe4c343aSmrg[m4_require([_LT_DECL_EGREP]) 5730fe4c343aSmrgstriplib= 5731fe4c343aSmrgold_striplib= 5732fe4c343aSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 5733da1f2d5dSmrgif test -z "$STRIP"; then 5734da1f2d5dSmrg AC_MSG_RESULT([no]) 5735fe4c343aSmrgelse 5736da1f2d5dSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 5737da1f2d5dSmrg old_striplib="$STRIP --strip-debug" 5738da1f2d5dSmrg striplib="$STRIP --strip-unneeded" 5739da1f2d5dSmrg AC_MSG_RESULT([yes]) 5740da1f2d5dSmrg else 5741da1f2d5dSmrg case $host_os in 5742da1f2d5dSmrg darwin*) 5743da1f2d5dSmrg # FIXME - insert some real tests, host_os isn't really good enough 5744fe4c343aSmrg striplib="$STRIP -x" 5745fe4c343aSmrg old_striplib="$STRIP -S" 5746fe4c343aSmrg AC_MSG_RESULT([yes]) 5747da1f2d5dSmrg ;; 5748da1f2d5dSmrg freebsd*) 5749da1f2d5dSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 5750da1f2d5dSmrg old_striplib="$STRIP --strip-debug" 5751da1f2d5dSmrg striplib="$STRIP --strip-unneeded" 5752da1f2d5dSmrg AC_MSG_RESULT([yes]) 5753da1f2d5dSmrg else 5754da1f2d5dSmrg AC_MSG_RESULT([no]) 5755da1f2d5dSmrg fi 5756da1f2d5dSmrg ;; 5757da1f2d5dSmrg *) 5758fe4c343aSmrg AC_MSG_RESULT([no]) 5759da1f2d5dSmrg ;; 5760da1f2d5dSmrg esac 5761da1f2d5dSmrg fi 5762fe4c343aSmrgfi 5763fe4c343aSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 5764fe4c343aSmrg_LT_DECL([], [striplib], [1]) 5765fe4c343aSmrg])# _LT_CMD_STRIPLIB 5766ba6a1819Smrg 5767ba6a1819Smrg 5768fe4c343aSmrg# _LT_PREPARE_MUNGE_PATH_LIST 5769fe4c343aSmrg# --------------------------- 5770fe4c343aSmrg# Make sure func_munge_path_list() is defined correctly. 5771fe4c343aSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 5772fe4c343aSmrg[[# func_munge_path_list VARIABLE PATH 5773fe4c343aSmrg# ----------------------------------- 5774fe4c343aSmrg# VARIABLE is name of variable containing _space_ separated list of 5775fe4c343aSmrg# directories to be munged by the contents of PATH, which is string 5776fe4c343aSmrg# having a format: 5777fe4c343aSmrg# "DIR[:DIR]:" 5778fe4c343aSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 5779fe4c343aSmrg# ":DIR[:DIR]" 5780fe4c343aSmrg# string "DIR[ DIR]" will be appended to VARIABLE 5781fe4c343aSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 5782fe4c343aSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 5783fe4c343aSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 5784fe4c343aSmrg# "DIR[:DIR]" 5785fe4c343aSmrg# VARIABLE will be replaced by "DIR[ DIR]" 5786fe4c343aSmrgfunc_munge_path_list () 5787fe4c343aSmrg{ 5788fe4c343aSmrg case x@S|@2 in 5789fe4c343aSmrg x) 5790fe4c343aSmrg ;; 5791fe4c343aSmrg *:) 5792fe4c343aSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 5793fe4c343aSmrg ;; 5794fe4c343aSmrg x:*) 5795fe4c343aSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 5796fe4c343aSmrg ;; 5797fe4c343aSmrg *::*) 5798fe4c343aSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 5799fe4c343aSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 5800fe4c343aSmrg ;; 5801fe4c343aSmrg *) 5802fe4c343aSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5803fe4c343aSmrg ;; 5804fe4c343aSmrg esac 5805fe4c343aSmrg} 5806fe4c343aSmrg]])# _LT_PREPARE_PATH_LIST 5807ba6a1819Smrg 58081bedbe3fSmrg 5809fe4c343aSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 5810fe4c343aSmrg# ----------------------------- 5811fe4c343aSmrg# PORTME Fill in your ld.so characteristics 5812fe4c343aSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 5813fe4c343aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5814fe4c343aSmrgm4_require([_LT_DECL_EGREP])dnl 5815fe4c343aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5816fe4c343aSmrgm4_require([_LT_DECL_OBJDUMP])dnl 5817fe4c343aSmrgm4_require([_LT_DECL_SED])dnl 5818fe4c343aSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 5819fe4c343aSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 5820fe4c343aSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 5821fe4c343aSmrgm4_if([$1], 5822fe4c343aSmrg [], [ 5823fe4c343aSmrgif test yes = "$GCC"; then 5824fe4c343aSmrg case $host_os in 5825fe4c343aSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 5826fe4c343aSmrg *) lt_awk_arg='/^libraries:/' ;; 5827fe4c343aSmrg esac 5828fe4c343aSmrg case $host_os in 5829fe4c343aSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 5830fe4c343aSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 5831fe4c343aSmrg esac 5832fe4c343aSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 5833fe4c343aSmrg case $lt_search_path_spec in 5834fe4c343aSmrg *\;*) 5835fe4c343aSmrg # if the path contains ";" then we assume it to be the separator 5836fe4c343aSmrg # otherwise default to the standard path separator (i.e. ":") - it is 5837fe4c343aSmrg # assumed that no part of a normal pathname contains ";" but that should 5838fe4c343aSmrg # okay in the real world where ";" in dirpaths is itself problematic. 5839fe4c343aSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 5840fe4c343aSmrg ;; 5841fe4c343aSmrg *) 5842fe4c343aSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 5843fe4c343aSmrg ;; 5844fe4c343aSmrg esac 5845fe4c343aSmrg # Ok, now we have the path, separated by spaces, we can step through it 5846fe4c343aSmrg # and add multilib dir if necessary... 5847fe4c343aSmrg lt_tmp_lt_search_path_spec= 5848fe4c343aSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 5849fe4c343aSmrg # ...but if some path component already ends with the multilib dir we assume 5850fe4c343aSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 5851fe4c343aSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 5852fe4c343aSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 5853fe4c343aSmrg lt_multi_os_dir= 5854fe4c343aSmrg ;; 5855fe4c343aSmrg esac 5856fe4c343aSmrg for lt_sys_path in $lt_search_path_spec; do 5857fe4c343aSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 5858fe4c343aSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 5859fe4c343aSmrg elif test -n "$lt_multi_os_dir"; then 5860fe4c343aSmrg test -d "$lt_sys_path" && \ 5861fe4c343aSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 5862fe4c343aSmrg fi 5863fe4c343aSmrg done 5864fe4c343aSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 5865fe4c343aSmrgBEGIN {RS = " "; FS = "/|\n";} { 5866fe4c343aSmrg lt_foo = ""; 5867fe4c343aSmrg lt_count = 0; 5868fe4c343aSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 5869fe4c343aSmrg if ($lt_i != "" && $lt_i != ".") { 5870fe4c343aSmrg if ($lt_i == "..") { 5871fe4c343aSmrg lt_count++; 5872fe4c343aSmrg } else { 5873fe4c343aSmrg if (lt_count == 0) { 5874fe4c343aSmrg lt_foo = "/" $lt_i lt_foo; 5875fe4c343aSmrg } else { 5876fe4c343aSmrg lt_count--; 5877fe4c343aSmrg } 5878fe4c343aSmrg } 5879fe4c343aSmrg } 5880fe4c343aSmrg } 5881fe4c343aSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 5882fe4c343aSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 5883fe4c343aSmrg}'` 5884fe4c343aSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 5885fe4c343aSmrg # for these hosts. 5886fe4c343aSmrg case $host_os in 5887fe4c343aSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 5888fe4c343aSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 5889fe4c343aSmrg esac 5890fe4c343aSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 5891fe4c343aSmrgelse 5892fe4c343aSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 5893fe4c343aSmrgfi]) 5894fe4c343aSmrglibrary_names_spec= 5895fe4c343aSmrglibname_spec='lib$name' 5896fe4c343aSmrgsoname_spec= 5897fe4c343aSmrgshrext_cmds=.so 5898fe4c343aSmrgpostinstall_cmds= 5899fe4c343aSmrgpostuninstall_cmds= 5900fe4c343aSmrgfinish_cmds= 5901fe4c343aSmrgfinish_eval= 5902fe4c343aSmrgshlibpath_var= 5903fe4c343aSmrgshlibpath_overrides_runpath=unknown 5904fe4c343aSmrgversion_type=none 5905fe4c343aSmrgdynamic_linker="$host_os ld.so" 5906fe4c343aSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 5907fe4c343aSmrgneed_lib_prefix=unknown 5908fe4c343aSmrghardcode_into_libs=no 59091bedbe3fSmrg 5910fe4c343aSmrg# when you set need_version to no, make sure it does not cause -set_version 5911fe4c343aSmrg# flags to be left without arguments 5912fe4c343aSmrgneed_version=unknown 59131bedbe3fSmrg 5914fe4c343aSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 5915fe4c343aSmrg[User-defined run-time library search path.]) 5916ba6a1819Smrg 5917fe4c343aSmrgcase $host_os in 5918fe4c343aSmrgaix3*) 5919fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 5920fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 5921fe4c343aSmrg shlibpath_var=LIBPATH 5922ba6a1819Smrg 5923fe4c343aSmrg # AIX 3 has no versioning support, so we append a major version to the name. 5924fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 5925fe4c343aSmrg ;; 5926fe4c343aSmrg 5927fe4c343aSmrgaix[[4-9]]*) 5928fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 5929fe4c343aSmrg need_lib_prefix=no 5930fe4c343aSmrg need_version=no 5931fe4c343aSmrg hardcode_into_libs=yes 5932fe4c343aSmrg if test ia64 = "$host_cpu"; then 5933fe4c343aSmrg # AIX 5 supports IA64 5934fe4c343aSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 5935fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 5936fe4c343aSmrg else 5937fe4c343aSmrg # With GCC up to 2.95.x, collect2 would create an import file 5938fe4c343aSmrg # for dependence libraries. The import file would start with 5939fe4c343aSmrg # the line '#! .'. This would cause the generated library to 5940fe4c343aSmrg # depend on '.', always an invalid library. This was fixed in 5941fe4c343aSmrg # development snapshots of GCC prior to 3.0. 5942fe4c343aSmrg case $host_os in 5943fe4c343aSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 5944fe4c343aSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5945fe4c343aSmrg echo ' yes ' 5946fe4c343aSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 5947fe4c343aSmrg : 59481bedbe3fSmrg else 5949fe4c343aSmrg can_build_shared=no 59501bedbe3fSmrg fi 5951549e21daSmrg ;; 5952fe4c343aSmrg esac 5953fe4c343aSmrg # Using Import Files as archive members, it is possible to support 5954fe4c343aSmrg # filename-based versioning of shared library archives on AIX. While 5955fe4c343aSmrg # this would work for both with and without runtime linking, it will 5956fe4c343aSmrg # prevent static linking of such archives. So we do filename-based 5957fe4c343aSmrg # shared library versioning with .so extension only, which is used 5958fe4c343aSmrg # when both runtime linking and shared linking is enabled. 5959fe4c343aSmrg # Unfortunately, runtime linking may impact performance, so we do 5960fe4c343aSmrg # not want this to be the default eventually. Also, we use the 5961fe4c343aSmrg # versioned .so libs for executables only if there is the -brtl 5962fe4c343aSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 5963fe4c343aSmrg # To allow for filename-based versioning support, we need to create 5964fe4c343aSmrg # libNAME.so.V as an archive file, containing: 5965fe4c343aSmrg # *) an Import File, referring to the versioned filename of the 5966fe4c343aSmrg # archive as well as the shared archive member, telling the 5967fe4c343aSmrg # bitwidth (32 or 64) of that shared object, and providing the 5968fe4c343aSmrg # list of exported symbols of that shared object, eventually 5969fe4c343aSmrg # decorated with the 'weak' keyword 5970fe4c343aSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 5971fe4c343aSmrg # it being seen by the linker. 5972fe4c343aSmrg # At run time we better use the real file rather than another symlink, 5973fe4c343aSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5974fe4c343aSmrg 5975fe4c343aSmrg case $with_aix_soname,$aix_use_runtimelinking in 5976fe4c343aSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 5977fe4c343aSmrg # soname into executable. Probably we can add versioning support to 5978fe4c343aSmrg # collect2, so additional links can be useful in future. 5979fe4c343aSmrg aix,yes) # traditional libtool 5980fe4c343aSmrg dynamic_linker='AIX unversionable lib.so' 5981fe4c343aSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5982fe4c343aSmrg # instead of lib<name>.a to let people know that these are not 5983fe4c343aSmrg # typical AIX shared libraries. 5984fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 59851bedbe3fSmrg ;; 5986fe4c343aSmrg aix,no) # traditional AIX only 5987fe4c343aSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 5988fe4c343aSmrg # We preserve .a as extension for shared libraries through AIX4.2 5989fe4c343aSmrg # and later when we are not doing run time linking. 5990fe4c343aSmrg library_names_spec='$libname$release.a $libname.a' 5991fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 5992549e21daSmrg ;; 5993fe4c343aSmrg svr4,*) # full svr4 only 5994fe4c343aSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 5995fe4c343aSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 5996fe4c343aSmrg # We do not specify a path in Import Files, so LIBPATH fires. 5997fe4c343aSmrg shlibpath_overrides_runpath=yes 5998549e21daSmrg ;; 5999fe4c343aSmrg *,yes) # both, prefer svr4 6000fe4c343aSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 6001fe4c343aSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 6002fe4c343aSmrg # unpreferred sharedlib libNAME.a needs extra handling 6003fe4c343aSmrg 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"' 6004fe4c343aSmrg 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"' 6005fe4c343aSmrg # We do not specify a path in Import Files, so LIBPATH fires. 6006fe4c343aSmrg shlibpath_overrides_runpath=yes 6007fe4c343aSmrg ;; 6008fe4c343aSmrg *,no) # both, prefer aix 6009fe4c343aSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 6010fe4c343aSmrg library_names_spec='$libname$release.a $libname.a' 6011fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6012fe4c343aSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 6013fe4c343aSmrg 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)' 6014fe4c343aSmrg 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"' 6015fe4c343aSmrg ;; 6016fe4c343aSmrg esac 6017fe4c343aSmrg shlibpath_var=LIBPATH 6018fe4c343aSmrg fi 6019fe4c343aSmrg ;; 6020ba6a1819Smrg 6021fe4c343aSmrgamigaos*) 6022fe4c343aSmrg case $host_cpu in 6023fe4c343aSmrg powerpc) 6024fe4c343aSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 6025fe4c343aSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 6026fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6027fe4c343aSmrg ;; 6028fe4c343aSmrg m68k) 6029fe4c343aSmrg library_names_spec='$libname.ixlibrary $libname.a' 6030fe4c343aSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 6031fe4c343aSmrg 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' 6032fe4c343aSmrg ;; 6033fe4c343aSmrg esac 6034fe4c343aSmrg ;; 60351bedbe3fSmrg 6036fe4c343aSmrgbeos*) 6037fe4c343aSmrg library_names_spec='$libname$shared_ext' 6038fe4c343aSmrg dynamic_linker="$host_os ld.so" 6039fe4c343aSmrg shlibpath_var=LIBRARY_PATH 6040fe4c343aSmrg ;; 6041ba6a1819Smrg 6042fe4c343aSmrgbsdi[[45]]*) 6043fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6044fe4c343aSmrg need_version=no 6045fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6046fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6047fe4c343aSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 6048fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6049fe4c343aSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 6050fe4c343aSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 6051fe4c343aSmrg # the default ld.so.conf also contains /usr/contrib/lib and 6052fe4c343aSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 6053fe4c343aSmrg # libtool to hard-code these into programs 6054fe4c343aSmrg ;; 60551bedbe3fSmrg 6056fe4c343aSmrgcygwin* | mingw* | pw32* | cegcc*) 6057fe4c343aSmrg version_type=windows 6058fe4c343aSmrg shrext_cmds=.dll 6059fe4c343aSmrg need_version=no 6060fe4c343aSmrg need_lib_prefix=no 6061ba6a1819Smrg 6062fe4c343aSmrg case $GCC,$cc_basename in 6063fe4c343aSmrg yes,*) 6064fe4c343aSmrg # gcc 6065fe4c343aSmrg library_names_spec='$libname.dll.a' 6066fe4c343aSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 6067fe4c343aSmrg postinstall_cmds='base_file=`basename \$file`~ 6068fe4c343aSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6069fe4c343aSmrg dldir=$destdir/`dirname \$dlpath`~ 6070fe4c343aSmrg test -d \$dldir || mkdir -p \$dldir~ 6071fe4c343aSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 6072fe4c343aSmrg chmod a+x \$dldir/$dlname~ 6073fe4c343aSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6074fe4c343aSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6075fe4c343aSmrg fi' 6076fe4c343aSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6077fe4c343aSmrg dlpath=$dir/\$dldll~ 6078fe4c343aSmrg $RM \$dlpath' 6079fe4c343aSmrg shlibpath_overrides_runpath=yes 6080fe4c343aSmrg 6081fe4c343aSmrg case $host_os in 6082fe4c343aSmrg cygwin*) 6083fe4c343aSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 6084da1f2d5dSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6085fe4c343aSmrgm4_if([$1], [],[ 6086fe4c343aSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 6087549e21daSmrg ;; 6088fe4c343aSmrg mingw* | cegcc*) 6089fe4c343aSmrg # MinGW DLLs use traditional 'lib' prefix 6090fe4c343aSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6091fe4c343aSmrg ;; 6092fe4c343aSmrg pw32*) 6093fe4c343aSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 6094da1f2d5dSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6095fe4c343aSmrg ;; 6096fe4c343aSmrg esac 6097fe4c343aSmrg dynamic_linker='Win32 ld.exe' 6098fe4c343aSmrg ;; 6099fe4c343aSmrg 6100da1f2d5dSmrg *,cl* | *,icl*) 6101da1f2d5dSmrg # Native MSVC or ICC 6102fe4c343aSmrg libname_spec='$name' 6103fe4c343aSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6104fe4c343aSmrg library_names_spec='$libname.dll.lib' 6105ba6a1819Smrg 6106fe4c343aSmrg case $build_os in 6107fe4c343aSmrg mingw*) 6108fe4c343aSmrg sys_lib_search_path_spec= 6109fe4c343aSmrg lt_save_ifs=$IFS 6110fe4c343aSmrg IFS=';' 6111fe4c343aSmrg for lt_path in $LIB 6112fe4c343aSmrg do 6113fe4c343aSmrg IFS=$lt_save_ifs 6114fe4c343aSmrg # Let DOS variable expansion print the short 8.3 style file name. 6115fe4c343aSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 6116fe4c343aSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 6117fe4c343aSmrg done 6118fe4c343aSmrg IFS=$lt_save_ifs 6119fe4c343aSmrg # Convert to MSYS style. 6120da1f2d5dSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 6121fe4c343aSmrg ;; 6122fe4c343aSmrg cygwin*) 6123fe4c343aSmrg # Convert to unix form, then to dos form, then back to unix form 6124fe4c343aSmrg # but this time dos style (no spaces!) so that the unix form looks 6125fe4c343aSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 6126fe4c343aSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6127fe4c343aSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6128fe4c343aSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6129fe4c343aSmrg ;; 6130549e21daSmrg *) 6131fe4c343aSmrg sys_lib_search_path_spec=$LIB 6132fe4c343aSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6133fe4c343aSmrg # It is most probably a Windows format PATH. 6134fe4c343aSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6135fe4c343aSmrg else 6136fe4c343aSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6137fe4c343aSmrg fi 6138fe4c343aSmrg # FIXME: find the short name or the path components, as spaces are 6139fe4c343aSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 6140549e21daSmrg ;; 6141ba6a1819Smrg esac 61421bedbe3fSmrg 6143fe4c343aSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 6144fe4c343aSmrg postinstall_cmds='base_file=`basename \$file`~ 6145fe4c343aSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6146fe4c343aSmrg dldir=$destdir/`dirname \$dlpath`~ 6147fe4c343aSmrg test -d \$dldir || mkdir -p \$dldir~ 6148fe4c343aSmrg $install_prog $dir/$dlname \$dldir/$dlname' 6149fe4c343aSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6150fe4c343aSmrg dlpath=$dir/\$dldll~ 6151fe4c343aSmrg $RM \$dlpath' 6152fe4c343aSmrg shlibpath_overrides_runpath=yes 6153fe4c343aSmrg dynamic_linker='Win32 link.exe' 6154fe4c343aSmrg ;; 61551bedbe3fSmrg 6156fe4c343aSmrg *) 6157da1f2d5dSmrg # Assume MSVC and ICC wrapper 6158fe4c343aSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6159fe4c343aSmrg dynamic_linker='Win32 ld.exe' 6160fe4c343aSmrg ;; 6161fe4c343aSmrg esac 6162fe4c343aSmrg # FIXME: first we should search . and the directory the executable is in 6163fe4c343aSmrg shlibpath_var=PATH 6164fe4c343aSmrg ;; 6165ba6a1819Smrg 6166fe4c343aSmrgdarwin* | rhapsody*) 6167fe4c343aSmrg dynamic_linker="$host_os dyld" 6168fe4c343aSmrg version_type=darwin 6169fe4c343aSmrg need_lib_prefix=no 6170fe4c343aSmrg need_version=no 6171fe4c343aSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6172fe4c343aSmrg soname_spec='$libname$release$major$shared_ext' 6173fe4c343aSmrg shlibpath_overrides_runpath=yes 6174fe4c343aSmrg shlibpath_var=DYLD_LIBRARY_PATH 6175fe4c343aSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6176fe4c343aSmrgm4_if([$1], [],[ 6177fe4c343aSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6178fe4c343aSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6179fe4c343aSmrg ;; 6180ba6a1819Smrg 6181fe4c343aSmrgdgux*) 6182fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6183fe4c343aSmrg need_lib_prefix=no 6184fe4c343aSmrg need_version=no 6185fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6186fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6187fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6188fe4c343aSmrg ;; 6189ba6a1819Smrg 6190da1f2d5dSmrgfreebsd* | dragonfly* | midnightbsd*) 6191fe4c343aSmrg # DragonFly does not have aout. When/if they implement a new 6192fe4c343aSmrg # versioning mechanism, adjust this. 6193fe4c343aSmrg if test -x /usr/bin/objformat; then 6194fe4c343aSmrg objformat=`/usr/bin/objformat` 6195fe4c343aSmrg else 6196fe4c343aSmrg case $host_os in 6197fe4c343aSmrg freebsd[[23]].*) objformat=aout ;; 6198fe4c343aSmrg *) objformat=elf ;; 61991bedbe3fSmrg esac 62001bedbe3fSmrg fi 6201fe4c343aSmrg version_type=freebsd-$objformat 6202fe4c343aSmrg case $version_type in 6203fe4c343aSmrg freebsd-elf*) 6204fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6205fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6206fe4c343aSmrg need_version=no 6207fe4c343aSmrg need_lib_prefix=no 6208fe4c343aSmrg ;; 6209fe4c343aSmrg freebsd-*) 6210fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6211fe4c343aSmrg need_version=yes 6212fe4c343aSmrg ;; 6213fe4c343aSmrg esac 6214fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6215fe4c343aSmrg case $host_os in 6216fe4c343aSmrg freebsd2.*) 6217fe4c343aSmrg shlibpath_overrides_runpath=yes 6218fe4c343aSmrg ;; 6219fe4c343aSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6220fe4c343aSmrg shlibpath_overrides_runpath=yes 6221fe4c343aSmrg hardcode_into_libs=yes 6222fe4c343aSmrg ;; 6223fe4c343aSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6224fe4c343aSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6225fe4c343aSmrg shlibpath_overrides_runpath=no 6226fe4c343aSmrg hardcode_into_libs=yes 6227fe4c343aSmrg ;; 6228fe4c343aSmrg *) # from 4.6 on, and DragonFly 6229fe4c343aSmrg shlibpath_overrides_runpath=yes 6230fe4c343aSmrg hardcode_into_libs=yes 6231fe4c343aSmrg ;; 6232fe4c343aSmrg esac 6233fe4c343aSmrg ;; 62341bedbe3fSmrg 6235fe4c343aSmrghaiku*) 6236fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6237fe4c343aSmrg need_lib_prefix=no 6238fe4c343aSmrg need_version=no 6239fe4c343aSmrg dynamic_linker="$host_os runtime_loader" 6240fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6241fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6242fe4c343aSmrg shlibpath_var=LIBRARY_PATH 6243fe4c343aSmrg shlibpath_overrides_runpath=no 6244fe4c343aSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6245fe4c343aSmrg hardcode_into_libs=yes 6246fe4c343aSmrg ;; 62471bedbe3fSmrg 6248fe4c343aSmrghpux9* | hpux10* | hpux11*) 6249fe4c343aSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 6250fe4c343aSmrg # link against other versions. 6251fe4c343aSmrg version_type=sunos 6252fe4c343aSmrg need_lib_prefix=no 6253fe4c343aSmrg need_version=no 6254fe4c343aSmrg case $host_cpu in 6255fe4c343aSmrg ia64*) 6256fe4c343aSmrg shrext_cmds='.so' 6257fe4c343aSmrg hardcode_into_libs=yes 6258fe4c343aSmrg dynamic_linker="$host_os dld.so" 6259fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6260fe4c343aSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6261fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6262fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6263fe4c343aSmrg if test 32 = "$HPUX_IA64_MODE"; then 6264fe4c343aSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6265fe4c343aSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6266fe4c343aSmrg else 6267fe4c343aSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6268fe4c343aSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6269fe4c343aSmrg fi 6270fe4c343aSmrg ;; 6271fe4c343aSmrg hppa*64*) 6272fe4c343aSmrg shrext_cmds='.sl' 6273fe4c343aSmrg hardcode_into_libs=yes 6274fe4c343aSmrg dynamic_linker="$host_os dld.sl" 6275fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6276fe4c343aSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6277fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6278fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6279fe4c343aSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6280fe4c343aSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6281fe4c343aSmrg ;; 6282fe4c343aSmrg *) 6283fe4c343aSmrg shrext_cmds='.sl' 6284fe4c343aSmrg dynamic_linker="$host_os dld.sl" 6285fe4c343aSmrg shlibpath_var=SHLIB_PATH 6286fe4c343aSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6287fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6288fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6289fe4c343aSmrg ;; 6290fe4c343aSmrg esac 6291fe4c343aSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6292fe4c343aSmrg postinstall_cmds='chmod 555 $lib' 6293fe4c343aSmrg # or fails outright, so override atomically: 6294fe4c343aSmrg install_override_mode=555 6295fe4c343aSmrg ;; 62961bedbe3fSmrg 6297fe4c343aSmrginterix[[3-9]]*) 6298fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6299fe4c343aSmrg need_lib_prefix=no 6300fe4c343aSmrg need_version=no 6301fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6302fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6303fe4c343aSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6304fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6305fe4c343aSmrg shlibpath_overrides_runpath=no 6306fe4c343aSmrg hardcode_into_libs=yes 6307fe4c343aSmrg ;; 6308ba6a1819Smrg 6309fe4c343aSmrgirix5* | irix6* | nonstopux*) 6310549e21daSmrg case $host_os in 6311fe4c343aSmrg nonstopux*) version_type=nonstopux ;; 6312fe4c343aSmrg *) 6313fe4c343aSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 6314fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6315fe4c343aSmrg else 6316fe4c343aSmrg version_type=irix 6317fe4c343aSmrg fi ;; 6318fe4c343aSmrg esac 6319fe4c343aSmrg need_lib_prefix=no 6320fe4c343aSmrg need_version=no 6321fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6322fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6323fe4c343aSmrg case $host_os in 6324fe4c343aSmrg irix5* | nonstopux*) 6325fe4c343aSmrg libsuff= shlibsuff= 6326549e21daSmrg ;; 6327fe4c343aSmrg *) 6328fe4c343aSmrg case $LD in # libtool.m4 will add one of these switches to LD 6329fe4c343aSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6330fe4c343aSmrg libsuff= shlibsuff= libmagic=32-bit;; 6331fe4c343aSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6332fe4c343aSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6333fe4c343aSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6334fe4c343aSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6335fe4c343aSmrg *) libsuff= shlibsuff= libmagic=never-match;; 6336fe4c343aSmrg esac 6337549e21daSmrg ;; 6338549e21daSmrg esac 6339fe4c343aSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6340fe4c343aSmrg shlibpath_overrides_runpath=no 6341fe4c343aSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6342fe4c343aSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6343fe4c343aSmrg hardcode_into_libs=yes 6344fe4c343aSmrg ;; 6345ba6a1819Smrg 6346fe4c343aSmrg# No shared lib support for Linux oldld, aout, or coff. 6347fe4c343aSmrglinux*oldld* | linux*aout* | linux*coff*) 6348fe4c343aSmrg dynamic_linker=no 6349fe4c343aSmrg ;; 6350ba6a1819Smrg 6351fe4c343aSmrglinux*android*) 6352fe4c343aSmrg version_type=none # Android doesn't support versioned libraries. 6353fe4c343aSmrg need_lib_prefix=no 6354fe4c343aSmrg need_version=no 6355fe4c343aSmrg library_names_spec='$libname$release$shared_ext' 6356fe4c343aSmrg soname_spec='$libname$release$shared_ext' 6357fe4c343aSmrg finish_cmds= 6358fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6359fe4c343aSmrg shlibpath_overrides_runpath=yes 6360ba6a1819Smrg 6361fe4c343aSmrg # This implies no fast_install, which is unacceptable. 6362fe4c343aSmrg # Some rework will be needed to allow for fast_install 6363fe4c343aSmrg # before this can be enabled. 6364fe4c343aSmrg hardcode_into_libs=yes 6365ba6a1819Smrg 6366fe4c343aSmrg dynamic_linker='Android linker' 6367fe4c343aSmrg # Don't embed -rpath directories since the linker doesn't support them. 6368fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6369fe4c343aSmrg ;; 63701bedbe3fSmrg 6371fe4c343aSmrg# This must be glibc/ELF. 6372fe4c343aSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6373fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6374fe4c343aSmrg need_lib_prefix=no 6375fe4c343aSmrg need_version=no 6376fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6377fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6378fe4c343aSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6379fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6380fe4c343aSmrg shlibpath_overrides_runpath=no 63811bedbe3fSmrg 6382fe4c343aSmrg # Some binutils ld are patched to set DT_RUNPATH 6383fe4c343aSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6384fe4c343aSmrg [lt_cv_shlibpath_overrides_runpath=no 6385fe4c343aSmrg save_LDFLAGS=$LDFLAGS 6386fe4c343aSmrg save_libdir=$libdir 6387fe4c343aSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6388fe4c343aSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6389fe4c343aSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6390fe4c343aSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6391fe4c343aSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6392fe4c343aSmrg LDFLAGS=$save_LDFLAGS 6393fe4c343aSmrg libdir=$save_libdir 6394fe4c343aSmrg ]) 6395fe4c343aSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 63961bedbe3fSmrg 6397fe4c343aSmrg # This implies no fast_install, which is unacceptable. 6398fe4c343aSmrg # Some rework will be needed to allow for fast_install 6399fe4c343aSmrg # before this can be enabled. 6400fe4c343aSmrg hardcode_into_libs=yes 64011bedbe3fSmrg 6402fe4c343aSmrg # Ideally, we could use ldconfig to report *all* directores which are 6403fe4c343aSmrg # searched for libraries, however this is still not possible. Aside from not 6404fe4c343aSmrg # being certain /sbin/ldconfig is available, command 6405fe4c343aSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6406fe4c343aSmrg # even though it is searched at run-time. Try to do the best guess by 6407fe4c343aSmrg # appending ld.so.conf contents (and includes) to the search path. 6408fe4c343aSmrg if test -f /etc/ld.so.conf; then 6409fe4c343aSmrg 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' ' '` 6410fe4c343aSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 6411fe4c343aSmrg fi 64121bedbe3fSmrg 6413fe4c343aSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 6414fe4c343aSmrg # powerpc, because MkLinux only supported shared libraries with the 6415fe4c343aSmrg # GNU dynamic linker. Since this was broken with cross compilers, 6416fe4c343aSmrg # most powerpc-linux boxes support dynamic linking these days and 6417fe4c343aSmrg # people can always --disable-shared, the test was removed, and we 6418fe4c343aSmrg # assume the GNU/Linux dynamic linker is in use. 6419fe4c343aSmrg dynamic_linker='GNU/Linux ld.so' 6420fe4c343aSmrg ;; 64211bedbe3fSmrg 6422fe4c343aSmrgnetbsd*) 6423fe4c343aSmrg version_type=sunos 6424fe4c343aSmrg need_lib_prefix=no 6425fe4c343aSmrg need_version=no 6426fe4c343aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6427fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6428fe4c343aSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6429fe4c343aSmrg dynamic_linker='NetBSD (a.out) ld.so' 64301bedbe3fSmrg else 6431fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6432fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6433fe4c343aSmrg dynamic_linker='NetBSD ld.elf_so' 64341bedbe3fSmrg fi 6435fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6436fe4c343aSmrg shlibpath_overrides_runpath=yes 6437fe4c343aSmrg hardcode_into_libs=yes 6438fe4c343aSmrg ;; 64391bedbe3fSmrg 6440fe4c343aSmrgnewsos6) 6441fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6442fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6443fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6444fe4c343aSmrg shlibpath_overrides_runpath=yes 6445fe4c343aSmrg ;; 6446ba6a1819Smrg 6447fe4c343aSmrg*nto* | *qnx*) 6448fe4c343aSmrg version_type=qnx 6449fe4c343aSmrg need_lib_prefix=no 6450fe4c343aSmrg need_version=no 6451fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6452fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6453fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6454fe4c343aSmrg shlibpath_overrides_runpath=no 6455fe4c343aSmrg hardcode_into_libs=yes 6456fe4c343aSmrg dynamic_linker='ldqnx.so' 6457fe4c343aSmrg ;; 6458ba6a1819Smrg 6459fe4c343aSmrgopenbsd* | bitrig*) 6460fe4c343aSmrg version_type=sunos 6461fe4c343aSmrg sys_lib_dlsearch_path_spec=/usr/lib 6462fe4c343aSmrg need_lib_prefix=no 6463fe4c343aSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 6464fe4c343aSmrg need_version=no 6465fe4c343aSmrg else 6466fe4c343aSmrg need_version=yes 6467fe4c343aSmrg fi 6468fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6469fe4c343aSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6470fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6471fe4c343aSmrg shlibpath_overrides_runpath=yes 6472fe4c343aSmrg ;; 64731bedbe3fSmrg 6474fe4c343aSmrgos2*) 6475fe4c343aSmrg libname_spec='$name' 6476fe4c343aSmrg version_type=windows 6477fe4c343aSmrg shrext_cmds=.dll 6478fe4c343aSmrg need_version=no 6479fe4c343aSmrg need_lib_prefix=no 6480fe4c343aSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 6481fe4c343aSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 6482fe4c343aSmrg v=$($ECHO $release$versuffix | tr -d .-); 6483fe4c343aSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 6484fe4c343aSmrg $ECHO $n$v`$shared_ext' 6485fe4c343aSmrg library_names_spec='${libname}_dll.$libext' 6486fe4c343aSmrg dynamic_linker='OS/2 ld.exe' 6487fe4c343aSmrg shlibpath_var=BEGINLIBPATH 6488fe4c343aSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6489fe4c343aSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6490fe4c343aSmrg postinstall_cmds='base_file=`basename \$file`~ 6491fe4c343aSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 6492fe4c343aSmrg dldir=$destdir/`dirname \$dlpath`~ 6493fe4c343aSmrg test -d \$dldir || mkdir -p \$dldir~ 6494fe4c343aSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 6495fe4c343aSmrg chmod a+x \$dldir/$dlname~ 6496fe4c343aSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6497fe4c343aSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6498fe4c343aSmrg fi' 6499fe4c343aSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 6500fe4c343aSmrg dlpath=$dir/\$dldll~ 6501fe4c343aSmrg $RM \$dlpath' 6502fe4c343aSmrg ;; 65031bedbe3fSmrg 6504fe4c343aSmrgosf3* | osf4* | osf5*) 6505fe4c343aSmrg version_type=osf 6506fe4c343aSmrg need_lib_prefix=no 6507fe4c343aSmrg need_version=no 6508fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6509fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6510fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6511fe4c343aSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6512fe4c343aSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6513fe4c343aSmrg ;; 65141bedbe3fSmrg 6515fe4c343aSmrgrdos*) 6516fe4c343aSmrg dynamic_linker=no 6517fe4c343aSmrg ;; 65181bedbe3fSmrg 6519fe4c343aSmrgsolaris*) 6520fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6521fe4c343aSmrg need_lib_prefix=no 6522fe4c343aSmrg need_version=no 6523fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6524fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6525fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6526fe4c343aSmrg shlibpath_overrides_runpath=yes 6527fe4c343aSmrg hardcode_into_libs=yes 6528fe4c343aSmrg # ldd complains unless libraries are executable 6529fe4c343aSmrg postinstall_cmds='chmod +x $lib' 6530fe4c343aSmrg ;; 6531ba6a1819Smrg 6532fe4c343aSmrgsunos4*) 6533fe4c343aSmrg version_type=sunos 6534fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6535fe4c343aSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6536fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6537fe4c343aSmrg shlibpath_overrides_runpath=yes 6538fe4c343aSmrg if test yes = "$with_gnu_ld"; then 6539fe4c343aSmrg need_lib_prefix=no 6540fe4c343aSmrg fi 6541fe4c343aSmrg need_version=yes 6542fe4c343aSmrg ;; 6543ba6a1819Smrg 6544fe4c343aSmrgsysv4 | sysv4.3*) 6545fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6546fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6547fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6548fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6549fe4c343aSmrg case $host_vendor in 6550fe4c343aSmrg sni) 6551fe4c343aSmrg shlibpath_overrides_runpath=no 6552fe4c343aSmrg need_lib_prefix=no 6553fe4c343aSmrg runpath_var=LD_RUN_PATH 6554fe4c343aSmrg ;; 6555fe4c343aSmrg siemens) 6556fe4c343aSmrg need_lib_prefix=no 6557fe4c343aSmrg ;; 6558fe4c343aSmrg motorola) 6559fe4c343aSmrg need_lib_prefix=no 6560fe4c343aSmrg need_version=no 6561fe4c343aSmrg shlibpath_overrides_runpath=no 6562fe4c343aSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6563fe4c343aSmrg ;; 6564fe4c343aSmrg esac 6565fe4c343aSmrg ;; 65661bedbe3fSmrg 6567fe4c343aSmrgsysv4*MP*) 6568fe4c343aSmrg if test -d /usr/nec; then 6569fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6570fe4c343aSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 6571fe4c343aSmrg soname_spec='$libname$shared_ext.$major' 6572fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6573fe4c343aSmrg fi 6574fe4c343aSmrg ;; 65751bedbe3fSmrg 6576fe4c343aSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6577fe4c343aSmrg version_type=sco 6578fe4c343aSmrg need_lib_prefix=no 6579fe4c343aSmrg need_version=no 6580fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 6581fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6582fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6583fe4c343aSmrg shlibpath_overrides_runpath=yes 6584fe4c343aSmrg hardcode_into_libs=yes 6585fe4c343aSmrg if test yes = "$with_gnu_ld"; then 6586fe4c343aSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 6587fe4c343aSmrg else 6588fe4c343aSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 6589fe4c343aSmrg case $host_os in 6590fe4c343aSmrg sco3.2v5*) 6591fe4c343aSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 6592fe4c343aSmrg ;; 6593fe4c343aSmrg esac 6594fe4c343aSmrg fi 6595fe4c343aSmrg sys_lib_dlsearch_path_spec='/usr/lib' 6596fe4c343aSmrg ;; 6597ba6a1819Smrg 6598fe4c343aSmrgtpf*) 6599fe4c343aSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 6600fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6601fe4c343aSmrg need_lib_prefix=no 6602fe4c343aSmrg need_version=no 6603fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6604fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6605fe4c343aSmrg shlibpath_overrides_runpath=no 6606fe4c343aSmrg hardcode_into_libs=yes 6607fe4c343aSmrg ;; 6608ba6a1819Smrg 6609fe4c343aSmrguts4*) 6610fe4c343aSmrg version_type=linux # correct to gnu/linux during the next big refactor 6611fe4c343aSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6612fe4c343aSmrg soname_spec='$libname$release$shared_ext$major' 6613fe4c343aSmrg shlibpath_var=LD_LIBRARY_PATH 6614fe4c343aSmrg ;; 6615549e21daSmrg 6616fe4c343aSmrg*) 6617fe4c343aSmrg dynamic_linker=no 6618fe4c343aSmrg ;; 6619fe4c343aSmrgesac 6620fe4c343aSmrgAC_MSG_RESULT([$dynamic_linker]) 6621fe4c343aSmrgtest no = "$dynamic_linker" && can_build_shared=no 6622ba6a1819Smrg 6623fe4c343aSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6624fe4c343aSmrgif test yes = "$GCC"; then 6625fe4c343aSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6626fe4c343aSmrgfi 6627ba6a1819Smrg 6628fe4c343aSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 6629fe4c343aSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 6630fe4c343aSmrgfi 6631ba6a1819Smrg 6632fe4c343aSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 6633fe4c343aSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 6634fe4c343aSmrgfi 6635ba6a1819Smrg 6636fe4c343aSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 6637fe4c343aSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6638ba6a1819Smrg 6639fe4c343aSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 6640fe4c343aSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 66411bedbe3fSmrg 6642fe4c343aSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 6643fe4c343aSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 66441bedbe3fSmrg 6645fe4c343aSmrg_LT_DECL([], [variables_saved_for_relink], [1], 6646fe4c343aSmrg [Variables whose values should be saved in libtool wrapper scripts and 6647fe4c343aSmrg restored at link time]) 6648fe4c343aSmrg_LT_DECL([], [need_lib_prefix], [0], 6649fe4c343aSmrg [Do we need the "lib" prefix for modules?]) 6650fe4c343aSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 6651fe4c343aSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 6652fe4c343aSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 6653fe4c343aSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 6654fe4c343aSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 6655fe4c343aSmrg [Is shlibpath searched before the hard-coded library search path?]) 6656fe4c343aSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 6657fe4c343aSmrg_LT_DECL([], [library_names_spec], [1], 6658fe4c343aSmrg [[List of archive names. First name is the real one, the rest are links. 6659fe4c343aSmrg The last name is the one that the linker finds with -lNAME]]) 6660fe4c343aSmrg_LT_DECL([], [soname_spec], [1], 6661fe4c343aSmrg [[The coded name of the library, if different from the real name]]) 6662fe4c343aSmrg_LT_DECL([], [install_override_mode], [1], 6663fe4c343aSmrg [Permission mode override for installation of shared libraries]) 6664fe4c343aSmrg_LT_DECL([], [postinstall_cmds], [2], 6665fe4c343aSmrg [Command to use after installation of a shared archive]) 6666fe4c343aSmrg_LT_DECL([], [postuninstall_cmds], [2], 6667fe4c343aSmrg [Command to use after uninstallation of a shared archive]) 6668fe4c343aSmrg_LT_DECL([], [finish_cmds], [2], 6669fe4c343aSmrg [Commands used to finish a libtool library installation in a directory]) 6670fe4c343aSmrg_LT_DECL([], [finish_eval], [1], 6671fe4c343aSmrg [[As "finish_cmds", except a single script fragment to be evaled but 6672fe4c343aSmrg not shown]]) 6673fe4c343aSmrg_LT_DECL([], [hardcode_into_libs], [0], 6674fe4c343aSmrg [Whether we should hardcode library paths into libraries]) 6675fe4c343aSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 6676fe4c343aSmrg [Compile-time system search path for libraries]) 6677fe4c343aSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 6678fe4c343aSmrg [Detected run-time system search path for libraries]) 6679fe4c343aSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 6680fe4c343aSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 6681fe4c343aSmrg])# _LT_SYS_DYNAMIC_LINKER 66821bedbe3fSmrg 6683fe4c343aSmrg 6684fe4c343aSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 6685fe4c343aSmrg# -------------------------- 6686fe4c343aSmrg# find a file program that can recognize shared library 6687fe4c343aSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 6688fe4c343aSmrg[m4_require([_LT_DECL_EGREP])dnl 6689fe4c343aSmrgAC_MSG_CHECKING([for $1]) 6690fe4c343aSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 6691fe4c343aSmrg[case $MAGIC_CMD in 6692fe4c343aSmrg[[\\/*] | ?:[\\/]*]) 6693fe4c343aSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 6694fe4c343aSmrg ;; 6695fe4c343aSmrg*) 6696fe4c343aSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 6697fe4c343aSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6698fe4c343aSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 6699fe4c343aSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 6700fe4c343aSmrgdnl not every word. This closes a longstanding sh security hole. 6701fe4c343aSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 6702fe4c343aSmrg for ac_dir in $ac_dummy; do 6703fe4c343aSmrg IFS=$lt_save_ifs 6704fe4c343aSmrg test -z "$ac_dir" && ac_dir=. 6705fe4c343aSmrg if test -f "$ac_dir/$1"; then 6706fe4c343aSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 6707fe4c343aSmrg if test -n "$file_magic_test_file"; then 6708fe4c343aSmrg case $deplibs_check_method in 6709fe4c343aSmrg "file_magic "*) 6710fe4c343aSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 6711fe4c343aSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 6712fe4c343aSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 6713fe4c343aSmrg $EGREP "$file_magic_regex" > /dev/null; then 6714fe4c343aSmrg : 67151bedbe3fSmrg else 6716fe4c343aSmrg cat <<_LT_EOF 1>&2 67171bedbe3fSmrg 6718fe4c343aSmrg*** Warning: the command libtool uses to detect shared libraries, 6719fe4c343aSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 6720fe4c343aSmrg*** The result is that libtool may fail to recognize shared libraries 6721fe4c343aSmrg*** as such. This will affect the creation of libtool libraries that 6722fe4c343aSmrg*** depend on shared libraries, but programs linked with such libtool 6723fe4c343aSmrg*** libraries will work regardless of this problem. Nevertheless, you 6724fe4c343aSmrg*** may want to report the problem to your system manager and/or to 6725fe4c343aSmrg*** bug-libtool@gnu.org 67261bedbe3fSmrg 6727fe4c343aSmrg_LT_EOF 6728fe4c343aSmrg fi ;; 6729fe4c343aSmrg esac 6730fe4c343aSmrg fi 6731fe4c343aSmrg break 6732fe4c343aSmrg fi 6733fe4c343aSmrg done 6734fe4c343aSmrg IFS=$lt_save_ifs 6735fe4c343aSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 6736fe4c343aSmrg ;; 6737fe4c343aSmrgesac]) 6738fe4c343aSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 6739fe4c343aSmrgif test -n "$MAGIC_CMD"; then 6740fe4c343aSmrg AC_MSG_RESULT($MAGIC_CMD) 6741fe4c343aSmrgelse 6742fe4c343aSmrg AC_MSG_RESULT(no) 6743fe4c343aSmrgfi 6744fe4c343aSmrg_LT_DECL([], [MAGIC_CMD], [0], 6745fe4c343aSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 6746fe4c343aSmrg])# _LT_PATH_TOOL_PREFIX 6747ba6a1819Smrg 6748fe4c343aSmrg# Old name: 6749fe4c343aSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 6750fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 6751fe4c343aSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 6752ba6a1819Smrg 6753ba6a1819Smrg 6754fe4c343aSmrg# _LT_PATH_MAGIC 6755fe4c343aSmrg# -------------- 6756fe4c343aSmrg# find a file program that can recognize a shared library 6757fe4c343aSmrgm4_defun([_LT_PATH_MAGIC], 6758fe4c343aSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 6759fe4c343aSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 6760fe4c343aSmrg if test -n "$ac_tool_prefix"; then 6761fe4c343aSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 6762fe4c343aSmrg else 6763fe4c343aSmrg MAGIC_CMD=: 6764fe4c343aSmrg fi 6765fe4c343aSmrgfi 6766fe4c343aSmrg])# _LT_PATH_MAGIC 6767ba6a1819Smrg 6768ba6a1819Smrg 6769fe4c343aSmrg# LT_PATH_LD 6770fe4c343aSmrg# ---------- 6771fe4c343aSmrg# find the pathname to the GNU or non-GNU linker 6772fe4c343aSmrgAC_DEFUN([LT_PATH_LD], 6773fe4c343aSmrg[AC_REQUIRE([AC_PROG_CC])dnl 6774fe4c343aSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 6775fe4c343aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 6776fe4c343aSmrgm4_require([_LT_DECL_SED])dnl 6777fe4c343aSmrgm4_require([_LT_DECL_EGREP])dnl 6778fe4c343aSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 6779ba6a1819Smrg 6780fe4c343aSmrgAC_ARG_WITH([gnu-ld], 6781fe4c343aSmrg [AS_HELP_STRING([--with-gnu-ld], 6782fe4c343aSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 6783fe4c343aSmrg [test no = "$withval" || with_gnu_ld=yes], 6784fe4c343aSmrg [with_gnu_ld=no])dnl 6785ba6a1819Smrg 6786fe4c343aSmrgac_prog=ld 6787fe4c343aSmrgif test yes = "$GCC"; then 6788fe4c343aSmrg # Check if gcc -print-prog-name=ld gives a path. 6789fe4c343aSmrg AC_MSG_CHECKING([for ld used by $CC]) 6790fe4c343aSmrg case $host in 6791fe4c343aSmrg *-*-mingw*) 6792fe4c343aSmrg # gcc leaves a trailing carriage return, which upsets mingw 6793fe4c343aSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 6794fe4c343aSmrg *) 6795fe4c343aSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 6796fe4c343aSmrg esac 6797fe4c343aSmrg case $ac_prog in 6798fe4c343aSmrg # Accept absolute paths. 6799fe4c343aSmrg [[\\/]]* | ?:[[\\/]]*) 6800fe4c343aSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 6801fe4c343aSmrg # Canonicalize the pathname of ld 6802fe4c343aSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 6803fe4c343aSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 6804fe4c343aSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 6805fe4c343aSmrg done 6806fe4c343aSmrg test -z "$LD" && LD=$ac_prog 6807fe4c343aSmrg ;; 6808fe4c343aSmrg "") 6809fe4c343aSmrg # If it fails, then pretend we aren't using GCC. 6810fe4c343aSmrg ac_prog=ld 6811fe4c343aSmrg ;; 6812fe4c343aSmrg *) 6813fe4c343aSmrg # If it is relative, then search for the first ld in PATH. 6814fe4c343aSmrg with_gnu_ld=unknown 6815fe4c343aSmrg ;; 6816fe4c343aSmrg esac 6817fe4c343aSmrgelif test yes = "$with_gnu_ld"; then 6818fe4c343aSmrg AC_MSG_CHECKING([for GNU ld]) 6819fe4c343aSmrgelse 6820fe4c343aSmrg AC_MSG_CHECKING([for non-GNU ld]) 6821fe4c343aSmrgfi 6822fe4c343aSmrgAC_CACHE_VAL(lt_cv_path_LD, 6823fe4c343aSmrg[if test -z "$LD"; then 6824fe4c343aSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 6825fe4c343aSmrg for ac_dir in $PATH; do 6826fe4c343aSmrg IFS=$lt_save_ifs 6827fe4c343aSmrg test -z "$ac_dir" && ac_dir=. 6828fe4c343aSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 6829fe4c343aSmrg lt_cv_path_LD=$ac_dir/$ac_prog 6830fe4c343aSmrg # Check to see if the program is GNU ld. I'd rather use --version, 6831fe4c343aSmrg # but apparently some variants of GNU ld only accept -v. 6832fe4c343aSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 6833fe4c343aSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 6834fe4c343aSmrg *GNU* | *'with BFD'*) 6835fe4c343aSmrg test no != "$with_gnu_ld" && break 6836fe4c343aSmrg ;; 6837fe4c343aSmrg *) 6838fe4c343aSmrg test yes != "$with_gnu_ld" && break 6839fe4c343aSmrg ;; 6840fe4c343aSmrg esac 6841fe4c343aSmrg fi 6842fe4c343aSmrg done 6843fe4c343aSmrg IFS=$lt_save_ifs 6844fe4c343aSmrgelse 6845fe4c343aSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 6846fe4c343aSmrgfi]) 6847fe4c343aSmrgLD=$lt_cv_path_LD 6848fe4c343aSmrgif test -n "$LD"; then 6849fe4c343aSmrg AC_MSG_RESULT($LD) 6850fe4c343aSmrgelse 6851fe4c343aSmrg AC_MSG_RESULT(no) 6852fe4c343aSmrgfi 6853fe4c343aSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 6854fe4c343aSmrg_LT_PATH_LD_GNU 6855fe4c343aSmrgAC_SUBST([LD]) 68561bedbe3fSmrg 6857fe4c343aSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 6858fe4c343aSmrg])# LT_PATH_LD 68591bedbe3fSmrg 6860fe4c343aSmrg# Old names: 6861fe4c343aSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 6862fe4c343aSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 6863fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 6864fe4c343aSmrgdnl AC_DEFUN([AM_PROG_LD], []) 6865fe4c343aSmrgdnl AC_DEFUN([AC_PROG_LD], []) 68661bedbe3fSmrg 6867ba6a1819Smrg 6868fe4c343aSmrg# _LT_PATH_LD_GNU 6869fe4c343aSmrg#- -------------- 6870fe4c343aSmrgm4_defun([_LT_PATH_LD_GNU], 6871fe4c343aSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 6872fe4c343aSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 6873fe4c343aSmrgcase `$LD -v 2>&1 </dev/null` in 6874fe4c343aSmrg*GNU* | *'with BFD'*) 6875fe4c343aSmrg lt_cv_prog_gnu_ld=yes 6876fe4c343aSmrg ;; 6877fe4c343aSmrg*) 6878fe4c343aSmrg lt_cv_prog_gnu_ld=no 6879fe4c343aSmrg ;; 6880fe4c343aSmrgesac]) 6881fe4c343aSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 6882fe4c343aSmrg])# _LT_PATH_LD_GNU 6883ba6a1819Smrg 6884ba6a1819Smrg 6885fe4c343aSmrg# _LT_CMD_RELOAD 6886fe4c343aSmrg# -------------- 6887fe4c343aSmrg# find reload flag for linker 6888fe4c343aSmrg# -- PORTME Some linkers may need a different reload flag. 6889fe4c343aSmrgm4_defun([_LT_CMD_RELOAD], 6890fe4c343aSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 6891fe4c343aSmrg lt_cv_ld_reload_flag, 6892fe4c343aSmrg [lt_cv_ld_reload_flag='-r']) 6893fe4c343aSmrgreload_flag=$lt_cv_ld_reload_flag 6894fe4c343aSmrgcase $reload_flag in 6895fe4c343aSmrg"" | " "*) ;; 6896fe4c343aSmrg*) reload_flag=" $reload_flag" ;; 6897fe4c343aSmrgesac 6898fe4c343aSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 6899fe4c343aSmrgcase $host_os in 6900fe4c343aSmrg cygwin* | mingw* | pw32* | cegcc*) 6901fe4c343aSmrg if test yes != "$GCC"; then 6902fe4c343aSmrg reload_cmds=false 6903fe4c343aSmrg fi 6904fe4c343aSmrg ;; 6905fe4c343aSmrg darwin*) 6906fe4c343aSmrg if test yes = "$GCC"; then 6907fe4c343aSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 6908fe4c343aSmrg else 6909fe4c343aSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 6910fe4c343aSmrg fi 6911fe4c343aSmrg ;; 6912fe4c343aSmrgesac 6913fe4c343aSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 6914fe4c343aSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 6915fe4c343aSmrg])# _LT_CMD_RELOAD 6916ba6a1819Smrg 6917ba6a1819Smrg 6918fe4c343aSmrg# _LT_PATH_DD 6919fe4c343aSmrg# ----------- 6920fe4c343aSmrg# find a working dd 6921fe4c343aSmrgm4_defun([_LT_PATH_DD], 6922fe4c343aSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 6923fe4c343aSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6924fe4c343aSmrgcat conftest.i conftest.i >conftest2.i 6925fe4c343aSmrg: ${lt_DD:=$DD} 6926fe4c343aSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 6927fe4c343aSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6928fe4c343aSmrg cmp -s conftest.i conftest.out \ 6929fe4c343aSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 6930fe4c343aSmrgfi]) 6931fe4c343aSmrgrm -f conftest.i conftest2.i conftest.out]) 6932fe4c343aSmrg])# _LT_PATH_DD 6933ba6a1819Smrg 6934ba6a1819Smrg 6935fe4c343aSmrg# _LT_CMD_TRUNCATE 6936fe4c343aSmrg# ---------------- 6937fe4c343aSmrg# find command to truncate a binary pipe 6938fe4c343aSmrgm4_defun([_LT_CMD_TRUNCATE], 6939fe4c343aSmrg[m4_require([_LT_PATH_DD]) 6940fe4c343aSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 6941fe4c343aSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 6942fe4c343aSmrgcat conftest.i conftest.i >conftest2.i 6943fe4c343aSmrglt_cv_truncate_bin= 6944fe4c343aSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 6945fe4c343aSmrg cmp -s conftest.i conftest.out \ 6946fe4c343aSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 6947fe4c343aSmrgfi 6948fe4c343aSmrgrm -f conftest.i conftest2.i conftest.out 6949fe4c343aSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 6950fe4c343aSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 6951fe4c343aSmrg [Command to truncate a binary pipe]) 6952fe4c343aSmrg])# _LT_CMD_TRUNCATE 69531bedbe3fSmrg 6954ba6a1819Smrg 6955fe4c343aSmrg# _LT_CHECK_MAGIC_METHOD 6956fe4c343aSmrg# ---------------------- 6957fe4c343aSmrg# how to check for library dependencies 6958fe4c343aSmrg# -- PORTME fill in with the dynamic library characteristics 6959fe4c343aSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 6960fe4c343aSmrg[m4_require([_LT_DECL_EGREP]) 6961fe4c343aSmrgm4_require([_LT_DECL_OBJDUMP]) 6962fe4c343aSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 6963fe4c343aSmrglt_cv_deplibs_check_method, 6964fe4c343aSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 6965fe4c343aSmrglt_cv_file_magic_test_file= 6966fe4c343aSmrglt_cv_deplibs_check_method='unknown' 6967fe4c343aSmrg# Need to set the preceding variable on all platforms that support 6968fe4c343aSmrg# interlibrary dependencies. 6969fe4c343aSmrg# 'none' -- dependencies not supported. 6970fe4c343aSmrg# 'unknown' -- same as none, but documents that we really don't know. 6971fe4c343aSmrg# 'pass_all' -- all dependencies passed with no checks. 6972fe4c343aSmrg# 'test_compile' -- check by making test program. 6973fe4c343aSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 6974fe4c343aSmrg# that responds to the $file_magic_cmd with a given extended regex. 6975fe4c343aSmrg# If you have 'file' or equivalent on your system and you're not sure 6976fe4c343aSmrg# whether 'pass_all' will *always* work, you probably want this one. 6977ba6a1819Smrg 6978fe4c343aSmrgcase $host_os in 6979fe4c343aSmrgaix[[4-9]]*) 6980fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 6981fe4c343aSmrg ;; 6982ba6a1819Smrg 6983fe4c343aSmrgbeos*) 6984fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 6985fe4c343aSmrg ;; 6986ba6a1819Smrg 6987fe4c343aSmrgbsdi[[45]]*) 6988fe4c343aSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 6989da1f2d5dSmrg lt_cv_file_magic_cmd='$FILECMD -L' 6990fe4c343aSmrg lt_cv_file_magic_test_file=/shlib/libc.so 6991fe4c343aSmrg ;; 6992ba6a1819Smrg 6993fe4c343aSmrgcygwin*) 6994fe4c343aSmrg # func_win32_libid is a shell function defined in ltmain.sh 6995fe4c343aSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 6996fe4c343aSmrg lt_cv_file_magic_cmd='func_win32_libid' 6997fe4c343aSmrg ;; 6998ba6a1819Smrg 6999fe4c343aSmrgmingw* | pw32*) 7000fe4c343aSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 7001fe4c343aSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 7002fe4c343aSmrg # unless we find 'file', for example because we are cross-compiling. 7003fe4c343aSmrg if ( file / ) >/dev/null 2>&1; then 7004fe4c343aSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 7005fe4c343aSmrg lt_cv_file_magic_cmd='func_win32_libid' 7006fe4c343aSmrg else 7007fe4c343aSmrg # Keep this pattern in sync with the one in func_win32_libid. 7008fe4c343aSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 7009fe4c343aSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 7010fe4c343aSmrg fi 7011fe4c343aSmrg ;; 7012ba6a1819Smrg 7013fe4c343aSmrgcegcc*) 7014fe4c343aSmrg # use the weaker test based on 'objdump'. See mingw*. 7015fe4c343aSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 7016fe4c343aSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 7017fe4c343aSmrg ;; 7018ba6a1819Smrg 7019fe4c343aSmrgdarwin* | rhapsody*) 7020fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7021fe4c343aSmrg ;; 7022ba6a1819Smrg 7023da1f2d5dSmrgfreebsd* | dragonfly* | midnightbsd*) 7024fe4c343aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 7025fe4c343aSmrg case $host_cpu in 7026fe4c343aSmrg i*86 ) 7027fe4c343aSmrg # Not sure whether the presence of OpenBSD here was a mistake. 7028fe4c343aSmrg # Let's accept both of them until this is cleared up. 7029fe4c343aSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 7030da1f2d5dSmrg lt_cv_file_magic_cmd=$FILECMD 7031fe4c343aSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 7032fe4c343aSmrg ;; 7033fe4c343aSmrg esac 7034fe4c343aSmrg else 7035fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7036fe4c343aSmrg fi 7037fe4c343aSmrg ;; 7038ba6a1819Smrg 7039fe4c343aSmrghaiku*) 7040fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7041fe4c343aSmrg ;; 7042ba6a1819Smrg 7043fe4c343aSmrghpux10.20* | hpux11*) 7044da1f2d5dSmrg lt_cv_file_magic_cmd=$FILECMD 7045fe4c343aSmrg case $host_cpu in 7046fe4c343aSmrg ia64*) 7047fe4c343aSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 7048fe4c343aSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 7049fe4c343aSmrg ;; 7050fe4c343aSmrg hppa*64*) 7051fe4c343aSmrg [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]'] 7052fe4c343aSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 7053fe4c343aSmrg ;; 7054fe4c343aSmrg *) 7055fe4c343aSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 7056fe4c343aSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 7057fe4c343aSmrg ;; 7058fe4c343aSmrg esac 7059fe4c343aSmrg ;; 7060ba6a1819Smrg 7061fe4c343aSmrginterix[[3-9]]*) 7062fe4c343aSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 7063fe4c343aSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 7064fe4c343aSmrg ;; 7065ba6a1819Smrg 7066fe4c343aSmrgirix5* | irix6* | nonstopux*) 7067fe4c343aSmrg case $LD in 7068fe4c343aSmrg *-32|*"-32 ") libmagic=32-bit;; 7069fe4c343aSmrg *-n32|*"-n32 ") libmagic=N32;; 7070fe4c343aSmrg *-64|*"-64 ") libmagic=64-bit;; 7071fe4c343aSmrg *) libmagic=never-match;; 7072fe4c343aSmrg esac 7073fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7074fe4c343aSmrg ;; 7075ba6a1819Smrg 7076fe4c343aSmrg# This must be glibc/ELF. 7077fe4c343aSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7078fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7079fe4c343aSmrg ;; 7080ba6a1819Smrg 7081fe4c343aSmrgnetbsd*) 7082fe4c343aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 7083fe4c343aSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7084fe4c343aSmrg else 7085fe4c343aSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 7086fe4c343aSmrg fi 7087fe4c343aSmrg ;; 7088ba6a1819Smrg 7089fe4c343aSmrgnewos6*) 7090fe4c343aSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 7091da1f2d5dSmrg lt_cv_file_magic_cmd=$FILECMD 7092fe4c343aSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 7093fe4c343aSmrg ;; 7094ba6a1819Smrg 7095fe4c343aSmrg*nto* | *qnx*) 7096fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7097fe4c343aSmrg ;; 7098ba6a1819Smrg 7099fe4c343aSmrgopenbsd* | bitrig*) 7100fe4c343aSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 7101fe4c343aSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 7102fe4c343aSmrg else 7103fe4c343aSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7104fe4c343aSmrg fi 7105fe4c343aSmrg ;; 7106ba6a1819Smrg 7107fe4c343aSmrgosf3* | osf4* | osf5*) 7108fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7109fe4c343aSmrg ;; 7110ba6a1819Smrg 7111fe4c343aSmrgrdos*) 7112fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7113fe4c343aSmrg ;; 7114ba6a1819Smrg 7115fe4c343aSmrgsolaris*) 7116fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7117fe4c343aSmrg ;; 7118ba6a1819Smrg 7119fe4c343aSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7120fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7121fe4c343aSmrg ;; 7122ba6a1819Smrg 7123fe4c343aSmrgsysv4 | sysv4.3*) 7124fe4c343aSmrg case $host_vendor in 7125fe4c343aSmrg motorola) 7126fe4c343aSmrg 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]]' 7127fe4c343aSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7128fe4c343aSmrg ;; 7129fe4c343aSmrg ncr) 7130fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7131fe4c343aSmrg ;; 7132fe4c343aSmrg sequent) 7133fe4c343aSmrg lt_cv_file_magic_cmd='/bin/file' 7134fe4c343aSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7135fe4c343aSmrg ;; 7136fe4c343aSmrg sni) 7137fe4c343aSmrg lt_cv_file_magic_cmd='/bin/file' 7138fe4c343aSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7139fe4c343aSmrg lt_cv_file_magic_test_file=/lib/libc.so 7140fe4c343aSmrg ;; 7141fe4c343aSmrg siemens) 7142fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7143fe4c343aSmrg ;; 7144fe4c343aSmrg pc) 7145fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7146fe4c343aSmrg ;; 7147fe4c343aSmrg esac 7148fe4c343aSmrg ;; 7149ba6a1819Smrg 7150fe4c343aSmrgtpf*) 7151fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7152fe4c343aSmrg ;; 7153fe4c343aSmrgos2*) 7154fe4c343aSmrg lt_cv_deplibs_check_method=pass_all 7155fe4c343aSmrg ;; 7156fe4c343aSmrgesac 7157fe4c343aSmrg]) 7158ba6a1819Smrg 7159fe4c343aSmrgfile_magic_glob= 7160fe4c343aSmrgwant_nocaseglob=no 7161fe4c343aSmrgif test "$build" = "$host"; then 7162fe4c343aSmrg case $host_os in 7163fe4c343aSmrg mingw* | pw32*) 7164fe4c343aSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7165fe4c343aSmrg want_nocaseglob=yes 7166fe4c343aSmrg else 7167fe4c343aSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7168fe4c343aSmrg fi 7169fe4c343aSmrg ;; 7170fe4c343aSmrg esac 7171fe4c343aSmrgfi 71721bedbe3fSmrg 7173fe4c343aSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 7174fe4c343aSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 7175fe4c343aSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 71761bedbe3fSmrg 7177fe4c343aSmrg_LT_DECL([], [deplibs_check_method], [1], 7178fe4c343aSmrg [Method to check whether dependent libraries are shared objects]) 7179fe4c343aSmrg_LT_DECL([], [file_magic_cmd], [1], 7180fe4c343aSmrg [Command to use when deplibs_check_method = "file_magic"]) 7181fe4c343aSmrg_LT_DECL([], [file_magic_glob], [1], 7182fe4c343aSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 7183fe4c343aSmrg_LT_DECL([], [want_nocaseglob], [1], 7184fe4c343aSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7185fe4c343aSmrg])# _LT_CHECK_MAGIC_METHOD 7186ba6a1819Smrg 7187fe4c343aSmrg 7188fe4c343aSmrg# LT_PATH_NM 7189fe4c343aSmrg# ---------- 7190fe4c343aSmrg# find the pathname to a BSD- or MS-compatible name lister 7191fe4c343aSmrgAC_DEFUN([LT_PATH_NM], 7192fe4c343aSmrg[AC_REQUIRE([AC_PROG_CC])dnl 7193fe4c343aSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7194fe4c343aSmrg[if test -n "$NM"; then 7195fe4c343aSmrg # Let the user override the test. 7196fe4c343aSmrg lt_cv_path_NM=$NM 7197fe4c343aSmrgelse 7198fe4c343aSmrg lt_nm_to_check=${ac_tool_prefix}nm 7199fe4c343aSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7200fe4c343aSmrg lt_nm_to_check="$lt_nm_to_check nm" 7201fe4c343aSmrg fi 7202fe4c343aSmrg for lt_tmp_nm in $lt_nm_to_check; do 7203fe4c343aSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7204fe4c343aSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7205fe4c343aSmrg IFS=$lt_save_ifs 7206fe4c343aSmrg test -z "$ac_dir" && ac_dir=. 7207fe4c343aSmrg tmp_nm=$ac_dir/$lt_tmp_nm 7208fe4c343aSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7209fe4c343aSmrg # Check to see if the nm accepts a BSD-compat flag. 7210fe4c343aSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7211fe4c343aSmrg # nm: unknown option "B" ignored 7212fe4c343aSmrg # Tru64's nm complains that /dev/null is an invalid object file 7213fe4c343aSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7214fe4c343aSmrg case $build_os in 7215fe4c343aSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7216fe4c343aSmrg *) lt_bad_file=/dev/null ;; 7217fe4c343aSmrg esac 7218da1f2d5dSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7219fe4c343aSmrg *$lt_bad_file* | *'Invalid file or object type'*) 7220fe4c343aSmrg lt_cv_path_NM="$tmp_nm -B" 7221fe4c343aSmrg break 2 7222549e21daSmrg ;; 7223549e21daSmrg *) 7224da1f2d5dSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7225fe4c343aSmrg */dev/null*) 7226fe4c343aSmrg lt_cv_path_NM="$tmp_nm -p" 7227fe4c343aSmrg break 2 72281bedbe3fSmrg ;; 72291bedbe3fSmrg *) 7230fe4c343aSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7231fe4c343aSmrg continue # so that we can try to find one that supports BSD flags 72321bedbe3fSmrg ;; 7233fe4c343aSmrg esac 7234fe4c343aSmrg ;; 72351bedbe3fSmrg esac 7236fe4c343aSmrg fi 7237fe4c343aSmrg done 7238fe4c343aSmrg IFS=$lt_save_ifs 7239fe4c343aSmrg done 7240fe4c343aSmrg : ${lt_cv_path_NM=no} 7241fe4c343aSmrgfi]) 7242fe4c343aSmrgif test no != "$lt_cv_path_NM"; then 7243fe4c343aSmrg NM=$lt_cv_path_NM 7244fe4c343aSmrgelse 7245fe4c343aSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 7246fe4c343aSmrg if test -n "$DUMPBIN"; then : 7247fe4c343aSmrg # Let the user override the test. 7248fe4c343aSmrg else 7249fe4c343aSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7250da1f2d5dSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7251fe4c343aSmrg *COFF*) 7252fe4c343aSmrg DUMPBIN="$DUMPBIN -symbols -headers" 7253fe4c343aSmrg ;; 7254fe4c343aSmrg *) 7255fe4c343aSmrg DUMPBIN=: 7256549e21daSmrg ;; 7257fe4c343aSmrg esac 7258fe4c343aSmrg fi 7259fe4c343aSmrg AC_SUBST([DUMPBIN]) 7260fe4c343aSmrg if test : != "$DUMPBIN"; then 7261fe4c343aSmrg NM=$DUMPBIN 7262fe4c343aSmrg fi 7263fe4c343aSmrgfi 7264fe4c343aSmrgtest -z "$NM" && NM=nm 7265fe4c343aSmrgAC_SUBST([NM]) 7266fe4c343aSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7267ba6a1819Smrg 7268fe4c343aSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7269fe4c343aSmrg [lt_cv_nm_interface="BSD nm" 7270fe4c343aSmrg echo "int some_variable = 0;" > conftest.$ac_ext 7271fe4c343aSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7272fe4c343aSmrg (eval "$ac_compile" 2>conftest.err) 7273fe4c343aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7274fe4c343aSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7275fe4c343aSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7276fe4c343aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7277fe4c343aSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7278fe4c343aSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 7279fe4c343aSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7280fe4c343aSmrg lt_cv_nm_interface="MS dumpbin" 7281fe4c343aSmrg fi 7282fe4c343aSmrg rm -f conftest*]) 7283fe4c343aSmrg])# LT_PATH_NM 7284ba6a1819Smrg 7285fe4c343aSmrg# Old names: 7286fe4c343aSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7287fe4c343aSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7288fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 7289fe4c343aSmrgdnl AC_DEFUN([AM_PROG_NM], []) 7290fe4c343aSmrgdnl AC_DEFUN([AC_PROG_NM], []) 7291ba6a1819Smrg 7292fe4c343aSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7293fe4c343aSmrg# -------------------------------- 7294fe4c343aSmrg# how to determine the name of the shared library 7295fe4c343aSmrg# associated with a specific link library. 7296fe4c343aSmrg# -- PORTME fill in with the dynamic library characteristics 7297fe4c343aSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7298fe4c343aSmrg[m4_require([_LT_DECL_EGREP]) 7299fe4c343aSmrgm4_require([_LT_DECL_OBJDUMP]) 7300fe4c343aSmrgm4_require([_LT_DECL_DLLTOOL]) 7301fe4c343aSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7302fe4c343aSmrglt_cv_sharedlib_from_linklib_cmd, 7303fe4c343aSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7304ba6a1819Smrg 7305fe4c343aSmrgcase $host_os in 7306fe4c343aSmrgcygwin* | mingw* | pw32* | cegcc*) 7307fe4c343aSmrg # two different shell functions defined in ltmain.sh; 7308fe4c343aSmrg # decide which one to use based on capabilities of $DLLTOOL 7309fe4c343aSmrg case `$DLLTOOL --help 2>&1` in 7310fe4c343aSmrg *--identify-strict*) 7311fe4c343aSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7312fe4c343aSmrg ;; 7313fe4c343aSmrg *) 7314fe4c343aSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7315fe4c343aSmrg ;; 7316fe4c343aSmrg esac 7317fe4c343aSmrg ;; 7318fe4c343aSmrg*) 7319fe4c343aSmrg # fallback: assume linklib IS sharedlib 7320fe4c343aSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7321fe4c343aSmrg ;; 7322fe4c343aSmrgesac 7323fe4c343aSmrg]) 7324fe4c343aSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7325fe4c343aSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7326ba6a1819Smrg 7327fe4c343aSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7328fe4c343aSmrg [Command to associate shared and link libraries]) 7329fe4c343aSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 73301bedbe3fSmrg 73311bedbe3fSmrg 7332fe4c343aSmrg# _LT_PATH_MANIFEST_TOOL 7333fe4c343aSmrg# ---------------------- 7334fe4c343aSmrg# locate the manifest tool 7335fe4c343aSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7336fe4c343aSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7337fe4c343aSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7338fe4c343aSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7339fe4c343aSmrg [lt_cv_path_mainfest_tool=no 7340fe4c343aSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7341fe4c343aSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7342fe4c343aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 7343fe4c343aSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7344fe4c343aSmrg lt_cv_path_mainfest_tool=yes 7345fe4c343aSmrg fi 7346fe4c343aSmrg rm -f conftest*]) 7347fe4c343aSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 7348fe4c343aSmrg MANIFEST_TOOL=: 7349fe4c343aSmrgfi 7350fe4c343aSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7351fe4c343aSmrg])# _LT_PATH_MANIFEST_TOOL 73521bedbe3fSmrg 73531bedbe3fSmrg 7354fe4c343aSmrg# _LT_DLL_DEF_P([FILE]) 7355fe4c343aSmrg# --------------------- 7356fe4c343aSmrg# True iff FILE is a Windows DLL '.def' file. 7357fe4c343aSmrg# Keep in sync with func_dll_def_p in the libtool script 7358fe4c343aSmrgAC_DEFUN([_LT_DLL_DEF_P], 7359fe4c343aSmrg[dnl 7360fe4c343aSmrg test DEF = "`$SED -n dnl 7361fe4c343aSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7362fe4c343aSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7363fe4c343aSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7364fe4c343aSmrg -e q dnl Only consider the first "real" line 7365fe4c343aSmrg $1`" dnl 7366fe4c343aSmrg])# _LT_DLL_DEF_P 73671bedbe3fSmrg 73681bedbe3fSmrg 7369fe4c343aSmrg# LT_LIB_M 7370fe4c343aSmrg# -------- 7371fe4c343aSmrg# check for math library 7372fe4c343aSmrgAC_DEFUN([LT_LIB_M], 7373fe4c343aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7374fe4c343aSmrgLIBM= 7375fe4c343aSmrgcase $host in 7376fe4c343aSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7377fe4c343aSmrg # These system don't have libm, or don't need it 7378fe4c343aSmrg ;; 7379fe4c343aSmrg*-ncr-sysv4.3*) 7380fe4c343aSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7381fe4c343aSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7382fe4c343aSmrg ;; 7383fe4c343aSmrg*) 7384fe4c343aSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7385fe4c343aSmrg ;; 7386fe4c343aSmrgesac 7387fe4c343aSmrgAC_SUBST([LIBM]) 7388fe4c343aSmrg])# LT_LIB_M 73891bedbe3fSmrg 7390fe4c343aSmrg# Old name: 7391fe4c343aSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7392fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 7393fe4c343aSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 73941bedbe3fSmrg 7395ba6a1819Smrg 7396fe4c343aSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7397fe4c343aSmrg# ------------------------------- 7398fe4c343aSmrgm4_defun([_LT_COMPILER_NO_RTTI], 7399fe4c343aSmrg[m4_require([_LT_TAG_COMPILER])dnl 7400ba6a1819Smrg 7401fe4c343aSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7402ba6a1819Smrg 7403fe4c343aSmrgif test yes = "$GCC"; then 7404fe4c343aSmrg case $cc_basename in 7405fe4c343aSmrg nvcc*) 7406fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7407fe4c343aSmrg *) 7408fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7409fe4c343aSmrg esac 7410ba6a1819Smrg 7411fe4c343aSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 7412fe4c343aSmrg lt_cv_prog_compiler_rtti_exceptions, 7413fe4c343aSmrg [-fno-rtti -fno-exceptions], [], 7414fe4c343aSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7415fe4c343aSmrgfi 7416fe4c343aSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 7417fe4c343aSmrg [Compiler flag to turn off builtin functions]) 7418fe4c343aSmrg])# _LT_COMPILER_NO_RTTI 7419ba6a1819Smrg 7420ba6a1819Smrg 7421fe4c343aSmrg# _LT_CMD_GLOBAL_SYMBOLS 7422fe4c343aSmrg# ---------------------- 7423fe4c343aSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 7424fe4c343aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7425fe4c343aSmrgAC_REQUIRE([AC_PROG_CC])dnl 7426fe4c343aSmrgAC_REQUIRE([AC_PROG_AWK])dnl 7427fe4c343aSmrgAC_REQUIRE([LT_PATH_NM])dnl 7428fe4c343aSmrgAC_REQUIRE([LT_PATH_LD])dnl 7429fe4c343aSmrgm4_require([_LT_DECL_SED])dnl 7430fe4c343aSmrgm4_require([_LT_DECL_EGREP])dnl 7431fe4c343aSmrgm4_require([_LT_TAG_COMPILER])dnl 7432ba6a1819Smrg 7433fe4c343aSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 7434fe4c343aSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 7435fe4c343aSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 7436fe4c343aSmrg[ 7437fe4c343aSmrg# These are sane defaults that work on at least a few old systems. 7438fe4c343aSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7439ba6a1819Smrg 7440fe4c343aSmrg# Character class describing NM global symbol codes. 7441fe4c343aSmrgsymcode='[[BCDEGRST]]' 7442ba6a1819Smrg 7443fe4c343aSmrg# Regexp to match symbols that can be accessed directly from C. 7444fe4c343aSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 7445549e21daSmrg 7446fe4c343aSmrg# Define system-specific variables. 7447fe4c343aSmrgcase $host_os in 7448fe4c343aSmrgaix*) 7449fe4c343aSmrg symcode='[[BCDT]]' 7450fe4c343aSmrg ;; 7451fe4c343aSmrgcygwin* | mingw* | pw32* | cegcc*) 7452fe4c343aSmrg symcode='[[ABCDGISTW]]' 7453fe4c343aSmrg ;; 7454fe4c343aSmrghpux*) 7455fe4c343aSmrg if test ia64 = "$host_cpu"; then 7456fe4c343aSmrg symcode='[[ABCDEGRST]]' 7457fe4c343aSmrg fi 7458fe4c343aSmrg ;; 7459fe4c343aSmrgirix* | nonstopux*) 7460fe4c343aSmrg symcode='[[BCDEGRST]]' 7461fe4c343aSmrg ;; 7462fe4c343aSmrgosf*) 7463fe4c343aSmrg symcode='[[BCDEGQRST]]' 7464fe4c343aSmrg ;; 7465fe4c343aSmrgsolaris*) 7466fe4c343aSmrg symcode='[[BDRT]]' 7467fe4c343aSmrg ;; 7468fe4c343aSmrgsco3.2v5*) 7469fe4c343aSmrg symcode='[[DT]]' 7470fe4c343aSmrg ;; 7471fe4c343aSmrgsysv4.2uw2*) 7472fe4c343aSmrg symcode='[[DT]]' 7473fe4c343aSmrg ;; 7474fe4c343aSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 7475fe4c343aSmrg symcode='[[ABDT]]' 7476fe4c343aSmrg ;; 7477fe4c343aSmrgsysv4) 7478fe4c343aSmrg symcode='[[DFNSTU]]' 7479fe4c343aSmrg ;; 7480fe4c343aSmrgesac 74811bedbe3fSmrg 7482fe4c343aSmrg# If we're using GNU nm, then use its standard symbol codes. 7483fe4c343aSmrgcase `$NM -V 2>&1` in 7484fe4c343aSmrg*GNU* | *'with BFD'*) 7485fe4c343aSmrg symcode='[[ABCDGIRSTW]]' ;; 7486fe4c343aSmrgesac 7487fe4c343aSmrg 7488fe4c343aSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7489fe4c343aSmrg # Gets list of data symbols to import. 7490da1f2d5dSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 7491fe4c343aSmrg # Adjust the below global symbol transforms to fixup imported variables. 7492fe4c343aSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 7493fe4c343aSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 7494fe4c343aSmrg lt_c_name_lib_hook="\ 7495fe4c343aSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 7496fe4c343aSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 74971bedbe3fSmrgelse 7498fe4c343aSmrg # Disable hooks by default. 7499fe4c343aSmrg lt_cv_sys_global_symbol_to_import= 7500fe4c343aSmrg lt_cdecl_hook= 7501fe4c343aSmrg lt_c_name_hook= 7502fe4c343aSmrg lt_c_name_lib_hook= 75031bedbe3fSmrgfi 75041bedbe3fSmrg 7505fe4c343aSmrg# Transform an extracted symbol line into a proper C declaration. 7506fe4c343aSmrg# Some systems (esp. on ia64) link data and code symbols differently, 7507fe4c343aSmrg# so use this general approach. 7508da1f2d5dSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 7509fe4c343aSmrg$lt_cdecl_hook\ 7510fe4c343aSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 7511fe4c343aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 75121bedbe3fSmrg 7513fe4c343aSmrg# Transform an extracted symbol line into symbol name and symbol address 7514da1f2d5dSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 7515fe4c343aSmrg$lt_c_name_hook\ 7516fe4c343aSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7517fe4c343aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7518fe4c343aSmrg 7519fe4c343aSmrg# Transform an extracted symbol line into symbol name with lib prefix and 7520fe4c343aSmrg# symbol address. 7521da1f2d5dSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 7522fe4c343aSmrg$lt_c_name_lib_hook\ 7523fe4c343aSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 7524fe4c343aSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 7525fe4c343aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7526ba6a1819Smrg 7527fe4c343aSmrg# Handle CRLF in mingw tool chain 7528fe4c343aSmrgopt_cr= 7529fe4c343aSmrgcase $build_os in 7530fe4c343aSmrgmingw*) 7531fe4c343aSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 7532fe4c343aSmrg ;; 7533fe4c343aSmrgesac 7534549e21daSmrg 7535fe4c343aSmrg# Try without a prefix underscore, then with it. 7536fe4c343aSmrgfor ac_symprfx in "" "_"; do 7537549e21daSmrg 7538fe4c343aSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 7539fe4c343aSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 7540ba6a1819Smrg 7541fe4c343aSmrg # Write the raw and C identifiers. 7542fe4c343aSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 7543fe4c343aSmrg # Fake it for dumpbin and say T for any non-static function, 7544fe4c343aSmrg # D for any global variable and I for any imported variable. 7545da1f2d5dSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 7546fe4c343aSmrg # which start with @ or ?. 7547fe4c343aSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 7548fe4c343aSmrg" {last_section=section; section=\$ 3};"\ 7549fe4c343aSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 7550fe4c343aSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 7551fe4c343aSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 7552fe4c343aSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 7553fe4c343aSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 7554fe4c343aSmrg" \$ 0!~/External *\|/{next};"\ 7555fe4c343aSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 7556fe4c343aSmrg" {if(hide[section]) next};"\ 7557fe4c343aSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 7558fe4c343aSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 7559fe4c343aSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 7560fe4c343aSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 7561fe4c343aSmrg" ' prfx=^$ac_symprfx]" 7562fe4c343aSmrg else 7563da1f2d5dSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 7564fe4c343aSmrg fi 7565da1f2d5dSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7566fe4c343aSmrg 7567fe4c343aSmrg # Check to see that the pipe works correctly. 7568fe4c343aSmrg pipe_works=no 7569fe4c343aSmrg 7570fe4c343aSmrg rm -f conftest* 7571fe4c343aSmrg cat > conftest.$ac_ext <<_LT_EOF 7572fe4c343aSmrg#ifdef __cplusplus 7573fe4c343aSmrgextern "C" { 7574fe4c343aSmrg#endif 7575fe4c343aSmrgchar nm_test_var; 7576fe4c343aSmrgvoid nm_test_func(void); 7577fe4c343aSmrgvoid nm_test_func(void){} 7578fe4c343aSmrg#ifdef __cplusplus 7579fe4c343aSmrg} 7580fe4c343aSmrg#endif 7581fe4c343aSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 7582fe4c343aSmrg_LT_EOF 7583fe4c343aSmrg 7584fe4c343aSmrg if AC_TRY_EVAL(ac_compile); then 7585fe4c343aSmrg # Now try to grab the symbols. 7586fe4c343aSmrg nlist=conftest.nm 7587fe4c343aSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 7588fe4c343aSmrg # Try sorting and uniquifying the output. 7589fe4c343aSmrg if sort "$nlist" | uniq > "$nlist"T; then 7590fe4c343aSmrg mv -f "$nlist"T "$nlist" 7591fe4c343aSmrg else 7592fe4c343aSmrg rm -f "$nlist"T 7593fe4c343aSmrg fi 7594fe4c343aSmrg 7595fe4c343aSmrg # Make sure that we snagged all the symbols we need. 7596fe4c343aSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 7597fe4c343aSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 7598fe4c343aSmrg cat <<_LT_EOF > conftest.$ac_ext 7599fe4c343aSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 7600fe4c343aSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 7601fe4c343aSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 7602fe4c343aSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 7603fe4c343aSmrg# define LT@&t@_DLSYM_CONST 7604fe4c343aSmrg#elif defined __osf__ 7605fe4c343aSmrg/* This system does not cope well with relocations in const data. */ 7606fe4c343aSmrg# define LT@&t@_DLSYM_CONST 7607fe4c343aSmrg#else 7608fe4c343aSmrg# define LT@&t@_DLSYM_CONST const 7609fe4c343aSmrg#endif 7610ba6a1819Smrg 7611fe4c343aSmrg#ifdef __cplusplus 7612fe4c343aSmrgextern "C" { 7613fe4c343aSmrg#endif 7614fe4c343aSmrg 7615fe4c343aSmrg_LT_EOF 7616fe4c343aSmrg # Now generate the symbol file. 7617fe4c343aSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7618fe4c343aSmrg 7619fe4c343aSmrg cat <<_LT_EOF >> conftest.$ac_ext 7620fe4c343aSmrg 7621fe4c343aSmrg/* The mapping between symbol names and symbols. */ 7622fe4c343aSmrgLT@&t@_DLSYM_CONST struct { 7623fe4c343aSmrg const char *name; 7624fe4c343aSmrg void *address; 7625fe4c343aSmrg} 7626fe4c343aSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 7627fe4c343aSmrg{ 7628fe4c343aSmrg { "@PROGRAM@", (void *) 0 }, 7629fe4c343aSmrg_LT_EOF 7630fe4c343aSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 7631fe4c343aSmrg cat <<\_LT_EOF >> conftest.$ac_ext 7632fe4c343aSmrg {0, (void *) 0} 7633fe4c343aSmrg}; 7634fe4c343aSmrg 7635fe4c343aSmrg/* This works around a problem in FreeBSD linker */ 7636fe4c343aSmrg#ifdef FREEBSD_WORKAROUND 7637fe4c343aSmrgstatic const void *lt_preloaded_setup() { 7638fe4c343aSmrg return lt__PROGRAM__LTX_preloaded_symbols; 7639fe4c343aSmrg} 7640fe4c343aSmrg#endif 7641fe4c343aSmrg 7642fe4c343aSmrg#ifdef __cplusplus 7643fe4c343aSmrg} 7644fe4c343aSmrg#endif 7645fe4c343aSmrg_LT_EOF 7646fe4c343aSmrg # Now try linking the two files. 7647fe4c343aSmrg mv conftest.$ac_objext conftstm.$ac_objext 7648fe4c343aSmrg lt_globsym_save_LIBS=$LIBS 7649fe4c343aSmrg lt_globsym_save_CFLAGS=$CFLAGS 7650fe4c343aSmrg LIBS=conftstm.$ac_objext 7651fe4c343aSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 7652fe4c343aSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 7653fe4c343aSmrg pipe_works=yes 7654fe4c343aSmrg fi 7655fe4c343aSmrg LIBS=$lt_globsym_save_LIBS 7656fe4c343aSmrg CFLAGS=$lt_globsym_save_CFLAGS 7657fe4c343aSmrg else 7658fe4c343aSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 7659fe4c343aSmrg fi 7660fe4c343aSmrg else 7661fe4c343aSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7662fe4c343aSmrg fi 7663fe4c343aSmrg else 7664fe4c343aSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 76651bedbe3fSmrg fi 7666fe4c343aSmrg else 7667fe4c343aSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 7668fe4c343aSmrg cat conftest.$ac_ext >&5 7669fe4c343aSmrg fi 7670fe4c343aSmrg rm -rf conftest* conftst* 7671fe4c343aSmrg 7672fe4c343aSmrg # Do not use the global_symbol_pipe unless it works. 7673fe4c343aSmrg if test yes = "$pipe_works"; then 7674fe4c343aSmrg break 7675fe4c343aSmrg else 7676fe4c343aSmrg lt_cv_sys_global_symbol_pipe= 7677fe4c343aSmrg fi 7678fe4c343aSmrgdone 76791bedbe3fSmrg]) 7680fe4c343aSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 7681fe4c343aSmrg lt_cv_sys_global_symbol_to_cdecl= 7682fe4c343aSmrgfi 7683fe4c343aSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 7684fe4c343aSmrg AC_MSG_RESULT(failed) 7685fe4c343aSmrgelse 7686fe4c343aSmrg AC_MSG_RESULT(ok) 7687fe4c343aSmrgfi 76881bedbe3fSmrg 7689fe4c343aSmrg# Response file support. 7690fe4c343aSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 7691fe4c343aSmrg nm_file_list_spec='@' 7692fe4c343aSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 7693fe4c343aSmrg nm_file_list_spec='@' 76941bedbe3fSmrgfi 76951bedbe3fSmrg 7696fe4c343aSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 7697fe4c343aSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 7698fe4c343aSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 7699fe4c343aSmrg [Transform the output of nm in a proper C declaration]) 7700fe4c343aSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 7701fe4c343aSmrg [Transform the output of nm into a list of symbols to manually relocate]) 7702fe4c343aSmrg_LT_DECL([global_symbol_to_c_name_address], 7703fe4c343aSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 7704fe4c343aSmrg [Transform the output of nm in a C name address pair]) 7705fe4c343aSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 7706fe4c343aSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 7707fe4c343aSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 7708fe4c343aSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 7709fe4c343aSmrg [The name lister interface]) 7710fe4c343aSmrg_LT_DECL([], [nm_file_list_spec], [1], 7711fe4c343aSmrg [Specify filename containing input files for $NM]) 7712fe4c343aSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 77131bedbe3fSmrg 77141bedbe3fSmrg 7715fe4c343aSmrg# _LT_COMPILER_PIC([TAGNAME]) 7716fe4c343aSmrg# --------------------------- 7717fe4c343aSmrgm4_defun([_LT_COMPILER_PIC], 7718fe4c343aSmrg[m4_require([_LT_TAG_COMPILER])dnl 7719fe4c343aSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 7720fe4c343aSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7721fe4c343aSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 77221bedbe3fSmrg 7723fe4c343aSmrgm4_if([$1], [CXX], [ 7724fe4c343aSmrg # C++ specific cases for pic, static, wl, etc. 7725fe4c343aSmrg if test yes = "$GXX"; then 7726fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7727fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 77281bedbe3fSmrg 7729fe4c343aSmrg case $host_os in 7730fe4c343aSmrg aix*) 7731fe4c343aSmrg # All AIX code is PIC. 7732fe4c343aSmrg if test ia64 = "$host_cpu"; then 7733fe4c343aSmrg # AIX 5 now supports IA64 processor 7734fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7735fe4c343aSmrg fi 7736fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7737fe4c343aSmrg ;; 7738ba6a1819Smrg 7739fe4c343aSmrg amigaos*) 7740fe4c343aSmrg case $host_cpu in 7741fe4c343aSmrg powerpc) 7742fe4c343aSmrg # see comment about AmigaOS4 .so support 7743fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7744fe4c343aSmrg ;; 7745fe4c343aSmrg m68k) 7746fe4c343aSmrg # FIXME: we need at least 68020 code to build shared libraries, but 7747fe4c343aSmrg # adding the '-m68020' flag to GCC prevents building anything better, 7748fe4c343aSmrg # like '-m68040'. 7749fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7750fe4c343aSmrg ;; 7751fe4c343aSmrg esac 7752fe4c343aSmrg ;; 7753fe4c343aSmrg 7754fe4c343aSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7755fe4c343aSmrg # PIC is the default for these OSes. 7756fe4c343aSmrg ;; 7757fe4c343aSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7758fe4c343aSmrg # This hack is so that the source file can tell whether it is being 7759fe4c343aSmrg # built for inclusion in a dll (and should export symbols for example). 7760fe4c343aSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 7761fe4c343aSmrg # (--disable-auto-import) libraries 7762fe4c343aSmrg m4_if([$1], [GCJ], [], 7763fe4c343aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7764fe4c343aSmrg case $host_os in 7765fe4c343aSmrg os2*) 7766fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 7767fe4c343aSmrg ;; 7768fe4c343aSmrg esac 7769fe4c343aSmrg ;; 7770fe4c343aSmrg darwin* | rhapsody*) 7771fe4c343aSmrg # PIC is the default on this platform 7772fe4c343aSmrg # Common symbols not allowed in MH_DYLIB files 7773fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7774fe4c343aSmrg ;; 7775fe4c343aSmrg *djgpp*) 7776fe4c343aSmrg # DJGPP does not support shared libraries at all 7777fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7778fe4c343aSmrg ;; 7779fe4c343aSmrg haiku*) 7780fe4c343aSmrg # PIC is the default for Haiku. 7781fe4c343aSmrg # The "-static" flag exists, but is broken. 7782fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 7783fe4c343aSmrg ;; 7784fe4c343aSmrg interix[[3-9]]*) 7785fe4c343aSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7786fe4c343aSmrg # Instead, we relocate shared libraries at runtime. 7787fe4c343aSmrg ;; 7788fe4c343aSmrg sysv4*MP*) 7789fe4c343aSmrg if test -d /usr/nec; then 7790fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7791fe4c343aSmrg fi 7792fe4c343aSmrg ;; 7793fe4c343aSmrg hpux*) 7794fe4c343aSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 7795fe4c343aSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 7796fe4c343aSmrg # sets the default TLS model and affects inlining. 7797fe4c343aSmrg case $host_cpu in 7798fe4c343aSmrg hppa*64*) 7799fe4c343aSmrg ;; 7800fe4c343aSmrg *) 7801fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7802fe4c343aSmrg ;; 7803fe4c343aSmrg esac 7804fe4c343aSmrg ;; 7805fe4c343aSmrg *qnx* | *nto*) 7806fe4c343aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7807fe4c343aSmrg # it will coredump. 7808fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7809fe4c343aSmrg ;; 7810fe4c343aSmrg *) 7811fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7812fe4c343aSmrg ;; 7813fe4c343aSmrg esac 7814fe4c343aSmrg else 7815fe4c343aSmrg case $host_os in 7816fe4c343aSmrg aix[[4-9]]*) 7817fe4c343aSmrg # All AIX code is PIC. 7818fe4c343aSmrg if test ia64 = "$host_cpu"; then 7819fe4c343aSmrg # AIX 5 now supports IA64 processor 7820fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7821fe4c343aSmrg else 7822fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7823fe4c343aSmrg fi 7824fe4c343aSmrg ;; 7825fe4c343aSmrg chorus*) 7826fe4c343aSmrg case $cc_basename in 7827fe4c343aSmrg cxch68*) 7828fe4c343aSmrg # Green Hills C++ Compiler 7829fe4c343aSmrg # _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" 7830fe4c343aSmrg ;; 7831fe4c343aSmrg esac 7832fe4c343aSmrg ;; 7833fe4c343aSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 7834fe4c343aSmrg # This hack is so that the source file can tell whether it is being 7835fe4c343aSmrg # built for inclusion in a dll (and should export symbols for example). 7836fe4c343aSmrg m4_if([$1], [GCJ], [], 7837fe4c343aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 7838fe4c343aSmrg ;; 7839fe4c343aSmrg dgux*) 7840fe4c343aSmrg case $cc_basename in 7841fe4c343aSmrg ec++*) 7842fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7843fe4c343aSmrg ;; 7844fe4c343aSmrg ghcx*) 7845fe4c343aSmrg # Green Hills C++ Compiler 7846fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7847fe4c343aSmrg ;; 7848fe4c343aSmrg *) 7849fe4c343aSmrg ;; 7850fe4c343aSmrg esac 7851fe4c343aSmrg ;; 7852da1f2d5dSmrg freebsd* | dragonfly* | midnightbsd*) 7853fe4c343aSmrg # FreeBSD uses GNU C++ 7854fe4c343aSmrg ;; 7855fe4c343aSmrg hpux9* | hpux10* | hpux11*) 7856fe4c343aSmrg case $cc_basename in 7857fe4c343aSmrg CC*) 7858fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7859fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7860fe4c343aSmrg if test ia64 != "$host_cpu"; then 7861fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7862fe4c343aSmrg fi 7863fe4c343aSmrg ;; 7864fe4c343aSmrg aCC*) 7865fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7866fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 7867fe4c343aSmrg case $host_cpu in 7868fe4c343aSmrg hppa*64*|ia64*) 7869fe4c343aSmrg # +Z the default 7870fe4c343aSmrg ;; 7871fe4c343aSmrg *) 7872fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7873fe4c343aSmrg ;; 7874fe4c343aSmrg esac 7875fe4c343aSmrg ;; 7876fe4c343aSmrg *) 7877fe4c343aSmrg ;; 7878fe4c343aSmrg esac 7879fe4c343aSmrg ;; 7880fe4c343aSmrg interix*) 7881fe4c343aSmrg # This is c89, which is MS Visual C++ (no shared libs) 7882fe4c343aSmrg # Anyone wants to do a port? 7883fe4c343aSmrg ;; 7884fe4c343aSmrg irix5* | irix6* | nonstopux*) 7885fe4c343aSmrg case $cc_basename in 7886fe4c343aSmrg CC*) 7887fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7888fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7889fe4c343aSmrg # CC pic flag -KPIC is the default. 7890fe4c343aSmrg ;; 7891fe4c343aSmrg *) 7892fe4c343aSmrg ;; 7893fe4c343aSmrg esac 7894fe4c343aSmrg ;; 7895fe4c343aSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7896fe4c343aSmrg case $cc_basename in 7897fe4c343aSmrg KCC*) 7898fe4c343aSmrg # KAI C++ Compiler 7899fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7900fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7901fe4c343aSmrg ;; 7902fe4c343aSmrg ecpc* ) 7903fe4c343aSmrg # old Intel C++ for x86_64, which still supported -KPIC. 7904fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7905fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7906fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7907fe4c343aSmrg ;; 7908fe4c343aSmrg icpc* ) 7909fe4c343aSmrg # Intel C++, used to be incompatible with GCC. 7910fe4c343aSmrg # ICC 10 doesn't accept -KPIC any more. 7911fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7912fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7913fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7914fe4c343aSmrg ;; 7915fe4c343aSmrg pgCC* | pgcpp*) 7916fe4c343aSmrg # Portland Group C++ compiler 7917fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7918fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7919fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7920fe4c343aSmrg ;; 7921fe4c343aSmrg cxx*) 7922fe4c343aSmrg # Compaq C++ 7923fe4c343aSmrg # Make sure the PIC flag is empty. It appears that all Alpha 7924fe4c343aSmrg # Linux and Compaq Tru64 Unix objects are PIC. 7925fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7926fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7927fe4c343aSmrg ;; 7928fe4c343aSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 7929fe4c343aSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 7930fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7931fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 7932fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 7933fe4c343aSmrg ;; 7934fe4c343aSmrg *) 7935da1f2d5dSmrg case `$CC -V 2>&1 | $SED 5q` in 7936fe4c343aSmrg *Sun\ C*) 7937fe4c343aSmrg # Sun C++ 5.9 7938fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7939fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7940fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7941fe4c343aSmrg ;; 7942fe4c343aSmrg esac 7943fe4c343aSmrg ;; 7944fe4c343aSmrg esac 7945fe4c343aSmrg ;; 7946fe4c343aSmrg lynxos*) 7947fe4c343aSmrg ;; 7948fe4c343aSmrg m88k*) 7949fe4c343aSmrg ;; 7950fe4c343aSmrg mvs*) 7951fe4c343aSmrg case $cc_basename in 7952fe4c343aSmrg cxx*) 7953fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7954fe4c343aSmrg ;; 7955fe4c343aSmrg *) 7956fe4c343aSmrg ;; 7957fe4c343aSmrg esac 7958fe4c343aSmrg ;; 7959fe4c343aSmrg netbsd*) 7960fe4c343aSmrg ;; 7961fe4c343aSmrg *qnx* | *nto*) 7962fe4c343aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 7963fe4c343aSmrg # it will coredump. 7964fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 7965fe4c343aSmrg ;; 7966fe4c343aSmrg osf3* | osf4* | osf5*) 7967fe4c343aSmrg case $cc_basename in 7968fe4c343aSmrg KCC*) 7969fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7970fe4c343aSmrg ;; 7971fe4c343aSmrg RCC*) 7972fe4c343aSmrg # Rational C++ 2.4.1 7973fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7974fe4c343aSmrg ;; 7975fe4c343aSmrg cxx*) 7976fe4c343aSmrg # Digital/Compaq C++ 7977fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7978fe4c343aSmrg # Make sure the PIC flag is empty. It appears that all Alpha 7979fe4c343aSmrg # Linux and Compaq Tru64 Unix objects are PIC. 7980fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7981fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7982fe4c343aSmrg ;; 7983fe4c343aSmrg *) 7984fe4c343aSmrg ;; 7985fe4c343aSmrg esac 7986fe4c343aSmrg ;; 7987fe4c343aSmrg psos*) 7988fe4c343aSmrg ;; 7989fe4c343aSmrg solaris*) 7990fe4c343aSmrg case $cc_basename in 7991fe4c343aSmrg CC* | sunCC*) 7992fe4c343aSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7993fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7994fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7995fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7996fe4c343aSmrg ;; 7997fe4c343aSmrg gcx*) 7998fe4c343aSmrg # Green Hills C++ Compiler 7999fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8000fe4c343aSmrg ;; 8001fe4c343aSmrg *) 8002fe4c343aSmrg ;; 8003fe4c343aSmrg esac 8004fe4c343aSmrg ;; 8005fe4c343aSmrg sunos4*) 8006fe4c343aSmrg case $cc_basename in 8007fe4c343aSmrg CC*) 8008fe4c343aSmrg # Sun C++ 4.x 8009fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8010fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8011fe4c343aSmrg ;; 8012fe4c343aSmrg lcc*) 8013fe4c343aSmrg # Lucid 8014fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8015fe4c343aSmrg ;; 8016fe4c343aSmrg *) 8017fe4c343aSmrg ;; 8018fe4c343aSmrg esac 8019fe4c343aSmrg ;; 8020fe4c343aSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8021fe4c343aSmrg case $cc_basename in 8022fe4c343aSmrg CC*) 8023fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8024fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8025fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8026fe4c343aSmrg ;; 8027fe4c343aSmrg esac 8028fe4c343aSmrg ;; 8029fe4c343aSmrg tandem*) 8030fe4c343aSmrg case $cc_basename in 8031fe4c343aSmrg NCC*) 8032fe4c343aSmrg # NonStop-UX NCC 3.20 8033fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8034fe4c343aSmrg ;; 8035fe4c343aSmrg *) 8036fe4c343aSmrg ;; 8037fe4c343aSmrg esac 8038fe4c343aSmrg ;; 8039fe4c343aSmrg vxworks*) 8040fe4c343aSmrg ;; 8041fe4c343aSmrg *) 8042fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8043fe4c343aSmrg ;; 8044fe4c343aSmrg esac 8045fe4c343aSmrg fi 8046fe4c343aSmrg], 8047fe4c343aSmrg[ 8048fe4c343aSmrg if test yes = "$GCC"; then 8049fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8050fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8051ba6a1819Smrg 8052fe4c343aSmrg case $host_os in 8053fe4c343aSmrg aix*) 8054fe4c343aSmrg # All AIX code is PIC. 8055fe4c343aSmrg if test ia64 = "$host_cpu"; then 8056fe4c343aSmrg # AIX 5 now supports IA64 processor 8057fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8058fe4c343aSmrg fi 8059fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8060fe4c343aSmrg ;; 8061ba6a1819Smrg 8062fe4c343aSmrg amigaos*) 8063fe4c343aSmrg case $host_cpu in 8064fe4c343aSmrg powerpc) 8065fe4c343aSmrg # see comment about AmigaOS4 .so support 8066fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8067fe4c343aSmrg ;; 8068fe4c343aSmrg m68k) 8069fe4c343aSmrg # FIXME: we need at least 68020 code to build shared libraries, but 8070fe4c343aSmrg # adding the '-m68020' flag to GCC prevents building anything better, 8071fe4c343aSmrg # like '-m68040'. 8072fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 8073fe4c343aSmrg ;; 8074fe4c343aSmrg esac 8075fe4c343aSmrg ;; 8076ba6a1819Smrg 8077fe4c343aSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 8078fe4c343aSmrg # PIC is the default for these OSes. 8079fe4c343aSmrg ;; 8080ba6a1819Smrg 8081fe4c343aSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8082fe4c343aSmrg # This hack is so that the source file can tell whether it is being 8083fe4c343aSmrg # built for inclusion in a dll (and should export symbols for example). 8084fe4c343aSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 8085fe4c343aSmrg # (--disable-auto-import) libraries 8086fe4c343aSmrg m4_if([$1], [GCJ], [], 8087fe4c343aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8088fe4c343aSmrg case $host_os in 8089fe4c343aSmrg os2*) 8090fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8091fe4c343aSmrg ;; 8092fe4c343aSmrg esac 8093fe4c343aSmrg ;; 8094549e21daSmrg 8095fe4c343aSmrg darwin* | rhapsody*) 8096fe4c343aSmrg # PIC is the default on this platform 8097fe4c343aSmrg # Common symbols not allowed in MH_DYLIB files 8098fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8099fe4c343aSmrg ;; 8100549e21daSmrg 8101fe4c343aSmrg haiku*) 8102fe4c343aSmrg # PIC is the default for Haiku. 8103fe4c343aSmrg # The "-static" flag exists, but is broken. 8104fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 8105fe4c343aSmrg ;; 8106549e21daSmrg 8107fe4c343aSmrg hpux*) 8108fe4c343aSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8109fe4c343aSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8110fe4c343aSmrg # sets the default TLS model and affects inlining. 8111fe4c343aSmrg case $host_cpu in 8112fe4c343aSmrg hppa*64*) 8113fe4c343aSmrg # +Z the default 8114fe4c343aSmrg ;; 8115fe4c343aSmrg *) 8116fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8117fe4c343aSmrg ;; 8118fe4c343aSmrg esac 8119fe4c343aSmrg ;; 8120ba6a1819Smrg 8121fe4c343aSmrg interix[[3-9]]*) 8122fe4c343aSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8123fe4c343aSmrg # Instead, we relocate shared libraries at runtime. 8124fe4c343aSmrg ;; 8125ba6a1819Smrg 8126fe4c343aSmrg msdosdjgpp*) 8127fe4c343aSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 8128fe4c343aSmrg # on systems that don't support them. 8129fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8130fe4c343aSmrg enable_shared=no 8131fe4c343aSmrg ;; 81321bedbe3fSmrg 8133fe4c343aSmrg *nto* | *qnx*) 8134fe4c343aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8135fe4c343aSmrg # it will coredump. 8136fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8137fe4c343aSmrg ;; 81381bedbe3fSmrg 8139fe4c343aSmrg sysv4*MP*) 8140fe4c343aSmrg if test -d /usr/nec; then 8141fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8142fe4c343aSmrg fi 8143fe4c343aSmrg ;; 8144ba6a1819Smrg 8145fe4c343aSmrg *) 8146fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8147fe4c343aSmrg ;; 8148fe4c343aSmrg esac 8149ba6a1819Smrg 8150fe4c343aSmrg case $cc_basename in 8151fe4c343aSmrg nvcc*) # Cuda Compiler Driver 2.2 8152fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8153fe4c343aSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8154fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8155fe4c343aSmrg fi 8156fe4c343aSmrg ;; 8157fe4c343aSmrg esac 8158fe4c343aSmrg else 8159fe4c343aSmrg # PORTME Check for flag to pass linker flags through the system compiler. 8160fe4c343aSmrg case $host_os in 8161fe4c343aSmrg aix*) 8162fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8163fe4c343aSmrg if test ia64 = "$host_cpu"; then 8164fe4c343aSmrg # AIX 5 now supports IA64 processor 8165fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8166fe4c343aSmrg else 8167fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8168fe4c343aSmrg fi 8169fe4c343aSmrg ;; 8170ba6a1819Smrg 8171fe4c343aSmrg darwin* | rhapsody*) 8172fe4c343aSmrg # PIC is the default on this platform 8173fe4c343aSmrg # Common symbols not allowed in MH_DYLIB files 8174fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8175fe4c343aSmrg case $cc_basename in 8176fe4c343aSmrg nagfor*) 8177fe4c343aSmrg # NAG Fortran compiler 8178fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8179fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8180fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8181fe4c343aSmrg ;; 8182fe4c343aSmrg esac 8183fe4c343aSmrg ;; 81841bedbe3fSmrg 8185fe4c343aSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8186fe4c343aSmrg # This hack is so that the source file can tell whether it is being 8187fe4c343aSmrg # built for inclusion in a dll (and should export symbols for example). 8188fe4c343aSmrg m4_if([$1], [GCJ], [], 8189fe4c343aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8190fe4c343aSmrg case $host_os in 8191fe4c343aSmrg os2*) 8192fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8193fe4c343aSmrg ;; 8194fe4c343aSmrg esac 8195fe4c343aSmrg ;; 8196ba6a1819Smrg 8197fe4c343aSmrg hpux9* | hpux10* | hpux11*) 8198fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8199fe4c343aSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8200fe4c343aSmrg # not for PA HP-UX. 8201fe4c343aSmrg case $host_cpu in 8202fe4c343aSmrg hppa*64*|ia64*) 8203fe4c343aSmrg # +Z the default 8204fe4c343aSmrg ;; 8205fe4c343aSmrg *) 8206fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8207fe4c343aSmrg ;; 8208fe4c343aSmrg esac 8209fe4c343aSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8210fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8211fe4c343aSmrg ;; 8212ba6a1819Smrg 8213fe4c343aSmrg irix5* | irix6* | nonstopux*) 8214fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8215fe4c343aSmrg # PIC (with -KPIC) is the default. 8216fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8217fe4c343aSmrg ;; 8218ba6a1819Smrg 8219fe4c343aSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8220fe4c343aSmrg case $cc_basename in 8221fe4c343aSmrg # old Intel for x86_64, which still supported -KPIC. 8222fe4c343aSmrg ecc*) 8223fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8224fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8225fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8226fe4c343aSmrg ;; 8227fe4c343aSmrg # icc used to be incompatible with GCC. 8228fe4c343aSmrg # ICC 10 doesn't accept -KPIC any more. 8229fe4c343aSmrg icc* | ifort*) 8230fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8231fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8232fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8233fe4c343aSmrg ;; 8234fe4c343aSmrg # Lahey Fortran 8.1. 8235fe4c343aSmrg lf95*) 8236fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8237fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8238fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8239fe4c343aSmrg ;; 8240fe4c343aSmrg nagfor*) 8241fe4c343aSmrg # NAG Fortran compiler 8242fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8243fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8244fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8245fe4c343aSmrg ;; 8246fe4c343aSmrg tcc*) 8247fe4c343aSmrg # Fabrice Bellard et al's Tiny C Compiler 8248fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8249fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8250fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8251fe4c343aSmrg ;; 8252fe4c343aSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8253fe4c343aSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 8254fe4c343aSmrg # which looks to be a dead project) 8255fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8256fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8257fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8258fe4c343aSmrg ;; 8259fe4c343aSmrg ccc*) 8260fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8261fe4c343aSmrg # All Alpha code is PIC. 8262fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8263fe4c343aSmrg ;; 8264fe4c343aSmrg xl* | bgxl* | bgf* | mpixl*) 8265fe4c343aSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8266fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8267fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8268fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8269fe4c343aSmrg ;; 8270fe4c343aSmrg *) 8271da1f2d5dSmrg case `$CC -V 2>&1 | $SED 5q` in 8272fe4c343aSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8273fe4c343aSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8274fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8275fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8276fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8277fe4c343aSmrg ;; 8278fe4c343aSmrg *Sun\ F* | *Sun*Fortran*) 8279fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8280fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8281fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8282fe4c343aSmrg ;; 8283fe4c343aSmrg *Sun\ C*) 8284fe4c343aSmrg # Sun C 5.9 8285fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8286fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8287fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8288fe4c343aSmrg ;; 8289fe4c343aSmrg *Intel*\ [[CF]]*Compiler*) 8290fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8291fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8292fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8293fe4c343aSmrg ;; 8294fe4c343aSmrg *Portland\ Group*) 8295fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8296fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8297fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8298fe4c343aSmrg ;; 8299fe4c343aSmrg esac 8300fe4c343aSmrg ;; 8301fe4c343aSmrg esac 8302fe4c343aSmrg ;; 8303549e21daSmrg 8304fe4c343aSmrg newsos6) 8305fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8306fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8307fe4c343aSmrg ;; 8308549e21daSmrg 8309fe4c343aSmrg *nto* | *qnx*) 8310fe4c343aSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8311fe4c343aSmrg # it will coredump. 8312fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8313fe4c343aSmrg ;; 8314549e21daSmrg 8315fe4c343aSmrg osf3* | osf4* | osf5*) 8316fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8317fe4c343aSmrg # All OSF/1 code is PIC. 8318fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8319fe4c343aSmrg ;; 8320549e21daSmrg 8321fe4c343aSmrg rdos*) 8322fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8323fe4c343aSmrg ;; 8324549e21daSmrg 8325fe4c343aSmrg solaris*) 8326fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8327fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8328fe4c343aSmrg case $cc_basename in 8329fe4c343aSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8330fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8331fe4c343aSmrg *) 8332fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8333fe4c343aSmrg esac 8334fe4c343aSmrg ;; 83351bedbe3fSmrg 8336fe4c343aSmrg sunos4*) 8337fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8338fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8339fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8340fe4c343aSmrg ;; 8341ba6a1819Smrg 8342fe4c343aSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 8343fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8344fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8345fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8346fe4c343aSmrg ;; 8347ba6a1819Smrg 8348fe4c343aSmrg sysv4*MP*) 8349fe4c343aSmrg if test -d /usr/nec; then 8350fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8351fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8352fe4c343aSmrg fi 8353fe4c343aSmrg ;; 8354ba6a1819Smrg 8355fe4c343aSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8356fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8357fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8358fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8359fe4c343aSmrg ;; 8360ba6a1819Smrg 8361fe4c343aSmrg unicos*) 8362fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8363fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8364fe4c343aSmrg ;; 8365ba6a1819Smrg 8366fe4c343aSmrg uts4*) 8367fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8368fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8369fe4c343aSmrg ;; 8370ba6a1819Smrg 8371fe4c343aSmrg *) 8372fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8373fe4c343aSmrg ;; 8374fe4c343aSmrg esac 8375fe4c343aSmrg fi 8376fe4c343aSmrg]) 8377fe4c343aSmrgcase $host_os in 8378fe4c343aSmrg # For platforms that do not support PIC, -DPIC is meaningless: 8379fe4c343aSmrg *djgpp*) 8380fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8381fe4c343aSmrg ;; 8382fe4c343aSmrg *) 8383fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8384fe4c343aSmrg ;; 8385fe4c343aSmrgesac 8386549e21daSmrg 8387fe4c343aSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8388fe4c343aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8389fe4c343aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8390fe4c343aSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8391ba6a1819Smrg 8392fe4c343aSmrg# 8393fe4c343aSmrg# Check to make sure the PIC flag actually works. 8394fe4c343aSmrg# 8395fe4c343aSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8396fe4c343aSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8397fe4c343aSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8398fe4c343aSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8399fe4c343aSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8400fe4c343aSmrg "" | " "*) ;; 8401fe4c343aSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8402fe4c343aSmrg esac], 8403fe4c343aSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8404fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8405fe4c343aSmrgfi 8406fe4c343aSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8407fe4c343aSmrg [Additional compiler flags for building library objects]) 8408ba6a1819Smrg 8409fe4c343aSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8410fe4c343aSmrg [How to pass a linker flag through the compiler]) 8411fe4c343aSmrg# 8412fe4c343aSmrg# Check to make sure the static flag actually works. 8413fe4c343aSmrg# 8414fe4c343aSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 8415fe4c343aSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 8416fe4c343aSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 8417fe4c343aSmrg $lt_tmp_static_flag, 8418fe4c343aSmrg [], 8419fe4c343aSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 8420fe4c343aSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 8421fe4c343aSmrg [Compiler flag to prevent dynamic linking]) 8422fe4c343aSmrg])# _LT_COMPILER_PIC 8423ba6a1819Smrg 8424549e21daSmrg 8425fe4c343aSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 8426fe4c343aSmrg# ---------------------------- 8427fe4c343aSmrg# See if the linker supports building shared libraries. 8428fe4c343aSmrgm4_defun([_LT_LINKER_SHLIBS], 8429fe4c343aSmrg[AC_REQUIRE([LT_PATH_LD])dnl 8430fe4c343aSmrgAC_REQUIRE([LT_PATH_NM])dnl 8431fe4c343aSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8432fe4c343aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 8433fe4c343aSmrgm4_require([_LT_DECL_EGREP])dnl 8434fe4c343aSmrgm4_require([_LT_DECL_SED])dnl 8435fe4c343aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 8436fe4c343aSmrgm4_require([_LT_TAG_COMPILER])dnl 8437fe4c343aSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8438fe4c343aSmrgm4_if([$1], [CXX], [ 8439fe4c343aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8440fe4c343aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8441fe4c343aSmrg case $host_os in 8442fe4c343aSmrg aix[[4-9]]*) 8443fe4c343aSmrg # If we're using GNU nm, then we don't want the "-C" option. 8444fe4c343aSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8445fe4c343aSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8446fe4c343aSmrg # weak defined symbols like other global defined symbols, whereas 8447fe4c343aSmrg # GNU nm marks them as "W". 8448fe4c343aSmrg # While the 'weak' keyword is ignored in the Export File, we need 8449fe4c343aSmrg # it in the Import File for the 'aix-soname' feature, so we have 8450fe4c343aSmrg # to replace the "-B" option with "-P" for AIX nm. 8451fe4c343aSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8452fe4c343aSmrg _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' 8453fe4c343aSmrg else 8454da1f2d5dSmrg _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' 8455fe4c343aSmrg fi 8456fe4c343aSmrg ;; 8457fe4c343aSmrg pw32*) 8458fe4c343aSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 8459fe4c343aSmrg ;; 8460fe4c343aSmrg cygwin* | mingw* | cegcc*) 8461fe4c343aSmrg case $cc_basename in 8462da1f2d5dSmrg cl* | icl*) 8463fe4c343aSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 8464fe4c343aSmrg ;; 8465fe4c343aSmrg *) 8466fe4c343aSmrg _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' 8467fe4c343aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8468fe4c343aSmrg ;; 8469fe4c343aSmrg esac 8470fe4c343aSmrg ;; 8471fe4c343aSmrg *) 8472fe4c343aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8473fe4c343aSmrg ;; 8474fe4c343aSmrg esac 8475fe4c343aSmrg], [ 8476fe4c343aSmrg runpath_var= 8477fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 8478fe4c343aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8479fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)= 8480fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 8481fe4c343aSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 8482fe4c343aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8483fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8484fe4c343aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 8485fe4c343aSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 8486fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8487fe4c343aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8488fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8489fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8490fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 8491fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8492fe4c343aSmrg _LT_TAGVAR(inherit_rpath, $1)=no 8493fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 8494fe4c343aSmrg _LT_TAGVAR(module_cmds, $1)= 8495fe4c343aSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 8496fe4c343aSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 8497fe4c343aSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 8498fe4c343aSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 8499fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8500fe4c343aSmrg # include_expsyms should be a list of space-separated symbols to be *always* 8501fe4c343aSmrg # included in the symbol list 8502fe4c343aSmrg _LT_TAGVAR(include_expsyms, $1)= 8503fe4c343aSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 8504fe4c343aSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 8505fe4c343aSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 8506fe4c343aSmrg # as well as any symbol that contains 'd'. 8507fe4c343aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 8508fe4c343aSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 8509fe4c343aSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 8510fe4c343aSmrg # the symbol is explicitly referenced. Since portable code cannot 8511fe4c343aSmrg # rely on this symbol name, it's probably fine to never include it in 8512fe4c343aSmrg # preloaded symbol tables. 8513fe4c343aSmrg # Exclude shared library initialization/finalization symbols. 8514fe4c343aSmrgdnl Note also adjust exclude_expsyms for C++ above. 8515fe4c343aSmrg extract_expsyms_cmds= 8516ba6a1819Smrg 8517fe4c343aSmrg case $host_os in 8518fe4c343aSmrg cygwin* | mingw* | pw32* | cegcc*) 8519da1f2d5dSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 8520fe4c343aSmrg # When not using gcc, we currently assume that we are using 8521da1f2d5dSmrg # Microsoft Visual C++ or Intel C++ Compiler. 8522fe4c343aSmrg if test yes != "$GCC"; then 8523fe4c343aSmrg with_gnu_ld=no 8524fe4c343aSmrg fi 8525fe4c343aSmrg ;; 8526fe4c343aSmrg interix*) 8527da1f2d5dSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 8528fe4c343aSmrg with_gnu_ld=yes 8529fe4c343aSmrg ;; 8530fe4c343aSmrg openbsd* | bitrig*) 8531fe4c343aSmrg with_gnu_ld=no 8532fe4c343aSmrg ;; 8533fe4c343aSmrg esac 8534ba6a1819Smrg 8535fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 8536549e21daSmrg 8537fe4c343aSmrg # On some targets, GNU ld is compatible enough with the native linker 8538fe4c343aSmrg # that we're better off using the native interface for both. 8539fe4c343aSmrg lt_use_gnu_ld_interface=no 8540fe4c343aSmrg if test yes = "$with_gnu_ld"; then 8541fe4c343aSmrg case $host_os in 8542fe4c343aSmrg aix*) 8543fe4c343aSmrg # The AIX port of GNU ld has always aspired to compatibility 8544fe4c343aSmrg # with the native linker. However, as the warning in the GNU ld 8545fe4c343aSmrg # block says, versions before 2.19.5* couldn't really create working 8546fe4c343aSmrg # shared libraries, regardless of the interface used. 8547fe4c343aSmrg case `$LD -v 2>&1` in 8548fe4c343aSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 8549fe4c343aSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 8550fe4c343aSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 8551fe4c343aSmrg *) 8552fe4c343aSmrg lt_use_gnu_ld_interface=yes 8553fe4c343aSmrg ;; 8554fe4c343aSmrg esac 8555fe4c343aSmrg ;; 8556fe4c343aSmrg *) 8557fe4c343aSmrg lt_use_gnu_ld_interface=yes 8558fe4c343aSmrg ;; 8559fe4c343aSmrg esac 8560fe4c343aSmrg fi 8561549e21daSmrg 8562fe4c343aSmrg if test yes = "$lt_use_gnu_ld_interface"; then 8563fe4c343aSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 8564fe4c343aSmrg wlarc='$wl' 8565ba6a1819Smrg 8566fe4c343aSmrg # Set some defaults for GNU ld with shared library support. These 8567fe4c343aSmrg # are reset later if shared libraries are not supported. Putting them 8568fe4c343aSmrg # here allows them to be overridden if necessary. 8569fe4c343aSmrg runpath_var=LD_RUN_PATH 8570fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8571fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 8572fe4c343aSmrg # ancient GNU ld didn't support --whole-archive et. al. 8573fe4c343aSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 8574fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 8575fe4c343aSmrg else 8576fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8577fe4c343aSmrg fi 8578fe4c343aSmrg supports_anon_versioning=no 8579da1f2d5dSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 8580fe4c343aSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 8581fe4c343aSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 8582fe4c343aSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 8583fe4c343aSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 8584fe4c343aSmrg *\ 2.11.*) ;; # other 2.11 versions 8585fe4c343aSmrg *) supports_anon_versioning=yes ;; 8586fe4c343aSmrg esac 8587549e21daSmrg 8588fe4c343aSmrg # See if GNU ld supports shared libraries. 8589fe4c343aSmrg case $host_os in 8590fe4c343aSmrg aix[[3-9]]*) 8591fe4c343aSmrg # On AIX/PPC, the GNU linker is very broken 8592fe4c343aSmrg if test ia64 != "$host_cpu"; then 8593fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8594fe4c343aSmrg cat <<_LT_EOF 1>&2 8595ba6a1819Smrg 8596fe4c343aSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 8597fe4c343aSmrg*** to be unable to reliably create shared libraries on AIX. 8598fe4c343aSmrg*** Therefore, libtool is disabling shared libraries support. If you 8599fe4c343aSmrg*** really care for shared libraries, you may want to install binutils 8600fe4c343aSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 8601fe4c343aSmrg*** You will then need to restart the configuration process. 8602ba6a1819Smrg 8603fe4c343aSmrg_LT_EOF 8604fe4c343aSmrg fi 8605fe4c343aSmrg ;; 8606ba6a1819Smrg 8607fe4c343aSmrg amigaos*) 8608fe4c343aSmrg case $host_cpu in 8609fe4c343aSmrg powerpc) 8610fe4c343aSmrg # see comment about AmigaOS4 .so support 8611fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8612fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 8613fe4c343aSmrg ;; 8614fe4c343aSmrg m68k) 8615fe4c343aSmrg _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)' 8616fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8617fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8618fe4c343aSmrg ;; 8619fe4c343aSmrg esac 8620fe4c343aSmrg ;; 8621ba6a1819Smrg 8622fe4c343aSmrg beos*) 8623fe4c343aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8624fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8625fe4c343aSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8626fe4c343aSmrg # support --undefined. This deserves some investigation. FIXME 8627fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8628fe4c343aSmrg else 8629fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8630fe4c343aSmrg fi 8631fe4c343aSmrg ;; 8632ba6a1819Smrg 8633fe4c343aSmrg cygwin* | mingw* | pw32* | cegcc*) 8634fe4c343aSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8635fe4c343aSmrg # as there is no search path for DLLs. 8636fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8637fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 8638fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8639fe4c343aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 8640fe4c343aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8641fe4c343aSmrg _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' 8642fe4c343aSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8643ba6a1819Smrg 8644fe4c343aSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8645fe4c343aSmrg _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' 8646fe4c343aSmrg # If the export-symbols file already is a .def file, use it as 8647fe4c343aSmrg # is; otherwise, prepend EXPORTS... 8648fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 8649fe4c343aSmrg cp $export_symbols $output_objdir/$soname.def; 8650fe4c343aSmrg else 8651fe4c343aSmrg echo EXPORTS > $output_objdir/$soname.def; 8652fe4c343aSmrg cat $export_symbols >> $output_objdir/$soname.def; 8653fe4c343aSmrg fi~ 8654fe4c343aSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8655fe4c343aSmrg else 8656fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8657fe4c343aSmrg fi 8658fe4c343aSmrg ;; 8659ba6a1819Smrg 8660fe4c343aSmrg haiku*) 8661fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8662fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8663fe4c343aSmrg ;; 8664ba6a1819Smrg 8665fe4c343aSmrg os2*) 8666fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8667fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8668fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8669fe4c343aSmrg shrext_cmds=.dll 8670fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8671fe4c343aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8672fe4c343aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8673fe4c343aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8674fe4c343aSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 8675fe4c343aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8676fe4c343aSmrg emximp -o $lib $output_objdir/$libname.def' 8677fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 8678fe4c343aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 8679fe4c343aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 8680fe4c343aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 8681fe4c343aSmrg prefix_cmds="$SED"~ 8682fe4c343aSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 8683fe4c343aSmrg prefix_cmds="$prefix_cmds -e 1d"; 8684fe4c343aSmrg fi~ 8685fe4c343aSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 8686fe4c343aSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 8687fe4c343aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 8688fe4c343aSmrg emximp -o $lib $output_objdir/$libname.def' 8689fe4c343aSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 8690fe4c343aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8691da1f2d5dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 8692fe4c343aSmrg ;; 8693ba6a1819Smrg 8694fe4c343aSmrg interix[[3-9]]*) 8695fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8696fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8697fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 8698fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 8699fe4c343aSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8700fe4c343aSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8701fe4c343aSmrg # default) and relocated if they conflict, which is a slow very memory 8702fe4c343aSmrg # consuming and fragmenting process. To avoid this, we pick a random, 8703fe4c343aSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8704fe4c343aSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8705fe4c343aSmrg _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' 8706da1f2d5dSmrg _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' 8707fe4c343aSmrg ;; 8708ba6a1819Smrg 8709fe4c343aSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 8710fe4c343aSmrg tmp_diet=no 8711fe4c343aSmrg if test linux-dietlibc = "$host_os"; then 8712fe4c343aSmrg case $cc_basename in 8713fe4c343aSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 8714fe4c343aSmrg esac 8715fe4c343aSmrg fi 8716fe4c343aSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 8717fe4c343aSmrg && test no = "$tmp_diet" 8718fe4c343aSmrg then 8719fe4c343aSmrg tmp_addflag=' $pic_flag' 8720fe4c343aSmrg tmp_sharedflag='-shared' 8721fe4c343aSmrg case $cc_basename,$host_cpu in 8722fe4c343aSmrg pgcc*) # Portland Group C compiler 8723fe4c343aSmrg _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' 8724fe4c343aSmrg tmp_addflag=' $pic_flag' 8725fe4c343aSmrg ;; 8726fe4c343aSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 8727fe4c343aSmrg # Portland Group f77 and f90 compilers 8728fe4c343aSmrg _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' 8729fe4c343aSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 8730fe4c343aSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 8731fe4c343aSmrg tmp_addflag=' -i_dynamic' ;; 8732fe4c343aSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 8733fe4c343aSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 8734fe4c343aSmrg ifc* | ifort*) # Intel Fortran compiler 8735fe4c343aSmrg tmp_addflag=' -nofor_main' ;; 8736fe4c343aSmrg lf95*) # Lahey Fortran 8.1 8737fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8738fe4c343aSmrg tmp_sharedflag='--shared' ;; 8739fe4c343aSmrg nagfor*) # NAGFOR 5.3 8740fe4c343aSmrg tmp_sharedflag='-Wl,-shared' ;; 8741fe4c343aSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 8742fe4c343aSmrg tmp_sharedflag='-qmkshrobj' 8743fe4c343aSmrg tmp_addflag= ;; 8744fe4c343aSmrg nvcc*) # Cuda Compiler Driver 2.2 8745fe4c343aSmrg _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' 8746fe4c343aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8747fe4c343aSmrg ;; 8748fe4c343aSmrg esac 8749da1f2d5dSmrg case `$CC -V 2>&1 | $SED 5q` in 8750fe4c343aSmrg *Sun\ C*) # Sun C 5.9 8751fe4c343aSmrg _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' 8752fe4c343aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8753fe4c343aSmrg tmp_sharedflag='-G' ;; 8754fe4c343aSmrg *Sun\ F*) # Sun Fortran 8.3 8755fe4c343aSmrg tmp_sharedflag='-G' ;; 8756fe4c343aSmrg esac 8757fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8758549e21daSmrg 8759fe4c343aSmrg if test yes = "$supports_anon_versioning"; then 8760fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8761da1f2d5dSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8762fe4c343aSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8763fe4c343aSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 8764fe4c343aSmrg fi 8765ba6a1819Smrg 8766fe4c343aSmrg case $cc_basename in 8767fe4c343aSmrg tcc*) 8768fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 8769fe4c343aSmrg ;; 8770fe4c343aSmrg xlf* | bgf* | bgxlf* | mpixlf*) 8771fe4c343aSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 8772fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 8773fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8774fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 8775fe4c343aSmrg if test yes = "$supports_anon_versioning"; then 8776fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8777da1f2d5dSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8778fe4c343aSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8779fe4c343aSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 8780fe4c343aSmrg fi 8781fe4c343aSmrg ;; 8782fe4c343aSmrg esac 8783fe4c343aSmrg else 8784fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8785fe4c343aSmrg fi 8786fe4c343aSmrg ;; 8787549e21daSmrg 8788fe4c343aSmrg netbsd*) 8789fe4c343aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8790fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 8791fe4c343aSmrg wlarc= 8792fe4c343aSmrg else 8793fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8794fe4c343aSmrg _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' 8795fe4c343aSmrg fi 8796fe4c343aSmrg ;; 8797ba6a1819Smrg 8798fe4c343aSmrg solaris*) 8799fe4c343aSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 8800fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8801fe4c343aSmrg cat <<_LT_EOF 1>&2 8802ba6a1819Smrg 8803fe4c343aSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 8804fe4c343aSmrg*** create shared libraries on Solaris systems. Therefore, libtool 8805fe4c343aSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 8806fe4c343aSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 8807fe4c343aSmrg*** your PATH or compiler configuration so that the native linker is 8808fe4c343aSmrg*** used, and then restart. 8809549e21daSmrg 8810fe4c343aSmrg_LT_EOF 8811fe4c343aSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8812fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8813fe4c343aSmrg _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' 8814fe4c343aSmrg else 8815fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8816fe4c343aSmrg fi 8817fe4c343aSmrg ;; 8818ba6a1819Smrg 8819fe4c343aSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 8820fe4c343aSmrg case `$LD -v 2>&1` in 8821fe4c343aSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 8822fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8823fe4c343aSmrg cat <<_LT_EOF 1>&2 8824ba6a1819Smrg 8825fe4c343aSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 8826fe4c343aSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 8827fe4c343aSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 8828fe4c343aSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 8829fe4c343aSmrg*** your PATH or compiler configuration so that the native linker is 8830fe4c343aSmrg*** used, and then restart. 8831549e21daSmrg 8832fe4c343aSmrg_LT_EOF 8833fe4c343aSmrg ;; 8834fe4c343aSmrg *) 8835fe4c343aSmrg # For security reasons, it is highly recommended that you always 8836fe4c343aSmrg # use absolute paths for naming shared libraries, and exclude the 8837fe4c343aSmrg # DT_RUNPATH tag from executables and libraries. But doing so 8838fe4c343aSmrg # requires that you compile everything twice, which is a pain. 8839fe4c343aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8840fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 8841fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8842fe4c343aSmrg _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' 8843fe4c343aSmrg else 8844fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8845fe4c343aSmrg fi 8846fe4c343aSmrg ;; 8847fe4c343aSmrg esac 8848fe4c343aSmrg ;; 8849549e21daSmrg 8850fe4c343aSmrg sunos4*) 8851fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8852fe4c343aSmrg wlarc= 8853fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8854fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8855fe4c343aSmrg ;; 8856ba6a1819Smrg 8857fe4c343aSmrg *) 8858fe4c343aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8859fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8860fe4c343aSmrg _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' 8861fe4c343aSmrg else 8862fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 8863fe4c343aSmrg fi 8864fe4c343aSmrg ;; 8865fe4c343aSmrg esac 8866ba6a1819Smrg 8867fe4c343aSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 8868fe4c343aSmrg runpath_var= 8869fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8870fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 8871fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8872fe4c343aSmrg fi 8873fe4c343aSmrg else 8874fe4c343aSmrg # PORTME fill in a description of your system's linker (not GNU ld) 8875fe4c343aSmrg case $host_os in 8876fe4c343aSmrg aix3*) 8877fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8878fe4c343aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 8879fe4c343aSmrg _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' 8880fe4c343aSmrg # Note: this linker hardcodes the directories in LIBPATH if there 8881fe4c343aSmrg # are no directories specified by -L. 8882fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8883fe4c343aSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 8884fe4c343aSmrg # Neither direct hardcoding nor static linking is supported with a 8885fe4c343aSmrg # broken collect2. 8886fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8887fe4c343aSmrg fi 8888fe4c343aSmrg ;; 8889ba6a1819Smrg 8890fe4c343aSmrg aix[[4-9]]*) 8891fe4c343aSmrg if test ia64 = "$host_cpu"; then 8892fe4c343aSmrg # On IA64, the linker does run time linking by default, so we don't 8893fe4c343aSmrg # have to do anything special. 8894fe4c343aSmrg aix_use_runtimelinking=no 8895fe4c343aSmrg exp_sym_flag='-Bexport' 8896fe4c343aSmrg no_entry_flag= 8897fe4c343aSmrg else 8898fe4c343aSmrg # If we're using GNU nm, then we don't want the "-C" option. 8899fe4c343aSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 8900fe4c343aSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 8901fe4c343aSmrg # weak defined symbols like other global defined symbols, whereas 8902fe4c343aSmrg # GNU nm marks them as "W". 8903fe4c343aSmrg # While the 'weak' keyword is ignored in the Export File, we need 8904fe4c343aSmrg # it in the Import File for the 'aix-soname' feature, so we have 8905fe4c343aSmrg # to replace the "-B" option with "-P" for AIX nm. 8906fe4c343aSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 8907fe4c343aSmrg _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' 8908fe4c343aSmrg else 8909da1f2d5dSmrg _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' 8910fe4c343aSmrg fi 8911fe4c343aSmrg aix_use_runtimelinking=no 8912549e21daSmrg 8913fe4c343aSmrg # Test if we are trying to use run time linking or normal 8914fe4c343aSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8915fe4c343aSmrg # have runtime linking enabled, and use it for executables. 8916fe4c343aSmrg # For shared libraries, we enable/disable runtime linking 8917fe4c343aSmrg # depending on the kind of the shared library created - 8918fe4c343aSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 8919fe4c343aSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 8920fe4c343aSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 8921fe4c343aSmrg # lib.a static archive 8922fe4c343aSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 8923fe4c343aSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 8924fe4c343aSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 8925fe4c343aSmrg # lib.a(lib.so.V) shared, rtl:no 8926fe4c343aSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 8927fe4c343aSmrg # lib.a static archive 8928fe4c343aSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8929fe4c343aSmrg for ld_flag in $LDFLAGS; do 8930fe4c343aSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 8931fe4c343aSmrg aix_use_runtimelinking=yes 8932fe4c343aSmrg break 8933fe4c343aSmrg fi 8934fe4c343aSmrg done 8935fe4c343aSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 8936fe4c343aSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 8937fe4c343aSmrg # so we don't have lib.a shared libs to link our executables. 8938fe4c343aSmrg # We have to force runtime linking in this case. 8939fe4c343aSmrg aix_use_runtimelinking=yes 8940fe4c343aSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 8941fe4c343aSmrg fi 8942fe4c343aSmrg ;; 8943fe4c343aSmrg esac 8944549e21daSmrg 8945fe4c343aSmrg exp_sym_flag='-bexport' 8946fe4c343aSmrg no_entry_flag='-bnoentry' 8947fe4c343aSmrg fi 8948ba6a1819Smrg 8949fe4c343aSmrg # When large executables or shared objects are built, AIX ld can 8950fe4c343aSmrg # have problems creating the table of contents. If linking a library 8951fe4c343aSmrg # or program results in "error TOC overflow" add -mminimal-toc to 8952fe4c343aSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8953fe4c343aSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8954ba6a1819Smrg 8955fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='' 8956fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 8957fe4c343aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8958fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8959fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8960fe4c343aSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 8961fe4c343aSmrg case $with_aix_soname,$aix_use_runtimelinking in 8962fe4c343aSmrg aix,*) ;; # traditional, no import file 8963fe4c343aSmrg svr4,* | *,yes) # use import file 8964fe4c343aSmrg # The Import File defines what to hardcode. 8965fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 8966fe4c343aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 8967fe4c343aSmrg ;; 8968fe4c343aSmrg esac 8969ba6a1819Smrg 8970fe4c343aSmrg if test yes = "$GCC"; then 8971fe4c343aSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8972fe4c343aSmrg # We only want to do this on AIX 4.2 and lower, the check 8973fe4c343aSmrg # below for broken collect2 doesn't work under 4.3+ 8974fe4c343aSmrg collect2name=`$CC -print-prog-name=collect2` 8975fe4c343aSmrg if test -f "$collect2name" && 8976fe4c343aSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8977fe4c343aSmrg then 8978fe4c343aSmrg # We have reworked collect2 8979fe4c343aSmrg : 8980fe4c343aSmrg else 8981fe4c343aSmrg # We have old collect2 8982fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8983fe4c343aSmrg # It fails to find uninstalled libraries when the uninstalled 8984fe4c343aSmrg # path is not listed in the libpath. Setting hardcode_minus_L 8985fe4c343aSmrg # to unsupported forces relinking 8986fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8987fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8988fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8989fe4c343aSmrg fi 8990fe4c343aSmrg ;; 8991fe4c343aSmrg esac 8992fe4c343aSmrg shared_flag='-shared' 8993fe4c343aSmrg if test yes = "$aix_use_runtimelinking"; then 8994fe4c343aSmrg shared_flag="$shared_flag "'$wl-G' 8995fe4c343aSmrg fi 8996fe4c343aSmrg # Need to ensure runtime linking is disabled for the traditional 8997fe4c343aSmrg # shared library, or the linker may eventually find shared libraries 8998fe4c343aSmrg # /with/ Import File - we do not want to mix them. 8999fe4c343aSmrg shared_flag_aix='-shared' 9000fe4c343aSmrg shared_flag_svr4='-shared $wl-G' 9001fe4c343aSmrg else 9002fe4c343aSmrg # not using gcc 9003fe4c343aSmrg if test ia64 = "$host_cpu"; then 9004fe4c343aSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9005fe4c343aSmrg # chokes on -Wl,-G. The following line is correct: 9006fe4c343aSmrg shared_flag='-G' 9007fe4c343aSmrg else 9008fe4c343aSmrg if test yes = "$aix_use_runtimelinking"; then 9009fe4c343aSmrg shared_flag='$wl-G' 9010fe4c343aSmrg else 9011fe4c343aSmrg shared_flag='$wl-bM:SRE' 9012fe4c343aSmrg fi 9013fe4c343aSmrg shared_flag_aix='$wl-bM:SRE' 9014fe4c343aSmrg shared_flag_svr4='$wl-G' 9015fe4c343aSmrg fi 9016fe4c343aSmrg fi 9017ba6a1819Smrg 9018fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9019fe4c343aSmrg # It seems that -bexpall does not export symbols beginning with 9020fe4c343aSmrg # underscore (_), so it is better to generate a list of symbols to export. 9021fe4c343aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 9022fe4c343aSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9023fe4c343aSmrg # Warning - without using the other runtime loading flags (-brtl), 9024fe4c343aSmrg # -berok will link without error, but may produce a broken library. 9025fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 9026fe4c343aSmrg # Determine the default libpath from the value encoded in an 9027fe4c343aSmrg # empty executable. 9028fe4c343aSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 9029fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9030fe4c343aSmrg _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 9031fe4c343aSmrg else 9032fe4c343aSmrg if test ia64 = "$host_cpu"; then 9033fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9034fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 9035fe4c343aSmrg _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" 9036fe4c343aSmrg else 9037fe4c343aSmrg # Determine the default libpath from the value encoded in an 9038fe4c343aSmrg # empty executable. 9039fe4c343aSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 9040fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9041fe4c343aSmrg # Warning - without using the other run time loading flags, 9042fe4c343aSmrg # -berok will link without error, but may produce a broken library. 9043fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 9044fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 9045fe4c343aSmrg if test yes = "$with_gnu_ld"; then 9046fe4c343aSmrg # We only use this code for GNU lds that support --whole-archive. 9047fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9048fe4c343aSmrg else 9049fe4c343aSmrg # Exported symbols can be pulled into shared objects from archives 9050fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 9051fe4c343aSmrg fi 9052fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9053fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 9054fe4c343aSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 9055fe4c343aSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 9056fe4c343aSmrg if test svr4 != "$with_aix_soname"; then 9057fe4c343aSmrg # This is similar to how AIX traditionally builds its shared libraries. 9058fe4c343aSmrg _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' 9059fe4c343aSmrg fi 9060fe4c343aSmrg if test aix != "$with_aix_soname"; then 9061fe4c343aSmrg _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' 9062fe4c343aSmrg else 9063fe4c343aSmrg # used by -dlpreopen to get the symbols 9064fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 9065fe4c343aSmrg fi 9066fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 9067fe4c343aSmrg fi 9068fe4c343aSmrg fi 9069fe4c343aSmrg ;; 9070ba6a1819Smrg 9071fe4c343aSmrg amigaos*) 9072fe4c343aSmrg case $host_cpu in 9073fe4c343aSmrg powerpc) 9074fe4c343aSmrg # see comment about AmigaOS4 .so support 9075fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9076fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 9077fe4c343aSmrg ;; 9078fe4c343aSmrg m68k) 9079fe4c343aSmrg _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)' 9080fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9081fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9082fe4c343aSmrg ;; 9083fe4c343aSmrg esac 9084fe4c343aSmrg ;; 9085ba6a1819Smrg 9086fe4c343aSmrg bsdi[[45]]*) 9087fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 9088fe4c343aSmrg ;; 90891bedbe3fSmrg 9090fe4c343aSmrg cygwin* | mingw* | pw32* | cegcc*) 9091fe4c343aSmrg # When not using gcc, we currently assume that we are using 9092da1f2d5dSmrg # Microsoft Visual C++ or Intel C++ Compiler. 9093fe4c343aSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 9094fe4c343aSmrg # no search path for DLLs. 9095fe4c343aSmrg case $cc_basename in 9096da1f2d5dSmrg cl* | icl*) 9097da1f2d5dSmrg # Native MSVC or ICC 9098fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9099fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9100fe4c343aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 9101fe4c343aSmrg _LT_TAGVAR(file_list_spec, $1)='@' 9102fe4c343aSmrg # Tell ltmain to make .lib files, not .a files. 9103fe4c343aSmrg libext=lib 9104fe4c343aSmrg # Tell ltmain to make .dll files, not .so files. 9105fe4c343aSmrg shrext_cmds=.dll 9106fe4c343aSmrg # FIXME: Setting linknames here is a bad hack. 9107fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 9108fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9109fe4c343aSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 9110fe4c343aSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 9111fe4c343aSmrg else 9112fe4c343aSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 9113fe4c343aSmrg fi~ 9114fe4c343aSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 9115fe4c343aSmrg linknames=' 9116fe4c343aSmrg # The linker will not automatically build a static lib if we build a DLL. 9117fe4c343aSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9118fe4c343aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9119fe4c343aSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9120fe4c343aSmrg _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' 9121fe4c343aSmrg # Don't use ranlib 9122fe4c343aSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 9123fe4c343aSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 9124fe4c343aSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 9125fe4c343aSmrg case $lt_outputfile in 9126fe4c343aSmrg *.exe|*.EXE) ;; 9127fe4c343aSmrg *) 9128fe4c343aSmrg lt_outputfile=$lt_outputfile.exe 9129fe4c343aSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 9130fe4c343aSmrg ;; 9131fe4c343aSmrg esac~ 9132fe4c343aSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9133fe4c343aSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9134fe4c343aSmrg $RM "$lt_outputfile.manifest"; 9135fe4c343aSmrg fi' 9136fe4c343aSmrg ;; 9137fe4c343aSmrg *) 9138da1f2d5dSmrg # Assume MSVC and ICC wrapper 9139fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9140fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9141fe4c343aSmrg # Tell ltmain to make .lib files, not .a files. 9142fe4c343aSmrg libext=lib 9143fe4c343aSmrg # Tell ltmain to make .dll files, not .so files. 9144fe4c343aSmrg shrext_cmds=.dll 9145fe4c343aSmrg # FIXME: Setting linknames here is a bad hack. 9146fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9147fe4c343aSmrg # The linker will automatically build a .lib file if we build a DLL. 9148fe4c343aSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9149fe4c343aSmrg # FIXME: Should let the user specify the lib program. 9150fe4c343aSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9151fe4c343aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9152fe4c343aSmrg ;; 9153fe4c343aSmrg esac 9154fe4c343aSmrg ;; 91551bedbe3fSmrg 9156fe4c343aSmrg darwin* | rhapsody*) 9157fe4c343aSmrg _LT_DARWIN_LINKER_FEATURES($1) 9158fe4c343aSmrg ;; 91591bedbe3fSmrg 9160fe4c343aSmrg dgux*) 9161fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9162fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9163fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9164fe4c343aSmrg ;; 91651bedbe3fSmrg 9166fe4c343aSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9167fe4c343aSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 9168fe4c343aSmrg # does not break anything, and helps significantly (at the cost of a little 9169fe4c343aSmrg # extra space). 9170fe4c343aSmrg freebsd2.2*) 9171fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9172fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9173fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9174fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9175fe4c343aSmrg ;; 9176ba6a1819Smrg 9177fe4c343aSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9178fe4c343aSmrg freebsd2.*) 9179fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9180fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9181fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9182fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9183fe4c343aSmrg ;; 9184ba6a1819Smrg 9185fe4c343aSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9186da1f2d5dSmrg freebsd* | dragonfly* | midnightbsd*) 9187fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9188fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9189fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9190fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9191fe4c343aSmrg ;; 9192549e21daSmrg 9193fe4c343aSmrg hpux9*) 9194fe4c343aSmrg if test yes = "$GCC"; then 9195fe4c343aSmrg _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' 9196fe4c343aSmrg else 9197fe4c343aSmrg _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' 9198fe4c343aSmrg fi 9199fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9200fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9201fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9202549e21daSmrg 9203fe4c343aSmrg # hardcode_minus_L: Not really in the search PATH, 9204fe4c343aSmrg # but as the default location of the library. 9205fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9206fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9207fe4c343aSmrg ;; 9208549e21daSmrg 9209fe4c343aSmrg hpux10*) 9210fe4c343aSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 9211fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9212fe4c343aSmrg else 9213fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9214fe4c343aSmrg fi 9215fe4c343aSmrg if test no = "$with_gnu_ld"; then 9216fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9217fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9218fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9219fe4c343aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9220fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9221fe4c343aSmrg # hardcode_minus_L: Not really in the search PATH, 9222fe4c343aSmrg # but as the default location of the library. 9223fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9224fe4c343aSmrg fi 9225fe4c343aSmrg ;; 9226ba6a1819Smrg 9227fe4c343aSmrg hpux11*) 9228fe4c343aSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 9229fe4c343aSmrg case $host_cpu in 9230fe4c343aSmrg hppa*64*) 9231fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9232fe4c343aSmrg ;; 9233fe4c343aSmrg ia64*) 9234fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9235fe4c343aSmrg ;; 9236fe4c343aSmrg *) 9237fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9238fe4c343aSmrg ;; 9239fe4c343aSmrg esac 9240fe4c343aSmrg else 9241fe4c343aSmrg case $host_cpu in 9242fe4c343aSmrg hppa*64*) 9243fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9244fe4c343aSmrg ;; 9245fe4c343aSmrg ia64*) 9246fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9247fe4c343aSmrg ;; 9248fe4c343aSmrg *) 9249fe4c343aSmrg m4_if($1, [], [ 9250fe4c343aSmrg # Older versions of the 11.00 compiler do not understand -b yet 9251fe4c343aSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9252fe4c343aSmrg _LT_LINKER_OPTION([if $CC understands -b], 9253fe4c343aSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9254fe4c343aSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9255fe4c343aSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9256fe4c343aSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9257fe4c343aSmrg ;; 9258fe4c343aSmrg esac 9259fe4c343aSmrg fi 9260fe4c343aSmrg if test no = "$with_gnu_ld"; then 9261fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9262fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9263ba6a1819Smrg 9264fe4c343aSmrg case $host_cpu in 9265fe4c343aSmrg hppa*64*|ia64*) 9266fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9267fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9268fe4c343aSmrg ;; 9269fe4c343aSmrg *) 9270fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9271fe4c343aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9272fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9273549e21daSmrg 9274fe4c343aSmrg # hardcode_minus_L: Not really in the search PATH, 9275fe4c343aSmrg # but as the default location of the library. 9276fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9277fe4c343aSmrg ;; 9278fe4c343aSmrg esac 9279fe4c343aSmrg fi 9280fe4c343aSmrg ;; 9281549e21daSmrg 9282fe4c343aSmrg irix5* | irix6* | nonstopux*) 9283fe4c343aSmrg if test yes = "$GCC"; then 9284fe4c343aSmrg _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' 9285fe4c343aSmrg # Try to use the -exported_symbol ld option, if it does not 9286fe4c343aSmrg # work, assume that -exports_file does not work either and 9287fe4c343aSmrg # implicitly export all symbols. 9288fe4c343aSmrg # This should be the same for all languages, so no per-tag cache variable. 9289fe4c343aSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9290fe4c343aSmrg [lt_cv_irix_exported_symbol], 9291fe4c343aSmrg [save_LDFLAGS=$LDFLAGS 9292fe4c343aSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9293fe4c343aSmrg AC_LINK_IFELSE( 9294fe4c343aSmrg [AC_LANG_SOURCE( 9295fe4c343aSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9296fe4c343aSmrg [C++], [[int foo (void) { return 0; }]], 9297fe4c343aSmrg [Fortran 77], [[ 9298fe4c343aSmrg subroutine foo 9299fe4c343aSmrg end]], 9300fe4c343aSmrg [Fortran], [[ 9301fe4c343aSmrg subroutine foo 9302fe4c343aSmrg end]])])], 9303fe4c343aSmrg [lt_cv_irix_exported_symbol=yes], 9304fe4c343aSmrg [lt_cv_irix_exported_symbol=no]) 9305fe4c343aSmrg LDFLAGS=$save_LDFLAGS]) 9306fe4c343aSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 9307fe4c343aSmrg _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' 9308fe4c343aSmrg fi 9309fe4c343aSmrg else 9310fe4c343aSmrg _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' 9311fe4c343aSmrg _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' 9312fe4c343aSmrg fi 9313fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9314fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9315fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9316fe4c343aSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 9317fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9318fe4c343aSmrg ;; 9319549e21daSmrg 9320fe4c343aSmrg linux*) 9321fe4c343aSmrg case $cc_basename in 9322fe4c343aSmrg tcc*) 9323fe4c343aSmrg # Fabrice Bellard et al's Tiny C Compiler 9324fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9325fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9326fe4c343aSmrg ;; 9327fe4c343aSmrg esac 9328fe4c343aSmrg ;; 9329ba6a1819Smrg 9330fe4c343aSmrg netbsd*) 9331fe4c343aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9332fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9333fe4c343aSmrg else 9334fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9335fe4c343aSmrg fi 9336fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9337fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9338fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9339fe4c343aSmrg ;; 9340ba6a1819Smrg 9341fe4c343aSmrg newsos6) 9342fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9343fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9344fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9345fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9346fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9347fe4c343aSmrg ;; 9348ba6a1819Smrg 9349fe4c343aSmrg *nto* | *qnx*) 9350fe4c343aSmrg ;; 9351549e21daSmrg 9352fe4c343aSmrg openbsd* | bitrig*) 9353fe4c343aSmrg if test -f /usr/libexec/ld.so; then 9354fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9355fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9356fe4c343aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9357fe4c343aSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9358fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9359fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9360fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9361fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9362fe4c343aSmrg else 9363fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9364fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9365fe4c343aSmrg fi 9366fe4c343aSmrg else 9367fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 93681bedbe3fSmrg fi 9369fe4c343aSmrg ;; 9370ba6a1819Smrg 9371fe4c343aSmrg os2*) 9372fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9373fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9374fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9375fe4c343aSmrg shrext_cmds=.dll 9376fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9377fe4c343aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9378fe4c343aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9379fe4c343aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9380fe4c343aSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9381fe4c343aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9382fe4c343aSmrg emximp -o $lib $output_objdir/$libname.def' 9383fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9384fe4c343aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9385fe4c343aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9386fe4c343aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9387fe4c343aSmrg prefix_cmds="$SED"~ 9388fe4c343aSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9389fe4c343aSmrg prefix_cmds="$prefix_cmds -e 1d"; 9390fe4c343aSmrg fi~ 9391fe4c343aSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9392fe4c343aSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9393fe4c343aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9394fe4c343aSmrg emximp -o $lib $output_objdir/$libname.def' 9395fe4c343aSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9396fe4c343aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9397da1f2d5dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 9398fe4c343aSmrg ;; 9399ba6a1819Smrg 9400fe4c343aSmrg osf3*) 9401fe4c343aSmrg if test yes = "$GCC"; then 9402fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9403fe4c343aSmrg _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' 9404fe4c343aSmrg else 9405fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9406fe4c343aSmrg _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' 9407fe4c343aSmrg fi 9408fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9409fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9410fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9411fe4c343aSmrg ;; 9412ba6a1819Smrg 9413fe4c343aSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 9414fe4c343aSmrg if test yes = "$GCC"; then 9415fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9416fe4c343aSmrg _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' 9417fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9418fe4c343aSmrg else 9419fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9420fe4c343aSmrg _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' 9421fe4c343aSmrg _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~ 9422fe4c343aSmrg $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' 9423549e21daSmrg 9424fe4c343aSmrg # Both c and cxx compiler support -rpath directly 9425fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9426fe4c343aSmrg fi 9427fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9428fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9429fe4c343aSmrg ;; 9430fe4c343aSmrg 9431fe4c343aSmrg solaris*) 9432fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 9433fe4c343aSmrg if test yes = "$GCC"; then 9434fe4c343aSmrg wlarc='$wl' 9435fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9436fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9437fe4c343aSmrg $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' 9438fe4c343aSmrg else 9439fe4c343aSmrg case `$CC -V 2>&1` in 9440fe4c343aSmrg *"Compilers 5.0"*) 9441fe4c343aSmrg wlarc='' 9442fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 9443fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9444fe4c343aSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 9445fe4c343aSmrg ;; 9446fe4c343aSmrg *) 9447fe4c343aSmrg wlarc='$wl' 9448fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 9449fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9450fe4c343aSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 9451fe4c343aSmrg ;; 9452fe4c343aSmrg esac 9453fe4c343aSmrg fi 9454fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9455fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9456fe4c343aSmrg case $host_os in 9457fe4c343aSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9458fe4c343aSmrg *) 9459fe4c343aSmrg # The compiler driver will combine and reorder linker options, 9460fe4c343aSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 9461fe4c343aSmrg # but is careful enough not to reorder. 9462fe4c343aSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9463fe4c343aSmrg if test yes = "$GCC"; then 9464fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 9465fe4c343aSmrg else 9466fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9467fe4c343aSmrg fi 9468fe4c343aSmrg ;; 9469fe4c343aSmrg esac 9470fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9471fe4c343aSmrg ;; 9472ba6a1819Smrg 9473fe4c343aSmrg sunos4*) 9474fe4c343aSmrg if test sequent = "$host_vendor"; then 9475fe4c343aSmrg # Use $CC to link under sequent, because it throws in some extra .o 9476fe4c343aSmrg # files that make .init and .fini sections work. 9477fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 9478fe4c343aSmrg else 9479fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 9480fe4c343aSmrg fi 9481fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9482fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9483fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9484fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9485fe4c343aSmrg ;; 9486ba6a1819Smrg 9487fe4c343aSmrg sysv4) 9488fe4c343aSmrg case $host_vendor in 9489fe4c343aSmrg sni) 9490fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9491fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 9492fe4c343aSmrg ;; 9493fe4c343aSmrg siemens) 9494fe4c343aSmrg ## LD is ld it makes a PLAMLIB 9495fe4c343aSmrg ## CC just makes a GrossModule. 9496fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 9497fe4c343aSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 9498fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 9499fe4c343aSmrg ;; 9500fe4c343aSmrg motorola) 9501fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9502fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 9503fe4c343aSmrg ;; 9504fe4c343aSmrg esac 9505fe4c343aSmrg runpath_var='LD_RUN_PATH' 9506fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9507fe4c343aSmrg ;; 9508ba6a1819Smrg 9509fe4c343aSmrg sysv4.3*) 9510fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9511fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9512fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 9513fe4c343aSmrg ;; 9514ba6a1819Smrg 9515fe4c343aSmrg sysv4*MP*) 9516fe4c343aSmrg if test -d /usr/nec; then 9517fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9518fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9519fe4c343aSmrg runpath_var=LD_RUN_PATH 9520fe4c343aSmrg hardcode_runpath_var=yes 9521fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9522fe4c343aSmrg fi 9523fe4c343aSmrg ;; 9524ba6a1819Smrg 9525fe4c343aSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9526fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9527fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9528fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9529fe4c343aSmrg runpath_var='LD_RUN_PATH' 9530ba6a1819Smrg 9531fe4c343aSmrg if test yes = "$GCC"; then 9532fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9533fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9534fe4c343aSmrg else 9535fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9536fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9537fe4c343aSmrg fi 9538fe4c343aSmrg ;; 9539ba6a1819Smrg 9540fe4c343aSmrg sysv5* | sco3.2v5* | sco5v6*) 9541fe4c343aSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 9542fe4c343aSmrg # link with -lc, and that would cause any symbols used from libc to 9543fe4c343aSmrg # always be unresolved, which means just about no library would 9544fe4c343aSmrg # ever link correctly. If we're not using GNU ld we use -z text 9545fe4c343aSmrg # though, which does catch some bad symbols but isn't as heavy-handed 9546fe4c343aSmrg # as -z defs. 9547fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 9548fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 9549fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9550fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9551fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 9552fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9553fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9554fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 9555fe4c343aSmrg runpath_var='LD_RUN_PATH' 9556ba6a1819Smrg 9557fe4c343aSmrg if test yes = "$GCC"; then 9558fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9559fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9560fe4c343aSmrg else 9561fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9562fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9563fe4c343aSmrg fi 9564fe4c343aSmrg ;; 9565549e21daSmrg 9566fe4c343aSmrg uts4*) 9567fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9568fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9569fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9570fe4c343aSmrg ;; 9571549e21daSmrg 9572fe4c343aSmrg *) 9573fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9574fe4c343aSmrg ;; 9575fe4c343aSmrg esac 9576549e21daSmrg 9577fe4c343aSmrg if test sni = "$host_vendor"; then 9578fe4c343aSmrg case $host in 9579fe4c343aSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9580fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 9581fe4c343aSmrg ;; 9582fe4c343aSmrg esac 9583fe4c343aSmrg fi 9584fe4c343aSmrg fi 9585fe4c343aSmrg]) 9586fe4c343aSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9587fe4c343aSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9588549e21daSmrg 9589fe4c343aSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9590ba6a1819Smrg 9591fe4c343aSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 9592fe4c343aSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 9593fe4c343aSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 9594fe4c343aSmrg [The commands to extract the exported symbol list from a shared archive]) 9595ba6a1819Smrg 9596fe4c343aSmrg# 9597fe4c343aSmrg# Do we need to explicitly link libc? 9598fe4c343aSmrg# 9599fe4c343aSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 9600fe4c343aSmrgx|xyes) 9601fe4c343aSmrg # Assume -lc should be added 9602fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9603ba6a1819Smrg 9604fe4c343aSmrg if test yes,yes = "$GCC,$enable_shared"; then 9605fe4c343aSmrg case $_LT_TAGVAR(archive_cmds, $1) in 9606fe4c343aSmrg *'~'*) 9607fe4c343aSmrg # FIXME: we may have to deal with multi-command sequences. 9608fe4c343aSmrg ;; 9609fe4c343aSmrg '$CC '*) 9610fe4c343aSmrg # Test whether the compiler implicitly links with -lc since on some 9611fe4c343aSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 9612fe4c343aSmrg # to ld, don't add -lc before -lgcc. 9613fe4c343aSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 9614fe4c343aSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 9615fe4c343aSmrg [$RM conftest* 9616fe4c343aSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 9617ba6a1819Smrg 9618fe4c343aSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 9619fe4c343aSmrg soname=conftest 9620fe4c343aSmrg lib=conftest 9621fe4c343aSmrg libobjs=conftest.$ac_objext 9622fe4c343aSmrg deplibs= 9623fe4c343aSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 9624fe4c343aSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 9625fe4c343aSmrg compiler_flags=-v 9626fe4c343aSmrg linker_flags=-v 9627fe4c343aSmrg verstring= 9628fe4c343aSmrg output_objdir=. 9629fe4c343aSmrg libname=conftest 9630fe4c343aSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 9631fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 9632fe4c343aSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 9633fe4c343aSmrg then 9634fe4c343aSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9635fe4c343aSmrg else 9636fe4c343aSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9637fe4c343aSmrg fi 9638fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9639fe4c343aSmrg else 9640fe4c343aSmrg cat conftest.err 1>&5 9641fe4c343aSmrg fi 9642fe4c343aSmrg $RM conftest* 9643fe4c343aSmrg ]) 9644fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 9645fe4c343aSmrg ;; 96461bedbe3fSmrg esac 9647fe4c343aSmrg fi 9648fe4c343aSmrg ;; 96491bedbe3fSmrgesac 96501bedbe3fSmrg 9651fe4c343aSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 9652fe4c343aSmrg [Whether or not to add -lc for building shared libraries]) 9653fe4c343aSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 9654fe4c343aSmrg [enable_shared_with_static_runtimes], [0], 9655fe4c343aSmrg [Whether or not to disallow shared libs when runtime libs are static]) 9656fe4c343aSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 9657fe4c343aSmrg [Compiler flag to allow reflexive dlopens]) 9658fe4c343aSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 9659fe4c343aSmrg [Compiler flag to generate shared objects directly from archives]) 9660fe4c343aSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 9661fe4c343aSmrg [Whether the compiler copes with passing no objects directly]) 9662fe4c343aSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 9663fe4c343aSmrg [Create an old-style archive from a shared archive]) 9664fe4c343aSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 9665fe4c343aSmrg [Create a temporary old-style archive to link instead of a shared archive]) 9666fe4c343aSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 9667fe4c343aSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 9668fe4c343aSmrg_LT_TAGDECL([], [module_cmds], [2], 9669fe4c343aSmrg [Commands used to build a loadable module if different from building 9670fe4c343aSmrg a shared archive.]) 9671fe4c343aSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 9672fe4c343aSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 9673fe4c343aSmrg [Whether we are building with GNU ld or not]) 9674fe4c343aSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 9675fe4c343aSmrg [Flag that allows shared libraries with undefined symbols to be built]) 9676fe4c343aSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 9677fe4c343aSmrg [Flag that enforces no undefined symbols]) 9678fe4c343aSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 9679fe4c343aSmrg [Flag to hardcode $libdir into a binary during linking. 9680fe4c343aSmrg This must work even if $libdir does not exist]) 9681fe4c343aSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 9682fe4c343aSmrg [Whether we need a single "-rpath" flag with a separated argument]) 9683fe4c343aSmrg_LT_TAGDECL([], [hardcode_direct], [0], 9684fe4c343aSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9685fe4c343aSmrg DIR into the resulting binary]) 9686fe4c343aSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 9687fe4c343aSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 9688fe4c343aSmrg DIR into the resulting binary and the resulting library dependency is 9689fe4c343aSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 9690fe4c343aSmrg library is relocated]) 9691fe4c343aSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 9692fe4c343aSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 9693fe4c343aSmrg into the resulting binary]) 9694fe4c343aSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 9695fe4c343aSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 9696fe4c343aSmrg into the resulting binary]) 9697fe4c343aSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 9698fe4c343aSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 9699fe4c343aSmrg into the library and all subsequent libraries and executables linked 9700fe4c343aSmrg against it]) 9701fe4c343aSmrg_LT_TAGDECL([], [inherit_rpath], [0], 9702fe4c343aSmrg [Set to yes if linker adds runtime paths of dependent libraries 9703fe4c343aSmrg to runtime path list]) 9704fe4c343aSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 9705fe4c343aSmrg [Whether libtool must link a program against all its dependency libraries]) 9706fe4c343aSmrg_LT_TAGDECL([], [always_export_symbols], [0], 9707fe4c343aSmrg [Set to "yes" if exported symbols are required]) 9708fe4c343aSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 9709fe4c343aSmrg [The commands to list exported symbols]) 9710fe4c343aSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 9711fe4c343aSmrg [Symbols that should not be listed in the preloaded symbols]) 9712fe4c343aSmrg_LT_TAGDECL([], [include_expsyms], [1], 9713fe4c343aSmrg [Symbols that must always be exported]) 9714fe4c343aSmrg_LT_TAGDECL([], [prelink_cmds], [2], 9715fe4c343aSmrg [Commands necessary for linking programs (against libraries) with templates]) 9716fe4c343aSmrg_LT_TAGDECL([], [postlink_cmds], [2], 9717fe4c343aSmrg [Commands necessary for finishing linking programs]) 9718fe4c343aSmrg_LT_TAGDECL([], [file_list_spec], [1], 9719fe4c343aSmrg [Specify filename containing input files]) 9720fe4c343aSmrgdnl FIXME: Not yet implemented 9721fe4c343aSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 9722fe4c343aSmrgdnl [Compiler flag to generate thread safe objects]) 9723fe4c343aSmrg])# _LT_LINKER_SHLIBS 9724fe4c343aSmrg 9725ba6a1819Smrg 9726fe4c343aSmrg# _LT_LANG_C_CONFIG([TAG]) 9727fe4c343aSmrg# ------------------------ 9728fe4c343aSmrg# Ensure that the configuration variables for a C compiler are suitably 9729fe4c343aSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 9730fe4c343aSmrg# the compiler configuration to 'libtool'. 9731fe4c343aSmrgm4_defun([_LT_LANG_C_CONFIG], 9732fe4c343aSmrg[m4_require([_LT_DECL_EGREP])dnl 9733fe4c343aSmrglt_save_CC=$CC 9734fe4c343aSmrgAC_LANG_PUSH(C) 9735ba6a1819Smrg 9736fe4c343aSmrg# Source file extension for C test sources. 9737fe4c343aSmrgac_ext=c 9738ba6a1819Smrg 9739fe4c343aSmrg# Object file extension for compiled C test sources. 9740fe4c343aSmrgobjext=o 9741fe4c343aSmrg_LT_TAGVAR(objext, $1)=$objext 9742ba6a1819Smrg 9743fe4c343aSmrg# Code to be used in simple compile tests 9744fe4c343aSmrglt_simple_compile_test_code="int some_variable = 0;" 9745ba6a1819Smrg 9746fe4c343aSmrg# Code to be used in simple link tests 9747fe4c343aSmrglt_simple_link_test_code='int main(){return(0);}' 9748ba6a1819Smrg 9749fe4c343aSmrg_LT_TAG_COMPILER 9750fe4c343aSmrg# Save the default compiler, since it gets overwritten when the other 9751fe4c343aSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 9752fe4c343aSmrgcompiler_DEFAULT=$CC 9753ba6a1819Smrg 9754fe4c343aSmrg# save warnings/boilerplate of simple test code 9755fe4c343aSmrg_LT_COMPILER_BOILERPLATE 9756fe4c343aSmrg_LT_LINKER_BOILERPLATE 9757ba6a1819Smrg 9758fe4c343aSmrgif test -n "$compiler"; then 9759fe4c343aSmrg _LT_COMPILER_NO_RTTI($1) 9760fe4c343aSmrg _LT_COMPILER_PIC($1) 9761fe4c343aSmrg _LT_COMPILER_C_O($1) 9762fe4c343aSmrg _LT_COMPILER_FILE_LOCKS($1) 9763fe4c343aSmrg _LT_LINKER_SHLIBS($1) 9764fe4c343aSmrg _LT_SYS_DYNAMIC_LINKER($1) 9765fe4c343aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9766fe4c343aSmrg LT_SYS_DLOPEN_SELF 9767fe4c343aSmrg _LT_CMD_STRIPLIB 9768ba6a1819Smrg 9769fe4c343aSmrg # Report what library types will actually be built 9770fe4c343aSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9771fe4c343aSmrg AC_MSG_RESULT([$can_build_shared]) 9772ba6a1819Smrg 9773fe4c343aSmrg AC_MSG_CHECKING([whether to build shared libraries]) 9774fe4c343aSmrg test no = "$can_build_shared" && enable_shared=no 9775ba6a1819Smrg 9776fe4c343aSmrg # On AIX, shared libraries and static libraries use the same namespace, and 9777fe4c343aSmrg # are all built from PIC. 9778fe4c343aSmrg case $host_os in 9779fe4c343aSmrg aix3*) 9780fe4c343aSmrg test yes = "$enable_shared" && enable_static=no 9781fe4c343aSmrg if test -n "$RANLIB"; then 9782fe4c343aSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9783fe4c343aSmrg postinstall_cmds='$RANLIB $lib' 9784fe4c343aSmrg fi 9785fe4c343aSmrg ;; 9786549e21daSmrg 9787fe4c343aSmrg aix[[4-9]]*) 9788fe4c343aSmrg if test ia64 != "$host_cpu"; then 9789fe4c343aSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 9790fe4c343aSmrg yes,aix,yes) ;; # shared object as lib.so file only 9791fe4c343aSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 9792fe4c343aSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 9793fe4c343aSmrg esac 9794fe4c343aSmrg fi 9795fe4c343aSmrg ;; 9796fe4c343aSmrg esac 9797fe4c343aSmrg AC_MSG_RESULT([$enable_shared]) 9798549e21daSmrg 9799fe4c343aSmrg AC_MSG_CHECKING([whether to build static libraries]) 9800fe4c343aSmrg # Make sure either enable_shared or enable_static is yes. 9801fe4c343aSmrg test yes = "$enable_shared" || enable_static=yes 9802fe4c343aSmrg AC_MSG_RESULT([$enable_static]) 9803549e21daSmrg 9804fe4c343aSmrg _LT_CONFIG($1) 9805fe4c343aSmrgfi 9806fe4c343aSmrgAC_LANG_POP 9807fe4c343aSmrgCC=$lt_save_CC 9808fe4c343aSmrg])# _LT_LANG_C_CONFIG 9809ba6a1819Smrg 9810549e21daSmrg 9811fe4c343aSmrg# _LT_LANG_CXX_CONFIG([TAG]) 9812fe4c343aSmrg# -------------------------- 9813fe4c343aSmrg# Ensure that the configuration variables for a C++ compiler are suitably 9814fe4c343aSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 9815fe4c343aSmrg# the compiler configuration to 'libtool'. 9816fe4c343aSmrgm4_defun([_LT_LANG_CXX_CONFIG], 9817fe4c343aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9818fe4c343aSmrgm4_require([_LT_DECL_EGREP])dnl 9819fe4c343aSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9820fe4c343aSmrgif test -n "$CXX" && ( test no != "$CXX" && 9821fe4c343aSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 9822fe4c343aSmrg (test g++ != "$CXX"))); then 9823fe4c343aSmrg AC_PROG_CXXCPP 9824fe4c343aSmrgelse 9825fe4c343aSmrg _lt_caught_CXX_error=yes 9826fe4c343aSmrgfi 98271bedbe3fSmrg 9828fe4c343aSmrgAC_LANG_PUSH(C++) 9829fe4c343aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9830fe4c343aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 9831fe4c343aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 9832fe4c343aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9833fe4c343aSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 9834fe4c343aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9835fe4c343aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 9836fe4c343aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9837fe4c343aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9838fe4c343aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9839fe4c343aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9840fe4c343aSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9841fe4c343aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 9842fe4c343aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 9843fe4c343aSmrg_LT_TAGVAR(module_cmds, $1)= 9844fe4c343aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 9845fe4c343aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9846fe4c343aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9847fe4c343aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9848fe4c343aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9849fe4c343aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 9850fe4c343aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9851fe4c343aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 98521bedbe3fSmrg 9853fe4c343aSmrg# Source file extension for C++ test sources. 9854fe4c343aSmrgac_ext=cpp 98551bedbe3fSmrg 9856fe4c343aSmrg# Object file extension for compiled C++ test sources. 9857fe4c343aSmrgobjext=o 9858fe4c343aSmrg_LT_TAGVAR(objext, $1)=$objext 98591bedbe3fSmrg 9860fe4c343aSmrg# No sense in running all these tests if we already determined that 9861fe4c343aSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 9862fe4c343aSmrg# are currently assumed to apply to all compilers on this platform, 9863fe4c343aSmrg# and will be corrupted by setting them based on a non-working compiler. 9864fe4c343aSmrgif test yes != "$_lt_caught_CXX_error"; then 9865fe4c343aSmrg # Code to be used in simple compile tests 9866fe4c343aSmrg lt_simple_compile_test_code="int some_variable = 0;" 98671bedbe3fSmrg 9868fe4c343aSmrg # Code to be used in simple link tests 9869fe4c343aSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9870549e21daSmrg 9871fe4c343aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9872fe4c343aSmrg _LT_TAG_COMPILER 9873fe4c343aSmrg 9874fe4c343aSmrg # save warnings/boilerplate of simple test code 9875fe4c343aSmrg _LT_COMPILER_BOILERPLATE 9876fe4c343aSmrg _LT_LINKER_BOILERPLATE 9877fe4c343aSmrg 9878fe4c343aSmrg # Allow CC to be a program name with arguments. 9879fe4c343aSmrg lt_save_CC=$CC 9880fe4c343aSmrg lt_save_CFLAGS=$CFLAGS 9881fe4c343aSmrg lt_save_LD=$LD 9882fe4c343aSmrg lt_save_GCC=$GCC 9883fe4c343aSmrg GCC=$GXX 9884fe4c343aSmrg lt_save_with_gnu_ld=$with_gnu_ld 9885fe4c343aSmrg lt_save_path_LD=$lt_cv_path_LD 9886fe4c343aSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 9887fe4c343aSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 9888fe4c343aSmrg else 9889fe4c343aSmrg $as_unset lt_cv_prog_gnu_ld 9890fe4c343aSmrg fi 9891fe4c343aSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 9892fe4c343aSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 9893fe4c343aSmrg else 9894fe4c343aSmrg $as_unset lt_cv_path_LD 9895fe4c343aSmrg fi 9896fe4c343aSmrg test -z "${LDCXX+set}" || LD=$LDCXX 9897fe4c343aSmrg CC=${CXX-"c++"} 9898fe4c343aSmrg CFLAGS=$CXXFLAGS 9899fe4c343aSmrg compiler=$CC 9900fe4c343aSmrg _LT_TAGVAR(compiler, $1)=$CC 9901fe4c343aSmrg _LT_CC_BASENAME([$compiler]) 9902fe4c343aSmrg 9903fe4c343aSmrg if test -n "$compiler"; then 9904fe4c343aSmrg # We don't want -fno-exception when compiling C++ code, so set the 9905fe4c343aSmrg # no_builtin_flag separately 9906fe4c343aSmrg if test yes = "$GXX"; then 9907fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9908fe4c343aSmrg else 9909fe4c343aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9910fe4c343aSmrg fi 9911fe4c343aSmrg 9912fe4c343aSmrg if test yes = "$GXX"; then 9913fe4c343aSmrg # Set up default GNU C++ configuration 99141bedbe3fSmrg 9915fe4c343aSmrg LT_PATH_LD 99161bedbe3fSmrg 9917fe4c343aSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 9918fe4c343aSmrg # archiving commands below assume that GNU ld is being used. 9919fe4c343aSmrg if test yes = "$with_gnu_ld"; then 9920fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 9921fe4c343aSmrg _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' 99221bedbe3fSmrg 9923fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9924fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9925549e21daSmrg 9926fe4c343aSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 9927fe4c343aSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 9928fe4c343aSmrg # investigate it a little bit more. (MM) 9929fe4c343aSmrg wlarc='$wl' 9930549e21daSmrg 9931fe4c343aSmrg # ancient GNU ld didn't support --whole-archive et. al. 9932fe4c343aSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 9933fe4c343aSmrg $GREP 'no-whole-archive' > /dev/null; then 9934fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9935fe4c343aSmrg else 9936fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9937fe4c343aSmrg fi 9938fe4c343aSmrg else 9939fe4c343aSmrg with_gnu_ld=no 9940fe4c343aSmrg wlarc= 9941ba6a1819Smrg 9942fe4c343aSmrg # A generic and very simple default shared library creation 9943fe4c343aSmrg # command for GNU C++ for the case where it uses the native 9944fe4c343aSmrg # linker, instead of GNU ld. If possible, this setting should 9945fe4c343aSmrg # overridden to take advantage of the native linker features on 9946fe4c343aSmrg # the platform it is being used on. 9947fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9948fe4c343aSmrg fi 9949ba6a1819Smrg 9950fe4c343aSmrg # Commands to make compiler produce verbose output that lists 9951fe4c343aSmrg # what "hidden" libraries, object files and flags are used when 9952fe4c343aSmrg # linking a shared library. 9953fe4c343aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9954ba6a1819Smrg 9955fe4c343aSmrg else 9956fe4c343aSmrg GXX=no 9957fe4c343aSmrg with_gnu_ld=no 9958fe4c343aSmrg wlarc= 9959fe4c343aSmrg fi 9960549e21daSmrg 9961fe4c343aSmrg # PORTME: fill in a description of your system's C++ link characteristics 9962fe4c343aSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9963fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9964fe4c343aSmrg case $host_os in 9965fe4c343aSmrg aix3*) 9966fe4c343aSmrg # FIXME: insert proper C++ library support 9967fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 9968fe4c343aSmrg ;; 9969fe4c343aSmrg aix[[4-9]]*) 9970fe4c343aSmrg if test ia64 = "$host_cpu"; then 9971fe4c343aSmrg # On IA64, the linker does run time linking by default, so we don't 9972fe4c343aSmrg # have to do anything special. 9973fe4c343aSmrg aix_use_runtimelinking=no 9974fe4c343aSmrg exp_sym_flag='-Bexport' 9975fe4c343aSmrg no_entry_flag= 9976fe4c343aSmrg else 9977fe4c343aSmrg aix_use_runtimelinking=no 9978549e21daSmrg 9979fe4c343aSmrg # Test if we are trying to use run time linking or normal 9980fe4c343aSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9981fe4c343aSmrg # have runtime linking enabled, and use it for executables. 9982fe4c343aSmrg # For shared libraries, we enable/disable runtime linking 9983fe4c343aSmrg # depending on the kind of the shared library created - 9984fe4c343aSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 9985fe4c343aSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9986fe4c343aSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 9987fe4c343aSmrg # lib.a static archive 9988fe4c343aSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9989fe4c343aSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 9990fe4c343aSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9991fe4c343aSmrg # lib.a(lib.so.V) shared, rtl:no 9992fe4c343aSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9993fe4c343aSmrg # lib.a static archive 9994fe4c343aSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9995fe4c343aSmrg for ld_flag in $LDFLAGS; do 9996fe4c343aSmrg case $ld_flag in 9997fe4c343aSmrg *-brtl*) 9998fe4c343aSmrg aix_use_runtimelinking=yes 9999fe4c343aSmrg break 10000fe4c343aSmrg ;; 10001fe4c343aSmrg esac 10002fe4c343aSmrg done 10003fe4c343aSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 10004fe4c343aSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 10005fe4c343aSmrg # so we don't have lib.a shared libs to link our executables. 10006fe4c343aSmrg # We have to force runtime linking in this case. 10007fe4c343aSmrg aix_use_runtimelinking=yes 10008fe4c343aSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 10009fe4c343aSmrg fi 10010fe4c343aSmrg ;; 10011fe4c343aSmrg esac 10012549e21daSmrg 10013fe4c343aSmrg exp_sym_flag='-bexport' 10014fe4c343aSmrg no_entry_flag='-bnoentry' 10015fe4c343aSmrg fi 10016549e21daSmrg 10017fe4c343aSmrg # When large executables or shared objects are built, AIX ld can 10018fe4c343aSmrg # have problems creating the table of contents. If linking a library 10019fe4c343aSmrg # or program results in "error TOC overflow" add -mminimal-toc to 10020fe4c343aSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 10021fe4c343aSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 10022549e21daSmrg 10023fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='' 10024fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10025fe4c343aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10026fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10027fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10028fe4c343aSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 10029fe4c343aSmrg case $with_aix_soname,$aix_use_runtimelinking in 10030fe4c343aSmrg aix,*) ;; # no import file 10031fe4c343aSmrg svr4,* | *,yes) # use import file 10032fe4c343aSmrg # The Import File defines what to hardcode. 10033fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10034fe4c343aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 10035fe4c343aSmrg ;; 10036fe4c343aSmrg esac 10037ba6a1819Smrg 10038fe4c343aSmrg if test yes = "$GXX"; then 10039fe4c343aSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 10040fe4c343aSmrg # We only want to do this on AIX 4.2 and lower, the check 10041fe4c343aSmrg # below for broken collect2 doesn't work under 4.3+ 10042fe4c343aSmrg collect2name=`$CC -print-prog-name=collect2` 10043fe4c343aSmrg if test -f "$collect2name" && 10044fe4c343aSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 10045fe4c343aSmrg then 10046fe4c343aSmrg # We have reworked collect2 10047fe4c343aSmrg : 10048fe4c343aSmrg else 10049fe4c343aSmrg # We have old collect2 10050fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 10051fe4c343aSmrg # It fails to find uninstalled libraries when the uninstalled 10052fe4c343aSmrg # path is not listed in the libpath. Setting hardcode_minus_L 10053fe4c343aSmrg # to unsupported forces relinking 10054fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10055fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10056fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 10057fe4c343aSmrg fi 10058fe4c343aSmrg esac 10059fe4c343aSmrg shared_flag='-shared' 10060fe4c343aSmrg if test yes = "$aix_use_runtimelinking"; then 10061fe4c343aSmrg shared_flag=$shared_flag' $wl-G' 10062fe4c343aSmrg fi 10063fe4c343aSmrg # Need to ensure runtime linking is disabled for the traditional 10064fe4c343aSmrg # shared library, or the linker may eventually find shared libraries 10065fe4c343aSmrg # /with/ Import File - we do not want to mix them. 10066fe4c343aSmrg shared_flag_aix='-shared' 10067fe4c343aSmrg shared_flag_svr4='-shared $wl-G' 10068fe4c343aSmrg else 10069fe4c343aSmrg # not using gcc 10070fe4c343aSmrg if test ia64 = "$host_cpu"; then 10071fe4c343aSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 10072fe4c343aSmrg # chokes on -Wl,-G. The following line is correct: 10073fe4c343aSmrg shared_flag='-G' 10074fe4c343aSmrg else 10075fe4c343aSmrg if test yes = "$aix_use_runtimelinking"; then 10076fe4c343aSmrg shared_flag='$wl-G' 10077fe4c343aSmrg else 10078fe4c343aSmrg shared_flag='$wl-bM:SRE' 10079fe4c343aSmrg fi 10080fe4c343aSmrg shared_flag_aix='$wl-bM:SRE' 10081fe4c343aSmrg shared_flag_svr4='$wl-G' 10082fe4c343aSmrg fi 10083fe4c343aSmrg fi 10084549e21daSmrg 10085fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 10086fe4c343aSmrg # It seems that -bexpall does not export symbols beginning with 10087fe4c343aSmrg # underscore (_), so it is better to generate a list of symbols to 10088fe4c343aSmrg # export. 10089fe4c343aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 10090fe4c343aSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 10091fe4c343aSmrg # Warning - without using the other runtime loading flags (-brtl), 10092fe4c343aSmrg # -berok will link without error, but may produce a broken library. 10093fe4c343aSmrg # The "-G" linker flag allows undefined symbols. 10094fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 10095fe4c343aSmrg # Determine the default libpath from the value encoded in an empty 10096fe4c343aSmrg # executable. 10097fe4c343aSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 10098fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10099549e21daSmrg 10100fe4c343aSmrg _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 10101fe4c343aSmrg else 10102fe4c343aSmrg if test ia64 = "$host_cpu"; then 10103fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 10104fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10105fe4c343aSmrg _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" 10106fe4c343aSmrg else 10107fe4c343aSmrg # Determine the default libpath from the value encoded in an 10108fe4c343aSmrg # empty executable. 10109fe4c343aSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 10110fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10111fe4c343aSmrg # Warning - without using the other run time loading flags, 10112fe4c343aSmrg # -berok will link without error, but may produce a broken library. 10113fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 10114fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 10115fe4c343aSmrg if test yes = "$with_gnu_ld"; then 10116fe4c343aSmrg # We only use this code for GNU lds that support --whole-archive. 10117fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10118fe4c343aSmrg else 10119fe4c343aSmrg # Exported symbols can be pulled into shared objects from archives 10120fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 10121fe4c343aSmrg fi 10122fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10123fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10124fe4c343aSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 10125fe4c343aSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10126fe4c343aSmrg if test svr4 != "$with_aix_soname"; then 10127fe4c343aSmrg # This is similar to how AIX traditionally builds its shared 10128fe4c343aSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10129fe4c343aSmrg _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' 10130fe4c343aSmrg fi 10131fe4c343aSmrg if test aix != "$with_aix_soname"; then 10132fe4c343aSmrg _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' 10133fe4c343aSmrg else 10134fe4c343aSmrg # used by -dlpreopen to get the symbols 10135fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10136fe4c343aSmrg fi 10137fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10138fe4c343aSmrg fi 10139fe4c343aSmrg fi 10140fe4c343aSmrg ;; 10141549e21daSmrg 10142fe4c343aSmrg beos*) 10143fe4c343aSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10144fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10145fe4c343aSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10146fe4c343aSmrg # support --undefined. This deserves some investigation. FIXME 10147fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10148fe4c343aSmrg else 10149fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10150fe4c343aSmrg fi 10151fe4c343aSmrg ;; 10152fe4c343aSmrg 10153fe4c343aSmrg chorus*) 10154fe4c343aSmrg case $cc_basename in 10155fe4c343aSmrg *) 10156fe4c343aSmrg # FIXME: insert proper C++ library support 10157fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10158fe4c343aSmrg ;; 10159fe4c343aSmrg esac 10160fe4c343aSmrg ;; 10161549e21daSmrg 10162fe4c343aSmrg cygwin* | mingw* | pw32* | cegcc*) 10163fe4c343aSmrg case $GXX,$cc_basename in 10164da1f2d5dSmrg ,cl* | no,cl* | ,icl* | no,icl*) 10165da1f2d5dSmrg # Native MSVC or ICC 10166fe4c343aSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 10167fe4c343aSmrg # no search path for DLLs. 10168fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10169fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10170fe4c343aSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 10171fe4c343aSmrg _LT_TAGVAR(file_list_spec, $1)='@' 10172fe4c343aSmrg # Tell ltmain to make .lib files, not .a files. 10173fe4c343aSmrg libext=lib 10174fe4c343aSmrg # Tell ltmain to make .dll files, not .so files. 10175fe4c343aSmrg shrext_cmds=.dll 10176fe4c343aSmrg # FIXME: Setting linknames here is a bad hack. 10177fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10178fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10179fe4c343aSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 10180fe4c343aSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10181fe4c343aSmrg else 10182fe4c343aSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10183fe4c343aSmrg fi~ 10184fe4c343aSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10185fe4c343aSmrg linknames=' 10186fe4c343aSmrg # The linker will not automatically build a static lib if we build a DLL. 10187fe4c343aSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10188fe4c343aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10189fe4c343aSmrg # Don't use ranlib 10190fe4c343aSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10191fe4c343aSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10192fe4c343aSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10193fe4c343aSmrg case $lt_outputfile in 10194fe4c343aSmrg *.exe|*.EXE) ;; 10195fe4c343aSmrg *) 10196fe4c343aSmrg lt_outputfile=$lt_outputfile.exe 10197fe4c343aSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 10198fe4c343aSmrg ;; 10199fe4c343aSmrg esac~ 10200fe4c343aSmrg func_to_tool_file "$lt_outputfile"~ 10201fe4c343aSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10202fe4c343aSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10203fe4c343aSmrg $RM "$lt_outputfile.manifest"; 10204fe4c343aSmrg fi' 10205fe4c343aSmrg ;; 10206fe4c343aSmrg *) 10207fe4c343aSmrg # g++ 10208fe4c343aSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10209fe4c343aSmrg # as there is no search path for DLLs. 10210fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10211fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10212fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10213fe4c343aSmrg _LT_TAGVAR(always_export_symbols, $1)=no 10214fe4c343aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10215549e21daSmrg 10216fe4c343aSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10217fe4c343aSmrg _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' 10218fe4c343aSmrg # If the export-symbols file already is a .def file, use it as 10219fe4c343aSmrg # is; otherwise, prepend EXPORTS... 10220fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10221fe4c343aSmrg cp $export_symbols $output_objdir/$soname.def; 10222fe4c343aSmrg else 10223fe4c343aSmrg echo EXPORTS > $output_objdir/$soname.def; 10224fe4c343aSmrg cat $export_symbols >> $output_objdir/$soname.def; 10225fe4c343aSmrg fi~ 10226fe4c343aSmrg $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' 10227fe4c343aSmrg else 10228fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10229fe4c343aSmrg fi 10230fe4c343aSmrg ;; 10231fe4c343aSmrg esac 10232fe4c343aSmrg ;; 10233fe4c343aSmrg darwin* | rhapsody*) 10234fe4c343aSmrg _LT_DARWIN_LINKER_FEATURES($1) 10235fe4c343aSmrg ;; 10236549e21daSmrg 10237fe4c343aSmrg os2*) 10238fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10239fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10240fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10241fe4c343aSmrg shrext_cmds=.dll 10242fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10243fe4c343aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10244fe4c343aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10245fe4c343aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10246fe4c343aSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10247fe4c343aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10248fe4c343aSmrg emximp -o $lib $output_objdir/$libname.def' 10249fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10250fe4c343aSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10251fe4c343aSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10252fe4c343aSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10253fe4c343aSmrg prefix_cmds="$SED"~ 10254fe4c343aSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10255fe4c343aSmrg prefix_cmds="$prefix_cmds -e 1d"; 10256fe4c343aSmrg fi~ 10257fe4c343aSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10258fe4c343aSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10259fe4c343aSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10260fe4c343aSmrg emximp -o $lib $output_objdir/$libname.def' 10261fe4c343aSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10262fe4c343aSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10263da1f2d5dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 10264fe4c343aSmrg ;; 10265549e21daSmrg 10266fe4c343aSmrg dgux*) 10267fe4c343aSmrg case $cc_basename in 10268fe4c343aSmrg ec++*) 10269fe4c343aSmrg # FIXME: insert proper C++ library support 10270fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10271fe4c343aSmrg ;; 10272fe4c343aSmrg ghcx*) 10273fe4c343aSmrg # Green Hills C++ Compiler 10274fe4c343aSmrg # FIXME: insert proper C++ library support 10275fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10276fe4c343aSmrg ;; 10277fe4c343aSmrg *) 10278fe4c343aSmrg # FIXME: insert proper C++ library support 10279fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10280fe4c343aSmrg ;; 10281fe4c343aSmrg esac 10282fe4c343aSmrg ;; 10283549e21daSmrg 10284fe4c343aSmrg freebsd2.*) 10285fe4c343aSmrg # C++ shared libraries reported to be fairly broken before 10286fe4c343aSmrg # switch to ELF 10287fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10288fe4c343aSmrg ;; 10289549e21daSmrg 10290fe4c343aSmrg freebsd-elf*) 10291fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10292fe4c343aSmrg ;; 10293549e21daSmrg 10294da1f2d5dSmrg freebsd* | dragonfly* | midnightbsd*) 10295fe4c343aSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10296fe4c343aSmrg # conventions 10297fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 10298fe4c343aSmrg ;; 10299549e21daSmrg 10300fe4c343aSmrg haiku*) 10301fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10302fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10303fe4c343aSmrg ;; 10304549e21daSmrg 10305fe4c343aSmrg hpux9*) 10306fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10307fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10308fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10309fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10310fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10311fe4c343aSmrg # but as the default 10312fe4c343aSmrg # location of the library. 10313549e21daSmrg 10314fe4c343aSmrg case $cc_basename in 10315fe4c343aSmrg CC*) 10316fe4c343aSmrg # FIXME: insert proper C++ library support 10317fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10318fe4c343aSmrg ;; 10319fe4c343aSmrg aCC*) 10320fe4c343aSmrg _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' 10321fe4c343aSmrg # Commands to make compiler produce verbose output that lists 10322fe4c343aSmrg # what "hidden" libraries, object files and flags are used when 10323fe4c343aSmrg # linking a shared library. 10324fe4c343aSmrg # 10325fe4c343aSmrg # There doesn't appear to be a way to prevent this compiler from 10326fe4c343aSmrg # explicitly linking system object files so we need to strip them 10327fe4c343aSmrg # from the output so that they don't get included in the library 10328fe4c343aSmrg # dependencies. 10329fe4c343aSmrg 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"' 10330fe4c343aSmrg ;; 10331fe4c343aSmrg *) 10332fe4c343aSmrg if test yes = "$GXX"; then 10333fe4c343aSmrg _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' 10334fe4c343aSmrg else 10335fe4c343aSmrg # FIXME: insert proper C++ library support 10336fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10337fe4c343aSmrg fi 10338fe4c343aSmrg ;; 10339fe4c343aSmrg esac 10340fe4c343aSmrg ;; 10341549e21daSmrg 10342fe4c343aSmrg hpux10*|hpux11*) 10343fe4c343aSmrg if test no = "$with_gnu_ld"; then 10344fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10345fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10346549e21daSmrg 10347fe4c343aSmrg case $host_cpu in 10348fe4c343aSmrg hppa*64*|ia64*) 10349fe4c343aSmrg ;; 10350fe4c343aSmrg *) 10351fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10352fe4c343aSmrg ;; 10353fe4c343aSmrg esac 10354fe4c343aSmrg fi 10355fe4c343aSmrg case $host_cpu in 10356fe4c343aSmrg hppa*64*|ia64*) 10357fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10358fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10359fe4c343aSmrg ;; 10360fe4c343aSmrg *) 10361fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10362fe4c343aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10363fe4c343aSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10364fe4c343aSmrg # but as the default 10365fe4c343aSmrg # location of the library. 10366fe4c343aSmrg ;; 10367fe4c343aSmrg esac 10368549e21daSmrg 10369fe4c343aSmrg case $cc_basename in 10370fe4c343aSmrg CC*) 10371fe4c343aSmrg # FIXME: insert proper C++ library support 10372fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10373fe4c343aSmrg ;; 10374fe4c343aSmrg aCC*) 10375fe4c343aSmrg case $host_cpu in 10376fe4c343aSmrg hppa*64*) 10377fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10378fe4c343aSmrg ;; 10379fe4c343aSmrg ia64*) 10380fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10381fe4c343aSmrg ;; 10382fe4c343aSmrg *) 10383fe4c343aSmrg _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' 10384fe4c343aSmrg ;; 10385fe4c343aSmrg esac 10386fe4c343aSmrg # Commands to make compiler produce verbose output that lists 10387fe4c343aSmrg # what "hidden" libraries, object files and flags are used when 10388fe4c343aSmrg # linking a shared library. 10389fe4c343aSmrg # 10390fe4c343aSmrg # There doesn't appear to be a way to prevent this compiler from 10391fe4c343aSmrg # explicitly linking system object files so we need to strip them 10392fe4c343aSmrg # from the output so that they don't get included in the library 10393fe4c343aSmrg # dependencies. 10394fe4c343aSmrg 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"' 10395fe4c343aSmrg ;; 10396fe4c343aSmrg *) 10397fe4c343aSmrg if test yes = "$GXX"; then 10398fe4c343aSmrg if test no = "$with_gnu_ld"; then 10399fe4c343aSmrg case $host_cpu in 10400fe4c343aSmrg hppa*64*) 10401fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10402fe4c343aSmrg ;; 10403fe4c343aSmrg ia64*) 10404fe4c343aSmrg _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' 10405fe4c343aSmrg ;; 10406fe4c343aSmrg *) 10407fe4c343aSmrg _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' 10408fe4c343aSmrg ;; 10409fe4c343aSmrg esac 10410fe4c343aSmrg fi 10411fe4c343aSmrg else 10412fe4c343aSmrg # FIXME: insert proper C++ library support 10413fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10414fe4c343aSmrg fi 10415fe4c343aSmrg ;; 10416fe4c343aSmrg esac 10417fe4c343aSmrg ;; 10418549e21daSmrg 10419fe4c343aSmrg interix[[3-9]]*) 10420fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10421fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10422fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10423fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10424fe4c343aSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 10425fe4c343aSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 10426fe4c343aSmrg # default) and relocated if they conflict, which is a slow very memory 10427fe4c343aSmrg # consuming and fragmenting process. To avoid this, we pick a random, 10428fe4c343aSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 10429fe4c343aSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 10430fe4c343aSmrg _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' 10431da1f2d5dSmrg _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' 10432fe4c343aSmrg ;; 10433fe4c343aSmrg irix5* | irix6*) 10434fe4c343aSmrg case $cc_basename in 10435fe4c343aSmrg CC*) 10436fe4c343aSmrg # SGI C++ 10437fe4c343aSmrg _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' 10438549e21daSmrg 10439fe4c343aSmrg # Archives containing C++ object files must be created using 10440fe4c343aSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 10441fe4c343aSmrg # necessary to make sure instantiated templates are included 10442fe4c343aSmrg # in the archive. 10443fe4c343aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 10444fe4c343aSmrg ;; 10445fe4c343aSmrg *) 10446fe4c343aSmrg if test yes = "$GXX"; then 10447fe4c343aSmrg if test no = "$with_gnu_ld"; then 10448fe4c343aSmrg _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' 10449fe4c343aSmrg else 10450fe4c343aSmrg _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' 10451fe4c343aSmrg fi 10452fe4c343aSmrg fi 10453fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10454fe4c343aSmrg ;; 10455fe4c343aSmrg esac 10456fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10457fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10458fe4c343aSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 10459fe4c343aSmrg ;; 10460549e21daSmrg 10461fe4c343aSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 10462fe4c343aSmrg case $cc_basename in 10463fe4c343aSmrg KCC*) 10464fe4c343aSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10465549e21daSmrg 10466fe4c343aSmrg # KCC will only create a shared library if the output file 10467fe4c343aSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10468fe4c343aSmrg # to its proper name (with version) after linking. 10469fe4c343aSmrg _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' 10470fe4c343aSmrg _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' 10471fe4c343aSmrg # Commands to make compiler produce verbose output that lists 10472fe4c343aSmrg # what "hidden" libraries, object files and flags are used when 10473fe4c343aSmrg # linking a shared library. 10474fe4c343aSmrg # 10475fe4c343aSmrg # There doesn't appear to be a way to prevent this compiler from 10476fe4c343aSmrg # explicitly linking system object files so we need to strip them 10477fe4c343aSmrg # from the output so that they don't get included in the library 10478fe4c343aSmrg # dependencies. 10479fe4c343aSmrg 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"' 10480549e21daSmrg 10481fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10482fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10483549e21daSmrg 10484fe4c343aSmrg # Archives containing C++ object files must be created using 10485fe4c343aSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 10486fe4c343aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 10487fe4c343aSmrg ;; 10488fe4c343aSmrg icpc* | ecpc* ) 10489fe4c343aSmrg # Intel C++ 10490fe4c343aSmrg with_gnu_ld=yes 10491fe4c343aSmrg # version 8.0 and above of icpc choke on multiply defined symbols 10492fe4c343aSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 10493fe4c343aSmrg # earlier do not add the objects themselves. 10494fe4c343aSmrg case `$CC -V 2>&1` in 10495fe4c343aSmrg *"Version 7."*) 10496fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10497fe4c343aSmrg _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' 10498fe4c343aSmrg ;; 10499fe4c343aSmrg *) # Version 8.0 or newer 10500fe4c343aSmrg tmp_idyn= 10501fe4c343aSmrg case $host_cpu in 10502fe4c343aSmrg ia64*) tmp_idyn=' -i_dynamic';; 10503fe4c343aSmrg esac 10504fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10505fe4c343aSmrg _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' 10506fe4c343aSmrg ;; 10507fe4c343aSmrg esac 10508fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10509fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10510fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10511fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10512fe4c343aSmrg ;; 10513fe4c343aSmrg pgCC* | pgcpp*) 10514fe4c343aSmrg # Portland Group C++ compiler 10515fe4c343aSmrg case `$CC -V` in 10516fe4c343aSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 10517fe4c343aSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 10518fe4c343aSmrg rm -rf $tpldir~ 10519fe4c343aSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 10520fe4c343aSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 10521fe4c343aSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 10522fe4c343aSmrg rm -rf $tpldir~ 10523fe4c343aSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 10524fe4c343aSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 10525fe4c343aSmrg $RANLIB $oldlib' 10526fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 10527fe4c343aSmrg rm -rf $tpldir~ 10528fe4c343aSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10529fe4c343aSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10530fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 10531fe4c343aSmrg rm -rf $tpldir~ 10532fe4c343aSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 10533fe4c343aSmrg $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' 10534fe4c343aSmrg ;; 10535fe4c343aSmrg *) # Version 6 and above use weak symbols 10536fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10537fe4c343aSmrg _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' 10538fe4c343aSmrg ;; 10539fe4c343aSmrg esac 10540549e21daSmrg 10541fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 10542fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10543fe4c343aSmrg _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' 10544fe4c343aSmrg ;; 10545fe4c343aSmrg cxx*) 10546fe4c343aSmrg # Compaq C++ 10547fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10548fe4c343aSmrg _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' 10549549e21daSmrg 10550fe4c343aSmrg runpath_var=LD_RUN_PATH 10551fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10552fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10553549e21daSmrg 10554fe4c343aSmrg # Commands to make compiler produce verbose output that lists 10555fe4c343aSmrg # what "hidden" libraries, object files and flags are used when 10556fe4c343aSmrg # linking a shared library. 10557fe4c343aSmrg # 10558fe4c343aSmrg # There doesn't appear to be a way to prevent this compiler from 10559fe4c343aSmrg # explicitly linking system object files so we need to strip them 10560fe4c343aSmrg # from the output so that they don't get included in the library 10561fe4c343aSmrg # dependencies. 10562fe4c343aSmrg 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' 10563fe4c343aSmrg ;; 10564fe4c343aSmrg xl* | mpixl* | bgxl*) 10565fe4c343aSmrg # IBM XL 8.0 on PPC, with GNU ld 10566fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10567fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10568fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10569fe4c343aSmrg if test yes = "$supports_anon_versioning"; then 10570fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 10571da1f2d5dSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 10572fe4c343aSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 10573fe4c343aSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 10574fe4c343aSmrg fi 10575fe4c343aSmrg ;; 10576fe4c343aSmrg *) 10577da1f2d5dSmrg case `$CC -V 2>&1 | $SED 5q` in 10578fe4c343aSmrg *Sun\ C*) 10579fe4c343aSmrg # Sun C++ 5.9 10580fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10581fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10582fe4c343aSmrg _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' 10583fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10584fe4c343aSmrg _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' 10585fe4c343aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 10586549e21daSmrg 10587fe4c343aSmrg # Not sure whether something based on 10588fe4c343aSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 10589fe4c343aSmrg # would be better. 10590fe4c343aSmrg output_verbose_link_cmd='func_echo_all' 10591549e21daSmrg 10592fe4c343aSmrg # Archives containing C++ object files must be created using 10593fe4c343aSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10594fe4c343aSmrg # necessary to make sure instantiated templates are included 10595fe4c343aSmrg # in the archive. 10596fe4c343aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10597fe4c343aSmrg ;; 10598fe4c343aSmrg esac 10599fe4c343aSmrg ;; 10600fe4c343aSmrg esac 10601fe4c343aSmrg ;; 10602ba6a1819Smrg 10603fe4c343aSmrg lynxos*) 10604fe4c343aSmrg # FIXME: insert proper C++ library support 10605fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10606fe4c343aSmrg ;; 10607ba6a1819Smrg 10608fe4c343aSmrg m88k*) 10609fe4c343aSmrg # FIXME: insert proper C++ library support 10610fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10611fe4c343aSmrg ;; 10612ba6a1819Smrg 10613fe4c343aSmrg mvs*) 10614fe4c343aSmrg case $cc_basename in 10615fe4c343aSmrg cxx*) 10616fe4c343aSmrg # FIXME: insert proper C++ library support 10617fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10618fe4c343aSmrg ;; 10619fe4c343aSmrg *) 10620fe4c343aSmrg # FIXME: insert proper C++ library support 10621fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10622fe4c343aSmrg ;; 10623fe4c343aSmrg esac 10624fe4c343aSmrg ;; 10625ba6a1819Smrg 10626fe4c343aSmrg netbsd*) 10627fe4c343aSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 10628fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 10629fe4c343aSmrg wlarc= 10630fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10631fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10632fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10633fe4c343aSmrg fi 10634fe4c343aSmrg # Workaround some broken pre-1.5 toolchains 10635fe4c343aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 10636fe4c343aSmrg ;; 10637ba6a1819Smrg 10638fe4c343aSmrg *nto* | *qnx*) 10639fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 10640fe4c343aSmrg ;; 10641ba6a1819Smrg 10642fe4c343aSmrg openbsd* | bitrig*) 10643fe4c343aSmrg if test -f /usr/libexec/ld.so; then 10644fe4c343aSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 10645fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10646fe4c343aSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10647fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10648fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10649fe4c343aSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 10650fe4c343aSmrg _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' 10651fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10652fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10653fe4c343aSmrg fi 10654fe4c343aSmrg output_verbose_link_cmd=func_echo_all 10655fe4c343aSmrg else 10656fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10657fe4c343aSmrg fi 10658fe4c343aSmrg ;; 10659ba6a1819Smrg 10660fe4c343aSmrg osf3* | osf4* | osf5*) 10661fe4c343aSmrg case $cc_basename in 10662fe4c343aSmrg KCC*) 10663fe4c343aSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10664ba6a1819Smrg 10665fe4c343aSmrg # KCC will only create a shared library if the output file 10666fe4c343aSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 10667fe4c343aSmrg # to its proper name (with version) after linking. 10668fe4c343aSmrg _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' 10669ba6a1819Smrg 10670fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 10671fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10672ba6a1819Smrg 10673fe4c343aSmrg # Archives containing C++ object files must be created using 10674fe4c343aSmrg # the KAI C++ compiler. 10675fe4c343aSmrg case $host in 10676fe4c343aSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 10677fe4c343aSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 10678fe4c343aSmrg esac 10679fe4c343aSmrg ;; 10680fe4c343aSmrg RCC*) 10681fe4c343aSmrg # Rational C++ 2.4.1 10682fe4c343aSmrg # FIXME: insert proper C++ library support 10683fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10684fe4c343aSmrg ;; 10685fe4c343aSmrg cxx*) 10686fe4c343aSmrg case $host in 10687fe4c343aSmrg osf3*) 10688fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10689fe4c343aSmrg _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' 10690fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10691fe4c343aSmrg ;; 10692fe4c343aSmrg *) 10693fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10694fe4c343aSmrg _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' 10695fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 10696fe4c343aSmrg echo "-hidden">> $lib.exp~ 10697fe4c343aSmrg $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~ 10698fe4c343aSmrg $RM $lib.exp' 10699fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10700fe4c343aSmrg ;; 10701fe4c343aSmrg esac 107021bedbe3fSmrg 10703fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 107041bedbe3fSmrg 10705fe4c343aSmrg # Commands to make compiler produce verbose output that lists 10706fe4c343aSmrg # what "hidden" libraries, object files and flags are used when 10707fe4c343aSmrg # linking a shared library. 10708fe4c343aSmrg # 10709fe4c343aSmrg # There doesn't appear to be a way to prevent this compiler from 10710fe4c343aSmrg # explicitly linking system object files so we need to strip them 10711fe4c343aSmrg # from the output so that they don't get included in the library 10712fe4c343aSmrg # dependencies. 10713fe4c343aSmrg 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"' 10714fe4c343aSmrg ;; 10715fe4c343aSmrg *) 10716fe4c343aSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 10717fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10718fe4c343aSmrg case $host in 10719fe4c343aSmrg osf3*) 10720fe4c343aSmrg _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' 10721fe4c343aSmrg ;; 10722fe4c343aSmrg *) 10723fe4c343aSmrg _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' 10724fe4c343aSmrg ;; 10725fe4c343aSmrg esac 10726ba6a1819Smrg 10727fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10728fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10729ba6a1819Smrg 10730fe4c343aSmrg # Commands to make compiler produce verbose output that lists 10731fe4c343aSmrg # what "hidden" libraries, object files and flags are used when 10732fe4c343aSmrg # linking a shared library. 10733fe4c343aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10734ba6a1819Smrg 10735fe4c343aSmrg else 10736fe4c343aSmrg # FIXME: insert proper C++ library support 10737fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10738fe4c343aSmrg fi 10739fe4c343aSmrg ;; 10740fe4c343aSmrg esac 10741fe4c343aSmrg ;; 10742ba6a1819Smrg 10743fe4c343aSmrg psos*) 10744fe4c343aSmrg # FIXME: insert proper C++ library support 10745fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10746fe4c343aSmrg ;; 10747ba6a1819Smrg 10748fe4c343aSmrg sunos4*) 10749fe4c343aSmrg case $cc_basename in 10750fe4c343aSmrg CC*) 10751fe4c343aSmrg # Sun C++ 4.x 10752fe4c343aSmrg # FIXME: insert proper C++ library support 10753fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10754fe4c343aSmrg ;; 10755fe4c343aSmrg lcc*) 10756fe4c343aSmrg # Lucid 10757fe4c343aSmrg # FIXME: insert proper C++ library support 10758fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10759fe4c343aSmrg ;; 10760fe4c343aSmrg *) 10761fe4c343aSmrg # FIXME: insert proper C++ library support 10762fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10763fe4c343aSmrg ;; 10764fe4c343aSmrg esac 10765fe4c343aSmrg ;; 10766ba6a1819Smrg 10767fe4c343aSmrg solaris*) 10768fe4c343aSmrg case $cc_basename in 10769fe4c343aSmrg CC* | sunCC*) 10770fe4c343aSmrg # Sun C++ 4.2, 5.x and Centerline C++ 10771fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 10772fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 10773fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10774fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10775fe4c343aSmrg $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' 10776ba6a1819Smrg 10777fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10778fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10779fe4c343aSmrg case $host_os in 10780fe4c343aSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10781fe4c343aSmrg *) 10782fe4c343aSmrg # The compiler driver will combine and reorder linker options, 10783fe4c343aSmrg # but understands '-z linker_flag'. 10784fe4c343aSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10785fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10786fe4c343aSmrg ;; 10787fe4c343aSmrg esac 10788fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10789ba6a1819Smrg 10790fe4c343aSmrg output_verbose_link_cmd='func_echo_all' 10791ba6a1819Smrg 10792fe4c343aSmrg # Archives containing C++ object files must be created using 10793fe4c343aSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 10794fe4c343aSmrg # necessary to make sure instantiated templates are included 10795fe4c343aSmrg # in the archive. 10796fe4c343aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 10797fe4c343aSmrg ;; 10798fe4c343aSmrg gcx*) 10799fe4c343aSmrg # Green Hills C++ Compiler 10800fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10801ba6a1819Smrg 10802fe4c343aSmrg # The C++ compiler must be used to create the archive. 10803fe4c343aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 10804fe4c343aSmrg ;; 10805fe4c343aSmrg *) 10806fe4c343aSmrg # GNU C++ compiler with Solaris linker 10807fe4c343aSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 10808fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 10809fe4c343aSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 10810fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10811fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10812fe4c343aSmrg $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' 10813ba6a1819Smrg 10814fe4c343aSmrg # Commands to make compiler produce verbose output that lists 10815fe4c343aSmrg # what "hidden" libraries, object files and flags are used when 10816fe4c343aSmrg # linking a shared library. 10817fe4c343aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10818fe4c343aSmrg else 10819fe4c343aSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 10820fe4c343aSmrg # platform. 10821fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10822fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10823fe4c343aSmrg $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' 10824ba6a1819Smrg 10825fe4c343aSmrg # Commands to make compiler produce verbose output that lists 10826fe4c343aSmrg # what "hidden" libraries, object files and flags are used when 10827fe4c343aSmrg # linking a shared library. 10828fe4c343aSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10829fe4c343aSmrg fi 10830ba6a1819Smrg 10831fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 10832fe4c343aSmrg case $host_os in 10833fe4c343aSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10834fe4c343aSmrg *) 10835fe4c343aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10836fe4c343aSmrg ;; 10837fe4c343aSmrg esac 10838fe4c343aSmrg fi 10839fe4c343aSmrg ;; 10840fe4c343aSmrg esac 10841fe4c343aSmrg ;; 10842ba6a1819Smrg 10843fe4c343aSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10844fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10845fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10846fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10847fe4c343aSmrg runpath_var='LD_RUN_PATH' 10848ba6a1819Smrg 10849fe4c343aSmrg case $cc_basename in 10850fe4c343aSmrg CC*) 10851fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10852fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10853fe4c343aSmrg ;; 10854fe4c343aSmrg *) 10855fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10856fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10857fe4c343aSmrg ;; 10858fe4c343aSmrg esac 10859fe4c343aSmrg ;; 10860549e21daSmrg 10861fe4c343aSmrg sysv5* | sco3.2v5* | sco5v6*) 10862fe4c343aSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 10863fe4c343aSmrg # link with -lc, and that would cause any symbols used from libc to 10864fe4c343aSmrg # always be unresolved, which means just about no library would 10865fe4c343aSmrg # ever link correctly. If we're not using GNU ld we use -z text 10866fe4c343aSmrg # though, which does catch some bad symbols but isn't as heavy-handed 10867fe4c343aSmrg # as -z defs. 10868fe4c343aSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10869fe4c343aSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10870fe4c343aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10871fe4c343aSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10872fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10873fe4c343aSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10874fe4c343aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10875fe4c343aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10876fe4c343aSmrg runpath_var='LD_RUN_PATH' 10877ba6a1819Smrg 10878fe4c343aSmrg case $cc_basename in 10879fe4c343aSmrg CC*) 10880fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10881fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10882fe4c343aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 10883fe4c343aSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 10884fe4c343aSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 10885fe4c343aSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 10886fe4c343aSmrg ;; 10887fe4c343aSmrg *) 10888fe4c343aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10889fe4c343aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10890fe4c343aSmrg ;; 10891fe4c343aSmrg esac 10892fe4c343aSmrg ;; 10893549e21daSmrg 10894fe4c343aSmrg tandem*) 10895fe4c343aSmrg case $cc_basename in 10896fe4c343aSmrg NCC*) 10897fe4c343aSmrg # NonStop-UX NCC 3.20 10898fe4c343aSmrg # FIXME: insert proper C++ library support 10899fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10900fe4c343aSmrg ;; 10901fe4c343aSmrg *) 10902fe4c343aSmrg # FIXME: insert proper C++ library support 10903fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10904fe4c343aSmrg ;; 10905fe4c343aSmrg esac 10906fe4c343aSmrg ;; 10907549e21daSmrg 10908fe4c343aSmrg vxworks*) 10909fe4c343aSmrg # FIXME: insert proper C++ library support 10910fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10911fe4c343aSmrg ;; 109121bedbe3fSmrg 10913fe4c343aSmrg *) 10914fe4c343aSmrg # FIXME: insert proper C++ library support 10915fe4c343aSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10916fe4c343aSmrg ;; 10917fe4c343aSmrg esac 10918549e21daSmrg 10919fe4c343aSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10920fe4c343aSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10921549e21daSmrg 10922fe4c343aSmrg _LT_TAGVAR(GCC, $1)=$GXX 10923fe4c343aSmrg _LT_TAGVAR(LD, $1)=$LD 10924549e21daSmrg 10925fe4c343aSmrg ## CAVEAT EMPTOR: 10926fe4c343aSmrg ## There is no encapsulation within the following macros, do not change 10927fe4c343aSmrg ## the running order or otherwise move them around unless you know exactly 10928fe4c343aSmrg ## what you are doing... 10929fe4c343aSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 10930fe4c343aSmrg _LT_COMPILER_PIC($1) 10931fe4c343aSmrg _LT_COMPILER_C_O($1) 10932fe4c343aSmrg _LT_COMPILER_FILE_LOCKS($1) 10933fe4c343aSmrg _LT_LINKER_SHLIBS($1) 10934fe4c343aSmrg _LT_SYS_DYNAMIC_LINKER($1) 10935fe4c343aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 10936fe4c343aSmrg 10937fe4c343aSmrg _LT_CONFIG($1) 10938fe4c343aSmrg fi # test -n "$compiler" 10939fe4c343aSmrg 10940fe4c343aSmrg CC=$lt_save_CC 10941fe4c343aSmrg CFLAGS=$lt_save_CFLAGS 10942fe4c343aSmrg LDCXX=$LD 10943fe4c343aSmrg LD=$lt_save_LD 10944fe4c343aSmrg GCC=$lt_save_GCC 10945fe4c343aSmrg with_gnu_ld=$lt_save_with_gnu_ld 10946fe4c343aSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 10947fe4c343aSmrg lt_cv_path_LD=$lt_save_path_LD 10948fe4c343aSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 10949fe4c343aSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 10950fe4c343aSmrgfi # test yes != "$_lt_caught_CXX_error" 10951549e21daSmrg 10952fe4c343aSmrgAC_LANG_POP 10953fe4c343aSmrg])# _LT_LANG_CXX_CONFIG 109541bedbe3fSmrg 109551bedbe3fSmrg 10956fe4c343aSmrg# _LT_FUNC_STRIPNAME_CNF 10957fe4c343aSmrg# ---------------------- 10958fe4c343aSmrg# func_stripname_cnf prefix suffix name 10959fe4c343aSmrg# strip PREFIX and SUFFIX off of NAME. 10960fe4c343aSmrg# PREFIX and SUFFIX must not contain globbing or regex special 10961fe4c343aSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 10962fe4c343aSmrg# dot (in which case that matches only a dot). 109631bedbe3fSmrg# 10964fe4c343aSmrg# This function is identical to the (non-XSI) version of func_stripname, 10965fe4c343aSmrg# except this one can be used by m4 code that may be executed by configure, 10966fe4c343aSmrg# rather than the libtool script. 10967fe4c343aSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 10968fe4c343aSmrgAC_REQUIRE([_LT_DECL_SED]) 10969fe4c343aSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 10970fe4c343aSmrgfunc_stripname_cnf () 10971fe4c343aSmrg{ 10972fe4c343aSmrg case @S|@2 in 10973fe4c343aSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 10974fe4c343aSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 10975fe4c343aSmrg esac 10976fe4c343aSmrg} # func_stripname_cnf 10977fe4c343aSmrg])# _LT_FUNC_STRIPNAME_CNF 10978549e21daSmrg 10979549e21daSmrg 10980fe4c343aSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 10981fe4c343aSmrg# --------------------------------- 10982fe4c343aSmrg# Figure out "hidden" library dependencies from verbose 10983fe4c343aSmrg# compiler output when linking a shared library. 10984fe4c343aSmrg# Parse the compiler output and extract the necessary 10985fe4c343aSmrg# objects, libraries and library flags. 10986fe4c343aSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 10987fe4c343aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10988fe4c343aSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 10989fe4c343aSmrg# Dependencies to place before and after the object being linked: 10990fe4c343aSmrg_LT_TAGVAR(predep_objects, $1)= 10991fe4c343aSmrg_LT_TAGVAR(postdep_objects, $1)= 10992fe4c343aSmrg_LT_TAGVAR(predeps, $1)= 10993fe4c343aSmrg_LT_TAGVAR(postdeps, $1)= 10994fe4c343aSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 10995549e21daSmrg 10996fe4c343aSmrgdnl we can't use the lt_simple_compile_test_code here, 10997fe4c343aSmrgdnl because it contains code intended for an executable, 10998fe4c343aSmrgdnl not a library. It's possible we should let each 10999fe4c343aSmrgdnl tag define a new lt_????_link_test_code variable, 11000fe4c343aSmrgdnl but it's only used here... 11001fe4c343aSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 11002fe4c343aSmrgint a; 11003fe4c343aSmrgvoid foo (void) { a = 0; } 11004fe4c343aSmrg_LT_EOF 11005fe4c343aSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 11006fe4c343aSmrgclass Foo 11007fe4c343aSmrg{ 11008fe4c343aSmrgpublic: 11009fe4c343aSmrg Foo (void) { a = 0; } 11010fe4c343aSmrgprivate: 11011fe4c343aSmrg int a; 11012fe4c343aSmrg}; 11013fe4c343aSmrg_LT_EOF 11014fe4c343aSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 11015fe4c343aSmrg subroutine foo 11016fe4c343aSmrg implicit none 11017fe4c343aSmrg integer*4 a 11018fe4c343aSmrg a=0 11019fe4c343aSmrg return 11020fe4c343aSmrg end 11021fe4c343aSmrg_LT_EOF 11022fe4c343aSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 11023fe4c343aSmrg subroutine foo 11024fe4c343aSmrg implicit none 11025fe4c343aSmrg integer a 11026fe4c343aSmrg a=0 11027fe4c343aSmrg return 11028fe4c343aSmrg end 11029fe4c343aSmrg_LT_EOF 11030fe4c343aSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 11031fe4c343aSmrgpublic class foo { 11032fe4c343aSmrg private int a; 11033fe4c343aSmrg public void bar (void) { 11034fe4c343aSmrg a = 0; 11035fe4c343aSmrg } 11036fe4c343aSmrg}; 11037fe4c343aSmrg_LT_EOF 11038fe4c343aSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 11039fe4c343aSmrgpackage foo 11040fe4c343aSmrgfunc foo() { 11041fe4c343aSmrg} 11042fe4c343aSmrg_LT_EOF 11043fe4c343aSmrg]) 11044549e21daSmrg 11045fe4c343aSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 11046fe4c343aSmrgcase "$CC $CFLAGS " in #( 11047fe4c343aSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 11048fe4c343aSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 11049fe4c343aSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 11050fe4c343aSmrgesac 11051549e21daSmrg 11052fe4c343aSmrgdnl Parse the compiler output and extract the necessary 11053fe4c343aSmrgdnl objects, libraries and library flags. 11054fe4c343aSmrgif AC_TRY_EVAL(ac_compile); then 11055fe4c343aSmrg # Parse the compiler output and extract the necessary 11056fe4c343aSmrg # objects, libraries and library flags. 11057549e21daSmrg 11058fe4c343aSmrg # Sentinel used to keep track of whether or not we are before 11059fe4c343aSmrg # the conftest object file. 11060fe4c343aSmrg pre_test_object_deps_done=no 11061549e21daSmrg 11062fe4c343aSmrg for p in `eval "$output_verbose_link_cmd"`; do 11063fe4c343aSmrg case $prev$p in 11064549e21daSmrg 11065fe4c343aSmrg -L* | -R* | -l*) 11066fe4c343aSmrg # Some compilers place space between "-{L,R}" and the path. 11067fe4c343aSmrg # Remove the space. 11068fe4c343aSmrg if test x-L = "$p" || 11069fe4c343aSmrg test x-R = "$p"; then 11070fe4c343aSmrg prev=$p 11071fe4c343aSmrg continue 11072fe4c343aSmrg fi 11073fe4c343aSmrg 11074fe4c343aSmrg # Expand the sysroot to ease extracting the directories later. 11075fe4c343aSmrg if test -z "$prev"; then 11076fe4c343aSmrg case $p in 11077fe4c343aSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 11078fe4c343aSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 11079fe4c343aSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 11080fe4c343aSmrg esac 11081fe4c343aSmrg fi 11082fe4c343aSmrg case $p in 11083fe4c343aSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 11084fe4c343aSmrg esac 11085fe4c343aSmrg if test no = "$pre_test_object_deps_done"; then 11086fe4c343aSmrg case $prev in 11087fe4c343aSmrg -L | -R) 11088fe4c343aSmrg # Internal compiler library paths should come after those 11089fe4c343aSmrg # provided the user. The postdeps already come after the 11090fe4c343aSmrg # user supplied libs so there is no need to process them. 11091fe4c343aSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 11092fe4c343aSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 11093fe4c343aSmrg else 11094fe4c343aSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 11095fe4c343aSmrg fi 11096fe4c343aSmrg ;; 11097fe4c343aSmrg # The "-l" case would never come before the object being 11098fe4c343aSmrg # linked, so don't bother handling this case. 11099fe4c343aSmrg esac 11100fe4c343aSmrg else 11101fe4c343aSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 11102fe4c343aSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 11103fe4c343aSmrg else 11104fe4c343aSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 11105fe4c343aSmrg fi 11106fe4c343aSmrg fi 11107fe4c343aSmrg prev= 11108fe4c343aSmrg ;; 11109ba6a1819Smrg 11110fe4c343aSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 11111fe4c343aSmrg *.$objext) 11112fe4c343aSmrg # This assumes that the test object file only shows up 11113fe4c343aSmrg # once in the compiler output. 11114fe4c343aSmrg if test "$p" = "conftest.$objext"; then 11115fe4c343aSmrg pre_test_object_deps_done=yes 11116fe4c343aSmrg continue 11117fe4c343aSmrg fi 11118ba6a1819Smrg 11119fe4c343aSmrg if test no = "$pre_test_object_deps_done"; then 11120fe4c343aSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 11121fe4c343aSmrg _LT_TAGVAR(predep_objects, $1)=$p 11122fe4c343aSmrg else 11123fe4c343aSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 11124fe4c343aSmrg fi 11125fe4c343aSmrg else 11126fe4c343aSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11127fe4c343aSmrg _LT_TAGVAR(postdep_objects, $1)=$p 11128fe4c343aSmrg else 11129fe4c343aSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11130fe4c343aSmrg fi 11131fe4c343aSmrg fi 11132fe4c343aSmrg ;; 11133549e21daSmrg 11134fe4c343aSmrg *) ;; # Ignore the rest. 11135549e21daSmrg 11136fe4c343aSmrg esac 11137fe4c343aSmrg done 11138549e21daSmrg 11139fe4c343aSmrg # Clean up. 11140fe4c343aSmrg rm -f a.out a.exe 11141fe4c343aSmrgelse 11142fe4c343aSmrg echo "libtool.m4: error: problem compiling $1 test program" 11143fe4c343aSmrgfi 11144549e21daSmrg 11145fe4c343aSmrg$RM -f confest.$objext 11146fe4c343aSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 11147549e21daSmrg 11148fe4c343aSmrg# PORTME: override above test on systems where it is broken 11149fe4c343aSmrgm4_if([$1], [CXX], 11150fe4c343aSmrg[case $host_os in 11151fe4c343aSmrginterix[[3-9]]*) 11152fe4c343aSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 11153fe4c343aSmrg # hack all around it, let's just trust "g++" to DTRT. 11154fe4c343aSmrg _LT_TAGVAR(predep_objects,$1)= 11155fe4c343aSmrg _LT_TAGVAR(postdep_objects,$1)= 11156fe4c343aSmrg _LT_TAGVAR(postdeps,$1)= 11157fe4c343aSmrg ;; 11158fe4c343aSmrgesac 11159fe4c343aSmrg]) 11160549e21daSmrg 11161fe4c343aSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 11162fe4c343aSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11163fe4c343aSmrgesac 11164fe4c343aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11165fe4c343aSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11166fe4c343aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11167fe4c343aSmrgfi 11168fe4c343aSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11169fe4c343aSmrg [The directories searched by this compiler when creating a shared library]) 11170fe4c343aSmrg_LT_TAGDECL([], [predep_objects], [1], 11171fe4c343aSmrg [Dependencies to place before and after the objects being linked to 11172fe4c343aSmrg create a shared library]) 11173fe4c343aSmrg_LT_TAGDECL([], [postdep_objects], [1]) 11174fe4c343aSmrg_LT_TAGDECL([], [predeps], [1]) 11175fe4c343aSmrg_LT_TAGDECL([], [postdeps], [1]) 11176fe4c343aSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11177fe4c343aSmrg [The library search path used internally by the compiler when linking 11178fe4c343aSmrg a shared library]) 11179fe4c343aSmrg])# _LT_SYS_HIDDEN_LIBDEPS 11180549e21daSmrg 11181549e21daSmrg 11182fe4c343aSmrg# _LT_LANG_F77_CONFIG([TAG]) 11183fe4c343aSmrg# -------------------------- 11184fe4c343aSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 11185fe4c343aSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11186fe4c343aSmrg# to write the compiler configuration to 'libtool'. 11187fe4c343aSmrgm4_defun([_LT_LANG_F77_CONFIG], 11188fe4c343aSmrg[AC_LANG_PUSH(Fortran 77) 11189fe4c343aSmrgif test -z "$F77" || test no = "$F77"; then 11190fe4c343aSmrg _lt_disable_F77=yes 11191fe4c343aSmrgfi 11192ba6a1819Smrg 11193fe4c343aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11194fe4c343aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 11195fe4c343aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 11196fe4c343aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11197fe4c343aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11198fe4c343aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 11199fe4c343aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11200fe4c343aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11201fe4c343aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11202fe4c343aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11203fe4c343aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 11204fe4c343aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 11205fe4c343aSmrg_LT_TAGVAR(module_cmds, $1)= 11206fe4c343aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 11207fe4c343aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11208fe4c343aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11209fe4c343aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11210fe4c343aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11211fe4c343aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 11212fe4c343aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11213fe4c343aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11214ba6a1819Smrg 11215fe4c343aSmrg# Source file extension for f77 test sources. 11216fe4c343aSmrgac_ext=f 11217ba6a1819Smrg 11218fe4c343aSmrg# Object file extension for compiled f77 test sources. 11219fe4c343aSmrgobjext=o 11220fe4c343aSmrg_LT_TAGVAR(objext, $1)=$objext 11221ba6a1819Smrg 11222fe4c343aSmrg# No sense in running all these tests if we already determined that 11223fe4c343aSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 11224fe4c343aSmrg# are currently assumed to apply to all compilers on this platform, 11225fe4c343aSmrg# and will be corrupted by setting them based on a non-working compiler. 11226fe4c343aSmrgif test yes != "$_lt_disable_F77"; then 11227fe4c343aSmrg # Code to be used in simple compile tests 11228fe4c343aSmrg lt_simple_compile_test_code="\ 11229fe4c343aSmrg subroutine t 11230fe4c343aSmrg return 11231fe4c343aSmrg end 11232fe4c343aSmrg" 11233ba6a1819Smrg 11234fe4c343aSmrg # Code to be used in simple link tests 11235fe4c343aSmrg lt_simple_link_test_code="\ 11236fe4c343aSmrg program t 11237fe4c343aSmrg end 11238fe4c343aSmrg" 11239ba6a1819Smrg 11240fe4c343aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11241fe4c343aSmrg _LT_TAG_COMPILER 11242ba6a1819Smrg 11243fe4c343aSmrg # save warnings/boilerplate of simple test code 11244fe4c343aSmrg _LT_COMPILER_BOILERPLATE 11245fe4c343aSmrg _LT_LINKER_BOILERPLATE 11246ba6a1819Smrg 11247fe4c343aSmrg # Allow CC to be a program name with arguments. 11248fe4c343aSmrg lt_save_CC=$CC 11249fe4c343aSmrg lt_save_GCC=$GCC 11250fe4c343aSmrg lt_save_CFLAGS=$CFLAGS 11251fe4c343aSmrg CC=${F77-"f77"} 11252fe4c343aSmrg CFLAGS=$FFLAGS 11253fe4c343aSmrg compiler=$CC 11254fe4c343aSmrg _LT_TAGVAR(compiler, $1)=$CC 11255fe4c343aSmrg _LT_CC_BASENAME([$compiler]) 11256fe4c343aSmrg GCC=$G77 11257fe4c343aSmrg if test -n "$compiler"; then 11258fe4c343aSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11259fe4c343aSmrg AC_MSG_RESULT([$can_build_shared]) 11260ba6a1819Smrg 11261fe4c343aSmrg AC_MSG_CHECKING([whether to build shared libraries]) 11262fe4c343aSmrg test no = "$can_build_shared" && enable_shared=no 11263ba6a1819Smrg 11264fe4c343aSmrg # On AIX, shared libraries and static libraries use the same namespace, and 11265fe4c343aSmrg # are all built from PIC. 112661bedbe3fSmrg case $host_os in 11267fe4c343aSmrg aix3*) 11268fe4c343aSmrg test yes = "$enable_shared" && enable_static=no 11269fe4c343aSmrg if test -n "$RANLIB"; then 11270fe4c343aSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11271fe4c343aSmrg postinstall_cmds='$RANLIB $lib' 11272fe4c343aSmrg fi 11273fe4c343aSmrg ;; 11274fe4c343aSmrg aix[[4-9]]*) 11275fe4c343aSmrg if test ia64 != "$host_cpu"; then 11276fe4c343aSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11277fe4c343aSmrg yes,aix,yes) ;; # shared object as lib.so file only 11278fe4c343aSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 11279fe4c343aSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11280fe4c343aSmrg esac 11281fe4c343aSmrg fi 11282fe4c343aSmrg ;; 112831bedbe3fSmrg esac 11284fe4c343aSmrg AC_MSG_RESULT([$enable_shared]) 11285549e21daSmrg 11286fe4c343aSmrg AC_MSG_CHECKING([whether to build static libraries]) 11287fe4c343aSmrg # Make sure either enable_shared or enable_static is yes. 11288fe4c343aSmrg test yes = "$enable_shared" || enable_static=yes 11289fe4c343aSmrg AC_MSG_RESULT([$enable_static]) 11290ba6a1819Smrg 11291fe4c343aSmrg _LT_TAGVAR(GCC, $1)=$G77 11292fe4c343aSmrg _LT_TAGVAR(LD, $1)=$LD 11293ba6a1819Smrg 11294fe4c343aSmrg ## CAVEAT EMPTOR: 11295fe4c343aSmrg ## There is no encapsulation within the following macros, do not change 11296fe4c343aSmrg ## the running order or otherwise move them around unless you know exactly 11297fe4c343aSmrg ## what you are doing... 11298fe4c343aSmrg _LT_COMPILER_PIC($1) 11299fe4c343aSmrg _LT_COMPILER_C_O($1) 11300fe4c343aSmrg _LT_COMPILER_FILE_LOCKS($1) 11301fe4c343aSmrg _LT_LINKER_SHLIBS($1) 11302fe4c343aSmrg _LT_SYS_DYNAMIC_LINKER($1) 11303fe4c343aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11304ba6a1819Smrg 11305fe4c343aSmrg _LT_CONFIG($1) 11306fe4c343aSmrg fi # test -n "$compiler" 11307ba6a1819Smrg 11308fe4c343aSmrg GCC=$lt_save_GCC 11309fe4c343aSmrg CC=$lt_save_CC 11310fe4c343aSmrg CFLAGS=$lt_save_CFLAGS 11311fe4c343aSmrgfi # test yes != "$_lt_disable_F77" 11312ba6a1819Smrg 11313fe4c343aSmrgAC_LANG_POP 11314fe4c343aSmrg])# _LT_LANG_F77_CONFIG 11315ba6a1819Smrg 11316ba6a1819Smrg 11317fe4c343aSmrg# _LT_LANG_FC_CONFIG([TAG]) 11318fe4c343aSmrg# ------------------------- 11319fe4c343aSmrg# Ensure that the configuration variables for a Fortran compiler are 11320fe4c343aSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11321fe4c343aSmrg# to write the compiler configuration to 'libtool'. 11322fe4c343aSmrgm4_defun([_LT_LANG_FC_CONFIG], 11323fe4c343aSmrg[AC_LANG_PUSH(Fortran) 11324fe4c343aSmrg 11325fe4c343aSmrgif test -z "$FC" || test no = "$FC"; then 11326fe4c343aSmrg _lt_disable_FC=yes 113271bedbe3fSmrgfi 11328549e21daSmrg 11329fe4c343aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11330fe4c343aSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 11331fe4c343aSmrg_LT_TAGVAR(always_export_symbols, $1)=no 11332fe4c343aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11333fe4c343aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11334fe4c343aSmrg_LT_TAGVAR(hardcode_direct, $1)=no 11335fe4c343aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11336fe4c343aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11337fe4c343aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11338fe4c343aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11339fe4c343aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 11340fe4c343aSmrg_LT_TAGVAR(inherit_rpath, $1)=no 11341fe4c343aSmrg_LT_TAGVAR(module_cmds, $1)= 11342fe4c343aSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 11343fe4c343aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11344fe4c343aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11345fe4c343aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11346fe4c343aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11347fe4c343aSmrg_LT_TAGVAR(no_undefined_flag, $1)= 11348fe4c343aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11349fe4c343aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11350ba6a1819Smrg 11351fe4c343aSmrg# Source file extension for fc test sources. 11352fe4c343aSmrgac_ext=${ac_fc_srcext-f} 11353ba6a1819Smrg 11354fe4c343aSmrg# Object file extension for compiled fc test sources. 11355fe4c343aSmrgobjext=o 11356fe4c343aSmrg_LT_TAGVAR(objext, $1)=$objext 11357ba6a1819Smrg 11358fe4c343aSmrg# No sense in running all these tests if we already determined that 11359fe4c343aSmrg# the FC compiler isn't working. Some variables (like enable_shared) 11360fe4c343aSmrg# are currently assumed to apply to all compilers on this platform, 11361fe4c343aSmrg# and will be corrupted by setting them based on a non-working compiler. 11362fe4c343aSmrgif test yes != "$_lt_disable_FC"; then 11363fe4c343aSmrg # Code to be used in simple compile tests 11364fe4c343aSmrg lt_simple_compile_test_code="\ 11365fe4c343aSmrg subroutine t 11366fe4c343aSmrg return 11367fe4c343aSmrg end 11368fe4c343aSmrg" 11369ba6a1819Smrg 11370fe4c343aSmrg # Code to be used in simple link tests 11371fe4c343aSmrg lt_simple_link_test_code="\ 11372fe4c343aSmrg program t 11373fe4c343aSmrg end 11374fe4c343aSmrg" 11375ba6a1819Smrg 11376fe4c343aSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11377fe4c343aSmrg _LT_TAG_COMPILER 11378ba6a1819Smrg 11379fe4c343aSmrg # save warnings/boilerplate of simple test code 11380fe4c343aSmrg _LT_COMPILER_BOILERPLATE 11381fe4c343aSmrg _LT_LINKER_BOILERPLATE 11382ba6a1819Smrg 11383fe4c343aSmrg # Allow CC to be a program name with arguments. 11384fe4c343aSmrg lt_save_CC=$CC 11385fe4c343aSmrg lt_save_GCC=$GCC 11386fe4c343aSmrg lt_save_CFLAGS=$CFLAGS 11387fe4c343aSmrg CC=${FC-"f95"} 11388fe4c343aSmrg CFLAGS=$FCFLAGS 11389fe4c343aSmrg compiler=$CC 11390fe4c343aSmrg GCC=$ac_cv_fc_compiler_gnu 11391ba6a1819Smrg 11392fe4c343aSmrg _LT_TAGVAR(compiler, $1)=$CC 11393fe4c343aSmrg _LT_CC_BASENAME([$compiler]) 11394549e21daSmrg 11395fe4c343aSmrg if test -n "$compiler"; then 11396fe4c343aSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11397fe4c343aSmrg AC_MSG_RESULT([$can_build_shared]) 11398ba6a1819Smrg 11399fe4c343aSmrg AC_MSG_CHECKING([whether to build shared libraries]) 11400fe4c343aSmrg test no = "$can_build_shared" && enable_shared=no 11401ba6a1819Smrg 11402fe4c343aSmrg # On AIX, shared libraries and static libraries use the same namespace, and 11403fe4c343aSmrg # are all built from PIC. 11404fe4c343aSmrg case $host_os in 11405fe4c343aSmrg aix3*) 11406fe4c343aSmrg test yes = "$enable_shared" && enable_static=no 11407fe4c343aSmrg if test -n "$RANLIB"; then 11408fe4c343aSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11409fe4c343aSmrg postinstall_cmds='$RANLIB $lib' 11410fe4c343aSmrg fi 11411fe4c343aSmrg ;; 11412fe4c343aSmrg aix[[4-9]]*) 11413fe4c343aSmrg if test ia64 != "$host_cpu"; then 11414fe4c343aSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11415fe4c343aSmrg yes,aix,yes) ;; # shared object as lib.so file only 11416fe4c343aSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 11417fe4c343aSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11418fe4c343aSmrg esac 11419fe4c343aSmrg fi 11420fe4c343aSmrg ;; 11421fe4c343aSmrg esac 11422fe4c343aSmrg AC_MSG_RESULT([$enable_shared]) 11423ba6a1819Smrg 11424fe4c343aSmrg AC_MSG_CHECKING([whether to build static libraries]) 11425fe4c343aSmrg # Make sure either enable_shared or enable_static is yes. 11426fe4c343aSmrg test yes = "$enable_shared" || enable_static=yes 11427fe4c343aSmrg AC_MSG_RESULT([$enable_static]) 11428549e21daSmrg 11429fe4c343aSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 11430fe4c343aSmrg _LT_TAGVAR(LD, $1)=$LD 11431549e21daSmrg 11432fe4c343aSmrg ## CAVEAT EMPTOR: 11433fe4c343aSmrg ## There is no encapsulation within the following macros, do not change 11434fe4c343aSmrg ## the running order or otherwise move them around unless you know exactly 11435fe4c343aSmrg ## what you are doing... 11436fe4c343aSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 11437fe4c343aSmrg _LT_COMPILER_PIC($1) 11438fe4c343aSmrg _LT_COMPILER_C_O($1) 11439fe4c343aSmrg _LT_COMPILER_FILE_LOCKS($1) 11440fe4c343aSmrg _LT_LINKER_SHLIBS($1) 11441fe4c343aSmrg _LT_SYS_DYNAMIC_LINKER($1) 11442fe4c343aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11443ba6a1819Smrg 11444fe4c343aSmrg _LT_CONFIG($1) 11445fe4c343aSmrg fi # test -n "$compiler" 11446ba6a1819Smrg 11447fe4c343aSmrg GCC=$lt_save_GCC 11448fe4c343aSmrg CC=$lt_save_CC 11449fe4c343aSmrg CFLAGS=$lt_save_CFLAGS 11450fe4c343aSmrgfi # test yes != "$_lt_disable_FC" 11451549e21daSmrg 11452fe4c343aSmrgAC_LANG_POP 11453fe4c343aSmrg])# _LT_LANG_FC_CONFIG 11454ba6a1819Smrg 11455ba6a1819Smrg 11456fe4c343aSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 11457fe4c343aSmrg# -------------------------- 11458fe4c343aSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 11459fe4c343aSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11460fe4c343aSmrg# to write the compiler configuration to 'libtool'. 11461fe4c343aSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 11462fe4c343aSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 11463fe4c343aSmrgAC_LANG_SAVE 11464ba6a1819Smrg 11465fe4c343aSmrg# Source file extension for Java test sources. 11466fe4c343aSmrgac_ext=java 11467ba6a1819Smrg 11468fe4c343aSmrg# Object file extension for compiled Java test sources. 11469fe4c343aSmrgobjext=o 11470fe4c343aSmrg_LT_TAGVAR(objext, $1)=$objext 11471ba6a1819Smrg 11472fe4c343aSmrg# Code to be used in simple compile tests 11473fe4c343aSmrglt_simple_compile_test_code="class foo {}" 11474ba6a1819Smrg 11475fe4c343aSmrg# Code to be used in simple link tests 11476fe4c343aSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11477ba6a1819Smrg 11478fe4c343aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11479fe4c343aSmrg_LT_TAG_COMPILER 11480ba6a1819Smrg 11481fe4c343aSmrg# save warnings/boilerplate of simple test code 11482fe4c343aSmrg_LT_COMPILER_BOILERPLATE 11483fe4c343aSmrg_LT_LINKER_BOILERPLATE 11484ba6a1819Smrg 11485fe4c343aSmrg# Allow CC to be a program name with arguments. 11486fe4c343aSmrglt_save_CC=$CC 11487fe4c343aSmrglt_save_CFLAGS=$CFLAGS 11488fe4c343aSmrglt_save_GCC=$GCC 11489fe4c343aSmrgGCC=yes 11490fe4c343aSmrgCC=${GCJ-"gcj"} 11491fe4c343aSmrgCFLAGS=$GCJFLAGS 11492fe4c343aSmrgcompiler=$CC 11493fe4c343aSmrg_LT_TAGVAR(compiler, $1)=$CC 11494fe4c343aSmrg_LT_TAGVAR(LD, $1)=$LD 11495fe4c343aSmrg_LT_CC_BASENAME([$compiler]) 114961bedbe3fSmrg 11497fe4c343aSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 11498fe4c343aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11499ba6a1819Smrg 11500fe4c343aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11501fe4c343aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11502fe4c343aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11503ba6a1819Smrg 11504fe4c343aSmrgif test -n "$compiler"; then 11505fe4c343aSmrg _LT_COMPILER_NO_RTTI($1) 11506fe4c343aSmrg _LT_COMPILER_PIC($1) 11507fe4c343aSmrg _LT_COMPILER_C_O($1) 11508fe4c343aSmrg _LT_COMPILER_FILE_LOCKS($1) 11509fe4c343aSmrg _LT_LINKER_SHLIBS($1) 11510fe4c343aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 115111bedbe3fSmrg 11512fe4c343aSmrg _LT_CONFIG($1) 115131bedbe3fSmrgfi 11514ba6a1819Smrg 11515fe4c343aSmrgAC_LANG_RESTORE 11516ba6a1819Smrg 11517fe4c343aSmrgGCC=$lt_save_GCC 11518fe4c343aSmrgCC=$lt_save_CC 11519fe4c343aSmrgCFLAGS=$lt_save_CFLAGS 11520fe4c343aSmrg])# _LT_LANG_GCJ_CONFIG 11521ba6a1819Smrg 11522ba6a1819Smrg 11523fe4c343aSmrg# _LT_LANG_GO_CONFIG([TAG]) 11524fe4c343aSmrg# -------------------------- 11525fe4c343aSmrg# Ensure that the configuration variables for the GNU Go compiler 11526fe4c343aSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11527fe4c343aSmrg# to write the compiler configuration to 'libtool'. 11528fe4c343aSmrgm4_defun([_LT_LANG_GO_CONFIG], 11529fe4c343aSmrg[AC_REQUIRE([LT_PROG_GO])dnl 11530fe4c343aSmrgAC_LANG_SAVE 11531ba6a1819Smrg 11532fe4c343aSmrg# Source file extension for Go test sources. 11533fe4c343aSmrgac_ext=go 11534fe4c343aSmrg 11535fe4c343aSmrg# Object file extension for compiled Go test sources. 11536fe4c343aSmrgobjext=o 11537fe4c343aSmrg_LT_TAGVAR(objext, $1)=$objext 11538fe4c343aSmrg 11539fe4c343aSmrg# Code to be used in simple compile tests 11540fe4c343aSmrglt_simple_compile_test_code="package main; func main() { }" 11541fe4c343aSmrg 11542fe4c343aSmrg# Code to be used in simple link tests 11543fe4c343aSmrglt_simple_link_test_code='package main; func main() { }' 11544fe4c343aSmrg 11545fe4c343aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11546fe4c343aSmrg_LT_TAG_COMPILER 11547fe4c343aSmrg 11548fe4c343aSmrg# save warnings/boilerplate of simple test code 11549fe4c343aSmrg_LT_COMPILER_BOILERPLATE 11550fe4c343aSmrg_LT_LINKER_BOILERPLATE 11551fe4c343aSmrg 11552fe4c343aSmrg# Allow CC to be a program name with arguments. 11553fe4c343aSmrglt_save_CC=$CC 11554fe4c343aSmrglt_save_CFLAGS=$CFLAGS 11555fe4c343aSmrglt_save_GCC=$GCC 11556fe4c343aSmrgGCC=yes 11557fe4c343aSmrgCC=${GOC-"gccgo"} 11558fe4c343aSmrgCFLAGS=$GOFLAGS 11559fe4c343aSmrgcompiler=$CC 11560fe4c343aSmrg_LT_TAGVAR(compiler, $1)=$CC 11561fe4c343aSmrg_LT_TAGVAR(LD, $1)=$LD 11562fe4c343aSmrg_LT_CC_BASENAME([$compiler]) 11563fe4c343aSmrg 11564fe4c343aSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 11565fe4c343aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11566fe4c343aSmrg 11567fe4c343aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11568fe4c343aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11569fe4c343aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11570fe4c343aSmrg 11571fe4c343aSmrgif test -n "$compiler"; then 11572fe4c343aSmrg _LT_COMPILER_NO_RTTI($1) 11573fe4c343aSmrg _LT_COMPILER_PIC($1) 11574fe4c343aSmrg _LT_COMPILER_C_O($1) 11575fe4c343aSmrg _LT_COMPILER_FILE_LOCKS($1) 11576fe4c343aSmrg _LT_LINKER_SHLIBS($1) 11577fe4c343aSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 115786af7124fSmrg 11579fe4c343aSmrg _LT_CONFIG($1) 115806af7124fSmrgfi 115816af7124fSmrg 11582fe4c343aSmrgAC_LANG_RESTORE 11583ba6a1819Smrg 11584fe4c343aSmrgGCC=$lt_save_GCC 11585fe4c343aSmrgCC=$lt_save_CC 11586fe4c343aSmrgCFLAGS=$lt_save_CFLAGS 11587fe4c343aSmrg])# _LT_LANG_GO_CONFIG 11588ba6a1819Smrg 11589ba6a1819Smrg 11590fe4c343aSmrg# _LT_LANG_RC_CONFIG([TAG]) 11591fe4c343aSmrg# ------------------------- 11592fe4c343aSmrg# Ensure that the configuration variables for the Windows resource compiler 11593fe4c343aSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 11594fe4c343aSmrg# to write the compiler configuration to 'libtool'. 11595fe4c343aSmrgm4_defun([_LT_LANG_RC_CONFIG], 11596fe4c343aSmrg[AC_REQUIRE([LT_PROG_RC])dnl 11597fe4c343aSmrgAC_LANG_SAVE 11598ba6a1819Smrg 11599fe4c343aSmrg# Source file extension for RC test sources. 11600fe4c343aSmrgac_ext=rc 11601ba6a1819Smrg 11602fe4c343aSmrg# Object file extension for compiled RC test sources. 11603fe4c343aSmrgobjext=o 11604fe4c343aSmrg_LT_TAGVAR(objext, $1)=$objext 11605ba6a1819Smrg 11606fe4c343aSmrg# Code to be used in simple compile tests 11607fe4c343aSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11608ba6a1819Smrg 11609fe4c343aSmrg# Code to be used in simple link tests 11610fe4c343aSmrglt_simple_link_test_code=$lt_simple_compile_test_code 11611fe4c343aSmrg 11612fe4c343aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 11613fe4c343aSmrg_LT_TAG_COMPILER 11614fe4c343aSmrg 11615fe4c343aSmrg# save warnings/boilerplate of simple test code 11616fe4c343aSmrg_LT_COMPILER_BOILERPLATE 11617fe4c343aSmrg_LT_LINKER_BOILERPLATE 11618fe4c343aSmrg 11619fe4c343aSmrg# Allow CC to be a program name with arguments. 11620fe4c343aSmrglt_save_CC=$CC 11621fe4c343aSmrglt_save_CFLAGS=$CFLAGS 11622fe4c343aSmrglt_save_GCC=$GCC 11623fe4c343aSmrgGCC= 11624fe4c343aSmrgCC=${RC-"windres"} 11625fe4c343aSmrgCFLAGS= 11626fe4c343aSmrgcompiler=$CC 11627fe4c343aSmrg_LT_TAGVAR(compiler, $1)=$CC 11628fe4c343aSmrg_LT_CC_BASENAME([$compiler]) 11629fe4c343aSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11630fe4c343aSmrg 11631fe4c343aSmrgif test -n "$compiler"; then 11632fe4c343aSmrg : 11633fe4c343aSmrg _LT_CONFIG($1) 116341bedbe3fSmrgfi 11635ba6a1819Smrg 11636fe4c343aSmrgGCC=$lt_save_GCC 11637fe4c343aSmrgAC_LANG_RESTORE 11638fe4c343aSmrgCC=$lt_save_CC 11639fe4c343aSmrgCFLAGS=$lt_save_CFLAGS 11640fe4c343aSmrg])# _LT_LANG_RC_CONFIG 11641ba6a1819Smrg 116426af7124fSmrg 11643fe4c343aSmrg# LT_PROG_GCJ 11644fe4c343aSmrg# ----------- 11645fe4c343aSmrgAC_DEFUN([LT_PROG_GCJ], 11646fe4c343aSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 11647fe4c343aSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 11648fe4c343aSmrg [AC_CHECK_TOOL(GCJ, gcj,) 11649fe4c343aSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 11650fe4c343aSmrg AC_SUBST(GCJFLAGS)])])[]dnl 11651fe4c343aSmrg]) 11652fe4c343aSmrg 11653fe4c343aSmrg# Old name: 11654fe4c343aSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 11655fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 11656fe4c343aSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 116576af7124fSmrg 11658ba6a1819Smrg 11659fe4c343aSmrg# LT_PROG_GO 11660fe4c343aSmrg# ---------- 11661fe4c343aSmrgAC_DEFUN([LT_PROG_GO], 11662fe4c343aSmrg[AC_CHECK_TOOL(GOC, gccgo,) 11663fe4c343aSmrg]) 11664ba6a1819Smrg 11665ba6a1819Smrg 11666fe4c343aSmrg# LT_PROG_RC 11667fe4c343aSmrg# ---------- 11668fe4c343aSmrgAC_DEFUN([LT_PROG_RC], 11669fe4c343aSmrg[AC_CHECK_TOOL(RC, windres,) 11670fe4c343aSmrg]) 11671549e21daSmrg 11672fe4c343aSmrg# Old name: 11673fe4c343aSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 11674fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 11675fe4c343aSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 11676ba6a1819Smrg 116771bedbe3fSmrg 11678fe4c343aSmrg# _LT_DECL_EGREP 11679fe4c343aSmrg# -------------- 11680fe4c343aSmrg# If we don't have a new enough Autoconf to choose the best grep 11681fe4c343aSmrg# available, choose the one first in the user's PATH. 11682fe4c343aSmrgm4_defun([_LT_DECL_EGREP], 11683fe4c343aSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 11684fe4c343aSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 11685fe4c343aSmrgtest -z "$GREP" && GREP=grep 11686fe4c343aSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 11687fe4c343aSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 11688fe4c343aSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 11689fe4c343aSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 11690fe4c343aSmrgAC_SUBST([GREP]) 11691fe4c343aSmrg]) 11692fe4c343aSmrg 116931bedbe3fSmrg 11694fe4c343aSmrg# _LT_DECL_OBJDUMP 11695fe4c343aSmrg# -------------- 11696fe4c343aSmrg# If we don't have a new enough Autoconf to choose the best objdump 11697fe4c343aSmrg# available, choose the one first in the user's PATH. 11698fe4c343aSmrgm4_defun([_LT_DECL_OBJDUMP], 11699fe4c343aSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 11700fe4c343aSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 11701fe4c343aSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 11702fe4c343aSmrgAC_SUBST([OBJDUMP]) 11703fe4c343aSmrg]) 117041bedbe3fSmrg 11705fe4c343aSmrg# _LT_DECL_DLLTOOL 11706fe4c343aSmrg# ---------------- 11707fe4c343aSmrg# Ensure DLLTOOL variable is set. 11708fe4c343aSmrgm4_defun([_LT_DECL_DLLTOOL], 11709fe4c343aSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 11710fe4c343aSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 11711fe4c343aSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 11712fe4c343aSmrgAC_SUBST([DLLTOOL]) 11713fe4c343aSmrg]) 11714ba6a1819Smrg 11715da1f2d5dSmrg# _LT_DECL_FILECMD 11716da1f2d5dSmrg# ---------------- 11717da1f2d5dSmrg# Check for a file(cmd) program that can be used to detect file type and magic 11718da1f2d5dSmrgm4_defun([_LT_DECL_FILECMD], 11719da1f2d5dSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 11720da1f2d5dSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 11721da1f2d5dSmrg])# _LD_DECL_FILECMD 11722da1f2d5dSmrg 11723fe4c343aSmrg# _LT_DECL_SED 11724fe4c343aSmrg# ------------ 11725fe4c343aSmrg# Check for a fully-functional sed program, that truncates 11726fe4c343aSmrg# as few characters as possible. Prefer GNU sed if found. 11727fe4c343aSmrgm4_defun([_LT_DECL_SED], 11728fe4c343aSmrg[AC_PROG_SED 11729fe4c343aSmrgtest -z "$SED" && SED=sed 11730fe4c343aSmrgXsed="$SED -e 1s/^X//" 11731fe4c343aSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 11732fe4c343aSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 11733fe4c343aSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 11734fe4c343aSmrg])# _LT_DECL_SED 11735ba6a1819Smrg 11736fe4c343aSmrgm4_ifndef([AC_PROG_SED], [ 11737fe4c343aSmrg# NOTE: This macro has been submitted for inclusion into # 11738fe4c343aSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 11739fe4c343aSmrg# a released version of Autoconf we should remove this # 11740fe4c343aSmrg# macro and use it instead. # 11741ba6a1819Smrg 11742fe4c343aSmrgm4_defun([AC_PROG_SED], 11743fe4c343aSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 11744fe4c343aSmrgAC_CACHE_VAL(lt_cv_path_SED, 11745fe4c343aSmrg[# Loop through the user's path and test for sed and gsed. 11746fe4c343aSmrg# Then use that list of sed's as ones to test for truncation. 11747fe4c343aSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 11748fe4c343aSmrgfor as_dir in $PATH 11749fe4c343aSmrgdo 11750fe4c343aSmrg IFS=$as_save_IFS 11751fe4c343aSmrg test -z "$as_dir" && as_dir=. 11752fe4c343aSmrg for lt_ac_prog in sed gsed; do 11753fe4c343aSmrg for ac_exec_ext in '' $ac_executable_extensions; do 11754fe4c343aSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 11755fe4c343aSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11756fe4c343aSmrg fi 11757fe4c343aSmrg done 11758fe4c343aSmrg done 11759fe4c343aSmrgdone 11760fe4c343aSmrgIFS=$as_save_IFS 11761fe4c343aSmrglt_ac_max=0 11762fe4c343aSmrglt_ac_count=0 11763fe4c343aSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 11764fe4c343aSmrg# along with /bin/sed that truncates output. 11765fe4c343aSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 11766fe4c343aSmrg test ! -f "$lt_ac_sed" && continue 11767fe4c343aSmrg cat /dev/null > conftest.in 11768fe4c343aSmrg lt_ac_count=0 11769fe4c343aSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 11770fe4c343aSmrg # Check for GNU sed and select it if it is found. 11771fe4c343aSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 11772fe4c343aSmrg lt_cv_path_SED=$lt_ac_sed 11773fe4c343aSmrg break 117741bedbe3fSmrg fi 11775fe4c343aSmrg while true; do 11776fe4c343aSmrg cat conftest.in conftest.in >conftest.tmp 11777fe4c343aSmrg mv conftest.tmp conftest.in 11778fe4c343aSmrg cp conftest.in conftest.nl 11779fe4c343aSmrg echo >>conftest.nl 11780fe4c343aSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 11781fe4c343aSmrg cmp -s conftest.out conftest.nl || break 11782fe4c343aSmrg # 10000 chars as input seems more than enough 11783fe4c343aSmrg test 10 -lt "$lt_ac_count" && break 11784fe4c343aSmrg lt_ac_count=`expr $lt_ac_count + 1` 11785fe4c343aSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 11786fe4c343aSmrg lt_ac_max=$lt_ac_count 11787fe4c343aSmrg lt_cv_path_SED=$lt_ac_sed 11788fe4c343aSmrg fi 11789fe4c343aSmrg done 11790fe4c343aSmrgdone 11791fe4c343aSmrg]) 11792fe4c343aSmrgSED=$lt_cv_path_SED 11793fe4c343aSmrgAC_SUBST([SED]) 11794fe4c343aSmrgAC_MSG_RESULT([$SED]) 11795fe4c343aSmrg])#AC_PROG_SED 11796fe4c343aSmrg])#m4_ifndef 11797549e21daSmrg 11798fe4c343aSmrg# Old name: 11799fe4c343aSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 11800fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 11801fe4c343aSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 11802ba6a1819Smrg 11803ba6a1819Smrg 11804fe4c343aSmrg# _LT_CHECK_SHELL_FEATURES 11805fe4c343aSmrg# ------------------------ 11806fe4c343aSmrg# Find out whether the shell is Bourne or XSI compatible, 11807fe4c343aSmrg# or has some other useful features. 11808fe4c343aSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 11809fe4c343aSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 11810fe4c343aSmrg lt_unset=unset 118111bedbe3fSmrgelse 11812fe4c343aSmrg lt_unset=false 118131bedbe3fSmrgfi 11814fe4c343aSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 11815549e21daSmrg 11816fe4c343aSmrg# test EBCDIC or ASCII 11817fe4c343aSmrgcase `echo X|tr X '\101'` in 11818fe4c343aSmrg A) # ASCII based system 11819fe4c343aSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 11820fe4c343aSmrg lt_SP2NL='tr \040 \012' 11821fe4c343aSmrg lt_NL2SP='tr \015\012 \040\040' 11822fe4c343aSmrg ;; 11823fe4c343aSmrg *) # EBCDIC based system 11824fe4c343aSmrg lt_SP2NL='tr \100 \n' 11825fe4c343aSmrg lt_NL2SP='tr \r\n \100\100' 11826fe4c343aSmrg ;; 11827fe4c343aSmrgesac 11828fe4c343aSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 11829fe4c343aSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 11830fe4c343aSmrg])# _LT_CHECK_SHELL_FEATURES 11831549e21daSmrg 11832549e21daSmrg 11833fe4c343aSmrg# _LT_PATH_CONVERSION_FUNCTIONS 11834fe4c343aSmrg# ----------------------------- 11835fe4c343aSmrg# Determine what file name conversion functions should be used by 11836fe4c343aSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 11837fe4c343aSmrg# for certain cross-compile configurations and native mingw. 11838fe4c343aSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 11839fe4c343aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11840fe4c343aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11841fe4c343aSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 11842fe4c343aSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 11843fe4c343aSmrg[case $host in 11844fe4c343aSmrg *-*-mingw* ) 11845fe4c343aSmrg case $build in 11846fe4c343aSmrg *-*-mingw* ) # actually msys 11847fe4c343aSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 118481bedbe3fSmrg ;; 11849fe4c343aSmrg *-*-cygwin* ) 11850fe4c343aSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 118511bedbe3fSmrg ;; 11852fe4c343aSmrg * ) # otherwise, assume *nix 11853fe4c343aSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 118541bedbe3fSmrg ;; 11855fe4c343aSmrg esac 11856fe4c343aSmrg ;; 11857fe4c343aSmrg *-*-cygwin* ) 11858fe4c343aSmrg case $build in 11859fe4c343aSmrg *-*-mingw* ) # actually msys 11860fe4c343aSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 11861fe4c343aSmrg ;; 11862fe4c343aSmrg *-*-cygwin* ) 11863fe4c343aSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 11864fe4c343aSmrg ;; 11865fe4c343aSmrg * ) # otherwise, assume *nix 11866fe4c343aSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 118671bedbe3fSmrg ;; 11868fe4c343aSmrg esac 11869fe4c343aSmrg ;; 11870fe4c343aSmrg * ) # unhandled hosts (and "normal" native builds) 11871fe4c343aSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 11872fe4c343aSmrg ;; 118731bedbe3fSmrgesac 11874fe4c343aSmrg]) 11875fe4c343aSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 11876fe4c343aSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 11877fe4c343aSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 11878fe4c343aSmrg [0], [convert $build file names to $host format])dnl 11879549e21daSmrg 11880fe4c343aSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 11881fe4c343aSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 11882fe4c343aSmrg[#assume ordinary cross tools, or native build. 11883fe4c343aSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 11884fe4c343aSmrgcase $host in 11885fe4c343aSmrg *-*-mingw* ) 11886fe4c343aSmrg case $build in 11887fe4c343aSmrg *-*-mingw* ) # actually msys 11888fe4c343aSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 11889fe4c343aSmrg ;; 11890fe4c343aSmrg esac 11891fe4c343aSmrg ;; 11892fe4c343aSmrgesac 11893fe4c343aSmrg]) 11894fe4c343aSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 11895fe4c343aSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 11896fe4c343aSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 11897fe4c343aSmrg [0], [convert $build files to toolchain format])dnl 11898fe4c343aSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 11899ba6a1819Smrg 11900fe4c343aSmrg# Helper functions for option handling. -*- Autoconf -*- 119011bedbe3fSmrg# 11902da1f2d5dSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 11903da1f2d5dSmrg# Software Foundation, Inc. 11904fe4c343aSmrg# Written by Gary V. Vaughan, 2004 11905fe4c343aSmrg# 11906fe4c343aSmrg# This file is free software; the Free Software Foundation gives 11907fe4c343aSmrg# unlimited permission to copy and/or distribute it, with or without 11908fe4c343aSmrg# modifications, as long as this notice is preserved. 11909ba6a1819Smrg 11910fe4c343aSmrg# serial 8 ltoptions.m4 11911ba6a1819Smrg 11912fe4c343aSmrg# This is to help aclocal find these macros, as it can't see m4_define. 11913fe4c343aSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 11914ba6a1819Smrg 11915ba6a1819Smrg 11916fe4c343aSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 11917fe4c343aSmrg# ------------------------------------------ 11918fe4c343aSmrgm4_define([_LT_MANGLE_OPTION], 11919fe4c343aSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 11920fe4c343aSmrg 11921fe4c343aSmrg 11922fe4c343aSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 11923fe4c343aSmrg# --------------------------------------- 11924fe4c343aSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 11925fe4c343aSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 11926fe4c343aSmrg# saved as a flag. 11927fe4c343aSmrgm4_define([_LT_SET_OPTION], 11928fe4c343aSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 11929fe4c343aSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 11930fe4c343aSmrg _LT_MANGLE_DEFUN([$1], [$2]), 11931fe4c343aSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 11932fe4c343aSmrg]) 11933fe4c343aSmrg 11934fe4c343aSmrg 11935fe4c343aSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 11936fe4c343aSmrg# ------------------------------------------------------------ 11937fe4c343aSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11938fe4c343aSmrgm4_define([_LT_IF_OPTION], 11939fe4c343aSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 11940fe4c343aSmrg 11941fe4c343aSmrg 11942fe4c343aSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 11943fe4c343aSmrg# ------------------------------------------------------- 11944fe4c343aSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 11945fe4c343aSmrg# are set. 11946fe4c343aSmrgm4_define([_LT_UNLESS_OPTIONS], 11947fe4c343aSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11948fe4c343aSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 11949fe4c343aSmrg [m4_define([$0_found])])])[]dnl 11950fe4c343aSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 11951fe4c343aSmrg])[]dnl 11952fe4c343aSmrg]) 11953fe4c343aSmrg 11954fe4c343aSmrg 11955fe4c343aSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 11956fe4c343aSmrg# ---------------------------------------- 11957fe4c343aSmrg# OPTION-LIST is a space-separated list of Libtool options associated 11958fe4c343aSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 11959fe4c343aSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 11960fe4c343aSmrg# the unknown option and exit. 11961fe4c343aSmrgm4_defun([_LT_SET_OPTIONS], 11962fe4c343aSmrg[# Set options 11963fe4c343aSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 11964fe4c343aSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 11965fe4c343aSmrg 11966fe4c343aSmrgm4_if([$1],[LT_INIT],[ 11967fe4c343aSmrg dnl 11968fe4c343aSmrg dnl Simply set some default values (i.e off) if boolean options were not 11969fe4c343aSmrg dnl specified: 11970fe4c343aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 11971fe4c343aSmrg ]) 11972fe4c343aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 11973fe4c343aSmrg ]) 11974fe4c343aSmrg dnl 11975fe4c343aSmrg dnl If no reference was made to various pairs of opposing options, then 11976fe4c343aSmrg dnl we run the default mode handler for the pair. For example, if neither 11977fe4c343aSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 11978fe4c343aSmrg dnl archives by default: 11979fe4c343aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 11980fe4c343aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 11981fe4c343aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 11982fe4c343aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 11983fe4c343aSmrg [_LT_ENABLE_FAST_INSTALL]) 11984fe4c343aSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 11985fe4c343aSmrg [_LT_WITH_AIX_SONAME([aix])]) 11986fe4c343aSmrg ]) 11987fe4c343aSmrg])# _LT_SET_OPTIONS 11988fe4c343aSmrg 11989fe4c343aSmrg 11990fe4c343aSmrg 11991fe4c343aSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 11992fe4c343aSmrg# ----------------------------------------- 11993fe4c343aSmrgm4_define([_LT_MANGLE_DEFUN], 11994fe4c343aSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11995fe4c343aSmrg 11996fe4c343aSmrg 11997fe4c343aSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 11998fe4c343aSmrg# ----------------------------------------------- 11999fe4c343aSmrgm4_define([LT_OPTION_DEFINE], 12000fe4c343aSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 12001fe4c343aSmrg])# LT_OPTION_DEFINE 12002fe4c343aSmrg 12003fe4c343aSmrg 12004fe4c343aSmrg# dlopen 12005fe4c343aSmrg# ------ 12006fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 12007fe4c343aSmrg]) 12008fe4c343aSmrg 12009fe4c343aSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 12010fe4c343aSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 12011fe4c343aSmrgAC_DIAGNOSE([obsolete], 12012fe4c343aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12013fe4c343aSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 12014fe4c343aSmrg]) 12015fe4c343aSmrg 12016fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 12017fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 12018ba6a1819Smrg 12019ba6a1819Smrg 12020fe4c343aSmrg# win32-dll 12021fe4c343aSmrg# --------- 12022fe4c343aSmrg# Declare package support for building win32 dll's. 12023fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 12024fe4c343aSmrg[enable_win32_dll=yes 12025fe4c343aSmrg 12026fe4c343aSmrgcase $host in 12027fe4c343aSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 12028fe4c343aSmrg AC_CHECK_TOOL(AS, as, false) 12029fe4c343aSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 12030fe4c343aSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 12031fe4c343aSmrg ;; 120321bedbe3fSmrgesac 12033ba6a1819Smrg 12034fe4c343aSmrgtest -z "$AS" && AS=as 12035fe4c343aSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 12036ba6a1819Smrg 12037fe4c343aSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 12038fe4c343aSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 12039ba6a1819Smrg 12040fe4c343aSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 12041fe4c343aSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 12042fe4c343aSmrg])# win32-dll 12043549e21daSmrg 12044fe4c343aSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 12045fe4c343aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 12046fe4c343aSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 12047fe4c343aSmrgAC_DIAGNOSE([obsolete], 12048fe4c343aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12049fe4c343aSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 12050fe4c343aSmrg]) 12051549e21daSmrg 12052fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 12053fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 12054549e21daSmrg 12055549e21daSmrg 12056fe4c343aSmrg# _LT_ENABLE_SHARED([DEFAULT]) 12057fe4c343aSmrg# ---------------------------- 12058fe4c343aSmrg# implement the --enable-shared flag, and supports the 'shared' and 12059fe4c343aSmrg# 'disable-shared' LT_INIT options. 12060fe4c343aSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12061fe4c343aSmrgm4_define([_LT_ENABLE_SHARED], 12062fe4c343aSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 12063fe4c343aSmrgAC_ARG_ENABLE([shared], 12064fe4c343aSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 12065fe4c343aSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 12066fe4c343aSmrg [p=${PACKAGE-default} 12067fe4c343aSmrg case $enableval in 12068fe4c343aSmrg yes) enable_shared=yes ;; 12069fe4c343aSmrg no) enable_shared=no ;; 12070fe4c343aSmrg *) 12071fe4c343aSmrg enable_shared=no 12072fe4c343aSmrg # Look at the argument we got. We use all the common list separators. 12073fe4c343aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12074fe4c343aSmrg for pkg in $enableval; do 12075fe4c343aSmrg IFS=$lt_save_ifs 12076fe4c343aSmrg if test "X$pkg" = "X$p"; then 12077fe4c343aSmrg enable_shared=yes 12078fe4c343aSmrg fi 12079fe4c343aSmrg done 12080fe4c343aSmrg IFS=$lt_save_ifs 12081fe4c343aSmrg ;; 12082fe4c343aSmrg esac], 12083fe4c343aSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 12084549e21daSmrg 12085fe4c343aSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 12086fe4c343aSmrg [Whether or not to build shared libraries]) 12087fe4c343aSmrg])# _LT_ENABLE_SHARED 12088549e21daSmrg 12089fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 12090fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 12091549e21daSmrg 12092fe4c343aSmrg# Old names: 12093fe4c343aSmrgAC_DEFUN([AC_ENABLE_SHARED], 12094fe4c343aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 12095fe4c343aSmrg]) 12096549e21daSmrg 12097fe4c343aSmrgAC_DEFUN([AC_DISABLE_SHARED], 12098fe4c343aSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 12099fe4c343aSmrg]) 121001bedbe3fSmrg 12101fe4c343aSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 12102fe4c343aSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 121031bedbe3fSmrg 12104fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 12105fe4c343aSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 12106fe4c343aSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 12107549e21daSmrg 121081bedbe3fSmrg 12109549e21daSmrg 12110fe4c343aSmrg# _LT_ENABLE_STATIC([DEFAULT]) 12111fe4c343aSmrg# ---------------------------- 12112fe4c343aSmrg# implement the --enable-static flag, and support the 'static' and 12113fe4c343aSmrg# 'disable-static' LT_INIT options. 12114fe4c343aSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12115fe4c343aSmrgm4_define([_LT_ENABLE_STATIC], 12116fe4c343aSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 12117fe4c343aSmrgAC_ARG_ENABLE([static], 12118fe4c343aSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 12119fe4c343aSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 12120fe4c343aSmrg [p=${PACKAGE-default} 12121fe4c343aSmrg case $enableval in 12122fe4c343aSmrg yes) enable_static=yes ;; 12123fe4c343aSmrg no) enable_static=no ;; 12124fe4c343aSmrg *) 12125fe4c343aSmrg enable_static=no 12126fe4c343aSmrg # Look at the argument we got. We use all the common list separators. 12127fe4c343aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12128fe4c343aSmrg for pkg in $enableval; do 12129fe4c343aSmrg IFS=$lt_save_ifs 12130fe4c343aSmrg if test "X$pkg" = "X$p"; then 12131fe4c343aSmrg enable_static=yes 12132fe4c343aSmrg fi 12133fe4c343aSmrg done 12134fe4c343aSmrg IFS=$lt_save_ifs 12135fe4c343aSmrg ;; 12136fe4c343aSmrg esac], 12137fe4c343aSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 12138fe4c343aSmrg 12139fe4c343aSmrg _LT_DECL([build_old_libs], [enable_static], [0], 12140fe4c343aSmrg [Whether or not to build static libraries]) 12141fe4c343aSmrg])# _LT_ENABLE_STATIC 12142fe4c343aSmrg 12143fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 12144fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 12145fe4c343aSmrg 12146fe4c343aSmrg# Old names: 12147fe4c343aSmrgAC_DEFUN([AC_ENABLE_STATIC], 12148fe4c343aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 12149fe4c343aSmrg]) 12150549e21daSmrg 12151fe4c343aSmrgAC_DEFUN([AC_DISABLE_STATIC], 12152fe4c343aSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 12153fe4c343aSmrg]) 121541bedbe3fSmrg 12155fe4c343aSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 12156fe4c343aSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 121571bedbe3fSmrg 12158fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 12159fe4c343aSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 12160fe4c343aSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 121611bedbe3fSmrg 121621bedbe3fSmrg 121631bedbe3fSmrg 12164fe4c343aSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 12165fe4c343aSmrg# ---------------------------------- 12166fe4c343aSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 12167fe4c343aSmrg# and 'disable-fast-install' LT_INIT options. 12168fe4c343aSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 12169fe4c343aSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 12170fe4c343aSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 12171fe4c343aSmrgAC_ARG_ENABLE([fast-install], 12172fe4c343aSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 12173fe4c343aSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 12174fe4c343aSmrg [p=${PACKAGE-default} 12175fe4c343aSmrg case $enableval in 12176fe4c343aSmrg yes) enable_fast_install=yes ;; 12177fe4c343aSmrg no) enable_fast_install=no ;; 12178fe4c343aSmrg *) 12179fe4c343aSmrg enable_fast_install=no 12180fe4c343aSmrg # Look at the argument we got. We use all the common list separators. 12181fe4c343aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12182fe4c343aSmrg for pkg in $enableval; do 12183fe4c343aSmrg IFS=$lt_save_ifs 12184fe4c343aSmrg if test "X$pkg" = "X$p"; then 12185fe4c343aSmrg enable_fast_install=yes 121861bedbe3fSmrg fi 12187fe4c343aSmrg done 12188fe4c343aSmrg IFS=$lt_save_ifs 12189fe4c343aSmrg ;; 12190fe4c343aSmrg esac], 12191fe4c343aSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12192fe4c343aSmrg 12193fe4c343aSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 12194fe4c343aSmrg [Whether or not to optimize for fast installation])dnl 12195fe4c343aSmrg])# _LT_ENABLE_FAST_INSTALL 12196fe4c343aSmrg 12197fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 12198fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12199fe4c343aSmrg 12200fe4c343aSmrg# Old names: 12201fe4c343aSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 12202fe4c343aSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 12203fe4c343aSmrgAC_DIAGNOSE([obsolete], 12204fe4c343aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12205fe4c343aSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 122061bedbe3fSmrg]) 12207549e21daSmrg 12208fe4c343aSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 12209fe4c343aSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 12210fe4c343aSmrgAC_DIAGNOSE([obsolete], 12211fe4c343aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 12212fe4c343aSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 12213fe4c343aSmrg]) 122141bedbe3fSmrg 12215fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 12216fe4c343aSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 12217fe4c343aSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 122181bedbe3fSmrg 12219549e21daSmrg 12220fe4c343aSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 12221fe4c343aSmrg# ---------------------------------- 12222fe4c343aSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 12223fe4c343aSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 12224fe4c343aSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 12225fe4c343aSmrgm4_define([_LT_WITH_AIX_SONAME], 12226fe4c343aSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 12227fe4c343aSmrgshared_archive_member_spec= 12228fe4c343aSmrgcase $host,$enable_shared in 12229fe4c343aSmrgpower*-*-aix[[5-9]]*,yes) 12230fe4c343aSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 12231fe4c343aSmrg AC_ARG_WITH([aix-soname], 12232fe4c343aSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 12233fe4c343aSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 12234fe4c343aSmrg [case $withval in 12235fe4c343aSmrg aix|svr4|both) 12236fe4c343aSmrg ;; 12237fe4c343aSmrg *) 12238fe4c343aSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 12239fe4c343aSmrg ;; 12240fe4c343aSmrg esac 12241fe4c343aSmrg lt_cv_with_aix_soname=$with_aix_soname], 12242fe4c343aSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 12243fe4c343aSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 12244fe4c343aSmrg with_aix_soname=$lt_cv_with_aix_soname]) 12245fe4c343aSmrg AC_MSG_RESULT([$with_aix_soname]) 12246fe4c343aSmrg if test aix != "$with_aix_soname"; then 12247fe4c343aSmrg # For the AIX way of multilib, we name the shared archive member 12248fe4c343aSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 12249fe4c343aSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 12250fe4c343aSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 12251fe4c343aSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 12252fe4c343aSmrg if test 64 = "${OBJECT_MODE-32}"; then 12253fe4c343aSmrg shared_archive_member_spec=shr_64 12254fe4c343aSmrg else 12255fe4c343aSmrg shared_archive_member_spec=shr 12256fe4c343aSmrg fi 12257fe4c343aSmrg fi 12258fe4c343aSmrg ;; 12259fe4c343aSmrg*) 12260fe4c343aSmrg with_aix_soname=aix 12261fe4c343aSmrg ;; 12262fe4c343aSmrgesac 122631bedbe3fSmrg 12264fe4c343aSmrg_LT_DECL([], [shared_archive_member_spec], [0], 12265fe4c343aSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 12266fe4c343aSmrg])# _LT_WITH_AIX_SONAME 12267549e21daSmrg 12268fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 12269fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 12270fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 122711bedbe3fSmrg 122721bedbe3fSmrg 12273fe4c343aSmrg# _LT_WITH_PIC([MODE]) 12274fe4c343aSmrg# -------------------- 12275fe4c343aSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 12276fe4c343aSmrg# LT_INIT options. 12277fe4c343aSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 12278fe4c343aSmrgm4_define([_LT_WITH_PIC], 12279fe4c343aSmrg[AC_ARG_WITH([pic], 12280fe4c343aSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 12281fe4c343aSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 12282fe4c343aSmrg [lt_p=${PACKAGE-default} 12283fe4c343aSmrg case $withval in 12284fe4c343aSmrg yes|no) pic_mode=$withval ;; 12285fe4c343aSmrg *) 12286fe4c343aSmrg pic_mode=default 12287fe4c343aSmrg # Look at the argument we got. We use all the common list separators. 12288fe4c343aSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 12289fe4c343aSmrg for lt_pkg in $withval; do 12290fe4c343aSmrg IFS=$lt_save_ifs 12291fe4c343aSmrg if test "X$lt_pkg" = "X$lt_p"; then 12292fe4c343aSmrg pic_mode=yes 12293fe4c343aSmrg fi 12294fe4c343aSmrg done 12295fe4c343aSmrg IFS=$lt_save_ifs 12296fe4c343aSmrg ;; 12297fe4c343aSmrg esac], 12298fe4c343aSmrg [pic_mode=m4_default([$1], [default])]) 122991bedbe3fSmrg 12300fe4c343aSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 12301fe4c343aSmrg])# _LT_WITH_PIC 12302549e21daSmrg 12303fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 12304fe4c343aSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12305549e21daSmrg 12306fe4c343aSmrg# Old name: 12307fe4c343aSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 12308fe4c343aSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 12309fe4c343aSmrgAC_DIAGNOSE([obsolete], 12310fe4c343aSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 12311fe4c343aSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 12312fe4c343aSmrg]) 12313549e21daSmrg 12314fe4c343aSmrgdnl aclocal-1.4 backwards compatibility: 12315fe4c343aSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12316fe4c343aSmrg 12317fe4c343aSmrg 12318fe4c343aSmrgm4_define([_LTDL_MODE], []) 12319fe4c343aSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 12320fe4c343aSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 12321fe4c343aSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 12322fe4c343aSmrg [m4_define([_LTDL_MODE], [recursive])]) 12323fe4c343aSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 12324fe4c343aSmrg [m4_define([_LTDL_MODE], [subproject])]) 12325fe4c343aSmrg 12326fe4c343aSmrgm4_define([_LTDL_TYPE], []) 12327fe4c343aSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 12328fe4c343aSmrg [m4_define([_LTDL_TYPE], [installable])]) 12329fe4c343aSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 12330fe4c343aSmrg [m4_define([_LTDL_TYPE], [convenience])]) 12331fe4c343aSmrg 12332fe4c343aSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 123331bedbe3fSmrg# 12334da1f2d5dSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 12335fe4c343aSmrg# Foundation, Inc. 12336fe4c343aSmrg# Written by Gary V. Vaughan, 2004 123371bedbe3fSmrg# 12338fe4c343aSmrg# This file is free software; the Free Software Foundation gives 12339fe4c343aSmrg# unlimited permission to copy and/or distribute it, with or without 12340fe4c343aSmrg# modifications, as long as this notice is preserved. 12341ba6a1819Smrg 12342fe4c343aSmrg# serial 6 ltsugar.m4 12343549e21daSmrg 12344fe4c343aSmrg# This is to help aclocal find these macros, as it can't see m4_define. 12345fe4c343aSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12346549e21daSmrg 12347549e21daSmrg 12348fe4c343aSmrg# lt_join(SEP, ARG1, [ARG2...]) 12349fe4c343aSmrg# ----------------------------- 12350fe4c343aSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 12351fe4c343aSmrg# associated separator. 12352fe4c343aSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 12353fe4c343aSmrg# versions in m4sugar had bugs. 12354fe4c343aSmrgm4_define([lt_join], 12355fe4c343aSmrg[m4_if([$#], [1], [], 12356fe4c343aSmrg [$#], [2], [[$2]], 12357fe4c343aSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 12358fe4c343aSmrgm4_define([_lt_join], 12359fe4c343aSmrg[m4_if([$#$2], [2], [], 12360fe4c343aSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12361ba6a1819Smrg 12362ba6a1819Smrg 12363fe4c343aSmrg# lt_car(LIST) 12364fe4c343aSmrg# lt_cdr(LIST) 12365fe4c343aSmrg# ------------ 12366fe4c343aSmrg# Manipulate m4 lists. 12367fe4c343aSmrg# These macros are necessary as long as will still need to support 12368fe4c343aSmrg# Autoconf-2.59, which quotes differently. 12369fe4c343aSmrgm4_define([lt_car], [[$1]]) 12370fe4c343aSmrgm4_define([lt_cdr], 12371fe4c343aSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 12372fe4c343aSmrg [$#], 1, [], 12373fe4c343aSmrg [m4_dquote(m4_shift($@))])]) 12374fe4c343aSmrgm4_define([lt_unquote], $1) 12375ba6a1819Smrg 12376fe4c343aSmrg 12377fe4c343aSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 12378fe4c343aSmrg# ------------------------------------------ 12379fe4c343aSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 12380fe4c343aSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 12381fe4c343aSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 12382fe4c343aSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 12383fe4c343aSmrg# than defined and empty). 123841bedbe3fSmrg# 12385fe4c343aSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 12386fe4c343aSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 12387fe4c343aSmrgm4_define([lt_append], 12388fe4c343aSmrg[m4_define([$1], 12389fe4c343aSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12390ba6a1819Smrg 123916af7124fSmrg 12392549e21daSmrg 12393fe4c343aSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 12394fe4c343aSmrg# ---------------------------------------------------------- 12395fe4c343aSmrg# Produce a SEP delimited list of all paired combinations of elements of 12396fe4c343aSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 12397fe4c343aSmrg# has the form PREFIXmINFIXSUFFIXn. 12398fe4c343aSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 12399fe4c343aSmrgm4_define([lt_combine], 12400fe4c343aSmrg[m4_if(m4_eval([$# > 3]), [1], 12401fe4c343aSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 12402fe4c343aSmrg[[m4_foreach([_Lt_prefix], [$2], 12403fe4c343aSmrg [m4_foreach([_Lt_suffix], 12404fe4c343aSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 12405fe4c343aSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 12406ba6a1819Smrg 12407ba6a1819Smrg 12408fe4c343aSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 12409fe4c343aSmrg# ----------------------------------------------------------------------- 12410fe4c343aSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 12411fe4c343aSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 12412fe4c343aSmrgm4_define([lt_if_append_uniq], 12413fe4c343aSmrg[m4_ifdef([$1], 12414fe4c343aSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 12415fe4c343aSmrg [lt_append([$1], [$2], [$3])$4], 12416fe4c343aSmrg [$5])], 12417fe4c343aSmrg [lt_append([$1], [$2], [$3])$4])]) 12418fe4c343aSmrg 12419fe4c343aSmrg 12420fe4c343aSmrg# lt_dict_add(DICT, KEY, VALUE) 12421fe4c343aSmrg# ----------------------------- 12422fe4c343aSmrgm4_define([lt_dict_add], 12423fe4c343aSmrg[m4_define([$1($2)], [$3])]) 12424fe4c343aSmrg 12425fe4c343aSmrg 12426fe4c343aSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 12427fe4c343aSmrg# -------------------------------------------- 12428fe4c343aSmrgm4_define([lt_dict_add_subkey], 12429fe4c343aSmrg[m4_define([$1($2:$3)], [$4])]) 12430fe4c343aSmrg 12431fe4c343aSmrg 12432fe4c343aSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 12433fe4c343aSmrg# ---------------------------------- 12434fe4c343aSmrgm4_define([lt_dict_fetch], 12435fe4c343aSmrg[m4_ifval([$3], 12436fe4c343aSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 12437fe4c343aSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12438fe4c343aSmrg 12439ba6a1819Smrg 12440fe4c343aSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 12441fe4c343aSmrg# ----------------------------------------------------------------- 12442fe4c343aSmrgm4_define([lt_if_dict_fetch], 12443fe4c343aSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 12444fe4c343aSmrg [$5], 12445fe4c343aSmrg [$6])]) 12446ba6a1819Smrg 12447ba6a1819Smrg 12448fe4c343aSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 12449fe4c343aSmrg# -------------------------------------------------------------- 12450fe4c343aSmrgm4_define([lt_dict_filter], 12451fe4c343aSmrg[m4_if([$5], [], [], 12452fe4c343aSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 12453fe4c343aSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 12454fe4c343aSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 12455fe4c343aSmrg]) 12456ba6a1819Smrg 12457fe4c343aSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12458fe4c343aSmrg# 12459da1f2d5dSmrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12460da1f2d5dSmrg# Inc. 12461fe4c343aSmrg# Written by Scott James Remnant, 2004 12462fe4c343aSmrg# 12463fe4c343aSmrg# This file is free software; the Free Software Foundation gives 12464fe4c343aSmrg# unlimited permission to copy and/or distribute it, with or without 12465fe4c343aSmrg# modifications, as long as this notice is preserved. 124666af7124fSmrg 12467fe4c343aSmrg# @configure_input@ 124686af7124fSmrg 12469da1f2d5dSmrg# serial 4245 ltversion.m4 12470fe4c343aSmrg# This file is part of GNU Libtool 12471ba6a1819Smrg 12472da1f2d5dSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12473da1f2d5dSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 12474549e21daSmrg 12475fe4c343aSmrgAC_DEFUN([LTVERSION_VERSION], 12476da1f2d5dSmrg[macro_version='2.4.7' 12477da1f2d5dSmrgmacro_revision='2.4.7' 12478fe4c343aSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12479fe4c343aSmrg_LT_DECL(, macro_revision, 0) 12480fe4c343aSmrg]) 124811bedbe3fSmrg 12482fe4c343aSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 12483fe4c343aSmrg# 12484da1f2d5dSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 12485da1f2d5dSmrg# Software Foundation, Inc. 12486fe4c343aSmrg# Written by Scott James Remnant, 2004. 12487fe4c343aSmrg# 12488fe4c343aSmrg# This file is free software; the Free Software Foundation gives 12489fe4c343aSmrg# unlimited permission to copy and/or distribute it, with or without 12490fe4c343aSmrg# modifications, as long as this notice is preserved. 124911bedbe3fSmrg 12492fe4c343aSmrg# serial 5 lt~obsolete.m4 124931bedbe3fSmrg 12494fe4c343aSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 12495fe4c343aSmrg# 12496fe4c343aSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 12497fe4c343aSmrg# which have later been changed to m4_define as they aren't part of the 12498fe4c343aSmrg# exported API, or moved to Autoconf or Automake where they belong. 12499fe4c343aSmrg# 12500fe4c343aSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 12501fe4c343aSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 12502fe4c343aSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 12503fe4c343aSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 12504fe4c343aSmrg# and doesn't know about Autoconf macros at all.) 12505fe4c343aSmrg# 12506fe4c343aSmrg# So we provide this file, which has a silly filename so it's always 12507fe4c343aSmrg# included after everything else. This provides aclocal with the 12508fe4c343aSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 12509fe4c343aSmrg# because those macros already exist, or will be overwritten later. 12510fe4c343aSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 12511fe4c343aSmrg# 12512fe4c343aSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 12513fe4c343aSmrg# Yes, that means every name once taken will need to remain here until 12514fe4c343aSmrg# we give up compatibility with versions before 1.7, at which point 12515fe4c343aSmrg# we need to keep only those names which we still refer to. 12516549e21daSmrg 12517fe4c343aSmrg# This is to help aclocal find these macros, as it can't see m4_define. 12518fe4c343aSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12519fe4c343aSmrg 12520fe4c343aSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 12521fe4c343aSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 12522fe4c343aSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 12523fe4c343aSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 12524fe4c343aSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 12525fe4c343aSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 12526fe4c343aSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 12527fe4c343aSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 12528fe4c343aSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 12529fe4c343aSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 12530fe4c343aSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 12531fe4c343aSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 12532fe4c343aSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 12533fe4c343aSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 12534fe4c343aSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 12535fe4c343aSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 12536fe4c343aSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 12537fe4c343aSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 12538fe4c343aSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 12539fe4c343aSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 12540fe4c343aSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 12541fe4c343aSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 12542fe4c343aSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 12543fe4c343aSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 12544fe4c343aSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 12545fe4c343aSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 12546fe4c343aSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 12547fe4c343aSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 12548fe4c343aSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 12549fe4c343aSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 12550fe4c343aSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 12551fe4c343aSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 12552fe4c343aSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 12553fe4c343aSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 12554fe4c343aSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 12555fe4c343aSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 12556fe4c343aSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 12557fe4c343aSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 12558fe4c343aSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 12559fe4c343aSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 12560fe4c343aSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 12561fe4c343aSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 12562fe4c343aSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 12563fe4c343aSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 12564fe4c343aSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 12565fe4c343aSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 12566fe4c343aSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 12567fe4c343aSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 12568fe4c343aSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 12569fe4c343aSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 12570fe4c343aSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 12571fe4c343aSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 12572fe4c343aSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 12573fe4c343aSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 12574fe4c343aSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 12575fe4c343aSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 12576fe4c343aSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 12577fe4c343aSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 12578fe4c343aSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 12579fe4c343aSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 12580fe4c343aSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12581ba6a1819Smrg 12582