aclocal.m4 revision ac92798b
1ac92798bSmrg# generated automatically by aclocal 1.14 -*- Autoconf -*- 2ac92798bSmrg 3ac92798bSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4a966c04fSmrg 5a966c04fSmrg# This file is free software; the Free Software Foundation 6a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 7a966c04fSmrg# with or without modifications, as long as this notice is preserved. 8a966c04fSmrg 9a966c04fSmrg# This program is distributed in the hope that it will be useful, 10a966c04fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11a966c04fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12a966c04fSmrg# PARTICULAR PURPOSE. 13a966c04fSmrg 14ac92798bSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 152e2dd055Smrgm4_ifndef([AC_AUTOCONF_VERSION], 162e2dd055Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 176e7d3316Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 186e7d3316Smrg[m4_warning([this file was generated for autoconf 2.68. 192e2dd055SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 202e2dd055SmrgIf you have problems, you may need to regenerate the build system entirely. 21ac92798bSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22a966c04fSmrg 23ac92798bSmrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 24a966c04fSmrg# 25a966c04fSmrg# This file is free software; the Free Software Foundation 26a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 27a966c04fSmrg# with or without modifications, as long as this notice is preserved. 28a966c04fSmrg 29a966c04fSmrg# AM_AUTOMAKE_VERSION(VERSION) 30a966c04fSmrg# ---------------------------- 31a966c04fSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32a966c04fSmrg# generated from the m4 files accompanying Automake X.Y. 33a966c04fSmrg# (This private macro should not be called outside this file.) 34a966c04fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35ac92798bSmrg[am__api_version='1.14' 36a966c04fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37a966c04fSmrgdnl require some minimum version. Point them to the right macro. 38ac92798bSmrgm4_if([$1], [1.14], [], 39a966c04fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40a966c04fSmrg]) 41a966c04fSmrg 42a966c04fSmrg# _AM_AUTOCONF_VERSION(VERSION) 43a966c04fSmrg# ----------------------------- 44a966c04fSmrg# aclocal traces this macro to find the Autoconf version. 45a966c04fSmrg# This is a private macro too. Using m4_define simplifies 46a966c04fSmrg# the logic in aclocal, which can simply ignore this definition. 47a966c04fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48a966c04fSmrg 49a966c04fSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50a966c04fSmrg# ------------------------------- 51a966c04fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 522e2dd055Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53a966c04fSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54ac92798bSmrg[AM_AUTOMAKE_VERSION([1.14])dnl 552e2dd055Smrgm4_ifndef([AC_AUTOCONF_VERSION], 562e2dd055Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 572e2dd055Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58a966c04fSmrg 59a966c04fSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60a966c04fSmrg 61ac92798bSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 62a966c04fSmrg# 63a966c04fSmrg# This file is free software; the Free Software Foundation 64a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 65a966c04fSmrg# with or without modifications, as long as this notice is preserved. 66a966c04fSmrg 67a966c04fSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68ac92798bSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69ac92798bSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70a966c04fSmrg# 71a966c04fSmrg# Of course, Automake must honor this variable whenever it calls a 72a966c04fSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 73a966c04fSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74a966c04fSmrg# depending on how configure is run. This is pretty annoying, since 75a966c04fSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76a966c04fSmrg# source directory, any form will work fine, but in subdirectories a 77a966c04fSmrg# relative path needs to be adjusted first. 78a966c04fSmrg# 79a966c04fSmrg# $ac_aux_dir/missing 80a966c04fSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 81a966c04fSmrg# $top_srcdir/$ac_aux_dir/missing 82a966c04fSmrg# fails if $ac_aux_dir is absolute, 83a966c04fSmrg# fails when called from a subdirectory in a VPATH build with 84a966c04fSmrg# a relative $ac_aux_dir 85a966c04fSmrg# 86a966c04fSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87a966c04fSmrg# are both prefixed by $srcdir. In an in-source build this is usually 88ac92798bSmrg# harmless because $srcdir is '.', but things will broke when you 89a966c04fSmrg# start a VPATH build or use an absolute $srcdir. 90a966c04fSmrg# 91a966c04fSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92a966c04fSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93a966c04fSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94a966c04fSmrg# and then we would define $MISSING as 95a966c04fSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 96a966c04fSmrg# This will work as long as MISSING is not called from configure, because 97a966c04fSmrg# unfortunately $(top_srcdir) has no meaning in configure. 98a966c04fSmrg# However there are other variables, like CC, which are often used in 99a966c04fSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100a966c04fSmrg# 101a966c04fSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 102a966c04fSmrg# absolute PATH. The drawback is that using absolute paths prevent a 103a966c04fSmrg# configured tree to be moved without reconfiguration. 104a966c04fSmrg 105a966c04fSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106a966c04fSmrg[dnl Rely on autoconf to set up CDPATH properly. 107a966c04fSmrgAC_PREREQ([2.50])dnl 108a966c04fSmrg# expand $ac_aux_dir to an absolute path 109a966c04fSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 110a966c04fSmrg]) 111a966c04fSmrg 112a966c04fSmrg# AM_CONDITIONAL -*- Autoconf -*- 113a966c04fSmrg 114ac92798bSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 115a966c04fSmrg# 116a966c04fSmrg# This file is free software; the Free Software Foundation 117a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 118a966c04fSmrg# with or without modifications, as long as this notice is preserved. 119a966c04fSmrg 120a966c04fSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 121a966c04fSmrg# ------------------------------------- 122a966c04fSmrg# Define a conditional. 123a966c04fSmrgAC_DEFUN([AM_CONDITIONAL], 124ac92798bSmrg[AC_PREREQ([2.52])dnl 125ac92798bSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 126ac92798bSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 127a966c04fSmrgAC_SUBST([$1_TRUE])dnl 128a966c04fSmrgAC_SUBST([$1_FALSE])dnl 129a966c04fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 130a966c04fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1312e2dd055Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 132a966c04fSmrgif $2; then 133a966c04fSmrg $1_TRUE= 134a966c04fSmrg $1_FALSE='#' 135a966c04fSmrgelse 136a966c04fSmrg $1_TRUE='#' 137a966c04fSmrg $1_FALSE= 138a966c04fSmrgfi 139a966c04fSmrgAC_CONFIG_COMMANDS_PRE( 140a966c04fSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 141a966c04fSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 142a966c04fSmrgUsually this means the macro was only invoked conditionally.]]) 143a966c04fSmrgfi])]) 144a966c04fSmrg 145ac92798bSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 146a966c04fSmrg# 147a966c04fSmrg# This file is free software; the Free Software Foundation 148a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 149a966c04fSmrg# with or without modifications, as long as this notice is preserved. 150a966c04fSmrg 151a966c04fSmrg 152ac92798bSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 153a966c04fSmrg# written in clear, in which case automake, when reading aclocal.m4, 154a966c04fSmrg# will think it sees a *use*, and therefore will trigger all it's 155a966c04fSmrg# C support machinery. Also note that it means that autoscan, seeing 156a966c04fSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 157a966c04fSmrg 158a966c04fSmrg 159a966c04fSmrg# _AM_DEPENDENCIES(NAME) 160a966c04fSmrg# ---------------------- 161a966c04fSmrg# See how the compiler implements dependency checking. 162ac92798bSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 163a966c04fSmrg# We try a few techniques and use that to set a single cache variable. 164a966c04fSmrg# 165a966c04fSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 166a966c04fSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 167a966c04fSmrg# dependency, and given that the user is not expected to run this macro, 168a966c04fSmrg# just rely on AC_PROG_CC. 169a966c04fSmrgAC_DEFUN([_AM_DEPENDENCIES], 170a966c04fSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 171a966c04fSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 172a966c04fSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 173a966c04fSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 174a966c04fSmrg 175ac92798bSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 176ac92798bSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 177ac92798bSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 178ac92798bSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 179ac92798bSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 180ac92798bSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 181ac92798bSmrg [depcc="$$1" am_compiler_list=]) 182a966c04fSmrg 183a966c04fSmrgAC_CACHE_CHECK([dependency style of $depcc], 184a966c04fSmrg [am_cv_$1_dependencies_compiler_type], 185a966c04fSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 186a966c04fSmrg # We make a subdir and do the tests there. Otherwise we can end up 187a966c04fSmrg # making bogus files that we don't know about and never remove. For 188a966c04fSmrg # instance it was reported that on HP-UX the gcc test will end up 189ac92798bSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 190ac92798bSmrg # in D". 191ac92798bSmrg rm -rf conftest.dir 192a966c04fSmrg mkdir conftest.dir 193a966c04fSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 194a966c04fSmrg # using a relative directory. 195a966c04fSmrg cp "$am_depcomp" conftest.dir 196a966c04fSmrg cd conftest.dir 197a966c04fSmrg # We will build objects and dependencies in a subdirectory because 198a966c04fSmrg # it helps to detect inapplicable dependency modes. For instance 199a966c04fSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 200a966c04fSmrg # side effect of compilation, but ICC will put the dependencies in 201a966c04fSmrg # the current directory while Tru64 will put them in the object 202a966c04fSmrg # directory. 203a966c04fSmrg mkdir sub 204a966c04fSmrg 205a966c04fSmrg am_cv_$1_dependencies_compiler_type=none 206a966c04fSmrg if test "$am_compiler_list" = ""; then 207a966c04fSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 208a966c04fSmrg fi 2092e2dd055Smrg am__universal=false 2102e2dd055Smrg m4_case([$1], [CC], 2112e2dd055Smrg [case " $depcc " in #( 2122e2dd055Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2132e2dd055Smrg esac], 2142e2dd055Smrg [CXX], 2152e2dd055Smrg [case " $depcc " in #( 2162e2dd055Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2172e2dd055Smrg esac]) 2182e2dd055Smrg 219a966c04fSmrg for depmode in $am_compiler_list; do 220a966c04fSmrg # Setup a source with many dependencies, because some compilers 221a966c04fSmrg # like to wrap large dependency lists on column 80 (with \), and 222a966c04fSmrg # we should not choose a depcomp mode which is confused by this. 223a966c04fSmrg # 224a966c04fSmrg # We need to recreate these files for each test, as the compiler may 225a966c04fSmrg # overwrite some of them when testing with obscure command lines. 226a966c04fSmrg # This happens at least with the AIX C compiler. 227a966c04fSmrg : > sub/conftest.c 228a966c04fSmrg for i in 1 2 3 4 5 6; do 229a966c04fSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 230ac92798bSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 231ac92798bSmrg # Solaris 10 /bin/sh. 232ac92798bSmrg echo '/* dummy */' > sub/conftst$i.h 233a966c04fSmrg done 234a966c04fSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 235a966c04fSmrg 236ac92798bSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 2372e2dd055Smrg # mode. It turns out that the SunPro C++ compiler does not properly 238ac92798bSmrg # handle '-M -o', and we need to detect this. Also, some Intel 239ac92798bSmrg # versions had trouble with output in subdirs. 2402e2dd055Smrg am__obj=sub/conftest.${OBJEXT-o} 2412e2dd055Smrg am__minus_obj="-o $am__obj" 242a966c04fSmrg case $depmode in 2432e2dd055Smrg gcc) 2442e2dd055Smrg # This depmode causes a compiler race in universal mode. 2452e2dd055Smrg test "$am__universal" = false || continue 2462e2dd055Smrg ;; 247a966c04fSmrg nosideeffect) 248ac92798bSmrg # After this tag, mechanisms are not by side-effect, so they'll 249ac92798bSmrg # only be used when explicitly requested. 250a966c04fSmrg if test "x$enable_dependency_tracking" = xyes; then 251a966c04fSmrg continue 252a966c04fSmrg else 253a966c04fSmrg break 254a966c04fSmrg fi 255a966c04fSmrg ;; 256ac92798bSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 257ac92798bSmrg # This compiler won't grok '-c -o', but also, the minuso test has 2582e2dd055Smrg # not run yet. These depmodes are late enough in the game, and 2592e2dd055Smrg # so weak that their functioning should not be impacted. 2602e2dd055Smrg am__obj=conftest.${OBJEXT-o} 2612e2dd055Smrg am__minus_obj= 2622e2dd055Smrg ;; 263a966c04fSmrg none) break ;; 264a966c04fSmrg esac 265a966c04fSmrg if depmode=$depmode \ 2662e2dd055Smrg source=sub/conftest.c object=$am__obj \ 267a966c04fSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2682e2dd055Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 269a966c04fSmrg >/dev/null 2>conftest.err && 270a966c04fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 271a966c04fSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2722e2dd055Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 273a966c04fSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 274a966c04fSmrg # icc doesn't choke on unknown options, it will just issue warnings 275a966c04fSmrg # or remarks (even with -Werror). So we grep stderr for any message 276a966c04fSmrg # that says an option was ignored or not supported. 277a966c04fSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 278a966c04fSmrg # icc: Command line warning: ignoring option '-M'; no argument required 279a966c04fSmrg # The diagnosis changed in icc 8.0: 280a966c04fSmrg # icc: Command line remark: option '-MP' not supported 281a966c04fSmrg if (grep 'ignoring option' conftest.err || 282a966c04fSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 283a966c04fSmrg am_cv_$1_dependencies_compiler_type=$depmode 284a966c04fSmrg break 285a966c04fSmrg fi 286a966c04fSmrg fi 287a966c04fSmrg done 288a966c04fSmrg 289a966c04fSmrg cd .. 290a966c04fSmrg rm -rf conftest.dir 291a966c04fSmrgelse 292a966c04fSmrg am_cv_$1_dependencies_compiler_type=none 293a966c04fSmrgfi 294a966c04fSmrg]) 295a966c04fSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 296a966c04fSmrgAM_CONDITIONAL([am__fastdep$1], [ 297a966c04fSmrg test "x$enable_dependency_tracking" != xno \ 298a966c04fSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 299a966c04fSmrg]) 300a966c04fSmrg 301a966c04fSmrg 302a966c04fSmrg# AM_SET_DEPDIR 303a966c04fSmrg# ------------- 304a966c04fSmrg# Choose a directory name for dependency files. 305ac92798bSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 306a966c04fSmrgAC_DEFUN([AM_SET_DEPDIR], 307a966c04fSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 308a966c04fSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 309a966c04fSmrg]) 310a966c04fSmrg 311a966c04fSmrg 312a966c04fSmrg# AM_DEP_TRACK 313a966c04fSmrg# ------------ 314a966c04fSmrgAC_DEFUN([AM_DEP_TRACK], 315ac92798bSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 316ac92798bSmrgAS_HELP_STRING( 317ac92798bSmrg [--enable-dependency-tracking], 318ac92798bSmrg [do not reject slow dependency extractors]) 319ac92798bSmrgAS_HELP_STRING( 320ac92798bSmrg [--disable-dependency-tracking], 321ac92798bSmrg [speeds up one-time build])]) 322a966c04fSmrgif test "x$enable_dependency_tracking" != xno; then 323a966c04fSmrg am_depcomp="$ac_aux_dir/depcomp" 324a966c04fSmrg AMDEPBACKSLASH='\' 325ac92798bSmrg am__nodep='_no' 326a966c04fSmrgfi 327a966c04fSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 328a966c04fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 329a966c04fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 330ac92798bSmrgAC_SUBST([am__nodep])dnl 331ac92798bSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 332a966c04fSmrg]) 333a966c04fSmrg 334a966c04fSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 335a966c04fSmrg 336ac92798bSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 337a966c04fSmrg# 338a966c04fSmrg# This file is free software; the Free Software Foundation 339a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 340a966c04fSmrg# with or without modifications, as long as this notice is preserved. 341a966c04fSmrg 342a966c04fSmrg 343a966c04fSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 344a966c04fSmrg# ------------------------------ 345a966c04fSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3462e2dd055Smrg[{ 347ac92798bSmrg # Older Autoconf quotes --file arguments for eval, but not when files 3482e2dd055Smrg # are listed without --file. Let's play safe and only enable the eval 3492e2dd055Smrg # if we detect the quoting. 3502e2dd055Smrg case $CONFIG_FILES in 3512e2dd055Smrg *\'*) eval set x "$CONFIG_FILES" ;; 3522e2dd055Smrg *) set x $CONFIG_FILES ;; 3532e2dd055Smrg esac 3542e2dd055Smrg shift 3552e2dd055Smrg for mf 3562e2dd055Smrg do 3572e2dd055Smrg # Strip MF so we end up with the name of the file. 3582e2dd055Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3592e2dd055Smrg # Check whether this is an Automake generated Makefile or not. 360ac92798bSmrg # We used to match only the files named 'Makefile.in', but 3612e2dd055Smrg # some people rename them; so instead we look at the file content. 3622e2dd055Smrg # Grep'ing the first line is not enough: some people post-process 3632e2dd055Smrg # each Makefile.in and add a new line on top of each file to say so. 3642e2dd055Smrg # Grep'ing the whole file is not good either: AIX grep has a line 3652e2dd055Smrg # limit of 2048, but all sed's we know have understand at least 4000. 3662e2dd055Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3672e2dd055Smrg dirpart=`AS_DIRNAME("$mf")` 3682e2dd055Smrg else 3692e2dd055Smrg continue 3702e2dd055Smrg fi 3712e2dd055Smrg # Extract the definition of DEPDIR, am__include, and am__quote 372ac92798bSmrg # from the Makefile without running 'make'. 3732e2dd055Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3742e2dd055Smrg test -z "$DEPDIR" && continue 3752e2dd055Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 376ac92798bSmrg test -z "$am__include" && continue 3772e2dd055Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3782e2dd055Smrg # Find all dependency output files, they are included files with 3792e2dd055Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3802e2dd055Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 3812e2dd055Smrg # expansion. 3822e2dd055Smrg for file in `sed -n " 3832e2dd055Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 384ac92798bSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 3852e2dd055Smrg # Make sure the directory exists. 3862e2dd055Smrg test -f "$dirpart/$file" && continue 3872e2dd055Smrg fdir=`AS_DIRNAME(["$file"])` 3882e2dd055Smrg AS_MKDIR_P([$dirpart/$fdir]) 3892e2dd055Smrg # echo "creating $dirpart/$file" 3902e2dd055Smrg echo '# dummy' > "$dirpart/$file" 3912e2dd055Smrg done 392a966c04fSmrg done 3932e2dd055Smrg} 394a966c04fSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 395a966c04fSmrg 396a966c04fSmrg 397a966c04fSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 398a966c04fSmrg# ----------------------------- 399a966c04fSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 400a966c04fSmrg# 401a966c04fSmrg# This code is only required when automatic dependency tracking 402ac92798bSmrg# is enabled. FIXME. This creates each '.P' file that we will 403a966c04fSmrg# need in order to bootstrap the dependency handling code. 404a966c04fSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 405a966c04fSmrg[AC_CONFIG_COMMANDS([depfiles], 406a966c04fSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 407a966c04fSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 408a966c04fSmrg]) 409a966c04fSmrg 410a966c04fSmrg# Do all the work for Automake. -*- Autoconf -*- 411a966c04fSmrg 412ac92798bSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 413a966c04fSmrg# 414a966c04fSmrg# This file is free software; the Free Software Foundation 415a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 416a966c04fSmrg# with or without modifications, as long as this notice is preserved. 417a966c04fSmrg 418a966c04fSmrg# This macro actually does too much. Some checks are only needed if 419a966c04fSmrg# your package does certain things. But this isn't really a big deal. 420a966c04fSmrg 421ac92798bSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 422ac92798bSmrgm4_define([AC_PROG_CC], 423ac92798bSmrgm4_defn([AC_PROG_CC]) 424ac92798bSmrg[_AM_PROG_CC_C_O 425ac92798bSmrg]) 426ac92798bSmrg 427a966c04fSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 428a966c04fSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 429a966c04fSmrg# ----------------------------------------------- 430a966c04fSmrg# The call with PACKAGE and VERSION arguments is the old style 431a966c04fSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 432a966c04fSmrg# and VERSION should now be passed to AC_INIT and removed from 433a966c04fSmrg# the call to AM_INIT_AUTOMAKE. 434a966c04fSmrg# We support both call styles for the transition. After 435a966c04fSmrg# the next Automake release, Autoconf can make the AC_INIT 436a966c04fSmrg# arguments mandatory, and then we can depend on a new Autoconf 437a966c04fSmrg# release and drop the old call support. 438a966c04fSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 439ac92798bSmrg[AC_PREREQ([2.65])dnl 440a966c04fSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 441a966c04fSmrgdnl the ones we care about. 442a966c04fSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 443a966c04fSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 444a966c04fSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 445a966c04fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 446a966c04fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 447a966c04fSmrg # is not polluted with repeated "-I." 448a966c04fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 449a966c04fSmrg # test to see if srcdir already configured 450a966c04fSmrg if test -f $srcdir/config.status; then 451a966c04fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 452a966c04fSmrg fi 453a966c04fSmrgfi 454a966c04fSmrg 455a966c04fSmrg# test whether we have cygpath 456a966c04fSmrgif test -z "$CYGPATH_W"; then 457a966c04fSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 458a966c04fSmrg CYGPATH_W='cygpath -w' 459a966c04fSmrg else 460a966c04fSmrg CYGPATH_W=echo 461a966c04fSmrg fi 462a966c04fSmrgfi 463a966c04fSmrgAC_SUBST([CYGPATH_W]) 464a966c04fSmrg 465a966c04fSmrg# Define the identity of the package. 466a966c04fSmrgdnl Distinguish between old-style and new-style calls. 467a966c04fSmrgm4_ifval([$2], 468ac92798bSmrg[AC_DIAGNOSE([obsolete], 469ac92798bSmrg [$0: two- and three-arguments forms are deprecated.]) 470ac92798bSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 471a966c04fSmrg AC_SUBST([PACKAGE], [$1])dnl 472a966c04fSmrg AC_SUBST([VERSION], [$2])], 473a966c04fSmrg[_AM_SET_OPTIONS([$1])dnl 474a966c04fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 475ac92798bSmrgm4_if( 476ac92798bSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 477ac92798bSmrg [ok:ok],, 478a966c04fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 479a966c04fSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 480a966c04fSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 481a966c04fSmrg 482a966c04fSmrg_AM_IF_OPTION([no-define],, 483ac92798bSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 484ac92798bSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 485a966c04fSmrg 486a966c04fSmrg# Some tools Automake needs. 487a966c04fSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 488a966c04fSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 489ac92798bSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 490ac92798bSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 491ac92798bSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 492ac92798bSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 493ac92798bSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 4942e2dd055SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4952e2dd055SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 496ac92798bSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 497ac92798bSmrg# For better backward compatibility. To be removed once Automake 1.9.x 498ac92798bSmrg# dies out for good. For more background, see: 499ac92798bSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 500ac92798bSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 501ac92798bSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 502a966c04fSmrg# We need awk for the "check" target. The system "awk" is bad on 503a966c04fSmrg# some platforms. 504a966c04fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 505a966c04fSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 506a966c04fSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 507a966c04fSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5082e2dd055Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5092e2dd055Smrg [_AM_PROG_TAR([v7])])]) 510a966c04fSmrg_AM_IF_OPTION([no-dependencies],, 511a966c04fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 512ac92798bSmrg [_AM_DEPENDENCIES([CC])], 513ac92798bSmrg [m4_define([AC_PROG_CC], 514ac92798bSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 515a966c04fSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 516ac92798bSmrg [_AM_DEPENDENCIES([CXX])], 517ac92798bSmrg [m4_define([AC_PROG_CXX], 518ac92798bSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 519a966c04fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 520ac92798bSmrg [_AM_DEPENDENCIES([OBJC])], 521ac92798bSmrg [m4_define([AC_PROG_OBJC], 522ac92798bSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 523ac92798bSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 524ac92798bSmrg [_AM_DEPENDENCIES([OBJCXX])], 525ac92798bSmrg [m4_define([AC_PROG_OBJCXX], 526ac92798bSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 527a966c04fSmrg]) 528ac92798bSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 529ac92798bSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 530ac92798bSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 531ac92798bSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 5322e2dd055SmrgAC_CONFIG_COMMANDS_PRE(dnl 5332e2dd055Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5342e2dd055Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 535a966c04fSmrg 536ac92798bSmrg# POSIX will say in a future version that running "rm -f" with no argument 537ac92798bSmrg# is OK; and we want to be able to make that assumption in our Makefile 538ac92798bSmrg# recipes. So use an aggressive probe to check that the usage we want is 539ac92798bSmrg# actually supported "in the wild" to an acceptable degree. 540ac92798bSmrg# See automake bug#10828. 541ac92798bSmrg# To make any issue more visible, cause the running configure to be aborted 542ac92798bSmrg# by default if the 'rm' program in use doesn't match our expectations; the 543ac92798bSmrg# user can still override this though. 544ac92798bSmrgif rm -f && rm -fr && rm -rf; then : OK; else 545ac92798bSmrg cat >&2 <<'END' 546ac92798bSmrgOops! 547ac92798bSmrg 548ac92798bSmrgYour 'rm' program seems unable to run without file operands specified 549ac92798bSmrgon the command line, even when the '-f' option is present. This is contrary 550ac92798bSmrgto the behaviour of most rm programs out there, and not conforming with 551ac92798bSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 552ac92798bSmrg 553ac92798bSmrgPlease tell bug-automake@gnu.org about your system, including the value 554ac92798bSmrgof your $PATH and any error possibly output before this message. This 555ac92798bSmrgcan help us improve future automake versions. 556ac92798bSmrg 557ac92798bSmrgEND 558ac92798bSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 559ac92798bSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 560ac92798bSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 561ac92798bSmrg echo >&2 562ac92798bSmrg else 563ac92798bSmrg cat >&2 <<'END' 564ac92798bSmrgAborting the configuration process, to ensure you take notice of the issue. 565ac92798bSmrg 566ac92798bSmrgYou can download and install GNU coreutils to get an 'rm' implementation 567ac92798bSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 568ac92798bSmrg 569ac92798bSmrgIf you want to complete the configuration process using your problematic 570ac92798bSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 571ac92798bSmrgto "yes", and re-run configure. 572ac92798bSmrg 573ac92798bSmrgEND 574ac92798bSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 575ac92798bSmrg fi 576ac92798bSmrgfi]) 577ac92798bSmrg 578ac92798bSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5792e2dd055Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5802e2dd055Smrgdnl mangled by Autoconf and run in a shell conditional statement. 5812e2dd055Smrgm4_define([_AC_COMPILER_EXEEXT], 5822e2dd055Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5832e2dd055Smrg 584a966c04fSmrg# When config.status generates a header, we must update the stamp-h file. 585a966c04fSmrg# This file resides in the same directory as the config header 586a966c04fSmrg# that is generated. The stamp files are numbered to have different names. 587a966c04fSmrg 588a966c04fSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 589a966c04fSmrg# loop where config.status creates the headers, so we can generate 590a966c04fSmrg# our stamp files there. 591a966c04fSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 592a966c04fSmrg[# Compute $1's index in $config_headers. 5932e2dd055Smrg_am_arg=$1 594a966c04fSmrg_am_stamp_count=1 595a966c04fSmrgfor _am_header in $config_headers :; do 596a966c04fSmrg case $_am_header in 5972e2dd055Smrg $_am_arg | $_am_arg:* ) 598a966c04fSmrg break ;; 599a966c04fSmrg * ) 600a966c04fSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 601a966c04fSmrg esac 602a966c04fSmrgdone 6032e2dd055Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 604a966c04fSmrg 605ac92798bSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 606a966c04fSmrg# 607a966c04fSmrg# This file is free software; the Free Software Foundation 608a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 609a966c04fSmrg# with or without modifications, as long as this notice is preserved. 610a966c04fSmrg 611a966c04fSmrg# AM_PROG_INSTALL_SH 612a966c04fSmrg# ------------------ 613a966c04fSmrg# Define $install_sh. 614a966c04fSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 615a966c04fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6162e2dd055Smrgif test x"${install_sh}" != xset; then 6172e2dd055Smrg case $am_aux_dir in 6182e2dd055Smrg *\ * | *\ *) 6192e2dd055Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 6202e2dd055Smrg *) 6212e2dd055Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 6222e2dd055Smrg esac 6232e2dd055Smrgfi 624ac92798bSmrgAC_SUBST([install_sh])]) 625a966c04fSmrg 626ac92798bSmrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 627a966c04fSmrg# 628a966c04fSmrg# This file is free software; the Free Software Foundation 629a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 630a966c04fSmrg# with or without modifications, as long as this notice is preserved. 631a966c04fSmrg 632a966c04fSmrg# Check whether the underlying file-system supports filenames 633a966c04fSmrg# with a leading dot. For instance MS-DOS doesn't. 634a966c04fSmrgAC_DEFUN([AM_SET_LEADING_DOT], 635a966c04fSmrg[rm -rf .tst 2>/dev/null 636a966c04fSmrgmkdir .tst 2>/dev/null 637a966c04fSmrgif test -d .tst; then 638a966c04fSmrg am__leading_dot=. 639a966c04fSmrgelse 640a966c04fSmrg am__leading_dot=_ 641a966c04fSmrgfi 642a966c04fSmrgrmdir .tst 2>/dev/null 643a966c04fSmrgAC_SUBST([am__leading_dot])]) 644a966c04fSmrg 645a966c04fSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 646a966c04fSmrg 647ac92798bSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 648a966c04fSmrg# 649a966c04fSmrg# This file is free software; the Free Software Foundation 650a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 651a966c04fSmrg# with or without modifications, as long as this notice is preserved. 652a966c04fSmrg 653a966c04fSmrg# AM_MAKE_INCLUDE() 654a966c04fSmrg# ----------------- 655a966c04fSmrg# Check to see how make treats includes. 656a966c04fSmrgAC_DEFUN([AM_MAKE_INCLUDE], 657a966c04fSmrg[am_make=${MAKE-make} 658a966c04fSmrgcat > confinc << 'END' 659a966c04fSmrgam__doit: 6602e2dd055Smrg @echo this is the am__doit target 661a966c04fSmrg.PHONY: am__doit 662a966c04fSmrgEND 663a966c04fSmrg# If we don't find an include directive, just comment out the code. 664a966c04fSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 665a966c04fSmrgam__include="#" 666a966c04fSmrgam__quote= 667a966c04fSmrg_am_result=none 668a966c04fSmrg# First try GNU make style include. 669a966c04fSmrgecho "include confinc" > confmf 670ac92798bSmrg# Ignore all kinds of additional output from 'make'. 6712e2dd055Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6722e2dd055Smrg*the\ am__doit\ target*) 6732e2dd055Smrg am__include=include 6742e2dd055Smrg am__quote= 6752e2dd055Smrg _am_result=GNU 6762e2dd055Smrg ;; 6772e2dd055Smrgesac 678a966c04fSmrg# Now try BSD make style include. 679a966c04fSmrgif test "$am__include" = "#"; then 680a966c04fSmrg echo '.include "confinc"' > confmf 6812e2dd055Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 6822e2dd055Smrg *the\ am__doit\ target*) 6832e2dd055Smrg am__include=.include 6842e2dd055Smrg am__quote="\"" 6852e2dd055Smrg _am_result=BSD 6862e2dd055Smrg ;; 6872e2dd055Smrg esac 688a966c04fSmrgfi 689a966c04fSmrgAC_SUBST([am__include]) 690a966c04fSmrgAC_SUBST([am__quote]) 691a966c04fSmrgAC_MSG_RESULT([$_am_result]) 692a966c04fSmrgrm -f confinc confmf 693a966c04fSmrg]) 694a966c04fSmrg 695a966c04fSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 696a966c04fSmrg 697ac92798bSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 698a966c04fSmrg# 699a966c04fSmrg# This file is free software; the Free Software Foundation 700a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 701a966c04fSmrg# with or without modifications, as long as this notice is preserved. 702a966c04fSmrg 703a966c04fSmrg# AM_MISSING_PROG(NAME, PROGRAM) 704a966c04fSmrg# ------------------------------ 705a966c04fSmrgAC_DEFUN([AM_MISSING_PROG], 706a966c04fSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 707a966c04fSmrg$1=${$1-"${am_missing_run}$2"} 708a966c04fSmrgAC_SUBST($1)]) 709a966c04fSmrg 710a966c04fSmrg# AM_MISSING_HAS_RUN 711a966c04fSmrg# ------------------ 712ac92798bSmrg# Define MISSING if not defined so far and test if it is modern enough. 713ac92798bSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 714a966c04fSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 715a966c04fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 716a966c04fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7172e2dd055Smrgif test x"${MISSING+set}" != xset; then 7182e2dd055Smrg case $am_aux_dir in 7192e2dd055Smrg *\ * | *\ *) 7202e2dd055Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7212e2dd055Smrg *) 7222e2dd055Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7232e2dd055Smrg esac 7242e2dd055Smrgfi 725a966c04fSmrg# Use eval to expand $SHELL 726ac92798bSmrgif eval "$MISSING --is-lightweight"; then 727ac92798bSmrg am_missing_run="$MISSING " 728a966c04fSmrgelse 729a966c04fSmrg am_missing_run= 730ac92798bSmrg AC_MSG_WARN(['missing' script is too old or missing]) 731a966c04fSmrgfi 732a966c04fSmrg]) 733a966c04fSmrg 734a966c04fSmrg# Helper functions for option handling. -*- Autoconf -*- 735a966c04fSmrg 736ac92798bSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 737a966c04fSmrg# 738a966c04fSmrg# This file is free software; the Free Software Foundation 739a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 740a966c04fSmrg# with or without modifications, as long as this notice is preserved. 741a966c04fSmrg 742a966c04fSmrg# _AM_MANGLE_OPTION(NAME) 743a966c04fSmrg# ----------------------- 744a966c04fSmrgAC_DEFUN([_AM_MANGLE_OPTION], 745a966c04fSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 746a966c04fSmrg 747a966c04fSmrg# _AM_SET_OPTION(NAME) 748ac92798bSmrg# -------------------- 749a966c04fSmrg# Set option NAME. Presently that only means defining a flag for this option. 750a966c04fSmrgAC_DEFUN([_AM_SET_OPTION], 751ac92798bSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 752a966c04fSmrg 753a966c04fSmrg# _AM_SET_OPTIONS(OPTIONS) 754ac92798bSmrg# ------------------------ 755a966c04fSmrg# OPTIONS is a space-separated list of Automake options. 756a966c04fSmrgAC_DEFUN([_AM_SET_OPTIONS], 7572e2dd055Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 758a966c04fSmrg 759a966c04fSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 760a966c04fSmrg# ------------------------------------------- 761a966c04fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 762a966c04fSmrgAC_DEFUN([_AM_IF_OPTION], 763a966c04fSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 764a966c04fSmrg 765ac92798bSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 766ac92798bSmrg# 767ac92798bSmrg# This file is free software; the Free Software Foundation 768ac92798bSmrg# gives unlimited permission to copy and/or distribute it, 769ac92798bSmrg# with or without modifications, as long as this notice is preserved. 770a966c04fSmrg 771ac92798bSmrg# _AM_PROG_CC_C_O 772ac92798bSmrg# --------------- 773ac92798bSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 774ac92798bSmrg# to automatically call this. 775ac92798bSmrgAC_DEFUN([_AM_PROG_CC_C_O], 776ac92798bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 777ac92798bSmrgAC_REQUIRE_AUX_FILE([compile])dnl 778ac92798bSmrgAC_LANG_PUSH([C])dnl 779ac92798bSmrgAC_CACHE_CHECK( 780ac92798bSmrg [whether $CC understands -c and -o together], 781ac92798bSmrg [am_cv_prog_cc_c_o], 782ac92798bSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 783ac92798bSmrg # Make sure it works both with $CC and with simple cc. 784ac92798bSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 785ac92798bSmrg # compilers refuse to overwrite an existing .o file with -o, 786ac92798bSmrg # though they will create one. 787ac92798bSmrg am_cv_prog_cc_c_o=yes 788ac92798bSmrg for am_i in 1 2; do 789ac92798bSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 790ac92798bSmrg && test -f conftest2.$ac_objext; then 791ac92798bSmrg : OK 792ac92798bSmrg else 793ac92798bSmrg am_cv_prog_cc_c_o=no 794ac92798bSmrg break 795ac92798bSmrg fi 796ac92798bSmrg done 797ac92798bSmrg rm -f core conftest* 798ac92798bSmrg unset am_i]) 799ac92798bSmrgif test "$am_cv_prog_cc_c_o" != yes; then 800ac92798bSmrg # Losing compiler, so override with the script. 801ac92798bSmrg # FIXME: It is wrong to rewrite CC. 802ac92798bSmrg # But if we don't then we get into trouble of one sort or another. 803ac92798bSmrg # A longer-term fix would be to have automake use am__CC in this case, 804ac92798bSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 805ac92798bSmrg CC="$am_aux_dir/compile $CC" 806ac92798bSmrgfi 807ac92798bSmrgAC_LANG_POP([C])]) 808ac92798bSmrg 809ac92798bSmrg# For backward compatibility. 810ac92798bSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 811ac92798bSmrg 812ac92798bSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 813a966c04fSmrg# 814a966c04fSmrg# This file is free software; the Free Software Foundation 815a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 816a966c04fSmrg# with or without modifications, as long as this notice is preserved. 817a966c04fSmrg 818ac92798bSmrg# AM_RUN_LOG(COMMAND) 819ac92798bSmrg# ------------------- 820ac92798bSmrg# Run COMMAND, save the exit status in ac_status, and log it. 821ac92798bSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 822ac92798bSmrgAC_DEFUN([AM_RUN_LOG], 823ac92798bSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 824ac92798bSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 825ac92798bSmrg ac_status=$? 826ac92798bSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 827ac92798bSmrg (exit $ac_status); }]) 828ac92798bSmrg 829ac92798bSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 830ac92798bSmrg 831ac92798bSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 832ac92798bSmrg# 833ac92798bSmrg# This file is free software; the Free Software Foundation 834ac92798bSmrg# gives unlimited permission to copy and/or distribute it, 835ac92798bSmrg# with or without modifications, as long as this notice is preserved. 836a966c04fSmrg 837a966c04fSmrg# AM_SANITY_CHECK 838a966c04fSmrg# --------------- 839a966c04fSmrgAC_DEFUN([AM_SANITY_CHECK], 840a966c04fSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8412e2dd055Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8422e2dd055Smrg# name. Accept space and tab only in the latter. 8432e2dd055Smrgam_lf=' 8442e2dd055Smrg' 8452e2dd055Smrgcase `pwd` in 8462e2dd055Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8472e2dd055Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8482e2dd055Smrgesac 8492e2dd055Smrgcase $srcdir in 8502e2dd055Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 851ac92798bSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 8522e2dd055Smrgesac 8532e2dd055Smrg 854ac92798bSmrg# Do 'set' in a subshell so we don't clobber the current shell's 855a966c04fSmrg# arguments. Must try -L first in case configure is actually a 856a966c04fSmrg# symlink; some systems play weird games with the mod time of symlinks 857a966c04fSmrg# (eg FreeBSD returns the mod time of the symlink's containing 858a966c04fSmrg# directory). 859a966c04fSmrgif ( 860ac92798bSmrg am_has_slept=no 861ac92798bSmrg for am_try in 1 2; do 862ac92798bSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 863ac92798bSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 864ac92798bSmrg if test "$[*]" = "X"; then 865ac92798bSmrg # -L didn't work. 866ac92798bSmrg set X `ls -t "$srcdir/configure" conftest.file` 867ac92798bSmrg fi 868ac92798bSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 869ac92798bSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 870ac92798bSmrg 871ac92798bSmrg # If neither matched, then we have a broken ls. This can happen 872ac92798bSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 873ac92798bSmrg # broken ls alias from the environment. This has actually 874ac92798bSmrg # happened. Such a system could not be considered "sane". 875ac92798bSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 876ac92798bSmrg alias in your environment]) 877ac92798bSmrg fi 878ac92798bSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 879ac92798bSmrg break 880ac92798bSmrg fi 881ac92798bSmrg # Just in case. 882ac92798bSmrg sleep 1 883ac92798bSmrg am_has_slept=yes 884ac92798bSmrg done 885a966c04fSmrg test "$[2]" = conftest.file 886a966c04fSmrg ) 887a966c04fSmrgthen 888a966c04fSmrg # Ok. 889a966c04fSmrg : 890a966c04fSmrgelse 891a966c04fSmrg AC_MSG_ERROR([newly created file is older than distributed files! 892a966c04fSmrgCheck your system clock]) 893a966c04fSmrgfi 894ac92798bSmrgAC_MSG_RESULT([yes]) 895ac92798bSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 896ac92798bSmrg# generated files are strictly newer. 897ac92798bSmrgam_sleep_pid= 898ac92798bSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 899ac92798bSmrg ( sleep 1 ) & 900ac92798bSmrg am_sleep_pid=$! 901ac92798bSmrgfi 902ac92798bSmrgAC_CONFIG_COMMANDS_PRE( 903ac92798bSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 904ac92798bSmrg if test -n "$am_sleep_pid"; then 905ac92798bSmrg # Hide warnings about reused PIDs. 906ac92798bSmrg wait $am_sleep_pid 2>/dev/null 907ac92798bSmrg fi 908ac92798bSmrg AC_MSG_RESULT([done])]) 909ac92798bSmrgrm -f conftest.file 910ac92798bSmrg]) 911a966c04fSmrg 912ac92798bSmrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 9132e2dd055Smrg# 9142e2dd055Smrg# This file is free software; the Free Software Foundation 9152e2dd055Smrg# gives unlimited permission to copy and/or distribute it, 9162e2dd055Smrg# with or without modifications, as long as this notice is preserved. 9172e2dd055Smrg 9182e2dd055Smrg# AM_SILENT_RULES([DEFAULT]) 9192e2dd055Smrg# -------------------------- 9202e2dd055Smrg# Enable less verbose build rules; with the default set to DEFAULT 921ac92798bSmrg# ("yes" being less verbose, "no" or empty being verbose). 9222e2dd055SmrgAC_DEFUN([AM_SILENT_RULES], 923ac92798bSmrg[AC_ARG_ENABLE([silent-rules], [dnl 924ac92798bSmrgAS_HELP_STRING( 925ac92798bSmrg [--enable-silent-rules], 926ac92798bSmrg [less verbose build output (undo: "make V=1")]) 927ac92798bSmrgAS_HELP_STRING( 928ac92798bSmrg [--disable-silent-rules], 929ac92798bSmrg [verbose build output (undo: "make V=0")])dnl 930ac92798bSmrg]) 931ac92798bSmrgcase $enable_silent_rules in @%:@ ((( 932ac92798bSmrg yes) AM_DEFAULT_VERBOSITY=0;; 933ac92798bSmrg no) AM_DEFAULT_VERBOSITY=1;; 934ac92798bSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9352e2dd055Smrgesac 936ac92798bSmrgdnl 937ac92798bSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 938ac92798bSmrgdnl do not support nested variable expansions. 939ac92798bSmrgdnl See automake bug#9928 and bug#10237. 940ac92798bSmrgam_make=${MAKE-make} 941ac92798bSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 942ac92798bSmrg [am_cv_make_support_nested_variables], 943ac92798bSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 944ac92798bSmrgBAR0=false 945ac92798bSmrgBAR1=true 946ac92798bSmrgV=1 947ac92798bSmrgam__doit: 948ac92798bSmrg @$(TRUE) 949ac92798bSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 950ac92798bSmrg am_cv_make_support_nested_variables=yes 951ac92798bSmrgelse 952ac92798bSmrg am_cv_make_support_nested_variables=no 953ac92798bSmrgfi]) 954ac92798bSmrgif test $am_cv_make_support_nested_variables = yes; then 955ac92798bSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 956ac92798bSmrg AM_V='$(V)' 957ac92798bSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 958ac92798bSmrgelse 959ac92798bSmrg AM_V=$AM_DEFAULT_VERBOSITY 960ac92798bSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 961ac92798bSmrgfi 962ac92798bSmrgAC_SUBST([AM_V])dnl 963ac92798bSmrgAM_SUBST_NOTMAKE([AM_V])dnl 964ac92798bSmrgAC_SUBST([AM_DEFAULT_V])dnl 965ac92798bSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 9662e2dd055SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9672e2dd055SmrgAM_BACKSLASH='\' 9682e2dd055SmrgAC_SUBST([AM_BACKSLASH])dnl 9692e2dd055Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9702e2dd055Smrg]) 9712e2dd055Smrg 972ac92798bSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 973a966c04fSmrg# 974a966c04fSmrg# This file is free software; the Free Software Foundation 975a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 976a966c04fSmrg# with or without modifications, as long as this notice is preserved. 977a966c04fSmrg 978a966c04fSmrg# AM_PROG_INSTALL_STRIP 979a966c04fSmrg# --------------------- 980ac92798bSmrg# One issue with vendor 'install' (even GNU) is that you can't 981a966c04fSmrg# specify the program used to strip binaries. This is especially 982a966c04fSmrg# annoying in cross-compiling environments, where the build's strip 983a966c04fSmrg# is unlikely to handle the host's binaries. 984a966c04fSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 985ac92798bSmrg# always use install-sh in "make install-strip", and initialize 986a966c04fSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 987a966c04fSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 988a966c04fSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 989ac92798bSmrg# Installed binaries are usually stripped using 'strip' when the user 990ac92798bSmrg# run "make install-strip". However 'strip' might not be the right 991a966c04fSmrg# tool to use in cross-compilation environments, therefore Automake 992ac92798bSmrg# will honor the 'STRIP' environment variable to overrule this program. 993ac92798bSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 994a966c04fSmrgif test "$cross_compiling" != no; then 995a966c04fSmrg AC_CHECK_TOOL([STRIP], [strip], :) 996a966c04fSmrgfi 997a966c04fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 998a966c04fSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 999a966c04fSmrg 1000ac92798bSmrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 1001a966c04fSmrg# 1002a966c04fSmrg# This file is free software; the Free Software Foundation 1003a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 1004a966c04fSmrg# with or without modifications, as long as this notice is preserved. 1005a966c04fSmrg 1006a966c04fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1007a966c04fSmrg# --------------------------- 10082e2dd055Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1009a966c04fSmrg# This macro is traced by Automake. 1010a966c04fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1011a966c04fSmrg 10122e2dd055Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1013ac92798bSmrg# -------------------------- 10142e2dd055Smrg# Public sister of _AM_SUBST_NOTMAKE. 10152e2dd055SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10162e2dd055Smrg 1017a966c04fSmrg# Check how to create a tarball. -*- Autoconf -*- 1018a966c04fSmrg 1019ac92798bSmrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 1020a966c04fSmrg# 1021a966c04fSmrg# This file is free software; the Free Software Foundation 1022a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 1023a966c04fSmrg# with or without modifications, as long as this notice is preserved. 1024a966c04fSmrg 1025a966c04fSmrg# _AM_PROG_TAR(FORMAT) 1026a966c04fSmrg# -------------------- 1027a966c04fSmrg# Check how to create a tarball in format FORMAT. 1028ac92798bSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1029a966c04fSmrg# 1030a966c04fSmrg# Substitute a variable $(am__tar) that is a command 1031a966c04fSmrg# writing to stdout a FORMAT-tarball containing the directory 1032a966c04fSmrg# $tardir. 1033a966c04fSmrg# tardir=directory && $(am__tar) > result.tar 1034a966c04fSmrg# 1035a966c04fSmrg# Substitute a variable $(am__untar) that extract such 1036a966c04fSmrg# a tarball read from stdin. 1037a966c04fSmrg# $(am__untar) < result.tar 1038a966c04fSmrg# 1039ac92798bSmrgAC_DEFUN([_AM_PROG_TAR], 1040ac92798bSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1041ac92798bSmrg# in the wild :-( We should find a proper way to deprecate it ... 1042ac92798bSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1043a966c04fSmrg 1044ac92798bSmrg# We'll loop over all known methods to create a tar archive until one works. 1045ac92798bSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1046a966c04fSmrg 1047ac92798bSmrgm4_if([$1], [v7], 1048ac92798bSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1049ac92798bSmrg 1050ac92798bSmrg [m4_case([$1], 1051ac92798bSmrg [ustar], 1052ac92798bSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1053ac92798bSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1054ac92798bSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1055ac92798bSmrg # and bug#13588). 1056ac92798bSmrg am_max_uid=2097151 # 2^21 - 1 1057ac92798bSmrg am_max_gid=$am_max_uid 1058ac92798bSmrg # The $UID and $GID variables are not portable, so we need to resort 1059ac92798bSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1060ac92798bSmrg # below are definitely unexpected, so allow the users to see them 1061ac92798bSmrg # (that is, avoid stderr redirection). 1062ac92798bSmrg am_uid=`id -u || echo unknown` 1063ac92798bSmrg am_gid=`id -g || echo unknown` 1064ac92798bSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1065ac92798bSmrg if test $am_uid -le $am_max_uid; then 1066ac92798bSmrg AC_MSG_RESULT([yes]) 1067ac92798bSmrg else 1068ac92798bSmrg AC_MSG_RESULT([no]) 1069ac92798bSmrg _am_tools=none 1070ac92798bSmrg fi 1071ac92798bSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1072ac92798bSmrg if test $am_gid -le $am_max_gid; then 1073ac92798bSmrg AC_MSG_RESULT([yes]) 1074ac92798bSmrg else 1075ac92798bSmrg AC_MSG_RESULT([no]) 1076ac92798bSmrg _am_tools=none 1077ac92798bSmrg fi], 1078a966c04fSmrg 1079ac92798bSmrg [pax], 1080ac92798bSmrg [], 10816e7d3316Smrg 1082ac92798bSmrg [m4_fatal([Unknown tar format])]) 10836e7d3316Smrg 1084ac92798bSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10856e7d3316Smrg 1086ac92798bSmrg # Go ahead even if we have the value already cached. We do so because we 1087ac92798bSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1088ac92798bSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10896e7d3316Smrg 1090ac92798bSmrg for _am_tool in $_am_tools; do 1091ac92798bSmrg case $_am_tool in 1092ac92798bSmrg gnutar) 1093ac92798bSmrg for _am_tar in tar gnutar gtar; do 1094ac92798bSmrg AM_RUN_LOG([$_am_tar --version]) && break 1095ac92798bSmrg done 1096ac92798bSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1097ac92798bSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1098ac92798bSmrg am__untar="$_am_tar -xf -" 1099ac92798bSmrg ;; 1100ac92798bSmrg plaintar) 1101ac92798bSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 1102ac92798bSmrg # ustar tarball either. 1103ac92798bSmrg (tar --version) >/dev/null 2>&1 && continue 1104ac92798bSmrg am__tar='tar chf - "$$tardir"' 1105ac92798bSmrg am__tar_='tar chf - "$tardir"' 1106ac92798bSmrg am__untar='tar xf -' 1107ac92798bSmrg ;; 1108ac92798bSmrg pax) 1109ac92798bSmrg am__tar='pax -L -x $1 -w "$$tardir"' 1110ac92798bSmrg am__tar_='pax -L -x $1 -w "$tardir"' 1111ac92798bSmrg am__untar='pax -r' 1112ac92798bSmrg ;; 1113ac92798bSmrg cpio) 1114ac92798bSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1115ac92798bSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1116ac92798bSmrg am__untar='cpio -i -H $1 -d' 1117ac92798bSmrg ;; 1118ac92798bSmrg none) 1119ac92798bSmrg am__tar=false 1120ac92798bSmrg am__tar_=false 1121ac92798bSmrg am__untar=false 1122ac92798bSmrg ;; 1123ac92798bSmrg esac 1124a966c04fSmrg 1125ac92798bSmrg # If the value was cached, stop now. We just wanted to have am__tar 1126ac92798bSmrg # and am__untar set. 1127ac92798bSmrg test -n "${am_cv_prog_tar_$1}" && break 1128ac92798bSmrg 1129ac92798bSmrg # tar/untar a dummy directory, and stop if the command works. 1130ac92798bSmrg rm -rf conftest.dir 1131ac92798bSmrg mkdir conftest.dir 1132ac92798bSmrg echo GrepMe > conftest.dir/file 1133ac92798bSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1134ac92798bSmrg rm -rf conftest.dir 1135ac92798bSmrg if test -s conftest.tar; then 1136ac92798bSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1137ac92798bSmrg AM_RUN_LOG([cat conftest.dir/file]) 1138ac92798bSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1139ac92798bSmrg fi 1140ac92798bSmrg done 1141ac92798bSmrg rm -rf conftest.dir 1142a966c04fSmrg 1143ac92798bSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1144ac92798bSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1145a966c04fSmrg 1146ac92798bSmrgAC_SUBST([am__tar]) 1147ac92798bSmrgAC_SUBST([am__untar]) 1148ac92798bSmrg]) # _AM_PROG_TAR 1149a966c04fSmrg 1150ac92798bSmrgm4_include([m4/ax_define_dir.m4]) 115197cf2ee2Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 115297cf2ee2Smrg# 115397cf2ee2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1154ac92798bSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1155ac92798bSmrg# Foundation, Inc. 115697cf2ee2Smrg# Written by Gordon Matzigkeit, 1996 115797cf2ee2Smrg# 115897cf2ee2Smrg# This file is free software; the Free Software Foundation gives 115997cf2ee2Smrg# unlimited permission to copy and/or distribute it, with or without 116097cf2ee2Smrg# modifications, as long as this notice is preserved. 1161a966c04fSmrg 116297cf2ee2Smrgm4_define([_LT_COPYING], [dnl 116397cf2ee2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1164ac92798bSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1165ac92798bSmrg# Foundation, Inc. 116697cf2ee2Smrg# Written by Gordon Matzigkeit, 1996 116797cf2ee2Smrg# 116897cf2ee2Smrg# This file is part of GNU Libtool. 116997cf2ee2Smrg# 117097cf2ee2Smrg# GNU Libtool is free software; you can redistribute it and/or 117197cf2ee2Smrg# modify it under the terms of the GNU General Public License as 117297cf2ee2Smrg# published by the Free Software Foundation; either version 2 of 117397cf2ee2Smrg# the License, or (at your option) any later version. 117497cf2ee2Smrg# 117597cf2ee2Smrg# As a special exception to the GNU General Public License, 117697cf2ee2Smrg# if you distribute this file as part of a program or library that 117797cf2ee2Smrg# is built using GNU Libtool, you may include this file under the 117897cf2ee2Smrg# same distribution terms that you use for the rest of that program. 117997cf2ee2Smrg# 118097cf2ee2Smrg# GNU Libtool is distributed in the hope that it will be useful, 118197cf2ee2Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 118297cf2ee2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 118397cf2ee2Smrg# GNU General Public License for more details. 118497cf2ee2Smrg# 118597cf2ee2Smrg# You should have received a copy of the GNU General Public License 118697cf2ee2Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 118797cf2ee2Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 118897cf2ee2Smrg# obtained by writing to the Free Software Foundation, Inc., 118997cf2ee2Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 119097cf2ee2Smrg]) 1191a966c04fSmrg 119297cf2ee2Smrg# serial 57 LT_INIT 1193a966c04fSmrg 1194a966c04fSmrg 119597cf2ee2Smrg# LT_PREREQ(VERSION) 119697cf2ee2Smrg# ------------------ 119797cf2ee2Smrg# Complain and exit if this libtool version is less that VERSION. 119897cf2ee2Smrgm4_defun([LT_PREREQ], 119997cf2ee2Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 120097cf2ee2Smrg [m4_default([$3], 120197cf2ee2Smrg [m4_fatal([Libtool version $1 or higher is required], 120297cf2ee2Smrg 63)])], 120397cf2ee2Smrg [$2])]) 1204a966c04fSmrg 1205a966c04fSmrg 120697cf2ee2Smrg# _LT_CHECK_BUILDDIR 120797cf2ee2Smrg# ------------------ 120897cf2ee2Smrg# Complain if the absolute build directory name contains unusual characters 120997cf2ee2Smrgm4_defun([_LT_CHECK_BUILDDIR], 121097cf2ee2Smrg[case `pwd` in 121197cf2ee2Smrg *\ * | *\ *) 121297cf2ee2Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 121397cf2ee2Smrgesac 121497cf2ee2Smrg]) 1215a966c04fSmrg 1216a966c04fSmrg 121797cf2ee2Smrg# LT_INIT([OPTIONS]) 121897cf2ee2Smrg# ------------------ 121997cf2ee2SmrgAC_DEFUN([LT_INIT], 122097cf2ee2Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 122197cf2ee2SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 122297cf2ee2SmrgAC_BEFORE([$0], [LT_LANG])dnl 122397cf2ee2SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 122497cf2ee2SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 122597cf2ee2Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 12266e7d3316Smrg 122797cf2ee2Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 122897cf2ee2Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 122997cf2ee2Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 123097cf2ee2Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 123197cf2ee2Smrgdnl unless we require an AC_DEFUNed macro: 123297cf2ee2SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 123397cf2ee2SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 123497cf2ee2SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 123597cf2ee2SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 123697cf2ee2Smrgm4_require([_LT_PROG_LTMAIN])dnl 1237a966c04fSmrg 123897cf2ee2Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1239a966c04fSmrg 124097cf2ee2Smrgdnl Parse OPTIONS 124197cf2ee2Smrg_LT_SET_OPTIONS([$0], [$1]) 1242a966c04fSmrg 124397cf2ee2Smrg# This can be used to rebuild libtool when needed 124497cf2ee2SmrgLIBTOOL_DEPS="$ltmain" 1245a966c04fSmrg 124697cf2ee2Smrg# Always use our own libtool. 124797cf2ee2SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 124897cf2ee2SmrgAC_SUBST(LIBTOOL)dnl 1249a966c04fSmrg 125097cf2ee2Smrg_LT_SETUP 1251a966c04fSmrg 125297cf2ee2Smrg# Only expand once: 125397cf2ee2Smrgm4_define([LT_INIT]) 125497cf2ee2Smrg])# LT_INIT 1255a966c04fSmrg 125697cf2ee2Smrg# Old names: 125797cf2ee2SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 125897cf2ee2SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 125997cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 126097cf2ee2Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 126197cf2ee2Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1262a966c04fSmrg 12636e7d3316Smrg 126497cf2ee2Smrg# _LT_CC_BASENAME(CC) 126597cf2ee2Smrg# ------------------- 126697cf2ee2Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 126797cf2ee2Smrgm4_defun([_LT_CC_BASENAME], 126897cf2ee2Smrg[for cc_temp in $1""; do 126997cf2ee2Smrg case $cc_temp in 127097cf2ee2Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 127197cf2ee2Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 127297cf2ee2Smrg \-*) ;; 127397cf2ee2Smrg *) break;; 127497cf2ee2Smrg esac 127597cf2ee2Smrgdone 127697cf2ee2Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 127797cf2ee2Smrg]) 12786e7d3316Smrg 12796e7d3316Smrg 128097cf2ee2Smrg# _LT_FILEUTILS_DEFAULTS 128197cf2ee2Smrg# ---------------------- 128297cf2ee2Smrg# It is okay to use these file commands and assume they have been set 128397cf2ee2Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 128497cf2ee2Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 128597cf2ee2Smrg[: ${CP="cp -f"} 128697cf2ee2Smrg: ${MV="mv -f"} 128797cf2ee2Smrg: ${RM="rm -f"} 128897cf2ee2Smrg])# _LT_FILEUTILS_DEFAULTS 12896e7d3316Smrg 12906e7d3316Smrg 129197cf2ee2Smrg# _LT_SETUP 129297cf2ee2Smrg# --------- 129397cf2ee2Smrgm4_defun([_LT_SETUP], 129497cf2ee2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 129597cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 129697cf2ee2SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 129797cf2ee2SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 129897cf2ee2Smrg 1299ac92798bSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1300ac92798bSmrgdnl 130197cf2ee2Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 130297cf2ee2Smrg_LT_DECL([], [host], [0])dnl 130397cf2ee2Smrg_LT_DECL([], [host_os], [0])dnl 130497cf2ee2Smrgdnl 130597cf2ee2Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 130697cf2ee2Smrg_LT_DECL([], [build], [0])dnl 130797cf2ee2Smrg_LT_DECL([], [build_os], [0])dnl 130897cf2ee2Smrgdnl 130997cf2ee2SmrgAC_REQUIRE([AC_PROG_CC])dnl 131097cf2ee2SmrgAC_REQUIRE([LT_PATH_LD])dnl 131197cf2ee2SmrgAC_REQUIRE([LT_PATH_NM])dnl 131297cf2ee2Smrgdnl 131397cf2ee2SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 131497cf2ee2Smrgtest -z "$LN_S" && LN_S="ln -s" 131597cf2ee2Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 131697cf2ee2Smrgdnl 131797cf2ee2SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 131897cf2ee2Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 131997cf2ee2Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 132097cf2ee2Smrgdnl 132197cf2ee2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 132297cf2ee2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 132397cf2ee2Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 132497cf2ee2Smrgm4_require([_LT_CMD_RELOAD])dnl 132597cf2ee2Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 132697cf2ee2Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 132797cf2ee2Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 132897cf2ee2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 132997cf2ee2Smrgm4_require([_LT_WITH_SYSROOT])dnl 133097cf2ee2Smrg 133197cf2ee2Smrg_LT_CONFIG_LIBTOOL_INIT([ 133297cf2ee2Smrg# See if we are running on zsh, and set the options which allow our 133397cf2ee2Smrg# commands through without removal of \ escapes INIT. 133497cf2ee2Smrgif test -n "\${ZSH_VERSION+set}" ; then 133597cf2ee2Smrg setopt NO_GLOB_SUBST 133697cf2ee2Smrgfi 133797cf2ee2Smrg]) 133897cf2ee2Smrgif test -n "${ZSH_VERSION+set}" ; then 133997cf2ee2Smrg setopt NO_GLOB_SUBST 13406e7d3316Smrgfi 13416e7d3316Smrg 134297cf2ee2Smrg_LT_CHECK_OBJDIR 13436e7d3316Smrg 134497cf2ee2Smrgm4_require([_LT_TAG_COMPILER])dnl 13456e7d3316Smrg 134697cf2ee2Smrgcase $host_os in 134797cf2ee2Smrgaix3*) 134897cf2ee2Smrg # AIX sometimes has problems with the GCC collect2 program. For some 134997cf2ee2Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 135097cf2ee2Smrg # vanish in a puff of smoke. 135197cf2ee2Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 135297cf2ee2Smrg COLLECT_NAMES= 135397cf2ee2Smrg export COLLECT_NAMES 135497cf2ee2Smrg fi 135597cf2ee2Smrg ;; 135697cf2ee2Smrgesac 13576e7d3316Smrg 135897cf2ee2Smrg# Global variables: 135997cf2ee2Smrgofile=libtool 136097cf2ee2Smrgcan_build_shared=yes 13616e7d3316Smrg 136297cf2ee2Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 136397cf2ee2Smrg# which needs '.lib'). 136497cf2ee2Smrglibext=a 13656e7d3316Smrg 136697cf2ee2Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 13676e7d3316Smrg 136897cf2ee2Smrgold_CC="$CC" 136997cf2ee2Smrgold_CFLAGS="$CFLAGS" 13706e7d3316Smrg 137197cf2ee2Smrg# Set sane defaults for various variables 137297cf2ee2Smrgtest -z "$CC" && CC=cc 137397cf2ee2Smrgtest -z "$LTCC" && LTCC=$CC 137497cf2ee2Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 137597cf2ee2Smrgtest -z "$LD" && LD=ld 137697cf2ee2Smrgtest -z "$ac_objext" && ac_objext=o 13776e7d3316Smrg 137897cf2ee2Smrg_LT_CC_BASENAME([$compiler]) 13796e7d3316Smrg 138097cf2ee2Smrg# Only perform the check for file, if the check method requires it 138197cf2ee2Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 138297cf2ee2Smrgcase $deplibs_check_method in 138397cf2ee2Smrgfile_magic*) 138497cf2ee2Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 138597cf2ee2Smrg _LT_PATH_MAGIC 138697cf2ee2Smrg fi 138797cf2ee2Smrg ;; 138897cf2ee2Smrgesac 13896e7d3316Smrg 139097cf2ee2Smrg# Use C for the default configuration in the libtool script 139197cf2ee2SmrgLT_SUPPORTED_TAG([CC]) 139297cf2ee2Smrg_LT_LANG_C_CONFIG 139397cf2ee2Smrg_LT_LANG_DEFAULT_CONFIG 139497cf2ee2Smrg_LT_CONFIG_COMMANDS 139597cf2ee2Smrg])# _LT_SETUP 13966e7d3316Smrg 1397a966c04fSmrg 139897cf2ee2Smrg# _LT_PREPARE_SED_QUOTE_VARS 139997cf2ee2Smrg# -------------------------- 140097cf2ee2Smrg# Define a few sed substitution that help us do robust quoting. 140197cf2ee2Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 140297cf2ee2Smrg[# Backslashify metacharacters that are still active within 140397cf2ee2Smrg# double-quoted strings. 140497cf2ee2Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1405a966c04fSmrg 140697cf2ee2Smrg# Same as above, but do not quote variable references. 140797cf2ee2Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1408a966c04fSmrg 140997cf2ee2Smrg# Sed substitution to delay expansion of an escaped shell variable in a 141097cf2ee2Smrg# double_quote_subst'ed string. 141197cf2ee2Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1412a966c04fSmrg 141397cf2ee2Smrg# Sed substitution to delay expansion of an escaped single quote. 141497cf2ee2Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1415a966c04fSmrg 141697cf2ee2Smrg# Sed substitution to avoid accidental globbing in evaled expressions 141797cf2ee2Smrgno_glob_subst='s/\*/\\\*/g' 141897cf2ee2Smrg]) 14196e7d3316Smrg 142097cf2ee2Smrg# _LT_PROG_LTMAIN 142197cf2ee2Smrg# --------------- 142297cf2ee2Smrg# Note that this code is called both from `configure', and `config.status' 142397cf2ee2Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 142497cf2ee2Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 142597cf2ee2Smrg# so we pass a copy along to make sure it has a sensible value anyway. 142697cf2ee2Smrgm4_defun([_LT_PROG_LTMAIN], 142797cf2ee2Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 142897cf2ee2Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 142997cf2ee2Smrgltmain="$ac_aux_dir/ltmain.sh" 143097cf2ee2Smrg])# _LT_PROG_LTMAIN 14316e7d3316Smrg 14326e7d3316Smrg 1433a966c04fSmrg 143497cf2ee2Smrg# So that we can recreate a full libtool script including additional 143597cf2ee2Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 143697cf2ee2Smrg# in macros and then make a single call at the end using the `libtool' 143797cf2ee2Smrg# label. 1438a966c04fSmrg 1439a966c04fSmrg 144097cf2ee2Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 144197cf2ee2Smrg# ---------------------------------------- 144297cf2ee2Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 144397cf2ee2Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 144497cf2ee2Smrg[m4_ifval([$1], 144597cf2ee2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 144697cf2ee2Smrg [$1 144797cf2ee2Smrg])])]) 1448a966c04fSmrg 144997cf2ee2Smrg# Initialize. 145097cf2ee2Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 14516e7d3316Smrg 14526e7d3316Smrg 145397cf2ee2Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 145497cf2ee2Smrg# ------------------------------ 145597cf2ee2Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 145697cf2ee2Smrgm4_define([_LT_CONFIG_LIBTOOL], 145797cf2ee2Smrg[m4_ifval([$1], 145897cf2ee2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 145997cf2ee2Smrg [$1 146097cf2ee2Smrg])])]) 1461a966c04fSmrg 146297cf2ee2Smrg# Initialize. 146397cf2ee2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1464a966c04fSmrg 14652e2dd055Smrg 146697cf2ee2Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 146797cf2ee2Smrg# ----------------------------------------------------- 146897cf2ee2Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 146997cf2ee2Smrg[_LT_CONFIG_LIBTOOL([$1]) 147097cf2ee2Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 147197cf2ee2Smrg]) 14722e2dd055Smrg 14732e2dd055Smrg 147497cf2ee2Smrg# _LT_FORMAT_COMMENT([COMMENT]) 147597cf2ee2Smrg# ----------------------------- 147697cf2ee2Smrg# Add leading comment marks to the start of each line, and a trailing 147797cf2ee2Smrg# full-stop to the whole comment if one is not present already. 147897cf2ee2Smrgm4_define([_LT_FORMAT_COMMENT], 147997cf2ee2Smrg[m4_ifval([$1], [ 148097cf2ee2Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 148197cf2ee2Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 148297cf2ee2Smrg)]) 14836e7d3316Smrg 1484a966c04fSmrg 148597cf2ee2Smrg 148697cf2ee2Smrg 148797cf2ee2Smrg 148897cf2ee2Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 148997cf2ee2Smrg# ------------------------------------------------------------------- 149097cf2ee2Smrg# CONFIGNAME is the name given to the value in the libtool script. 149197cf2ee2Smrg# VARNAME is the (base) name used in the configure script. 149297cf2ee2Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 149397cf2ee2Smrg# VARNAME. Any other value will be used directly. 149497cf2ee2Smrgm4_define([_LT_DECL], 149597cf2ee2Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 149697cf2ee2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 149797cf2ee2Smrg [m4_ifval([$1], [$1], [$2])]) 149897cf2ee2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 149997cf2ee2Smrg m4_ifval([$4], 150097cf2ee2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 150197cf2ee2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 150297cf2ee2Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 1503a966c04fSmrg]) 1504a966c04fSmrg 15052e2dd055Smrg 150697cf2ee2Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 150797cf2ee2Smrg# -------------------------------------------------------- 150897cf2ee2Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1509a966c04fSmrg 1510a966c04fSmrg 151197cf2ee2Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 151297cf2ee2Smrg# ------------------------------------------------ 151397cf2ee2Smrgm4_define([lt_decl_tag_varnames], 151497cf2ee2Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 1515a966c04fSmrg 1516a966c04fSmrg 151797cf2ee2Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 151897cf2ee2Smrg# --------------------------------------------------------- 151997cf2ee2Smrgm4_define([_lt_decl_filter], 152097cf2ee2Smrg[m4_case([$#], 152197cf2ee2Smrg [0], [m4_fatal([$0: too few arguments: $#])], 152297cf2ee2Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 152397cf2ee2Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 152497cf2ee2Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 152597cf2ee2Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 152697cf2ee2Smrg]) 1527a966c04fSmrg 1528a966c04fSmrg 152997cf2ee2Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 153097cf2ee2Smrg# -------------------------------------------------- 153197cf2ee2Smrgm4_define([lt_decl_quote_varnames], 153297cf2ee2Smrg[_lt_decl_filter([value], [1], $@)]) 1533a966c04fSmrg 15346e7d3316Smrg 153597cf2ee2Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 153697cf2ee2Smrg# --------------------------------------------------- 153797cf2ee2Smrgm4_define([lt_decl_dquote_varnames], 153897cf2ee2Smrg[_lt_decl_filter([value], [2], $@)]) 1539a966c04fSmrg 1540a966c04fSmrg 154197cf2ee2Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 154297cf2ee2Smrg# --------------------------------------------------- 154397cf2ee2Smrgm4_define([lt_decl_varnames_tagged], 154497cf2ee2Smrg[m4_assert([$# <= 2])dnl 154597cf2ee2Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 154697cf2ee2Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 154797cf2ee2Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 154897cf2ee2Smrgm4_define([_lt_decl_varnames_tagged], 154997cf2ee2Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 15506e7d3316Smrg 15516e7d3316Smrg 155297cf2ee2Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 155397cf2ee2Smrg# ------------------------------------------------ 155497cf2ee2Smrgm4_define([lt_decl_all_varnames], 155597cf2ee2Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 155697cf2ee2Smrg m4_if([$2], [], 155797cf2ee2Smrg m4_quote(lt_decl_varnames), 155897cf2ee2Smrg m4_quote(m4_shift($@))))[]dnl 155997cf2ee2Smrg]) 156097cf2ee2Smrgm4_define([_lt_decl_all_varnames], 156197cf2ee2Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 156297cf2ee2Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 156397cf2ee2Smrg]) 15646e7d3316Smrg 15656e7d3316Smrg 156697cf2ee2Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 156797cf2ee2Smrg# ------------------------------------ 156897cf2ee2Smrg# Quote a variable value, and forward it to `config.status' so that its 156997cf2ee2Smrg# declaration there will have the same value as in `configure'. VARNAME 157097cf2ee2Smrg# must have a single quote delimited value for this to work. 157197cf2ee2Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 157297cf2ee2Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 15736e7d3316Smrg 15746e7d3316Smrg 157597cf2ee2Smrg# _LT_CONFIG_STATUS_DECLARATIONS 157697cf2ee2Smrg# ------------------------------ 157797cf2ee2Smrg# We delimit libtool config variables with single quotes, so when 157897cf2ee2Smrg# we write them to config.status, we have to be sure to quote all 157997cf2ee2Smrg# embedded single quotes properly. In configure, this macro expands 158097cf2ee2Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 158197cf2ee2Smrg# 158297cf2ee2Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 158397cf2ee2Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 158497cf2ee2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 158597cf2ee2Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 15866e7d3316Smrg 15876e7d3316Smrg 158897cf2ee2Smrg# _LT_LIBTOOL_TAGS 158997cf2ee2Smrg# ---------------- 159097cf2ee2Smrg# Output comment and list of tags supported by the script 159197cf2ee2Smrgm4_defun([_LT_LIBTOOL_TAGS], 159297cf2ee2Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 159397cf2ee2Smrgavailable_tags="_LT_TAGS"dnl 159497cf2ee2Smrg]) 15956e7d3316Smrg 159697cf2ee2Smrg 159797cf2ee2Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 159897cf2ee2Smrg# ----------------------------------- 159997cf2ee2Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 160097cf2ee2Smrg# expand to a commented shell variable setting: 16016e7d3316Smrg# 160297cf2ee2Smrg# # Some comment about what VAR is for. 160397cf2ee2Smrg# visible_name=$lt_internal_name 160497cf2ee2Smrgm4_define([_LT_LIBTOOL_DECLARE], 160597cf2ee2Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 160697cf2ee2Smrg [description])))[]dnl 160797cf2ee2Smrgm4_pushdef([_libtool_name], 160897cf2ee2Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 160997cf2ee2Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 161097cf2ee2Smrg [0], [_libtool_name=[$]$1], 161197cf2ee2Smrg [1], [_libtool_name=$lt_[]$1], 161297cf2ee2Smrg [2], [_libtool_name=$lt_[]$1], 161397cf2ee2Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 161497cf2ee2Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 16156e7d3316Smrg]) 16166e7d3316Smrg 16176e7d3316Smrg 161897cf2ee2Smrg# _LT_LIBTOOL_CONFIG_VARS 161997cf2ee2Smrg# ----------------------- 162097cf2ee2Smrg# Produce commented declarations of non-tagged libtool config variables 162197cf2ee2Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 162297cf2ee2Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 162397cf2ee2Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 162497cf2ee2Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 162597cf2ee2Smrg[m4_foreach([_lt_var], 162697cf2ee2Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 162797cf2ee2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 16286e7d3316Smrg 16296e7d3316Smrg 163097cf2ee2Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 163197cf2ee2Smrg# ------------------------- 163297cf2ee2Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 163397cf2ee2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 163497cf2ee2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 16356e7d3316Smrg 16366e7d3316Smrg 163797cf2ee2Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 163897cf2ee2Smrg# ------------------------------ 163997cf2ee2Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 16406e7d3316Smrg 16416e7d3316Smrg 164297cf2ee2Smrg# _LT_CONFIG_COMMANDS 164397cf2ee2Smrg# ------------------- 164497cf2ee2Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 164597cf2ee2Smrg# variables for single and double quote escaping we saved from calls 164697cf2ee2Smrg# to _LT_DECL, we can put quote escaped variables declarations 164797cf2ee2Smrg# into `config.status', and then the shell code to quote escape them in 164897cf2ee2Smrg# for loops in `config.status'. Finally, any additional code accumulated 164997cf2ee2Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 165097cf2ee2Smrgm4_defun([_LT_CONFIG_COMMANDS], 165197cf2ee2Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 165297cf2ee2Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 165397cf2ee2Smrg dnl instead of duplicating it all over again into config.status, 165497cf2ee2Smrg dnl then we will have config.status run $CONFIG_LT later, so it 165597cf2ee2Smrg dnl needs to know what name is stored there: 165697cf2ee2Smrg [AC_CONFIG_COMMANDS([libtool], 165797cf2ee2Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 165897cf2ee2Smrg dnl If the libtool generation code is destined for config.status, 165997cf2ee2Smrg dnl expand the accumulated commands and init code now: 166097cf2ee2Smrg [AC_CONFIG_COMMANDS([libtool], 166197cf2ee2Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 166297cf2ee2Smrg])#_LT_CONFIG_COMMANDS 16636e7d3316Smrg 16646e7d3316Smrg 166597cf2ee2Smrg# Initialize. 166697cf2ee2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 166797cf2ee2Smrg[ 16686e7d3316Smrg 166997cf2ee2Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 167097cf2ee2Smrg# if CDPATH is set. 167197cf2ee2Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 16726e7d3316Smrg 167397cf2ee2Smrgsed_quote_subst='$sed_quote_subst' 167497cf2ee2Smrgdouble_quote_subst='$double_quote_subst' 167597cf2ee2Smrgdelay_variable_subst='$delay_variable_subst' 167697cf2ee2Smrg_LT_CONFIG_STATUS_DECLARATIONS 167797cf2ee2SmrgLTCC='$LTCC' 167897cf2ee2SmrgLTCFLAGS='$LTCFLAGS' 167997cf2ee2Smrgcompiler='$compiler_DEFAULT' 16806e7d3316Smrg 168197cf2ee2Smrg# A function that is used when there is no print builtin or printf. 168297cf2ee2Smrgfunc_fallback_echo () 168397cf2ee2Smrg{ 168497cf2ee2Smrg eval 'cat <<_LTECHO_EOF 168597cf2ee2Smrg\$[]1 168697cf2ee2Smrg_LTECHO_EOF' 168797cf2ee2Smrg} 16886e7d3316Smrg 168997cf2ee2Smrg# Quote evaled strings. 169097cf2ee2Smrgfor var in lt_decl_all_varnames([[ \ 169197cf2ee2Smrg]], lt_decl_quote_varnames); do 169297cf2ee2Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 169397cf2ee2Smrg *[[\\\\\\\`\\"\\\$]]*) 169497cf2ee2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 169597cf2ee2Smrg ;; 169697cf2ee2Smrg *) 169797cf2ee2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 169897cf2ee2Smrg ;; 169997cf2ee2Smrg esac 17006e7d3316Smrgdone 17016e7d3316Smrg 170297cf2ee2Smrg# Double-quote double-evaled strings. 170397cf2ee2Smrgfor var in lt_decl_all_varnames([[ \ 170497cf2ee2Smrg]], lt_decl_dquote_varnames); do 170597cf2ee2Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 170697cf2ee2Smrg *[[\\\\\\\`\\"\\\$]]*) 170797cf2ee2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 170897cf2ee2Smrg ;; 170997cf2ee2Smrg *) 171097cf2ee2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 171197cf2ee2Smrg ;; 171297cf2ee2Smrg esac 171397cf2ee2Smrgdone 17146e7d3316Smrg 171597cf2ee2Smrg_LT_OUTPUT_LIBTOOL_INIT 171697cf2ee2Smrg]) 17176e7d3316Smrg 171897cf2ee2Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 171997cf2ee2Smrg# ------------------------------------ 172097cf2ee2Smrg# Generate a child script FILE with all initialization necessary to 172197cf2ee2Smrg# reuse the environment learned by the parent script, and make the 172297cf2ee2Smrg# file executable. If COMMENT is supplied, it is inserted after the 172397cf2ee2Smrg# `#!' sequence but before initialization text begins. After this 172497cf2ee2Smrg# macro, additional text can be appended to FILE to form the body of 172597cf2ee2Smrg# the child script. The macro ends with non-zero status if the 172697cf2ee2Smrg# file could not be fully written (such as if the disk is full). 172797cf2ee2Smrgm4_ifdef([AS_INIT_GENERATED], 172897cf2ee2Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 172997cf2ee2Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 173097cf2ee2Smrg[m4_require([AS_PREPARE])]dnl 173197cf2ee2Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 173297cf2ee2Smrg[lt_write_fail=0 173397cf2ee2Smrgcat >$1 <<_ASEOF || lt_write_fail=1 173497cf2ee2Smrg#! $SHELL 173597cf2ee2Smrg# Generated by $as_me. 173697cf2ee2Smrg$2 173797cf2ee2SmrgSHELL=\${CONFIG_SHELL-$SHELL} 173897cf2ee2Smrgexport SHELL 173997cf2ee2Smrg_ASEOF 174097cf2ee2Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 174197cf2ee2SmrgAS_SHELL_SANITIZE 174297cf2ee2Smrg_AS_PREPARE 174397cf2ee2Smrgexec AS_MESSAGE_FD>&1 174497cf2ee2Smrg_ASEOF 174597cf2ee2Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 174697cf2ee2Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 17476e7d3316Smrg 174897cf2ee2Smrg# LT_OUTPUT 17496e7d3316Smrg# --------- 175097cf2ee2Smrg# This macro allows early generation of the libtool script (before 175197cf2ee2Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 175297cf2ee2Smrg# tests. 175397cf2ee2SmrgAC_DEFUN([LT_OUTPUT], 175497cf2ee2Smrg[: ${CONFIG_LT=./config.lt} 175597cf2ee2SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 175697cf2ee2Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 175797cf2ee2Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 1758a966c04fSmrg 175997cf2ee2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 176097cf2ee2Smrglt_cl_silent=false 176197cf2ee2Smrgexec AS_MESSAGE_LOG_FD>>config.log 176297cf2ee2Smrg{ 176397cf2ee2Smrg echo 176497cf2ee2Smrg AS_BOX([Running $as_me.]) 176597cf2ee2Smrg} >&AS_MESSAGE_LOG_FD 17666e7d3316Smrg 176797cf2ee2Smrglt_cl_help="\ 176897cf2ee2Smrg\`$as_me' creates a local libtool stub from the current configuration, 176997cf2ee2Smrgfor use in further configure time tests before the real libtool is 177097cf2ee2Smrggenerated. 17716e7d3316Smrg 177297cf2ee2SmrgUsage: $[0] [[OPTIONS]] 1773a966c04fSmrg 177497cf2ee2Smrg -h, --help print this help, then exit 177597cf2ee2Smrg -V, --version print version number, then exit 177697cf2ee2Smrg -q, --quiet do not print progress messages 177797cf2ee2Smrg -d, --debug don't remove temporary files 1778a966c04fSmrg 177997cf2ee2SmrgReport bugs to <bug-libtool@gnu.org>." 1780a966c04fSmrg 178197cf2ee2Smrglt_cl_version="\ 178297cf2ee2Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 178397cf2ee2Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 178497cf2ee2Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1785a966c04fSmrg 1786ac92798bSmrgCopyright (C) 2011 Free Software Foundation, Inc. 178797cf2ee2SmrgThis config.lt script is free software; the Free Software Foundation 178897cf2ee2Smrggives unlimited permision to copy, distribute and modify it." 1789a966c04fSmrg 179097cf2ee2Smrgwhile test $[#] != 0 179197cf2ee2Smrgdo 179297cf2ee2Smrg case $[1] in 179397cf2ee2Smrg --version | --v* | -V ) 179497cf2ee2Smrg echo "$lt_cl_version"; exit 0 ;; 179597cf2ee2Smrg --help | --h* | -h ) 179697cf2ee2Smrg echo "$lt_cl_help"; exit 0 ;; 179797cf2ee2Smrg --debug | --d* | -d ) 179897cf2ee2Smrg debug=: ;; 179997cf2ee2Smrg --quiet | --q* | --silent | --s* | -q ) 180097cf2ee2Smrg lt_cl_silent=: ;; 1801a966c04fSmrg 180297cf2ee2Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 180397cf2ee2SmrgTry \`$[0] --help' for more information.]) ;; 1804a966c04fSmrg 180597cf2ee2Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 180697cf2ee2SmrgTry \`$[0] --help' for more information.]) ;; 180797cf2ee2Smrg esac 180897cf2ee2Smrg shift 180997cf2ee2Smrgdone 1810a966c04fSmrg 181197cf2ee2Smrgif $lt_cl_silent; then 181297cf2ee2Smrg exec AS_MESSAGE_FD>/dev/null 181397cf2ee2Smrgfi 181497cf2ee2Smrg_LTEOF 1815a966c04fSmrg 181697cf2ee2Smrgcat >>"$CONFIG_LT" <<_LTEOF 181797cf2ee2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 181897cf2ee2Smrg_LTEOF 1819a966c04fSmrg 182097cf2ee2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 182197cf2ee2SmrgAC_MSG_NOTICE([creating $ofile]) 182297cf2ee2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 182397cf2ee2SmrgAS_EXIT(0) 182497cf2ee2Smrg_LTEOF 182597cf2ee2Smrgchmod +x "$CONFIG_LT" 18262e2dd055Smrg 182797cf2ee2Smrg# configure is writing to config.log, but config.lt does its own redirection, 182897cf2ee2Smrg# appending to config.log, which fails on DOS, as config.log is still kept 182997cf2ee2Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 183097cf2ee2Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 183197cf2ee2Smrglt_cl_success=: 183297cf2ee2Smrgtest "$silent" = yes && 183397cf2ee2Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 183497cf2ee2Smrgexec AS_MESSAGE_LOG_FD>/dev/null 183597cf2ee2Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 183697cf2ee2Smrgexec AS_MESSAGE_LOG_FD>>config.log 183797cf2ee2Smrg$lt_cl_success || AS_EXIT(1) 183897cf2ee2Smrg])# LT_OUTPUT 1839a966c04fSmrg 1840a966c04fSmrg 184197cf2ee2Smrg# _LT_CONFIG(TAG) 184297cf2ee2Smrg# --------------- 184397cf2ee2Smrg# If TAG is the built-in tag, create an initial libtool script with a 184497cf2ee2Smrg# default configuration from the untagged config vars. Otherwise add code 184597cf2ee2Smrg# to config.status for appending the configuration named by TAG from the 184697cf2ee2Smrg# matching tagged config vars. 184797cf2ee2Smrgm4_defun([_LT_CONFIG], 184897cf2ee2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 184997cf2ee2Smrg_LT_CONFIG_SAVE_COMMANDS([ 185097cf2ee2Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 185197cf2ee2Smrg m4_if(_LT_TAG, [C], [ 185297cf2ee2Smrg # See if we are running on zsh, and set the options which allow our 185397cf2ee2Smrg # commands through without removal of \ escapes. 185497cf2ee2Smrg if test -n "${ZSH_VERSION+set}" ; then 185597cf2ee2Smrg setopt NO_GLOB_SUBST 185697cf2ee2Smrg fi 1857a966c04fSmrg 185897cf2ee2Smrg cfgfile="${ofile}T" 185997cf2ee2Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 186097cf2ee2Smrg $RM "$cfgfile" 1861a966c04fSmrg 186297cf2ee2Smrg cat <<_LT_EOF >> "$cfgfile" 186397cf2ee2Smrg#! $SHELL 1864a966c04fSmrg 186597cf2ee2Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 186697cf2ee2Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 186797cf2ee2Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 186897cf2ee2Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 186997cf2ee2Smrg# 187097cf2ee2Smrg_LT_COPYING 187197cf2ee2Smrg_LT_LIBTOOL_TAGS 1872a966c04fSmrg 187397cf2ee2Smrg# ### BEGIN LIBTOOL CONFIG 187497cf2ee2Smrg_LT_LIBTOOL_CONFIG_VARS 187597cf2ee2Smrg_LT_LIBTOOL_TAG_VARS 187697cf2ee2Smrg# ### END LIBTOOL CONFIG 1877a966c04fSmrg 187897cf2ee2Smrg_LT_EOF 1879a966c04fSmrg 188097cf2ee2Smrg case $host_os in 188197cf2ee2Smrg aix3*) 188297cf2ee2Smrg cat <<\_LT_EOF >> "$cfgfile" 188397cf2ee2Smrg# AIX sometimes has problems with the GCC collect2 program. For some 188497cf2ee2Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 188597cf2ee2Smrg# vanish in a puff of smoke. 188697cf2ee2Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 188797cf2ee2Smrg COLLECT_NAMES= 188897cf2ee2Smrg export COLLECT_NAMES 188997cf2ee2Smrgfi 189097cf2ee2Smrg_LT_EOF 189197cf2ee2Smrg ;; 189297cf2ee2Smrg esac 1893a966c04fSmrg 189497cf2ee2Smrg _LT_PROG_LTMAIN 1895a966c04fSmrg 189697cf2ee2Smrg # We use sed instead of cat because bash on DJGPP gets confused if 189797cf2ee2Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 189897cf2ee2Smrg # text mode, it properly converts lines to CR/LF. This bash problem 189997cf2ee2Smrg # is reportedly fixed, but why not run on old versions too? 190097cf2ee2Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 190197cf2ee2Smrg || (rm -f "$cfgfile"; exit 1) 19026e7d3316Smrg 190397cf2ee2Smrg _LT_PROG_REPLACE_SHELLFNS 19046e7d3316Smrg 190597cf2ee2Smrg mv -f "$cfgfile" "$ofile" || 190697cf2ee2Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 190797cf2ee2Smrg chmod +x "$ofile" 190897cf2ee2Smrg], 190997cf2ee2Smrg[cat <<_LT_EOF >> "$ofile" 19106e7d3316Smrg 191197cf2ee2Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 191297cf2ee2Smrgdnl in a comment (ie after a #). 191397cf2ee2Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 191497cf2ee2Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 191597cf2ee2Smrg# ### END LIBTOOL TAG CONFIG: $1 191697cf2ee2Smrg_LT_EOF 191797cf2ee2Smrg])dnl /m4_if 191897cf2ee2Smrg], 191997cf2ee2Smrg[m4_if([$1], [], [ 192097cf2ee2Smrg PACKAGE='$PACKAGE' 192197cf2ee2Smrg VERSION='$VERSION' 192297cf2ee2Smrg TIMESTAMP='$TIMESTAMP' 192397cf2ee2Smrg RM='$RM' 192497cf2ee2Smrg ofile='$ofile'], []) 192597cf2ee2Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 192697cf2ee2Smrg])# _LT_CONFIG 19276e7d3316Smrg 19286e7d3316Smrg 192997cf2ee2Smrg# LT_SUPPORTED_TAG(TAG) 193097cf2ee2Smrg# --------------------- 193197cf2ee2Smrg# Trace this macro to discover what tags are supported by the libtool 193297cf2ee2Smrg# --tag option, using: 193397cf2ee2Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 193497cf2ee2SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 19356e7d3316Smrg 19366e7d3316Smrg 193797cf2ee2Smrg# C support is built-in for now 193897cf2ee2Smrgm4_define([_LT_LANG_C_enabled], []) 193997cf2ee2Smrgm4_define([_LT_TAGS], []) 1940a966c04fSmrg 1941a966c04fSmrg 194297cf2ee2Smrg# LT_LANG(LANG) 194397cf2ee2Smrg# ------------- 194497cf2ee2Smrg# Enable libtool support for the given language if not already enabled. 194597cf2ee2SmrgAC_DEFUN([LT_LANG], 194697cf2ee2Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 194797cf2ee2Smrgm4_case([$1], 194897cf2ee2Smrg [C], [_LT_LANG(C)], 194997cf2ee2Smrg [C++], [_LT_LANG(CXX)], 1950ac92798bSmrg [Go], [_LT_LANG(GO)], 195197cf2ee2Smrg [Java], [_LT_LANG(GCJ)], 195297cf2ee2Smrg [Fortran 77], [_LT_LANG(F77)], 195397cf2ee2Smrg [Fortran], [_LT_LANG(FC)], 195497cf2ee2Smrg [Windows Resource], [_LT_LANG(RC)], 195597cf2ee2Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 195697cf2ee2Smrg [_LT_LANG($1)], 195797cf2ee2Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 195897cf2ee2Smrg])# LT_LANG 19596e7d3316Smrg 19606e7d3316Smrg 196197cf2ee2Smrg# _LT_LANG(LANGNAME) 196297cf2ee2Smrg# ------------------ 196397cf2ee2Smrgm4_defun([_LT_LANG], 196497cf2ee2Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 196597cf2ee2Smrg [LT_SUPPORTED_TAG([$1])dnl 196697cf2ee2Smrg m4_append([_LT_TAGS], [$1 ])dnl 196797cf2ee2Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 196897cf2ee2Smrg _LT_LANG_$1_CONFIG($1)])dnl 196997cf2ee2Smrg])# _LT_LANG 19706e7d3316Smrg 19716e7d3316Smrg 1972ac92798bSmrgm4_ifndef([AC_PROG_GO], [ 1973ac92798bSmrg# NOTE: This macro has been submitted for inclusion into # 1974ac92798bSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 1975ac92798bSmrg# a released version of Autoconf we should remove this # 1976ac92798bSmrg# macro and use it instead. # 1977ac92798bSmrgm4_defun([AC_PROG_GO], 1978ac92798bSmrg[AC_LANG_PUSH(Go)dnl 1979ac92798bSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 1980ac92798bSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1981ac92798bSmrg_AC_ARG_VAR_LDFLAGS()dnl 1982ac92798bSmrgAC_CHECK_TOOL(GOC, gccgo) 1983ac92798bSmrgif test -z "$GOC"; then 1984ac92798bSmrg if test -n "$ac_tool_prefix"; then 1985ac92798bSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1986ac92798bSmrg fi 1987ac92798bSmrgfi 1988ac92798bSmrgif test -z "$GOC"; then 1989ac92798bSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1990ac92798bSmrgfi 1991ac92798bSmrg])#m4_defun 1992ac92798bSmrg])#m4_ifndef 1993ac92798bSmrg 1994ac92798bSmrg 199597cf2ee2Smrg# _LT_LANG_DEFAULT_CONFIG 199697cf2ee2Smrg# ----------------------- 199797cf2ee2Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 199897cf2ee2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 199997cf2ee2Smrg [LT_LANG(CXX)], 200097cf2ee2Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 20016e7d3316Smrg 200297cf2ee2SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 200397cf2ee2Smrg [LT_LANG(F77)], 200497cf2ee2Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2005a966c04fSmrg 200697cf2ee2SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 200797cf2ee2Smrg [LT_LANG(FC)], 200897cf2ee2Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2009a966c04fSmrg 201097cf2ee2Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 201197cf2ee2Smrgdnl pulling things in needlessly. 201297cf2ee2SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 201397cf2ee2Smrg [LT_LANG(GCJ)], 201497cf2ee2Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 201597cf2ee2Smrg [LT_LANG(GCJ)], 201697cf2ee2Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 201797cf2ee2Smrg [LT_LANG(GCJ)], 201897cf2ee2Smrg [m4_ifdef([AC_PROG_GCJ], 201997cf2ee2Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 202097cf2ee2Smrg m4_ifdef([A][M_PROG_GCJ], 202197cf2ee2Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 202297cf2ee2Smrg m4_ifdef([LT_PROG_GCJ], 202397cf2ee2Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 20246e7d3316Smrg 2025ac92798bSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 2026ac92798bSmrg [LT_LANG(GO)], 2027ac92798bSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 2028ac92798bSmrg 202997cf2ee2SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 203097cf2ee2Smrg [LT_LANG(RC)], 203197cf2ee2Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 203297cf2ee2Smrg])# _LT_LANG_DEFAULT_CONFIG 20336e7d3316Smrg 203497cf2ee2Smrg# Obsolete macros: 203597cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 203697cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 203797cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 203897cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 203997cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 204097cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 204197cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 204297cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 204397cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 204497cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 204597cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 20466e7d3316Smrg 20476e7d3316Smrg 204897cf2ee2Smrg# _LT_TAG_COMPILER 204997cf2ee2Smrg# ---------------- 205097cf2ee2Smrgm4_defun([_LT_TAG_COMPILER], 205197cf2ee2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 20526e7d3316Smrg 205397cf2ee2Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 205497cf2ee2Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 205597cf2ee2Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 205697cf2ee2Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 20576e7d3316Smrg 205897cf2ee2Smrg# If no C compiler was specified, use CC. 205997cf2ee2SmrgLTCC=${LTCC-"$CC"} 20606e7d3316Smrg 206197cf2ee2Smrg# If no C compiler flags were specified, use CFLAGS. 206297cf2ee2SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 20636e7d3316Smrg 206497cf2ee2Smrg# Allow CC to be a program name with arguments. 206597cf2ee2Smrgcompiler=$CC 206697cf2ee2Smrg])# _LT_TAG_COMPILER 20676e7d3316Smrg 20686e7d3316Smrg 206997cf2ee2Smrg# _LT_COMPILER_BOILERPLATE 207097cf2ee2Smrg# ------------------------ 207197cf2ee2Smrg# Check for compiler boilerplate output or warnings with 207297cf2ee2Smrg# the simple compiler test code. 207397cf2ee2Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 207497cf2ee2Smrg[m4_require([_LT_DECL_SED])dnl 207597cf2ee2Smrgac_outfile=conftest.$ac_objext 207697cf2ee2Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 207797cf2ee2Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 207897cf2ee2Smrg_lt_compiler_boilerplate=`cat conftest.err` 207997cf2ee2Smrg$RM conftest* 208097cf2ee2Smrg])# _LT_COMPILER_BOILERPLATE 20816e7d3316Smrg 20826e7d3316Smrg 208397cf2ee2Smrg# _LT_LINKER_BOILERPLATE 208497cf2ee2Smrg# ---------------------- 208597cf2ee2Smrg# Check for linker boilerplate output or warnings with 208697cf2ee2Smrg# the simple link test code. 208797cf2ee2Smrgm4_defun([_LT_LINKER_BOILERPLATE], 208897cf2ee2Smrg[m4_require([_LT_DECL_SED])dnl 208997cf2ee2Smrgac_outfile=conftest.$ac_objext 209097cf2ee2Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 209197cf2ee2Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 209297cf2ee2Smrg_lt_linker_boilerplate=`cat conftest.err` 209397cf2ee2Smrg$RM -r conftest* 209497cf2ee2Smrg])# _LT_LINKER_BOILERPLATE 20956e7d3316Smrg 209697cf2ee2Smrg# _LT_REQUIRED_DARWIN_CHECKS 209797cf2ee2Smrg# ------------------------- 209897cf2ee2Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 209997cf2ee2Smrg case $host_os in 210097cf2ee2Smrg rhapsody* | darwin*) 210197cf2ee2Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 210297cf2ee2Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 210397cf2ee2Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 210497cf2ee2Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 210597cf2ee2Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 210697cf2ee2Smrg _LT_DECL([], [DSYMUTIL], [1], 210797cf2ee2Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 210897cf2ee2Smrg _LT_DECL([], [NMEDIT], [1], 210997cf2ee2Smrg [Tool to change global to local symbols on Mac OS X]) 211097cf2ee2Smrg _LT_DECL([], [LIPO], [1], 211197cf2ee2Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 211297cf2ee2Smrg _LT_DECL([], [OTOOL], [1], 211397cf2ee2Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 211497cf2ee2Smrg _LT_DECL([], [OTOOL64], [1], 211597cf2ee2Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 21166e7d3316Smrg 211797cf2ee2Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 211897cf2ee2Smrg [lt_cv_apple_cc_single_mod=no 211997cf2ee2Smrg if test -z "${LT_MULTI_MODULE}"; then 212097cf2ee2Smrg # By default we will add the -single_module flag. You can override 212197cf2ee2Smrg # by either setting the environment variable LT_MULTI_MODULE 212297cf2ee2Smrg # non-empty at configure time, or by adding -multi_module to the 212397cf2ee2Smrg # link flags. 212497cf2ee2Smrg rm -rf libconftest.dylib* 212597cf2ee2Smrg echo "int foo(void){return 1;}" > conftest.c 212697cf2ee2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 212797cf2ee2Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 212897cf2ee2Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 212997cf2ee2Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 213097cf2ee2Smrg _lt_result=$? 2131ac92798bSmrg # If there is a non-empty error log, and "single_module" 2132ac92798bSmrg # appears in it, assume the flag caused a linker warning 2133ac92798bSmrg if test -s conftest.err && $GREP single_module conftest.err; then 2134ac92798bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2135ac92798bSmrg # Otherwise, if the output was created with a 0 exit code from 2136ac92798bSmrg # the compiler, it worked. 2137ac92798bSmrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 213897cf2ee2Smrg lt_cv_apple_cc_single_mod=yes 213997cf2ee2Smrg else 214097cf2ee2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 214197cf2ee2Smrg fi 214297cf2ee2Smrg rm -rf libconftest.dylib* 214397cf2ee2Smrg rm -f conftest.* 214497cf2ee2Smrg fi]) 2145ac92798bSmrg 214697cf2ee2Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 214797cf2ee2Smrg [lt_cv_ld_exported_symbols_list], 214897cf2ee2Smrg [lt_cv_ld_exported_symbols_list=no 214997cf2ee2Smrg save_LDFLAGS=$LDFLAGS 215097cf2ee2Smrg echo "_main" > conftest.sym 215197cf2ee2Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 215297cf2ee2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 215397cf2ee2Smrg [lt_cv_ld_exported_symbols_list=yes], 215497cf2ee2Smrg [lt_cv_ld_exported_symbols_list=no]) 215597cf2ee2Smrg LDFLAGS="$save_LDFLAGS" 215697cf2ee2Smrg ]) 2157ac92798bSmrg 215897cf2ee2Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 215997cf2ee2Smrg [lt_cv_ld_force_load=no 216097cf2ee2Smrg cat > conftest.c << _LT_EOF 216197cf2ee2Smrgint forced_loaded() { return 2;} 216297cf2ee2Smrg_LT_EOF 216397cf2ee2Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 216497cf2ee2Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 216597cf2ee2Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 216697cf2ee2Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 216797cf2ee2Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 216897cf2ee2Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 216997cf2ee2Smrg cat > conftest.c << _LT_EOF 217097cf2ee2Smrgint main() { return 0;} 217197cf2ee2Smrg_LT_EOF 217297cf2ee2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 217397cf2ee2Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 217497cf2ee2Smrg _lt_result=$? 2175ac92798bSmrg if test -s conftest.err && $GREP force_load conftest.err; then 2176ac92798bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2177ac92798bSmrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 217897cf2ee2Smrg lt_cv_ld_force_load=yes 217997cf2ee2Smrg else 218097cf2ee2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 218197cf2ee2Smrg fi 218297cf2ee2Smrg rm -f conftest.err libconftest.a conftest conftest.c 218397cf2ee2Smrg rm -rf conftest.dSYM 218497cf2ee2Smrg ]) 218597cf2ee2Smrg case $host_os in 218697cf2ee2Smrg rhapsody* | darwin1.[[012]]) 218797cf2ee2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 218897cf2ee2Smrg darwin1.*) 218997cf2ee2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 219097cf2ee2Smrg darwin*) # darwin 5.x on 219197cf2ee2Smrg # if running on 10.5 or later, the deployment target defaults 219297cf2ee2Smrg # to the OS version, if on x86, and 10.4, the deployment 219397cf2ee2Smrg # target defaults to 10.4. Don't you love it? 219497cf2ee2Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 219597cf2ee2Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 219697cf2ee2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 219797cf2ee2Smrg 10.[[012]]*) 219897cf2ee2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 219997cf2ee2Smrg 10.*) 220097cf2ee2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 220197cf2ee2Smrg esac 220297cf2ee2Smrg ;; 220397cf2ee2Smrg esac 220497cf2ee2Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 220597cf2ee2Smrg _lt_dar_single_mod='$single_module' 220697cf2ee2Smrg fi 220797cf2ee2Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 220897cf2ee2Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 220997cf2ee2Smrg else 221097cf2ee2Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 221197cf2ee2Smrg fi 221297cf2ee2Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 221397cf2ee2Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 221497cf2ee2Smrg else 221597cf2ee2Smrg _lt_dsymutil= 221697cf2ee2Smrg fi 221797cf2ee2Smrg ;; 221897cf2ee2Smrg esac 22196e7d3316Smrg]) 22206e7d3316Smrg 22216e7d3316Smrg 2222ac92798bSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 2223ac92798bSmrg# --------------------------------- 222497cf2ee2Smrg# Checks for linker and compiler features on darwin 222597cf2ee2Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 222697cf2ee2Smrg[ 222797cf2ee2Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 222897cf2ee2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 222997cf2ee2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 223097cf2ee2Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 223197cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 223297cf2ee2Smrg if test "$lt_cv_ld_force_load" = "yes"; then 223397cf2ee2Smrg _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\"`' 2234ac92798bSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2235ac92798bSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 223697cf2ee2Smrg else 223797cf2ee2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 223897cf2ee2Smrg fi 223997cf2ee2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 224097cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 224197cf2ee2Smrg case $cc_basename in 224297cf2ee2Smrg ifort*) _lt_dar_can_shared=yes ;; 224397cf2ee2Smrg *) _lt_dar_can_shared=$GCC ;; 224497cf2ee2Smrg esac 224597cf2ee2Smrg if test "$_lt_dar_can_shared" = "yes"; then 224697cf2ee2Smrg output_verbose_link_cmd=func_echo_all 224797cf2ee2Smrg _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}" 224897cf2ee2Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 224997cf2ee2Smrg _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}" 225097cf2ee2Smrg _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}" 225197cf2ee2Smrg m4_if([$1], [CXX], 225297cf2ee2Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 225397cf2ee2Smrg _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}" 225497cf2ee2Smrg _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}" 225597cf2ee2Smrg fi 225697cf2ee2Smrg],[]) 225797cf2ee2Smrg else 225897cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 225997cf2ee2Smrg fi 22606e7d3316Smrg]) 22616e7d3316Smrg 226297cf2ee2Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 226397cf2ee2Smrg# ---------------------------------- 226497cf2ee2Smrg# Links a minimal program and checks the executable 226597cf2ee2Smrg# for the system default hardcoded library path. In most cases, 226697cf2ee2Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 226797cf2ee2Smrg# the location of the communication and MPI libs are included too. 226897cf2ee2Smrg# If we don't find anything, use the default library path according 226997cf2ee2Smrg# to the aix ld manual. 227097cf2ee2Smrg# Store the results from the different compilers for each TAGNAME. 227197cf2ee2Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 227297cf2ee2Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 227397cf2ee2Smrg[m4_require([_LT_DECL_SED])dnl 227497cf2ee2Smrgif test "${lt_cv_aix_libpath+set}" = set; then 227597cf2ee2Smrg aix_libpath=$lt_cv_aix_libpath 227697cf2ee2Smrgelse 227797cf2ee2Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 227897cf2ee2Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 227997cf2ee2Smrg lt_aix_libpath_sed='[ 228097cf2ee2Smrg /Import File Strings/,/^$/ { 228197cf2ee2Smrg /^0/ { 228297cf2ee2Smrg s/^0 *\([^ ]*\) *$/\1/ 228397cf2ee2Smrg p 228497cf2ee2Smrg } 228597cf2ee2Smrg }]' 228697cf2ee2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 228797cf2ee2Smrg # Check for a 64-bit object if we didn't find anything. 228897cf2ee2Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 228997cf2ee2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 229097cf2ee2Smrg fi],[]) 229197cf2ee2Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 229297cf2ee2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 229397cf2ee2Smrg fi 229497cf2ee2Smrg ]) 229597cf2ee2Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 229697cf2ee2Smrgfi 229797cf2ee2Smrg])# _LT_SYS_MODULE_PATH_AIX 22986e7d3316Smrg 22996e7d3316Smrg 230097cf2ee2Smrg# _LT_SHELL_INIT(ARG) 23016e7d3316Smrg# ------------------- 230297cf2ee2Smrgm4_define([_LT_SHELL_INIT], 230397cf2ee2Smrg[m4_divert_text([M4SH-INIT], [$1 230497cf2ee2Smrg])])# _LT_SHELL_INIT 23056e7d3316Smrg 23066e7d3316Smrg 23076e7d3316Smrg 230897cf2ee2Smrg# _LT_PROG_ECHO_BACKSLASH 230997cf2ee2Smrg# ----------------------- 231097cf2ee2Smrg# Find how we can fake an echo command that does not interpret backslash. 231197cf2ee2Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 231297cf2ee2Smrg# of the generated configure script which will find a shell with a builtin 231397cf2ee2Smrg# printf (which we can use as an echo command). 231497cf2ee2Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 231597cf2ee2Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 231697cf2ee2SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 231797cf2ee2SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23186e7d3316Smrg 231997cf2ee2SmrgAC_MSG_CHECKING([how to print strings]) 232097cf2ee2Smrg# Test print first, because it will be a builtin if present. 232197cf2ee2Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 232297cf2ee2Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 232397cf2ee2Smrg ECHO='print -r --' 232497cf2ee2Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 232597cf2ee2Smrg ECHO='printf %s\n' 232697cf2ee2Smrgelse 232797cf2ee2Smrg # Use this function as a fallback that always works. 232897cf2ee2Smrg func_fallback_echo () 232997cf2ee2Smrg { 233097cf2ee2Smrg eval 'cat <<_LTECHO_EOF 233197cf2ee2Smrg$[]1 233297cf2ee2Smrg_LTECHO_EOF' 233397cf2ee2Smrg } 233497cf2ee2Smrg ECHO='func_fallback_echo' 233597cf2ee2Smrgfi 23366e7d3316Smrg 233797cf2ee2Smrg# func_echo_all arg... 233897cf2ee2Smrg# Invoke $ECHO with all args, space-separated. 233997cf2ee2Smrgfunc_echo_all () 23406e7d3316Smrg{ 234197cf2ee2Smrg $ECHO "$*" 23426e7d3316Smrg} 23436e7d3316Smrg 234497cf2ee2Smrgcase "$ECHO" in 234597cf2ee2Smrg printf*) AC_MSG_RESULT([printf]) ;; 234697cf2ee2Smrg print*) AC_MSG_RESULT([print -r]) ;; 234797cf2ee2Smrg *) AC_MSG_RESULT([cat]) ;; 234897cf2ee2Smrgesac 23496e7d3316Smrg 235097cf2ee2Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 235197cf2ee2Smrg[_AS_DETECT_SUGGESTED([ 235297cf2ee2Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 235397cf2ee2Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 235497cf2ee2Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 235597cf2ee2Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 235697cf2ee2Smrg PATH=/empty FPATH=/empty; export PATH FPATH 235797cf2ee2Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 235897cf2ee2Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 23596e7d3316Smrg 236097cf2ee2Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 236197cf2ee2Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 236297cf2ee2Smrg])# _LT_PROG_ECHO_BACKSLASH 23636e7d3316Smrg 23646e7d3316Smrg 236597cf2ee2Smrg# _LT_WITH_SYSROOT 236697cf2ee2Smrg# ---------------- 236797cf2ee2SmrgAC_DEFUN([_LT_WITH_SYSROOT], 236897cf2ee2Smrg[AC_MSG_CHECKING([for sysroot]) 236997cf2ee2SmrgAC_ARG_WITH([sysroot], 237097cf2ee2Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 237197cf2ee2Smrg (or the compiler's sysroot if not specified).], 237297cf2ee2Smrg[], [with_sysroot=no]) 237397cf2ee2Smrg 237497cf2ee2Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 237597cf2ee2Smrgdnl in case the user passed a directory name. 237697cf2ee2Smrglt_sysroot= 237797cf2ee2Smrgcase ${with_sysroot} in #( 237897cf2ee2Smrg yes) 237997cf2ee2Smrg if test "$GCC" = yes; then 238097cf2ee2Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 238197cf2ee2Smrg fi 238297cf2ee2Smrg ;; #( 238397cf2ee2Smrg /*) 238497cf2ee2Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 238597cf2ee2Smrg ;; #( 238697cf2ee2Smrg no|'') 238797cf2ee2Smrg ;; #( 238897cf2ee2Smrg *) 238997cf2ee2Smrg AC_MSG_RESULT([${with_sysroot}]) 239097cf2ee2Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 239197cf2ee2Smrg ;; 239297cf2ee2Smrgesac 23936e7d3316Smrg 239497cf2ee2Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 239597cf2ee2Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 239697cf2ee2Smrg[dependent libraries, and in which our libraries should be installed.])]) 23976e7d3316Smrg 239897cf2ee2Smrg# _LT_ENABLE_LOCK 239997cf2ee2Smrg# --------------- 240097cf2ee2Smrgm4_defun([_LT_ENABLE_LOCK], 240197cf2ee2Smrg[AC_ARG_ENABLE([libtool-lock], 240297cf2ee2Smrg [AS_HELP_STRING([--disable-libtool-lock], 240397cf2ee2Smrg [avoid locking (might break parallel builds)])]) 240497cf2ee2Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 24056e7d3316Smrg 240697cf2ee2Smrg# Some flags need to be propagated to the compiler or linker for good 240797cf2ee2Smrg# libtool support. 240897cf2ee2Smrgcase $host in 240997cf2ee2Smrgia64-*-hpux*) 241097cf2ee2Smrg # Find out which ABI we are using. 241197cf2ee2Smrg echo 'int i;' > conftest.$ac_ext 241297cf2ee2Smrg if AC_TRY_EVAL(ac_compile); then 241397cf2ee2Smrg case `/usr/bin/file conftest.$ac_objext` in 241497cf2ee2Smrg *ELF-32*) 241597cf2ee2Smrg HPUX_IA64_MODE="32" 241697cf2ee2Smrg ;; 241797cf2ee2Smrg *ELF-64*) 241897cf2ee2Smrg HPUX_IA64_MODE="64" 241997cf2ee2Smrg ;; 242097cf2ee2Smrg esac 242197cf2ee2Smrg fi 242297cf2ee2Smrg rm -rf conftest* 242397cf2ee2Smrg ;; 242497cf2ee2Smrg*-*-irix6*) 242597cf2ee2Smrg # Find out which ABI we are using. 242697cf2ee2Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 242797cf2ee2Smrg if AC_TRY_EVAL(ac_compile); then 242897cf2ee2Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 242997cf2ee2Smrg case `/usr/bin/file conftest.$ac_objext` in 243097cf2ee2Smrg *32-bit*) 243197cf2ee2Smrg LD="${LD-ld} -melf32bsmip" 243297cf2ee2Smrg ;; 243397cf2ee2Smrg *N32*) 243497cf2ee2Smrg LD="${LD-ld} -melf32bmipn32" 243597cf2ee2Smrg ;; 243697cf2ee2Smrg *64-bit*) 243797cf2ee2Smrg LD="${LD-ld} -melf64bmip" 243897cf2ee2Smrg ;; 243997cf2ee2Smrg esac 244097cf2ee2Smrg else 244197cf2ee2Smrg case `/usr/bin/file conftest.$ac_objext` in 244297cf2ee2Smrg *32-bit*) 244397cf2ee2Smrg LD="${LD-ld} -32" 244497cf2ee2Smrg ;; 244597cf2ee2Smrg *N32*) 244697cf2ee2Smrg LD="${LD-ld} -n32" 244797cf2ee2Smrg ;; 244897cf2ee2Smrg *64-bit*) 244997cf2ee2Smrg LD="${LD-ld} -64" 245097cf2ee2Smrg ;; 245197cf2ee2Smrg esac 245297cf2ee2Smrg fi 245397cf2ee2Smrg fi 245497cf2ee2Smrg rm -rf conftest* 245597cf2ee2Smrg ;; 24566e7d3316Smrg 245797cf2ee2Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 245897cf2ee2Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 245997cf2ee2Smrg # Find out which ABI we are using. 246097cf2ee2Smrg echo 'int i;' > conftest.$ac_ext 246197cf2ee2Smrg if AC_TRY_EVAL(ac_compile); then 246297cf2ee2Smrg case `/usr/bin/file conftest.o` in 246397cf2ee2Smrg *32-bit*) 246497cf2ee2Smrg case $host in 246597cf2ee2Smrg x86_64-*kfreebsd*-gnu) 246697cf2ee2Smrg LD="${LD-ld} -m elf_i386_fbsd" 246797cf2ee2Smrg ;; 246897cf2ee2Smrg x86_64-*linux*) 246997cf2ee2Smrg LD="${LD-ld} -m elf_i386" 247097cf2ee2Smrg ;; 247197cf2ee2Smrg ppc64-*linux*|powerpc64-*linux*) 247297cf2ee2Smrg LD="${LD-ld} -m elf32ppclinux" 247397cf2ee2Smrg ;; 247497cf2ee2Smrg s390x-*linux*) 247597cf2ee2Smrg LD="${LD-ld} -m elf_s390" 247697cf2ee2Smrg ;; 247797cf2ee2Smrg sparc64-*linux*) 247897cf2ee2Smrg LD="${LD-ld} -m elf32_sparc" 247997cf2ee2Smrg ;; 248097cf2ee2Smrg esac 248197cf2ee2Smrg ;; 248297cf2ee2Smrg *64-bit*) 248397cf2ee2Smrg case $host in 248497cf2ee2Smrg x86_64-*kfreebsd*-gnu) 248597cf2ee2Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 248697cf2ee2Smrg ;; 248797cf2ee2Smrg x86_64-*linux*) 248897cf2ee2Smrg LD="${LD-ld} -m elf_x86_64" 248997cf2ee2Smrg ;; 249097cf2ee2Smrg ppc*-*linux*|powerpc*-*linux*) 249197cf2ee2Smrg LD="${LD-ld} -m elf64ppc" 249297cf2ee2Smrg ;; 249397cf2ee2Smrg s390*-*linux*|s390*-*tpf*) 249497cf2ee2Smrg LD="${LD-ld} -m elf64_s390" 249597cf2ee2Smrg ;; 249697cf2ee2Smrg sparc*-*linux*) 249797cf2ee2Smrg LD="${LD-ld} -m elf64_sparc" 249897cf2ee2Smrg ;; 249997cf2ee2Smrg esac 250097cf2ee2Smrg ;; 250197cf2ee2Smrg esac 250297cf2ee2Smrg fi 250397cf2ee2Smrg rm -rf conftest* 250497cf2ee2Smrg ;; 25056e7d3316Smrg 250697cf2ee2Smrg*-*-sco3.2v5*) 250797cf2ee2Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 250897cf2ee2Smrg SAVE_CFLAGS="$CFLAGS" 250997cf2ee2Smrg CFLAGS="$CFLAGS -belf" 251097cf2ee2Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 251197cf2ee2Smrg [AC_LANG_PUSH(C) 251297cf2ee2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 251397cf2ee2Smrg AC_LANG_POP]) 251497cf2ee2Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 251597cf2ee2Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 251697cf2ee2Smrg CFLAGS="$SAVE_CFLAGS" 251797cf2ee2Smrg fi 251897cf2ee2Smrg ;; 2519ac92798bSmrg*-*solaris*) 252097cf2ee2Smrg # Find out which ABI we are using. 252197cf2ee2Smrg echo 'int i;' > conftest.$ac_ext 252297cf2ee2Smrg if AC_TRY_EVAL(ac_compile); then 252397cf2ee2Smrg case `/usr/bin/file conftest.o` in 252497cf2ee2Smrg *64-bit*) 252597cf2ee2Smrg case $lt_cv_prog_gnu_ld in 2526ac92798bSmrg yes*) 2527ac92798bSmrg case $host in 2528ac92798bSmrg i?86-*-solaris*) 2529ac92798bSmrg LD="${LD-ld} -m elf_x86_64" 2530ac92798bSmrg ;; 2531ac92798bSmrg sparc*-*-solaris*) 2532ac92798bSmrg LD="${LD-ld} -m elf64_sparc" 2533ac92798bSmrg ;; 2534ac92798bSmrg esac 2535ac92798bSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2536ac92798bSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2537ac92798bSmrg LD="${LD-ld}_sol2" 2538ac92798bSmrg fi 2539ac92798bSmrg ;; 254097cf2ee2Smrg *) 254197cf2ee2Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 254297cf2ee2Smrg LD="${LD-ld} -64" 254397cf2ee2Smrg fi 254497cf2ee2Smrg ;; 254597cf2ee2Smrg esac 254697cf2ee2Smrg ;; 254797cf2ee2Smrg esac 254897cf2ee2Smrg fi 254997cf2ee2Smrg rm -rf conftest* 255097cf2ee2Smrg ;; 255197cf2ee2Smrgesac 25526e7d3316Smrg 255397cf2ee2Smrgneed_locks="$enable_libtool_lock" 255497cf2ee2Smrg])# _LT_ENABLE_LOCK 25556e7d3316Smrg 25566e7d3316Smrg 255797cf2ee2Smrg# _LT_PROG_AR 255897cf2ee2Smrg# ----------- 255997cf2ee2Smrgm4_defun([_LT_PROG_AR], 256097cf2ee2Smrg[AC_CHECK_TOOLS(AR, [ar], false) 256197cf2ee2Smrg: ${AR=ar} 256297cf2ee2Smrg: ${AR_FLAGS=cru} 256397cf2ee2Smrg_LT_DECL([], [AR], [1], [The archiver]) 256497cf2ee2Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 256597cf2ee2Smrg 256697cf2ee2SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 256797cf2ee2Smrg [lt_cv_ar_at_file=no 256897cf2ee2Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 256997cf2ee2Smrg [echo conftest.$ac_objext > conftest.lst 257097cf2ee2Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 257197cf2ee2Smrg AC_TRY_EVAL([lt_ar_try]) 257297cf2ee2Smrg if test "$ac_status" -eq 0; then 257397cf2ee2Smrg # Ensure the archiver fails upon bogus file names. 257497cf2ee2Smrg rm -f conftest.$ac_objext libconftest.a 257597cf2ee2Smrg AC_TRY_EVAL([lt_ar_try]) 257697cf2ee2Smrg if test "$ac_status" -ne 0; then 257797cf2ee2Smrg lt_cv_ar_at_file=@ 257897cf2ee2Smrg fi 257997cf2ee2Smrg fi 258097cf2ee2Smrg rm -f conftest.* libconftest.a 258197cf2ee2Smrg ]) 258297cf2ee2Smrg ]) 25836e7d3316Smrg 258497cf2ee2Smrgif test "x$lt_cv_ar_at_file" = xno; then 258597cf2ee2Smrg archiver_list_spec= 258697cf2ee2Smrgelse 258797cf2ee2Smrg archiver_list_spec=$lt_cv_ar_at_file 25886e7d3316Smrgfi 258997cf2ee2Smrg_LT_DECL([], [archiver_list_spec], [1], 259097cf2ee2Smrg [How to feed a file listing to the archiver]) 259197cf2ee2Smrg])# _LT_PROG_AR 25926e7d3316Smrg 25936e7d3316Smrg 259497cf2ee2Smrg# _LT_CMD_OLD_ARCHIVE 259597cf2ee2Smrg# ------------------- 259697cf2ee2Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 259797cf2ee2Smrg[_LT_PROG_AR 25986e7d3316Smrg 259997cf2ee2SmrgAC_CHECK_TOOL(STRIP, strip, :) 260097cf2ee2Smrgtest -z "$STRIP" && STRIP=: 260197cf2ee2Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 26026e7d3316Smrg 260397cf2ee2SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 260497cf2ee2Smrgtest -z "$RANLIB" && RANLIB=: 260597cf2ee2Smrg_LT_DECL([], [RANLIB], [1], 260697cf2ee2Smrg [Commands used to install an old-style archive]) 26076e7d3316Smrg 260897cf2ee2Smrg# Determine commands to create old-style static archives. 260997cf2ee2Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 261097cf2ee2Smrgold_postinstall_cmds='chmod 644 $oldlib' 261197cf2ee2Smrgold_postuninstall_cmds= 26126e7d3316Smrg 261397cf2ee2Smrgif test -n "$RANLIB"; then 26146e7d3316Smrg case $host_os in 261597cf2ee2Smrg openbsd*) 2616ac92798bSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 261797cf2ee2Smrg ;; 261897cf2ee2Smrg *) 2619ac92798bSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 26206e7d3316Smrg ;; 26216e7d3316Smrg esac 2622ac92798bSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 262397cf2ee2Smrgfi 26246e7d3316Smrg 262597cf2ee2Smrgcase $host_os in 262697cf2ee2Smrg darwin*) 262797cf2ee2Smrg lock_old_archive_extraction=yes ;; 262897cf2ee2Smrg *) 262997cf2ee2Smrg lock_old_archive_extraction=no ;; 263097cf2ee2Smrgesac 263197cf2ee2Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 263297cf2ee2Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 263397cf2ee2Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 263497cf2ee2Smrg [Commands used to build an old-style archive]) 263597cf2ee2Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 263697cf2ee2Smrg [Whether to use a lock for old archive extraction]) 263797cf2ee2Smrg])# _LT_CMD_OLD_ARCHIVE 26386e7d3316Smrg 26396e7d3316Smrg 264097cf2ee2Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 264197cf2ee2Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 264297cf2ee2Smrg# ---------------------------------------------------------------- 264397cf2ee2Smrg# Check whether the given compiler option works 264497cf2ee2SmrgAC_DEFUN([_LT_COMPILER_OPTION], 264597cf2ee2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 264697cf2ee2Smrgm4_require([_LT_DECL_SED])dnl 264797cf2ee2SmrgAC_CACHE_CHECK([$1], [$2], 264897cf2ee2Smrg [$2=no 264997cf2ee2Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 265097cf2ee2Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 265197cf2ee2Smrg lt_compiler_flag="$3" 265297cf2ee2Smrg # Insert the option either (1) after the last *FLAGS variable, or 265397cf2ee2Smrg # (2) before a word containing "conftest.", or (3) at the end. 265497cf2ee2Smrg # Note that $ac_compile itself does not contain backslashes and begins 265597cf2ee2Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 265697cf2ee2Smrg # The option is referenced via a variable to avoid confusing sed. 265797cf2ee2Smrg lt_compile=`echo "$ac_compile" | $SED \ 265897cf2ee2Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 265997cf2ee2Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 266097cf2ee2Smrg -e 's:$: $lt_compiler_flag:'` 266197cf2ee2Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 266297cf2ee2Smrg (eval "$lt_compile" 2>conftest.err) 266397cf2ee2Smrg ac_status=$? 266497cf2ee2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 266597cf2ee2Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 266697cf2ee2Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 266797cf2ee2Smrg # The compiler can only warn and ignore the option if not recognized 266897cf2ee2Smrg # So say no if there are warnings other than the usual output. 266997cf2ee2Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 267097cf2ee2Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 267197cf2ee2Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 267297cf2ee2Smrg $2=yes 267397cf2ee2Smrg fi 267497cf2ee2Smrg fi 267597cf2ee2Smrg $RM conftest* 267697cf2ee2Smrg]) 26776e7d3316Smrg 267897cf2ee2Smrgif test x"[$]$2" = xyes; then 267997cf2ee2Smrg m4_if([$5], , :, [$5]) 268097cf2ee2Smrgelse 268197cf2ee2Smrg m4_if([$6], , :, [$6]) 268297cf2ee2Smrgfi 268397cf2ee2Smrg])# _LT_COMPILER_OPTION 26846e7d3316Smrg 268597cf2ee2Smrg# Old name: 268697cf2ee2SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 268797cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 268897cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 26896e7d3316Smrg 26906e7d3316Smrg 269197cf2ee2Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 269297cf2ee2Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 269397cf2ee2Smrg# ---------------------------------------------------- 269497cf2ee2Smrg# Check whether the given linker option works 269597cf2ee2SmrgAC_DEFUN([_LT_LINKER_OPTION], 269697cf2ee2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 269797cf2ee2Smrgm4_require([_LT_DECL_SED])dnl 269897cf2ee2SmrgAC_CACHE_CHECK([$1], [$2], 269997cf2ee2Smrg [$2=no 270097cf2ee2Smrg save_LDFLAGS="$LDFLAGS" 270197cf2ee2Smrg LDFLAGS="$LDFLAGS $3" 270297cf2ee2Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 270397cf2ee2Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 270497cf2ee2Smrg # The linker can only warn and ignore the option if not recognized 270597cf2ee2Smrg # So say no if there are warnings 270697cf2ee2Smrg if test -s conftest.err; then 270797cf2ee2Smrg # Append any errors to the config.log. 270897cf2ee2Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 270997cf2ee2Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 271097cf2ee2Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 271197cf2ee2Smrg if diff conftest.exp conftest.er2 >/dev/null; then 271297cf2ee2Smrg $2=yes 271397cf2ee2Smrg fi 271497cf2ee2Smrg else 271597cf2ee2Smrg $2=yes 271697cf2ee2Smrg fi 271797cf2ee2Smrg fi 271897cf2ee2Smrg $RM -r conftest* 271997cf2ee2Smrg LDFLAGS="$save_LDFLAGS" 272097cf2ee2Smrg]) 27216e7d3316Smrg 272297cf2ee2Smrgif test x"[$]$2" = xyes; then 272397cf2ee2Smrg m4_if([$4], , :, [$4]) 272497cf2ee2Smrgelse 272597cf2ee2Smrg m4_if([$5], , :, [$5]) 272697cf2ee2Smrgfi 272797cf2ee2Smrg])# _LT_LINKER_OPTION 27286e7d3316Smrg 272997cf2ee2Smrg# Old name: 273097cf2ee2SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 273197cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 273297cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 27336e7d3316Smrg 27346e7d3316Smrg 273597cf2ee2Smrg# LT_CMD_MAX_LEN 273697cf2ee2Smrg#--------------- 273797cf2ee2SmrgAC_DEFUN([LT_CMD_MAX_LEN], 273897cf2ee2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 273997cf2ee2Smrg# find the maximum length of command line arguments 274097cf2ee2SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 274197cf2ee2SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 274297cf2ee2Smrg i=0 274397cf2ee2Smrg teststring="ABCD" 27446e7d3316Smrg 274597cf2ee2Smrg case $build_os in 274697cf2ee2Smrg msdosdjgpp*) 274797cf2ee2Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 274897cf2ee2Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 274997cf2ee2Smrg # during glob expansion). Even if it were fixed, the result of this 275097cf2ee2Smrg # check would be larger than it should be. 275197cf2ee2Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 275297cf2ee2Smrg ;; 27536e7d3316Smrg 275497cf2ee2Smrg gnu*) 275597cf2ee2Smrg # Under GNU Hurd, this test is not required because there is 275697cf2ee2Smrg # no limit to the length of command line arguments. 275797cf2ee2Smrg # Libtool will interpret -1 as no limit whatsoever 275897cf2ee2Smrg lt_cv_sys_max_cmd_len=-1; 275997cf2ee2Smrg ;; 27606e7d3316Smrg 276197cf2ee2Smrg cygwin* | mingw* | cegcc*) 276297cf2ee2Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 276397cf2ee2Smrg # about 5 minutes as the teststring grows exponentially. 276497cf2ee2Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 276597cf2ee2Smrg # you end up with a "frozen" computer, even though with patience 276697cf2ee2Smrg # the test eventually succeeds (with a max line length of 256k). 276797cf2ee2Smrg # Instead, let's just punt: use the minimum linelength reported by 276897cf2ee2Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 276997cf2ee2Smrg lt_cv_sys_max_cmd_len=8192; 277097cf2ee2Smrg ;; 27716e7d3316Smrg 277297cf2ee2Smrg mint*) 277397cf2ee2Smrg # On MiNT this can take a long time and run out of memory. 277497cf2ee2Smrg lt_cv_sys_max_cmd_len=8192; 277597cf2ee2Smrg ;; 27766e7d3316Smrg 277797cf2ee2Smrg amigaos*) 277897cf2ee2Smrg # On AmigaOS with pdksh, this test takes hours, literally. 277997cf2ee2Smrg # So we just punt and use a minimum line length of 8192. 278097cf2ee2Smrg lt_cv_sys_max_cmd_len=8192; 278197cf2ee2Smrg ;; 27826e7d3316Smrg 278397cf2ee2Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 278497cf2ee2Smrg # This has been around since 386BSD, at least. Likely further. 278597cf2ee2Smrg if test -x /sbin/sysctl; then 278697cf2ee2Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 278797cf2ee2Smrg elif test -x /usr/sbin/sysctl; then 278897cf2ee2Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 278997cf2ee2Smrg else 279097cf2ee2Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 279197cf2ee2Smrg fi 279297cf2ee2Smrg # And add a safety zone 279397cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 279497cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 279597cf2ee2Smrg ;; 27966e7d3316Smrg 279797cf2ee2Smrg interix*) 279897cf2ee2Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 279997cf2ee2Smrg lt_cv_sys_max_cmd_len=196608 280097cf2ee2Smrg ;; 28016e7d3316Smrg 2802ac92798bSmrg os2*) 2803ac92798bSmrg # The test takes a long time on OS/2. 2804ac92798bSmrg lt_cv_sys_max_cmd_len=8192 2805ac92798bSmrg ;; 2806ac92798bSmrg 280797cf2ee2Smrg osf*) 280897cf2ee2Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 280997cf2ee2Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 281097cf2ee2Smrg # nice to cause kernel panics so lets avoid the loop below. 281197cf2ee2Smrg # First set a reasonable default. 281297cf2ee2Smrg lt_cv_sys_max_cmd_len=16384 281397cf2ee2Smrg # 281497cf2ee2Smrg if test -x /sbin/sysconfig; then 281597cf2ee2Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 281697cf2ee2Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 281797cf2ee2Smrg esac 281897cf2ee2Smrg fi 281997cf2ee2Smrg ;; 282097cf2ee2Smrg sco3.2v5*) 282197cf2ee2Smrg lt_cv_sys_max_cmd_len=102400 282297cf2ee2Smrg ;; 282397cf2ee2Smrg sysv5* | sco5v6* | sysv4.2uw2*) 282497cf2ee2Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 282597cf2ee2Smrg if test -n "$kargmax"; then 282697cf2ee2Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 282797cf2ee2Smrg else 282897cf2ee2Smrg lt_cv_sys_max_cmd_len=32768 282997cf2ee2Smrg fi 283097cf2ee2Smrg ;; 283197cf2ee2Smrg *) 283297cf2ee2Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 283397cf2ee2Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 283497cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 283597cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 283697cf2ee2Smrg else 283797cf2ee2Smrg # Make teststring a little bigger before we do anything with it. 283897cf2ee2Smrg # a 1K string should be a reasonable start. 283997cf2ee2Smrg for i in 1 2 3 4 5 6 7 8 ; do 284097cf2ee2Smrg teststring=$teststring$teststring 284197cf2ee2Smrg done 284297cf2ee2Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 284397cf2ee2Smrg # If test is not a shell built-in, we'll probably end up computing a 284497cf2ee2Smrg # maximum length that is only half of the actual maximum length, but 284597cf2ee2Smrg # we can't tell. 2846ac92798bSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 284797cf2ee2Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 284897cf2ee2Smrg test $i != 17 # 1/2 MB should be enough 284997cf2ee2Smrg do 285097cf2ee2Smrg i=`expr $i + 1` 285197cf2ee2Smrg teststring=$teststring$teststring 285297cf2ee2Smrg done 285397cf2ee2Smrg # Only check the string length outside the loop. 285497cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 285597cf2ee2Smrg teststring= 285697cf2ee2Smrg # Add a significant safety factor because C++ compilers can tack on 285797cf2ee2Smrg # massive amounts of additional arguments before passing them to the 285897cf2ee2Smrg # linker. It appears as though 1/2 is a usable value. 285997cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 286097cf2ee2Smrg fi 286197cf2ee2Smrg ;; 286297cf2ee2Smrg esac 286397cf2ee2Smrg]) 286497cf2ee2Smrgif test -n $lt_cv_sys_max_cmd_len ; then 286597cf2ee2Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 286697cf2ee2Smrgelse 286797cf2ee2Smrg AC_MSG_RESULT(none) 286897cf2ee2Smrgfi 286997cf2ee2Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 287097cf2ee2Smrg_LT_DECL([], [max_cmd_len], [0], 287197cf2ee2Smrg [What is the maximum length of a command?]) 287297cf2ee2Smrg])# LT_CMD_MAX_LEN 28736e7d3316Smrg 287497cf2ee2Smrg# Old name: 287597cf2ee2SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 28766e7d3316Smrgdnl aclocal-1.4 backwards compatibility: 287797cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 28786e7d3316Smrg 28796e7d3316Smrg 288097cf2ee2Smrg# _LT_HEADER_DLFCN 28816e7d3316Smrg# ---------------- 288297cf2ee2Smrgm4_defun([_LT_HEADER_DLFCN], 288397cf2ee2Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 288497cf2ee2Smrg])# _LT_HEADER_DLFCN 28856e7d3316Smrg 28866e7d3316Smrg 288797cf2ee2Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 288897cf2ee2Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 288997cf2ee2Smrg# ---------------------------------------------------------------- 289097cf2ee2Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 289197cf2ee2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 289297cf2ee2Smrgif test "$cross_compiling" = yes; then : 289397cf2ee2Smrg [$4] 289497cf2ee2Smrgelse 289597cf2ee2Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 289697cf2ee2Smrg lt_status=$lt_dlunknown 289797cf2ee2Smrg cat > conftest.$ac_ext <<_LT_EOF 289897cf2ee2Smrg[#line $LINENO "configure" 289997cf2ee2Smrg#include "confdefs.h" 29006e7d3316Smrg 290197cf2ee2Smrg#if HAVE_DLFCN_H 290297cf2ee2Smrg#include <dlfcn.h> 290397cf2ee2Smrg#endif 29046e7d3316Smrg 290597cf2ee2Smrg#include <stdio.h> 290697cf2ee2Smrg 290797cf2ee2Smrg#ifdef RTLD_GLOBAL 290897cf2ee2Smrg# define LT_DLGLOBAL RTLD_GLOBAL 290997cf2ee2Smrg#else 291097cf2ee2Smrg# ifdef DL_GLOBAL 291197cf2ee2Smrg# define LT_DLGLOBAL DL_GLOBAL 291297cf2ee2Smrg# else 291397cf2ee2Smrg# define LT_DLGLOBAL 0 291497cf2ee2Smrg# endif 291597cf2ee2Smrg#endif 29166e7d3316Smrg 291797cf2ee2Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 291897cf2ee2Smrg find out it does not work in some platform. */ 291997cf2ee2Smrg#ifndef LT_DLLAZY_OR_NOW 292097cf2ee2Smrg# ifdef RTLD_LAZY 292197cf2ee2Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 292297cf2ee2Smrg# else 292397cf2ee2Smrg# ifdef DL_LAZY 292497cf2ee2Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 292597cf2ee2Smrg# else 292697cf2ee2Smrg# ifdef RTLD_NOW 292797cf2ee2Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 292897cf2ee2Smrg# else 292997cf2ee2Smrg# ifdef DL_NOW 293097cf2ee2Smrg# define LT_DLLAZY_OR_NOW DL_NOW 293197cf2ee2Smrg# else 293297cf2ee2Smrg# define LT_DLLAZY_OR_NOW 0 293397cf2ee2Smrg# endif 293497cf2ee2Smrg# endif 293597cf2ee2Smrg# endif 293697cf2ee2Smrg# endif 293797cf2ee2Smrg#endif 29386e7d3316Smrg 293997cf2ee2Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 294097cf2ee2Smrg correspondingly for the symbols needed. */ 294197cf2ee2Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 294297cf2ee2Smrgint fnord () __attribute__((visibility("default"))); 294397cf2ee2Smrg#endif 29446e7d3316Smrg 294597cf2ee2Smrgint fnord () { return 42; } 294697cf2ee2Smrgint main () 294797cf2ee2Smrg{ 294897cf2ee2Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 294997cf2ee2Smrg int status = $lt_dlunknown; 29506e7d3316Smrg 295197cf2ee2Smrg if (self) 295297cf2ee2Smrg { 295397cf2ee2Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 295497cf2ee2Smrg else 295597cf2ee2Smrg { 295697cf2ee2Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 295797cf2ee2Smrg else puts (dlerror ()); 295897cf2ee2Smrg } 295997cf2ee2Smrg /* dlclose (self); */ 296097cf2ee2Smrg } 296197cf2ee2Smrg else 296297cf2ee2Smrg puts (dlerror ()); 296397cf2ee2Smrg 296497cf2ee2Smrg return status; 296597cf2ee2Smrg}] 296697cf2ee2Smrg_LT_EOF 296797cf2ee2Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 296897cf2ee2Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 296997cf2ee2Smrg lt_status=$? 297097cf2ee2Smrg case x$lt_status in 297197cf2ee2Smrg x$lt_dlno_uscore) $1 ;; 297297cf2ee2Smrg x$lt_dlneed_uscore) $2 ;; 297397cf2ee2Smrg x$lt_dlunknown|x*) $3 ;; 297497cf2ee2Smrg esac 297597cf2ee2Smrg else : 297697cf2ee2Smrg # compilation failed 297797cf2ee2Smrg $3 297897cf2ee2Smrg fi 297997cf2ee2Smrgfi 298097cf2ee2Smrgrm -fr conftest* 298197cf2ee2Smrg])# _LT_TRY_DLOPEN_SELF 298297cf2ee2Smrg 298397cf2ee2Smrg 298497cf2ee2Smrg# LT_SYS_DLOPEN_SELF 298597cf2ee2Smrg# ------------------ 298697cf2ee2SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 298797cf2ee2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 298897cf2ee2Smrgif test "x$enable_dlopen" != xyes; then 298997cf2ee2Smrg enable_dlopen=unknown 299097cf2ee2Smrg enable_dlopen_self=unknown 299197cf2ee2Smrg enable_dlopen_self_static=unknown 299297cf2ee2Smrgelse 299397cf2ee2Smrg lt_cv_dlopen=no 299497cf2ee2Smrg lt_cv_dlopen_libs= 29956e7d3316Smrg 29966e7d3316Smrg case $host_os in 299797cf2ee2Smrg beos*) 299897cf2ee2Smrg lt_cv_dlopen="load_add_on" 299997cf2ee2Smrg lt_cv_dlopen_libs= 300097cf2ee2Smrg lt_cv_dlopen_self=yes 300197cf2ee2Smrg ;; 30026e7d3316Smrg 300397cf2ee2Smrg mingw* | pw32* | cegcc*) 300497cf2ee2Smrg lt_cv_dlopen="LoadLibrary" 300597cf2ee2Smrg lt_cv_dlopen_libs= 30062e2dd055Smrg ;; 300797cf2ee2Smrg 300897cf2ee2Smrg cygwin*) 300997cf2ee2Smrg lt_cv_dlopen="dlopen" 301097cf2ee2Smrg lt_cv_dlopen_libs= 30112e2dd055Smrg ;; 3012a966c04fSmrg 301397cf2ee2Smrg darwin*) 301497cf2ee2Smrg # if libdl is installed we need to link against it 301597cf2ee2Smrg AC_CHECK_LIB([dl], [dlopen], 301697cf2ee2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 301797cf2ee2Smrg lt_cv_dlopen="dyld" 301897cf2ee2Smrg lt_cv_dlopen_libs= 301997cf2ee2Smrg lt_cv_dlopen_self=yes 302097cf2ee2Smrg ]) 302197cf2ee2Smrg ;; 30226e7d3316Smrg 302397cf2ee2Smrg *) 302497cf2ee2Smrg AC_CHECK_FUNC([shl_load], 302597cf2ee2Smrg [lt_cv_dlopen="shl_load"], 302697cf2ee2Smrg [AC_CHECK_LIB([dld], [shl_load], 302797cf2ee2Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 302897cf2ee2Smrg [AC_CHECK_FUNC([dlopen], 302997cf2ee2Smrg [lt_cv_dlopen="dlopen"], 303097cf2ee2Smrg [AC_CHECK_LIB([dl], [dlopen], 303197cf2ee2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 303297cf2ee2Smrg [AC_CHECK_LIB([svld], [dlopen], 303397cf2ee2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 303497cf2ee2Smrg [AC_CHECK_LIB([dld], [dld_link], 303597cf2ee2Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 303697cf2ee2Smrg ]) 303797cf2ee2Smrg ]) 303897cf2ee2Smrg ]) 303997cf2ee2Smrg ]) 304097cf2ee2Smrg ]) 304197cf2ee2Smrg ;; 30426e7d3316Smrg esac 304397cf2ee2Smrg 304497cf2ee2Smrg if test "x$lt_cv_dlopen" != xno; then 304597cf2ee2Smrg enable_dlopen=yes 30466e7d3316Smrg else 304797cf2ee2Smrg enable_dlopen=no 30486e7d3316Smrg fi 30496e7d3316Smrg 305097cf2ee2Smrg case $lt_cv_dlopen in 305197cf2ee2Smrg dlopen) 305297cf2ee2Smrg save_CPPFLAGS="$CPPFLAGS" 305397cf2ee2Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3054a966c04fSmrg 305597cf2ee2Smrg save_LDFLAGS="$LDFLAGS" 305697cf2ee2Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3057a966c04fSmrg 305897cf2ee2Smrg save_LIBS="$LIBS" 305997cf2ee2Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 306097cf2ee2Smrg 306197cf2ee2Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 306297cf2ee2Smrg lt_cv_dlopen_self, [dnl 306397cf2ee2Smrg _LT_TRY_DLOPEN_SELF( 306497cf2ee2Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 306597cf2ee2Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 306697cf2ee2Smrg ]) 3067a966c04fSmrg 306897cf2ee2Smrg if test "x$lt_cv_dlopen_self" = xyes; then 306997cf2ee2Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 307097cf2ee2Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 307197cf2ee2Smrg lt_cv_dlopen_self_static, [dnl 307297cf2ee2Smrg _LT_TRY_DLOPEN_SELF( 307397cf2ee2Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 307497cf2ee2Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 307597cf2ee2Smrg ]) 307697cf2ee2Smrg fi 3077a966c04fSmrg 307897cf2ee2Smrg CPPFLAGS="$save_CPPFLAGS" 307997cf2ee2Smrg LDFLAGS="$save_LDFLAGS" 308097cf2ee2Smrg LIBS="$save_LIBS" 308197cf2ee2Smrg ;; 308297cf2ee2Smrg esac 3083a966c04fSmrg 308497cf2ee2Smrg case $lt_cv_dlopen_self in 308597cf2ee2Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 308697cf2ee2Smrg *) enable_dlopen_self=unknown ;; 308797cf2ee2Smrg esac 30886e7d3316Smrg 308997cf2ee2Smrg case $lt_cv_dlopen_self_static in 309097cf2ee2Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 309197cf2ee2Smrg *) enable_dlopen_self_static=unknown ;; 309297cf2ee2Smrg esac 3093a966c04fSmrgfi 309497cf2ee2Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 309597cf2ee2Smrg [Whether dlopen is supported]) 309697cf2ee2Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 309797cf2ee2Smrg [Whether dlopen of programs is supported]) 309897cf2ee2Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 309997cf2ee2Smrg [Whether dlopen of statically linked programs is supported]) 310097cf2ee2Smrg])# LT_SYS_DLOPEN_SELF 3101a966c04fSmrg 310297cf2ee2Smrg# Old name: 310397cf2ee2SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 310497cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 310597cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 3106a966c04fSmrg 3107a966c04fSmrg 310897cf2ee2Smrg# _LT_COMPILER_C_O([TAGNAME]) 310997cf2ee2Smrg# --------------------------- 311097cf2ee2Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 311197cf2ee2Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 311297cf2ee2Smrgm4_defun([_LT_COMPILER_C_O], 311397cf2ee2Smrg[m4_require([_LT_DECL_SED])dnl 311497cf2ee2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 311597cf2ee2Smrgm4_require([_LT_TAG_COMPILER])dnl 311697cf2ee2SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 311797cf2ee2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 311897cf2ee2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 311997cf2ee2Smrg $RM -r conftest 2>/dev/null 312097cf2ee2Smrg mkdir conftest 312197cf2ee2Smrg cd conftest 312297cf2ee2Smrg mkdir out 31232e2dd055Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 312497cf2ee2Smrg 312597cf2ee2Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 3126a966c04fSmrg # Insert the option either (1) after the last *FLAGS variable, or 3127a966c04fSmrg # (2) before a word containing "conftest.", or (3) at the end. 3128a966c04fSmrg # Note that $ac_compile itself does not contain backslashes and begins 3129a966c04fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 3130a966c04fSmrg lt_compile=`echo "$ac_compile" | $SED \ 3131a966c04fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3132a966c04fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3133a966c04fSmrg -e 's:$: $lt_compiler_flag:'` 31346e7d3316Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 313597cf2ee2Smrg (eval "$lt_compile" 2>out/conftest.err) 3136a966c04fSmrg ac_status=$? 313797cf2ee2Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 31386e7d3316Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 313997cf2ee2Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 314097cf2ee2Smrg then 3141a966c04fSmrg # The compiler can only warn and ignore the option if not recognized 314297cf2ee2Smrg # So say no if there are warnings 314397cf2ee2Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 314497cf2ee2Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 314597cf2ee2Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 314697cf2ee2Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3147a966c04fSmrg fi 3148a966c04fSmrg fi 314997cf2ee2Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 315097cf2ee2Smrg $RM conftest* 315197cf2ee2Smrg # SGI C++ compiler will create directory out/ii_files/ for 315297cf2ee2Smrg # template instantiation 315397cf2ee2Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 315497cf2ee2Smrg $RM out/* && rmdir out 315597cf2ee2Smrg cd .. 315697cf2ee2Smrg $RM -r conftest 31576e7d3316Smrg $RM conftest* 3158a966c04fSmrg]) 315997cf2ee2Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 316097cf2ee2Smrg [Does compiler simultaneously support -c and -o options?]) 316197cf2ee2Smrg])# _LT_COMPILER_C_O 3162a966c04fSmrg 31636e7d3316Smrg 316497cf2ee2Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 316597cf2ee2Smrg# ---------------------------------- 316697cf2ee2Smrg# Check to see if we can do hard links to lock some files if needed 316797cf2ee2Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 316897cf2ee2Smrg[m4_require([_LT_ENABLE_LOCK])dnl 316997cf2ee2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 317097cf2ee2Smrg_LT_COMPILER_C_O([$1]) 3171a966c04fSmrg 317297cf2ee2Smrghard_links="nottested" 317397cf2ee2Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 317497cf2ee2Smrg # do not overwrite the value of need_locks provided by the user 317597cf2ee2Smrg AC_MSG_CHECKING([if we can lock with hard links]) 317697cf2ee2Smrg hard_links=yes 317797cf2ee2Smrg $RM conftest* 317897cf2ee2Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 317997cf2ee2Smrg touch conftest.a 318097cf2ee2Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 318197cf2ee2Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 318297cf2ee2Smrg AC_MSG_RESULT([$hard_links]) 318397cf2ee2Smrg if test "$hard_links" = no; then 318497cf2ee2Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 318597cf2ee2Smrg need_locks=warn 318697cf2ee2Smrg fi 3187a966c04fSmrgelse 318897cf2ee2Smrg need_locks=no 3189a966c04fSmrgfi 319097cf2ee2Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 319197cf2ee2Smrg])# _LT_COMPILER_FILE_LOCKS 3192a966c04fSmrg 31936e7d3316Smrg 319497cf2ee2Smrg# _LT_CHECK_OBJDIR 319597cf2ee2Smrg# ---------------- 319697cf2ee2Smrgm4_defun([_LT_CHECK_OBJDIR], 319797cf2ee2Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 319897cf2ee2Smrg[rm -f .libs 2>/dev/null 319997cf2ee2Smrgmkdir .libs 2>/dev/null 320097cf2ee2Smrgif test -d .libs; then 320197cf2ee2Smrg lt_cv_objdir=.libs 320297cf2ee2Smrgelse 320397cf2ee2Smrg # MS-DOS does not allow filenames that begin with a dot. 320497cf2ee2Smrg lt_cv_objdir=_libs 320597cf2ee2Smrgfi 320697cf2ee2Smrgrmdir .libs 2>/dev/null]) 320797cf2ee2Smrgobjdir=$lt_cv_objdir 320897cf2ee2Smrg_LT_DECL([], [objdir], [0], 320997cf2ee2Smrg [The name of the directory that contains temporary libtool files])dnl 321097cf2ee2Smrgm4_pattern_allow([LT_OBJDIR])dnl 321197cf2ee2SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 321297cf2ee2Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 321397cf2ee2Smrg])# _LT_CHECK_OBJDIR 3214a966c04fSmrg 3215a966c04fSmrg 321697cf2ee2Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 321797cf2ee2Smrg# -------------------------------------- 321897cf2ee2Smrg# Check hardcoding attributes. 321997cf2ee2Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 322097cf2ee2Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 322197cf2ee2Smrg_LT_TAGVAR(hardcode_action, $1)= 322297cf2ee2Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 322397cf2ee2Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 322497cf2ee2Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3225a966c04fSmrg 322697cf2ee2Smrg # We can hardcode non-existent directories. 322797cf2ee2Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 322897cf2ee2Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 322997cf2ee2Smrg # have to relink, otherwise we might link with an installed library 323097cf2ee2Smrg # when we should be linking with a yet-to-be-installed one 323197cf2ee2Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 323297cf2ee2Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 323397cf2ee2Smrg # Linking always hardcodes the temporary library directory. 323497cf2ee2Smrg _LT_TAGVAR(hardcode_action, $1)=relink 323597cf2ee2Smrg else 323697cf2ee2Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 323797cf2ee2Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 323897cf2ee2Smrg fi 323997cf2ee2Smrgelse 324097cf2ee2Smrg # We cannot hardcode anything, or else we can only hardcode existing 324197cf2ee2Smrg # directories. 324297cf2ee2Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 324397cf2ee2Smrgfi 324497cf2ee2SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3245a966c04fSmrg 324697cf2ee2Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 324797cf2ee2Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 324897cf2ee2Smrg # Fast installation is not supported 324997cf2ee2Smrg enable_fast_install=no 325097cf2ee2Smrgelif test "$shlibpath_overrides_runpath" = yes || 325197cf2ee2Smrg test "$enable_shared" = no; then 325297cf2ee2Smrg # Fast installation is not necessary 325397cf2ee2Smrg enable_fast_install=needless 325497cf2ee2Smrgfi 325597cf2ee2Smrg_LT_TAGDECL([], [hardcode_action], [0], 325697cf2ee2Smrg [How to hardcode a shared library path into an executable]) 325797cf2ee2Smrg])# _LT_LINKER_HARDCODE_LIBPATH 32586e7d3316Smrg 3259a966c04fSmrg 326097cf2ee2Smrg# _LT_CMD_STRIPLIB 326197cf2ee2Smrg# ---------------- 326297cf2ee2Smrgm4_defun([_LT_CMD_STRIPLIB], 326397cf2ee2Smrg[m4_require([_LT_DECL_EGREP]) 326497cf2ee2Smrgstriplib= 326597cf2ee2Smrgold_striplib= 326697cf2ee2SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 326797cf2ee2Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 326897cf2ee2Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 326997cf2ee2Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 327097cf2ee2Smrg AC_MSG_RESULT([yes]) 327197cf2ee2Smrgelse 327297cf2ee2Smrg# FIXME - insert some real tests, host_os isn't really good enough 327397cf2ee2Smrg case $host_os in 327497cf2ee2Smrg darwin*) 327597cf2ee2Smrg if test -n "$STRIP" ; then 327697cf2ee2Smrg striplib="$STRIP -x" 327797cf2ee2Smrg old_striplib="$STRIP -S" 327897cf2ee2Smrg AC_MSG_RESULT([yes]) 3279a966c04fSmrg else 328097cf2ee2Smrg AC_MSG_RESULT([no]) 3281a966c04fSmrg fi 3282a966c04fSmrg ;; 328397cf2ee2Smrg *) 328497cf2ee2Smrg AC_MSG_RESULT([no]) 3285a966c04fSmrg ;; 328697cf2ee2Smrg esac 328797cf2ee2Smrgfi 328897cf2ee2Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 328997cf2ee2Smrg_LT_DECL([], [striplib], [1]) 329097cf2ee2Smrg])# _LT_CMD_STRIPLIB 3291a966c04fSmrg 329297cf2ee2Smrg 329397cf2ee2Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 329497cf2ee2Smrg# ----------------------------- 329597cf2ee2Smrg# PORTME Fill in your ld.so characteristics 329697cf2ee2Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 329797cf2ee2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 329897cf2ee2Smrgm4_require([_LT_DECL_EGREP])dnl 329997cf2ee2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 330097cf2ee2Smrgm4_require([_LT_DECL_OBJDUMP])dnl 330197cf2ee2Smrgm4_require([_LT_DECL_SED])dnl 330297cf2ee2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 330397cf2ee2SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 330497cf2ee2Smrgm4_if([$1], 330597cf2ee2Smrg [], [ 330697cf2ee2Smrgif test "$GCC" = yes; then 330797cf2ee2Smrg case $host_os in 330897cf2ee2Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 330997cf2ee2Smrg *) lt_awk_arg="/^libraries:/" ;; 331097cf2ee2Smrg esac 331197cf2ee2Smrg case $host_os in 331297cf2ee2Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 331397cf2ee2Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 331497cf2ee2Smrg esac 331597cf2ee2Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 331697cf2ee2Smrg case $lt_search_path_spec in 331797cf2ee2Smrg *\;*) 331897cf2ee2Smrg # if the path contains ";" then we assume it to be the separator 331997cf2ee2Smrg # otherwise default to the standard path separator (i.e. ":") - it is 332097cf2ee2Smrg # assumed that no part of a normal pathname contains ";" but that should 332197cf2ee2Smrg # okay in the real world where ";" in dirpaths is itself problematic. 332297cf2ee2Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3323a966c04fSmrg ;; 3324a966c04fSmrg *) 332597cf2ee2Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 332697cf2ee2Smrg ;; 332797cf2ee2Smrg esac 332897cf2ee2Smrg # Ok, now we have the path, separated by spaces, we can step through it 332997cf2ee2Smrg # and add multilib dir if necessary. 333097cf2ee2Smrg lt_tmp_lt_search_path_spec= 333197cf2ee2Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 333297cf2ee2Smrg for lt_sys_path in $lt_search_path_spec; do 333397cf2ee2Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 333497cf2ee2Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 33352e2dd055Smrg else 333697cf2ee2Smrg test -d "$lt_sys_path" && \ 333797cf2ee2Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 33382e2dd055Smrg fi 333997cf2ee2Smrg done 334097cf2ee2Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 334197cf2ee2SmrgBEGIN {RS=" "; FS="/|\n";} { 334297cf2ee2Smrg lt_foo=""; 334397cf2ee2Smrg lt_count=0; 334497cf2ee2Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 334597cf2ee2Smrg if ($lt_i != "" && $lt_i != ".") { 334697cf2ee2Smrg if ($lt_i == "..") { 334797cf2ee2Smrg lt_count++; 334897cf2ee2Smrg } else { 334997cf2ee2Smrg if (lt_count == 0) { 335097cf2ee2Smrg lt_foo="/" $lt_i lt_foo; 335197cf2ee2Smrg } else { 335297cf2ee2Smrg lt_count--; 335397cf2ee2Smrg } 335497cf2ee2Smrg } 335597cf2ee2Smrg } 335697cf2ee2Smrg } 335797cf2ee2Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 335897cf2ee2Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 335997cf2ee2Smrg}'` 336097cf2ee2Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 336197cf2ee2Smrg # for these hosts. 336297cf2ee2Smrg case $host_os in 336397cf2ee2Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 336497cf2ee2Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3365a966c04fSmrg esac 336697cf2ee2Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3367a966c04fSmrgelse 336897cf2ee2Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 336997cf2ee2Smrgfi]) 337097cf2ee2Smrglibrary_names_spec= 337197cf2ee2Smrglibname_spec='lib$name' 337297cf2ee2Smrgsoname_spec= 337397cf2ee2Smrgshrext_cmds=".so" 337497cf2ee2Smrgpostinstall_cmds= 337597cf2ee2Smrgpostuninstall_cmds= 337697cf2ee2Smrgfinish_cmds= 337797cf2ee2Smrgfinish_eval= 337897cf2ee2Smrgshlibpath_var= 337997cf2ee2Smrgshlibpath_overrides_runpath=unknown 338097cf2ee2Smrgversion_type=none 338197cf2ee2Smrgdynamic_linker="$host_os ld.so" 338297cf2ee2Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 338397cf2ee2Smrgneed_lib_prefix=unknown 338497cf2ee2Smrghardcode_into_libs=no 3385a966c04fSmrg 338697cf2ee2Smrg# when you set need_version to no, make sure it does not cause -set_version 338797cf2ee2Smrg# flags to be left without arguments 338897cf2ee2Smrgneed_version=unknown 3389a966c04fSmrg 339097cf2ee2Smrgcase $host_os in 339197cf2ee2Smrgaix3*) 3392ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 339397cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 339497cf2ee2Smrg shlibpath_var=LIBPATH 33956e7d3316Smrg 339697cf2ee2Smrg # AIX 3 has no versioning support, so we append a major version to the name. 339797cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 339897cf2ee2Smrg ;; 3399a966c04fSmrg 340097cf2ee2Smrgaix[[4-9]]*) 3401ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 340297cf2ee2Smrg need_lib_prefix=no 340397cf2ee2Smrg need_version=no 340497cf2ee2Smrg hardcode_into_libs=yes 340597cf2ee2Smrg if test "$host_cpu" = ia64; then 340697cf2ee2Smrg # AIX 5 supports IA64 340797cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 340897cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 340997cf2ee2Smrg else 341097cf2ee2Smrg # With GCC up to 2.95.x, collect2 would create an import file 341197cf2ee2Smrg # for dependence libraries. The import file would start with 341297cf2ee2Smrg # the line `#! .'. This would cause the generated library to 341397cf2ee2Smrg # depend on `.', always an invalid library. This was fixed in 341497cf2ee2Smrg # development snapshots of GCC prior to 3.0. 341597cf2ee2Smrg case $host_os in 341697cf2ee2Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 341797cf2ee2Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 341897cf2ee2Smrg echo ' yes ' 341997cf2ee2Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 342097cf2ee2Smrg : 342197cf2ee2Smrg else 342297cf2ee2Smrg can_build_shared=no 342397cf2ee2Smrg fi 342497cf2ee2Smrg ;; 342597cf2ee2Smrg esac 342697cf2ee2Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 342797cf2ee2Smrg # soname into executable. Probably we can add versioning support to 342897cf2ee2Smrg # collect2, so additional links can be useful in future. 342997cf2ee2Smrg if test "$aix_use_runtimelinking" = yes; then 343097cf2ee2Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 343197cf2ee2Smrg # instead of lib<name>.a to let people know that these are not 343297cf2ee2Smrg # typical AIX shared libraries. 343397cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 343497cf2ee2Smrg else 343597cf2ee2Smrg # We preserve .a as extension for shared libraries through AIX4.2 343697cf2ee2Smrg # and later when we are not doing run time linking. 343797cf2ee2Smrg library_names_spec='${libname}${release}.a $libname.a' 343897cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 343997cf2ee2Smrg fi 344097cf2ee2Smrg shlibpath_var=LIBPATH 344197cf2ee2Smrg fi 344297cf2ee2Smrg ;; 3443a966c04fSmrg 344497cf2ee2Smrgamigaos*) 344597cf2ee2Smrg case $host_cpu in 344697cf2ee2Smrg powerpc) 344797cf2ee2Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 344897cf2ee2Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 344997cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 345097cf2ee2Smrg ;; 345197cf2ee2Smrg m68k) 345297cf2ee2Smrg library_names_spec='$libname.ixlibrary $libname.a' 345397cf2ee2Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 345497cf2ee2Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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' 345597cf2ee2Smrg ;; 345697cf2ee2Smrg esac 345797cf2ee2Smrg ;; 3458a966c04fSmrg 345997cf2ee2Smrgbeos*) 346097cf2ee2Smrg library_names_spec='${libname}${shared_ext}' 346197cf2ee2Smrg dynamic_linker="$host_os ld.so" 346297cf2ee2Smrg shlibpath_var=LIBRARY_PATH 346397cf2ee2Smrg ;; 3464a966c04fSmrg 346597cf2ee2Smrgbsdi[[45]]*) 3466ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 346797cf2ee2Smrg need_version=no 346897cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 346997cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 347097cf2ee2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 347197cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 347297cf2ee2Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 347397cf2ee2Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 347497cf2ee2Smrg # the default ld.so.conf also contains /usr/contrib/lib and 347597cf2ee2Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 347697cf2ee2Smrg # libtool to hard-code these into programs 347797cf2ee2Smrg ;; 3478a966c04fSmrg 347997cf2ee2Smrgcygwin* | mingw* | pw32* | cegcc*) 348097cf2ee2Smrg version_type=windows 348197cf2ee2Smrg shrext_cmds=".dll" 348297cf2ee2Smrg need_version=no 348397cf2ee2Smrg need_lib_prefix=no 3484a966c04fSmrg 348597cf2ee2Smrg case $GCC,$cc_basename in 348697cf2ee2Smrg yes,*) 348797cf2ee2Smrg # gcc 348897cf2ee2Smrg library_names_spec='$libname.dll.a' 348997cf2ee2Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 349097cf2ee2Smrg postinstall_cmds='base_file=`basename \${file}`~ 349197cf2ee2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 349297cf2ee2Smrg dldir=$destdir/`dirname \$dlpath`~ 349397cf2ee2Smrg test -d \$dldir || mkdir -p \$dldir~ 349497cf2ee2Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 349597cf2ee2Smrg chmod a+x \$dldir/$dlname~ 349697cf2ee2Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 349797cf2ee2Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 349897cf2ee2Smrg fi' 349997cf2ee2Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 350097cf2ee2Smrg dlpath=$dir/\$dldll~ 350197cf2ee2Smrg $RM \$dlpath' 350297cf2ee2Smrg shlibpath_overrides_runpath=yes 3503a966c04fSmrg 350497cf2ee2Smrg case $host_os in 350597cf2ee2Smrg cygwin*) 350697cf2ee2Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 350797cf2ee2Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 350897cf2ee2Smrgm4_if([$1], [],[ 350997cf2ee2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 351097cf2ee2Smrg ;; 351197cf2ee2Smrg mingw* | cegcc*) 351297cf2ee2Smrg # MinGW DLLs use traditional 'lib' prefix 351397cf2ee2Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 351497cf2ee2Smrg ;; 351597cf2ee2Smrg pw32*) 351697cf2ee2Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 351797cf2ee2Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 351897cf2ee2Smrg ;; 351997cf2ee2Smrg esac 352097cf2ee2Smrg dynamic_linker='Win32 ld.exe' 352197cf2ee2Smrg ;; 3522a966c04fSmrg 352397cf2ee2Smrg *,cl*) 352497cf2ee2Smrg # Native MSVC 352597cf2ee2Smrg libname_spec='$name' 352697cf2ee2Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 352797cf2ee2Smrg library_names_spec='${libname}.dll.lib' 352897cf2ee2Smrg 352997cf2ee2Smrg case $build_os in 353097cf2ee2Smrg mingw*) 353197cf2ee2Smrg sys_lib_search_path_spec= 353297cf2ee2Smrg lt_save_ifs=$IFS 353397cf2ee2Smrg IFS=';' 353497cf2ee2Smrg for lt_path in $LIB 353597cf2ee2Smrg do 353697cf2ee2Smrg IFS=$lt_save_ifs 353797cf2ee2Smrg # Let DOS variable expansion print the short 8.3 style file name. 353897cf2ee2Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 353997cf2ee2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 354097cf2ee2Smrg done 354197cf2ee2Smrg IFS=$lt_save_ifs 354297cf2ee2Smrg # Convert to MSYS style. 354397cf2ee2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 354497cf2ee2Smrg ;; 354597cf2ee2Smrg cygwin*) 354697cf2ee2Smrg # Convert to unix form, then to dos form, then back to unix form 354797cf2ee2Smrg # but this time dos style (no spaces!) so that the unix form looks 354897cf2ee2Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 354997cf2ee2Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 355097cf2ee2Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 355197cf2ee2Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 355297cf2ee2Smrg ;; 355397cf2ee2Smrg *) 355497cf2ee2Smrg sys_lib_search_path_spec="$LIB" 355597cf2ee2Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 355697cf2ee2Smrg # It is most probably a Windows format PATH. 355797cf2ee2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 35586e7d3316Smrg else 355997cf2ee2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 356097cf2ee2Smrg fi 356197cf2ee2Smrg # FIXME: find the short name or the path components, as spaces are 356297cf2ee2Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 356397cf2ee2Smrg ;; 3564a966c04fSmrg esac 3565a966c04fSmrg 356697cf2ee2Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 356797cf2ee2Smrg postinstall_cmds='base_file=`basename \${file}`~ 356897cf2ee2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 356997cf2ee2Smrg dldir=$destdir/`dirname \$dlpath`~ 357097cf2ee2Smrg test -d \$dldir || mkdir -p \$dldir~ 357197cf2ee2Smrg $install_prog $dir/$dlname \$dldir/$dlname' 357297cf2ee2Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 357397cf2ee2Smrg dlpath=$dir/\$dldll~ 357497cf2ee2Smrg $RM \$dlpath' 357597cf2ee2Smrg shlibpath_overrides_runpath=yes 357697cf2ee2Smrg dynamic_linker='Win32 link.exe' 3577a966c04fSmrg ;; 3578a966c04fSmrg 357997cf2ee2Smrg *) 358097cf2ee2Smrg # Assume MSVC wrapper 358197cf2ee2Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 358297cf2ee2Smrg dynamic_linker='Win32 ld.exe' 35836e7d3316Smrg ;; 358497cf2ee2Smrg esac 358597cf2ee2Smrg # FIXME: first we should search . and the directory the executable is in 358697cf2ee2Smrg shlibpath_var=PATH 358797cf2ee2Smrg ;; 3588a966c04fSmrg 358997cf2ee2Smrgdarwin* | rhapsody*) 359097cf2ee2Smrg dynamic_linker="$host_os dyld" 359197cf2ee2Smrg version_type=darwin 359297cf2ee2Smrg need_lib_prefix=no 359397cf2ee2Smrg need_version=no 359497cf2ee2Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 359597cf2ee2Smrg soname_spec='${libname}${release}${major}$shared_ext' 359697cf2ee2Smrg shlibpath_overrides_runpath=yes 359797cf2ee2Smrg shlibpath_var=DYLD_LIBRARY_PATH 359897cf2ee2Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 359997cf2ee2Smrgm4_if([$1], [],[ 360097cf2ee2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 360197cf2ee2Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 360297cf2ee2Smrg ;; 3603a966c04fSmrg 360497cf2ee2Smrgdgux*) 3605ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 360697cf2ee2Smrg need_lib_prefix=no 360797cf2ee2Smrg need_version=no 360897cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 360997cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 361097cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 361197cf2ee2Smrg ;; 3612a966c04fSmrg 361397cf2ee2Smrgfreebsd* | dragonfly*) 361497cf2ee2Smrg # DragonFly does not have aout. When/if they implement a new 361597cf2ee2Smrg # versioning mechanism, adjust this. 361697cf2ee2Smrg if test -x /usr/bin/objformat; then 361797cf2ee2Smrg objformat=`/usr/bin/objformat` 3618a966c04fSmrg else 361997cf2ee2Smrg case $host_os in 3620ac92798bSmrg freebsd[[23]].*) objformat=aout ;; 362197cf2ee2Smrg *) objformat=elf ;; 362297cf2ee2Smrg esac 3623a966c04fSmrg fi 362497cf2ee2Smrg version_type=freebsd-$objformat 362597cf2ee2Smrg case $version_type in 362697cf2ee2Smrg freebsd-elf*) 362797cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 362897cf2ee2Smrg need_version=no 362997cf2ee2Smrg need_lib_prefix=no 363097cf2ee2Smrg ;; 363197cf2ee2Smrg freebsd-*) 363297cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 363397cf2ee2Smrg need_version=yes 363497cf2ee2Smrg ;; 363597cf2ee2Smrg esac 363697cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 363797cf2ee2Smrg case $host_os in 3638ac92798bSmrg freebsd2.*) 363997cf2ee2Smrg shlibpath_overrides_runpath=yes 364097cf2ee2Smrg ;; 364197cf2ee2Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 364297cf2ee2Smrg shlibpath_overrides_runpath=yes 364397cf2ee2Smrg hardcode_into_libs=yes 364497cf2ee2Smrg ;; 364597cf2ee2Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 364697cf2ee2Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 364797cf2ee2Smrg shlibpath_overrides_runpath=no 364897cf2ee2Smrg hardcode_into_libs=yes 364997cf2ee2Smrg ;; 365097cf2ee2Smrg *) # from 4.6 on, and DragonFly 365197cf2ee2Smrg shlibpath_overrides_runpath=yes 365297cf2ee2Smrg hardcode_into_libs=yes 365397cf2ee2Smrg ;; 365497cf2ee2Smrg esac 365597cf2ee2Smrg ;; 3656a966c04fSmrg 365797cf2ee2Smrggnu*) 3658ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 365997cf2ee2Smrg need_lib_prefix=no 366097cf2ee2Smrg need_version=no 366197cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 366297cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 366397cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 3664ac92798bSmrg shlibpath_overrides_runpath=no 366597cf2ee2Smrg hardcode_into_libs=yes 366697cf2ee2Smrg ;; 3667a966c04fSmrg 366897cf2ee2Smrghaiku*) 3669ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 367097cf2ee2Smrg need_lib_prefix=no 367197cf2ee2Smrg need_version=no 367297cf2ee2Smrg dynamic_linker="$host_os runtime_loader" 367397cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 367497cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 367597cf2ee2Smrg shlibpath_var=LIBRARY_PATH 367697cf2ee2Smrg shlibpath_overrides_runpath=yes 367797cf2ee2Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 367897cf2ee2Smrg hardcode_into_libs=yes 367997cf2ee2Smrg ;; 3680a966c04fSmrg 368197cf2ee2Smrghpux9* | hpux10* | hpux11*) 368297cf2ee2Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 368397cf2ee2Smrg # link against other versions. 368497cf2ee2Smrg version_type=sunos 368597cf2ee2Smrg need_lib_prefix=no 368697cf2ee2Smrg need_version=no 368797cf2ee2Smrg case $host_cpu in 368897cf2ee2Smrg ia64*) 368997cf2ee2Smrg shrext_cmds='.so' 369097cf2ee2Smrg hardcode_into_libs=yes 369197cf2ee2Smrg dynamic_linker="$host_os dld.so" 369297cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 369397cf2ee2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 369497cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 369597cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 369697cf2ee2Smrg if test "X$HPUX_IA64_MODE" = X32; then 369797cf2ee2Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 369897cf2ee2Smrg else 369997cf2ee2Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3700a966c04fSmrg fi 370197cf2ee2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 370297cf2ee2Smrg ;; 370397cf2ee2Smrg hppa*64*) 370497cf2ee2Smrg shrext_cmds='.sl' 370597cf2ee2Smrg hardcode_into_libs=yes 370697cf2ee2Smrg dynamic_linker="$host_os dld.sl" 370797cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 370897cf2ee2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 370997cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 371097cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 371197cf2ee2Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 371297cf2ee2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 371397cf2ee2Smrg ;; 371497cf2ee2Smrg *) 371597cf2ee2Smrg shrext_cmds='.sl' 371697cf2ee2Smrg dynamic_linker="$host_os dld.sl" 371797cf2ee2Smrg shlibpath_var=SHLIB_PATH 371897cf2ee2Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 371997cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 372097cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 3721a966c04fSmrg ;; 3722a966c04fSmrg esac 372397cf2ee2Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 372497cf2ee2Smrg postinstall_cmds='chmod 555 $lib' 372597cf2ee2Smrg # or fails outright, so override atomically: 372697cf2ee2Smrg install_override_mode=555 372797cf2ee2Smrg ;; 3728a966c04fSmrg 372997cf2ee2Smrginterix[[3-9]]*) 3730ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 373197cf2ee2Smrg need_lib_prefix=no 373297cf2ee2Smrg need_version=no 373397cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 373497cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 373597cf2ee2Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 373697cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 373797cf2ee2Smrg shlibpath_overrides_runpath=no 373897cf2ee2Smrg hardcode_into_libs=yes 373997cf2ee2Smrg ;; 3740a966c04fSmrg 374197cf2ee2Smrgirix5* | irix6* | nonstopux*) 374297cf2ee2Smrg case $host_os in 374397cf2ee2Smrg nonstopux*) version_type=nonstopux ;; 374497cf2ee2Smrg *) 374597cf2ee2Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3746ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 374797cf2ee2Smrg else 374897cf2ee2Smrg version_type=irix 374997cf2ee2Smrg fi ;; 3750a966c04fSmrg esac 375197cf2ee2Smrg need_lib_prefix=no 375297cf2ee2Smrg need_version=no 375397cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 375497cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 375597cf2ee2Smrg case $host_os in 375697cf2ee2Smrg irix5* | nonstopux*) 375797cf2ee2Smrg libsuff= shlibsuff= 375897cf2ee2Smrg ;; 375997cf2ee2Smrg *) 376097cf2ee2Smrg case $LD in # libtool.m4 will add one of these switches to LD 376197cf2ee2Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 376297cf2ee2Smrg libsuff= shlibsuff= libmagic=32-bit;; 376397cf2ee2Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 376497cf2ee2Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 376597cf2ee2Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 376697cf2ee2Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 376797cf2ee2Smrg *) libsuff= shlibsuff= libmagic=never-match;; 376897cf2ee2Smrg esac 376997cf2ee2Smrg ;; 377097cf2ee2Smrg esac 377197cf2ee2Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 377297cf2ee2Smrg shlibpath_overrides_runpath=no 377397cf2ee2Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 377497cf2ee2Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 377597cf2ee2Smrg hardcode_into_libs=yes 377697cf2ee2Smrg ;; 37776e7d3316Smrg 377897cf2ee2Smrg# No shared lib support for Linux oldld, aout, or coff. 377997cf2ee2Smrglinux*oldld* | linux*aout* | linux*coff*) 378097cf2ee2Smrg dynamic_linker=no 378197cf2ee2Smrg ;; 3782a966c04fSmrg 3783ac92798bSmrg# This must be glibc/ELF. 378497cf2ee2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3785ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 378697cf2ee2Smrg need_lib_prefix=no 378797cf2ee2Smrg need_version=no 378897cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 378997cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 379097cf2ee2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 379197cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 379297cf2ee2Smrg shlibpath_overrides_runpath=no 3793a966c04fSmrg 379497cf2ee2Smrg # Some binutils ld are patched to set DT_RUNPATH 379597cf2ee2Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 379697cf2ee2Smrg [lt_cv_shlibpath_overrides_runpath=no 379797cf2ee2Smrg save_LDFLAGS=$LDFLAGS 379897cf2ee2Smrg save_libdir=$libdir 379997cf2ee2Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 380097cf2ee2Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 380197cf2ee2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 380297cf2ee2Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 380397cf2ee2Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 380497cf2ee2Smrg LDFLAGS=$save_LDFLAGS 380597cf2ee2Smrg libdir=$save_libdir 380697cf2ee2Smrg ]) 380797cf2ee2Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3808a966c04fSmrg 380997cf2ee2Smrg # This implies no fast_install, which is unacceptable. 381097cf2ee2Smrg # Some rework will be needed to allow for fast_install 381197cf2ee2Smrg # before this can be enabled. 381297cf2ee2Smrg hardcode_into_libs=yes 3813a966c04fSmrg 381497cf2ee2Smrg # Append ld.so.conf contents to the search path 381597cf2ee2Smrg if test -f /etc/ld.so.conf; then 381697cf2ee2Smrg 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' ' '` 381797cf2ee2Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3818a966c04fSmrg fi 3819a966c04fSmrg 382097cf2ee2Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 382197cf2ee2Smrg # powerpc, because MkLinux only supported shared libraries with the 382297cf2ee2Smrg # GNU dynamic linker. Since this was broken with cross compilers, 382397cf2ee2Smrg # most powerpc-linux boxes support dynamic linking these days and 382497cf2ee2Smrg # people can always --disable-shared, the test was removed, and we 382597cf2ee2Smrg # assume the GNU/Linux dynamic linker is in use. 382697cf2ee2Smrg dynamic_linker='GNU/Linux ld.so' 382797cf2ee2Smrg ;; 3828a966c04fSmrg 382997cf2ee2Smrgnetbsd*) 383097cf2ee2Smrg version_type=sunos 383197cf2ee2Smrg need_lib_prefix=no 383297cf2ee2Smrg need_version=no 383397cf2ee2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 383497cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 383597cf2ee2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 383697cf2ee2Smrg dynamic_linker='NetBSD (a.out) ld.so' 3837a966c04fSmrg else 383897cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 383997cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 384097cf2ee2Smrg dynamic_linker='NetBSD ld.elf_so' 3841a966c04fSmrg fi 384297cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 384397cf2ee2Smrg shlibpath_overrides_runpath=yes 384497cf2ee2Smrg hardcode_into_libs=yes 384597cf2ee2Smrg ;; 3846a966c04fSmrg 384797cf2ee2Smrgnewsos6) 3848ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 384997cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 385097cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 385197cf2ee2Smrg shlibpath_overrides_runpath=yes 385297cf2ee2Smrg ;; 3853a966c04fSmrg 385497cf2ee2Smrg*nto* | *qnx*) 385597cf2ee2Smrg version_type=qnx 385697cf2ee2Smrg need_lib_prefix=no 385797cf2ee2Smrg need_version=no 385897cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 385997cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 386097cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 386197cf2ee2Smrg shlibpath_overrides_runpath=no 386297cf2ee2Smrg hardcode_into_libs=yes 386397cf2ee2Smrg dynamic_linker='ldqnx.so' 386497cf2ee2Smrg ;; 3865a966c04fSmrg 386697cf2ee2Smrgopenbsd*) 386797cf2ee2Smrg version_type=sunos 386897cf2ee2Smrg sys_lib_dlsearch_path_spec="/usr/lib" 386997cf2ee2Smrg need_lib_prefix=no 387097cf2ee2Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3871a966c04fSmrg case $host_os in 387297cf2ee2Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 387397cf2ee2Smrg *) need_version=no ;; 3874a966c04fSmrg esac 387597cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 387697cf2ee2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 387797cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 387897cf2ee2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 387997cf2ee2Smrg case $host_os in 388097cf2ee2Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 388197cf2ee2Smrg shlibpath_overrides_runpath=no 388297cf2ee2Smrg ;; 388397cf2ee2Smrg *) 388497cf2ee2Smrg shlibpath_overrides_runpath=yes 388597cf2ee2Smrg ;; 388697cf2ee2Smrg esac 388797cf2ee2Smrg else 388897cf2ee2Smrg shlibpath_overrides_runpath=yes 388997cf2ee2Smrg fi 389097cf2ee2Smrg ;; 3891a966c04fSmrg 389297cf2ee2Smrgos2*) 389397cf2ee2Smrg libname_spec='$name' 389497cf2ee2Smrg shrext_cmds=".dll" 389597cf2ee2Smrg need_lib_prefix=no 389697cf2ee2Smrg library_names_spec='$libname${shared_ext} $libname.a' 389797cf2ee2Smrg dynamic_linker='OS/2 ld.exe' 389897cf2ee2Smrg shlibpath_var=LIBPATH 389997cf2ee2Smrg ;; 3900a966c04fSmrg 390197cf2ee2Smrgosf3* | osf4* | osf5*) 390297cf2ee2Smrg version_type=osf 390397cf2ee2Smrg need_lib_prefix=no 390497cf2ee2Smrg need_version=no 390597cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 390697cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 390797cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 390897cf2ee2Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 390997cf2ee2Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 391097cf2ee2Smrg ;; 391197cf2ee2Smrg 391297cf2ee2Smrgrdos*) 391397cf2ee2Smrg dynamic_linker=no 391497cf2ee2Smrg ;; 391597cf2ee2Smrg 391697cf2ee2Smrgsolaris*) 3917ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 391897cf2ee2Smrg need_lib_prefix=no 391997cf2ee2Smrg need_version=no 392097cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 392197cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 392297cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 392397cf2ee2Smrg shlibpath_overrides_runpath=yes 392497cf2ee2Smrg hardcode_into_libs=yes 392597cf2ee2Smrg # ldd complains unless libraries are executable 392697cf2ee2Smrg postinstall_cmds='chmod +x $lib' 392797cf2ee2Smrg ;; 392897cf2ee2Smrg 392997cf2ee2Smrgsunos4*) 393097cf2ee2Smrg version_type=sunos 393197cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 393297cf2ee2Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 393397cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 393497cf2ee2Smrg shlibpath_overrides_runpath=yes 393597cf2ee2Smrg if test "$with_gnu_ld" = yes; then 393697cf2ee2Smrg need_lib_prefix=no 393797cf2ee2Smrg fi 393897cf2ee2Smrg need_version=yes 393997cf2ee2Smrg ;; 394097cf2ee2Smrg 394197cf2ee2Smrgsysv4 | sysv4.3*) 3942ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 394397cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 394497cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 394597cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 394697cf2ee2Smrg case $host_vendor in 394797cf2ee2Smrg sni) 394897cf2ee2Smrg shlibpath_overrides_runpath=no 394997cf2ee2Smrg need_lib_prefix=no 395097cf2ee2Smrg runpath_var=LD_RUN_PATH 395197cf2ee2Smrg ;; 395297cf2ee2Smrg siemens) 395397cf2ee2Smrg need_lib_prefix=no 395497cf2ee2Smrg ;; 395597cf2ee2Smrg motorola) 395697cf2ee2Smrg need_lib_prefix=no 395797cf2ee2Smrg need_version=no 395897cf2ee2Smrg shlibpath_overrides_runpath=no 395997cf2ee2Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 396097cf2ee2Smrg ;; 39616e7d3316Smrg esac 396297cf2ee2Smrg ;; 3963a966c04fSmrg 396497cf2ee2Smrgsysv4*MP*) 396597cf2ee2Smrg if test -d /usr/nec ;then 3966ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 396797cf2ee2Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 396897cf2ee2Smrg soname_spec='$libname${shared_ext}.$major' 396997cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 397097cf2ee2Smrg fi 3971a966c04fSmrg ;; 3972a966c04fSmrg 397397cf2ee2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 397497cf2ee2Smrg version_type=freebsd-elf 3975a966c04fSmrg need_lib_prefix=no 3976a966c04fSmrg need_version=no 397797cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 397897cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 397997cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 398097cf2ee2Smrg shlibpath_overrides_runpath=yes 3981a966c04fSmrg hardcode_into_libs=yes 398297cf2ee2Smrg if test "$with_gnu_ld" = yes; then 398397cf2ee2Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3984a966c04fSmrg else 398597cf2ee2Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3986a966c04fSmrg case $host_os in 398797cf2ee2Smrg sco3.2v5*) 398897cf2ee2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 398997cf2ee2Smrg ;; 3990a966c04fSmrg esac 3991a966c04fSmrg fi 399297cf2ee2Smrg sys_lib_dlsearch_path_spec='/usr/lib' 3993a966c04fSmrg ;; 3994a966c04fSmrg 399597cf2ee2Smrgtpf*) 399697cf2ee2Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3997ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 399897cf2ee2Smrg need_lib_prefix=no 3999a966c04fSmrg need_version=no 4000a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4001a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 400297cf2ee2Smrg shlibpath_overrides_runpath=no 400397cf2ee2Smrg hardcode_into_libs=yes 4004a966c04fSmrg ;; 4005a966c04fSmrg 400697cf2ee2Smrguts4*) 4007ac92798bSmrg version_type=linux # correct to gnu/linux during the next big refactor 400897cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4009a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 4010a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 4011a966c04fSmrg ;; 4012a966c04fSmrg 401397cf2ee2Smrg*) 4014a966c04fSmrg dynamic_linker=no 4015a966c04fSmrg ;; 401697cf2ee2Smrgesac 401797cf2ee2SmrgAC_MSG_RESULT([$dynamic_linker]) 401897cf2ee2Smrgtest "$dynamic_linker" = no && can_build_shared=no 4019a966c04fSmrg 402097cf2ee2Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 402197cf2ee2Smrgif test "$GCC" = yes; then 402297cf2ee2Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 402397cf2ee2Smrgfi 4024a966c04fSmrg 402597cf2ee2Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 402697cf2ee2Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 402797cf2ee2Smrgfi 402897cf2ee2Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 402997cf2ee2Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 403097cf2ee2Smrgfi 4031a966c04fSmrg 403297cf2ee2Smrg_LT_DECL([], [variables_saved_for_relink], [1], 403397cf2ee2Smrg [Variables whose values should be saved in libtool wrapper scripts and 403497cf2ee2Smrg restored at link time]) 403597cf2ee2Smrg_LT_DECL([], [need_lib_prefix], [0], 403697cf2ee2Smrg [Do we need the "lib" prefix for modules?]) 403797cf2ee2Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 403897cf2ee2Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 403997cf2ee2Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 404097cf2ee2Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 404197cf2ee2Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 404297cf2ee2Smrg [Is shlibpath searched before the hard-coded library search path?]) 404397cf2ee2Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 404497cf2ee2Smrg_LT_DECL([], [library_names_spec], [1], 404597cf2ee2Smrg [[List of archive names. First name is the real one, the rest are links. 404697cf2ee2Smrg The last name is the one that the linker finds with -lNAME]]) 404797cf2ee2Smrg_LT_DECL([], [soname_spec], [1], 404897cf2ee2Smrg [[The coded name of the library, if different from the real name]]) 404997cf2ee2Smrg_LT_DECL([], [install_override_mode], [1], 405097cf2ee2Smrg [Permission mode override for installation of shared libraries]) 405197cf2ee2Smrg_LT_DECL([], [postinstall_cmds], [2], 405297cf2ee2Smrg [Command to use after installation of a shared archive]) 405397cf2ee2Smrg_LT_DECL([], [postuninstall_cmds], [2], 405497cf2ee2Smrg [Command to use after uninstallation of a shared archive]) 405597cf2ee2Smrg_LT_DECL([], [finish_cmds], [2], 405697cf2ee2Smrg [Commands used to finish a libtool library installation in a directory]) 405797cf2ee2Smrg_LT_DECL([], [finish_eval], [1], 405897cf2ee2Smrg [[As "finish_cmds", except a single script fragment to be evaled but 405997cf2ee2Smrg not shown]]) 406097cf2ee2Smrg_LT_DECL([], [hardcode_into_libs], [0], 406197cf2ee2Smrg [Whether we should hardcode library paths into libraries]) 406297cf2ee2Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 406397cf2ee2Smrg [Compile-time system search path for libraries]) 406497cf2ee2Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 406597cf2ee2Smrg [Run-time system search path for libraries]) 406697cf2ee2Smrg])# _LT_SYS_DYNAMIC_LINKER 40676e7d3316Smrg 4068a966c04fSmrg 406997cf2ee2Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 407097cf2ee2Smrg# -------------------------- 407197cf2ee2Smrg# find a file program which can recognize shared library 407297cf2ee2SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 407397cf2ee2Smrg[m4_require([_LT_DECL_EGREP])dnl 407497cf2ee2SmrgAC_MSG_CHECKING([for $1]) 407597cf2ee2SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 407697cf2ee2Smrg[case $MAGIC_CMD in 407797cf2ee2Smrg[[\\/*] | ?:[\\/]*]) 407897cf2ee2Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4079a966c04fSmrg ;; 408097cf2ee2Smrg*) 408197cf2ee2Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 408297cf2ee2Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 408397cf2ee2Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 408497cf2ee2Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 408597cf2ee2Smrgdnl not every word. This closes a longstanding sh security hole. 408697cf2ee2Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 408797cf2ee2Smrg for ac_dir in $ac_dummy; do 408897cf2ee2Smrg IFS="$lt_save_ifs" 408997cf2ee2Smrg test -z "$ac_dir" && ac_dir=. 409097cf2ee2Smrg if test -f $ac_dir/$1; then 409197cf2ee2Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 409297cf2ee2Smrg if test -n "$file_magic_test_file"; then 409397cf2ee2Smrg case $deplibs_check_method in 409497cf2ee2Smrg "file_magic "*) 409597cf2ee2Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 409697cf2ee2Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 409797cf2ee2Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 409897cf2ee2Smrg $EGREP "$file_magic_regex" > /dev/null; then 409997cf2ee2Smrg : 410097cf2ee2Smrg else 410197cf2ee2Smrg cat <<_LT_EOF 1>&2 4102a966c04fSmrg 410397cf2ee2Smrg*** Warning: the command libtool uses to detect shared libraries, 410497cf2ee2Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 410597cf2ee2Smrg*** The result is that libtool may fail to recognize shared libraries 410697cf2ee2Smrg*** as such. This will affect the creation of libtool libraries that 410797cf2ee2Smrg*** depend on shared libraries, but programs linked with such libtool 410897cf2ee2Smrg*** libraries will work regardless of this problem. Nevertheless, you 410997cf2ee2Smrg*** may want to report the problem to your system manager and/or to 411097cf2ee2Smrg*** bug-libtool@gnu.org 4111a966c04fSmrg 411297cf2ee2Smrg_LT_EOF 411397cf2ee2Smrg fi ;; 411497cf2ee2Smrg esac 411597cf2ee2Smrg fi 411697cf2ee2Smrg break 411797cf2ee2Smrg fi 411897cf2ee2Smrg done 411997cf2ee2Smrg IFS="$lt_save_ifs" 412097cf2ee2Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 4121a966c04fSmrg ;; 412297cf2ee2Smrgesac]) 412397cf2ee2SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 412497cf2ee2Smrgif test -n "$MAGIC_CMD"; then 412597cf2ee2Smrg AC_MSG_RESULT($MAGIC_CMD) 412697cf2ee2Smrgelse 412797cf2ee2Smrg AC_MSG_RESULT(no) 412897cf2ee2Smrgfi 412997cf2ee2Smrg_LT_DECL([], [MAGIC_CMD], [0], 413097cf2ee2Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 413197cf2ee2Smrg])# _LT_PATH_TOOL_PREFIX 4132a966c04fSmrg 413397cf2ee2Smrg# Old name: 413497cf2ee2SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 413597cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 413697cf2ee2Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 41376e7d3316Smrg 4138a966c04fSmrg 413997cf2ee2Smrg# _LT_PATH_MAGIC 414097cf2ee2Smrg# -------------- 414197cf2ee2Smrg# find a file program which can recognize a shared library 414297cf2ee2Smrgm4_defun([_LT_PATH_MAGIC], 414397cf2ee2Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 414497cf2ee2Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 414597cf2ee2Smrg if test -n "$ac_tool_prefix"; then 414697cf2ee2Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4147a966c04fSmrg else 414897cf2ee2Smrg MAGIC_CMD=: 4149a966c04fSmrg fi 415097cf2ee2Smrgfi 415197cf2ee2Smrg])# _LT_PATH_MAGIC 4152a966c04fSmrg 4153a966c04fSmrg 415497cf2ee2Smrg# LT_PATH_LD 415597cf2ee2Smrg# ---------- 415697cf2ee2Smrg# find the pathname to the GNU or non-GNU linker 415797cf2ee2SmrgAC_DEFUN([LT_PATH_LD], 415897cf2ee2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 415997cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 416097cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 416197cf2ee2Smrgm4_require([_LT_DECL_SED])dnl 416297cf2ee2Smrgm4_require([_LT_DECL_EGREP])dnl 416397cf2ee2Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4164a966c04fSmrg 416597cf2ee2SmrgAC_ARG_WITH([gnu-ld], 416697cf2ee2Smrg [AS_HELP_STRING([--with-gnu-ld], 416797cf2ee2Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 416897cf2ee2Smrg [test "$withval" = no || with_gnu_ld=yes], 416997cf2ee2Smrg [with_gnu_ld=no])dnl 417097cf2ee2Smrg 417197cf2ee2Smrgac_prog=ld 417297cf2ee2Smrgif test "$GCC" = yes; then 417397cf2ee2Smrg # Check if gcc -print-prog-name=ld gives a path. 417497cf2ee2Smrg AC_MSG_CHECKING([for ld used by $CC]) 417597cf2ee2Smrg case $host in 417697cf2ee2Smrg *-*-mingw*) 417797cf2ee2Smrg # gcc leaves a trailing carriage return which upsets mingw 417897cf2ee2Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 417997cf2ee2Smrg *) 418097cf2ee2Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4181a966c04fSmrg esac 418297cf2ee2Smrg case $ac_prog in 418397cf2ee2Smrg # Accept absolute paths. 418497cf2ee2Smrg [[\\/]]* | ?:[[\\/]]*) 418597cf2ee2Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 418697cf2ee2Smrg # Canonicalize the pathname of ld 418797cf2ee2Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 418897cf2ee2Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 418997cf2ee2Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 419097cf2ee2Smrg done 419197cf2ee2Smrg test -z "$LD" && LD="$ac_prog" 419297cf2ee2Smrg ;; 419397cf2ee2Smrg "") 419497cf2ee2Smrg # If it fails, then pretend we aren't using GCC. 419597cf2ee2Smrg ac_prog=ld 419697cf2ee2Smrg ;; 419797cf2ee2Smrg *) 419897cf2ee2Smrg # If it is relative, then search for the first ld in PATH. 419997cf2ee2Smrg with_gnu_ld=unknown 420097cf2ee2Smrg ;; 420197cf2ee2Smrg esac 420297cf2ee2Smrgelif test "$with_gnu_ld" = yes; then 420397cf2ee2Smrg AC_MSG_CHECKING([for GNU ld]) 420497cf2ee2Smrgelse 420597cf2ee2Smrg AC_MSG_CHECKING([for non-GNU ld]) 420697cf2ee2Smrgfi 420797cf2ee2SmrgAC_CACHE_VAL(lt_cv_path_LD, 420897cf2ee2Smrg[if test -z "$LD"; then 420997cf2ee2Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 421097cf2ee2Smrg for ac_dir in $PATH; do 421197cf2ee2Smrg IFS="$lt_save_ifs" 421297cf2ee2Smrg test -z "$ac_dir" && ac_dir=. 421397cf2ee2Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 421497cf2ee2Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 421597cf2ee2Smrg # Check to see if the program is GNU ld. I'd rather use --version, 421697cf2ee2Smrg # but apparently some variants of GNU ld only accept -v. 421797cf2ee2Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 421897cf2ee2Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 421997cf2ee2Smrg *GNU* | *'with BFD'*) 422097cf2ee2Smrg test "$with_gnu_ld" != no && break 4221a966c04fSmrg ;; 4222a966c04fSmrg *) 422397cf2ee2Smrg test "$with_gnu_ld" != yes && break 4224a966c04fSmrg ;; 4225a966c04fSmrg esac 422697cf2ee2Smrg fi 422797cf2ee2Smrg done 422897cf2ee2Smrg IFS="$lt_save_ifs" 422997cf2ee2Smrgelse 423097cf2ee2Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 423197cf2ee2Smrgfi]) 423297cf2ee2SmrgLD="$lt_cv_path_LD" 423397cf2ee2Smrgif test -n "$LD"; then 423497cf2ee2Smrg AC_MSG_RESULT($LD) 423597cf2ee2Smrgelse 423697cf2ee2Smrg AC_MSG_RESULT(no) 423797cf2ee2Smrgfi 423897cf2ee2Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 423997cf2ee2Smrg_LT_PATH_LD_GNU 424097cf2ee2SmrgAC_SUBST([LD]) 4241a966c04fSmrg 424297cf2ee2Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 424397cf2ee2Smrg])# LT_PATH_LD 4244a966c04fSmrg 424597cf2ee2Smrg# Old names: 424697cf2ee2SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 424797cf2ee2SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 424897cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 424997cf2ee2Smrgdnl AC_DEFUN([AM_PROG_LD], []) 425097cf2ee2Smrgdnl AC_DEFUN([AC_PROG_LD], []) 4251a966c04fSmrg 42522e2dd055Smrg 425397cf2ee2Smrg# _LT_PATH_LD_GNU 425497cf2ee2Smrg#- -------------- 425597cf2ee2Smrgm4_defun([_LT_PATH_LD_GNU], 425697cf2ee2Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 425797cf2ee2Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 425897cf2ee2Smrgcase `$LD -v 2>&1 </dev/null` in 425997cf2ee2Smrg*GNU* | *'with BFD'*) 426097cf2ee2Smrg lt_cv_prog_gnu_ld=yes 4261a966c04fSmrg ;; 426297cf2ee2Smrg*) 426397cf2ee2Smrg lt_cv_prog_gnu_ld=no 4264a966c04fSmrg ;; 426597cf2ee2Smrgesac]) 426697cf2ee2Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 426797cf2ee2Smrg])# _LT_PATH_LD_GNU 4268a966c04fSmrg 426997cf2ee2Smrg 427097cf2ee2Smrg# _LT_CMD_RELOAD 427197cf2ee2Smrg# -------------- 427297cf2ee2Smrg# find reload flag for linker 427397cf2ee2Smrg# -- PORTME Some linkers may need a different reload flag. 427497cf2ee2Smrgm4_defun([_LT_CMD_RELOAD], 427597cf2ee2Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 427697cf2ee2Smrg lt_cv_ld_reload_flag, 427797cf2ee2Smrg [lt_cv_ld_reload_flag='-r']) 427897cf2ee2Smrgreload_flag=$lt_cv_ld_reload_flag 427997cf2ee2Smrgcase $reload_flag in 428097cf2ee2Smrg"" | " "*) ;; 428197cf2ee2Smrg*) reload_flag=" $reload_flag" ;; 428297cf2ee2Smrgesac 428397cf2ee2Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 428497cf2ee2Smrgcase $host_os in 428597cf2ee2Smrg cygwin* | mingw* | pw32* | cegcc*) 428697cf2ee2Smrg if test "$GCC" != yes; then 428797cf2ee2Smrg reload_cmds=false 428897cf2ee2Smrg fi 428997cf2ee2Smrg ;; 429097cf2ee2Smrg darwin*) 429197cf2ee2Smrg if test "$GCC" = yes; then 429297cf2ee2Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 429397cf2ee2Smrg else 429497cf2ee2Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 429597cf2ee2Smrg fi 429697cf2ee2Smrg ;; 429797cf2ee2Smrgesac 429897cf2ee2Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 429997cf2ee2Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 430097cf2ee2Smrg])# _LT_CMD_RELOAD 430197cf2ee2Smrg 430297cf2ee2Smrg 430397cf2ee2Smrg# _LT_CHECK_MAGIC_METHOD 430497cf2ee2Smrg# ---------------------- 430597cf2ee2Smrg# how to check for library dependencies 430697cf2ee2Smrg# -- PORTME fill in with the dynamic library characteristics 430797cf2ee2Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 430897cf2ee2Smrg[m4_require([_LT_DECL_EGREP]) 430997cf2ee2Smrgm4_require([_LT_DECL_OBJDUMP]) 431097cf2ee2SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 431197cf2ee2Smrglt_cv_deplibs_check_method, 431297cf2ee2Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 431397cf2ee2Smrglt_cv_file_magic_test_file= 431497cf2ee2Smrglt_cv_deplibs_check_method='unknown' 431597cf2ee2Smrg# Need to set the preceding variable on all platforms that support 431697cf2ee2Smrg# interlibrary dependencies. 431797cf2ee2Smrg# 'none' -- dependencies not supported. 431897cf2ee2Smrg# `unknown' -- same as none, but documents that we really don't know. 431997cf2ee2Smrg# 'pass_all' -- all dependencies passed with no checks. 432097cf2ee2Smrg# 'test_compile' -- check by making test program. 432197cf2ee2Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 432297cf2ee2Smrg# which responds to the $file_magic_cmd with a given extended regex. 432397cf2ee2Smrg# If you have `file' or equivalent on your system and you're not sure 432497cf2ee2Smrg# whether `pass_all' will *always* work, you probably want this one. 432597cf2ee2Smrg 432697cf2ee2Smrgcase $host_os in 432797cf2ee2Smrgaix[[4-9]]*) 432897cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4329a966c04fSmrg ;; 4330a966c04fSmrg 433197cf2ee2Smrgbeos*) 433297cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4333a966c04fSmrg ;; 4334a966c04fSmrg 433597cf2ee2Smrgbsdi[[45]]*) 433697cf2ee2Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 433797cf2ee2Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 433897cf2ee2Smrg lt_cv_file_magic_test_file=/shlib/libc.so 433997cf2ee2Smrg ;; 434097cf2ee2Smrg 434197cf2ee2Smrgcygwin*) 434297cf2ee2Smrg # func_win32_libid is a shell function defined in ltmain.sh 434397cf2ee2Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 434497cf2ee2Smrg lt_cv_file_magic_cmd='func_win32_libid' 434597cf2ee2Smrg ;; 434697cf2ee2Smrg 434797cf2ee2Smrgmingw* | pw32*) 434897cf2ee2Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 434997cf2ee2Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 435097cf2ee2Smrg # unless we find 'file', for example because we are cross-compiling. 435197cf2ee2Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 435297cf2ee2Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 435397cf2ee2Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 435497cf2ee2Smrg lt_cv_file_magic_cmd='func_win32_libid' 4355a966c04fSmrg else 435697cf2ee2Smrg # Keep this pattern in sync with the one in func_win32_libid. 435797cf2ee2Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 435897cf2ee2Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 435997cf2ee2Smrg fi 436097cf2ee2Smrg ;; 436197cf2ee2Smrg 436297cf2ee2Smrgcegcc*) 436397cf2ee2Smrg # use the weaker test based on 'objdump'. See mingw*. 436497cf2ee2Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 436597cf2ee2Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 436697cf2ee2Smrg ;; 436797cf2ee2Smrg 436897cf2ee2Smrgdarwin* | rhapsody*) 436997cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 437097cf2ee2Smrg ;; 437197cf2ee2Smrg 437297cf2ee2Smrgfreebsd* | dragonfly*) 437397cf2ee2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 437497cf2ee2Smrg case $host_cpu in 437597cf2ee2Smrg i*86 ) 437697cf2ee2Smrg # Not sure whether the presence of OpenBSD here was a mistake. 437797cf2ee2Smrg # Let's accept both of them until this is cleared up. 437897cf2ee2Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 437997cf2ee2Smrg lt_cv_file_magic_cmd=/usr/bin/file 438097cf2ee2Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 438197cf2ee2Smrg ;; 4382a966c04fSmrg esac 438397cf2ee2Smrg else 438497cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4385a966c04fSmrg fi 4386a966c04fSmrg ;; 4387a966c04fSmrg 438897cf2ee2Smrggnu*) 438997cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 43906e7d3316Smrg ;; 43916e7d3316Smrg 439297cf2ee2Smrghaiku*) 439397cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4394a966c04fSmrg ;; 4395a966c04fSmrg 439697cf2ee2Smrghpux10.20* | hpux11*) 439797cf2ee2Smrg lt_cv_file_magic_cmd=/usr/bin/file 439897cf2ee2Smrg case $host_cpu in 439997cf2ee2Smrg ia64*) 440097cf2ee2Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 440197cf2ee2Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 440297cf2ee2Smrg ;; 440397cf2ee2Smrg hppa*64*) 440497cf2ee2Smrg [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]'] 440597cf2ee2Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 440697cf2ee2Smrg ;; 440797cf2ee2Smrg *) 440897cf2ee2Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 440997cf2ee2Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 441097cf2ee2Smrg ;; 441197cf2ee2Smrg esac 4412a966c04fSmrg ;; 4413a966c04fSmrg 441497cf2ee2Smrginterix[[3-9]]*) 441597cf2ee2Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 441697cf2ee2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 441797cf2ee2Smrg ;; 4418a966c04fSmrg 441997cf2ee2Smrgirix5* | irix6* | nonstopux*) 442097cf2ee2Smrg case $LD in 442197cf2ee2Smrg *-32|*"-32 ") libmagic=32-bit;; 442297cf2ee2Smrg *-n32|*"-n32 ") libmagic=N32;; 442397cf2ee2Smrg *-64|*"-64 ") libmagic=64-bit;; 442497cf2ee2Smrg *) libmagic=never-match;; 442597cf2ee2Smrg esac 442697cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 442797cf2ee2Smrg ;; 4428a966c04fSmrg 4429ac92798bSmrg# This must be glibc/ELF. 443097cf2ee2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 443197cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 443297cf2ee2Smrg ;; 44336e7d3316Smrg 443497cf2ee2Smrgnetbsd*) 443597cf2ee2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 443697cf2ee2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 443797cf2ee2Smrg else 443897cf2ee2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 443997cf2ee2Smrg fi 444097cf2ee2Smrg ;; 44416e7d3316Smrg 444297cf2ee2Smrgnewos6*) 444397cf2ee2Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 444497cf2ee2Smrg lt_cv_file_magic_cmd=/usr/bin/file 444597cf2ee2Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 44466e7d3316Smrg ;; 4447a966c04fSmrg 444897cf2ee2Smrg*nto* | *qnx*) 444997cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4450a966c04fSmrg ;; 44516e7d3316Smrg 445297cf2ee2Smrgopenbsd*) 445397cf2ee2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 445497cf2ee2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4455a966c04fSmrg else 445697cf2ee2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4457a966c04fSmrg fi 445897cf2ee2Smrg ;; 4459a966c04fSmrg 446097cf2ee2Smrgosf3* | osf4* | osf5*) 446197cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 446297cf2ee2Smrg ;; 4463a966c04fSmrg 446497cf2ee2Smrgrdos*) 446597cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 446697cf2ee2Smrg ;; 44676e7d3316Smrg 446897cf2ee2Smrgsolaris*) 446997cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 447097cf2ee2Smrg ;; 44716e7d3316Smrg 447297cf2ee2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 447397cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 447497cf2ee2Smrg ;; 447597cf2ee2Smrg 447697cf2ee2Smrgsysv4 | sysv4.3*) 447797cf2ee2Smrg case $host_vendor in 447897cf2ee2Smrg motorola) 447997cf2ee2Smrg 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]]' 448097cf2ee2Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4481a966c04fSmrg ;; 448297cf2ee2Smrg ncr) 448397cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 448497cf2ee2Smrg ;; 448597cf2ee2Smrg sequent) 448697cf2ee2Smrg lt_cv_file_magic_cmd='/bin/file' 448797cf2ee2Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 448897cf2ee2Smrg ;; 448997cf2ee2Smrg sni) 449097cf2ee2Smrg lt_cv_file_magic_cmd='/bin/file' 449197cf2ee2Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 449297cf2ee2Smrg lt_cv_file_magic_test_file=/lib/libc.so 449397cf2ee2Smrg ;; 449497cf2ee2Smrg siemens) 449597cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 449697cf2ee2Smrg ;; 449797cf2ee2Smrg pc) 449897cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4499a966c04fSmrg ;; 4500a966c04fSmrg esac 4501a966c04fSmrg ;; 4502a966c04fSmrg 450397cf2ee2Smrgtpf*) 450497cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 450597cf2ee2Smrg ;; 4506a966c04fSmrgesac 450797cf2ee2Smrg]) 450897cf2ee2Smrg 450997cf2ee2Smrgfile_magic_glob= 451097cf2ee2Smrgwant_nocaseglob=no 451197cf2ee2Smrgif test "$build" = "$host"; then 451297cf2ee2Smrg case $host_os in 451397cf2ee2Smrg mingw* | pw32*) 451497cf2ee2Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 451597cf2ee2Smrg want_nocaseglob=yes 4516a966c04fSmrg else 451797cf2ee2Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4518a966c04fSmrg fi 4519a966c04fSmrg ;; 452097cf2ee2Smrg esac 452197cf2ee2Smrgfi 4522a966c04fSmrg 452397cf2ee2Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 452497cf2ee2Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 452597cf2ee2Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 45266e7d3316Smrg 45276e7d3316Smrg_LT_DECL([], [deplibs_check_method], [1], 45286e7d3316Smrg [Method to check whether dependent libraries are shared objects]) 45296e7d3316Smrg_LT_DECL([], [file_magic_cmd], [1], 453097cf2ee2Smrg [Command to use when deplibs_check_method = "file_magic"]) 453197cf2ee2Smrg_LT_DECL([], [file_magic_glob], [1], 453297cf2ee2Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 453397cf2ee2Smrg_LT_DECL([], [want_nocaseglob], [1], 453497cf2ee2Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 45356e7d3316Smrg])# _LT_CHECK_MAGIC_METHOD 4536a966c04fSmrg 4537a966c04fSmrg 45386e7d3316Smrg# LT_PATH_NM 4539a966c04fSmrg# ---------- 45406e7d3316Smrg# find the pathname to a BSD- or MS-compatible name lister 45416e7d3316SmrgAC_DEFUN([LT_PATH_NM], 45426e7d3316Smrg[AC_REQUIRE([AC_PROG_CC])dnl 45436e7d3316SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4544a966c04fSmrg[if test -n "$NM"; then 4545a966c04fSmrg # Let the user override the test. 4546a966c04fSmrg lt_cv_path_NM="$NM" 4547a966c04fSmrgelse 4548a966c04fSmrg lt_nm_to_check="${ac_tool_prefix}nm" 45492e2dd055Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4550a966c04fSmrg lt_nm_to_check="$lt_nm_to_check nm" 4551a966c04fSmrg fi 4552a966c04fSmrg for lt_tmp_nm in $lt_nm_to_check; do 4553a966c04fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4554a966c04fSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4555a966c04fSmrg IFS="$lt_save_ifs" 4556a966c04fSmrg test -z "$ac_dir" && ac_dir=. 4557a966c04fSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 4558a966c04fSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4559a966c04fSmrg # Check to see if the nm accepts a BSD-compat flag. 4560a966c04fSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4561a966c04fSmrg # nm: unknown option "B" ignored 4562a966c04fSmrg # Tru64's nm complains that /dev/null is an invalid object file 4563a966c04fSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4564a966c04fSmrg */dev/null* | *'Invalid file or object type'*) 4565a966c04fSmrg lt_cv_path_NM="$tmp_nm -B" 4566a966c04fSmrg break 4567a966c04fSmrg ;; 4568a966c04fSmrg *) 4569a966c04fSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4570a966c04fSmrg */dev/null*) 4571a966c04fSmrg lt_cv_path_NM="$tmp_nm -p" 4572a966c04fSmrg break 4573a966c04fSmrg ;; 4574a966c04fSmrg *) 4575a966c04fSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4576a966c04fSmrg continue # so that we can try to find one that supports BSD flags 4577a966c04fSmrg ;; 4578a966c04fSmrg esac 4579a966c04fSmrg ;; 4580a966c04fSmrg esac 4581a966c04fSmrg fi 4582a966c04fSmrg done 4583a966c04fSmrg IFS="$lt_save_ifs" 4584a966c04fSmrg done 45856e7d3316Smrg : ${lt_cv_path_NM=no} 4586a966c04fSmrgfi]) 45876e7d3316Smrgif test "$lt_cv_path_NM" != "no"; then 45886e7d3316Smrg NM="$lt_cv_path_NM" 45896e7d3316Smrgelse 45906e7d3316Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 45916e7d3316Smrg if test -n "$DUMPBIN"; then : 45926e7d3316Smrg # Let the user override the test. 45936e7d3316Smrg else 45946e7d3316Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 45956e7d3316Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 45966e7d3316Smrg *COFF*) 45976e7d3316Smrg DUMPBIN="$DUMPBIN -symbols" 45986e7d3316Smrg ;; 45996e7d3316Smrg *) 46006e7d3316Smrg DUMPBIN=: 46016e7d3316Smrg ;; 46026e7d3316Smrg esac 46036e7d3316Smrg fi 46046e7d3316Smrg AC_SUBST([DUMPBIN]) 46056e7d3316Smrg if test "$DUMPBIN" != ":"; then 46066e7d3316Smrg NM="$DUMPBIN" 46076e7d3316Smrg fi 46086e7d3316Smrgfi 46096e7d3316Smrgtest -z "$NM" && NM=nm 46106e7d3316SmrgAC_SUBST([NM]) 46116e7d3316Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 46126e7d3316Smrg 46136e7d3316SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 46146e7d3316Smrg [lt_cv_nm_interface="BSD nm" 46156e7d3316Smrg echo "int some_variable = 0;" > conftest.$ac_ext 46166e7d3316Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 46176e7d3316Smrg (eval "$ac_compile" 2>conftest.err) 46186e7d3316Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46196e7d3316Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 46206e7d3316Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 46216e7d3316Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46226e7d3316Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 46236e7d3316Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 46246e7d3316Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 46256e7d3316Smrg lt_cv_nm_interface="MS dumpbin" 46266e7d3316Smrg fi 46276e7d3316Smrg rm -f conftest*]) 46286e7d3316Smrg])# LT_PATH_NM 4629a966c04fSmrg 46306e7d3316Smrg# Old names: 46316e7d3316SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 46326e7d3316SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 46336e7d3316Smrgdnl aclocal-1.4 backwards compatibility: 46346e7d3316Smrgdnl AC_DEFUN([AM_PROG_NM], []) 46356e7d3316Smrgdnl AC_DEFUN([AC_PROG_NM], []) 4636a966c04fSmrg 463797cf2ee2Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 463897cf2ee2Smrg# -------------------------------- 463997cf2ee2Smrg# how to determine the name of the shared library 464097cf2ee2Smrg# associated with a specific link library. 464197cf2ee2Smrg# -- PORTME fill in with the dynamic library characteristics 464297cf2ee2Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 464397cf2ee2Smrg[m4_require([_LT_DECL_EGREP]) 464497cf2ee2Smrgm4_require([_LT_DECL_OBJDUMP]) 464597cf2ee2Smrgm4_require([_LT_DECL_DLLTOOL]) 464697cf2ee2SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 464797cf2ee2Smrglt_cv_sharedlib_from_linklib_cmd, 464897cf2ee2Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 464997cf2ee2Smrg 465097cf2ee2Smrgcase $host_os in 465197cf2ee2Smrgcygwin* | mingw* | pw32* | cegcc*) 465297cf2ee2Smrg # two different shell functions defined in ltmain.sh 465397cf2ee2Smrg # decide which to use based on capabilities of $DLLTOOL 465497cf2ee2Smrg case `$DLLTOOL --help 2>&1` in 465597cf2ee2Smrg *--identify-strict*) 465697cf2ee2Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 465797cf2ee2Smrg ;; 465897cf2ee2Smrg *) 465997cf2ee2Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 466097cf2ee2Smrg ;; 466197cf2ee2Smrg esac 466297cf2ee2Smrg ;; 466397cf2ee2Smrg*) 466497cf2ee2Smrg # fallback: assume linklib IS sharedlib 466597cf2ee2Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 466697cf2ee2Smrg ;; 466797cf2ee2Smrgesac 466897cf2ee2Smrg]) 466997cf2ee2Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 467097cf2ee2Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 467197cf2ee2Smrg 467297cf2ee2Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 467397cf2ee2Smrg [Command to associate shared and link libraries]) 467497cf2ee2Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 467597cf2ee2Smrg 467697cf2ee2Smrg 467797cf2ee2Smrg# _LT_PATH_MANIFEST_TOOL 467897cf2ee2Smrg# ---------------------- 467997cf2ee2Smrg# locate the manifest tool 468097cf2ee2Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 468197cf2ee2Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 468297cf2ee2Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 468397cf2ee2SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 468497cf2ee2Smrg [lt_cv_path_mainfest_tool=no 468597cf2ee2Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 468697cf2ee2Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 468797cf2ee2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 468897cf2ee2Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 468997cf2ee2Smrg lt_cv_path_mainfest_tool=yes 469097cf2ee2Smrg fi 469197cf2ee2Smrg rm -f conftest*]) 469297cf2ee2Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 469397cf2ee2Smrg MANIFEST_TOOL=: 469497cf2ee2Smrgfi 469597cf2ee2Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 469697cf2ee2Smrg])# _LT_PATH_MANIFEST_TOOL 469797cf2ee2Smrg 46986e7d3316Smrg 46996e7d3316Smrg# LT_LIB_M 47006e7d3316Smrg# -------- 4701a966c04fSmrg# check for math library 47026e7d3316SmrgAC_DEFUN([LT_LIB_M], 4703a966c04fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4704a966c04fSmrgLIBM= 4705a966c04fSmrgcase $host in 47066e7d3316Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4707a966c04fSmrg # These system don't have libm, or don't need it 4708a966c04fSmrg ;; 4709a966c04fSmrg*-ncr-sysv4.3*) 4710a966c04fSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4711a966c04fSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4712a966c04fSmrg ;; 4713a966c04fSmrg*) 4714a966c04fSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 4715a966c04fSmrg ;; 4716a966c04fSmrgesac 47176e7d3316SmrgAC_SUBST([LIBM]) 47186e7d3316Smrg])# LT_LIB_M 4719a966c04fSmrg 47206e7d3316Smrg# Old name: 47216e7d3316SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 47226e7d3316Smrgdnl aclocal-1.4 backwards compatibility: 47236e7d3316Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4724a966c04fSmrg 4725a966c04fSmrg 47266e7d3316Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 47276e7d3316Smrg# ------------------------------- 47286e7d3316Smrgm4_defun([_LT_COMPILER_NO_RTTI], 47296e7d3316Smrg[m4_require([_LT_TAG_COMPILER])dnl 4730a966c04fSmrg 47316e7d3316Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4732a966c04fSmrg 47336e7d3316Smrgif test "$GCC" = yes; then 47346e7d3316Smrg case $cc_basename in 47356e7d3316Smrg nvcc*) 47366e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 47376e7d3316Smrg *) 47386e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 47396e7d3316Smrg esac 4740a966c04fSmrg 47416e7d3316Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47426e7d3316Smrg lt_cv_prog_compiler_rtti_exceptions, 47436e7d3316Smrg [-fno-rtti -fno-exceptions], [], 47446e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4745a966c04fSmrgfi 47466e7d3316Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 47476e7d3316Smrg [Compiler flag to turn off builtin functions]) 47486e7d3316Smrg])# _LT_COMPILER_NO_RTTI 4749a966c04fSmrg 4750a966c04fSmrg 47516e7d3316Smrg# _LT_CMD_GLOBAL_SYMBOLS 47526e7d3316Smrg# ---------------------- 47536e7d3316Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 47546e7d3316Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47556e7d3316SmrgAC_REQUIRE([AC_PROG_CC])dnl 47566e7d3316SmrgAC_REQUIRE([AC_PROG_AWK])dnl 47576e7d3316SmrgAC_REQUIRE([LT_PATH_NM])dnl 47586e7d3316SmrgAC_REQUIRE([LT_PATH_LD])dnl 47596e7d3316Smrgm4_require([_LT_DECL_SED])dnl 47606e7d3316Smrgm4_require([_LT_DECL_EGREP])dnl 47616e7d3316Smrgm4_require([_LT_TAG_COMPILER])dnl 4762a966c04fSmrg 47636e7d3316Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 47646e7d3316SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 47656e7d3316SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 47666e7d3316Smrg[ 47676e7d3316Smrg# These are sane defaults that work on at least a few old systems. 47686e7d3316Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4769a966c04fSmrg 47706e7d3316Smrg# Character class describing NM global symbol codes. 47716e7d3316Smrgsymcode='[[BCDEGRST]]' 4772a966c04fSmrg 47736e7d3316Smrg# Regexp to match symbols that can be accessed directly from C. 47746e7d3316Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4775a966c04fSmrg 47766e7d3316Smrg# Define system-specific variables. 4777a966c04fSmrgcase $host_os in 47786e7d3316Smrgaix*) 47796e7d3316Smrg symcode='[[BCDT]]' 4780a966c04fSmrg ;; 47816e7d3316Smrgcygwin* | mingw* | pw32* | cegcc*) 47826e7d3316Smrg symcode='[[ABCDGISTW]]' 47836e7d3316Smrg ;; 47846e7d3316Smrghpux*) 47856e7d3316Smrg if test "$host_cpu" = ia64; then 47866e7d3316Smrg symcode='[[ABCDEGRST]]' 4787a966c04fSmrg fi 47886e7d3316Smrg ;; 47896e7d3316Smrgirix* | nonstopux*) 47906e7d3316Smrg symcode='[[BCDEGRST]]' 47916e7d3316Smrg ;; 47926e7d3316Smrgosf*) 47936e7d3316Smrg symcode='[[BCDEGQRST]]' 47946e7d3316Smrg ;; 47956e7d3316Smrgsolaris*) 47966e7d3316Smrg symcode='[[BDRT]]' 47976e7d3316Smrg ;; 47986e7d3316Smrgsco3.2v5*) 47996e7d3316Smrg symcode='[[DT]]' 48006e7d3316Smrg ;; 48016e7d3316Smrgsysv4.2uw2*) 48026e7d3316Smrg symcode='[[DT]]' 48036e7d3316Smrg ;; 48046e7d3316Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 48056e7d3316Smrg symcode='[[ABDT]]' 48066e7d3316Smrg ;; 48076e7d3316Smrgsysv4) 48086e7d3316Smrg symcode='[[DFNSTU]]' 48096e7d3316Smrg ;; 4810a966c04fSmrgesac 4811a966c04fSmrg 48126e7d3316Smrg# If we're using GNU nm, then use its standard symbol codes. 48136e7d3316Smrgcase `$NM -V 2>&1` in 48146e7d3316Smrg*GNU* | *'with BFD'*) 48156e7d3316Smrg symcode='[[ABCDGIRSTW]]' ;; 48166e7d3316Smrgesac 4817a966c04fSmrg 48186e7d3316Smrg# Transform an extracted symbol line into a proper C declaration. 48196e7d3316Smrg# Some systems (esp. on ia64) link data and code symbols differently, 48206e7d3316Smrg# so use this general approach. 48216e7d3316Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4822a966c04fSmrg 48236e7d3316Smrg# Transform an extracted symbol line into symbol name and symbol address 482497cf2ee2Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 482597cf2ee2Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 4826a966c04fSmrg 48276e7d3316Smrg# Handle CRLF in mingw tool chain 48286e7d3316Smrgopt_cr= 48296e7d3316Smrgcase $build_os in 48306e7d3316Smrgmingw*) 48316e7d3316Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48326e7d3316Smrg ;; 48336e7d3316Smrgesac 4834a966c04fSmrg 48356e7d3316Smrg# Try without a prefix underscore, then with it. 48366e7d3316Smrgfor ac_symprfx in "" "_"; do 4837a966c04fSmrg 48386e7d3316Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48396e7d3316Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4840a966c04fSmrg 48416e7d3316Smrg # Write the raw and C identifiers. 48426e7d3316Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 48436e7d3316Smrg # Fake it for dumpbin and say T for any non-static function 48446e7d3316Smrg # and D for any global variable. 48456e7d3316Smrg # Also find C++ and __fastcall symbols from MSVC++, 48466e7d3316Smrg # which start with @ or ?. 48476e7d3316Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 48486e7d3316Smrg" {last_section=section; section=\$ 3};"\ 4849ac92798bSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 48506e7d3316Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 48516e7d3316Smrg" \$ 0!~/External *\|/{next};"\ 48526e7d3316Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 48536e7d3316Smrg" {if(hide[section]) next};"\ 48546e7d3316Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 48556e7d3316Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 48566e7d3316Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 48576e7d3316Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 48586e7d3316Smrg" ' prfx=^$ac_symprfx]" 48596e7d3316Smrg else 48606e7d3316Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48616e7d3316Smrg fi 486297cf2ee2Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4863a966c04fSmrg 48646e7d3316Smrg # Check to see that the pipe works correctly. 48656e7d3316Smrg pipe_works=no 4866a966c04fSmrg 48676e7d3316Smrg rm -f conftest* 48686e7d3316Smrg cat > conftest.$ac_ext <<_LT_EOF 48696e7d3316Smrg#ifdef __cplusplus 48706e7d3316Smrgextern "C" { 48716e7d3316Smrg#endif 48726e7d3316Smrgchar nm_test_var; 48736e7d3316Smrgvoid nm_test_func(void); 48746e7d3316Smrgvoid nm_test_func(void){} 48756e7d3316Smrg#ifdef __cplusplus 48766e7d3316Smrg} 48776e7d3316Smrg#endif 48786e7d3316Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 48796e7d3316Smrg_LT_EOF 4880a966c04fSmrg 48816e7d3316Smrg if AC_TRY_EVAL(ac_compile); then 48826e7d3316Smrg # Now try to grab the symbols. 48836e7d3316Smrg nlist=conftest.nm 48846e7d3316Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 48856e7d3316Smrg # Try sorting and uniquifying the output. 48866e7d3316Smrg if sort "$nlist" | uniq > "$nlist"T; then 48876e7d3316Smrg mv -f "$nlist"T "$nlist" 48886e7d3316Smrg else 48896e7d3316Smrg rm -f "$nlist"T 48906e7d3316Smrg fi 4891a966c04fSmrg 48926e7d3316Smrg # Make sure that we snagged all the symbols we need. 48936e7d3316Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 48946e7d3316Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 48956e7d3316Smrg cat <<_LT_EOF > conftest.$ac_ext 489697cf2ee2Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 489797cf2ee2Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 489897cf2ee2Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 489997cf2ee2Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 490097cf2ee2Smrg# define LT@&t@_DLSYM_CONST 490197cf2ee2Smrg#elif defined(__osf__) 490297cf2ee2Smrg/* This system does not cope well with relocations in const data. */ 490397cf2ee2Smrg# define LT@&t@_DLSYM_CONST 490497cf2ee2Smrg#else 490597cf2ee2Smrg# define LT@&t@_DLSYM_CONST const 490697cf2ee2Smrg#endif 490797cf2ee2Smrg 49086e7d3316Smrg#ifdef __cplusplus 49096e7d3316Smrgextern "C" { 49106e7d3316Smrg#endif 4911a966c04fSmrg 49126e7d3316Smrg_LT_EOF 49136e7d3316Smrg # Now generate the symbol file. 49146e7d3316Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4915a966c04fSmrg 49166e7d3316Smrg cat <<_LT_EOF >> conftest.$ac_ext 4917a966c04fSmrg 49186e7d3316Smrg/* The mapping between symbol names and symbols. */ 491997cf2ee2SmrgLT@&t@_DLSYM_CONST struct { 49206e7d3316Smrg const char *name; 49216e7d3316Smrg void *address; 49226e7d3316Smrg} 49236e7d3316Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 49246e7d3316Smrg{ 49256e7d3316Smrg { "@PROGRAM@", (void *) 0 }, 49266e7d3316Smrg_LT_EOF 49276e7d3316Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 49286e7d3316Smrg cat <<\_LT_EOF >> conftest.$ac_ext 49296e7d3316Smrg {0, (void *) 0} 49306e7d3316Smrg}; 4931a966c04fSmrg 49326e7d3316Smrg/* This works around a problem in FreeBSD linker */ 49336e7d3316Smrg#ifdef FREEBSD_WORKAROUND 49346e7d3316Smrgstatic const void *lt_preloaded_setup() { 49356e7d3316Smrg return lt__PROGRAM__LTX_preloaded_symbols; 49366e7d3316Smrg} 49376e7d3316Smrg#endif 4938a966c04fSmrg 49396e7d3316Smrg#ifdef __cplusplus 49406e7d3316Smrg} 49416e7d3316Smrg#endif 49426e7d3316Smrg_LT_EOF 49436e7d3316Smrg # Now try linking the two files. 49446e7d3316Smrg mv conftest.$ac_objext conftstm.$ac_objext 494597cf2ee2Smrg lt_globsym_save_LIBS=$LIBS 494697cf2ee2Smrg lt_globsym_save_CFLAGS=$CFLAGS 49476e7d3316Smrg LIBS="conftstm.$ac_objext" 49486e7d3316Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49496e7d3316Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49506e7d3316Smrg pipe_works=yes 49516e7d3316Smrg fi 495297cf2ee2Smrg LIBS=$lt_globsym_save_LIBS 495397cf2ee2Smrg CFLAGS=$lt_globsym_save_CFLAGS 49546e7d3316Smrg else 49556e7d3316Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49566e7d3316Smrg fi 49576e7d3316Smrg else 49586e7d3316Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49596e7d3316Smrg fi 4960a966c04fSmrg else 49616e7d3316Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4962a966c04fSmrg fi 4963a966c04fSmrg else 49646e7d3316Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49656e7d3316Smrg cat conftest.$ac_ext >&5 4966a966c04fSmrg fi 49676e7d3316Smrg rm -rf conftest* conftst* 4968a966c04fSmrg 49696e7d3316Smrg # Do not use the global_symbol_pipe unless it works. 49706e7d3316Smrg if test "$pipe_works" = yes; then 49716e7d3316Smrg break 49726e7d3316Smrg else 49736e7d3316Smrg lt_cv_sys_global_symbol_pipe= 49746e7d3316Smrg fi 49756e7d3316Smrgdone 49766e7d3316Smrg]) 49776e7d3316Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49786e7d3316Smrg lt_cv_sys_global_symbol_to_cdecl= 49796e7d3316Smrgfi 49806e7d3316Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49816e7d3316Smrg AC_MSG_RESULT(failed) 4982a966c04fSmrgelse 49836e7d3316Smrg AC_MSG_RESULT(ok) 4984a966c04fSmrgfi 4985a966c04fSmrg 498697cf2ee2Smrg# Response file support. 498797cf2ee2Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 498897cf2ee2Smrg nm_file_list_spec='@' 498997cf2ee2Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 499097cf2ee2Smrg nm_file_list_spec='@' 499197cf2ee2Smrgfi 499297cf2ee2Smrg 49936e7d3316Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 49946e7d3316Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 49956e7d3316Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 49966e7d3316Smrg [Transform the output of nm in a proper C declaration]) 49976e7d3316Smrg_LT_DECL([global_symbol_to_c_name_address], 49986e7d3316Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 49996e7d3316Smrg [Transform the output of nm in a C name address pair]) 50006e7d3316Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 50016e7d3316Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 50026e7d3316Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 500397cf2ee2Smrg_LT_DECL([], [nm_file_list_spec], [1], 500497cf2ee2Smrg [Specify filename containing input files for $NM]) 50056e7d3316Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 5006a966c04fSmrg 5007a966c04fSmrg 50086e7d3316Smrg# _LT_COMPILER_PIC([TAGNAME]) 50096e7d3316Smrg# --------------------------- 50106e7d3316Smrgm4_defun([_LT_COMPILER_PIC], 50116e7d3316Smrg[m4_require([_LT_TAG_COMPILER])dnl 50126e7d3316Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 50136e7d3316Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 50146e7d3316Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 5015a966c04fSmrg 50166e7d3316Smrgm4_if([$1], [CXX], [ 50176e7d3316Smrg # C++ specific cases for pic, static, wl, etc. 50186e7d3316Smrg if test "$GXX" = yes; then 50196e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50206e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5021a966c04fSmrg 50226e7d3316Smrg case $host_os in 50236e7d3316Smrg aix*) 50246e7d3316Smrg # All AIX code is PIC. 5025a966c04fSmrg if test "$host_cpu" = ia64; then 50266e7d3316Smrg # AIX 5 now supports IA64 processor 50276e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5028a966c04fSmrg fi 50296e7d3316Smrg ;; 5030a966c04fSmrg 50316e7d3316Smrg amigaos*) 50326e7d3316Smrg case $host_cpu in 50336e7d3316Smrg powerpc) 50346e7d3316Smrg # see comment about AmigaOS4 .so support 50356e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50366e7d3316Smrg ;; 50376e7d3316Smrg m68k) 50386e7d3316Smrg # FIXME: we need at least 68020 code to build shared libraries, but 50396e7d3316Smrg # adding the `-m68020' flag to GCC prevents building anything better, 50406e7d3316Smrg # like `-m68040'. 50416e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50426e7d3316Smrg ;; 50436e7d3316Smrg esac 50446e7d3316Smrg ;; 5045a966c04fSmrg 50466e7d3316Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50476e7d3316Smrg # PIC is the default for these OSes. 50486e7d3316Smrg ;; 50496e7d3316Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50506e7d3316Smrg # This hack is so that the source file can tell whether it is being 50516e7d3316Smrg # built for inclusion in a dll (and should export symbols for example). 50526e7d3316Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50536e7d3316Smrg # (--disable-auto-import) libraries 50546e7d3316Smrg m4_if([$1], [GCJ], [], 50556e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50566e7d3316Smrg ;; 50576e7d3316Smrg darwin* | rhapsody*) 50586e7d3316Smrg # PIC is the default on this platform 50596e7d3316Smrg # Common symbols not allowed in MH_DYLIB files 50606e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50616e7d3316Smrg ;; 50626e7d3316Smrg *djgpp*) 50636e7d3316Smrg # DJGPP does not support shared libraries at all 50646e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 50656e7d3316Smrg ;; 50666e7d3316Smrg haiku*) 50676e7d3316Smrg # PIC is the default for Haiku. 50686e7d3316Smrg # The "-static" flag exists, but is broken. 50696e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 50706e7d3316Smrg ;; 50716e7d3316Smrg interix[[3-9]]*) 50726e7d3316Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50736e7d3316Smrg # Instead, we relocate shared libraries at runtime. 50746e7d3316Smrg ;; 50756e7d3316Smrg sysv4*MP*) 50766e7d3316Smrg if test -d /usr/nec; then 50776e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50786e7d3316Smrg fi 50796e7d3316Smrg ;; 50806e7d3316Smrg hpux*) 50816e7d3316Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 50826e7d3316Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 50836e7d3316Smrg # sets the default TLS model and affects inlining. 50846e7d3316Smrg case $host_cpu in 50856e7d3316Smrg hppa*64*) 50866e7d3316Smrg ;; 5087a966c04fSmrg *) 50886e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5089a966c04fSmrg ;; 50906e7d3316Smrg esac 50916e7d3316Smrg ;; 50926e7d3316Smrg *qnx* | *nto*) 50936e7d3316Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 50946e7d3316Smrg # it will coredump. 50956e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 50966e7d3316Smrg ;; 50976e7d3316Smrg *) 50986e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50996e7d3316Smrg ;; 5100a966c04fSmrg esac 51016e7d3316Smrg else 51026e7d3316Smrg case $host_os in 51036e7d3316Smrg aix[[4-9]]*) 51046e7d3316Smrg # All AIX code is PIC. 51056e7d3316Smrg if test "$host_cpu" = ia64; then 51066e7d3316Smrg # AIX 5 now supports IA64 processor 51076e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51086e7d3316Smrg else 51096e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 51106e7d3316Smrg fi 5111a966c04fSmrg ;; 51126e7d3316Smrg chorus*) 51136e7d3316Smrg case $cc_basename in 51146e7d3316Smrg cxch68*) 51156e7d3316Smrg # Green Hills C++ Compiler 51166e7d3316Smrg # _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" 5117a966c04fSmrg ;; 5118a966c04fSmrg esac 5119a966c04fSmrg ;; 512097cf2ee2Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 512197cf2ee2Smrg # This hack is so that the source file can tell whether it is being 512297cf2ee2Smrg # built for inclusion in a dll (and should export symbols for example). 512397cf2ee2Smrg m4_if([$1], [GCJ], [], 512497cf2ee2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 512597cf2ee2Smrg ;; 51266e7d3316Smrg dgux*) 51276e7d3316Smrg case $cc_basename in 51286e7d3316Smrg ec++*) 51296e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51306e7d3316Smrg ;; 51316e7d3316Smrg ghcx*) 51326e7d3316Smrg # Green Hills C++ Compiler 51336e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51346e7d3316Smrg ;; 51356e7d3316Smrg *) 51366e7d3316Smrg ;; 51376e7d3316Smrg esac 51386e7d3316Smrg ;; 51396e7d3316Smrg freebsd* | dragonfly*) 51406e7d3316Smrg # FreeBSD uses GNU C++ 51416e7d3316Smrg ;; 51426e7d3316Smrg hpux9* | hpux10* | hpux11*) 51436e7d3316Smrg case $cc_basename in 51446e7d3316Smrg CC*) 51456e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51466e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51476e7d3316Smrg if test "$host_cpu" != ia64; then 51486e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51496e7d3316Smrg fi 51506e7d3316Smrg ;; 51516e7d3316Smrg aCC*) 51526e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51536e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5154a966c04fSmrg case $host_cpu in 51556e7d3316Smrg hppa*64*|ia64*) 51566e7d3316Smrg # +Z the default 5157a966c04fSmrg ;; 5158a966c04fSmrg *) 51596e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5160a966c04fSmrg ;; 5161a966c04fSmrg esac 51626e7d3316Smrg ;; 51636e7d3316Smrg *) 51646e7d3316Smrg ;; 51656e7d3316Smrg esac 5166a966c04fSmrg ;; 51676e7d3316Smrg interix*) 51686e7d3316Smrg # This is c89, which is MS Visual C++ (no shared libs) 51696e7d3316Smrg # Anyone wants to do a port? 5170a966c04fSmrg ;; 51716e7d3316Smrg irix5* | irix6* | nonstopux*) 51726e7d3316Smrg case $cc_basename in 51736e7d3316Smrg CC*) 51746e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51756e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51766e7d3316Smrg # CC pic flag -KPIC is the default. 51776e7d3316Smrg ;; 51786e7d3316Smrg *) 51796e7d3316Smrg ;; 51806e7d3316Smrg esac 5181a966c04fSmrg ;; 51826e7d3316Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 51836e7d3316Smrg case $cc_basename in 51846e7d3316Smrg KCC*) 51856e7d3316Smrg # KAI C++ Compiler 51866e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51876e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51886e7d3316Smrg ;; 51896e7d3316Smrg ecpc* ) 51906e7d3316Smrg # old Intel C++ for x86_64 which still supported -KPIC. 51916e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51926e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51936e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 51946e7d3316Smrg ;; 51956e7d3316Smrg icpc* ) 51966e7d3316Smrg # Intel C++, used to be incompatible with GCC. 51976e7d3316Smrg # ICC 10 doesn't accept -KPIC any more. 51986e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51996e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 52006e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 52016e7d3316Smrg ;; 52026e7d3316Smrg pgCC* | pgcpp*) 52036e7d3316Smrg # Portland Group C++ compiler 52046e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52056e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 52066e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52076e7d3316Smrg ;; 52086e7d3316Smrg cxx*) 52096e7d3316Smrg # Compaq C++ 52106e7d3316Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52116e7d3316Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52126e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52136e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52146e7d3316Smrg ;; 52156e7d3316Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 52166e7d3316Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 52176e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52186e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 52196e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 52206e7d3316Smrg ;; 52216e7d3316Smrg *) 52226e7d3316Smrg case `$CC -V 2>&1 | sed 5q` in 52236e7d3316Smrg *Sun\ C*) 52246e7d3316Smrg # Sun C++ 5.9 52256e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52266e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52276e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52286e7d3316Smrg ;; 52296e7d3316Smrg esac 52306e7d3316Smrg ;; 52316e7d3316Smrg esac 5232a966c04fSmrg ;; 52336e7d3316Smrg lynxos*) 52346e7d3316Smrg ;; 52356e7d3316Smrg m88k*) 52366e7d3316Smrg ;; 52376e7d3316Smrg mvs*) 52386e7d3316Smrg case $cc_basename in 52396e7d3316Smrg cxx*) 52406e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52416e7d3316Smrg ;; 52426e7d3316Smrg *) 52436e7d3316Smrg ;; 5244a966c04fSmrg esac 5245a966c04fSmrg ;; 52466e7d3316Smrg netbsd*) 5247a966c04fSmrg ;; 52486e7d3316Smrg *qnx* | *nto*) 52496e7d3316Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 52506e7d3316Smrg # it will coredump. 52516e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 52526e7d3316Smrg ;; 52536e7d3316Smrg osf3* | osf4* | osf5*) 52546e7d3316Smrg case $cc_basename in 52556e7d3316Smrg KCC*) 52566e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52576e7d3316Smrg ;; 52586e7d3316Smrg RCC*) 52596e7d3316Smrg # Rational C++ 2.4.1 52606e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52616e7d3316Smrg ;; 52626e7d3316Smrg cxx*) 52636e7d3316Smrg # Digital/Compaq C++ 52646e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52656e7d3316Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52666e7d3316Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52676e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52686e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52696e7d3316Smrg ;; 52706e7d3316Smrg *) 52716e7d3316Smrg ;; 52722e2dd055Smrg esac 52732e2dd055Smrg ;; 52746e7d3316Smrg psos*) 5275a966c04fSmrg ;; 52766e7d3316Smrg solaris*) 52776e7d3316Smrg case $cc_basename in 52786e7d3316Smrg CC* | sunCC*) 52796e7d3316Smrg # Sun C++ 4.2, 5.x and Centerline C++ 52806e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52816e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52826e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52836e7d3316Smrg ;; 52846e7d3316Smrg gcx*) 52856e7d3316Smrg # Green Hills C++ Compiler 52866e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52876e7d3316Smrg ;; 52886e7d3316Smrg *) 52896e7d3316Smrg ;; 52906e7d3316Smrg esac 5291a966c04fSmrg ;; 52926e7d3316Smrg sunos4*) 52936e7d3316Smrg case $cc_basename in 52946e7d3316Smrg CC*) 52956e7d3316Smrg # Sun C++ 4.x 52966e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52976e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52986e7d3316Smrg ;; 52996e7d3316Smrg lcc*) 53006e7d3316Smrg # Lucid 53016e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 53026e7d3316Smrg ;; 53036e7d3316Smrg *) 53046e7d3316Smrg ;; 53056e7d3316Smrg esac 53066e7d3316Smrg ;; 53076e7d3316Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 53086e7d3316Smrg case $cc_basename in 53096e7d3316Smrg CC*) 53106e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53116e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53126e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53136e7d3316Smrg ;; 53146e7d3316Smrg esac 5315a966c04fSmrg ;; 53166e7d3316Smrg tandem*) 53176e7d3316Smrg case $cc_basename in 53186e7d3316Smrg NCC*) 53196e7d3316Smrg # NonStop-UX NCC 3.20 53206e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53216e7d3316Smrg ;; 53226e7d3316Smrg *) 53236e7d3316Smrg ;; 53246e7d3316Smrg esac 5325a966c04fSmrg ;; 53266e7d3316Smrg vxworks*) 5327a966c04fSmrg ;; 5328a966c04fSmrg *) 53296e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5330a966c04fSmrg ;; 5331a966c04fSmrg esac 53326e7d3316Smrg fi 53336e7d3316Smrg], 53346e7d3316Smrg[ 53356e7d3316Smrg if test "$GCC" = yes; then 53366e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53376e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5338a966c04fSmrg 53396e7d3316Smrg case $host_os in 53406e7d3316Smrg aix*) 53416e7d3316Smrg # All AIX code is PIC. 53426e7d3316Smrg if test "$host_cpu" = ia64; then 53436e7d3316Smrg # AIX 5 now supports IA64 processor 53446e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53456e7d3316Smrg fi 53466e7d3316Smrg ;; 5347a966c04fSmrg 53486e7d3316Smrg amigaos*) 53496e7d3316Smrg case $host_cpu in 53506e7d3316Smrg powerpc) 53516e7d3316Smrg # see comment about AmigaOS4 .so support 53526e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53536e7d3316Smrg ;; 53546e7d3316Smrg m68k) 53556e7d3316Smrg # FIXME: we need at least 68020 code to build shared libraries, but 53566e7d3316Smrg # adding the `-m68020' flag to GCC prevents building anything better, 53576e7d3316Smrg # like `-m68040'. 53586e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53596e7d3316Smrg ;; 53606e7d3316Smrg esac 53616e7d3316Smrg ;; 5362a966c04fSmrg 53636e7d3316Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53646e7d3316Smrg # PIC is the default for these OSes. 53656e7d3316Smrg ;; 5366a966c04fSmrg 53676e7d3316Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 53686e7d3316Smrg # This hack is so that the source file can tell whether it is being 53696e7d3316Smrg # built for inclusion in a dll (and should export symbols for example). 53706e7d3316Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53716e7d3316Smrg # (--disable-auto-import) libraries 53726e7d3316Smrg m4_if([$1], [GCJ], [], 53736e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53746e7d3316Smrg ;; 5375a966c04fSmrg 53766e7d3316Smrg darwin* | rhapsody*) 53776e7d3316Smrg # PIC is the default on this platform 53786e7d3316Smrg # Common symbols not allowed in MH_DYLIB files 53796e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53806e7d3316Smrg ;; 53816e7d3316Smrg 53826e7d3316Smrg haiku*) 53836e7d3316Smrg # PIC is the default for Haiku. 53846e7d3316Smrg # The "-static" flag exists, but is broken. 53856e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 53866e7d3316Smrg ;; 53876e7d3316Smrg 53886e7d3316Smrg hpux*) 53896e7d3316Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 53906e7d3316Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 53916e7d3316Smrg # sets the default TLS model and affects inlining. 53926e7d3316Smrg case $host_cpu in 53936e7d3316Smrg hppa*64*) 53946e7d3316Smrg # +Z the default 5395a966c04fSmrg ;; 5396a966c04fSmrg *) 53976e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5398a966c04fSmrg ;; 53996e7d3316Smrg esac 54006e7d3316Smrg ;; 5401a966c04fSmrg 54026e7d3316Smrg interix[[3-9]]*) 54036e7d3316Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 54046e7d3316Smrg # Instead, we relocate shared libraries at runtime. 54056e7d3316Smrg ;; 5406a966c04fSmrg 54076e7d3316Smrg msdosdjgpp*) 54086e7d3316Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 54096e7d3316Smrg # on systems that don't support them. 54106e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 54116e7d3316Smrg enable_shared=no 54126e7d3316Smrg ;; 5413a966c04fSmrg 54146e7d3316Smrg *nto* | *qnx*) 54156e7d3316Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 54166e7d3316Smrg # it will coredump. 54176e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 54186e7d3316Smrg ;; 5419a966c04fSmrg 54206e7d3316Smrg sysv4*MP*) 54216e7d3316Smrg if test -d /usr/nec; then 54226e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 54236e7d3316Smrg fi 54246e7d3316Smrg ;; 5425a966c04fSmrg 54266e7d3316Smrg *) 54276e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54286e7d3316Smrg ;; 5429a966c04fSmrg esac 5430a966c04fSmrg 5431a966c04fSmrg case $cc_basename in 54326e7d3316Smrg nvcc*) # Cuda Compiler Driver 2.2 54336e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5434ac92798bSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5435ac92798bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5436ac92798bSmrg fi 54376e7d3316Smrg ;; 5438a966c04fSmrg esac 54396e7d3316Smrg else 54406e7d3316Smrg # PORTME Check for flag to pass linker flags through the system compiler. 54416e7d3316Smrg case $host_os in 54426e7d3316Smrg aix*) 54436e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54446e7d3316Smrg if test "$host_cpu" = ia64; then 54456e7d3316Smrg # AIX 5 now supports IA64 processor 54466e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54476e7d3316Smrg else 54486e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 54496e7d3316Smrg fi 54506e7d3316Smrg ;; 5451a966c04fSmrg 54526e7d3316Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 54536e7d3316Smrg # This hack is so that the source file can tell whether it is being 54546e7d3316Smrg # built for inclusion in a dll (and should export symbols for example). 54556e7d3316Smrg m4_if([$1], [GCJ], [], 54566e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 54576e7d3316Smrg ;; 54586e7d3316Smrg 54596e7d3316Smrg hpux9* | hpux10* | hpux11*) 54606e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54616e7d3316Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54626e7d3316Smrg # not for PA HP-UX. 54636e7d3316Smrg case $host_cpu in 54646e7d3316Smrg hppa*64*|ia64*) 54656e7d3316Smrg # +Z the default 5466a966c04fSmrg ;; 5467a966c04fSmrg *) 54686e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5469a966c04fSmrg ;; 54706e7d3316Smrg esac 54716e7d3316Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54726e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54736e7d3316Smrg ;; 54746e7d3316Smrg 54756e7d3316Smrg irix5* | irix6* | nonstopux*) 54766e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54776e7d3316Smrg # PIC (with -KPIC) is the default. 54786e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54796e7d3316Smrg ;; 54806e7d3316Smrg 54816e7d3316Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 54826e7d3316Smrg case $cc_basename in 54836e7d3316Smrg # old Intel for x86_64 which still supported -KPIC. 54846e7d3316Smrg ecc*) 54856e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54866e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54876e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54886e7d3316Smrg ;; 54896e7d3316Smrg # icc used to be incompatible with GCC. 54906e7d3316Smrg # ICC 10 doesn't accept -KPIC any more. 54916e7d3316Smrg icc* | ifort*) 54926e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54936e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54946e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54956e7d3316Smrg ;; 54966e7d3316Smrg # Lahey Fortran 8.1. 54976e7d3316Smrg lf95*) 54986e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54996e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 55006e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 55016e7d3316Smrg ;; 550297cf2ee2Smrg nagfor*) 550397cf2ee2Smrg # NAG Fortran compiler 550497cf2ee2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 550597cf2ee2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 550697cf2ee2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 550797cf2ee2Smrg ;; 55086e7d3316Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 55096e7d3316Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 55106e7d3316Smrg # which looks to be a dead project) 55116e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55126e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 55136e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55146e7d3316Smrg ;; 55156e7d3316Smrg ccc*) 55166e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55176e7d3316Smrg # All Alpha code is PIC. 55186e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55196e7d3316Smrg ;; 55206e7d3316Smrg xl* | bgxl* | bgf* | mpixl*) 55216e7d3316Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 55226e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55236e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 55246e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5525a966c04fSmrg ;; 5526a966c04fSmrg *) 55276e7d3316Smrg case `$CC -V 2>&1 | sed 5q` in 5528ac92798bSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 55296e7d3316Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 55306e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55316e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55326e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 55336e7d3316Smrg ;; 5534ac92798bSmrg *Sun\ F* | *Sun*Fortran*) 5535ac92798bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5536ac92798bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5537ac92798bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5538ac92798bSmrg ;; 55396e7d3316Smrg *Sun\ C*) 55406e7d3316Smrg # Sun C 5.9 55416e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55426e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55436e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55446e7d3316Smrg ;; 5545ac92798bSmrg *Intel*\ [[CF]]*Compiler*) 5546ac92798bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5547ac92798bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5548ac92798bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5549ac92798bSmrg ;; 5550ac92798bSmrg *Portland\ Group*) 5551ac92798bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5552ac92798bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5553ac92798bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5554ac92798bSmrg ;; 55556e7d3316Smrg esac 5556a966c04fSmrg ;; 55576e7d3316Smrg esac 55586e7d3316Smrg ;; 5559a966c04fSmrg 55606e7d3316Smrg newsos6) 55616e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55626e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55636e7d3316Smrg ;; 5564a966c04fSmrg 55656e7d3316Smrg *nto* | *qnx*) 55666e7d3316Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 55676e7d3316Smrg # it will coredump. 55686e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 55696e7d3316Smrg ;; 5570a966c04fSmrg 55716e7d3316Smrg osf3* | osf4* | osf5*) 55726e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55736e7d3316Smrg # All OSF/1 code is PIC. 55746e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55756e7d3316Smrg ;; 5576a966c04fSmrg 55776e7d3316Smrg rdos*) 55786e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55796e7d3316Smrg ;; 5580a966c04fSmrg 55816e7d3316Smrg solaris*) 55826e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55836e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55846e7d3316Smrg case $cc_basename in 55856e7d3316Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 55866e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 55876e7d3316Smrg *) 55886e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 55896e7d3316Smrg esac 55906e7d3316Smrg ;; 5591a966c04fSmrg 55926e7d3316Smrg sunos4*) 55936e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 55946e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55956e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55966e7d3316Smrg ;; 5597a966c04fSmrg 55986e7d3316Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 55996e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56006e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 56016e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56026e7d3316Smrg ;; 5603a966c04fSmrg 56046e7d3316Smrg sysv4*MP*) 56056e7d3316Smrg if test -d /usr/nec ;then 56066e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 56076e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56086e7d3316Smrg fi 56096e7d3316Smrg ;; 5610a966c04fSmrg 56116e7d3316Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 56126e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56136e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 56146e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56156e7d3316Smrg ;; 5616a966c04fSmrg 56176e7d3316Smrg unicos*) 56186e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56196e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 56206e7d3316Smrg ;; 5621a966c04fSmrg 56226e7d3316Smrg uts4*) 56236e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 56246e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56256e7d3316Smrg ;; 5626a966c04fSmrg 56276e7d3316Smrg *) 56286e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 56296e7d3316Smrg ;; 5630a966c04fSmrg esac 56316e7d3316Smrg fi 56326e7d3316Smrg]) 56336e7d3316Smrgcase $host_os in 56346e7d3316Smrg # For platforms which do not support PIC, -DPIC is meaningless: 56356e7d3316Smrg *djgpp*) 56366e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 56376e7d3316Smrg ;; 56386e7d3316Smrg *) 56396e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 56406e7d3316Smrg ;; 56416e7d3316Smrgesac 564297cf2ee2Smrg 564397cf2ee2SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 564497cf2ee2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 564597cf2ee2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 564697cf2ee2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5647a966c04fSmrg 56486e7d3316Smrg# 56496e7d3316Smrg# Check to make sure the PIC flag actually works. 56506e7d3316Smrg# 56516e7d3316Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 56526e7d3316Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 56536e7d3316Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 56546e7d3316Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 56556e7d3316Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 56566e7d3316Smrg "" | " "*) ;; 56576e7d3316Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 56586e7d3316Smrg esac], 56596e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 56606e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5661a966c04fSmrgfi 56626e7d3316Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 56636e7d3316Smrg [Additional compiler flags for building library objects]) 5664a966c04fSmrg 566597cf2ee2Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 566697cf2ee2Smrg [How to pass a linker flag through the compiler]) 56676e7d3316Smrg# 56686e7d3316Smrg# Check to make sure the static flag actually works. 56696e7d3316Smrg# 56706e7d3316Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 56716e7d3316Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 56726e7d3316Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 56736e7d3316Smrg $lt_tmp_static_flag, 56746e7d3316Smrg [], 56756e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 56766e7d3316Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 56776e7d3316Smrg [Compiler flag to prevent dynamic linking]) 56786e7d3316Smrg])# _LT_COMPILER_PIC 56792e2dd055Smrg 5680a966c04fSmrg 56816e7d3316Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 56826e7d3316Smrg# ---------------------------- 56836e7d3316Smrg# See if the linker supports building shared libraries. 56846e7d3316Smrgm4_defun([_LT_LINKER_SHLIBS], 56856e7d3316Smrg[AC_REQUIRE([LT_PATH_LD])dnl 56866e7d3316SmrgAC_REQUIRE([LT_PATH_NM])dnl 568797cf2ee2Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 56886e7d3316Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 56896e7d3316Smrgm4_require([_LT_DECL_EGREP])dnl 56906e7d3316Smrgm4_require([_LT_DECL_SED])dnl 56916e7d3316Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 56926e7d3316Smrgm4_require([_LT_TAG_COMPILER])dnl 56936e7d3316SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 56946e7d3316Smrgm4_if([$1], [CXX], [ 56956e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 569697cf2ee2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56976e7d3316Smrg case $host_os in 56986e7d3316Smrg aix[[4-9]]*) 56996e7d3316Smrg # If we're using GNU nm, then we don't want the "-C" option. 57006e7d3316Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 57016e7d3316Smrg # Also, AIX nm treats weak defined symbols like other global defined 57026e7d3316Smrg # symbols, whereas GNU nm marks them as "W". 57036e7d3316Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 57046e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 57056e7d3316Smrg else 57066e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 57072e2dd055Smrg fi 57082e2dd055Smrg ;; 57096e7d3316Smrg pw32*) 57106e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 571197cf2ee2Smrg ;; 57126e7d3316Smrg cygwin* | mingw* | cegcc*) 571397cf2ee2Smrg case $cc_basename in 5714ac92798bSmrg cl*) 5715ac92798bSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5716ac92798bSmrg ;; 571797cf2ee2Smrg *) 571897cf2ee2Smrg _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' 571997cf2ee2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 572097cf2ee2Smrg ;; 572197cf2ee2Smrg esac 572297cf2ee2Smrg ;; 57236e7d3316Smrg *) 57246e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 572597cf2ee2Smrg ;; 57266e7d3316Smrg esac 57276e7d3316Smrg], [ 57286e7d3316Smrg runpath_var= 57296e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 57306e7d3316Smrg _LT_TAGVAR(always_export_symbols, $1)=no 57316e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)= 57326e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 57336e7d3316Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 57346e7d3316Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 57356e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 57366e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 57376e7d3316Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 57386e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57396e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 57406e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 57416e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 57426e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 57436e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 57446e7d3316Smrg _LT_TAGVAR(inherit_rpath, $1)=no 57456e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 57466e7d3316Smrg _LT_TAGVAR(module_cmds, $1)= 57476e7d3316Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 57486e7d3316Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 57496e7d3316Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 57506e7d3316Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 57516e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57526e7d3316Smrg # include_expsyms should be a list of space-separated symbols to be *always* 57536e7d3316Smrg # included in the symbol list 57546e7d3316Smrg _LT_TAGVAR(include_expsyms, $1)= 57556e7d3316Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 57566e7d3316Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 57576e7d3316Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 57586e7d3316Smrg # as well as any symbol that contains `d'. 57596e7d3316Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 57606e7d3316Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 57616e7d3316Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 57626e7d3316Smrg # the symbol is explicitly referenced. Since portable code cannot 57636e7d3316Smrg # rely on this symbol name, it's probably fine to never include it in 57646e7d3316Smrg # preloaded symbol tables. 57656e7d3316Smrg # Exclude shared library initialization/finalization symbols. 57666e7d3316Smrgdnl Note also adjust exclude_expsyms for C++ above. 57676e7d3316Smrg extract_expsyms_cmds= 57682e2dd055Smrg 57696e7d3316Smrg case $host_os in 57706e7d3316Smrg cygwin* | mingw* | pw32* | cegcc*) 57716e7d3316Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 57726e7d3316Smrg # When not using gcc, we currently assume that we are using 57736e7d3316Smrg # Microsoft Visual C++. 57746e7d3316Smrg if test "$GCC" != yes; then 57756e7d3316Smrg with_gnu_ld=no 57762e2dd055Smrg fi 5777a966c04fSmrg ;; 57786e7d3316Smrg interix*) 57796e7d3316Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 57806e7d3316Smrg with_gnu_ld=yes 57816e7d3316Smrg ;; 57826e7d3316Smrg openbsd*) 57836e7d3316Smrg with_gnu_ld=no 57846e7d3316Smrg ;; 5785a966c04fSmrg esac 5786a966c04fSmrg 57876e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5788a966c04fSmrg 57896e7d3316Smrg # On some targets, GNU ld is compatible enough with the native linker 57906e7d3316Smrg # that we're better off using the native interface for both. 57916e7d3316Smrg lt_use_gnu_ld_interface=no 57926e7d3316Smrg if test "$with_gnu_ld" = yes; then 57936e7d3316Smrg case $host_os in 57946e7d3316Smrg aix*) 57956e7d3316Smrg # The AIX port of GNU ld has always aspired to compatibility 57966e7d3316Smrg # with the native linker. However, as the warning in the GNU ld 57976e7d3316Smrg # block says, versions before 2.19.5* couldn't really create working 57986e7d3316Smrg # shared libraries, regardless of the interface used. 57996e7d3316Smrg case `$LD -v 2>&1` in 58006e7d3316Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 58016e7d3316Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 58026e7d3316Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 58036e7d3316Smrg *) 58046e7d3316Smrg lt_use_gnu_ld_interface=yes 58056e7d3316Smrg ;; 58066e7d3316Smrg esac 58076e7d3316Smrg ;; 58086e7d3316Smrg *) 58096e7d3316Smrg lt_use_gnu_ld_interface=yes 58106e7d3316Smrg ;; 58116e7d3316Smrg esac 58126e7d3316Smrg fi 5813a966c04fSmrg 58146e7d3316Smrg if test "$lt_use_gnu_ld_interface" = yes; then 58156e7d3316Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 58166e7d3316Smrg wlarc='${wl}' 5817a966c04fSmrg 58186e7d3316Smrg # Set some defaults for GNU ld with shared library support. These 58196e7d3316Smrg # are reset later if shared libraries are not supported. Putting them 58206e7d3316Smrg # here allows them to be overridden if necessary. 58216e7d3316Smrg runpath_var=LD_RUN_PATH 58226e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58236e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 58246e7d3316Smrg # ancient GNU ld didn't support --whole-archive et. al. 58256e7d3316Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 58266e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 58276e7d3316Smrg else 58286e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 58296e7d3316Smrg fi 58306e7d3316Smrg supports_anon_versioning=no 58316e7d3316Smrg case `$LD -v 2>&1` in 58326e7d3316Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 58336e7d3316Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 58346e7d3316Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 58356e7d3316Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 58366e7d3316Smrg *\ 2.11.*) ;; # other 2.11 versions 58376e7d3316Smrg *) supports_anon_versioning=yes ;; 58386e7d3316Smrg esac 5839a966c04fSmrg 58406e7d3316Smrg # See if GNU ld supports shared libraries. 58416e7d3316Smrg case $host_os in 58426e7d3316Smrg aix[[3-9]]*) 58436e7d3316Smrg # On AIX/PPC, the GNU linker is very broken 58446e7d3316Smrg if test "$host_cpu" != ia64; then 58456e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58466e7d3316Smrg cat <<_LT_EOF 1>&2 5847a966c04fSmrg 58486e7d3316Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 58496e7d3316Smrg*** to be unable to reliably create shared libraries on AIX. 58506e7d3316Smrg*** Therefore, libtool is disabling shared libraries support. If you 58516e7d3316Smrg*** really care for shared libraries, you may want to install binutils 58526e7d3316Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 58536e7d3316Smrg*** You will then need to restart the configuration process. 5854a966c04fSmrg 58556e7d3316Smrg_LT_EOF 58566e7d3316Smrg fi 58576e7d3316Smrg ;; 5858a966c04fSmrg 58596e7d3316Smrg amigaos*) 58606e7d3316Smrg case $host_cpu in 58616e7d3316Smrg powerpc) 58626e7d3316Smrg # see comment about AmigaOS4 .so support 58636e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58646e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 58656e7d3316Smrg ;; 58666e7d3316Smrg m68k) 58676e7d3316Smrg _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)' 58686e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58696e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58706e7d3316Smrg ;; 58716e7d3316Smrg esac 58726e7d3316Smrg ;; 5873a966c04fSmrg 58746e7d3316Smrg beos*) 58756e7d3316Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 58766e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58776e7d3316Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 58786e7d3316Smrg # support --undefined. This deserves some investigation. FIXME 58796e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58806e7d3316Smrg else 58816e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58826e7d3316Smrg fi 58836e7d3316Smrg ;; 5884a966c04fSmrg 58856e7d3316Smrg cygwin* | mingw* | pw32* | cegcc*) 58866e7d3316Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 58876e7d3316Smrg # as there is no search path for DLLs. 58886e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58896e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 58906e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58916e7d3316Smrg _LT_TAGVAR(always_export_symbols, $1)=no 58926e7d3316Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 589397cf2ee2Smrg _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' 589497cf2ee2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 58956e7d3316Smrg 58966e7d3316Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 58976e7d3316Smrg _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' 58986e7d3316Smrg # If the export-symbols file already is a .def file (1st line 58996e7d3316Smrg # is EXPORTS), use it as is; otherwise, prepend... 59006e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 59016e7d3316Smrg cp $export_symbols $output_objdir/$soname.def; 59026e7d3316Smrg else 59036e7d3316Smrg echo EXPORTS > $output_objdir/$soname.def; 59046e7d3316Smrg cat $export_symbols >> $output_objdir/$soname.def; 59056e7d3316Smrg fi~ 59066e7d3316Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 59076e7d3316Smrg else 59086e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59096e7d3316Smrg fi 59106e7d3316Smrg ;; 5911a966c04fSmrg 59126e7d3316Smrg haiku*) 59136e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59146e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59156e7d3316Smrg ;; 5916a966c04fSmrg 59176e7d3316Smrg interix[[3-9]]*) 59186e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 59196e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59206e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 59216e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 59226e7d3316Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 59236e7d3316Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 59246e7d3316Smrg # default) and relocated if they conflict, which is a slow very memory 59256e7d3316Smrg # consuming and fragmenting process. To avoid this, we pick a random, 59266e7d3316Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 59276e7d3316Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 59286e7d3316Smrg _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' 59296e7d3316Smrg _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' 59306e7d3316Smrg ;; 5931a966c04fSmrg 59326e7d3316Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 59336e7d3316Smrg tmp_diet=no 59346e7d3316Smrg if test "$host_os" = linux-dietlibc; then 59356e7d3316Smrg case $cc_basename in 59366e7d3316Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 59376e7d3316Smrg esac 59386e7d3316Smrg fi 59396e7d3316Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 59406e7d3316Smrg && test "$tmp_diet" = no 59416e7d3316Smrg then 594297cf2ee2Smrg tmp_addflag=' $pic_flag' 59436e7d3316Smrg tmp_sharedflag='-shared' 59446e7d3316Smrg case $cc_basename,$host_cpu in 59456e7d3316Smrg pgcc*) # Portland Group C compiler 59466e7d3316Smrg _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' 59476e7d3316Smrg tmp_addflag=' $pic_flag' 59486e7d3316Smrg ;; 59496e7d3316Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 59506e7d3316Smrg # Portland Group f77 and f90 compilers 59516e7d3316Smrg _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' 59526e7d3316Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 59536e7d3316Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 59546e7d3316Smrg tmp_addflag=' -i_dynamic' ;; 59556e7d3316Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 59566e7d3316Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 59576e7d3316Smrg ifc* | ifort*) # Intel Fortran compiler 59586e7d3316Smrg tmp_addflag=' -nofor_main' ;; 59596e7d3316Smrg lf95*) # Lahey Fortran 8.1 59606e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59616e7d3316Smrg tmp_sharedflag='--shared' ;; 59626e7d3316Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 59636e7d3316Smrg tmp_sharedflag='-qmkshrobj' 59646e7d3316Smrg tmp_addflag= ;; 59656e7d3316Smrg nvcc*) # Cuda Compiler Driver 2.2 59666e7d3316Smrg _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' 59676e7d3316Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59686e7d3316Smrg ;; 59696e7d3316Smrg esac 59706e7d3316Smrg case `$CC -V 2>&1 | sed 5q` in 59716e7d3316Smrg *Sun\ C*) # Sun C 5.9 59726e7d3316Smrg _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' 59736e7d3316Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59746e7d3316Smrg tmp_sharedflag='-G' ;; 59756e7d3316Smrg *Sun\ F*) # Sun Fortran 8.3 59766e7d3316Smrg tmp_sharedflag='-G' ;; 59776e7d3316Smrg esac 59786e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5979a966c04fSmrg 59806e7d3316Smrg if test "x$supports_anon_versioning" = xyes; then 59816e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59826e7d3316Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59836e7d3316Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59846e7d3316Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59856e7d3316Smrg fi 5986a966c04fSmrg 59876e7d3316Smrg case $cc_basename in 59886e7d3316Smrg xlf* | bgf* | bgxlf* | mpixlf*) 59896e7d3316Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 59906e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5991ac92798bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59926e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 59936e7d3316Smrg if test "x$supports_anon_versioning" = xyes; then 59946e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59956e7d3316Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59966e7d3316Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59976e7d3316Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 59986e7d3316Smrg fi 59996e7d3316Smrg ;; 60006e7d3316Smrg esac 60016e7d3316Smrg else 60026e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60036e7d3316Smrg fi 60046e7d3316Smrg ;; 6005a966c04fSmrg 60066e7d3316Smrg netbsd*) 60076e7d3316Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 60086e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 60096e7d3316Smrg wlarc= 60106e7d3316Smrg else 601197cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 601297cf2ee2Smrg _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' 60136e7d3316Smrg fi 60146e7d3316Smrg ;; 6015a966c04fSmrg 60166e7d3316Smrg solaris*) 60176e7d3316Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 60186e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60196e7d3316Smrg cat <<_LT_EOF 1>&2 6020a966c04fSmrg 60216e7d3316Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 60226e7d3316Smrg*** create shared libraries on Solaris systems. Therefore, libtool 60236e7d3316Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 60246e7d3316Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 60256e7d3316Smrg*** your PATH or compiler configuration so that the native linker is 60266e7d3316Smrg*** used, and then restart. 6027a966c04fSmrg 60286e7d3316Smrg_LT_EOF 60296e7d3316Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 603097cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 603197cf2ee2Smrg _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' 60326e7d3316Smrg else 60336e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60346e7d3316Smrg fi 60356e7d3316Smrg ;; 6036a966c04fSmrg 60376e7d3316Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 60386e7d3316Smrg case `$LD -v 2>&1` in 60396e7d3316Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 60406e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60416e7d3316Smrg cat <<_LT_EOF 1>&2 6042a966c04fSmrg 60436e7d3316Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 60446e7d3316Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 60456e7d3316Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 60466e7d3316Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 60476e7d3316Smrg*** your PATH or compiler configuration so that the native linker is 60486e7d3316Smrg*** used, and then restart. 6049a966c04fSmrg 60506e7d3316Smrg_LT_EOF 60516e7d3316Smrg ;; 60526e7d3316Smrg *) 60536e7d3316Smrg # For security reasons, it is highly recommended that you always 60546e7d3316Smrg # use absolute paths for naming shared libraries, and exclude the 60556e7d3316Smrg # DT_RUNPATH tag from executables and libraries. But doing so 60566e7d3316Smrg # requires that you compile everything twice, which is a pain. 60576e7d3316Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60586e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 60596e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60606e7d3316Smrg _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' 60616e7d3316Smrg else 60626e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60636e7d3316Smrg fi 60646e7d3316Smrg ;; 60656e7d3316Smrg esac 60666e7d3316Smrg ;; 6067a966c04fSmrg 60686e7d3316Smrg sunos4*) 60696e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 60706e7d3316Smrg wlarc= 60716e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60726e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60736e7d3316Smrg ;; 6074a966c04fSmrg 60756e7d3316Smrg *) 60766e7d3316Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 607797cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 607897cf2ee2Smrg _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' 60796e7d3316Smrg else 60806e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60816e7d3316Smrg fi 60826e7d3316Smrg ;; 60836e7d3316Smrg esac 6084a966c04fSmrg 60856e7d3316Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 60866e7d3316Smrg runpath_var= 60876e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 60886e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 60896e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 60906e7d3316Smrg fi 60916e7d3316Smrg else 60926e7d3316Smrg # PORTME fill in a description of your system's linker (not GNU ld) 60936e7d3316Smrg case $host_os in 60946e7d3316Smrg aix3*) 60956e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 60966e7d3316Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60976e7d3316Smrg _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' 60986e7d3316Smrg # Note: this linker hardcodes the directories in LIBPATH if there 60996e7d3316Smrg # are no directories specified by -L. 61006e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61016e7d3316Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 61026e7d3316Smrg # Neither direct hardcoding nor static linking is supported with a 61036e7d3316Smrg # broken collect2. 61046e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61056e7d3316Smrg fi 61066e7d3316Smrg ;; 6107a966c04fSmrg 61086e7d3316Smrg aix[[4-9]]*) 61096e7d3316Smrg if test "$host_cpu" = ia64; then 61106e7d3316Smrg # On IA64, the linker does run time linking by default, so we don't 61116e7d3316Smrg # have to do anything special. 61126e7d3316Smrg aix_use_runtimelinking=no 61136e7d3316Smrg exp_sym_flag='-Bexport' 61146e7d3316Smrg no_entry_flag="" 61156e7d3316Smrg else 61166e7d3316Smrg # If we're using GNU nm, then we don't want the "-C" option. 61176e7d3316Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 61186e7d3316Smrg # Also, AIX nm treats weak defined symbols like other global 61196e7d3316Smrg # defined symbols, whereas GNU nm marks them as "W". 61206e7d3316Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 61216e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 61226e7d3316Smrg else 61236e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 61246e7d3316Smrg fi 61256e7d3316Smrg aix_use_runtimelinking=no 6126a966c04fSmrg 61276e7d3316Smrg # Test if we are trying to use run time linking or normal 61286e7d3316Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 61296e7d3316Smrg # need to do runtime linking. 61306e7d3316Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 61316e7d3316Smrg for ld_flag in $LDFLAGS; do 61326e7d3316Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 61336e7d3316Smrg aix_use_runtimelinking=yes 61346e7d3316Smrg break 61356e7d3316Smrg fi 61366e7d3316Smrg done 61376e7d3316Smrg ;; 61386e7d3316Smrg esac 6139a966c04fSmrg 61406e7d3316Smrg exp_sym_flag='-bexport' 61416e7d3316Smrg no_entry_flag='-bnoentry' 61426e7d3316Smrg fi 6143a966c04fSmrg 61446e7d3316Smrg # When large executables or shared objects are built, AIX ld can 61456e7d3316Smrg # have problems creating the table of contents. If linking a library 61466e7d3316Smrg # or program results in "error TOC overflow" add -mminimal-toc to 61476e7d3316Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 61486e7d3316Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6149a966c04fSmrg 61506e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='' 61516e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 61526e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 61536e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 61546e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 61556e7d3316Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6156a966c04fSmrg 61576e7d3316Smrg if test "$GCC" = yes; then 61586e7d3316Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 61596e7d3316Smrg # We only want to do this on AIX 4.2 and lower, the check 61606e7d3316Smrg # below for broken collect2 doesn't work under 4.3+ 61616e7d3316Smrg collect2name=`${CC} -print-prog-name=collect2` 61626e7d3316Smrg if test -f "$collect2name" && 61636e7d3316Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 61646e7d3316Smrg then 61656e7d3316Smrg # We have reworked collect2 61666e7d3316Smrg : 61676e7d3316Smrg else 61686e7d3316Smrg # We have old collect2 61696e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61706e7d3316Smrg # It fails to find uninstalled libraries when the uninstalled 61716e7d3316Smrg # path is not listed in the libpath. Setting hardcode_minus_L 61726e7d3316Smrg # to unsupported forces relinking 61736e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61746e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61756e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 61766e7d3316Smrg fi 61776e7d3316Smrg ;; 61786e7d3316Smrg esac 61796e7d3316Smrg shared_flag='-shared' 61806e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 61816e7d3316Smrg shared_flag="$shared_flag "'${wl}-G' 61826e7d3316Smrg fi 61836e7d3316Smrg else 61846e7d3316Smrg # not using gcc 61856e7d3316Smrg if test "$host_cpu" = ia64; then 61866e7d3316Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 61876e7d3316Smrg # chokes on -Wl,-G. The following line is correct: 61886e7d3316Smrg shared_flag='-G' 61896e7d3316Smrg else 61906e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 61916e7d3316Smrg shared_flag='${wl}-G' 61926e7d3316Smrg else 61936e7d3316Smrg shared_flag='${wl}-bM:SRE' 61946e7d3316Smrg fi 61956e7d3316Smrg fi 61966e7d3316Smrg fi 6197a966c04fSmrg 61986e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 61996e7d3316Smrg # It seems that -bexpall does not export symbols beginning with 62006e7d3316Smrg # underscore (_), so it is better to generate a list of symbols to export. 62016e7d3316Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 62026e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 62036e7d3316Smrg # Warning - without using the other runtime loading flags (-brtl), 62046e7d3316Smrg # -berok will link without error, but may produce a broken library. 62056e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 62066e7d3316Smrg # Determine the default libpath from the value encoded in an 62076e7d3316Smrg # empty executable. 620897cf2ee2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 62096e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 62106e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 62116e7d3316Smrg else 62126e7d3316Smrg if test "$host_cpu" = ia64; then 62136e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 62146e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 62156e7d3316Smrg _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" 62166e7d3316Smrg else 62176e7d3316Smrg # Determine the default libpath from the value encoded in an 62186e7d3316Smrg # empty executable. 621997cf2ee2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 62206e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 62216e7d3316Smrg # Warning - without using the other run time loading flags, 62226e7d3316Smrg # -berok will link without error, but may produce a broken library. 62236e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 62246e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 62256e7d3316Smrg if test "$with_gnu_ld" = yes; then 62266e7d3316Smrg # We only use this code for GNU lds that support --whole-archive. 62276e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 62286e7d3316Smrg else 62296e7d3316Smrg # Exported symbols can be pulled into shared objects from archives 62306e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 62316e7d3316Smrg fi 62326e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 62336e7d3316Smrg # This is similar to how AIX traditionally builds its shared libraries. 62346e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 62356e7d3316Smrg fi 62366e7d3316Smrg fi 62376e7d3316Smrg ;; 6238a966c04fSmrg 62396e7d3316Smrg amigaos*) 62406e7d3316Smrg case $host_cpu in 62416e7d3316Smrg powerpc) 62426e7d3316Smrg # see comment about AmigaOS4 .so support 62436e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 62446e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 62456e7d3316Smrg ;; 62466e7d3316Smrg m68k) 62476e7d3316Smrg _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)' 62486e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62496e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62506e7d3316Smrg ;; 62516e7d3316Smrg esac 62526e7d3316Smrg ;; 6253a966c04fSmrg 62546e7d3316Smrg bsdi[[45]]*) 62556e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 62566e7d3316Smrg ;; 6257a966c04fSmrg 62586e7d3316Smrg cygwin* | mingw* | pw32* | cegcc*) 62596e7d3316Smrg # When not using gcc, we currently assume that we are using 62606e7d3316Smrg # Microsoft Visual C++. 62616e7d3316Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 62626e7d3316Smrg # no search path for DLLs. 626397cf2ee2Smrg case $cc_basename in 626497cf2ee2Smrg cl*) 626597cf2ee2Smrg # Native MSVC 626697cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 626797cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 626897cf2ee2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 626997cf2ee2Smrg _LT_TAGVAR(file_list_spec, $1)='@' 627097cf2ee2Smrg # Tell ltmain to make .lib files, not .a files. 627197cf2ee2Smrg libext=lib 627297cf2ee2Smrg # Tell ltmain to make .dll files, not .so files. 627397cf2ee2Smrg shrext_cmds=".dll" 627497cf2ee2Smrg # FIXME: Setting linknames here is a bad hack. 627597cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 627697cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 627797cf2ee2Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 627897cf2ee2Smrg else 627997cf2ee2Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 628097cf2ee2Smrg fi~ 628197cf2ee2Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 628297cf2ee2Smrg linknames=' 628397cf2ee2Smrg # The linker will not automatically build a static lib if we build a DLL. 628497cf2ee2Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 628597cf2ee2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6286ac92798bSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 628797cf2ee2Smrg _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' 628897cf2ee2Smrg # Don't use ranlib 628997cf2ee2Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 629097cf2ee2Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 629197cf2ee2Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 629297cf2ee2Smrg case $lt_outputfile in 629397cf2ee2Smrg *.exe|*.EXE) ;; 629497cf2ee2Smrg *) 629597cf2ee2Smrg lt_outputfile="$lt_outputfile.exe" 629697cf2ee2Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 629797cf2ee2Smrg ;; 629897cf2ee2Smrg esac~ 629997cf2ee2Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 630097cf2ee2Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 630197cf2ee2Smrg $RM "$lt_outputfile.manifest"; 630297cf2ee2Smrg fi' 630397cf2ee2Smrg ;; 630497cf2ee2Smrg *) 630597cf2ee2Smrg # Assume MSVC wrapper 630697cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 630797cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 630897cf2ee2Smrg # Tell ltmain to make .lib files, not .a files. 630997cf2ee2Smrg libext=lib 631097cf2ee2Smrg # Tell ltmain to make .dll files, not .so files. 631197cf2ee2Smrg shrext_cmds=".dll" 631297cf2ee2Smrg # FIXME: Setting linknames here is a bad hack. 631397cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 631497cf2ee2Smrg # The linker will automatically build a .lib file if we build a DLL. 631597cf2ee2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 631697cf2ee2Smrg # FIXME: Should let the user specify the lib program. 631797cf2ee2Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 631897cf2ee2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 631997cf2ee2Smrg ;; 632097cf2ee2Smrg esac 63216e7d3316Smrg ;; 6322a966c04fSmrg 63236e7d3316Smrg darwin* | rhapsody*) 63246e7d3316Smrg _LT_DARWIN_LINKER_FEATURES($1) 63256e7d3316Smrg ;; 6326a966c04fSmrg 63276e7d3316Smrg dgux*) 63286e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63296e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 63306e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63316e7d3316Smrg ;; 6332a966c04fSmrg 63336e7d3316Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 63346e7d3316Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 63356e7d3316Smrg # does not break anything, and helps significantly (at the cost of a little 63366e7d3316Smrg # extra space). 63376e7d3316Smrg freebsd2.2*) 63386e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 63396e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63406e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63416e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63426e7d3316Smrg ;; 6343a966c04fSmrg 63446e7d3316Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6345ac92798bSmrg freebsd2.*) 63466e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 63476e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63486e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63496e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6350a966c04fSmrg ;; 63516e7d3316Smrg 63526e7d3316Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 63536e7d3316Smrg freebsd* | dragonfly*) 635497cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 63556e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63566e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63576e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6358a966c04fSmrg ;; 6359a966c04fSmrg 63606e7d3316Smrg hpux9*) 63616e7d3316Smrg if test "$GCC" = yes; then 636297cf2ee2Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 63636e7d3316Smrg else 63646e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 63656e7d3316Smrg fi 63666e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63676e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63686e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6369a966c04fSmrg 63706e7d3316Smrg # hardcode_minus_L: Not really in the search PATH, 63716e7d3316Smrg # but as the default location of the library. 63726e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63736e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63746e7d3316Smrg ;; 6375a966c04fSmrg 63766e7d3316Smrg hpux10*) 63776e7d3316Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 637897cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 63796e7d3316Smrg else 63806e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 63816e7d3316Smrg fi 63826e7d3316Smrg if test "$with_gnu_ld" = no; then 63836e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63846e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63856e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63866e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63876e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63886e7d3316Smrg # hardcode_minus_L: Not really in the search PATH, 63896e7d3316Smrg # but as the default location of the library. 63906e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63916e7d3316Smrg fi 63926e7d3316Smrg ;; 6393a966c04fSmrg 63946e7d3316Smrg hpux11*) 63956e7d3316Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63966e7d3316Smrg case $host_cpu in 63976e7d3316Smrg hppa*64*) 63986e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63996e7d3316Smrg ;; 64006e7d3316Smrg ia64*) 640197cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64026e7d3316Smrg ;; 64036e7d3316Smrg *) 640497cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 64056e7d3316Smrg ;; 64066e7d3316Smrg esac 64076e7d3316Smrg else 64086e7d3316Smrg case $host_cpu in 64096e7d3316Smrg hppa*64*) 64106e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64116e7d3316Smrg ;; 64126e7d3316Smrg ia64*) 64136e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64146e7d3316Smrg ;; 64156e7d3316Smrg *) 64166e7d3316Smrg m4_if($1, [], [ 64176e7d3316Smrg # Older versions of the 11.00 compiler do not understand -b yet 64186e7d3316Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 64196e7d3316Smrg _LT_LINKER_OPTION([if $CC understands -b], 64206e7d3316Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 64216e7d3316Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 64226e7d3316Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 64236e7d3316Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 64246e7d3316Smrg ;; 64256e7d3316Smrg esac 64266e7d3316Smrg fi 64276e7d3316Smrg if test "$with_gnu_ld" = no; then 64286e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 64296e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6430a966c04fSmrg 64316e7d3316Smrg case $host_cpu in 64326e7d3316Smrg hppa*64*|ia64*) 64336e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 64346e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64356e7d3316Smrg ;; 64366e7d3316Smrg *) 64376e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64386e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64396e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6440a966c04fSmrg 64416e7d3316Smrg # hardcode_minus_L: Not really in the search PATH, 64426e7d3316Smrg # but as the default location of the library. 64436e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64446e7d3316Smrg ;; 64456e7d3316Smrg esac 64466e7d3316Smrg fi 64476e7d3316Smrg ;; 6448a966c04fSmrg 64496e7d3316Smrg irix5* | irix6* | nonstopux*) 64506e7d3316Smrg if test "$GCC" = yes; then 645197cf2ee2Smrg _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' 64526e7d3316Smrg # Try to use the -exported_symbol ld option, if it does not 64536e7d3316Smrg # work, assume that -exports_file does not work either and 64546e7d3316Smrg # implicitly export all symbols. 645597cf2ee2Smrg # This should be the same for all languages, so no per-tag cache variable. 645697cf2ee2Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 645797cf2ee2Smrg [lt_cv_irix_exported_symbol], 645897cf2ee2Smrg [save_LDFLAGS="$LDFLAGS" 645997cf2ee2Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 646097cf2ee2Smrg AC_LINK_IFELSE( 646197cf2ee2Smrg [AC_LANG_SOURCE( 646297cf2ee2Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 646397cf2ee2Smrg [C++], [[int foo (void) { return 0; }]], 646497cf2ee2Smrg [Fortran 77], [[ 646597cf2ee2Smrg subroutine foo 646697cf2ee2Smrg end]], 646797cf2ee2Smrg [Fortran], [[ 646897cf2ee2Smrg subroutine foo 646997cf2ee2Smrg end]])])], 647097cf2ee2Smrg [lt_cv_irix_exported_symbol=yes], 647197cf2ee2Smrg [lt_cv_irix_exported_symbol=no]) 647297cf2ee2Smrg LDFLAGS="$save_LDFLAGS"]) 647397cf2ee2Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 647497cf2ee2Smrg _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' 647597cf2ee2Smrg fi 64766e7d3316Smrg else 64776e7d3316Smrg _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' 64786e7d3316Smrg _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' 64796e7d3316Smrg fi 64806e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64816e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64826e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64836e7d3316Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64846e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64856e7d3316Smrg ;; 6486a966c04fSmrg 64876e7d3316Smrg netbsd*) 64886e7d3316Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 64896e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 64906e7d3316Smrg else 64916e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 64926e7d3316Smrg fi 64936e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64946e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64956e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64966e7d3316Smrg ;; 6497a966c04fSmrg 64986e7d3316Smrg newsos6) 64996e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65006e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65016e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65026e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65036e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65046e7d3316Smrg ;; 6505a966c04fSmrg 65066e7d3316Smrg *nto* | *qnx*) 65076e7d3316Smrg ;; 6508a966c04fSmrg 65096e7d3316Smrg openbsd*) 65106e7d3316Smrg if test -f /usr/libexec/ld.so; then 65116e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65126e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65136e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65146e7d3316Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 65156e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65166e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 65176e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65186e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 65196e7d3316Smrg else 65206e7d3316Smrg case $host_os in 65216e7d3316Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 65226e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 65236e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65246e7d3316Smrg ;; 65256e7d3316Smrg *) 65266e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65276e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65286e7d3316Smrg ;; 65296e7d3316Smrg esac 65306e7d3316Smrg fi 65316e7d3316Smrg else 65326e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65336e7d3316Smrg fi 65346e7d3316Smrg ;; 6535a966c04fSmrg 65366e7d3316Smrg os2*) 65376e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65386e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65396e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 65406e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 65416e7d3316Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 65426e7d3316Smrg ;; 6543a966c04fSmrg 65446e7d3316Smrg osf3*) 65456e7d3316Smrg if test "$GCC" = yes; then 65466e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65476e7d3316Smrg _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' 65486e7d3316Smrg else 65496e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65506e7d3316Smrg _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' 65516e7d3316Smrg fi 65526e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65536e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65546e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65556e7d3316Smrg ;; 6556a966c04fSmrg 65576e7d3316Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 65586e7d3316Smrg if test "$GCC" = yes; then 65596e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 656097cf2ee2Smrg _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' 65616e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65626e7d3316Smrg else 65636e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65646e7d3316Smrg _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' 65656e7d3316Smrg _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~ 65666e7d3316Smrg $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' 6567a966c04fSmrg 65686e7d3316Smrg # Both c and cxx compiler support -rpath directly 65696e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65706e7d3316Smrg fi 65716e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65726e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65736e7d3316Smrg ;; 6574a966c04fSmrg 65756e7d3316Smrg solaris*) 65766e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 65776e7d3316Smrg if test "$GCC" = yes; then 65786e7d3316Smrg wlarc='${wl}' 657997cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 65806e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 658197cf2ee2Smrg $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' 65826e7d3316Smrg else 65836e7d3316Smrg case `$CC -V 2>&1` in 65846e7d3316Smrg *"Compilers 5.0"*) 65856e7d3316Smrg wlarc='' 65866e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 65876e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65886e7d3316Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 65896e7d3316Smrg ;; 65906e7d3316Smrg *) 65916e7d3316Smrg wlarc='${wl}' 65926e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 65936e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65946e7d3316Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 65956e7d3316Smrg ;; 65966e7d3316Smrg esac 65976e7d3316Smrg fi 65986e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65996e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66006e7d3316Smrg case $host_os in 66016e7d3316Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 66026e7d3316Smrg *) 66036e7d3316Smrg # The compiler driver will combine and reorder linker options, 66046e7d3316Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 66056e7d3316Smrg # but is careful enough not to reorder. 66066e7d3316Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 66076e7d3316Smrg if test "$GCC" = yes; then 66086e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 66096e7d3316Smrg else 66106e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 66116e7d3316Smrg fi 66126e7d3316Smrg ;; 66136e7d3316Smrg esac 66146e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66156e7d3316Smrg ;; 6616a966c04fSmrg 66176e7d3316Smrg sunos4*) 66186e7d3316Smrg if test "x$host_vendor" = xsequent; then 66196e7d3316Smrg # Use $CC to link under sequent, because it throws in some extra .o 66206e7d3316Smrg # files that make .init and .fini sections work. 66216e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 66226e7d3316Smrg else 66236e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 66246e7d3316Smrg fi 66256e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66266e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 66276e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 66286e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66296e7d3316Smrg ;; 6630a966c04fSmrg 66316e7d3316Smrg sysv4) 66326e7d3316Smrg case $host_vendor in 66336e7d3316Smrg sni) 66346e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66356e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 66366e7d3316Smrg ;; 66376e7d3316Smrg siemens) 66386e7d3316Smrg ## LD is ld it makes a PLAMLIB 66396e7d3316Smrg ## CC just makes a GrossModule. 66406e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 66416e7d3316Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 66426e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 66436e7d3316Smrg ;; 66446e7d3316Smrg motorola) 66456e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66466e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 66476e7d3316Smrg ;; 66486e7d3316Smrg esac 66496e7d3316Smrg runpath_var='LD_RUN_PATH' 66506e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66516e7d3316Smrg ;; 6652a966c04fSmrg 66536e7d3316Smrg sysv4.3*) 66546e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66556e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66566e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 66576e7d3316Smrg ;; 6658a966c04fSmrg 66596e7d3316Smrg sysv4*MP*) 66606e7d3316Smrg if test -d /usr/nec; then 66616e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66626e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66636e7d3316Smrg runpath_var=LD_RUN_PATH 66646e7d3316Smrg hardcode_runpath_var=yes 66656e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 66666e7d3316Smrg fi 66676e7d3316Smrg ;; 6668a966c04fSmrg 66696e7d3316Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 66706e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66716e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66726e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66736e7d3316Smrg runpath_var='LD_RUN_PATH' 6674a966c04fSmrg 66756e7d3316Smrg if test "$GCC" = yes; then 66766e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66776e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66786e7d3316Smrg else 66796e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66806e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66816e7d3316Smrg fi 66826e7d3316Smrg ;; 6683a966c04fSmrg 66846e7d3316Smrg sysv5* | sco3.2v5* | sco5v6*) 66856e7d3316Smrg # Note: We can NOT use -z defs as we might desire, because we do not 66866e7d3316Smrg # link with -lc, and that would cause any symbols used from libc to 66876e7d3316Smrg # always be unresolved, which means just about no library would 66886e7d3316Smrg # ever link correctly. If we're not using GNU ld we use -z text 66896e7d3316Smrg # though, which does catch some bad symbols but isn't as heavy-handed 66906e7d3316Smrg # as -z defs. 66916e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66926e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 66936e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66946e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66956e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 66966e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 66976e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66986e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 66996e7d3316Smrg runpath_var='LD_RUN_PATH' 6700a966c04fSmrg 67016e7d3316Smrg if test "$GCC" = yes; then 67026e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67036e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67046e7d3316Smrg else 67056e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67066e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67076e7d3316Smrg fi 67086e7d3316Smrg ;; 6709a966c04fSmrg 67106e7d3316Smrg uts4*) 67116e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 67126e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67136e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67146e7d3316Smrg ;; 6715a966c04fSmrg 67166e7d3316Smrg *) 67176e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67186e7d3316Smrg ;; 67196e7d3316Smrg esac 6720a966c04fSmrg 67216e7d3316Smrg if test x$host_vendor = xsni; then 67226e7d3316Smrg case $host in 67236e7d3316Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 67246e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 67256e7d3316Smrg ;; 67266e7d3316Smrg esac 67276e7d3316Smrg fi 67286e7d3316Smrg fi 67296e7d3316Smrg]) 67306e7d3316SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 67316e7d3316Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6732a966c04fSmrg 67336e7d3316Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6734a966c04fSmrg 67356e7d3316Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 67366e7d3316Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 67376e7d3316Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 67386e7d3316Smrg [The commands to extract the exported symbol list from a shared archive]) 6739a966c04fSmrg 67406e7d3316Smrg# 67416e7d3316Smrg# Do we need to explicitly link libc? 67426e7d3316Smrg# 67436e7d3316Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 67446e7d3316Smrgx|xyes) 67456e7d3316Smrg # Assume -lc should be added 67466e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6747a966c04fSmrg 67486e7d3316Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 67496e7d3316Smrg case $_LT_TAGVAR(archive_cmds, $1) in 67506e7d3316Smrg *'~'*) 67516e7d3316Smrg # FIXME: we may have to deal with multi-command sequences. 67526e7d3316Smrg ;; 67536e7d3316Smrg '$CC '*) 67546e7d3316Smrg # Test whether the compiler implicitly links with -lc since on some 67556e7d3316Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 67566e7d3316Smrg # to ld, don't add -lc before -lgcc. 67576e7d3316Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 67586e7d3316Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 67596e7d3316Smrg [$RM conftest* 67606e7d3316Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 67616e7d3316Smrg 67626e7d3316Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 67636e7d3316Smrg soname=conftest 67646e7d3316Smrg lib=conftest 67656e7d3316Smrg libobjs=conftest.$ac_objext 67666e7d3316Smrg deplibs= 67676e7d3316Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 67686e7d3316Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 67696e7d3316Smrg compiler_flags=-v 67706e7d3316Smrg linker_flags=-v 67716e7d3316Smrg verstring= 67726e7d3316Smrg output_objdir=. 67736e7d3316Smrg libname=conftest 67746e7d3316Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 67756e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 67766e7d3316Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 67776e7d3316Smrg then 67786e7d3316Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67796e7d3316Smrg else 67806e7d3316Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67816e7d3316Smrg fi 67826e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 67836e7d3316Smrg else 67846e7d3316Smrg cat conftest.err 1>&5 67856e7d3316Smrg fi 67866e7d3316Smrg $RM conftest* 67876e7d3316Smrg ]) 67886e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 67896e7d3316Smrg ;; 67906e7d3316Smrg esac 67916e7d3316Smrg fi 67926e7d3316Smrg ;; 67936e7d3316Smrgesac 6794a966c04fSmrg 67956e7d3316Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 67966e7d3316Smrg [Whether or not to add -lc for building shared libraries]) 67976e7d3316Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 67986e7d3316Smrg [enable_shared_with_static_runtimes], [0], 67996e7d3316Smrg [Whether or not to disallow shared libs when runtime libs are static]) 68006e7d3316Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 68016e7d3316Smrg [Compiler flag to allow reflexive dlopens]) 68026e7d3316Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 68036e7d3316Smrg [Compiler flag to generate shared objects directly from archives]) 68046e7d3316Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 68056e7d3316Smrg [Whether the compiler copes with passing no objects directly]) 68066e7d3316Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 68076e7d3316Smrg [Create an old-style archive from a shared archive]) 68086e7d3316Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 68096e7d3316Smrg [Create a temporary old-style archive to link instead of a shared archive]) 68106e7d3316Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 68116e7d3316Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 68126e7d3316Smrg_LT_TAGDECL([], [module_cmds], [2], 68136e7d3316Smrg [Commands used to build a loadable module if different from building 68146e7d3316Smrg a shared archive.]) 68156e7d3316Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 68166e7d3316Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 68176e7d3316Smrg [Whether we are building with GNU ld or not]) 68186e7d3316Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 68196e7d3316Smrg [Flag that allows shared libraries with undefined symbols to be built]) 68206e7d3316Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 68216e7d3316Smrg [Flag that enforces no undefined symbols]) 68226e7d3316Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 68236e7d3316Smrg [Flag to hardcode $libdir into a binary during linking. 68246e7d3316Smrg This must work even if $libdir does not exist]) 68256e7d3316Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 68266e7d3316Smrg [Whether we need a single "-rpath" flag with a separated argument]) 68276e7d3316Smrg_LT_TAGDECL([], [hardcode_direct], [0], 68286e7d3316Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68296e7d3316Smrg DIR into the resulting binary]) 68306e7d3316Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 68316e7d3316Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68326e7d3316Smrg DIR into the resulting binary and the resulting library dependency is 68336e7d3316Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 68346e7d3316Smrg library is relocated]) 68356e7d3316Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 68366e7d3316Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 68376e7d3316Smrg into the resulting binary]) 68386e7d3316Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 68396e7d3316Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 68406e7d3316Smrg into the resulting binary]) 68416e7d3316Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 68426e7d3316Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 68436e7d3316Smrg into the library and all subsequent libraries and executables linked 68446e7d3316Smrg against it]) 68456e7d3316Smrg_LT_TAGDECL([], [inherit_rpath], [0], 68466e7d3316Smrg [Set to yes if linker adds runtime paths of dependent libraries 68476e7d3316Smrg to runtime path list]) 68486e7d3316Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 68496e7d3316Smrg [Whether libtool must link a program against all its dependency libraries]) 68506e7d3316Smrg_LT_TAGDECL([], [always_export_symbols], [0], 68516e7d3316Smrg [Set to "yes" if exported symbols are required]) 68526e7d3316Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 68536e7d3316Smrg [The commands to list exported symbols]) 68546e7d3316Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 68556e7d3316Smrg [Symbols that should not be listed in the preloaded symbols]) 68566e7d3316Smrg_LT_TAGDECL([], [include_expsyms], [1], 68576e7d3316Smrg [Symbols that must always be exported]) 68586e7d3316Smrg_LT_TAGDECL([], [prelink_cmds], [2], 68596e7d3316Smrg [Commands necessary for linking programs (against libraries) with templates]) 686097cf2ee2Smrg_LT_TAGDECL([], [postlink_cmds], [2], 686197cf2ee2Smrg [Commands necessary for finishing linking programs]) 68626e7d3316Smrg_LT_TAGDECL([], [file_list_spec], [1], 68636e7d3316Smrg [Specify filename containing input files]) 68646e7d3316Smrgdnl FIXME: Not yet implemented 68656e7d3316Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 68666e7d3316Smrgdnl [Compiler flag to generate thread safe objects]) 68676e7d3316Smrg])# _LT_LINKER_SHLIBS 68686e7d3316Smrg 68696e7d3316Smrg 68706e7d3316Smrg# _LT_LANG_C_CONFIG([TAG]) 68716e7d3316Smrg# ------------------------ 68726e7d3316Smrg# Ensure that the configuration variables for a C compiler are suitably 68736e7d3316Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 68746e7d3316Smrg# the compiler configuration to `libtool'. 68756e7d3316Smrgm4_defun([_LT_LANG_C_CONFIG], 68766e7d3316Smrg[m4_require([_LT_DECL_EGREP])dnl 68776e7d3316Smrglt_save_CC="$CC" 68786e7d3316SmrgAC_LANG_PUSH(C) 6879a966c04fSmrg 68806e7d3316Smrg# Source file extension for C test sources. 68816e7d3316Smrgac_ext=c 6882a966c04fSmrg 68836e7d3316Smrg# Object file extension for compiled C test sources. 68846e7d3316Smrgobjext=o 68856e7d3316Smrg_LT_TAGVAR(objext, $1)=$objext 6886a966c04fSmrg 68876e7d3316Smrg# Code to be used in simple compile tests 68886e7d3316Smrglt_simple_compile_test_code="int some_variable = 0;" 6889a966c04fSmrg 68906e7d3316Smrg# Code to be used in simple link tests 68916e7d3316Smrglt_simple_link_test_code='int main(){return(0);}' 6892a966c04fSmrg 68936e7d3316Smrg_LT_TAG_COMPILER 68946e7d3316Smrg# Save the default compiler, since it gets overwritten when the other 68956e7d3316Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 68966e7d3316Smrgcompiler_DEFAULT=$CC 6897a966c04fSmrg 68986e7d3316Smrg# save warnings/boilerplate of simple test code 68996e7d3316Smrg_LT_COMPILER_BOILERPLATE 69006e7d3316Smrg_LT_LINKER_BOILERPLATE 6901a966c04fSmrg 69026e7d3316Smrgif test -n "$compiler"; then 69036e7d3316Smrg _LT_COMPILER_NO_RTTI($1) 69046e7d3316Smrg _LT_COMPILER_PIC($1) 69056e7d3316Smrg _LT_COMPILER_C_O($1) 69066e7d3316Smrg _LT_COMPILER_FILE_LOCKS($1) 69076e7d3316Smrg _LT_LINKER_SHLIBS($1) 69086e7d3316Smrg _LT_SYS_DYNAMIC_LINKER($1) 69096e7d3316Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 69106e7d3316Smrg LT_SYS_DLOPEN_SELF 69116e7d3316Smrg _LT_CMD_STRIPLIB 69126e7d3316Smrg 69136e7d3316Smrg # Report which library types will actually be built 69146e7d3316Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 69156e7d3316Smrg AC_MSG_RESULT([$can_build_shared]) 69166e7d3316Smrg 69176e7d3316Smrg AC_MSG_CHECKING([whether to build shared libraries]) 69186e7d3316Smrg test "$can_build_shared" = "no" && enable_shared=no 69196e7d3316Smrg 69206e7d3316Smrg # On AIX, shared libraries and static libraries use the same namespace, and 69216e7d3316Smrg # are all built from PIC. 69226e7d3316Smrg case $host_os in 69236e7d3316Smrg aix3*) 69246e7d3316Smrg test "$enable_shared" = yes && enable_static=no 69256e7d3316Smrg if test -n "$RANLIB"; then 69266e7d3316Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 69276e7d3316Smrg postinstall_cmds='$RANLIB $lib' 69286e7d3316Smrg fi 69296e7d3316Smrg ;; 6930a966c04fSmrg 69316e7d3316Smrg aix[[4-9]]*) 69326e7d3316Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 69336e7d3316Smrg test "$enable_shared" = yes && enable_static=no 69346e7d3316Smrg fi 69356e7d3316Smrg ;; 69366e7d3316Smrg esac 69376e7d3316Smrg AC_MSG_RESULT([$enable_shared]) 6938a966c04fSmrg 69396e7d3316Smrg AC_MSG_CHECKING([whether to build static libraries]) 69406e7d3316Smrg # Make sure either enable_shared or enable_static is yes. 69416e7d3316Smrg test "$enable_shared" = yes || enable_static=yes 69426e7d3316Smrg AC_MSG_RESULT([$enable_static]) 6943a966c04fSmrg 69446e7d3316Smrg _LT_CONFIG($1) 69456e7d3316Smrgfi 69466e7d3316SmrgAC_LANG_POP 69476e7d3316SmrgCC="$lt_save_CC" 69486e7d3316Smrg])# _LT_LANG_C_CONFIG 6949a966c04fSmrg 6950a966c04fSmrg 69516e7d3316Smrg# _LT_LANG_CXX_CONFIG([TAG]) 69526e7d3316Smrg# -------------------------- 69536e7d3316Smrg# Ensure that the configuration variables for a C++ compiler are suitably 69546e7d3316Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 69556e7d3316Smrg# the compiler configuration to `libtool'. 69566e7d3316Smrgm4_defun([_LT_LANG_CXX_CONFIG], 69576e7d3316Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69586e7d3316Smrgm4_require([_LT_DECL_EGREP])dnl 695997cf2ee2Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 69606e7d3316Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 69616e7d3316Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 69626e7d3316Smrg (test "X$CXX" != "Xg++"))) ; then 69636e7d3316Smrg AC_PROG_CXXCPP 69646e7d3316Smrgelse 69656e7d3316Smrg _lt_caught_CXX_error=yes 69666e7d3316Smrgfi 6967a966c04fSmrg 69686e7d3316SmrgAC_LANG_PUSH(C++) 69696e7d3316Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 69706e7d3316Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 69716e7d3316Smrg_LT_TAGVAR(always_export_symbols, $1)=no 69726e7d3316Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 69736e7d3316Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 69746e7d3316Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 69756e7d3316Smrg_LT_TAGVAR(hardcode_direct, $1)=no 69766e7d3316Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 69776e7d3316Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 69786e7d3316Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 69796e7d3316Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 69806e7d3316Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 69816e7d3316Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 69826e7d3316Smrg_LT_TAGVAR(inherit_rpath, $1)=no 69836e7d3316Smrg_LT_TAGVAR(module_cmds, $1)= 69846e7d3316Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 69856e7d3316Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 69866e7d3316Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 69876e7d3316Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 69886e7d3316Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 69896e7d3316Smrg_LT_TAGVAR(no_undefined_flag, $1)= 69906e7d3316Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 69916e7d3316Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6992a966c04fSmrg 69936e7d3316Smrg# Source file extension for C++ test sources. 69946e7d3316Smrgac_ext=cpp 6995a966c04fSmrg 69966e7d3316Smrg# Object file extension for compiled C++ test sources. 69976e7d3316Smrgobjext=o 69986e7d3316Smrg_LT_TAGVAR(objext, $1)=$objext 69996e7d3316Smrg 70006e7d3316Smrg# No sense in running all these tests if we already determined that 70016e7d3316Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 70026e7d3316Smrg# are currently assumed to apply to all compilers on this platform, 70036e7d3316Smrg# and will be corrupted by setting them based on a non-working compiler. 70046e7d3316Smrgif test "$_lt_caught_CXX_error" != yes; then 70056e7d3316Smrg # Code to be used in simple compile tests 70066e7d3316Smrg lt_simple_compile_test_code="int some_variable = 0;" 70076e7d3316Smrg 70086e7d3316Smrg # Code to be used in simple link tests 70096e7d3316Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 70106e7d3316Smrg 70116e7d3316Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 70126e7d3316Smrg _LT_TAG_COMPILER 70136e7d3316Smrg 70146e7d3316Smrg # save warnings/boilerplate of simple test code 70156e7d3316Smrg _LT_COMPILER_BOILERPLATE 70166e7d3316Smrg _LT_LINKER_BOILERPLATE 70176e7d3316Smrg 70186e7d3316Smrg # Allow CC to be a program name with arguments. 70196e7d3316Smrg lt_save_CC=$CC 702097cf2ee2Smrg lt_save_CFLAGS=$CFLAGS 70216e7d3316Smrg lt_save_LD=$LD 70226e7d3316Smrg lt_save_GCC=$GCC 70236e7d3316Smrg GCC=$GXX 70246e7d3316Smrg lt_save_with_gnu_ld=$with_gnu_ld 70256e7d3316Smrg lt_save_path_LD=$lt_cv_path_LD 70266e7d3316Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 70276e7d3316Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 70286e7d3316Smrg else 70296e7d3316Smrg $as_unset lt_cv_prog_gnu_ld 70306e7d3316Smrg fi 70316e7d3316Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 70326e7d3316Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 70336e7d3316Smrg else 70346e7d3316Smrg $as_unset lt_cv_path_LD 70356e7d3316Smrg fi 70366e7d3316Smrg test -z "${LDCXX+set}" || LD=$LDCXX 70376e7d3316Smrg CC=${CXX-"c++"} 703897cf2ee2Smrg CFLAGS=$CXXFLAGS 70396e7d3316Smrg compiler=$CC 70406e7d3316Smrg _LT_TAGVAR(compiler, $1)=$CC 70416e7d3316Smrg _LT_CC_BASENAME([$compiler]) 7042a966c04fSmrg 70436e7d3316Smrg if test -n "$compiler"; then 70446e7d3316Smrg # We don't want -fno-exception when compiling C++ code, so set the 70456e7d3316Smrg # no_builtin_flag separately 70466e7d3316Smrg if test "$GXX" = yes; then 70476e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 70486e7d3316Smrg else 70496e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 70506e7d3316Smrg fi 7051a966c04fSmrg 70526e7d3316Smrg if test "$GXX" = yes; then 70536e7d3316Smrg # Set up default GNU C++ configuration 7054a966c04fSmrg 70556e7d3316Smrg LT_PATH_LD 7056a966c04fSmrg 70576e7d3316Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 70586e7d3316Smrg # archiving commands below assume that GNU ld is being used. 70596e7d3316Smrg if test "$with_gnu_ld" = yes; then 706097cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 706197cf2ee2Smrg _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' 7062a966c04fSmrg 70636e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 70646e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7065a966c04fSmrg 70666e7d3316Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 70676e7d3316Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 70686e7d3316Smrg # investigate it a little bit more. (MM) 70696e7d3316Smrg wlarc='${wl}' 7070a966c04fSmrg 70716e7d3316Smrg # ancient GNU ld didn't support --whole-archive et. al. 70726e7d3316Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 70736e7d3316Smrg $GREP 'no-whole-archive' > /dev/null; then 70746e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 70756e7d3316Smrg else 70766e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 70776e7d3316Smrg fi 70786e7d3316Smrg else 70796e7d3316Smrg with_gnu_ld=no 70806e7d3316Smrg wlarc= 70816e7d3316Smrg 70826e7d3316Smrg # A generic and very simple default shared library creation 70836e7d3316Smrg # command for GNU C++ for the case where it uses the native 70846e7d3316Smrg # linker, instead of GNU ld. If possible, this setting should 70856e7d3316Smrg # overridden to take advantage of the native linker features on 70866e7d3316Smrg # the platform it is being used on. 70876e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 70886e7d3316Smrg fi 7089a966c04fSmrg 70906e7d3316Smrg # Commands to make compiler produce verbose output that lists 70916e7d3316Smrg # what "hidden" libraries, object files and flags are used when 70926e7d3316Smrg # linking a shared library. 70936e7d3316Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7094a966c04fSmrg 70956e7d3316Smrg else 70966e7d3316Smrg GXX=no 70976e7d3316Smrg with_gnu_ld=no 70986e7d3316Smrg wlarc= 70996e7d3316Smrg fi 7100a966c04fSmrg 71016e7d3316Smrg # PORTME: fill in a description of your system's C++ link characteristics 71026e7d3316Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 71036e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71046e7d3316Smrg case $host_os in 71056e7d3316Smrg aix3*) 71066e7d3316Smrg # FIXME: insert proper C++ library support 71076e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71086e7d3316Smrg ;; 71096e7d3316Smrg aix[[4-9]]*) 71106e7d3316Smrg if test "$host_cpu" = ia64; then 71116e7d3316Smrg # On IA64, the linker does run time linking by default, so we don't 71126e7d3316Smrg # have to do anything special. 71136e7d3316Smrg aix_use_runtimelinking=no 71146e7d3316Smrg exp_sym_flag='-Bexport' 71156e7d3316Smrg no_entry_flag="" 71166e7d3316Smrg else 71176e7d3316Smrg aix_use_runtimelinking=no 71186e7d3316Smrg 71196e7d3316Smrg # Test if we are trying to use run time linking or normal 71206e7d3316Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 71216e7d3316Smrg # need to do runtime linking. 71226e7d3316Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 71236e7d3316Smrg for ld_flag in $LDFLAGS; do 71246e7d3316Smrg case $ld_flag in 71256e7d3316Smrg *-brtl*) 71266e7d3316Smrg aix_use_runtimelinking=yes 71276e7d3316Smrg break 71286e7d3316Smrg ;; 71296e7d3316Smrg esac 71306e7d3316Smrg done 71316e7d3316Smrg ;; 71326e7d3316Smrg esac 7133a966c04fSmrg 71346e7d3316Smrg exp_sym_flag='-bexport' 71356e7d3316Smrg no_entry_flag='-bnoentry' 71366e7d3316Smrg fi 7137a966c04fSmrg 71386e7d3316Smrg # When large executables or shared objects are built, AIX ld can 71396e7d3316Smrg # have problems creating the table of contents. If linking a library 71406e7d3316Smrg # or program results in "error TOC overflow" add -mminimal-toc to 71416e7d3316Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 71426e7d3316Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 71436e7d3316Smrg 71446e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='' 71456e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71466e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71476e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 71486e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 71496e7d3316Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 71506e7d3316Smrg 71516e7d3316Smrg if test "$GXX" = yes; then 71526e7d3316Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 71536e7d3316Smrg # We only want to do this on AIX 4.2 and lower, the check 71546e7d3316Smrg # below for broken collect2 doesn't work under 4.3+ 71556e7d3316Smrg collect2name=`${CC} -print-prog-name=collect2` 71566e7d3316Smrg if test -f "$collect2name" && 71576e7d3316Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 71586e7d3316Smrg then 71596e7d3316Smrg # We have reworked collect2 71606e7d3316Smrg : 71616e7d3316Smrg else 71626e7d3316Smrg # We have old collect2 71636e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 71646e7d3316Smrg # It fails to find uninstalled libraries when the uninstalled 71656e7d3316Smrg # path is not listed in the libpath. Setting hardcode_minus_L 71666e7d3316Smrg # to unsupported forces relinking 71676e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 71686e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71696e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 71706e7d3316Smrg fi 71716e7d3316Smrg esac 71726e7d3316Smrg shared_flag='-shared' 71736e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 71746e7d3316Smrg shared_flag="$shared_flag "'${wl}-G' 71756e7d3316Smrg fi 71766e7d3316Smrg else 71776e7d3316Smrg # not using gcc 71786e7d3316Smrg if test "$host_cpu" = ia64; then 71796e7d3316Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 71806e7d3316Smrg # chokes on -Wl,-G. The following line is correct: 71816e7d3316Smrg shared_flag='-G' 71826e7d3316Smrg else 71836e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 71846e7d3316Smrg shared_flag='${wl}-G' 71856e7d3316Smrg else 71866e7d3316Smrg shared_flag='${wl}-bM:SRE' 71876e7d3316Smrg fi 71886e7d3316Smrg fi 71896e7d3316Smrg fi 71902e2dd055Smrg 71916e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 71926e7d3316Smrg # It seems that -bexpall does not export symbols beginning with 71936e7d3316Smrg # underscore (_), so it is better to generate a list of symbols to 71946e7d3316Smrg # export. 71956e7d3316Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 71966e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 71976e7d3316Smrg # Warning - without using the other runtime loading flags (-brtl), 71986e7d3316Smrg # -berok will link without error, but may produce a broken library. 71996e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 72006e7d3316Smrg # Determine the default libpath from the value encoded in an empty 72016e7d3316Smrg # executable. 720297cf2ee2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 72036e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72046e7d3316Smrg 72056e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 72066e7d3316Smrg else 72076e7d3316Smrg if test "$host_cpu" = ia64; then 72086e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 72096e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 72106e7d3316Smrg _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" 72116e7d3316Smrg else 72126e7d3316Smrg # Determine the default libpath from the value encoded in an 72136e7d3316Smrg # empty executable. 721497cf2ee2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 72156e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72166e7d3316Smrg # Warning - without using the other run time loading flags, 72176e7d3316Smrg # -berok will link without error, but may produce a broken library. 72186e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 72196e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 72206e7d3316Smrg if test "$with_gnu_ld" = yes; then 72216e7d3316Smrg # We only use this code for GNU lds that support --whole-archive. 72226e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 72236e7d3316Smrg else 72246e7d3316Smrg # Exported symbols can be pulled into shared objects from archives 72256e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 72266e7d3316Smrg fi 72276e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 72286e7d3316Smrg # This is similar to how AIX traditionally builds its shared 72296e7d3316Smrg # libraries. 72306e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 72316e7d3316Smrg fi 72326e7d3316Smrg fi 72336e7d3316Smrg ;; 7234a966c04fSmrg 72356e7d3316Smrg beos*) 72366e7d3316Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 72376e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72386e7d3316Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 72396e7d3316Smrg # support --undefined. This deserves some investigation. FIXME 72406e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72416e7d3316Smrg else 72426e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72436e7d3316Smrg fi 72446e7d3316Smrg ;; 7245a966c04fSmrg 72466e7d3316Smrg chorus*) 72476e7d3316Smrg case $cc_basename in 72486e7d3316Smrg *) 72496e7d3316Smrg # FIXME: insert proper C++ library support 72506e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72516e7d3316Smrg ;; 72526e7d3316Smrg esac 72536e7d3316Smrg ;; 7254a966c04fSmrg 72556e7d3316Smrg cygwin* | mingw* | pw32* | cegcc*) 725697cf2ee2Smrg case $GXX,$cc_basename in 725797cf2ee2Smrg ,cl* | no,cl*) 725897cf2ee2Smrg # Native MSVC 725997cf2ee2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 726097cf2ee2Smrg # no search path for DLLs. 726197cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 726297cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 726397cf2ee2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 726497cf2ee2Smrg _LT_TAGVAR(file_list_spec, $1)='@' 726597cf2ee2Smrg # Tell ltmain to make .lib files, not .a files. 726697cf2ee2Smrg libext=lib 726797cf2ee2Smrg # Tell ltmain to make .dll files, not .so files. 726897cf2ee2Smrg shrext_cmds=".dll" 726997cf2ee2Smrg # FIXME: Setting linknames here is a bad hack. 727097cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 727197cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 727297cf2ee2Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 727397cf2ee2Smrg else 727497cf2ee2Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 727597cf2ee2Smrg fi~ 727697cf2ee2Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 727797cf2ee2Smrg linknames=' 727897cf2ee2Smrg # The linker will not automatically build a static lib if we build a DLL. 727997cf2ee2Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 728097cf2ee2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 728197cf2ee2Smrg # Don't use ranlib 728297cf2ee2Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 728397cf2ee2Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 728497cf2ee2Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 728597cf2ee2Smrg case $lt_outputfile in 728697cf2ee2Smrg *.exe|*.EXE) ;; 728797cf2ee2Smrg *) 728897cf2ee2Smrg lt_outputfile="$lt_outputfile.exe" 728997cf2ee2Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 729097cf2ee2Smrg ;; 729197cf2ee2Smrg esac~ 729297cf2ee2Smrg func_to_tool_file "$lt_outputfile"~ 729397cf2ee2Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 729497cf2ee2Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 729597cf2ee2Smrg $RM "$lt_outputfile.manifest"; 729697cf2ee2Smrg fi' 729797cf2ee2Smrg ;; 729897cf2ee2Smrg *) 729997cf2ee2Smrg # g++ 730097cf2ee2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 730197cf2ee2Smrg # as there is no search path for DLLs. 730297cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 730397cf2ee2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 730497cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 730597cf2ee2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 730697cf2ee2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 730797cf2ee2Smrg 730897cf2ee2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 730997cf2ee2Smrg _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' 731097cf2ee2Smrg # If the export-symbols file already is a .def file (1st line 731197cf2ee2Smrg # is EXPORTS), use it as is; otherwise, prepend... 731297cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 731397cf2ee2Smrg cp $export_symbols $output_objdir/$soname.def; 731497cf2ee2Smrg else 731597cf2ee2Smrg echo EXPORTS > $output_objdir/$soname.def; 731697cf2ee2Smrg cat $export_symbols >> $output_objdir/$soname.def; 731797cf2ee2Smrg fi~ 731897cf2ee2Smrg $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' 731997cf2ee2Smrg else 732097cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 732197cf2ee2Smrg fi 732297cf2ee2Smrg ;; 732397cf2ee2Smrg esac 732497cf2ee2Smrg ;; 73256e7d3316Smrg darwin* | rhapsody*) 73266e7d3316Smrg _LT_DARWIN_LINKER_FEATURES($1) 73276e7d3316Smrg ;; 7328a966c04fSmrg 73296e7d3316Smrg dgux*) 73306e7d3316Smrg case $cc_basename in 73316e7d3316Smrg ec++*) 73326e7d3316Smrg # FIXME: insert proper C++ library support 73336e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73346e7d3316Smrg ;; 73356e7d3316Smrg ghcx*) 73366e7d3316Smrg # Green Hills C++ Compiler 73376e7d3316Smrg # FIXME: insert proper C++ library support 73386e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73396e7d3316Smrg ;; 73406e7d3316Smrg *) 73416e7d3316Smrg # FIXME: insert proper C++ library support 73426e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73436e7d3316Smrg ;; 73446e7d3316Smrg esac 73456e7d3316Smrg ;; 7346a966c04fSmrg 7347ac92798bSmrg freebsd2.*) 73486e7d3316Smrg # C++ shared libraries reported to be fairly broken before 73496e7d3316Smrg # switch to ELF 73506e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73516e7d3316Smrg ;; 7352a966c04fSmrg 73536e7d3316Smrg freebsd-elf*) 73546e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73556e7d3316Smrg ;; 7356a966c04fSmrg 73576e7d3316Smrg freebsd* | dragonfly*) 73586e7d3316Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 73596e7d3316Smrg # conventions 73606e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 73616e7d3316Smrg ;; 7362a966c04fSmrg 73636e7d3316Smrg gnu*) 73646e7d3316Smrg ;; 7365a966c04fSmrg 73666e7d3316Smrg haiku*) 73676e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 73686e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73696e7d3316Smrg ;; 7370a966c04fSmrg 73716e7d3316Smrg hpux9*) 73726e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73736e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73746e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73756e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 73766e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73776e7d3316Smrg # but as the default 73786e7d3316Smrg # location of the library. 73796e7d3316Smrg 73806e7d3316Smrg case $cc_basename in 73816e7d3316Smrg CC*) 73826e7d3316Smrg # FIXME: insert proper C++ library support 73836e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73846e7d3316Smrg ;; 73856e7d3316Smrg aCC*) 73866e7d3316Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 73876e7d3316Smrg # Commands to make compiler produce verbose output that lists 73886e7d3316Smrg # what "hidden" libraries, object files and flags are used when 73896e7d3316Smrg # linking a shared library. 73906e7d3316Smrg # 73916e7d3316Smrg # There doesn't appear to be a way to prevent this compiler from 73926e7d3316Smrg # explicitly linking system object files so we need to strip them 73936e7d3316Smrg # from the output so that they don't get included in the library 73946e7d3316Smrg # dependencies. 73956e7d3316Smrg 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"' 73966e7d3316Smrg ;; 73976e7d3316Smrg *) 73986e7d3316Smrg if test "$GXX" = yes; then 739997cf2ee2Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 74006e7d3316Smrg else 74016e7d3316Smrg # FIXME: insert proper C++ library support 74026e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74036e7d3316Smrg fi 74046e7d3316Smrg ;; 74056e7d3316Smrg esac 74066e7d3316Smrg ;; 7407a966c04fSmrg 74086e7d3316Smrg hpux10*|hpux11*) 74096e7d3316Smrg if test $with_gnu_ld = no; then 74106e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 74116e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74126e7d3316Smrg 74136e7d3316Smrg case $host_cpu in 74146e7d3316Smrg hppa*64*|ia64*) 74156e7d3316Smrg ;; 74166e7d3316Smrg *) 74176e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74186e7d3316Smrg ;; 74196e7d3316Smrg esac 74206e7d3316Smrg fi 74216e7d3316Smrg case $host_cpu in 74226e7d3316Smrg hppa*64*|ia64*) 74236e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74246e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74256e7d3316Smrg ;; 74266e7d3316Smrg *) 74276e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 74286e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 74296e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 74306e7d3316Smrg # but as the default 74316e7d3316Smrg # location of the library. 74326e7d3316Smrg ;; 74336e7d3316Smrg esac 74346e7d3316Smrg 74356e7d3316Smrg case $cc_basename in 74366e7d3316Smrg CC*) 74376e7d3316Smrg # FIXME: insert proper C++ library support 74386e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74396e7d3316Smrg ;; 74406e7d3316Smrg aCC*) 74416e7d3316Smrg case $host_cpu in 74426e7d3316Smrg hppa*64*) 74436e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74446e7d3316Smrg ;; 74456e7d3316Smrg ia64*) 74466e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74476e7d3316Smrg ;; 74486e7d3316Smrg *) 74496e7d3316Smrg _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' 74506e7d3316Smrg ;; 74516e7d3316Smrg esac 74526e7d3316Smrg # Commands to make compiler produce verbose output that lists 74536e7d3316Smrg # what "hidden" libraries, object files and flags are used when 74546e7d3316Smrg # linking a shared library. 74556e7d3316Smrg # 74566e7d3316Smrg # There doesn't appear to be a way to prevent this compiler from 74576e7d3316Smrg # explicitly linking system object files so we need to strip them 74586e7d3316Smrg # from the output so that they don't get included in the library 74596e7d3316Smrg # dependencies. 74606e7d3316Smrg 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"' 74616e7d3316Smrg ;; 74626e7d3316Smrg *) 74636e7d3316Smrg if test "$GXX" = yes; then 74646e7d3316Smrg if test $with_gnu_ld = no; then 74656e7d3316Smrg case $host_cpu in 74666e7d3316Smrg hppa*64*) 74676e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74686e7d3316Smrg ;; 74696e7d3316Smrg ia64*) 747097cf2ee2Smrg _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' 74716e7d3316Smrg ;; 74726e7d3316Smrg *) 747397cf2ee2Smrg _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' 74746e7d3316Smrg ;; 74756e7d3316Smrg esac 74766e7d3316Smrg fi 74776e7d3316Smrg else 74786e7d3316Smrg # FIXME: insert proper C++ library support 74796e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74806e7d3316Smrg fi 74816e7d3316Smrg ;; 74826e7d3316Smrg esac 74836e7d3316Smrg ;; 7484a966c04fSmrg 74856e7d3316Smrg interix[[3-9]]*) 74866e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74876e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74886e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74896e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74906e7d3316Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 74916e7d3316Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 74926e7d3316Smrg # default) and relocated if they conflict, which is a slow very memory 74936e7d3316Smrg # consuming and fragmenting process. To avoid this, we pick a random, 74946e7d3316Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 74956e7d3316Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 74966e7d3316Smrg _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' 74976e7d3316Smrg _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' 74986e7d3316Smrg ;; 74996e7d3316Smrg irix5* | irix6*) 75006e7d3316Smrg case $cc_basename in 75016e7d3316Smrg CC*) 75026e7d3316Smrg # SGI C++ 75036e7d3316Smrg _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' 75046e7d3316Smrg 75056e7d3316Smrg # Archives containing C++ object files must be created using 75066e7d3316Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 75076e7d3316Smrg # necessary to make sure instantiated templates are included 75086e7d3316Smrg # in the archive. 75096e7d3316Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 75106e7d3316Smrg ;; 75116e7d3316Smrg *) 75126e7d3316Smrg if test "$GXX" = yes; then 75136e7d3316Smrg if test "$with_gnu_ld" = no; then 751497cf2ee2Smrg _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' 75156e7d3316Smrg else 751697cf2ee2Smrg _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' 75176e7d3316Smrg fi 75186e7d3316Smrg fi 75196e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 75206e7d3316Smrg ;; 75216e7d3316Smrg esac 75226e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75236e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 75246e7d3316Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 75256e7d3316Smrg ;; 7526a966c04fSmrg 75276e7d3316Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 75286e7d3316Smrg case $cc_basename in 75296e7d3316Smrg KCC*) 75306e7d3316Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7531a966c04fSmrg 75326e7d3316Smrg # KCC will only create a shared library if the output file 75336e7d3316Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 75346e7d3316Smrg # to its proper name (with version) after linking. 75356e7d3316Smrg _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' 75366e7d3316Smrg _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' 75376e7d3316Smrg # Commands to make compiler produce verbose output that lists 75386e7d3316Smrg # what "hidden" libraries, object files and flags are used when 75396e7d3316Smrg # linking a shared library. 75406e7d3316Smrg # 75416e7d3316Smrg # There doesn't appear to be a way to prevent this compiler from 75426e7d3316Smrg # explicitly linking system object files so we need to strip them 75436e7d3316Smrg # from the output so that they don't get included in the library 75446e7d3316Smrg # dependencies. 75456e7d3316Smrg 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"' 75466e7d3316Smrg 75476e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75486e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75496e7d3316Smrg 75506e7d3316Smrg # Archives containing C++ object files must be created using 75516e7d3316Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 75526e7d3316Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 75536e7d3316Smrg ;; 75546e7d3316Smrg icpc* | ecpc* ) 75556e7d3316Smrg # Intel C++ 75566e7d3316Smrg with_gnu_ld=yes 75576e7d3316Smrg # version 8.0 and above of icpc choke on multiply defined symbols 75586e7d3316Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 75596e7d3316Smrg # earlier do not add the objects themselves. 75606e7d3316Smrg case `$CC -V 2>&1` in 75616e7d3316Smrg *"Version 7."*) 75626e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75636e7d3316Smrg _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' 75646e7d3316Smrg ;; 75656e7d3316Smrg *) # Version 8.0 or newer 75666e7d3316Smrg tmp_idyn= 75676e7d3316Smrg case $host_cpu in 75686e7d3316Smrg ia64*) tmp_idyn=' -i_dynamic';; 75696e7d3316Smrg esac 75706e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75716e7d3316Smrg _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' 75726e7d3316Smrg ;; 75736e7d3316Smrg esac 75746e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 75756e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75766e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75776e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 75786e7d3316Smrg ;; 75796e7d3316Smrg pgCC* | pgcpp*) 75806e7d3316Smrg # Portland Group C++ compiler 75816e7d3316Smrg case `$CC -V` in 75826e7d3316Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 75836e7d3316Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 75846e7d3316Smrg rm -rf $tpldir~ 75856e7d3316Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 75866e7d3316Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 75876e7d3316Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 75886e7d3316Smrg rm -rf $tpldir~ 75896e7d3316Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 75906e7d3316Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 75916e7d3316Smrg $RANLIB $oldlib' 75926e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 75936e7d3316Smrg rm -rf $tpldir~ 75946e7d3316Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75956e7d3316Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 75966e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 75976e7d3316Smrg rm -rf $tpldir~ 75986e7d3316Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75996e7d3316Smrg $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' 76006e7d3316Smrg ;; 76016e7d3316Smrg *) # Version 6 and above use weak symbols 76026e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 76036e7d3316Smrg _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' 76046e7d3316Smrg ;; 76056e7d3316Smrg esac 7606a966c04fSmrg 76076e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 76086e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76096e7d3316Smrg _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' 76106e7d3316Smrg ;; 76116e7d3316Smrg cxx*) 76126e7d3316Smrg # Compaq C++ 76136e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 76146e7d3316Smrg _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' 7615a966c04fSmrg 76166e7d3316Smrg runpath_var=LD_RUN_PATH 76176e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 76186e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7619a966c04fSmrg 76206e7d3316Smrg # Commands to make compiler produce verbose output that lists 76216e7d3316Smrg # what "hidden" libraries, object files and flags are used when 76226e7d3316Smrg # linking a shared library. 76236e7d3316Smrg # 76246e7d3316Smrg # There doesn't appear to be a way to prevent this compiler from 76256e7d3316Smrg # explicitly linking system object files so we need to strip them 76266e7d3316Smrg # from the output so that they don't get included in the library 76276e7d3316Smrg # dependencies. 76286e7d3316Smrg 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' 76296e7d3316Smrg ;; 76306e7d3316Smrg xl* | mpixl* | bgxl*) 76316e7d3316Smrg # IBM XL 8.0 on PPC, with GNU ld 76326e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76336e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76346e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 76356e7d3316Smrg if test "x$supports_anon_versioning" = xyes; then 76366e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 76376e7d3316Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 76386e7d3316Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 76396e7d3316Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 76406e7d3316Smrg fi 76416e7d3316Smrg ;; 76426e7d3316Smrg *) 76436e7d3316Smrg case `$CC -V 2>&1 | sed 5q` in 76446e7d3316Smrg *Sun\ C*) 76456e7d3316Smrg # Sun C++ 5.9 76466e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 76476e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 76486e7d3316Smrg _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' 76496e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76506e7d3316Smrg _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' 76516e7d3316Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 76526e7d3316Smrg 765397cf2ee2Smrg # Not sure whether something based on 765497cf2ee2Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 765597cf2ee2Smrg # would be better. 765697cf2ee2Smrg output_verbose_link_cmd='func_echo_all' 765797cf2ee2Smrg 765897cf2ee2Smrg # Archives containing C++ object files must be created using 765997cf2ee2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 766097cf2ee2Smrg # necessary to make sure instantiated templates are included 766197cf2ee2Smrg # in the archive. 766297cf2ee2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 766397cf2ee2Smrg ;; 766497cf2ee2Smrg esac 766597cf2ee2Smrg ;; 766697cf2ee2Smrg esac 766797cf2ee2Smrg ;; 766897cf2ee2Smrg 766997cf2ee2Smrg lynxos*) 767097cf2ee2Smrg # FIXME: insert proper C++ library support 767197cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 767297cf2ee2Smrg ;; 767397cf2ee2Smrg 767497cf2ee2Smrg m88k*) 767597cf2ee2Smrg # FIXME: insert proper C++ library support 767697cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 767797cf2ee2Smrg ;; 767897cf2ee2Smrg 767997cf2ee2Smrg mvs*) 768097cf2ee2Smrg case $cc_basename in 768197cf2ee2Smrg cxx*) 768297cf2ee2Smrg # FIXME: insert proper C++ library support 768397cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 768497cf2ee2Smrg ;; 768597cf2ee2Smrg *) 768697cf2ee2Smrg # FIXME: insert proper C++ library support 768797cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 768897cf2ee2Smrg ;; 768997cf2ee2Smrg esac 769097cf2ee2Smrg ;; 769197cf2ee2Smrg 769297cf2ee2Smrg netbsd*) 769397cf2ee2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 769497cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 769597cf2ee2Smrg wlarc= 769697cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 769797cf2ee2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 769897cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 769997cf2ee2Smrg fi 770097cf2ee2Smrg # Workaround some broken pre-1.5 toolchains 770197cf2ee2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 770297cf2ee2Smrg ;; 770397cf2ee2Smrg 770497cf2ee2Smrg *nto* | *qnx*) 770597cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 770697cf2ee2Smrg ;; 770797cf2ee2Smrg 770897cf2ee2Smrg openbsd2*) 770997cf2ee2Smrg # C++ shared libraries are fairly broken 771097cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 771197cf2ee2Smrg ;; 771297cf2ee2Smrg 771397cf2ee2Smrg openbsd*) 771497cf2ee2Smrg if test -f /usr/libexec/ld.so; then 771597cf2ee2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 771697cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 771797cf2ee2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 771897cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 771997cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 772097cf2ee2Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 772197cf2ee2Smrg _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' 772297cf2ee2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 772397cf2ee2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 772497cf2ee2Smrg fi 772597cf2ee2Smrg output_verbose_link_cmd=func_echo_all 772697cf2ee2Smrg else 772797cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 772897cf2ee2Smrg fi 772997cf2ee2Smrg ;; 773097cf2ee2Smrg 773197cf2ee2Smrg osf3* | osf4* | osf5*) 773297cf2ee2Smrg case $cc_basename in 773397cf2ee2Smrg KCC*) 773497cf2ee2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 773597cf2ee2Smrg 773697cf2ee2Smrg # KCC will only create a shared library if the output file 773797cf2ee2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 773897cf2ee2Smrg # to its proper name (with version) after linking. 773997cf2ee2Smrg _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' 774097cf2ee2Smrg 774197cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 774297cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 774397cf2ee2Smrg 774497cf2ee2Smrg # Archives containing C++ object files must be created using 774597cf2ee2Smrg # the KAI C++ compiler. 774697cf2ee2Smrg case $host in 774797cf2ee2Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 774897cf2ee2Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 774997cf2ee2Smrg esac 775097cf2ee2Smrg ;; 775197cf2ee2Smrg RCC*) 775297cf2ee2Smrg # Rational C++ 2.4.1 775397cf2ee2Smrg # FIXME: insert proper C++ library support 775497cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 775597cf2ee2Smrg ;; 775697cf2ee2Smrg cxx*) 775797cf2ee2Smrg case $host in 775897cf2ee2Smrg osf3*) 775997cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 776097cf2ee2Smrg _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' 776197cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 776297cf2ee2Smrg ;; 776397cf2ee2Smrg *) 776497cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 776597cf2ee2Smrg _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' 776697cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 776797cf2ee2Smrg echo "-hidden">> $lib.exp~ 776897cf2ee2Smrg $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~ 776997cf2ee2Smrg $RM $lib.exp' 777097cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 777197cf2ee2Smrg ;; 777297cf2ee2Smrg esac 777397cf2ee2Smrg 777497cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 777597cf2ee2Smrg 777697cf2ee2Smrg # Commands to make compiler produce verbose output that lists 777797cf2ee2Smrg # what "hidden" libraries, object files and flags are used when 777897cf2ee2Smrg # linking a shared library. 777997cf2ee2Smrg # 778097cf2ee2Smrg # There doesn't appear to be a way to prevent this compiler from 778197cf2ee2Smrg # explicitly linking system object files so we need to strip them 778297cf2ee2Smrg # from the output so that they don't get included in the library 778397cf2ee2Smrg # dependencies. 778497cf2ee2Smrg 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"' 778597cf2ee2Smrg ;; 778697cf2ee2Smrg *) 778797cf2ee2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 778897cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 778997cf2ee2Smrg case $host in 779097cf2ee2Smrg osf3*) 779197cf2ee2Smrg _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' 779297cf2ee2Smrg ;; 779397cf2ee2Smrg *) 779497cf2ee2Smrg _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' 779597cf2ee2Smrg ;; 779697cf2ee2Smrg esac 779797cf2ee2Smrg 779897cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 779997cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 780097cf2ee2Smrg 780197cf2ee2Smrg # Commands to make compiler produce verbose output that lists 780297cf2ee2Smrg # what "hidden" libraries, object files and flags are used when 780397cf2ee2Smrg # linking a shared library. 780497cf2ee2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 780597cf2ee2Smrg 780697cf2ee2Smrg else 780797cf2ee2Smrg # FIXME: insert proper C++ library support 780897cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 780997cf2ee2Smrg fi 781097cf2ee2Smrg ;; 781197cf2ee2Smrg esac 781297cf2ee2Smrg ;; 781397cf2ee2Smrg 781497cf2ee2Smrg psos*) 781597cf2ee2Smrg # FIXME: insert proper C++ library support 781697cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 781797cf2ee2Smrg ;; 781897cf2ee2Smrg 781997cf2ee2Smrg sunos4*) 782097cf2ee2Smrg case $cc_basename in 782197cf2ee2Smrg CC*) 782297cf2ee2Smrg # Sun C++ 4.x 782397cf2ee2Smrg # FIXME: insert proper C++ library support 782497cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 782597cf2ee2Smrg ;; 782697cf2ee2Smrg lcc*) 782797cf2ee2Smrg # Lucid 782897cf2ee2Smrg # FIXME: insert proper C++ library support 782997cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 783097cf2ee2Smrg ;; 783197cf2ee2Smrg *) 783297cf2ee2Smrg # FIXME: insert proper C++ library support 783397cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 783497cf2ee2Smrg ;; 783597cf2ee2Smrg esac 783697cf2ee2Smrg ;; 783797cf2ee2Smrg 783897cf2ee2Smrg solaris*) 783997cf2ee2Smrg case $cc_basename in 784097cf2ee2Smrg CC* | sunCC*) 784197cf2ee2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 784297cf2ee2Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 784397cf2ee2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 784497cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 784597cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 784697cf2ee2Smrg $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' 784797cf2ee2Smrg 784897cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 784997cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 785097cf2ee2Smrg case $host_os in 785197cf2ee2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 785297cf2ee2Smrg *) 785397cf2ee2Smrg # The compiler driver will combine and reorder linker options, 785497cf2ee2Smrg # but understands `-z linker_flag'. 785597cf2ee2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 785697cf2ee2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 785797cf2ee2Smrg ;; 785897cf2ee2Smrg esac 785997cf2ee2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 786097cf2ee2Smrg 786197cf2ee2Smrg output_verbose_link_cmd='func_echo_all' 786297cf2ee2Smrg 786397cf2ee2Smrg # Archives containing C++ object files must be created using 786497cf2ee2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 786597cf2ee2Smrg # necessary to make sure instantiated templates are included 786697cf2ee2Smrg # in the archive. 786797cf2ee2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 786897cf2ee2Smrg ;; 786997cf2ee2Smrg gcx*) 787097cf2ee2Smrg # Green Hills C++ Compiler 787197cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 787297cf2ee2Smrg 787397cf2ee2Smrg # The C++ compiler must be used to create the archive. 787497cf2ee2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 787597cf2ee2Smrg ;; 787697cf2ee2Smrg *) 787797cf2ee2Smrg # GNU C++ compiler with Solaris linker 787897cf2ee2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 787997cf2ee2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 788097cf2ee2Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 788197cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 788297cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 788397cf2ee2Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 788497cf2ee2Smrg 788597cf2ee2Smrg # Commands to make compiler produce verbose output that lists 788697cf2ee2Smrg # what "hidden" libraries, object files and flags are used when 788797cf2ee2Smrg # linking a shared library. 788897cf2ee2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 788997cf2ee2Smrg else 789097cf2ee2Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 789197cf2ee2Smrg # platform. 789297cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 789397cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 789497cf2ee2Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 789597cf2ee2Smrg 789697cf2ee2Smrg # Commands to make compiler produce verbose output that lists 789797cf2ee2Smrg # what "hidden" libraries, object files and flags are used when 789897cf2ee2Smrg # linking a shared library. 789997cf2ee2Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 790097cf2ee2Smrg fi 790197cf2ee2Smrg 790297cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 790397cf2ee2Smrg case $host_os in 790497cf2ee2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 790597cf2ee2Smrg *) 790697cf2ee2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 790797cf2ee2Smrg ;; 790897cf2ee2Smrg esac 790997cf2ee2Smrg fi 791097cf2ee2Smrg ;; 791197cf2ee2Smrg esac 791297cf2ee2Smrg ;; 791397cf2ee2Smrg 791497cf2ee2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 791597cf2ee2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 791697cf2ee2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 791797cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 791897cf2ee2Smrg runpath_var='LD_RUN_PATH' 791997cf2ee2Smrg 792097cf2ee2Smrg case $cc_basename in 792197cf2ee2Smrg CC*) 792297cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 792397cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 792497cf2ee2Smrg ;; 792597cf2ee2Smrg *) 792697cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 792797cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 792897cf2ee2Smrg ;; 792997cf2ee2Smrg esac 793097cf2ee2Smrg ;; 793197cf2ee2Smrg 793297cf2ee2Smrg sysv5* | sco3.2v5* | sco5v6*) 793397cf2ee2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 793497cf2ee2Smrg # link with -lc, and that would cause any symbols used from libc to 793597cf2ee2Smrg # always be unresolved, which means just about no library would 793697cf2ee2Smrg # ever link correctly. If we're not using GNU ld we use -z text 793797cf2ee2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 793897cf2ee2Smrg # as -z defs. 793997cf2ee2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 794097cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 794197cf2ee2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 794297cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 794397cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 794497cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 794597cf2ee2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 794697cf2ee2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 794797cf2ee2Smrg runpath_var='LD_RUN_PATH' 794897cf2ee2Smrg 794997cf2ee2Smrg case $cc_basename in 795097cf2ee2Smrg CC*) 795197cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 795297cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 795397cf2ee2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 795497cf2ee2Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 795597cf2ee2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 795697cf2ee2Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 795797cf2ee2Smrg ;; 795897cf2ee2Smrg *) 795997cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 796097cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 796197cf2ee2Smrg ;; 796297cf2ee2Smrg esac 796397cf2ee2Smrg ;; 796497cf2ee2Smrg 796597cf2ee2Smrg tandem*) 796697cf2ee2Smrg case $cc_basename in 796797cf2ee2Smrg NCC*) 796897cf2ee2Smrg # NonStop-UX NCC 3.20 796997cf2ee2Smrg # FIXME: insert proper C++ library support 797097cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 797197cf2ee2Smrg ;; 797297cf2ee2Smrg *) 797397cf2ee2Smrg # FIXME: insert proper C++ library support 797497cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 797597cf2ee2Smrg ;; 797697cf2ee2Smrg esac 797797cf2ee2Smrg ;; 797897cf2ee2Smrg 797997cf2ee2Smrg vxworks*) 798097cf2ee2Smrg # FIXME: insert proper C++ library support 798197cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 798297cf2ee2Smrg ;; 798397cf2ee2Smrg 798497cf2ee2Smrg *) 798597cf2ee2Smrg # FIXME: insert proper C++ library support 798697cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 798797cf2ee2Smrg ;; 798897cf2ee2Smrg esac 798997cf2ee2Smrg 799097cf2ee2Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 799197cf2ee2Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 799297cf2ee2Smrg 799397cf2ee2Smrg _LT_TAGVAR(GCC, $1)="$GXX" 799497cf2ee2Smrg _LT_TAGVAR(LD, $1)="$LD" 799597cf2ee2Smrg 799697cf2ee2Smrg ## CAVEAT EMPTOR: 799797cf2ee2Smrg ## There is no encapsulation within the following macros, do not change 799897cf2ee2Smrg ## the running order or otherwise move them around unless you know exactly 799997cf2ee2Smrg ## what you are doing... 800097cf2ee2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 800197cf2ee2Smrg _LT_COMPILER_PIC($1) 800297cf2ee2Smrg _LT_COMPILER_C_O($1) 800397cf2ee2Smrg _LT_COMPILER_FILE_LOCKS($1) 800497cf2ee2Smrg _LT_LINKER_SHLIBS($1) 800597cf2ee2Smrg _LT_SYS_DYNAMIC_LINKER($1) 800697cf2ee2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 800797cf2ee2Smrg 800897cf2ee2Smrg _LT_CONFIG($1) 800997cf2ee2Smrg fi # test -n "$compiler" 801097cf2ee2Smrg 801197cf2ee2Smrg CC=$lt_save_CC 801297cf2ee2Smrg CFLAGS=$lt_save_CFLAGS 801397cf2ee2Smrg LDCXX=$LD 801497cf2ee2Smrg LD=$lt_save_LD 801597cf2ee2Smrg GCC=$lt_save_GCC 801697cf2ee2Smrg with_gnu_ld=$lt_save_with_gnu_ld 801797cf2ee2Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 801897cf2ee2Smrg lt_cv_path_LD=$lt_save_path_LD 801997cf2ee2Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 802097cf2ee2Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 802197cf2ee2Smrgfi # test "$_lt_caught_CXX_error" != yes 802297cf2ee2Smrg 802397cf2ee2SmrgAC_LANG_POP 802497cf2ee2Smrg])# _LT_LANG_CXX_CONFIG 802597cf2ee2Smrg 802697cf2ee2Smrg 802797cf2ee2Smrg# _LT_FUNC_STRIPNAME_CNF 802897cf2ee2Smrg# ---------------------- 802997cf2ee2Smrg# func_stripname_cnf prefix suffix name 803097cf2ee2Smrg# strip PREFIX and SUFFIX off of NAME. 803197cf2ee2Smrg# PREFIX and SUFFIX must not contain globbing or regex special 803297cf2ee2Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 803397cf2ee2Smrg# dot (in which case that matches only a dot). 803497cf2ee2Smrg# 803597cf2ee2Smrg# This function is identical to the (non-XSI) version of func_stripname, 803697cf2ee2Smrg# except this one can be used by m4 code that may be executed by configure, 803797cf2ee2Smrg# rather than the libtool script. 803897cf2ee2Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 803997cf2ee2SmrgAC_REQUIRE([_LT_DECL_SED]) 804097cf2ee2SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 804197cf2ee2Smrgfunc_stripname_cnf () 804297cf2ee2Smrg{ 804397cf2ee2Smrg case ${2} in 804497cf2ee2Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 804597cf2ee2Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 804697cf2ee2Smrg esac 804797cf2ee2Smrg} # func_stripname_cnf 804897cf2ee2Smrg])# _LT_FUNC_STRIPNAME_CNF 804997cf2ee2Smrg 805097cf2ee2Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 805197cf2ee2Smrg# --------------------------------- 805297cf2ee2Smrg# Figure out "hidden" library dependencies from verbose 805397cf2ee2Smrg# compiler output when linking a shared library. 805497cf2ee2Smrg# Parse the compiler output and extract the necessary 805597cf2ee2Smrg# objects, libraries and library flags. 805697cf2ee2Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 805797cf2ee2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 805897cf2ee2SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 805997cf2ee2Smrg# Dependencies to place before and after the object being linked: 806097cf2ee2Smrg_LT_TAGVAR(predep_objects, $1)= 806197cf2ee2Smrg_LT_TAGVAR(postdep_objects, $1)= 806297cf2ee2Smrg_LT_TAGVAR(predeps, $1)= 806397cf2ee2Smrg_LT_TAGVAR(postdeps, $1)= 806497cf2ee2Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 806597cf2ee2Smrg 806697cf2ee2Smrgdnl we can't use the lt_simple_compile_test_code here, 806797cf2ee2Smrgdnl because it contains code intended for an executable, 806897cf2ee2Smrgdnl not a library. It's possible we should let each 806997cf2ee2Smrgdnl tag define a new lt_????_link_test_code variable, 807097cf2ee2Smrgdnl but it's only used here... 807197cf2ee2Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 807297cf2ee2Smrgint a; 807397cf2ee2Smrgvoid foo (void) { a = 0; } 807497cf2ee2Smrg_LT_EOF 807597cf2ee2Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 807697cf2ee2Smrgclass Foo 807797cf2ee2Smrg{ 807897cf2ee2Smrgpublic: 807997cf2ee2Smrg Foo (void) { a = 0; } 808097cf2ee2Smrgprivate: 808197cf2ee2Smrg int a; 808297cf2ee2Smrg}; 808397cf2ee2Smrg_LT_EOF 808497cf2ee2Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 808597cf2ee2Smrg subroutine foo 808697cf2ee2Smrg implicit none 808797cf2ee2Smrg integer*4 a 808897cf2ee2Smrg a=0 808997cf2ee2Smrg return 809097cf2ee2Smrg end 809197cf2ee2Smrg_LT_EOF 809297cf2ee2Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 809397cf2ee2Smrg subroutine foo 809497cf2ee2Smrg implicit none 809597cf2ee2Smrg integer a 809697cf2ee2Smrg a=0 809797cf2ee2Smrg return 809897cf2ee2Smrg end 809997cf2ee2Smrg_LT_EOF 810097cf2ee2Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 810197cf2ee2Smrgpublic class foo { 810297cf2ee2Smrg private int a; 810397cf2ee2Smrg public void bar (void) { 810497cf2ee2Smrg a = 0; 810597cf2ee2Smrg } 810697cf2ee2Smrg}; 810797cf2ee2Smrg_LT_EOF 8108ac92798bSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 8109ac92798bSmrgpackage foo 8110ac92798bSmrgfunc foo() { 8111ac92798bSmrg} 8112ac92798bSmrg_LT_EOF 811397cf2ee2Smrg]) 811497cf2ee2Smrg 811597cf2ee2Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 811697cf2ee2Smrgcase "$CC $CFLAGS " in #( 811797cf2ee2Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 811897cf2ee2Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8119ac92798bSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 812097cf2ee2Smrgesac 812197cf2ee2Smrg 812297cf2ee2Smrgdnl Parse the compiler output and extract the necessary 812397cf2ee2Smrgdnl objects, libraries and library flags. 812497cf2ee2Smrgif AC_TRY_EVAL(ac_compile); then 812597cf2ee2Smrg # Parse the compiler output and extract the necessary 812697cf2ee2Smrg # objects, libraries and library flags. 812797cf2ee2Smrg 812897cf2ee2Smrg # Sentinel used to keep track of whether or not we are before 812997cf2ee2Smrg # the conftest object file. 813097cf2ee2Smrg pre_test_object_deps_done=no 813197cf2ee2Smrg 813297cf2ee2Smrg for p in `eval "$output_verbose_link_cmd"`; do 813397cf2ee2Smrg case ${prev}${p} in 813497cf2ee2Smrg 813597cf2ee2Smrg -L* | -R* | -l*) 813697cf2ee2Smrg # Some compilers place space between "-{L,R}" and the path. 813797cf2ee2Smrg # Remove the space. 813897cf2ee2Smrg if test $p = "-L" || 813997cf2ee2Smrg test $p = "-R"; then 814097cf2ee2Smrg prev=$p 814197cf2ee2Smrg continue 814297cf2ee2Smrg fi 814397cf2ee2Smrg 814497cf2ee2Smrg # Expand the sysroot to ease extracting the directories later. 814597cf2ee2Smrg if test -z "$prev"; then 814697cf2ee2Smrg case $p in 814797cf2ee2Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 814897cf2ee2Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 814997cf2ee2Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 815097cf2ee2Smrg esac 815197cf2ee2Smrg fi 815297cf2ee2Smrg case $p in 815397cf2ee2Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 815497cf2ee2Smrg esac 815597cf2ee2Smrg if test "$pre_test_object_deps_done" = no; then 815697cf2ee2Smrg case ${prev} in 815797cf2ee2Smrg -L | -R) 815897cf2ee2Smrg # Internal compiler library paths should come after those 815997cf2ee2Smrg # provided the user. The postdeps already come after the 816097cf2ee2Smrg # user supplied libs so there is no need to process them. 816197cf2ee2Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 816297cf2ee2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 816397cf2ee2Smrg else 816497cf2ee2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 816597cf2ee2Smrg fi 816697cf2ee2Smrg ;; 816797cf2ee2Smrg # The "-l" case would never come before the object being 816897cf2ee2Smrg # linked, so don't bother handling this case. 816997cf2ee2Smrg esac 817097cf2ee2Smrg else 817197cf2ee2Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 817297cf2ee2Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 817397cf2ee2Smrg else 817497cf2ee2Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 817597cf2ee2Smrg fi 817697cf2ee2Smrg fi 817797cf2ee2Smrg prev= 817897cf2ee2Smrg ;; 817997cf2ee2Smrg 818097cf2ee2Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 818197cf2ee2Smrg *.$objext) 818297cf2ee2Smrg # This assumes that the test object file only shows up 818397cf2ee2Smrg # once in the compiler output. 818497cf2ee2Smrg if test "$p" = "conftest.$objext"; then 818597cf2ee2Smrg pre_test_object_deps_done=yes 818697cf2ee2Smrg continue 818797cf2ee2Smrg fi 818897cf2ee2Smrg 818997cf2ee2Smrg if test "$pre_test_object_deps_done" = no; then 819097cf2ee2Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 819197cf2ee2Smrg _LT_TAGVAR(predep_objects, $1)="$p" 819297cf2ee2Smrg else 819397cf2ee2Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 819497cf2ee2Smrg fi 819597cf2ee2Smrg else 819697cf2ee2Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 819797cf2ee2Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 819897cf2ee2Smrg else 819997cf2ee2Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 820097cf2ee2Smrg fi 820197cf2ee2Smrg fi 820297cf2ee2Smrg ;; 82036e7d3316Smrg 820497cf2ee2Smrg *) ;; # Ignore the rest. 8205a966c04fSmrg 820697cf2ee2Smrg esac 820797cf2ee2Smrg done 8208a966c04fSmrg 820997cf2ee2Smrg # Clean up. 821097cf2ee2Smrg rm -f a.out a.exe 821197cf2ee2Smrgelse 821297cf2ee2Smrg echo "libtool.m4: error: problem compiling $1 test program" 821397cf2ee2Smrgfi 8214a966c04fSmrg 821597cf2ee2Smrg$RM -f confest.$objext 821697cf2ee2SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 8217a966c04fSmrg 821897cf2ee2Smrg# PORTME: override above test on systems where it is broken 821997cf2ee2Smrgm4_if([$1], [CXX], 822097cf2ee2Smrg[case $host_os in 822197cf2ee2Smrginterix[[3-9]]*) 822297cf2ee2Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 822397cf2ee2Smrg # hack all around it, let's just trust "g++" to DTRT. 822497cf2ee2Smrg _LT_TAGVAR(predep_objects,$1)= 822597cf2ee2Smrg _LT_TAGVAR(postdep_objects,$1)= 822697cf2ee2Smrg _LT_TAGVAR(postdeps,$1)= 822797cf2ee2Smrg ;; 8228a966c04fSmrg 822997cf2ee2Smrglinux*) 823097cf2ee2Smrg case `$CC -V 2>&1 | sed 5q` in 823197cf2ee2Smrg *Sun\ C*) 823297cf2ee2Smrg # Sun C++ 5.9 8233a966c04fSmrg 823497cf2ee2Smrg # The more standards-conforming stlport4 library is 823597cf2ee2Smrg # incompatible with the Cstd library. Avoid specifying 823697cf2ee2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 823797cf2ee2Smrg # -library=stlport4 depends on it. 823897cf2ee2Smrg case " $CXX $CXXFLAGS " in 823997cf2ee2Smrg *" -library=stlport4 "*) 824097cf2ee2Smrg solaris_use_stlport4=yes 824197cf2ee2Smrg ;; 824297cf2ee2Smrg esac 8243a966c04fSmrg 824497cf2ee2Smrg if test "$solaris_use_stlport4" != yes; then 824597cf2ee2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 824697cf2ee2Smrg fi 824797cf2ee2Smrg ;; 824897cf2ee2Smrg esac 824997cf2ee2Smrg ;; 8250a966c04fSmrg 825197cf2ee2Smrgsolaris*) 825297cf2ee2Smrg case $cc_basename in 825397cf2ee2Smrg CC* | sunCC*) 825497cf2ee2Smrg # The more standards-conforming stlport4 library is 825597cf2ee2Smrg # incompatible with the Cstd library. Avoid specifying 825697cf2ee2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 825797cf2ee2Smrg # -library=stlport4 depends on it. 825897cf2ee2Smrg case " $CXX $CXXFLAGS " in 825997cf2ee2Smrg *" -library=stlport4 "*) 826097cf2ee2Smrg solaris_use_stlport4=yes 826197cf2ee2Smrg ;; 826297cf2ee2Smrg esac 82636e7d3316Smrg 826497cf2ee2Smrg # Adding this requires a known-good setup of shared libraries for 826597cf2ee2Smrg # Sun compiler versions before 5.6, else PIC objects from an old 826697cf2ee2Smrg # archive will be linked into the output, leading to subtle bugs. 826797cf2ee2Smrg if test "$solaris_use_stlport4" != yes; then 826897cf2ee2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 826997cf2ee2Smrg fi 827097cf2ee2Smrg ;; 827197cf2ee2Smrg esac 827297cf2ee2Smrg ;; 827397cf2ee2Smrgesac 827497cf2ee2Smrg]) 82756e7d3316Smrg 827697cf2ee2Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 827797cf2ee2Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 827897cf2ee2Smrgesac 827997cf2ee2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 828097cf2ee2Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 828197cf2ee2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 828297cf2ee2Smrgfi 828397cf2ee2Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 828497cf2ee2Smrg [The directories searched by this compiler when creating a shared library]) 828597cf2ee2Smrg_LT_TAGDECL([], [predep_objects], [1], 828697cf2ee2Smrg [Dependencies to place before and after the objects being linked to 828797cf2ee2Smrg create a shared library]) 828897cf2ee2Smrg_LT_TAGDECL([], [postdep_objects], [1]) 828997cf2ee2Smrg_LT_TAGDECL([], [predeps], [1]) 829097cf2ee2Smrg_LT_TAGDECL([], [postdeps], [1]) 829197cf2ee2Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 829297cf2ee2Smrg [The library search path used internally by the compiler when linking 829397cf2ee2Smrg a shared library]) 829497cf2ee2Smrg])# _LT_SYS_HIDDEN_LIBDEPS 82956e7d3316Smrg 8296a966c04fSmrg 829797cf2ee2Smrg# _LT_LANG_F77_CONFIG([TAG]) 829897cf2ee2Smrg# -------------------------- 829997cf2ee2Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 830097cf2ee2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 830197cf2ee2Smrg# to write the compiler configuration to `libtool'. 830297cf2ee2Smrgm4_defun([_LT_LANG_F77_CONFIG], 830397cf2ee2Smrg[AC_LANG_PUSH(Fortran 77) 830497cf2ee2Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 830597cf2ee2Smrg _lt_disable_F77=yes 830697cf2ee2Smrgfi 830797cf2ee2Smrg 830897cf2ee2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 830997cf2ee2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 831097cf2ee2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 831197cf2ee2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 831297cf2ee2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 831397cf2ee2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 831497cf2ee2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 831597cf2ee2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 831697cf2ee2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 831797cf2ee2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 831897cf2ee2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 831997cf2ee2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 832097cf2ee2Smrg_LT_TAGVAR(module_cmds, $1)= 832197cf2ee2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 832297cf2ee2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 832397cf2ee2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 832497cf2ee2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 832597cf2ee2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 832697cf2ee2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 832797cf2ee2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 832897cf2ee2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 832997cf2ee2Smrg 833097cf2ee2Smrg# Source file extension for f77 test sources. 833197cf2ee2Smrgac_ext=f 833297cf2ee2Smrg 833397cf2ee2Smrg# Object file extension for compiled f77 test sources. 833497cf2ee2Smrgobjext=o 833597cf2ee2Smrg_LT_TAGVAR(objext, $1)=$objext 833697cf2ee2Smrg 833797cf2ee2Smrg# No sense in running all these tests if we already determined that 833897cf2ee2Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 833997cf2ee2Smrg# are currently assumed to apply to all compilers on this platform, 834097cf2ee2Smrg# and will be corrupted by setting them based on a non-working compiler. 834197cf2ee2Smrgif test "$_lt_disable_F77" != yes; then 834297cf2ee2Smrg # Code to be used in simple compile tests 834397cf2ee2Smrg lt_simple_compile_test_code="\ 834497cf2ee2Smrg subroutine t 834597cf2ee2Smrg return 834697cf2ee2Smrg end 834797cf2ee2Smrg" 834897cf2ee2Smrg 834997cf2ee2Smrg # Code to be used in simple link tests 835097cf2ee2Smrg lt_simple_link_test_code="\ 835197cf2ee2Smrg program t 835297cf2ee2Smrg end 835397cf2ee2Smrg" 8354a966c04fSmrg 835597cf2ee2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 835697cf2ee2Smrg _LT_TAG_COMPILER 83576e7d3316Smrg 835897cf2ee2Smrg # save warnings/boilerplate of simple test code 835997cf2ee2Smrg _LT_COMPILER_BOILERPLATE 836097cf2ee2Smrg _LT_LINKER_BOILERPLATE 83616e7d3316Smrg 836297cf2ee2Smrg # Allow CC to be a program name with arguments. 836397cf2ee2Smrg lt_save_CC="$CC" 836497cf2ee2Smrg lt_save_GCC=$GCC 836597cf2ee2Smrg lt_save_CFLAGS=$CFLAGS 836697cf2ee2Smrg CC=${F77-"f77"} 836797cf2ee2Smrg CFLAGS=$FFLAGS 836897cf2ee2Smrg compiler=$CC 836997cf2ee2Smrg _LT_TAGVAR(compiler, $1)=$CC 837097cf2ee2Smrg _LT_CC_BASENAME([$compiler]) 837197cf2ee2Smrg GCC=$G77 837297cf2ee2Smrg if test -n "$compiler"; then 837397cf2ee2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 837497cf2ee2Smrg AC_MSG_RESULT([$can_build_shared]) 83756e7d3316Smrg 837697cf2ee2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 837797cf2ee2Smrg test "$can_build_shared" = "no" && enable_shared=no 8378a966c04fSmrg 837997cf2ee2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 838097cf2ee2Smrg # are all built from PIC. 838197cf2ee2Smrg case $host_os in 838297cf2ee2Smrg aix3*) 838397cf2ee2Smrg test "$enable_shared" = yes && enable_static=no 838497cf2ee2Smrg if test -n "$RANLIB"; then 838597cf2ee2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 838697cf2ee2Smrg postinstall_cmds='$RANLIB $lib' 838797cf2ee2Smrg fi 83886e7d3316Smrg ;; 838997cf2ee2Smrg aix[[4-9]]*) 839097cf2ee2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 839197cf2ee2Smrg test "$enable_shared" = yes && enable_static=no 839297cf2ee2Smrg fi 83936e7d3316Smrg ;; 839497cf2ee2Smrg esac 839597cf2ee2Smrg AC_MSG_RESULT([$enable_shared]) 8396a966c04fSmrg 839797cf2ee2Smrg AC_MSG_CHECKING([whether to build static libraries]) 839897cf2ee2Smrg # Make sure either enable_shared or enable_static is yes. 839997cf2ee2Smrg test "$enable_shared" = yes || enable_static=yes 840097cf2ee2Smrg AC_MSG_RESULT([$enable_static]) 84016e7d3316Smrg 840297cf2ee2Smrg _LT_TAGVAR(GCC, $1)="$G77" 840397cf2ee2Smrg _LT_TAGVAR(LD, $1)="$LD" 8404a966c04fSmrg 840597cf2ee2Smrg ## CAVEAT EMPTOR: 840697cf2ee2Smrg ## There is no encapsulation within the following macros, do not change 840797cf2ee2Smrg ## the running order or otherwise move them around unless you know exactly 840897cf2ee2Smrg ## what you are doing... 840997cf2ee2Smrg _LT_COMPILER_PIC($1) 841097cf2ee2Smrg _LT_COMPILER_C_O($1) 841197cf2ee2Smrg _LT_COMPILER_FILE_LOCKS($1) 841297cf2ee2Smrg _LT_LINKER_SHLIBS($1) 841397cf2ee2Smrg _LT_SYS_DYNAMIC_LINKER($1) 841497cf2ee2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8415a966c04fSmrg 841697cf2ee2Smrg _LT_CONFIG($1) 841797cf2ee2Smrg fi # test -n "$compiler" 8418a966c04fSmrg 841997cf2ee2Smrg GCC=$lt_save_GCC 842097cf2ee2Smrg CC="$lt_save_CC" 842197cf2ee2Smrg CFLAGS="$lt_save_CFLAGS" 842297cf2ee2Smrgfi # test "$_lt_disable_F77" != yes 84236e7d3316Smrg 842497cf2ee2SmrgAC_LANG_POP 842597cf2ee2Smrg])# _LT_LANG_F77_CONFIG 84266e7d3316Smrg 84276e7d3316Smrg 842897cf2ee2Smrg# _LT_LANG_FC_CONFIG([TAG]) 842997cf2ee2Smrg# ------------------------- 843097cf2ee2Smrg# Ensure that the configuration variables for a Fortran compiler are 843197cf2ee2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 843297cf2ee2Smrg# to write the compiler configuration to `libtool'. 843397cf2ee2Smrgm4_defun([_LT_LANG_FC_CONFIG], 843497cf2ee2Smrg[AC_LANG_PUSH(Fortran) 8435a966c04fSmrg 843697cf2ee2Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 843797cf2ee2Smrg _lt_disable_FC=yes 843897cf2ee2Smrgfi 8439a966c04fSmrg 844097cf2ee2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 844197cf2ee2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 844297cf2ee2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 844397cf2ee2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 844497cf2ee2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 844597cf2ee2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 844697cf2ee2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 844797cf2ee2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 844897cf2ee2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 844997cf2ee2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 845097cf2ee2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 845197cf2ee2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 845297cf2ee2Smrg_LT_TAGVAR(module_cmds, $1)= 845397cf2ee2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 845497cf2ee2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 845597cf2ee2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 845697cf2ee2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 845797cf2ee2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 845897cf2ee2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 845997cf2ee2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 846097cf2ee2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 846197cf2ee2Smrg 846297cf2ee2Smrg# Source file extension for fc test sources. 846397cf2ee2Smrgac_ext=${ac_fc_srcext-f} 846497cf2ee2Smrg 846597cf2ee2Smrg# Object file extension for compiled fc test sources. 846697cf2ee2Smrgobjext=o 846797cf2ee2Smrg_LT_TAGVAR(objext, $1)=$objext 846897cf2ee2Smrg 846997cf2ee2Smrg# No sense in running all these tests if we already determined that 847097cf2ee2Smrg# the FC compiler isn't working. Some variables (like enable_shared) 847197cf2ee2Smrg# are currently assumed to apply to all compilers on this platform, 847297cf2ee2Smrg# and will be corrupted by setting them based on a non-working compiler. 847397cf2ee2Smrgif test "$_lt_disable_FC" != yes; then 847497cf2ee2Smrg # Code to be used in simple compile tests 847597cf2ee2Smrg lt_simple_compile_test_code="\ 847697cf2ee2Smrg subroutine t 847797cf2ee2Smrg return 847897cf2ee2Smrg end 847997cf2ee2Smrg" 848097cf2ee2Smrg 848197cf2ee2Smrg # Code to be used in simple link tests 848297cf2ee2Smrg lt_simple_link_test_code="\ 848397cf2ee2Smrg program t 848497cf2ee2Smrg end 848597cf2ee2Smrg" 848697cf2ee2Smrg 848797cf2ee2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 848897cf2ee2Smrg _LT_TAG_COMPILER 8489a966c04fSmrg 849097cf2ee2Smrg # save warnings/boilerplate of simple test code 849197cf2ee2Smrg _LT_COMPILER_BOILERPLATE 849297cf2ee2Smrg _LT_LINKER_BOILERPLATE 8493a966c04fSmrg 849497cf2ee2Smrg # Allow CC to be a program name with arguments. 849597cf2ee2Smrg lt_save_CC="$CC" 849697cf2ee2Smrg lt_save_GCC=$GCC 849797cf2ee2Smrg lt_save_CFLAGS=$CFLAGS 849897cf2ee2Smrg CC=${FC-"f95"} 849997cf2ee2Smrg CFLAGS=$FCFLAGS 850097cf2ee2Smrg compiler=$CC 850197cf2ee2Smrg GCC=$ac_cv_fc_compiler_gnu 8502a966c04fSmrg 850397cf2ee2Smrg _LT_TAGVAR(compiler, $1)=$CC 850497cf2ee2Smrg _LT_CC_BASENAME([$compiler]) 8505a966c04fSmrg 850697cf2ee2Smrg if test -n "$compiler"; then 850797cf2ee2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 850897cf2ee2Smrg AC_MSG_RESULT([$can_build_shared]) 8509a966c04fSmrg 851097cf2ee2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 851197cf2ee2Smrg test "$can_build_shared" = "no" && enable_shared=no 851297cf2ee2Smrg 851397cf2ee2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 851497cf2ee2Smrg # are all built from PIC. 851597cf2ee2Smrg case $host_os in 851697cf2ee2Smrg aix3*) 851797cf2ee2Smrg test "$enable_shared" = yes && enable_static=no 851897cf2ee2Smrg if test -n "$RANLIB"; then 851997cf2ee2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 852097cf2ee2Smrg postinstall_cmds='$RANLIB $lib' 852197cf2ee2Smrg fi 852297cf2ee2Smrg ;; 852397cf2ee2Smrg aix[[4-9]]*) 852497cf2ee2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 852597cf2ee2Smrg test "$enable_shared" = yes && enable_static=no 852697cf2ee2Smrg fi 85276e7d3316Smrg ;; 85286e7d3316Smrg esac 852997cf2ee2Smrg AC_MSG_RESULT([$enable_shared]) 8530a966c04fSmrg 853197cf2ee2Smrg AC_MSG_CHECKING([whether to build static libraries]) 853297cf2ee2Smrg # Make sure either enable_shared or enable_static is yes. 853397cf2ee2Smrg test "$enable_shared" = yes || enable_static=yes 853497cf2ee2Smrg AC_MSG_RESULT([$enable_static]) 85356e7d3316Smrg 853697cf2ee2Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 85376e7d3316Smrg _LT_TAGVAR(LD, $1)="$LD" 85386e7d3316Smrg 85396e7d3316Smrg ## CAVEAT EMPTOR: 85406e7d3316Smrg ## There is no encapsulation within the following macros, do not change 85416e7d3316Smrg ## the running order or otherwise move them around unless you know exactly 85426e7d3316Smrg ## what you are doing... 85436e7d3316Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 85446e7d3316Smrg _LT_COMPILER_PIC($1) 85456e7d3316Smrg _LT_COMPILER_C_O($1) 85466e7d3316Smrg _LT_COMPILER_FILE_LOCKS($1) 85476e7d3316Smrg _LT_LINKER_SHLIBS($1) 85486e7d3316Smrg _LT_SYS_DYNAMIC_LINKER($1) 85496e7d3316Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 85506e7d3316Smrg 855197cf2ee2Smrg _LT_CONFIG($1) 855297cf2ee2Smrg fi # test -n "$compiler" 855397cf2ee2Smrg 855497cf2ee2Smrg GCC=$lt_save_GCC 855597cf2ee2Smrg CC=$lt_save_CC 855697cf2ee2Smrg CFLAGS=$lt_save_CFLAGS 855797cf2ee2Smrgfi # test "$_lt_disable_FC" != yes 855897cf2ee2Smrg 855997cf2ee2SmrgAC_LANG_POP 856097cf2ee2Smrg])# _LT_LANG_FC_CONFIG 856197cf2ee2Smrg 856297cf2ee2Smrg 856397cf2ee2Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 856497cf2ee2Smrg# -------------------------- 856597cf2ee2Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 856697cf2ee2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 856797cf2ee2Smrg# to write the compiler configuration to `libtool'. 856897cf2ee2Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 856997cf2ee2Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 857097cf2ee2SmrgAC_LANG_SAVE 857197cf2ee2Smrg 857297cf2ee2Smrg# Source file extension for Java test sources. 857397cf2ee2Smrgac_ext=java 857497cf2ee2Smrg 857597cf2ee2Smrg# Object file extension for compiled Java test sources. 857697cf2ee2Smrgobjext=o 857797cf2ee2Smrg_LT_TAGVAR(objext, $1)=$objext 857897cf2ee2Smrg 857997cf2ee2Smrg# Code to be used in simple compile tests 858097cf2ee2Smrglt_simple_compile_test_code="class foo {}" 858197cf2ee2Smrg 858297cf2ee2Smrg# Code to be used in simple link tests 858397cf2ee2Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 858497cf2ee2Smrg 858597cf2ee2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 858697cf2ee2Smrg_LT_TAG_COMPILER 858797cf2ee2Smrg 858897cf2ee2Smrg# save warnings/boilerplate of simple test code 858997cf2ee2Smrg_LT_COMPILER_BOILERPLATE 859097cf2ee2Smrg_LT_LINKER_BOILERPLATE 859197cf2ee2Smrg 859297cf2ee2Smrg# Allow CC to be a program name with arguments. 859397cf2ee2Smrglt_save_CC=$CC 859497cf2ee2Smrglt_save_CFLAGS=$CFLAGS 859597cf2ee2Smrglt_save_GCC=$GCC 859697cf2ee2SmrgGCC=yes 859797cf2ee2SmrgCC=${GCJ-"gcj"} 859897cf2ee2SmrgCFLAGS=$GCJFLAGS 859997cf2ee2Smrgcompiler=$CC 860097cf2ee2Smrg_LT_TAGVAR(compiler, $1)=$CC 860197cf2ee2Smrg_LT_TAGVAR(LD, $1)="$LD" 860297cf2ee2Smrg_LT_CC_BASENAME([$compiler]) 860397cf2ee2Smrg 860497cf2ee2Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 860597cf2ee2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 860697cf2ee2Smrg 860797cf2ee2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 860897cf2ee2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 860997cf2ee2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 861097cf2ee2Smrg 861197cf2ee2Smrgif test -n "$compiler"; then 861297cf2ee2Smrg _LT_COMPILER_NO_RTTI($1) 861397cf2ee2Smrg _LT_COMPILER_PIC($1) 861497cf2ee2Smrg _LT_COMPILER_C_O($1) 861597cf2ee2Smrg _LT_COMPILER_FILE_LOCKS($1) 861697cf2ee2Smrg _LT_LINKER_SHLIBS($1) 861797cf2ee2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 861897cf2ee2Smrg 861997cf2ee2Smrg _LT_CONFIG($1) 862097cf2ee2Smrgfi 862197cf2ee2Smrg 862297cf2ee2SmrgAC_LANG_RESTORE 862397cf2ee2Smrg 862497cf2ee2SmrgGCC=$lt_save_GCC 862597cf2ee2SmrgCC=$lt_save_CC 862697cf2ee2SmrgCFLAGS=$lt_save_CFLAGS 862797cf2ee2Smrg])# _LT_LANG_GCJ_CONFIG 862897cf2ee2Smrg 862997cf2ee2Smrg 8630ac92798bSmrg# _LT_LANG_GO_CONFIG([TAG]) 8631ac92798bSmrg# -------------------------- 8632ac92798bSmrg# Ensure that the configuration variables for the GNU Go compiler 8633ac92798bSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8634ac92798bSmrg# to write the compiler configuration to `libtool'. 8635ac92798bSmrgm4_defun([_LT_LANG_GO_CONFIG], 8636ac92798bSmrg[AC_REQUIRE([LT_PROG_GO])dnl 8637ac92798bSmrgAC_LANG_SAVE 8638ac92798bSmrg 8639ac92798bSmrg# Source file extension for Go test sources. 8640ac92798bSmrgac_ext=go 8641ac92798bSmrg 8642ac92798bSmrg# Object file extension for compiled Go test sources. 8643ac92798bSmrgobjext=o 8644ac92798bSmrg_LT_TAGVAR(objext, $1)=$objext 8645ac92798bSmrg 8646ac92798bSmrg# Code to be used in simple compile tests 8647ac92798bSmrglt_simple_compile_test_code="package main; func main() { }" 8648ac92798bSmrg 8649ac92798bSmrg# Code to be used in simple link tests 8650ac92798bSmrglt_simple_link_test_code='package main; func main() { }' 8651ac92798bSmrg 8652ac92798bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8653ac92798bSmrg_LT_TAG_COMPILER 8654ac92798bSmrg 8655ac92798bSmrg# save warnings/boilerplate of simple test code 8656ac92798bSmrg_LT_COMPILER_BOILERPLATE 8657ac92798bSmrg_LT_LINKER_BOILERPLATE 8658ac92798bSmrg 8659ac92798bSmrg# Allow CC to be a program name with arguments. 8660ac92798bSmrglt_save_CC=$CC 8661ac92798bSmrglt_save_CFLAGS=$CFLAGS 8662ac92798bSmrglt_save_GCC=$GCC 8663ac92798bSmrgGCC=yes 8664ac92798bSmrgCC=${GOC-"gccgo"} 8665ac92798bSmrgCFLAGS=$GOFLAGS 8666ac92798bSmrgcompiler=$CC 8667ac92798bSmrg_LT_TAGVAR(compiler, $1)=$CC 8668ac92798bSmrg_LT_TAGVAR(LD, $1)="$LD" 8669ac92798bSmrg_LT_CC_BASENAME([$compiler]) 8670ac92798bSmrg 8671ac92798bSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 8672ac92798bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8673ac92798bSmrg 8674ac92798bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8675ac92798bSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8676ac92798bSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8677ac92798bSmrg 8678ac92798bSmrgif test -n "$compiler"; then 8679ac92798bSmrg _LT_COMPILER_NO_RTTI($1) 8680ac92798bSmrg _LT_COMPILER_PIC($1) 8681ac92798bSmrg _LT_COMPILER_C_O($1) 8682ac92798bSmrg _LT_COMPILER_FILE_LOCKS($1) 8683ac92798bSmrg _LT_LINKER_SHLIBS($1) 8684ac92798bSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8685ac92798bSmrg 8686ac92798bSmrg _LT_CONFIG($1) 8687ac92798bSmrgfi 8688ac92798bSmrg 8689ac92798bSmrgAC_LANG_RESTORE 8690ac92798bSmrg 8691ac92798bSmrgGCC=$lt_save_GCC 8692ac92798bSmrgCC=$lt_save_CC 8693ac92798bSmrgCFLAGS=$lt_save_CFLAGS 8694ac92798bSmrg])# _LT_LANG_GO_CONFIG 8695ac92798bSmrg 8696ac92798bSmrg 869797cf2ee2Smrg# _LT_LANG_RC_CONFIG([TAG]) 869897cf2ee2Smrg# ------------------------- 869997cf2ee2Smrg# Ensure that the configuration variables for the Windows resource compiler 870097cf2ee2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 870197cf2ee2Smrg# to write the compiler configuration to `libtool'. 870297cf2ee2Smrgm4_defun([_LT_LANG_RC_CONFIG], 870397cf2ee2Smrg[AC_REQUIRE([LT_PROG_RC])dnl 870497cf2ee2SmrgAC_LANG_SAVE 870597cf2ee2Smrg 870697cf2ee2Smrg# Source file extension for RC test sources. 870797cf2ee2Smrgac_ext=rc 870897cf2ee2Smrg 870997cf2ee2Smrg# Object file extension for compiled RC test sources. 871097cf2ee2Smrgobjext=o 871197cf2ee2Smrg_LT_TAGVAR(objext, $1)=$objext 871297cf2ee2Smrg 871397cf2ee2Smrg# Code to be used in simple compile tests 871497cf2ee2Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 871597cf2ee2Smrg 871697cf2ee2Smrg# Code to be used in simple link tests 871797cf2ee2Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 871897cf2ee2Smrg 871997cf2ee2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 872097cf2ee2Smrg_LT_TAG_COMPILER 872197cf2ee2Smrg 872297cf2ee2Smrg# save warnings/boilerplate of simple test code 872397cf2ee2Smrg_LT_COMPILER_BOILERPLATE 872497cf2ee2Smrg_LT_LINKER_BOILERPLATE 872597cf2ee2Smrg 872697cf2ee2Smrg# Allow CC to be a program name with arguments. 872797cf2ee2Smrglt_save_CC="$CC" 872897cf2ee2Smrglt_save_CFLAGS=$CFLAGS 872997cf2ee2Smrglt_save_GCC=$GCC 873097cf2ee2SmrgGCC= 873197cf2ee2SmrgCC=${RC-"windres"} 873297cf2ee2SmrgCFLAGS= 873397cf2ee2Smrgcompiler=$CC 873497cf2ee2Smrg_LT_TAGVAR(compiler, $1)=$CC 873597cf2ee2Smrg_LT_CC_BASENAME([$compiler]) 873697cf2ee2Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 873797cf2ee2Smrg 873897cf2ee2Smrgif test -n "$compiler"; then 873997cf2ee2Smrg : 874097cf2ee2Smrg _LT_CONFIG($1) 874197cf2ee2Smrgfi 874297cf2ee2Smrg 874397cf2ee2SmrgGCC=$lt_save_GCC 874497cf2ee2SmrgAC_LANG_RESTORE 874597cf2ee2SmrgCC=$lt_save_CC 874697cf2ee2SmrgCFLAGS=$lt_save_CFLAGS 874797cf2ee2Smrg])# _LT_LANG_RC_CONFIG 874897cf2ee2Smrg 874997cf2ee2Smrg 875097cf2ee2Smrg# LT_PROG_GCJ 875197cf2ee2Smrg# ----------- 875297cf2ee2SmrgAC_DEFUN([LT_PROG_GCJ], 875397cf2ee2Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 875497cf2ee2Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 875597cf2ee2Smrg [AC_CHECK_TOOL(GCJ, gcj,) 875697cf2ee2Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 875797cf2ee2Smrg AC_SUBST(GCJFLAGS)])])[]dnl 875897cf2ee2Smrg]) 875997cf2ee2Smrg 876097cf2ee2Smrg# Old name: 876197cf2ee2SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 876297cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 876397cf2ee2Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 876497cf2ee2Smrg 876597cf2ee2Smrg 8766ac92798bSmrg# LT_PROG_GO 8767ac92798bSmrg# ---------- 8768ac92798bSmrgAC_DEFUN([LT_PROG_GO], 8769ac92798bSmrg[AC_CHECK_TOOL(GOC, gccgo,) 8770ac92798bSmrg]) 8771ac92798bSmrg 8772ac92798bSmrg 877397cf2ee2Smrg# LT_PROG_RC 877497cf2ee2Smrg# ---------- 877597cf2ee2SmrgAC_DEFUN([LT_PROG_RC], 877697cf2ee2Smrg[AC_CHECK_TOOL(RC, windres,) 877797cf2ee2Smrg]) 877897cf2ee2Smrg 877997cf2ee2Smrg# Old name: 878097cf2ee2SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 878197cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 878297cf2ee2Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 878397cf2ee2Smrg 878497cf2ee2Smrg 878597cf2ee2Smrg# _LT_DECL_EGREP 878697cf2ee2Smrg# -------------- 878797cf2ee2Smrg# If we don't have a new enough Autoconf to choose the best grep 878897cf2ee2Smrg# available, choose the one first in the user's PATH. 878997cf2ee2Smrgm4_defun([_LT_DECL_EGREP], 879097cf2ee2Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 879197cf2ee2SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 879297cf2ee2Smrgtest -z "$GREP" && GREP=grep 879397cf2ee2Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 879497cf2ee2Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 879597cf2ee2Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 879697cf2ee2Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 879797cf2ee2SmrgAC_SUBST([GREP]) 879897cf2ee2Smrg]) 879997cf2ee2Smrg 88006e7d3316Smrg 880197cf2ee2Smrg# _LT_DECL_OBJDUMP 880297cf2ee2Smrg# -------------- 880397cf2ee2Smrg# If we don't have a new enough Autoconf to choose the best objdump 880497cf2ee2Smrg# available, choose the one first in the user's PATH. 880597cf2ee2Smrgm4_defun([_LT_DECL_OBJDUMP], 880697cf2ee2Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 880797cf2ee2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 880897cf2ee2Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 880997cf2ee2SmrgAC_SUBST([OBJDUMP]) 881097cf2ee2Smrg]) 8811a966c04fSmrg 881297cf2ee2Smrg# _LT_DECL_DLLTOOL 881397cf2ee2Smrg# ---------------- 881497cf2ee2Smrg# Ensure DLLTOOL variable is set. 881597cf2ee2Smrgm4_defun([_LT_DECL_DLLTOOL], 881697cf2ee2Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 881797cf2ee2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 881897cf2ee2Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 881997cf2ee2SmrgAC_SUBST([DLLTOOL]) 882097cf2ee2Smrg]) 8821a966c04fSmrg 882297cf2ee2Smrg# _LT_DECL_SED 882397cf2ee2Smrg# ------------ 882497cf2ee2Smrg# Check for a fully-functional sed program, that truncates 882597cf2ee2Smrg# as few characters as possible. Prefer GNU sed if found. 882697cf2ee2Smrgm4_defun([_LT_DECL_SED], 882797cf2ee2Smrg[AC_PROG_SED 882897cf2ee2Smrgtest -z "$SED" && SED=sed 882997cf2ee2SmrgXsed="$SED -e 1s/^X//" 883097cf2ee2Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 883197cf2ee2Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 883297cf2ee2Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 883397cf2ee2Smrg])# _LT_DECL_SED 8834a966c04fSmrg 883597cf2ee2Smrgm4_ifndef([AC_PROG_SED], [ 883697cf2ee2Smrg# NOTE: This macro has been submitted for inclusion into # 883797cf2ee2Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 883897cf2ee2Smrg# a released version of Autoconf we should remove this # 883997cf2ee2Smrg# macro and use it instead. # 8840a966c04fSmrg 884197cf2ee2Smrgm4_defun([AC_PROG_SED], 884297cf2ee2Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 884397cf2ee2SmrgAC_CACHE_VAL(lt_cv_path_SED, 884497cf2ee2Smrg[# Loop through the user's path and test for sed and gsed. 884597cf2ee2Smrg# Then use that list of sed's as ones to test for truncation. 884697cf2ee2Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 884797cf2ee2Smrgfor as_dir in $PATH 884897cf2ee2Smrgdo 884997cf2ee2Smrg IFS=$as_save_IFS 885097cf2ee2Smrg test -z "$as_dir" && as_dir=. 885197cf2ee2Smrg for lt_ac_prog in sed gsed; do 885297cf2ee2Smrg for ac_exec_ext in '' $ac_executable_extensions; do 885397cf2ee2Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 885497cf2ee2Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 885597cf2ee2Smrg fi 885697cf2ee2Smrg done 885797cf2ee2Smrg done 885897cf2ee2Smrgdone 885997cf2ee2SmrgIFS=$as_save_IFS 886097cf2ee2Smrglt_ac_max=0 886197cf2ee2Smrglt_ac_count=0 886297cf2ee2Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 886397cf2ee2Smrg# along with /bin/sed that truncates output. 886497cf2ee2Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 886597cf2ee2Smrg test ! -f $lt_ac_sed && continue 886697cf2ee2Smrg cat /dev/null > conftest.in 886797cf2ee2Smrg lt_ac_count=0 886897cf2ee2Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 886997cf2ee2Smrg # Check for GNU sed and select it if it is found. 887097cf2ee2Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 887197cf2ee2Smrg lt_cv_path_SED=$lt_ac_sed 887297cf2ee2Smrg break 887397cf2ee2Smrg fi 887497cf2ee2Smrg while true; do 887597cf2ee2Smrg cat conftest.in conftest.in >conftest.tmp 887697cf2ee2Smrg mv conftest.tmp conftest.in 887797cf2ee2Smrg cp conftest.in conftest.nl 887897cf2ee2Smrg echo >>conftest.nl 887997cf2ee2Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 888097cf2ee2Smrg cmp -s conftest.out conftest.nl || break 888197cf2ee2Smrg # 10000 chars as input seems more than enough 888297cf2ee2Smrg test $lt_ac_count -gt 10 && break 888397cf2ee2Smrg lt_ac_count=`expr $lt_ac_count + 1` 888497cf2ee2Smrg if test $lt_ac_count -gt $lt_ac_max; then 888597cf2ee2Smrg lt_ac_max=$lt_ac_count 888697cf2ee2Smrg lt_cv_path_SED=$lt_ac_sed 888797cf2ee2Smrg fi 888897cf2ee2Smrg done 888997cf2ee2Smrgdone 88906e7d3316Smrg]) 889197cf2ee2SmrgSED=$lt_cv_path_SED 889297cf2ee2SmrgAC_SUBST([SED]) 889397cf2ee2SmrgAC_MSG_RESULT([$SED]) 889497cf2ee2Smrg])#AC_PROG_SED 889597cf2ee2Smrg])#m4_ifndef 8896a966c04fSmrg 889797cf2ee2Smrg# Old name: 889897cf2ee2SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 889997cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 890097cf2ee2Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8901a966c04fSmrg 8902a966c04fSmrg 890397cf2ee2Smrg# _LT_CHECK_SHELL_FEATURES 890497cf2ee2Smrg# ------------------------ 890597cf2ee2Smrg# Find out whether the shell is Bourne or XSI compatible, 890697cf2ee2Smrg# or has some other useful features. 890797cf2ee2Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 890897cf2ee2Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 890997cf2ee2Smrg# Try some XSI features 891097cf2ee2Smrgxsi_shell=no 891197cf2ee2Smrg( _lt_dummy="a/b/c" 891297cf2ee2Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 891397cf2ee2Smrg = c,a/b,b/c, \ 891497cf2ee2Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 891597cf2ee2Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 891697cf2ee2Smrg && xsi_shell=yes 891797cf2ee2SmrgAC_MSG_RESULT([$xsi_shell]) 891897cf2ee2Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 89196e7d3316Smrg 892097cf2ee2SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 892197cf2ee2Smrglt_shell_append=no 892297cf2ee2Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 892397cf2ee2Smrg >/dev/null 2>&1 \ 892497cf2ee2Smrg && lt_shell_append=yes 892597cf2ee2SmrgAC_MSG_RESULT([$lt_shell_append]) 892697cf2ee2Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 89276e7d3316Smrg 892897cf2ee2Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 892997cf2ee2Smrg lt_unset=unset 893097cf2ee2Smrgelse 893197cf2ee2Smrg lt_unset=false 893297cf2ee2Smrgfi 893397cf2ee2Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 89346e7d3316Smrg 893597cf2ee2Smrg# test EBCDIC or ASCII 893697cf2ee2Smrgcase `echo X|tr X '\101'` in 893797cf2ee2Smrg A) # ASCII based system 893897cf2ee2Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 893997cf2ee2Smrg lt_SP2NL='tr \040 \012' 894097cf2ee2Smrg lt_NL2SP='tr \015\012 \040\040' 894197cf2ee2Smrg ;; 894297cf2ee2Smrg *) # EBCDIC based system 894397cf2ee2Smrg lt_SP2NL='tr \100 \n' 894497cf2ee2Smrg lt_NL2SP='tr \r\n \100\100' 894597cf2ee2Smrg ;; 894697cf2ee2Smrgesac 894797cf2ee2Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 894897cf2ee2Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 894997cf2ee2Smrg])# _LT_CHECK_SHELL_FEATURES 895097cf2ee2Smrg 895197cf2ee2Smrg 895297cf2ee2Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 895397cf2ee2Smrg# ------------------------------------------------------ 895497cf2ee2Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 895597cf2ee2Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 895697cf2ee2Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 895797cf2ee2Smrg[dnl { 895897cf2ee2Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 895997cf2ee2Smrg$1 ()\ 896097cf2ee2Smrg{\ 896197cf2ee2Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 896297cf2ee2Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 896397cf2ee2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 896497cf2ee2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 896597cf2ee2Smrgtest 0 -eq $? || _lt_function_replace_fail=: 896697cf2ee2Smrg]) 89676e7d3316Smrg 89686e7d3316Smrg 896997cf2ee2Smrg# _LT_PROG_REPLACE_SHELLFNS 897097cf2ee2Smrg# ------------------------- 897197cf2ee2Smrg# Replace existing portable implementations of several shell functions with 897297cf2ee2Smrg# equivalent extended shell implementations where those features are available.. 897397cf2ee2Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 897497cf2ee2Smrg[if test x"$xsi_shell" = xyes; then 897597cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 897697cf2ee2Smrg case ${1} in 897797cf2ee2Smrg */*) func_dirname_result="${1%/*}${2}" ;; 897897cf2ee2Smrg * ) func_dirname_result="${3}" ;; 897997cf2ee2Smrg esac]) 898097cf2ee2Smrg 898197cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 898297cf2ee2Smrg func_basename_result="${1##*/}"]) 898397cf2ee2Smrg 898497cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 898597cf2ee2Smrg case ${1} in 898697cf2ee2Smrg */*) func_dirname_result="${1%/*}${2}" ;; 898797cf2ee2Smrg * ) func_dirname_result="${3}" ;; 89886e7d3316Smrg esac 898997cf2ee2Smrg func_basename_result="${1##*/}"]) 89906e7d3316Smrg 899197cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 899297cf2ee2Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 899397cf2ee2Smrg # positional parameters, so assign one to ordinary parameter first. 899497cf2ee2Smrg func_stripname_result=${3} 899597cf2ee2Smrg func_stripname_result=${func_stripname_result#"${1}"} 899697cf2ee2Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 899797cf2ee2Smrg 899897cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 899997cf2ee2Smrg func_split_long_opt_name=${1%%=*} 900097cf2ee2Smrg func_split_long_opt_arg=${1#*=}]) 900197cf2ee2Smrg 900297cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 900397cf2ee2Smrg func_split_short_opt_arg=${1#??} 900497cf2ee2Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 900597cf2ee2Smrg 900697cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 900797cf2ee2Smrg case ${1} in 900897cf2ee2Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 900997cf2ee2Smrg *) func_lo2o_result=${1} ;; 901097cf2ee2Smrg esac]) 901197cf2ee2Smrg 901297cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 901397cf2ee2Smrg 901497cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 901597cf2ee2Smrg 901697cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 90176e7d3316Smrgfi 90186e7d3316Smrg 901997cf2ee2Smrgif test x"$lt_shell_append" = xyes; then 902097cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 90216e7d3316Smrg 902297cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 902397cf2ee2Smrg func_quote_for_eval "${2}" 902497cf2ee2Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 902597cf2ee2Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 90266e7d3316Smrg 902797cf2ee2Smrg # Save a `func_append' function call where possible by direct use of '+=' 902897cf2ee2Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 902997cf2ee2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 903097cf2ee2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 903197cf2ee2Smrg test 0 -eq $? || _lt_function_replace_fail=: 903297cf2ee2Smrgelse 903397cf2ee2Smrg # Save a `func_append' function call even when '+=' is not available 903497cf2ee2Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 903597cf2ee2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 903697cf2ee2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 903797cf2ee2Smrg test 0 -eq $? || _lt_function_replace_fail=: 903897cf2ee2Smrgfi 90396e7d3316Smrg 904097cf2ee2Smrgif test x"$_lt_function_replace_fail" = x":"; then 904197cf2ee2Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 904297cf2ee2Smrgfi 904397cf2ee2Smrg]) 90446e7d3316Smrg 904597cf2ee2Smrg# _LT_PATH_CONVERSION_FUNCTIONS 904697cf2ee2Smrg# ----------------------------- 904797cf2ee2Smrg# Determine which file name conversion functions should be used by 904897cf2ee2Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 904997cf2ee2Smrg# for certain cross-compile configurations and native mingw. 905097cf2ee2Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 905197cf2ee2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 905297cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 905397cf2ee2SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 905497cf2ee2SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 905597cf2ee2Smrg[case $host in 905697cf2ee2Smrg *-*-mingw* ) 905797cf2ee2Smrg case $build in 905897cf2ee2Smrg *-*-mingw* ) # actually msys 905997cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 906097cf2ee2Smrg ;; 906197cf2ee2Smrg *-*-cygwin* ) 906297cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 906397cf2ee2Smrg ;; 906497cf2ee2Smrg * ) # otherwise, assume *nix 906597cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 906697cf2ee2Smrg ;; 906797cf2ee2Smrg esac 90686e7d3316Smrg ;; 906997cf2ee2Smrg *-*-cygwin* ) 907097cf2ee2Smrg case $build in 907197cf2ee2Smrg *-*-mingw* ) # actually msys 907297cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 907397cf2ee2Smrg ;; 907497cf2ee2Smrg *-*-cygwin* ) 907597cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 907697cf2ee2Smrg ;; 907797cf2ee2Smrg * ) # otherwise, assume *nix 907897cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 907997cf2ee2Smrg ;; 90806e7d3316Smrg esac 90816e7d3316Smrg ;; 908297cf2ee2Smrg * ) # unhandled hosts (and "normal" native builds) 908397cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 908497cf2ee2Smrg ;; 9085a966c04fSmrgesac 90866e7d3316Smrg]) 908797cf2ee2Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 908897cf2ee2SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 908997cf2ee2Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 909097cf2ee2Smrg [0], [convert $build file names to $host format])dnl 909197cf2ee2Smrg 909297cf2ee2SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 909397cf2ee2SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 909497cf2ee2Smrg[#assume ordinary cross tools, or native build. 909597cf2ee2Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 909697cf2ee2Smrgcase $host in 909797cf2ee2Smrg *-*-mingw* ) 909897cf2ee2Smrg case $build in 909997cf2ee2Smrg *-*-mingw* ) # actually msys 910097cf2ee2Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 910197cf2ee2Smrg ;; 910297cf2ee2Smrg esac 910397cf2ee2Smrg ;; 9104a966c04fSmrgesac 910597cf2ee2Smrg]) 910697cf2ee2Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 910797cf2ee2SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 910897cf2ee2Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 910997cf2ee2Smrg [0], [convert $build files to toolchain format])dnl 911097cf2ee2Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 91116e7d3316Smrg 911297cf2ee2Smrg# Helper functions for option handling. -*- Autoconf -*- 911397cf2ee2Smrg# 911497cf2ee2Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 911597cf2ee2Smrg# Inc. 911697cf2ee2Smrg# Written by Gary V. Vaughan, 2004 911797cf2ee2Smrg# 911897cf2ee2Smrg# This file is free software; the Free Software Foundation gives 911997cf2ee2Smrg# unlimited permission to copy and/or distribute it, with or without 912097cf2ee2Smrg# modifications, as long as this notice is preserved. 91216e7d3316Smrg 912297cf2ee2Smrg# serial 7 ltoptions.m4 9123a966c04fSmrg 912497cf2ee2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 912597cf2ee2SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9126a966c04fSmrg 9127a966c04fSmrg 912897cf2ee2Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 912997cf2ee2Smrg# ------------------------------------------ 913097cf2ee2Smrgm4_define([_LT_MANGLE_OPTION], 913197cf2ee2Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 91326e7d3316Smrg 9133a966c04fSmrg 913497cf2ee2Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 913597cf2ee2Smrg# --------------------------------------- 913697cf2ee2Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 913797cf2ee2Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 913897cf2ee2Smrg# saved as a flag. 913997cf2ee2Smrgm4_define([_LT_SET_OPTION], 914097cf2ee2Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 914197cf2ee2Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 914297cf2ee2Smrg _LT_MANGLE_DEFUN([$1], [$2]), 914397cf2ee2Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 914497cf2ee2Smrg]) 9145a966c04fSmrg 9146a966c04fSmrg 914797cf2ee2Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 914897cf2ee2Smrg# ------------------------------------------------------------ 914997cf2ee2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 915097cf2ee2Smrgm4_define([_LT_IF_OPTION], 915197cf2ee2Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9152a966c04fSmrg 9153a966c04fSmrg 915497cf2ee2Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 915597cf2ee2Smrg# ------------------------------------------------------- 915697cf2ee2Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 915797cf2ee2Smrg# are set. 915897cf2ee2Smrgm4_define([_LT_UNLESS_OPTIONS], 915997cf2ee2Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 916097cf2ee2Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 916197cf2ee2Smrg [m4_define([$0_found])])])[]dnl 916297cf2ee2Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 916397cf2ee2Smrg])[]dnl 916497cf2ee2Smrg]) 916597cf2ee2Smrg 916697cf2ee2Smrg 916797cf2ee2Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 916897cf2ee2Smrg# ---------------------------------------- 916997cf2ee2Smrg# OPTION-LIST is a space-separated list of Libtool options associated 917097cf2ee2Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 917197cf2ee2Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 917297cf2ee2Smrg# the unknown option and exit. 917397cf2ee2Smrgm4_defun([_LT_SET_OPTIONS], 917497cf2ee2Smrg[# Set options 917597cf2ee2Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 917697cf2ee2Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 917797cf2ee2Smrg 917897cf2ee2Smrgm4_if([$1],[LT_INIT],[ 917997cf2ee2Smrg dnl 918097cf2ee2Smrg dnl Simply set some default values (i.e off) if boolean options were not 918197cf2ee2Smrg dnl specified: 918297cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 918397cf2ee2Smrg ]) 918497cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 918597cf2ee2Smrg ]) 918697cf2ee2Smrg dnl 918797cf2ee2Smrg dnl If no reference was made to various pairs of opposing options, then 918897cf2ee2Smrg dnl we run the default mode handler for the pair. For example, if neither 918997cf2ee2Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 919097cf2ee2Smrg dnl archives by default: 919197cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 919297cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 919397cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 919497cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 919597cf2ee2Smrg [_LT_ENABLE_FAST_INSTALL]) 919697cf2ee2Smrg ]) 919797cf2ee2Smrg])# _LT_SET_OPTIONS 919897cf2ee2Smrg 9199a966c04fSmrg 92006e7d3316Smrg 920197cf2ee2Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 920297cf2ee2Smrg# ----------------------------------------- 920397cf2ee2Smrgm4_define([_LT_MANGLE_DEFUN], 920497cf2ee2Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 92056e7d3316Smrg 92066e7d3316Smrg 920797cf2ee2Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 920897cf2ee2Smrg# ----------------------------------------------- 920997cf2ee2Smrgm4_define([LT_OPTION_DEFINE], 921097cf2ee2Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 921197cf2ee2Smrg])# LT_OPTION_DEFINE 92126e7d3316Smrg 92136e7d3316Smrg 921497cf2ee2Smrg# dlopen 921597cf2ee2Smrg# ------ 921697cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 921797cf2ee2Smrg]) 9218a966c04fSmrg 921997cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 922097cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 922197cf2ee2SmrgAC_DIAGNOSE([obsolete], 922297cf2ee2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 922397cf2ee2Smrgput the `dlopen' option into LT_INIT's first parameter.]) 922497cf2ee2Smrg]) 9225a966c04fSmrg 922697cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 922797cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9228a966c04fSmrg 92296e7d3316Smrg 923097cf2ee2Smrg# win32-dll 923197cf2ee2Smrg# --------- 923297cf2ee2Smrg# Declare package support for building win32 dll's. 923397cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 923497cf2ee2Smrg[enable_win32_dll=yes 9235a966c04fSmrg 923697cf2ee2Smrgcase $host in 923797cf2ee2Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 923897cf2ee2Smrg AC_CHECK_TOOL(AS, as, false) 923997cf2ee2Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 924097cf2ee2Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 924197cf2ee2Smrg ;; 924297cf2ee2Smrgesac 92436e7d3316Smrg 924497cf2ee2Smrgtest -z "$AS" && AS=as 924597cf2ee2Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 92466e7d3316Smrg 924797cf2ee2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 924897cf2ee2Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 92496e7d3316Smrg 925097cf2ee2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 925197cf2ee2Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 925297cf2ee2Smrg])# win32-dll 9253a966c04fSmrg 925497cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 925597cf2ee2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 925697cf2ee2Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 925797cf2ee2SmrgAC_DIAGNOSE([obsolete], 925897cf2ee2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 925997cf2ee2Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 926097cf2ee2Smrg]) 9261a966c04fSmrg 926297cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 926397cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9264a966c04fSmrg 92656e7d3316Smrg 926697cf2ee2Smrg# _LT_ENABLE_SHARED([DEFAULT]) 926797cf2ee2Smrg# ---------------------------- 926897cf2ee2Smrg# implement the --enable-shared flag, and supports the `shared' and 926997cf2ee2Smrg# `disable-shared' LT_INIT options. 927097cf2ee2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 927197cf2ee2Smrgm4_define([_LT_ENABLE_SHARED], 927297cf2ee2Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 927397cf2ee2SmrgAC_ARG_ENABLE([shared], 927497cf2ee2Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 927597cf2ee2Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 927697cf2ee2Smrg [p=${PACKAGE-default} 927797cf2ee2Smrg case $enableval in 927897cf2ee2Smrg yes) enable_shared=yes ;; 927997cf2ee2Smrg no) enable_shared=no ;; 928097cf2ee2Smrg *) 928197cf2ee2Smrg enable_shared=no 928297cf2ee2Smrg # Look at the argument we got. We use all the common list separators. 928397cf2ee2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 928497cf2ee2Smrg for pkg in $enableval; do 928597cf2ee2Smrg IFS="$lt_save_ifs" 928697cf2ee2Smrg if test "X$pkg" = "X$p"; then 928797cf2ee2Smrg enable_shared=yes 928897cf2ee2Smrg fi 928997cf2ee2Smrg done 929097cf2ee2Smrg IFS="$lt_save_ifs" 929197cf2ee2Smrg ;; 929297cf2ee2Smrg esac], 929397cf2ee2Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 92946e7d3316Smrg 929597cf2ee2Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 929697cf2ee2Smrg [Whether or not to build shared libraries]) 929797cf2ee2Smrg])# _LT_ENABLE_SHARED 92986e7d3316Smrg 929997cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 930097cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 93016e7d3316Smrg 930297cf2ee2Smrg# Old names: 930397cf2ee2SmrgAC_DEFUN([AC_ENABLE_SHARED], 930497cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 930597cf2ee2Smrg]) 93066e7d3316Smrg 930797cf2ee2SmrgAC_DEFUN([AC_DISABLE_SHARED], 930897cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 930997cf2ee2Smrg]) 93106e7d3316Smrg 931197cf2ee2SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 931297cf2ee2SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 93136e7d3316Smrg 931497cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 931597cf2ee2Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 931697cf2ee2Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 93176e7d3316Smrg 93186e7d3316Smrg 93196e7d3316Smrg 932097cf2ee2Smrg# _LT_ENABLE_STATIC([DEFAULT]) 932197cf2ee2Smrg# ---------------------------- 932297cf2ee2Smrg# implement the --enable-static flag, and support the `static' and 932397cf2ee2Smrg# `disable-static' LT_INIT options. 932497cf2ee2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 932597cf2ee2Smrgm4_define([_LT_ENABLE_STATIC], 932697cf2ee2Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 932797cf2ee2SmrgAC_ARG_ENABLE([static], 932897cf2ee2Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 932997cf2ee2Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 933097cf2ee2Smrg [p=${PACKAGE-default} 933197cf2ee2Smrg case $enableval in 933297cf2ee2Smrg yes) enable_static=yes ;; 933397cf2ee2Smrg no) enable_static=no ;; 933497cf2ee2Smrg *) 933597cf2ee2Smrg enable_static=no 933697cf2ee2Smrg # Look at the argument we got. We use all the common list separators. 933797cf2ee2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 933897cf2ee2Smrg for pkg in $enableval; do 933997cf2ee2Smrg IFS="$lt_save_ifs" 934097cf2ee2Smrg if test "X$pkg" = "X$p"; then 934197cf2ee2Smrg enable_static=yes 934297cf2ee2Smrg fi 934397cf2ee2Smrg done 934497cf2ee2Smrg IFS="$lt_save_ifs" 934597cf2ee2Smrg ;; 934697cf2ee2Smrg esac], 934797cf2ee2Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 934897cf2ee2Smrg 934997cf2ee2Smrg _LT_DECL([build_old_libs], [enable_static], [0], 935097cf2ee2Smrg [Whether or not to build static libraries]) 935197cf2ee2Smrg])# _LT_ENABLE_STATIC 935297cf2ee2Smrg 935397cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 935497cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9355a966c04fSmrg 935697cf2ee2Smrg# Old names: 935797cf2ee2SmrgAC_DEFUN([AC_ENABLE_STATIC], 935897cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 935997cf2ee2Smrg]) 9360a966c04fSmrg 936197cf2ee2SmrgAC_DEFUN([AC_DISABLE_STATIC], 936297cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 936397cf2ee2Smrg]) 9364a966c04fSmrg 936597cf2ee2SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 936697cf2ee2SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9367a966c04fSmrg 936897cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 936997cf2ee2Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 937097cf2ee2Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9371a966c04fSmrg 9372a966c04fSmrg 9373a966c04fSmrg 937497cf2ee2Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 937597cf2ee2Smrg# ---------------------------------- 937697cf2ee2Smrg# implement the --enable-fast-install flag, and support the `fast-install' 937797cf2ee2Smrg# and `disable-fast-install' LT_INIT options. 937897cf2ee2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 937997cf2ee2Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 938097cf2ee2Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 938197cf2ee2SmrgAC_ARG_ENABLE([fast-install], 938297cf2ee2Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 938397cf2ee2Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 938497cf2ee2Smrg [p=${PACKAGE-default} 938597cf2ee2Smrg case $enableval in 938697cf2ee2Smrg yes) enable_fast_install=yes ;; 938797cf2ee2Smrg no) enable_fast_install=no ;; 938897cf2ee2Smrg *) 938997cf2ee2Smrg enable_fast_install=no 939097cf2ee2Smrg # Look at the argument we got. We use all the common list separators. 939197cf2ee2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 939297cf2ee2Smrg for pkg in $enableval; do 939397cf2ee2Smrg IFS="$lt_save_ifs" 939497cf2ee2Smrg if test "X$pkg" = "X$p"; then 939597cf2ee2Smrg enable_fast_install=yes 939697cf2ee2Smrg fi 939797cf2ee2Smrg done 939897cf2ee2Smrg IFS="$lt_save_ifs" 939997cf2ee2Smrg ;; 940097cf2ee2Smrg esac], 940197cf2ee2Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9402a966c04fSmrg 940397cf2ee2Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 940497cf2ee2Smrg [Whether or not to optimize for fast installation])dnl 940597cf2ee2Smrg])# _LT_ENABLE_FAST_INSTALL 9406a966c04fSmrg 940797cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 940897cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9409a966c04fSmrg 941097cf2ee2Smrg# Old names: 941197cf2ee2SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 941297cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 941397cf2ee2SmrgAC_DIAGNOSE([obsolete], 941497cf2ee2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 941597cf2ee2Smrgthe `fast-install' option into LT_INIT's first parameter.]) 941697cf2ee2Smrg]) 94176e7d3316Smrg 941897cf2ee2SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 941997cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 942097cf2ee2SmrgAC_DIAGNOSE([obsolete], 942197cf2ee2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 942297cf2ee2Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 942397cf2ee2Smrg]) 94246e7d3316Smrg 942597cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 942697cf2ee2Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 942797cf2ee2Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 94286e7d3316Smrg 94296e7d3316Smrg 943097cf2ee2Smrg# _LT_WITH_PIC([MODE]) 943197cf2ee2Smrg# -------------------- 943297cf2ee2Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 943397cf2ee2Smrg# LT_INIT options. 943497cf2ee2Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 943597cf2ee2Smrgm4_define([_LT_WITH_PIC], 943697cf2ee2Smrg[AC_ARG_WITH([pic], 9437ac92798bSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 943897cf2ee2Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9439ac92798bSmrg [lt_p=${PACKAGE-default} 9440ac92798bSmrg case $withval in 9441ac92798bSmrg yes|no) pic_mode=$withval ;; 9442ac92798bSmrg *) 9443ac92798bSmrg pic_mode=default 9444ac92798bSmrg # Look at the argument we got. We use all the common list separators. 9445ac92798bSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9446ac92798bSmrg for lt_pkg in $withval; do 9447ac92798bSmrg IFS="$lt_save_ifs" 9448ac92798bSmrg if test "X$lt_pkg" = "X$lt_p"; then 9449ac92798bSmrg pic_mode=yes 9450ac92798bSmrg fi 9451ac92798bSmrg done 9452ac92798bSmrg IFS="$lt_save_ifs" 9453ac92798bSmrg ;; 9454ac92798bSmrg esac], 945597cf2ee2Smrg [pic_mode=default]) 94566e7d3316Smrg 945797cf2ee2Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 94586e7d3316Smrg 945997cf2ee2Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 946097cf2ee2Smrg])# _LT_WITH_PIC 9461a966c04fSmrg 946297cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 946397cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9464a966c04fSmrg 946597cf2ee2Smrg# Old name: 946697cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 946797cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 946897cf2ee2SmrgAC_DIAGNOSE([obsolete], 946997cf2ee2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 947097cf2ee2Smrgput the `pic-only' option into LT_INIT's first parameter.]) 947197cf2ee2Smrg]) 9472a966c04fSmrg 947397cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 947497cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9475a966c04fSmrg 9476a966c04fSmrg 947797cf2ee2Smrgm4_define([_LTDL_MODE], []) 947897cf2ee2SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 947997cf2ee2Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 948097cf2ee2SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 948197cf2ee2Smrg [m4_define([_LTDL_MODE], [recursive])]) 948297cf2ee2SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 948397cf2ee2Smrg [m4_define([_LTDL_MODE], [subproject])]) 9484a966c04fSmrg 948597cf2ee2Smrgm4_define([_LTDL_TYPE], []) 948697cf2ee2SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 948797cf2ee2Smrg [m4_define([_LTDL_TYPE], [installable])]) 948897cf2ee2SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 948997cf2ee2Smrg [m4_define([_LTDL_TYPE], [convenience])]) 9490a966c04fSmrg 949197cf2ee2Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 949297cf2ee2Smrg# 949397cf2ee2Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 949497cf2ee2Smrg# Written by Gary V. Vaughan, 2004 949597cf2ee2Smrg# 949697cf2ee2Smrg# This file is free software; the Free Software Foundation gives 949797cf2ee2Smrg# unlimited permission to copy and/or distribute it, with or without 949897cf2ee2Smrg# modifications, as long as this notice is preserved. 94992e2dd055Smrg 950097cf2ee2Smrg# serial 6 ltsugar.m4 9501a966c04fSmrg 950297cf2ee2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 950397cf2ee2SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9504a966c04fSmrg 9505a966c04fSmrg 950697cf2ee2Smrg# lt_join(SEP, ARG1, [ARG2...]) 950797cf2ee2Smrg# ----------------------------- 950897cf2ee2Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 950997cf2ee2Smrg# associated separator. 951097cf2ee2Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 951197cf2ee2Smrg# versions in m4sugar had bugs. 951297cf2ee2Smrgm4_define([lt_join], 951397cf2ee2Smrg[m4_if([$#], [1], [], 951497cf2ee2Smrg [$#], [2], [[$2]], 951597cf2ee2Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 951697cf2ee2Smrgm4_define([_lt_join], 951797cf2ee2Smrg[m4_if([$#$2], [2], [], 951897cf2ee2Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9519a966c04fSmrg 9520a966c04fSmrg 952197cf2ee2Smrg# lt_car(LIST) 952297cf2ee2Smrg# lt_cdr(LIST) 952397cf2ee2Smrg# ------------ 952497cf2ee2Smrg# Manipulate m4 lists. 952597cf2ee2Smrg# These macros are necessary as long as will still need to support 952697cf2ee2Smrg# Autoconf-2.59 which quotes differently. 952797cf2ee2Smrgm4_define([lt_car], [[$1]]) 952897cf2ee2Smrgm4_define([lt_cdr], 952997cf2ee2Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 953097cf2ee2Smrg [$#], 1, [], 953197cf2ee2Smrg [m4_dquote(m4_shift($@))])]) 953297cf2ee2Smrgm4_define([lt_unquote], $1) 9533a966c04fSmrg 9534a966c04fSmrg 953597cf2ee2Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 953697cf2ee2Smrg# ------------------------------------------ 953797cf2ee2Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 953897cf2ee2Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 953997cf2ee2Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 954097cf2ee2Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 954197cf2ee2Smrg# than defined and empty). 954297cf2ee2Smrg# 954397cf2ee2Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 954497cf2ee2Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 954597cf2ee2Smrgm4_define([lt_append], 954697cf2ee2Smrg[m4_define([$1], 954797cf2ee2Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 95486e7d3316Smrg 9549a966c04fSmrg 9550a966c04fSmrg 955197cf2ee2Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 955297cf2ee2Smrg# ---------------------------------------------------------- 955397cf2ee2Smrg# Produce a SEP delimited list of all paired combinations of elements of 955497cf2ee2Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 955597cf2ee2Smrg# has the form PREFIXmINFIXSUFFIXn. 955697cf2ee2Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 955797cf2ee2Smrgm4_define([lt_combine], 955897cf2ee2Smrg[m4_if(m4_eval([$# > 3]), [1], 955997cf2ee2Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 956097cf2ee2Smrg[[m4_foreach([_Lt_prefix], [$2], 956197cf2ee2Smrg [m4_foreach([_Lt_suffix], 956297cf2ee2Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 956397cf2ee2Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 95646e7d3316Smrg 9565a966c04fSmrg 956697cf2ee2Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 956797cf2ee2Smrg# ----------------------------------------------------------------------- 956897cf2ee2Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 956997cf2ee2Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 957097cf2ee2Smrgm4_define([lt_if_append_uniq], 957197cf2ee2Smrg[m4_ifdef([$1], 957297cf2ee2Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 957397cf2ee2Smrg [lt_append([$1], [$2], [$3])$4], 957497cf2ee2Smrg [$5])], 957597cf2ee2Smrg [lt_append([$1], [$2], [$3])$4])]) 9576a966c04fSmrg 95776e7d3316Smrg 957897cf2ee2Smrg# lt_dict_add(DICT, KEY, VALUE) 957997cf2ee2Smrg# ----------------------------- 958097cf2ee2Smrgm4_define([lt_dict_add], 958197cf2ee2Smrg[m4_define([$1($2)], [$3])]) 95826e7d3316Smrg 95836e7d3316Smrg 958497cf2ee2Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 958597cf2ee2Smrg# -------------------------------------------- 958697cf2ee2Smrgm4_define([lt_dict_add_subkey], 958797cf2ee2Smrg[m4_define([$1($2:$3)], [$4])]) 95886e7d3316Smrg 95896e7d3316Smrg 959097cf2ee2Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 959197cf2ee2Smrg# ---------------------------------- 959297cf2ee2Smrgm4_define([lt_dict_fetch], 959397cf2ee2Smrg[m4_ifval([$3], 959497cf2ee2Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 959597cf2ee2Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 95966e7d3316Smrg 95976e7d3316Smrg 959897cf2ee2Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 959997cf2ee2Smrg# ----------------------------------------------------------------- 960097cf2ee2Smrgm4_define([lt_if_dict_fetch], 960197cf2ee2Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 960297cf2ee2Smrg [$5], 960397cf2ee2Smrg [$6])]) 96046e7d3316Smrg 96056e7d3316Smrg 960697cf2ee2Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 960797cf2ee2Smrg# -------------------------------------------------------------- 960897cf2ee2Smrgm4_define([lt_dict_filter], 960997cf2ee2Smrg[m4_if([$5], [], [], 961097cf2ee2Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 961197cf2ee2Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 961297cf2ee2Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 961397cf2ee2Smrg]) 96146e7d3316Smrg 961597cf2ee2Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 961697cf2ee2Smrg# 961797cf2ee2Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 961897cf2ee2Smrg# Written by Scott James Remnant, 2004 961997cf2ee2Smrg# 962097cf2ee2Smrg# This file is free software; the Free Software Foundation gives 962197cf2ee2Smrg# unlimited permission to copy and/or distribute it, with or without 962297cf2ee2Smrg# modifications, as long as this notice is preserved. 96236e7d3316Smrg 962497cf2ee2Smrg# @configure_input@ 96256e7d3316Smrg 9626ac92798bSmrg# serial 3337 ltversion.m4 962797cf2ee2Smrg# This file is part of GNU Libtool 96286e7d3316Smrg 9629ac92798bSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 9630ac92798bSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 96316e7d3316Smrg 963297cf2ee2SmrgAC_DEFUN([LTVERSION_VERSION], 9633ac92798bSmrg[macro_version='2.4.2' 9634ac92798bSmrgmacro_revision='1.3337' 963597cf2ee2Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 963697cf2ee2Smrg_LT_DECL(, macro_revision, 0) 963797cf2ee2Smrg]) 9638a966c04fSmrg 963997cf2ee2Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 964097cf2ee2Smrg# 964197cf2ee2Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 964297cf2ee2Smrg# Written by Scott James Remnant, 2004. 964397cf2ee2Smrg# 964497cf2ee2Smrg# This file is free software; the Free Software Foundation gives 964597cf2ee2Smrg# unlimited permission to copy and/or distribute it, with or without 964697cf2ee2Smrg# modifications, as long as this notice is preserved. 96476e7d3316Smrg 964897cf2ee2Smrg# serial 5 lt~obsolete.m4 96496e7d3316Smrg 965097cf2ee2Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 965197cf2ee2Smrg# 965297cf2ee2Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 965397cf2ee2Smrg# which have later been changed to m4_define as they aren't part of the 965497cf2ee2Smrg# exported API, or moved to Autoconf or Automake where they belong. 965597cf2ee2Smrg# 965697cf2ee2Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 965797cf2ee2Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 965897cf2ee2Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 965997cf2ee2Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 966097cf2ee2Smrg# and doesn't know about Autoconf macros at all.) 966197cf2ee2Smrg# 966297cf2ee2Smrg# So we provide this file, which has a silly filename so it's always 966397cf2ee2Smrg# included after everything else. This provides aclocal with the 966497cf2ee2Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 966597cf2ee2Smrg# because those macros already exist, or will be overwritten later. 966697cf2ee2Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 966797cf2ee2Smrg# 966897cf2ee2Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 966997cf2ee2Smrg# Yes, that means every name once taken will need to remain here until 967097cf2ee2Smrg# we give up compatibility with versions before 1.7, at which point 967197cf2ee2Smrg# we need to keep only those names which we still refer to. 9672a966c04fSmrg 967397cf2ee2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 967497cf2ee2SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9675a966c04fSmrg 967697cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 967797cf2ee2Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 967897cf2ee2Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 967997cf2ee2Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 968097cf2ee2Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 968197cf2ee2Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 968297cf2ee2Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 968397cf2ee2Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 968497cf2ee2Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 968597cf2ee2Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 968697cf2ee2Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 968797cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 968897cf2ee2Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 968997cf2ee2Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 969097cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 969197cf2ee2Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 969297cf2ee2Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 969397cf2ee2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 969497cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 969597cf2ee2Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 969697cf2ee2Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 969797cf2ee2Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 969897cf2ee2Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 969997cf2ee2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 970097cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 970197cf2ee2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 970297cf2ee2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 970397cf2ee2Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 970497cf2ee2Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 970597cf2ee2Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 970697cf2ee2Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 970797cf2ee2Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 970897cf2ee2Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 970997cf2ee2Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 971097cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 971197cf2ee2Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 971297cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 971397cf2ee2Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 971497cf2ee2Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 971597cf2ee2Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 971697cf2ee2Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 971797cf2ee2Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 971897cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 971997cf2ee2Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 972097cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 972197cf2ee2Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 972297cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 972397cf2ee2Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 972497cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 972597cf2ee2Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 972697cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 972797cf2ee2Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 972897cf2ee2Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 972997cf2ee2Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 973097cf2ee2Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 973197cf2ee2Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 973297cf2ee2Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 973397cf2ee2Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 973497cf2ee2Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 973597cf2ee2Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 973697cf2ee2Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9737a966c04fSmrg 9738ac92798bSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9739ac92798bSmrg# 9740ac92798bSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9741ac92798bSmrg# 9742ac92798bSmrg# This program is free software; you can redistribute it and/or modify 9743ac92798bSmrg# it under the terms of the GNU General Public License as published by 9744ac92798bSmrg# the Free Software Foundation; either version 2 of the License, or 9745ac92798bSmrg# (at your option) any later version. 9746ac92798bSmrg# 9747ac92798bSmrg# This program is distributed in the hope that it will be useful, but 9748ac92798bSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9749ac92798bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9750ac92798bSmrg# General Public License for more details. 9751ac92798bSmrg# 9752ac92798bSmrg# You should have received a copy of the GNU General Public License 9753ac92798bSmrg# along with this program; if not, write to the Free Software 9754ac92798bSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9755ac92798bSmrg# 9756ac92798bSmrg# As a special exception to the GNU General Public License, if you 9757ac92798bSmrg# distribute this file as part of a program that contains a 9758ac92798bSmrg# configuration script generated by Autoconf, you may include it under 9759ac92798bSmrg# the same distribution terms that you use for the rest of that program. 9760ac92798bSmrg 9761ac92798bSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9762ac92798bSmrg# ---------------------------------- 9763ac92798bSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9764ac92798bSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9765ac92798bSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9766ac92798bSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9767ac92798bSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9768ac92798bSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9769ac92798bSmrgfi 9770ac92798bSmrgif test -n "$PKG_CONFIG"; then 9771ac92798bSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 9772ac92798bSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9773ac92798bSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9774ac92798bSmrg AC_MSG_RESULT([yes]) 9775ac92798bSmrg else 9776ac92798bSmrg AC_MSG_RESULT([no]) 9777ac92798bSmrg PKG_CONFIG="" 9778ac92798bSmrg fi 9779ac92798bSmrg 9780ac92798bSmrgfi[]dnl 9781ac92798bSmrg])# PKG_PROG_PKG_CONFIG 9782ac92798bSmrg 9783ac92798bSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9784ac92798bSmrg# 9785ac92798bSmrg# Check to see whether a particular set of modules exists. Similar 9786ac92798bSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9787ac92798bSmrg# 9788ac92798bSmrg# 9789ac92798bSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9790ac92798bSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 9791ac92798bSmrg# PKG_CHECK_EXISTS manually 9792ac92798bSmrg# -------------------------------------------------------------- 9793ac92798bSmrgAC_DEFUN([PKG_CHECK_EXISTS], 9794ac92798bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9795ac92798bSmrgif test -n "$PKG_CONFIG" && \ 9796ac92798bSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9797ac92798bSmrg m4_ifval([$2], [$2], [:]) 9798ac92798bSmrgm4_ifvaln([$3], [else 9799ac92798bSmrg $3])dnl 9800ac92798bSmrgfi]) 9801ac92798bSmrg 9802ac92798bSmrg 9803ac92798bSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9804ac92798bSmrg# --------------------------------------------- 9805ac92798bSmrgm4_define([_PKG_CONFIG], 9806ac92798bSmrg[if test -n "$$1"; then 9807ac92798bSmrg pkg_cv_[]$1="$$1" 9808ac92798bSmrg elif test -n "$PKG_CONFIG"; then 9809ac92798bSmrg PKG_CHECK_EXISTS([$3], 9810ac92798bSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9811ac92798bSmrg [pkg_failed=yes]) 9812ac92798bSmrg else 9813ac92798bSmrg pkg_failed=untried 9814ac92798bSmrgfi[]dnl 9815ac92798bSmrg])# _PKG_CONFIG 9816ac92798bSmrg 9817ac92798bSmrg# _PKG_SHORT_ERRORS_SUPPORTED 9818ac92798bSmrg# ----------------------------- 9819ac92798bSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9820ac92798bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9821ac92798bSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9822ac92798bSmrg _pkg_short_errors_supported=yes 9823ac92798bSmrgelse 9824ac92798bSmrg _pkg_short_errors_supported=no 9825ac92798bSmrgfi[]dnl 9826ac92798bSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 9827ac92798bSmrg 9828ac92798bSmrg 9829ac92798bSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9830ac92798bSmrg# [ACTION-IF-NOT-FOUND]) 9831ac92798bSmrg# 9832ac92798bSmrg# 9833ac92798bSmrg# Note that if there is a possibility the first call to 9834ac92798bSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 9835ac92798bSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9836ac92798bSmrg# 9837ac92798bSmrg# 9838ac92798bSmrg# -------------------------------------------------------------- 9839ac92798bSmrgAC_DEFUN([PKG_CHECK_MODULES], 9840ac92798bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9841ac92798bSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9842ac92798bSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9843ac92798bSmrg 9844ac92798bSmrgpkg_failed=no 9845ac92798bSmrgAC_MSG_CHECKING([for $1]) 9846ac92798bSmrg 9847ac92798bSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9848ac92798bSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9849ac92798bSmrg 9850ac92798bSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9851ac92798bSmrgand $1[]_LIBS to avoid the need to call pkg-config. 9852ac92798bSmrgSee the pkg-config man page for more details.]) 9853ac92798bSmrg 9854ac92798bSmrgif test $pkg_failed = yes; then 9855ac92798bSmrg _PKG_SHORT_ERRORS_SUPPORTED 9856ac92798bSmrg if test $_pkg_short_errors_supported = yes; then 9857ac92798bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9858ac92798bSmrg else 9859ac92798bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9860ac92798bSmrg fi 9861ac92798bSmrg # Put the nasty error message in config.log where it belongs 9862ac92798bSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9863ac92798bSmrg 9864ac92798bSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 9865ac92798bSmrg[Package requirements ($2) were not met: 9866ac92798bSmrg 9867ac92798bSmrg$$1_PKG_ERRORS 9868ac92798bSmrg 9869ac92798bSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9870ac92798bSmrginstalled software in a non-standard prefix. 9871ac92798bSmrg 9872ac92798bSmrg_PKG_TEXT 9873ac92798bSmrg])], 9874ac92798bSmrg [AC_MSG_RESULT([no]) 9875ac92798bSmrg $4]) 9876ac92798bSmrgelif test $pkg_failed = untried; then 9877ac92798bSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 9878ac92798bSmrg[The pkg-config script could not be found or is too old. Make sure it 9879ac92798bSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 9880ac92798bSmrgpath to pkg-config. 9881ac92798bSmrg 9882ac92798bSmrg_PKG_TEXT 9883ac92798bSmrg 9884ac92798bSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9885ac92798bSmrg [$4]) 9886ac92798bSmrgelse 9887ac92798bSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9888ac92798bSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9889ac92798bSmrg AC_MSG_RESULT([yes]) 9890ac92798bSmrg ifelse([$3], , :, [$3]) 9891ac92798bSmrgfi[]dnl 9892ac92798bSmrg])# PKG_CHECK_MODULES 9893ac92798bSmrg 989497cf2ee2Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 989597cf2ee2Smrgdnl 989697cf2ee2Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9897ac92798bSmrgdnl 989897cf2ee2Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 989997cf2ee2Smrgdnl copy of this software and associated documentation files (the "Software"), 990097cf2ee2Smrgdnl to deal in the Software without restriction, including without limitation 990197cf2ee2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 990297cf2ee2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 990397cf2ee2Smrgdnl Software is furnished to do so, subject to the following conditions: 990497cf2ee2Smrgdnl 990597cf2ee2Smrgdnl The above copyright notice and this permission notice (including the next 990697cf2ee2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 990797cf2ee2Smrgdnl Software. 990897cf2ee2Smrgdnl 990997cf2ee2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 991097cf2ee2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 991197cf2ee2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 991297cf2ee2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 991397cf2ee2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 991497cf2ee2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 991597cf2ee2Smrgdnl DEALINGS IN THE SOFTWARE. 9916a966c04fSmrg 991797cf2ee2Smrg# XORG_MACROS_VERSION(required-version) 991897cf2ee2Smrg# ------------------------------------- 991997cf2ee2Smrg# Minimum version: 1.1.0 992097cf2ee2Smrg# 992197cf2ee2Smrg# If you're using a macro added in Version 1.1 or newer, include this in 992297cf2ee2Smrg# your configure.ac with the minimum required version, such as: 992397cf2ee2Smrg# XORG_MACROS_VERSION(1.1) 992497cf2ee2Smrg# 992597cf2ee2Smrg# To ensure that this macro is defined, also add: 992697cf2ee2Smrg# m4_ifndef([XORG_MACROS_VERSION], 992797cf2ee2Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 992897cf2ee2Smrg# 992997cf2ee2Smrg# 9930ac92798bSmrg# See the "minimum version" comment for each macro you use to see what 993197cf2ee2Smrg# version you require. 993297cf2ee2Smrgm4_defun([XORG_MACROS_VERSION],[ 9933ac92798bSmrgm4_define([vers_have], [1.17.1]) 993497cf2ee2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 993597cf2ee2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 993697cf2ee2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 993797cf2ee2Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 993897cf2ee2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 993997cf2ee2Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 994097cf2ee2Smrgm4_undefine([vers_have]) 994197cf2ee2Smrgm4_undefine([maj_have]) 994297cf2ee2Smrgm4_undefine([maj_needed]) 994397cf2ee2Smrg]) # XORG_MACROS_VERSION 9944a966c04fSmrg 994597cf2ee2Smrg# XORG_PROG_RAWCPP() 994697cf2ee2Smrg# ------------------ 994797cf2ee2Smrg# Minimum version: 1.0.0 994897cf2ee2Smrg# 994997cf2ee2Smrg# Find cpp program and necessary flags for use in pre-processing text files 995097cf2ee2Smrg# such as man pages and config files 995197cf2ee2SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 995297cf2ee2SmrgAC_REQUIRE([AC_PROG_CPP]) 9953ac92798bSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 995497cf2ee2Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9955a966c04fSmrg 995697cf2ee2Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 995797cf2ee2Smrg# which is not the best choice for supporting other OS'es, but covers most 995897cf2ee2Smrg# of the ones we need for now. 995997cf2ee2SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 996097cf2ee2SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 996197cf2ee2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 996297cf2ee2Smrg AC_MSG_RESULT([no]) 996397cf2ee2Smrgelse 996497cf2ee2Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 996597cf2ee2Smrg RAWCPPFLAGS=-undef 996697cf2ee2Smrg AC_MSG_RESULT([yes]) 996797cf2ee2Smrg # under Cygwin unix is still defined even with -undef 996897cf2ee2Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 996997cf2ee2Smrg RAWCPPFLAGS="-undef -ansi" 997097cf2ee2Smrg AC_MSG_RESULT([yes, with -ansi]) 997197cf2ee2Smrg else 997297cf2ee2Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 997397cf2ee2Smrg fi 997497cf2ee2Smrgfi 997597cf2ee2Smrgrm -f conftest.$ac_ext 9976a966c04fSmrg 997797cf2ee2SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 997897cf2ee2SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 997997cf2ee2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 998097cf2ee2Smrg AC_MSG_RESULT([no]) 998197cf2ee2Smrgelse 998297cf2ee2Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 998397cf2ee2Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 998497cf2ee2Smrg AC_MSG_RESULT([yes]) 998597cf2ee2Smrg else 998697cf2ee2Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 998797cf2ee2Smrg fi 998897cf2ee2Smrgfi 998997cf2ee2Smrgrm -f conftest.$ac_ext 999097cf2ee2SmrgAC_SUBST(RAWCPPFLAGS) 999197cf2ee2Smrg]) # XORG_PROG_RAWCPP 99926e7d3316Smrg 999397cf2ee2Smrg# XORG_MANPAGE_SECTIONS() 999497cf2ee2Smrg# ----------------------- 999597cf2ee2Smrg# Minimum version: 1.0.0 999697cf2ee2Smrg# 999797cf2ee2Smrg# Determine which sections man pages go in for the different man page types 999897cf2ee2Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 999997cf2ee2Smrg# Not sure if there's any better way than just hardcoding by OS name. 1000097cf2ee2Smrg# Override default settings by setting environment variables 1000197cf2ee2Smrg# Added MAN_SUBSTS in version 1.8 1000297cf2ee2Smrg# Added AC_PROG_SED in version 1.8 10003a966c04fSmrg 1000497cf2ee2SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1000597cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1000697cf2ee2SmrgAC_REQUIRE([AC_PROG_SED]) 10007a966c04fSmrg 1000897cf2ee2Smrgif test x$APP_MAN_SUFFIX = x ; then 1000997cf2ee2Smrg APP_MAN_SUFFIX=1 1001097cf2ee2Smrgfi 1001197cf2ee2Smrgif test x$APP_MAN_DIR = x ; then 1001297cf2ee2Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1001397cf2ee2Smrgfi 10014a966c04fSmrg 1001597cf2ee2Smrgif test x$LIB_MAN_SUFFIX = x ; then 1001697cf2ee2Smrg LIB_MAN_SUFFIX=3 1001797cf2ee2Smrgfi 1001897cf2ee2Smrgif test x$LIB_MAN_DIR = x ; then 1001997cf2ee2Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1002097cf2ee2Smrgfi 10021a966c04fSmrg 1002297cf2ee2Smrgif test x$FILE_MAN_SUFFIX = x ; then 1002397cf2ee2Smrg case $host_os in 1002497cf2ee2Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1002597cf2ee2Smrg *) FILE_MAN_SUFFIX=5 ;; 1002697cf2ee2Smrg esac 1002797cf2ee2Smrgfi 1002897cf2ee2Smrgif test x$FILE_MAN_DIR = x ; then 1002997cf2ee2Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1003097cf2ee2Smrgfi 10031a966c04fSmrg 1003297cf2ee2Smrgif test x$MISC_MAN_SUFFIX = x ; then 1003397cf2ee2Smrg case $host_os in 1003497cf2ee2Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1003597cf2ee2Smrg *) MISC_MAN_SUFFIX=7 ;; 1003697cf2ee2Smrg esac 1003797cf2ee2Smrgfi 1003897cf2ee2Smrgif test x$MISC_MAN_DIR = x ; then 1003997cf2ee2Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1004097cf2ee2Smrgfi 10041a966c04fSmrg 1004297cf2ee2Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1004397cf2ee2Smrg case $host_os in 1004497cf2ee2Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1004597cf2ee2Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1004697cf2ee2Smrg esac 1004797cf2ee2Smrgfi 1004897cf2ee2Smrgif test x$DRIVER_MAN_DIR = x ; then 1004997cf2ee2Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1005097cf2ee2Smrgfi 10051a966c04fSmrg 1005297cf2ee2Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1005397cf2ee2Smrg case $host_os in 1005497cf2ee2Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1005597cf2ee2Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1005697cf2ee2Smrg esac 1005797cf2ee2Smrgfi 1005897cf2ee2Smrgif test x$ADMIN_MAN_DIR = x ; then 1005997cf2ee2Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1006097cf2ee2Smrgfi 10061a966c04fSmrg 10062a966c04fSmrg 1006397cf2ee2SmrgAC_SUBST([APP_MAN_SUFFIX]) 1006497cf2ee2SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1006597cf2ee2SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1006697cf2ee2SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1006797cf2ee2SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1006897cf2ee2SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1006997cf2ee2SmrgAC_SUBST([APP_MAN_DIR]) 1007097cf2ee2SmrgAC_SUBST([LIB_MAN_DIR]) 1007197cf2ee2SmrgAC_SUBST([FILE_MAN_DIR]) 1007297cf2ee2SmrgAC_SUBST([MISC_MAN_DIR]) 1007397cf2ee2SmrgAC_SUBST([DRIVER_MAN_DIR]) 1007497cf2ee2SmrgAC_SUBST([ADMIN_MAN_DIR]) 100756e7d3316Smrg 1007697cf2ee2SmrgXORG_MAN_PAGE="X Version 11" 1007797cf2ee2SmrgAC_SUBST([XORG_MAN_PAGE]) 1007897cf2ee2SmrgMAN_SUBSTS="\ 1007997cf2ee2Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1008097cf2ee2Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1008197cf2ee2Smrg -e 's|__xservername__|Xorg|g' \ 1008297cf2ee2Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1008397cf2ee2Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1008497cf2ee2Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1008597cf2ee2Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1008697cf2ee2Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1008797cf2ee2Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1008897cf2ee2Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1008997cf2ee2Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1009097cf2ee2Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1009197cf2ee2SmrgAC_SUBST([MAN_SUBSTS]) 10092a966c04fSmrg 1009397cf2ee2Smrg]) # XORG_MANPAGE_SECTIONS 10094a966c04fSmrg 1009597cf2ee2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1009697cf2ee2Smrg# ------------------------ 1009797cf2ee2Smrg# Minimum version: 1.7.0 100986e7d3316Smrg# 1009997cf2ee2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1010097cf2ee2Smrg# provided by xorg-sgml-doctools, if installed. 1010197cf2ee2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1010297cf2ee2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1010397cf2ee2SmrgXORG_SGML_PATH= 1010497cf2ee2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1010597cf2ee2Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1010697cf2ee2Smrg [m4_ifval([$1],[:], 1010797cf2ee2Smrg [if test x"$cross_compiling" != x"yes" ; then 1010897cf2ee2Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1010997cf2ee2Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1011097cf2ee2Smrg fi]) 1011197cf2ee2Smrg ]) 10112a966c04fSmrg 1011397cf2ee2Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1011497cf2ee2Smrg# the path and the name of the doc stylesheet 1011597cf2ee2Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1011697cf2ee2Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1011797cf2ee2Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1011897cf2ee2Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1011997cf2ee2Smrgelse 1012097cf2ee2Smrg AC_MSG_RESULT([no]) 1012197cf2ee2Smrgfi 10122a966c04fSmrg 1012397cf2ee2SmrgAC_SUBST(XORG_SGML_PATH) 1012497cf2ee2SmrgAC_SUBST(STYLESHEET_SRCDIR) 1012597cf2ee2SmrgAC_SUBST(XSL_STYLESHEET) 1012697cf2ee2SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1012797cf2ee2Smrg]) # XORG_CHECK_SGML_DOCTOOLS 10128a966c04fSmrg 1012997cf2ee2Smrg# XORG_CHECK_LINUXDOC 1013097cf2ee2Smrg# ------------------- 1013197cf2ee2Smrg# Minimum version: 1.0.0 1013297cf2ee2Smrg# 1013397cf2ee2Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1013497cf2ee2Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1013597cf2ee2Smrg# Whether or not the necessary tools and files are found can be checked 1013697cf2ee2Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1013797cf2ee2SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1013897cf2ee2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1013997cf2ee2SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10140a966c04fSmrg 1014197cf2ee2SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10142a966c04fSmrg 1014397cf2ee2SmrgAC_MSG_CHECKING([whether to build documentation]) 10144a966c04fSmrg 1014597cf2ee2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1014697cf2ee2Smrg BUILDDOC=yes 1014797cf2ee2Smrgelse 1014897cf2ee2Smrg BUILDDOC=no 1014997cf2ee2Smrgfi 10150a966c04fSmrg 1015197cf2ee2SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 101526e7d3316Smrg 1015397cf2ee2SmrgAC_MSG_RESULT([$BUILDDOC]) 101546e7d3316Smrg 1015597cf2ee2SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10156a966c04fSmrg 1015797cf2ee2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1015897cf2ee2Smrg BUILDPDFDOC=yes 1015997cf2ee2Smrgelse 1016097cf2ee2Smrg BUILDPDFDOC=no 1016197cf2ee2Smrgfi 10162a966c04fSmrg 1016397cf2ee2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 101646e7d3316Smrg 1016597cf2ee2SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 101666e7d3316Smrg 1016797cf2ee2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1016897cf2ee2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1016997cf2ee2SmrgMAKE_PDF="$PS2PDF" 1017097cf2ee2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 101716e7d3316Smrg 1017297cf2ee2SmrgAC_SUBST(MAKE_TEXT) 1017397cf2ee2SmrgAC_SUBST(MAKE_PS) 1017497cf2ee2SmrgAC_SUBST(MAKE_PDF) 1017597cf2ee2SmrgAC_SUBST(MAKE_HTML) 1017697cf2ee2Smrg]) # XORG_CHECK_LINUXDOC 101776e7d3316Smrg 1017897cf2ee2Smrg# XORG_CHECK_DOCBOOK 1017997cf2ee2Smrg# ------------------- 1018097cf2ee2Smrg# Minimum version: 1.0.0 1018197cf2ee2Smrg# 1018297cf2ee2Smrg# Checks for the ability to build output formats from SGML DocBook source. 1018397cf2ee2Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1018497cf2ee2Smrg# indicates whether the necessary tools and files are found and, if set, 1018597cf2ee2Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1018697cf2ee2SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1018797cf2ee2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10188a966c04fSmrg 1018997cf2ee2SmrgBUILDTXTDOC=no 1019097cf2ee2SmrgBUILDPDFDOC=no 1019197cf2ee2SmrgBUILDPSDOC=no 1019297cf2ee2SmrgBUILDHTMLDOC=no 10193a966c04fSmrg 1019497cf2ee2SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1019597cf2ee2SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1019697cf2ee2SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1019797cf2ee2SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10198a966c04fSmrg 1019997cf2ee2SmrgAC_MSG_CHECKING([whether to build text documentation]) 1020097cf2ee2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1020197cf2ee2Smrg test x$BUILD_TXTDOC != xno; then 1020297cf2ee2Smrg BUILDTXTDOC=yes 1020397cf2ee2Smrgfi 1020497cf2ee2SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1020597cf2ee2SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10206a966c04fSmrg 1020797cf2ee2SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1020897cf2ee2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1020997cf2ee2Smrg test x$BUILD_PDFDOC != xno; then 1021097cf2ee2Smrg BUILDPDFDOC=yes 1021197cf2ee2Smrgfi 1021297cf2ee2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1021397cf2ee2SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10214a966c04fSmrg 1021597cf2ee2SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1021697cf2ee2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1021797cf2ee2Smrg test x$BUILD_PSDOC != xno; then 1021897cf2ee2Smrg BUILDPSDOC=yes 1021997cf2ee2Smrgfi 1022097cf2ee2SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1022197cf2ee2SmrgAC_MSG_RESULT([$BUILDPSDOC]) 10222a966c04fSmrg 1022397cf2ee2SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1022497cf2ee2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1022597cf2ee2Smrg test x$BUILD_HTMLDOC != xno; then 1022697cf2ee2Smrg BUILDHTMLDOC=yes 1022797cf2ee2Smrgfi 1022897cf2ee2SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1022997cf2ee2SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10230a966c04fSmrg 1023197cf2ee2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1023297cf2ee2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1023397cf2ee2SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1023497cf2ee2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10235a966c04fSmrg 1023697cf2ee2SmrgAC_SUBST(MAKE_TEXT) 1023797cf2ee2SmrgAC_SUBST(MAKE_PS) 1023897cf2ee2SmrgAC_SUBST(MAKE_PDF) 1023997cf2ee2SmrgAC_SUBST(MAKE_HTML) 1024097cf2ee2Smrg]) # XORG_CHECK_DOCBOOK 10241a966c04fSmrg 1024297cf2ee2Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1024397cf2ee2Smrg# ---------------- 1024497cf2ee2Smrg# Minimum version: 1.5.0 1024597cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1024697cf2ee2Smrg# 1024797cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1024897cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1024997cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1025097cf2ee2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1025197cf2ee2Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1025297cf2ee2Smrg# --with-xmlto assumes 'auto'. 1025397cf2ee2Smrg# 1025497cf2ee2Smrg# Interface to module: 1025597cf2ee2Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1025697cf2ee2Smrg# XMLTO: returns the path of the xmlto program found 1025797cf2ee2Smrg# returns the path set by the user in the environment 1025897cf2ee2Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1025997cf2ee2Smrg# 'no' user instructs the module not to use xmlto 1026097cf2ee2Smrg# 1026197cf2ee2Smrg# Added in version 1.10.0 1026297cf2ee2Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1026397cf2ee2Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1026497cf2ee2Smrg# 1026597cf2ee2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1026697cf2ee2Smrg# 1026797cf2ee2SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1026897cf2ee2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1026997cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1027097cf2ee2SmrgAC_ARG_WITH(xmlto, 1027197cf2ee2Smrg AS_HELP_STRING([--with-xmlto], 1027297cf2ee2Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1027397cf2ee2Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1027497cf2ee2Smrgm4_undefine([_defopt]) 10275a966c04fSmrg 1027697cf2ee2Smrgif test "x$use_xmlto" = x"auto"; then 1027797cf2ee2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1027897cf2ee2Smrg if test "x$XMLTO" = "x"; then 1027997cf2ee2Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1028097cf2ee2Smrg have_xmlto=no 1028197cf2ee2Smrg else 1028297cf2ee2Smrg have_xmlto=yes 1028397cf2ee2Smrg fi 1028497cf2ee2Smrgelif test "x$use_xmlto" = x"yes" ; then 1028597cf2ee2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1028697cf2ee2Smrg if test "x$XMLTO" = "x"; then 1028797cf2ee2Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1028897cf2ee2Smrg fi 1028997cf2ee2Smrg have_xmlto=yes 1029097cf2ee2Smrgelif test "x$use_xmlto" = x"no" ; then 1029197cf2ee2Smrg if test "x$XMLTO" != "x"; then 1029297cf2ee2Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1029397cf2ee2Smrg fi 1029497cf2ee2Smrg have_xmlto=no 1029597cf2ee2Smrgelse 1029697cf2ee2Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1029797cf2ee2Smrgfi 10298a966c04fSmrg 1029997cf2ee2Smrg# Test for a minimum version of xmlto, if provided. 1030097cf2ee2Smrgm4_ifval([$1], 1030197cf2ee2Smrg[if test "$have_xmlto" = yes; then 1030297cf2ee2Smrg # scrape the xmlto version 1030397cf2ee2Smrg AC_MSG_CHECKING([the xmlto version]) 1030497cf2ee2Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1030597cf2ee2Smrg AC_MSG_RESULT([$xmlto_version]) 1030697cf2ee2Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1030797cf2ee2Smrg [if test "x$use_xmlto" = xauto; then 1030897cf2ee2Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1030997cf2ee2Smrg have_xmlto=no 1031097cf2ee2Smrg else 1031197cf2ee2Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1031297cf2ee2Smrg fi]) 1031397cf2ee2Smrgfi]) 10314a966c04fSmrg 1031597cf2ee2Smrg# Test for the ability of xmlto to generate a text target 1031697cf2ee2Smrghave_xmlto_text=no 1031797cf2ee2Smrgcat > conftest.xml << "EOF" 1031897cf2ee2SmrgEOF 1031997cf2ee2SmrgAS_IF([test "$have_xmlto" = yes], 1032097cf2ee2Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1032197cf2ee2Smrg [have_xmlto_text=yes], 1032297cf2ee2Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1032397cf2ee2Smrgrm -f conftest.xml 1032497cf2ee2SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1032597cf2ee2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1032697cf2ee2Smrg]) # XORG_WITH_XMLTO 10327a966c04fSmrg 1032897cf2ee2Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1032997cf2ee2Smrg# -------------------------------------------- 1033097cf2ee2Smrg# Minimum version: 1.12.0 1033197cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1033297cf2ee2Smrg# 1033397cf2ee2Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1033497cf2ee2Smrg# XML-based language used for the transformation of XML documents. 1033597cf2ee2Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1033697cf2ee2Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1033797cf2ee2Smrg# The XSLT processor is often used as a standalone tool for transformations. 1033897cf2ee2Smrg# It should not be assumed that this tool is used only to work with documnetation. 1033997cf2ee2Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1034097cf2ee2Smrg# 1034197cf2ee2Smrg# Interface to module: 1034297cf2ee2Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1034397cf2ee2Smrg# XSLTPROC: returns the path of the xsltproc program found 1034497cf2ee2Smrg# returns the path set by the user in the environment 1034597cf2ee2Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1034697cf2ee2Smrg# 'no' user instructs the module not to use xsltproc 1034797cf2ee2Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1034897cf2ee2Smrg# 1034997cf2ee2Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1035097cf2ee2Smrg# 1035197cf2ee2SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1035297cf2ee2SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1035397cf2ee2Smrg# Preserves the interface, should it be implemented later 1035497cf2ee2Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1035597cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1035697cf2ee2SmrgAC_ARG_WITH(xsltproc, 1035797cf2ee2Smrg AS_HELP_STRING([--with-xsltproc], 1035897cf2ee2Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1035997cf2ee2Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1036097cf2ee2Smrgm4_undefine([_defopt]) 10361a966c04fSmrg 1036297cf2ee2Smrgif test "x$use_xsltproc" = x"auto"; then 1036397cf2ee2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1036497cf2ee2Smrg if test "x$XSLTPROC" = "x"; then 1036597cf2ee2Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1036697cf2ee2Smrg have_xsltproc=no 1036797cf2ee2Smrg else 1036897cf2ee2Smrg have_xsltproc=yes 1036997cf2ee2Smrg fi 1037097cf2ee2Smrgelif test "x$use_xsltproc" = x"yes" ; then 1037197cf2ee2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1037297cf2ee2Smrg if test "x$XSLTPROC" = "x"; then 1037397cf2ee2Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1037497cf2ee2Smrg fi 1037597cf2ee2Smrg have_xsltproc=yes 1037697cf2ee2Smrgelif test "x$use_xsltproc" = x"no" ; then 1037797cf2ee2Smrg if test "x$XSLTPROC" != "x"; then 1037897cf2ee2Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1037997cf2ee2Smrg fi 1038097cf2ee2Smrg have_xsltproc=no 1038197cf2ee2Smrgelse 1038297cf2ee2Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1038397cf2ee2Smrgfi 10384a966c04fSmrg 1038597cf2ee2SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1038697cf2ee2Smrg]) # XORG_WITH_XSLTPROC 10387a966c04fSmrg 1038897cf2ee2Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1038997cf2ee2Smrg# ---------------------------------------- 1039097cf2ee2Smrg# Minimum version: 1.15.0 1039197cf2ee2Smrg# 1039297cf2ee2Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1039397cf2ee2Smrg# scanning arbitrary text files, extracting information from those text files, 1039497cf2ee2Smrg# and printing reports based on that information. 1039597cf2ee2Smrg# 1039697cf2ee2Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1039797cf2ee2Smrg# 1039897cf2ee2Smrg# Interface to module: 1039997cf2ee2Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1040097cf2ee2Smrg# PERL: returns the path of the perl program found 1040197cf2ee2Smrg# returns the path set by the user in the environment 1040297cf2ee2Smrg# --with-perl: 'yes' user instructs the module to use perl 1040397cf2ee2Smrg# 'no' user instructs the module not to use perl 1040497cf2ee2Smrg# have_perl: returns yes if perl found in PATH or no 1040597cf2ee2Smrg# 1040697cf2ee2Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1040797cf2ee2Smrg# 1040897cf2ee2SmrgAC_DEFUN([XORG_WITH_PERL],[ 1040997cf2ee2SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1041097cf2ee2Smrg# Preserves the interface, should it be implemented later 1041197cf2ee2Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1041297cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1041397cf2ee2SmrgAC_ARG_WITH(perl, 1041497cf2ee2Smrg AS_HELP_STRING([--with-perl], 1041597cf2ee2Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1041697cf2ee2Smrg [use_perl=$withval], [use_perl=]_defopt) 1041797cf2ee2Smrgm4_undefine([_defopt]) 10418a966c04fSmrg 1041997cf2ee2Smrgif test "x$use_perl" = x"auto"; then 1042097cf2ee2Smrg AC_PATH_PROG([PERL], [perl]) 1042197cf2ee2Smrg if test "x$PERL" = "x"; then 1042297cf2ee2Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1042397cf2ee2Smrg have_perl=no 1042497cf2ee2Smrg else 1042597cf2ee2Smrg have_perl=yes 1042697cf2ee2Smrg fi 1042797cf2ee2Smrgelif test "x$use_perl" = x"yes" ; then 1042897cf2ee2Smrg AC_PATH_PROG([PERL], [perl]) 1042997cf2ee2Smrg if test "x$PERL" = "x"; then 1043097cf2ee2Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1043197cf2ee2Smrg fi 1043297cf2ee2Smrg have_perl=yes 1043397cf2ee2Smrgelif test "x$use_perl" = x"no" ; then 1043497cf2ee2Smrg if test "x$PERL" != "x"; then 1043597cf2ee2Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1043697cf2ee2Smrg fi 1043797cf2ee2Smrg have_perl=no 1043897cf2ee2Smrgelse 1043997cf2ee2Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1044097cf2ee2Smrgfi 10441a966c04fSmrg 1044297cf2ee2SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1044397cf2ee2Smrg]) # XORG_WITH_PERL 10444a966c04fSmrg 1044597cf2ee2Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1044697cf2ee2Smrg# ---------------- 1044797cf2ee2Smrg# Minimum version: 1.5.0 1044897cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1044997cf2ee2Smrg# 1045097cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1045197cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1045297cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1045397cf2ee2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1045497cf2ee2Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1045597cf2ee2Smrg# --with-asciidoc assumes 'auto'. 1045697cf2ee2Smrg# 1045797cf2ee2Smrg# Interface to module: 1045897cf2ee2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1045997cf2ee2Smrg# ASCIIDOC: returns the path of the asciidoc program found 1046097cf2ee2Smrg# returns the path set by the user in the environment 1046197cf2ee2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1046297cf2ee2Smrg# 'no' user instructs the module not to use asciidoc 1046397cf2ee2Smrg# 1046497cf2ee2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1046597cf2ee2Smrg# 1046697cf2ee2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1046797cf2ee2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1046897cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1046997cf2ee2SmrgAC_ARG_WITH(asciidoc, 1047097cf2ee2Smrg AS_HELP_STRING([--with-asciidoc], 1047197cf2ee2Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1047297cf2ee2Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1047397cf2ee2Smrgm4_undefine([_defopt]) 10474a966c04fSmrg 1047597cf2ee2Smrgif test "x$use_asciidoc" = x"auto"; then 1047697cf2ee2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1047797cf2ee2Smrg if test "x$ASCIIDOC" = "x"; then 1047897cf2ee2Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1047997cf2ee2Smrg have_asciidoc=no 1048097cf2ee2Smrg else 1048197cf2ee2Smrg have_asciidoc=yes 1048297cf2ee2Smrg fi 1048397cf2ee2Smrgelif test "x$use_asciidoc" = x"yes" ; then 1048497cf2ee2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1048597cf2ee2Smrg if test "x$ASCIIDOC" = "x"; then 1048697cf2ee2Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1048797cf2ee2Smrg fi 1048897cf2ee2Smrg have_asciidoc=yes 1048997cf2ee2Smrgelif test "x$use_asciidoc" = x"no" ; then 1049097cf2ee2Smrg if test "x$ASCIIDOC" != "x"; then 1049197cf2ee2Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1049297cf2ee2Smrg fi 1049397cf2ee2Smrg have_asciidoc=no 1049497cf2ee2Smrgelse 1049597cf2ee2Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1049697cf2ee2Smrgfi 1049797cf2ee2Smrgm4_ifval([$1], 1049897cf2ee2Smrg[if test "$have_asciidoc" = yes; then 1049997cf2ee2Smrg # scrape the asciidoc version 1050097cf2ee2Smrg AC_MSG_CHECKING([the asciidoc version]) 1050197cf2ee2Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1050297cf2ee2Smrg AC_MSG_RESULT([$asciidoc_version]) 1050397cf2ee2Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1050497cf2ee2Smrg [if test "x$use_asciidoc" = xauto; then 1050597cf2ee2Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1050697cf2ee2Smrg have_asciidoc=no 1050797cf2ee2Smrg else 1050897cf2ee2Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1050997cf2ee2Smrg fi]) 1051097cf2ee2Smrgfi]) 1051197cf2ee2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1051297cf2ee2Smrg]) # XORG_WITH_ASCIIDOC 10513a966c04fSmrg 1051497cf2ee2Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1051597cf2ee2Smrg# -------------------------------- 1051697cf2ee2Smrg# Minimum version: 1.5.0 1051797cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1051897cf2ee2Smrg# 1051997cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1052097cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1052197cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1052297cf2ee2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1052397cf2ee2Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1052497cf2ee2Smrg# --with-doxygen assumes 'auto'. 1052597cf2ee2Smrg# 1052697cf2ee2Smrg# Interface to module: 1052797cf2ee2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1052897cf2ee2Smrg# DOXYGEN: returns the path of the doxygen program found 1052997cf2ee2Smrg# returns the path set by the user in the environment 1053097cf2ee2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1053197cf2ee2Smrg# 'no' user instructs the module not to use doxygen 1053297cf2ee2Smrg# 1053397cf2ee2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1053497cf2ee2Smrg# 1053597cf2ee2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1053697cf2ee2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1053797cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1053897cf2ee2SmrgAC_ARG_WITH(doxygen, 1053997cf2ee2Smrg AS_HELP_STRING([--with-doxygen], 1054097cf2ee2Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1054197cf2ee2Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1054297cf2ee2Smrgm4_undefine([_defopt]) 10543a966c04fSmrg 1054497cf2ee2Smrgif test "x$use_doxygen" = x"auto"; then 1054597cf2ee2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1054697cf2ee2Smrg if test "x$DOXYGEN" = "x"; then 1054797cf2ee2Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1054897cf2ee2Smrg have_doxygen=no 1054997cf2ee2Smrg else 1055097cf2ee2Smrg have_doxygen=yes 1055197cf2ee2Smrg fi 1055297cf2ee2Smrgelif test "x$use_doxygen" = x"yes" ; then 1055397cf2ee2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1055497cf2ee2Smrg if test "x$DOXYGEN" = "x"; then 1055597cf2ee2Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1055697cf2ee2Smrg fi 1055797cf2ee2Smrg have_doxygen=yes 1055897cf2ee2Smrgelif test "x$use_doxygen" = x"no" ; then 1055997cf2ee2Smrg if test "x$DOXYGEN" != "x"; then 1056097cf2ee2Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1056197cf2ee2Smrg fi 1056297cf2ee2Smrg have_doxygen=no 1056397cf2ee2Smrgelse 1056497cf2ee2Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1056597cf2ee2Smrgfi 1056697cf2ee2Smrgm4_ifval([$1], 1056797cf2ee2Smrg[if test "$have_doxygen" = yes; then 1056897cf2ee2Smrg # scrape the doxygen version 1056997cf2ee2Smrg AC_MSG_CHECKING([the doxygen version]) 1057097cf2ee2Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1057197cf2ee2Smrg AC_MSG_RESULT([$doxygen_version]) 1057297cf2ee2Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1057397cf2ee2Smrg [if test "x$use_doxygen" = xauto; then 1057497cf2ee2Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1057597cf2ee2Smrg have_doxygen=no 1057697cf2ee2Smrg else 1057797cf2ee2Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1057897cf2ee2Smrg fi]) 1057997cf2ee2Smrgfi]) 1058097cf2ee2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1058197cf2ee2Smrg]) # XORG_WITH_DOXYGEN 10582a966c04fSmrg 1058397cf2ee2Smrg# XORG_WITH_GROFF([DEFAULT]) 1058497cf2ee2Smrg# ---------------- 1058597cf2ee2Smrg# Minimum version: 1.6.0 1058697cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1058797cf2ee2Smrg# 1058897cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1058997cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1059097cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1059197cf2ee2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1059297cf2ee2Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1059397cf2ee2Smrg# --with-groff assumes 'auto'. 1059497cf2ee2Smrg# 1059597cf2ee2Smrg# Interface to module: 1059697cf2ee2Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1059797cf2ee2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1059897cf2ee2Smrg# HAVE_GROFF_MS: the -ms macros package 1059997cf2ee2Smrg# GROFF: returns the path of the groff program found 1060097cf2ee2Smrg# returns the path set by the user in the environment 1060197cf2ee2Smrg# --with-groff: 'yes' user instructs the module to use groff 1060297cf2ee2Smrg# 'no' user instructs the module not to use groff 1060397cf2ee2Smrg# 1060497cf2ee2Smrg# Added in version 1.9.0: 1060597cf2ee2Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1060697cf2ee2Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1060797cf2ee2Smrg# psselect from the psutils package. 1060897cf2ee2Smrg# the ghostcript package. Refer to the grohtml man pages 1060997cf2ee2Smrg# 1061097cf2ee2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1061197cf2ee2Smrg# 1061297cf2ee2Smrg# OS and distros often splits groff in a basic and full package, the former 1061397cf2ee2Smrg# having the groff program and the later having devices, fonts and macros 1061497cf2ee2Smrg# Checking for the groff executable is not enough. 1061597cf2ee2Smrg# 1061697cf2ee2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1061797cf2ee2Smrg# unset HAVE_GROFF or GROFF env variables. 1061897cf2ee2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1061997cf2ee2Smrg# 1062097cf2ee2SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1062197cf2ee2SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1062297cf2ee2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1062397cf2ee2SmrgAC_ARG_WITH(groff, 1062497cf2ee2Smrg AS_HELP_STRING([--with-groff], 1062597cf2ee2Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1062697cf2ee2Smrg [use_groff=$withval], [use_groff=]_defopt) 1062797cf2ee2Smrgm4_undefine([_defopt]) 10628a966c04fSmrg 1062997cf2ee2Smrgif test "x$use_groff" = x"auto"; then 1063097cf2ee2Smrg AC_PATH_PROG([GROFF], [groff]) 1063197cf2ee2Smrg if test "x$GROFF" = "x"; then 1063297cf2ee2Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1063397cf2ee2Smrg have_groff=no 1063497cf2ee2Smrg else 1063597cf2ee2Smrg have_groff=yes 1063697cf2ee2Smrg fi 1063797cf2ee2Smrgelif test "x$use_groff" = x"yes" ; then 1063897cf2ee2Smrg AC_PATH_PROG([GROFF], [groff]) 1063997cf2ee2Smrg if test "x$GROFF" = "x"; then 1064097cf2ee2Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1064197cf2ee2Smrg fi 1064297cf2ee2Smrg have_groff=yes 1064397cf2ee2Smrgelif test "x$use_groff" = x"no" ; then 1064497cf2ee2Smrg if test "x$GROFF" != "x"; then 1064597cf2ee2Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1064697cf2ee2Smrg fi 1064797cf2ee2Smrg have_groff=no 1064897cf2ee2Smrgelse 1064997cf2ee2Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1065097cf2ee2Smrgfi 10651a966c04fSmrg 1065297cf2ee2Smrg# We have groff, test for the presence of the macro packages 1065397cf2ee2Smrgif test "x$have_groff" = x"yes"; then 1065497cf2ee2Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1065597cf2ee2Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1065697cf2ee2Smrg groff_ms_works=yes 1065797cf2ee2Smrg else 1065897cf2ee2Smrg groff_ms_works=no 1065997cf2ee2Smrg fi 1066097cf2ee2Smrg AC_MSG_RESULT([$groff_ms_works]) 1066197cf2ee2Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1066297cf2ee2Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1066397cf2ee2Smrg groff_mm_works=yes 1066497cf2ee2Smrg else 1066597cf2ee2Smrg groff_mm_works=no 1066697cf2ee2Smrg fi 1066797cf2ee2Smrg AC_MSG_RESULT([$groff_mm_works]) 1066897cf2ee2Smrgfi 10669a966c04fSmrg 1067097cf2ee2Smrg# We have groff, test for HTML dependencies, one command per package 1067197cf2ee2Smrgif test "x$have_groff" = x"yes"; then 1067297cf2ee2Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1067397cf2ee2Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1067497cf2ee2Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1067597cf2ee2Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1067697cf2ee2Smrg have_groff_html=yes 1067797cf2ee2Smrg else 1067897cf2ee2Smrg have_groff_html=no 1067997cf2ee2Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1068097cf2ee2Smrg fi 1068197cf2ee2Smrgfi 10682a966c04fSmrg 1068397cf2ee2Smrg# Set Automake conditionals for Makefiles 1068497cf2ee2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1068597cf2ee2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1068697cf2ee2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1068797cf2ee2SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1068897cf2ee2Smrg]) # XORG_WITH_GROFF 10689a966c04fSmrg 1069097cf2ee2Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1069197cf2ee2Smrg# --------------------------------------- 1069297cf2ee2Smrg# Minimum version: 1.6.0 1069397cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1069497cf2ee2Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1069597cf2ee2Smrg# 1069697cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1069797cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1069897cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1069997cf2ee2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1070097cf2ee2Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1070197cf2ee2Smrg# --with-fop assumes 'auto'. 1070297cf2ee2Smrg# 1070397cf2ee2Smrg# Interface to module: 1070497cf2ee2Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1070597cf2ee2Smrg# FOP: returns the path of the fop program found 1070697cf2ee2Smrg# returns the path set by the user in the environment 1070797cf2ee2Smrg# --with-fop: 'yes' user instructs the module to use fop 1070897cf2ee2Smrg# 'no' user instructs the module not to use fop 1070997cf2ee2Smrg# 1071097cf2ee2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1071197cf2ee2Smrg# 1071297cf2ee2SmrgAC_DEFUN([XORG_WITH_FOP],[ 1071397cf2ee2SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1071497cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1071597cf2ee2SmrgAC_ARG_WITH(fop, 1071697cf2ee2Smrg AS_HELP_STRING([--with-fop], 1071797cf2ee2Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1071897cf2ee2Smrg [use_fop=$withval], [use_fop=]_defopt) 1071997cf2ee2Smrgm4_undefine([_defopt]) 10720a966c04fSmrg 1072197cf2ee2Smrgif test "x$use_fop" = x"auto"; then 1072297cf2ee2Smrg AC_PATH_PROG([FOP], [fop]) 1072397cf2ee2Smrg if test "x$FOP" = "x"; then 1072497cf2ee2Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1072597cf2ee2Smrg have_fop=no 1072697cf2ee2Smrg else 1072797cf2ee2Smrg have_fop=yes 1072897cf2ee2Smrg fi 1072997cf2ee2Smrgelif test "x$use_fop" = x"yes" ; then 1073097cf2ee2Smrg AC_PATH_PROG([FOP], [fop]) 1073197cf2ee2Smrg if test "x$FOP" = "x"; then 1073297cf2ee2Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1073397cf2ee2Smrg fi 1073497cf2ee2Smrg have_fop=yes 1073597cf2ee2Smrgelif test "x$use_fop" = x"no" ; then 1073697cf2ee2Smrg if test "x$FOP" != "x"; then 1073797cf2ee2Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1073897cf2ee2Smrg fi 1073997cf2ee2Smrg have_fop=no 1074097cf2ee2Smrgelse 1074197cf2ee2Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1074297cf2ee2Smrgfi 10743a966c04fSmrg 1074497cf2ee2Smrg# Test for a minimum version of fop, if provided. 1074597cf2ee2Smrgm4_ifval([$1], 1074697cf2ee2Smrg[if test "$have_fop" = yes; then 1074797cf2ee2Smrg # scrape the fop version 1074897cf2ee2Smrg AC_MSG_CHECKING([for fop minimum version]) 1074997cf2ee2Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1075097cf2ee2Smrg AC_MSG_RESULT([$fop_version]) 1075197cf2ee2Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1075297cf2ee2Smrg [if test "x$use_fop" = xauto; then 1075397cf2ee2Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1075497cf2ee2Smrg have_fop=no 1075597cf2ee2Smrg else 1075697cf2ee2Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1075797cf2ee2Smrg fi]) 1075897cf2ee2Smrgfi]) 1075997cf2ee2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1076097cf2ee2Smrg]) # XORG_WITH_FOP 10761a966c04fSmrg 1076297cf2ee2Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1076397cf2ee2Smrg# ---------------- 1076497cf2ee2Smrg# Minimum version: 1.6.0 1076597cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1076697cf2ee2Smrg# 1076797cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1076897cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1076997cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1077097cf2ee2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1077197cf2ee2Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1077297cf2ee2Smrg# --with-ps2pdf assumes 'auto'. 1077397cf2ee2Smrg# 1077497cf2ee2Smrg# Interface to module: 1077597cf2ee2Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1077697cf2ee2Smrg# PS2PDF: returns the path of the ps2pdf program found 1077797cf2ee2Smrg# returns the path set by the user in the environment 1077897cf2ee2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1077997cf2ee2Smrg# 'no' user instructs the module not to use ps2pdf 1078097cf2ee2Smrg# 1078197cf2ee2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1078297cf2ee2Smrg# 1078397cf2ee2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1078497cf2ee2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1078597cf2ee2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1078697cf2ee2SmrgAC_ARG_WITH(ps2pdf, 1078797cf2ee2Smrg AS_HELP_STRING([--with-ps2pdf], 1078897cf2ee2Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1078997cf2ee2Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1079097cf2ee2Smrgm4_undefine([_defopt]) 10791a966c04fSmrg 1079297cf2ee2Smrgif test "x$use_ps2pdf" = x"auto"; then 1079397cf2ee2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1079497cf2ee2Smrg if test "x$PS2PDF" = "x"; then 1079597cf2ee2Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1079697cf2ee2Smrg have_ps2pdf=no 1079797cf2ee2Smrg else 1079897cf2ee2Smrg have_ps2pdf=yes 1079997cf2ee2Smrg fi 1080097cf2ee2Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1080197cf2ee2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1080297cf2ee2Smrg if test "x$PS2PDF" = "x"; then 1080397cf2ee2Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1080497cf2ee2Smrg fi 1080597cf2ee2Smrg have_ps2pdf=yes 1080697cf2ee2Smrgelif test "x$use_ps2pdf" = x"no" ; then 1080797cf2ee2Smrg if test "x$PS2PDF" != "x"; then 1080897cf2ee2Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1080997cf2ee2Smrg fi 1081097cf2ee2Smrg have_ps2pdf=no 1081197cf2ee2Smrgelse 1081297cf2ee2Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1081397cf2ee2Smrgfi 1081497cf2ee2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1081597cf2ee2Smrg]) # XORG_WITH_PS2PDF 10816a966c04fSmrg 1081797cf2ee2Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1081897cf2ee2Smrg# ---------------- 1081997cf2ee2Smrg# Minimum version: 1.6.0 1082097cf2ee2Smrg# 1082197cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1082297cf2ee2Smrg# not at the appropriate level. This macro enables a builder to skip all 1082397cf2ee2Smrg# documentation targets except traditional man pages. 1082497cf2ee2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1082597cf2ee2Smrg# maximum flexibilty in controlling documentation building. 1082697cf2ee2Smrg# Refer to: 1082797cf2ee2Smrg# XORG_WITH_XMLTO --with-xmlto 1082897cf2ee2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1082997cf2ee2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1083097cf2ee2Smrg# XORG_WITH_FOP --with-fop 1083197cf2ee2Smrg# XORG_WITH_GROFF --with-groff 1083297cf2ee2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1083397cf2ee2Smrg# 1083497cf2ee2Smrg# Interface to module: 1083597cf2ee2Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1083697cf2ee2Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1083797cf2ee2Smrg# 'no' user instructs the module not to generate docs 1083897cf2ee2Smrg# parm1: specify the default value, yes or no. 1083997cf2ee2Smrg# 1084097cf2ee2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1084197cf2ee2Smrgm4_define([docs_default], m4_default([$1], [yes])) 1084297cf2ee2SmrgAC_ARG_ENABLE(docs, 1084397cf2ee2Smrg AS_HELP_STRING([--enable-docs], 1084497cf2ee2Smrg [Enable building the documentation (default: ]docs_default[)]), 1084597cf2ee2Smrg [build_docs=$enableval], [build_docs=]docs_default) 1084697cf2ee2Smrgm4_undefine([docs_default]) 1084797cf2ee2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1084897cf2ee2SmrgAC_MSG_CHECKING([whether to build documentation]) 1084997cf2ee2SmrgAC_MSG_RESULT([$build_docs]) 1085097cf2ee2Smrg]) # XORG_ENABLE_DOCS 10851a966c04fSmrg 1085297cf2ee2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1085397cf2ee2Smrg# ---------------- 1085497cf2ee2Smrg# Minimum version: 1.6.0 1085597cf2ee2Smrg# 1085697cf2ee2Smrg# This macro enables a builder to skip all developer documentation. 1085797cf2ee2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1085897cf2ee2Smrg# maximum flexibilty in controlling documentation building. 1085997cf2ee2Smrg# Refer to: 1086097cf2ee2Smrg# XORG_WITH_XMLTO --with-xmlto 1086197cf2ee2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1086297cf2ee2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1086397cf2ee2Smrg# XORG_WITH_FOP --with-fop 1086497cf2ee2Smrg# XORG_WITH_GROFF --with-groff 1086597cf2ee2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1086697cf2ee2Smrg# 1086797cf2ee2Smrg# Interface to module: 1086897cf2ee2Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1086997cf2ee2Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1087097cf2ee2Smrg# 'no' user instructs the module not to generate developer docs 1087197cf2ee2Smrg# parm1: specify the default value, yes or no. 1087297cf2ee2Smrg# 1087397cf2ee2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1087497cf2ee2Smrgm4_define([devel_default], m4_default([$1], [yes])) 1087597cf2ee2SmrgAC_ARG_ENABLE(devel-docs, 1087697cf2ee2Smrg AS_HELP_STRING([--enable-devel-docs], 1087797cf2ee2Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1087897cf2ee2Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1087997cf2ee2Smrgm4_undefine([devel_default]) 1088097cf2ee2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1088197cf2ee2SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1088297cf2ee2SmrgAC_MSG_RESULT([$build_devel_docs]) 1088397cf2ee2Smrg]) # XORG_ENABLE_DEVEL_DOCS 10884a966c04fSmrg 1088597cf2ee2Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1088697cf2ee2Smrg# ---------------- 1088797cf2ee2Smrg# Minimum version: 1.6.0 1088897cf2ee2Smrg# 1088997cf2ee2Smrg# This macro enables a builder to skip all functional specification targets. 1089097cf2ee2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1089197cf2ee2Smrg# maximum flexibilty in controlling documentation building. 1089297cf2ee2Smrg# Refer to: 1089397cf2ee2Smrg# XORG_WITH_XMLTO --with-xmlto 1089497cf2ee2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1089597cf2ee2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1089697cf2ee2Smrg# XORG_WITH_FOP --with-fop 1089797cf2ee2Smrg# XORG_WITH_GROFF --with-groff 1089897cf2ee2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1089997cf2ee2Smrg# 1090097cf2ee2Smrg# Interface to module: 1090197cf2ee2Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1090297cf2ee2Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1090397cf2ee2Smrg# 'no' user instructs the module not to generate specs 1090497cf2ee2Smrg# parm1: specify the default value, yes or no. 1090597cf2ee2Smrg# 1090697cf2ee2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1090797cf2ee2Smrgm4_define([spec_default], m4_default([$1], [yes])) 1090897cf2ee2SmrgAC_ARG_ENABLE(specs, 1090997cf2ee2Smrg AS_HELP_STRING([--enable-specs], 1091097cf2ee2Smrg [Enable building the specs (default: ]spec_default[)]), 1091197cf2ee2Smrg [build_specs=$enableval], [build_specs=]spec_default) 1091297cf2ee2Smrgm4_undefine([spec_default]) 1091397cf2ee2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1091497cf2ee2SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1091597cf2ee2SmrgAC_MSG_RESULT([$build_specs]) 1091697cf2ee2Smrg]) # XORG_ENABLE_SPECS 10917a966c04fSmrg 1091897cf2ee2Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1091997cf2ee2Smrg# ---------------------------------------------- 1092097cf2ee2Smrg# Minimum version: 1.13.0 1092197cf2ee2Smrg# 1092297cf2ee2Smrg# This macro enables a builder to enable/disable unit testing 1092397cf2ee2Smrg# It makes no assumption about the test cases implementation 1092497cf2ee2Smrg# Test cases may or may not use Automake "Support for test suites" 1092597cf2ee2Smrg# They may or may not use the software utility library GLib 1092697cf2ee2Smrg# 1092797cf2ee2Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1092897cf2ee2Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1092997cf2ee2Smrg# The variable enable_unit_tests is used by other macros in this file. 1093097cf2ee2Smrg# 1093197cf2ee2Smrg# Interface to module: 1093297cf2ee2Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1093397cf2ee2Smrg# enable_unit_tests: used in configure.ac for additional configuration 1093497cf2ee2Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1093597cf2ee2Smrg# 'no' user instructs the module not to build tests 1093697cf2ee2Smrg# parm1: specify the default value, yes or no. 1093797cf2ee2Smrg# 1093897cf2ee2SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1093997cf2ee2SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1094097cf2ee2SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1094197cf2ee2SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1094297cf2ee2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1094397cf2ee2SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1094497cf2ee2Smrg [Enable building unit test cases (default: ]_defopt[)]), 1094597cf2ee2Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1094697cf2ee2Smrgm4_undefine([_defopt]) 1094797cf2ee2SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1094897cf2ee2SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1094997cf2ee2SmrgAC_MSG_RESULT([$enable_unit_tests]) 1095097cf2ee2Smrg]) # XORG_ENABLE_UNIT_TESTS 10951a966c04fSmrg 10952ac92798bSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10953ac92798bSmrg# ------------------------------------------------------ 10954ac92798bSmrg# Minimum version: 1.17.0 10955ac92798bSmrg# 10956ac92798bSmrg# This macro enables a builder to enable/disable integration testing 10957ac92798bSmrg# It makes no assumption about the test cases' implementation 10958ac92798bSmrg# Test cases may or may not use Automake "Support for test suites" 10959ac92798bSmrg# 10960ac92798bSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10961ac92798bSmrg# usually requires less dependencies and may be built and run under less 10962ac92798bSmrg# stringent environments than integration tests. 10963ac92798bSmrg# 10964ac92798bSmrg# Interface to module: 10965ac92798bSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10966ac92798bSmrg# enable_integration_tests: used in configure.ac for additional configuration 10967ac92798bSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10968ac92798bSmrg# 'no' user instructs the module not to build tests 10969ac92798bSmrg# parm1: specify the default value, yes or no. 10970ac92798bSmrg# 10971ac92798bSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10972ac92798bSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10973ac92798bSmrgm4_define([_defopt], m4_default([$1], [auto])) 10974ac92798bSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10975ac92798bSmrg [Enable building integration test cases (default: ]_defopt[)]), 10976ac92798bSmrg [enable_integration_tests=$enableval], 10977ac92798bSmrg [enable_integration_tests=]_defopt) 10978ac92798bSmrgm4_undefine([_defopt]) 10979ac92798bSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10980ac92798bSmrg [test "x$enable_integration_tests" != xno]) 10981ac92798bSmrgAC_MSG_CHECKING([whether to build unit test cases]) 10982ac92798bSmrgAC_MSG_RESULT([$enable_integration_tests]) 10983ac92798bSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 10984ac92798bSmrg 1098597cf2ee2Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1098697cf2ee2Smrg# ---------------------------------------- 1098797cf2ee2Smrg# Minimum version: 1.13.0 1098897cf2ee2Smrg# 1098997cf2ee2Smrg# GLib is a library which provides advanced data structures and functions. 1099097cf2ee2Smrg# This macro enables a module to test for the presence of Glib. 1099197cf2ee2Smrg# 1099297cf2ee2Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1099397cf2ee2Smrg# Otherwise the value of $enable_unit_tests is blank. 1099497cf2ee2Smrg# 10995ac92798bSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10996ac92798bSmrg# test support usually requires less dependencies and may be built and run under 10997ac92798bSmrg# less stringent environments than integration tests. 10998ac92798bSmrg# 1099997cf2ee2Smrg# Interface to module: 1100097cf2ee2Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1100197cf2ee2Smrg# with_glib: used in configure.ac to know if GLib has been found 1100297cf2ee2Smrg# --with-glib: 'yes' user instructs the module to use glib 1100397cf2ee2Smrg# 'no' user instructs the module not to use glib 1100497cf2ee2Smrg# 1100597cf2ee2SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1100697cf2ee2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1100797cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1100897cf2ee2SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1100997cf2ee2Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1101097cf2ee2Smrg [with_glib=$withval], [with_glib=]_defopt) 1101197cf2ee2Smrgm4_undefine([_defopt]) 11012a966c04fSmrg 1101397cf2ee2Smrghave_glib=no 1101497cf2ee2Smrg# Do not probe GLib if user explicitly disabled unit testing 1101597cf2ee2Smrgif test "x$enable_unit_tests" != x"no"; then 1101697cf2ee2Smrg # Do not probe GLib if user explicitly disabled it 1101797cf2ee2Smrg if test "x$with_glib" != x"no"; then 1101897cf2ee2Smrg m4_ifval( 1101997cf2ee2Smrg [$1], 1102097cf2ee2Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1102197cf2ee2Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1102297cf2ee2Smrg ) 1102397cf2ee2Smrg fi 1102497cf2ee2Smrgfi 11025a966c04fSmrg 1102697cf2ee2Smrg# Not having GLib when unit testing has been explicitly requested is an error 1102797cf2ee2Smrgif test "x$enable_unit_tests" = x"yes"; then 1102897cf2ee2Smrg if test "x$have_glib" = x"no"; then 1102997cf2ee2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1103097cf2ee2Smrg fi 1103197cf2ee2Smrgfi 11032a966c04fSmrg 1103397cf2ee2Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1103497cf2ee2Smrgif test "x$enable_unit_tests" = x"no"; then 1103597cf2ee2Smrg if test "x$with_glib" = x"yes"; then 1103697cf2ee2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1103797cf2ee2Smrg fi 1103897cf2ee2Smrgfi 11039a966c04fSmrg 1104097cf2ee2Smrg# Not having GLib when it has been explicitly requested is an error 1104197cf2ee2Smrgif test "x$with_glib" = x"yes"; then 1104297cf2ee2Smrg if test "x$have_glib" = x"no"; then 1104397cf2ee2Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1104497cf2ee2Smrg fi 1104597cf2ee2Smrgfi 11046a966c04fSmrg 1104797cf2ee2SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1104897cf2ee2Smrg]) # XORG_WITH_GLIB 11049a966c04fSmrg 1105097cf2ee2Smrg# XORG_LD_WRAP([required|optional]) 1105197cf2ee2Smrg# --------------------------------- 1105297cf2ee2Smrg# Minimum version: 1.13.0 1105397cf2ee2Smrg# 1105497cf2ee2Smrg# Check if linker supports -wrap, passed via compiler flags 1105597cf2ee2Smrg# 1105697cf2ee2Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1105797cf2ee2Smrg# Otherwise the value of $enable_unit_tests is blank. 1105897cf2ee2Smrg# 1105997cf2ee2Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1106097cf2ee2Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1106197cf2ee2Smrg# available, an argument of "optional" allows use when some unit tests require 1106297cf2ee2Smrg# ld -wrap and others do not. 1106397cf2ee2Smrg# 1106497cf2ee2SmrgAC_DEFUN([XORG_LD_WRAP],[ 1106597cf2ee2SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1106697cf2ee2Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1106797cf2ee2Smrg void __wrap_exit(int status) { return; }], 1106897cf2ee2Smrg [exit(0);])]) 1106997cf2ee2Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1107097cf2ee2Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1107197cf2ee2Smrg if test "x$have_ld_wrap" = x"no"; then 1107297cf2ee2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1107397cf2ee2Smrg fi 1107497cf2ee2Smrgfi 1107597cf2ee2SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1107697cf2ee2Smrg# 1107797cf2ee2Smrg]) # XORG_LD_WRAP 11078a966c04fSmrg 1107997cf2ee2Smrg# XORG_CHECK_LINKER_FLAGS 1108097cf2ee2Smrg# ----------------------- 1108197cf2ee2Smrg# SYNOPSIS 1108297cf2ee2Smrg# 1108397cf2ee2Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1108497cf2ee2Smrg# 1108597cf2ee2Smrg# DESCRIPTION 1108697cf2ee2Smrg# 1108797cf2ee2Smrg# Check whether the given linker FLAGS work with the current language's 1108897cf2ee2Smrg# linker, or whether they give an error. 1108997cf2ee2Smrg# 1109097cf2ee2Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1109197cf2ee2Smrg# success/failure. 1109297cf2ee2Smrg# 1109397cf2ee2Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1109497cf2ee2Smrg# 1109597cf2ee2Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1109697cf2ee2Smrg# 1109797cf2ee2Smrg# LICENSE 1109897cf2ee2Smrg# 1109997cf2ee2Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1110097cf2ee2Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1110197cf2ee2Smrg# Copyright (c) 2009 Matteo Frigo 1110297cf2ee2Smrg# 1110397cf2ee2Smrg# This program is free software: you can redistribute it and/or modify it 1110497cf2ee2Smrg# under the terms of the GNU General Public License as published by the 1110597cf2ee2Smrg# Free Software Foundation, either version 3 of the License, or (at your 1110697cf2ee2Smrg# option) any later version. 1110797cf2ee2Smrg# 1110897cf2ee2Smrg# This program is distributed in the hope that it will be useful, but 1110997cf2ee2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1111097cf2ee2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1111197cf2ee2Smrg# Public License for more details. 1111297cf2ee2Smrg# 1111397cf2ee2Smrg# You should have received a copy of the GNU General Public License along 1111497cf2ee2Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1111597cf2ee2Smrg# 1111697cf2ee2Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1111797cf2ee2Smrg# gives unlimited permission to copy, distribute and modify the configure 1111897cf2ee2Smrg# scripts that are the output of Autoconf when processing the Macro. You 1111997cf2ee2Smrg# need not follow the terms of the GNU General Public License when using 1112097cf2ee2Smrg# or distributing such scripts, even though portions of the text of the 1112197cf2ee2Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1112297cf2ee2Smrg# all other use of the material that constitutes the Autoconf Macro. 1112397cf2ee2Smrg# 1112497cf2ee2Smrg# This special exception to the GPL applies to versions of the Autoconf 1112597cf2ee2Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1112697cf2ee2Smrg# modified version of the Autoconf Macro, you may extend this special 1112797cf2ee2Smrg# exception to the GPL to apply to your modified version as well.# 1112897cf2ee2SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1112997cf2ee2Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1113097cf2ee2Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1113197cf2ee2SmrgAS_LITERAL_IF([$1], 1113297cf2ee2Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1113397cf2ee2Smrg ax_save_FLAGS=$LDFLAGS 1113497cf2ee2Smrg LDFLAGS="$1" 1113597cf2ee2Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1113697cf2ee2Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1113797cf2ee2Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1113897cf2ee2Smrg LDFLAGS=$ax_save_FLAGS])], 1113997cf2ee2Smrg [ax_save_FLAGS=$LDFLAGS 1114097cf2ee2Smrg LDFLAGS="$1" 1114197cf2ee2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1114297cf2ee2Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1114397cf2ee2Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1114497cf2ee2Smrg LDFLAGS=$ax_save_FLAGS]) 1114597cf2ee2Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1114697cf2ee2SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1114797cf2ee2Smrgif test "x$xorg_check_linker_flags" = xyes; then 1114897cf2ee2Smrg m4_default([$2], :) 1114997cf2ee2Smrgelse 1115097cf2ee2Smrg m4_default([$3], :) 1115197cf2ee2Smrgfi 1115297cf2ee2Smrg]) # XORG_CHECK_LINKER_FLAGS 11153a966c04fSmrg 1115497cf2ee2Smrg# XORG_MEMORY_CHECK_FLAGS 1115597cf2ee2Smrg# ----------------------- 1115697cf2ee2Smrg# Minimum version: 1.16.0 1115797cf2ee2Smrg# 1115897cf2ee2Smrg# This macro attempts to find appropriate memory checking functionality 1115997cf2ee2Smrg# for various platforms which unit testing code may use to catch various 1116097cf2ee2Smrg# forms of memory allocation and access errors in testing. 1116197cf2ee2Smrg# 1116297cf2ee2Smrg# Interface to module: 1116397cf2ee2Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1116497cf2ee2Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1116597cf2ee2Smrg# 1116697cf2ee2Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1116797cf2ee2Smrg# 1116897cf2ee2SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 111692e2dd055Smrg 1117097cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1117197cf2ee2SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1117297cf2ee2Smrg [Environment variables to enable memory checking in tests]) 111732e2dd055Smrg 1117497cf2ee2Smrg# Check for different types of support on different platforms 1117597cf2ee2Smrgcase $host_os in 1117697cf2ee2Smrg solaris*) 1117797cf2ee2Smrg AC_CHECK_LIB([umem], [umem_alloc], 1117897cf2ee2Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1117997cf2ee2Smrg ;; 1118097cf2ee2Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1118197cf2ee2Smrg # both directly and inverted, so should not be 0 or 255. 1118297cf2ee2Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1118397cf2ee2Smrg ;; 1118497cf2ee2Smrg darwin*) 1118597cf2ee2Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1118697cf2ee2Smrg ;; 1118797cf2ee2Smrg *bsd*) 1118897cf2ee2Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1118997cf2ee2Smrg ;; 1119097cf2ee2Smrgesac 111912e2dd055Smrg 1119297cf2ee2Smrg# User supplied flags override default flags 1119397cf2ee2Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1119497cf2ee2Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1119597cf2ee2Smrgfi 111962e2dd055Smrg 1119797cf2ee2SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1119897cf2ee2Smrg]) # XORG_WITH_LINT 11199a966c04fSmrg 1120097cf2ee2Smrg# XORG_CHECK_MALLOC_ZERO 1120197cf2ee2Smrg# ---------------------- 1120297cf2ee2Smrg# Minimum version: 1.0.0 11203a966c04fSmrg# 1120497cf2ee2Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1120597cf2ee2Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1120697cf2ee2Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1120797cf2ee2SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1120897cf2ee2SmrgAC_ARG_ENABLE(malloc0returnsnull, 1120997cf2ee2Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1121097cf2ee2Smrg [malloc(0) returns NULL (default: auto)]), 1121197cf2ee2Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1121297cf2ee2Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11213a966c04fSmrg 1121497cf2ee2SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1121597cf2ee2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1121697cf2ee2Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1121797cf2ee2Smrg#include <stdlib.h> 1121897cf2ee2Smrg],[ 1121997cf2ee2Smrg char *m0, *r0, *c0, *p; 1122097cf2ee2Smrg m0 = malloc(0); 1122197cf2ee2Smrg p = malloc(10); 1122297cf2ee2Smrg r0 = realloc(p,0); 1122397cf2ee2Smrg c0 = calloc(0,10); 1122497cf2ee2Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1122597cf2ee2Smrg])], 1122697cf2ee2Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1122797cf2ee2Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1122897cf2ee2Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1122997cf2ee2Smrgfi 1123097cf2ee2SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11231a966c04fSmrg 1123297cf2ee2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1123397cf2ee2Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1123497cf2ee2Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1123597cf2ee2Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1123697cf2ee2Smrgelse 1123797cf2ee2Smrg MALLOC_ZERO_CFLAGS="" 1123897cf2ee2Smrg XMALLOC_ZERO_CFLAGS="" 1123997cf2ee2Smrg XTMALLOC_ZERO_CFLAGS="" 1124097cf2ee2Smrgfi 112416e7d3316Smrg 1124297cf2ee2SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1124397cf2ee2SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1124497cf2ee2SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1124597cf2ee2Smrg]) # XORG_CHECK_MALLOC_ZERO 112466e7d3316Smrg 1124797cf2ee2Smrg# XORG_WITH_LINT() 1124897cf2ee2Smrg# ---------------- 1124997cf2ee2Smrg# Minimum version: 1.1.0 1125097cf2ee2Smrg# 1125197cf2ee2Smrg# This macro enables the use of a tool that flags some suspicious and 1125297cf2ee2Smrg# non-portable constructs (likely to be bugs) in C language source code. 1125397cf2ee2Smrg# It will attempt to locate the tool and use appropriate options. 1125497cf2ee2Smrg# There are various lint type tools on different platforms. 1125597cf2ee2Smrg# 1125697cf2ee2Smrg# Interface to module: 1125797cf2ee2Smrg# LINT: returns the path to the tool found on the platform 1125897cf2ee2Smrg# or the value set to LINT on the configure cmd line 1125997cf2ee2Smrg# also an Automake conditional 1126097cf2ee2Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1126197cf2ee2Smrg# 1126297cf2ee2Smrg# --with-lint: 'yes' user instructs the module to use lint 1126397cf2ee2Smrg# 'no' user instructs the module not to use lint (default) 1126497cf2ee2Smrg# 1126597cf2ee2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1126697cf2ee2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1126797cf2ee2Smrg# 1126897cf2ee2SmrgAC_DEFUN([XORG_WITH_LINT],[ 112696e7d3316Smrg 1127097cf2ee2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1127197cf2ee2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1127297cf2ee2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1127397cf2ee2Smrg [Use a lint-style source code checker (default: disabled)])], 1127497cf2ee2Smrg [use_lint=$withval], [use_lint=no]) 112756e7d3316Smrg 1127697cf2ee2Smrg# Obtain platform specific info like program name and options 1127797cf2ee2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1127897cf2ee2Smrgcase $host_os in 1127997cf2ee2Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1128097cf2ee2Smrg lint_name=splint 1128197cf2ee2Smrg lint_options="-badflag" 1128297cf2ee2Smrg ;; 1128397cf2ee2Smrg *freebsd* | *netbsd*) 1128497cf2ee2Smrg lint_name=lint 1128597cf2ee2Smrg lint_options="-u -b" 1128697cf2ee2Smrg ;; 1128797cf2ee2Smrg *solaris*) 1128897cf2ee2Smrg lint_name=lint 1128997cf2ee2Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1129097cf2ee2Smrg ;; 1129197cf2ee2Smrgesac 112926e7d3316Smrg 1129397cf2ee2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1129497cf2ee2Smrgif test "x$use_lint" = x"yes" ; then 1129597cf2ee2Smrg AC_PATH_PROG([LINT], [$lint_name]) 1129697cf2ee2Smrg if test "x$LINT" = "x"; then 1129797cf2ee2Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1129897cf2ee2Smrg fi 1129997cf2ee2Smrgelif test "x$use_lint" = x"no" ; then 1130097cf2ee2Smrg if test "x$LINT" != "x"; then 1130197cf2ee2Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1130297cf2ee2Smrg fi 1130397cf2ee2Smrgelse 1130497cf2ee2Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1130597cf2ee2Smrgfi 113066e7d3316Smrg 1130797cf2ee2Smrg# User supplied flags override default flags 1130897cf2ee2Smrgif test "x$LINT_FLAGS" != "x"; then 1130997cf2ee2Smrg lint_options=$LINT_FLAGS 1131097cf2ee2Smrgfi 113116e7d3316Smrg 1131297cf2ee2SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1131397cf2ee2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 113146e7d3316Smrg 1131597cf2ee2Smrg]) # XORG_WITH_LINT 113166e7d3316Smrg 1131797cf2ee2Smrg# XORG_LINT_LIBRARY(LIBNAME) 1131897cf2ee2Smrg# -------------------------- 1131997cf2ee2Smrg# Minimum version: 1.1.0 1132097cf2ee2Smrg# 1132197cf2ee2Smrg# Sets up flags for building lint libraries for checking programs that call 1132297cf2ee2Smrg# functions in the library. 1132397cf2ee2Smrg# 1132497cf2ee2Smrg# Interface to module: 1132597cf2ee2Smrg# LINTLIB - Automake variable with the name of lint library file to make 1132697cf2ee2Smrg# MAKE_LINT_LIB - Automake conditional 1132797cf2ee2Smrg# 1132897cf2ee2Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1132997cf2ee2Smrg# - 'no' user instructs the module not to create a lint library (default) 113306e7d3316Smrg 1133197cf2ee2SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1133297cf2ee2SmrgAC_REQUIRE([XORG_WITH_LINT]) 1133397cf2ee2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1133497cf2ee2Smrg [Create lint library (default: disabled)])], 1133597cf2ee2Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 113366e7d3316Smrg 1133797cf2ee2Smrgif test "x$make_lint_lib" = x"yes" ; then 1133897cf2ee2Smrg LINTLIB=llib-l$1.ln 1133997cf2ee2Smrg if test "x$LINT" = "x"; then 1134097cf2ee2Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1134197cf2ee2Smrg fi 1134297cf2ee2Smrgelif test "x$make_lint_lib" != x"no" ; then 1134397cf2ee2Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1134497cf2ee2Smrgfi 113456e7d3316Smrg 1134697cf2ee2SmrgAC_SUBST(LINTLIB) 1134797cf2ee2SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 113486e7d3316Smrg 1134997cf2ee2Smrg]) # XORG_LINT_LIBRARY 1135097cf2ee2Smrg 1135197cf2ee2Smrg# XORG_COMPILER_BRAND 1135297cf2ee2Smrg# ------------------- 1135397cf2ee2Smrg# Minimum version: 1.14.0 1135497cf2ee2Smrg# 1135597cf2ee2Smrg# Checks for various brands of compilers and sets flags as appropriate: 1135697cf2ee2Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1135797cf2ee2Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1135897cf2ee2Smrg# clang compiler - sets CLANGCC to "yes" 1135997cf2ee2Smrg# Intel compiler - sets INTELCC to "yes" 1136097cf2ee2Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1136197cf2ee2Smrg# 1136297cf2ee2SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1136397cf2ee2SmrgAC_LANG_CASE( 1136497cf2ee2Smrg [C], [ 1136597cf2ee2Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1136697cf2ee2Smrg ], 1136797cf2ee2Smrg [C++], [ 1136897cf2ee2Smrg AC_REQUIRE([AC_PROG_CXX]) 1136997cf2ee2Smrg ] 1137097cf2ee2Smrg) 1137197cf2ee2SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1137297cf2ee2SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1137397cf2ee2SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1137497cf2ee2Smrg]) # XORG_COMPILER_BRAND 11375a966c04fSmrg 1137697cf2ee2Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1137797cf2ee2Smrg# --------------- 1137897cf2ee2Smrg# Minimum version: 1.16.0 1137997cf2ee2Smrg# 1138097cf2ee2Smrg# Test if the compiler works when passed the given flag as a command line argument. 1138197cf2ee2Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1138297cf2ee2Smrg# next flag in the list until there are no more options. 1138397cf2ee2Smrg# 1138497cf2ee2Smrg# Note that this does not guarantee that the compiler supports the flag as some 1138597cf2ee2Smrg# compilers will simply ignore arguments that they do not understand, but we do 1138697cf2ee2Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1138797cf2ee2Smrg# -Werror=unused-command-line-argument 1138897cf2ee2Smrg# 1138997cf2ee2SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1139097cf2ee2Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1139197cf2ee2Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1139297cf2ee2Smrg 1139397cf2ee2SmrgAC_LANG_COMPILER_REQUIRE 1139497cf2ee2Smrg 1139597cf2ee2SmrgAC_LANG_CASE( 1139697cf2ee2Smrg [C], [ 1139797cf2ee2Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1139897cf2ee2Smrg define([PREFIX], [C]) 11399ac92798bSmrg define([CACHE_PREFIX], [cc]) 11400ac92798bSmrg define([COMPILER], [$CC]) 1140197cf2ee2Smrg ], 1140297cf2ee2Smrg [C++], [ 1140397cf2ee2Smrg define([PREFIX], [CXX]) 11404ac92798bSmrg define([CACHE_PREFIX], [cxx]) 11405ac92798bSmrg define([COMPILER], [$CXX]) 1140697cf2ee2Smrg ] 1140797cf2ee2Smrg) 11408a966c04fSmrg 1140997cf2ee2Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1141097cf2ee2Smrg 11411ac92798bSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1141297cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11413ac92798bSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11414ac92798bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1141597cf2ee2Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11416ac92798bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11417ac92798bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11418ac92798bSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1141997cf2ee2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1142097cf2ee2Smrgfi 11421a966c04fSmrg 11422ac92798bSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11423ac92798bSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1142497cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1142597cf2ee2Smrg fi 1142697cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11427ac92798bSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11428ac92798bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1142997cf2ee2Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11430ac92798bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11431ac92798bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11432ac92798bSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1143397cf2ee2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1143497cf2ee2Smrgfi 114352e2dd055Smrg 1143697cf2ee2Smrgfound="no" 1143797cf2ee2Smrgm4_foreach([flag], m4_cdr($@), [ 1143897cf2ee2Smrg if test $found = "no" ; then 11439ac92798bSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 1144097cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1144197cf2ee2Smrg fi 1144297cf2ee2Smrg 11443ac92798bSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 1144497cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1144597cf2ee2Smrg fi 1144697cf2ee2Smrg 1144797cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1144897cf2ee2Smrg 1144997cf2ee2Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11450ac92798bSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11451ac92798bSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11452ac92798bSmrg AC_CACHE_VAL($cacheid, 1145397cf2ee2Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11454ac92798bSmrg [eval $cacheid=yes], 11455ac92798bSmrg [eval $cacheid=no])]) 1145697cf2ee2Smrg 1145797cf2ee2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1145897cf2ee2Smrg 11459ac92798bSmrg eval supported=\$$cacheid 1146097cf2ee2Smrg AC_MSG_RESULT([$supported]) 1146197cf2ee2Smrg if test "$supported" = "yes" ; then 1146297cf2ee2Smrg $1="$$1 ]flag[" 1146397cf2ee2Smrg found="yes" 1146497cf2ee2Smrg fi 1146597cf2ee2Smrg fi 1146697cf2ee2Smrg]) 1146797cf2ee2Smrg]) # XORG_TESTSET_CFLAG 114682e2dd055Smrg 1146997cf2ee2Smrg# XORG_COMPILER_FLAGS 1147097cf2ee2Smrg# --------------- 1147197cf2ee2Smrg# Minimum version: 1.16.0 1147297cf2ee2Smrg# 1147397cf2ee2Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1147497cf2ee2Smrg# arguments supported by the selected compiler which do NOT alter the generated 1147597cf2ee2Smrg# code. These arguments will cause the compiler to print various warnings 1147697cf2ee2Smrg# during compilation AND turn a conservative set of warnings into errors. 1147797cf2ee2Smrg# 1147897cf2ee2Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1147997cf2ee2Smrg# future versions of util-macros as options are added to new compilers. 1148097cf2ee2Smrg# 1148197cf2ee2SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1148297cf2ee2SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1148397cf2ee2Smrg 1148497cf2ee2SmrgAC_ARG_ENABLE(selective-werror, 1148597cf2ee2Smrg AS_HELP_STRING([--disable-selective-werror], 1148697cf2ee2Smrg [Turn off selective compiler errors. (default: enabled)]), 1148797cf2ee2Smrg [SELECTIVE_WERROR=$enableval], 1148897cf2ee2Smrg [SELECTIVE_WERROR=yes]) 1148997cf2ee2Smrg 1149097cf2ee2SmrgAC_LANG_CASE( 1149197cf2ee2Smrg [C], [ 1149297cf2ee2Smrg define([PREFIX], [C]) 1149397cf2ee2Smrg ], 1149497cf2ee2Smrg [C++], [ 1149597cf2ee2Smrg define([PREFIX], [CXX]) 1149697cf2ee2Smrg ] 1149797cf2ee2Smrg) 1149897cf2ee2Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1149997cf2ee2Smrgif test "x$SUNCC" = "xyes"; then 1150097cf2ee2Smrg [BASE_]PREFIX[FLAGS]="-v" 1150197cf2ee2Smrgelse 1150297cf2ee2Smrg [BASE_]PREFIX[FLAGS]="" 1150397cf2ee2Smrgfi 11504a966c04fSmrg 1150597cf2ee2Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1150697cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1150797cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1150897cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1150997cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1151097cf2ee2Smrg 1151197cf2ee2SmrgAC_LANG_CASE( 1151297cf2ee2Smrg [C], [ 1151397cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1151497cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1151597cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1151697cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1151797cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 1151897cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1151997cf2ee2Smrg ] 1152097cf2ee2Smrg) 11521a966c04fSmrg 1152297cf2ee2Smrg# This chunk adds additional warnings that could catch undesired effects. 1152397cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1152497cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1152597cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1152697cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1152797cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1152897cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1152997cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1153097cf2ee2Smrg 1153197cf2ee2Smrg# These are currently disabled because they are noisy. They will be enabled 1153297cf2ee2Smrg# in the future once the codebase is sufficiently modernized to silence 1153397cf2ee2Smrg# them. For now, I don't want them to drown out the other warnings. 1153497cf2ee2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1153597cf2ee2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1153697cf2ee2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1153797cf2ee2Smrg 1153897cf2ee2Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1153997cf2ee2Smrg# when there are problems that should be fixed. 1154097cf2ee2Smrg 1154197cf2ee2Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1154297cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1154397cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1154497cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1154597cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1154697cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1154797cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1154897cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1154997cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1155097cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1155197cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1155297cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1155397cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1155497cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1155597cf2ee2Smrgelse 1155697cf2ee2SmrgAC_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]) 1155797cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1155897cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1155997cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1156097cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1156197cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1156297cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1156397cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1156497cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1156597cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1156697cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1156797cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1156897cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1156997cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1157097cf2ee2Smrgfi 11571a966c04fSmrg 1157297cf2ee2SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1157397cf2ee2Smrg]) # XORG_COMPILER_FLAGS 115742e2dd055Smrg 1157597cf2ee2Smrg# XORG_CWARNFLAGS 1157697cf2ee2Smrg# --------------- 1157797cf2ee2Smrg# Minimum version: 1.2.0 1157897cf2ee2Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 115796e7d3316Smrg# 1158097cf2ee2Smrg# Defines CWARNFLAGS to enable C compiler warnings. 115816e7d3316Smrg# 1158297cf2ee2Smrg# This function is deprecated because it defines -fno-strict-aliasing 1158397cf2ee2Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1158497cf2ee2Smrg# is needed, then it should be added explicitly in the module when 1158597cf2ee2Smrg# it is updated to use BASE_CFLAGS. 1158697cf2ee2Smrg# 1158797cf2ee2SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1158897cf2ee2SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1158997cf2ee2SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1159097cf2ee2SmrgAC_LANG_CASE( 1159197cf2ee2Smrg [C], [ 1159297cf2ee2Smrg CWARNFLAGS="$BASE_CFLAGS" 1159397cf2ee2Smrg if test "x$GCC" = xyes ; then 1159497cf2ee2Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1159597cf2ee2Smrg fi 1159697cf2ee2Smrg AC_SUBST(CWARNFLAGS) 1159797cf2ee2Smrg ] 1159897cf2ee2Smrg) 1159997cf2ee2Smrg]) # XORG_CWARNFLAGS 11600a966c04fSmrg 1160197cf2ee2Smrg# XORG_STRICT_OPTION 1160297cf2ee2Smrg# ----------------------- 1160397cf2ee2Smrg# Minimum version: 1.3.0 1160497cf2ee2Smrg# 1160597cf2ee2Smrg# Add configure option to enable strict compilation flags, such as treating 1160697cf2ee2Smrg# warnings as fatal errors. 1160797cf2ee2Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1160897cf2ee2Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1160997cf2ee2Smrg# 1161097cf2ee2Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1161197cf2ee2Smrg# when strict compilation is unconditionally desired. 1161297cf2ee2SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1161397cf2ee2SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1161497cf2ee2SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 116152e2dd055Smrg 1161697cf2ee2SmrgAC_ARG_ENABLE(strict-compilation, 1161797cf2ee2Smrg AS_HELP_STRING([--enable-strict-compilation], 1161897cf2ee2Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1161997cf2ee2Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 116202e2dd055Smrg 1162197cf2ee2SmrgAC_LANG_CASE( 1162297cf2ee2Smrg [C], [ 1162397cf2ee2Smrg define([PREFIX], [C]) 1162497cf2ee2Smrg ], 1162597cf2ee2Smrg [C++], [ 1162697cf2ee2Smrg define([PREFIX], [CXX]) 1162797cf2ee2Smrg ] 1162897cf2ee2Smrg) 11629a966c04fSmrg 1163097cf2ee2Smrg[STRICT_]PREFIX[FLAGS]="" 1163197cf2ee2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1163297cf2ee2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11633a966c04fSmrg 1163497cf2ee2Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1163597cf2ee2Smrg# activate it with -Werror, so we add it here explicitly. 1163697cf2ee2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11637a966c04fSmrg 1163897cf2ee2Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1163997cf2ee2Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1164097cf2ee2Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1164197cf2ee2Smrgfi 1164297cf2ee2SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1164397cf2ee2SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1164497cf2ee2SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1164597cf2ee2Smrg]) # XORG_STRICT_OPTION 116466e7d3316Smrg 1164797cf2ee2Smrg# XORG_DEFAULT_OPTIONS 1164897cf2ee2Smrg# -------------------- 1164997cf2ee2Smrg# Minimum version: 1.3.0 116506e7d3316Smrg# 1165197cf2ee2Smrg# Defines default options for X.Org modules. 116526e7d3316Smrg# 1165397cf2ee2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1165497cf2ee2SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1165597cf2ee2SmrgXORG_COMPILER_FLAGS 1165697cf2ee2SmrgXORG_CWARNFLAGS 1165797cf2ee2SmrgXORG_STRICT_OPTION 1165897cf2ee2SmrgXORG_RELEASE_VERSION 1165997cf2ee2SmrgXORG_CHANGELOG 1166097cf2ee2SmrgXORG_INSTALL 1166197cf2ee2SmrgXORG_MANPAGE_SECTIONS 1166297cf2ee2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1166397cf2ee2Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1166497cf2ee2Smrg]) # XORG_DEFAULT_OPTIONS 1166597cf2ee2Smrg 1166697cf2ee2Smrg# XORG_INSTALL() 1166797cf2ee2Smrg# ---------------- 1166897cf2ee2Smrg# Minimum version: 1.4.0 116696e7d3316Smrg# 1167097cf2ee2Smrg# Defines the variable INSTALL_CMD as the command to copy 1167197cf2ee2Smrg# INSTALL from $prefix/share/util-macros. 116726e7d3316Smrg# 1167397cf2ee2SmrgAC_DEFUN([XORG_INSTALL], [ 1167497cf2ee2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1167597cf2ee2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1167697cf2ee2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1167797cf2ee2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1167897cf2ee2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1167997cf2ee2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1168097cf2ee2SmrgAC_SUBST([INSTALL_CMD]) 1168197cf2ee2Smrg]) # XORG_INSTALL 1168297cf2ee2Smrgdnl Copyright 2005 Red Hat, Inc 1168397cf2ee2Smrgdnl 1168497cf2ee2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1168597cf2ee2Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1168697cf2ee2Smrgdnl the above copyright notice appear in all copies and that both that 1168797cf2ee2Smrgdnl copyright notice and this permission notice appear in supporting 1168897cf2ee2Smrgdnl documentation. 1168997cf2ee2Smrgdnl 1169097cf2ee2Smrgdnl The above copyright notice and this permission notice shall be included 1169197cf2ee2Smrgdnl in all copies or substantial portions of the Software. 1169297cf2ee2Smrgdnl 1169397cf2ee2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1169497cf2ee2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1169597cf2ee2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1169697cf2ee2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1169797cf2ee2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1169897cf2ee2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1169997cf2ee2Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1170097cf2ee2Smrgdnl 1170197cf2ee2Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1170297cf2ee2Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1170397cf2ee2Smrgdnl other dealings in this Software without prior written authorization 1170497cf2ee2Smrgdnl from the copyright holders. 1170597cf2ee2Smrgdnl 117066e7d3316Smrg 1170797cf2ee2Smrg# XORG_RELEASE_VERSION 1170897cf2ee2Smrg# -------------------- 1170997cf2ee2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11710ac92798bSmrg 1171197cf2ee2SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1171297cf2ee2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1171397cf2ee2Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1171497cf2ee2Smrg [Major version of this package]) 1171597cf2ee2Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1171697cf2ee2Smrg if test "x$PVM" = "x"; then 1171797cf2ee2Smrg PVM="0" 1171897cf2ee2Smrg fi 1171997cf2ee2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1172097cf2ee2Smrg [$PVM], 1172197cf2ee2Smrg [Minor version of this package]) 1172297cf2ee2Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1172397cf2ee2Smrg if test "x$PVP" = "x"; then 1172497cf2ee2Smrg PVP="0" 1172597cf2ee2Smrg fi 1172697cf2ee2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1172797cf2ee2Smrg [$PVP], 1172897cf2ee2Smrg [Patch version of this package]) 1172997cf2ee2Smrg]) 117306e7d3316Smrg 1173197cf2ee2Smrg# XORG_CHANGELOG() 1173297cf2ee2Smrg# ---------------- 1173397cf2ee2Smrg# Minimum version: 1.2.0 1173497cf2ee2Smrg# 1173597cf2ee2Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1173697cf2ee2Smrg# ChangeLog from git. 1173797cf2ee2Smrg# 1173897cf2ee2Smrg# 1173997cf2ee2SmrgAC_DEFUN([XORG_CHANGELOG], [ 1174097cf2ee2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1174197cf2ee2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1174297cf2ee2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1174397cf2ee2Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1174497cf2ee2SmrgAC_SUBST([CHANGELOG_CMD]) 1174597cf2ee2Smrg]) # XORG_CHANGELOG 11746a966c04fSmrg 11747