aclocal.m4 revision 58deefeb
158deefebSmrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 2d9dcd5aeSmrg 358deefebSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4191cded7Smrg 5191cded7Smrg# This file is free software; the Free Software Foundation 6191cded7Smrg# gives unlimited permission to copy and/or distribute it, 7191cded7Smrg# with or without modifications, as long as this notice is preserved. 8191cded7Smrg 9191cded7Smrg# This program is distributed in the hope that it will be useful, 10191cded7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11191cded7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12191cded7Smrg# PARTICULAR PURPOSE. 13191cded7Smrg 14d9dcd5aeSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15b290cf36Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16b290cf36Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1758deefebSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 1858deefebSmrg[m4_warning([this file was generated for autoconf 2.69. 19b290cf36SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20b290cf36SmrgIf you have problems, you may need to regenerate the build system entirely. 21d9dcd5aeSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22b290cf36Smrg 2358deefebSmrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 24b290cf36Smrg# 25ba064abeSmrg# This file is free software; the Free Software Foundation 26ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 27ba064abeSmrg# with or without modifications, as long as this notice is preserved. 28ba064abeSmrg 29ba064abeSmrg# AM_AUTOMAKE_VERSION(VERSION) 30ba064abeSmrg# ---------------------------- 31ba064abeSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32ba064abeSmrg# generated from the m4 files accompanying Automake X.Y. 33ba064abeSmrg# (This private macro should not be called outside this file.) 34ba064abeSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3558deefebSmrg[am__api_version='1.15' 36ba064abeSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37ba064abeSmrgdnl require some minimum version. Point them to the right macro. 3858deefebSmrgm4_if([$1], [1.15], [], 39ba064abeSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40ba064abeSmrg]) 41ba064abeSmrg 42ba064abeSmrg# _AM_AUTOCONF_VERSION(VERSION) 43ba064abeSmrg# ----------------------------- 44ba064abeSmrg# aclocal traces this macro to find the Autoconf version. 45ba064abeSmrg# This is a private macro too. Using m4_define simplifies 46ba064abeSmrg# the logic in aclocal, which can simply ignore this definition. 47ba064abeSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48ba064abeSmrg 49ba064abeSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50ba064abeSmrg# ------------------------------- 51ba064abeSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52ba064abeSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53ba064abeSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5458deefebSmrg[AM_AUTOMAKE_VERSION([1.15])dnl 55ba064abeSmrgm4_ifndef([AC_AUTOCONF_VERSION], 56ba064abeSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57ba064abeSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58ba064abeSmrg 59ba064abeSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60ba064abeSmrg 6158deefebSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 62b290cf36Smrg# 63ba064abeSmrg# This file is free software; the Free Software Foundation 64ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 65ba064abeSmrg# with or without modifications, as long as this notice is preserved. 66b290cf36Smrg 67ba064abeSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68d9dcd5aeSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69d9dcd5aeSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70b290cf36Smrg# 71ba064abeSmrg# Of course, Automake must honor this variable whenever it calls a 72ba064abeSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 73ba064abeSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74ba064abeSmrg# depending on how configure is run. This is pretty annoying, since 75ba064abeSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76ba064abeSmrg# source directory, any form will work fine, but in subdirectories a 77ba064abeSmrg# relative path needs to be adjusted first. 78b290cf36Smrg# 79ba064abeSmrg# $ac_aux_dir/missing 80ba064abeSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 81ba064abeSmrg# $top_srcdir/$ac_aux_dir/missing 82ba064abeSmrg# fails if $ac_aux_dir is absolute, 83ba064abeSmrg# fails when called from a subdirectory in a VPATH build with 84ba064abeSmrg# a relative $ac_aux_dir 85b290cf36Smrg# 86ba064abeSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87ba064abeSmrg# are both prefixed by $srcdir. In an in-source build this is usually 88d9dcd5aeSmrg# harmless because $srcdir is '.', but things will broke when you 89ba064abeSmrg# start a VPATH build or use an absolute $srcdir. 90b290cf36Smrg# 91ba064abeSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92ba064abeSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93ba064abeSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94ba064abeSmrg# and then we would define $MISSING as 95ba064abeSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 96ba064abeSmrg# This will work as long as MISSING is not called from configure, because 97ba064abeSmrg# unfortunately $(top_srcdir) has no meaning in configure. 98ba064abeSmrg# However there are other variables, like CC, which are often used in 99ba064abeSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100b290cf36Smrg# 101ba064abeSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 102ba064abeSmrg# absolute PATH. The drawback is that using absolute paths prevent a 103ba064abeSmrg# configured tree to be moved without reconfiguration. 104191cded7Smrg 105ba064abeSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10658deefebSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 10758deefebSmrg# Expand $ac_aux_dir to an absolute path. 10858deefebSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 109b290cf36Smrg]) 110b290cf36Smrg 111ba064abeSmrg# AM_CONDITIONAL -*- Autoconf -*- 112b290cf36Smrg 11358deefebSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 114ba064abeSmrg# 115ba064abeSmrg# This file is free software; the Free Software Foundation 116ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 117ba064abeSmrg# with or without modifications, as long as this notice is preserved. 118191cded7Smrg 119ba064abeSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120ba064abeSmrg# ------------------------------------- 121ba064abeSmrg# Define a conditional. 122ba064abeSmrgAC_DEFUN([AM_CONDITIONAL], 123d9dcd5aeSmrg[AC_PREREQ([2.52])dnl 124d9dcd5aeSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125d9dcd5aeSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126ba064abeSmrgAC_SUBST([$1_TRUE])dnl 127ba064abeSmrgAC_SUBST([$1_FALSE])dnl 128ba064abeSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129ba064abeSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130ba064abeSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131ba064abeSmrgif $2; then 132ba064abeSmrg $1_TRUE= 133ba064abeSmrg $1_FALSE='#' 134ba064abeSmrgelse 135ba064abeSmrg $1_TRUE='#' 136ba064abeSmrg $1_FALSE= 137ba064abeSmrgfi 138ba064abeSmrgAC_CONFIG_COMMANDS_PRE( 139ba064abeSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140ba064abeSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 141ba064abeSmrgUsually this means the macro was only invoked conditionally.]]) 142ba064abeSmrgfi])]) 143191cded7Smrg 14458deefebSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 145ba064abeSmrg# 146ba064abeSmrg# This file is free software; the Free Software Foundation 147ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 148ba064abeSmrg# with or without modifications, as long as this notice is preserved. 149b290cf36Smrg 150b290cf36Smrg 151d9dcd5aeSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152ba064abeSmrg# written in clear, in which case automake, when reading aclocal.m4, 153ba064abeSmrg# will think it sees a *use*, and therefore will trigger all it's 154ba064abeSmrg# C support machinery. Also note that it means that autoscan, seeing 155ba064abeSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156b290cf36Smrg 157b290cf36Smrg 158ba064abeSmrg# _AM_DEPENDENCIES(NAME) 159b290cf36Smrg# ---------------------- 160ba064abeSmrg# See how the compiler implements dependency checking. 161d9dcd5aeSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162ba064abeSmrg# We try a few techniques and use that to set a single cache variable. 163ba064abeSmrg# 164ba064abeSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165ba064abeSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166ba064abeSmrg# dependency, and given that the user is not expected to run this macro, 167ba064abeSmrg# just rely on AC_PROG_CC. 168ba064abeSmrgAC_DEFUN([_AM_DEPENDENCIES], 169ba064abeSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170ba064abeSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171ba064abeSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172ba064abeSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 173b290cf36Smrg 174d9dcd5aeSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175d9dcd5aeSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176d9dcd5aeSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177d9dcd5aeSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178d9dcd5aeSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179d9dcd5aeSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180d9dcd5aeSmrg [depcc="$$1" am_compiler_list=]) 181b290cf36Smrg 182ba064abeSmrgAC_CACHE_CHECK([dependency style of $depcc], 183ba064abeSmrg [am_cv_$1_dependencies_compiler_type], 184ba064abeSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185ba064abeSmrg # We make a subdir and do the tests there. Otherwise we can end up 186ba064abeSmrg # making bogus files that we don't know about and never remove. For 187ba064abeSmrg # instance it was reported that on HP-UX the gcc test will end up 188d9dcd5aeSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 189d9dcd5aeSmrg # in D". 190d9dcd5aeSmrg rm -rf conftest.dir 191ba064abeSmrg mkdir conftest.dir 192ba064abeSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 193ba064abeSmrg # using a relative directory. 194ba064abeSmrg cp "$am_depcomp" conftest.dir 195ba064abeSmrg cd conftest.dir 196ba064abeSmrg # We will build objects and dependencies in a subdirectory because 197ba064abeSmrg # it helps to detect inapplicable dependency modes. For instance 198ba064abeSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 199ba064abeSmrg # side effect of compilation, but ICC will put the dependencies in 200ba064abeSmrg # the current directory while Tru64 will put them in the object 201ba064abeSmrg # directory. 202ba064abeSmrg mkdir sub 203191cded7Smrg 204ba064abeSmrg am_cv_$1_dependencies_compiler_type=none 205ba064abeSmrg if test "$am_compiler_list" = ""; then 206ba064abeSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207191cded7Smrg fi 208ba064abeSmrg am__universal=false 209ba064abeSmrg m4_case([$1], [CC], 210ba064abeSmrg [case " $depcc " in #( 211ba064abeSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212ba064abeSmrg esac], 213ba064abeSmrg [CXX], 214ba064abeSmrg [case " $depcc " in #( 215ba064abeSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216ba064abeSmrg esac]) 217191cded7Smrg 218ba064abeSmrg for depmode in $am_compiler_list; do 219ba064abeSmrg # Setup a source with many dependencies, because some compilers 220ba064abeSmrg # like to wrap large dependency lists on column 80 (with \), and 221ba064abeSmrg # we should not choose a depcomp mode which is confused by this. 222ba064abeSmrg # 223ba064abeSmrg # We need to recreate these files for each test, as the compiler may 224ba064abeSmrg # overwrite some of them when testing with obscure command lines. 225ba064abeSmrg # This happens at least with the AIX C compiler. 226ba064abeSmrg : > sub/conftest.c 227ba064abeSmrg for i in 1 2 3 4 5 6; do 228ba064abeSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229d9dcd5aeSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230d9dcd5aeSmrg # Solaris 10 /bin/sh. 231d9dcd5aeSmrg echo '/* dummy */' > sub/conftst$i.h 232ba064abeSmrg done 233ba064abeSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234191cded7Smrg 235d9dcd5aeSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236ba064abeSmrg # mode. It turns out that the SunPro C++ compiler does not properly 237d9dcd5aeSmrg # handle '-M -o', and we need to detect this. Also, some Intel 238d9dcd5aeSmrg # versions had trouble with output in subdirs. 239ba064abeSmrg am__obj=sub/conftest.${OBJEXT-o} 240ba064abeSmrg am__minus_obj="-o $am__obj" 241ba064abeSmrg case $depmode in 242ba064abeSmrg gcc) 243ba064abeSmrg # This depmode causes a compiler race in universal mode. 244ba064abeSmrg test "$am__universal" = false || continue 245ba064abeSmrg ;; 246ba064abeSmrg nosideeffect) 247d9dcd5aeSmrg # After this tag, mechanisms are not by side-effect, so they'll 248d9dcd5aeSmrg # only be used when explicitly requested. 249ba064abeSmrg if test "x$enable_dependency_tracking" = xyes; then 250ba064abeSmrg continue 251ba064abeSmrg else 252ba064abeSmrg break 253ba064abeSmrg fi 254ba064abeSmrg ;; 255d9dcd5aeSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256d9dcd5aeSmrg # This compiler won't grok '-c -o', but also, the minuso test has 257ba064abeSmrg # not run yet. These depmodes are late enough in the game, and 258ba064abeSmrg # so weak that their functioning should not be impacted. 259ba064abeSmrg am__obj=conftest.${OBJEXT-o} 260ba064abeSmrg am__minus_obj= 261ba064abeSmrg ;; 262ba064abeSmrg none) break ;; 263ba064abeSmrg esac 264ba064abeSmrg if depmode=$depmode \ 265ba064abeSmrg source=sub/conftest.c object=$am__obj \ 266ba064abeSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267ba064abeSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268ba064abeSmrg >/dev/null 2>conftest.err && 269ba064abeSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270ba064abeSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271ba064abeSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272ba064abeSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273ba064abeSmrg # icc doesn't choke on unknown options, it will just issue warnings 274ba064abeSmrg # or remarks (even with -Werror). So we grep stderr for any message 275ba064abeSmrg # that says an option was ignored or not supported. 276ba064abeSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277ba064abeSmrg # icc: Command line warning: ignoring option '-M'; no argument required 278ba064abeSmrg # The diagnosis changed in icc 8.0: 279ba064abeSmrg # icc: Command line remark: option '-MP' not supported 280ba064abeSmrg if (grep 'ignoring option' conftest.err || 281ba064abeSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282ba064abeSmrg am_cv_$1_dependencies_compiler_type=$depmode 283ba064abeSmrg break 284ba064abeSmrg fi 285ba064abeSmrg fi 286ba064abeSmrg done 287191cded7Smrg 288ba064abeSmrg cd .. 289ba064abeSmrg rm -rf conftest.dir 290ba064abeSmrgelse 291ba064abeSmrg am_cv_$1_dependencies_compiler_type=none 292ba064abeSmrgfi 293ba064abeSmrg]) 294ba064abeSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295ba064abeSmrgAM_CONDITIONAL([am__fastdep$1], [ 296ba064abeSmrg test "x$enable_dependency_tracking" != xno \ 297ba064abeSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298ba064abeSmrg]) 299191cded7Smrg 300191cded7Smrg 301ba064abeSmrg# AM_SET_DEPDIR 302ba064abeSmrg# ------------- 303ba064abeSmrg# Choose a directory name for dependency files. 304d9dcd5aeSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305ba064abeSmrgAC_DEFUN([AM_SET_DEPDIR], 306ba064abeSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307ba064abeSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308ba064abeSmrg]) 309191cded7Smrg 310191cded7Smrg 311ba064abeSmrg# AM_DEP_TRACK 312ba064abeSmrg# ------------ 313ba064abeSmrgAC_DEFUN([AM_DEP_TRACK], 314d9dcd5aeSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 315d9dcd5aeSmrgAS_HELP_STRING( 316d9dcd5aeSmrg [--enable-dependency-tracking], 317d9dcd5aeSmrg [do not reject slow dependency extractors]) 318d9dcd5aeSmrgAS_HELP_STRING( 319d9dcd5aeSmrg [--disable-dependency-tracking], 320d9dcd5aeSmrg [speeds up one-time build])]) 321ba064abeSmrgif test "x$enable_dependency_tracking" != xno; then 322ba064abeSmrg am_depcomp="$ac_aux_dir/depcomp" 323ba064abeSmrg AMDEPBACKSLASH='\' 324d9dcd5aeSmrg am__nodep='_no' 325ba064abeSmrgfi 326ba064abeSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327ba064abeSmrgAC_SUBST([AMDEPBACKSLASH])dnl 328ba064abeSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329d9dcd5aeSmrgAC_SUBST([am__nodep])dnl 330d9dcd5aeSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 331ba064abeSmrg]) 332191cded7Smrg 333ba064abeSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 334191cded7Smrg 33558deefebSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 336ba064abeSmrg# 337ba064abeSmrg# This file is free software; the Free Software Foundation 338ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 339ba064abeSmrg# with or without modifications, as long as this notice is preserved. 340191cded7Smrg 341191cded7Smrg 342ba064abeSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 343b290cf36Smrg# ------------------------------ 344ba064abeSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 345ba064abeSmrg[{ 346d9dcd5aeSmrg # Older Autoconf quotes --file arguments for eval, but not when files 347ba064abeSmrg # are listed without --file. Let's play safe and only enable the eval 348ba064abeSmrg # if we detect the quoting. 349ba064abeSmrg case $CONFIG_FILES in 350ba064abeSmrg *\'*) eval set x "$CONFIG_FILES" ;; 351ba064abeSmrg *) set x $CONFIG_FILES ;; 352ba064abeSmrg esac 353ba064abeSmrg shift 354ba064abeSmrg for mf 355ba064abeSmrg do 356ba064abeSmrg # Strip MF so we end up with the name of the file. 357ba064abeSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 358ba064abeSmrg # Check whether this is an Automake generated Makefile or not. 359d9dcd5aeSmrg # We used to match only the files named 'Makefile.in', but 360ba064abeSmrg # some people rename them; so instead we look at the file content. 361ba064abeSmrg # Grep'ing the first line is not enough: some people post-process 362ba064abeSmrg # each Makefile.in and add a new line on top of each file to say so. 363ba064abeSmrg # Grep'ing the whole file is not good either: AIX grep has a line 364ba064abeSmrg # limit of 2048, but all sed's we know have understand at least 4000. 365ba064abeSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 366ba064abeSmrg dirpart=`AS_DIRNAME("$mf")` 367ba064abeSmrg else 368ba064abeSmrg continue 369ba064abeSmrg fi 370ba064abeSmrg # Extract the definition of DEPDIR, am__include, and am__quote 371d9dcd5aeSmrg # from the Makefile without running 'make'. 372ba064abeSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 373ba064abeSmrg test -z "$DEPDIR" && continue 374ba064abeSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 375d9dcd5aeSmrg test -z "$am__include" && continue 376ba064abeSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 377ba064abeSmrg # Find all dependency output files, they are included files with 378ba064abeSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 379ba064abeSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 380ba064abeSmrg # expansion. 381ba064abeSmrg for file in `sed -n " 382ba064abeSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383d9dcd5aeSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 384ba064abeSmrg # Make sure the directory exists. 385ba064abeSmrg test -f "$dirpart/$file" && continue 386ba064abeSmrg fdir=`AS_DIRNAME(["$file"])` 387ba064abeSmrg AS_MKDIR_P([$dirpart/$fdir]) 388ba064abeSmrg # echo "creating $dirpart/$file" 389ba064abeSmrg echo '# dummy' > "$dirpart/$file" 390ba064abeSmrg done 391ba064abeSmrg done 392ba064abeSmrg} 393ba064abeSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394b290cf36Smrg 395b290cf36Smrg 396ba064abeSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397ba064abeSmrg# ----------------------------- 398ba064abeSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 399ba064abeSmrg# 400ba064abeSmrg# This code is only required when automatic dependency tracking 401d9dcd5aeSmrg# is enabled. FIXME. This creates each '.P' file that we will 402ba064abeSmrg# need in order to bootstrap the dependency handling code. 403ba064abeSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404ba064abeSmrg[AC_CONFIG_COMMANDS([depfiles], 405ba064abeSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406ba064abeSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407191cded7Smrg]) 408191cded7Smrg 409ba064abeSmrg# Do all the work for Automake. -*- Autoconf -*- 410b290cf36Smrg 41158deefebSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 412ba064abeSmrg# 413ba064abeSmrg# This file is free software; the Free Software Foundation 414ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 415ba064abeSmrg# with or without modifications, as long as this notice is preserved. 416b290cf36Smrg 417ba064abeSmrg# This macro actually does too much. Some checks are only needed if 418ba064abeSmrg# your package does certain things. But this isn't really a big deal. 419191cded7Smrg 42058deefebSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 42158deefebSmrgm4_define([AC_PROG_CC], 42258deefebSmrgm4_defn([AC_PROG_CC]) 42358deefebSmrg[_AM_PROG_CC_C_O 42458deefebSmrg]) 42558deefebSmrg 426ba064abeSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 427ba064abeSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 428ba064abeSmrg# ----------------------------------------------- 429ba064abeSmrg# The call with PACKAGE and VERSION arguments is the old style 430ba064abeSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 431ba064abeSmrg# and VERSION should now be passed to AC_INIT and removed from 432ba064abeSmrg# the call to AM_INIT_AUTOMAKE. 433ba064abeSmrg# We support both call styles for the transition. After 434ba064abeSmrg# the next Automake release, Autoconf can make the AC_INIT 435ba064abeSmrg# arguments mandatory, and then we can depend on a new Autoconf 436ba064abeSmrg# release and drop the old call support. 437ba064abeSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 438d9dcd5aeSmrg[AC_PREREQ([2.65])dnl 439ba064abeSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 440ba064abeSmrgdnl the ones we care about. 441ba064abeSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 442ba064abeSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 443ba064abeSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 444ba064abeSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 445ba064abeSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 446ba064abeSmrg # is not polluted with repeated "-I." 447ba064abeSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 448ba064abeSmrg # test to see if srcdir already configured 449ba064abeSmrg if test -f $srcdir/config.status; then 450ba064abeSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 451ba064abeSmrg fi 452ba064abeSmrgfi 453191cded7Smrg 454ba064abeSmrg# test whether we have cygpath 455ba064abeSmrgif test -z "$CYGPATH_W"; then 456ba064abeSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 457ba064abeSmrg CYGPATH_W='cygpath -w' 458ba064abeSmrg else 459ba064abeSmrg CYGPATH_W=echo 460ba064abeSmrg fi 461ba064abeSmrgfi 462ba064abeSmrgAC_SUBST([CYGPATH_W]) 463191cded7Smrg 464ba064abeSmrg# Define the identity of the package. 465ba064abeSmrgdnl Distinguish between old-style and new-style calls. 466ba064abeSmrgm4_ifval([$2], 467d9dcd5aeSmrg[AC_DIAGNOSE([obsolete], 468d9dcd5aeSmrg [$0: two- and three-arguments forms are deprecated.]) 469d9dcd5aeSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 470ba064abeSmrg AC_SUBST([PACKAGE], [$1])dnl 471ba064abeSmrg AC_SUBST([VERSION], [$2])], 472ba064abeSmrg[_AM_SET_OPTIONS([$1])dnl 473ba064abeSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 474d9dcd5aeSmrgm4_if( 475d9dcd5aeSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 476d9dcd5aeSmrg [ok:ok],, 477ba064abeSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 478ba064abeSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 479ba064abeSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 480191cded7Smrg 481ba064abeSmrg_AM_IF_OPTION([no-define],, 482d9dcd5aeSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 483d9dcd5aeSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 484191cded7Smrg 485ba064abeSmrg# Some tools Automake needs. 486ba064abeSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 487ba064abeSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 488d9dcd5aeSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 489d9dcd5aeSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 490d9dcd5aeSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 491d9dcd5aeSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 492d9dcd5aeSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 493ba064abeSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 494ba064abeSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 495d9dcd5aeSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 496d9dcd5aeSmrg# For better backward compatibility. To be removed once Automake 1.9.x 497d9dcd5aeSmrg# dies out for good. For more background, see: 498d9dcd5aeSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 499d9dcd5aeSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 500d9dcd5aeSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 50158deefebSmrg# We need awk for the "check" target (and possibly the TAP driver). The 50258deefebSmrg# system "awk" is bad on some platforms. 503ba064abeSmrgAC_REQUIRE([AC_PROG_AWK])dnl 504ba064abeSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 505ba064abeSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 506ba064abeSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507ba064abeSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508ba064abeSmrg [_AM_PROG_TAR([v7])])]) 509ba064abeSmrg_AM_IF_OPTION([no-dependencies],, 510ba064abeSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 511d9dcd5aeSmrg [_AM_DEPENDENCIES([CC])], 512d9dcd5aeSmrg [m4_define([AC_PROG_CC], 513d9dcd5aeSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 514ba064abeSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 515d9dcd5aeSmrg [_AM_DEPENDENCIES([CXX])], 516d9dcd5aeSmrg [m4_define([AC_PROG_CXX], 517d9dcd5aeSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 518ba064abeSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 519d9dcd5aeSmrg [_AM_DEPENDENCIES([OBJC])], 520d9dcd5aeSmrg [m4_define([AC_PROG_OBJC], 521d9dcd5aeSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 522d9dcd5aeSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 523d9dcd5aeSmrg [_AM_DEPENDENCIES([OBJCXX])], 524d9dcd5aeSmrg [m4_define([AC_PROG_OBJCXX], 525d9dcd5aeSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 526ba064abeSmrg]) 527d9dcd5aeSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 528d9dcd5aeSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 529d9dcd5aeSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 530d9dcd5aeSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 531ba064abeSmrgAC_CONFIG_COMMANDS_PRE(dnl 532ba064abeSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 533ba064abeSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 53458deefebSmrg 53558deefebSmrg# POSIX will say in a future version that running "rm -f" with no argument 53658deefebSmrg# is OK; and we want to be able to make that assumption in our Makefile 53758deefebSmrg# recipes. So use an aggressive probe to check that the usage we want is 53858deefebSmrg# actually supported "in the wild" to an acceptable degree. 53958deefebSmrg# See automake bug#10828. 54058deefebSmrg# To make any issue more visible, cause the running configure to be aborted 54158deefebSmrg# by default if the 'rm' program in use doesn't match our expectations; the 54258deefebSmrg# user can still override this though. 54358deefebSmrgif rm -f && rm -fr && rm -rf; then : OK; else 54458deefebSmrg cat >&2 <<'END' 54558deefebSmrgOops! 54658deefebSmrg 54758deefebSmrgYour 'rm' program seems unable to run without file operands specified 54858deefebSmrgon the command line, even when the '-f' option is present. This is contrary 54958deefebSmrgto the behaviour of most rm programs out there, and not conforming with 55058deefebSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 55158deefebSmrg 55258deefebSmrgPlease tell bug-automake@gnu.org about your system, including the value 55358deefebSmrgof your $PATH and any error possibly output before this message. This 55458deefebSmrgcan help us improve future automake versions. 55558deefebSmrg 55658deefebSmrgEND 55758deefebSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 55858deefebSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 55958deefebSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 56058deefebSmrg echo >&2 56158deefebSmrg else 56258deefebSmrg cat >&2 <<'END' 56358deefebSmrgAborting the configuration process, to ensure you take notice of the issue. 56458deefebSmrg 56558deefebSmrgYou can download and install GNU coreutils to get an 'rm' implementation 56658deefebSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 56758deefebSmrg 56858deefebSmrgIf you want to complete the configuration process using your problematic 56958deefebSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 57058deefebSmrgto "yes", and re-run configure. 57158deefebSmrg 57258deefebSmrgEND 57358deefebSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 57458deefebSmrg fi 57558deefebSmrgfi 57658deefebSmrgdnl The trailing newline in this macro's definition is deliberate, for 57758deefebSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 57858deefebSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 579b290cf36Smrg]) 580191cded7Smrg 581d9dcd5aeSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 582ba064abeSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 583ba064abeSmrgdnl mangled by Autoconf and run in a shell conditional statement. 584ba064abeSmrgm4_define([_AC_COMPILER_EXEEXT], 585ba064abeSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 586191cded7Smrg 587ba064abeSmrg# When config.status generates a header, we must update the stamp-h file. 588ba064abeSmrg# This file resides in the same directory as the config header 589ba064abeSmrg# that is generated. The stamp files are numbered to have different names. 590191cded7Smrg 591ba064abeSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 592ba064abeSmrg# loop where config.status creates the headers, so we can generate 593ba064abeSmrg# our stamp files there. 594ba064abeSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 595ba064abeSmrg[# Compute $1's index in $config_headers. 596ba064abeSmrg_am_arg=$1 597ba064abeSmrg_am_stamp_count=1 598ba064abeSmrgfor _am_header in $config_headers :; do 599ba064abeSmrg case $_am_header in 600ba064abeSmrg $_am_arg | $_am_arg:* ) 601ba064abeSmrg break ;; 602ba064abeSmrg * ) 603ba064abeSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 604ba064abeSmrg esac 605ba064abeSmrgdone 606ba064abeSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 607191cded7Smrg 60858deefebSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 609ba064abeSmrg# 610ba064abeSmrg# This file is free software; the Free Software Foundation 611ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 612ba064abeSmrg# with or without modifications, as long as this notice is preserved. 613191cded7Smrg 614ba064abeSmrg# AM_PROG_INSTALL_SH 615ba064abeSmrg# ------------------ 616ba064abeSmrg# Define $install_sh. 617ba064abeSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 618ba064abeSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 61958deefebSmrgif test x"${install_sh+set}" != xset; then 620ba064abeSmrg case $am_aux_dir in 621ba064abeSmrg *\ * | *\ *) 622ba064abeSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 623ba064abeSmrg *) 624ba064abeSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 625ba064abeSmrg esac 626ba064abeSmrgfi 627d9dcd5aeSmrgAC_SUBST([install_sh])]) 628191cded7Smrg 62958deefebSmrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 630ba064abeSmrg# 631ba064abeSmrg# This file is free software; the Free Software Foundation 632ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 633ba064abeSmrg# with or without modifications, as long as this notice is preserved. 634191cded7Smrg 635ba064abeSmrg# Check whether the underlying file-system supports filenames 636ba064abeSmrg# with a leading dot. For instance MS-DOS doesn't. 637ba064abeSmrgAC_DEFUN([AM_SET_LEADING_DOT], 638ba064abeSmrg[rm -rf .tst 2>/dev/null 639ba064abeSmrgmkdir .tst 2>/dev/null 640ba064abeSmrgif test -d .tst; then 641ba064abeSmrg am__leading_dot=. 642ba064abeSmrgelse 643ba064abeSmrg am__leading_dot=_ 644ba064abeSmrgfi 645ba064abeSmrgrmdir .tst 2>/dev/null 646ba064abeSmrgAC_SUBST([am__leading_dot])]) 647191cded7Smrg 648ba064abeSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 649ba064abeSmrg 65058deefebSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 651b290cf36Smrg# 652ba064abeSmrg# This file is free software; the Free Software Foundation 653ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 654ba064abeSmrg# with or without modifications, as long as this notice is preserved. 655191cded7Smrg 656ba064abeSmrg# AM_MAKE_INCLUDE() 657ba064abeSmrg# ----------------- 658ba064abeSmrg# Check to see how make treats includes. 659ba064abeSmrgAC_DEFUN([AM_MAKE_INCLUDE], 660ba064abeSmrg[am_make=${MAKE-make} 661ba064abeSmrgcat > confinc << 'END' 662ba064abeSmrgam__doit: 663ba064abeSmrg @echo this is the am__doit target 664ba064abeSmrg.PHONY: am__doit 665ba064abeSmrgEND 666ba064abeSmrg# If we don't find an include directive, just comment out the code. 667ba064abeSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 668ba064abeSmrgam__include="#" 669ba064abeSmrgam__quote= 670ba064abeSmrg_am_result=none 671ba064abeSmrg# First try GNU make style include. 672ba064abeSmrgecho "include confinc" > confmf 673d9dcd5aeSmrg# Ignore all kinds of additional output from 'make'. 674ba064abeSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 675ba064abeSmrg*the\ am__doit\ target*) 676ba064abeSmrg am__include=include 677ba064abeSmrg am__quote= 678ba064abeSmrg _am_result=GNU 679ba064abeSmrg ;; 680ba064abeSmrgesac 681ba064abeSmrg# Now try BSD make style include. 682ba064abeSmrgif test "$am__include" = "#"; then 683ba064abeSmrg echo '.include "confinc"' > confmf 684ba064abeSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 685ba064abeSmrg *the\ am__doit\ target*) 686ba064abeSmrg am__include=.include 687ba064abeSmrg am__quote="\"" 688ba064abeSmrg _am_result=BSD 689ba064abeSmrg ;; 690ba064abeSmrg esac 691ba064abeSmrgfi 692ba064abeSmrgAC_SUBST([am__include]) 693ba064abeSmrgAC_SUBST([am__quote]) 694ba064abeSmrgAC_MSG_RESULT([$_am_result]) 695ba064abeSmrgrm -f confinc confmf 696ba064abeSmrg]) 697b290cf36Smrg 698ba064abeSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 699b290cf36Smrg 70058deefebSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 701ba064abeSmrg# 702ba064abeSmrg# This file is free software; the Free Software Foundation 703ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 704ba064abeSmrg# with or without modifications, as long as this notice is preserved. 705b290cf36Smrg 706ba064abeSmrg# AM_MISSING_PROG(NAME, PROGRAM) 707b290cf36Smrg# ------------------------------ 708ba064abeSmrgAC_DEFUN([AM_MISSING_PROG], 709ba064abeSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 710ba064abeSmrg$1=${$1-"${am_missing_run}$2"} 711ba064abeSmrgAC_SUBST($1)]) 712b290cf36Smrg 713ba064abeSmrg# AM_MISSING_HAS_RUN 714ba064abeSmrg# ------------------ 715d9dcd5aeSmrg# Define MISSING if not defined so far and test if it is modern enough. 716d9dcd5aeSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 717ba064abeSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 718ba064abeSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 719ba064abeSmrgAC_REQUIRE_AUX_FILE([missing])dnl 720ba064abeSmrgif test x"${MISSING+set}" != xset; then 721ba064abeSmrg case $am_aux_dir in 722ba064abeSmrg *\ * | *\ *) 723ba064abeSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 724ba064abeSmrg *) 725ba064abeSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 726ba064abeSmrg esac 727ba064abeSmrgfi 728ba064abeSmrg# Use eval to expand $SHELL 729d9dcd5aeSmrgif eval "$MISSING --is-lightweight"; then 730d9dcd5aeSmrg am_missing_run="$MISSING " 731ba064abeSmrgelse 732ba064abeSmrg am_missing_run= 733d9dcd5aeSmrg AC_MSG_WARN(['missing' script is too old or missing]) 734ba064abeSmrgfi 735ba064abeSmrg]) 736b290cf36Smrg 737ba064abeSmrg# Helper functions for option handling. -*- Autoconf -*- 738191cded7Smrg 73958deefebSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 740ba064abeSmrg# 741ba064abeSmrg# This file is free software; the Free Software Foundation 742ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 743ba064abeSmrg# with or without modifications, as long as this notice is preserved. 744b290cf36Smrg 745ba064abeSmrg# _AM_MANGLE_OPTION(NAME) 746ba064abeSmrg# ----------------------- 747ba064abeSmrgAC_DEFUN([_AM_MANGLE_OPTION], 748ba064abeSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 749191cded7Smrg 750ba064abeSmrg# _AM_SET_OPTION(NAME) 751d9dcd5aeSmrg# -------------------- 752ba064abeSmrg# Set option NAME. Presently that only means defining a flag for this option. 753ba064abeSmrgAC_DEFUN([_AM_SET_OPTION], 754d9dcd5aeSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 755191cded7Smrg 756ba064abeSmrg# _AM_SET_OPTIONS(OPTIONS) 757d9dcd5aeSmrg# ------------------------ 758ba064abeSmrg# OPTIONS is a space-separated list of Automake options. 759ba064abeSmrgAC_DEFUN([_AM_SET_OPTIONS], 760ba064abeSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 761191cded7Smrg 762ba064abeSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 763ba064abeSmrg# ------------------------------------------- 764ba064abeSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 765ba064abeSmrgAC_DEFUN([_AM_IF_OPTION], 766ba064abeSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 767191cded7Smrg 76858deefebSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 76958deefebSmrg# 77058deefebSmrg# This file is free software; the Free Software Foundation 77158deefebSmrg# gives unlimited permission to copy and/or distribute it, 77258deefebSmrg# with or without modifications, as long as this notice is preserved. 77358deefebSmrg 77458deefebSmrg# _AM_PROG_CC_C_O 77558deefebSmrg# --------------- 77658deefebSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 77758deefebSmrg# to automatically call this. 77858deefebSmrgAC_DEFUN([_AM_PROG_CC_C_O], 77958deefebSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 78058deefebSmrgAC_REQUIRE_AUX_FILE([compile])dnl 78158deefebSmrgAC_LANG_PUSH([C])dnl 78258deefebSmrgAC_CACHE_CHECK( 78358deefebSmrg [whether $CC understands -c and -o together], 78458deefebSmrg [am_cv_prog_cc_c_o], 78558deefebSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 78658deefebSmrg # Make sure it works both with $CC and with simple cc. 78758deefebSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 78858deefebSmrg # compilers refuse to overwrite an existing .o file with -o, 78958deefebSmrg # though they will create one. 79058deefebSmrg am_cv_prog_cc_c_o=yes 79158deefebSmrg for am_i in 1 2; do 79258deefebSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 79358deefebSmrg && test -f conftest2.$ac_objext; then 79458deefebSmrg : OK 79558deefebSmrg else 79658deefebSmrg am_cv_prog_cc_c_o=no 79758deefebSmrg break 79858deefebSmrg fi 79958deefebSmrg done 80058deefebSmrg rm -f core conftest* 80158deefebSmrg unset am_i]) 80258deefebSmrgif test "$am_cv_prog_cc_c_o" != yes; then 80358deefebSmrg # Losing compiler, so override with the script. 80458deefebSmrg # FIXME: It is wrong to rewrite CC. 80558deefebSmrg # But if we don't then we get into trouble of one sort or another. 80658deefebSmrg # A longer-term fix would be to have automake use am__CC in this case, 80758deefebSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 80858deefebSmrg CC="$am_aux_dir/compile $CC" 80958deefebSmrgfi 81058deefebSmrgAC_LANG_POP([C])]) 81158deefebSmrg 81258deefebSmrg# For backward compatibility. 81358deefebSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 81458deefebSmrg 81558deefebSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 81658deefebSmrg# 81758deefebSmrg# This file is free software; the Free Software Foundation 81858deefebSmrg# gives unlimited permission to copy and/or distribute it, 81958deefebSmrg# with or without modifications, as long as this notice is preserved. 82058deefebSmrg 82158deefebSmrg# AM_RUN_LOG(COMMAND) 82258deefebSmrg# ------------------- 82358deefebSmrg# Run COMMAND, save the exit status in ac_status, and log it. 82458deefebSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 82558deefebSmrgAC_DEFUN([AM_RUN_LOG], 82658deefebSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 82758deefebSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 82858deefebSmrg ac_status=$? 82958deefebSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 83058deefebSmrg (exit $ac_status); }]) 83158deefebSmrg 832ba064abeSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 833191cded7Smrg 83458deefebSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 835ba064abeSmrg# 836ba064abeSmrg# This file is free software; the Free Software Foundation 837ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 838ba064abeSmrg# with or without modifications, as long as this notice is preserved. 839191cded7Smrg 840ba064abeSmrg# AM_SANITY_CHECK 841ba064abeSmrg# --------------- 842ba064abeSmrgAC_DEFUN([AM_SANITY_CHECK], 843ba064abeSmrg[AC_MSG_CHECKING([whether build environment is sane]) 844ba064abeSmrg# Reject unsafe characters in $srcdir or the absolute working directory 845ba064abeSmrg# name. Accept space and tab only in the latter. 846ba064abeSmrgam_lf=' 847ba064abeSmrg' 848ba064abeSmrgcase `pwd` in 849ba064abeSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 850ba064abeSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 851ba064abeSmrgesac 852ba064abeSmrgcase $srcdir in 853ba064abeSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 854d9dcd5aeSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 855ba064abeSmrgesac 856b290cf36Smrg 857d9dcd5aeSmrg# Do 'set' in a subshell so we don't clobber the current shell's 858ba064abeSmrg# arguments. Must try -L first in case configure is actually a 859ba064abeSmrg# symlink; some systems play weird games with the mod time of symlinks 860ba064abeSmrg# (eg FreeBSD returns the mod time of the symlink's containing 861ba064abeSmrg# directory). 862ba064abeSmrgif ( 863d9dcd5aeSmrg am_has_slept=no 864d9dcd5aeSmrg for am_try in 1 2; do 865d9dcd5aeSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 866d9dcd5aeSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 867d9dcd5aeSmrg if test "$[*]" = "X"; then 868d9dcd5aeSmrg # -L didn't work. 869d9dcd5aeSmrg set X `ls -t "$srcdir/configure" conftest.file` 870d9dcd5aeSmrg fi 871d9dcd5aeSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 872d9dcd5aeSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 873d9dcd5aeSmrg 874d9dcd5aeSmrg # If neither matched, then we have a broken ls. This can happen 875d9dcd5aeSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 876d9dcd5aeSmrg # broken ls alias from the environment. This has actually 877d9dcd5aeSmrg # happened. Such a system could not be considered "sane". 878d9dcd5aeSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 879d9dcd5aeSmrg alias in your environment]) 880d9dcd5aeSmrg fi 881d9dcd5aeSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 882d9dcd5aeSmrg break 883d9dcd5aeSmrg fi 884d9dcd5aeSmrg # Just in case. 885d9dcd5aeSmrg sleep 1 886d9dcd5aeSmrg am_has_slept=yes 887d9dcd5aeSmrg done 888ba064abeSmrg test "$[2]" = conftest.file 889ba064abeSmrg ) 890ba064abeSmrgthen 891ba064abeSmrg # Ok. 892ba064abeSmrg : 893ba064abeSmrgelse 894ba064abeSmrg AC_MSG_ERROR([newly created file is older than distributed files! 895ba064abeSmrgCheck your system clock]) 896b290cf36Smrgfi 897d9dcd5aeSmrgAC_MSG_RESULT([yes]) 898d9dcd5aeSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 899d9dcd5aeSmrg# generated files are strictly newer. 900d9dcd5aeSmrgam_sleep_pid= 901d9dcd5aeSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 902d9dcd5aeSmrg ( sleep 1 ) & 903d9dcd5aeSmrg am_sleep_pid=$! 904d9dcd5aeSmrgfi 905d9dcd5aeSmrgAC_CONFIG_COMMANDS_PRE( 906d9dcd5aeSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 907d9dcd5aeSmrg if test -n "$am_sleep_pid"; then 908d9dcd5aeSmrg # Hide warnings about reused PIDs. 909d9dcd5aeSmrg wait $am_sleep_pid 2>/dev/null 910d9dcd5aeSmrg fi 911d9dcd5aeSmrg AC_MSG_RESULT([done])]) 912d9dcd5aeSmrgrm -f conftest.file 913d9dcd5aeSmrg]) 914b290cf36Smrg 91558deefebSmrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 916ba064abeSmrg# 917ba064abeSmrg# This file is free software; the Free Software Foundation 918ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 919ba064abeSmrg# with or without modifications, as long as this notice is preserved. 920191cded7Smrg 921ba064abeSmrg# AM_SILENT_RULES([DEFAULT]) 922ba064abeSmrg# -------------------------- 923ba064abeSmrg# Enable less verbose build rules; with the default set to DEFAULT 924d9dcd5aeSmrg# ("yes" being less verbose, "no" or empty being verbose). 925ba064abeSmrgAC_DEFUN([AM_SILENT_RULES], 926d9dcd5aeSmrg[AC_ARG_ENABLE([silent-rules], [dnl 927d9dcd5aeSmrgAS_HELP_STRING( 928d9dcd5aeSmrg [--enable-silent-rules], 929d9dcd5aeSmrg [less verbose build output (undo: "make V=1")]) 930d9dcd5aeSmrgAS_HELP_STRING( 931d9dcd5aeSmrg [--disable-silent-rules], 932d9dcd5aeSmrg [verbose build output (undo: "make V=0")])dnl 933d9dcd5aeSmrg]) 934d9dcd5aeSmrgcase $enable_silent_rules in @%:@ ((( 935d9dcd5aeSmrg yes) AM_DEFAULT_VERBOSITY=0;; 936d9dcd5aeSmrg no) AM_DEFAULT_VERBOSITY=1;; 937d9dcd5aeSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 938ba064abeSmrgesac 939d9dcd5aeSmrgdnl 940d9dcd5aeSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 941d9dcd5aeSmrgdnl do not support nested variable expansions. 942d9dcd5aeSmrgdnl See automake bug#9928 and bug#10237. 943d9dcd5aeSmrgam_make=${MAKE-make} 944d9dcd5aeSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 945d9dcd5aeSmrg [am_cv_make_support_nested_variables], 946d9dcd5aeSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 947d9dcd5aeSmrgBAR0=false 948d9dcd5aeSmrgBAR1=true 949d9dcd5aeSmrgV=1 950d9dcd5aeSmrgam__doit: 951d9dcd5aeSmrg @$(TRUE) 952d9dcd5aeSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 953d9dcd5aeSmrg am_cv_make_support_nested_variables=yes 954d9dcd5aeSmrgelse 955d9dcd5aeSmrg am_cv_make_support_nested_variables=no 956d9dcd5aeSmrgfi]) 957d9dcd5aeSmrgif test $am_cv_make_support_nested_variables = yes; then 958d9dcd5aeSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 959d9dcd5aeSmrg AM_V='$(V)' 960d9dcd5aeSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 961d9dcd5aeSmrgelse 962d9dcd5aeSmrg AM_V=$AM_DEFAULT_VERBOSITY 963d9dcd5aeSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 964d9dcd5aeSmrgfi 965d9dcd5aeSmrgAC_SUBST([AM_V])dnl 966d9dcd5aeSmrgAM_SUBST_NOTMAKE([AM_V])dnl 967d9dcd5aeSmrgAC_SUBST([AM_DEFAULT_V])dnl 968d9dcd5aeSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 969ba064abeSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 970ba064abeSmrgAM_BACKSLASH='\' 971ba064abeSmrgAC_SUBST([AM_BACKSLASH])dnl 972ba064abeSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 973ba064abeSmrg]) 974191cded7Smrg 97558deefebSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 976b290cf36Smrg# 977ba064abeSmrg# This file is free software; the Free Software Foundation 978ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 979ba064abeSmrg# with or without modifications, as long as this notice is preserved. 980191cded7Smrg 981ba064abeSmrg# AM_PROG_INSTALL_STRIP 982ba064abeSmrg# --------------------- 983d9dcd5aeSmrg# One issue with vendor 'install' (even GNU) is that you can't 984ba064abeSmrg# specify the program used to strip binaries. This is especially 985ba064abeSmrg# annoying in cross-compiling environments, where the build's strip 986ba064abeSmrg# is unlikely to handle the host's binaries. 987ba064abeSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 988d9dcd5aeSmrg# always use install-sh in "make install-strip", and initialize 989ba064abeSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 990ba064abeSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 991ba064abeSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 992d9dcd5aeSmrg# Installed binaries are usually stripped using 'strip' when the user 993d9dcd5aeSmrg# run "make install-strip". However 'strip' might not be the right 994ba064abeSmrg# tool to use in cross-compilation environments, therefore Automake 995d9dcd5aeSmrg# will honor the 'STRIP' environment variable to overrule this program. 996d9dcd5aeSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 997ba064abeSmrgif test "$cross_compiling" != no; then 998ba064abeSmrg AC_CHECK_TOOL([STRIP], [strip], :) 999b290cf36Smrgfi 1000ba064abeSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1001ba064abeSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1002191cded7Smrg 100358deefebSmrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 1004ba064abeSmrg# 1005ba064abeSmrg# This file is free software; the Free Software Foundation 1006ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 1007ba064abeSmrg# with or without modifications, as long as this notice is preserved. 1008191cded7Smrg 1009ba064abeSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1010ba064abeSmrg# --------------------------- 1011ba064abeSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1012ba064abeSmrg# This macro is traced by Automake. 1013ba064abeSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1014191cded7Smrg 1015ba064abeSmrg# AM_SUBST_NOTMAKE(VARIABLE) 1016d9dcd5aeSmrg# -------------------------- 1017ba064abeSmrg# Public sister of _AM_SUBST_NOTMAKE. 1018ba064abeSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1019191cded7Smrg 1020ba064abeSmrg# Check how to create a tarball. -*- Autoconf -*- 1021191cded7Smrg 102258deefebSmrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 1023ba064abeSmrg# 1024ba064abeSmrg# This file is free software; the Free Software Foundation 1025ba064abeSmrg# gives unlimited permission to copy and/or distribute it, 1026ba064abeSmrg# with or without modifications, as long as this notice is preserved. 1027191cded7Smrg 1028ba064abeSmrg# _AM_PROG_TAR(FORMAT) 1029ba064abeSmrg# -------------------- 1030ba064abeSmrg# Check how to create a tarball in format FORMAT. 1031d9dcd5aeSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1032ba064abeSmrg# 1033ba064abeSmrg# Substitute a variable $(am__tar) that is a command 1034ba064abeSmrg# writing to stdout a FORMAT-tarball containing the directory 1035ba064abeSmrg# $tardir. 1036ba064abeSmrg# tardir=directory && $(am__tar) > result.tar 1037ba064abeSmrg# 1038ba064abeSmrg# Substitute a variable $(am__untar) that extract such 1039ba064abeSmrg# a tarball read from stdin. 1040ba064abeSmrg# $(am__untar) < result.tar 1041d9dcd5aeSmrg# 1042ba064abeSmrgAC_DEFUN([_AM_PROG_TAR], 1043d9dcd5aeSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1044d9dcd5aeSmrg# in the wild :-( We should find a proper way to deprecate it ... 1045d9dcd5aeSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1046d9dcd5aeSmrg 1047d9dcd5aeSmrg# We'll loop over all known methods to create a tar archive until one works. 1048ba064abeSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1049191cded7Smrg 1050d9dcd5aeSmrgm4_if([$1], [v7], 1051d9dcd5aeSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1052d9dcd5aeSmrg 1053d9dcd5aeSmrg [m4_case([$1], 1054d9dcd5aeSmrg [ustar], 1055d9dcd5aeSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1056d9dcd5aeSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1057d9dcd5aeSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1058d9dcd5aeSmrg # and bug#13588). 1059d9dcd5aeSmrg am_max_uid=2097151 # 2^21 - 1 1060d9dcd5aeSmrg am_max_gid=$am_max_uid 1061d9dcd5aeSmrg # The $UID and $GID variables are not portable, so we need to resort 1062d9dcd5aeSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1063d9dcd5aeSmrg # below are definitely unexpected, so allow the users to see them 1064d9dcd5aeSmrg # (that is, avoid stderr redirection). 1065d9dcd5aeSmrg am_uid=`id -u || echo unknown` 1066d9dcd5aeSmrg am_gid=`id -g || echo unknown` 1067d9dcd5aeSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1068d9dcd5aeSmrg if test $am_uid -le $am_max_uid; then 1069d9dcd5aeSmrg AC_MSG_RESULT([yes]) 1070d9dcd5aeSmrg else 1071d9dcd5aeSmrg AC_MSG_RESULT([no]) 1072d9dcd5aeSmrg _am_tools=none 1073d9dcd5aeSmrg fi 1074d9dcd5aeSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1075d9dcd5aeSmrg if test $am_gid -le $am_max_gid; then 1076d9dcd5aeSmrg AC_MSG_RESULT([yes]) 1077d9dcd5aeSmrg else 1078d9dcd5aeSmrg AC_MSG_RESULT([no]) 1079d9dcd5aeSmrg _am_tools=none 1080d9dcd5aeSmrg fi], 1081d9dcd5aeSmrg 1082d9dcd5aeSmrg [pax], 1083d9dcd5aeSmrg [], 1084191cded7Smrg 1085d9dcd5aeSmrg [m4_fatal([Unknown tar format])]) 1086d9dcd5aeSmrg 1087d9dcd5aeSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1088d9dcd5aeSmrg 1089d9dcd5aeSmrg # Go ahead even if we have the value already cached. We do so because we 1090d9dcd5aeSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1091d9dcd5aeSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1092d9dcd5aeSmrg 1093d9dcd5aeSmrg for _am_tool in $_am_tools; do 1094d9dcd5aeSmrg case $_am_tool in 1095d9dcd5aeSmrg gnutar) 1096d9dcd5aeSmrg for _am_tar in tar gnutar gtar; do 1097d9dcd5aeSmrg AM_RUN_LOG([$_am_tar --version]) && break 1098d9dcd5aeSmrg done 1099d9dcd5aeSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1100d9dcd5aeSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1101d9dcd5aeSmrg am__untar="$_am_tar -xf -" 1102d9dcd5aeSmrg ;; 1103d9dcd5aeSmrg plaintar) 1104d9dcd5aeSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 1105d9dcd5aeSmrg # ustar tarball either. 1106d9dcd5aeSmrg (tar --version) >/dev/null 2>&1 && continue 1107d9dcd5aeSmrg am__tar='tar chf - "$$tardir"' 1108d9dcd5aeSmrg am__tar_='tar chf - "$tardir"' 1109d9dcd5aeSmrg am__untar='tar xf -' 1110d9dcd5aeSmrg ;; 1111d9dcd5aeSmrg pax) 1112d9dcd5aeSmrg am__tar='pax -L -x $1 -w "$$tardir"' 1113d9dcd5aeSmrg am__tar_='pax -L -x $1 -w "$tardir"' 1114d9dcd5aeSmrg am__untar='pax -r' 1115d9dcd5aeSmrg ;; 1116d9dcd5aeSmrg cpio) 1117d9dcd5aeSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1118d9dcd5aeSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1119d9dcd5aeSmrg am__untar='cpio -i -H $1 -d' 1120d9dcd5aeSmrg ;; 1121d9dcd5aeSmrg none) 1122d9dcd5aeSmrg am__tar=false 1123d9dcd5aeSmrg am__tar_=false 1124d9dcd5aeSmrg am__untar=false 1125d9dcd5aeSmrg ;; 1126d9dcd5aeSmrg esac 1127d9dcd5aeSmrg 1128d9dcd5aeSmrg # If the value was cached, stop now. We just wanted to have am__tar 1129d9dcd5aeSmrg # and am__untar set. 1130d9dcd5aeSmrg test -n "${am_cv_prog_tar_$1}" && break 1131d9dcd5aeSmrg 1132d9dcd5aeSmrg # tar/untar a dummy directory, and stop if the command works. 1133d9dcd5aeSmrg rm -rf conftest.dir 1134d9dcd5aeSmrg mkdir conftest.dir 1135d9dcd5aeSmrg echo GrepMe > conftest.dir/file 1136d9dcd5aeSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1137d9dcd5aeSmrg rm -rf conftest.dir 1138d9dcd5aeSmrg if test -s conftest.tar; then 1139d9dcd5aeSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1140d9dcd5aeSmrg AM_RUN_LOG([cat conftest.dir/file]) 1141d9dcd5aeSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1142d9dcd5aeSmrg fi 1143d9dcd5aeSmrg done 1144ba064abeSmrg rm -rf conftest.dir 1145191cded7Smrg 1146d9dcd5aeSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1147d9dcd5aeSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1148d9dcd5aeSmrg 1149ba064abeSmrgAC_SUBST([am__tar]) 1150ba064abeSmrgAC_SUBST([am__untar]) 1151ba064abeSmrg]) # _AM_PROG_TAR 1152b290cf36Smrg 1153d9dcd5aeSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1154d9dcd5aeSmrg# 1155d9dcd5aeSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1156d9dcd5aeSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1157d9dcd5aeSmrg# Foundation, Inc. 1158d9dcd5aeSmrg# Written by Gordon Matzigkeit, 1996 1159d9dcd5aeSmrg# 1160d9dcd5aeSmrg# This file is free software; the Free Software Foundation gives 1161d9dcd5aeSmrg# unlimited permission to copy and/or distribute it, with or without 1162d9dcd5aeSmrg# modifications, as long as this notice is preserved. 1163b290cf36Smrg 1164d9dcd5aeSmrgm4_define([_LT_COPYING], [dnl 1165d9dcd5aeSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1166d9dcd5aeSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1167d9dcd5aeSmrg# Foundation, Inc. 1168d9dcd5aeSmrg# Written by Gordon Matzigkeit, 1996 1169ba064abeSmrg# 1170d9dcd5aeSmrg# This file is part of GNU Libtool. 1171ba064abeSmrg# 1172d9dcd5aeSmrg# GNU Libtool is free software; you can redistribute it and/or 1173d9dcd5aeSmrg# modify it under the terms of the GNU General Public License as 1174d9dcd5aeSmrg# published by the Free Software Foundation; either version 2 of 1175d9dcd5aeSmrg# the License, or (at your option) any later version. 1176ba064abeSmrg# 1177d9dcd5aeSmrg# As a special exception to the GNU General Public License, 1178d9dcd5aeSmrg# if you distribute this file as part of a program or library that 1179d9dcd5aeSmrg# is built using GNU Libtool, you may include this file under the 1180d9dcd5aeSmrg# same distribution terms that you use for the rest of that program. 1181ba064abeSmrg# 1182d9dcd5aeSmrg# GNU Libtool is distributed in the hope that it will be useful, 1183d9dcd5aeSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1184d9dcd5aeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1185d9dcd5aeSmrg# GNU General Public License for more details. 1186ba064abeSmrg# 1187d9dcd5aeSmrg# You should have received a copy of the GNU General Public License 1188d9dcd5aeSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 1189d9dcd5aeSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 1190d9dcd5aeSmrg# obtained by writing to the Free Software Foundation, Inc., 1191d9dcd5aeSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1192d9dcd5aeSmrg]) 1193191cded7Smrg 1194d9dcd5aeSmrg# serial 57 LT_INIT 1195b290cf36Smrg 1196b290cf36Smrg 1197d9dcd5aeSmrg# LT_PREREQ(VERSION) 1198d9dcd5aeSmrg# ------------------ 1199d9dcd5aeSmrg# Complain and exit if this libtool version is less that VERSION. 1200d9dcd5aeSmrgm4_defun([LT_PREREQ], 1201d9dcd5aeSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 1202d9dcd5aeSmrg [m4_default([$3], 1203d9dcd5aeSmrg [m4_fatal([Libtool version $1 or higher is required], 1204d9dcd5aeSmrg 63)])], 1205d9dcd5aeSmrg [$2])]) 1206b290cf36Smrg 1207b290cf36Smrg 1208d9dcd5aeSmrg# _LT_CHECK_BUILDDIR 1209d9dcd5aeSmrg# ------------------ 1210d9dcd5aeSmrg# Complain if the absolute build directory name contains unusual characters 1211d9dcd5aeSmrgm4_defun([_LT_CHECK_BUILDDIR], 1212d9dcd5aeSmrg[case `pwd` in 1213d9dcd5aeSmrg *\ * | *\ *) 1214d9dcd5aeSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1215d9dcd5aeSmrgesac 1216d9dcd5aeSmrg]) 1217b290cf36Smrg 1218b290cf36Smrg 1219d9dcd5aeSmrg# LT_INIT([OPTIONS]) 1220d9dcd5aeSmrg# ------------------ 1221d9dcd5aeSmrgAC_DEFUN([LT_INIT], 1222d9dcd5aeSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 1223d9dcd5aeSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1224d9dcd5aeSmrgAC_BEFORE([$0], [LT_LANG])dnl 1225d9dcd5aeSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 1226d9dcd5aeSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 1227d9dcd5aeSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 1228191cded7Smrg 1229d9dcd5aeSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 1230d9dcd5aeSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1231d9dcd5aeSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1232d9dcd5aeSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1233d9dcd5aeSmrgdnl unless we require an AC_DEFUNed macro: 1234d9dcd5aeSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1235d9dcd5aeSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1236d9dcd5aeSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1237d9dcd5aeSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1238d9dcd5aeSmrgm4_require([_LT_PROG_LTMAIN])dnl 1239191cded7Smrg 1240d9dcd5aeSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1241191cded7Smrg 1242d9dcd5aeSmrgdnl Parse OPTIONS 1243d9dcd5aeSmrg_LT_SET_OPTIONS([$0], [$1]) 1244191cded7Smrg 1245d9dcd5aeSmrg# This can be used to rebuild libtool when needed 1246d9dcd5aeSmrgLIBTOOL_DEPS="$ltmain" 1247191cded7Smrg 1248d9dcd5aeSmrg# Always use our own libtool. 1249d9dcd5aeSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1250d9dcd5aeSmrgAC_SUBST(LIBTOOL)dnl 1251191cded7Smrg 1252d9dcd5aeSmrg_LT_SETUP 1253ba064abeSmrg 1254d9dcd5aeSmrg# Only expand once: 1255d9dcd5aeSmrgm4_define([LT_INIT]) 1256d9dcd5aeSmrg])# LT_INIT 1257191cded7Smrg 1258d9dcd5aeSmrg# Old names: 1259d9dcd5aeSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1260d9dcd5aeSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1261d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 1262d9dcd5aeSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1263d9dcd5aeSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1264191cded7Smrg 1265191cded7Smrg 1266d9dcd5aeSmrg# _LT_CC_BASENAME(CC) 1267ba064abeSmrg# ------------------- 1268d9dcd5aeSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1269d9dcd5aeSmrgm4_defun([_LT_CC_BASENAME], 1270d9dcd5aeSmrg[for cc_temp in $1""; do 1271d9dcd5aeSmrg case $cc_temp in 1272d9dcd5aeSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1273d9dcd5aeSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1274d9dcd5aeSmrg \-*) ;; 1275d9dcd5aeSmrg *) break;; 1276d9dcd5aeSmrg esac 1277d9dcd5aeSmrgdone 1278d9dcd5aeSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1279d9dcd5aeSmrg]) 1280191cded7Smrg 1281191cded7Smrg 1282d9dcd5aeSmrg# _LT_FILEUTILS_DEFAULTS 1283d9dcd5aeSmrg# ---------------------- 1284d9dcd5aeSmrg# It is okay to use these file commands and assume they have been set 1285d9dcd5aeSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1286d9dcd5aeSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1287d9dcd5aeSmrg[: ${CP="cp -f"} 1288d9dcd5aeSmrg: ${MV="mv -f"} 1289d9dcd5aeSmrg: ${RM="rm -f"} 1290d9dcd5aeSmrg])# _LT_FILEUTILS_DEFAULTS 1291191cded7Smrg 1292191cded7Smrg 1293d9dcd5aeSmrg# _LT_SETUP 1294d9dcd5aeSmrg# --------- 1295d9dcd5aeSmrgm4_defun([_LT_SETUP], 1296d9dcd5aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1297d9dcd5aeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1298d9dcd5aeSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1299d9dcd5aeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1300191cded7Smrg 1301d9dcd5aeSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1302d9dcd5aeSmrgdnl 1303d9dcd5aeSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1304d9dcd5aeSmrg_LT_DECL([], [host], [0])dnl 1305d9dcd5aeSmrg_LT_DECL([], [host_os], [0])dnl 1306d9dcd5aeSmrgdnl 1307d9dcd5aeSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1308d9dcd5aeSmrg_LT_DECL([], [build], [0])dnl 1309d9dcd5aeSmrg_LT_DECL([], [build_os], [0])dnl 1310d9dcd5aeSmrgdnl 1311d9dcd5aeSmrgAC_REQUIRE([AC_PROG_CC])dnl 1312d9dcd5aeSmrgAC_REQUIRE([LT_PATH_LD])dnl 1313d9dcd5aeSmrgAC_REQUIRE([LT_PATH_NM])dnl 1314d9dcd5aeSmrgdnl 1315d9dcd5aeSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1316d9dcd5aeSmrgtest -z "$LN_S" && LN_S="ln -s" 1317d9dcd5aeSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1318d9dcd5aeSmrgdnl 1319d9dcd5aeSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1320d9dcd5aeSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1321d9dcd5aeSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1322d9dcd5aeSmrgdnl 1323d9dcd5aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1324d9dcd5aeSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1325d9dcd5aeSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1326d9dcd5aeSmrgm4_require([_LT_CMD_RELOAD])dnl 1327d9dcd5aeSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1328d9dcd5aeSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1329d9dcd5aeSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1330d9dcd5aeSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1331d9dcd5aeSmrgm4_require([_LT_WITH_SYSROOT])dnl 1332b290cf36Smrg 1333d9dcd5aeSmrg_LT_CONFIG_LIBTOOL_INIT([ 1334d9dcd5aeSmrg# See if we are running on zsh, and set the options which allow our 1335d9dcd5aeSmrg# commands through without removal of \ escapes INIT. 1336d9dcd5aeSmrgif test -n "\${ZSH_VERSION+set}" ; then 1337d9dcd5aeSmrg setopt NO_GLOB_SUBST 1338d9dcd5aeSmrgfi 1339d9dcd5aeSmrg]) 1340d9dcd5aeSmrgif test -n "${ZSH_VERSION+set}" ; then 1341d9dcd5aeSmrg setopt NO_GLOB_SUBST 1342191cded7Smrgfi 1343191cded7Smrg 1344d9dcd5aeSmrg_LT_CHECK_OBJDIR 1345191cded7Smrg 1346d9dcd5aeSmrgm4_require([_LT_TAG_COMPILER])dnl 1347191cded7Smrg 1348d9dcd5aeSmrgcase $host_os in 1349d9dcd5aeSmrgaix3*) 1350d9dcd5aeSmrg # AIX sometimes has problems with the GCC collect2 program. For some 1351d9dcd5aeSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 1352d9dcd5aeSmrg # vanish in a puff of smoke. 1353d9dcd5aeSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 1354d9dcd5aeSmrg COLLECT_NAMES= 1355d9dcd5aeSmrg export COLLECT_NAMES 1356d9dcd5aeSmrg fi 1357d9dcd5aeSmrg ;; 1358d9dcd5aeSmrgesac 1359191cded7Smrg 1360d9dcd5aeSmrg# Global variables: 1361d9dcd5aeSmrgofile=libtool 1362d9dcd5aeSmrgcan_build_shared=yes 1363191cded7Smrg 1364d9dcd5aeSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 1365d9dcd5aeSmrg# which needs '.lib'). 1366d9dcd5aeSmrglibext=a 1367191cded7Smrg 1368d9dcd5aeSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1369191cded7Smrg 1370d9dcd5aeSmrgold_CC="$CC" 1371d9dcd5aeSmrgold_CFLAGS="$CFLAGS" 1372191cded7Smrg 1373d9dcd5aeSmrg# Set sane defaults for various variables 1374d9dcd5aeSmrgtest -z "$CC" && CC=cc 1375d9dcd5aeSmrgtest -z "$LTCC" && LTCC=$CC 1376d9dcd5aeSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1377d9dcd5aeSmrgtest -z "$LD" && LD=ld 1378d9dcd5aeSmrgtest -z "$ac_objext" && ac_objext=o 1379191cded7Smrg 1380d9dcd5aeSmrg_LT_CC_BASENAME([$compiler]) 1381191cded7Smrg 1382d9dcd5aeSmrg# Only perform the check for file, if the check method requires it 1383d9dcd5aeSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 1384d9dcd5aeSmrgcase $deplibs_check_method in 1385d9dcd5aeSmrgfile_magic*) 1386d9dcd5aeSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1387d9dcd5aeSmrg _LT_PATH_MAGIC 1388d9dcd5aeSmrg fi 1389d9dcd5aeSmrg ;; 1390d9dcd5aeSmrgesac 1391191cded7Smrg 1392d9dcd5aeSmrg# Use C for the default configuration in the libtool script 1393d9dcd5aeSmrgLT_SUPPORTED_TAG([CC]) 1394d9dcd5aeSmrg_LT_LANG_C_CONFIG 1395d9dcd5aeSmrg_LT_LANG_DEFAULT_CONFIG 1396d9dcd5aeSmrg_LT_CONFIG_COMMANDS 1397d9dcd5aeSmrg])# _LT_SETUP 1398191cded7Smrg 1399b290cf36Smrg 1400d9dcd5aeSmrg# _LT_PREPARE_SED_QUOTE_VARS 1401d9dcd5aeSmrg# -------------------------- 1402d9dcd5aeSmrg# Define a few sed substitution that help us do robust quoting. 1403d9dcd5aeSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 1404d9dcd5aeSmrg[# Backslashify metacharacters that are still active within 1405d9dcd5aeSmrg# double-quoted strings. 1406d9dcd5aeSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1407191cded7Smrg 1408d9dcd5aeSmrg# Same as above, but do not quote variable references. 1409d9dcd5aeSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1410ba064abeSmrg 1411d9dcd5aeSmrg# Sed substitution to delay expansion of an escaped shell variable in a 1412d9dcd5aeSmrg# double_quote_subst'ed string. 1413d9dcd5aeSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1414191cded7Smrg 1415d9dcd5aeSmrg# Sed substitution to delay expansion of an escaped single quote. 1416d9dcd5aeSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1417191cded7Smrg 1418d9dcd5aeSmrg# Sed substitution to avoid accidental globbing in evaled expressions 1419d9dcd5aeSmrgno_glob_subst='s/\*/\\\*/g' 1420d9dcd5aeSmrg]) 1421ba064abeSmrg 1422d9dcd5aeSmrg# _LT_PROG_LTMAIN 1423d9dcd5aeSmrg# --------------- 1424d9dcd5aeSmrg# Note that this code is called both from `configure', and `config.status' 1425d9dcd5aeSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 1426d9dcd5aeSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 1427d9dcd5aeSmrg# so we pass a copy along to make sure it has a sensible value anyway. 1428d9dcd5aeSmrgm4_defun([_LT_PROG_LTMAIN], 1429d9dcd5aeSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 1430d9dcd5aeSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 1431d9dcd5aeSmrgltmain="$ac_aux_dir/ltmain.sh" 1432d9dcd5aeSmrg])# _LT_PROG_LTMAIN 1433ba064abeSmrg 1434b290cf36Smrg 1435ba064abeSmrg 1436d9dcd5aeSmrg# So that we can recreate a full libtool script including additional 1437d9dcd5aeSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 1438d9dcd5aeSmrg# in macros and then make a single call at the end using the `libtool' 1439d9dcd5aeSmrg# label. 1440191cded7Smrg 1441ba064abeSmrg 1442d9dcd5aeSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 1443d9dcd5aeSmrg# ---------------------------------------- 1444d9dcd5aeSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1445d9dcd5aeSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 1446d9dcd5aeSmrg[m4_ifval([$1], 1447d9dcd5aeSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 1448d9dcd5aeSmrg [$1 1449d9dcd5aeSmrg])])]) 1450b290cf36Smrg 1451d9dcd5aeSmrg# Initialize. 1452d9dcd5aeSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1453b290cf36Smrg 1454191cded7Smrg 1455d9dcd5aeSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 1456d9dcd5aeSmrg# ------------------------------ 1457d9dcd5aeSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1458d9dcd5aeSmrgm4_define([_LT_CONFIG_LIBTOOL], 1459d9dcd5aeSmrg[m4_ifval([$1], 1460d9dcd5aeSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 1461d9dcd5aeSmrg [$1 1462d9dcd5aeSmrg])])]) 1463191cded7Smrg 1464d9dcd5aeSmrg# Initialize. 1465d9dcd5aeSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1466ba064abeSmrg 1467b290cf36Smrg 1468d9dcd5aeSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 1469d9dcd5aeSmrg# ----------------------------------------------------- 1470d9dcd5aeSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 1471d9dcd5aeSmrg[_LT_CONFIG_LIBTOOL([$1]) 1472d9dcd5aeSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 1473d9dcd5aeSmrg]) 1474ba064abeSmrg 1475b290cf36Smrg 1476d9dcd5aeSmrg# _LT_FORMAT_COMMENT([COMMENT]) 1477d9dcd5aeSmrg# ----------------------------- 1478d9dcd5aeSmrg# Add leading comment marks to the start of each line, and a trailing 1479d9dcd5aeSmrg# full-stop to the whole comment if one is not present already. 1480d9dcd5aeSmrgm4_define([_LT_FORMAT_COMMENT], 1481d9dcd5aeSmrg[m4_ifval([$1], [ 1482d9dcd5aeSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 1483d9dcd5aeSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 1484d9dcd5aeSmrg)]) 1485ba064abeSmrg 1486ba064abeSmrg 1487b290cf36Smrg 1488b290cf36Smrg 1489b290cf36Smrg 1490d9dcd5aeSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 1491d9dcd5aeSmrg# ------------------------------------------------------------------- 1492d9dcd5aeSmrg# CONFIGNAME is the name given to the value in the libtool script. 1493d9dcd5aeSmrg# VARNAME is the (base) name used in the configure script. 1494d9dcd5aeSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 1495d9dcd5aeSmrg# VARNAME. Any other value will be used directly. 1496d9dcd5aeSmrgm4_define([_LT_DECL], 1497d9dcd5aeSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 1498d9dcd5aeSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 1499d9dcd5aeSmrg [m4_ifval([$1], [$1], [$2])]) 1500d9dcd5aeSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 1501d9dcd5aeSmrg m4_ifval([$4], 1502d9dcd5aeSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 1503d9dcd5aeSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 1504d9dcd5aeSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 1505d9dcd5aeSmrg]) 1506b290cf36Smrg 1507b290cf36Smrg 1508d9dcd5aeSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 1509d9dcd5aeSmrg# -------------------------------------------------------- 1510d9dcd5aeSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1511191cded7Smrg 1512191cded7Smrg 1513d9dcd5aeSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 1514d9dcd5aeSmrg# ------------------------------------------------ 1515d9dcd5aeSmrgm4_define([lt_decl_tag_varnames], 1516d9dcd5aeSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 1517b290cf36Smrg 1518191cded7Smrg 1519d9dcd5aeSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 1520d9dcd5aeSmrg# --------------------------------------------------------- 1521d9dcd5aeSmrgm4_define([_lt_decl_filter], 1522d9dcd5aeSmrg[m4_case([$#], 1523d9dcd5aeSmrg [0], [m4_fatal([$0: too few arguments: $#])], 1524d9dcd5aeSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 1525d9dcd5aeSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 1526d9dcd5aeSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 1527d9dcd5aeSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1528d9dcd5aeSmrg]) 1529191cded7Smrg 1530191cded7Smrg 1531d9dcd5aeSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 1532d9dcd5aeSmrg# -------------------------------------------------- 1533d9dcd5aeSmrgm4_define([lt_decl_quote_varnames], 1534d9dcd5aeSmrg[_lt_decl_filter([value], [1], $@)]) 1535191cded7Smrg 1536191cded7Smrg 1537d9dcd5aeSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 1538d9dcd5aeSmrg# --------------------------------------------------- 1539d9dcd5aeSmrgm4_define([lt_decl_dquote_varnames], 1540d9dcd5aeSmrg[_lt_decl_filter([value], [2], $@)]) 1541191cded7Smrg 1542191cded7Smrg 1543d9dcd5aeSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 1544d9dcd5aeSmrg# --------------------------------------------------- 1545d9dcd5aeSmrgm4_define([lt_decl_varnames_tagged], 1546d9dcd5aeSmrg[m4_assert([$# <= 2])dnl 1547d9dcd5aeSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 1548d9dcd5aeSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 1549d9dcd5aeSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 1550d9dcd5aeSmrgm4_define([_lt_decl_varnames_tagged], 1551d9dcd5aeSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1552b290cf36Smrg 1553191cded7Smrg 1554d9dcd5aeSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 1555d9dcd5aeSmrg# ------------------------------------------------ 1556d9dcd5aeSmrgm4_define([lt_decl_all_varnames], 1557d9dcd5aeSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 1558d9dcd5aeSmrg m4_if([$2], [], 1559d9dcd5aeSmrg m4_quote(lt_decl_varnames), 1560d9dcd5aeSmrg m4_quote(m4_shift($@))))[]dnl 1561d9dcd5aeSmrg]) 1562d9dcd5aeSmrgm4_define([_lt_decl_all_varnames], 1563d9dcd5aeSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 1564d9dcd5aeSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 1565d9dcd5aeSmrg]) 1566191cded7Smrg 1567191cded7Smrg 1568d9dcd5aeSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 1569d9dcd5aeSmrg# ------------------------------------ 1570d9dcd5aeSmrg# Quote a variable value, and forward it to `config.status' so that its 1571d9dcd5aeSmrg# declaration there will have the same value as in `configure'. VARNAME 1572d9dcd5aeSmrg# must have a single quote delimited value for this to work. 1573d9dcd5aeSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 1574d9dcd5aeSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1575191cded7Smrg 1576191cded7Smrg 1577d9dcd5aeSmrg# _LT_CONFIG_STATUS_DECLARATIONS 1578d9dcd5aeSmrg# ------------------------------ 1579d9dcd5aeSmrg# We delimit libtool config variables with single quotes, so when 1580d9dcd5aeSmrg# we write them to config.status, we have to be sure to quote all 1581d9dcd5aeSmrg# embedded single quotes properly. In configure, this macro expands 1582d9dcd5aeSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1583ba064abeSmrg# 1584d9dcd5aeSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 1585d9dcd5aeSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 1586d9dcd5aeSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 1587d9dcd5aeSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1588191cded7Smrg 1589191cded7Smrg 1590d9dcd5aeSmrg# _LT_LIBTOOL_TAGS 1591ba064abeSmrg# ---------------- 1592d9dcd5aeSmrg# Output comment and list of tags supported by the script 1593d9dcd5aeSmrgm4_defun([_LT_LIBTOOL_TAGS], 1594d9dcd5aeSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 1595d9dcd5aeSmrgavailable_tags="_LT_TAGS"dnl 1596d9dcd5aeSmrg]) 1597191cded7Smrg 1598191cded7Smrg 1599d9dcd5aeSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 1600d9dcd5aeSmrg# ----------------------------------- 1601d9dcd5aeSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 1602d9dcd5aeSmrg# expand to a commented shell variable setting: 1603ba064abeSmrg# 1604d9dcd5aeSmrg# # Some comment about what VAR is for. 1605d9dcd5aeSmrg# visible_name=$lt_internal_name 1606d9dcd5aeSmrgm4_define([_LT_LIBTOOL_DECLARE], 1607d9dcd5aeSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 1608d9dcd5aeSmrg [description])))[]dnl 1609d9dcd5aeSmrgm4_pushdef([_libtool_name], 1610d9dcd5aeSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 1611d9dcd5aeSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 1612d9dcd5aeSmrg [0], [_libtool_name=[$]$1], 1613d9dcd5aeSmrg [1], [_libtool_name=$lt_[]$1], 1614d9dcd5aeSmrg [2], [_libtool_name=$lt_[]$1], 1615d9dcd5aeSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 1616d9dcd5aeSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 1617d9dcd5aeSmrg]) 1618191cded7Smrg 1619191cded7Smrg 1620d9dcd5aeSmrg# _LT_LIBTOOL_CONFIG_VARS 1621d9dcd5aeSmrg# ----------------------- 1622d9dcd5aeSmrg# Produce commented declarations of non-tagged libtool config variables 1623d9dcd5aeSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 1624d9dcd5aeSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 1625d9dcd5aeSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 1626d9dcd5aeSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 1627d9dcd5aeSmrg[m4_foreach([_lt_var], 1628d9dcd5aeSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 1629d9dcd5aeSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1630191cded7Smrg 1631191cded7Smrg 1632d9dcd5aeSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 1633d9dcd5aeSmrg# ------------------------- 1634d9dcd5aeSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 1635d9dcd5aeSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 1636d9dcd5aeSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1637191cded7Smrg 1638191cded7Smrg 1639d9dcd5aeSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 1640d9dcd5aeSmrg# ------------------------------ 1641d9dcd5aeSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1642191cded7Smrg 1643191cded7Smrg 1644d9dcd5aeSmrg# _LT_CONFIG_COMMANDS 1645d9dcd5aeSmrg# ------------------- 1646d9dcd5aeSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 1647d9dcd5aeSmrg# variables for single and double quote escaping we saved from calls 1648d9dcd5aeSmrg# to _LT_DECL, we can put quote escaped variables declarations 1649d9dcd5aeSmrg# into `config.status', and then the shell code to quote escape them in 1650d9dcd5aeSmrg# for loops in `config.status'. Finally, any additional code accumulated 1651d9dcd5aeSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 1652d9dcd5aeSmrgm4_defun([_LT_CONFIG_COMMANDS], 1653d9dcd5aeSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 1654d9dcd5aeSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 1655d9dcd5aeSmrg dnl instead of duplicating it all over again into config.status, 1656d9dcd5aeSmrg dnl then we will have config.status run $CONFIG_LT later, so it 1657d9dcd5aeSmrg dnl needs to know what name is stored there: 1658d9dcd5aeSmrg [AC_CONFIG_COMMANDS([libtool], 1659d9dcd5aeSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 1660d9dcd5aeSmrg dnl If the libtool generation code is destined for config.status, 1661d9dcd5aeSmrg dnl expand the accumulated commands and init code now: 1662d9dcd5aeSmrg [AC_CONFIG_COMMANDS([libtool], 1663d9dcd5aeSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 1664d9dcd5aeSmrg])#_LT_CONFIG_COMMANDS 1665191cded7Smrg 1666191cded7Smrg 1667d9dcd5aeSmrg# Initialize. 1668d9dcd5aeSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 1669d9dcd5aeSmrg[ 1670191cded7Smrg 1671d9dcd5aeSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1672d9dcd5aeSmrg# if CDPATH is set. 1673d9dcd5aeSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1674191cded7Smrg 1675d9dcd5aeSmrgsed_quote_subst='$sed_quote_subst' 1676d9dcd5aeSmrgdouble_quote_subst='$double_quote_subst' 1677d9dcd5aeSmrgdelay_variable_subst='$delay_variable_subst' 1678d9dcd5aeSmrg_LT_CONFIG_STATUS_DECLARATIONS 1679d9dcd5aeSmrgLTCC='$LTCC' 1680d9dcd5aeSmrgLTCFLAGS='$LTCFLAGS' 1681d9dcd5aeSmrgcompiler='$compiler_DEFAULT' 1682191cded7Smrg 1683d9dcd5aeSmrg# A function that is used when there is no print builtin or printf. 1684d9dcd5aeSmrgfunc_fallback_echo () 1685d9dcd5aeSmrg{ 1686d9dcd5aeSmrg eval 'cat <<_LTECHO_EOF 1687d9dcd5aeSmrg\$[]1 1688d9dcd5aeSmrg_LTECHO_EOF' 1689d9dcd5aeSmrg} 1690ba064abeSmrg 1691d9dcd5aeSmrg# Quote evaled strings. 1692d9dcd5aeSmrgfor var in lt_decl_all_varnames([[ \ 1693d9dcd5aeSmrg]], lt_decl_quote_varnames); do 1694d9dcd5aeSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1695d9dcd5aeSmrg *[[\\\\\\\`\\"\\\$]]*) 1696d9dcd5aeSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 1697d9dcd5aeSmrg ;; 1698d9dcd5aeSmrg *) 1699d9dcd5aeSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1700d9dcd5aeSmrg ;; 1701d9dcd5aeSmrg esac 1702d9dcd5aeSmrgdone 1703191cded7Smrg 1704d9dcd5aeSmrg# Double-quote double-evaled strings. 1705d9dcd5aeSmrgfor var in lt_decl_all_varnames([[ \ 1706d9dcd5aeSmrg]], lt_decl_dquote_varnames); do 1707d9dcd5aeSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1708d9dcd5aeSmrg *[[\\\\\\\`\\"\\\$]]*) 1709d9dcd5aeSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 1710d9dcd5aeSmrg ;; 1711d9dcd5aeSmrg *) 1712d9dcd5aeSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1713d9dcd5aeSmrg ;; 1714d9dcd5aeSmrg esac 1715d9dcd5aeSmrgdone 1716191cded7Smrg 1717d9dcd5aeSmrg_LT_OUTPUT_LIBTOOL_INIT 1718ba064abeSmrg]) 1719191cded7Smrg 1720d9dcd5aeSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 1721d9dcd5aeSmrg# ------------------------------------ 1722d9dcd5aeSmrg# Generate a child script FILE with all initialization necessary to 1723d9dcd5aeSmrg# reuse the environment learned by the parent script, and make the 1724d9dcd5aeSmrg# file executable. If COMMENT is supplied, it is inserted after the 1725d9dcd5aeSmrg# `#!' sequence but before initialization text begins. After this 1726d9dcd5aeSmrg# macro, additional text can be appended to FILE to form the body of 1727d9dcd5aeSmrg# the child script. The macro ends with non-zero status if the 1728d9dcd5aeSmrg# file could not be fully written (such as if the disk is full). 1729d9dcd5aeSmrgm4_ifdef([AS_INIT_GENERATED], 1730d9dcd5aeSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1731d9dcd5aeSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 1732d9dcd5aeSmrg[m4_require([AS_PREPARE])]dnl 1733d9dcd5aeSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1734d9dcd5aeSmrg[lt_write_fail=0 1735d9dcd5aeSmrgcat >$1 <<_ASEOF || lt_write_fail=1 1736d9dcd5aeSmrg#! $SHELL 1737d9dcd5aeSmrg# Generated by $as_me. 1738d9dcd5aeSmrg$2 1739d9dcd5aeSmrgSHELL=\${CONFIG_SHELL-$SHELL} 1740d9dcd5aeSmrgexport SHELL 1741d9dcd5aeSmrg_ASEOF 1742d9dcd5aeSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 1743d9dcd5aeSmrgAS_SHELL_SANITIZE 1744d9dcd5aeSmrg_AS_PREPARE 1745d9dcd5aeSmrgexec AS_MESSAGE_FD>&1 1746d9dcd5aeSmrg_ASEOF 1747d9dcd5aeSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 1748d9dcd5aeSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1749191cded7Smrg 1750d9dcd5aeSmrg# LT_OUTPUT 1751d9dcd5aeSmrg# --------- 1752d9dcd5aeSmrg# This macro allows early generation of the libtool script (before 1753d9dcd5aeSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 1754d9dcd5aeSmrg# tests. 1755d9dcd5aeSmrgAC_DEFUN([LT_OUTPUT], 1756d9dcd5aeSmrg[: ${CONFIG_LT=./config.lt} 1757d9dcd5aeSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 1758d9dcd5aeSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1759d9dcd5aeSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 1760191cded7Smrg 1761d9dcd5aeSmrgcat >>"$CONFIG_LT" <<\_LTEOF 1762d9dcd5aeSmrglt_cl_silent=false 1763d9dcd5aeSmrgexec AS_MESSAGE_LOG_FD>>config.log 1764d9dcd5aeSmrg{ 1765d9dcd5aeSmrg echo 1766d9dcd5aeSmrg AS_BOX([Running $as_me.]) 1767d9dcd5aeSmrg} >&AS_MESSAGE_LOG_FD 1768191cded7Smrg 1769d9dcd5aeSmrglt_cl_help="\ 1770d9dcd5aeSmrg\`$as_me' creates a local libtool stub from the current configuration, 1771d9dcd5aeSmrgfor use in further configure time tests before the real libtool is 1772d9dcd5aeSmrggenerated. 1773191cded7Smrg 1774d9dcd5aeSmrgUsage: $[0] [[OPTIONS]] 1775191cded7Smrg 1776d9dcd5aeSmrg -h, --help print this help, then exit 1777d9dcd5aeSmrg -V, --version print version number, then exit 1778d9dcd5aeSmrg -q, --quiet do not print progress messages 1779d9dcd5aeSmrg -d, --debug don't remove temporary files 1780191cded7Smrg 1781d9dcd5aeSmrgReport bugs to <bug-libtool@gnu.org>." 1782191cded7Smrg 1783d9dcd5aeSmrglt_cl_version="\ 1784d9dcd5aeSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1785d9dcd5aeSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1786d9dcd5aeSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1787191cded7Smrg 1788d9dcd5aeSmrgCopyright (C) 2011 Free Software Foundation, Inc. 1789d9dcd5aeSmrgThis config.lt script is free software; the Free Software Foundation 1790d9dcd5aeSmrggives unlimited permision to copy, distribute and modify it." 1791191cded7Smrg 1792d9dcd5aeSmrgwhile test $[#] != 0 1793d9dcd5aeSmrgdo 1794d9dcd5aeSmrg case $[1] in 1795d9dcd5aeSmrg --version | --v* | -V ) 1796d9dcd5aeSmrg echo "$lt_cl_version"; exit 0 ;; 1797d9dcd5aeSmrg --help | --h* | -h ) 1798d9dcd5aeSmrg echo "$lt_cl_help"; exit 0 ;; 1799d9dcd5aeSmrg --debug | --d* | -d ) 1800d9dcd5aeSmrg debug=: ;; 1801d9dcd5aeSmrg --quiet | --q* | --silent | --s* | -q ) 1802d9dcd5aeSmrg lt_cl_silent=: ;; 1803191cded7Smrg 1804d9dcd5aeSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 1805d9dcd5aeSmrgTry \`$[0] --help' for more information.]) ;; 1806ba064abeSmrg 1807d9dcd5aeSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 1808d9dcd5aeSmrgTry \`$[0] --help' for more information.]) ;; 1809d9dcd5aeSmrg esac 1810d9dcd5aeSmrg shift 1811d9dcd5aeSmrgdone 1812ba064abeSmrg 1813d9dcd5aeSmrgif $lt_cl_silent; then 1814d9dcd5aeSmrg exec AS_MESSAGE_FD>/dev/null 1815d9dcd5aeSmrgfi 1816d9dcd5aeSmrg_LTEOF 1817ba064abeSmrg 1818d9dcd5aeSmrgcat >>"$CONFIG_LT" <<_LTEOF 1819d9dcd5aeSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1820d9dcd5aeSmrg_LTEOF 1821ba064abeSmrg 1822d9dcd5aeSmrgcat >>"$CONFIG_LT" <<\_LTEOF 1823d9dcd5aeSmrgAC_MSG_NOTICE([creating $ofile]) 1824d9dcd5aeSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 1825d9dcd5aeSmrgAS_EXIT(0) 1826d9dcd5aeSmrg_LTEOF 1827d9dcd5aeSmrgchmod +x "$CONFIG_LT" 1828191cded7Smrg 1829d9dcd5aeSmrg# configure is writing to config.log, but config.lt does its own redirection, 1830d9dcd5aeSmrg# appending to config.log, which fails on DOS, as config.log is still kept 1831d9dcd5aeSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 1832d9dcd5aeSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 1833d9dcd5aeSmrglt_cl_success=: 1834d9dcd5aeSmrgtest "$silent" = yes && 1835d9dcd5aeSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 1836d9dcd5aeSmrgexec AS_MESSAGE_LOG_FD>/dev/null 1837d9dcd5aeSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1838d9dcd5aeSmrgexec AS_MESSAGE_LOG_FD>>config.log 1839d9dcd5aeSmrg$lt_cl_success || AS_EXIT(1) 1840d9dcd5aeSmrg])# LT_OUTPUT 1841191cded7Smrg 1842191cded7Smrg 1843d9dcd5aeSmrg# _LT_CONFIG(TAG) 1844d9dcd5aeSmrg# --------------- 1845d9dcd5aeSmrg# If TAG is the built-in tag, create an initial libtool script with a 1846d9dcd5aeSmrg# default configuration from the untagged config vars. Otherwise add code 1847d9dcd5aeSmrg# to config.status for appending the configuration named by TAG from the 1848d9dcd5aeSmrg# matching tagged config vars. 1849d9dcd5aeSmrgm4_defun([_LT_CONFIG], 1850d9dcd5aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1851d9dcd5aeSmrg_LT_CONFIG_SAVE_COMMANDS([ 1852d9dcd5aeSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1853d9dcd5aeSmrg m4_if(_LT_TAG, [C], [ 1854d9dcd5aeSmrg # See if we are running on zsh, and set the options which allow our 1855d9dcd5aeSmrg # commands through without removal of \ escapes. 1856d9dcd5aeSmrg if test -n "${ZSH_VERSION+set}" ; then 1857d9dcd5aeSmrg setopt NO_GLOB_SUBST 1858d9dcd5aeSmrg fi 1859191cded7Smrg 1860d9dcd5aeSmrg cfgfile="${ofile}T" 1861d9dcd5aeSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1862d9dcd5aeSmrg $RM "$cfgfile" 1863191cded7Smrg 1864d9dcd5aeSmrg cat <<_LT_EOF >> "$cfgfile" 1865d9dcd5aeSmrg#! $SHELL 1866191cded7Smrg 1867d9dcd5aeSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1868d9dcd5aeSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 1869d9dcd5aeSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1870d9dcd5aeSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1871d9dcd5aeSmrg# 1872d9dcd5aeSmrg_LT_COPYING 1873d9dcd5aeSmrg_LT_LIBTOOL_TAGS 1874191cded7Smrg 1875d9dcd5aeSmrg# ### BEGIN LIBTOOL CONFIG 1876d9dcd5aeSmrg_LT_LIBTOOL_CONFIG_VARS 1877d9dcd5aeSmrg_LT_LIBTOOL_TAG_VARS 1878d9dcd5aeSmrg# ### END LIBTOOL CONFIG 1879b290cf36Smrg 1880d9dcd5aeSmrg_LT_EOF 1881b290cf36Smrg 1882d9dcd5aeSmrg case $host_os in 1883d9dcd5aeSmrg aix3*) 1884d9dcd5aeSmrg cat <<\_LT_EOF >> "$cfgfile" 1885d9dcd5aeSmrg# AIX sometimes has problems with the GCC collect2 program. For some 1886d9dcd5aeSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 1887d9dcd5aeSmrg# vanish in a puff of smoke. 1888d9dcd5aeSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 1889d9dcd5aeSmrg COLLECT_NAMES= 1890d9dcd5aeSmrg export COLLECT_NAMES 1891d9dcd5aeSmrgfi 1892d9dcd5aeSmrg_LT_EOF 1893d9dcd5aeSmrg ;; 1894d9dcd5aeSmrg esac 1895b290cf36Smrg 1896d9dcd5aeSmrg _LT_PROG_LTMAIN 1897b290cf36Smrg 1898d9dcd5aeSmrg # We use sed instead of cat because bash on DJGPP gets confused if 1899d9dcd5aeSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 1900d9dcd5aeSmrg # text mode, it properly converts lines to CR/LF. This bash problem 1901d9dcd5aeSmrg # is reportedly fixed, but why not run on old versions too? 1902d9dcd5aeSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 1903d9dcd5aeSmrg || (rm -f "$cfgfile"; exit 1) 1904b290cf36Smrg 1905d9dcd5aeSmrg _LT_PROG_REPLACE_SHELLFNS 1906191cded7Smrg 1907d9dcd5aeSmrg mv -f "$cfgfile" "$ofile" || 1908d9dcd5aeSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1909d9dcd5aeSmrg chmod +x "$ofile" 1910d9dcd5aeSmrg], 1911d9dcd5aeSmrg[cat <<_LT_EOF >> "$ofile" 1912191cded7Smrg 1913d9dcd5aeSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1914d9dcd5aeSmrgdnl in a comment (ie after a #). 1915d9dcd5aeSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 1916d9dcd5aeSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1917d9dcd5aeSmrg# ### END LIBTOOL TAG CONFIG: $1 1918d9dcd5aeSmrg_LT_EOF 1919d9dcd5aeSmrg])dnl /m4_if 1920d9dcd5aeSmrg], 1921d9dcd5aeSmrg[m4_if([$1], [], [ 1922d9dcd5aeSmrg PACKAGE='$PACKAGE' 1923d9dcd5aeSmrg VERSION='$VERSION' 1924d9dcd5aeSmrg TIMESTAMP='$TIMESTAMP' 1925d9dcd5aeSmrg RM='$RM' 1926d9dcd5aeSmrg ofile='$ofile'], []) 1927d9dcd5aeSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 1928d9dcd5aeSmrg])# _LT_CONFIG 1929b290cf36Smrg 1930ba064abeSmrg 1931d9dcd5aeSmrg# LT_SUPPORTED_TAG(TAG) 1932d9dcd5aeSmrg# --------------------- 1933d9dcd5aeSmrg# Trace this macro to discover what tags are supported by the libtool 1934d9dcd5aeSmrg# --tag option, using: 1935d9dcd5aeSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1936d9dcd5aeSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1937191cded7Smrg 1938b290cf36Smrg 1939d9dcd5aeSmrg# C support is built-in for now 1940d9dcd5aeSmrgm4_define([_LT_LANG_C_enabled], []) 1941d9dcd5aeSmrgm4_define([_LT_TAGS], []) 1942b290cf36Smrg 1943b290cf36Smrg 1944d9dcd5aeSmrg# LT_LANG(LANG) 1945d9dcd5aeSmrg# ------------- 1946d9dcd5aeSmrg# Enable libtool support for the given language if not already enabled. 1947d9dcd5aeSmrgAC_DEFUN([LT_LANG], 1948d9dcd5aeSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 1949d9dcd5aeSmrgm4_case([$1], 1950d9dcd5aeSmrg [C], [_LT_LANG(C)], 1951d9dcd5aeSmrg [C++], [_LT_LANG(CXX)], 1952d9dcd5aeSmrg [Go], [_LT_LANG(GO)], 1953d9dcd5aeSmrg [Java], [_LT_LANG(GCJ)], 1954d9dcd5aeSmrg [Fortran 77], [_LT_LANG(F77)], 1955d9dcd5aeSmrg [Fortran], [_LT_LANG(FC)], 1956d9dcd5aeSmrg [Windows Resource], [_LT_LANG(RC)], 1957d9dcd5aeSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1958d9dcd5aeSmrg [_LT_LANG($1)], 1959d9dcd5aeSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 1960d9dcd5aeSmrg])# LT_LANG 1961b290cf36Smrg 1962191cded7Smrg 1963d9dcd5aeSmrg# _LT_LANG(LANGNAME) 1964d9dcd5aeSmrg# ------------------ 1965d9dcd5aeSmrgm4_defun([_LT_LANG], 1966d9dcd5aeSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 1967d9dcd5aeSmrg [LT_SUPPORTED_TAG([$1])dnl 1968d9dcd5aeSmrg m4_append([_LT_TAGS], [$1 ])dnl 1969d9dcd5aeSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 1970d9dcd5aeSmrg _LT_LANG_$1_CONFIG($1)])dnl 1971d9dcd5aeSmrg])# _LT_LANG 1972191cded7Smrg 1973191cded7Smrg 1974d9dcd5aeSmrgm4_ifndef([AC_PROG_GO], [ 1975d9dcd5aeSmrg# NOTE: This macro has been submitted for inclusion into # 1976d9dcd5aeSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 1977d9dcd5aeSmrg# a released version of Autoconf we should remove this # 1978d9dcd5aeSmrg# macro and use it instead. # 1979d9dcd5aeSmrgm4_defun([AC_PROG_GO], 1980d9dcd5aeSmrg[AC_LANG_PUSH(Go)dnl 1981d9dcd5aeSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 1982d9dcd5aeSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1983d9dcd5aeSmrg_AC_ARG_VAR_LDFLAGS()dnl 1984d9dcd5aeSmrgAC_CHECK_TOOL(GOC, gccgo) 1985d9dcd5aeSmrgif test -z "$GOC"; then 1986d9dcd5aeSmrg if test -n "$ac_tool_prefix"; then 1987d9dcd5aeSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1988d9dcd5aeSmrg fi 1989d9dcd5aeSmrgfi 1990d9dcd5aeSmrgif test -z "$GOC"; then 1991d9dcd5aeSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1992d9dcd5aeSmrgfi 1993d9dcd5aeSmrg])#m4_defun 1994d9dcd5aeSmrg])#m4_ifndef 1995191cded7Smrg 1996191cded7Smrg 1997d9dcd5aeSmrg# _LT_LANG_DEFAULT_CONFIG 1998d9dcd5aeSmrg# ----------------------- 1999d9dcd5aeSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 2000d9dcd5aeSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 2001d9dcd5aeSmrg [LT_LANG(CXX)], 2002d9dcd5aeSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 2003191cded7Smrg 2004d9dcd5aeSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 2005d9dcd5aeSmrg [LT_LANG(F77)], 2006d9dcd5aeSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2007191cded7Smrg 2008d9dcd5aeSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 2009d9dcd5aeSmrg [LT_LANG(FC)], 2010d9dcd5aeSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2011191cded7Smrg 2012d9dcd5aeSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 2013d9dcd5aeSmrgdnl pulling things in needlessly. 2014d9dcd5aeSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 2015d9dcd5aeSmrg [LT_LANG(GCJ)], 2016d9dcd5aeSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 2017d9dcd5aeSmrg [LT_LANG(GCJ)], 2018d9dcd5aeSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 2019d9dcd5aeSmrg [LT_LANG(GCJ)], 2020d9dcd5aeSmrg [m4_ifdef([AC_PROG_GCJ], 2021d9dcd5aeSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 2022d9dcd5aeSmrg m4_ifdef([A][M_PROG_GCJ], 2023d9dcd5aeSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 2024d9dcd5aeSmrg m4_ifdef([LT_PROG_GCJ], 2025d9dcd5aeSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 2026191cded7Smrg 2027d9dcd5aeSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 2028d9dcd5aeSmrg [LT_LANG(GO)], 2029d9dcd5aeSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 2030191cded7Smrg 2031d9dcd5aeSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 2032d9dcd5aeSmrg [LT_LANG(RC)], 2033d9dcd5aeSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 2034d9dcd5aeSmrg])# _LT_LANG_DEFAULT_CONFIG 2035191cded7Smrg 2036d9dcd5aeSmrg# Obsolete macros: 2037d9dcd5aeSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 2038d9dcd5aeSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 2039d9dcd5aeSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 2040d9dcd5aeSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 2041d9dcd5aeSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 2042d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 2043d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 2044d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 2045d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 2046d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 2047d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 2048191cded7Smrg 2049191cded7Smrg 2050d9dcd5aeSmrg# _LT_TAG_COMPILER 2051d9dcd5aeSmrg# ---------------- 2052d9dcd5aeSmrgm4_defun([_LT_TAG_COMPILER], 2053d9dcd5aeSmrg[AC_REQUIRE([AC_PROG_CC])dnl 2054191cded7Smrg 2055d9dcd5aeSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 2056d9dcd5aeSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 2057d9dcd5aeSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 2058d9dcd5aeSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2059191cded7Smrg 2060d9dcd5aeSmrg# If no C compiler was specified, use CC. 2061d9dcd5aeSmrgLTCC=${LTCC-"$CC"} 2062191cded7Smrg 2063d9dcd5aeSmrg# If no C compiler flags were specified, use CFLAGS. 2064d9dcd5aeSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2065191cded7Smrg 2066d9dcd5aeSmrg# Allow CC to be a program name with arguments. 2067d9dcd5aeSmrgcompiler=$CC 2068d9dcd5aeSmrg])# _LT_TAG_COMPILER 2069191cded7Smrg 2070b290cf36Smrg 2071d9dcd5aeSmrg# _LT_COMPILER_BOILERPLATE 2072d9dcd5aeSmrg# ------------------------ 2073d9dcd5aeSmrg# Check for compiler boilerplate output or warnings with 2074d9dcd5aeSmrg# the simple compiler test code. 2075d9dcd5aeSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 2076d9dcd5aeSmrg[m4_require([_LT_DECL_SED])dnl 2077d9dcd5aeSmrgac_outfile=conftest.$ac_objext 2078d9dcd5aeSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 2079d9dcd5aeSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2080d9dcd5aeSmrg_lt_compiler_boilerplate=`cat conftest.err` 2081d9dcd5aeSmrg$RM conftest* 2082d9dcd5aeSmrg])# _LT_COMPILER_BOILERPLATE 2083b290cf36Smrg 2084191cded7Smrg 2085d9dcd5aeSmrg# _LT_LINKER_BOILERPLATE 2086d9dcd5aeSmrg# ---------------------- 2087d9dcd5aeSmrg# Check for linker boilerplate output or warnings with 2088d9dcd5aeSmrg# the simple link test code. 2089d9dcd5aeSmrgm4_defun([_LT_LINKER_BOILERPLATE], 2090d9dcd5aeSmrg[m4_require([_LT_DECL_SED])dnl 2091d9dcd5aeSmrgac_outfile=conftest.$ac_objext 2092d9dcd5aeSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 2093d9dcd5aeSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2094d9dcd5aeSmrg_lt_linker_boilerplate=`cat conftest.err` 2095d9dcd5aeSmrg$RM -r conftest* 2096d9dcd5aeSmrg])# _LT_LINKER_BOILERPLATE 2097191cded7Smrg 2098d9dcd5aeSmrg# _LT_REQUIRED_DARWIN_CHECKS 2099d9dcd5aeSmrg# ------------------------- 2100d9dcd5aeSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 2101d9dcd5aeSmrg case $host_os in 2102d9dcd5aeSmrg rhapsody* | darwin*) 2103d9dcd5aeSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 2104d9dcd5aeSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 2105d9dcd5aeSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 2106d9dcd5aeSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 2107d9dcd5aeSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 2108d9dcd5aeSmrg _LT_DECL([], [DSYMUTIL], [1], 2109d9dcd5aeSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 2110d9dcd5aeSmrg _LT_DECL([], [NMEDIT], [1], 2111d9dcd5aeSmrg [Tool to change global to local symbols on Mac OS X]) 2112d9dcd5aeSmrg _LT_DECL([], [LIPO], [1], 2113d9dcd5aeSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 2114d9dcd5aeSmrg _LT_DECL([], [OTOOL], [1], 2115d9dcd5aeSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 2116d9dcd5aeSmrg _LT_DECL([], [OTOOL64], [1], 2117d9dcd5aeSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2118191cded7Smrg 2119d9dcd5aeSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2120d9dcd5aeSmrg [lt_cv_apple_cc_single_mod=no 2121d9dcd5aeSmrg if test -z "${LT_MULTI_MODULE}"; then 2122d9dcd5aeSmrg # By default we will add the -single_module flag. You can override 2123d9dcd5aeSmrg # by either setting the environment variable LT_MULTI_MODULE 2124d9dcd5aeSmrg # non-empty at configure time, or by adding -multi_module to the 2125d9dcd5aeSmrg # link flags. 2126d9dcd5aeSmrg rm -rf libconftest.dylib* 2127d9dcd5aeSmrg echo "int foo(void){return 1;}" > conftest.c 2128d9dcd5aeSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2129d9dcd5aeSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 2130d9dcd5aeSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2131d9dcd5aeSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 2132d9dcd5aeSmrg _lt_result=$? 2133d9dcd5aeSmrg # If there is a non-empty error log, and "single_module" 2134d9dcd5aeSmrg # appears in it, assume the flag caused a linker warning 2135d9dcd5aeSmrg if test -s conftest.err && $GREP single_module conftest.err; then 2136d9dcd5aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2137d9dcd5aeSmrg # Otherwise, if the output was created with a 0 exit code from 2138d9dcd5aeSmrg # the compiler, it worked. 2139d9dcd5aeSmrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 2140d9dcd5aeSmrg lt_cv_apple_cc_single_mod=yes 2141d9dcd5aeSmrg else 2142d9dcd5aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2143d9dcd5aeSmrg fi 2144d9dcd5aeSmrg rm -rf libconftest.dylib* 2145d9dcd5aeSmrg rm -f conftest.* 2146d9dcd5aeSmrg fi]) 2147191cded7Smrg 2148d9dcd5aeSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 2149d9dcd5aeSmrg [lt_cv_ld_exported_symbols_list], 2150d9dcd5aeSmrg [lt_cv_ld_exported_symbols_list=no 2151d9dcd5aeSmrg save_LDFLAGS=$LDFLAGS 2152d9dcd5aeSmrg echo "_main" > conftest.sym 2153d9dcd5aeSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 2154d9dcd5aeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2155d9dcd5aeSmrg [lt_cv_ld_exported_symbols_list=yes], 2156d9dcd5aeSmrg [lt_cv_ld_exported_symbols_list=no]) 2157d9dcd5aeSmrg LDFLAGS="$save_LDFLAGS" 2158d9dcd5aeSmrg ]) 2159191cded7Smrg 2160d9dcd5aeSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 2161d9dcd5aeSmrg [lt_cv_ld_force_load=no 2162d9dcd5aeSmrg cat > conftest.c << _LT_EOF 2163d9dcd5aeSmrgint forced_loaded() { return 2;} 2164d9dcd5aeSmrg_LT_EOF 2165d9dcd5aeSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 2166d9dcd5aeSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 2167d9dcd5aeSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 2168d9dcd5aeSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 2169d9dcd5aeSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 2170d9dcd5aeSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 2171d9dcd5aeSmrg cat > conftest.c << _LT_EOF 2172d9dcd5aeSmrgint main() { return 0;} 2173d9dcd5aeSmrg_LT_EOF 2174d9dcd5aeSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 2175d9dcd5aeSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 2176d9dcd5aeSmrg _lt_result=$? 2177d9dcd5aeSmrg if test -s conftest.err && $GREP force_load conftest.err; then 2178d9dcd5aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2179d9dcd5aeSmrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 2180d9dcd5aeSmrg lt_cv_ld_force_load=yes 2181d9dcd5aeSmrg else 2182d9dcd5aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2183d9dcd5aeSmrg fi 2184d9dcd5aeSmrg rm -f conftest.err libconftest.a conftest conftest.c 2185d9dcd5aeSmrg rm -rf conftest.dSYM 2186d9dcd5aeSmrg ]) 2187d9dcd5aeSmrg case $host_os in 2188d9dcd5aeSmrg rhapsody* | darwin1.[[012]]) 2189d9dcd5aeSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 2190d9dcd5aeSmrg darwin1.*) 2191d9dcd5aeSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2192d9dcd5aeSmrg darwin*) # darwin 5.x on 2193d9dcd5aeSmrg # if running on 10.5 or later, the deployment target defaults 2194d9dcd5aeSmrg # to the OS version, if on x86, and 10.4, the deployment 2195d9dcd5aeSmrg # target defaults to 10.4. Don't you love it? 2196d9dcd5aeSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 2197d9dcd5aeSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 2198d9dcd5aeSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2199d9dcd5aeSmrg 10.[[012]]*) 2200d9dcd5aeSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2201d9dcd5aeSmrg 10.*) 2202d9dcd5aeSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2203d9dcd5aeSmrg esac 2204d9dcd5aeSmrg ;; 2205d9dcd5aeSmrg esac 2206d9dcd5aeSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 2207d9dcd5aeSmrg _lt_dar_single_mod='$single_module' 2208d9dcd5aeSmrg fi 2209d9dcd5aeSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 2210d9dcd5aeSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2211d9dcd5aeSmrg else 2212d9dcd5aeSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 2213d9dcd5aeSmrg fi 2214d9dcd5aeSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 2215d9dcd5aeSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 2216d9dcd5aeSmrg else 2217d9dcd5aeSmrg _lt_dsymutil= 2218d9dcd5aeSmrg fi 2219d9dcd5aeSmrg ;; 2220d9dcd5aeSmrg esac 2221d9dcd5aeSmrg]) 2222191cded7Smrg 2223191cded7Smrg 2224d9dcd5aeSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 2225d9dcd5aeSmrg# --------------------------------- 2226d9dcd5aeSmrg# Checks for linker and compiler features on darwin 2227d9dcd5aeSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 2228d9dcd5aeSmrg[ 2229d9dcd5aeSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 2230d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 2231d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 2232d9dcd5aeSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 2233d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2234d9dcd5aeSmrg if test "$lt_cv_ld_force_load" = "yes"; then 2235d9dcd5aeSmrg _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\"`' 2236d9dcd5aeSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2237d9dcd5aeSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 2238d9dcd5aeSmrg else 2239d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 2240d9dcd5aeSmrg fi 2241d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 2242d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 2243d9dcd5aeSmrg case $cc_basename in 2244d9dcd5aeSmrg ifort*) _lt_dar_can_shared=yes ;; 2245d9dcd5aeSmrg *) _lt_dar_can_shared=$GCC ;; 2246d9dcd5aeSmrg esac 2247d9dcd5aeSmrg if test "$_lt_dar_can_shared" = "yes"; then 2248d9dcd5aeSmrg output_verbose_link_cmd=func_echo_all 2249d9dcd5aeSmrg _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}" 2250d9dcd5aeSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 2251d9dcd5aeSmrg _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}" 2252d9dcd5aeSmrg _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}" 2253d9dcd5aeSmrg m4_if([$1], [CXX], 2254d9dcd5aeSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 2255d9dcd5aeSmrg _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}" 2256d9dcd5aeSmrg _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}" 2257d9dcd5aeSmrg fi 2258d9dcd5aeSmrg],[]) 2259d9dcd5aeSmrg else 2260d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 2261d9dcd5aeSmrg fi 2262ba064abeSmrg]) 2263191cded7Smrg 2264d9dcd5aeSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 2265d9dcd5aeSmrg# ---------------------------------- 2266d9dcd5aeSmrg# Links a minimal program and checks the executable 2267d9dcd5aeSmrg# for the system default hardcoded library path. In most cases, 2268d9dcd5aeSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 2269d9dcd5aeSmrg# the location of the communication and MPI libs are included too. 2270d9dcd5aeSmrg# If we don't find anything, use the default library path according 2271d9dcd5aeSmrg# to the aix ld manual. 2272d9dcd5aeSmrg# Store the results from the different compilers for each TAGNAME. 2273d9dcd5aeSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 2274d9dcd5aeSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 2275d9dcd5aeSmrg[m4_require([_LT_DECL_SED])dnl 2276d9dcd5aeSmrgif test "${lt_cv_aix_libpath+set}" = set; then 2277d9dcd5aeSmrg aix_libpath=$lt_cv_aix_libpath 2278d9dcd5aeSmrgelse 2279d9dcd5aeSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 2280d9dcd5aeSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 2281d9dcd5aeSmrg lt_aix_libpath_sed='[ 2282d9dcd5aeSmrg /Import File Strings/,/^$/ { 2283d9dcd5aeSmrg /^0/ { 2284d9dcd5aeSmrg s/^0 *\([^ ]*\) *$/\1/ 2285d9dcd5aeSmrg p 2286d9dcd5aeSmrg } 2287d9dcd5aeSmrg }]' 2288d9dcd5aeSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2289d9dcd5aeSmrg # Check for a 64-bit object if we didn't find anything. 2290d9dcd5aeSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2291d9dcd5aeSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2292d9dcd5aeSmrg fi],[]) 2293d9dcd5aeSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2294d9dcd5aeSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 2295d9dcd5aeSmrg fi 2296d9dcd5aeSmrg ]) 2297d9dcd5aeSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2298d9dcd5aeSmrgfi 2299d9dcd5aeSmrg])# _LT_SYS_MODULE_PATH_AIX 2300191cded7Smrg 2301191cded7Smrg 2302d9dcd5aeSmrg# _LT_SHELL_INIT(ARG) 2303d9dcd5aeSmrg# ------------------- 2304d9dcd5aeSmrgm4_define([_LT_SHELL_INIT], 2305d9dcd5aeSmrg[m4_divert_text([M4SH-INIT], [$1 2306d9dcd5aeSmrg])])# _LT_SHELL_INIT 2307191cded7Smrg 2308191cded7Smrg 2309191cded7Smrg 2310d9dcd5aeSmrg# _LT_PROG_ECHO_BACKSLASH 2311d9dcd5aeSmrg# ----------------------- 2312d9dcd5aeSmrg# Find how we can fake an echo command that does not interpret backslash. 2313d9dcd5aeSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 2314d9dcd5aeSmrg# of the generated configure script which will find a shell with a builtin 2315d9dcd5aeSmrg# printf (which we can use as an echo command). 2316d9dcd5aeSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 2317d9dcd5aeSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2318d9dcd5aeSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2319d9dcd5aeSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2320191cded7Smrg 2321d9dcd5aeSmrgAC_MSG_CHECKING([how to print strings]) 2322d9dcd5aeSmrg# Test print first, because it will be a builtin if present. 2323d9dcd5aeSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 2324d9dcd5aeSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 2325d9dcd5aeSmrg ECHO='print -r --' 2326d9dcd5aeSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 2327d9dcd5aeSmrg ECHO='printf %s\n' 2328d9dcd5aeSmrgelse 2329d9dcd5aeSmrg # Use this function as a fallback that always works. 2330d9dcd5aeSmrg func_fallback_echo () 2331d9dcd5aeSmrg { 2332d9dcd5aeSmrg eval 'cat <<_LTECHO_EOF 2333d9dcd5aeSmrg$[]1 2334d9dcd5aeSmrg_LTECHO_EOF' 2335d9dcd5aeSmrg } 2336d9dcd5aeSmrg ECHO='func_fallback_echo' 2337d9dcd5aeSmrgfi 2338191cded7Smrg 2339d9dcd5aeSmrg# func_echo_all arg... 2340d9dcd5aeSmrg# Invoke $ECHO with all args, space-separated. 2341d9dcd5aeSmrgfunc_echo_all () 2342d9dcd5aeSmrg{ 2343d9dcd5aeSmrg $ECHO "$*" 2344d9dcd5aeSmrg} 2345191cded7Smrg 2346d9dcd5aeSmrgcase "$ECHO" in 2347d9dcd5aeSmrg printf*) AC_MSG_RESULT([printf]) ;; 2348d9dcd5aeSmrg print*) AC_MSG_RESULT([print -r]) ;; 2349d9dcd5aeSmrg *) AC_MSG_RESULT([cat]) ;; 2350d9dcd5aeSmrgesac 2351191cded7Smrg 2352d9dcd5aeSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 2353d9dcd5aeSmrg[_AS_DETECT_SUGGESTED([ 2354d9dcd5aeSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 2355d9dcd5aeSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2356d9dcd5aeSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2357d9dcd5aeSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2358d9dcd5aeSmrg PATH=/empty FPATH=/empty; export PATH FPATH 2359d9dcd5aeSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 2360d9dcd5aeSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2361191cded7Smrg 2362d9dcd5aeSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 2363d9dcd5aeSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 2364d9dcd5aeSmrg])# _LT_PROG_ECHO_BACKSLASH 2365191cded7Smrg 2366191cded7Smrg 2367d9dcd5aeSmrg# _LT_WITH_SYSROOT 2368ba064abeSmrg# ---------------- 2369d9dcd5aeSmrgAC_DEFUN([_LT_WITH_SYSROOT], 2370d9dcd5aeSmrg[AC_MSG_CHECKING([for sysroot]) 2371d9dcd5aeSmrgAC_ARG_WITH([sysroot], 2372d9dcd5aeSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 2373d9dcd5aeSmrg (or the compiler's sysroot if not specified).], 2374d9dcd5aeSmrg[], [with_sysroot=no]) 2375d9dcd5aeSmrg 2376d9dcd5aeSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 2377d9dcd5aeSmrgdnl in case the user passed a directory name. 2378d9dcd5aeSmrglt_sysroot= 2379d9dcd5aeSmrgcase ${with_sysroot} in #( 2380d9dcd5aeSmrg yes) 2381d9dcd5aeSmrg if test "$GCC" = yes; then 2382d9dcd5aeSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 2383d9dcd5aeSmrg fi 2384d9dcd5aeSmrg ;; #( 2385d9dcd5aeSmrg /*) 2386d9dcd5aeSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 2387d9dcd5aeSmrg ;; #( 2388d9dcd5aeSmrg no|'') 2389d9dcd5aeSmrg ;; #( 2390d9dcd5aeSmrg *) 2391d9dcd5aeSmrg AC_MSG_RESULT([${with_sysroot}]) 2392d9dcd5aeSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 2393d9dcd5aeSmrg ;; 2394d9dcd5aeSmrgesac 2395191cded7Smrg 2396d9dcd5aeSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 2397d9dcd5aeSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 2398d9dcd5aeSmrg[dependent libraries, and in which our libraries should be installed.])]) 2399191cded7Smrg 2400d9dcd5aeSmrg# _LT_ENABLE_LOCK 2401d9dcd5aeSmrg# --------------- 2402d9dcd5aeSmrgm4_defun([_LT_ENABLE_LOCK], 2403d9dcd5aeSmrg[AC_ARG_ENABLE([libtool-lock], 2404d9dcd5aeSmrg [AS_HELP_STRING([--disable-libtool-lock], 2405d9dcd5aeSmrg [avoid locking (might break parallel builds)])]) 2406d9dcd5aeSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2407d9dcd5aeSmrg 2408d9dcd5aeSmrg# Some flags need to be propagated to the compiler or linker for good 2409d9dcd5aeSmrg# libtool support. 2410d9dcd5aeSmrgcase $host in 2411d9dcd5aeSmrgia64-*-hpux*) 2412d9dcd5aeSmrg # Find out which ABI we are using. 2413d9dcd5aeSmrg echo 'int i;' > conftest.$ac_ext 2414d9dcd5aeSmrg if AC_TRY_EVAL(ac_compile); then 2415d9dcd5aeSmrg case `/usr/bin/file conftest.$ac_objext` in 2416d9dcd5aeSmrg *ELF-32*) 2417d9dcd5aeSmrg HPUX_IA64_MODE="32" 2418d9dcd5aeSmrg ;; 2419d9dcd5aeSmrg *ELF-64*) 2420d9dcd5aeSmrg HPUX_IA64_MODE="64" 2421d9dcd5aeSmrg ;; 2422d9dcd5aeSmrg esac 2423d9dcd5aeSmrg fi 2424d9dcd5aeSmrg rm -rf conftest* 2425d9dcd5aeSmrg ;; 2426d9dcd5aeSmrg*-*-irix6*) 2427d9dcd5aeSmrg # Find out which ABI we are using. 2428d9dcd5aeSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 2429d9dcd5aeSmrg if AC_TRY_EVAL(ac_compile); then 2430d9dcd5aeSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2431d9dcd5aeSmrg case `/usr/bin/file conftest.$ac_objext` in 2432d9dcd5aeSmrg *32-bit*) 2433d9dcd5aeSmrg LD="${LD-ld} -melf32bsmip" 2434d9dcd5aeSmrg ;; 2435d9dcd5aeSmrg *N32*) 2436d9dcd5aeSmrg LD="${LD-ld} -melf32bmipn32" 2437d9dcd5aeSmrg ;; 2438d9dcd5aeSmrg *64-bit*) 2439d9dcd5aeSmrg LD="${LD-ld} -melf64bmip" 2440d9dcd5aeSmrg ;; 2441d9dcd5aeSmrg esac 2442d9dcd5aeSmrg else 2443d9dcd5aeSmrg case `/usr/bin/file conftest.$ac_objext` in 2444d9dcd5aeSmrg *32-bit*) 2445d9dcd5aeSmrg LD="${LD-ld} -32" 2446d9dcd5aeSmrg ;; 2447d9dcd5aeSmrg *N32*) 2448d9dcd5aeSmrg LD="${LD-ld} -n32" 2449d9dcd5aeSmrg ;; 2450d9dcd5aeSmrg *64-bit*) 2451d9dcd5aeSmrg LD="${LD-ld} -64" 2452d9dcd5aeSmrg ;; 2453d9dcd5aeSmrg esac 2454d9dcd5aeSmrg fi 2455d9dcd5aeSmrg fi 2456d9dcd5aeSmrg rm -rf conftest* 2457d9dcd5aeSmrg ;; 2458191cded7Smrg 2459d9dcd5aeSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 2460d9dcd5aeSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 2461d9dcd5aeSmrg # Find out which ABI we are using. 2462d9dcd5aeSmrg echo 'int i;' > conftest.$ac_ext 2463d9dcd5aeSmrg if AC_TRY_EVAL(ac_compile); then 2464d9dcd5aeSmrg case `/usr/bin/file conftest.o` in 2465d9dcd5aeSmrg *32-bit*) 2466d9dcd5aeSmrg case $host in 2467d9dcd5aeSmrg x86_64-*kfreebsd*-gnu) 2468d9dcd5aeSmrg LD="${LD-ld} -m elf_i386_fbsd" 2469d9dcd5aeSmrg ;; 2470d9dcd5aeSmrg x86_64-*linux*) 2471d9dcd5aeSmrg LD="${LD-ld} -m elf_i386" 2472d9dcd5aeSmrg ;; 2473d9dcd5aeSmrg ppc64-*linux*|powerpc64-*linux*) 2474d9dcd5aeSmrg LD="${LD-ld} -m elf32ppclinux" 2475d9dcd5aeSmrg ;; 2476d9dcd5aeSmrg s390x-*linux*) 2477d9dcd5aeSmrg LD="${LD-ld} -m elf_s390" 2478d9dcd5aeSmrg ;; 2479d9dcd5aeSmrg sparc64-*linux*) 2480d9dcd5aeSmrg LD="${LD-ld} -m elf32_sparc" 2481d9dcd5aeSmrg ;; 2482d9dcd5aeSmrg esac 2483d9dcd5aeSmrg ;; 2484d9dcd5aeSmrg *64-bit*) 2485d9dcd5aeSmrg case $host in 2486d9dcd5aeSmrg x86_64-*kfreebsd*-gnu) 2487d9dcd5aeSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 2488d9dcd5aeSmrg ;; 2489d9dcd5aeSmrg x86_64-*linux*) 2490d9dcd5aeSmrg LD="${LD-ld} -m elf_x86_64" 2491d9dcd5aeSmrg ;; 2492d9dcd5aeSmrg ppc*-*linux*|powerpc*-*linux*) 2493d9dcd5aeSmrg LD="${LD-ld} -m elf64ppc" 2494d9dcd5aeSmrg ;; 2495d9dcd5aeSmrg s390*-*linux*|s390*-*tpf*) 2496d9dcd5aeSmrg LD="${LD-ld} -m elf64_s390" 2497d9dcd5aeSmrg ;; 2498d9dcd5aeSmrg sparc*-*linux*) 2499d9dcd5aeSmrg LD="${LD-ld} -m elf64_sparc" 2500d9dcd5aeSmrg ;; 2501d9dcd5aeSmrg esac 2502d9dcd5aeSmrg ;; 2503d9dcd5aeSmrg esac 2504d9dcd5aeSmrg fi 2505d9dcd5aeSmrg rm -rf conftest* 2506d9dcd5aeSmrg ;; 2507191cded7Smrg 2508d9dcd5aeSmrg*-*-sco3.2v5*) 2509d9dcd5aeSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2510d9dcd5aeSmrg SAVE_CFLAGS="$CFLAGS" 2511d9dcd5aeSmrg CFLAGS="$CFLAGS -belf" 2512d9dcd5aeSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2513d9dcd5aeSmrg [AC_LANG_PUSH(C) 2514d9dcd5aeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2515d9dcd5aeSmrg AC_LANG_POP]) 2516d9dcd5aeSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2517d9dcd5aeSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2518d9dcd5aeSmrg CFLAGS="$SAVE_CFLAGS" 2519d9dcd5aeSmrg fi 2520d9dcd5aeSmrg ;; 2521d9dcd5aeSmrg*-*solaris*) 2522d9dcd5aeSmrg # Find out which ABI we are using. 2523d9dcd5aeSmrg echo 'int i;' > conftest.$ac_ext 2524d9dcd5aeSmrg if AC_TRY_EVAL(ac_compile); then 2525d9dcd5aeSmrg case `/usr/bin/file conftest.o` in 2526d9dcd5aeSmrg *64-bit*) 2527d9dcd5aeSmrg case $lt_cv_prog_gnu_ld in 2528d9dcd5aeSmrg yes*) 2529d9dcd5aeSmrg case $host in 2530d9dcd5aeSmrg i?86-*-solaris*) 2531d9dcd5aeSmrg LD="${LD-ld} -m elf_x86_64" 2532d9dcd5aeSmrg ;; 2533d9dcd5aeSmrg sparc*-*-solaris*) 2534d9dcd5aeSmrg LD="${LD-ld} -m elf64_sparc" 2535d9dcd5aeSmrg ;; 2536d9dcd5aeSmrg esac 2537d9dcd5aeSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2538d9dcd5aeSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2539d9dcd5aeSmrg LD="${LD-ld}_sol2" 2540d9dcd5aeSmrg fi 2541d9dcd5aeSmrg ;; 2542d9dcd5aeSmrg *) 2543d9dcd5aeSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 2544d9dcd5aeSmrg LD="${LD-ld} -64" 2545d9dcd5aeSmrg fi 2546d9dcd5aeSmrg ;; 2547d9dcd5aeSmrg esac 2548d9dcd5aeSmrg ;; 2549d9dcd5aeSmrg esac 2550d9dcd5aeSmrg fi 2551d9dcd5aeSmrg rm -rf conftest* 2552d9dcd5aeSmrg ;; 2553d9dcd5aeSmrgesac 2554191cded7Smrg 2555d9dcd5aeSmrgneed_locks="$enable_libtool_lock" 2556d9dcd5aeSmrg])# _LT_ENABLE_LOCK 2557191cded7Smrg 2558191cded7Smrg 2559d9dcd5aeSmrg# _LT_PROG_AR 2560d9dcd5aeSmrg# ----------- 2561d9dcd5aeSmrgm4_defun([_LT_PROG_AR], 2562d9dcd5aeSmrg[AC_CHECK_TOOLS(AR, [ar], false) 2563d9dcd5aeSmrg: ${AR=ar} 2564d9dcd5aeSmrg: ${AR_FLAGS=cru} 2565d9dcd5aeSmrg_LT_DECL([], [AR], [1], [The archiver]) 2566d9dcd5aeSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2567d9dcd5aeSmrg 2568d9dcd5aeSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 2569d9dcd5aeSmrg [lt_cv_ar_at_file=no 2570d9dcd5aeSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 2571d9dcd5aeSmrg [echo conftest.$ac_objext > conftest.lst 2572d9dcd5aeSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 2573d9dcd5aeSmrg AC_TRY_EVAL([lt_ar_try]) 2574d9dcd5aeSmrg if test "$ac_status" -eq 0; then 2575d9dcd5aeSmrg # Ensure the archiver fails upon bogus file names. 2576d9dcd5aeSmrg rm -f conftest.$ac_objext libconftest.a 2577d9dcd5aeSmrg AC_TRY_EVAL([lt_ar_try]) 2578d9dcd5aeSmrg if test "$ac_status" -ne 0; then 2579d9dcd5aeSmrg lt_cv_ar_at_file=@ 2580d9dcd5aeSmrg fi 2581d9dcd5aeSmrg fi 2582d9dcd5aeSmrg rm -f conftest.* libconftest.a 2583d9dcd5aeSmrg ]) 2584d9dcd5aeSmrg ]) 2585191cded7Smrg 2586d9dcd5aeSmrgif test "x$lt_cv_ar_at_file" = xno; then 2587d9dcd5aeSmrg archiver_list_spec= 2588d9dcd5aeSmrgelse 2589d9dcd5aeSmrg archiver_list_spec=$lt_cv_ar_at_file 2590d9dcd5aeSmrgfi 2591d9dcd5aeSmrg_LT_DECL([], [archiver_list_spec], [1], 2592d9dcd5aeSmrg [How to feed a file listing to the archiver]) 2593d9dcd5aeSmrg])# _LT_PROG_AR 2594191cded7Smrg 2595191cded7Smrg 2596d9dcd5aeSmrg# _LT_CMD_OLD_ARCHIVE 2597ba064abeSmrg# ------------------- 2598d9dcd5aeSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 2599d9dcd5aeSmrg[_LT_PROG_AR 2600191cded7Smrg 2601d9dcd5aeSmrgAC_CHECK_TOOL(STRIP, strip, :) 2602d9dcd5aeSmrgtest -z "$STRIP" && STRIP=: 2603d9dcd5aeSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2604191cded7Smrg 2605d9dcd5aeSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 2606d9dcd5aeSmrgtest -z "$RANLIB" && RANLIB=: 2607d9dcd5aeSmrg_LT_DECL([], [RANLIB], [1], 2608d9dcd5aeSmrg [Commands used to install an old-style archive]) 2609191cded7Smrg 2610d9dcd5aeSmrg# Determine commands to create old-style static archives. 2611d9dcd5aeSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 2612d9dcd5aeSmrgold_postinstall_cmds='chmod 644 $oldlib' 2613d9dcd5aeSmrgold_postuninstall_cmds= 2614191cded7Smrg 2615d9dcd5aeSmrgif test -n "$RANLIB"; then 2616d9dcd5aeSmrg case $host_os in 2617d9dcd5aeSmrg openbsd*) 2618d9dcd5aeSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2619d9dcd5aeSmrg ;; 2620d9dcd5aeSmrg *) 2621d9dcd5aeSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2622d9dcd5aeSmrg ;; 2623d9dcd5aeSmrg esac 2624d9dcd5aeSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 2625d9dcd5aeSmrgfi 2626b290cf36Smrg 2627d9dcd5aeSmrgcase $host_os in 2628d9dcd5aeSmrg darwin*) 2629d9dcd5aeSmrg lock_old_archive_extraction=yes ;; 2630d9dcd5aeSmrg *) 2631d9dcd5aeSmrg lock_old_archive_extraction=no ;; 2632d9dcd5aeSmrgesac 2633d9dcd5aeSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 2634d9dcd5aeSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 2635d9dcd5aeSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 2636d9dcd5aeSmrg [Commands used to build an old-style archive]) 2637d9dcd5aeSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 2638d9dcd5aeSmrg [Whether to use a lock for old archive extraction]) 2639d9dcd5aeSmrg])# _LT_CMD_OLD_ARCHIVE 2640b290cf36Smrg 2641191cded7Smrg 2642d9dcd5aeSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2643d9dcd5aeSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2644d9dcd5aeSmrg# ---------------------------------------------------------------- 2645d9dcd5aeSmrg# Check whether the given compiler option works 2646d9dcd5aeSmrgAC_DEFUN([_LT_COMPILER_OPTION], 2647d9dcd5aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2648d9dcd5aeSmrgm4_require([_LT_DECL_SED])dnl 2649d9dcd5aeSmrgAC_CACHE_CHECK([$1], [$2], 2650d9dcd5aeSmrg [$2=no 2651d9dcd5aeSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2652d9dcd5aeSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2653d9dcd5aeSmrg lt_compiler_flag="$3" 2654d9dcd5aeSmrg # Insert the option either (1) after the last *FLAGS variable, or 2655d9dcd5aeSmrg # (2) before a word containing "conftest.", or (3) at the end. 2656d9dcd5aeSmrg # Note that $ac_compile itself does not contain backslashes and begins 2657d9dcd5aeSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2658d9dcd5aeSmrg # The option is referenced via a variable to avoid confusing sed. 2659d9dcd5aeSmrg lt_compile=`echo "$ac_compile" | $SED \ 2660d9dcd5aeSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2661d9dcd5aeSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2662d9dcd5aeSmrg -e 's:$: $lt_compiler_flag:'` 2663d9dcd5aeSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2664d9dcd5aeSmrg (eval "$lt_compile" 2>conftest.err) 2665d9dcd5aeSmrg ac_status=$? 2666d9dcd5aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2667d9dcd5aeSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2668d9dcd5aeSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 2669d9dcd5aeSmrg # The compiler can only warn and ignore the option if not recognized 2670d9dcd5aeSmrg # So say no if there are warnings other than the usual output. 2671d9dcd5aeSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2672d9dcd5aeSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2673d9dcd5aeSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2674d9dcd5aeSmrg $2=yes 2675d9dcd5aeSmrg fi 2676d9dcd5aeSmrg fi 2677d9dcd5aeSmrg $RM conftest* 2678191cded7Smrg]) 2679191cded7Smrg 2680d9dcd5aeSmrgif test x"[$]$2" = xyes; then 2681d9dcd5aeSmrg m4_if([$5], , :, [$5]) 2682d9dcd5aeSmrgelse 2683d9dcd5aeSmrg m4_if([$6], , :, [$6]) 2684d9dcd5aeSmrgfi 2685d9dcd5aeSmrg])# _LT_COMPILER_OPTION 2686191cded7Smrg 2687d9dcd5aeSmrg# Old name: 2688d9dcd5aeSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2689d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 2690d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2691191cded7Smrg 2692b290cf36Smrg 2693d9dcd5aeSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2694d9dcd5aeSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 2695d9dcd5aeSmrg# ---------------------------------------------------- 2696d9dcd5aeSmrg# Check whether the given linker option works 2697d9dcd5aeSmrgAC_DEFUN([_LT_LINKER_OPTION], 2698d9dcd5aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2699d9dcd5aeSmrgm4_require([_LT_DECL_SED])dnl 2700d9dcd5aeSmrgAC_CACHE_CHECK([$1], [$2], 2701d9dcd5aeSmrg [$2=no 2702d9dcd5aeSmrg save_LDFLAGS="$LDFLAGS" 2703d9dcd5aeSmrg LDFLAGS="$LDFLAGS $3" 2704d9dcd5aeSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 2705d9dcd5aeSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2706d9dcd5aeSmrg # The linker can only warn and ignore the option if not recognized 2707d9dcd5aeSmrg # So say no if there are warnings 2708d9dcd5aeSmrg if test -s conftest.err; then 2709d9dcd5aeSmrg # Append any errors to the config.log. 2710d9dcd5aeSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 2711d9dcd5aeSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2712d9dcd5aeSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2713d9dcd5aeSmrg if diff conftest.exp conftest.er2 >/dev/null; then 2714d9dcd5aeSmrg $2=yes 2715d9dcd5aeSmrg fi 2716d9dcd5aeSmrg else 2717d9dcd5aeSmrg $2=yes 2718d9dcd5aeSmrg fi 2719d9dcd5aeSmrg fi 2720d9dcd5aeSmrg $RM -r conftest* 2721d9dcd5aeSmrg LDFLAGS="$save_LDFLAGS" 2722d9dcd5aeSmrg]) 2723191cded7Smrg 2724d9dcd5aeSmrgif test x"[$]$2" = xyes; then 2725d9dcd5aeSmrg m4_if([$4], , :, [$4]) 2726d9dcd5aeSmrgelse 2727d9dcd5aeSmrg m4_if([$5], , :, [$5]) 2728d9dcd5aeSmrgfi 2729d9dcd5aeSmrg])# _LT_LINKER_OPTION 2730191cded7Smrg 2731d9dcd5aeSmrg# Old name: 2732d9dcd5aeSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2733d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 2734d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2735191cded7Smrg 2736191cded7Smrg 2737d9dcd5aeSmrg# LT_CMD_MAX_LEN 2738d9dcd5aeSmrg#--------------- 2739d9dcd5aeSmrgAC_DEFUN([LT_CMD_MAX_LEN], 2740d9dcd5aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2741d9dcd5aeSmrg# find the maximum length of command line arguments 2742d9dcd5aeSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 2743d9dcd5aeSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2744d9dcd5aeSmrg i=0 2745d9dcd5aeSmrg teststring="ABCD" 2746191cded7Smrg 2747d9dcd5aeSmrg case $build_os in 2748d9dcd5aeSmrg msdosdjgpp*) 2749d9dcd5aeSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 2750d9dcd5aeSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 2751d9dcd5aeSmrg # during glob expansion). Even if it were fixed, the result of this 2752d9dcd5aeSmrg # check would be larger than it should be. 2753d9dcd5aeSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 2754d9dcd5aeSmrg ;; 2755191cded7Smrg 2756d9dcd5aeSmrg gnu*) 2757d9dcd5aeSmrg # Under GNU Hurd, this test is not required because there is 2758d9dcd5aeSmrg # no limit to the length of command line arguments. 2759d9dcd5aeSmrg # Libtool will interpret -1 as no limit whatsoever 2760d9dcd5aeSmrg lt_cv_sys_max_cmd_len=-1; 2761d9dcd5aeSmrg ;; 2762191cded7Smrg 2763d9dcd5aeSmrg cygwin* | mingw* | cegcc*) 2764d9dcd5aeSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 2765d9dcd5aeSmrg # about 5 minutes as the teststring grows exponentially. 2766d9dcd5aeSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 2767d9dcd5aeSmrg # you end up with a "frozen" computer, even though with patience 2768d9dcd5aeSmrg # the test eventually succeeds (with a max line length of 256k). 2769d9dcd5aeSmrg # Instead, let's just punt: use the minimum linelength reported by 2770d9dcd5aeSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 2771d9dcd5aeSmrg lt_cv_sys_max_cmd_len=8192; 2772d9dcd5aeSmrg ;; 2773191cded7Smrg 2774d9dcd5aeSmrg mint*) 2775d9dcd5aeSmrg # On MiNT this can take a long time and run out of memory. 2776d9dcd5aeSmrg lt_cv_sys_max_cmd_len=8192; 2777d9dcd5aeSmrg ;; 2778191cded7Smrg 2779d9dcd5aeSmrg amigaos*) 2780d9dcd5aeSmrg # On AmigaOS with pdksh, this test takes hours, literally. 2781d9dcd5aeSmrg # So we just punt and use a minimum line length of 8192. 2782d9dcd5aeSmrg lt_cv_sys_max_cmd_len=8192; 2783d9dcd5aeSmrg ;; 2784191cded7Smrg 2785d9dcd5aeSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2786d9dcd5aeSmrg # This has been around since 386BSD, at least. Likely further. 2787d9dcd5aeSmrg if test -x /sbin/sysctl; then 2788d9dcd5aeSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2789d9dcd5aeSmrg elif test -x /usr/sbin/sysctl; then 2790d9dcd5aeSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2791d9dcd5aeSmrg else 2792d9dcd5aeSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2793ba064abeSmrg fi 2794d9dcd5aeSmrg # And add a safety zone 2795d9dcd5aeSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2796d9dcd5aeSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2797d9dcd5aeSmrg ;; 2798191cded7Smrg 2799d9dcd5aeSmrg interix*) 2800d9dcd5aeSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 2801d9dcd5aeSmrg lt_cv_sys_max_cmd_len=196608 2802d9dcd5aeSmrg ;; 2803191cded7Smrg 2804d9dcd5aeSmrg os2*) 2805d9dcd5aeSmrg # The test takes a long time on OS/2. 2806d9dcd5aeSmrg lt_cv_sys_max_cmd_len=8192 2807d9dcd5aeSmrg ;; 2808191cded7Smrg 2809d9dcd5aeSmrg osf*) 2810d9dcd5aeSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2811d9dcd5aeSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2812d9dcd5aeSmrg # nice to cause kernel panics so lets avoid the loop below. 2813d9dcd5aeSmrg # First set a reasonable default. 2814d9dcd5aeSmrg lt_cv_sys_max_cmd_len=16384 2815d9dcd5aeSmrg # 2816d9dcd5aeSmrg if test -x /sbin/sysconfig; then 2817d9dcd5aeSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2818d9dcd5aeSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 2819d9dcd5aeSmrg esac 2820d9dcd5aeSmrg fi 2821d9dcd5aeSmrg ;; 2822d9dcd5aeSmrg sco3.2v5*) 2823d9dcd5aeSmrg lt_cv_sys_max_cmd_len=102400 2824d9dcd5aeSmrg ;; 2825d9dcd5aeSmrg sysv5* | sco5v6* | sysv4.2uw2*) 2826d9dcd5aeSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2827d9dcd5aeSmrg if test -n "$kargmax"; then 2828d9dcd5aeSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2829d9dcd5aeSmrg else 2830d9dcd5aeSmrg lt_cv_sys_max_cmd_len=32768 2831d9dcd5aeSmrg fi 2832d9dcd5aeSmrg ;; 2833d9dcd5aeSmrg *) 2834d9dcd5aeSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2835d9dcd5aeSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 2836d9dcd5aeSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2837d9dcd5aeSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2838d9dcd5aeSmrg else 2839d9dcd5aeSmrg # Make teststring a little bigger before we do anything with it. 2840d9dcd5aeSmrg # a 1K string should be a reasonable start. 2841d9dcd5aeSmrg for i in 1 2 3 4 5 6 7 8 ; do 2842d9dcd5aeSmrg teststring=$teststring$teststring 2843d9dcd5aeSmrg done 2844d9dcd5aeSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2845d9dcd5aeSmrg # If test is not a shell built-in, we'll probably end up computing a 2846d9dcd5aeSmrg # maximum length that is only half of the actual maximum length, but 2847d9dcd5aeSmrg # we can't tell. 2848d9dcd5aeSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 2849d9dcd5aeSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 2850d9dcd5aeSmrg test $i != 17 # 1/2 MB should be enough 2851d9dcd5aeSmrg do 2852d9dcd5aeSmrg i=`expr $i + 1` 2853d9dcd5aeSmrg teststring=$teststring$teststring 2854d9dcd5aeSmrg done 2855d9dcd5aeSmrg # Only check the string length outside the loop. 2856d9dcd5aeSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2857d9dcd5aeSmrg teststring= 2858d9dcd5aeSmrg # Add a significant safety factor because C++ compilers can tack on 2859d9dcd5aeSmrg # massive amounts of additional arguments before passing them to the 2860d9dcd5aeSmrg # linker. It appears as though 1/2 is a usable value. 2861d9dcd5aeSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2862d9dcd5aeSmrg fi 2863ba064abeSmrg ;; 2864ba064abeSmrg esac 2865d9dcd5aeSmrg]) 2866d9dcd5aeSmrgif test -n $lt_cv_sys_max_cmd_len ; then 2867d9dcd5aeSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2868d9dcd5aeSmrgelse 2869d9dcd5aeSmrg AC_MSG_RESULT(none) 2870d9dcd5aeSmrgfi 2871d9dcd5aeSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 2872d9dcd5aeSmrg_LT_DECL([], [max_cmd_len], [0], 2873d9dcd5aeSmrg [What is the maximum length of a command?]) 2874d9dcd5aeSmrg])# LT_CMD_MAX_LEN 2875191cded7Smrg 2876d9dcd5aeSmrg# Old name: 2877d9dcd5aeSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2878d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 2879d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2880191cded7Smrg 2881191cded7Smrg 2882d9dcd5aeSmrg# _LT_HEADER_DLFCN 2883d9dcd5aeSmrg# ---------------- 2884d9dcd5aeSmrgm4_defun([_LT_HEADER_DLFCN], 2885d9dcd5aeSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2886d9dcd5aeSmrg])# _LT_HEADER_DLFCN 2887191cded7Smrg 2888191cded7Smrg 2889d9dcd5aeSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2890d9dcd5aeSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2891d9dcd5aeSmrg# ---------------------------------------------------------------- 2892d9dcd5aeSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 2893d9dcd5aeSmrg[m4_require([_LT_HEADER_DLFCN])dnl 2894d9dcd5aeSmrgif test "$cross_compiling" = yes; then : 2895d9dcd5aeSmrg [$4] 2896d9dcd5aeSmrgelse 2897d9dcd5aeSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2898d9dcd5aeSmrg lt_status=$lt_dlunknown 2899d9dcd5aeSmrg cat > conftest.$ac_ext <<_LT_EOF 2900d9dcd5aeSmrg[#line $LINENO "configure" 2901d9dcd5aeSmrg#include "confdefs.h" 2902191cded7Smrg 2903d9dcd5aeSmrg#if HAVE_DLFCN_H 2904d9dcd5aeSmrg#include <dlfcn.h> 2905d9dcd5aeSmrg#endif 2906191cded7Smrg 2907d9dcd5aeSmrg#include <stdio.h> 2908191cded7Smrg 2909d9dcd5aeSmrg#ifdef RTLD_GLOBAL 2910d9dcd5aeSmrg# define LT_DLGLOBAL RTLD_GLOBAL 2911d9dcd5aeSmrg#else 2912d9dcd5aeSmrg# ifdef DL_GLOBAL 2913d9dcd5aeSmrg# define LT_DLGLOBAL DL_GLOBAL 2914d9dcd5aeSmrg# else 2915d9dcd5aeSmrg# define LT_DLGLOBAL 0 2916d9dcd5aeSmrg# endif 2917d9dcd5aeSmrg#endif 2918191cded7Smrg 2919d9dcd5aeSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2920d9dcd5aeSmrg find out it does not work in some platform. */ 2921d9dcd5aeSmrg#ifndef LT_DLLAZY_OR_NOW 2922d9dcd5aeSmrg# ifdef RTLD_LAZY 2923d9dcd5aeSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 2924d9dcd5aeSmrg# else 2925d9dcd5aeSmrg# ifdef DL_LAZY 2926d9dcd5aeSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 2927d9dcd5aeSmrg# else 2928d9dcd5aeSmrg# ifdef RTLD_NOW 2929d9dcd5aeSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 2930d9dcd5aeSmrg# else 2931d9dcd5aeSmrg# ifdef DL_NOW 2932d9dcd5aeSmrg# define LT_DLLAZY_OR_NOW DL_NOW 2933d9dcd5aeSmrg# else 2934d9dcd5aeSmrg# define LT_DLLAZY_OR_NOW 0 2935d9dcd5aeSmrg# endif 2936d9dcd5aeSmrg# endif 2937d9dcd5aeSmrg# endif 2938d9dcd5aeSmrg# endif 2939d9dcd5aeSmrg#endif 2940191cded7Smrg 2941d9dcd5aeSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 2942d9dcd5aeSmrg correspondingly for the symbols needed. */ 2943d9dcd5aeSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2944d9dcd5aeSmrgint fnord () __attribute__((visibility("default"))); 2945d9dcd5aeSmrg#endif 2946191cded7Smrg 2947d9dcd5aeSmrgint fnord () { return 42; } 2948d9dcd5aeSmrgint main () 2949d9dcd5aeSmrg{ 2950d9dcd5aeSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2951d9dcd5aeSmrg int status = $lt_dlunknown; 2952191cded7Smrg 2953d9dcd5aeSmrg if (self) 2954d9dcd5aeSmrg { 2955d9dcd5aeSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2956d9dcd5aeSmrg else 2957d9dcd5aeSmrg { 2958d9dcd5aeSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2959d9dcd5aeSmrg else puts (dlerror ()); 2960d9dcd5aeSmrg } 2961d9dcd5aeSmrg /* dlclose (self); */ 2962d9dcd5aeSmrg } 2963d9dcd5aeSmrg else 2964d9dcd5aeSmrg puts (dlerror ()); 2965191cded7Smrg 2966d9dcd5aeSmrg return status; 2967d9dcd5aeSmrg}] 2968d9dcd5aeSmrg_LT_EOF 2969d9dcd5aeSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2970d9dcd5aeSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2971d9dcd5aeSmrg lt_status=$? 2972d9dcd5aeSmrg case x$lt_status in 2973d9dcd5aeSmrg x$lt_dlno_uscore) $1 ;; 2974d9dcd5aeSmrg x$lt_dlneed_uscore) $2 ;; 2975d9dcd5aeSmrg x$lt_dlunknown|x*) $3 ;; 2976d9dcd5aeSmrg esac 2977d9dcd5aeSmrg else : 2978d9dcd5aeSmrg # compilation failed 2979d9dcd5aeSmrg $3 2980d9dcd5aeSmrg fi 2981d9dcd5aeSmrgfi 2982d9dcd5aeSmrgrm -fr conftest* 2983d9dcd5aeSmrg])# _LT_TRY_DLOPEN_SELF 2984191cded7Smrg 2985191cded7Smrg 2986d9dcd5aeSmrg# LT_SYS_DLOPEN_SELF 2987d9dcd5aeSmrg# ------------------ 2988d9dcd5aeSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 2989d9dcd5aeSmrg[m4_require([_LT_HEADER_DLFCN])dnl 2990d9dcd5aeSmrgif test "x$enable_dlopen" != xyes; then 2991d9dcd5aeSmrg enable_dlopen=unknown 2992d9dcd5aeSmrg enable_dlopen_self=unknown 2993d9dcd5aeSmrg enable_dlopen_self_static=unknown 2994d9dcd5aeSmrgelse 2995d9dcd5aeSmrg lt_cv_dlopen=no 2996d9dcd5aeSmrg lt_cv_dlopen_libs= 2997191cded7Smrg 2998d9dcd5aeSmrg case $host_os in 2999d9dcd5aeSmrg beos*) 3000d9dcd5aeSmrg lt_cv_dlopen="load_add_on" 3001d9dcd5aeSmrg lt_cv_dlopen_libs= 3002d9dcd5aeSmrg lt_cv_dlopen_self=yes 3003d9dcd5aeSmrg ;; 3004ba064abeSmrg 3005d9dcd5aeSmrg mingw* | pw32* | cegcc*) 3006d9dcd5aeSmrg lt_cv_dlopen="LoadLibrary" 3007d9dcd5aeSmrg lt_cv_dlopen_libs= 3008d9dcd5aeSmrg ;; 3009ba064abeSmrg 3010d9dcd5aeSmrg cygwin*) 3011d9dcd5aeSmrg lt_cv_dlopen="dlopen" 3012d9dcd5aeSmrg lt_cv_dlopen_libs= 3013d9dcd5aeSmrg ;; 3014ba064abeSmrg 3015d9dcd5aeSmrg darwin*) 3016d9dcd5aeSmrg # if libdl is installed we need to link against it 3017d9dcd5aeSmrg AC_CHECK_LIB([dl], [dlopen], 3018d9dcd5aeSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 3019d9dcd5aeSmrg lt_cv_dlopen="dyld" 3020d9dcd5aeSmrg lt_cv_dlopen_libs= 3021d9dcd5aeSmrg lt_cv_dlopen_self=yes 3022d9dcd5aeSmrg ]) 3023d9dcd5aeSmrg ;; 3024ba064abeSmrg 3025d9dcd5aeSmrg *) 3026d9dcd5aeSmrg AC_CHECK_FUNC([shl_load], 3027d9dcd5aeSmrg [lt_cv_dlopen="shl_load"], 3028d9dcd5aeSmrg [AC_CHECK_LIB([dld], [shl_load], 3029d9dcd5aeSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 3030d9dcd5aeSmrg [AC_CHECK_FUNC([dlopen], 3031d9dcd5aeSmrg [lt_cv_dlopen="dlopen"], 3032d9dcd5aeSmrg [AC_CHECK_LIB([dl], [dlopen], 3033d9dcd5aeSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 3034d9dcd5aeSmrg [AC_CHECK_LIB([svld], [dlopen], 3035d9dcd5aeSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 3036d9dcd5aeSmrg [AC_CHECK_LIB([dld], [dld_link], 3037d9dcd5aeSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 3038d9dcd5aeSmrg ]) 3039d9dcd5aeSmrg ]) 3040d9dcd5aeSmrg ]) 3041d9dcd5aeSmrg ]) 3042d9dcd5aeSmrg ]) 3043d9dcd5aeSmrg ;; 3044d9dcd5aeSmrg esac 3045ba064abeSmrg 3046d9dcd5aeSmrg if test "x$lt_cv_dlopen" != xno; then 3047d9dcd5aeSmrg enable_dlopen=yes 3048d9dcd5aeSmrg else 3049d9dcd5aeSmrg enable_dlopen=no 3050d9dcd5aeSmrg fi 3051ba064abeSmrg 3052d9dcd5aeSmrg case $lt_cv_dlopen in 3053d9dcd5aeSmrg dlopen) 3054d9dcd5aeSmrg save_CPPFLAGS="$CPPFLAGS" 3055d9dcd5aeSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3056ba064abeSmrg 3057d9dcd5aeSmrg save_LDFLAGS="$LDFLAGS" 3058d9dcd5aeSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3059ba064abeSmrg 3060d9dcd5aeSmrg save_LIBS="$LIBS" 3061d9dcd5aeSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 3062ba064abeSmrg 3063d9dcd5aeSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 3064d9dcd5aeSmrg lt_cv_dlopen_self, [dnl 3065d9dcd5aeSmrg _LT_TRY_DLOPEN_SELF( 3066d9dcd5aeSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 3067d9dcd5aeSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 3068d9dcd5aeSmrg ]) 3069ba064abeSmrg 3070d9dcd5aeSmrg if test "x$lt_cv_dlopen_self" = xyes; then 3071d9dcd5aeSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 3072d9dcd5aeSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 3073d9dcd5aeSmrg lt_cv_dlopen_self_static, [dnl 3074d9dcd5aeSmrg _LT_TRY_DLOPEN_SELF( 3075d9dcd5aeSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 3076d9dcd5aeSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 3077d9dcd5aeSmrg ]) 3078d9dcd5aeSmrg fi 3079ba064abeSmrg 3080d9dcd5aeSmrg CPPFLAGS="$save_CPPFLAGS" 3081d9dcd5aeSmrg LDFLAGS="$save_LDFLAGS" 3082d9dcd5aeSmrg LIBS="$save_LIBS" 3083d9dcd5aeSmrg ;; 3084d9dcd5aeSmrg esac 3085ba064abeSmrg 3086d9dcd5aeSmrg case $lt_cv_dlopen_self in 3087d9dcd5aeSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 3088d9dcd5aeSmrg *) enable_dlopen_self=unknown ;; 3089d9dcd5aeSmrg esac 3090ba064abeSmrg 3091d9dcd5aeSmrg case $lt_cv_dlopen_self_static in 3092d9dcd5aeSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 3093d9dcd5aeSmrg *) enable_dlopen_self_static=unknown ;; 3094ba064abeSmrg esac 3095d9dcd5aeSmrgfi 3096d9dcd5aeSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 3097d9dcd5aeSmrg [Whether dlopen is supported]) 3098d9dcd5aeSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 3099d9dcd5aeSmrg [Whether dlopen of programs is supported]) 3100d9dcd5aeSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 3101d9dcd5aeSmrg [Whether dlopen of statically linked programs is supported]) 3102d9dcd5aeSmrg])# LT_SYS_DLOPEN_SELF 3103ba064abeSmrg 3104d9dcd5aeSmrg# Old name: 3105d9dcd5aeSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 3106d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 3107d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 3108ba064abeSmrg 3109ba064abeSmrg 3110d9dcd5aeSmrg# _LT_COMPILER_C_O([TAGNAME]) 3111d9dcd5aeSmrg# --------------------------- 3112d9dcd5aeSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 3113d9dcd5aeSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 3114d9dcd5aeSmrgm4_defun([_LT_COMPILER_C_O], 3115ba064abeSmrg[m4_require([_LT_DECL_SED])dnl 3116d9dcd5aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3117d9dcd5aeSmrgm4_require([_LT_TAG_COMPILER])dnl 3118d9dcd5aeSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3119d9dcd5aeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3120d9dcd5aeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3121d9dcd5aeSmrg $RM -r conftest 2>/dev/null 3122d9dcd5aeSmrg mkdir conftest 3123d9dcd5aeSmrg cd conftest 3124d9dcd5aeSmrg mkdir out 3125d9dcd5aeSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3126ba064abeSmrg 3127d9dcd5aeSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 3128d9dcd5aeSmrg # Insert the option either (1) after the last *FLAGS variable, or 3129d9dcd5aeSmrg # (2) before a word containing "conftest.", or (3) at the end. 3130d9dcd5aeSmrg # Note that $ac_compile itself does not contain backslashes and begins 3131d9dcd5aeSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 3132d9dcd5aeSmrg lt_compile=`echo "$ac_compile" | $SED \ 3133d9dcd5aeSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3134d9dcd5aeSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3135d9dcd5aeSmrg -e 's:$: $lt_compiler_flag:'` 3136d9dcd5aeSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3137d9dcd5aeSmrg (eval "$lt_compile" 2>out/conftest.err) 3138d9dcd5aeSmrg ac_status=$? 3139d9dcd5aeSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 3140d9dcd5aeSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3141d9dcd5aeSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 3142d9dcd5aeSmrg then 3143d9dcd5aeSmrg # The compiler can only warn and ignore the option if not recognized 3144d9dcd5aeSmrg # So say no if there are warnings 3145d9dcd5aeSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 3146d9dcd5aeSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3147d9dcd5aeSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3148d9dcd5aeSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3149d9dcd5aeSmrg fi 3150d9dcd5aeSmrg fi 3151d9dcd5aeSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 3152d9dcd5aeSmrg $RM conftest* 3153d9dcd5aeSmrg # SGI C++ compiler will create directory out/ii_files/ for 3154d9dcd5aeSmrg # template instantiation 3155d9dcd5aeSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 3156d9dcd5aeSmrg $RM out/* && rmdir out 3157d9dcd5aeSmrg cd .. 3158d9dcd5aeSmrg $RM -r conftest 3159d9dcd5aeSmrg $RM conftest* 3160d9dcd5aeSmrg]) 3161d9dcd5aeSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 3162d9dcd5aeSmrg [Does compiler simultaneously support -c and -o options?]) 3163d9dcd5aeSmrg])# _LT_COMPILER_C_O 3164ba064abeSmrg 3165ba064abeSmrg 3166d9dcd5aeSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 3167d9dcd5aeSmrg# ---------------------------------- 3168d9dcd5aeSmrg# Check to see if we can do hard links to lock some files if needed 3169d9dcd5aeSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 3170d9dcd5aeSmrg[m4_require([_LT_ENABLE_LOCK])dnl 3171d9dcd5aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3172d9dcd5aeSmrg_LT_COMPILER_C_O([$1]) 3173ba064abeSmrg 3174d9dcd5aeSmrghard_links="nottested" 3175d9dcd5aeSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3176d9dcd5aeSmrg # do not overwrite the value of need_locks provided by the user 3177d9dcd5aeSmrg AC_MSG_CHECKING([if we can lock with hard links]) 3178d9dcd5aeSmrg hard_links=yes 3179d9dcd5aeSmrg $RM conftest* 3180d9dcd5aeSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 3181d9dcd5aeSmrg touch conftest.a 3182d9dcd5aeSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 3183d9dcd5aeSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 3184d9dcd5aeSmrg AC_MSG_RESULT([$hard_links]) 3185d9dcd5aeSmrg if test "$hard_links" = no; then 3186d9dcd5aeSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3187d9dcd5aeSmrg need_locks=warn 3188d9dcd5aeSmrg fi 3189ba064abeSmrgelse 3190d9dcd5aeSmrg need_locks=no 3191ba064abeSmrgfi 3192d9dcd5aeSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 3193d9dcd5aeSmrg])# _LT_COMPILER_FILE_LOCKS 3194ba064abeSmrg 3195ba064abeSmrg 3196d9dcd5aeSmrg# _LT_CHECK_OBJDIR 3197d9dcd5aeSmrg# ---------------- 3198d9dcd5aeSmrgm4_defun([_LT_CHECK_OBJDIR], 3199d9dcd5aeSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3200d9dcd5aeSmrg[rm -f .libs 2>/dev/null 3201d9dcd5aeSmrgmkdir .libs 2>/dev/null 3202d9dcd5aeSmrgif test -d .libs; then 3203d9dcd5aeSmrg lt_cv_objdir=.libs 3204d9dcd5aeSmrgelse 3205d9dcd5aeSmrg # MS-DOS does not allow filenames that begin with a dot. 3206d9dcd5aeSmrg lt_cv_objdir=_libs 3207d9dcd5aeSmrgfi 3208d9dcd5aeSmrgrmdir .libs 2>/dev/null]) 3209d9dcd5aeSmrgobjdir=$lt_cv_objdir 3210d9dcd5aeSmrg_LT_DECL([], [objdir], [0], 3211d9dcd5aeSmrg [The name of the directory that contains temporary libtool files])dnl 3212d9dcd5aeSmrgm4_pattern_allow([LT_OBJDIR])dnl 3213d9dcd5aeSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 3214d9dcd5aeSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 3215d9dcd5aeSmrg])# _LT_CHECK_OBJDIR 3216ba064abeSmrg 3217ba064abeSmrg 3218d9dcd5aeSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 3219d9dcd5aeSmrg# -------------------------------------- 3220d9dcd5aeSmrg# Check hardcoding attributes. 3221d9dcd5aeSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 3222d9dcd5aeSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3223d9dcd5aeSmrg_LT_TAGVAR(hardcode_action, $1)= 3224d9dcd5aeSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 3225d9dcd5aeSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 3226d9dcd5aeSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3227ba064abeSmrg 3228d9dcd5aeSmrg # We can hardcode non-existent directories. 3229d9dcd5aeSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 3230d9dcd5aeSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 3231d9dcd5aeSmrg # have to relink, otherwise we might link with an installed library 3232d9dcd5aeSmrg # when we should be linking with a yet-to-be-installed one 3233d9dcd5aeSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3234d9dcd5aeSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 3235d9dcd5aeSmrg # Linking always hardcodes the temporary library directory. 3236d9dcd5aeSmrg _LT_TAGVAR(hardcode_action, $1)=relink 3237d9dcd5aeSmrg else 3238d9dcd5aeSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 3239d9dcd5aeSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 3240d9dcd5aeSmrg fi 3241d9dcd5aeSmrgelse 3242d9dcd5aeSmrg # We cannot hardcode anything, or else we can only hardcode existing 3243d9dcd5aeSmrg # directories. 3244d9dcd5aeSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 3245d9dcd5aeSmrgfi 3246d9dcd5aeSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3247ba064abeSmrg 3248d9dcd5aeSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 3249d9dcd5aeSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 3250d9dcd5aeSmrg # Fast installation is not supported 3251d9dcd5aeSmrg enable_fast_install=no 3252d9dcd5aeSmrgelif test "$shlibpath_overrides_runpath" = yes || 3253d9dcd5aeSmrg test "$enable_shared" = no; then 3254d9dcd5aeSmrg # Fast installation is not necessary 3255d9dcd5aeSmrg enable_fast_install=needless 3256d9dcd5aeSmrgfi 3257d9dcd5aeSmrg_LT_TAGDECL([], [hardcode_action], [0], 3258d9dcd5aeSmrg [How to hardcode a shared library path into an executable]) 3259d9dcd5aeSmrg])# _LT_LINKER_HARDCODE_LIBPATH 3260ba064abeSmrg 3261d9dcd5aeSmrg 3262d9dcd5aeSmrg# _LT_CMD_STRIPLIB 3263d9dcd5aeSmrg# ---------------- 3264d9dcd5aeSmrgm4_defun([_LT_CMD_STRIPLIB], 3265d9dcd5aeSmrg[m4_require([_LT_DECL_EGREP]) 3266d9dcd5aeSmrgstriplib= 3267d9dcd5aeSmrgold_striplib= 3268d9dcd5aeSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 3269d9dcd5aeSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 3270d9dcd5aeSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3271d9dcd5aeSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3272d9dcd5aeSmrg AC_MSG_RESULT([yes]) 3273d9dcd5aeSmrgelse 3274d9dcd5aeSmrg# FIXME - insert some real tests, host_os isn't really good enough 3275d9dcd5aeSmrg case $host_os in 3276d9dcd5aeSmrg darwin*) 3277d9dcd5aeSmrg if test -n "$STRIP" ; then 3278d9dcd5aeSmrg striplib="$STRIP -x" 3279d9dcd5aeSmrg old_striplib="$STRIP -S" 3280d9dcd5aeSmrg AC_MSG_RESULT([yes]) 3281ba064abeSmrg else 3282d9dcd5aeSmrg AC_MSG_RESULT([no]) 3283ba064abeSmrg fi 3284d9dcd5aeSmrg ;; 3285d9dcd5aeSmrg *) 3286d9dcd5aeSmrg AC_MSG_RESULT([no]) 3287d9dcd5aeSmrg ;; 3288d9dcd5aeSmrg esac 3289d9dcd5aeSmrgfi 3290d9dcd5aeSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 3291d9dcd5aeSmrg_LT_DECL([], [striplib], [1]) 3292d9dcd5aeSmrg])# _LT_CMD_STRIPLIB 3293ba064abeSmrg 3294ba064abeSmrg 3295d9dcd5aeSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 3296d9dcd5aeSmrg# ----------------------------- 3297d9dcd5aeSmrg# PORTME Fill in your ld.so characteristics 3298d9dcd5aeSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 3299d9dcd5aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3300d9dcd5aeSmrgm4_require([_LT_DECL_EGREP])dnl 3301d9dcd5aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3302d9dcd5aeSmrgm4_require([_LT_DECL_OBJDUMP])dnl 3303d9dcd5aeSmrgm4_require([_LT_DECL_SED])dnl 3304d9dcd5aeSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3305d9dcd5aeSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 3306d9dcd5aeSmrgm4_if([$1], 3307d9dcd5aeSmrg [], [ 3308d9dcd5aeSmrgif test "$GCC" = yes; then 3309d9dcd5aeSmrg case $host_os in 3310d9dcd5aeSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 3311d9dcd5aeSmrg *) lt_awk_arg="/^libraries:/" ;; 3312d9dcd5aeSmrg esac 3313d9dcd5aeSmrg case $host_os in 3314d9dcd5aeSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 3315d9dcd5aeSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 3316d9dcd5aeSmrg esac 3317d9dcd5aeSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 3318d9dcd5aeSmrg case $lt_search_path_spec in 3319d9dcd5aeSmrg *\;*) 3320d9dcd5aeSmrg # if the path contains ";" then we assume it to be the separator 3321d9dcd5aeSmrg # otherwise default to the standard path separator (i.e. ":") - it is 3322d9dcd5aeSmrg # assumed that no part of a normal pathname contains ";" but that should 3323d9dcd5aeSmrg # okay in the real world where ";" in dirpaths is itself problematic. 3324d9dcd5aeSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3325d9dcd5aeSmrg ;; 3326d9dcd5aeSmrg *) 3327d9dcd5aeSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 3328d9dcd5aeSmrg ;; 3329d9dcd5aeSmrg esac 3330d9dcd5aeSmrg # Ok, now we have the path, separated by spaces, we can step through it 3331d9dcd5aeSmrg # and add multilib dir if necessary. 3332d9dcd5aeSmrg lt_tmp_lt_search_path_spec= 3333d9dcd5aeSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 3334d9dcd5aeSmrg for lt_sys_path in $lt_search_path_spec; do 3335d9dcd5aeSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 3336d9dcd5aeSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 3337d9dcd5aeSmrg else 3338d9dcd5aeSmrg test -d "$lt_sys_path" && \ 3339d9dcd5aeSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 3340d9dcd5aeSmrg fi 3341d9dcd5aeSmrg done 3342d9dcd5aeSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 3343d9dcd5aeSmrgBEGIN {RS=" "; FS="/|\n";} { 3344d9dcd5aeSmrg lt_foo=""; 3345d9dcd5aeSmrg lt_count=0; 3346d9dcd5aeSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 3347d9dcd5aeSmrg if ($lt_i != "" && $lt_i != ".") { 3348d9dcd5aeSmrg if ($lt_i == "..") { 3349d9dcd5aeSmrg lt_count++; 3350d9dcd5aeSmrg } else { 3351d9dcd5aeSmrg if (lt_count == 0) { 3352d9dcd5aeSmrg lt_foo="/" $lt_i lt_foo; 3353d9dcd5aeSmrg } else { 3354d9dcd5aeSmrg lt_count--; 3355d9dcd5aeSmrg } 3356d9dcd5aeSmrg } 3357d9dcd5aeSmrg } 3358d9dcd5aeSmrg } 3359d9dcd5aeSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 3360d9dcd5aeSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 3361d9dcd5aeSmrg}'` 3362d9dcd5aeSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 3363d9dcd5aeSmrg # for these hosts. 3364d9dcd5aeSmrg case $host_os in 3365d9dcd5aeSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 3366d9dcd5aeSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3367d9dcd5aeSmrg esac 3368d9dcd5aeSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3369d9dcd5aeSmrgelse 3370d9dcd5aeSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3371d9dcd5aeSmrgfi]) 3372d9dcd5aeSmrglibrary_names_spec= 3373d9dcd5aeSmrglibname_spec='lib$name' 3374d9dcd5aeSmrgsoname_spec= 3375d9dcd5aeSmrgshrext_cmds=".so" 3376d9dcd5aeSmrgpostinstall_cmds= 3377d9dcd5aeSmrgpostuninstall_cmds= 3378d9dcd5aeSmrgfinish_cmds= 3379d9dcd5aeSmrgfinish_eval= 3380d9dcd5aeSmrgshlibpath_var= 3381d9dcd5aeSmrgshlibpath_overrides_runpath=unknown 3382d9dcd5aeSmrgversion_type=none 3383d9dcd5aeSmrgdynamic_linker="$host_os ld.so" 3384d9dcd5aeSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 3385d9dcd5aeSmrgneed_lib_prefix=unknown 3386d9dcd5aeSmrghardcode_into_libs=no 3387d9dcd5aeSmrg 3388d9dcd5aeSmrg# when you set need_version to no, make sure it does not cause -set_version 3389d9dcd5aeSmrg# flags to be left without arguments 3390d9dcd5aeSmrgneed_version=unknown 3391d9dcd5aeSmrg 3392d9dcd5aeSmrgcase $host_os in 3393d9dcd5aeSmrgaix3*) 3394d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3395d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3396d9dcd5aeSmrg shlibpath_var=LIBPATH 3397d9dcd5aeSmrg 3398d9dcd5aeSmrg # AIX 3 has no versioning support, so we append a major version to the name. 3399d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3400ba064abeSmrg ;; 3401d9dcd5aeSmrg 3402d9dcd5aeSmrgaix[[4-9]]*) 3403d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3404d9dcd5aeSmrg need_lib_prefix=no 3405d9dcd5aeSmrg need_version=no 3406d9dcd5aeSmrg hardcode_into_libs=yes 3407d9dcd5aeSmrg if test "$host_cpu" = ia64; then 3408d9dcd5aeSmrg # AIX 5 supports IA64 3409d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3410d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3411d9dcd5aeSmrg else 3412d9dcd5aeSmrg # With GCC up to 2.95.x, collect2 would create an import file 3413d9dcd5aeSmrg # for dependence libraries. The import file would start with 3414d9dcd5aeSmrg # the line `#! .'. This would cause the generated library to 3415d9dcd5aeSmrg # depend on `.', always an invalid library. This was fixed in 3416d9dcd5aeSmrg # development snapshots of GCC prior to 3.0. 3417d9dcd5aeSmrg case $host_os in 3418d9dcd5aeSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 3419d9dcd5aeSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3420d9dcd5aeSmrg echo ' yes ' 3421d9dcd5aeSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 3422d9dcd5aeSmrg : 3423d9dcd5aeSmrg else 3424d9dcd5aeSmrg can_build_shared=no 3425d9dcd5aeSmrg fi 3426ba064abeSmrg ;; 3427ba064abeSmrg esac 3428d9dcd5aeSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3429d9dcd5aeSmrg # soname into executable. Probably we can add versioning support to 3430d9dcd5aeSmrg # collect2, so additional links can be useful in future. 3431d9dcd5aeSmrg if test "$aix_use_runtimelinking" = yes; then 3432d9dcd5aeSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3433d9dcd5aeSmrg # instead of lib<name>.a to let people know that these are not 3434d9dcd5aeSmrg # typical AIX shared libraries. 3435d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3436d9dcd5aeSmrg else 3437d9dcd5aeSmrg # We preserve .a as extension for shared libraries through AIX4.2 3438d9dcd5aeSmrg # and later when we are not doing run time linking. 3439d9dcd5aeSmrg library_names_spec='${libname}${release}.a $libname.a' 3440d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3441d9dcd5aeSmrg fi 3442d9dcd5aeSmrg shlibpath_var=LIBPATH 3443ba064abeSmrg fi 3444ba064abeSmrg ;; 3445ba064abeSmrg 3446d9dcd5aeSmrgamigaos*) 3447d9dcd5aeSmrg case $host_cpu in 3448d9dcd5aeSmrg powerpc) 3449d9dcd5aeSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 3450d9dcd5aeSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 3451d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3452ba064abeSmrg ;; 3453d9dcd5aeSmrg m68k) 3454d9dcd5aeSmrg library_names_spec='$libname.ixlibrary $libname.a' 3455d9dcd5aeSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 3456d9dcd5aeSmrg 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' 3457ba064abeSmrg ;; 3458ba064abeSmrg esac 3459d9dcd5aeSmrg ;; 3460ba064abeSmrg 3461d9dcd5aeSmrgbeos*) 3462d9dcd5aeSmrg library_names_spec='${libname}${shared_ext}' 3463d9dcd5aeSmrg dynamic_linker="$host_os ld.so" 3464d9dcd5aeSmrg shlibpath_var=LIBRARY_PATH 3465d9dcd5aeSmrg ;; 3466ba064abeSmrg 3467d9dcd5aeSmrgbsdi[[45]]*) 3468d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3469d9dcd5aeSmrg need_version=no 3470d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3471d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3472d9dcd5aeSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3473d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3474d9dcd5aeSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3475d9dcd5aeSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3476d9dcd5aeSmrg # the default ld.so.conf also contains /usr/contrib/lib and 3477d9dcd5aeSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3478d9dcd5aeSmrg # libtool to hard-code these into programs 3479d9dcd5aeSmrg ;; 3480ba064abeSmrg 3481d9dcd5aeSmrgcygwin* | mingw* | pw32* | cegcc*) 3482d9dcd5aeSmrg version_type=windows 3483d9dcd5aeSmrg shrext_cmds=".dll" 3484d9dcd5aeSmrg need_version=no 3485d9dcd5aeSmrg need_lib_prefix=no 3486ba064abeSmrg 3487d9dcd5aeSmrg case $GCC,$cc_basename in 3488d9dcd5aeSmrg yes,*) 3489d9dcd5aeSmrg # gcc 3490d9dcd5aeSmrg library_names_spec='$libname.dll.a' 3491d9dcd5aeSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 3492d9dcd5aeSmrg postinstall_cmds='base_file=`basename \${file}`~ 3493d9dcd5aeSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3494d9dcd5aeSmrg dldir=$destdir/`dirname \$dlpath`~ 3495d9dcd5aeSmrg test -d \$dldir || mkdir -p \$dldir~ 3496d9dcd5aeSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 3497d9dcd5aeSmrg chmod a+x \$dldir/$dlname~ 3498d9dcd5aeSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3499d9dcd5aeSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3500d9dcd5aeSmrg fi' 3501d9dcd5aeSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3502d9dcd5aeSmrg dlpath=$dir/\$dldll~ 3503d9dcd5aeSmrg $RM \$dlpath' 3504d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3505ba064abeSmrg 3506d9dcd5aeSmrg case $host_os in 3507d9dcd5aeSmrg cygwin*) 3508d9dcd5aeSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3509d9dcd5aeSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3510d9dcd5aeSmrgm4_if([$1], [],[ 3511d9dcd5aeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 3512d9dcd5aeSmrg ;; 3513d9dcd5aeSmrg mingw* | cegcc*) 3514d9dcd5aeSmrg # MinGW DLLs use traditional 'lib' prefix 3515d9dcd5aeSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3516d9dcd5aeSmrg ;; 3517d9dcd5aeSmrg pw32*) 3518d9dcd5aeSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 3519d9dcd5aeSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3520d9dcd5aeSmrg ;; 3521d9dcd5aeSmrg esac 3522d9dcd5aeSmrg dynamic_linker='Win32 ld.exe' 3523ba064abeSmrg ;; 3524ba064abeSmrg 3525d9dcd5aeSmrg *,cl*) 3526d9dcd5aeSmrg # Native MSVC 3527d9dcd5aeSmrg libname_spec='$name' 3528d9dcd5aeSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3529d9dcd5aeSmrg library_names_spec='${libname}.dll.lib' 3530d9dcd5aeSmrg 3531d9dcd5aeSmrg case $build_os in 3532d9dcd5aeSmrg mingw*) 3533d9dcd5aeSmrg sys_lib_search_path_spec= 3534d9dcd5aeSmrg lt_save_ifs=$IFS 3535d9dcd5aeSmrg IFS=';' 3536d9dcd5aeSmrg for lt_path in $LIB 3537d9dcd5aeSmrg do 3538d9dcd5aeSmrg IFS=$lt_save_ifs 3539d9dcd5aeSmrg # Let DOS variable expansion print the short 8.3 style file name. 3540d9dcd5aeSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 3541d9dcd5aeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 3542d9dcd5aeSmrg done 3543d9dcd5aeSmrg IFS=$lt_save_ifs 3544d9dcd5aeSmrg # Convert to MSYS style. 3545d9dcd5aeSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 3546d9dcd5aeSmrg ;; 3547d9dcd5aeSmrg cygwin*) 3548d9dcd5aeSmrg # Convert to unix form, then to dos form, then back to unix form 3549d9dcd5aeSmrg # but this time dos style (no spaces!) so that the unix form looks 3550d9dcd5aeSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 3551d9dcd5aeSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 3552d9dcd5aeSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3553d9dcd5aeSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3554d9dcd5aeSmrg ;; 3555d9dcd5aeSmrg *) 3556d9dcd5aeSmrg sys_lib_search_path_spec="$LIB" 3557d9dcd5aeSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3558d9dcd5aeSmrg # It is most probably a Windows format PATH. 3559d9dcd5aeSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3560d9dcd5aeSmrg else 3561d9dcd5aeSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3562d9dcd5aeSmrg fi 3563d9dcd5aeSmrg # FIXME: find the short name or the path components, as spaces are 3564d9dcd5aeSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 3565d9dcd5aeSmrg ;; 3566d9dcd5aeSmrg esac 3567ba064abeSmrg 3568d9dcd5aeSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 3569d9dcd5aeSmrg postinstall_cmds='base_file=`basename \${file}`~ 3570d9dcd5aeSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3571d9dcd5aeSmrg dldir=$destdir/`dirname \$dlpath`~ 3572d9dcd5aeSmrg test -d \$dldir || mkdir -p \$dldir~ 3573d9dcd5aeSmrg $install_prog $dir/$dlname \$dldir/$dlname' 3574d9dcd5aeSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3575d9dcd5aeSmrg dlpath=$dir/\$dldll~ 3576d9dcd5aeSmrg $RM \$dlpath' 3577d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3578d9dcd5aeSmrg dynamic_linker='Win32 link.exe' 3579ba064abeSmrg ;; 3580ba064abeSmrg 3581d9dcd5aeSmrg *) 3582d9dcd5aeSmrg # Assume MSVC wrapper 3583d9dcd5aeSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3584d9dcd5aeSmrg dynamic_linker='Win32 ld.exe' 3585ba064abeSmrg ;; 3586d9dcd5aeSmrg esac 3587d9dcd5aeSmrg # FIXME: first we should search . and the directory the executable is in 3588d9dcd5aeSmrg shlibpath_var=PATH 3589d9dcd5aeSmrg ;; 3590ba064abeSmrg 3591d9dcd5aeSmrgdarwin* | rhapsody*) 3592d9dcd5aeSmrg dynamic_linker="$host_os dyld" 3593d9dcd5aeSmrg version_type=darwin 3594d9dcd5aeSmrg need_lib_prefix=no 3595d9dcd5aeSmrg need_version=no 3596d9dcd5aeSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3597d9dcd5aeSmrg soname_spec='${libname}${release}${major}$shared_ext' 3598d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3599d9dcd5aeSmrg shlibpath_var=DYLD_LIBRARY_PATH 3600d9dcd5aeSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3601d9dcd5aeSmrgm4_if([$1], [],[ 3602d9dcd5aeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3603d9dcd5aeSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3604d9dcd5aeSmrg ;; 3605ba064abeSmrg 3606d9dcd5aeSmrgdgux*) 3607d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3608d9dcd5aeSmrg need_lib_prefix=no 3609d9dcd5aeSmrg need_version=no 3610d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3611d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3612d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3613d9dcd5aeSmrg ;; 3614ba064abeSmrg 3615d9dcd5aeSmrgfreebsd* | dragonfly*) 3616d9dcd5aeSmrg # DragonFly does not have aout. When/if they implement a new 3617d9dcd5aeSmrg # versioning mechanism, adjust this. 3618d9dcd5aeSmrg if test -x /usr/bin/objformat; then 3619d9dcd5aeSmrg objformat=`/usr/bin/objformat` 3620d9dcd5aeSmrg else 3621d9dcd5aeSmrg case $host_os in 3622d9dcd5aeSmrg freebsd[[23]].*) objformat=aout ;; 3623d9dcd5aeSmrg *) objformat=elf ;; 3624d9dcd5aeSmrg esac 3625d9dcd5aeSmrg fi 3626d9dcd5aeSmrg version_type=freebsd-$objformat 3627d9dcd5aeSmrg case $version_type in 3628d9dcd5aeSmrg freebsd-elf*) 3629d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3630d9dcd5aeSmrg need_version=no 3631d9dcd5aeSmrg need_lib_prefix=no 3632d9dcd5aeSmrg ;; 3633d9dcd5aeSmrg freebsd-*) 3634d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3635d9dcd5aeSmrg need_version=yes 3636d9dcd5aeSmrg ;; 3637d9dcd5aeSmrg esac 3638d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3639d9dcd5aeSmrg case $host_os in 3640d9dcd5aeSmrg freebsd2.*) 3641d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3642ba064abeSmrg ;; 3643d9dcd5aeSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3644d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3645d9dcd5aeSmrg hardcode_into_libs=yes 3646ba064abeSmrg ;; 3647d9dcd5aeSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3648d9dcd5aeSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3649d9dcd5aeSmrg shlibpath_overrides_runpath=no 3650d9dcd5aeSmrg hardcode_into_libs=yes 3651ba064abeSmrg ;; 3652d9dcd5aeSmrg *) # from 4.6 on, and DragonFly 3653d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3654d9dcd5aeSmrg hardcode_into_libs=yes 3655d9dcd5aeSmrg ;; 3656d9dcd5aeSmrg esac 3657d9dcd5aeSmrg ;; 3658d9dcd5aeSmrg 3659d9dcd5aeSmrggnu*) 3660d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3661d9dcd5aeSmrg need_lib_prefix=no 3662d9dcd5aeSmrg need_version=no 3663d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3664d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3665d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3666d9dcd5aeSmrg shlibpath_overrides_runpath=no 3667d9dcd5aeSmrg hardcode_into_libs=yes 3668d9dcd5aeSmrg ;; 3669d9dcd5aeSmrg 3670d9dcd5aeSmrghaiku*) 3671d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3672d9dcd5aeSmrg need_lib_prefix=no 3673d9dcd5aeSmrg need_version=no 3674d9dcd5aeSmrg dynamic_linker="$host_os runtime_loader" 3675d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3676d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3677d9dcd5aeSmrg shlibpath_var=LIBRARY_PATH 3678d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3679d9dcd5aeSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3680d9dcd5aeSmrg hardcode_into_libs=yes 3681d9dcd5aeSmrg ;; 3682d9dcd5aeSmrg 3683d9dcd5aeSmrghpux9* | hpux10* | hpux11*) 3684d9dcd5aeSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 3685d9dcd5aeSmrg # link against other versions. 3686d9dcd5aeSmrg version_type=sunos 3687d9dcd5aeSmrg need_lib_prefix=no 3688d9dcd5aeSmrg need_version=no 3689d9dcd5aeSmrg case $host_cpu in 3690d9dcd5aeSmrg ia64*) 3691d9dcd5aeSmrg shrext_cmds='.so' 3692d9dcd5aeSmrg hardcode_into_libs=yes 3693d9dcd5aeSmrg dynamic_linker="$host_os dld.so" 3694d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3695d9dcd5aeSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3696d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3697d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3698d9dcd5aeSmrg if test "X$HPUX_IA64_MODE" = X32; then 3699d9dcd5aeSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3700ba064abeSmrg else 3701d9dcd5aeSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3702ba064abeSmrg fi 3703d9dcd5aeSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3704d9dcd5aeSmrg ;; 3705d9dcd5aeSmrg hppa*64*) 3706d9dcd5aeSmrg shrext_cmds='.sl' 3707d9dcd5aeSmrg hardcode_into_libs=yes 3708d9dcd5aeSmrg dynamic_linker="$host_os dld.sl" 3709d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3710d9dcd5aeSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3711d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3712d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3713d9dcd5aeSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3714d9dcd5aeSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3715ba064abeSmrg ;; 3716ba064abeSmrg *) 3717d9dcd5aeSmrg shrext_cmds='.sl' 3718d9dcd5aeSmrg dynamic_linker="$host_os dld.sl" 3719d9dcd5aeSmrg shlibpath_var=SHLIB_PATH 3720d9dcd5aeSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3721d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3722d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3723ba064abeSmrg ;; 3724ba064abeSmrg esac 3725d9dcd5aeSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3726d9dcd5aeSmrg postinstall_cmds='chmod 555 $lib' 3727d9dcd5aeSmrg # or fails outright, so override atomically: 3728d9dcd5aeSmrg install_override_mode=555 3729d9dcd5aeSmrg ;; 3730ba064abeSmrg 3731d9dcd5aeSmrginterix[[3-9]]*) 3732d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3733d9dcd5aeSmrg need_lib_prefix=no 3734d9dcd5aeSmrg need_version=no 3735d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3736d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3737d9dcd5aeSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3738d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3739d9dcd5aeSmrg shlibpath_overrides_runpath=no 3740d9dcd5aeSmrg hardcode_into_libs=yes 3741d9dcd5aeSmrg ;; 3742ba064abeSmrg 3743d9dcd5aeSmrgirix5* | irix6* | nonstopux*) 3744d9dcd5aeSmrg case $host_os in 3745d9dcd5aeSmrg nonstopux*) version_type=nonstopux ;; 3746d9dcd5aeSmrg *) 3747d9dcd5aeSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 3748d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3749d9dcd5aeSmrg else 3750d9dcd5aeSmrg version_type=irix 3751d9dcd5aeSmrg fi ;; 3752d9dcd5aeSmrg esac 3753d9dcd5aeSmrg need_lib_prefix=no 3754d9dcd5aeSmrg need_version=no 3755d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3756d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3757d9dcd5aeSmrg case $host_os in 3758d9dcd5aeSmrg irix5* | nonstopux*) 3759d9dcd5aeSmrg libsuff= shlibsuff= 3760d9dcd5aeSmrg ;; 3761d9dcd5aeSmrg *) 3762d9dcd5aeSmrg case $LD in # libtool.m4 will add one of these switches to LD 3763d9dcd5aeSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3764d9dcd5aeSmrg libsuff= shlibsuff= libmagic=32-bit;; 3765d9dcd5aeSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3766d9dcd5aeSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 3767d9dcd5aeSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3768d9dcd5aeSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 3769d9dcd5aeSmrg *) libsuff= shlibsuff= libmagic=never-match;; 3770d9dcd5aeSmrg esac 3771d9dcd5aeSmrg ;; 3772d9dcd5aeSmrg esac 3773d9dcd5aeSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3774d9dcd5aeSmrg shlibpath_overrides_runpath=no 3775d9dcd5aeSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3776d9dcd5aeSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3777d9dcd5aeSmrg hardcode_into_libs=yes 3778d9dcd5aeSmrg ;; 3779ba064abeSmrg 3780d9dcd5aeSmrg# No shared lib support for Linux oldld, aout, or coff. 3781d9dcd5aeSmrglinux*oldld* | linux*aout* | linux*coff*) 3782d9dcd5aeSmrg dynamic_linker=no 3783d9dcd5aeSmrg ;; 3784ba064abeSmrg 3785d9dcd5aeSmrg# This must be glibc/ELF. 3786d9dcd5aeSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3787d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3788d9dcd5aeSmrg need_lib_prefix=no 3789d9dcd5aeSmrg need_version=no 3790d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3791d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3792d9dcd5aeSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3793d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3794d9dcd5aeSmrg shlibpath_overrides_runpath=no 3795ba064abeSmrg 3796d9dcd5aeSmrg # Some binutils ld are patched to set DT_RUNPATH 3797d9dcd5aeSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3798d9dcd5aeSmrg [lt_cv_shlibpath_overrides_runpath=no 3799d9dcd5aeSmrg save_LDFLAGS=$LDFLAGS 3800d9dcd5aeSmrg save_libdir=$libdir 3801d9dcd5aeSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3802d9dcd5aeSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3803d9dcd5aeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3804d9dcd5aeSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3805d9dcd5aeSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 3806d9dcd5aeSmrg LDFLAGS=$save_LDFLAGS 3807d9dcd5aeSmrg libdir=$save_libdir 3808d9dcd5aeSmrg ]) 3809d9dcd5aeSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3810ba064abeSmrg 3811d9dcd5aeSmrg # This implies no fast_install, which is unacceptable. 3812d9dcd5aeSmrg # Some rework will be needed to allow for fast_install 3813d9dcd5aeSmrg # before this can be enabled. 3814d9dcd5aeSmrg hardcode_into_libs=yes 3815ba064abeSmrg 3816d9dcd5aeSmrg # Append ld.so.conf contents to the search path 3817d9dcd5aeSmrg if test -f /etc/ld.so.conf; then 3818d9dcd5aeSmrg 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' ' '` 3819d9dcd5aeSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3820d9dcd5aeSmrg fi 3821ba064abeSmrg 3822d9dcd5aeSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 3823d9dcd5aeSmrg # powerpc, because MkLinux only supported shared libraries with the 3824d9dcd5aeSmrg # GNU dynamic linker. Since this was broken with cross compilers, 3825d9dcd5aeSmrg # most powerpc-linux boxes support dynamic linking these days and 3826d9dcd5aeSmrg # people can always --disable-shared, the test was removed, and we 3827d9dcd5aeSmrg # assume the GNU/Linux dynamic linker is in use. 3828d9dcd5aeSmrg dynamic_linker='GNU/Linux ld.so' 3829d9dcd5aeSmrg ;; 3830ba064abeSmrg 3831d9dcd5aeSmrgnetbsd*) 3832d9dcd5aeSmrg version_type=sunos 3833d9dcd5aeSmrg need_lib_prefix=no 3834d9dcd5aeSmrg need_version=no 3835d9dcd5aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3836d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3837d9dcd5aeSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3838d9dcd5aeSmrg dynamic_linker='NetBSD (a.out) ld.so' 3839ba064abeSmrg else 3840d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3841d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3842d9dcd5aeSmrg dynamic_linker='NetBSD ld.elf_so' 3843b290cf36Smrg fi 3844d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3845d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3846d9dcd5aeSmrg hardcode_into_libs=yes 3847d9dcd5aeSmrg ;; 3848191cded7Smrg 3849d9dcd5aeSmrgnewsos6) 3850d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3851d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3852d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3853d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3854d9dcd5aeSmrg ;; 3855191cded7Smrg 3856d9dcd5aeSmrg*nto* | *qnx*) 3857d9dcd5aeSmrg version_type=qnx 3858d9dcd5aeSmrg need_lib_prefix=no 3859d9dcd5aeSmrg need_version=no 3860d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3861d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3862d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3863d9dcd5aeSmrg shlibpath_overrides_runpath=no 3864d9dcd5aeSmrg hardcode_into_libs=yes 3865d9dcd5aeSmrg dynamic_linker='ldqnx.so' 3866d9dcd5aeSmrg ;; 3867191cded7Smrg 3868d9dcd5aeSmrgopenbsd*) 3869d9dcd5aeSmrg version_type=sunos 3870d9dcd5aeSmrg sys_lib_dlsearch_path_spec="/usr/lib" 3871d9dcd5aeSmrg need_lib_prefix=no 3872d9dcd5aeSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3873ba064abeSmrg case $host_os in 3874d9dcd5aeSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3875d9dcd5aeSmrg *) need_version=no ;; 3876ba064abeSmrg esac 3877d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3878d9dcd5aeSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3879d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3880d9dcd5aeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3881d9dcd5aeSmrg case $host_os in 3882d9dcd5aeSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 3883d9dcd5aeSmrg shlibpath_overrides_runpath=no 3884d9dcd5aeSmrg ;; 3885d9dcd5aeSmrg *) 3886d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3887d9dcd5aeSmrg ;; 3888d9dcd5aeSmrg esac 3889ba064abeSmrg else 3890d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3891ba064abeSmrg fi 3892d9dcd5aeSmrg ;; 3893191cded7Smrg 3894d9dcd5aeSmrgos2*) 3895d9dcd5aeSmrg libname_spec='$name' 3896d9dcd5aeSmrg shrext_cmds=".dll" 3897d9dcd5aeSmrg need_lib_prefix=no 3898d9dcd5aeSmrg library_names_spec='$libname${shared_ext} $libname.a' 3899d9dcd5aeSmrg dynamic_linker='OS/2 ld.exe' 3900d9dcd5aeSmrg shlibpath_var=LIBPATH 3901d9dcd5aeSmrg ;; 3902191cded7Smrg 3903d9dcd5aeSmrgosf3* | osf4* | osf5*) 3904d9dcd5aeSmrg version_type=osf 3905d9dcd5aeSmrg need_lib_prefix=no 3906d9dcd5aeSmrg need_version=no 3907d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3908d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3909d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3910d9dcd5aeSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3911d9dcd5aeSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3912d9dcd5aeSmrg ;; 3913191cded7Smrg 3914d9dcd5aeSmrgrdos*) 3915d9dcd5aeSmrg dynamic_linker=no 3916d9dcd5aeSmrg ;; 3917191cded7Smrg 3918d9dcd5aeSmrgsolaris*) 3919d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3920d9dcd5aeSmrg need_lib_prefix=no 3921d9dcd5aeSmrg need_version=no 3922d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3923d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3924d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3925d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3926d9dcd5aeSmrg hardcode_into_libs=yes 3927d9dcd5aeSmrg # ldd complains unless libraries are executable 3928d9dcd5aeSmrg postinstall_cmds='chmod +x $lib' 3929d9dcd5aeSmrg ;; 3930191cded7Smrg 3931d9dcd5aeSmrgsunos4*) 3932d9dcd5aeSmrg version_type=sunos 3933d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3934d9dcd5aeSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3935d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3936d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3937d9dcd5aeSmrg if test "$with_gnu_ld" = yes; then 3938d9dcd5aeSmrg need_lib_prefix=no 3939d9dcd5aeSmrg fi 3940d9dcd5aeSmrg need_version=yes 3941d9dcd5aeSmrg ;; 3942191cded7Smrg 3943d9dcd5aeSmrgsysv4 | sysv4.3*) 3944d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3945d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3946d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3947d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3948d9dcd5aeSmrg case $host_vendor in 3949d9dcd5aeSmrg sni) 3950d9dcd5aeSmrg shlibpath_overrides_runpath=no 3951d9dcd5aeSmrg need_lib_prefix=no 3952d9dcd5aeSmrg runpath_var=LD_RUN_PATH 3953d9dcd5aeSmrg ;; 3954d9dcd5aeSmrg siemens) 3955d9dcd5aeSmrg need_lib_prefix=no 3956d9dcd5aeSmrg ;; 3957d9dcd5aeSmrg motorola) 3958d9dcd5aeSmrg need_lib_prefix=no 3959d9dcd5aeSmrg need_version=no 3960d9dcd5aeSmrg shlibpath_overrides_runpath=no 3961d9dcd5aeSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3962d9dcd5aeSmrg ;; 3963ba064abeSmrg esac 3964d9dcd5aeSmrg ;; 3965191cded7Smrg 3966d9dcd5aeSmrgsysv4*MP*) 3967d9dcd5aeSmrg if test -d /usr/nec ;then 3968d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 3969d9dcd5aeSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3970d9dcd5aeSmrg soname_spec='$libname${shared_ext}.$major' 3971d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3972d9dcd5aeSmrg fi 3973d9dcd5aeSmrg ;; 3974191cded7Smrg 3975d9dcd5aeSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3976d9dcd5aeSmrg version_type=freebsd-elf 3977d9dcd5aeSmrg need_lib_prefix=no 3978d9dcd5aeSmrg need_version=no 3979d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3980d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 3981d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 3982d9dcd5aeSmrg shlibpath_overrides_runpath=yes 3983d9dcd5aeSmrg hardcode_into_libs=yes 3984d9dcd5aeSmrg if test "$with_gnu_ld" = yes; then 3985d9dcd5aeSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3986d9dcd5aeSmrg else 3987d9dcd5aeSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3988d9dcd5aeSmrg case $host_os in 3989d9dcd5aeSmrg sco3.2v5*) 3990d9dcd5aeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3991d9dcd5aeSmrg ;; 3992d9dcd5aeSmrg esac 3993d9dcd5aeSmrg fi 3994d9dcd5aeSmrg sys_lib_dlsearch_path_spec='/usr/lib' 3995d9dcd5aeSmrg ;; 3996191cded7Smrg 3997d9dcd5aeSmrgtpf*) 3998d9dcd5aeSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3999d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 4000d9dcd5aeSmrg need_lib_prefix=no 4001d9dcd5aeSmrg need_version=no 4002d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4003d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 4004d9dcd5aeSmrg shlibpath_overrides_runpath=no 4005d9dcd5aeSmrg hardcode_into_libs=yes 4006d9dcd5aeSmrg ;; 4007191cded7Smrg 4008d9dcd5aeSmrguts4*) 4009d9dcd5aeSmrg version_type=linux # correct to gnu/linux during the next big refactor 4010d9dcd5aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4011d9dcd5aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 4012d9dcd5aeSmrg shlibpath_var=LD_LIBRARY_PATH 4013d9dcd5aeSmrg ;; 4014191cded7Smrg 4015d9dcd5aeSmrg*) 4016d9dcd5aeSmrg dynamic_linker=no 4017d9dcd5aeSmrg ;; 4018d9dcd5aeSmrgesac 4019d9dcd5aeSmrgAC_MSG_RESULT([$dynamic_linker]) 4020d9dcd5aeSmrgtest "$dynamic_linker" = no && can_build_shared=no 4021191cded7Smrg 4022d9dcd5aeSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 4023d9dcd5aeSmrgif test "$GCC" = yes; then 4024d9dcd5aeSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 4025ba064abeSmrgfi 4026191cded7Smrg 4027d9dcd5aeSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 4028d9dcd5aeSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 4029ba064abeSmrgfi 4030d9dcd5aeSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 4031d9dcd5aeSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 4032b290cf36Smrgfi 4033191cded7Smrg 4034d9dcd5aeSmrg_LT_DECL([], [variables_saved_for_relink], [1], 4035d9dcd5aeSmrg [Variables whose values should be saved in libtool wrapper scripts and 4036d9dcd5aeSmrg restored at link time]) 4037d9dcd5aeSmrg_LT_DECL([], [need_lib_prefix], [0], 4038d9dcd5aeSmrg [Do we need the "lib" prefix for modules?]) 4039d9dcd5aeSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 4040d9dcd5aeSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 4041d9dcd5aeSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 4042d9dcd5aeSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 4043d9dcd5aeSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 4044d9dcd5aeSmrg [Is shlibpath searched before the hard-coded library search path?]) 4045d9dcd5aeSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 4046d9dcd5aeSmrg_LT_DECL([], [library_names_spec], [1], 4047d9dcd5aeSmrg [[List of archive names. First name is the real one, the rest are links. 4048d9dcd5aeSmrg The last name is the one that the linker finds with -lNAME]]) 4049d9dcd5aeSmrg_LT_DECL([], [soname_spec], [1], 4050d9dcd5aeSmrg [[The coded name of the library, if different from the real name]]) 4051d9dcd5aeSmrg_LT_DECL([], [install_override_mode], [1], 4052d9dcd5aeSmrg [Permission mode override for installation of shared libraries]) 4053d9dcd5aeSmrg_LT_DECL([], [postinstall_cmds], [2], 4054d9dcd5aeSmrg [Command to use after installation of a shared archive]) 4055d9dcd5aeSmrg_LT_DECL([], [postuninstall_cmds], [2], 4056d9dcd5aeSmrg [Command to use after uninstallation of a shared archive]) 4057d9dcd5aeSmrg_LT_DECL([], [finish_cmds], [2], 4058d9dcd5aeSmrg [Commands used to finish a libtool library installation in a directory]) 4059d9dcd5aeSmrg_LT_DECL([], [finish_eval], [1], 4060d9dcd5aeSmrg [[As "finish_cmds", except a single script fragment to be evaled but 4061d9dcd5aeSmrg not shown]]) 4062d9dcd5aeSmrg_LT_DECL([], [hardcode_into_libs], [0], 4063d9dcd5aeSmrg [Whether we should hardcode library paths into libraries]) 4064d9dcd5aeSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 4065d9dcd5aeSmrg [Compile-time system search path for libraries]) 4066d9dcd5aeSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 4067d9dcd5aeSmrg [Run-time system search path for libraries]) 4068d9dcd5aeSmrg])# _LT_SYS_DYNAMIC_LINKER 4069191cded7Smrg 4070191cded7Smrg 4071d9dcd5aeSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 4072d9dcd5aeSmrg# -------------------------- 4073d9dcd5aeSmrg# find a file program which can recognize shared library 4074d9dcd5aeSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 4075d9dcd5aeSmrg[m4_require([_LT_DECL_EGREP])dnl 4076d9dcd5aeSmrgAC_MSG_CHECKING([for $1]) 4077d9dcd5aeSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4078d9dcd5aeSmrg[case $MAGIC_CMD in 4079d9dcd5aeSmrg[[\\/*] | ?:[\\/]*]) 4080d9dcd5aeSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4081d9dcd5aeSmrg ;; 4082d9dcd5aeSmrg*) 4083d9dcd5aeSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 4084d9dcd5aeSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4085d9dcd5aeSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 4086d9dcd5aeSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 4087d9dcd5aeSmrgdnl not every word. This closes a longstanding sh security hole. 4088d9dcd5aeSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 4089d9dcd5aeSmrg for ac_dir in $ac_dummy; do 4090d9dcd5aeSmrg IFS="$lt_save_ifs" 4091d9dcd5aeSmrg test -z "$ac_dir" && ac_dir=. 4092d9dcd5aeSmrg if test -f $ac_dir/$1; then 4093d9dcd5aeSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4094d9dcd5aeSmrg if test -n "$file_magic_test_file"; then 4095d9dcd5aeSmrg case $deplibs_check_method in 4096d9dcd5aeSmrg "file_magic "*) 4097d9dcd5aeSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4098d9dcd5aeSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4099d9dcd5aeSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4100d9dcd5aeSmrg $EGREP "$file_magic_regex" > /dev/null; then 4101d9dcd5aeSmrg : 4102d9dcd5aeSmrg else 4103d9dcd5aeSmrg cat <<_LT_EOF 1>&2 4104d9dcd5aeSmrg 4105d9dcd5aeSmrg*** Warning: the command libtool uses to detect shared libraries, 4106d9dcd5aeSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 4107d9dcd5aeSmrg*** The result is that libtool may fail to recognize shared libraries 4108d9dcd5aeSmrg*** as such. This will affect the creation of libtool libraries that 4109d9dcd5aeSmrg*** depend on shared libraries, but programs linked with such libtool 4110d9dcd5aeSmrg*** libraries will work regardless of this problem. Nevertheless, you 4111d9dcd5aeSmrg*** may want to report the problem to your system manager and/or to 4112d9dcd5aeSmrg*** bug-libtool@gnu.org 4113d9dcd5aeSmrg 4114d9dcd5aeSmrg_LT_EOF 4115d9dcd5aeSmrg fi ;; 4116d9dcd5aeSmrg esac 4117d9dcd5aeSmrg fi 4118d9dcd5aeSmrg break 4119b290cf36Smrg fi 4120d9dcd5aeSmrg done 4121d9dcd5aeSmrg IFS="$lt_save_ifs" 4122d9dcd5aeSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 4123d9dcd5aeSmrg ;; 4124d9dcd5aeSmrgesac]) 4125d9dcd5aeSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4126d9dcd5aeSmrgif test -n "$MAGIC_CMD"; then 4127d9dcd5aeSmrg AC_MSG_RESULT($MAGIC_CMD) 4128d9dcd5aeSmrgelse 4129d9dcd5aeSmrg AC_MSG_RESULT(no) 4130ba064abeSmrgfi 4131d9dcd5aeSmrg_LT_DECL([], [MAGIC_CMD], [0], 4132d9dcd5aeSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4133d9dcd5aeSmrg])# _LT_PATH_TOOL_PREFIX 4134191cded7Smrg 4135d9dcd5aeSmrg# Old name: 4136d9dcd5aeSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4137d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 4138d9dcd5aeSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4139191cded7Smrg 4140d9dcd5aeSmrg 4141d9dcd5aeSmrg# _LT_PATH_MAGIC 4142d9dcd5aeSmrg# -------------- 4143d9dcd5aeSmrg# find a file program which can recognize a shared library 4144d9dcd5aeSmrgm4_defun([_LT_PATH_MAGIC], 4145d9dcd5aeSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4146d9dcd5aeSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 4147d9dcd5aeSmrg if test -n "$ac_tool_prefix"; then 4148d9dcd5aeSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4149d9dcd5aeSmrg else 4150d9dcd5aeSmrg MAGIC_CMD=: 4151d9dcd5aeSmrg fi 4152d9dcd5aeSmrgfi 4153d9dcd5aeSmrg])# _LT_PATH_MAGIC 4154d9dcd5aeSmrg 4155d9dcd5aeSmrg 4156d9dcd5aeSmrg# LT_PATH_LD 4157d9dcd5aeSmrg# ---------- 4158d9dcd5aeSmrg# find the pathname to the GNU or non-GNU linker 4159d9dcd5aeSmrgAC_DEFUN([LT_PATH_LD], 4160d9dcd5aeSmrg[AC_REQUIRE([AC_PROG_CC])dnl 4161d9dcd5aeSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 4162d9dcd5aeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 4163ba064abeSmrgm4_require([_LT_DECL_SED])dnl 4164d9dcd5aeSmrgm4_require([_LT_DECL_EGREP])dnl 4165d9dcd5aeSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4166d9dcd5aeSmrg 4167d9dcd5aeSmrgAC_ARG_WITH([gnu-ld], 4168d9dcd5aeSmrg [AS_HELP_STRING([--with-gnu-ld], 4169d9dcd5aeSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4170d9dcd5aeSmrg [test "$withval" = no || with_gnu_ld=yes], 4171d9dcd5aeSmrg [with_gnu_ld=no])dnl 4172d9dcd5aeSmrg 4173d9dcd5aeSmrgac_prog=ld 4174ba064abeSmrgif test "$GCC" = yes; then 4175d9dcd5aeSmrg # Check if gcc -print-prog-name=ld gives a path. 4176d9dcd5aeSmrg AC_MSG_CHECKING([for ld used by $CC]) 4177d9dcd5aeSmrg case $host in 4178d9dcd5aeSmrg *-*-mingw*) 4179d9dcd5aeSmrg # gcc leaves a trailing carriage return which upsets mingw 4180d9dcd5aeSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4181d9dcd5aeSmrg *) 4182d9dcd5aeSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4183ba064abeSmrg esac 4184d9dcd5aeSmrg case $ac_prog in 4185d9dcd5aeSmrg # Accept absolute paths. 4186d9dcd5aeSmrg [[\\/]]* | ?:[[\\/]]*) 4187d9dcd5aeSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 4188d9dcd5aeSmrg # Canonicalize the pathname of ld 4189d9dcd5aeSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4190d9dcd5aeSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4191d9dcd5aeSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4192d9dcd5aeSmrg done 4193d9dcd5aeSmrg test -z "$LD" && LD="$ac_prog" 4194d9dcd5aeSmrg ;; 4195d9dcd5aeSmrg "") 4196d9dcd5aeSmrg # If it fails, then pretend we aren't using GCC. 4197d9dcd5aeSmrg ac_prog=ld 4198ba064abeSmrg ;; 4199ba064abeSmrg *) 4200d9dcd5aeSmrg # If it is relative, then search for the first ld in PATH. 4201d9dcd5aeSmrg with_gnu_ld=unknown 4202ba064abeSmrg ;; 4203ba064abeSmrg esac 4204d9dcd5aeSmrgelif test "$with_gnu_ld" = yes; then 4205d9dcd5aeSmrg AC_MSG_CHECKING([for GNU ld]) 4206d9dcd5aeSmrgelse 4207d9dcd5aeSmrg AC_MSG_CHECKING([for non-GNU ld]) 4208d9dcd5aeSmrgfi 4209d9dcd5aeSmrgAC_CACHE_VAL(lt_cv_path_LD, 4210d9dcd5aeSmrg[if test -z "$LD"; then 4211d9dcd5aeSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4212d9dcd5aeSmrg for ac_dir in $PATH; do 4213d9dcd5aeSmrg IFS="$lt_save_ifs" 4214d9dcd5aeSmrg test -z "$ac_dir" && ac_dir=. 4215d9dcd5aeSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4216d9dcd5aeSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 4217d9dcd5aeSmrg # Check to see if the program is GNU ld. I'd rather use --version, 4218d9dcd5aeSmrg # but apparently some variants of GNU ld only accept -v. 4219d9dcd5aeSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 4220d9dcd5aeSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4221d9dcd5aeSmrg *GNU* | *'with BFD'*) 4222d9dcd5aeSmrg test "$with_gnu_ld" != no && break 4223d9dcd5aeSmrg ;; 4224d9dcd5aeSmrg *) 4225d9dcd5aeSmrg test "$with_gnu_ld" != yes && break 4226d9dcd5aeSmrg ;; 4227d9dcd5aeSmrg esac 4228b290cf36Smrg fi 4229ba064abeSmrg done 4230d9dcd5aeSmrg IFS="$lt_save_ifs" 4231ba064abeSmrgelse 4232d9dcd5aeSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 4233ba064abeSmrgfi]) 4234d9dcd5aeSmrgLD="$lt_cv_path_LD" 4235d9dcd5aeSmrgif test -n "$LD"; then 4236d9dcd5aeSmrg AC_MSG_RESULT($LD) 4237d9dcd5aeSmrgelse 4238d9dcd5aeSmrg AC_MSG_RESULT(no) 4239d9dcd5aeSmrgfi 4240d9dcd5aeSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4241d9dcd5aeSmrg_LT_PATH_LD_GNU 4242d9dcd5aeSmrgAC_SUBST([LD]) 4243191cded7Smrg 4244d9dcd5aeSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4245d9dcd5aeSmrg])# LT_PATH_LD 4246ba064abeSmrg 4247d9dcd5aeSmrg# Old names: 4248d9dcd5aeSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4249d9dcd5aeSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4250d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 4251d9dcd5aeSmrgdnl AC_DEFUN([AM_PROG_LD], []) 4252d9dcd5aeSmrgdnl AC_DEFUN([AC_PROG_LD], []) 4253ba064abeSmrg 4254d9dcd5aeSmrg 4255d9dcd5aeSmrg# _LT_PATH_LD_GNU 4256d9dcd5aeSmrg#- -------------- 4257d9dcd5aeSmrgm4_defun([_LT_PATH_LD_GNU], 4258d9dcd5aeSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4259d9dcd5aeSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4260d9dcd5aeSmrgcase `$LD -v 2>&1 </dev/null` in 4261d9dcd5aeSmrg*GNU* | *'with BFD'*) 4262d9dcd5aeSmrg lt_cv_prog_gnu_ld=yes 4263d9dcd5aeSmrg ;; 4264d9dcd5aeSmrg*) 4265d9dcd5aeSmrg lt_cv_prog_gnu_ld=no 4266ba064abeSmrg ;; 4267d9dcd5aeSmrgesac]) 4268d9dcd5aeSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 4269d9dcd5aeSmrg])# _LT_PATH_LD_GNU 4270191cded7Smrg 4271d9dcd5aeSmrg 4272d9dcd5aeSmrg# _LT_CMD_RELOAD 4273d9dcd5aeSmrg# -------------- 4274d9dcd5aeSmrg# find reload flag for linker 4275d9dcd5aeSmrg# -- PORTME Some linkers may need a different reload flag. 4276d9dcd5aeSmrgm4_defun([_LT_CMD_RELOAD], 4277d9dcd5aeSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 4278d9dcd5aeSmrg lt_cv_ld_reload_flag, 4279d9dcd5aeSmrg [lt_cv_ld_reload_flag='-r']) 4280d9dcd5aeSmrgreload_flag=$lt_cv_ld_reload_flag 4281d9dcd5aeSmrgcase $reload_flag in 4282d9dcd5aeSmrg"" | " "*) ;; 4283d9dcd5aeSmrg*) reload_flag=" $reload_flag" ;; 4284d9dcd5aeSmrgesac 4285d9dcd5aeSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 4286d9dcd5aeSmrgcase $host_os in 4287d9dcd5aeSmrg cygwin* | mingw* | pw32* | cegcc*) 4288d9dcd5aeSmrg if test "$GCC" != yes; then 4289d9dcd5aeSmrg reload_cmds=false 4290d9dcd5aeSmrg fi 4291ba064abeSmrg ;; 4292d9dcd5aeSmrg darwin*) 4293d9dcd5aeSmrg if test "$GCC" = yes; then 4294d9dcd5aeSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4295d9dcd5aeSmrg else 4296d9dcd5aeSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 4297d9dcd5aeSmrg fi 4298ba064abeSmrg ;; 4299d9dcd5aeSmrgesac 4300d9dcd5aeSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4301d9dcd5aeSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 4302d9dcd5aeSmrg])# _LT_CMD_RELOAD 4303d9dcd5aeSmrg 4304d9dcd5aeSmrg 4305d9dcd5aeSmrg# _LT_CHECK_MAGIC_METHOD 4306d9dcd5aeSmrg# ---------------------- 4307d9dcd5aeSmrg# how to check for library dependencies 4308d9dcd5aeSmrg# -- PORTME fill in with the dynamic library characteristics 4309d9dcd5aeSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 4310d9dcd5aeSmrg[m4_require([_LT_DECL_EGREP]) 4311d9dcd5aeSmrgm4_require([_LT_DECL_OBJDUMP]) 4312d9dcd5aeSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 4313d9dcd5aeSmrglt_cv_deplibs_check_method, 4314d9dcd5aeSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 4315d9dcd5aeSmrglt_cv_file_magic_test_file= 4316d9dcd5aeSmrglt_cv_deplibs_check_method='unknown' 4317d9dcd5aeSmrg# Need to set the preceding variable on all platforms that support 4318d9dcd5aeSmrg# interlibrary dependencies. 4319d9dcd5aeSmrg# 'none' -- dependencies not supported. 4320d9dcd5aeSmrg# `unknown' -- same as none, but documents that we really don't know. 4321d9dcd5aeSmrg# 'pass_all' -- all dependencies passed with no checks. 4322d9dcd5aeSmrg# 'test_compile' -- check by making test program. 4323d9dcd5aeSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 4324d9dcd5aeSmrg# which responds to the $file_magic_cmd with a given extended regex. 4325d9dcd5aeSmrg# If you have `file' or equivalent on your system and you're not sure 4326d9dcd5aeSmrg# whether `pass_all' will *always* work, you probably want this one. 4327d9dcd5aeSmrg 4328d9dcd5aeSmrgcase $host_os in 4329d9dcd5aeSmrgaix[[4-9]]*) 4330d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4331ba064abeSmrg ;; 4332191cded7Smrg 4333ba064abeSmrgbeos*) 4334d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4335ba064abeSmrg ;; 4336191cded7Smrg 4337ba064abeSmrgbsdi[[45]]*) 4338d9dcd5aeSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4339d9dcd5aeSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 4340d9dcd5aeSmrg lt_cv_file_magic_test_file=/shlib/libc.so 4341ba064abeSmrg ;; 4342ba064abeSmrg 4343d9dcd5aeSmrgcygwin*) 4344d9dcd5aeSmrg # func_win32_libid is a shell function defined in ltmain.sh 4345d9dcd5aeSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4346d9dcd5aeSmrg lt_cv_file_magic_cmd='func_win32_libid' 4347ba064abeSmrg ;; 4348191cded7Smrg 4349d9dcd5aeSmrgmingw* | pw32*) 4350d9dcd5aeSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 4351d9dcd5aeSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 4352d9dcd5aeSmrg # unless we find 'file', for example because we are cross-compiling. 4353d9dcd5aeSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4354d9dcd5aeSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4355d9dcd5aeSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4356d9dcd5aeSmrg lt_cv_file_magic_cmd='func_win32_libid' 4357d9dcd5aeSmrg else 4358d9dcd5aeSmrg # Keep this pattern in sync with the one in func_win32_libid. 4359d9dcd5aeSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4360d9dcd5aeSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 4361d9dcd5aeSmrg fi 4362ba064abeSmrg ;; 4363191cded7Smrg 4364d9dcd5aeSmrgcegcc*) 4365d9dcd5aeSmrg # use the weaker test based on 'objdump'. See mingw*. 4366d9dcd5aeSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4367d9dcd5aeSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 4368ba064abeSmrg ;; 4369ba064abeSmrg 4370d9dcd5aeSmrgdarwin* | rhapsody*) 4371d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4372ba064abeSmrg ;; 4373ba064abeSmrg 4374ba064abeSmrgfreebsd* | dragonfly*) 4375d9dcd5aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4376d9dcd5aeSmrg case $host_cpu in 4377d9dcd5aeSmrg i*86 ) 4378d9dcd5aeSmrg # Not sure whether the presence of OpenBSD here was a mistake. 4379d9dcd5aeSmrg # Let's accept both of them until this is cleared up. 4380d9dcd5aeSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4381d9dcd5aeSmrg lt_cv_file_magic_cmd=/usr/bin/file 4382d9dcd5aeSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4383ba064abeSmrg ;; 4384d9dcd5aeSmrg esac 4385d9dcd5aeSmrg else 4386d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4387d9dcd5aeSmrg fi 4388ba064abeSmrg ;; 4389ba064abeSmrg 4390ba064abeSmrggnu*) 4391d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4392ba064abeSmrg ;; 4393191cded7Smrg 4394ba064abeSmrghaiku*) 4395d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4396ba064abeSmrg ;; 4397ba064abeSmrg 4398d9dcd5aeSmrghpux10.20* | hpux11*) 4399d9dcd5aeSmrg lt_cv_file_magic_cmd=/usr/bin/file 4400ba064abeSmrg case $host_cpu in 4401ba064abeSmrg ia64*) 4402d9dcd5aeSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4403d9dcd5aeSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4404ba064abeSmrg ;; 4405ba064abeSmrg hppa*64*) 4406d9dcd5aeSmrg [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]'] 4407d9dcd5aeSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4408ba064abeSmrg ;; 4409ba064abeSmrg *) 4410d9dcd5aeSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4411d9dcd5aeSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 4412ba064abeSmrg ;; 4413ba064abeSmrg esac 4414ba064abeSmrg ;; 4415ba064abeSmrg 4416ba064abeSmrginterix[[3-9]]*) 4417d9dcd5aeSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4418d9dcd5aeSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4419ba064abeSmrg ;; 4420191cded7Smrg 4421ba064abeSmrgirix5* | irix6* | nonstopux*) 4422d9dcd5aeSmrg case $LD in 4423d9dcd5aeSmrg *-32|*"-32 ") libmagic=32-bit;; 4424d9dcd5aeSmrg *-n32|*"-n32 ") libmagic=N32;; 4425d9dcd5aeSmrg *-64|*"-64 ") libmagic=64-bit;; 4426d9dcd5aeSmrg *) libmagic=never-match;; 4427ba064abeSmrg esac 4428d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4429ba064abeSmrg ;; 4430191cded7Smrg 4431d9dcd5aeSmrg# This must be glibc/ELF. 4432ba064abeSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 4433d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4434ba064abeSmrg ;; 4435191cded7Smrg 4436ba064abeSmrgnetbsd*) 4437d9dcd5aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4438d9dcd5aeSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4439ba064abeSmrg else 4440d9dcd5aeSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4441ba064abeSmrg fi 4442ba064abeSmrg ;; 4443191cded7Smrg 4444d9dcd5aeSmrgnewos6*) 4445d9dcd5aeSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4446d9dcd5aeSmrg lt_cv_file_magic_cmd=/usr/bin/file 4447d9dcd5aeSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 4448ba064abeSmrg ;; 4449191cded7Smrg 4450ba064abeSmrg*nto* | *qnx*) 4451d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4452ba064abeSmrg ;; 4453ba064abeSmrg 4454ba064abeSmrgopenbsd*) 4455ba064abeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4456d9dcd5aeSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4457ba064abeSmrg else 4458d9dcd5aeSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4459ba064abeSmrg fi 4460ba064abeSmrg ;; 4461191cded7Smrg 4462ba064abeSmrgosf3* | osf4* | osf5*) 4463d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4464ba064abeSmrg ;; 4465191cded7Smrg 4466ba064abeSmrgrdos*) 4467d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4468ba064abeSmrg ;; 4469191cded7Smrg 4470ba064abeSmrgsolaris*) 4471d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4472ba064abeSmrg ;; 4473191cded7Smrg 4474d9dcd5aeSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4475d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4476ba064abeSmrg ;; 4477191cded7Smrg 4478ba064abeSmrgsysv4 | sysv4.3*) 4479ba064abeSmrg case $host_vendor in 4480d9dcd5aeSmrg motorola) 4481d9dcd5aeSmrg 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]]' 4482d9dcd5aeSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4483d9dcd5aeSmrg ;; 4484d9dcd5aeSmrg ncr) 4485d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4486d9dcd5aeSmrg ;; 4487d9dcd5aeSmrg sequent) 4488d9dcd5aeSmrg lt_cv_file_magic_cmd='/bin/file' 4489d9dcd5aeSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4490d9dcd5aeSmrg ;; 4491d9dcd5aeSmrg sni) 4492d9dcd5aeSmrg lt_cv_file_magic_cmd='/bin/file' 4493d9dcd5aeSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4494d9dcd5aeSmrg lt_cv_file_magic_test_file=/lib/libc.so 4495d9dcd5aeSmrg ;; 4496d9dcd5aeSmrg siemens) 4497d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4498d9dcd5aeSmrg ;; 4499d9dcd5aeSmrg pc) 4500d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4501d9dcd5aeSmrg ;; 4502ba064abeSmrg esac 4503ba064abeSmrg ;; 4504191cded7Smrg 4505d9dcd5aeSmrgtpf*) 4506d9dcd5aeSmrg lt_cv_deplibs_check_method=pass_all 4507ba064abeSmrg ;; 4508d9dcd5aeSmrgesac 4509d9dcd5aeSmrg]) 4510191cded7Smrg 4511d9dcd5aeSmrgfile_magic_glob= 4512d9dcd5aeSmrgwant_nocaseglob=no 4513d9dcd5aeSmrgif test "$build" = "$host"; then 4514d9dcd5aeSmrg case $host_os in 4515d9dcd5aeSmrg mingw* | pw32*) 4516d9dcd5aeSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4517d9dcd5aeSmrg want_nocaseglob=yes 4518d9dcd5aeSmrg else 4519d9dcd5aeSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4520d9dcd5aeSmrg fi 4521d9dcd5aeSmrg ;; 4522d9dcd5aeSmrg esac 4523d9dcd5aeSmrgfi 4524d9dcd5aeSmrg 4525d9dcd5aeSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 4526d9dcd5aeSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 4527d9dcd5aeSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4528d9dcd5aeSmrg 4529d9dcd5aeSmrg_LT_DECL([], [deplibs_check_method], [1], 4530d9dcd5aeSmrg [Method to check whether dependent libraries are shared objects]) 4531d9dcd5aeSmrg_LT_DECL([], [file_magic_cmd], [1], 4532d9dcd5aeSmrg [Command to use when deplibs_check_method = "file_magic"]) 4533d9dcd5aeSmrg_LT_DECL([], [file_magic_glob], [1], 4534d9dcd5aeSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 4535d9dcd5aeSmrg_LT_DECL([], [want_nocaseglob], [1], 4536d9dcd5aeSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4537d9dcd5aeSmrg])# _LT_CHECK_MAGIC_METHOD 4538d9dcd5aeSmrg 4539d9dcd5aeSmrg 4540d9dcd5aeSmrg# LT_PATH_NM 4541d9dcd5aeSmrg# ---------- 4542d9dcd5aeSmrg# find the pathname to a BSD- or MS-compatible name lister 4543d9dcd5aeSmrgAC_DEFUN([LT_PATH_NM], 4544d9dcd5aeSmrg[AC_REQUIRE([AC_PROG_CC])dnl 4545d9dcd5aeSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4546d9dcd5aeSmrg[if test -n "$NM"; then 4547d9dcd5aeSmrg # Let the user override the test. 4548d9dcd5aeSmrg lt_cv_path_NM="$NM" 4549d9dcd5aeSmrgelse 4550d9dcd5aeSmrg lt_nm_to_check="${ac_tool_prefix}nm" 4551d9dcd5aeSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4552d9dcd5aeSmrg lt_nm_to_check="$lt_nm_to_check nm" 4553d9dcd5aeSmrg fi 4554d9dcd5aeSmrg for lt_tmp_nm in $lt_nm_to_check; do 4555d9dcd5aeSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4556d9dcd5aeSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4557d9dcd5aeSmrg IFS="$lt_save_ifs" 4558d9dcd5aeSmrg test -z "$ac_dir" && ac_dir=. 4559d9dcd5aeSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 4560d9dcd5aeSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4561d9dcd5aeSmrg # Check to see if the nm accepts a BSD-compat flag. 4562d9dcd5aeSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4563d9dcd5aeSmrg # nm: unknown option "B" ignored 4564d9dcd5aeSmrg # Tru64's nm complains that /dev/null is an invalid object file 4565d9dcd5aeSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4566d9dcd5aeSmrg */dev/null* | *'Invalid file or object type'*) 4567d9dcd5aeSmrg lt_cv_path_NM="$tmp_nm -B" 4568d9dcd5aeSmrg break 4569d9dcd5aeSmrg ;; 4570d9dcd5aeSmrg *) 4571d9dcd5aeSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4572d9dcd5aeSmrg */dev/null*) 4573d9dcd5aeSmrg lt_cv_path_NM="$tmp_nm -p" 4574d9dcd5aeSmrg break 4575d9dcd5aeSmrg ;; 4576d9dcd5aeSmrg *) 4577d9dcd5aeSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4578d9dcd5aeSmrg continue # so that we can try to find one that supports BSD flags 4579d9dcd5aeSmrg ;; 4580d9dcd5aeSmrg esac 4581d9dcd5aeSmrg ;; 4582d9dcd5aeSmrg esac 4583d9dcd5aeSmrg fi 4584d9dcd5aeSmrg done 4585d9dcd5aeSmrg IFS="$lt_save_ifs" 4586d9dcd5aeSmrg done 4587d9dcd5aeSmrg : ${lt_cv_path_NM=no} 4588d9dcd5aeSmrgfi]) 4589d9dcd5aeSmrgif test "$lt_cv_path_NM" != "no"; then 4590d9dcd5aeSmrg NM="$lt_cv_path_NM" 4591d9dcd5aeSmrgelse 4592d9dcd5aeSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 4593d9dcd5aeSmrg if test -n "$DUMPBIN"; then : 4594d9dcd5aeSmrg # Let the user override the test. 4595ba064abeSmrg else 4596d9dcd5aeSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 4597d9dcd5aeSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 4598d9dcd5aeSmrg *COFF*) 4599d9dcd5aeSmrg DUMPBIN="$DUMPBIN -symbols" 4600d9dcd5aeSmrg ;; 4601d9dcd5aeSmrg *) 4602d9dcd5aeSmrg DUMPBIN=: 4603d9dcd5aeSmrg ;; 4604ba064abeSmrg esac 4605ba064abeSmrg fi 4606d9dcd5aeSmrg AC_SUBST([DUMPBIN]) 4607d9dcd5aeSmrg if test "$DUMPBIN" != ":"; then 4608d9dcd5aeSmrg NM="$DUMPBIN" 4609d9dcd5aeSmrg fi 4610d9dcd5aeSmrgfi 4611d9dcd5aeSmrgtest -z "$NM" && NM=nm 4612d9dcd5aeSmrgAC_SUBST([NM]) 4613d9dcd5aeSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4614191cded7Smrg 4615d9dcd5aeSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4616d9dcd5aeSmrg [lt_cv_nm_interface="BSD nm" 4617d9dcd5aeSmrg echo "int some_variable = 0;" > conftest.$ac_ext 4618d9dcd5aeSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4619d9dcd5aeSmrg (eval "$ac_compile" 2>conftest.err) 4620d9dcd5aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4621d9dcd5aeSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4622d9dcd5aeSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4623d9dcd5aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4624d9dcd5aeSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4625d9dcd5aeSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 4626d9dcd5aeSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4627d9dcd5aeSmrg lt_cv_nm_interface="MS dumpbin" 4628d9dcd5aeSmrg fi 4629d9dcd5aeSmrg rm -f conftest*]) 4630d9dcd5aeSmrg])# LT_PATH_NM 4631191cded7Smrg 4632d9dcd5aeSmrg# Old names: 4633d9dcd5aeSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4634d9dcd5aeSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4635d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 4636d9dcd5aeSmrgdnl AC_DEFUN([AM_PROG_NM], []) 4637d9dcd5aeSmrgdnl AC_DEFUN([AC_PROG_NM], []) 4638d9dcd5aeSmrg 4639d9dcd5aeSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4640d9dcd5aeSmrg# -------------------------------- 4641d9dcd5aeSmrg# how to determine the name of the shared library 4642d9dcd5aeSmrg# associated with a specific link library. 4643d9dcd5aeSmrg# -- PORTME fill in with the dynamic library characteristics 4644d9dcd5aeSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4645d9dcd5aeSmrg[m4_require([_LT_DECL_EGREP]) 4646d9dcd5aeSmrgm4_require([_LT_DECL_OBJDUMP]) 4647d9dcd5aeSmrgm4_require([_LT_DECL_DLLTOOL]) 4648d9dcd5aeSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 4649d9dcd5aeSmrglt_cv_sharedlib_from_linklib_cmd, 4650d9dcd5aeSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4651191cded7Smrg 4652d9dcd5aeSmrgcase $host_os in 4653d9dcd5aeSmrgcygwin* | mingw* | pw32* | cegcc*) 4654d9dcd5aeSmrg # two different shell functions defined in ltmain.sh 4655d9dcd5aeSmrg # decide which to use based on capabilities of $DLLTOOL 4656d9dcd5aeSmrg case `$DLLTOOL --help 2>&1` in 4657d9dcd5aeSmrg *--identify-strict*) 4658d9dcd5aeSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4659d9dcd5aeSmrg ;; 4660d9dcd5aeSmrg *) 4661d9dcd5aeSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4662d9dcd5aeSmrg ;; 4663d9dcd5aeSmrg esac 4664d9dcd5aeSmrg ;; 4665ba064abeSmrg*) 4666d9dcd5aeSmrg # fallback: assume linklib IS sharedlib 4667d9dcd5aeSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4668ba064abeSmrg ;; 4669ba064abeSmrgesac 4670d9dcd5aeSmrg]) 4671d9dcd5aeSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4672d9dcd5aeSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4673191cded7Smrg 4674d9dcd5aeSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4675d9dcd5aeSmrg [Command to associate shared and link libraries]) 4676d9dcd5aeSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4677191cded7Smrg 4678191cded7Smrg 4679d9dcd5aeSmrg# _LT_PATH_MANIFEST_TOOL 4680d9dcd5aeSmrg# ---------------------- 4681d9dcd5aeSmrg# locate the manifest tool 4682d9dcd5aeSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 4683d9dcd5aeSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4684d9dcd5aeSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4685d9dcd5aeSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4686d9dcd5aeSmrg [lt_cv_path_mainfest_tool=no 4687d9dcd5aeSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4688d9dcd5aeSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4689d9dcd5aeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4690d9dcd5aeSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4691d9dcd5aeSmrg lt_cv_path_mainfest_tool=yes 4692d9dcd5aeSmrg fi 4693d9dcd5aeSmrg rm -f conftest*]) 4694d9dcd5aeSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 4695d9dcd5aeSmrg MANIFEST_TOOL=: 4696d9dcd5aeSmrgfi 4697d9dcd5aeSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4698d9dcd5aeSmrg])# _LT_PATH_MANIFEST_TOOL 4699191cded7Smrg 4700191cded7Smrg 4701d9dcd5aeSmrg# LT_LIB_M 4702d9dcd5aeSmrg# -------- 4703d9dcd5aeSmrg# check for math library 4704d9dcd5aeSmrgAC_DEFUN([LT_LIB_M], 4705d9dcd5aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4706d9dcd5aeSmrgLIBM= 4707d9dcd5aeSmrgcase $host in 4708d9dcd5aeSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4709d9dcd5aeSmrg # These system don't have libm, or don't need it 4710d9dcd5aeSmrg ;; 4711d9dcd5aeSmrg*-ncr-sysv4.3*) 4712d9dcd5aeSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4713d9dcd5aeSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4714ba064abeSmrg ;; 4715ba064abeSmrg*) 4716d9dcd5aeSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 4717ba064abeSmrg ;; 4718d9dcd5aeSmrgesac 4719d9dcd5aeSmrgAC_SUBST([LIBM]) 4720d9dcd5aeSmrg])# LT_LIB_M 4721ba064abeSmrg 4722ba064abeSmrg# Old name: 4723d9dcd5aeSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4724ba064abeSmrgdnl aclocal-1.4 backwards compatibility: 4725d9dcd5aeSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4726191cded7Smrg 4727191cded7Smrg 4728d9dcd5aeSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 4729d9dcd5aeSmrg# ------------------------------- 4730d9dcd5aeSmrgm4_defun([_LT_COMPILER_NO_RTTI], 4731d9dcd5aeSmrg[m4_require([_LT_TAG_COMPILER])dnl 4732191cded7Smrg 4733d9dcd5aeSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4734191cded7Smrg 4735ba064abeSmrgif test "$GCC" = yes; then 4736d9dcd5aeSmrg case $cc_basename in 4737d9dcd5aeSmrg nvcc*) 4738d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4739ba064abeSmrg *) 4740d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4741ba064abeSmrg esac 4742191cded7Smrg 4743d9dcd5aeSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4744d9dcd5aeSmrg lt_cv_prog_compiler_rtti_exceptions, 4745d9dcd5aeSmrg [-fno-rtti -fno-exceptions], [], 4746d9dcd5aeSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4747d9dcd5aeSmrgfi 4748d9dcd5aeSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4749d9dcd5aeSmrg [Compiler flag to turn off builtin functions]) 4750d9dcd5aeSmrg])# _LT_COMPILER_NO_RTTI 4751191cded7Smrg 4752ba064abeSmrg 4753d9dcd5aeSmrg# _LT_CMD_GLOBAL_SYMBOLS 4754d9dcd5aeSmrg# ---------------------- 4755d9dcd5aeSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4756d9dcd5aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4757d9dcd5aeSmrgAC_REQUIRE([AC_PROG_CC])dnl 4758d9dcd5aeSmrgAC_REQUIRE([AC_PROG_AWK])dnl 4759d9dcd5aeSmrgAC_REQUIRE([LT_PATH_NM])dnl 4760d9dcd5aeSmrgAC_REQUIRE([LT_PATH_LD])dnl 4761d9dcd5aeSmrgm4_require([_LT_DECL_SED])dnl 4762d9dcd5aeSmrgm4_require([_LT_DECL_EGREP])dnl 4763d9dcd5aeSmrgm4_require([_LT_TAG_COMPILER])dnl 4764ba064abeSmrg 4765d9dcd5aeSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4766d9dcd5aeSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4767d9dcd5aeSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4768d9dcd5aeSmrg[ 4769d9dcd5aeSmrg# These are sane defaults that work on at least a few old systems. 4770d9dcd5aeSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4771191cded7Smrg 4772d9dcd5aeSmrg# Character class describing NM global symbol codes. 4773d9dcd5aeSmrgsymcode='[[BCDEGRST]]' 4774191cded7Smrg 4775d9dcd5aeSmrg# Regexp to match symbols that can be accessed directly from C. 4776d9dcd5aeSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4777191cded7Smrg 4778d9dcd5aeSmrg# Define system-specific variables. 4779ba064abeSmrgcase $host_os in 4780d9dcd5aeSmrgaix*) 4781d9dcd5aeSmrg symcode='[[BCDT]]' 4782ba064abeSmrg ;; 4783d9dcd5aeSmrgcygwin* | mingw* | pw32* | cegcc*) 4784d9dcd5aeSmrg symcode='[[ABCDGISTW]]' 4785ba064abeSmrg ;; 4786d9dcd5aeSmrghpux*) 4787d9dcd5aeSmrg if test "$host_cpu" = ia64; then 4788d9dcd5aeSmrg symcode='[[ABCDEGRST]]' 4789191cded7Smrg fi 4790ba064abeSmrg ;; 4791d9dcd5aeSmrgirix* | nonstopux*) 4792d9dcd5aeSmrg symcode='[[BCDEGRST]]' 4793ba064abeSmrg ;; 4794d9dcd5aeSmrgosf*) 4795d9dcd5aeSmrg symcode='[[BCDEGQRST]]' 4796ba064abeSmrg ;; 4797d9dcd5aeSmrgsolaris*) 4798d9dcd5aeSmrg symcode='[[BDRT]]' 4799191cded7Smrg ;; 4800d9dcd5aeSmrgsco3.2v5*) 4801d9dcd5aeSmrg symcode='[[DT]]' 4802ba064abeSmrg ;; 4803d9dcd5aeSmrgsysv4.2uw2*) 4804d9dcd5aeSmrg symcode='[[DT]]' 4805ba064abeSmrg ;; 4806d9dcd5aeSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4807d9dcd5aeSmrg symcode='[[ABDT]]' 4808ba064abeSmrg ;; 4809d9dcd5aeSmrgsysv4) 4810d9dcd5aeSmrg symcode='[[DFNSTU]]' 4811ba064abeSmrg ;; 4812d9dcd5aeSmrgesac 4813191cded7Smrg 4814d9dcd5aeSmrg# If we're using GNU nm, then use its standard symbol codes. 4815d9dcd5aeSmrgcase `$NM -V 2>&1` in 4816d9dcd5aeSmrg*GNU* | *'with BFD'*) 4817d9dcd5aeSmrg symcode='[[ABCDGIRSTW]]' ;; 4818d9dcd5aeSmrgesac 4819191cded7Smrg 4820d9dcd5aeSmrg# Transform an extracted symbol line into a proper C declaration. 4821d9dcd5aeSmrg# Some systems (esp. on ia64) link data and code symbols differently, 4822d9dcd5aeSmrg# so use this general approach. 4823d9dcd5aeSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4824191cded7Smrg 4825d9dcd5aeSmrg# Transform an extracted symbol line into symbol name and symbol address 4826d9dcd5aeSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4827d9dcd5aeSmrglt_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'" 4828191cded7Smrg 4829d9dcd5aeSmrg# Handle CRLF in mingw tool chain 4830d9dcd5aeSmrgopt_cr= 4831d9dcd5aeSmrgcase $build_os in 4832d9dcd5aeSmrgmingw*) 4833d9dcd5aeSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4834ba064abeSmrg ;; 4835d9dcd5aeSmrgesac 4836191cded7Smrg 4837d9dcd5aeSmrg# Try without a prefix underscore, then with it. 4838d9dcd5aeSmrgfor ac_symprfx in "" "_"; do 4839191cded7Smrg 4840d9dcd5aeSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4841d9dcd5aeSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4842d9dcd5aeSmrg 4843d9dcd5aeSmrg # Write the raw and C identifiers. 4844d9dcd5aeSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4845d9dcd5aeSmrg # Fake it for dumpbin and say T for any non-static function 4846d9dcd5aeSmrg # and D for any global variable. 4847d9dcd5aeSmrg # Also find C++ and __fastcall symbols from MSVC++, 4848d9dcd5aeSmrg # which start with @ or ?. 4849d9dcd5aeSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4850d9dcd5aeSmrg" {last_section=section; section=\$ 3};"\ 4851d9dcd5aeSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4852d9dcd5aeSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4853d9dcd5aeSmrg" \$ 0!~/External *\|/{next};"\ 4854d9dcd5aeSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4855d9dcd5aeSmrg" {if(hide[section]) next};"\ 4856d9dcd5aeSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4857d9dcd5aeSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4858d9dcd5aeSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4859d9dcd5aeSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4860d9dcd5aeSmrg" ' prfx=^$ac_symprfx]" 4861ba064abeSmrg else 4862d9dcd5aeSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4863ba064abeSmrg fi 4864d9dcd5aeSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4865b290cf36Smrg 4866d9dcd5aeSmrg # Check to see that the pipe works correctly. 4867d9dcd5aeSmrg pipe_works=no 4868b290cf36Smrg 4869d9dcd5aeSmrg rm -f conftest* 4870d9dcd5aeSmrg cat > conftest.$ac_ext <<_LT_EOF 4871d9dcd5aeSmrg#ifdef __cplusplus 4872d9dcd5aeSmrgextern "C" { 4873d9dcd5aeSmrg#endif 4874d9dcd5aeSmrgchar nm_test_var; 4875d9dcd5aeSmrgvoid nm_test_func(void); 4876d9dcd5aeSmrgvoid nm_test_func(void){} 4877d9dcd5aeSmrg#ifdef __cplusplus 4878d9dcd5aeSmrg} 4879d9dcd5aeSmrg#endif 4880d9dcd5aeSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4881d9dcd5aeSmrg_LT_EOF 4882191cded7Smrg 4883d9dcd5aeSmrg if AC_TRY_EVAL(ac_compile); then 4884d9dcd5aeSmrg # Now try to grab the symbols. 4885d9dcd5aeSmrg nlist=conftest.nm 4886d9dcd5aeSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4887d9dcd5aeSmrg # Try sorting and uniquifying the output. 4888d9dcd5aeSmrg if sort "$nlist" | uniq > "$nlist"T; then 4889d9dcd5aeSmrg mv -f "$nlist"T "$nlist" 4890d9dcd5aeSmrg else 4891d9dcd5aeSmrg rm -f "$nlist"T 4892d9dcd5aeSmrg fi 4893ba064abeSmrg 4894d9dcd5aeSmrg # Make sure that we snagged all the symbols we need. 4895d9dcd5aeSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4896d9dcd5aeSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4897d9dcd5aeSmrg cat <<_LT_EOF > conftest.$ac_ext 4898d9dcd5aeSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4899d9dcd5aeSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4900d9dcd5aeSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 4901d9dcd5aeSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4902d9dcd5aeSmrg# define LT@&t@_DLSYM_CONST 4903d9dcd5aeSmrg#elif defined(__osf__) 4904d9dcd5aeSmrg/* This system does not cope well with relocations in const data. */ 4905d9dcd5aeSmrg# define LT@&t@_DLSYM_CONST 4906d9dcd5aeSmrg#else 4907d9dcd5aeSmrg# define LT@&t@_DLSYM_CONST const 4908d9dcd5aeSmrg#endif 4909191cded7Smrg 4910d9dcd5aeSmrg#ifdef __cplusplus 4911d9dcd5aeSmrgextern "C" { 4912d9dcd5aeSmrg#endif 4913191cded7Smrg 4914d9dcd5aeSmrg_LT_EOF 4915d9dcd5aeSmrg # Now generate the symbol file. 4916d9dcd5aeSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4917191cded7Smrg 4918d9dcd5aeSmrg cat <<_LT_EOF >> conftest.$ac_ext 4919191cded7Smrg 4920d9dcd5aeSmrg/* The mapping between symbol names and symbols. */ 4921d9dcd5aeSmrgLT@&t@_DLSYM_CONST struct { 4922d9dcd5aeSmrg const char *name; 4923d9dcd5aeSmrg void *address; 4924d9dcd5aeSmrg} 4925d9dcd5aeSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4926d9dcd5aeSmrg{ 4927d9dcd5aeSmrg { "@PROGRAM@", (void *) 0 }, 4928d9dcd5aeSmrg_LT_EOF 4929d9dcd5aeSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4930d9dcd5aeSmrg cat <<\_LT_EOF >> conftest.$ac_ext 4931d9dcd5aeSmrg {0, (void *) 0} 4932d9dcd5aeSmrg}; 4933d9dcd5aeSmrg 4934d9dcd5aeSmrg/* This works around a problem in FreeBSD linker */ 4935d9dcd5aeSmrg#ifdef FREEBSD_WORKAROUND 4936d9dcd5aeSmrgstatic const void *lt_preloaded_setup() { 4937d9dcd5aeSmrg return lt__PROGRAM__LTX_preloaded_symbols; 4938d9dcd5aeSmrg} 4939d9dcd5aeSmrg#endif 4940d9dcd5aeSmrg 4941d9dcd5aeSmrg#ifdef __cplusplus 4942d9dcd5aeSmrg} 4943d9dcd5aeSmrg#endif 4944d9dcd5aeSmrg_LT_EOF 4945d9dcd5aeSmrg # Now try linking the two files. 4946d9dcd5aeSmrg mv conftest.$ac_objext conftstm.$ac_objext 4947d9dcd5aeSmrg lt_globsym_save_LIBS=$LIBS 4948d9dcd5aeSmrg lt_globsym_save_CFLAGS=$CFLAGS 4949d9dcd5aeSmrg LIBS="conftstm.$ac_objext" 4950d9dcd5aeSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4951d9dcd5aeSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4952d9dcd5aeSmrg pipe_works=yes 4953d9dcd5aeSmrg fi 4954d9dcd5aeSmrg LIBS=$lt_globsym_save_LIBS 4955d9dcd5aeSmrg CFLAGS=$lt_globsym_save_CFLAGS 4956d9dcd5aeSmrg else 4957d9dcd5aeSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4958d9dcd5aeSmrg fi 4959d9dcd5aeSmrg else 4960d9dcd5aeSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4961ba064abeSmrg fi 4962d9dcd5aeSmrg else 4963d9dcd5aeSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4964d9dcd5aeSmrg fi 4965ba064abeSmrg else 4966d9dcd5aeSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4967d9dcd5aeSmrg cat conftest.$ac_ext >&5 4968ba064abeSmrg fi 4969d9dcd5aeSmrg rm -rf conftest* conftst* 4970d9dcd5aeSmrg 4971d9dcd5aeSmrg # Do not use the global_symbol_pipe unless it works. 4972d9dcd5aeSmrg if test "$pipe_works" = yes; then 4973d9dcd5aeSmrg break 4974d9dcd5aeSmrg else 4975d9dcd5aeSmrg lt_cv_sys_global_symbol_pipe= 4976ba064abeSmrg fi 4977d9dcd5aeSmrgdone 4978d9dcd5aeSmrg]) 4979d9dcd5aeSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4980d9dcd5aeSmrg lt_cv_sys_global_symbol_to_cdecl= 4981d9dcd5aeSmrgfi 4982d9dcd5aeSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4983d9dcd5aeSmrg AC_MSG_RESULT(failed) 4984d9dcd5aeSmrgelse 4985d9dcd5aeSmrg AC_MSG_RESULT(ok) 4986b290cf36Smrgfi 4987ba064abeSmrg 4988d9dcd5aeSmrg# Response file support. 4989d9dcd5aeSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4990d9dcd5aeSmrg nm_file_list_spec='@' 4991d9dcd5aeSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4992d9dcd5aeSmrg nm_file_list_spec='@' 4993d9dcd5aeSmrgfi 4994b290cf36Smrg 4995d9dcd5aeSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4996d9dcd5aeSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 4997d9dcd5aeSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4998d9dcd5aeSmrg [Transform the output of nm in a proper C declaration]) 4999d9dcd5aeSmrg_LT_DECL([global_symbol_to_c_name_address], 5000d9dcd5aeSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 5001d9dcd5aeSmrg [Transform the output of nm in a C name address pair]) 5002d9dcd5aeSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 5003d9dcd5aeSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 5004d9dcd5aeSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 5005d9dcd5aeSmrg_LT_DECL([], [nm_file_list_spec], [1], 5006d9dcd5aeSmrg [Specify filename containing input files for $NM]) 5007d9dcd5aeSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 5008b290cf36Smrg 5009b290cf36Smrg 5010d9dcd5aeSmrg# _LT_COMPILER_PIC([TAGNAME]) 5011d9dcd5aeSmrg# --------------------------- 5012d9dcd5aeSmrgm4_defun([_LT_COMPILER_PIC], 5013ba064abeSmrg[m4_require([_LT_TAG_COMPILER])dnl 5014d9dcd5aeSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 5015d9dcd5aeSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5016d9dcd5aeSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 5017b290cf36Smrg 5018d9dcd5aeSmrgm4_if([$1], [CXX], [ 5019d9dcd5aeSmrg # C++ specific cases for pic, static, wl, etc. 5020d9dcd5aeSmrg if test "$GXX" = yes; then 5021d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5022d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5023b290cf36Smrg 5024d9dcd5aeSmrg case $host_os in 5025d9dcd5aeSmrg aix*) 5026d9dcd5aeSmrg # All AIX code is PIC. 5027d9dcd5aeSmrg if test "$host_cpu" = ia64; then 5028d9dcd5aeSmrg # AIX 5 now supports IA64 processor 5029d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5030ba064abeSmrg fi 5031d9dcd5aeSmrg ;; 5032b290cf36Smrg 5033d9dcd5aeSmrg amigaos*) 5034d9dcd5aeSmrg case $host_cpu in 5035d9dcd5aeSmrg powerpc) 5036d9dcd5aeSmrg # see comment about AmigaOS4 .so support 5037d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5038d9dcd5aeSmrg ;; 5039d9dcd5aeSmrg m68k) 5040d9dcd5aeSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5041d9dcd5aeSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5042d9dcd5aeSmrg # like `-m68040'. 5043d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5044d9dcd5aeSmrg ;; 5045d9dcd5aeSmrg esac 5046d9dcd5aeSmrg ;; 5047b290cf36Smrg 5048ba064abeSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5049ba064abeSmrg # PIC is the default for these OSes. 5050ba064abeSmrg ;; 5051ba064abeSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 5052ba064abeSmrg # This hack is so that the source file can tell whether it is being 5053ba064abeSmrg # built for inclusion in a dll (and should export symbols for example). 5054ba064abeSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5055ba064abeSmrg # (--disable-auto-import) libraries 5056ba064abeSmrg m4_if([$1], [GCJ], [], 5057ba064abeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5058ba064abeSmrg ;; 5059ba064abeSmrg darwin* | rhapsody*) 5060ba064abeSmrg # PIC is the default on this platform 5061ba064abeSmrg # Common symbols not allowed in MH_DYLIB files 5062ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5063ba064abeSmrg ;; 5064ba064abeSmrg *djgpp*) 5065ba064abeSmrg # DJGPP does not support shared libraries at all 5066ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5067ba064abeSmrg ;; 5068ba064abeSmrg haiku*) 5069ba064abeSmrg # PIC is the default for Haiku. 5070ba064abeSmrg # The "-static" flag exists, but is broken. 5071ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 5072ba064abeSmrg ;; 5073ba064abeSmrg interix[[3-9]]*) 5074ba064abeSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5075ba064abeSmrg # Instead, we relocate shared libraries at runtime. 5076ba064abeSmrg ;; 5077ba064abeSmrg sysv4*MP*) 5078ba064abeSmrg if test -d /usr/nec; then 5079ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5080ba064abeSmrg fi 5081ba064abeSmrg ;; 5082ba064abeSmrg hpux*) 5083ba064abeSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5084ba064abeSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5085ba064abeSmrg # sets the default TLS model and affects inlining. 5086ba064abeSmrg case $host_cpu in 5087ba064abeSmrg hppa*64*) 5088191cded7Smrg ;; 5089ba064abeSmrg *) 5090ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5091ba064abeSmrg ;; 5092ba064abeSmrg esac 5093ba064abeSmrg ;; 5094ba064abeSmrg *qnx* | *nto*) 5095ba064abeSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5096ba064abeSmrg # it will coredump. 5097ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5098ba064abeSmrg ;; 5099ba064abeSmrg *) 5100ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5101ba064abeSmrg ;; 5102ba064abeSmrg esac 5103ba064abeSmrg else 5104ba064abeSmrg case $host_os in 5105ba064abeSmrg aix[[4-9]]*) 5106ba064abeSmrg # All AIX code is PIC. 5107ba064abeSmrg if test "$host_cpu" = ia64; then 5108ba064abeSmrg # AIX 5 now supports IA64 processor 5109ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5110ba064abeSmrg else 5111ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5112ba064abeSmrg fi 5113ba064abeSmrg ;; 5114ba064abeSmrg chorus*) 5115ba064abeSmrg case $cc_basename in 5116ba064abeSmrg cxch68*) 5117ba064abeSmrg # Green Hills C++ Compiler 5118ba064abeSmrg # _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" 5119ba064abeSmrg ;; 5120ba064abeSmrg esac 5121ba064abeSmrg ;; 5122d9dcd5aeSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 5123d9dcd5aeSmrg # This hack is so that the source file can tell whether it is being 5124d9dcd5aeSmrg # built for inclusion in a dll (and should export symbols for example). 5125d9dcd5aeSmrg m4_if([$1], [GCJ], [], 5126d9dcd5aeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5127d9dcd5aeSmrg ;; 5128ba064abeSmrg dgux*) 5129ba064abeSmrg case $cc_basename in 5130ba064abeSmrg ec++*) 5131ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5132191cded7Smrg ;; 5133ba064abeSmrg ghcx*) 5134ba064abeSmrg # Green Hills C++ Compiler 5135ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5136191cded7Smrg ;; 5137ba064abeSmrg *) 5138191cded7Smrg ;; 5139ba064abeSmrg esac 5140ba064abeSmrg ;; 5141ba064abeSmrg freebsd* | dragonfly*) 5142ba064abeSmrg # FreeBSD uses GNU C++ 5143ba064abeSmrg ;; 5144ba064abeSmrg hpux9* | hpux10* | hpux11*) 5145ba064abeSmrg case $cc_basename in 5146ba064abeSmrg CC*) 5147ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5148ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5149ba064abeSmrg if test "$host_cpu" != ia64; then 5150ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5151ba064abeSmrg fi 5152191cded7Smrg ;; 5153ba064abeSmrg aCC*) 5154ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5155ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5156ba064abeSmrg case $host_cpu in 5157ba064abeSmrg hppa*64*|ia64*) 5158ba064abeSmrg # +Z the default 5159b290cf36Smrg ;; 5160ba064abeSmrg *) 5161ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5162b290cf36Smrg ;; 5163b290cf36Smrg esac 5164ba064abeSmrg ;; 5165ba064abeSmrg *) 5166ba064abeSmrg ;; 5167ba064abeSmrg esac 5168ba064abeSmrg ;; 5169ba064abeSmrg interix*) 5170ba064abeSmrg # This is c89, which is MS Visual C++ (no shared libs) 5171ba064abeSmrg # Anyone wants to do a port? 5172ba064abeSmrg ;; 5173ba064abeSmrg irix5* | irix6* | nonstopux*) 5174ba064abeSmrg case $cc_basename in 5175ba064abeSmrg CC*) 5176ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5177ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5178ba064abeSmrg # CC pic flag -KPIC is the default. 5179ba064abeSmrg ;; 5180ba064abeSmrg *) 5181ba064abeSmrg ;; 5182ba064abeSmrg esac 5183ba064abeSmrg ;; 5184ba064abeSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5185ba064abeSmrg case $cc_basename in 5186ba064abeSmrg KCC*) 5187ba064abeSmrg # KAI C++ Compiler 5188ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5189ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5190ba064abeSmrg ;; 5191ba064abeSmrg ecpc* ) 5192ba064abeSmrg # old Intel C++ for x86_64 which still supported -KPIC. 5193ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5194ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5195ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5196ba064abeSmrg ;; 5197ba064abeSmrg icpc* ) 5198ba064abeSmrg # Intel C++, used to be incompatible with GCC. 5199ba064abeSmrg # ICC 10 doesn't accept -KPIC any more. 5200ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5201ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5202ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5203ba064abeSmrg ;; 5204ba064abeSmrg pgCC* | pgcpp*) 5205ba064abeSmrg # Portland Group C++ compiler 5206ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5207ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5208ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5209ba064abeSmrg ;; 5210191cded7Smrg cxx*) 5211191cded7Smrg # Compaq C++ 5212ba064abeSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5213ba064abeSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5214ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5215ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5216b290cf36Smrg ;; 5217ba064abeSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5218ba064abeSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 5219ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5220ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5221ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5222191cded7Smrg ;; 5223191cded7Smrg *) 5224b290cf36Smrg case `$CC -V 2>&1 | sed 5q` in 5225b290cf36Smrg *Sun\ C*) 5226b290cf36Smrg # Sun C++ 5.9 5227ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5228ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5229ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5230b290cf36Smrg ;; 5231b290cf36Smrg esac 5232191cded7Smrg ;; 5233191cded7Smrg esac 5234191cded7Smrg ;; 5235ba064abeSmrg lynxos*) 5236ba064abeSmrg ;; 5237ba064abeSmrg m88k*) 5238ba064abeSmrg ;; 5239ba064abeSmrg mvs*) 5240ba064abeSmrg case $cc_basename in 5241ba064abeSmrg cxx*) 5242ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5243ba064abeSmrg ;; 5244ba064abeSmrg *) 5245ba064abeSmrg ;; 5246ba064abeSmrg esac 5247ba064abeSmrg ;; 5248ba064abeSmrg netbsd*) 5249ba064abeSmrg ;; 5250ba064abeSmrg *qnx* | *nto*) 5251ba064abeSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5252ba064abeSmrg # it will coredump. 5253ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5254ba064abeSmrg ;; 5255ba064abeSmrg osf3* | osf4* | osf5*) 5256ba064abeSmrg case $cc_basename in 5257ba064abeSmrg KCC*) 5258ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5259ba064abeSmrg ;; 5260ba064abeSmrg RCC*) 5261ba064abeSmrg # Rational C++ 2.4.1 5262ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5263ba064abeSmrg ;; 5264ba064abeSmrg cxx*) 5265ba064abeSmrg # Digital/Compaq C++ 5266ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5267ba064abeSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5268ba064abeSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5269ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5270ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5271ba064abeSmrg ;; 5272ba064abeSmrg *) 5273ba064abeSmrg ;; 5274ba064abeSmrg esac 5275ba064abeSmrg ;; 5276ba064abeSmrg psos*) 5277191cded7Smrg ;; 5278ba064abeSmrg solaris*) 5279ba064abeSmrg case $cc_basename in 5280ba064abeSmrg CC* | sunCC*) 5281ba064abeSmrg # Sun C++ 4.2, 5.x and Centerline C++ 5282ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5283ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5284ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5285ba064abeSmrg ;; 5286ba064abeSmrg gcx*) 5287ba064abeSmrg # Green Hills C++ Compiler 5288ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5289ba064abeSmrg ;; 5290ba064abeSmrg *) 5291ba064abeSmrg ;; 5292ba064abeSmrg esac 5293191cded7Smrg ;; 5294ba064abeSmrg sunos4*) 5295ba064abeSmrg case $cc_basename in 5296ba064abeSmrg CC*) 5297ba064abeSmrg # Sun C++ 4.x 5298ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5299ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5300ba064abeSmrg ;; 5301ba064abeSmrg lcc*) 5302ba064abeSmrg # Lucid 5303ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5304191cded7Smrg ;; 5305191cded7Smrg *) 5306191cded7Smrg ;; 5307191cded7Smrg esac 5308191cded7Smrg ;; 5309ba064abeSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5310ba064abeSmrg case $cc_basename in 5311ba064abeSmrg CC*) 5312ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5313ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5314ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5315ba064abeSmrg ;; 5316ba064abeSmrg esac 5317b290cf36Smrg ;; 5318ba064abeSmrg tandem*) 5319ba064abeSmrg case $cc_basename in 5320ba064abeSmrg NCC*) 5321ba064abeSmrg # NonStop-UX NCC 3.20 5322ba064abeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5323ba064abeSmrg ;; 5324ba064abeSmrg *) 5325ba064abeSmrg ;; 5326ba064abeSmrg esac 5327b290cf36Smrg ;; 5328ba064abeSmrg vxworks*) 5329b290cf36Smrg ;; 5330d9dcd5aeSmrg *) 5331d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5332d9dcd5aeSmrg ;; 5333d9dcd5aeSmrg esac 5334d9dcd5aeSmrg fi 5335d9dcd5aeSmrg], 5336d9dcd5aeSmrg[ 5337d9dcd5aeSmrg if test "$GCC" = yes; then 5338d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5339d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5340d9dcd5aeSmrg 5341d9dcd5aeSmrg case $host_os in 5342d9dcd5aeSmrg aix*) 5343d9dcd5aeSmrg # All AIX code is PIC. 5344d9dcd5aeSmrg if test "$host_cpu" = ia64; then 5345d9dcd5aeSmrg # AIX 5 now supports IA64 processor 5346d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5347d9dcd5aeSmrg fi 5348d9dcd5aeSmrg ;; 5349d9dcd5aeSmrg 5350d9dcd5aeSmrg amigaos*) 5351d9dcd5aeSmrg case $host_cpu in 5352d9dcd5aeSmrg powerpc) 5353d9dcd5aeSmrg # see comment about AmigaOS4 .so support 5354d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5355d9dcd5aeSmrg ;; 5356d9dcd5aeSmrg m68k) 5357d9dcd5aeSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5358d9dcd5aeSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5359d9dcd5aeSmrg # like `-m68040'. 5360d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5361d9dcd5aeSmrg ;; 5362d9dcd5aeSmrg esac 5363d9dcd5aeSmrg ;; 5364d9dcd5aeSmrg 5365d9dcd5aeSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5366d9dcd5aeSmrg # PIC is the default for these OSes. 5367d9dcd5aeSmrg ;; 5368d9dcd5aeSmrg 5369d9dcd5aeSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 5370d9dcd5aeSmrg # This hack is so that the source file can tell whether it is being 5371d9dcd5aeSmrg # built for inclusion in a dll (and should export symbols for example). 5372d9dcd5aeSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5373d9dcd5aeSmrg # (--disable-auto-import) libraries 5374d9dcd5aeSmrg m4_if([$1], [GCJ], [], 5375d9dcd5aeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5376d9dcd5aeSmrg ;; 5377d9dcd5aeSmrg 5378d9dcd5aeSmrg darwin* | rhapsody*) 5379d9dcd5aeSmrg # PIC is the default on this platform 5380d9dcd5aeSmrg # Common symbols not allowed in MH_DYLIB files 5381d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5382d9dcd5aeSmrg ;; 5383d9dcd5aeSmrg 5384d9dcd5aeSmrg haiku*) 5385d9dcd5aeSmrg # PIC is the default for Haiku. 5386d9dcd5aeSmrg # The "-static" flag exists, but is broken. 5387d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 5388d9dcd5aeSmrg ;; 5389d9dcd5aeSmrg 5390d9dcd5aeSmrg hpux*) 5391d9dcd5aeSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5392d9dcd5aeSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5393d9dcd5aeSmrg # sets the default TLS model and affects inlining. 5394d9dcd5aeSmrg case $host_cpu in 5395d9dcd5aeSmrg hppa*64*) 5396d9dcd5aeSmrg # +Z the default 5397d9dcd5aeSmrg ;; 5398d9dcd5aeSmrg *) 5399d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5400d9dcd5aeSmrg ;; 5401d9dcd5aeSmrg esac 5402d9dcd5aeSmrg ;; 5403d9dcd5aeSmrg 5404d9dcd5aeSmrg interix[[3-9]]*) 5405d9dcd5aeSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5406d9dcd5aeSmrg # Instead, we relocate shared libraries at runtime. 5407d9dcd5aeSmrg ;; 5408d9dcd5aeSmrg 5409d9dcd5aeSmrg msdosdjgpp*) 5410d9dcd5aeSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5411d9dcd5aeSmrg # on systems that don't support them. 5412d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5413d9dcd5aeSmrg enable_shared=no 5414d9dcd5aeSmrg ;; 5415d9dcd5aeSmrg 5416d9dcd5aeSmrg *nto* | *qnx*) 5417d9dcd5aeSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5418d9dcd5aeSmrg # it will coredump. 5419d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5420d9dcd5aeSmrg ;; 5421d9dcd5aeSmrg 5422d9dcd5aeSmrg sysv4*MP*) 5423d9dcd5aeSmrg if test -d /usr/nec; then 5424d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5425d9dcd5aeSmrg fi 5426d9dcd5aeSmrg ;; 5427d9dcd5aeSmrg 5428d9dcd5aeSmrg *) 5429d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5430d9dcd5aeSmrg ;; 5431d9dcd5aeSmrg esac 5432d9dcd5aeSmrg 5433d9dcd5aeSmrg case $cc_basename in 5434d9dcd5aeSmrg nvcc*) # Cuda Compiler Driver 2.2 5435d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5436d9dcd5aeSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5437d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5438d9dcd5aeSmrg fi 5439d9dcd5aeSmrg ;; 5440d9dcd5aeSmrg esac 5441d9dcd5aeSmrg else 5442d9dcd5aeSmrg # PORTME Check for flag to pass linker flags through the system compiler. 5443d9dcd5aeSmrg case $host_os in 5444d9dcd5aeSmrg aix*) 5445d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5446d9dcd5aeSmrg if test "$host_cpu" = ia64; then 5447d9dcd5aeSmrg # AIX 5 now supports IA64 processor 5448d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5449d9dcd5aeSmrg else 5450d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5451d9dcd5aeSmrg fi 5452d9dcd5aeSmrg ;; 5453d9dcd5aeSmrg 5454d9dcd5aeSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 5455d9dcd5aeSmrg # This hack is so that the source file can tell whether it is being 5456d9dcd5aeSmrg # built for inclusion in a dll (and should export symbols for example). 5457d9dcd5aeSmrg m4_if([$1], [GCJ], [], 5458d9dcd5aeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5459d9dcd5aeSmrg ;; 5460d9dcd5aeSmrg 5461d9dcd5aeSmrg hpux9* | hpux10* | hpux11*) 5462d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5463d9dcd5aeSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5464d9dcd5aeSmrg # not for PA HP-UX. 5465d9dcd5aeSmrg case $host_cpu in 5466d9dcd5aeSmrg hppa*64*|ia64*) 5467d9dcd5aeSmrg # +Z the default 5468d9dcd5aeSmrg ;; 5469d9dcd5aeSmrg *) 5470d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5471d9dcd5aeSmrg ;; 5472d9dcd5aeSmrg esac 5473d9dcd5aeSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5474d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5475d9dcd5aeSmrg ;; 5476d9dcd5aeSmrg 5477d9dcd5aeSmrg irix5* | irix6* | nonstopux*) 5478d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5479d9dcd5aeSmrg # PIC (with -KPIC) is the default. 5480d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5481d9dcd5aeSmrg ;; 5482d9dcd5aeSmrg 5483d9dcd5aeSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5484d9dcd5aeSmrg case $cc_basename in 5485d9dcd5aeSmrg # old Intel for x86_64 which still supported -KPIC. 5486d9dcd5aeSmrg ecc*) 5487d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5488d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5489d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5490d9dcd5aeSmrg ;; 5491d9dcd5aeSmrg # icc used to be incompatible with GCC. 5492d9dcd5aeSmrg # ICC 10 doesn't accept -KPIC any more. 5493d9dcd5aeSmrg icc* | ifort*) 5494d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5495d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5496d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5497d9dcd5aeSmrg ;; 5498d9dcd5aeSmrg # Lahey Fortran 8.1. 5499d9dcd5aeSmrg lf95*) 5500d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5501d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5502d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5503d9dcd5aeSmrg ;; 5504d9dcd5aeSmrg nagfor*) 5505d9dcd5aeSmrg # NAG Fortran compiler 5506d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5507d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5508d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5509d9dcd5aeSmrg ;; 5510d9dcd5aeSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5511d9dcd5aeSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 5512d9dcd5aeSmrg # which looks to be a dead project) 5513d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5514d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5515d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5516d9dcd5aeSmrg ;; 5517d9dcd5aeSmrg ccc*) 5518d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5519d9dcd5aeSmrg # All Alpha code is PIC. 5520d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5521d9dcd5aeSmrg ;; 5522d9dcd5aeSmrg xl* | bgxl* | bgf* | mpixl*) 5523d9dcd5aeSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5524d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5525d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5526d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5527d9dcd5aeSmrg ;; 5528d9dcd5aeSmrg *) 5529d9dcd5aeSmrg case `$CC -V 2>&1 | sed 5q` in 5530d9dcd5aeSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5531d9dcd5aeSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 5532d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5533d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5534d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5535d9dcd5aeSmrg ;; 5536d9dcd5aeSmrg *Sun\ F* | *Sun*Fortran*) 5537d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5538d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5539d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5540d9dcd5aeSmrg ;; 5541d9dcd5aeSmrg *Sun\ C*) 5542d9dcd5aeSmrg # Sun C 5.9 5543d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5544d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5545d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5546d9dcd5aeSmrg ;; 5547d9dcd5aeSmrg *Intel*\ [[CF]]*Compiler*) 5548d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5549d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5550d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5551d9dcd5aeSmrg ;; 5552d9dcd5aeSmrg *Portland\ Group*) 5553d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5554d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5555d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5556d9dcd5aeSmrg ;; 5557d9dcd5aeSmrg esac 5558d9dcd5aeSmrg ;; 5559d9dcd5aeSmrg esac 5560d9dcd5aeSmrg ;; 5561d9dcd5aeSmrg 5562d9dcd5aeSmrg newsos6) 5563d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5564d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5565d9dcd5aeSmrg ;; 5566d9dcd5aeSmrg 5567d9dcd5aeSmrg *nto* | *qnx*) 5568d9dcd5aeSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5569d9dcd5aeSmrg # it will coredump. 5570d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5571d9dcd5aeSmrg ;; 5572d9dcd5aeSmrg 5573d9dcd5aeSmrg osf3* | osf4* | osf5*) 5574d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5575d9dcd5aeSmrg # All OSF/1 code is PIC. 5576d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5577d9dcd5aeSmrg ;; 5578d9dcd5aeSmrg 5579d9dcd5aeSmrg rdos*) 5580d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5581d9dcd5aeSmrg ;; 5582d9dcd5aeSmrg 5583d9dcd5aeSmrg solaris*) 5584d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5585d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5586d9dcd5aeSmrg case $cc_basename in 5587d9dcd5aeSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5588d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5589d9dcd5aeSmrg *) 5590d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5591d9dcd5aeSmrg esac 5592d9dcd5aeSmrg ;; 5593d9dcd5aeSmrg 5594d9dcd5aeSmrg sunos4*) 5595d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5596d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5597d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5598d9dcd5aeSmrg ;; 5599d9dcd5aeSmrg 5600d9dcd5aeSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 5601d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5602d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5603d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5604d9dcd5aeSmrg ;; 5605d9dcd5aeSmrg 5606d9dcd5aeSmrg sysv4*MP*) 5607d9dcd5aeSmrg if test -d /usr/nec ;then 5608d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5609d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5610d9dcd5aeSmrg fi 5611d9dcd5aeSmrg ;; 5612d9dcd5aeSmrg 5613d9dcd5aeSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5614d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5615d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5616d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5617d9dcd5aeSmrg ;; 5618d9dcd5aeSmrg 5619d9dcd5aeSmrg unicos*) 5620d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5621d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5622d9dcd5aeSmrg ;; 5623d9dcd5aeSmrg 5624d9dcd5aeSmrg uts4*) 5625d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5626d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5627d9dcd5aeSmrg ;; 5628d9dcd5aeSmrg 5629d9dcd5aeSmrg *) 5630d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5631d9dcd5aeSmrg ;; 5632d9dcd5aeSmrg esac 5633d9dcd5aeSmrg fi 5634d9dcd5aeSmrg]) 5635d9dcd5aeSmrgcase $host_os in 5636d9dcd5aeSmrg # For platforms which do not support PIC, -DPIC is meaningless: 5637d9dcd5aeSmrg *djgpp*) 5638d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5639d9dcd5aeSmrg ;; 5640d9dcd5aeSmrg *) 5641d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5642d9dcd5aeSmrg ;; 5643d9dcd5aeSmrgesac 5644d9dcd5aeSmrg 5645d9dcd5aeSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 5646d9dcd5aeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5647d9dcd5aeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5648d9dcd5aeSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5649d9dcd5aeSmrg 5650d9dcd5aeSmrg# 5651d9dcd5aeSmrg# Check to make sure the PIC flag actually works. 5652d9dcd5aeSmrg# 5653d9dcd5aeSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5654d9dcd5aeSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5655d9dcd5aeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5656d9dcd5aeSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5657d9dcd5aeSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5658d9dcd5aeSmrg "" | " "*) ;; 5659d9dcd5aeSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5660d9dcd5aeSmrg esac], 5661d9dcd5aeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5662d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5663d9dcd5aeSmrgfi 5664d9dcd5aeSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5665d9dcd5aeSmrg [Additional compiler flags for building library objects]) 5666d9dcd5aeSmrg 5667d9dcd5aeSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5668d9dcd5aeSmrg [How to pass a linker flag through the compiler]) 5669d9dcd5aeSmrg# 5670d9dcd5aeSmrg# Check to make sure the static flag actually works. 5671d9dcd5aeSmrg# 5672d9dcd5aeSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5673d9dcd5aeSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5674d9dcd5aeSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5675d9dcd5aeSmrg $lt_tmp_static_flag, 5676d9dcd5aeSmrg [], 5677d9dcd5aeSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5678d9dcd5aeSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5679d9dcd5aeSmrg [Compiler flag to prevent dynamic linking]) 5680d9dcd5aeSmrg])# _LT_COMPILER_PIC 5681d9dcd5aeSmrg 5682d9dcd5aeSmrg 5683d9dcd5aeSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 5684d9dcd5aeSmrg# ---------------------------- 5685d9dcd5aeSmrg# See if the linker supports building shared libraries. 5686d9dcd5aeSmrgm4_defun([_LT_LINKER_SHLIBS], 5687d9dcd5aeSmrg[AC_REQUIRE([LT_PATH_LD])dnl 5688d9dcd5aeSmrgAC_REQUIRE([LT_PATH_NM])dnl 5689d9dcd5aeSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5690d9dcd5aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5691d9dcd5aeSmrgm4_require([_LT_DECL_EGREP])dnl 5692d9dcd5aeSmrgm4_require([_LT_DECL_SED])dnl 5693d9dcd5aeSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5694d9dcd5aeSmrgm4_require([_LT_TAG_COMPILER])dnl 5695d9dcd5aeSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5696d9dcd5aeSmrgm4_if([$1], [CXX], [ 5697d9dcd5aeSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5698d9dcd5aeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5699d9dcd5aeSmrg case $host_os in 5700d9dcd5aeSmrg aix[[4-9]]*) 5701d9dcd5aeSmrg # If we're using GNU nm, then we don't want the "-C" option. 5702d9dcd5aeSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5703d9dcd5aeSmrg # Also, AIX nm treats weak defined symbols like other global defined 5704d9dcd5aeSmrg # symbols, whereas GNU nm marks them as "W". 5705d9dcd5aeSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5706d9dcd5aeSmrg _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' 5707d9dcd5aeSmrg else 5708d9dcd5aeSmrg _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' 5709d9dcd5aeSmrg fi 5710d9dcd5aeSmrg ;; 5711d9dcd5aeSmrg pw32*) 5712d9dcd5aeSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5713d9dcd5aeSmrg ;; 5714d9dcd5aeSmrg cygwin* | mingw* | cegcc*) 5715d9dcd5aeSmrg case $cc_basename in 5716d9dcd5aeSmrg cl*) 5717d9dcd5aeSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5718d9dcd5aeSmrg ;; 5719d9dcd5aeSmrg *) 5720d9dcd5aeSmrg _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' 5721d9dcd5aeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5722d9dcd5aeSmrg ;; 5723d9dcd5aeSmrg esac 5724d9dcd5aeSmrg ;; 5725d9dcd5aeSmrg *) 5726d9dcd5aeSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5727d9dcd5aeSmrg ;; 5728d9dcd5aeSmrg esac 5729d9dcd5aeSmrg], [ 5730d9dcd5aeSmrg runpath_var= 5731d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5732d9dcd5aeSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5733d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)= 5734d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 5735d9dcd5aeSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 5736d9dcd5aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5737d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5738d9dcd5aeSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5739d9dcd5aeSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 5740d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5741d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5742d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5743d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5744d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 5745d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5746d9dcd5aeSmrg _LT_TAGVAR(inherit_rpath, $1)=no 5747d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 5748d9dcd5aeSmrg _LT_TAGVAR(module_cmds, $1)= 5749d9dcd5aeSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 5750d9dcd5aeSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5751d9dcd5aeSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5752d9dcd5aeSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 5753d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5754d9dcd5aeSmrg # include_expsyms should be a list of space-separated symbols to be *always* 5755d9dcd5aeSmrg # included in the symbol list 5756d9dcd5aeSmrg _LT_TAGVAR(include_expsyms, $1)= 5757d9dcd5aeSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5758d9dcd5aeSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5759d9dcd5aeSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5760d9dcd5aeSmrg # as well as any symbol that contains `d'. 5761d9dcd5aeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5762d9dcd5aeSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5763d9dcd5aeSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 5764d9dcd5aeSmrg # the symbol is explicitly referenced. Since portable code cannot 5765d9dcd5aeSmrg # rely on this symbol name, it's probably fine to never include it in 5766d9dcd5aeSmrg # preloaded symbol tables. 5767d9dcd5aeSmrg # Exclude shared library initialization/finalization symbols. 5768d9dcd5aeSmrgdnl Note also adjust exclude_expsyms for C++ above. 5769d9dcd5aeSmrg extract_expsyms_cmds= 5770d9dcd5aeSmrg 5771d9dcd5aeSmrg case $host_os in 5772d9dcd5aeSmrg cygwin* | mingw* | pw32* | cegcc*) 5773d9dcd5aeSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5774d9dcd5aeSmrg # When not using gcc, we currently assume that we are using 5775d9dcd5aeSmrg # Microsoft Visual C++. 5776d9dcd5aeSmrg if test "$GCC" != yes; then 5777d9dcd5aeSmrg with_gnu_ld=no 5778d9dcd5aeSmrg fi 5779d9dcd5aeSmrg ;; 5780d9dcd5aeSmrg interix*) 5781d9dcd5aeSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5782d9dcd5aeSmrg with_gnu_ld=yes 5783d9dcd5aeSmrg ;; 5784d9dcd5aeSmrg openbsd*) 5785d9dcd5aeSmrg with_gnu_ld=no 5786d9dcd5aeSmrg ;; 5787d9dcd5aeSmrg esac 5788d9dcd5aeSmrg 5789d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5790d9dcd5aeSmrg 5791d9dcd5aeSmrg # On some targets, GNU ld is compatible enough with the native linker 5792d9dcd5aeSmrg # that we're better off using the native interface for both. 5793d9dcd5aeSmrg lt_use_gnu_ld_interface=no 5794d9dcd5aeSmrg if test "$with_gnu_ld" = yes; then 5795d9dcd5aeSmrg case $host_os in 5796d9dcd5aeSmrg aix*) 5797d9dcd5aeSmrg # The AIX port of GNU ld has always aspired to compatibility 5798d9dcd5aeSmrg # with the native linker. However, as the warning in the GNU ld 5799d9dcd5aeSmrg # block says, versions before 2.19.5* couldn't really create working 5800d9dcd5aeSmrg # shared libraries, regardless of the interface used. 5801d9dcd5aeSmrg case `$LD -v 2>&1` in 5802d9dcd5aeSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5803d9dcd5aeSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5804d9dcd5aeSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5805d9dcd5aeSmrg *) 5806d9dcd5aeSmrg lt_use_gnu_ld_interface=yes 5807d9dcd5aeSmrg ;; 5808d9dcd5aeSmrg esac 5809d9dcd5aeSmrg ;; 5810d9dcd5aeSmrg *) 5811d9dcd5aeSmrg lt_use_gnu_ld_interface=yes 5812d9dcd5aeSmrg ;; 5813d9dcd5aeSmrg esac 5814d9dcd5aeSmrg fi 5815d9dcd5aeSmrg 5816d9dcd5aeSmrg if test "$lt_use_gnu_ld_interface" = yes; then 5817d9dcd5aeSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5818d9dcd5aeSmrg wlarc='${wl}' 5819d9dcd5aeSmrg 5820d9dcd5aeSmrg # Set some defaults for GNU ld with shared library support. These 5821d9dcd5aeSmrg # are reset later if shared libraries are not supported. Putting them 5822d9dcd5aeSmrg # here allows them to be overridden if necessary. 5823d9dcd5aeSmrg runpath_var=LD_RUN_PATH 5824d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5825d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5826d9dcd5aeSmrg # ancient GNU ld didn't support --whole-archive et. al. 5827d9dcd5aeSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5828d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5829d9dcd5aeSmrg else 5830d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5831d9dcd5aeSmrg fi 5832d9dcd5aeSmrg supports_anon_versioning=no 5833d9dcd5aeSmrg case `$LD -v 2>&1` in 5834d9dcd5aeSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 5835d9dcd5aeSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5836d9dcd5aeSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5837d9dcd5aeSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5838d9dcd5aeSmrg *\ 2.11.*) ;; # other 2.11 versions 5839d9dcd5aeSmrg *) supports_anon_versioning=yes ;; 5840d9dcd5aeSmrg esac 5841d9dcd5aeSmrg 5842d9dcd5aeSmrg # See if GNU ld supports shared libraries. 5843d9dcd5aeSmrg case $host_os in 5844d9dcd5aeSmrg aix[[3-9]]*) 5845d9dcd5aeSmrg # On AIX/PPC, the GNU linker is very broken 5846d9dcd5aeSmrg if test "$host_cpu" != ia64; then 5847d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5848d9dcd5aeSmrg cat <<_LT_EOF 1>&2 5849d9dcd5aeSmrg 5850d9dcd5aeSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5851d9dcd5aeSmrg*** to be unable to reliably create shared libraries on AIX. 5852d9dcd5aeSmrg*** Therefore, libtool is disabling shared libraries support. If you 5853d9dcd5aeSmrg*** really care for shared libraries, you may want to install binutils 5854d9dcd5aeSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5855d9dcd5aeSmrg*** You will then need to restart the configuration process. 5856d9dcd5aeSmrg 5857d9dcd5aeSmrg_LT_EOF 5858d9dcd5aeSmrg fi 5859d9dcd5aeSmrg ;; 5860d9dcd5aeSmrg 5861d9dcd5aeSmrg amigaos*) 5862d9dcd5aeSmrg case $host_cpu in 5863d9dcd5aeSmrg powerpc) 5864d9dcd5aeSmrg # see comment about AmigaOS4 .so support 5865d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5866d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5867d9dcd5aeSmrg ;; 5868d9dcd5aeSmrg m68k) 5869d9dcd5aeSmrg _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)' 5870d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5871d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5872d9dcd5aeSmrg ;; 5873d9dcd5aeSmrg esac 5874d9dcd5aeSmrg ;; 5875d9dcd5aeSmrg 5876d9dcd5aeSmrg beos*) 5877d9dcd5aeSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5878d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5879d9dcd5aeSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5880d9dcd5aeSmrg # support --undefined. This deserves some investigation. FIXME 5881d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5882d9dcd5aeSmrg else 5883d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5884d9dcd5aeSmrg fi 5885d9dcd5aeSmrg ;; 5886d9dcd5aeSmrg 5887d9dcd5aeSmrg cygwin* | mingw* | pw32* | cegcc*) 5888d9dcd5aeSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5889d9dcd5aeSmrg # as there is no search path for DLLs. 5890d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5891d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5892d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5893d9dcd5aeSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5894d9dcd5aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5895d9dcd5aeSmrg _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' 5896d9dcd5aeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5897d9dcd5aeSmrg 5898d9dcd5aeSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5899d9dcd5aeSmrg _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' 5900d9dcd5aeSmrg # If the export-symbols file already is a .def file (1st line 5901d9dcd5aeSmrg # is EXPORTS), use it as is; otherwise, prepend... 5902d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5903d9dcd5aeSmrg cp $export_symbols $output_objdir/$soname.def; 5904d9dcd5aeSmrg else 5905d9dcd5aeSmrg echo EXPORTS > $output_objdir/$soname.def; 5906d9dcd5aeSmrg cat $export_symbols >> $output_objdir/$soname.def; 5907d9dcd5aeSmrg fi~ 5908d9dcd5aeSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5909d9dcd5aeSmrg else 5910d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5911d9dcd5aeSmrg fi 5912d9dcd5aeSmrg ;; 5913d9dcd5aeSmrg 5914d9dcd5aeSmrg haiku*) 5915d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5916d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5917d9dcd5aeSmrg ;; 5918d9dcd5aeSmrg 5919d9dcd5aeSmrg interix[[3-9]]*) 5920d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5921d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5922d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5923d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5924d9dcd5aeSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5925d9dcd5aeSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5926d9dcd5aeSmrg # default) and relocated if they conflict, which is a slow very memory 5927d9dcd5aeSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5928d9dcd5aeSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5929d9dcd5aeSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5930d9dcd5aeSmrg _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' 5931d9dcd5aeSmrg _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' 5932d9dcd5aeSmrg ;; 5933d9dcd5aeSmrg 5934d9dcd5aeSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5935d9dcd5aeSmrg tmp_diet=no 5936d9dcd5aeSmrg if test "$host_os" = linux-dietlibc; then 5937d9dcd5aeSmrg case $cc_basename in 5938d9dcd5aeSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5939d9dcd5aeSmrg esac 5940d9dcd5aeSmrg fi 5941d9dcd5aeSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5942d9dcd5aeSmrg && test "$tmp_diet" = no 5943d9dcd5aeSmrg then 5944d9dcd5aeSmrg tmp_addflag=' $pic_flag' 5945d9dcd5aeSmrg tmp_sharedflag='-shared' 5946d9dcd5aeSmrg case $cc_basename,$host_cpu in 5947d9dcd5aeSmrg pgcc*) # Portland Group C compiler 5948d9dcd5aeSmrg _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' 5949d9dcd5aeSmrg tmp_addflag=' $pic_flag' 5950d9dcd5aeSmrg ;; 5951d9dcd5aeSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 5952d9dcd5aeSmrg # Portland Group f77 and f90 compilers 5953d9dcd5aeSmrg _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' 5954d9dcd5aeSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5955d9dcd5aeSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5956d9dcd5aeSmrg tmp_addflag=' -i_dynamic' ;; 5957d9dcd5aeSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5958d9dcd5aeSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5959d9dcd5aeSmrg ifc* | ifort*) # Intel Fortran compiler 5960d9dcd5aeSmrg tmp_addflag=' -nofor_main' ;; 5961d9dcd5aeSmrg lf95*) # Lahey Fortran 8.1 5962d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5963d9dcd5aeSmrg tmp_sharedflag='--shared' ;; 5964d9dcd5aeSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5965d9dcd5aeSmrg tmp_sharedflag='-qmkshrobj' 5966d9dcd5aeSmrg tmp_addflag= ;; 5967d9dcd5aeSmrg nvcc*) # Cuda Compiler Driver 2.2 5968d9dcd5aeSmrg _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' 5969d9dcd5aeSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5970d9dcd5aeSmrg ;; 5971d9dcd5aeSmrg esac 5972d9dcd5aeSmrg case `$CC -V 2>&1 | sed 5q` in 5973d9dcd5aeSmrg *Sun\ C*) # Sun C 5.9 5974d9dcd5aeSmrg _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' 5975d9dcd5aeSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5976d9dcd5aeSmrg tmp_sharedflag='-G' ;; 5977d9dcd5aeSmrg *Sun\ F*) # Sun Fortran 8.3 5978d9dcd5aeSmrg tmp_sharedflag='-G' ;; 5979d9dcd5aeSmrg esac 5980d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5981d9dcd5aeSmrg 5982d9dcd5aeSmrg if test "x$supports_anon_versioning" = xyes; then 5983d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5984d9dcd5aeSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5985d9dcd5aeSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5986d9dcd5aeSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5987d9dcd5aeSmrg fi 5988d9dcd5aeSmrg 5989d9dcd5aeSmrg case $cc_basename in 5990d9dcd5aeSmrg xlf* | bgf* | bgxlf* | mpixlf*) 5991d9dcd5aeSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5992d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5993d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5994d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5995d9dcd5aeSmrg if test "x$supports_anon_versioning" = xyes; then 5996d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5997d9dcd5aeSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5998d9dcd5aeSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5999d9dcd5aeSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 6000d9dcd5aeSmrg fi 6001d9dcd5aeSmrg ;; 6002d9dcd5aeSmrg esac 6003d9dcd5aeSmrg else 6004d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6005d9dcd5aeSmrg fi 6006d9dcd5aeSmrg ;; 6007d9dcd5aeSmrg 6008d9dcd5aeSmrg netbsd*) 6009d9dcd5aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6010d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6011d9dcd5aeSmrg wlarc= 6012d9dcd5aeSmrg else 6013d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6014d9dcd5aeSmrg _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' 6015d9dcd5aeSmrg fi 6016d9dcd5aeSmrg ;; 6017d9dcd5aeSmrg 6018d9dcd5aeSmrg solaris*) 6019d9dcd5aeSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 6020d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6021d9dcd5aeSmrg cat <<_LT_EOF 1>&2 6022d9dcd5aeSmrg 6023d9dcd5aeSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6024d9dcd5aeSmrg*** create shared libraries on Solaris systems. Therefore, libtool 6025d9dcd5aeSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 6026d9dcd5aeSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 6027d9dcd5aeSmrg*** your PATH or compiler configuration so that the native linker is 6028d9dcd5aeSmrg*** used, and then restart. 6029d9dcd5aeSmrg 6030d9dcd5aeSmrg_LT_EOF 6031d9dcd5aeSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6032d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6033d9dcd5aeSmrg _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' 6034d9dcd5aeSmrg else 6035d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6036d9dcd5aeSmrg fi 6037d9dcd5aeSmrg ;; 6038d9dcd5aeSmrg 6039d9dcd5aeSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6040d9dcd5aeSmrg case `$LD -v 2>&1` in 6041d9dcd5aeSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6042d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6043d9dcd5aeSmrg cat <<_LT_EOF 1>&2 6044d9dcd5aeSmrg 6045d9dcd5aeSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6046d9dcd5aeSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 6047d9dcd5aeSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 6048d9dcd5aeSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6049d9dcd5aeSmrg*** your PATH or compiler configuration so that the native linker is 6050d9dcd5aeSmrg*** used, and then restart. 6051d9dcd5aeSmrg 6052d9dcd5aeSmrg_LT_EOF 6053d9dcd5aeSmrg ;; 6054d9dcd5aeSmrg *) 6055d9dcd5aeSmrg # For security reasons, it is highly recommended that you always 6056d9dcd5aeSmrg # use absolute paths for naming shared libraries, and exclude the 6057d9dcd5aeSmrg # DT_RUNPATH tag from executables and libraries. But doing so 6058d9dcd5aeSmrg # requires that you compile everything twice, which is a pain. 6059d9dcd5aeSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6060d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6061d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6062d9dcd5aeSmrg _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' 6063d9dcd5aeSmrg else 6064d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6065d9dcd5aeSmrg fi 6066d9dcd5aeSmrg ;; 6067d9dcd5aeSmrg esac 6068d9dcd5aeSmrg ;; 6069d9dcd5aeSmrg 6070d9dcd5aeSmrg sunos4*) 6071d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6072d9dcd5aeSmrg wlarc= 6073d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6074d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6075d9dcd5aeSmrg ;; 6076d9dcd5aeSmrg 6077d9dcd5aeSmrg *) 6078d9dcd5aeSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6079d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6080d9dcd5aeSmrg _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' 6081d9dcd5aeSmrg else 6082d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6083d9dcd5aeSmrg fi 6084d9dcd5aeSmrg ;; 6085d9dcd5aeSmrg esac 6086d9dcd5aeSmrg 6087d9dcd5aeSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6088d9dcd5aeSmrg runpath_var= 6089d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6090d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6091d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6092d9dcd5aeSmrg fi 6093d9dcd5aeSmrg else 6094d9dcd5aeSmrg # PORTME fill in a description of your system's linker (not GNU ld) 6095d9dcd5aeSmrg case $host_os in 6096d9dcd5aeSmrg aix3*) 6097d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6098d9dcd5aeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6099d9dcd5aeSmrg _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' 6100d9dcd5aeSmrg # Note: this linker hardcodes the directories in LIBPATH if there 6101d9dcd5aeSmrg # are no directories specified by -L. 6102d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6103d9dcd5aeSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6104d9dcd5aeSmrg # Neither direct hardcoding nor static linking is supported with a 6105d9dcd5aeSmrg # broken collect2. 6106d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6107d9dcd5aeSmrg fi 6108d9dcd5aeSmrg ;; 6109d9dcd5aeSmrg 6110d9dcd5aeSmrg aix[[4-9]]*) 6111d9dcd5aeSmrg if test "$host_cpu" = ia64; then 6112d9dcd5aeSmrg # On IA64, the linker does run time linking by default, so we don't 6113d9dcd5aeSmrg # have to do anything special. 6114d9dcd5aeSmrg aix_use_runtimelinking=no 6115d9dcd5aeSmrg exp_sym_flag='-Bexport' 6116d9dcd5aeSmrg no_entry_flag="" 6117d9dcd5aeSmrg else 6118d9dcd5aeSmrg # If we're using GNU nm, then we don't want the "-C" option. 6119d9dcd5aeSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6120d9dcd5aeSmrg # Also, AIX nm treats weak defined symbols like other global 6121d9dcd5aeSmrg # defined symbols, whereas GNU nm marks them as "W". 6122d9dcd5aeSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6123d9dcd5aeSmrg _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' 6124d9dcd5aeSmrg else 6125d9dcd5aeSmrg _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' 6126d9dcd5aeSmrg fi 6127d9dcd5aeSmrg aix_use_runtimelinking=no 6128d9dcd5aeSmrg 6129d9dcd5aeSmrg # Test if we are trying to use run time linking or normal 6130d9dcd5aeSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6131d9dcd5aeSmrg # need to do runtime linking. 6132d9dcd5aeSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6133d9dcd5aeSmrg for ld_flag in $LDFLAGS; do 6134d9dcd5aeSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6135d9dcd5aeSmrg aix_use_runtimelinking=yes 6136d9dcd5aeSmrg break 6137d9dcd5aeSmrg fi 6138d9dcd5aeSmrg done 6139d9dcd5aeSmrg ;; 6140d9dcd5aeSmrg esac 6141d9dcd5aeSmrg 6142d9dcd5aeSmrg exp_sym_flag='-bexport' 6143d9dcd5aeSmrg no_entry_flag='-bnoentry' 6144d9dcd5aeSmrg fi 6145d9dcd5aeSmrg 6146d9dcd5aeSmrg # When large executables or shared objects are built, AIX ld can 6147d9dcd5aeSmrg # have problems creating the table of contents. If linking a library 6148d9dcd5aeSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6149d9dcd5aeSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6150d9dcd5aeSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6151d9dcd5aeSmrg 6152d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='' 6153d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6154d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6155d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6156d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6157d9dcd5aeSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6158d9dcd5aeSmrg 6159d9dcd5aeSmrg if test "$GCC" = yes; then 6160d9dcd5aeSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6161d9dcd5aeSmrg # We only want to do this on AIX 4.2 and lower, the check 6162d9dcd5aeSmrg # below for broken collect2 doesn't work under 4.3+ 6163d9dcd5aeSmrg collect2name=`${CC} -print-prog-name=collect2` 6164d9dcd5aeSmrg if test -f "$collect2name" && 6165d9dcd5aeSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6166d9dcd5aeSmrg then 6167d9dcd5aeSmrg # We have reworked collect2 6168d9dcd5aeSmrg : 6169d9dcd5aeSmrg else 6170d9dcd5aeSmrg # We have old collect2 6171d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6172d9dcd5aeSmrg # It fails to find uninstalled libraries when the uninstalled 6173d9dcd5aeSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6174d9dcd5aeSmrg # to unsupported forces relinking 6175d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6176d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6177d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6178d9dcd5aeSmrg fi 6179d9dcd5aeSmrg ;; 6180d9dcd5aeSmrg esac 6181d9dcd5aeSmrg shared_flag='-shared' 6182d9dcd5aeSmrg if test "$aix_use_runtimelinking" = yes; then 6183d9dcd5aeSmrg shared_flag="$shared_flag "'${wl}-G' 6184d9dcd5aeSmrg fi 6185d9dcd5aeSmrg else 6186d9dcd5aeSmrg # not using gcc 6187d9dcd5aeSmrg if test "$host_cpu" = ia64; then 6188d9dcd5aeSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6189d9dcd5aeSmrg # chokes on -Wl,-G. The following line is correct: 6190d9dcd5aeSmrg shared_flag='-G' 6191d9dcd5aeSmrg else 6192d9dcd5aeSmrg if test "$aix_use_runtimelinking" = yes; then 6193d9dcd5aeSmrg shared_flag='${wl}-G' 6194d9dcd5aeSmrg else 6195d9dcd5aeSmrg shared_flag='${wl}-bM:SRE' 6196d9dcd5aeSmrg fi 6197d9dcd5aeSmrg fi 6198d9dcd5aeSmrg fi 6199d9dcd5aeSmrg 6200d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6201d9dcd5aeSmrg # It seems that -bexpall does not export symbols beginning with 6202d9dcd5aeSmrg # underscore (_), so it is better to generate a list of symbols to export. 6203d9dcd5aeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6204d9dcd5aeSmrg if test "$aix_use_runtimelinking" = yes; then 6205d9dcd5aeSmrg # Warning - without using the other runtime loading flags (-brtl), 6206d9dcd5aeSmrg # -berok will link without error, but may produce a broken library. 6207d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6208d9dcd5aeSmrg # Determine the default libpath from the value encoded in an 6209d9dcd5aeSmrg # empty executable. 6210d9dcd5aeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6211d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6212d9dcd5aeSmrg _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" 6213d9dcd5aeSmrg else 6214d9dcd5aeSmrg if test "$host_cpu" = ia64; then 6215d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6216d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6217d9dcd5aeSmrg _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" 6218d9dcd5aeSmrg else 6219d9dcd5aeSmrg # Determine the default libpath from the value encoded in an 6220d9dcd5aeSmrg # empty executable. 6221d9dcd5aeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6222d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6223d9dcd5aeSmrg # Warning - without using the other run time loading flags, 6224d9dcd5aeSmrg # -berok will link without error, but may produce a broken library. 6225d9dcd5aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6226d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6227d9dcd5aeSmrg if test "$with_gnu_ld" = yes; then 6228d9dcd5aeSmrg # We only use this code for GNU lds that support --whole-archive. 6229d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6230d9dcd5aeSmrg else 6231d9dcd5aeSmrg # Exported symbols can be pulled into shared objects from archives 6232d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6233d9dcd5aeSmrg fi 6234d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6235d9dcd5aeSmrg # This is similar to how AIX traditionally builds its shared libraries. 6236d9dcd5aeSmrg _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' 6237d9dcd5aeSmrg fi 6238d9dcd5aeSmrg fi 6239d9dcd5aeSmrg ;; 6240d9dcd5aeSmrg 6241d9dcd5aeSmrg amigaos*) 6242d9dcd5aeSmrg case $host_cpu in 6243d9dcd5aeSmrg powerpc) 6244d9dcd5aeSmrg # see comment about AmigaOS4 .so support 6245d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6246d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6247d9dcd5aeSmrg ;; 6248d9dcd5aeSmrg m68k) 6249d9dcd5aeSmrg _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)' 6250d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6251d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6252d9dcd5aeSmrg ;; 6253d9dcd5aeSmrg esac 6254d9dcd5aeSmrg ;; 6255d9dcd5aeSmrg 6256d9dcd5aeSmrg bsdi[[45]]*) 6257d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6258d9dcd5aeSmrg ;; 6259d9dcd5aeSmrg 6260d9dcd5aeSmrg cygwin* | mingw* | pw32* | cegcc*) 6261d9dcd5aeSmrg # When not using gcc, we currently assume that we are using 6262d9dcd5aeSmrg # Microsoft Visual C++. 6263d9dcd5aeSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6264d9dcd5aeSmrg # no search path for DLLs. 6265d9dcd5aeSmrg case $cc_basename in 6266d9dcd5aeSmrg cl*) 6267d9dcd5aeSmrg # Native MSVC 6268d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6269d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6270d9dcd5aeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6271d9dcd5aeSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6272d9dcd5aeSmrg # Tell ltmain to make .lib files, not .a files. 6273d9dcd5aeSmrg libext=lib 6274d9dcd5aeSmrg # Tell ltmain to make .dll files, not .so files. 6275d9dcd5aeSmrg shrext_cmds=".dll" 6276d9dcd5aeSmrg # FIXME: Setting linknames here is a bad hack. 6277d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6278d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6279d9dcd5aeSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6280d9dcd5aeSmrg else 6281d9dcd5aeSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6282d9dcd5aeSmrg fi~ 6283d9dcd5aeSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6284d9dcd5aeSmrg linknames=' 6285d9dcd5aeSmrg # The linker will not automatically build a static lib if we build a DLL. 6286d9dcd5aeSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6287d9dcd5aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6288d9dcd5aeSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 6289d9dcd5aeSmrg _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' 6290d9dcd5aeSmrg # Don't use ranlib 6291d9dcd5aeSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6292d9dcd5aeSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6293d9dcd5aeSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6294d9dcd5aeSmrg case $lt_outputfile in 6295d9dcd5aeSmrg *.exe|*.EXE) ;; 6296d9dcd5aeSmrg *) 6297d9dcd5aeSmrg lt_outputfile="$lt_outputfile.exe" 6298d9dcd5aeSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6299d9dcd5aeSmrg ;; 6300d9dcd5aeSmrg esac~ 6301d9dcd5aeSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6302d9dcd5aeSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6303d9dcd5aeSmrg $RM "$lt_outputfile.manifest"; 6304d9dcd5aeSmrg fi' 6305d9dcd5aeSmrg ;; 6306d9dcd5aeSmrg *) 6307d9dcd5aeSmrg # Assume MSVC wrapper 6308d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6309d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6310d9dcd5aeSmrg # Tell ltmain to make .lib files, not .a files. 6311d9dcd5aeSmrg libext=lib 6312d9dcd5aeSmrg # Tell ltmain to make .dll files, not .so files. 6313d9dcd5aeSmrg shrext_cmds=".dll" 6314d9dcd5aeSmrg # FIXME: Setting linknames here is a bad hack. 6315d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6316d9dcd5aeSmrg # The linker will automatically build a .lib file if we build a DLL. 6317d9dcd5aeSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6318d9dcd5aeSmrg # FIXME: Should let the user specify the lib program. 6319d9dcd5aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6320d9dcd5aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6321d9dcd5aeSmrg ;; 6322d9dcd5aeSmrg esac 6323d9dcd5aeSmrg ;; 6324d9dcd5aeSmrg 6325d9dcd5aeSmrg darwin* | rhapsody*) 6326d9dcd5aeSmrg _LT_DARWIN_LINKER_FEATURES($1) 6327d9dcd5aeSmrg ;; 6328d9dcd5aeSmrg 6329d9dcd5aeSmrg dgux*) 6330d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6331d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6332d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6333d9dcd5aeSmrg ;; 6334d9dcd5aeSmrg 6335d9dcd5aeSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6336d9dcd5aeSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 6337d9dcd5aeSmrg # does not break anything, and helps significantly (at the cost of a little 6338d9dcd5aeSmrg # extra space). 6339d9dcd5aeSmrg freebsd2.2*) 6340d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6341d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6342d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6343d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6344d9dcd5aeSmrg ;; 6345d9dcd5aeSmrg 6346d9dcd5aeSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6347d9dcd5aeSmrg freebsd2.*) 6348d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6349d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6350d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6351d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6352d9dcd5aeSmrg ;; 6353d9dcd5aeSmrg 6354d9dcd5aeSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6355d9dcd5aeSmrg freebsd* | dragonfly*) 6356d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6357d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6358d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6359d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6360d9dcd5aeSmrg ;; 6361d9dcd5aeSmrg 6362d9dcd5aeSmrg hpux9*) 6363d9dcd5aeSmrg if test "$GCC" = yes; then 6364d9dcd5aeSmrg _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' 6365d9dcd5aeSmrg else 6366d9dcd5aeSmrg _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' 6367d9dcd5aeSmrg fi 6368d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6369d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6370d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6371d9dcd5aeSmrg 6372d9dcd5aeSmrg # hardcode_minus_L: Not really in the search PATH, 6373d9dcd5aeSmrg # but as the default location of the library. 6374d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6375d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6376d9dcd5aeSmrg ;; 6377d9dcd5aeSmrg 6378d9dcd5aeSmrg hpux10*) 6379d9dcd5aeSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6380d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6381d9dcd5aeSmrg else 6382d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6383d9dcd5aeSmrg fi 6384d9dcd5aeSmrg if test "$with_gnu_ld" = no; then 6385d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6386d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6387d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6388d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6389d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6390d9dcd5aeSmrg # hardcode_minus_L: Not really in the search PATH, 6391d9dcd5aeSmrg # but as the default location of the library. 6392d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6393d9dcd5aeSmrg fi 6394d9dcd5aeSmrg ;; 6395d9dcd5aeSmrg 6396d9dcd5aeSmrg hpux11*) 6397d9dcd5aeSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6398d9dcd5aeSmrg case $host_cpu in 6399d9dcd5aeSmrg hppa*64*) 6400d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6401d9dcd5aeSmrg ;; 6402d9dcd5aeSmrg ia64*) 6403d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6404d9dcd5aeSmrg ;; 6405d9dcd5aeSmrg *) 6406d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6407d9dcd5aeSmrg ;; 6408d9dcd5aeSmrg esac 6409d9dcd5aeSmrg else 6410d9dcd5aeSmrg case $host_cpu in 6411d9dcd5aeSmrg hppa*64*) 6412d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6413d9dcd5aeSmrg ;; 6414d9dcd5aeSmrg ia64*) 6415d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6416d9dcd5aeSmrg ;; 6417d9dcd5aeSmrg *) 6418d9dcd5aeSmrg m4_if($1, [], [ 6419d9dcd5aeSmrg # Older versions of the 11.00 compiler do not understand -b yet 6420d9dcd5aeSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 6421d9dcd5aeSmrg _LT_LINKER_OPTION([if $CC understands -b], 6422d9dcd5aeSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 6423d9dcd5aeSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 6424d9dcd5aeSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 6425d9dcd5aeSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6426d9dcd5aeSmrg ;; 6427d9dcd5aeSmrg esac 6428d9dcd5aeSmrg fi 6429d9dcd5aeSmrg if test "$with_gnu_ld" = no; then 6430d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6431d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6432d9dcd5aeSmrg 6433d9dcd5aeSmrg case $host_cpu in 6434d9dcd5aeSmrg hppa*64*|ia64*) 6435d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6436d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6437d9dcd5aeSmrg ;; 6438d9dcd5aeSmrg *) 6439d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6440d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6441d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6442d9dcd5aeSmrg 6443d9dcd5aeSmrg # hardcode_minus_L: Not really in the search PATH, 6444d9dcd5aeSmrg # but as the default location of the library. 6445d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6446d9dcd5aeSmrg ;; 6447d9dcd5aeSmrg esac 6448d9dcd5aeSmrg fi 6449d9dcd5aeSmrg ;; 6450d9dcd5aeSmrg 6451d9dcd5aeSmrg irix5* | irix6* | nonstopux*) 6452d9dcd5aeSmrg if test "$GCC" = yes; then 6453d9dcd5aeSmrg _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' 6454d9dcd5aeSmrg # Try to use the -exported_symbol ld option, if it does not 6455d9dcd5aeSmrg # work, assume that -exports_file does not work either and 6456d9dcd5aeSmrg # implicitly export all symbols. 6457d9dcd5aeSmrg # This should be the same for all languages, so no per-tag cache variable. 6458d9dcd5aeSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6459d9dcd5aeSmrg [lt_cv_irix_exported_symbol], 6460d9dcd5aeSmrg [save_LDFLAGS="$LDFLAGS" 6461d9dcd5aeSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6462d9dcd5aeSmrg AC_LINK_IFELSE( 6463d9dcd5aeSmrg [AC_LANG_SOURCE( 6464d9dcd5aeSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6465d9dcd5aeSmrg [C++], [[int foo (void) { return 0; }]], 6466d9dcd5aeSmrg [Fortran 77], [[ 6467d9dcd5aeSmrg subroutine foo 6468d9dcd5aeSmrg end]], 6469d9dcd5aeSmrg [Fortran], [[ 6470d9dcd5aeSmrg subroutine foo 6471d9dcd5aeSmrg end]])])], 6472d9dcd5aeSmrg [lt_cv_irix_exported_symbol=yes], 6473d9dcd5aeSmrg [lt_cv_irix_exported_symbol=no]) 6474d9dcd5aeSmrg LDFLAGS="$save_LDFLAGS"]) 6475d9dcd5aeSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 6476d9dcd5aeSmrg _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' 6477d9dcd5aeSmrg fi 6478d9dcd5aeSmrg else 6479d9dcd5aeSmrg _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' 6480d9dcd5aeSmrg _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' 6481d9dcd5aeSmrg fi 6482d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6483d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6484d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6485d9dcd5aeSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 6486d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6487d9dcd5aeSmrg ;; 6488d9dcd5aeSmrg 6489d9dcd5aeSmrg netbsd*) 6490d9dcd5aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6491d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6492d9dcd5aeSmrg else 6493d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6494d9dcd5aeSmrg fi 6495d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6496d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6497d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6498d9dcd5aeSmrg ;; 6499d9dcd5aeSmrg 6500d9dcd5aeSmrg newsos6) 6501d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6502d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6503d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6504d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6505d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6506d9dcd5aeSmrg ;; 6507d9dcd5aeSmrg 6508d9dcd5aeSmrg *nto* | *qnx*) 6509d9dcd5aeSmrg ;; 6510d9dcd5aeSmrg 6511d9dcd5aeSmrg openbsd*) 6512d9dcd5aeSmrg if test -f /usr/libexec/ld.so; then 6513d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6514d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6515d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6516d9dcd5aeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6517d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6518d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6519d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6520d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6521d9dcd5aeSmrg else 6522d9dcd5aeSmrg case $host_os in 6523d9dcd5aeSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6524d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6525d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6526d9dcd5aeSmrg ;; 6527d9dcd5aeSmrg *) 6528d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6529d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6530d9dcd5aeSmrg ;; 6531d9dcd5aeSmrg esac 6532d9dcd5aeSmrg fi 6533d9dcd5aeSmrg else 6534d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6535d9dcd5aeSmrg fi 6536d9dcd5aeSmrg ;; 6537d9dcd5aeSmrg 6538d9dcd5aeSmrg os2*) 6539d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6540d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6541d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6542d9dcd5aeSmrg _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' 6543d9dcd5aeSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6544d9dcd5aeSmrg ;; 6545d9dcd5aeSmrg 6546d9dcd5aeSmrg osf3*) 6547d9dcd5aeSmrg if test "$GCC" = yes; then 6548d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6549d9dcd5aeSmrg _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' 6550d9dcd5aeSmrg else 6551d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6552d9dcd5aeSmrg _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' 6553d9dcd5aeSmrg fi 6554d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6555d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6556d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6557d9dcd5aeSmrg ;; 6558d9dcd5aeSmrg 6559d9dcd5aeSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6560d9dcd5aeSmrg if test "$GCC" = yes; then 6561d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6562d9dcd5aeSmrg _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' 6563d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6564d9dcd5aeSmrg else 6565d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6566d9dcd5aeSmrg _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' 6567d9dcd5aeSmrg _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~ 6568d9dcd5aeSmrg $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' 6569d9dcd5aeSmrg 6570d9dcd5aeSmrg # Both c and cxx compiler support -rpath directly 6571d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6572d9dcd5aeSmrg fi 6573d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6574d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6575d9dcd5aeSmrg ;; 6576d9dcd5aeSmrg 6577d9dcd5aeSmrg solaris*) 6578d9dcd5aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6579d9dcd5aeSmrg if test "$GCC" = yes; then 6580d9dcd5aeSmrg wlarc='${wl}' 6581d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6582d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6583d9dcd5aeSmrg $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' 6584d9dcd5aeSmrg else 6585d9dcd5aeSmrg case `$CC -V 2>&1` in 6586d9dcd5aeSmrg *"Compilers 5.0"*) 6587d9dcd5aeSmrg wlarc='' 6588d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6589d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6590d9dcd5aeSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6591d9dcd5aeSmrg ;; 6592d9dcd5aeSmrg *) 6593d9dcd5aeSmrg wlarc='${wl}' 6594d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6595d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6596d9dcd5aeSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6597d9dcd5aeSmrg ;; 6598d9dcd5aeSmrg esac 6599d9dcd5aeSmrg fi 6600d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6601d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6602d9dcd5aeSmrg case $host_os in 6603d9dcd5aeSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6604d9dcd5aeSmrg *) 6605d9dcd5aeSmrg # The compiler driver will combine and reorder linker options, 6606d9dcd5aeSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 6607d9dcd5aeSmrg # but is careful enough not to reorder. 6608d9dcd5aeSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6609d9dcd5aeSmrg if test "$GCC" = yes; then 6610d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6611d9dcd5aeSmrg else 6612d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6613d9dcd5aeSmrg fi 6614d9dcd5aeSmrg ;; 6615d9dcd5aeSmrg esac 6616d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6617d9dcd5aeSmrg ;; 6618d9dcd5aeSmrg 6619d9dcd5aeSmrg sunos4*) 6620d9dcd5aeSmrg if test "x$host_vendor" = xsequent; then 6621d9dcd5aeSmrg # Use $CC to link under sequent, because it throws in some extra .o 6622d9dcd5aeSmrg # files that make .init and .fini sections work. 6623d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6624d9dcd5aeSmrg else 6625d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6626d9dcd5aeSmrg fi 6627d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6628d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6629d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6630d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6631d9dcd5aeSmrg ;; 6632d9dcd5aeSmrg 6633d9dcd5aeSmrg sysv4) 6634d9dcd5aeSmrg case $host_vendor in 6635d9dcd5aeSmrg sni) 6636d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6637d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6638d9dcd5aeSmrg ;; 6639d9dcd5aeSmrg siemens) 6640d9dcd5aeSmrg ## LD is ld it makes a PLAMLIB 6641d9dcd5aeSmrg ## CC just makes a GrossModule. 6642d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6643d9dcd5aeSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6644d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6645d9dcd5aeSmrg ;; 6646d9dcd5aeSmrg motorola) 6647d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6648d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6649191cded7Smrg ;; 6650d9dcd5aeSmrg esac 6651d9dcd5aeSmrg runpath_var='LD_RUN_PATH' 6652d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6653d9dcd5aeSmrg ;; 6654b290cf36Smrg 6655d9dcd5aeSmrg sysv4.3*) 6656d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6657d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6658d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6659d9dcd5aeSmrg ;; 6660d9dcd5aeSmrg 6661d9dcd5aeSmrg sysv4*MP*) 6662d9dcd5aeSmrg if test -d /usr/nec; then 6663d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6664d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6665d9dcd5aeSmrg runpath_var=LD_RUN_PATH 6666d9dcd5aeSmrg hardcode_runpath_var=yes 6667d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6668ba064abeSmrg fi 6669ba064abeSmrg ;; 6670b290cf36Smrg 6671d9dcd5aeSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6672d9dcd5aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6673d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6674d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6675d9dcd5aeSmrg runpath_var='LD_RUN_PATH' 6676d9dcd5aeSmrg 6677d9dcd5aeSmrg if test "$GCC" = yes; then 6678d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6679d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6680d9dcd5aeSmrg else 6681d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6682d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6683d9dcd5aeSmrg fi 6684d9dcd5aeSmrg ;; 6685d9dcd5aeSmrg 6686d9dcd5aeSmrg sysv5* | sco3.2v5* | sco5v6*) 6687d9dcd5aeSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6688d9dcd5aeSmrg # link with -lc, and that would cause any symbols used from libc to 6689d9dcd5aeSmrg # always be unresolved, which means just about no library would 6690d9dcd5aeSmrg # ever link correctly. If we're not using GNU ld we use -z text 6691d9dcd5aeSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6692d9dcd5aeSmrg # as -z defs. 6693d9dcd5aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6694d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6695d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6696d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6697d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6698d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6699d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6700d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6701d9dcd5aeSmrg runpath_var='LD_RUN_PATH' 6702d9dcd5aeSmrg 6703d9dcd5aeSmrg if test "$GCC" = yes; then 6704d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6705d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6706d9dcd5aeSmrg else 6707d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6708d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6709d9dcd5aeSmrg fi 6710d9dcd5aeSmrg ;; 6711d9dcd5aeSmrg 6712d9dcd5aeSmrg uts4*) 6713d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6714d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6715d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6716d9dcd5aeSmrg ;; 6717d9dcd5aeSmrg 6718d9dcd5aeSmrg *) 6719d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6720d9dcd5aeSmrg ;; 6721d9dcd5aeSmrg esac 6722d9dcd5aeSmrg 6723d9dcd5aeSmrg if test x$host_vendor = xsni; then 6724d9dcd5aeSmrg case $host in 6725d9dcd5aeSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6726d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6727d9dcd5aeSmrg ;; 6728ba064abeSmrg esac 6729d9dcd5aeSmrg fi 6730d9dcd5aeSmrg fi 6731d9dcd5aeSmrg]) 6732d9dcd5aeSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6733d9dcd5aeSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6734d9dcd5aeSmrg 6735d9dcd5aeSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6736d9dcd5aeSmrg 6737d9dcd5aeSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6738d9dcd5aeSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6739d9dcd5aeSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 6740d9dcd5aeSmrg [The commands to extract the exported symbol list from a shared archive]) 6741d9dcd5aeSmrg 6742d9dcd5aeSmrg# 6743d9dcd5aeSmrg# Do we need to explicitly link libc? 6744d9dcd5aeSmrg# 6745d9dcd5aeSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6746d9dcd5aeSmrgx|xyes) 6747d9dcd5aeSmrg # Assume -lc should be added 6748d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6749d9dcd5aeSmrg 6750d9dcd5aeSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6751d9dcd5aeSmrg case $_LT_TAGVAR(archive_cmds, $1) in 6752d9dcd5aeSmrg *'~'*) 6753d9dcd5aeSmrg # FIXME: we may have to deal with multi-command sequences. 6754d9dcd5aeSmrg ;; 6755d9dcd5aeSmrg '$CC '*) 6756d9dcd5aeSmrg # Test whether the compiler implicitly links with -lc since on some 6757d9dcd5aeSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6758d9dcd5aeSmrg # to ld, don't add -lc before -lgcc. 6759d9dcd5aeSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6760d9dcd5aeSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6761d9dcd5aeSmrg [$RM conftest* 6762d9dcd5aeSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6763d9dcd5aeSmrg 6764d9dcd5aeSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6765d9dcd5aeSmrg soname=conftest 6766d9dcd5aeSmrg lib=conftest 6767d9dcd5aeSmrg libobjs=conftest.$ac_objext 6768d9dcd5aeSmrg deplibs= 6769d9dcd5aeSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6770d9dcd5aeSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6771d9dcd5aeSmrg compiler_flags=-v 6772d9dcd5aeSmrg linker_flags=-v 6773d9dcd5aeSmrg verstring= 6774d9dcd5aeSmrg output_objdir=. 6775d9dcd5aeSmrg libname=conftest 6776d9dcd5aeSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6777d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 6778d9dcd5aeSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6779d9dcd5aeSmrg then 6780d9dcd5aeSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6781d9dcd5aeSmrg else 6782d9dcd5aeSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6783d9dcd5aeSmrg fi 6784d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6785d9dcd5aeSmrg else 6786d9dcd5aeSmrg cat conftest.err 1>&5 6787d9dcd5aeSmrg fi 6788d9dcd5aeSmrg $RM conftest* 6789d9dcd5aeSmrg ]) 6790d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6791ba064abeSmrg ;; 6792d9dcd5aeSmrg esac 6793d9dcd5aeSmrg fi 6794d9dcd5aeSmrg ;; 6795d9dcd5aeSmrgesac 6796d9dcd5aeSmrg 6797d9dcd5aeSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6798d9dcd5aeSmrg [Whether or not to add -lc for building shared libraries]) 6799d9dcd5aeSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6800d9dcd5aeSmrg [enable_shared_with_static_runtimes], [0], 6801d9dcd5aeSmrg [Whether or not to disallow shared libs when runtime libs are static]) 6802d9dcd5aeSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6803d9dcd5aeSmrg [Compiler flag to allow reflexive dlopens]) 6804d9dcd5aeSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6805d9dcd5aeSmrg [Compiler flag to generate shared objects directly from archives]) 6806d9dcd5aeSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 6807d9dcd5aeSmrg [Whether the compiler copes with passing no objects directly]) 6808d9dcd5aeSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6809d9dcd5aeSmrg [Create an old-style archive from a shared archive]) 6810d9dcd5aeSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6811d9dcd5aeSmrg [Create a temporary old-style archive to link instead of a shared archive]) 6812d9dcd5aeSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6813d9dcd5aeSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6814d9dcd5aeSmrg_LT_TAGDECL([], [module_cmds], [2], 6815d9dcd5aeSmrg [Commands used to build a loadable module if different from building 6816d9dcd5aeSmrg a shared archive.]) 6817d9dcd5aeSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6818d9dcd5aeSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 6819d9dcd5aeSmrg [Whether we are building with GNU ld or not]) 6820d9dcd5aeSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6821d9dcd5aeSmrg [Flag that allows shared libraries with undefined symbols to be built]) 6822d9dcd5aeSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 6823d9dcd5aeSmrg [Flag that enforces no undefined symbols]) 6824d9dcd5aeSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6825d9dcd5aeSmrg [Flag to hardcode $libdir into a binary during linking. 6826d9dcd5aeSmrg This must work even if $libdir does not exist]) 6827d9dcd5aeSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6828d9dcd5aeSmrg [Whether we need a single "-rpath" flag with a separated argument]) 6829d9dcd5aeSmrg_LT_TAGDECL([], [hardcode_direct], [0], 6830d9dcd5aeSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6831d9dcd5aeSmrg DIR into the resulting binary]) 6832d9dcd5aeSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6833d9dcd5aeSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6834d9dcd5aeSmrg DIR into the resulting binary and the resulting library dependency is 6835d9dcd5aeSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6836d9dcd5aeSmrg library is relocated]) 6837d9dcd5aeSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6838d9dcd5aeSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6839d9dcd5aeSmrg into the resulting binary]) 6840d9dcd5aeSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6841d9dcd5aeSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6842d9dcd5aeSmrg into the resulting binary]) 6843d9dcd5aeSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 6844d9dcd5aeSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 6845d9dcd5aeSmrg into the library and all subsequent libraries and executables linked 6846d9dcd5aeSmrg against it]) 6847d9dcd5aeSmrg_LT_TAGDECL([], [inherit_rpath], [0], 6848d9dcd5aeSmrg [Set to yes if linker adds runtime paths of dependent libraries 6849d9dcd5aeSmrg to runtime path list]) 6850d9dcd5aeSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 6851d9dcd5aeSmrg [Whether libtool must link a program against all its dependency libraries]) 6852d9dcd5aeSmrg_LT_TAGDECL([], [always_export_symbols], [0], 6853d9dcd5aeSmrg [Set to "yes" if exported symbols are required]) 6854d9dcd5aeSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6855d9dcd5aeSmrg [The commands to list exported symbols]) 6856d9dcd5aeSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 6857d9dcd5aeSmrg [Symbols that should not be listed in the preloaded symbols]) 6858d9dcd5aeSmrg_LT_TAGDECL([], [include_expsyms], [1], 6859d9dcd5aeSmrg [Symbols that must always be exported]) 6860d9dcd5aeSmrg_LT_TAGDECL([], [prelink_cmds], [2], 6861d9dcd5aeSmrg [Commands necessary for linking programs (against libraries) with templates]) 6862d9dcd5aeSmrg_LT_TAGDECL([], [postlink_cmds], [2], 6863d9dcd5aeSmrg [Commands necessary for finishing linking programs]) 6864d9dcd5aeSmrg_LT_TAGDECL([], [file_list_spec], [1], 6865d9dcd5aeSmrg [Specify filename containing input files]) 6866d9dcd5aeSmrgdnl FIXME: Not yet implemented 6867d9dcd5aeSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6868d9dcd5aeSmrgdnl [Compiler flag to generate thread safe objects]) 6869d9dcd5aeSmrg])# _LT_LINKER_SHLIBS 6870b290cf36Smrg 6871b290cf36Smrg 6872d9dcd5aeSmrg# _LT_LANG_C_CONFIG([TAG]) 6873d9dcd5aeSmrg# ------------------------ 6874d9dcd5aeSmrg# Ensure that the configuration variables for a C compiler are suitably 6875d9dcd5aeSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6876d9dcd5aeSmrg# the compiler configuration to `libtool'. 6877d9dcd5aeSmrgm4_defun([_LT_LANG_C_CONFIG], 6878d9dcd5aeSmrg[m4_require([_LT_DECL_EGREP])dnl 6879d9dcd5aeSmrglt_save_CC="$CC" 6880d9dcd5aeSmrgAC_LANG_PUSH(C) 6881b290cf36Smrg 6882d9dcd5aeSmrg# Source file extension for C test sources. 6883d9dcd5aeSmrgac_ext=c 6884b290cf36Smrg 6885d9dcd5aeSmrg# Object file extension for compiled C test sources. 6886d9dcd5aeSmrgobjext=o 6887d9dcd5aeSmrg_LT_TAGVAR(objext, $1)=$objext 6888b290cf36Smrg 6889d9dcd5aeSmrg# Code to be used in simple compile tests 6890d9dcd5aeSmrglt_simple_compile_test_code="int some_variable = 0;" 6891b290cf36Smrg 6892d9dcd5aeSmrg# Code to be used in simple link tests 6893d9dcd5aeSmrglt_simple_link_test_code='int main(){return(0);}' 6894b290cf36Smrg 6895d9dcd5aeSmrg_LT_TAG_COMPILER 6896d9dcd5aeSmrg# Save the default compiler, since it gets overwritten when the other 6897d9dcd5aeSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6898d9dcd5aeSmrgcompiler_DEFAULT=$CC 6899b290cf36Smrg 6900d9dcd5aeSmrg# save warnings/boilerplate of simple test code 6901d9dcd5aeSmrg_LT_COMPILER_BOILERPLATE 6902d9dcd5aeSmrg_LT_LINKER_BOILERPLATE 6903b290cf36Smrg 6904d9dcd5aeSmrgif test -n "$compiler"; then 6905d9dcd5aeSmrg _LT_COMPILER_NO_RTTI($1) 6906d9dcd5aeSmrg _LT_COMPILER_PIC($1) 6907d9dcd5aeSmrg _LT_COMPILER_C_O($1) 6908d9dcd5aeSmrg _LT_COMPILER_FILE_LOCKS($1) 6909d9dcd5aeSmrg _LT_LINKER_SHLIBS($1) 6910d9dcd5aeSmrg _LT_SYS_DYNAMIC_LINKER($1) 6911d9dcd5aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6912d9dcd5aeSmrg LT_SYS_DLOPEN_SELF 6913d9dcd5aeSmrg _LT_CMD_STRIPLIB 6914b290cf36Smrg 6915d9dcd5aeSmrg # Report which library types will actually be built 6916d9dcd5aeSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6917d9dcd5aeSmrg AC_MSG_RESULT([$can_build_shared]) 6918b290cf36Smrg 6919d9dcd5aeSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6920d9dcd5aeSmrg test "$can_build_shared" = "no" && enable_shared=no 6921b290cf36Smrg 6922d9dcd5aeSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6923d9dcd5aeSmrg # are all built from PIC. 6924d9dcd5aeSmrg case $host_os in 6925d9dcd5aeSmrg aix3*) 6926d9dcd5aeSmrg test "$enable_shared" = yes && enable_static=no 6927d9dcd5aeSmrg if test -n "$RANLIB"; then 6928d9dcd5aeSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6929d9dcd5aeSmrg postinstall_cmds='$RANLIB $lib' 6930d9dcd5aeSmrg fi 6931d9dcd5aeSmrg ;; 6932b290cf36Smrg 6933d9dcd5aeSmrg aix[[4-9]]*) 6934d9dcd5aeSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6935d9dcd5aeSmrg test "$enable_shared" = yes && enable_static=no 6936d9dcd5aeSmrg fi 6937d9dcd5aeSmrg ;; 6938d9dcd5aeSmrg esac 6939d9dcd5aeSmrg AC_MSG_RESULT([$enable_shared]) 6940b290cf36Smrg 6941d9dcd5aeSmrg AC_MSG_CHECKING([whether to build static libraries]) 6942d9dcd5aeSmrg # Make sure either enable_shared or enable_static is yes. 6943d9dcd5aeSmrg test "$enable_shared" = yes || enable_static=yes 6944d9dcd5aeSmrg AC_MSG_RESULT([$enable_static]) 6945b290cf36Smrg 6946d9dcd5aeSmrg _LT_CONFIG($1) 6947d9dcd5aeSmrgfi 6948d9dcd5aeSmrgAC_LANG_POP 6949d9dcd5aeSmrgCC="$lt_save_CC" 6950d9dcd5aeSmrg])# _LT_LANG_C_CONFIG 6951b290cf36Smrg 6952b290cf36Smrg 6953d9dcd5aeSmrg# _LT_LANG_CXX_CONFIG([TAG]) 6954d9dcd5aeSmrg# -------------------------- 6955d9dcd5aeSmrg# Ensure that the configuration variables for a C++ compiler are suitably 6956d9dcd5aeSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6957d9dcd5aeSmrg# the compiler configuration to `libtool'. 6958d9dcd5aeSmrgm4_defun([_LT_LANG_CXX_CONFIG], 6959d9dcd5aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6960d9dcd5aeSmrgm4_require([_LT_DECL_EGREP])dnl 6961d9dcd5aeSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6962d9dcd5aeSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 6963d9dcd5aeSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 6964d9dcd5aeSmrg (test "X$CXX" != "Xg++"))) ; then 6965d9dcd5aeSmrg AC_PROG_CXXCPP 6966d9dcd5aeSmrgelse 6967d9dcd5aeSmrg _lt_caught_CXX_error=yes 6968d9dcd5aeSmrgfi 6969b290cf36Smrg 6970d9dcd5aeSmrgAC_LANG_PUSH(C++) 6971d9dcd5aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6972d9dcd5aeSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6973d9dcd5aeSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6974d9dcd5aeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6975d9dcd5aeSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 6976d9dcd5aeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6977d9dcd5aeSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6978d9dcd5aeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6979d9dcd5aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6980d9dcd5aeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6981d9dcd5aeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6982d9dcd5aeSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6983d9dcd5aeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6984d9dcd5aeSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6985d9dcd5aeSmrg_LT_TAGVAR(module_cmds, $1)= 6986d9dcd5aeSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6987d9dcd5aeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6988d9dcd5aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6989d9dcd5aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6990d9dcd5aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6991d9dcd5aeSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6992d9dcd5aeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6993d9dcd5aeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6994b290cf36Smrg 6995d9dcd5aeSmrg# Source file extension for C++ test sources. 6996d9dcd5aeSmrgac_ext=cpp 6997b290cf36Smrg 6998d9dcd5aeSmrg# Object file extension for compiled C++ test sources. 6999d9dcd5aeSmrgobjext=o 7000d9dcd5aeSmrg_LT_TAGVAR(objext, $1)=$objext 7001191cded7Smrg 7002d9dcd5aeSmrg# No sense in running all these tests if we already determined that 7003d9dcd5aeSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 7004d9dcd5aeSmrg# are currently assumed to apply to all compilers on this platform, 7005d9dcd5aeSmrg# and will be corrupted by setting them based on a non-working compiler. 7006d9dcd5aeSmrgif test "$_lt_caught_CXX_error" != yes; then 7007d9dcd5aeSmrg # Code to be used in simple compile tests 7008d9dcd5aeSmrg lt_simple_compile_test_code="int some_variable = 0;" 7009b290cf36Smrg 7010d9dcd5aeSmrg # Code to be used in simple link tests 7011d9dcd5aeSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7012b290cf36Smrg 7013d9dcd5aeSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7014d9dcd5aeSmrg _LT_TAG_COMPILER 7015b290cf36Smrg 7016d9dcd5aeSmrg # save warnings/boilerplate of simple test code 7017d9dcd5aeSmrg _LT_COMPILER_BOILERPLATE 7018d9dcd5aeSmrg _LT_LINKER_BOILERPLATE 7019b290cf36Smrg 7020d9dcd5aeSmrg # Allow CC to be a program name with arguments. 7021d9dcd5aeSmrg lt_save_CC=$CC 7022d9dcd5aeSmrg lt_save_CFLAGS=$CFLAGS 7023d9dcd5aeSmrg lt_save_LD=$LD 7024d9dcd5aeSmrg lt_save_GCC=$GCC 7025d9dcd5aeSmrg GCC=$GXX 7026d9dcd5aeSmrg lt_save_with_gnu_ld=$with_gnu_ld 7027d9dcd5aeSmrg lt_save_path_LD=$lt_cv_path_LD 7028d9dcd5aeSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 7029d9dcd5aeSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 7030d9dcd5aeSmrg else 7031d9dcd5aeSmrg $as_unset lt_cv_prog_gnu_ld 7032d9dcd5aeSmrg fi 7033d9dcd5aeSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 7034d9dcd5aeSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 7035d9dcd5aeSmrg else 7036d9dcd5aeSmrg $as_unset lt_cv_path_LD 7037d9dcd5aeSmrg fi 7038d9dcd5aeSmrg test -z "${LDCXX+set}" || LD=$LDCXX 7039d9dcd5aeSmrg CC=${CXX-"c++"} 7040d9dcd5aeSmrg CFLAGS=$CXXFLAGS 7041d9dcd5aeSmrg compiler=$CC 7042d9dcd5aeSmrg _LT_TAGVAR(compiler, $1)=$CC 7043d9dcd5aeSmrg _LT_CC_BASENAME([$compiler]) 7044191cded7Smrg 7045d9dcd5aeSmrg if test -n "$compiler"; then 7046d9dcd5aeSmrg # We don't want -fno-exception when compiling C++ code, so set the 7047d9dcd5aeSmrg # no_builtin_flag separately 7048d9dcd5aeSmrg if test "$GXX" = yes; then 7049d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7050d9dcd5aeSmrg else 7051d9dcd5aeSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7052d9dcd5aeSmrg fi 7053191cded7Smrg 7054d9dcd5aeSmrg if test "$GXX" = yes; then 7055d9dcd5aeSmrg # Set up default GNU C++ configuration 7056191cded7Smrg 7057d9dcd5aeSmrg LT_PATH_LD 7058191cded7Smrg 7059d9dcd5aeSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 7060d9dcd5aeSmrg # archiving commands below assume that GNU ld is being used. 7061d9dcd5aeSmrg if test "$with_gnu_ld" = yes; then 7062d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7063d9dcd5aeSmrg _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' 7064191cded7Smrg 7065d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7066d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7067191cded7Smrg 7068d9dcd5aeSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 7069d9dcd5aeSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7070d9dcd5aeSmrg # investigate it a little bit more. (MM) 7071d9dcd5aeSmrg wlarc='${wl}' 7072d9dcd5aeSmrg 7073d9dcd5aeSmrg # ancient GNU ld didn't support --whole-archive et. al. 7074d9dcd5aeSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7075d9dcd5aeSmrg $GREP 'no-whole-archive' > /dev/null; then 7076d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7077d9dcd5aeSmrg else 7078d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7079d9dcd5aeSmrg fi 7080d9dcd5aeSmrg else 7081d9dcd5aeSmrg with_gnu_ld=no 7082d9dcd5aeSmrg wlarc= 7083ba064abeSmrg 7084d9dcd5aeSmrg # A generic and very simple default shared library creation 7085d9dcd5aeSmrg # command for GNU C++ for the case where it uses the native 7086d9dcd5aeSmrg # linker, instead of GNU ld. If possible, this setting should 7087d9dcd5aeSmrg # overridden to take advantage of the native linker features on 7088d9dcd5aeSmrg # the platform it is being used on. 7089d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7090d9dcd5aeSmrg fi 7091d9dcd5aeSmrg 7092d9dcd5aeSmrg # Commands to make compiler produce verbose output that lists 7093d9dcd5aeSmrg # what "hidden" libraries, object files and flags are used when 7094d9dcd5aeSmrg # linking a shared library. 7095d9dcd5aeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7096d9dcd5aeSmrg 7097d9dcd5aeSmrg else 7098d9dcd5aeSmrg GXX=no 7099ba064abeSmrg with_gnu_ld=no 7100d9dcd5aeSmrg wlarc= 7101ba064abeSmrg fi 7102b290cf36Smrg 7103d9dcd5aeSmrg # PORTME: fill in a description of your system's C++ link characteristics 7104d9dcd5aeSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7105d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7106ba064abeSmrg case $host_os in 7107d9dcd5aeSmrg aix3*) 7108d9dcd5aeSmrg # FIXME: insert proper C++ library support 7109d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7110d9dcd5aeSmrg ;; 7111d9dcd5aeSmrg aix[[4-9]]*) 7112d9dcd5aeSmrg if test "$host_cpu" = ia64; then 7113d9dcd5aeSmrg # On IA64, the linker does run time linking by default, so we don't 7114d9dcd5aeSmrg # have to do anything special. 7115d9dcd5aeSmrg aix_use_runtimelinking=no 7116d9dcd5aeSmrg exp_sym_flag='-Bexport' 7117d9dcd5aeSmrg no_entry_flag="" 7118d9dcd5aeSmrg else 7119d9dcd5aeSmrg aix_use_runtimelinking=no 7120d9dcd5aeSmrg 7121d9dcd5aeSmrg # Test if we are trying to use run time linking or normal 7122d9dcd5aeSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7123d9dcd5aeSmrg # need to do runtime linking. 7124d9dcd5aeSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7125d9dcd5aeSmrg for ld_flag in $LDFLAGS; do 7126d9dcd5aeSmrg case $ld_flag in 7127d9dcd5aeSmrg *-brtl*) 7128d9dcd5aeSmrg aix_use_runtimelinking=yes 7129d9dcd5aeSmrg break 7130d9dcd5aeSmrg ;; 7131d9dcd5aeSmrg esac 7132d9dcd5aeSmrg done 7133ba064abeSmrg ;; 7134d9dcd5aeSmrg esac 7135d9dcd5aeSmrg 7136d9dcd5aeSmrg exp_sym_flag='-bexport' 7137d9dcd5aeSmrg no_entry_flag='-bnoentry' 7138d9dcd5aeSmrg fi 7139d9dcd5aeSmrg 7140d9dcd5aeSmrg # When large executables or shared objects are built, AIX ld can 7141d9dcd5aeSmrg # have problems creating the table of contents. If linking a library 7142d9dcd5aeSmrg # or program results in "error TOC overflow" add -mminimal-toc to 7143d9dcd5aeSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7144d9dcd5aeSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7145d9dcd5aeSmrg 7146d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='' 7147d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7148d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7149d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7150d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7151d9dcd5aeSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7152d9dcd5aeSmrg 7153d9dcd5aeSmrg if test "$GXX" = yes; then 7154d9dcd5aeSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7155d9dcd5aeSmrg # We only want to do this on AIX 4.2 and lower, the check 7156d9dcd5aeSmrg # below for broken collect2 doesn't work under 4.3+ 7157d9dcd5aeSmrg collect2name=`${CC} -print-prog-name=collect2` 7158d9dcd5aeSmrg if test -f "$collect2name" && 7159d9dcd5aeSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7160d9dcd5aeSmrg then 7161d9dcd5aeSmrg # We have reworked collect2 7162d9dcd5aeSmrg : 7163d9dcd5aeSmrg else 7164d9dcd5aeSmrg # We have old collect2 7165d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7166d9dcd5aeSmrg # It fails to find uninstalled libraries when the uninstalled 7167d9dcd5aeSmrg # path is not listed in the libpath. Setting hardcode_minus_L 7168d9dcd5aeSmrg # to unsupported forces relinking 7169d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7170d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7171d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7172d9dcd5aeSmrg fi 7173d9dcd5aeSmrg esac 7174d9dcd5aeSmrg shared_flag='-shared' 7175d9dcd5aeSmrg if test "$aix_use_runtimelinking" = yes; then 7176d9dcd5aeSmrg shared_flag="$shared_flag "'${wl}-G' 7177d9dcd5aeSmrg fi 7178d9dcd5aeSmrg else 7179d9dcd5aeSmrg # not using gcc 7180d9dcd5aeSmrg if test "$host_cpu" = ia64; then 7181d9dcd5aeSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7182d9dcd5aeSmrg # chokes on -Wl,-G. The following line is correct: 7183d9dcd5aeSmrg shared_flag='-G' 7184d9dcd5aeSmrg else 7185d9dcd5aeSmrg if test "$aix_use_runtimelinking" = yes; then 7186d9dcd5aeSmrg shared_flag='${wl}-G' 7187d9dcd5aeSmrg else 7188d9dcd5aeSmrg shared_flag='${wl}-bM:SRE' 7189d9dcd5aeSmrg fi 7190d9dcd5aeSmrg fi 7191d9dcd5aeSmrg fi 7192d9dcd5aeSmrg 7193d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7194d9dcd5aeSmrg # It seems that -bexpall does not export symbols beginning with 7195d9dcd5aeSmrg # underscore (_), so it is better to generate a list of symbols to 7196d9dcd5aeSmrg # export. 7197d9dcd5aeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 7198d9dcd5aeSmrg if test "$aix_use_runtimelinking" = yes; then 7199d9dcd5aeSmrg # Warning - without using the other runtime loading flags (-brtl), 7200d9dcd5aeSmrg # -berok will link without error, but may produce a broken library. 7201d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7202d9dcd5aeSmrg # Determine the default libpath from the value encoded in an empty 7203d9dcd5aeSmrg # executable. 7204d9dcd5aeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 7205d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7206d9dcd5aeSmrg 7207d9dcd5aeSmrg _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" 7208d9dcd5aeSmrg else 7209d9dcd5aeSmrg if test "$host_cpu" = ia64; then 7210d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7211d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7212d9dcd5aeSmrg _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" 7213d9dcd5aeSmrg else 7214d9dcd5aeSmrg # Determine the default libpath from the value encoded in an 7215d9dcd5aeSmrg # empty executable. 7216d9dcd5aeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 7217d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7218d9dcd5aeSmrg # Warning - without using the other run time loading flags, 7219d9dcd5aeSmrg # -berok will link without error, but may produce a broken library. 7220d9dcd5aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7221d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7222d9dcd5aeSmrg if test "$with_gnu_ld" = yes; then 7223d9dcd5aeSmrg # We only use this code for GNU lds that support --whole-archive. 7224d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7225d9dcd5aeSmrg else 7226d9dcd5aeSmrg # Exported symbols can be pulled into shared objects from archives 7227d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7228d9dcd5aeSmrg fi 7229d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7230d9dcd5aeSmrg # This is similar to how AIX traditionally builds its shared 7231d9dcd5aeSmrg # libraries. 7232d9dcd5aeSmrg _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' 7233d9dcd5aeSmrg fi 7234d9dcd5aeSmrg fi 7235d9dcd5aeSmrg ;; 7236d9dcd5aeSmrg 7237d9dcd5aeSmrg beos*) 7238d9dcd5aeSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7239d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7240d9dcd5aeSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7241d9dcd5aeSmrg # support --undefined. This deserves some investigation. FIXME 7242d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7243d9dcd5aeSmrg else 7244d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7245d9dcd5aeSmrg fi 7246d9dcd5aeSmrg ;; 7247d9dcd5aeSmrg 7248d9dcd5aeSmrg chorus*) 7249d9dcd5aeSmrg case $cc_basename in 7250d9dcd5aeSmrg *) 7251d9dcd5aeSmrg # FIXME: insert proper C++ library support 7252d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7253d9dcd5aeSmrg ;; 7254d9dcd5aeSmrg esac 7255d9dcd5aeSmrg ;; 7256d9dcd5aeSmrg 7257d9dcd5aeSmrg cygwin* | mingw* | pw32* | cegcc*) 7258d9dcd5aeSmrg case $GXX,$cc_basename in 7259d9dcd5aeSmrg ,cl* | no,cl*) 7260d9dcd5aeSmrg # Native MSVC 7261d9dcd5aeSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 7262d9dcd5aeSmrg # no search path for DLLs. 7263d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7264d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7265d9dcd5aeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 7266d9dcd5aeSmrg _LT_TAGVAR(file_list_spec, $1)='@' 7267d9dcd5aeSmrg # Tell ltmain to make .lib files, not .a files. 7268d9dcd5aeSmrg libext=lib 7269d9dcd5aeSmrg # Tell ltmain to make .dll files, not .so files. 7270d9dcd5aeSmrg shrext_cmds=".dll" 7271d9dcd5aeSmrg # FIXME: Setting linknames here is a bad hack. 7272d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7273d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7274d9dcd5aeSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7275d9dcd5aeSmrg else 7276d9dcd5aeSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7277d9dcd5aeSmrg fi~ 7278d9dcd5aeSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7279d9dcd5aeSmrg linknames=' 7280d9dcd5aeSmrg # The linker will not automatically build a static lib if we build a DLL. 7281d9dcd5aeSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7282d9dcd5aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7283d9dcd5aeSmrg # Don't use ranlib 7284d9dcd5aeSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7285d9dcd5aeSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7286d9dcd5aeSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 7287d9dcd5aeSmrg case $lt_outputfile in 7288d9dcd5aeSmrg *.exe|*.EXE) ;; 7289d9dcd5aeSmrg *) 7290d9dcd5aeSmrg lt_outputfile="$lt_outputfile.exe" 7291d9dcd5aeSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 7292d9dcd5aeSmrg ;; 7293d9dcd5aeSmrg esac~ 7294d9dcd5aeSmrg func_to_tool_file "$lt_outputfile"~ 7295d9dcd5aeSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7296d9dcd5aeSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7297d9dcd5aeSmrg $RM "$lt_outputfile.manifest"; 7298d9dcd5aeSmrg fi' 7299d9dcd5aeSmrg ;; 7300d9dcd5aeSmrg *) 7301d9dcd5aeSmrg # g++ 7302d9dcd5aeSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7303d9dcd5aeSmrg # as there is no search path for DLLs. 7304d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7305d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7306d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7307d9dcd5aeSmrg _LT_TAGVAR(always_export_symbols, $1)=no 7308d9dcd5aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7309d9dcd5aeSmrg 7310d9dcd5aeSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7311d9dcd5aeSmrg _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' 7312d9dcd5aeSmrg # If the export-symbols file already is a .def file (1st line 7313d9dcd5aeSmrg # is EXPORTS), use it as is; otherwise, prepend... 7314d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7315d9dcd5aeSmrg cp $export_symbols $output_objdir/$soname.def; 7316d9dcd5aeSmrg else 7317d9dcd5aeSmrg echo EXPORTS > $output_objdir/$soname.def; 7318d9dcd5aeSmrg cat $export_symbols >> $output_objdir/$soname.def; 7319d9dcd5aeSmrg fi~ 7320d9dcd5aeSmrg $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' 7321d9dcd5aeSmrg else 7322d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7323d9dcd5aeSmrg fi 7324d9dcd5aeSmrg ;; 7325ba064abeSmrg esac 7326ba064abeSmrg ;; 7327d9dcd5aeSmrg darwin* | rhapsody*) 7328d9dcd5aeSmrg _LT_DARWIN_LINKER_FEATURES($1) 7329ba064abeSmrg ;; 7330b290cf36Smrg 7331d9dcd5aeSmrg dgux*) 7332d9dcd5aeSmrg case $cc_basename in 7333d9dcd5aeSmrg ec++*) 7334d9dcd5aeSmrg # FIXME: insert proper C++ library support 7335d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7336d9dcd5aeSmrg ;; 7337d9dcd5aeSmrg ghcx*) 7338d9dcd5aeSmrg # Green Hills C++ Compiler 7339d9dcd5aeSmrg # FIXME: insert proper C++ library support 7340d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7341d9dcd5aeSmrg ;; 7342d9dcd5aeSmrg *) 7343d9dcd5aeSmrg # FIXME: insert proper C++ library support 7344d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7345d9dcd5aeSmrg ;; 7346d9dcd5aeSmrg esac 7347d9dcd5aeSmrg ;; 7348b290cf36Smrg 7349d9dcd5aeSmrg freebsd2.*) 7350d9dcd5aeSmrg # C++ shared libraries reported to be fairly broken before 7351d9dcd5aeSmrg # switch to ELF 7352d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7353d9dcd5aeSmrg ;; 7354b290cf36Smrg 7355d9dcd5aeSmrg freebsd-elf*) 7356d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7357d9dcd5aeSmrg ;; 7358b290cf36Smrg 7359d9dcd5aeSmrg freebsd* | dragonfly*) 7360d9dcd5aeSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7361d9dcd5aeSmrg # conventions 7362d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7363d9dcd5aeSmrg ;; 7364b290cf36Smrg 7365d9dcd5aeSmrg gnu*) 7366ba064abeSmrg ;; 7367d9dcd5aeSmrg 7368d9dcd5aeSmrg haiku*) 7369d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7370d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7371ba064abeSmrg ;; 7372b290cf36Smrg 7373d9dcd5aeSmrg hpux9*) 7374d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7375d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7376d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7377d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7378d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7379d9dcd5aeSmrg # but as the default 7380d9dcd5aeSmrg # location of the library. 7381b290cf36Smrg 7382d9dcd5aeSmrg case $cc_basename in 7383d9dcd5aeSmrg CC*) 7384d9dcd5aeSmrg # FIXME: insert proper C++ library support 7385d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7386d9dcd5aeSmrg ;; 7387d9dcd5aeSmrg aCC*) 7388d9dcd5aeSmrg _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' 7389d9dcd5aeSmrg # Commands to make compiler produce verbose output that lists 7390d9dcd5aeSmrg # what "hidden" libraries, object files and flags are used when 7391d9dcd5aeSmrg # linking a shared library. 7392d9dcd5aeSmrg # 7393d9dcd5aeSmrg # There doesn't appear to be a way to prevent this compiler from 7394d9dcd5aeSmrg # explicitly linking system object files so we need to strip them 7395d9dcd5aeSmrg # from the output so that they don't get included in the library 7396d9dcd5aeSmrg # dependencies. 7397d9dcd5aeSmrg 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"' 7398d9dcd5aeSmrg ;; 7399d9dcd5aeSmrg *) 7400d9dcd5aeSmrg if test "$GXX" = yes; then 7401d9dcd5aeSmrg _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' 7402d9dcd5aeSmrg else 7403d9dcd5aeSmrg # FIXME: insert proper C++ library support 7404d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7405d9dcd5aeSmrg fi 7406d9dcd5aeSmrg ;; 7407d9dcd5aeSmrg esac 7408d9dcd5aeSmrg ;; 7409b290cf36Smrg 7410d9dcd5aeSmrg hpux10*|hpux11*) 7411d9dcd5aeSmrg if test $with_gnu_ld = no; then 7412d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7413d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7414191cded7Smrg 7415d9dcd5aeSmrg case $host_cpu in 7416d9dcd5aeSmrg hppa*64*|ia64*) 7417d9dcd5aeSmrg ;; 7418d9dcd5aeSmrg *) 7419d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7420d9dcd5aeSmrg ;; 7421d9dcd5aeSmrg esac 7422d9dcd5aeSmrg fi 7423d9dcd5aeSmrg case $host_cpu in 7424d9dcd5aeSmrg hppa*64*|ia64*) 7425d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 7426d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7427d9dcd5aeSmrg ;; 7428d9dcd5aeSmrg *) 7429d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7430d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7431d9dcd5aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7432d9dcd5aeSmrg # but as the default 7433d9dcd5aeSmrg # location of the library. 7434d9dcd5aeSmrg ;; 7435d9dcd5aeSmrg esac 7436b290cf36Smrg 7437d9dcd5aeSmrg case $cc_basename in 7438d9dcd5aeSmrg CC*) 7439d9dcd5aeSmrg # FIXME: insert proper C++ library support 7440d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7441d9dcd5aeSmrg ;; 7442d9dcd5aeSmrg aCC*) 7443d9dcd5aeSmrg case $host_cpu in 7444d9dcd5aeSmrg hppa*64*) 7445d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7446d9dcd5aeSmrg ;; 7447d9dcd5aeSmrg ia64*) 7448d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7449d9dcd5aeSmrg ;; 7450d9dcd5aeSmrg *) 7451d9dcd5aeSmrg _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' 7452d9dcd5aeSmrg ;; 7453d9dcd5aeSmrg esac 7454d9dcd5aeSmrg # Commands to make compiler produce verbose output that lists 7455d9dcd5aeSmrg # what "hidden" libraries, object files and flags are used when 7456d9dcd5aeSmrg # linking a shared library. 7457d9dcd5aeSmrg # 7458d9dcd5aeSmrg # There doesn't appear to be a way to prevent this compiler from 7459d9dcd5aeSmrg # explicitly linking system object files so we need to strip them 7460d9dcd5aeSmrg # from the output so that they don't get included in the library 7461d9dcd5aeSmrg # dependencies. 7462d9dcd5aeSmrg 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"' 7463d9dcd5aeSmrg ;; 7464d9dcd5aeSmrg *) 7465d9dcd5aeSmrg if test "$GXX" = yes; then 7466d9dcd5aeSmrg if test $with_gnu_ld = no; then 7467d9dcd5aeSmrg case $host_cpu in 7468d9dcd5aeSmrg hppa*64*) 7469d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7470d9dcd5aeSmrg ;; 7471d9dcd5aeSmrg ia64*) 7472d9dcd5aeSmrg _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' 7473d9dcd5aeSmrg ;; 7474d9dcd5aeSmrg *) 7475d9dcd5aeSmrg _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' 7476d9dcd5aeSmrg ;; 7477d9dcd5aeSmrg esac 7478d9dcd5aeSmrg fi 7479d9dcd5aeSmrg else 7480d9dcd5aeSmrg # FIXME: insert proper C++ library support 7481d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7482d9dcd5aeSmrg fi 7483d9dcd5aeSmrg ;; 7484d9dcd5aeSmrg esac 7485d9dcd5aeSmrg ;; 7486d9dcd5aeSmrg 7487d9dcd5aeSmrg interix[[3-9]]*) 7488d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 7489d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7490d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7491d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7492d9dcd5aeSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7493d9dcd5aeSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 7494d9dcd5aeSmrg # default) and relocated if they conflict, which is a slow very memory 7495d9dcd5aeSmrg # consuming and fragmenting process. To avoid this, we pick a random, 7496d9dcd5aeSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7497d9dcd5aeSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7498d9dcd5aeSmrg _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' 7499d9dcd5aeSmrg _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' 7500d9dcd5aeSmrg ;; 7501d9dcd5aeSmrg irix5* | irix6*) 7502d9dcd5aeSmrg case $cc_basename in 7503d9dcd5aeSmrg CC*) 7504d9dcd5aeSmrg # SGI C++ 7505d9dcd5aeSmrg _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' 7506d9dcd5aeSmrg 7507d9dcd5aeSmrg # Archives containing C++ object files must be created using 7508d9dcd5aeSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7509d9dcd5aeSmrg # necessary to make sure instantiated templates are included 7510d9dcd5aeSmrg # in the archive. 7511d9dcd5aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7512d9dcd5aeSmrg ;; 7513d9dcd5aeSmrg *) 7514d9dcd5aeSmrg if test "$GXX" = yes; then 7515d9dcd5aeSmrg if test "$with_gnu_ld" = no; then 7516d9dcd5aeSmrg _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' 7517d9dcd5aeSmrg else 7518d9dcd5aeSmrg _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' 7519d9dcd5aeSmrg fi 7520d9dcd5aeSmrg fi 7521d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7522d9dcd5aeSmrg ;; 7523d9dcd5aeSmrg esac 7524d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7525d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7526d9dcd5aeSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 7527d9dcd5aeSmrg ;; 7528b290cf36Smrg 7529d9dcd5aeSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 7530d9dcd5aeSmrg case $cc_basename in 7531d9dcd5aeSmrg KCC*) 7532d9dcd5aeSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7533b290cf36Smrg 7534d9dcd5aeSmrg # KCC will only create a shared library if the output file 7535d9dcd5aeSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7536d9dcd5aeSmrg # to its proper name (with version) after linking. 7537d9dcd5aeSmrg _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' 7538d9dcd5aeSmrg _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' 7539d9dcd5aeSmrg # Commands to make compiler produce verbose output that lists 7540d9dcd5aeSmrg # what "hidden" libraries, object files and flags are used when 7541d9dcd5aeSmrg # linking a shared library. 7542d9dcd5aeSmrg # 7543d9dcd5aeSmrg # There doesn't appear to be a way to prevent this compiler from 7544d9dcd5aeSmrg # explicitly linking system object files so we need to strip them 7545d9dcd5aeSmrg # from the output so that they don't get included in the library 7546d9dcd5aeSmrg # dependencies. 7547d9dcd5aeSmrg 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"' 7548b290cf36Smrg 7549d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7550d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7551b290cf36Smrg 7552d9dcd5aeSmrg # Archives containing C++ object files must be created using 7553d9dcd5aeSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7554d9dcd5aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7555d9dcd5aeSmrg ;; 7556d9dcd5aeSmrg icpc* | ecpc* ) 7557d9dcd5aeSmrg # Intel C++ 7558d9dcd5aeSmrg with_gnu_ld=yes 7559d9dcd5aeSmrg # version 8.0 and above of icpc choke on multiply defined symbols 7560d9dcd5aeSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 7561d9dcd5aeSmrg # earlier do not add the objects themselves. 7562d9dcd5aeSmrg case `$CC -V 2>&1` in 7563d9dcd5aeSmrg *"Version 7."*) 7564d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7565d9dcd5aeSmrg _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' 7566d9dcd5aeSmrg ;; 7567d9dcd5aeSmrg *) # Version 8.0 or newer 7568d9dcd5aeSmrg tmp_idyn= 7569d9dcd5aeSmrg case $host_cpu in 7570d9dcd5aeSmrg ia64*) tmp_idyn=' -i_dynamic';; 7571d9dcd5aeSmrg esac 7572d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7573d9dcd5aeSmrg _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' 7574d9dcd5aeSmrg ;; 7575d9dcd5aeSmrg esac 7576d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7577d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7578d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7579d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7580d9dcd5aeSmrg ;; 7581d9dcd5aeSmrg pgCC* | pgcpp*) 7582d9dcd5aeSmrg # Portland Group C++ compiler 7583d9dcd5aeSmrg case `$CC -V` in 7584d9dcd5aeSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7585d9dcd5aeSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7586d9dcd5aeSmrg rm -rf $tpldir~ 7587d9dcd5aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7588d9dcd5aeSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7589d9dcd5aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7590d9dcd5aeSmrg rm -rf $tpldir~ 7591d9dcd5aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7592d9dcd5aeSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7593d9dcd5aeSmrg $RANLIB $oldlib' 7594d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7595d9dcd5aeSmrg rm -rf $tpldir~ 7596d9dcd5aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7597d9dcd5aeSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7598d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7599d9dcd5aeSmrg rm -rf $tpldir~ 7600d9dcd5aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7601d9dcd5aeSmrg $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' 7602d9dcd5aeSmrg ;; 7603d9dcd5aeSmrg *) # Version 6 and above use weak symbols 7604d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7605d9dcd5aeSmrg _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' 7606d9dcd5aeSmrg ;; 7607d9dcd5aeSmrg esac 7608b290cf36Smrg 7609d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7610d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7611d9dcd5aeSmrg _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' 7612d9dcd5aeSmrg ;; 7613d9dcd5aeSmrg cxx*) 7614d9dcd5aeSmrg # Compaq C++ 7615d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7616d9dcd5aeSmrg _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' 7617b290cf36Smrg 7618d9dcd5aeSmrg runpath_var=LD_RUN_PATH 7619d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7620d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7621b290cf36Smrg 7622d9dcd5aeSmrg # Commands to make compiler produce verbose output that lists 7623d9dcd5aeSmrg # what "hidden" libraries, object files and flags are used when 7624d9dcd5aeSmrg # linking a shared library. 7625d9dcd5aeSmrg # 7626d9dcd5aeSmrg # There doesn't appear to be a way to prevent this compiler from 7627d9dcd5aeSmrg # explicitly linking system object files so we need to strip them 7628d9dcd5aeSmrg # from the output so that they don't get included in the library 7629d9dcd5aeSmrg # dependencies. 7630d9dcd5aeSmrg 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' 7631d9dcd5aeSmrg ;; 7632d9dcd5aeSmrg xl* | mpixl* | bgxl*) 7633d9dcd5aeSmrg # IBM XL 8.0 on PPC, with GNU ld 7634d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7635d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7636d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7637d9dcd5aeSmrg if test "x$supports_anon_versioning" = xyes; then 7638d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7639d9dcd5aeSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7640d9dcd5aeSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7641d9dcd5aeSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7642d9dcd5aeSmrg fi 7643d9dcd5aeSmrg ;; 7644d9dcd5aeSmrg *) 7645d9dcd5aeSmrg case `$CC -V 2>&1 | sed 5q` in 7646d9dcd5aeSmrg *Sun\ C*) 7647d9dcd5aeSmrg # Sun C++ 5.9 7648d9dcd5aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7649d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7650d9dcd5aeSmrg _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' 7651d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7652d9dcd5aeSmrg _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' 7653d9dcd5aeSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7654b290cf36Smrg 7655d9dcd5aeSmrg # Not sure whether something based on 7656d9dcd5aeSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7657d9dcd5aeSmrg # would be better. 7658d9dcd5aeSmrg output_verbose_link_cmd='func_echo_all' 7659b290cf36Smrg 7660d9dcd5aeSmrg # Archives containing C++ object files must be created using 7661d9dcd5aeSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7662d9dcd5aeSmrg # necessary to make sure instantiated templates are included 7663d9dcd5aeSmrg # in the archive. 7664d9dcd5aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7665d9dcd5aeSmrg ;; 7666d9dcd5aeSmrg esac 7667d9dcd5aeSmrg ;; 7668d9dcd5aeSmrg esac 7669d9dcd5aeSmrg ;; 7670b290cf36Smrg 7671d9dcd5aeSmrg lynxos*) 7672d9dcd5aeSmrg # FIXME: insert proper C++ library support 7673d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7674ba064abeSmrg ;; 7675d9dcd5aeSmrg 7676d9dcd5aeSmrg m88k*) 7677d9dcd5aeSmrg # FIXME: insert proper C++ library support 7678d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7679d9dcd5aeSmrg ;; 7680d9dcd5aeSmrg 7681d9dcd5aeSmrg mvs*) 7682d9dcd5aeSmrg case $cc_basename in 7683d9dcd5aeSmrg cxx*) 7684d9dcd5aeSmrg # FIXME: insert proper C++ library support 7685ba064abeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7686d9dcd5aeSmrg ;; 7687d9dcd5aeSmrg *) 7688d9dcd5aeSmrg # FIXME: insert proper C++ library support 7689d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7690d9dcd5aeSmrg ;; 7691d9dcd5aeSmrg esac 7692ba064abeSmrg ;; 7693b290cf36Smrg 7694d9dcd5aeSmrg netbsd*) 7695d9dcd5aeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7696d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7697d9dcd5aeSmrg wlarc= 7698d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7699d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7700d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7701d9dcd5aeSmrg fi 7702d9dcd5aeSmrg # Workaround some broken pre-1.5 toolchains 7703d9dcd5aeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7704d9dcd5aeSmrg ;; 7705b290cf36Smrg 7706d9dcd5aeSmrg *nto* | *qnx*) 7707d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7708d9dcd5aeSmrg ;; 7709b290cf36Smrg 7710d9dcd5aeSmrg openbsd2*) 7711d9dcd5aeSmrg # C++ shared libraries are fairly broken 7712d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7713d9dcd5aeSmrg ;; 7714b290cf36Smrg 7715d9dcd5aeSmrg openbsd*) 7716d9dcd5aeSmrg if test -f /usr/libexec/ld.so; then 7717d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7718d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7719d9dcd5aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7720d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7721d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7722d9dcd5aeSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7723d9dcd5aeSmrg _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' 7724d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7725d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7726d9dcd5aeSmrg fi 7727d9dcd5aeSmrg output_verbose_link_cmd=func_echo_all 7728ba064abeSmrg else 7729d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7730ba064abeSmrg fi 7731d9dcd5aeSmrg ;; 7732b290cf36Smrg 7733d9dcd5aeSmrg osf3* | osf4* | osf5*) 7734d9dcd5aeSmrg case $cc_basename in 7735d9dcd5aeSmrg KCC*) 7736d9dcd5aeSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7737b290cf36Smrg 7738d9dcd5aeSmrg # KCC will only create a shared library if the output file 7739d9dcd5aeSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7740d9dcd5aeSmrg # to its proper name (with version) after linking. 7741d9dcd5aeSmrg _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' 7742b290cf36Smrg 7743d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7744d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7745b290cf36Smrg 7746d9dcd5aeSmrg # Archives containing C++ object files must be created using 7747d9dcd5aeSmrg # the KAI C++ compiler. 7748d9dcd5aeSmrg case $host in 7749d9dcd5aeSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7750d9dcd5aeSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7751d9dcd5aeSmrg esac 7752d9dcd5aeSmrg ;; 7753d9dcd5aeSmrg RCC*) 7754d9dcd5aeSmrg # Rational C++ 2.4.1 7755d9dcd5aeSmrg # FIXME: insert proper C++ library support 7756d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7757d9dcd5aeSmrg ;; 7758d9dcd5aeSmrg cxx*) 7759d9dcd5aeSmrg case $host in 7760d9dcd5aeSmrg osf3*) 7761d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7762d9dcd5aeSmrg _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' 7763d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7764d9dcd5aeSmrg ;; 7765d9dcd5aeSmrg *) 7766d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7767d9dcd5aeSmrg _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' 7768d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7769d9dcd5aeSmrg echo "-hidden">> $lib.exp~ 7770d9dcd5aeSmrg $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~ 7771d9dcd5aeSmrg $RM $lib.exp' 7772d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7773d9dcd5aeSmrg ;; 7774d9dcd5aeSmrg esac 7775b290cf36Smrg 7776d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7777b290cf36Smrg 7778d9dcd5aeSmrg # Commands to make compiler produce verbose output that lists 7779d9dcd5aeSmrg # what "hidden" libraries, object files and flags are used when 7780d9dcd5aeSmrg # linking a shared library. 7781d9dcd5aeSmrg # 7782d9dcd5aeSmrg # There doesn't appear to be a way to prevent this compiler from 7783d9dcd5aeSmrg # explicitly linking system object files so we need to strip them 7784d9dcd5aeSmrg # from the output so that they don't get included in the library 7785d9dcd5aeSmrg # dependencies. 7786d9dcd5aeSmrg 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"' 7787d9dcd5aeSmrg ;; 7788d9dcd5aeSmrg *) 7789d9dcd5aeSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7790d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7791d9dcd5aeSmrg case $host in 7792d9dcd5aeSmrg osf3*) 7793d9dcd5aeSmrg _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' 7794d9dcd5aeSmrg ;; 7795d9dcd5aeSmrg *) 7796d9dcd5aeSmrg _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' 7797d9dcd5aeSmrg ;; 7798d9dcd5aeSmrg esac 7799b290cf36Smrg 7800d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7801d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7802d9dcd5aeSmrg 7803d9dcd5aeSmrg # Commands to make compiler produce verbose output that lists 7804d9dcd5aeSmrg # what "hidden" libraries, object files and flags are used when 7805d9dcd5aeSmrg # linking a shared library. 7806d9dcd5aeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7807d9dcd5aeSmrg 7808d9dcd5aeSmrg else 7809d9dcd5aeSmrg # FIXME: insert proper C++ library support 7810d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7811d9dcd5aeSmrg fi 7812d9dcd5aeSmrg ;; 7813d9dcd5aeSmrg esac 7814ba064abeSmrg ;; 7815b290cf36Smrg 7816d9dcd5aeSmrg psos*) 7817d9dcd5aeSmrg # FIXME: insert proper C++ library support 7818d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7819d9dcd5aeSmrg ;; 7820b290cf36Smrg 7821d9dcd5aeSmrg sunos4*) 7822d9dcd5aeSmrg case $cc_basename in 7823d9dcd5aeSmrg CC*) 7824d9dcd5aeSmrg # Sun C++ 4.x 7825d9dcd5aeSmrg # FIXME: insert proper C++ library support 7826d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7827d9dcd5aeSmrg ;; 7828d9dcd5aeSmrg lcc*) 7829d9dcd5aeSmrg # Lucid 7830d9dcd5aeSmrg # FIXME: insert proper C++ library support 7831d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7832d9dcd5aeSmrg ;; 7833d9dcd5aeSmrg *) 7834d9dcd5aeSmrg # FIXME: insert proper C++ library support 7835d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7836d9dcd5aeSmrg ;; 7837d9dcd5aeSmrg esac 7838d9dcd5aeSmrg ;; 7839b290cf36Smrg 7840d9dcd5aeSmrg solaris*) 7841d9dcd5aeSmrg case $cc_basename in 7842d9dcd5aeSmrg CC* | sunCC*) 7843d9dcd5aeSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7844d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7845d9dcd5aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7846d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7847d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7848d9dcd5aeSmrg $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' 7849b290cf36Smrg 7850d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7851d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7852d9dcd5aeSmrg case $host_os in 7853d9dcd5aeSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7854d9dcd5aeSmrg *) 7855d9dcd5aeSmrg # The compiler driver will combine and reorder linker options, 7856d9dcd5aeSmrg # but understands `-z linker_flag'. 7857d9dcd5aeSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7858d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7859d9dcd5aeSmrg ;; 7860d9dcd5aeSmrg esac 7861d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7862b290cf36Smrg 7863d9dcd5aeSmrg output_verbose_link_cmd='func_echo_all' 7864b290cf36Smrg 7865d9dcd5aeSmrg # Archives containing C++ object files must be created using 7866d9dcd5aeSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7867d9dcd5aeSmrg # necessary to make sure instantiated templates are included 7868d9dcd5aeSmrg # in the archive. 7869d9dcd5aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7870d9dcd5aeSmrg ;; 7871d9dcd5aeSmrg gcx*) 7872d9dcd5aeSmrg # Green Hills C++ Compiler 7873d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7874b290cf36Smrg 7875d9dcd5aeSmrg # The C++ compiler must be used to create the archive. 7876d9dcd5aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7877d9dcd5aeSmrg ;; 7878d9dcd5aeSmrg *) 7879d9dcd5aeSmrg # GNU C++ compiler with Solaris linker 7880d9dcd5aeSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7881d9dcd5aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7882d9dcd5aeSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7883d9dcd5aeSmrg _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' 7884d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7885d9dcd5aeSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7886b290cf36Smrg 7887d9dcd5aeSmrg # Commands to make compiler produce verbose output that lists 7888d9dcd5aeSmrg # what "hidden" libraries, object files and flags are used when 7889d9dcd5aeSmrg # linking a shared library. 7890d9dcd5aeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7891d9dcd5aeSmrg else 7892d9dcd5aeSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 7893d9dcd5aeSmrg # platform. 7894d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7895d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7896d9dcd5aeSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7897b290cf36Smrg 7898d9dcd5aeSmrg # Commands to make compiler produce verbose output that lists 7899d9dcd5aeSmrg # what "hidden" libraries, object files and flags are used when 7900d9dcd5aeSmrg # linking a shared library. 7901d9dcd5aeSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7902d9dcd5aeSmrg fi 7903b290cf36Smrg 7904d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7905d9dcd5aeSmrg case $host_os in 7906d9dcd5aeSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7907d9dcd5aeSmrg *) 7908d9dcd5aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7909d9dcd5aeSmrg ;; 7910d9dcd5aeSmrg esac 7911d9dcd5aeSmrg fi 7912d9dcd5aeSmrg ;; 7913d9dcd5aeSmrg esac 7914d9dcd5aeSmrg ;; 7915b290cf36Smrg 7916d9dcd5aeSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7917d9dcd5aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7918d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7919d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7920d9dcd5aeSmrg runpath_var='LD_RUN_PATH' 7921b290cf36Smrg 7922d9dcd5aeSmrg case $cc_basename in 7923d9dcd5aeSmrg CC*) 7924d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7925d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7926ba064abeSmrg ;; 7927ba064abeSmrg *) 7928d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7929d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7930ba064abeSmrg ;; 7931d9dcd5aeSmrg esac 7932d9dcd5aeSmrg ;; 7933b290cf36Smrg 7934d9dcd5aeSmrg sysv5* | sco3.2v5* | sco5v6*) 7935d9dcd5aeSmrg # Note: We can NOT use -z defs as we might desire, because we do not 7936d9dcd5aeSmrg # link with -lc, and that would cause any symbols used from libc to 7937d9dcd5aeSmrg # always be unresolved, which means just about no library would 7938d9dcd5aeSmrg # ever link correctly. If we're not using GNU ld we use -z text 7939d9dcd5aeSmrg # though, which does catch some bad symbols but isn't as heavy-handed 7940d9dcd5aeSmrg # as -z defs. 7941d9dcd5aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7942d9dcd5aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7943d9dcd5aeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7944d9dcd5aeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7945d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7946d9dcd5aeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7947d9dcd5aeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7948d9dcd5aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7949d9dcd5aeSmrg runpath_var='LD_RUN_PATH' 7950b290cf36Smrg 7951d9dcd5aeSmrg case $cc_basename in 7952d9dcd5aeSmrg CC*) 7953d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7954d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7955d9dcd5aeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7956d9dcd5aeSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7957d9dcd5aeSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7958d9dcd5aeSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 7959d9dcd5aeSmrg ;; 7960d9dcd5aeSmrg *) 7961d9dcd5aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7962d9dcd5aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7963d9dcd5aeSmrg ;; 7964ba064abeSmrg esac 7965ba064abeSmrg ;; 7966b290cf36Smrg 7967d9dcd5aeSmrg tandem*) 7968d9dcd5aeSmrg case $cc_basename in 7969d9dcd5aeSmrg NCC*) 7970d9dcd5aeSmrg # NonStop-UX NCC 3.20 7971d9dcd5aeSmrg # FIXME: insert proper C++ library support 7972d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7973d9dcd5aeSmrg ;; 7974d9dcd5aeSmrg *) 7975d9dcd5aeSmrg # FIXME: insert proper C++ library support 7976d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7977d9dcd5aeSmrg ;; 7978d9dcd5aeSmrg esac 7979d9dcd5aeSmrg ;; 7980b290cf36Smrg 7981d9dcd5aeSmrg vxworks*) 7982d9dcd5aeSmrg # FIXME: insert proper C++ library support 7983d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7984d9dcd5aeSmrg ;; 7985b290cf36Smrg 7986d9dcd5aeSmrg *) 7987d9dcd5aeSmrg # FIXME: insert proper C++ library support 7988d9dcd5aeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7989d9dcd5aeSmrg ;; 7990d9dcd5aeSmrg esac 7991b290cf36Smrg 7992d9dcd5aeSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7993d9dcd5aeSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7994b290cf36Smrg 7995d9dcd5aeSmrg _LT_TAGVAR(GCC, $1)="$GXX" 7996d9dcd5aeSmrg _LT_TAGVAR(LD, $1)="$LD" 7997b290cf36Smrg 7998d9dcd5aeSmrg ## CAVEAT EMPTOR: 7999d9dcd5aeSmrg ## There is no encapsulation within the following macros, do not change 8000d9dcd5aeSmrg ## the running order or otherwise move them around unless you know exactly 8001d9dcd5aeSmrg ## what you are doing... 8002d9dcd5aeSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 8003d9dcd5aeSmrg _LT_COMPILER_PIC($1) 8004d9dcd5aeSmrg _LT_COMPILER_C_O($1) 8005d9dcd5aeSmrg _LT_COMPILER_FILE_LOCKS($1) 8006d9dcd5aeSmrg _LT_LINKER_SHLIBS($1) 8007d9dcd5aeSmrg _LT_SYS_DYNAMIC_LINKER($1) 8008d9dcd5aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8009b290cf36Smrg 8010d9dcd5aeSmrg _LT_CONFIG($1) 8011d9dcd5aeSmrg fi # test -n "$compiler" 8012b290cf36Smrg 8013d9dcd5aeSmrg CC=$lt_save_CC 8014d9dcd5aeSmrg CFLAGS=$lt_save_CFLAGS 8015d9dcd5aeSmrg LDCXX=$LD 8016d9dcd5aeSmrg LD=$lt_save_LD 8017d9dcd5aeSmrg GCC=$lt_save_GCC 8018d9dcd5aeSmrg with_gnu_ld=$lt_save_with_gnu_ld 8019d9dcd5aeSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 8020d9dcd5aeSmrg lt_cv_path_LD=$lt_save_path_LD 8021d9dcd5aeSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8022d9dcd5aeSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8023d9dcd5aeSmrgfi # test "$_lt_caught_CXX_error" != yes 8024b290cf36Smrg 8025d9dcd5aeSmrgAC_LANG_POP 8026d9dcd5aeSmrg])# _LT_LANG_CXX_CONFIG 8027b290cf36Smrg 8028b290cf36Smrg 8029d9dcd5aeSmrg# _LT_FUNC_STRIPNAME_CNF 8030d9dcd5aeSmrg# ---------------------- 8031d9dcd5aeSmrg# func_stripname_cnf prefix suffix name 8032d9dcd5aeSmrg# strip PREFIX and SUFFIX off of NAME. 8033d9dcd5aeSmrg# PREFIX and SUFFIX must not contain globbing or regex special 8034d9dcd5aeSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 8035d9dcd5aeSmrg# dot (in which case that matches only a dot). 8036d9dcd5aeSmrg# 8037d9dcd5aeSmrg# This function is identical to the (non-XSI) version of func_stripname, 8038d9dcd5aeSmrg# except this one can be used by m4 code that may be executed by configure, 8039d9dcd5aeSmrg# rather than the libtool script. 8040d9dcd5aeSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 8041d9dcd5aeSmrgAC_REQUIRE([_LT_DECL_SED]) 8042d9dcd5aeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 8043d9dcd5aeSmrgfunc_stripname_cnf () 8044d9dcd5aeSmrg{ 8045d9dcd5aeSmrg case ${2} in 8046d9dcd5aeSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 8047d9dcd5aeSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 8048d9dcd5aeSmrg esac 8049d9dcd5aeSmrg} # func_stripname_cnf 8050d9dcd5aeSmrg])# _LT_FUNC_STRIPNAME_CNF 8051b290cf36Smrg 8052d9dcd5aeSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8053d9dcd5aeSmrg# --------------------------------- 8054d9dcd5aeSmrg# Figure out "hidden" library dependencies from verbose 8055d9dcd5aeSmrg# compiler output when linking a shared library. 8056d9dcd5aeSmrg# Parse the compiler output and extract the necessary 8057d9dcd5aeSmrg# objects, libraries and library flags. 8058d9dcd5aeSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8059d9dcd5aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8060d9dcd5aeSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 8061d9dcd5aeSmrg# Dependencies to place before and after the object being linked: 8062d9dcd5aeSmrg_LT_TAGVAR(predep_objects, $1)= 8063d9dcd5aeSmrg_LT_TAGVAR(postdep_objects, $1)= 8064d9dcd5aeSmrg_LT_TAGVAR(predeps, $1)= 8065d9dcd5aeSmrg_LT_TAGVAR(postdeps, $1)= 8066d9dcd5aeSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 8067b290cf36Smrg 8068d9dcd5aeSmrgdnl we can't use the lt_simple_compile_test_code here, 8069d9dcd5aeSmrgdnl because it contains code intended for an executable, 8070d9dcd5aeSmrgdnl not a library. It's possible we should let each 8071d9dcd5aeSmrgdnl tag define a new lt_????_link_test_code variable, 8072d9dcd5aeSmrgdnl but it's only used here... 8073d9dcd5aeSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8074d9dcd5aeSmrgint a; 8075d9dcd5aeSmrgvoid foo (void) { a = 0; } 8076d9dcd5aeSmrg_LT_EOF 8077d9dcd5aeSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8078d9dcd5aeSmrgclass Foo 8079d9dcd5aeSmrg{ 8080d9dcd5aeSmrgpublic: 8081d9dcd5aeSmrg Foo (void) { a = 0; } 8082d9dcd5aeSmrgprivate: 8083d9dcd5aeSmrg int a; 8084d9dcd5aeSmrg}; 8085d9dcd5aeSmrg_LT_EOF 8086d9dcd5aeSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8087d9dcd5aeSmrg subroutine foo 8088d9dcd5aeSmrg implicit none 8089d9dcd5aeSmrg integer*4 a 8090d9dcd5aeSmrg a=0 8091d9dcd5aeSmrg return 8092d9dcd5aeSmrg end 8093d9dcd5aeSmrg_LT_EOF 8094d9dcd5aeSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8095d9dcd5aeSmrg subroutine foo 8096d9dcd5aeSmrg implicit none 8097d9dcd5aeSmrg integer a 8098d9dcd5aeSmrg a=0 8099d9dcd5aeSmrg return 8100d9dcd5aeSmrg end 8101d9dcd5aeSmrg_LT_EOF 8102d9dcd5aeSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8103d9dcd5aeSmrgpublic class foo { 8104d9dcd5aeSmrg private int a; 8105d9dcd5aeSmrg public void bar (void) { 8106d9dcd5aeSmrg a = 0; 8107d9dcd5aeSmrg } 8108d9dcd5aeSmrg}; 8109d9dcd5aeSmrg_LT_EOF 8110d9dcd5aeSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 8111d9dcd5aeSmrgpackage foo 8112d9dcd5aeSmrgfunc foo() { 8113d9dcd5aeSmrg} 8114d9dcd5aeSmrg_LT_EOF 8115d9dcd5aeSmrg]) 8116b290cf36Smrg 8117d9dcd5aeSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 8118d9dcd5aeSmrgcase "$CC $CFLAGS " in #( 8119d9dcd5aeSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8120d9dcd5aeSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8121d9dcd5aeSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8122d9dcd5aeSmrgesac 8123b290cf36Smrg 8124d9dcd5aeSmrgdnl Parse the compiler output and extract the necessary 8125d9dcd5aeSmrgdnl objects, libraries and library flags. 8126d9dcd5aeSmrgif AC_TRY_EVAL(ac_compile); then 8127d9dcd5aeSmrg # Parse the compiler output and extract the necessary 8128d9dcd5aeSmrg # objects, libraries and library flags. 8129b290cf36Smrg 8130d9dcd5aeSmrg # Sentinel used to keep track of whether or not we are before 8131d9dcd5aeSmrg # the conftest object file. 8132d9dcd5aeSmrg pre_test_object_deps_done=no 8133b290cf36Smrg 8134d9dcd5aeSmrg for p in `eval "$output_verbose_link_cmd"`; do 8135d9dcd5aeSmrg case ${prev}${p} in 8136b290cf36Smrg 8137d9dcd5aeSmrg -L* | -R* | -l*) 8138d9dcd5aeSmrg # Some compilers place space between "-{L,R}" and the path. 8139d9dcd5aeSmrg # Remove the space. 8140d9dcd5aeSmrg if test $p = "-L" || 8141d9dcd5aeSmrg test $p = "-R"; then 8142d9dcd5aeSmrg prev=$p 8143d9dcd5aeSmrg continue 8144d9dcd5aeSmrg fi 8145b290cf36Smrg 8146d9dcd5aeSmrg # Expand the sysroot to ease extracting the directories later. 8147d9dcd5aeSmrg if test -z "$prev"; then 8148d9dcd5aeSmrg case $p in 8149d9dcd5aeSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8150d9dcd5aeSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8151d9dcd5aeSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8152d9dcd5aeSmrg esac 8153d9dcd5aeSmrg fi 8154d9dcd5aeSmrg case $p in 8155d9dcd5aeSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8156d9dcd5aeSmrg esac 8157d9dcd5aeSmrg if test "$pre_test_object_deps_done" = no; then 8158d9dcd5aeSmrg case ${prev} in 8159d9dcd5aeSmrg -L | -R) 8160d9dcd5aeSmrg # Internal compiler library paths should come after those 8161d9dcd5aeSmrg # provided the user. The postdeps already come after the 8162d9dcd5aeSmrg # user supplied libs so there is no need to process them. 8163d9dcd5aeSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8164d9dcd5aeSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8165d9dcd5aeSmrg else 8166d9dcd5aeSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8167d9dcd5aeSmrg fi 8168d9dcd5aeSmrg ;; 8169d9dcd5aeSmrg # The "-l" case would never come before the object being 8170d9dcd5aeSmrg # linked, so don't bother handling this case. 8171d9dcd5aeSmrg esac 8172d9dcd5aeSmrg else 8173d9dcd5aeSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8174d9dcd5aeSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8175d9dcd5aeSmrg else 8176d9dcd5aeSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8177d9dcd5aeSmrg fi 8178d9dcd5aeSmrg fi 8179d9dcd5aeSmrg prev= 8180d9dcd5aeSmrg ;; 8181b290cf36Smrg 8182d9dcd5aeSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 8183d9dcd5aeSmrg *.$objext) 8184d9dcd5aeSmrg # This assumes that the test object file only shows up 8185d9dcd5aeSmrg # once in the compiler output. 8186d9dcd5aeSmrg if test "$p" = "conftest.$objext"; then 8187d9dcd5aeSmrg pre_test_object_deps_done=yes 8188d9dcd5aeSmrg continue 8189d9dcd5aeSmrg fi 8190b290cf36Smrg 8191d9dcd5aeSmrg if test "$pre_test_object_deps_done" = no; then 8192d9dcd5aeSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8193d9dcd5aeSmrg _LT_TAGVAR(predep_objects, $1)="$p" 8194d9dcd5aeSmrg else 8195d9dcd5aeSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8196d9dcd5aeSmrg fi 8197d9dcd5aeSmrg else 8198d9dcd5aeSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8199d9dcd5aeSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 8200d9dcd5aeSmrg else 8201d9dcd5aeSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8202d9dcd5aeSmrg fi 8203d9dcd5aeSmrg fi 8204d9dcd5aeSmrg ;; 8205b290cf36Smrg 8206d9dcd5aeSmrg *) ;; # Ignore the rest. 8207b290cf36Smrg 8208d9dcd5aeSmrg esac 8209d9dcd5aeSmrg done 8210b290cf36Smrg 8211d9dcd5aeSmrg # Clean up. 8212d9dcd5aeSmrg rm -f a.out a.exe 8213d9dcd5aeSmrgelse 8214d9dcd5aeSmrg echo "libtool.m4: error: problem compiling $1 test program" 8215d9dcd5aeSmrgfi 8216b290cf36Smrg 8217d9dcd5aeSmrg$RM -f confest.$objext 8218d9dcd5aeSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 8219ba064abeSmrg 8220d9dcd5aeSmrg# PORTME: override above test on systems where it is broken 8221d9dcd5aeSmrgm4_if([$1], [CXX], 8222d9dcd5aeSmrg[case $host_os in 8223d9dcd5aeSmrginterix[[3-9]]*) 8224d9dcd5aeSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 8225d9dcd5aeSmrg # hack all around it, let's just trust "g++" to DTRT. 8226d9dcd5aeSmrg _LT_TAGVAR(predep_objects,$1)= 8227d9dcd5aeSmrg _LT_TAGVAR(postdep_objects,$1)= 8228d9dcd5aeSmrg _LT_TAGVAR(postdeps,$1)= 8229d9dcd5aeSmrg ;; 8230d9dcd5aeSmrg 8231d9dcd5aeSmrglinux*) 8232d9dcd5aeSmrg case `$CC -V 2>&1 | sed 5q` in 8233d9dcd5aeSmrg *Sun\ C*) 8234d9dcd5aeSmrg # Sun C++ 5.9 8235d9dcd5aeSmrg 8236d9dcd5aeSmrg # The more standards-conforming stlport4 library is 8237d9dcd5aeSmrg # incompatible with the Cstd library. Avoid specifying 8238d9dcd5aeSmrg # it if it's in CXXFLAGS. Ignore libCrun as 8239d9dcd5aeSmrg # -library=stlport4 depends on it. 8240d9dcd5aeSmrg case " $CXX $CXXFLAGS " in 8241d9dcd5aeSmrg *" -library=stlport4 "*) 8242d9dcd5aeSmrg solaris_use_stlport4=yes 8243ba064abeSmrg ;; 8244ba064abeSmrg esac 8245d9dcd5aeSmrg 8246d9dcd5aeSmrg if test "$solaris_use_stlport4" != yes; then 8247d9dcd5aeSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8248d9dcd5aeSmrg fi 8249d9dcd5aeSmrg ;; 8250d9dcd5aeSmrg esac 8251d9dcd5aeSmrg ;; 8252d9dcd5aeSmrg 8253d9dcd5aeSmrgsolaris*) 8254d9dcd5aeSmrg case $cc_basename in 8255d9dcd5aeSmrg CC* | sunCC*) 8256d9dcd5aeSmrg # The more standards-conforming stlport4 library is 8257d9dcd5aeSmrg # incompatible with the Cstd library. Avoid specifying 8258d9dcd5aeSmrg # it if it's in CXXFLAGS. Ignore libCrun as 8259d9dcd5aeSmrg # -library=stlport4 depends on it. 8260d9dcd5aeSmrg case " $CXX $CXXFLAGS " in 8261d9dcd5aeSmrg *" -library=stlport4 "*) 8262d9dcd5aeSmrg solaris_use_stlport4=yes 8263d9dcd5aeSmrg ;; 8264d9dcd5aeSmrg esac 8265d9dcd5aeSmrg 8266d9dcd5aeSmrg # Adding this requires a known-good setup of shared libraries for 8267d9dcd5aeSmrg # Sun compiler versions before 5.6, else PIC objects from an old 8268d9dcd5aeSmrg # archive will be linked into the output, leading to subtle bugs. 8269d9dcd5aeSmrg if test "$solaris_use_stlport4" != yes; then 8270d9dcd5aeSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8271d9dcd5aeSmrg fi 8272d9dcd5aeSmrg ;; 8273d9dcd5aeSmrg esac 8274ba064abeSmrg ;; 8275ba064abeSmrgesac 8276d9dcd5aeSmrg]) 8277b290cf36Smrg 8278d9dcd5aeSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 8279d9dcd5aeSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8280d9dcd5aeSmrgesac 8281d9dcd5aeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8282d9dcd5aeSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8283d9dcd5aeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8284d9dcd5aeSmrgfi 8285d9dcd5aeSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8286d9dcd5aeSmrg [The directories searched by this compiler when creating a shared library]) 8287d9dcd5aeSmrg_LT_TAGDECL([], [predep_objects], [1], 8288d9dcd5aeSmrg [Dependencies to place before and after the objects being linked to 8289d9dcd5aeSmrg create a shared library]) 8290d9dcd5aeSmrg_LT_TAGDECL([], [postdep_objects], [1]) 8291d9dcd5aeSmrg_LT_TAGDECL([], [predeps], [1]) 8292d9dcd5aeSmrg_LT_TAGDECL([], [postdeps], [1]) 8293d9dcd5aeSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 8294d9dcd5aeSmrg [The library search path used internally by the compiler when linking 8295d9dcd5aeSmrg a shared library]) 8296d9dcd5aeSmrg])# _LT_SYS_HIDDEN_LIBDEPS 8297b290cf36Smrg 8298b290cf36Smrg 8299d9dcd5aeSmrg# _LT_LANG_F77_CONFIG([TAG]) 8300d9dcd5aeSmrg# -------------------------- 8301d9dcd5aeSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 8302d9dcd5aeSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8303d9dcd5aeSmrg# to write the compiler configuration to `libtool'. 8304d9dcd5aeSmrgm4_defun([_LT_LANG_F77_CONFIG], 8305d9dcd5aeSmrg[AC_LANG_PUSH(Fortran 77) 8306d9dcd5aeSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 8307d9dcd5aeSmrg _lt_disable_F77=yes 8308d9dcd5aeSmrgfi 8309b290cf36Smrg 8310d9dcd5aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8311d9dcd5aeSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 8312d9dcd5aeSmrg_LT_TAGVAR(always_export_symbols, $1)=no 8313d9dcd5aeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8314d9dcd5aeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8315d9dcd5aeSmrg_LT_TAGVAR(hardcode_direct, $1)=no 8316d9dcd5aeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8317d9dcd5aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8318d9dcd5aeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8319d9dcd5aeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8320d9dcd5aeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 8321d9dcd5aeSmrg_LT_TAGVAR(inherit_rpath, $1)=no 8322d9dcd5aeSmrg_LT_TAGVAR(module_cmds, $1)= 8323d9dcd5aeSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 8324d9dcd5aeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8325d9dcd5aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8326d9dcd5aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8327d9dcd5aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8328d9dcd5aeSmrg_LT_TAGVAR(no_undefined_flag, $1)= 8329d9dcd5aeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8330d9dcd5aeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8331191cded7Smrg 8332d9dcd5aeSmrg# Source file extension for f77 test sources. 8333d9dcd5aeSmrgac_ext=f 8334d9dcd5aeSmrg 8335d9dcd5aeSmrg# Object file extension for compiled f77 test sources. 8336b290cf36Smrgobjext=o 8337b290cf36Smrg_LT_TAGVAR(objext, $1)=$objext 8338191cded7Smrg 8339d9dcd5aeSmrg# No sense in running all these tests if we already determined that 8340d9dcd5aeSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 8341d9dcd5aeSmrg# are currently assumed to apply to all compilers on this platform, 8342d9dcd5aeSmrg# and will be corrupted by setting them based on a non-working compiler. 8343d9dcd5aeSmrgif test "$_lt_disable_F77" != yes; then 8344d9dcd5aeSmrg # Code to be used in simple compile tests 8345d9dcd5aeSmrg lt_simple_compile_test_code="\ 8346d9dcd5aeSmrg subroutine t 8347d9dcd5aeSmrg return 8348d9dcd5aeSmrg end 8349d9dcd5aeSmrg" 8350191cded7Smrg 8351d9dcd5aeSmrg # Code to be used in simple link tests 8352d9dcd5aeSmrg lt_simple_link_test_code="\ 8353d9dcd5aeSmrg program t 8354d9dcd5aeSmrg end 8355d9dcd5aeSmrg" 8356191cded7Smrg 8357d9dcd5aeSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8358d9dcd5aeSmrg _LT_TAG_COMPILER 8359191cded7Smrg 8360d9dcd5aeSmrg # save warnings/boilerplate of simple test code 8361d9dcd5aeSmrg _LT_COMPILER_BOILERPLATE 8362d9dcd5aeSmrg _LT_LINKER_BOILERPLATE 8363191cded7Smrg 8364d9dcd5aeSmrg # Allow CC to be a program name with arguments. 8365d9dcd5aeSmrg lt_save_CC="$CC" 8366d9dcd5aeSmrg lt_save_GCC=$GCC 8367d9dcd5aeSmrg lt_save_CFLAGS=$CFLAGS 8368d9dcd5aeSmrg CC=${F77-"f77"} 8369d9dcd5aeSmrg CFLAGS=$FFLAGS 8370d9dcd5aeSmrg compiler=$CC 8371d9dcd5aeSmrg _LT_TAGVAR(compiler, $1)=$CC 8372d9dcd5aeSmrg _LT_CC_BASENAME([$compiler]) 8373d9dcd5aeSmrg GCC=$G77 8374d9dcd5aeSmrg if test -n "$compiler"; then 8375d9dcd5aeSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8376d9dcd5aeSmrg AC_MSG_RESULT([$can_build_shared]) 8377b290cf36Smrg 8378d9dcd5aeSmrg AC_MSG_CHECKING([whether to build shared libraries]) 8379d9dcd5aeSmrg test "$can_build_shared" = "no" && enable_shared=no 8380d9dcd5aeSmrg 8381d9dcd5aeSmrg # On AIX, shared libraries and static libraries use the same namespace, and 8382d9dcd5aeSmrg # are all built from PIC. 8383d9dcd5aeSmrg case $host_os in 8384d9dcd5aeSmrg aix3*) 8385d9dcd5aeSmrg test "$enable_shared" = yes && enable_static=no 8386d9dcd5aeSmrg if test -n "$RANLIB"; then 8387d9dcd5aeSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8388d9dcd5aeSmrg postinstall_cmds='$RANLIB $lib' 8389d9dcd5aeSmrg fi 8390d9dcd5aeSmrg ;; 8391d9dcd5aeSmrg aix[[4-9]]*) 8392d9dcd5aeSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8393d9dcd5aeSmrg test "$enable_shared" = yes && enable_static=no 8394d9dcd5aeSmrg fi 8395d9dcd5aeSmrg ;; 8396d9dcd5aeSmrg esac 8397d9dcd5aeSmrg AC_MSG_RESULT([$enable_shared]) 8398b290cf36Smrg 8399d9dcd5aeSmrg AC_MSG_CHECKING([whether to build static libraries]) 8400d9dcd5aeSmrg # Make sure either enable_shared or enable_static is yes. 8401d9dcd5aeSmrg test "$enable_shared" = yes || enable_static=yes 8402d9dcd5aeSmrg AC_MSG_RESULT([$enable_static]) 8403b290cf36Smrg 8404d9dcd5aeSmrg _LT_TAGVAR(GCC, $1)="$G77" 8405d9dcd5aeSmrg _LT_TAGVAR(LD, $1)="$LD" 8406b290cf36Smrg 8407d9dcd5aeSmrg ## CAVEAT EMPTOR: 8408d9dcd5aeSmrg ## There is no encapsulation within the following macros, do not change 8409d9dcd5aeSmrg ## the running order or otherwise move them around unless you know exactly 8410d9dcd5aeSmrg ## what you are doing... 8411d9dcd5aeSmrg _LT_COMPILER_PIC($1) 8412d9dcd5aeSmrg _LT_COMPILER_C_O($1) 8413d9dcd5aeSmrg _LT_COMPILER_FILE_LOCKS($1) 8414d9dcd5aeSmrg _LT_LINKER_SHLIBS($1) 8415d9dcd5aeSmrg _LT_SYS_DYNAMIC_LINKER($1) 8416d9dcd5aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8417191cded7Smrg 8418d9dcd5aeSmrg _LT_CONFIG($1) 8419d9dcd5aeSmrg fi # test -n "$compiler" 8420d9dcd5aeSmrg 8421d9dcd5aeSmrg GCC=$lt_save_GCC 8422d9dcd5aeSmrg CC="$lt_save_CC" 8423d9dcd5aeSmrg CFLAGS="$lt_save_CFLAGS" 8424d9dcd5aeSmrgfi # test "$_lt_disable_F77" != yes 8425191cded7Smrg 8426ba064abeSmrgAC_LANG_POP 8427d9dcd5aeSmrg])# _LT_LANG_F77_CONFIG 8428191cded7Smrg 8429191cded7Smrg 8430d9dcd5aeSmrg# _LT_LANG_FC_CONFIG([TAG]) 8431d9dcd5aeSmrg# ------------------------- 8432d9dcd5aeSmrg# Ensure that the configuration variables for a Fortran compiler are 8433d9dcd5aeSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8434d9dcd5aeSmrg# to write the compiler configuration to `libtool'. 8435d9dcd5aeSmrgm4_defun([_LT_LANG_FC_CONFIG], 8436d9dcd5aeSmrg[AC_LANG_PUSH(Fortran) 8437d9dcd5aeSmrg 8438d9dcd5aeSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 8439d9dcd5aeSmrg _lt_disable_FC=yes 8440ba064abeSmrgfi 8441191cded7Smrg 8442ba064abeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8443ba064abeSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 8444ba064abeSmrg_LT_TAGVAR(always_export_symbols, $1)=no 8445ba064abeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8446ba064abeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8447ba064abeSmrg_LT_TAGVAR(hardcode_direct, $1)=no 8448ba064abeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8449ba064abeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8450ba064abeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8451ba064abeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8452ba064abeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 8453ba064abeSmrg_LT_TAGVAR(inherit_rpath, $1)=no 8454ba064abeSmrg_LT_TAGVAR(module_cmds, $1)= 8455ba064abeSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 8456ba064abeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8457ba064abeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8458ba064abeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8459ba064abeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8460ba064abeSmrg_LT_TAGVAR(no_undefined_flag, $1)= 8461ba064abeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8462ba064abeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8463191cded7Smrg 8464d9dcd5aeSmrg# Source file extension for fc test sources. 8465d9dcd5aeSmrgac_ext=${ac_fc_srcext-f} 8466191cded7Smrg 8467d9dcd5aeSmrg# Object file extension for compiled fc test sources. 8468ba064abeSmrgobjext=o 8469ba064abeSmrg_LT_TAGVAR(objext, $1)=$objext 8470191cded7Smrg 8471ba064abeSmrg# No sense in running all these tests if we already determined that 8472d9dcd5aeSmrg# the FC compiler isn't working. Some variables (like enable_shared) 8473ba064abeSmrg# are currently assumed to apply to all compilers on this platform, 8474ba064abeSmrg# and will be corrupted by setting them based on a non-working compiler. 8475d9dcd5aeSmrgif test "$_lt_disable_FC" != yes; then 8476ba064abeSmrg # Code to be used in simple compile tests 8477d9dcd5aeSmrg lt_simple_compile_test_code="\ 8478d9dcd5aeSmrg subroutine t 8479d9dcd5aeSmrg return 8480d9dcd5aeSmrg end 8481d9dcd5aeSmrg" 8482191cded7Smrg 8483ba064abeSmrg # Code to be used in simple link tests 8484d9dcd5aeSmrg lt_simple_link_test_code="\ 8485d9dcd5aeSmrg program t 8486d9dcd5aeSmrg end 8487d9dcd5aeSmrg" 8488b290cf36Smrg 8489ba064abeSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8490ba064abeSmrg _LT_TAG_COMPILER 8491191cded7Smrg 8492ba064abeSmrg # save warnings/boilerplate of simple test code 8493ba064abeSmrg _LT_COMPILER_BOILERPLATE 8494ba064abeSmrg _LT_LINKER_BOILERPLATE 8495191cded7Smrg 8496ba064abeSmrg # Allow CC to be a program name with arguments. 8497d9dcd5aeSmrg lt_save_CC="$CC" 8498ba064abeSmrg lt_save_GCC=$GCC 8499d9dcd5aeSmrg lt_save_CFLAGS=$CFLAGS 8500d9dcd5aeSmrg CC=${FC-"f95"} 8501d9dcd5aeSmrg CFLAGS=$FCFLAGS 8502ba064abeSmrg compiler=$CC 8503d9dcd5aeSmrg GCC=$ac_cv_fc_compiler_gnu 8504d9dcd5aeSmrg 8505ba064abeSmrg _LT_TAGVAR(compiler, $1)=$CC 8506ba064abeSmrg _LT_CC_BASENAME([$compiler]) 8507191cded7Smrg 8508ba064abeSmrg if test -n "$compiler"; then 8509d9dcd5aeSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8510d9dcd5aeSmrg AC_MSG_RESULT([$can_build_shared]) 8511191cded7Smrg 8512d9dcd5aeSmrg AC_MSG_CHECKING([whether to build shared libraries]) 8513d9dcd5aeSmrg test "$can_build_shared" = "no" && enable_shared=no 8514191cded7Smrg 8515d9dcd5aeSmrg # On AIX, shared libraries and static libraries use the same namespace, and 8516d9dcd5aeSmrg # are all built from PIC. 8517d9dcd5aeSmrg case $host_os in 8518d9dcd5aeSmrg aix3*) 8519d9dcd5aeSmrg test "$enable_shared" = yes && enable_static=no 8520d9dcd5aeSmrg if test -n "$RANLIB"; then 8521d9dcd5aeSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8522d9dcd5aeSmrg postinstall_cmds='$RANLIB $lib' 8523d9dcd5aeSmrg fi 8524d9dcd5aeSmrg ;; 8525d9dcd5aeSmrg aix[[4-9]]*) 8526d9dcd5aeSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8527d9dcd5aeSmrg test "$enable_shared" = yes && enable_static=no 8528d9dcd5aeSmrg fi 8529d9dcd5aeSmrg ;; 8530d9dcd5aeSmrg esac 8531d9dcd5aeSmrg AC_MSG_RESULT([$enable_shared]) 8532191cded7Smrg 8533d9dcd5aeSmrg AC_MSG_CHECKING([whether to build static libraries]) 8534d9dcd5aeSmrg # Make sure either enable_shared or enable_static is yes. 8535d9dcd5aeSmrg test "$enable_shared" = yes || enable_static=yes 8536d9dcd5aeSmrg AC_MSG_RESULT([$enable_static]) 8537191cded7Smrg 8538d9dcd5aeSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8539d9dcd5aeSmrg _LT_TAGVAR(LD, $1)="$LD" 8540b290cf36Smrg 8541d9dcd5aeSmrg ## CAVEAT EMPTOR: 8542d9dcd5aeSmrg ## There is no encapsulation within the following macros, do not change 8543d9dcd5aeSmrg ## the running order or otherwise move them around unless you know exactly 8544d9dcd5aeSmrg ## what you are doing... 8545d9dcd5aeSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 8546d9dcd5aeSmrg _LT_COMPILER_PIC($1) 8547d9dcd5aeSmrg _LT_COMPILER_C_O($1) 8548d9dcd5aeSmrg _LT_COMPILER_FILE_LOCKS($1) 8549d9dcd5aeSmrg _LT_LINKER_SHLIBS($1) 8550d9dcd5aeSmrg _LT_SYS_DYNAMIC_LINKER($1) 8551d9dcd5aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8552191cded7Smrg 8553d9dcd5aeSmrg _LT_CONFIG($1) 8554d9dcd5aeSmrg fi # test -n "$compiler" 8555191cded7Smrg 8556d9dcd5aeSmrg GCC=$lt_save_GCC 8557d9dcd5aeSmrg CC=$lt_save_CC 8558d9dcd5aeSmrg CFLAGS=$lt_save_CFLAGS 8559d9dcd5aeSmrgfi # test "$_lt_disable_FC" != yes 8560191cded7Smrg 8561d9dcd5aeSmrgAC_LANG_POP 8562d9dcd5aeSmrg])# _LT_LANG_FC_CONFIG 8563191cded7Smrg 8564191cded7Smrg 8565d9dcd5aeSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 8566d9dcd5aeSmrg# -------------------------- 8567d9dcd5aeSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 8568d9dcd5aeSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8569d9dcd5aeSmrg# to write the compiler configuration to `libtool'. 8570d9dcd5aeSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 8571d9dcd5aeSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 8572d9dcd5aeSmrgAC_LANG_SAVE 8573d9dcd5aeSmrg 8574d9dcd5aeSmrg# Source file extension for Java test sources. 8575d9dcd5aeSmrgac_ext=java 8576d9dcd5aeSmrg 8577d9dcd5aeSmrg# Object file extension for compiled Java test sources. 8578d9dcd5aeSmrgobjext=o 8579d9dcd5aeSmrg_LT_TAGVAR(objext, $1)=$objext 8580d9dcd5aeSmrg 8581d9dcd5aeSmrg# Code to be used in simple compile tests 8582d9dcd5aeSmrglt_simple_compile_test_code="class foo {}" 8583d9dcd5aeSmrg 8584d9dcd5aeSmrg# Code to be used in simple link tests 8585d9dcd5aeSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8586d9dcd5aeSmrg 8587d9dcd5aeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8588d9dcd5aeSmrg_LT_TAG_COMPILER 8589d9dcd5aeSmrg 8590d9dcd5aeSmrg# save warnings/boilerplate of simple test code 8591d9dcd5aeSmrg_LT_COMPILER_BOILERPLATE 8592d9dcd5aeSmrg_LT_LINKER_BOILERPLATE 8593d9dcd5aeSmrg 8594d9dcd5aeSmrg# Allow CC to be a program name with arguments. 8595d9dcd5aeSmrglt_save_CC=$CC 8596d9dcd5aeSmrglt_save_CFLAGS=$CFLAGS 8597d9dcd5aeSmrglt_save_GCC=$GCC 8598d9dcd5aeSmrgGCC=yes 8599d9dcd5aeSmrgCC=${GCJ-"gcj"} 8600d9dcd5aeSmrgCFLAGS=$GCJFLAGS 8601d9dcd5aeSmrgcompiler=$CC 8602d9dcd5aeSmrg_LT_TAGVAR(compiler, $1)=$CC 8603d9dcd5aeSmrg_LT_TAGVAR(LD, $1)="$LD" 8604d9dcd5aeSmrg_LT_CC_BASENAME([$compiler]) 8605191cded7Smrg 8606d9dcd5aeSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 8607d9dcd5aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8608191cded7Smrg 8609d9dcd5aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8610d9dcd5aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8611d9dcd5aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8612191cded7Smrg 8613d9dcd5aeSmrgif test -n "$compiler"; then 8614d9dcd5aeSmrg _LT_COMPILER_NO_RTTI($1) 8615d9dcd5aeSmrg _LT_COMPILER_PIC($1) 8616d9dcd5aeSmrg _LT_COMPILER_C_O($1) 8617d9dcd5aeSmrg _LT_COMPILER_FILE_LOCKS($1) 8618d9dcd5aeSmrg _LT_LINKER_SHLIBS($1) 8619d9dcd5aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8620191cded7Smrg 8621d9dcd5aeSmrg _LT_CONFIG($1) 8622d9dcd5aeSmrgfi 8623191cded7Smrg 8624d9dcd5aeSmrgAC_LANG_RESTORE 8625191cded7Smrg 8626d9dcd5aeSmrgGCC=$lt_save_GCC 8627d9dcd5aeSmrgCC=$lt_save_CC 8628d9dcd5aeSmrgCFLAGS=$lt_save_CFLAGS 8629d9dcd5aeSmrg])# _LT_LANG_GCJ_CONFIG 8630191cded7Smrg 8631b290cf36Smrg 8632d9dcd5aeSmrg# _LT_LANG_GO_CONFIG([TAG]) 8633d9dcd5aeSmrg# -------------------------- 8634d9dcd5aeSmrg# Ensure that the configuration variables for the GNU Go compiler 8635d9dcd5aeSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8636d9dcd5aeSmrg# to write the compiler configuration to `libtool'. 8637d9dcd5aeSmrgm4_defun([_LT_LANG_GO_CONFIG], 8638d9dcd5aeSmrg[AC_REQUIRE([LT_PROG_GO])dnl 8639d9dcd5aeSmrgAC_LANG_SAVE 8640b290cf36Smrg 8641d9dcd5aeSmrg# Source file extension for Go test sources. 8642d9dcd5aeSmrgac_ext=go 8643191cded7Smrg 8644d9dcd5aeSmrg# Object file extension for compiled Go test sources. 8645d9dcd5aeSmrgobjext=o 8646d9dcd5aeSmrg_LT_TAGVAR(objext, $1)=$objext 8647b290cf36Smrg 8648d9dcd5aeSmrg# Code to be used in simple compile tests 8649d9dcd5aeSmrglt_simple_compile_test_code="package main; func main() { }" 8650b290cf36Smrg 8651d9dcd5aeSmrg# Code to be used in simple link tests 8652d9dcd5aeSmrglt_simple_link_test_code='package main; func main() { }' 8653b290cf36Smrg 8654d9dcd5aeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8655d9dcd5aeSmrg_LT_TAG_COMPILER 8656b290cf36Smrg 8657d9dcd5aeSmrg# save warnings/boilerplate of simple test code 8658d9dcd5aeSmrg_LT_COMPILER_BOILERPLATE 8659d9dcd5aeSmrg_LT_LINKER_BOILERPLATE 8660191cded7Smrg 8661d9dcd5aeSmrg# Allow CC to be a program name with arguments. 8662d9dcd5aeSmrglt_save_CC=$CC 8663d9dcd5aeSmrglt_save_CFLAGS=$CFLAGS 8664d9dcd5aeSmrglt_save_GCC=$GCC 8665d9dcd5aeSmrgGCC=yes 8666d9dcd5aeSmrgCC=${GOC-"gccgo"} 8667d9dcd5aeSmrgCFLAGS=$GOFLAGS 8668d9dcd5aeSmrgcompiler=$CC 8669d9dcd5aeSmrg_LT_TAGVAR(compiler, $1)=$CC 8670d9dcd5aeSmrg_LT_TAGVAR(LD, $1)="$LD" 8671d9dcd5aeSmrg_LT_CC_BASENAME([$compiler]) 8672191cded7Smrg 8673d9dcd5aeSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 8674d9dcd5aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8675191cded7Smrg 8676d9dcd5aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8677d9dcd5aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8678d9dcd5aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8679191cded7Smrg 8680d9dcd5aeSmrgif test -n "$compiler"; then 8681d9dcd5aeSmrg _LT_COMPILER_NO_RTTI($1) 8682d9dcd5aeSmrg _LT_COMPILER_PIC($1) 8683d9dcd5aeSmrg _LT_COMPILER_C_O($1) 8684d9dcd5aeSmrg _LT_COMPILER_FILE_LOCKS($1) 8685d9dcd5aeSmrg _LT_LINKER_SHLIBS($1) 8686d9dcd5aeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8687191cded7Smrg 8688d9dcd5aeSmrg _LT_CONFIG($1) 8689d9dcd5aeSmrgfi 8690191cded7Smrg 8691d9dcd5aeSmrgAC_LANG_RESTORE 8692191cded7Smrg 8693d9dcd5aeSmrgGCC=$lt_save_GCC 8694d9dcd5aeSmrgCC=$lt_save_CC 8695d9dcd5aeSmrgCFLAGS=$lt_save_CFLAGS 8696d9dcd5aeSmrg])# _LT_LANG_GO_CONFIG 8697191cded7Smrg 8698191cded7Smrg 8699d9dcd5aeSmrg# _LT_LANG_RC_CONFIG([TAG]) 8700d9dcd5aeSmrg# ------------------------- 8701d9dcd5aeSmrg# Ensure that the configuration variables for the Windows resource compiler 8702d9dcd5aeSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8703d9dcd5aeSmrg# to write the compiler configuration to `libtool'. 8704d9dcd5aeSmrgm4_defun([_LT_LANG_RC_CONFIG], 8705d9dcd5aeSmrg[AC_REQUIRE([LT_PROG_RC])dnl 8706d9dcd5aeSmrgAC_LANG_SAVE 8707191cded7Smrg 8708d9dcd5aeSmrg# Source file extension for RC test sources. 8709d9dcd5aeSmrgac_ext=rc 8710191cded7Smrg 8711d9dcd5aeSmrg# Object file extension for compiled RC test sources. 8712d9dcd5aeSmrgobjext=o 8713d9dcd5aeSmrg_LT_TAGVAR(objext, $1)=$objext 8714191cded7Smrg 8715d9dcd5aeSmrg# Code to be used in simple compile tests 8716d9dcd5aeSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8717191cded7Smrg 8718d9dcd5aeSmrg# Code to be used in simple link tests 8719d9dcd5aeSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 8720191cded7Smrg 8721d9dcd5aeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8722d9dcd5aeSmrg_LT_TAG_COMPILER 8723191cded7Smrg 8724d9dcd5aeSmrg# save warnings/boilerplate of simple test code 8725d9dcd5aeSmrg_LT_COMPILER_BOILERPLATE 8726d9dcd5aeSmrg_LT_LINKER_BOILERPLATE 8727d9dcd5aeSmrg 8728d9dcd5aeSmrg# Allow CC to be a program name with arguments. 8729d9dcd5aeSmrglt_save_CC="$CC" 8730d9dcd5aeSmrglt_save_CFLAGS=$CFLAGS 8731d9dcd5aeSmrglt_save_GCC=$GCC 8732d9dcd5aeSmrgGCC= 8733d9dcd5aeSmrgCC=${RC-"windres"} 8734d9dcd5aeSmrgCFLAGS= 8735d9dcd5aeSmrgcompiler=$CC 8736d9dcd5aeSmrg_LT_TAGVAR(compiler, $1)=$CC 8737d9dcd5aeSmrg_LT_CC_BASENAME([$compiler]) 8738d9dcd5aeSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8739d9dcd5aeSmrg 8740d9dcd5aeSmrgif test -n "$compiler"; then 8741d9dcd5aeSmrg : 8742d9dcd5aeSmrg _LT_CONFIG($1) 8743d9dcd5aeSmrgfi 8744d9dcd5aeSmrg 8745d9dcd5aeSmrgGCC=$lt_save_GCC 8746d9dcd5aeSmrgAC_LANG_RESTORE 8747d9dcd5aeSmrgCC=$lt_save_CC 8748d9dcd5aeSmrgCFLAGS=$lt_save_CFLAGS 8749d9dcd5aeSmrg])# _LT_LANG_RC_CONFIG 8750d9dcd5aeSmrg 8751d9dcd5aeSmrg 8752d9dcd5aeSmrg# LT_PROG_GCJ 8753d9dcd5aeSmrg# ----------- 8754d9dcd5aeSmrgAC_DEFUN([LT_PROG_GCJ], 8755d9dcd5aeSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8756d9dcd5aeSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8757d9dcd5aeSmrg [AC_CHECK_TOOL(GCJ, gcj,) 8758d9dcd5aeSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8759d9dcd5aeSmrg AC_SUBST(GCJFLAGS)])])[]dnl 8760d9dcd5aeSmrg]) 8761d9dcd5aeSmrg 8762d9dcd5aeSmrg# Old name: 8763d9dcd5aeSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8764d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 8765d9dcd5aeSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8766191cded7Smrg 8767191cded7Smrg 8768d9dcd5aeSmrg# LT_PROG_GO 8769d9dcd5aeSmrg# ---------- 8770d9dcd5aeSmrgAC_DEFUN([LT_PROG_GO], 8771d9dcd5aeSmrg[AC_CHECK_TOOL(GOC, gccgo,) 8772d9dcd5aeSmrg]) 8773191cded7Smrg 8774191cded7Smrg 8775d9dcd5aeSmrg# LT_PROG_RC 8776d9dcd5aeSmrg# ---------- 8777d9dcd5aeSmrgAC_DEFUN([LT_PROG_RC], 8778d9dcd5aeSmrg[AC_CHECK_TOOL(RC, windres,) 8779d9dcd5aeSmrg]) 8780191cded7Smrg 8781d9dcd5aeSmrg# Old name: 8782d9dcd5aeSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8783d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 8784d9dcd5aeSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8785191cded7Smrg 8786191cded7Smrg 8787d9dcd5aeSmrg# _LT_DECL_EGREP 8788d9dcd5aeSmrg# -------------- 8789d9dcd5aeSmrg# If we don't have a new enough Autoconf to choose the best grep 8790d9dcd5aeSmrg# available, choose the one first in the user's PATH. 8791d9dcd5aeSmrgm4_defun([_LT_DECL_EGREP], 8792d9dcd5aeSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8793d9dcd5aeSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8794d9dcd5aeSmrgtest -z "$GREP" && GREP=grep 8795d9dcd5aeSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8796d9dcd5aeSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8797d9dcd5aeSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8798d9dcd5aeSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8799d9dcd5aeSmrgAC_SUBST([GREP]) 8800d9dcd5aeSmrg]) 8801191cded7Smrg 8802191cded7Smrg 8803d9dcd5aeSmrg# _LT_DECL_OBJDUMP 8804d9dcd5aeSmrg# -------------- 8805d9dcd5aeSmrg# If we don't have a new enough Autoconf to choose the best objdump 8806d9dcd5aeSmrg# available, choose the one first in the user's PATH. 8807d9dcd5aeSmrgm4_defun([_LT_DECL_OBJDUMP], 8808d9dcd5aeSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8809d9dcd5aeSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8810d9dcd5aeSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8811d9dcd5aeSmrgAC_SUBST([OBJDUMP]) 8812d9dcd5aeSmrg]) 8813191cded7Smrg 8814d9dcd5aeSmrg# _LT_DECL_DLLTOOL 8815d9dcd5aeSmrg# ---------------- 8816d9dcd5aeSmrg# Ensure DLLTOOL variable is set. 8817d9dcd5aeSmrgm4_defun([_LT_DECL_DLLTOOL], 8818d9dcd5aeSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8819d9dcd5aeSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8820d9dcd5aeSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8821d9dcd5aeSmrgAC_SUBST([DLLTOOL]) 8822d9dcd5aeSmrg]) 8823191cded7Smrg 8824d9dcd5aeSmrg# _LT_DECL_SED 8825d9dcd5aeSmrg# ------------ 8826d9dcd5aeSmrg# Check for a fully-functional sed program, that truncates 8827d9dcd5aeSmrg# as few characters as possible. Prefer GNU sed if found. 8828d9dcd5aeSmrgm4_defun([_LT_DECL_SED], 8829d9dcd5aeSmrg[AC_PROG_SED 8830d9dcd5aeSmrgtest -z "$SED" && SED=sed 8831d9dcd5aeSmrgXsed="$SED -e 1s/^X//" 8832d9dcd5aeSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8833d9dcd5aeSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8834d9dcd5aeSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8835d9dcd5aeSmrg])# _LT_DECL_SED 8836191cded7Smrg 8837d9dcd5aeSmrgm4_ifndef([AC_PROG_SED], [ 8838d9dcd5aeSmrg# NOTE: This macro has been submitted for inclusion into # 8839d9dcd5aeSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8840d9dcd5aeSmrg# a released version of Autoconf we should remove this # 8841d9dcd5aeSmrg# macro and use it instead. # 8842191cded7Smrg 8843d9dcd5aeSmrgm4_defun([AC_PROG_SED], 8844d9dcd5aeSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8845d9dcd5aeSmrgAC_CACHE_VAL(lt_cv_path_SED, 8846d9dcd5aeSmrg[# Loop through the user's path and test for sed and gsed. 8847d9dcd5aeSmrg# Then use that list of sed's as ones to test for truncation. 8848d9dcd5aeSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8849d9dcd5aeSmrgfor as_dir in $PATH 8850d9dcd5aeSmrgdo 8851d9dcd5aeSmrg IFS=$as_save_IFS 8852d9dcd5aeSmrg test -z "$as_dir" && as_dir=. 8853d9dcd5aeSmrg for lt_ac_prog in sed gsed; do 8854d9dcd5aeSmrg for ac_exec_ext in '' $ac_executable_extensions; do 8855d9dcd5aeSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8856d9dcd5aeSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8857d9dcd5aeSmrg fi 8858d9dcd5aeSmrg done 8859d9dcd5aeSmrg done 8860d9dcd5aeSmrgdone 8861d9dcd5aeSmrgIFS=$as_save_IFS 8862d9dcd5aeSmrglt_ac_max=0 8863d9dcd5aeSmrglt_ac_count=0 8864d9dcd5aeSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8865d9dcd5aeSmrg# along with /bin/sed that truncates output. 8866d9dcd5aeSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8867d9dcd5aeSmrg test ! -f $lt_ac_sed && continue 8868d9dcd5aeSmrg cat /dev/null > conftest.in 8869d9dcd5aeSmrg lt_ac_count=0 8870d9dcd5aeSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8871d9dcd5aeSmrg # Check for GNU sed and select it if it is found. 8872d9dcd5aeSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8873d9dcd5aeSmrg lt_cv_path_SED=$lt_ac_sed 8874d9dcd5aeSmrg break 8875d9dcd5aeSmrg fi 8876d9dcd5aeSmrg while true; do 8877d9dcd5aeSmrg cat conftest.in conftest.in >conftest.tmp 8878d9dcd5aeSmrg mv conftest.tmp conftest.in 8879d9dcd5aeSmrg cp conftest.in conftest.nl 8880d9dcd5aeSmrg echo >>conftest.nl 8881d9dcd5aeSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8882d9dcd5aeSmrg cmp -s conftest.out conftest.nl || break 8883d9dcd5aeSmrg # 10000 chars as input seems more than enough 8884d9dcd5aeSmrg test $lt_ac_count -gt 10 && break 8885d9dcd5aeSmrg lt_ac_count=`expr $lt_ac_count + 1` 8886d9dcd5aeSmrg if test $lt_ac_count -gt $lt_ac_max; then 8887d9dcd5aeSmrg lt_ac_max=$lt_ac_count 8888d9dcd5aeSmrg lt_cv_path_SED=$lt_ac_sed 8889d9dcd5aeSmrg fi 8890d9dcd5aeSmrg done 8891d9dcd5aeSmrgdone 8892d9dcd5aeSmrg]) 8893d9dcd5aeSmrgSED=$lt_cv_path_SED 8894d9dcd5aeSmrgAC_SUBST([SED]) 8895d9dcd5aeSmrgAC_MSG_RESULT([$SED]) 8896d9dcd5aeSmrg])#AC_PROG_SED 8897d9dcd5aeSmrg])#m4_ifndef 8898191cded7Smrg 8899d9dcd5aeSmrg# Old name: 8900d9dcd5aeSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8901d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 8902d9dcd5aeSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8903191cded7Smrg 8904b290cf36Smrg 8905d9dcd5aeSmrg# _LT_CHECK_SHELL_FEATURES 8906d9dcd5aeSmrg# ------------------------ 8907d9dcd5aeSmrg# Find out whether the shell is Bourne or XSI compatible, 8908d9dcd5aeSmrg# or has some other useful features. 8909d9dcd5aeSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8910d9dcd5aeSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8911d9dcd5aeSmrg# Try some XSI features 8912d9dcd5aeSmrgxsi_shell=no 8913d9dcd5aeSmrg( _lt_dummy="a/b/c" 8914d9dcd5aeSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8915d9dcd5aeSmrg = c,a/b,b/c, \ 8916d9dcd5aeSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 8917d9dcd5aeSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8918d9dcd5aeSmrg && xsi_shell=yes 8919d9dcd5aeSmrgAC_MSG_RESULT([$xsi_shell]) 8920d9dcd5aeSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8921191cded7Smrg 8922d9dcd5aeSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 8923d9dcd5aeSmrglt_shell_append=no 8924d9dcd5aeSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8925d9dcd5aeSmrg >/dev/null 2>&1 \ 8926d9dcd5aeSmrg && lt_shell_append=yes 8927d9dcd5aeSmrgAC_MSG_RESULT([$lt_shell_append]) 8928d9dcd5aeSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8929191cded7Smrg 8930d9dcd5aeSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8931d9dcd5aeSmrg lt_unset=unset 8932d9dcd5aeSmrgelse 8933d9dcd5aeSmrg lt_unset=false 8934d9dcd5aeSmrgfi 8935d9dcd5aeSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8936191cded7Smrg 8937d9dcd5aeSmrg# test EBCDIC or ASCII 8938d9dcd5aeSmrgcase `echo X|tr X '\101'` in 8939d9dcd5aeSmrg A) # ASCII based system 8940d9dcd5aeSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8941d9dcd5aeSmrg lt_SP2NL='tr \040 \012' 8942d9dcd5aeSmrg lt_NL2SP='tr \015\012 \040\040' 8943d9dcd5aeSmrg ;; 8944d9dcd5aeSmrg *) # EBCDIC based system 8945d9dcd5aeSmrg lt_SP2NL='tr \100 \n' 8946d9dcd5aeSmrg lt_NL2SP='tr \r\n \100\100' 8947d9dcd5aeSmrg ;; 8948d9dcd5aeSmrgesac 8949d9dcd5aeSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8950d9dcd5aeSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8951d9dcd5aeSmrg])# _LT_CHECK_SHELL_FEATURES 8952b290cf36Smrg 8953b290cf36Smrg 8954d9dcd5aeSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 8955d9dcd5aeSmrg# ------------------------------------------------------ 8956d9dcd5aeSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 8957d9dcd5aeSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 8958d9dcd5aeSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 8959d9dcd5aeSmrg[dnl { 8960d9dcd5aeSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 8961d9dcd5aeSmrg$1 ()\ 8962d9dcd5aeSmrg{\ 8963d9dcd5aeSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 8964d9dcd5aeSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 8965d9dcd5aeSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 8966d9dcd5aeSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8967d9dcd5aeSmrgtest 0 -eq $? || _lt_function_replace_fail=: 8968d9dcd5aeSmrg]) 8969b290cf36Smrg 8970191cded7Smrg 8971d9dcd5aeSmrg# _LT_PROG_REPLACE_SHELLFNS 8972d9dcd5aeSmrg# ------------------------- 8973d9dcd5aeSmrg# Replace existing portable implementations of several shell functions with 8974d9dcd5aeSmrg# equivalent extended shell implementations where those features are available.. 8975d9dcd5aeSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 8976d9dcd5aeSmrg[if test x"$xsi_shell" = xyes; then 8977d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 8978d9dcd5aeSmrg case ${1} in 8979d9dcd5aeSmrg */*) func_dirname_result="${1%/*}${2}" ;; 8980d9dcd5aeSmrg * ) func_dirname_result="${3}" ;; 8981d9dcd5aeSmrg esac]) 8982d9dcd5aeSmrg 8983d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 8984d9dcd5aeSmrg func_basename_result="${1##*/}"]) 8985d9dcd5aeSmrg 8986d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 8987d9dcd5aeSmrg case ${1} in 8988d9dcd5aeSmrg */*) func_dirname_result="${1%/*}${2}" ;; 8989d9dcd5aeSmrg * ) func_dirname_result="${3}" ;; 8990d9dcd5aeSmrg esac 8991d9dcd5aeSmrg func_basename_result="${1##*/}"]) 8992191cded7Smrg 8993d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 8994d9dcd5aeSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 8995d9dcd5aeSmrg # positional parameters, so assign one to ordinary parameter first. 8996d9dcd5aeSmrg func_stripname_result=${3} 8997d9dcd5aeSmrg func_stripname_result=${func_stripname_result#"${1}"} 8998d9dcd5aeSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 8999b290cf36Smrg 9000d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 9001d9dcd5aeSmrg func_split_long_opt_name=${1%%=*} 9002d9dcd5aeSmrg func_split_long_opt_arg=${1#*=}]) 9003b290cf36Smrg 9004d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 9005d9dcd5aeSmrg func_split_short_opt_arg=${1#??} 9006d9dcd5aeSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 9007b290cf36Smrg 9008d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 9009d9dcd5aeSmrg case ${1} in 9010d9dcd5aeSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9011d9dcd5aeSmrg *) func_lo2o_result=${1} ;; 9012d9dcd5aeSmrg esac]) 9013b290cf36Smrg 9014d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 9015b290cf36Smrg 9016d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 9017191cded7Smrg 9018d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 9019d9dcd5aeSmrgfi 9020191cded7Smrg 9021d9dcd5aeSmrgif test x"$lt_shell_append" = xyes; then 9022d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 9023191cded7Smrg 9024d9dcd5aeSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 9025d9dcd5aeSmrg func_quote_for_eval "${2}" 9026d9dcd5aeSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 9027d9dcd5aeSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 9028b290cf36Smrg 9029d9dcd5aeSmrg # Save a `func_append' function call where possible by direct use of '+=' 9030d9dcd5aeSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 9031d9dcd5aeSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 9032d9dcd5aeSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9033d9dcd5aeSmrg test 0 -eq $? || _lt_function_replace_fail=: 9034d9dcd5aeSmrgelse 9035d9dcd5aeSmrg # Save a `func_append' function call even when '+=' is not available 9036d9dcd5aeSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 9037d9dcd5aeSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 9038d9dcd5aeSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9039d9dcd5aeSmrg test 0 -eq $? || _lt_function_replace_fail=: 9040d9dcd5aeSmrgfi 9041b290cf36Smrg 9042d9dcd5aeSmrgif test x"$_lt_function_replace_fail" = x":"; then 9043d9dcd5aeSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 9044d9dcd5aeSmrgfi 9045d9dcd5aeSmrg]) 9046b290cf36Smrg 9047d9dcd5aeSmrg# _LT_PATH_CONVERSION_FUNCTIONS 9048d9dcd5aeSmrg# ----------------------------- 9049d9dcd5aeSmrg# Determine which file name conversion functions should be used by 9050d9dcd5aeSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 9051d9dcd5aeSmrg# for certain cross-compile configurations and native mingw. 9052d9dcd5aeSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 9053d9dcd5aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9054d9dcd5aeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 9055d9dcd5aeSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 9056d9dcd5aeSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 9057d9dcd5aeSmrg[case $host in 9058d9dcd5aeSmrg *-*-mingw* ) 9059d9dcd5aeSmrg case $build in 9060d9dcd5aeSmrg *-*-mingw* ) # actually msys 9061d9dcd5aeSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 9062ba064abeSmrg ;; 9063d9dcd5aeSmrg *-*-cygwin* ) 9064d9dcd5aeSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 9065d9dcd5aeSmrg ;; 9066d9dcd5aeSmrg * ) # otherwise, assume *nix 9067d9dcd5aeSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 9068d9dcd5aeSmrg ;; 9069d9dcd5aeSmrg esac 9070d9dcd5aeSmrg ;; 9071d9dcd5aeSmrg *-*-cygwin* ) 9072d9dcd5aeSmrg case $build in 9073d9dcd5aeSmrg *-*-mingw* ) # actually msys 9074d9dcd5aeSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 9075d9dcd5aeSmrg ;; 9076d9dcd5aeSmrg *-*-cygwin* ) 9077d9dcd5aeSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 9078d9dcd5aeSmrg ;; 9079d9dcd5aeSmrg * ) # otherwise, assume *nix 9080d9dcd5aeSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 9081d9dcd5aeSmrg ;; 9082d9dcd5aeSmrg esac 9083d9dcd5aeSmrg ;; 9084d9dcd5aeSmrg * ) # unhandled hosts (and "normal" native builds) 9085d9dcd5aeSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 9086d9dcd5aeSmrg ;; 9087d9dcd5aeSmrgesac 9088d9dcd5aeSmrg]) 9089d9dcd5aeSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 9090d9dcd5aeSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 9091d9dcd5aeSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 9092d9dcd5aeSmrg [0], [convert $build file names to $host format])dnl 9093d9dcd5aeSmrg 9094d9dcd5aeSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 9095d9dcd5aeSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 9096d9dcd5aeSmrg[#assume ordinary cross tools, or native build. 9097d9dcd5aeSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 9098d9dcd5aeSmrgcase $host in 9099d9dcd5aeSmrg *-*-mingw* ) 9100d9dcd5aeSmrg case $build in 9101d9dcd5aeSmrg *-*-mingw* ) # actually msys 9102d9dcd5aeSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 9103ba064abeSmrg ;; 9104ba064abeSmrg esac 9105d9dcd5aeSmrg ;; 9106d9dcd5aeSmrgesac 9107d9dcd5aeSmrg]) 9108d9dcd5aeSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 9109d9dcd5aeSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 9110d9dcd5aeSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 9111d9dcd5aeSmrg [0], [convert $build files to toolchain format])dnl 9112d9dcd5aeSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 9113b290cf36Smrg 9114d9dcd5aeSmrg# Helper functions for option handling. -*- Autoconf -*- 9115d9dcd5aeSmrg# 9116d9dcd5aeSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9117d9dcd5aeSmrg# Inc. 9118d9dcd5aeSmrg# Written by Gary V. Vaughan, 2004 9119d9dcd5aeSmrg# 9120d9dcd5aeSmrg# This file is free software; the Free Software Foundation gives 9121d9dcd5aeSmrg# unlimited permission to copy and/or distribute it, with or without 9122d9dcd5aeSmrg# modifications, as long as this notice is preserved. 9123b290cf36Smrg 9124d9dcd5aeSmrg# serial 7 ltoptions.m4 9125b290cf36Smrg 9126d9dcd5aeSmrg# This is to help aclocal find these macros, as it can't see m4_define. 9127d9dcd5aeSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9128b290cf36Smrg 9129b290cf36Smrg 9130d9dcd5aeSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9131d9dcd5aeSmrg# ------------------------------------------ 9132d9dcd5aeSmrgm4_define([_LT_MANGLE_OPTION], 9133d9dcd5aeSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9134b290cf36Smrg 9135b290cf36Smrg 9136d9dcd5aeSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9137d9dcd5aeSmrg# --------------------------------------- 9138d9dcd5aeSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9139d9dcd5aeSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9140d9dcd5aeSmrg# saved as a flag. 9141d9dcd5aeSmrgm4_define([_LT_SET_OPTION], 9142d9dcd5aeSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9143d9dcd5aeSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9144d9dcd5aeSmrg _LT_MANGLE_DEFUN([$1], [$2]), 9145d9dcd5aeSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9146d9dcd5aeSmrg]) 9147b290cf36Smrg 9148b290cf36Smrg 9149d9dcd5aeSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9150d9dcd5aeSmrg# ------------------------------------------------------------ 9151d9dcd5aeSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9152d9dcd5aeSmrgm4_define([_LT_IF_OPTION], 9153d9dcd5aeSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9154b290cf36Smrg 9155b290cf36Smrg 9156d9dcd5aeSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9157d9dcd5aeSmrg# ------------------------------------------------------- 9158d9dcd5aeSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9159d9dcd5aeSmrg# are set. 9160d9dcd5aeSmrgm4_define([_LT_UNLESS_OPTIONS], 9161d9dcd5aeSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9162d9dcd5aeSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9163d9dcd5aeSmrg [m4_define([$0_found])])])[]dnl 9164d9dcd5aeSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9165d9dcd5aeSmrg])[]dnl 9166d9dcd5aeSmrg]) 9167b290cf36Smrg 9168b290cf36Smrg 9169d9dcd5aeSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9170d9dcd5aeSmrg# ---------------------------------------- 9171d9dcd5aeSmrg# OPTION-LIST is a space-separated list of Libtool options associated 9172d9dcd5aeSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 9173d9dcd5aeSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9174d9dcd5aeSmrg# the unknown option and exit. 9175d9dcd5aeSmrgm4_defun([_LT_SET_OPTIONS], 9176d9dcd5aeSmrg[# Set options 9177d9dcd5aeSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9178d9dcd5aeSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 9179b290cf36Smrg 9180d9dcd5aeSmrgm4_if([$1],[LT_INIT],[ 9181d9dcd5aeSmrg dnl 9182d9dcd5aeSmrg dnl Simply set some default values (i.e off) if boolean options were not 9183d9dcd5aeSmrg dnl specified: 9184d9dcd5aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9185d9dcd5aeSmrg ]) 9186d9dcd5aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9187d9dcd5aeSmrg ]) 9188d9dcd5aeSmrg dnl 9189d9dcd5aeSmrg dnl If no reference was made to various pairs of opposing options, then 9190d9dcd5aeSmrg dnl we run the default mode handler for the pair. For example, if neither 9191d9dcd5aeSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 9192d9dcd5aeSmrg dnl archives by default: 9193d9dcd5aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9194d9dcd5aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9195d9dcd5aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9196d9dcd5aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9197d9dcd5aeSmrg [_LT_ENABLE_FAST_INSTALL]) 9198d9dcd5aeSmrg ]) 9199d9dcd5aeSmrg])# _LT_SET_OPTIONS 9200191cded7Smrg 9201191cded7Smrg 9202191cded7Smrg 9203d9dcd5aeSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9204d9dcd5aeSmrg# ----------------------------------------- 9205d9dcd5aeSmrgm4_define([_LT_MANGLE_DEFUN], 9206d9dcd5aeSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9207191cded7Smrg 9208191cded7Smrg 9209d9dcd5aeSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9210d9dcd5aeSmrg# ----------------------------------------------- 9211d9dcd5aeSmrgm4_define([LT_OPTION_DEFINE], 9212d9dcd5aeSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9213d9dcd5aeSmrg])# LT_OPTION_DEFINE 9214191cded7Smrg 9215191cded7Smrg 9216d9dcd5aeSmrg# dlopen 9217d9dcd5aeSmrg# ------ 9218d9dcd5aeSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9219d9dcd5aeSmrg]) 9220d9dcd5aeSmrg 9221d9dcd5aeSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 9222d9dcd5aeSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 9223d9dcd5aeSmrgAC_DIAGNOSE([obsolete], 9224d9dcd5aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9225d9dcd5aeSmrgput the `dlopen' option into LT_INIT's first parameter.]) 9226d9dcd5aeSmrg]) 9227191cded7Smrg 9228d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 9229d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9230b290cf36Smrg 9231b290cf36Smrg 9232d9dcd5aeSmrg# win32-dll 9233d9dcd5aeSmrg# --------- 9234d9dcd5aeSmrg# Declare package support for building win32 dll's. 9235d9dcd5aeSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 9236d9dcd5aeSmrg[enable_win32_dll=yes 9237b290cf36Smrg 9238d9dcd5aeSmrgcase $host in 9239d9dcd5aeSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9240d9dcd5aeSmrg AC_CHECK_TOOL(AS, as, false) 9241d9dcd5aeSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9242d9dcd5aeSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 9243ba064abeSmrg ;; 9244ba064abeSmrgesac 9245b290cf36Smrg 9246d9dcd5aeSmrgtest -z "$AS" && AS=as 9247d9dcd5aeSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9248191cded7Smrg 9249d9dcd5aeSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 9250d9dcd5aeSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9251b290cf36Smrg 9252d9dcd5aeSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9253d9dcd5aeSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9254d9dcd5aeSmrg])# win32-dll 9255b290cf36Smrg 9256d9dcd5aeSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9257d9dcd5aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9258d9dcd5aeSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 9259d9dcd5aeSmrgAC_DIAGNOSE([obsolete], 9260d9dcd5aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9261d9dcd5aeSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 9262d9dcd5aeSmrg]) 9263b290cf36Smrg 9264d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 9265d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9266b290cf36Smrg 9267191cded7Smrg 9268d9dcd5aeSmrg# _LT_ENABLE_SHARED([DEFAULT]) 9269d9dcd5aeSmrg# ---------------------------- 9270d9dcd5aeSmrg# implement the --enable-shared flag, and supports the `shared' and 9271d9dcd5aeSmrg# `disable-shared' LT_INIT options. 9272d9dcd5aeSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9273d9dcd5aeSmrgm4_define([_LT_ENABLE_SHARED], 9274d9dcd5aeSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9275d9dcd5aeSmrgAC_ARG_ENABLE([shared], 9276d9dcd5aeSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9277d9dcd5aeSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9278d9dcd5aeSmrg [p=${PACKAGE-default} 9279d9dcd5aeSmrg case $enableval in 9280d9dcd5aeSmrg yes) enable_shared=yes ;; 9281d9dcd5aeSmrg no) enable_shared=no ;; 9282d9dcd5aeSmrg *) 9283d9dcd5aeSmrg enable_shared=no 9284d9dcd5aeSmrg # Look at the argument we got. We use all the common list separators. 9285d9dcd5aeSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9286d9dcd5aeSmrg for pkg in $enableval; do 9287d9dcd5aeSmrg IFS="$lt_save_ifs" 9288d9dcd5aeSmrg if test "X$pkg" = "X$p"; then 9289d9dcd5aeSmrg enable_shared=yes 9290d9dcd5aeSmrg fi 9291d9dcd5aeSmrg done 9292d9dcd5aeSmrg IFS="$lt_save_ifs" 9293d9dcd5aeSmrg ;; 9294d9dcd5aeSmrg esac], 9295d9dcd5aeSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9296ba064abeSmrg 9297d9dcd5aeSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 9298d9dcd5aeSmrg [Whether or not to build shared libraries]) 9299d9dcd5aeSmrg])# _LT_ENABLE_SHARED 9300ba064abeSmrg 9301d9dcd5aeSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9302d9dcd5aeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9303ba064abeSmrg 9304d9dcd5aeSmrg# Old names: 9305d9dcd5aeSmrgAC_DEFUN([AC_ENABLE_SHARED], 9306d9dcd5aeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9307d9dcd5aeSmrg]) 9308ba064abeSmrg 9309d9dcd5aeSmrgAC_DEFUN([AC_DISABLE_SHARED], 9310d9dcd5aeSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9311d9dcd5aeSmrg]) 9312191cded7Smrg 9313d9dcd5aeSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9314d9dcd5aeSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9315b290cf36Smrg 9316d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 9317d9dcd5aeSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 9318d9dcd5aeSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9319b290cf36Smrg 9320b290cf36Smrg 9321b290cf36Smrg 9322d9dcd5aeSmrg# _LT_ENABLE_STATIC([DEFAULT]) 9323d9dcd5aeSmrg# ---------------------------- 9324d9dcd5aeSmrg# implement the --enable-static flag, and support the `static' and 9325d9dcd5aeSmrg# `disable-static' LT_INIT options. 9326d9dcd5aeSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9327d9dcd5aeSmrgm4_define([_LT_ENABLE_STATIC], 9328d9dcd5aeSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9329d9dcd5aeSmrgAC_ARG_ENABLE([static], 9330d9dcd5aeSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9331d9dcd5aeSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9332d9dcd5aeSmrg [p=${PACKAGE-default} 9333d9dcd5aeSmrg case $enableval in 9334d9dcd5aeSmrg yes) enable_static=yes ;; 9335d9dcd5aeSmrg no) enable_static=no ;; 9336d9dcd5aeSmrg *) 9337d9dcd5aeSmrg enable_static=no 9338d9dcd5aeSmrg # Look at the argument we got. We use all the common list separators. 9339d9dcd5aeSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9340d9dcd5aeSmrg for pkg in $enableval; do 9341d9dcd5aeSmrg IFS="$lt_save_ifs" 9342d9dcd5aeSmrg if test "X$pkg" = "X$p"; then 9343d9dcd5aeSmrg enable_static=yes 9344d9dcd5aeSmrg fi 9345d9dcd5aeSmrg done 9346d9dcd5aeSmrg IFS="$lt_save_ifs" 9347d9dcd5aeSmrg ;; 9348d9dcd5aeSmrg esac], 9349d9dcd5aeSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9350b290cf36Smrg 9351d9dcd5aeSmrg _LT_DECL([build_old_libs], [enable_static], [0], 9352d9dcd5aeSmrg [Whether or not to build static libraries]) 9353d9dcd5aeSmrg])# _LT_ENABLE_STATIC 9354b290cf36Smrg 9355d9dcd5aeSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9356d9dcd5aeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9357b290cf36Smrg 9358d9dcd5aeSmrg# Old names: 9359d9dcd5aeSmrgAC_DEFUN([AC_ENABLE_STATIC], 9360d9dcd5aeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9361d9dcd5aeSmrg]) 9362b290cf36Smrg 9363d9dcd5aeSmrgAC_DEFUN([AC_DISABLE_STATIC], 9364d9dcd5aeSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 9365d9dcd5aeSmrg]) 9366b290cf36Smrg 9367d9dcd5aeSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9368d9dcd5aeSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9369b290cf36Smrg 9370d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 9371d9dcd5aeSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 9372d9dcd5aeSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9373b290cf36Smrg 9374b290cf36Smrg 9375b290cf36Smrg 9376d9dcd5aeSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9377d9dcd5aeSmrg# ---------------------------------- 9378d9dcd5aeSmrg# implement the --enable-fast-install flag, and support the `fast-install' 9379d9dcd5aeSmrg# and `disable-fast-install' LT_INIT options. 9380d9dcd5aeSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9381d9dcd5aeSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 9382d9dcd5aeSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9383d9dcd5aeSmrgAC_ARG_ENABLE([fast-install], 9384d9dcd5aeSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9385d9dcd5aeSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9386d9dcd5aeSmrg [p=${PACKAGE-default} 9387d9dcd5aeSmrg case $enableval in 9388d9dcd5aeSmrg yes) enable_fast_install=yes ;; 9389d9dcd5aeSmrg no) enable_fast_install=no ;; 9390d9dcd5aeSmrg *) 9391d9dcd5aeSmrg enable_fast_install=no 9392d9dcd5aeSmrg # Look at the argument we got. We use all the common list separators. 9393d9dcd5aeSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9394d9dcd5aeSmrg for pkg in $enableval; do 9395d9dcd5aeSmrg IFS="$lt_save_ifs" 9396d9dcd5aeSmrg if test "X$pkg" = "X$p"; then 9397d9dcd5aeSmrg enable_fast_install=yes 9398d9dcd5aeSmrg fi 9399d9dcd5aeSmrg done 9400d9dcd5aeSmrg IFS="$lt_save_ifs" 9401d9dcd5aeSmrg ;; 9402d9dcd5aeSmrg esac], 9403d9dcd5aeSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9404b290cf36Smrg 9405d9dcd5aeSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 9406d9dcd5aeSmrg [Whether or not to optimize for fast installation])dnl 9407d9dcd5aeSmrg])# _LT_ENABLE_FAST_INSTALL 9408ba064abeSmrg 9409d9dcd5aeSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9410d9dcd5aeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9411b290cf36Smrg 9412d9dcd5aeSmrg# Old names: 9413d9dcd5aeSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 9414d9dcd5aeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9415d9dcd5aeSmrgAC_DIAGNOSE([obsolete], 9416d9dcd5aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9417d9dcd5aeSmrgthe `fast-install' option into LT_INIT's first parameter.]) 9418d9dcd5aeSmrg]) 9419b290cf36Smrg 9420d9dcd5aeSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 9421d9dcd5aeSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9422d9dcd5aeSmrgAC_DIAGNOSE([obsolete], 9423d9dcd5aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9424d9dcd5aeSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 9425d9dcd5aeSmrg]) 9426b290cf36Smrg 9427d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 9428d9dcd5aeSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9429d9dcd5aeSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9430b290cf36Smrg 9431b290cf36Smrg 9432d9dcd5aeSmrg# _LT_WITH_PIC([MODE]) 9433d9dcd5aeSmrg# -------------------- 9434d9dcd5aeSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9435d9dcd5aeSmrg# LT_INIT options. 9436d9dcd5aeSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9437d9dcd5aeSmrgm4_define([_LT_WITH_PIC], 9438d9dcd5aeSmrg[AC_ARG_WITH([pic], 9439d9dcd5aeSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9440d9dcd5aeSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9441d9dcd5aeSmrg [lt_p=${PACKAGE-default} 9442d9dcd5aeSmrg case $withval in 9443d9dcd5aeSmrg yes|no) pic_mode=$withval ;; 9444d9dcd5aeSmrg *) 9445d9dcd5aeSmrg pic_mode=default 9446d9dcd5aeSmrg # Look at the argument we got. We use all the common list separators. 9447d9dcd5aeSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9448d9dcd5aeSmrg for lt_pkg in $withval; do 9449d9dcd5aeSmrg IFS="$lt_save_ifs" 9450d9dcd5aeSmrg if test "X$lt_pkg" = "X$lt_p"; then 9451d9dcd5aeSmrg pic_mode=yes 9452ba064abeSmrg fi 9453d9dcd5aeSmrg done 9454d9dcd5aeSmrg IFS="$lt_save_ifs" 9455d9dcd5aeSmrg ;; 9456d9dcd5aeSmrg esac], 9457d9dcd5aeSmrg [pic_mode=default]) 9458b290cf36Smrg 9459d9dcd5aeSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9460b290cf36Smrg 9461d9dcd5aeSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9462d9dcd5aeSmrg])# _LT_WITH_PIC 9463b290cf36Smrg 9464d9dcd5aeSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9465d9dcd5aeSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9466b290cf36Smrg 9467d9dcd5aeSmrg# Old name: 9468d9dcd5aeSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 9469d9dcd5aeSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 9470d9dcd5aeSmrgAC_DIAGNOSE([obsolete], 9471d9dcd5aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9472d9dcd5aeSmrgput the `pic-only' option into LT_INIT's first parameter.]) 9473d9dcd5aeSmrg]) 9474191cded7Smrg 9475d9dcd5aeSmrgdnl aclocal-1.4 backwards compatibility: 9476d9dcd5aeSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9477191cded7Smrg 9478191cded7Smrg 9479d9dcd5aeSmrgm4_define([_LTDL_MODE], []) 9480d9dcd5aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9481d9dcd5aeSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 9482d9dcd5aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 9483d9dcd5aeSmrg [m4_define([_LTDL_MODE], [recursive])]) 9484d9dcd5aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 9485d9dcd5aeSmrg [m4_define([_LTDL_MODE], [subproject])]) 9486191cded7Smrg 9487d9dcd5aeSmrgm4_define([_LTDL_TYPE], []) 9488d9dcd5aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 9489d9dcd5aeSmrg [m4_define([_LTDL_TYPE], [installable])]) 9490d9dcd5aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 9491d9dcd5aeSmrg [m4_define([_LTDL_TYPE], [convenience])]) 9492191cded7Smrg 9493d9dcd5aeSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9494d9dcd5aeSmrg# 9495d9dcd5aeSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9496d9dcd5aeSmrg# Written by Gary V. Vaughan, 2004 9497d9dcd5aeSmrg# 9498d9dcd5aeSmrg# This file is free software; the Free Software Foundation gives 9499d9dcd5aeSmrg# unlimited permission to copy and/or distribute it, with or without 9500d9dcd5aeSmrg# modifications, as long as this notice is preserved. 9501b290cf36Smrg 9502d9dcd5aeSmrg# serial 6 ltsugar.m4 9503b290cf36Smrg 9504d9dcd5aeSmrg# This is to help aclocal find these macros, as it can't see m4_define. 9505d9dcd5aeSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9506191cded7Smrg 9507191cded7Smrg 9508d9dcd5aeSmrg# lt_join(SEP, ARG1, [ARG2...]) 9509d9dcd5aeSmrg# ----------------------------- 9510d9dcd5aeSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9511d9dcd5aeSmrg# associated separator. 9512d9dcd5aeSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9513d9dcd5aeSmrg# versions in m4sugar had bugs. 9514d9dcd5aeSmrgm4_define([lt_join], 9515d9dcd5aeSmrg[m4_if([$#], [1], [], 9516d9dcd5aeSmrg [$#], [2], [[$2]], 9517d9dcd5aeSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9518d9dcd5aeSmrgm4_define([_lt_join], 9519d9dcd5aeSmrg[m4_if([$#$2], [2], [], 9520d9dcd5aeSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9521191cded7Smrg 9522191cded7Smrg 9523d9dcd5aeSmrg# lt_car(LIST) 9524d9dcd5aeSmrg# lt_cdr(LIST) 9525d9dcd5aeSmrg# ------------ 9526d9dcd5aeSmrg# Manipulate m4 lists. 9527d9dcd5aeSmrg# These macros are necessary as long as will still need to support 9528d9dcd5aeSmrg# Autoconf-2.59 which quotes differently. 9529d9dcd5aeSmrgm4_define([lt_car], [[$1]]) 9530d9dcd5aeSmrgm4_define([lt_cdr], 9531d9dcd5aeSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9532d9dcd5aeSmrg [$#], 1, [], 9533d9dcd5aeSmrg [m4_dquote(m4_shift($@))])]) 9534d9dcd5aeSmrgm4_define([lt_unquote], $1) 9535191cded7Smrg 9536191cded7Smrg 9537d9dcd5aeSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9538d9dcd5aeSmrg# ------------------------------------------ 9539d9dcd5aeSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9540d9dcd5aeSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 9541d9dcd5aeSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9542d9dcd5aeSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9543d9dcd5aeSmrg# than defined and empty). 9544d9dcd5aeSmrg# 9545d9dcd5aeSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 9546d9dcd5aeSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9547d9dcd5aeSmrgm4_define([lt_append], 9548d9dcd5aeSmrg[m4_define([$1], 9549d9dcd5aeSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9550191cded7Smrg 9551191cded7Smrg 9552b290cf36Smrg 9553d9dcd5aeSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9554d9dcd5aeSmrg# ---------------------------------------------------------- 9555d9dcd5aeSmrg# Produce a SEP delimited list of all paired combinations of elements of 9556d9dcd5aeSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9557d9dcd5aeSmrg# has the form PREFIXmINFIXSUFFIXn. 9558d9dcd5aeSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 9559d9dcd5aeSmrgm4_define([lt_combine], 9560d9dcd5aeSmrg[m4_if(m4_eval([$# > 3]), [1], 9561d9dcd5aeSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9562d9dcd5aeSmrg[[m4_foreach([_Lt_prefix], [$2], 9563d9dcd5aeSmrg [m4_foreach([_Lt_suffix], 9564d9dcd5aeSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9565d9dcd5aeSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9566b290cf36Smrg 9567b290cf36Smrg 9568d9dcd5aeSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9569d9dcd5aeSmrg# ----------------------------------------------------------------------- 9570d9dcd5aeSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9571d9dcd5aeSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9572d9dcd5aeSmrgm4_define([lt_if_append_uniq], 9573d9dcd5aeSmrg[m4_ifdef([$1], 9574d9dcd5aeSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9575d9dcd5aeSmrg [lt_append([$1], [$2], [$3])$4], 9576d9dcd5aeSmrg [$5])], 9577d9dcd5aeSmrg [lt_append([$1], [$2], [$3])$4])]) 9578191cded7Smrg 9579191cded7Smrg 9580d9dcd5aeSmrg# lt_dict_add(DICT, KEY, VALUE) 9581d9dcd5aeSmrg# ----------------------------- 9582d9dcd5aeSmrgm4_define([lt_dict_add], 9583d9dcd5aeSmrg[m4_define([$1($2)], [$3])]) 9584191cded7Smrg 9585191cded7Smrg 9586d9dcd5aeSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9587d9dcd5aeSmrg# -------------------------------------------- 9588d9dcd5aeSmrgm4_define([lt_dict_add_subkey], 9589d9dcd5aeSmrg[m4_define([$1($2:$3)], [$4])]) 9590191cded7Smrg 9591ba064abeSmrg 9592d9dcd5aeSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9593d9dcd5aeSmrg# ---------------------------------- 9594d9dcd5aeSmrgm4_define([lt_dict_fetch], 9595d9dcd5aeSmrg[m4_ifval([$3], 9596d9dcd5aeSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9597d9dcd5aeSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9598ba064abeSmrg 9599ba064abeSmrg 9600d9dcd5aeSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9601d9dcd5aeSmrg# ----------------------------------------------------------------- 9602d9dcd5aeSmrgm4_define([lt_if_dict_fetch], 9603d9dcd5aeSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9604d9dcd5aeSmrg [$5], 9605d9dcd5aeSmrg [$6])]) 9606ba064abeSmrg 9607ba064abeSmrg 9608d9dcd5aeSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9609d9dcd5aeSmrg# -------------------------------------------------------------- 9610d9dcd5aeSmrgm4_define([lt_dict_filter], 9611d9dcd5aeSmrg[m4_if([$5], [], [], 9612d9dcd5aeSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 9613d9dcd5aeSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9614d9dcd5aeSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9615b290cf36Smrg]) 9616191cded7Smrg 9617d9dcd5aeSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 9618d9dcd5aeSmrg# 9619d9dcd5aeSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 9620d9dcd5aeSmrg# Written by Scott James Remnant, 2004 9621d9dcd5aeSmrg# 9622d9dcd5aeSmrg# This file is free software; the Free Software Foundation gives 9623d9dcd5aeSmrg# unlimited permission to copy and/or distribute it, with or without 9624d9dcd5aeSmrg# modifications, as long as this notice is preserved. 9625191cded7Smrg 9626d9dcd5aeSmrg# @configure_input@ 9627191cded7Smrg 9628d9dcd5aeSmrg# serial 3337 ltversion.m4 9629d9dcd5aeSmrg# This file is part of GNU Libtool 9630191cded7Smrg 9631d9dcd5aeSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 9632d9dcd5aeSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 9633191cded7Smrg 9634d9dcd5aeSmrgAC_DEFUN([LTVERSION_VERSION], 9635d9dcd5aeSmrg[macro_version='2.4.2' 9636d9dcd5aeSmrgmacro_revision='1.3337' 9637d9dcd5aeSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9638d9dcd5aeSmrg_LT_DECL(, macro_revision, 0) 9639ba064abeSmrg]) 9640191cded7Smrg 9641d9dcd5aeSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9642d9dcd5aeSmrg# 9643d9dcd5aeSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9644d9dcd5aeSmrg# Written by Scott James Remnant, 2004. 9645d9dcd5aeSmrg# 9646d9dcd5aeSmrg# This file is free software; the Free Software Foundation gives 9647d9dcd5aeSmrg# unlimited permission to copy and/or distribute it, with or without 9648d9dcd5aeSmrg# modifications, as long as this notice is preserved. 9649191cded7Smrg 9650d9dcd5aeSmrg# serial 5 lt~obsolete.m4 9651191cded7Smrg 9652d9dcd5aeSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 9653d9dcd5aeSmrg# 9654d9dcd5aeSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9655d9dcd5aeSmrg# which have later been changed to m4_define as they aren't part of the 9656d9dcd5aeSmrg# exported API, or moved to Autoconf or Automake where they belong. 9657d9dcd5aeSmrg# 9658d9dcd5aeSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9659d9dcd5aeSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9660d9dcd5aeSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 9661d9dcd5aeSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9662d9dcd5aeSmrg# and doesn't know about Autoconf macros at all.) 9663d9dcd5aeSmrg# 9664d9dcd5aeSmrg# So we provide this file, which has a silly filename so it's always 9665d9dcd5aeSmrg# included after everything else. This provides aclocal with the 9666d9dcd5aeSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9667d9dcd5aeSmrg# because those macros already exist, or will be overwritten later. 9668d9dcd5aeSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9669d9dcd5aeSmrg# 9670d9dcd5aeSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9671d9dcd5aeSmrg# Yes, that means every name once taken will need to remain here until 9672d9dcd5aeSmrg# we give up compatibility with versions before 1.7, at which point 9673d9dcd5aeSmrg# we need to keep only those names which we still refer to. 9674191cded7Smrg 9675d9dcd5aeSmrg# This is to help aclocal find these macros, as it can't see m4_define. 9676d9dcd5aeSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9677191cded7Smrg 9678d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9679d9dcd5aeSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9680d9dcd5aeSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9681d9dcd5aeSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9682d9dcd5aeSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9683d9dcd5aeSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9684d9dcd5aeSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9685d9dcd5aeSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9686d9dcd5aeSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9687d9dcd5aeSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9688d9dcd5aeSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9689d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9690d9dcd5aeSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9691d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9692d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9693d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9694d9dcd5aeSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9695d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9696d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9697d9dcd5aeSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9698d9dcd5aeSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9699d9dcd5aeSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9700d9dcd5aeSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9701d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9702d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9703d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9704d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9705d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9706d9dcd5aeSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9707d9dcd5aeSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9708d9dcd5aeSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9709d9dcd5aeSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9710d9dcd5aeSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9711d9dcd5aeSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9712d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9713d9dcd5aeSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9714d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9715d9dcd5aeSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9716d9dcd5aeSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9717d9dcd5aeSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9718d9dcd5aeSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9719d9dcd5aeSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9720d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9721d9dcd5aeSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9722d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9723d9dcd5aeSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9724d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9725d9dcd5aeSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9726d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9727d9dcd5aeSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9728d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9729d9dcd5aeSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9730d9dcd5aeSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9731d9dcd5aeSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9732d9dcd5aeSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9733d9dcd5aeSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9734d9dcd5aeSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9735d9dcd5aeSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9736d9dcd5aeSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9737d9dcd5aeSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9738d9dcd5aeSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9739191cded7Smrg 9740d9dcd5aeSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9741d9dcd5aeSmrg# 9742d9dcd5aeSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9743d9dcd5aeSmrg# 9744d9dcd5aeSmrg# This program is free software; you can redistribute it and/or modify 9745d9dcd5aeSmrg# it under the terms of the GNU General Public License as published by 9746d9dcd5aeSmrg# the Free Software Foundation; either version 2 of the License, or 9747d9dcd5aeSmrg# (at your option) any later version. 9748d9dcd5aeSmrg# 9749d9dcd5aeSmrg# This program is distributed in the hope that it will be useful, but 9750d9dcd5aeSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9751d9dcd5aeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9752d9dcd5aeSmrg# General Public License for more details. 9753d9dcd5aeSmrg# 9754d9dcd5aeSmrg# You should have received a copy of the GNU General Public License 9755d9dcd5aeSmrg# along with this program; if not, write to the Free Software 9756d9dcd5aeSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9757d9dcd5aeSmrg# 9758d9dcd5aeSmrg# As a special exception to the GNU General Public License, if you 9759d9dcd5aeSmrg# distribute this file as part of a program that contains a 9760d9dcd5aeSmrg# configuration script generated by Autoconf, you may include it under 9761d9dcd5aeSmrg# the same distribution terms that you use for the rest of that program. 9762191cded7Smrg 9763d9dcd5aeSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9764d9dcd5aeSmrg# ---------------------------------- 9765d9dcd5aeSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9766d9dcd5aeSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9767d9dcd5aeSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9768d9dcd5aeSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9769d9dcd5aeSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9770d9dcd5aeSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9771d9dcd5aeSmrgfi 9772d9dcd5aeSmrgif test -n "$PKG_CONFIG"; then 9773d9dcd5aeSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 9774d9dcd5aeSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9775d9dcd5aeSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9776d9dcd5aeSmrg AC_MSG_RESULT([yes]) 9777d9dcd5aeSmrg else 9778d9dcd5aeSmrg AC_MSG_RESULT([no]) 9779d9dcd5aeSmrg PKG_CONFIG="" 9780d9dcd5aeSmrg fi 9781d9dcd5aeSmrg 9782d9dcd5aeSmrgfi[]dnl 9783d9dcd5aeSmrg])# PKG_PROG_PKG_CONFIG 9784191cded7Smrg 9785d9dcd5aeSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9786d9dcd5aeSmrg# 9787d9dcd5aeSmrg# Check to see whether a particular set of modules exists. Similar 9788d9dcd5aeSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9789d9dcd5aeSmrg# 9790d9dcd5aeSmrg# 9791d9dcd5aeSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9792d9dcd5aeSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 9793d9dcd5aeSmrg# PKG_CHECK_EXISTS manually 9794d9dcd5aeSmrg# -------------------------------------------------------------- 9795d9dcd5aeSmrgAC_DEFUN([PKG_CHECK_EXISTS], 9796d9dcd5aeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9797d9dcd5aeSmrgif test -n "$PKG_CONFIG" && \ 9798d9dcd5aeSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9799d9dcd5aeSmrg m4_ifval([$2], [$2], [:]) 9800d9dcd5aeSmrgm4_ifvaln([$3], [else 9801d9dcd5aeSmrg $3])dnl 9802d9dcd5aeSmrgfi]) 9803191cded7Smrg 9804191cded7Smrg 9805d9dcd5aeSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9806d9dcd5aeSmrg# --------------------------------------------- 9807d9dcd5aeSmrgm4_define([_PKG_CONFIG], 9808d9dcd5aeSmrg[if test -n "$$1"; then 9809d9dcd5aeSmrg pkg_cv_[]$1="$$1" 9810d9dcd5aeSmrg elif test -n "$PKG_CONFIG"; then 9811d9dcd5aeSmrg PKG_CHECK_EXISTS([$3], 9812d9dcd5aeSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9813d9dcd5aeSmrg [pkg_failed=yes]) 9814d9dcd5aeSmrg else 9815d9dcd5aeSmrg pkg_failed=untried 9816d9dcd5aeSmrgfi[]dnl 9817d9dcd5aeSmrg])# _PKG_CONFIG 9818191cded7Smrg 9819d9dcd5aeSmrg# _PKG_SHORT_ERRORS_SUPPORTED 9820d9dcd5aeSmrg# ----------------------------- 9821d9dcd5aeSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9822d9dcd5aeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9823d9dcd5aeSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9824d9dcd5aeSmrg _pkg_short_errors_supported=yes 9825ba064abeSmrgelse 9826d9dcd5aeSmrg _pkg_short_errors_supported=no 9827d9dcd5aeSmrgfi[]dnl 9828d9dcd5aeSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 9829d9dcd5aeSmrg 9830d9dcd5aeSmrg 9831d9dcd5aeSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9832d9dcd5aeSmrg# [ACTION-IF-NOT-FOUND]) 9833d9dcd5aeSmrg# 9834d9dcd5aeSmrg# 9835d9dcd5aeSmrg# Note that if there is a possibility the first call to 9836d9dcd5aeSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 9837d9dcd5aeSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9838d9dcd5aeSmrg# 9839d9dcd5aeSmrg# 9840d9dcd5aeSmrg# -------------------------------------------------------------- 9841d9dcd5aeSmrgAC_DEFUN([PKG_CHECK_MODULES], 9842d9dcd5aeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9843d9dcd5aeSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9844d9dcd5aeSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9845191cded7Smrg 9846d9dcd5aeSmrgpkg_failed=no 9847d9dcd5aeSmrgAC_MSG_CHECKING([for $1]) 9848191cded7Smrg 9849d9dcd5aeSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9850d9dcd5aeSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9851191cded7Smrg 9852d9dcd5aeSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9853d9dcd5aeSmrgand $1[]_LIBS to avoid the need to call pkg-config. 9854d9dcd5aeSmrgSee the pkg-config man page for more details.]) 9855191cded7Smrg 9856d9dcd5aeSmrgif test $pkg_failed = yes; then 9857d9dcd5aeSmrg _PKG_SHORT_ERRORS_SUPPORTED 9858d9dcd5aeSmrg if test $_pkg_short_errors_supported = yes; then 9859d9dcd5aeSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9860d9dcd5aeSmrg else 9861d9dcd5aeSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9862d9dcd5aeSmrg fi 9863d9dcd5aeSmrg # Put the nasty error message in config.log where it belongs 9864d9dcd5aeSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9865191cded7Smrg 9866d9dcd5aeSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 9867d9dcd5aeSmrg[Package requirements ($2) were not met: 9868191cded7Smrg 9869d9dcd5aeSmrg$$1_PKG_ERRORS 9870191cded7Smrg 9871d9dcd5aeSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9872d9dcd5aeSmrginstalled software in a non-standard prefix. 9873191cded7Smrg 9874d9dcd5aeSmrg_PKG_TEXT 9875d9dcd5aeSmrg])], 9876d9dcd5aeSmrg [AC_MSG_RESULT([no]) 9877d9dcd5aeSmrg $4]) 9878d9dcd5aeSmrgelif test $pkg_failed = untried; then 9879d9dcd5aeSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 9880d9dcd5aeSmrg[The pkg-config script could not be found or is too old. Make sure it 9881d9dcd5aeSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 9882d9dcd5aeSmrgpath to pkg-config. 9883191cded7Smrg 9884d9dcd5aeSmrg_PKG_TEXT 9885191cded7Smrg 9886d9dcd5aeSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9887d9dcd5aeSmrg [$4]) 9888d9dcd5aeSmrgelse 9889d9dcd5aeSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9890d9dcd5aeSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9891d9dcd5aeSmrg AC_MSG_RESULT([yes]) 9892d9dcd5aeSmrg ifelse([$3], , :, [$3]) 9893d9dcd5aeSmrgfi[]dnl 9894d9dcd5aeSmrg])# PKG_CHECK_MODULES 9895191cded7Smrg 9896d9dcd5aeSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9897d9dcd5aeSmrgdnl 9898d9dcd5aeSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 989958deefebSmrgdnl 9900d9dcd5aeSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9901d9dcd5aeSmrgdnl copy of this software and associated documentation files (the "Software"), 9902d9dcd5aeSmrgdnl to deal in the Software without restriction, including without limitation 9903d9dcd5aeSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9904d9dcd5aeSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 9905d9dcd5aeSmrgdnl Software is furnished to do so, subject to the following conditions: 9906d9dcd5aeSmrgdnl 9907d9dcd5aeSmrgdnl The above copyright notice and this permission notice (including the next 9908d9dcd5aeSmrgdnl paragraph) shall be included in all copies or substantial portions of the 9909d9dcd5aeSmrgdnl Software. 9910d9dcd5aeSmrgdnl 9911d9dcd5aeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9912d9dcd5aeSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9913d9dcd5aeSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9914d9dcd5aeSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9915d9dcd5aeSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9916d9dcd5aeSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9917d9dcd5aeSmrgdnl DEALINGS IN THE SOFTWARE. 9918ba064abeSmrg 9919d9dcd5aeSmrg# XORG_MACROS_VERSION(required-version) 9920d9dcd5aeSmrg# ------------------------------------- 9921d9dcd5aeSmrg# Minimum version: 1.1.0 9922d9dcd5aeSmrg# 9923d9dcd5aeSmrg# If you're using a macro added in Version 1.1 or newer, include this in 9924d9dcd5aeSmrg# your configure.ac with the minimum required version, such as: 9925d9dcd5aeSmrg# XORG_MACROS_VERSION(1.1) 9926d9dcd5aeSmrg# 9927d9dcd5aeSmrg# To ensure that this macro is defined, also add: 9928d9dcd5aeSmrg# m4_ifndef([XORG_MACROS_VERSION], 9929d9dcd5aeSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9930d9dcd5aeSmrg# 9931d9dcd5aeSmrg# 993258deefebSmrg# See the "minimum version" comment for each macro you use to see what 9933d9dcd5aeSmrg# version you require. 9934d9dcd5aeSmrgm4_defun([XORG_MACROS_VERSION],[ 993558deefebSmrgm4_define([vers_have], [1.19.0]) 9936d9dcd5aeSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9937d9dcd5aeSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9938d9dcd5aeSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9939d9dcd5aeSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9940d9dcd5aeSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9941d9dcd5aeSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9942d9dcd5aeSmrgm4_undefine([vers_have]) 9943d9dcd5aeSmrgm4_undefine([maj_have]) 9944d9dcd5aeSmrgm4_undefine([maj_needed]) 9945d9dcd5aeSmrg]) # XORG_MACROS_VERSION 9946ba064abeSmrg 9947d9dcd5aeSmrg# XORG_PROG_RAWCPP() 9948d9dcd5aeSmrg# ------------------ 9949d9dcd5aeSmrg# Minimum version: 1.0.0 9950d9dcd5aeSmrg# 9951d9dcd5aeSmrg# Find cpp program and necessary flags for use in pre-processing text files 9952d9dcd5aeSmrg# such as man pages and config files 9953d9dcd5aeSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9954d9dcd5aeSmrgAC_REQUIRE([AC_PROG_CPP]) 995558deefebSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9956d9dcd5aeSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9957191cded7Smrg 9958d9dcd5aeSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9959d9dcd5aeSmrg# which is not the best choice for supporting other OS'es, but covers most 9960d9dcd5aeSmrg# of the ones we need for now. 9961d9dcd5aeSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9962d9dcd5aeSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9963d9dcd5aeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9964d9dcd5aeSmrg AC_MSG_RESULT([no]) 9965d9dcd5aeSmrgelse 9966d9dcd5aeSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9967d9dcd5aeSmrg RAWCPPFLAGS=-undef 9968d9dcd5aeSmrg AC_MSG_RESULT([yes]) 9969d9dcd5aeSmrg # under Cygwin unix is still defined even with -undef 9970d9dcd5aeSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9971d9dcd5aeSmrg RAWCPPFLAGS="-undef -ansi" 9972d9dcd5aeSmrg AC_MSG_RESULT([yes, with -ansi]) 9973d9dcd5aeSmrg else 9974d9dcd5aeSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9975d9dcd5aeSmrg fi 9976d9dcd5aeSmrgfi 9977d9dcd5aeSmrgrm -f conftest.$ac_ext 9978191cded7Smrg 9979d9dcd5aeSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9980d9dcd5aeSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9981d9dcd5aeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9982d9dcd5aeSmrg AC_MSG_RESULT([no]) 9983d9dcd5aeSmrgelse 9984d9dcd5aeSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 998558deefebSmrg TRADITIONALCPPFLAGS="-traditional" 9986d9dcd5aeSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9987d9dcd5aeSmrg AC_MSG_RESULT([yes]) 9988d9dcd5aeSmrg else 9989d9dcd5aeSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9990d9dcd5aeSmrg fi 9991d9dcd5aeSmrgfi 9992d9dcd5aeSmrgrm -f conftest.$ac_ext 9993d9dcd5aeSmrgAC_SUBST(RAWCPPFLAGS) 999458deefebSmrgAC_SUBST(TRADITIONALCPPFLAGS) 9995d9dcd5aeSmrg]) # XORG_PROG_RAWCPP 9996191cded7Smrg 9997d9dcd5aeSmrg# XORG_MANPAGE_SECTIONS() 9998d9dcd5aeSmrg# ----------------------- 9999d9dcd5aeSmrg# Minimum version: 1.0.0 10000d9dcd5aeSmrg# 10001d9dcd5aeSmrg# Determine which sections man pages go in for the different man page types 10002d9dcd5aeSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 10003d9dcd5aeSmrg# Not sure if there's any better way than just hardcoding by OS name. 10004d9dcd5aeSmrg# Override default settings by setting environment variables 10005d9dcd5aeSmrg# Added MAN_SUBSTS in version 1.8 10006d9dcd5aeSmrg# Added AC_PROG_SED in version 1.8 10007191cded7Smrg 10008d9dcd5aeSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 10009d9dcd5aeSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10010d9dcd5aeSmrgAC_REQUIRE([AC_PROG_SED]) 10011191cded7Smrg 10012d9dcd5aeSmrgif test x$APP_MAN_SUFFIX = x ; then 10013d9dcd5aeSmrg APP_MAN_SUFFIX=1 10014d9dcd5aeSmrgfi 10015d9dcd5aeSmrgif test x$APP_MAN_DIR = x ; then 10016d9dcd5aeSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 10017d9dcd5aeSmrgfi 10018191cded7Smrg 10019d9dcd5aeSmrgif test x$LIB_MAN_SUFFIX = x ; then 10020d9dcd5aeSmrg LIB_MAN_SUFFIX=3 10021d9dcd5aeSmrgfi 10022d9dcd5aeSmrgif test x$LIB_MAN_DIR = x ; then 10023d9dcd5aeSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 10024d9dcd5aeSmrgfi 10025ba064abeSmrg 10026d9dcd5aeSmrgif test x$FILE_MAN_SUFFIX = x ; then 10027d9dcd5aeSmrg case $host_os in 10028d9dcd5aeSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 10029d9dcd5aeSmrg *) FILE_MAN_SUFFIX=5 ;; 10030d9dcd5aeSmrg esac 10031d9dcd5aeSmrgfi 10032d9dcd5aeSmrgif test x$FILE_MAN_DIR = x ; then 10033d9dcd5aeSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 10034d9dcd5aeSmrgfi 10035ba064abeSmrg 10036d9dcd5aeSmrgif test x$MISC_MAN_SUFFIX = x ; then 10037d9dcd5aeSmrg case $host_os in 10038d9dcd5aeSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 10039d9dcd5aeSmrg *) MISC_MAN_SUFFIX=7 ;; 10040d9dcd5aeSmrg esac 10041d9dcd5aeSmrgfi 10042d9dcd5aeSmrgif test x$MISC_MAN_DIR = x ; then 10043d9dcd5aeSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 10044d9dcd5aeSmrgfi 10045ba064abeSmrg 10046d9dcd5aeSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 10047d9dcd5aeSmrg case $host_os in 10048d9dcd5aeSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 10049d9dcd5aeSmrg *) DRIVER_MAN_SUFFIX=4 ;; 10050d9dcd5aeSmrg esac 10051d9dcd5aeSmrgfi 10052d9dcd5aeSmrgif test x$DRIVER_MAN_DIR = x ; then 10053d9dcd5aeSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 10054d9dcd5aeSmrgfi 10055ba064abeSmrg 10056d9dcd5aeSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 10057d9dcd5aeSmrg case $host_os in 10058d9dcd5aeSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 10059d9dcd5aeSmrg *) ADMIN_MAN_SUFFIX=8 ;; 10060d9dcd5aeSmrg esac 10061d9dcd5aeSmrgfi 10062d9dcd5aeSmrgif test x$ADMIN_MAN_DIR = x ; then 10063d9dcd5aeSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 10064d9dcd5aeSmrgfi 10065ba064abeSmrg 10066ba064abeSmrg 10067d9dcd5aeSmrgAC_SUBST([APP_MAN_SUFFIX]) 10068d9dcd5aeSmrgAC_SUBST([LIB_MAN_SUFFIX]) 10069d9dcd5aeSmrgAC_SUBST([FILE_MAN_SUFFIX]) 10070d9dcd5aeSmrgAC_SUBST([MISC_MAN_SUFFIX]) 10071d9dcd5aeSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 10072d9dcd5aeSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 10073d9dcd5aeSmrgAC_SUBST([APP_MAN_DIR]) 10074d9dcd5aeSmrgAC_SUBST([LIB_MAN_DIR]) 10075d9dcd5aeSmrgAC_SUBST([FILE_MAN_DIR]) 10076d9dcd5aeSmrgAC_SUBST([MISC_MAN_DIR]) 10077d9dcd5aeSmrgAC_SUBST([DRIVER_MAN_DIR]) 10078d9dcd5aeSmrgAC_SUBST([ADMIN_MAN_DIR]) 10079ba064abeSmrg 10080d9dcd5aeSmrgXORG_MAN_PAGE="X Version 11" 10081d9dcd5aeSmrgAC_SUBST([XORG_MAN_PAGE]) 10082d9dcd5aeSmrgMAN_SUBSTS="\ 10083d9dcd5aeSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10084d9dcd5aeSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10085d9dcd5aeSmrg -e 's|__xservername__|Xorg|g' \ 10086d9dcd5aeSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 10087d9dcd5aeSmrg -e 's|__projectroot__|\$(prefix)|g' \ 10088d9dcd5aeSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 10089d9dcd5aeSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 10090d9dcd5aeSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 10091d9dcd5aeSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 10092d9dcd5aeSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 10093d9dcd5aeSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 10094d9dcd5aeSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 10095d9dcd5aeSmrgAC_SUBST([MAN_SUBSTS]) 10096ba064abeSmrg 10097d9dcd5aeSmrg]) # XORG_MANPAGE_SECTIONS 10098b290cf36Smrg 10099d9dcd5aeSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 10100d9dcd5aeSmrg# ------------------------ 10101d9dcd5aeSmrg# Minimum version: 1.7.0 10102ba064abeSmrg# 10103d9dcd5aeSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 10104d9dcd5aeSmrg# provided by xorg-sgml-doctools, if installed. 10105d9dcd5aeSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 10106d9dcd5aeSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 10107d9dcd5aeSmrgXORG_SGML_PATH= 10108d9dcd5aeSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 10109d9dcd5aeSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 10110d9dcd5aeSmrg [m4_ifval([$1],[:], 10111d9dcd5aeSmrg [if test x"$cross_compiling" != x"yes" ; then 10112d9dcd5aeSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10113d9dcd5aeSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 10114d9dcd5aeSmrg fi]) 10115d9dcd5aeSmrg ]) 10116191cded7Smrg 10117d9dcd5aeSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10118d9dcd5aeSmrg# the path and the name of the doc stylesheet 10119d9dcd5aeSmrgif test "x$XORG_SGML_PATH" != "x" ; then 10120d9dcd5aeSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 10121d9dcd5aeSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10122d9dcd5aeSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10123d9dcd5aeSmrgelse 10124d9dcd5aeSmrg AC_MSG_RESULT([no]) 10125d9dcd5aeSmrgfi 10126191cded7Smrg 10127d9dcd5aeSmrgAC_SUBST(XORG_SGML_PATH) 10128d9dcd5aeSmrgAC_SUBST(STYLESHEET_SRCDIR) 10129d9dcd5aeSmrgAC_SUBST(XSL_STYLESHEET) 10130d9dcd5aeSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10131d9dcd5aeSmrg]) # XORG_CHECK_SGML_DOCTOOLS 10132191cded7Smrg 10133d9dcd5aeSmrg# XORG_CHECK_LINUXDOC 10134d9dcd5aeSmrg# ------------------- 10135d9dcd5aeSmrg# Minimum version: 1.0.0 10136d9dcd5aeSmrg# 10137d9dcd5aeSmrg# Defines the variable MAKE_TEXT if the necessary tools and 10138d9dcd5aeSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10139d9dcd5aeSmrg# Whether or not the necessary tools and files are found can be checked 10140d9dcd5aeSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10141d9dcd5aeSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 10142d9dcd5aeSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10143d9dcd5aeSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10144191cded7Smrg 10145d9dcd5aeSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10146191cded7Smrg 10147d9dcd5aeSmrgAC_MSG_CHECKING([whether to build documentation]) 10148b290cf36Smrg 10149d9dcd5aeSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10150d9dcd5aeSmrg BUILDDOC=yes 10151d9dcd5aeSmrgelse 10152d9dcd5aeSmrg BUILDDOC=no 10153d9dcd5aeSmrgfi 10154191cded7Smrg 10155d9dcd5aeSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10156191cded7Smrg 10157d9dcd5aeSmrgAC_MSG_RESULT([$BUILDDOC]) 10158b290cf36Smrg 10159d9dcd5aeSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10160b290cf36Smrg 10161d9dcd5aeSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10162d9dcd5aeSmrg BUILDPDFDOC=yes 10163d9dcd5aeSmrgelse 10164d9dcd5aeSmrg BUILDPDFDOC=no 10165d9dcd5aeSmrgfi 10166191cded7Smrg 10167d9dcd5aeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10168191cded7Smrg 10169d9dcd5aeSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10170191cded7Smrg 10171d9dcd5aeSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10172d9dcd5aeSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10173d9dcd5aeSmrgMAKE_PDF="$PS2PDF" 10174d9dcd5aeSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10175191cded7Smrg 10176d9dcd5aeSmrgAC_SUBST(MAKE_TEXT) 10177d9dcd5aeSmrgAC_SUBST(MAKE_PS) 10178d9dcd5aeSmrgAC_SUBST(MAKE_PDF) 10179d9dcd5aeSmrgAC_SUBST(MAKE_HTML) 10180d9dcd5aeSmrg]) # XORG_CHECK_LINUXDOC 10181191cded7Smrg 10182d9dcd5aeSmrg# XORG_CHECK_DOCBOOK 10183d9dcd5aeSmrg# ------------------- 10184d9dcd5aeSmrg# Minimum version: 1.0.0 10185d9dcd5aeSmrg# 10186d9dcd5aeSmrg# Checks for the ability to build output formats from SGML DocBook source. 10187d9dcd5aeSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10188d9dcd5aeSmrg# indicates whether the necessary tools and files are found and, if set, 10189d9dcd5aeSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10190d9dcd5aeSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 10191d9dcd5aeSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10192191cded7Smrg 10193d9dcd5aeSmrgBUILDTXTDOC=no 10194d9dcd5aeSmrgBUILDPDFDOC=no 10195d9dcd5aeSmrgBUILDPSDOC=no 10196d9dcd5aeSmrgBUILDHTMLDOC=no 10197191cded7Smrg 10198d9dcd5aeSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 10199d9dcd5aeSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10200d9dcd5aeSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 10201d9dcd5aeSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10202b290cf36Smrg 10203d9dcd5aeSmrgAC_MSG_CHECKING([whether to build text documentation]) 10204d9dcd5aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10205d9dcd5aeSmrg test x$BUILD_TXTDOC != xno; then 10206d9dcd5aeSmrg BUILDTXTDOC=yes 10207d9dcd5aeSmrgfi 10208d9dcd5aeSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10209d9dcd5aeSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10210ba064abeSmrg 10211d9dcd5aeSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 10212d9dcd5aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10213d9dcd5aeSmrg test x$BUILD_PDFDOC != xno; then 10214d9dcd5aeSmrg BUILDPDFDOC=yes 10215d9dcd5aeSmrgfi 10216d9dcd5aeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10217d9dcd5aeSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10218ba064abeSmrg 10219d9dcd5aeSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 10220d9dcd5aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10221d9dcd5aeSmrg test x$BUILD_PSDOC != xno; then 10222d9dcd5aeSmrg BUILDPSDOC=yes 10223d9dcd5aeSmrgfi 10224d9dcd5aeSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10225d9dcd5aeSmrgAC_MSG_RESULT([$BUILDPSDOC]) 10226191cded7Smrg 10227d9dcd5aeSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 10228d9dcd5aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10229d9dcd5aeSmrg test x$BUILD_HTMLDOC != xno; then 10230d9dcd5aeSmrg BUILDHTMLDOC=yes 10231d9dcd5aeSmrgfi 10232d9dcd5aeSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10233d9dcd5aeSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10234191cded7Smrg 10235d9dcd5aeSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10236d9dcd5aeSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10237d9dcd5aeSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10238d9dcd5aeSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10239191cded7Smrg 10240d9dcd5aeSmrgAC_SUBST(MAKE_TEXT) 10241d9dcd5aeSmrgAC_SUBST(MAKE_PS) 10242d9dcd5aeSmrgAC_SUBST(MAKE_PDF) 10243d9dcd5aeSmrgAC_SUBST(MAKE_HTML) 10244d9dcd5aeSmrg]) # XORG_CHECK_DOCBOOK 10245191cded7Smrg 10246d9dcd5aeSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10247d9dcd5aeSmrg# ---------------- 10248d9dcd5aeSmrg# Minimum version: 1.5.0 10249d9dcd5aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10250d9dcd5aeSmrg# 10251d9dcd5aeSmrg# Documentation tools are not always available on all platforms and sometimes 10252d9dcd5aeSmrg# not at the appropriate level. This macro enables a module to test for the 10253d9dcd5aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10254d9dcd5aeSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 10255d9dcd5aeSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 10256d9dcd5aeSmrg# --with-xmlto assumes 'auto'. 10257d9dcd5aeSmrg# 10258d9dcd5aeSmrg# Interface to module: 10259d9dcd5aeSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10260d9dcd5aeSmrg# XMLTO: returns the path of the xmlto program found 10261d9dcd5aeSmrg# returns the path set by the user in the environment 10262d9dcd5aeSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 10263d9dcd5aeSmrg# 'no' user instructs the module not to use xmlto 10264d9dcd5aeSmrg# 10265d9dcd5aeSmrg# Added in version 1.10.0 10266d9dcd5aeSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10267d9dcd5aeSmrg# xmlto for text output requires either lynx, links, or w3m browsers 10268d9dcd5aeSmrg# 10269d9dcd5aeSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10270d9dcd5aeSmrg# 10271d9dcd5aeSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 10272d9dcd5aeSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 10273d9dcd5aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 10274d9dcd5aeSmrgAC_ARG_WITH(xmlto, 10275d9dcd5aeSmrg AS_HELP_STRING([--with-xmlto], 10276d9dcd5aeSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10277d9dcd5aeSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 10278d9dcd5aeSmrgm4_undefine([_defopt]) 10279191cded7Smrg 10280d9dcd5aeSmrgif test "x$use_xmlto" = x"auto"; then 10281d9dcd5aeSmrg AC_PATH_PROG([XMLTO], [xmlto]) 10282d9dcd5aeSmrg if test "x$XMLTO" = "x"; then 10283d9dcd5aeSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10284d9dcd5aeSmrg have_xmlto=no 10285d9dcd5aeSmrg else 10286d9dcd5aeSmrg have_xmlto=yes 10287d9dcd5aeSmrg fi 10288d9dcd5aeSmrgelif test "x$use_xmlto" = x"yes" ; then 10289d9dcd5aeSmrg AC_PATH_PROG([XMLTO], [xmlto]) 10290d9dcd5aeSmrg if test "x$XMLTO" = "x"; then 10291d9dcd5aeSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10292d9dcd5aeSmrg fi 10293d9dcd5aeSmrg have_xmlto=yes 10294d9dcd5aeSmrgelif test "x$use_xmlto" = x"no" ; then 10295d9dcd5aeSmrg if test "x$XMLTO" != "x"; then 10296d9dcd5aeSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10297d9dcd5aeSmrg fi 10298d9dcd5aeSmrg have_xmlto=no 10299d9dcd5aeSmrgelse 10300d9dcd5aeSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10301d9dcd5aeSmrgfi 10302191cded7Smrg 10303d9dcd5aeSmrg# Test for a minimum version of xmlto, if provided. 10304d9dcd5aeSmrgm4_ifval([$1], 10305d9dcd5aeSmrg[if test "$have_xmlto" = yes; then 10306d9dcd5aeSmrg # scrape the xmlto version 10307d9dcd5aeSmrg AC_MSG_CHECKING([the xmlto version]) 10308d9dcd5aeSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10309d9dcd5aeSmrg AC_MSG_RESULT([$xmlto_version]) 10310d9dcd5aeSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 10311d9dcd5aeSmrg [if test "x$use_xmlto" = xauto; then 10312d9dcd5aeSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10313d9dcd5aeSmrg have_xmlto=no 10314d9dcd5aeSmrg else 10315d9dcd5aeSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10316d9dcd5aeSmrg fi]) 10317d9dcd5aeSmrgfi]) 10318191cded7Smrg 10319d9dcd5aeSmrg# Test for the ability of xmlto to generate a text target 10320d9dcd5aeSmrghave_xmlto_text=no 10321d9dcd5aeSmrgcat > conftest.xml << "EOF" 10322d9dcd5aeSmrgEOF 10323d9dcd5aeSmrgAS_IF([test "$have_xmlto" = yes], 10324d9dcd5aeSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10325d9dcd5aeSmrg [have_xmlto_text=yes], 10326d9dcd5aeSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10327d9dcd5aeSmrgrm -f conftest.xml 10328d9dcd5aeSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10329d9dcd5aeSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10330d9dcd5aeSmrg]) # XORG_WITH_XMLTO 10331191cded7Smrg 10332d9dcd5aeSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10333d9dcd5aeSmrg# -------------------------------------------- 10334d9dcd5aeSmrg# Minimum version: 1.12.0 10335d9dcd5aeSmrg# Minimum version for optional DEFAULT argument: 1.12.0 10336d9dcd5aeSmrg# 10337d9dcd5aeSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10338d9dcd5aeSmrg# XML-based language used for the transformation of XML documents. 10339d9dcd5aeSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10340d9dcd5aeSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 10341d9dcd5aeSmrg# The XSLT processor is often used as a standalone tool for transformations. 10342d9dcd5aeSmrg# It should not be assumed that this tool is used only to work with documnetation. 10343d9dcd5aeSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10344d9dcd5aeSmrg# 10345d9dcd5aeSmrg# Interface to module: 10346d9dcd5aeSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10347d9dcd5aeSmrg# XSLTPROC: returns the path of the xsltproc program found 10348d9dcd5aeSmrg# returns the path set by the user in the environment 10349d9dcd5aeSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10350d9dcd5aeSmrg# 'no' user instructs the module not to use xsltproc 10351d9dcd5aeSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 10352d9dcd5aeSmrg# 10353d9dcd5aeSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10354d9dcd5aeSmrg# 10355d9dcd5aeSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 10356d9dcd5aeSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10357d9dcd5aeSmrg# Preserves the interface, should it be implemented later 10358d9dcd5aeSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10359d9dcd5aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 10360d9dcd5aeSmrgAC_ARG_WITH(xsltproc, 10361d9dcd5aeSmrg AS_HELP_STRING([--with-xsltproc], 10362d9dcd5aeSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10363d9dcd5aeSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10364d9dcd5aeSmrgm4_undefine([_defopt]) 10365191cded7Smrg 10366d9dcd5aeSmrgif test "x$use_xsltproc" = x"auto"; then 10367d9dcd5aeSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10368d9dcd5aeSmrg if test "x$XSLTPROC" = "x"; then 10369d9dcd5aeSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10370d9dcd5aeSmrg have_xsltproc=no 10371d9dcd5aeSmrg else 10372d9dcd5aeSmrg have_xsltproc=yes 10373d9dcd5aeSmrg fi 10374d9dcd5aeSmrgelif test "x$use_xsltproc" = x"yes" ; then 10375d9dcd5aeSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10376d9dcd5aeSmrg if test "x$XSLTPROC" = "x"; then 10377d9dcd5aeSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10378d9dcd5aeSmrg fi 10379d9dcd5aeSmrg have_xsltproc=yes 10380d9dcd5aeSmrgelif test "x$use_xsltproc" = x"no" ; then 10381d9dcd5aeSmrg if test "x$XSLTPROC" != "x"; then 10382d9dcd5aeSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10383d9dcd5aeSmrg fi 10384d9dcd5aeSmrg have_xsltproc=no 10385d9dcd5aeSmrgelse 10386d9dcd5aeSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10387d9dcd5aeSmrgfi 10388191cded7Smrg 10389d9dcd5aeSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10390d9dcd5aeSmrg]) # XORG_WITH_XSLTPROC 10391191cded7Smrg 10392d9dcd5aeSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10393d9dcd5aeSmrg# ---------------------------------------- 10394d9dcd5aeSmrg# Minimum version: 1.15.0 10395d9dcd5aeSmrg# 10396d9dcd5aeSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 10397d9dcd5aeSmrg# scanning arbitrary text files, extracting information from those text files, 10398d9dcd5aeSmrg# and printing reports based on that information. 10399d9dcd5aeSmrg# 10400d9dcd5aeSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 10401d9dcd5aeSmrg# 10402d9dcd5aeSmrg# Interface to module: 10403d9dcd5aeSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 10404d9dcd5aeSmrg# PERL: returns the path of the perl program found 10405d9dcd5aeSmrg# returns the path set by the user in the environment 10406d9dcd5aeSmrg# --with-perl: 'yes' user instructs the module to use perl 10407d9dcd5aeSmrg# 'no' user instructs the module not to use perl 10408d9dcd5aeSmrg# have_perl: returns yes if perl found in PATH or no 10409d9dcd5aeSmrg# 10410d9dcd5aeSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10411d9dcd5aeSmrg# 10412d9dcd5aeSmrgAC_DEFUN([XORG_WITH_PERL],[ 10413d9dcd5aeSmrgAC_ARG_VAR([PERL], [Path to perl command]) 10414d9dcd5aeSmrg# Preserves the interface, should it be implemented later 10415d9dcd5aeSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10416d9dcd5aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 10417d9dcd5aeSmrgAC_ARG_WITH(perl, 10418d9dcd5aeSmrg AS_HELP_STRING([--with-perl], 10419d9dcd5aeSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 10420d9dcd5aeSmrg [use_perl=$withval], [use_perl=]_defopt) 10421d9dcd5aeSmrgm4_undefine([_defopt]) 10422191cded7Smrg 10423d9dcd5aeSmrgif test "x$use_perl" = x"auto"; then 10424d9dcd5aeSmrg AC_PATH_PROG([PERL], [perl]) 10425d9dcd5aeSmrg if test "x$PERL" = "x"; then 10426d9dcd5aeSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 10427d9dcd5aeSmrg have_perl=no 10428d9dcd5aeSmrg else 10429d9dcd5aeSmrg have_perl=yes 10430d9dcd5aeSmrg fi 10431d9dcd5aeSmrgelif test "x$use_perl" = x"yes" ; then 10432d9dcd5aeSmrg AC_PATH_PROG([PERL], [perl]) 10433d9dcd5aeSmrg if test "x$PERL" = "x"; then 10434d9dcd5aeSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10435d9dcd5aeSmrg fi 10436d9dcd5aeSmrg have_perl=yes 10437d9dcd5aeSmrgelif test "x$use_perl" = x"no" ; then 10438d9dcd5aeSmrg if test "x$PERL" != "x"; then 10439d9dcd5aeSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10440d9dcd5aeSmrg fi 10441d9dcd5aeSmrg have_perl=no 10442d9dcd5aeSmrgelse 10443d9dcd5aeSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10444d9dcd5aeSmrgfi 10445ba064abeSmrg 10446d9dcd5aeSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10447d9dcd5aeSmrg]) # XORG_WITH_PERL 10448ba064abeSmrg 10449d9dcd5aeSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10450d9dcd5aeSmrg# ---------------- 10451d9dcd5aeSmrg# Minimum version: 1.5.0 10452d9dcd5aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10453d9dcd5aeSmrg# 10454d9dcd5aeSmrg# Documentation tools are not always available on all platforms and sometimes 10455d9dcd5aeSmrg# not at the appropriate level. This macro enables a module to test for the 10456d9dcd5aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10457d9dcd5aeSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10458d9dcd5aeSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10459d9dcd5aeSmrg# --with-asciidoc assumes 'auto'. 10460d9dcd5aeSmrg# 10461d9dcd5aeSmrg# Interface to module: 10462d9dcd5aeSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10463d9dcd5aeSmrg# ASCIIDOC: returns the path of the asciidoc program found 10464d9dcd5aeSmrg# returns the path set by the user in the environment 10465d9dcd5aeSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10466d9dcd5aeSmrg# 'no' user instructs the module not to use asciidoc 10467d9dcd5aeSmrg# 10468d9dcd5aeSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10469d9dcd5aeSmrg# 10470d9dcd5aeSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 10471d9dcd5aeSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10472d9dcd5aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 10473d9dcd5aeSmrgAC_ARG_WITH(asciidoc, 10474d9dcd5aeSmrg AS_HELP_STRING([--with-asciidoc], 10475d9dcd5aeSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10476d9dcd5aeSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10477d9dcd5aeSmrgm4_undefine([_defopt]) 10478ba064abeSmrg 10479d9dcd5aeSmrgif test "x$use_asciidoc" = x"auto"; then 10480d9dcd5aeSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10481d9dcd5aeSmrg if test "x$ASCIIDOC" = "x"; then 10482d9dcd5aeSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10483d9dcd5aeSmrg have_asciidoc=no 10484d9dcd5aeSmrg else 10485d9dcd5aeSmrg have_asciidoc=yes 10486d9dcd5aeSmrg fi 10487d9dcd5aeSmrgelif test "x$use_asciidoc" = x"yes" ; then 10488d9dcd5aeSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10489d9dcd5aeSmrg if test "x$ASCIIDOC" = "x"; then 10490d9dcd5aeSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10491d9dcd5aeSmrg fi 10492d9dcd5aeSmrg have_asciidoc=yes 10493d9dcd5aeSmrgelif test "x$use_asciidoc" = x"no" ; then 10494d9dcd5aeSmrg if test "x$ASCIIDOC" != "x"; then 10495d9dcd5aeSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10496d9dcd5aeSmrg fi 10497d9dcd5aeSmrg have_asciidoc=no 10498d9dcd5aeSmrgelse 10499d9dcd5aeSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10500d9dcd5aeSmrgfi 10501d9dcd5aeSmrgm4_ifval([$1], 10502d9dcd5aeSmrg[if test "$have_asciidoc" = yes; then 10503d9dcd5aeSmrg # scrape the asciidoc version 10504d9dcd5aeSmrg AC_MSG_CHECKING([the asciidoc version]) 10505d9dcd5aeSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10506d9dcd5aeSmrg AC_MSG_RESULT([$asciidoc_version]) 10507d9dcd5aeSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 10508d9dcd5aeSmrg [if test "x$use_asciidoc" = xauto; then 10509d9dcd5aeSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10510d9dcd5aeSmrg have_asciidoc=no 10511d9dcd5aeSmrg else 10512d9dcd5aeSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10513d9dcd5aeSmrg fi]) 10514d9dcd5aeSmrgfi]) 10515d9dcd5aeSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10516d9dcd5aeSmrg]) # XORG_WITH_ASCIIDOC 10517b290cf36Smrg 10518d9dcd5aeSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1051958deefebSmrg# ------------------------------------------- 10520d9dcd5aeSmrg# Minimum version: 1.5.0 10521d9dcd5aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1052258deefebSmrg# Minimum version for optional DOT checking: 1.18.0 10523d9dcd5aeSmrg# 10524d9dcd5aeSmrg# Documentation tools are not always available on all platforms and sometimes 10525d9dcd5aeSmrg# not at the appropriate level. This macro enables a module to test for the 10526d9dcd5aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10527d9dcd5aeSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 10528d9dcd5aeSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 10529d9dcd5aeSmrg# --with-doxygen assumes 'auto'. 10530d9dcd5aeSmrg# 10531d9dcd5aeSmrg# Interface to module: 10532d9dcd5aeSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10533d9dcd5aeSmrg# DOXYGEN: returns the path of the doxygen program found 10534d9dcd5aeSmrg# returns the path set by the user in the environment 10535d9dcd5aeSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 10536d9dcd5aeSmrg# 'no' user instructs the module not to use doxygen 10537d9dcd5aeSmrg# 10538d9dcd5aeSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10539d9dcd5aeSmrg# 10540d9dcd5aeSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10541d9dcd5aeSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1054258deefebSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10543d9dcd5aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 10544d9dcd5aeSmrgAC_ARG_WITH(doxygen, 10545d9dcd5aeSmrg AS_HELP_STRING([--with-doxygen], 10546d9dcd5aeSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10547d9dcd5aeSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 10548d9dcd5aeSmrgm4_undefine([_defopt]) 10549b290cf36Smrg 10550d9dcd5aeSmrgif test "x$use_doxygen" = x"auto"; then 10551d9dcd5aeSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10552d9dcd5aeSmrg if test "x$DOXYGEN" = "x"; then 10553d9dcd5aeSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10554d9dcd5aeSmrg have_doxygen=no 10555d9dcd5aeSmrg else 10556d9dcd5aeSmrg have_doxygen=yes 10557d9dcd5aeSmrg fi 10558d9dcd5aeSmrgelif test "x$use_doxygen" = x"yes" ; then 10559d9dcd5aeSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10560d9dcd5aeSmrg if test "x$DOXYGEN" = "x"; then 10561d9dcd5aeSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10562d9dcd5aeSmrg fi 10563d9dcd5aeSmrg have_doxygen=yes 10564d9dcd5aeSmrgelif test "x$use_doxygen" = x"no" ; then 10565d9dcd5aeSmrg if test "x$DOXYGEN" != "x"; then 10566d9dcd5aeSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10567d9dcd5aeSmrg fi 10568d9dcd5aeSmrg have_doxygen=no 10569d9dcd5aeSmrgelse 10570d9dcd5aeSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10571d9dcd5aeSmrgfi 10572d9dcd5aeSmrgm4_ifval([$1], 10573d9dcd5aeSmrg[if test "$have_doxygen" = yes; then 10574d9dcd5aeSmrg # scrape the doxygen version 10575d9dcd5aeSmrg AC_MSG_CHECKING([the doxygen version]) 10576d9dcd5aeSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10577d9dcd5aeSmrg AC_MSG_RESULT([$doxygen_version]) 10578d9dcd5aeSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10579d9dcd5aeSmrg [if test "x$use_doxygen" = xauto; then 10580d9dcd5aeSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10581d9dcd5aeSmrg have_doxygen=no 10582d9dcd5aeSmrg else 10583d9dcd5aeSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10584d9dcd5aeSmrg fi]) 10585d9dcd5aeSmrgfi]) 1058658deefebSmrg 1058758deefebSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 1058858deefebSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 1058958deefebSmrgdnl HAVE_DOT = @HAVE_DOT@ 1059058deefebSmrgHAVE_DOT=no 1059158deefebSmrgif test "x$have_doxygen" = "xyes"; then 1059258deefebSmrg AC_PATH_PROG([DOT], [dot]) 1059358deefebSmrg if test "x$DOT" != "x"; then 1059458deefebSmrg HAVE_DOT=yes 1059558deefebSmrg fi 1059658deefebSmrgfi 1059758deefebSmrg 1059858deefebSmrgAC_SUBST([HAVE_DOT]) 1059958deefebSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10600d9dcd5aeSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10601d9dcd5aeSmrg]) # XORG_WITH_DOXYGEN 10602b290cf36Smrg 10603d9dcd5aeSmrg# XORG_WITH_GROFF([DEFAULT]) 10604d9dcd5aeSmrg# ---------------- 10605d9dcd5aeSmrg# Minimum version: 1.6.0 10606d9dcd5aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10607d9dcd5aeSmrg# 10608d9dcd5aeSmrg# Documentation tools are not always available on all platforms and sometimes 10609d9dcd5aeSmrg# not at the appropriate level. This macro enables a module to test for the 10610d9dcd5aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10611d9dcd5aeSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 10612d9dcd5aeSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 10613d9dcd5aeSmrg# --with-groff assumes 'auto'. 10614d9dcd5aeSmrg# 10615d9dcd5aeSmrg# Interface to module: 10616d9dcd5aeSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10617d9dcd5aeSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10618d9dcd5aeSmrg# HAVE_GROFF_MS: the -ms macros package 10619d9dcd5aeSmrg# GROFF: returns the path of the groff program found 10620d9dcd5aeSmrg# returns the path set by the user in the environment 10621d9dcd5aeSmrg# --with-groff: 'yes' user instructs the module to use groff 10622d9dcd5aeSmrg# 'no' user instructs the module not to use groff 10623d9dcd5aeSmrg# 10624d9dcd5aeSmrg# Added in version 1.9.0: 10625d9dcd5aeSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10626d9dcd5aeSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10627d9dcd5aeSmrg# psselect from the psutils package. 10628d9dcd5aeSmrg# the ghostcript package. Refer to the grohtml man pages 10629d9dcd5aeSmrg# 10630d9dcd5aeSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10631d9dcd5aeSmrg# 10632d9dcd5aeSmrg# OS and distros often splits groff in a basic and full package, the former 10633d9dcd5aeSmrg# having the groff program and the later having devices, fonts and macros 10634d9dcd5aeSmrg# Checking for the groff executable is not enough. 10635d9dcd5aeSmrg# 10636d9dcd5aeSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 10637d9dcd5aeSmrg# unset HAVE_GROFF or GROFF env variables. 10638d9dcd5aeSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10639d9dcd5aeSmrg# 10640d9dcd5aeSmrgAC_DEFUN([XORG_WITH_GROFF],[ 10641d9dcd5aeSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10642d9dcd5aeSmrgm4_define([_defopt], m4_default([$1], [auto])) 10643d9dcd5aeSmrgAC_ARG_WITH(groff, 10644d9dcd5aeSmrg AS_HELP_STRING([--with-groff], 10645d9dcd5aeSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10646d9dcd5aeSmrg [use_groff=$withval], [use_groff=]_defopt) 10647d9dcd5aeSmrgm4_undefine([_defopt]) 10648191cded7Smrg 10649d9dcd5aeSmrgif test "x$use_groff" = x"auto"; then 10650d9dcd5aeSmrg AC_PATH_PROG([GROFF], [groff]) 10651d9dcd5aeSmrg if test "x$GROFF" = "x"; then 10652d9dcd5aeSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10653d9dcd5aeSmrg have_groff=no 10654d9dcd5aeSmrg else 10655d9dcd5aeSmrg have_groff=yes 10656d9dcd5aeSmrg fi 10657d9dcd5aeSmrgelif test "x$use_groff" = x"yes" ; then 10658d9dcd5aeSmrg AC_PATH_PROG([GROFF], [groff]) 10659d9dcd5aeSmrg if test "x$GROFF" = "x"; then 10660d9dcd5aeSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10661d9dcd5aeSmrg fi 10662d9dcd5aeSmrg have_groff=yes 10663d9dcd5aeSmrgelif test "x$use_groff" = x"no" ; then 10664d9dcd5aeSmrg if test "x$GROFF" != "x"; then 10665d9dcd5aeSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10666d9dcd5aeSmrg fi 10667d9dcd5aeSmrg have_groff=no 10668d9dcd5aeSmrgelse 10669d9dcd5aeSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10670d9dcd5aeSmrgfi 10671191cded7Smrg 10672d9dcd5aeSmrg# We have groff, test for the presence of the macro packages 10673d9dcd5aeSmrgif test "x$have_groff" = x"yes"; then 10674d9dcd5aeSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10675d9dcd5aeSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10676d9dcd5aeSmrg groff_ms_works=yes 10677d9dcd5aeSmrg else 10678d9dcd5aeSmrg groff_ms_works=no 10679d9dcd5aeSmrg fi 10680d9dcd5aeSmrg AC_MSG_RESULT([$groff_ms_works]) 10681d9dcd5aeSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10682d9dcd5aeSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10683d9dcd5aeSmrg groff_mm_works=yes 10684d9dcd5aeSmrg else 10685d9dcd5aeSmrg groff_mm_works=no 10686d9dcd5aeSmrg fi 10687d9dcd5aeSmrg AC_MSG_RESULT([$groff_mm_works]) 10688d9dcd5aeSmrgfi 10689191cded7Smrg 10690d9dcd5aeSmrg# We have groff, test for HTML dependencies, one command per package 10691d9dcd5aeSmrgif test "x$have_groff" = x"yes"; then 10692d9dcd5aeSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10693d9dcd5aeSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10694d9dcd5aeSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10695d9dcd5aeSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10696d9dcd5aeSmrg have_groff_html=yes 10697d9dcd5aeSmrg else 10698d9dcd5aeSmrg have_groff_html=no 10699d9dcd5aeSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10700d9dcd5aeSmrg fi 10701d9dcd5aeSmrgfi 10702191cded7Smrg 10703d9dcd5aeSmrg# Set Automake conditionals for Makefiles 10704d9dcd5aeSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10705d9dcd5aeSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10706d9dcd5aeSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10707d9dcd5aeSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10708d9dcd5aeSmrg]) # XORG_WITH_GROFF 10709b290cf36Smrg 10710d9dcd5aeSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10711d9dcd5aeSmrg# --------------------------------------- 10712d9dcd5aeSmrg# Minimum version: 1.6.0 10713d9dcd5aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10714d9dcd5aeSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10715d9dcd5aeSmrg# 10716d9dcd5aeSmrg# Documentation tools are not always available on all platforms and sometimes 10717d9dcd5aeSmrg# not at the appropriate level. This macro enables a module to test for the 10718d9dcd5aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10719d9dcd5aeSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 10720d9dcd5aeSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 10721d9dcd5aeSmrg# --with-fop assumes 'auto'. 10722d9dcd5aeSmrg# 10723d9dcd5aeSmrg# Interface to module: 10724d9dcd5aeSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10725d9dcd5aeSmrg# FOP: returns the path of the fop program found 10726d9dcd5aeSmrg# returns the path set by the user in the environment 10727d9dcd5aeSmrg# --with-fop: 'yes' user instructs the module to use fop 10728d9dcd5aeSmrg# 'no' user instructs the module not to use fop 10729d9dcd5aeSmrg# 10730d9dcd5aeSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10731d9dcd5aeSmrg# 10732d9dcd5aeSmrgAC_DEFUN([XORG_WITH_FOP],[ 10733d9dcd5aeSmrgAC_ARG_VAR([FOP], [Path to fop command]) 10734d9dcd5aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 10735d9dcd5aeSmrgAC_ARG_WITH(fop, 10736d9dcd5aeSmrg AS_HELP_STRING([--with-fop], 10737d9dcd5aeSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10738d9dcd5aeSmrg [use_fop=$withval], [use_fop=]_defopt) 10739d9dcd5aeSmrgm4_undefine([_defopt]) 10740b290cf36Smrg 10741d9dcd5aeSmrgif test "x$use_fop" = x"auto"; then 10742d9dcd5aeSmrg AC_PATH_PROG([FOP], [fop]) 10743d9dcd5aeSmrg if test "x$FOP" = "x"; then 10744d9dcd5aeSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10745d9dcd5aeSmrg have_fop=no 10746d9dcd5aeSmrg else 10747d9dcd5aeSmrg have_fop=yes 10748d9dcd5aeSmrg fi 10749d9dcd5aeSmrgelif test "x$use_fop" = x"yes" ; then 10750d9dcd5aeSmrg AC_PATH_PROG([FOP], [fop]) 10751d9dcd5aeSmrg if test "x$FOP" = "x"; then 10752d9dcd5aeSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10753d9dcd5aeSmrg fi 10754d9dcd5aeSmrg have_fop=yes 10755d9dcd5aeSmrgelif test "x$use_fop" = x"no" ; then 10756d9dcd5aeSmrg if test "x$FOP" != "x"; then 10757d9dcd5aeSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10758d9dcd5aeSmrg fi 10759d9dcd5aeSmrg have_fop=no 10760d9dcd5aeSmrgelse 10761d9dcd5aeSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10762d9dcd5aeSmrgfi 10763191cded7Smrg 10764d9dcd5aeSmrg# Test for a minimum version of fop, if provided. 10765d9dcd5aeSmrgm4_ifval([$1], 10766d9dcd5aeSmrg[if test "$have_fop" = yes; then 10767d9dcd5aeSmrg # scrape the fop version 10768d9dcd5aeSmrg AC_MSG_CHECKING([for fop minimum version]) 10769d9dcd5aeSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10770d9dcd5aeSmrg AC_MSG_RESULT([$fop_version]) 10771d9dcd5aeSmrg AS_VERSION_COMPARE([$fop_version], [$1], 10772d9dcd5aeSmrg [if test "x$use_fop" = xauto; then 10773d9dcd5aeSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10774d9dcd5aeSmrg have_fop=no 10775d9dcd5aeSmrg else 10776d9dcd5aeSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10777d9dcd5aeSmrg fi]) 10778d9dcd5aeSmrgfi]) 10779d9dcd5aeSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10780d9dcd5aeSmrg]) # XORG_WITH_FOP 10781191cded7Smrg 1078258deefebSmrg# XORG_WITH_M4([MIN-VERSION]) 1078358deefebSmrg# --------------------------- 1078458deefebSmrg# Minimum version: 1.19.0 1078558deefebSmrg# 1078658deefebSmrg# This macro attempts to locate an m4 macro processor which supports 1078758deefebSmrg# -I option and is only useful for modules relying on M4 in order to 1078858deefebSmrg# expand macros in source code files. 1078958deefebSmrg# 1079058deefebSmrg# Interface to module: 1079158deefebSmrg# M4: returns the path of the m4 program found 1079258deefebSmrg# returns the path set by the user in the environment 1079358deefebSmrg# 1079458deefebSmrgAC_DEFUN([XORG_WITH_M4], [ 1079558deefebSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 1079658deefebSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 1079758deefebSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 1079858deefebSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 1079958deefebSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 1080058deefebSmrg [$PATH:/usr/gnu/bin])]) 1080158deefebSmrg 1080258deefebSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 1080358deefebSmrg]) # XORG_WITH_M4 1080458deefebSmrg 10805d9dcd5aeSmrg# XORG_WITH_PS2PDF([DEFAULT]) 10806d9dcd5aeSmrg# ---------------- 10807d9dcd5aeSmrg# Minimum version: 1.6.0 10808d9dcd5aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10809d9dcd5aeSmrg# 10810d9dcd5aeSmrg# Documentation tools are not always available on all platforms and sometimes 10811d9dcd5aeSmrg# not at the appropriate level. This macro enables a module to test for the 10812d9dcd5aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10813d9dcd5aeSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10814d9dcd5aeSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10815d9dcd5aeSmrg# --with-ps2pdf assumes 'auto'. 10816d9dcd5aeSmrg# 10817d9dcd5aeSmrg# Interface to module: 10818d9dcd5aeSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10819d9dcd5aeSmrg# PS2PDF: returns the path of the ps2pdf program found 10820d9dcd5aeSmrg# returns the path set by the user in the environment 10821d9dcd5aeSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10822d9dcd5aeSmrg# 'no' user instructs the module not to use ps2pdf 10823d9dcd5aeSmrg# 10824d9dcd5aeSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10825d9dcd5aeSmrg# 10826d9dcd5aeSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10827d9dcd5aeSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10828d9dcd5aeSmrgm4_define([_defopt], m4_default([$1], [auto])) 10829d9dcd5aeSmrgAC_ARG_WITH(ps2pdf, 10830d9dcd5aeSmrg AS_HELP_STRING([--with-ps2pdf], 10831d9dcd5aeSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10832d9dcd5aeSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10833d9dcd5aeSmrgm4_undefine([_defopt]) 10834b290cf36Smrg 10835d9dcd5aeSmrgif test "x$use_ps2pdf" = x"auto"; then 10836d9dcd5aeSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10837d9dcd5aeSmrg if test "x$PS2PDF" = "x"; then 10838d9dcd5aeSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10839d9dcd5aeSmrg have_ps2pdf=no 10840d9dcd5aeSmrg else 10841d9dcd5aeSmrg have_ps2pdf=yes 10842d9dcd5aeSmrg fi 10843d9dcd5aeSmrgelif test "x$use_ps2pdf" = x"yes" ; then 10844d9dcd5aeSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10845d9dcd5aeSmrg if test "x$PS2PDF" = "x"; then 10846d9dcd5aeSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10847d9dcd5aeSmrg fi 10848d9dcd5aeSmrg have_ps2pdf=yes 10849d9dcd5aeSmrgelif test "x$use_ps2pdf" = x"no" ; then 10850d9dcd5aeSmrg if test "x$PS2PDF" != "x"; then 10851d9dcd5aeSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10852d9dcd5aeSmrg fi 10853d9dcd5aeSmrg have_ps2pdf=no 10854d9dcd5aeSmrgelse 10855d9dcd5aeSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10856d9dcd5aeSmrgfi 10857d9dcd5aeSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10858d9dcd5aeSmrg]) # XORG_WITH_PS2PDF 10859191cded7Smrg 10860d9dcd5aeSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 10861d9dcd5aeSmrg# ---------------- 10862d9dcd5aeSmrg# Minimum version: 1.6.0 10863d9dcd5aeSmrg# 10864d9dcd5aeSmrg# Documentation tools are not always available on all platforms and sometimes 10865d9dcd5aeSmrg# not at the appropriate level. This macro enables a builder to skip all 10866d9dcd5aeSmrg# documentation targets except traditional man pages. 10867d9dcd5aeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10868d9dcd5aeSmrg# maximum flexibilty in controlling documentation building. 10869d9dcd5aeSmrg# Refer to: 10870d9dcd5aeSmrg# XORG_WITH_XMLTO --with-xmlto 10871d9dcd5aeSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10872d9dcd5aeSmrg# XORG_WITH_DOXYGEN --with-doxygen 10873d9dcd5aeSmrg# XORG_WITH_FOP --with-fop 10874d9dcd5aeSmrg# XORG_WITH_GROFF --with-groff 10875d9dcd5aeSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10876d9dcd5aeSmrg# 10877d9dcd5aeSmrg# Interface to module: 10878d9dcd5aeSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10879d9dcd5aeSmrg# --enable-docs: 'yes' user instructs the module to generate docs 10880d9dcd5aeSmrg# 'no' user instructs the module not to generate docs 10881d9dcd5aeSmrg# parm1: specify the default value, yes or no. 10882d9dcd5aeSmrg# 10883d9dcd5aeSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10884d9dcd5aeSmrgm4_define([docs_default], m4_default([$1], [yes])) 10885d9dcd5aeSmrgAC_ARG_ENABLE(docs, 10886d9dcd5aeSmrg AS_HELP_STRING([--enable-docs], 10887d9dcd5aeSmrg [Enable building the documentation (default: ]docs_default[)]), 10888d9dcd5aeSmrg [build_docs=$enableval], [build_docs=]docs_default) 10889d9dcd5aeSmrgm4_undefine([docs_default]) 10890d9dcd5aeSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10891d9dcd5aeSmrgAC_MSG_CHECKING([whether to build documentation]) 10892d9dcd5aeSmrgAC_MSG_RESULT([$build_docs]) 10893d9dcd5aeSmrg]) # XORG_ENABLE_DOCS 10894191cded7Smrg 10895d9dcd5aeSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10896d9dcd5aeSmrg# ---------------- 10897d9dcd5aeSmrg# Minimum version: 1.6.0 10898d9dcd5aeSmrg# 10899d9dcd5aeSmrg# This macro enables a builder to skip all developer documentation. 10900d9dcd5aeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10901d9dcd5aeSmrg# maximum flexibilty in controlling documentation building. 10902d9dcd5aeSmrg# Refer to: 10903d9dcd5aeSmrg# XORG_WITH_XMLTO --with-xmlto 10904d9dcd5aeSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10905d9dcd5aeSmrg# XORG_WITH_DOXYGEN --with-doxygen 10906d9dcd5aeSmrg# XORG_WITH_FOP --with-fop 10907d9dcd5aeSmrg# XORG_WITH_GROFF --with-groff 10908d9dcd5aeSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10909d9dcd5aeSmrg# 10910d9dcd5aeSmrg# Interface to module: 10911d9dcd5aeSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10912d9dcd5aeSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10913d9dcd5aeSmrg# 'no' user instructs the module not to generate developer docs 10914d9dcd5aeSmrg# parm1: specify the default value, yes or no. 10915d9dcd5aeSmrg# 10916d9dcd5aeSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10917d9dcd5aeSmrgm4_define([devel_default], m4_default([$1], [yes])) 10918d9dcd5aeSmrgAC_ARG_ENABLE(devel-docs, 10919d9dcd5aeSmrg AS_HELP_STRING([--enable-devel-docs], 10920d9dcd5aeSmrg [Enable building the developer documentation (default: ]devel_default[)]), 10921d9dcd5aeSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10922d9dcd5aeSmrgm4_undefine([devel_default]) 10923d9dcd5aeSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10924d9dcd5aeSmrgAC_MSG_CHECKING([whether to build developer documentation]) 10925d9dcd5aeSmrgAC_MSG_RESULT([$build_devel_docs]) 10926d9dcd5aeSmrg]) # XORG_ENABLE_DEVEL_DOCS 10927191cded7Smrg 10928d9dcd5aeSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 10929d9dcd5aeSmrg# ---------------- 10930d9dcd5aeSmrg# Minimum version: 1.6.0 10931d9dcd5aeSmrg# 10932d9dcd5aeSmrg# This macro enables a builder to skip all functional specification targets. 10933d9dcd5aeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10934d9dcd5aeSmrg# maximum flexibilty in controlling documentation building. 10935d9dcd5aeSmrg# Refer to: 10936d9dcd5aeSmrg# XORG_WITH_XMLTO --with-xmlto 10937d9dcd5aeSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10938d9dcd5aeSmrg# XORG_WITH_DOXYGEN --with-doxygen 10939d9dcd5aeSmrg# XORG_WITH_FOP --with-fop 10940d9dcd5aeSmrg# XORG_WITH_GROFF --with-groff 10941d9dcd5aeSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10942d9dcd5aeSmrg# 10943d9dcd5aeSmrg# Interface to module: 10944d9dcd5aeSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10945d9dcd5aeSmrg# --enable-specs: 'yes' user instructs the module to generate specs 10946d9dcd5aeSmrg# 'no' user instructs the module not to generate specs 10947d9dcd5aeSmrg# parm1: specify the default value, yes or no. 10948d9dcd5aeSmrg# 10949d9dcd5aeSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10950d9dcd5aeSmrgm4_define([spec_default], m4_default([$1], [yes])) 10951d9dcd5aeSmrgAC_ARG_ENABLE(specs, 10952d9dcd5aeSmrg AS_HELP_STRING([--enable-specs], 10953d9dcd5aeSmrg [Enable building the specs (default: ]spec_default[)]), 10954d9dcd5aeSmrg [build_specs=$enableval], [build_specs=]spec_default) 10955d9dcd5aeSmrgm4_undefine([spec_default]) 10956d9dcd5aeSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10957d9dcd5aeSmrgAC_MSG_CHECKING([whether to build functional specifications]) 10958d9dcd5aeSmrgAC_MSG_RESULT([$build_specs]) 10959d9dcd5aeSmrg]) # XORG_ENABLE_SPECS 10960ba064abeSmrg 10961d9dcd5aeSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10962d9dcd5aeSmrg# ---------------------------------------------- 10963d9dcd5aeSmrg# Minimum version: 1.13.0 10964d9dcd5aeSmrg# 10965d9dcd5aeSmrg# This macro enables a builder to enable/disable unit testing 10966d9dcd5aeSmrg# It makes no assumption about the test cases implementation 10967d9dcd5aeSmrg# Test cases may or may not use Automake "Support for test suites" 10968d9dcd5aeSmrg# They may or may not use the software utility library GLib 10969d9dcd5aeSmrg# 10970d9dcd5aeSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10971d9dcd5aeSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10972d9dcd5aeSmrg# The variable enable_unit_tests is used by other macros in this file. 10973d9dcd5aeSmrg# 10974d9dcd5aeSmrg# Interface to module: 10975d9dcd5aeSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10976d9dcd5aeSmrg# enable_unit_tests: used in configure.ac for additional configuration 10977d9dcd5aeSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10978d9dcd5aeSmrg# 'no' user instructs the module not to build tests 10979d9dcd5aeSmrg# parm1: specify the default value, yes or no. 10980d9dcd5aeSmrg# 10981d9dcd5aeSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10982d9dcd5aeSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10983d9dcd5aeSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10984d9dcd5aeSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10985d9dcd5aeSmrgm4_define([_defopt], m4_default([$1], [auto])) 10986d9dcd5aeSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10987d9dcd5aeSmrg [Enable building unit test cases (default: ]_defopt[)]), 10988d9dcd5aeSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10989d9dcd5aeSmrgm4_undefine([_defopt]) 10990d9dcd5aeSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10991d9dcd5aeSmrgAC_MSG_CHECKING([whether to build unit test cases]) 10992d9dcd5aeSmrgAC_MSG_RESULT([$enable_unit_tests]) 10993d9dcd5aeSmrg]) # XORG_ENABLE_UNIT_TESTS 10994191cded7Smrg 10995d9dcd5aeSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10996d9dcd5aeSmrg# ------------------------------------------------------ 10997d9dcd5aeSmrg# Minimum version: 1.17.0 10998d9dcd5aeSmrg# 10999d9dcd5aeSmrg# This macro enables a builder to enable/disable integration testing 11000d9dcd5aeSmrg# It makes no assumption about the test cases' implementation 11001d9dcd5aeSmrg# Test cases may or may not use Automake "Support for test suites" 11002d9dcd5aeSmrg# 11003d9dcd5aeSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 11004d9dcd5aeSmrg# usually requires less dependencies and may be built and run under less 11005d9dcd5aeSmrg# stringent environments than integration tests. 11006d9dcd5aeSmrg# 11007d9dcd5aeSmrg# Interface to module: 11008d9dcd5aeSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 11009d9dcd5aeSmrg# enable_integration_tests: used in configure.ac for additional configuration 11010d9dcd5aeSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 11011d9dcd5aeSmrg# 'no' user instructs the module not to build tests 11012d9dcd5aeSmrg# parm1: specify the default value, yes or no. 11013d9dcd5aeSmrg# 11014d9dcd5aeSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 11015d9dcd5aeSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 11016d9dcd5aeSmrgm4_define([_defopt], m4_default([$1], [auto])) 11017d9dcd5aeSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 11018d9dcd5aeSmrg [Enable building integration test cases (default: ]_defopt[)]), 11019d9dcd5aeSmrg [enable_integration_tests=$enableval], 11020d9dcd5aeSmrg [enable_integration_tests=]_defopt) 11021d9dcd5aeSmrgm4_undefine([_defopt]) 11022d9dcd5aeSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 11023d9dcd5aeSmrg [test "x$enable_integration_tests" != xno]) 11024d9dcd5aeSmrgAC_MSG_CHECKING([whether to build unit test cases]) 11025d9dcd5aeSmrgAC_MSG_RESULT([$enable_integration_tests]) 11026d9dcd5aeSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 11027191cded7Smrg 11028d9dcd5aeSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 11029d9dcd5aeSmrg# ---------------------------------------- 11030d9dcd5aeSmrg# Minimum version: 1.13.0 11031d9dcd5aeSmrg# 11032d9dcd5aeSmrg# GLib is a library which provides advanced data structures and functions. 11033d9dcd5aeSmrg# This macro enables a module to test for the presence of Glib. 11034d9dcd5aeSmrg# 11035d9dcd5aeSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 11036d9dcd5aeSmrg# Otherwise the value of $enable_unit_tests is blank. 11037d9dcd5aeSmrg# 11038d9dcd5aeSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 11039d9dcd5aeSmrg# test support usually requires less dependencies and may be built and run under 11040d9dcd5aeSmrg# less stringent environments than integration tests. 11041d9dcd5aeSmrg# 11042d9dcd5aeSmrg# Interface to module: 11043d9dcd5aeSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 11044d9dcd5aeSmrg# with_glib: used in configure.ac to know if GLib has been found 11045d9dcd5aeSmrg# --with-glib: 'yes' user instructs the module to use glib 11046d9dcd5aeSmrg# 'no' user instructs the module not to use glib 11047d9dcd5aeSmrg# 11048d9dcd5aeSmrgAC_DEFUN([XORG_WITH_GLIB],[ 11049d9dcd5aeSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11050d9dcd5aeSmrgm4_define([_defopt], m4_default([$2], [auto])) 11051d9dcd5aeSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 11052d9dcd5aeSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 11053d9dcd5aeSmrg [with_glib=$withval], [with_glib=]_defopt) 11054d9dcd5aeSmrgm4_undefine([_defopt]) 11055191cded7Smrg 11056d9dcd5aeSmrghave_glib=no 11057d9dcd5aeSmrg# Do not probe GLib if user explicitly disabled unit testing 11058d9dcd5aeSmrgif test "x$enable_unit_tests" != x"no"; then 11059d9dcd5aeSmrg # Do not probe GLib if user explicitly disabled it 11060d9dcd5aeSmrg if test "x$with_glib" != x"no"; then 11061d9dcd5aeSmrg m4_ifval( 11062d9dcd5aeSmrg [$1], 11063d9dcd5aeSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 11064d9dcd5aeSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 11065d9dcd5aeSmrg ) 11066d9dcd5aeSmrg fi 11067d9dcd5aeSmrgfi 11068191cded7Smrg 11069d9dcd5aeSmrg# Not having GLib when unit testing has been explicitly requested is an error 11070d9dcd5aeSmrgif test "x$enable_unit_tests" = x"yes"; then 11071d9dcd5aeSmrg if test "x$have_glib" = x"no"; then 11072d9dcd5aeSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11073d9dcd5aeSmrg fi 11074d9dcd5aeSmrgfi 11075191cded7Smrg 11076d9dcd5aeSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 11077d9dcd5aeSmrgif test "x$enable_unit_tests" = x"no"; then 11078d9dcd5aeSmrg if test "x$with_glib" = x"yes"; then 11079d9dcd5aeSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11080d9dcd5aeSmrg fi 11081d9dcd5aeSmrgfi 11082191cded7Smrg 11083d9dcd5aeSmrg# Not having GLib when it has been explicitly requested is an error 11084d9dcd5aeSmrgif test "x$with_glib" = x"yes"; then 11085d9dcd5aeSmrg if test "x$have_glib" = x"no"; then 11086d9dcd5aeSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 11087d9dcd5aeSmrg fi 11088d9dcd5aeSmrgfi 11089191cded7Smrg 11090d9dcd5aeSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 11091d9dcd5aeSmrg]) # XORG_WITH_GLIB 11092191cded7Smrg 11093d9dcd5aeSmrg# XORG_LD_WRAP([required|optional]) 11094d9dcd5aeSmrg# --------------------------------- 11095d9dcd5aeSmrg# Minimum version: 1.13.0 11096d9dcd5aeSmrg# 11097d9dcd5aeSmrg# Check if linker supports -wrap, passed via compiler flags 11098d9dcd5aeSmrg# 11099d9dcd5aeSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 11100d9dcd5aeSmrg# Otherwise the value of $enable_unit_tests is blank. 11101d9dcd5aeSmrg# 11102d9dcd5aeSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 11103d9dcd5aeSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 11104d9dcd5aeSmrg# available, an argument of "optional" allows use when some unit tests require 11105d9dcd5aeSmrg# ld -wrap and others do not. 11106d9dcd5aeSmrg# 11107d9dcd5aeSmrgAC_DEFUN([XORG_LD_WRAP],[ 11108d9dcd5aeSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 11109d9dcd5aeSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 11110d9dcd5aeSmrg void __wrap_exit(int status) { return; }], 11111d9dcd5aeSmrg [exit(0);])]) 11112d9dcd5aeSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 11113d9dcd5aeSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 11114d9dcd5aeSmrg if test "x$have_ld_wrap" = x"no"; then 11115d9dcd5aeSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 11116d9dcd5aeSmrg fi 11117d9dcd5aeSmrgfi 11118d9dcd5aeSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 11119d9dcd5aeSmrg# 11120d9dcd5aeSmrg]) # XORG_LD_WRAP 11121191cded7Smrg 11122d9dcd5aeSmrg# XORG_CHECK_LINKER_FLAGS 11123d9dcd5aeSmrg# ----------------------- 11124d9dcd5aeSmrg# SYNOPSIS 11125d9dcd5aeSmrg# 11126d9dcd5aeSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 11127d9dcd5aeSmrg# 11128d9dcd5aeSmrg# DESCRIPTION 11129d9dcd5aeSmrg# 11130d9dcd5aeSmrg# Check whether the given linker FLAGS work with the current language's 11131d9dcd5aeSmrg# linker, or whether they give an error. 11132d9dcd5aeSmrg# 11133d9dcd5aeSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 11134d9dcd5aeSmrg# success/failure. 11135d9dcd5aeSmrg# 11136d9dcd5aeSmrg# PROGRAM-SOURCE is the program source to link with, if needed 11137d9dcd5aeSmrg# 11138d9dcd5aeSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 11139d9dcd5aeSmrg# 11140d9dcd5aeSmrg# LICENSE 11141d9dcd5aeSmrg# 11142d9dcd5aeSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 11143d9dcd5aeSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 11144d9dcd5aeSmrg# Copyright (c) 2009 Matteo Frigo 11145d9dcd5aeSmrg# 11146d9dcd5aeSmrg# This program is free software: you can redistribute it and/or modify it 11147d9dcd5aeSmrg# under the terms of the GNU General Public License as published by the 11148d9dcd5aeSmrg# Free Software Foundation, either version 3 of the License, or (at your 11149d9dcd5aeSmrg# option) any later version. 11150d9dcd5aeSmrg# 11151d9dcd5aeSmrg# This program is distributed in the hope that it will be useful, but 11152d9dcd5aeSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 11153d9dcd5aeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11154d9dcd5aeSmrg# Public License for more details. 11155d9dcd5aeSmrg# 11156d9dcd5aeSmrg# You should have received a copy of the GNU General Public License along 11157d9dcd5aeSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 11158d9dcd5aeSmrg# 11159d9dcd5aeSmrg# As a special exception, the respective Autoconf Macro's copyright owner 11160d9dcd5aeSmrg# gives unlimited permission to copy, distribute and modify the configure 11161d9dcd5aeSmrg# scripts that are the output of Autoconf when processing the Macro. You 11162d9dcd5aeSmrg# need not follow the terms of the GNU General Public License when using 11163d9dcd5aeSmrg# or distributing such scripts, even though portions of the text of the 11164d9dcd5aeSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 11165d9dcd5aeSmrg# all other use of the material that constitutes the Autoconf Macro. 11166d9dcd5aeSmrg# 11167d9dcd5aeSmrg# This special exception to the GPL applies to versions of the Autoconf 11168d9dcd5aeSmrg# Macro released by the Autoconf Archive. When you make and distribute a 11169d9dcd5aeSmrg# modified version of the Autoconf Macro, you may extend this special 11170d9dcd5aeSmrg# exception to the GPL to apply to your modified version as well.# 11171d9dcd5aeSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11172d9dcd5aeSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 11173d9dcd5aeSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11174d9dcd5aeSmrgAS_LITERAL_IF([$1], 11175d9dcd5aeSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11176d9dcd5aeSmrg ax_save_FLAGS=$LDFLAGS 11177d9dcd5aeSmrg LDFLAGS="$1" 11178d9dcd5aeSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11179d9dcd5aeSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11180d9dcd5aeSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11181d9dcd5aeSmrg LDFLAGS=$ax_save_FLAGS])], 11182d9dcd5aeSmrg [ax_save_FLAGS=$LDFLAGS 11183d9dcd5aeSmrg LDFLAGS="$1" 11184d9dcd5aeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11185d9dcd5aeSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11186d9dcd5aeSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11187d9dcd5aeSmrg LDFLAGS=$ax_save_FLAGS]) 11188d9dcd5aeSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11189d9dcd5aeSmrgAC_MSG_RESULT($xorg_check_linker_flags) 11190d9dcd5aeSmrgif test "x$xorg_check_linker_flags" = xyes; then 11191d9dcd5aeSmrg m4_default([$2], :) 11192d9dcd5aeSmrgelse 11193d9dcd5aeSmrg m4_default([$3], :) 11194d9dcd5aeSmrgfi 11195d9dcd5aeSmrg]) # XORG_CHECK_LINKER_FLAGS 11196191cded7Smrg 11197d9dcd5aeSmrg# XORG_MEMORY_CHECK_FLAGS 11198d9dcd5aeSmrg# ----------------------- 11199d9dcd5aeSmrg# Minimum version: 1.16.0 11200d9dcd5aeSmrg# 11201d9dcd5aeSmrg# This macro attempts to find appropriate memory checking functionality 11202d9dcd5aeSmrg# for various platforms which unit testing code may use to catch various 11203d9dcd5aeSmrg# forms of memory allocation and access errors in testing. 11204d9dcd5aeSmrg# 11205d9dcd5aeSmrg# Interface to module: 11206d9dcd5aeSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11207d9dcd5aeSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 11208d9dcd5aeSmrg# 11209d9dcd5aeSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11210d9dcd5aeSmrg# 11211d9dcd5aeSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11212191cded7Smrg 11213d9dcd5aeSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 11214d9dcd5aeSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11215d9dcd5aeSmrg [Environment variables to enable memory checking in tests]) 11216191cded7Smrg 11217d9dcd5aeSmrg# Check for different types of support on different platforms 11218d9dcd5aeSmrgcase $host_os in 11219d9dcd5aeSmrg solaris*) 11220d9dcd5aeSmrg AC_CHECK_LIB([umem], [umem_alloc], 11221d9dcd5aeSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11222d9dcd5aeSmrg ;; 11223d9dcd5aeSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11224d9dcd5aeSmrg # both directly and inverted, so should not be 0 or 255. 11225d9dcd5aeSmrg malloc_debug_env='MALLOC_PERTURB_=15' 11226d9dcd5aeSmrg ;; 11227d9dcd5aeSmrg darwin*) 11228d9dcd5aeSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11229d9dcd5aeSmrg ;; 11230d9dcd5aeSmrg *bsd*) 11231d9dcd5aeSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11232d9dcd5aeSmrg ;; 11233d9dcd5aeSmrgesac 11234191cded7Smrg 11235d9dcd5aeSmrg# User supplied flags override default flags 11236d9dcd5aeSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11237d9dcd5aeSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11238d9dcd5aeSmrgfi 11239191cded7Smrg 11240d9dcd5aeSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11241d9dcd5aeSmrg]) # XORG_WITH_LINT 11242191cded7Smrg 11243d9dcd5aeSmrg# XORG_CHECK_MALLOC_ZERO 11244d9dcd5aeSmrg# ---------------------- 11245d9dcd5aeSmrg# Minimum version: 1.0.0 11246ba064abeSmrg# 11247d9dcd5aeSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11248d9dcd5aeSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 11249d9dcd5aeSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11250d9dcd5aeSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11251d9dcd5aeSmrgAC_ARG_ENABLE(malloc0returnsnull, 11252d9dcd5aeSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 11253d9dcd5aeSmrg [malloc(0) returns NULL (default: auto)]), 11254d9dcd5aeSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 11255d9dcd5aeSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11256b290cf36Smrg 11257d9dcd5aeSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 11258d9dcd5aeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1125958deefebSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 1126058deefebSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11261d9dcd5aeSmrg#include <stdlib.h> 11262d9dcd5aeSmrg],[ 11263d9dcd5aeSmrg char *m0, *r0, *c0, *p; 11264d9dcd5aeSmrg m0 = malloc(0); 11265d9dcd5aeSmrg p = malloc(10); 11266d9dcd5aeSmrg r0 = realloc(p,0); 11267d9dcd5aeSmrg c0 = calloc(0,10); 11268d9dcd5aeSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11269d9dcd5aeSmrg])], 1127058deefebSmrg [xorg_cv_malloc0_returns_null=yes], 1127158deefebSmrg [xorg_cv_malloc0_returns_null=no])]) 1127258deefebSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 11273d9dcd5aeSmrgfi 11274d9dcd5aeSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11275b290cf36Smrg 11276d9dcd5aeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11277d9dcd5aeSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11278d9dcd5aeSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11279d9dcd5aeSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11280d9dcd5aeSmrgelse 11281d9dcd5aeSmrg MALLOC_ZERO_CFLAGS="" 11282d9dcd5aeSmrg XMALLOC_ZERO_CFLAGS="" 11283d9dcd5aeSmrg XTMALLOC_ZERO_CFLAGS="" 11284d9dcd5aeSmrgfi 11285191cded7Smrg 11286d9dcd5aeSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 11287d9dcd5aeSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 11288d9dcd5aeSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11289d9dcd5aeSmrg]) # XORG_CHECK_MALLOC_ZERO 11290191cded7Smrg 11291d9dcd5aeSmrg# XORG_WITH_LINT() 11292d9dcd5aeSmrg# ---------------- 11293d9dcd5aeSmrg# Minimum version: 1.1.0 11294d9dcd5aeSmrg# 11295d9dcd5aeSmrg# This macro enables the use of a tool that flags some suspicious and 11296d9dcd5aeSmrg# non-portable constructs (likely to be bugs) in C language source code. 11297d9dcd5aeSmrg# It will attempt to locate the tool and use appropriate options. 11298d9dcd5aeSmrg# There are various lint type tools on different platforms. 11299d9dcd5aeSmrg# 11300d9dcd5aeSmrg# Interface to module: 11301d9dcd5aeSmrg# LINT: returns the path to the tool found on the platform 11302d9dcd5aeSmrg# or the value set to LINT on the configure cmd line 11303d9dcd5aeSmrg# also an Automake conditional 11304d9dcd5aeSmrg# LINT_FLAGS: an Automake variable with appropriate flags 11305d9dcd5aeSmrg# 11306d9dcd5aeSmrg# --with-lint: 'yes' user instructs the module to use lint 11307d9dcd5aeSmrg# 'no' user instructs the module not to use lint (default) 11308d9dcd5aeSmrg# 11309d9dcd5aeSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11310d9dcd5aeSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 11311d9dcd5aeSmrg# 11312d9dcd5aeSmrgAC_DEFUN([XORG_WITH_LINT],[ 11313191cded7Smrg 11314d9dcd5aeSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 11315d9dcd5aeSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11316d9dcd5aeSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11317d9dcd5aeSmrg [Use a lint-style source code checker (default: disabled)])], 11318d9dcd5aeSmrg [use_lint=$withval], [use_lint=no]) 11319191cded7Smrg 11320d9dcd5aeSmrg# Obtain platform specific info like program name and options 11321d9dcd5aeSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11322d9dcd5aeSmrgcase $host_os in 11323d9dcd5aeSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11324d9dcd5aeSmrg lint_name=splint 11325d9dcd5aeSmrg lint_options="-badflag" 11326d9dcd5aeSmrg ;; 11327d9dcd5aeSmrg *freebsd* | *netbsd*) 11328d9dcd5aeSmrg lint_name=lint 11329d9dcd5aeSmrg lint_options="-u -b" 11330d9dcd5aeSmrg ;; 11331d9dcd5aeSmrg *solaris*) 11332d9dcd5aeSmrg lint_name=lint 11333d9dcd5aeSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11334d9dcd5aeSmrg ;; 11335d9dcd5aeSmrgesac 11336191cded7Smrg 11337d9dcd5aeSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 11338d9dcd5aeSmrgif test "x$use_lint" = x"yes" ; then 11339d9dcd5aeSmrg AC_PATH_PROG([LINT], [$lint_name]) 11340d9dcd5aeSmrg if test "x$LINT" = "x"; then 11341d9dcd5aeSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11342d9dcd5aeSmrg fi 11343d9dcd5aeSmrgelif test "x$use_lint" = x"no" ; then 11344d9dcd5aeSmrg if test "x$LINT" != "x"; then 11345d9dcd5aeSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11346d9dcd5aeSmrg fi 11347d9dcd5aeSmrgelse 11348d9dcd5aeSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11349d9dcd5aeSmrgfi 11350191cded7Smrg 11351d9dcd5aeSmrg# User supplied flags override default flags 11352d9dcd5aeSmrgif test "x$LINT_FLAGS" != "x"; then 11353d9dcd5aeSmrg lint_options=$LINT_FLAGS 11354d9dcd5aeSmrgfi 11355191cded7Smrg 11356d9dcd5aeSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 11357d9dcd5aeSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11358b290cf36Smrg 11359d9dcd5aeSmrg]) # XORG_WITH_LINT 11360191cded7Smrg 11361d9dcd5aeSmrg# XORG_LINT_LIBRARY(LIBNAME) 11362d9dcd5aeSmrg# -------------------------- 11363d9dcd5aeSmrg# Minimum version: 1.1.0 11364d9dcd5aeSmrg# 11365d9dcd5aeSmrg# Sets up flags for building lint libraries for checking programs that call 11366d9dcd5aeSmrg# functions in the library. 11367d9dcd5aeSmrg# 11368d9dcd5aeSmrg# Interface to module: 11369d9dcd5aeSmrg# LINTLIB - Automake variable with the name of lint library file to make 11370d9dcd5aeSmrg# MAKE_LINT_LIB - Automake conditional 11371d9dcd5aeSmrg# 11372d9dcd5aeSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11373d9dcd5aeSmrg# - 'no' user instructs the module not to create a lint library (default) 11374191cded7Smrg 11375d9dcd5aeSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 11376d9dcd5aeSmrgAC_REQUIRE([XORG_WITH_LINT]) 11377d9dcd5aeSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11378d9dcd5aeSmrg [Create lint library (default: disabled)])], 11379d9dcd5aeSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11380b290cf36Smrg 11381d9dcd5aeSmrgif test "x$make_lint_lib" = x"yes" ; then 11382d9dcd5aeSmrg LINTLIB=llib-l$1.ln 11383d9dcd5aeSmrg if test "x$LINT" = "x"; then 11384d9dcd5aeSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11385d9dcd5aeSmrg fi 11386d9dcd5aeSmrgelif test "x$make_lint_lib" != x"no" ; then 11387d9dcd5aeSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11388d9dcd5aeSmrgfi 11389ba064abeSmrg 11390d9dcd5aeSmrgAC_SUBST(LINTLIB) 11391d9dcd5aeSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11392ba064abeSmrg 11393d9dcd5aeSmrg]) # XORG_LINT_LIBRARY 11394d9dcd5aeSmrg 11395d9dcd5aeSmrg# XORG_COMPILER_BRAND 11396d9dcd5aeSmrg# ------------------- 11397d9dcd5aeSmrg# Minimum version: 1.14.0 11398d9dcd5aeSmrg# 11399d9dcd5aeSmrg# Checks for various brands of compilers and sets flags as appropriate: 11400d9dcd5aeSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11401d9dcd5aeSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11402d9dcd5aeSmrg# clang compiler - sets CLANGCC to "yes" 11403d9dcd5aeSmrg# Intel compiler - sets INTELCC to "yes" 11404d9dcd5aeSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11405d9dcd5aeSmrg# 11406d9dcd5aeSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 11407d9dcd5aeSmrgAC_LANG_CASE( 11408d9dcd5aeSmrg [C], [ 11409d9dcd5aeSmrg AC_REQUIRE([AC_PROG_CC_C99]) 11410d9dcd5aeSmrg ], 11411d9dcd5aeSmrg [C++], [ 11412d9dcd5aeSmrg AC_REQUIRE([AC_PROG_CXX]) 11413d9dcd5aeSmrg ] 11414d9dcd5aeSmrg) 11415d9dcd5aeSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11416d9dcd5aeSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11417d9dcd5aeSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11418d9dcd5aeSmrg]) # XORG_COMPILER_BRAND 11419ba064abeSmrg 11420d9dcd5aeSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11421d9dcd5aeSmrg# --------------- 11422d9dcd5aeSmrg# Minimum version: 1.16.0 11423d9dcd5aeSmrg# 11424d9dcd5aeSmrg# Test if the compiler works when passed the given flag as a command line argument. 11425d9dcd5aeSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11426d9dcd5aeSmrg# next flag in the list until there are no more options. 11427d9dcd5aeSmrg# 11428d9dcd5aeSmrg# Note that this does not guarantee that the compiler supports the flag as some 11429d9dcd5aeSmrg# compilers will simply ignore arguments that they do not understand, but we do 11430d9dcd5aeSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 11431d9dcd5aeSmrg# -Werror=unused-command-line-argument 11432d9dcd5aeSmrg# 11433d9dcd5aeSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 11434d9dcd5aeSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11435d9dcd5aeSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11436d9dcd5aeSmrg 11437d9dcd5aeSmrgAC_LANG_COMPILER_REQUIRE 11438d9dcd5aeSmrg 11439d9dcd5aeSmrgAC_LANG_CASE( 11440d9dcd5aeSmrg [C], [ 11441d9dcd5aeSmrg AC_REQUIRE([AC_PROG_CC_C99]) 11442d9dcd5aeSmrg define([PREFIX], [C]) 11443d9dcd5aeSmrg define([CACHE_PREFIX], [cc]) 11444d9dcd5aeSmrg define([COMPILER], [$CC]) 11445d9dcd5aeSmrg ], 11446d9dcd5aeSmrg [C++], [ 11447d9dcd5aeSmrg define([PREFIX], [CXX]) 11448d9dcd5aeSmrg define([CACHE_PREFIX], [cxx]) 11449d9dcd5aeSmrg define([COMPILER], [$CXX]) 11450d9dcd5aeSmrg ] 11451d9dcd5aeSmrg) 11452191cded7Smrg 11453d9dcd5aeSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11454d9dcd5aeSmrg 11455d9dcd5aeSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11456d9dcd5aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11457d9dcd5aeSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11458d9dcd5aeSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11459d9dcd5aeSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11460d9dcd5aeSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11461d9dcd5aeSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11462d9dcd5aeSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11463d9dcd5aeSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11464d9dcd5aeSmrgfi 11465191cded7Smrg 11466d9dcd5aeSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11467d9dcd5aeSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11468d9dcd5aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11469d9dcd5aeSmrg fi 11470d9dcd5aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11471d9dcd5aeSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11472d9dcd5aeSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11473d9dcd5aeSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11474d9dcd5aeSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11475d9dcd5aeSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11476d9dcd5aeSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11477d9dcd5aeSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11478d9dcd5aeSmrgfi 11479191cded7Smrg 11480d9dcd5aeSmrgfound="no" 11481d9dcd5aeSmrgm4_foreach([flag], m4_cdr($@), [ 11482d9dcd5aeSmrg if test $found = "no" ; then 1148358deefebSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11484d9dcd5aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11485d9dcd5aeSmrg fi 11486d9dcd5aeSmrg 1148758deefebSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11488d9dcd5aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11489d9dcd5aeSmrg fi 11490d9dcd5aeSmrg 11491d9dcd5aeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11492d9dcd5aeSmrg 11493d9dcd5aeSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11494d9dcd5aeSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11495d9dcd5aeSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11496d9dcd5aeSmrg AC_CACHE_VAL($cacheid, 11497d9dcd5aeSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11498d9dcd5aeSmrg [eval $cacheid=yes], 11499d9dcd5aeSmrg [eval $cacheid=no])]) 11500d9dcd5aeSmrg 11501d9dcd5aeSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11502d9dcd5aeSmrg 11503d9dcd5aeSmrg eval supported=\$$cacheid 11504d9dcd5aeSmrg AC_MSG_RESULT([$supported]) 11505d9dcd5aeSmrg if test "$supported" = "yes" ; then 11506d9dcd5aeSmrg $1="$$1 ]flag[" 11507d9dcd5aeSmrg found="yes" 11508d9dcd5aeSmrg fi 11509d9dcd5aeSmrg fi 11510d9dcd5aeSmrg]) 11511d9dcd5aeSmrg]) # XORG_TESTSET_CFLAG 11512191cded7Smrg 11513d9dcd5aeSmrg# XORG_COMPILER_FLAGS 11514d9dcd5aeSmrg# --------------- 11515d9dcd5aeSmrg# Minimum version: 1.16.0 11516d9dcd5aeSmrg# 11517d9dcd5aeSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11518d9dcd5aeSmrg# arguments supported by the selected compiler which do NOT alter the generated 11519d9dcd5aeSmrg# code. These arguments will cause the compiler to print various warnings 11520d9dcd5aeSmrg# during compilation AND turn a conservative set of warnings into errors. 11521d9dcd5aeSmrg# 11522d9dcd5aeSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11523d9dcd5aeSmrg# future versions of util-macros as options are added to new compilers. 11524d9dcd5aeSmrg# 11525d9dcd5aeSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 11526d9dcd5aeSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11527d9dcd5aeSmrg 11528d9dcd5aeSmrgAC_ARG_ENABLE(selective-werror, 11529d9dcd5aeSmrg AS_HELP_STRING([--disable-selective-werror], 11530d9dcd5aeSmrg [Turn off selective compiler errors. (default: enabled)]), 11531d9dcd5aeSmrg [SELECTIVE_WERROR=$enableval], 11532d9dcd5aeSmrg [SELECTIVE_WERROR=yes]) 11533d9dcd5aeSmrg 11534d9dcd5aeSmrgAC_LANG_CASE( 11535d9dcd5aeSmrg [C], [ 11536d9dcd5aeSmrg define([PREFIX], [C]) 11537d9dcd5aeSmrg ], 11538d9dcd5aeSmrg [C++], [ 11539d9dcd5aeSmrg define([PREFIX], [CXX]) 11540d9dcd5aeSmrg ] 11541d9dcd5aeSmrg) 11542d9dcd5aeSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 11543d9dcd5aeSmrgif test "x$SUNCC" = "xyes"; then 11544d9dcd5aeSmrg [BASE_]PREFIX[FLAGS]="-v" 11545d9dcd5aeSmrgelse 11546d9dcd5aeSmrg [BASE_]PREFIX[FLAGS]="" 11547d9dcd5aeSmrgfi 11548191cded7Smrg 11549d9dcd5aeSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11550d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11551d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11552d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11553d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11554d9dcd5aeSmrg 11555d9dcd5aeSmrgAC_LANG_CASE( 11556d9dcd5aeSmrg [C], [ 11557d9dcd5aeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11558d9dcd5aeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11559d9dcd5aeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11560d9dcd5aeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1156158deefebSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11562d9dcd5aeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11563d9dcd5aeSmrg ] 11564d9dcd5aeSmrg) 11565191cded7Smrg 11566d9dcd5aeSmrg# This chunk adds additional warnings that could catch undesired effects. 11567d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11568d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11569d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11570d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11571d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11572d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1157358deefebSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11574d9dcd5aeSmrg 11575d9dcd5aeSmrg# These are currently disabled because they are noisy. They will be enabled 11576d9dcd5aeSmrg# in the future once the codebase is sufficiently modernized to silence 11577d9dcd5aeSmrg# them. For now, I don't want them to drown out the other warnings. 11578d9dcd5aeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11579d9dcd5aeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1158058deefebSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11581d9dcd5aeSmrg 11582d9dcd5aeSmrg# Turn some warnings into errors, so we don't accidently get successful builds 11583d9dcd5aeSmrg# when there are problems that should be fixed. 11584d9dcd5aeSmrg 11585d9dcd5aeSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 11586d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11587d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11588d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11589d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11590d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11591d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11592d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11593d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11594d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11595d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11596d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11597d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11598d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11599d9dcd5aeSmrgelse 11600d9dcd5aeSmrgAC_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]) 11601d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11602d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11603d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11604d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11605d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11606d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11607d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11608d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11609d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11610d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11611d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11612d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11613d9dcd5aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11614d9dcd5aeSmrgfi 11615ba064abeSmrg 11616d9dcd5aeSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11617d9dcd5aeSmrg]) # XORG_COMPILER_FLAGS 11618ba064abeSmrg 11619d9dcd5aeSmrg# XORG_CWARNFLAGS 11620d9dcd5aeSmrg# --------------- 11621d9dcd5aeSmrg# Minimum version: 1.2.0 11622d9dcd5aeSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11623b290cf36Smrg# 11624d9dcd5aeSmrg# Defines CWARNFLAGS to enable C compiler warnings. 11625b290cf36Smrg# 11626d9dcd5aeSmrg# This function is deprecated because it defines -fno-strict-aliasing 11627d9dcd5aeSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 11628d9dcd5aeSmrg# is needed, then it should be added explicitly in the module when 11629d9dcd5aeSmrg# it is updated to use BASE_CFLAGS. 11630d9dcd5aeSmrg# 11631d9dcd5aeSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 11632d9dcd5aeSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11633d9dcd5aeSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11634d9dcd5aeSmrgAC_LANG_CASE( 11635d9dcd5aeSmrg [C], [ 11636d9dcd5aeSmrg CWARNFLAGS="$BASE_CFLAGS" 11637d9dcd5aeSmrg if test "x$GCC" = xyes ; then 11638d9dcd5aeSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11639d9dcd5aeSmrg fi 11640d9dcd5aeSmrg AC_SUBST(CWARNFLAGS) 11641d9dcd5aeSmrg ] 11642d9dcd5aeSmrg) 11643d9dcd5aeSmrg]) # XORG_CWARNFLAGS 11644191cded7Smrg 11645d9dcd5aeSmrg# XORG_STRICT_OPTION 11646d9dcd5aeSmrg# ----------------------- 11647d9dcd5aeSmrg# Minimum version: 1.3.0 11648d9dcd5aeSmrg# 11649d9dcd5aeSmrg# Add configure option to enable strict compilation flags, such as treating 11650d9dcd5aeSmrg# warnings as fatal errors. 11651d9dcd5aeSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11652d9dcd5aeSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11653d9dcd5aeSmrg# 11654d9dcd5aeSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11655d9dcd5aeSmrg# when strict compilation is unconditionally desired. 11656d9dcd5aeSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11657d9dcd5aeSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 11658d9dcd5aeSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11659b290cf36Smrg 11660d9dcd5aeSmrgAC_ARG_ENABLE(strict-compilation, 11661d9dcd5aeSmrg AS_HELP_STRING([--enable-strict-compilation], 11662d9dcd5aeSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11663d9dcd5aeSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11664191cded7Smrg 11665d9dcd5aeSmrgAC_LANG_CASE( 11666d9dcd5aeSmrg [C], [ 11667d9dcd5aeSmrg define([PREFIX], [C]) 11668d9dcd5aeSmrg ], 11669d9dcd5aeSmrg [C++], [ 11670d9dcd5aeSmrg define([PREFIX], [CXX]) 11671d9dcd5aeSmrg ] 11672d9dcd5aeSmrg) 11673ba064abeSmrg 11674d9dcd5aeSmrg[STRICT_]PREFIX[FLAGS]="" 11675d9dcd5aeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11676d9dcd5aeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11677ba064abeSmrg 11678d9dcd5aeSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11679d9dcd5aeSmrg# activate it with -Werror, so we add it here explicitly. 11680d9dcd5aeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11681191cded7Smrg 11682d9dcd5aeSmrgif test "x$STRICT_COMPILE" = "xyes"; then 11683d9dcd5aeSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11684d9dcd5aeSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11685d9dcd5aeSmrgfi 11686d9dcd5aeSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11687d9dcd5aeSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11688d9dcd5aeSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11689d9dcd5aeSmrg]) # XORG_STRICT_OPTION 11690191cded7Smrg 11691d9dcd5aeSmrg# XORG_DEFAULT_OPTIONS 11692d9dcd5aeSmrg# -------------------- 11693d9dcd5aeSmrg# Minimum version: 1.3.0 11694b290cf36Smrg# 11695d9dcd5aeSmrg# Defines default options for X.Org modules. 11696b290cf36Smrg# 11697d9dcd5aeSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11698d9dcd5aeSmrgAC_REQUIRE([AC_PROG_INSTALL]) 11699d9dcd5aeSmrgXORG_COMPILER_FLAGS 11700d9dcd5aeSmrgXORG_CWARNFLAGS 11701d9dcd5aeSmrgXORG_STRICT_OPTION 11702d9dcd5aeSmrgXORG_RELEASE_VERSION 11703d9dcd5aeSmrgXORG_CHANGELOG 11704d9dcd5aeSmrgXORG_INSTALL 11705d9dcd5aeSmrgXORG_MANPAGE_SECTIONS 11706d9dcd5aeSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11707d9dcd5aeSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11708d9dcd5aeSmrg]) # XORG_DEFAULT_OPTIONS 11709d9dcd5aeSmrg 11710d9dcd5aeSmrg# XORG_INSTALL() 11711d9dcd5aeSmrg# ---------------- 11712d9dcd5aeSmrg# Minimum version: 1.4.0 11713b290cf36Smrg# 11714d9dcd5aeSmrg# Defines the variable INSTALL_CMD as the command to copy 11715d9dcd5aeSmrg# INSTALL from $prefix/share/util-macros. 11716ba064abeSmrg# 11717d9dcd5aeSmrgAC_DEFUN([XORG_INSTALL], [ 11718d9dcd5aeSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11719d9dcd5aeSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11720d9dcd5aeSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11721d9dcd5aeSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11722d9dcd5aeSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11723d9dcd5aeSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11724d9dcd5aeSmrgAC_SUBST([INSTALL_CMD]) 11725d9dcd5aeSmrg]) # XORG_INSTALL 11726d9dcd5aeSmrgdnl Copyright 2005 Red Hat, Inc 11727d9dcd5aeSmrgdnl 11728d9dcd5aeSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11729d9dcd5aeSmrgdnl documentation for any purpose is hereby granted without fee, provided that 11730d9dcd5aeSmrgdnl the above copyright notice appear in all copies and that both that 11731d9dcd5aeSmrgdnl copyright notice and this permission notice appear in supporting 11732d9dcd5aeSmrgdnl documentation. 11733d9dcd5aeSmrgdnl 11734d9dcd5aeSmrgdnl The above copyright notice and this permission notice shall be included 11735d9dcd5aeSmrgdnl in all copies or substantial portions of the Software. 11736d9dcd5aeSmrgdnl 11737d9dcd5aeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11738d9dcd5aeSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11739d9dcd5aeSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11740d9dcd5aeSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11741d9dcd5aeSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11742d9dcd5aeSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11743d9dcd5aeSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 11744d9dcd5aeSmrgdnl 11745d9dcd5aeSmrgdnl Except as contained in this notice, the name of the copyright holders shall 11746d9dcd5aeSmrgdnl not be used in advertising or otherwise to promote the sale, use or 11747d9dcd5aeSmrgdnl other dealings in this Software without prior written authorization 11748d9dcd5aeSmrgdnl from the copyright holders. 11749d9dcd5aeSmrgdnl 11750ba064abeSmrg 11751d9dcd5aeSmrg# XORG_RELEASE_VERSION 11752d9dcd5aeSmrg# -------------------- 11753d9dcd5aeSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1175458deefebSmrg 11755d9dcd5aeSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11756d9dcd5aeSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11757d9dcd5aeSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11758d9dcd5aeSmrg [Major version of this package]) 11759d9dcd5aeSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11760d9dcd5aeSmrg if test "x$PVM" = "x"; then 11761d9dcd5aeSmrg PVM="0" 11762d9dcd5aeSmrg fi 11763d9dcd5aeSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11764d9dcd5aeSmrg [$PVM], 11765d9dcd5aeSmrg [Minor version of this package]) 11766d9dcd5aeSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11767d9dcd5aeSmrg if test "x$PVP" = "x"; then 11768d9dcd5aeSmrg PVP="0" 11769d9dcd5aeSmrg fi 11770d9dcd5aeSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11771d9dcd5aeSmrg [$PVP], 11772d9dcd5aeSmrg [Patch version of this package]) 11773d9dcd5aeSmrg]) 11774ba064abeSmrg 11775d9dcd5aeSmrg# XORG_CHANGELOG() 11776d9dcd5aeSmrg# ---------------- 11777d9dcd5aeSmrg# Minimum version: 1.2.0 11778d9dcd5aeSmrg# 11779d9dcd5aeSmrg# Defines the variable CHANGELOG_CMD as the command to generate 11780d9dcd5aeSmrg# ChangeLog from git. 11781d9dcd5aeSmrg# 11782d9dcd5aeSmrg# 11783d9dcd5aeSmrgAC_DEFUN([XORG_CHANGELOG], [ 11784d9dcd5aeSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11785d9dcd5aeSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11786d9dcd5aeSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11787d9dcd5aeSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11788d9dcd5aeSmrgAC_SUBST([CHANGELOG_CMD]) 11789d9dcd5aeSmrg]) # XORG_CHANGELOG 11790191cded7Smrg 11791