aclocal.m4 revision 0a6b08f8
10a6b08f8Smrg# generated automatically by aclocal 1.14 -*- Autoconf -*- 20a6b08f8Smrg 30a6b08f8Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4126a8a12Smrg 5126a8a12Smrg# This file is free software; the Free Software Foundation 6126a8a12Smrg# gives unlimited permission to copy and/or distribute it, 7126a8a12Smrg# with or without modifications, as long as this notice is preserved. 8126a8a12Smrg 9126a8a12Smrg# This program is distributed in the hope that it will be useful, 10126a8a12Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11126a8a12Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12126a8a12Smrg# PARTICULAR PURPOSE. 13126a8a12Smrg 140a6b08f8Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15d656433aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16d656433aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17555991fdSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18555991fdSmrg[m4_warning([this file was generated for autoconf 2.68. 19d656433aSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20d656433aSmrgIf you have problems, you may need to regenerate the build system entirely. 210a6b08f8SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22126a8a12Smrg 230a6b08f8Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 24d656433aSmrg# 25555991fdSmrg# This file is free software; the Free Software Foundation 26555991fdSmrg# gives unlimited permission to copy and/or distribute it, 27555991fdSmrg# with or without modifications, as long as this notice is preserved. 28555991fdSmrg 29555991fdSmrg# AM_AUTOMAKE_VERSION(VERSION) 30555991fdSmrg# ---------------------------- 31555991fdSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32555991fdSmrg# generated from the m4 files accompanying Automake X.Y. 33555991fdSmrg# (This private macro should not be called outside this file.) 34555991fdSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 350a6b08f8Smrg[am__api_version='1.14' 36555991fdSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37555991fdSmrgdnl require some minimum version. Point them to the right macro. 380a6b08f8Smrgm4_if([$1], [1.14], [], 39555991fdSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40555991fdSmrg]) 41555991fdSmrg 42555991fdSmrg# _AM_AUTOCONF_VERSION(VERSION) 43555991fdSmrg# ----------------------------- 44555991fdSmrg# aclocal traces this macro to find the Autoconf version. 45555991fdSmrg# This is a private macro too. Using m4_define simplifies 46555991fdSmrg# the logic in aclocal, which can simply ignore this definition. 47555991fdSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48555991fdSmrg 49555991fdSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50555991fdSmrg# ------------------------------- 51555991fdSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52555991fdSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53555991fdSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 540a6b08f8Smrg[AM_AUTOMAKE_VERSION([1.14])dnl 55555991fdSmrgm4_ifndef([AC_AUTOCONF_VERSION], 56555991fdSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57555991fdSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58555991fdSmrg 59555991fdSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60555991fdSmrg 610a6b08f8Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 62d656433aSmrg# 63555991fdSmrg# This file is free software; the Free Software Foundation 64555991fdSmrg# gives unlimited permission to copy and/or distribute it, 65555991fdSmrg# with or without modifications, as long as this notice is preserved. 66d656433aSmrg 67555991fdSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 680a6b08f8Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 690a6b08f8Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70d656433aSmrg# 71555991fdSmrg# Of course, Automake must honor this variable whenever it calls a 72555991fdSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 73555991fdSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74555991fdSmrg# depending on how configure is run. This is pretty annoying, since 75555991fdSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76555991fdSmrg# source directory, any form will work fine, but in subdirectories a 77555991fdSmrg# relative path needs to be adjusted first. 78d656433aSmrg# 79555991fdSmrg# $ac_aux_dir/missing 80555991fdSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 81555991fdSmrg# $top_srcdir/$ac_aux_dir/missing 82555991fdSmrg# fails if $ac_aux_dir is absolute, 83555991fdSmrg# fails when called from a subdirectory in a VPATH build with 84555991fdSmrg# a relative $ac_aux_dir 85d656433aSmrg# 86555991fdSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87555991fdSmrg# are both prefixed by $srcdir. In an in-source build this is usually 880a6b08f8Smrg# harmless because $srcdir is '.', but things will broke when you 89555991fdSmrg# start a VPATH build or use an absolute $srcdir. 90d656433aSmrg# 91555991fdSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92555991fdSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93555991fdSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94555991fdSmrg# and then we would define $MISSING as 95555991fdSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 96555991fdSmrg# This will work as long as MISSING is not called from configure, because 97555991fdSmrg# unfortunately $(top_srcdir) has no meaning in configure. 98555991fdSmrg# However there are other variables, like CC, which are often used in 99555991fdSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100d656433aSmrg# 101555991fdSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 102555991fdSmrg# absolute PATH. The drawback is that using absolute paths prevent a 103555991fdSmrg# configured tree to be moved without reconfiguration. 104126a8a12Smrg 105555991fdSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106555991fdSmrg[dnl Rely on autoconf to set up CDPATH properly. 107555991fdSmrgAC_PREREQ([2.50])dnl 108555991fdSmrg# expand $ac_aux_dir to an absolute path 109555991fdSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 110d656433aSmrg]) 111d656433aSmrg 112555991fdSmrg# AM_CONDITIONAL -*- Autoconf -*- 113d656433aSmrg 1140a6b08f8Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 115555991fdSmrg# 116555991fdSmrg# This file is free software; the Free Software Foundation 117555991fdSmrg# gives unlimited permission to copy and/or distribute it, 118555991fdSmrg# with or without modifications, as long as this notice is preserved. 119126a8a12Smrg 120555991fdSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 121555991fdSmrg# ------------------------------------- 122555991fdSmrg# Define a conditional. 123555991fdSmrgAC_DEFUN([AM_CONDITIONAL], 1240a6b08f8Smrg[AC_PREREQ([2.52])dnl 1250a6b08f8Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1260a6b08f8Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 127555991fdSmrgAC_SUBST([$1_TRUE])dnl 128555991fdSmrgAC_SUBST([$1_FALSE])dnl 129555991fdSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 130555991fdSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 131555991fdSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 132555991fdSmrgif $2; then 133555991fdSmrg $1_TRUE= 134555991fdSmrg $1_FALSE='#' 135555991fdSmrgelse 136555991fdSmrg $1_TRUE='#' 137555991fdSmrg $1_FALSE= 138555991fdSmrgfi 139555991fdSmrgAC_CONFIG_COMMANDS_PRE( 140555991fdSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 141555991fdSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 142555991fdSmrgUsually this means the macro was only invoked conditionally.]]) 143555991fdSmrgfi])]) 144126a8a12Smrg 1450a6b08f8Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 146555991fdSmrg# 147555991fdSmrg# This file is free software; the Free Software Foundation 148555991fdSmrg# gives unlimited permission to copy and/or distribute it, 149555991fdSmrg# with or without modifications, as long as this notice is preserved. 150d656433aSmrg 151d656433aSmrg 1520a6b08f8Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 153555991fdSmrg# written in clear, in which case automake, when reading aclocal.m4, 154555991fdSmrg# will think it sees a *use*, and therefore will trigger all it's 155555991fdSmrg# C support machinery. Also note that it means that autoscan, seeing 156555991fdSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 157d656433aSmrg 158d656433aSmrg 159555991fdSmrg# _AM_DEPENDENCIES(NAME) 160d656433aSmrg# ---------------------- 161555991fdSmrg# See how the compiler implements dependency checking. 1620a6b08f8Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 163555991fdSmrg# We try a few techniques and use that to set a single cache variable. 164555991fdSmrg# 165555991fdSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 166555991fdSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 167555991fdSmrg# dependency, and given that the user is not expected to run this macro, 168555991fdSmrg# just rely on AC_PROG_CC. 169555991fdSmrgAC_DEFUN([_AM_DEPENDENCIES], 170555991fdSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 171555991fdSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 172555991fdSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 173555991fdSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 174d656433aSmrg 1750a6b08f8Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1760a6b08f8Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1770a6b08f8Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1780a6b08f8Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1790a6b08f8Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1800a6b08f8Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1810a6b08f8Smrg [depcc="$$1" am_compiler_list=]) 182d656433aSmrg 183555991fdSmrgAC_CACHE_CHECK([dependency style of $depcc], 184555991fdSmrg [am_cv_$1_dependencies_compiler_type], 185555991fdSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 186555991fdSmrg # We make a subdir and do the tests there. Otherwise we can end up 187555991fdSmrg # making bogus files that we don't know about and never remove. For 188555991fdSmrg # instance it was reported that on HP-UX the gcc test will end up 1890a6b08f8Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 1900a6b08f8Smrg # in D". 1910a6b08f8Smrg rm -rf conftest.dir 192555991fdSmrg mkdir conftest.dir 193555991fdSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 194555991fdSmrg # using a relative directory. 195555991fdSmrg cp "$am_depcomp" conftest.dir 196555991fdSmrg cd conftest.dir 197555991fdSmrg # We will build objects and dependencies in a subdirectory because 198555991fdSmrg # it helps to detect inapplicable dependency modes. For instance 199555991fdSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 200555991fdSmrg # side effect of compilation, but ICC will put the dependencies in 201555991fdSmrg # the current directory while Tru64 will put them in the object 202555991fdSmrg # directory. 203555991fdSmrg mkdir sub 204126a8a12Smrg 205555991fdSmrg am_cv_$1_dependencies_compiler_type=none 206555991fdSmrg if test "$am_compiler_list" = ""; then 207555991fdSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 208126a8a12Smrg fi 209555991fdSmrg am__universal=false 210555991fdSmrg m4_case([$1], [CC], 211555991fdSmrg [case " $depcc " in #( 212555991fdSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 213555991fdSmrg esac], 214555991fdSmrg [CXX], 215555991fdSmrg [case " $depcc " in #( 216555991fdSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 217555991fdSmrg esac]) 218126a8a12Smrg 219555991fdSmrg for depmode in $am_compiler_list; do 220555991fdSmrg # Setup a source with many dependencies, because some compilers 221555991fdSmrg # like to wrap large dependency lists on column 80 (with \), and 222555991fdSmrg # we should not choose a depcomp mode which is confused by this. 223555991fdSmrg # 224555991fdSmrg # We need to recreate these files for each test, as the compiler may 225555991fdSmrg # overwrite some of them when testing with obscure command lines. 226555991fdSmrg # This happens at least with the AIX C compiler. 227555991fdSmrg : > sub/conftest.c 228555991fdSmrg for i in 1 2 3 4 5 6; do 229555991fdSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2300a6b08f8Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2310a6b08f8Smrg # Solaris 10 /bin/sh. 2320a6b08f8Smrg echo '/* dummy */' > sub/conftst$i.h 233555991fdSmrg done 234555991fdSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 235126a8a12Smrg 2360a6b08f8Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 237555991fdSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2380a6b08f8Smrg # handle '-M -o', and we need to detect this. Also, some Intel 2390a6b08f8Smrg # versions had trouble with output in subdirs. 240555991fdSmrg am__obj=sub/conftest.${OBJEXT-o} 241555991fdSmrg am__minus_obj="-o $am__obj" 242555991fdSmrg case $depmode in 243555991fdSmrg gcc) 244555991fdSmrg # This depmode causes a compiler race in universal mode. 245555991fdSmrg test "$am__universal" = false || continue 246555991fdSmrg ;; 247555991fdSmrg nosideeffect) 2480a6b08f8Smrg # After this tag, mechanisms are not by side-effect, so they'll 2490a6b08f8Smrg # only be used when explicitly requested. 250555991fdSmrg if test "x$enable_dependency_tracking" = xyes; then 251555991fdSmrg continue 252555991fdSmrg else 253555991fdSmrg break 254555991fdSmrg fi 255555991fdSmrg ;; 2560a6b08f8Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2570a6b08f8Smrg # This compiler won't grok '-c -o', but also, the minuso test has 258555991fdSmrg # not run yet. These depmodes are late enough in the game, and 259555991fdSmrg # so weak that their functioning should not be impacted. 260555991fdSmrg am__obj=conftest.${OBJEXT-o} 261555991fdSmrg am__minus_obj= 262555991fdSmrg ;; 263555991fdSmrg none) break ;; 264555991fdSmrg esac 265555991fdSmrg if depmode=$depmode \ 266555991fdSmrg source=sub/conftest.c object=$am__obj \ 267555991fdSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 268555991fdSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 269555991fdSmrg >/dev/null 2>conftest.err && 270555991fdSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 271555991fdSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 272555991fdSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 273555991fdSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 274555991fdSmrg # icc doesn't choke on unknown options, it will just issue warnings 275555991fdSmrg # or remarks (even with -Werror). So we grep stderr for any message 276555991fdSmrg # that says an option was ignored or not supported. 277555991fdSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 278555991fdSmrg # icc: Command line warning: ignoring option '-M'; no argument required 279555991fdSmrg # The diagnosis changed in icc 8.0: 280555991fdSmrg # icc: Command line remark: option '-MP' not supported 281555991fdSmrg if (grep 'ignoring option' conftest.err || 282555991fdSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 283555991fdSmrg am_cv_$1_dependencies_compiler_type=$depmode 284555991fdSmrg break 285555991fdSmrg fi 286555991fdSmrg fi 287555991fdSmrg done 288126a8a12Smrg 289555991fdSmrg cd .. 290555991fdSmrg rm -rf conftest.dir 291555991fdSmrgelse 292555991fdSmrg am_cv_$1_dependencies_compiler_type=none 293555991fdSmrgfi 294555991fdSmrg]) 295555991fdSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 296555991fdSmrgAM_CONDITIONAL([am__fastdep$1], [ 297555991fdSmrg test "x$enable_dependency_tracking" != xno \ 298555991fdSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 299555991fdSmrg]) 300126a8a12Smrg 301126a8a12Smrg 302555991fdSmrg# AM_SET_DEPDIR 303555991fdSmrg# ------------- 304555991fdSmrg# Choose a directory name for dependency files. 3050a6b08f8Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 306555991fdSmrgAC_DEFUN([AM_SET_DEPDIR], 307555991fdSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 308555991fdSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 309555991fdSmrg]) 310126a8a12Smrg 311126a8a12Smrg 312555991fdSmrg# AM_DEP_TRACK 313555991fdSmrg# ------------ 314555991fdSmrgAC_DEFUN([AM_DEP_TRACK], 3150a6b08f8Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3160a6b08f8SmrgAS_HELP_STRING( 3170a6b08f8Smrg [--enable-dependency-tracking], 3180a6b08f8Smrg [do not reject slow dependency extractors]) 3190a6b08f8SmrgAS_HELP_STRING( 3200a6b08f8Smrg [--disable-dependency-tracking], 3210a6b08f8Smrg [speeds up one-time build])]) 322555991fdSmrgif test "x$enable_dependency_tracking" != xno; then 323555991fdSmrg am_depcomp="$ac_aux_dir/depcomp" 324555991fdSmrg AMDEPBACKSLASH='\' 3250a6b08f8Smrg am__nodep='_no' 326555991fdSmrgfi 327555991fdSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 328555991fdSmrgAC_SUBST([AMDEPBACKSLASH])dnl 329555991fdSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3300a6b08f8SmrgAC_SUBST([am__nodep])dnl 3310a6b08f8Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 332555991fdSmrg]) 333126a8a12Smrg 334555991fdSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 335126a8a12Smrg 3360a6b08f8Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 337555991fdSmrg# 338555991fdSmrg# This file is free software; the Free Software Foundation 339555991fdSmrg# gives unlimited permission to copy and/or distribute it, 340555991fdSmrg# with or without modifications, as long as this notice is preserved. 341126a8a12Smrg 342126a8a12Smrg 343555991fdSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 344d656433aSmrg# ------------------------------ 345555991fdSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 346555991fdSmrg[{ 3470a6b08f8Smrg # Older Autoconf quotes --file arguments for eval, but not when files 348555991fdSmrg # are listed without --file. Let's play safe and only enable the eval 349555991fdSmrg # if we detect the quoting. 350555991fdSmrg case $CONFIG_FILES in 351555991fdSmrg *\'*) eval set x "$CONFIG_FILES" ;; 352555991fdSmrg *) set x $CONFIG_FILES ;; 353555991fdSmrg esac 354555991fdSmrg shift 355555991fdSmrg for mf 356555991fdSmrg do 357555991fdSmrg # Strip MF so we end up with the name of the file. 358555991fdSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 359555991fdSmrg # Check whether this is an Automake generated Makefile or not. 3600a6b08f8Smrg # We used to match only the files named 'Makefile.in', but 361555991fdSmrg # some people rename them; so instead we look at the file content. 362555991fdSmrg # Grep'ing the first line is not enough: some people post-process 363555991fdSmrg # each Makefile.in and add a new line on top of each file to say so. 364555991fdSmrg # Grep'ing the whole file is not good either: AIX grep has a line 365555991fdSmrg # limit of 2048, but all sed's we know have understand at least 4000. 366555991fdSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 367555991fdSmrg dirpart=`AS_DIRNAME("$mf")` 368555991fdSmrg else 369555991fdSmrg continue 370555991fdSmrg fi 371555991fdSmrg # Extract the definition of DEPDIR, am__include, and am__quote 3720a6b08f8Smrg # from the Makefile without running 'make'. 373555991fdSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 374555991fdSmrg test -z "$DEPDIR" && continue 375555991fdSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3760a6b08f8Smrg test -z "$am__include" && continue 377555991fdSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 378555991fdSmrg # Find all dependency output files, they are included files with 379555991fdSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 380555991fdSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 381555991fdSmrg # expansion. 382555991fdSmrg for file in `sed -n " 383555991fdSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3840a6b08f8Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 385555991fdSmrg # Make sure the directory exists. 386555991fdSmrg test -f "$dirpart/$file" && continue 387555991fdSmrg fdir=`AS_DIRNAME(["$file"])` 388555991fdSmrg AS_MKDIR_P([$dirpart/$fdir]) 389555991fdSmrg # echo "creating $dirpart/$file" 390555991fdSmrg echo '# dummy' > "$dirpart/$file" 391555991fdSmrg done 392555991fdSmrg done 393555991fdSmrg} 394555991fdSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 395d656433aSmrg 396d656433aSmrg 397555991fdSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 398555991fdSmrg# ----------------------------- 399555991fdSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 400555991fdSmrg# 401555991fdSmrg# This code is only required when automatic dependency tracking 4020a6b08f8Smrg# is enabled. FIXME. This creates each '.P' file that we will 403555991fdSmrg# need in order to bootstrap the dependency handling code. 404555991fdSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 405555991fdSmrg[AC_CONFIG_COMMANDS([depfiles], 406555991fdSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 407555991fdSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 408126a8a12Smrg]) 409126a8a12Smrg 410555991fdSmrg# Do all the work for Automake. -*- Autoconf -*- 411d656433aSmrg 4120a6b08f8Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 413555991fdSmrg# 414555991fdSmrg# This file is free software; the Free Software Foundation 415555991fdSmrg# gives unlimited permission to copy and/or distribute it, 416555991fdSmrg# with or without modifications, as long as this notice is preserved. 417d656433aSmrg 418555991fdSmrg# This macro actually does too much. Some checks are only needed if 419555991fdSmrg# your package does certain things. But this isn't really a big deal. 420126a8a12Smrg 4210a6b08f8Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 4220a6b08f8Smrgm4_define([AC_PROG_CC], 4230a6b08f8Smrgm4_defn([AC_PROG_CC]) 4240a6b08f8Smrg[_AM_PROG_CC_C_O 4250a6b08f8Smrg]) 4260a6b08f8Smrg 427555991fdSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 428555991fdSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 429555991fdSmrg# ----------------------------------------------- 430555991fdSmrg# The call with PACKAGE and VERSION arguments is the old style 431555991fdSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 432555991fdSmrg# and VERSION should now be passed to AC_INIT and removed from 433555991fdSmrg# the call to AM_INIT_AUTOMAKE. 434555991fdSmrg# We support both call styles for the transition. After 435555991fdSmrg# the next Automake release, Autoconf can make the AC_INIT 436555991fdSmrg# arguments mandatory, and then we can depend on a new Autoconf 437555991fdSmrg# release and drop the old call support. 438555991fdSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4390a6b08f8Smrg[AC_PREREQ([2.65])dnl 440555991fdSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 441555991fdSmrgdnl the ones we care about. 442555991fdSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 443555991fdSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 444555991fdSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 445555991fdSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 446555991fdSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 447555991fdSmrg # is not polluted with repeated "-I." 448555991fdSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 449555991fdSmrg # test to see if srcdir already configured 450555991fdSmrg if test -f $srcdir/config.status; then 451555991fdSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 452555991fdSmrg fi 453555991fdSmrgfi 454126a8a12Smrg 455555991fdSmrg# test whether we have cygpath 456555991fdSmrgif test -z "$CYGPATH_W"; then 457555991fdSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 458555991fdSmrg CYGPATH_W='cygpath -w' 459555991fdSmrg else 460555991fdSmrg CYGPATH_W=echo 461555991fdSmrg fi 462555991fdSmrgfi 463555991fdSmrgAC_SUBST([CYGPATH_W]) 464126a8a12Smrg 465555991fdSmrg# Define the identity of the package. 466555991fdSmrgdnl Distinguish between old-style and new-style calls. 467555991fdSmrgm4_ifval([$2], 4680a6b08f8Smrg[AC_DIAGNOSE([obsolete], 4690a6b08f8Smrg [$0: two- and three-arguments forms are deprecated.]) 4700a6b08f8Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 471555991fdSmrg AC_SUBST([PACKAGE], [$1])dnl 472555991fdSmrg AC_SUBST([VERSION], [$2])], 473555991fdSmrg[_AM_SET_OPTIONS([$1])dnl 474555991fdSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4750a6b08f8Smrgm4_if( 4760a6b08f8Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 4770a6b08f8Smrg [ok:ok],, 478555991fdSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 479555991fdSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 480555991fdSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 481126a8a12Smrg 482555991fdSmrg_AM_IF_OPTION([no-define],, 4830a6b08f8Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4840a6b08f8Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 485126a8a12Smrg 486555991fdSmrg# Some tools Automake needs. 487555991fdSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 488555991fdSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4890a6b08f8SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4900a6b08f8SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4910a6b08f8SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4920a6b08f8SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4930a6b08f8SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 494555991fdSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 495555991fdSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4960a6b08f8SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4970a6b08f8Smrg# For better backward compatibility. To be removed once Automake 1.9.x 4980a6b08f8Smrg# dies out for good. For more background, see: 4990a6b08f8Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 5000a6b08f8Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 5010a6b08f8SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 502555991fdSmrg# We need awk for the "check" target. The system "awk" is bad on 503555991fdSmrg# some platforms. 504555991fdSmrgAC_REQUIRE([AC_PROG_AWK])dnl 505555991fdSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 506555991fdSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 507555991fdSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 508555991fdSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 509555991fdSmrg [_AM_PROG_TAR([v7])])]) 510555991fdSmrg_AM_IF_OPTION([no-dependencies],, 511555991fdSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5120a6b08f8Smrg [_AM_DEPENDENCIES([CC])], 5130a6b08f8Smrg [m4_define([AC_PROG_CC], 5140a6b08f8Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 515555991fdSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5160a6b08f8Smrg [_AM_DEPENDENCIES([CXX])], 5170a6b08f8Smrg [m4_define([AC_PROG_CXX], 5180a6b08f8Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 519555991fdSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5200a6b08f8Smrg [_AM_DEPENDENCIES([OBJC])], 5210a6b08f8Smrg [m4_define([AC_PROG_OBJC], 5220a6b08f8Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5230a6b08f8SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5240a6b08f8Smrg [_AM_DEPENDENCIES([OBJCXX])], 5250a6b08f8Smrg [m4_define([AC_PROG_OBJCXX], 5260a6b08f8Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 527555991fdSmrg]) 5280a6b08f8SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 5290a6b08f8Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 5300a6b08f8Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 5310a6b08f8Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 532555991fdSmrgAC_CONFIG_COMMANDS_PRE(dnl 533555991fdSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 534555991fdSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 535126a8a12Smrg 5360a6b08f8Smrg# POSIX will say in a future version that running "rm -f" with no argument 5370a6b08f8Smrg# is OK; and we want to be able to make that assumption in our Makefile 5380a6b08f8Smrg# recipes. So use an aggressive probe to check that the usage we want is 5390a6b08f8Smrg# actually supported "in the wild" to an acceptable degree. 5400a6b08f8Smrg# See automake bug#10828. 5410a6b08f8Smrg# To make any issue more visible, cause the running configure to be aborted 5420a6b08f8Smrg# by default if the 'rm' program in use doesn't match our expectations; the 5430a6b08f8Smrg# user can still override this though. 5440a6b08f8Smrgif rm -f && rm -fr && rm -rf; then : OK; else 5450a6b08f8Smrg cat >&2 <<'END' 5460a6b08f8SmrgOops! 5470a6b08f8Smrg 5480a6b08f8SmrgYour 'rm' program seems unable to run without file operands specified 5490a6b08f8Smrgon the command line, even when the '-f' option is present. This is contrary 5500a6b08f8Smrgto the behaviour of most rm programs out there, and not conforming with 5510a6b08f8Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 5520a6b08f8Smrg 5530a6b08f8SmrgPlease tell bug-automake@gnu.org about your system, including the value 5540a6b08f8Smrgof your $PATH and any error possibly output before this message. This 5550a6b08f8Smrgcan help us improve future automake versions. 5560a6b08f8Smrg 5570a6b08f8SmrgEND 5580a6b08f8Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 5590a6b08f8Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 5600a6b08f8Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 5610a6b08f8Smrg echo >&2 5620a6b08f8Smrg else 5630a6b08f8Smrg cat >&2 <<'END' 5640a6b08f8SmrgAborting the configuration process, to ensure you take notice of the issue. 5650a6b08f8Smrg 5660a6b08f8SmrgYou can download and install GNU coreutils to get an 'rm' implementation 5670a6b08f8Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 5680a6b08f8Smrg 5690a6b08f8SmrgIf you want to complete the configuration process using your problematic 5700a6b08f8Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 5710a6b08f8Smrgto "yes", and re-run configure. 5720a6b08f8Smrg 5730a6b08f8SmrgEND 5740a6b08f8Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 5750a6b08f8Smrg fi 5760a6b08f8Smrgfi]) 5770a6b08f8Smrg 5780a6b08f8Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 579555991fdSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 580555991fdSmrgdnl mangled by Autoconf and run in a shell conditional statement. 581555991fdSmrgm4_define([_AC_COMPILER_EXEEXT], 582555991fdSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 583126a8a12Smrg 584555991fdSmrg# When config.status generates a header, we must update the stamp-h file. 585555991fdSmrg# This file resides in the same directory as the config header 586555991fdSmrg# that is generated. The stamp files are numbered to have different names. 587126a8a12Smrg 588555991fdSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 589555991fdSmrg# loop where config.status creates the headers, so we can generate 590555991fdSmrg# our stamp files there. 591555991fdSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 592555991fdSmrg[# Compute $1's index in $config_headers. 593555991fdSmrg_am_arg=$1 594555991fdSmrg_am_stamp_count=1 595555991fdSmrgfor _am_header in $config_headers :; do 596555991fdSmrg case $_am_header in 597555991fdSmrg $_am_arg | $_am_arg:* ) 598555991fdSmrg break ;; 599555991fdSmrg * ) 600555991fdSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 601555991fdSmrg esac 602555991fdSmrgdone 603555991fdSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 604126a8a12Smrg 6050a6b08f8Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 606555991fdSmrg# 607555991fdSmrg# This file is free software; the Free Software Foundation 608555991fdSmrg# gives unlimited permission to copy and/or distribute it, 609555991fdSmrg# with or without modifications, as long as this notice is preserved. 610126a8a12Smrg 611555991fdSmrg# AM_PROG_INSTALL_SH 612555991fdSmrg# ------------------ 613555991fdSmrg# Define $install_sh. 614555991fdSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 615555991fdSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 616555991fdSmrgif test x"${install_sh}" != xset; then 617555991fdSmrg case $am_aux_dir in 618555991fdSmrg *\ * | *\ *) 619555991fdSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 620555991fdSmrg *) 621555991fdSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 622555991fdSmrg esac 623555991fdSmrgfi 6240a6b08f8SmrgAC_SUBST([install_sh])]) 625126a8a12Smrg 6260a6b08f8Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 627555991fdSmrg# 628555991fdSmrg# This file is free software; the Free Software Foundation 629555991fdSmrg# gives unlimited permission to copy and/or distribute it, 630555991fdSmrg# with or without modifications, as long as this notice is preserved. 631126a8a12Smrg 632555991fdSmrg# Check whether the underlying file-system supports filenames 633555991fdSmrg# with a leading dot. For instance MS-DOS doesn't. 634555991fdSmrgAC_DEFUN([AM_SET_LEADING_DOT], 635555991fdSmrg[rm -rf .tst 2>/dev/null 636555991fdSmrgmkdir .tst 2>/dev/null 637555991fdSmrgif test -d .tst; then 638555991fdSmrg am__leading_dot=. 639555991fdSmrgelse 640555991fdSmrg am__leading_dot=_ 641555991fdSmrgfi 642555991fdSmrgrmdir .tst 2>/dev/null 643555991fdSmrgAC_SUBST([am__leading_dot])]) 644126a8a12Smrg 645555991fdSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 646555991fdSmrg 6470a6b08f8Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 648d656433aSmrg# 649555991fdSmrg# This file is free software; the Free Software Foundation 650555991fdSmrg# gives unlimited permission to copy and/or distribute it, 651555991fdSmrg# with or without modifications, as long as this notice is preserved. 652126a8a12Smrg 653555991fdSmrg# AM_MAKE_INCLUDE() 654555991fdSmrg# ----------------- 655555991fdSmrg# Check to see how make treats includes. 656555991fdSmrgAC_DEFUN([AM_MAKE_INCLUDE], 657555991fdSmrg[am_make=${MAKE-make} 658555991fdSmrgcat > confinc << 'END' 659555991fdSmrgam__doit: 660555991fdSmrg @echo this is the am__doit target 661555991fdSmrg.PHONY: am__doit 662555991fdSmrgEND 663555991fdSmrg# If we don't find an include directive, just comment out the code. 664555991fdSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 665555991fdSmrgam__include="#" 666555991fdSmrgam__quote= 667555991fdSmrg_am_result=none 668555991fdSmrg# First try GNU make style include. 669555991fdSmrgecho "include confinc" > confmf 6700a6b08f8Smrg# Ignore all kinds of additional output from 'make'. 671555991fdSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 672555991fdSmrg*the\ am__doit\ target*) 673555991fdSmrg am__include=include 674555991fdSmrg am__quote= 675555991fdSmrg _am_result=GNU 676555991fdSmrg ;; 677555991fdSmrgesac 678555991fdSmrg# Now try BSD make style include. 679555991fdSmrgif test "$am__include" = "#"; then 680555991fdSmrg echo '.include "confinc"' > confmf 681555991fdSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 682555991fdSmrg *the\ am__doit\ target*) 683555991fdSmrg am__include=.include 684555991fdSmrg am__quote="\"" 685555991fdSmrg _am_result=BSD 686555991fdSmrg ;; 687555991fdSmrg esac 688555991fdSmrgfi 689555991fdSmrgAC_SUBST([am__include]) 690555991fdSmrgAC_SUBST([am__quote]) 691555991fdSmrgAC_MSG_RESULT([$_am_result]) 692555991fdSmrgrm -f confinc confmf 693555991fdSmrg]) 694d656433aSmrg 695555991fdSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 696d656433aSmrg 6970a6b08f8Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 698555991fdSmrg# 699555991fdSmrg# This file is free software; the Free Software Foundation 700555991fdSmrg# gives unlimited permission to copy and/or distribute it, 701555991fdSmrg# with or without modifications, as long as this notice is preserved. 702d656433aSmrg 703555991fdSmrg# AM_MISSING_PROG(NAME, PROGRAM) 704d656433aSmrg# ------------------------------ 705555991fdSmrgAC_DEFUN([AM_MISSING_PROG], 706555991fdSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 707555991fdSmrg$1=${$1-"${am_missing_run}$2"} 708555991fdSmrgAC_SUBST($1)]) 709d656433aSmrg 710555991fdSmrg# AM_MISSING_HAS_RUN 711555991fdSmrg# ------------------ 7120a6b08f8Smrg# Define MISSING if not defined so far and test if it is modern enough. 7130a6b08f8Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 714555991fdSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 715555991fdSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 716555991fdSmrgAC_REQUIRE_AUX_FILE([missing])dnl 717555991fdSmrgif test x"${MISSING+set}" != xset; then 718555991fdSmrg case $am_aux_dir in 719555991fdSmrg *\ * | *\ *) 720555991fdSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 721555991fdSmrg *) 722555991fdSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 723555991fdSmrg esac 724555991fdSmrgfi 725555991fdSmrg# Use eval to expand $SHELL 7260a6b08f8Smrgif eval "$MISSING --is-lightweight"; then 7270a6b08f8Smrg am_missing_run="$MISSING " 728555991fdSmrgelse 729555991fdSmrg am_missing_run= 7300a6b08f8Smrg AC_MSG_WARN(['missing' script is too old or missing]) 731555991fdSmrgfi 732555991fdSmrg]) 733d656433aSmrg 734555991fdSmrg# Helper functions for option handling. -*- Autoconf -*- 735126a8a12Smrg 7360a6b08f8Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 737555991fdSmrg# 738555991fdSmrg# This file is free software; the Free Software Foundation 739555991fdSmrg# gives unlimited permission to copy and/or distribute it, 740555991fdSmrg# with or without modifications, as long as this notice is preserved. 741d656433aSmrg 742555991fdSmrg# _AM_MANGLE_OPTION(NAME) 743555991fdSmrg# ----------------------- 744555991fdSmrgAC_DEFUN([_AM_MANGLE_OPTION], 745555991fdSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 746126a8a12Smrg 747555991fdSmrg# _AM_SET_OPTION(NAME) 7480a6b08f8Smrg# -------------------- 749555991fdSmrg# Set option NAME. Presently that only means defining a flag for this option. 750555991fdSmrgAC_DEFUN([_AM_SET_OPTION], 7510a6b08f8Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 752126a8a12Smrg 753555991fdSmrg# _AM_SET_OPTIONS(OPTIONS) 7540a6b08f8Smrg# ------------------------ 755555991fdSmrg# OPTIONS is a space-separated list of Automake options. 756555991fdSmrgAC_DEFUN([_AM_SET_OPTIONS], 757555991fdSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 758126a8a12Smrg 759555991fdSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 760555991fdSmrg# ------------------------------------------- 761555991fdSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 762555991fdSmrgAC_DEFUN([_AM_IF_OPTION], 763555991fdSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 764126a8a12Smrg 7650a6b08f8Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 7660a6b08f8Smrg# 7670a6b08f8Smrg# This file is free software; the Free Software Foundation 7680a6b08f8Smrg# gives unlimited permission to copy and/or distribute it, 7690a6b08f8Smrg# with or without modifications, as long as this notice is preserved. 7700a6b08f8Smrg 7710a6b08f8Smrg# _AM_PROG_CC_C_O 7720a6b08f8Smrg# --------------- 7730a6b08f8Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 7740a6b08f8Smrg# to automatically call this. 7750a6b08f8SmrgAC_DEFUN([_AM_PROG_CC_C_O], 7760a6b08f8Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7770a6b08f8SmrgAC_REQUIRE_AUX_FILE([compile])dnl 7780a6b08f8SmrgAC_LANG_PUSH([C])dnl 7790a6b08f8SmrgAC_CACHE_CHECK( 7800a6b08f8Smrg [whether $CC understands -c and -o together], 7810a6b08f8Smrg [am_cv_prog_cc_c_o], 7820a6b08f8Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 7830a6b08f8Smrg # Make sure it works both with $CC and with simple cc. 7840a6b08f8Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 7850a6b08f8Smrg # compilers refuse to overwrite an existing .o file with -o, 7860a6b08f8Smrg # though they will create one. 7870a6b08f8Smrg am_cv_prog_cc_c_o=yes 7880a6b08f8Smrg for am_i in 1 2; do 7890a6b08f8Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 7900a6b08f8Smrg && test -f conftest2.$ac_objext; then 7910a6b08f8Smrg : OK 7920a6b08f8Smrg else 7930a6b08f8Smrg am_cv_prog_cc_c_o=no 7940a6b08f8Smrg break 7950a6b08f8Smrg fi 7960a6b08f8Smrg done 7970a6b08f8Smrg rm -f core conftest* 7980a6b08f8Smrg unset am_i]) 7990a6b08f8Smrgif test "$am_cv_prog_cc_c_o" != yes; then 8000a6b08f8Smrg # Losing compiler, so override with the script. 8010a6b08f8Smrg # FIXME: It is wrong to rewrite CC. 8020a6b08f8Smrg # But if we don't then we get into trouble of one sort or another. 8030a6b08f8Smrg # A longer-term fix would be to have automake use am__CC in this case, 8040a6b08f8Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 8050a6b08f8Smrg CC="$am_aux_dir/compile $CC" 8060a6b08f8Smrgfi 8070a6b08f8SmrgAC_LANG_POP([C])]) 8080a6b08f8Smrg 8090a6b08f8Smrg# For backward compatibility. 8100a6b08f8SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 811126a8a12Smrg 8120a6b08f8Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 813555991fdSmrg# 814555991fdSmrg# This file is free software; the Free Software Foundation 815555991fdSmrg# gives unlimited permission to copy and/or distribute it, 816555991fdSmrg# with or without modifications, as long as this notice is preserved. 817126a8a12Smrg 8180a6b08f8Smrg# AM_RUN_LOG(COMMAND) 8190a6b08f8Smrg# ------------------- 8200a6b08f8Smrg# Run COMMAND, save the exit status in ac_status, and log it. 8210a6b08f8Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 8220a6b08f8SmrgAC_DEFUN([AM_RUN_LOG], 8230a6b08f8Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 8240a6b08f8Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 8250a6b08f8Smrg ac_status=$? 8260a6b08f8Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 8270a6b08f8Smrg (exit $ac_status); }]) 8280a6b08f8Smrg 8290a6b08f8Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8300a6b08f8Smrg 8310a6b08f8Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 8320a6b08f8Smrg# 8330a6b08f8Smrg# This file is free software; the Free Software Foundation 8340a6b08f8Smrg# gives unlimited permission to copy and/or distribute it, 8350a6b08f8Smrg# with or without modifications, as long as this notice is preserved. 836126a8a12Smrg 837555991fdSmrg# AM_SANITY_CHECK 838555991fdSmrg# --------------- 839555991fdSmrgAC_DEFUN([AM_SANITY_CHECK], 840555991fdSmrg[AC_MSG_CHECKING([whether build environment is sane]) 841555991fdSmrg# Reject unsafe characters in $srcdir or the absolute working directory 842555991fdSmrg# name. Accept space and tab only in the latter. 843555991fdSmrgam_lf=' 844555991fdSmrg' 845555991fdSmrgcase `pwd` in 846555991fdSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 847555991fdSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 848555991fdSmrgesac 849555991fdSmrgcase $srcdir in 850555991fdSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8510a6b08f8Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 852555991fdSmrgesac 853d656433aSmrg 8540a6b08f8Smrg# Do 'set' in a subshell so we don't clobber the current shell's 855555991fdSmrg# arguments. Must try -L first in case configure is actually a 856555991fdSmrg# symlink; some systems play weird games with the mod time of symlinks 857555991fdSmrg# (eg FreeBSD returns the mod time of the symlink's containing 858555991fdSmrg# directory). 859555991fdSmrgif ( 8600a6b08f8Smrg am_has_slept=no 8610a6b08f8Smrg for am_try in 1 2; do 8620a6b08f8Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 8630a6b08f8Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8640a6b08f8Smrg if test "$[*]" = "X"; then 8650a6b08f8Smrg # -L didn't work. 8660a6b08f8Smrg set X `ls -t "$srcdir/configure" conftest.file` 8670a6b08f8Smrg fi 8680a6b08f8Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8690a6b08f8Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8700a6b08f8Smrg 8710a6b08f8Smrg # If neither matched, then we have a broken ls. This can happen 8720a6b08f8Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8730a6b08f8Smrg # broken ls alias from the environment. This has actually 8740a6b08f8Smrg # happened. Such a system could not be considered "sane". 8750a6b08f8Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8760a6b08f8Smrg alias in your environment]) 8770a6b08f8Smrg fi 8780a6b08f8Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 8790a6b08f8Smrg break 8800a6b08f8Smrg fi 8810a6b08f8Smrg # Just in case. 8820a6b08f8Smrg sleep 1 8830a6b08f8Smrg am_has_slept=yes 8840a6b08f8Smrg done 885555991fdSmrg test "$[2]" = conftest.file 886555991fdSmrg ) 887555991fdSmrgthen 888555991fdSmrg # Ok. 889555991fdSmrg : 890555991fdSmrgelse 891555991fdSmrg AC_MSG_ERROR([newly created file is older than distributed files! 892555991fdSmrgCheck your system clock]) 893d656433aSmrgfi 8940a6b08f8SmrgAC_MSG_RESULT([yes]) 8950a6b08f8Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 8960a6b08f8Smrg# generated files are strictly newer. 8970a6b08f8Smrgam_sleep_pid= 8980a6b08f8Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 8990a6b08f8Smrg ( sleep 1 ) & 9000a6b08f8Smrg am_sleep_pid=$! 9010a6b08f8Smrgfi 9020a6b08f8SmrgAC_CONFIG_COMMANDS_PRE( 9030a6b08f8Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 9040a6b08f8Smrg if test -n "$am_sleep_pid"; then 9050a6b08f8Smrg # Hide warnings about reused PIDs. 9060a6b08f8Smrg wait $am_sleep_pid 2>/dev/null 9070a6b08f8Smrg fi 9080a6b08f8Smrg AC_MSG_RESULT([done])]) 9090a6b08f8Smrgrm -f conftest.file 9100a6b08f8Smrg]) 911d656433aSmrg 9120a6b08f8Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 913555991fdSmrg# 914555991fdSmrg# This file is free software; the Free Software Foundation 915555991fdSmrg# gives unlimited permission to copy and/or distribute it, 916555991fdSmrg# with or without modifications, as long as this notice is preserved. 917d656433aSmrg 918555991fdSmrg# AM_SILENT_RULES([DEFAULT]) 919555991fdSmrg# -------------------------- 920555991fdSmrg# Enable less verbose build rules; with the default set to DEFAULT 9210a6b08f8Smrg# ("yes" being less verbose, "no" or empty being verbose). 922555991fdSmrgAC_DEFUN([AM_SILENT_RULES], 9230a6b08f8Smrg[AC_ARG_ENABLE([silent-rules], [dnl 9240a6b08f8SmrgAS_HELP_STRING( 9250a6b08f8Smrg [--enable-silent-rules], 9260a6b08f8Smrg [less verbose build output (undo: "make V=1")]) 9270a6b08f8SmrgAS_HELP_STRING( 9280a6b08f8Smrg [--disable-silent-rules], 9290a6b08f8Smrg [verbose build output (undo: "make V=0")])dnl 9300a6b08f8Smrg]) 9310a6b08f8Smrgcase $enable_silent_rules in @%:@ ((( 9320a6b08f8Smrg yes) AM_DEFAULT_VERBOSITY=0;; 9330a6b08f8Smrg no) AM_DEFAULT_VERBOSITY=1;; 9340a6b08f8Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 935555991fdSmrgesac 9360a6b08f8Smrgdnl 9370a6b08f8Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 9380a6b08f8Smrgdnl do not support nested variable expansions. 9390a6b08f8Smrgdnl See automake bug#9928 and bug#10237. 9400a6b08f8Smrgam_make=${MAKE-make} 9410a6b08f8SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 9420a6b08f8Smrg [am_cv_make_support_nested_variables], 9430a6b08f8Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 9440a6b08f8SmrgBAR0=false 9450a6b08f8SmrgBAR1=true 9460a6b08f8SmrgV=1 9470a6b08f8Smrgam__doit: 9480a6b08f8Smrg @$(TRUE) 9490a6b08f8Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 9500a6b08f8Smrg am_cv_make_support_nested_variables=yes 9510a6b08f8Smrgelse 9520a6b08f8Smrg am_cv_make_support_nested_variables=no 9530a6b08f8Smrgfi]) 9540a6b08f8Smrgif test $am_cv_make_support_nested_variables = yes; then 9550a6b08f8Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 9560a6b08f8Smrg AM_V='$(V)' 9570a6b08f8Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 9580a6b08f8Smrgelse 9590a6b08f8Smrg AM_V=$AM_DEFAULT_VERBOSITY 9600a6b08f8Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 9610a6b08f8Smrgfi 9620a6b08f8SmrgAC_SUBST([AM_V])dnl 9630a6b08f8SmrgAM_SUBST_NOTMAKE([AM_V])dnl 9640a6b08f8SmrgAC_SUBST([AM_DEFAULT_V])dnl 9650a6b08f8SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 966555991fdSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 967555991fdSmrgAM_BACKSLASH='\' 968555991fdSmrgAC_SUBST([AM_BACKSLASH])dnl 969555991fdSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 970555991fdSmrg]) 971126a8a12Smrg 9720a6b08f8Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 973555991fdSmrg# 974555991fdSmrg# This file is free software; the Free Software Foundation 975555991fdSmrg# gives unlimited permission to copy and/or distribute it, 976555991fdSmrg# with or without modifications, as long as this notice is preserved. 977126a8a12Smrg 978555991fdSmrg# AM_PROG_INSTALL_STRIP 979555991fdSmrg# --------------------- 9800a6b08f8Smrg# One issue with vendor 'install' (even GNU) is that you can't 981555991fdSmrg# specify the program used to strip binaries. This is especially 982555991fdSmrg# annoying in cross-compiling environments, where the build's strip 983555991fdSmrg# is unlikely to handle the host's binaries. 984555991fdSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9850a6b08f8Smrg# always use install-sh in "make install-strip", and initialize 986555991fdSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 987555991fdSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 988555991fdSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9890a6b08f8Smrg# Installed binaries are usually stripped using 'strip' when the user 9900a6b08f8Smrg# run "make install-strip". However 'strip' might not be the right 991555991fdSmrg# tool to use in cross-compilation environments, therefore Automake 9920a6b08f8Smrg# will honor the 'STRIP' environment variable to overrule this program. 9930a6b08f8Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 994555991fdSmrgif test "$cross_compiling" != no; then 995555991fdSmrg AC_CHECK_TOOL([STRIP], [strip], :) 996555991fdSmrgfi 997555991fdSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 998555991fdSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 999126a8a12Smrg 10000a6b08f8Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 1001d656433aSmrg# 1002555991fdSmrg# This file is free software; the Free Software Foundation 1003555991fdSmrg# gives unlimited permission to copy and/or distribute it, 1004555991fdSmrg# with or without modifications, as long as this notice is preserved. 1005126a8a12Smrg 1006555991fdSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1007555991fdSmrg# --------------------------- 1008555991fdSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1009555991fdSmrg# This macro is traced by Automake. 1010555991fdSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1011126a8a12Smrg 1012555991fdSmrg# AM_SUBST_NOTMAKE(VARIABLE) 10130a6b08f8Smrg# -------------------------- 1014555991fdSmrg# Public sister of _AM_SUBST_NOTMAKE. 1015555991fdSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1016126a8a12Smrg 1017555991fdSmrg# Check how to create a tarball. -*- Autoconf -*- 1018126a8a12Smrg 10190a6b08f8Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 1020555991fdSmrg# 1021555991fdSmrg# This file is free software; the Free Software Foundation 1022555991fdSmrg# gives unlimited permission to copy and/or distribute it, 1023555991fdSmrg# with or without modifications, as long as this notice is preserved. 1024126a8a12Smrg 1025555991fdSmrg# _AM_PROG_TAR(FORMAT) 1026555991fdSmrg# -------------------- 1027555991fdSmrg# Check how to create a tarball in format FORMAT. 10280a6b08f8Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1029555991fdSmrg# 1030555991fdSmrg# Substitute a variable $(am__tar) that is a command 1031555991fdSmrg# writing to stdout a FORMAT-tarball containing the directory 1032555991fdSmrg# $tardir. 1033555991fdSmrg# tardir=directory && $(am__tar) > result.tar 1034555991fdSmrg# 1035555991fdSmrg# Substitute a variable $(am__untar) that extract such 1036555991fdSmrg# a tarball read from stdin. 1037555991fdSmrg# $(am__untar) < result.tar 1038555991fdSmrg# 10390a6b08f8SmrgAC_DEFUN([_AM_PROG_TAR], 10400a6b08f8Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10410a6b08f8Smrg# in the wild :-( We should find a proper way to deprecate it ... 10420a6b08f8SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1043d656433aSmrg 10440a6b08f8Smrg# We'll loop over all known methods to create a tar archive until one works. 10450a6b08f8Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1046d656433aSmrg 10470a6b08f8Smrgm4_if([$1], [v7], 10480a6b08f8Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10490a6b08f8Smrg 10500a6b08f8Smrg [m4_case([$1], 10510a6b08f8Smrg [ustar], 10520a6b08f8Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10530a6b08f8Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10540a6b08f8Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10550a6b08f8Smrg # and bug#13588). 10560a6b08f8Smrg am_max_uid=2097151 # 2^21 - 1 10570a6b08f8Smrg am_max_gid=$am_max_uid 10580a6b08f8Smrg # The $UID and $GID variables are not portable, so we need to resort 10590a6b08f8Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10600a6b08f8Smrg # below are definitely unexpected, so allow the users to see them 10610a6b08f8Smrg # (that is, avoid stderr redirection). 10620a6b08f8Smrg am_uid=`id -u || echo unknown` 10630a6b08f8Smrg am_gid=`id -g || echo unknown` 10640a6b08f8Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10650a6b08f8Smrg if test $am_uid -le $am_max_uid; then 10660a6b08f8Smrg AC_MSG_RESULT([yes]) 10670a6b08f8Smrg else 10680a6b08f8Smrg AC_MSG_RESULT([no]) 10690a6b08f8Smrg _am_tools=none 10700a6b08f8Smrg fi 10710a6b08f8Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10720a6b08f8Smrg if test $am_gid -le $am_max_gid; then 10730a6b08f8Smrg AC_MSG_RESULT([yes]) 10740a6b08f8Smrg else 10750a6b08f8Smrg AC_MSG_RESULT([no]) 10760a6b08f8Smrg _am_tools=none 10770a6b08f8Smrg fi], 1078d656433aSmrg 10790a6b08f8Smrg [pax], 10800a6b08f8Smrg [], 1081d656433aSmrg 10820a6b08f8Smrg [m4_fatal([Unknown tar format])]) 1083126a8a12Smrg 10840a6b08f8Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1085126a8a12Smrg 10860a6b08f8Smrg # Go ahead even if we have the value already cached. We do so because we 10870a6b08f8Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10880a6b08f8Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1089126a8a12Smrg 10900a6b08f8Smrg for _am_tool in $_am_tools; do 10910a6b08f8Smrg case $_am_tool in 10920a6b08f8Smrg gnutar) 10930a6b08f8Smrg for _am_tar in tar gnutar gtar; do 10940a6b08f8Smrg AM_RUN_LOG([$_am_tar --version]) && break 10950a6b08f8Smrg done 10960a6b08f8Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10970a6b08f8Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10980a6b08f8Smrg am__untar="$_am_tar -xf -" 10990a6b08f8Smrg ;; 11000a6b08f8Smrg plaintar) 11010a6b08f8Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 11020a6b08f8Smrg # ustar tarball either. 11030a6b08f8Smrg (tar --version) >/dev/null 2>&1 && continue 11040a6b08f8Smrg am__tar='tar chf - "$$tardir"' 11050a6b08f8Smrg am__tar_='tar chf - "$tardir"' 11060a6b08f8Smrg am__untar='tar xf -' 11070a6b08f8Smrg ;; 11080a6b08f8Smrg pax) 11090a6b08f8Smrg am__tar='pax -L -x $1 -w "$$tardir"' 11100a6b08f8Smrg am__tar_='pax -L -x $1 -w "$tardir"' 11110a6b08f8Smrg am__untar='pax -r' 11120a6b08f8Smrg ;; 11130a6b08f8Smrg cpio) 11140a6b08f8Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11150a6b08f8Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11160a6b08f8Smrg am__untar='cpio -i -H $1 -d' 11170a6b08f8Smrg ;; 11180a6b08f8Smrg none) 11190a6b08f8Smrg am__tar=false 11200a6b08f8Smrg am__tar_=false 11210a6b08f8Smrg am__untar=false 11220a6b08f8Smrg ;; 11230a6b08f8Smrg esac 1124126a8a12Smrg 11250a6b08f8Smrg # If the value was cached, stop now. We just wanted to have am__tar 11260a6b08f8Smrg # and am__untar set. 11270a6b08f8Smrg test -n "${am_cv_prog_tar_$1}" && break 11280a6b08f8Smrg 11290a6b08f8Smrg # tar/untar a dummy directory, and stop if the command works. 11300a6b08f8Smrg rm -rf conftest.dir 11310a6b08f8Smrg mkdir conftest.dir 11320a6b08f8Smrg echo GrepMe > conftest.dir/file 11330a6b08f8Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11340a6b08f8Smrg rm -rf conftest.dir 11350a6b08f8Smrg if test -s conftest.tar; then 11360a6b08f8Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 11370a6b08f8Smrg AM_RUN_LOG([cat conftest.dir/file]) 11380a6b08f8Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11390a6b08f8Smrg fi 11400a6b08f8Smrg done 11410a6b08f8Smrg rm -rf conftest.dir 11423c15da26Smrg 11430a6b08f8Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11440a6b08f8Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11453c15da26Smrg 11460a6b08f8SmrgAC_SUBST([am__tar]) 11470a6b08f8SmrgAC_SUBST([am__untar]) 11480a6b08f8Smrg]) # _AM_PROG_TAR 1149126a8a12Smrg 11503c15da26Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 11513c15da26Smrg# 11523c15da26Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 11530a6b08f8Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 11540a6b08f8Smrg# Foundation, Inc. 11553c15da26Smrg# Written by Gordon Matzigkeit, 1996 11563c15da26Smrg# 11573c15da26Smrg# This file is free software; the Free Software Foundation gives 11583c15da26Smrg# unlimited permission to copy and/or distribute it, with or without 11593c15da26Smrg# modifications, as long as this notice is preserved. 1160126a8a12Smrg 11613c15da26Smrgm4_define([_LT_COPYING], [dnl 11623c15da26Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 11630a6b08f8Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 11640a6b08f8Smrg# Foundation, Inc. 11653c15da26Smrg# Written by Gordon Matzigkeit, 1996 1166555991fdSmrg# 11673c15da26Smrg# This file is part of GNU Libtool. 11683c15da26Smrg# 11693c15da26Smrg# GNU Libtool is free software; you can redistribute it and/or 11703c15da26Smrg# modify it under the terms of the GNU General Public License as 11713c15da26Smrg# published by the Free Software Foundation; either version 2 of 11723c15da26Smrg# the License, or (at your option) any later version. 11733c15da26Smrg# 11743c15da26Smrg# As a special exception to the GNU General Public License, 11753c15da26Smrg# if you distribute this file as part of a program or library that 11763c15da26Smrg# is built using GNU Libtool, you may include this file under the 11773c15da26Smrg# same distribution terms that you use for the rest of that program. 11783c15da26Smrg# 11793c15da26Smrg# GNU Libtool is distributed in the hope that it will be useful, 11803c15da26Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 11813c15da26Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11823c15da26Smrg# GNU General Public License for more details. 11833c15da26Smrg# 11843c15da26Smrg# You should have received a copy of the GNU General Public License 11853c15da26Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 11863c15da26Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 11873c15da26Smrg# obtained by writing to the Free Software Foundation, Inc., 11883c15da26Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 11893c15da26Smrg]) 1190126a8a12Smrg 11913c15da26Smrg# serial 57 LT_INIT 1192126a8a12Smrg 1193126a8a12Smrg 11943c15da26Smrg# LT_PREREQ(VERSION) 11953c15da26Smrg# ------------------ 11963c15da26Smrg# Complain and exit if this libtool version is less that VERSION. 11973c15da26Smrgm4_defun([LT_PREREQ], 11983c15da26Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 11993c15da26Smrg [m4_default([$3], 12003c15da26Smrg [m4_fatal([Libtool version $1 or higher is required], 12013c15da26Smrg 63)])], 12023c15da26Smrg [$2])]) 1203d656433aSmrg 1204126a8a12Smrg 12053c15da26Smrg# _LT_CHECK_BUILDDIR 12063c15da26Smrg# ------------------ 12073c15da26Smrg# Complain if the absolute build directory name contains unusual characters 12083c15da26Smrgm4_defun([_LT_CHECK_BUILDDIR], 12093c15da26Smrg[case `pwd` in 12103c15da26Smrg *\ * | *\ *) 12113c15da26Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 12123c15da26Smrgesac 12133c15da26Smrg]) 1214126a8a12Smrg 1215126a8a12Smrg 12163c15da26Smrg# LT_INIT([OPTIONS]) 12173c15da26Smrg# ------------------ 12183c15da26SmrgAC_DEFUN([LT_INIT], 12193c15da26Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 12203c15da26SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 12213c15da26SmrgAC_BEFORE([$0], [LT_LANG])dnl 12223c15da26SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 12233c15da26SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 12243c15da26Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 1225555991fdSmrg 12263c15da26Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 12273c15da26Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 12283c15da26Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 12293c15da26Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 12303c15da26Smrgdnl unless we require an AC_DEFUNed macro: 12313c15da26SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 12323c15da26SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 12333c15da26SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 12343c15da26SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 12353c15da26Smrgm4_require([_LT_PROG_LTMAIN])dnl 1236126a8a12Smrg 12373c15da26Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1238126a8a12Smrg 12393c15da26Smrgdnl Parse OPTIONS 12403c15da26Smrg_LT_SET_OPTIONS([$0], [$1]) 1241555991fdSmrg 12423c15da26Smrg# This can be used to rebuild libtool when needed 12433c15da26SmrgLIBTOOL_DEPS="$ltmain" 1244555991fdSmrg 12453c15da26Smrg# Always use our own libtool. 12463c15da26SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 12473c15da26SmrgAC_SUBST(LIBTOOL)dnl 1248126a8a12Smrg 12493c15da26Smrg_LT_SETUP 1250126a8a12Smrg 12513c15da26Smrg# Only expand once: 12523c15da26Smrgm4_define([LT_INIT]) 12533c15da26Smrg])# LT_INIT 1254d656433aSmrg 12553c15da26Smrg# Old names: 12563c15da26SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 12573c15da26SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 12583c15da26Smrgdnl aclocal-1.4 backwards compatibility: 12593c15da26Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 12603c15da26Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1261126a8a12Smrg 1262126a8a12Smrg 12633c15da26Smrg# _LT_CC_BASENAME(CC) 12643c15da26Smrg# ------------------- 12653c15da26Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 12663c15da26Smrgm4_defun([_LT_CC_BASENAME], 12673c15da26Smrg[for cc_temp in $1""; do 12683c15da26Smrg case $cc_temp in 12693c15da26Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 12703c15da26Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 12713c15da26Smrg \-*) ;; 12723c15da26Smrg *) break;; 12733c15da26Smrg esac 12743c15da26Smrgdone 12753c15da26Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 12763c15da26Smrg]) 1277126a8a12Smrg 1278126a8a12Smrg 12793c15da26Smrg# _LT_FILEUTILS_DEFAULTS 12803c15da26Smrg# ---------------------- 12813c15da26Smrg# It is okay to use these file commands and assume they have been set 12823c15da26Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 12833c15da26Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 12843c15da26Smrg[: ${CP="cp -f"} 12853c15da26Smrg: ${MV="mv -f"} 12863c15da26Smrg: ${RM="rm -f"} 12873c15da26Smrg])# _LT_FILEUTILS_DEFAULTS 1288126a8a12Smrg 1289126a8a12Smrg 12903c15da26Smrg# _LT_SETUP 12913c15da26Smrg# --------- 12923c15da26Smrgm4_defun([_LT_SETUP], 12933c15da26Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 12943c15da26SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 12953c15da26SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 12963c15da26SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1297555991fdSmrg 12980a6b08f8Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 12990a6b08f8Smrgdnl 13003c15da26Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 13013c15da26Smrg_LT_DECL([], [host], [0])dnl 13023c15da26Smrg_LT_DECL([], [host_os], [0])dnl 13033c15da26Smrgdnl 13043c15da26Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 13053c15da26Smrg_LT_DECL([], [build], [0])dnl 13063c15da26Smrg_LT_DECL([], [build_os], [0])dnl 13073c15da26Smrgdnl 13083c15da26SmrgAC_REQUIRE([AC_PROG_CC])dnl 13093c15da26SmrgAC_REQUIRE([LT_PATH_LD])dnl 13103c15da26SmrgAC_REQUIRE([LT_PATH_NM])dnl 13113c15da26Smrgdnl 13123c15da26SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 13133c15da26Smrgtest -z "$LN_S" && LN_S="ln -s" 13143c15da26Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 13153c15da26Smrgdnl 13163c15da26SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 13173c15da26Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 13183c15da26Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 13193c15da26Smrgdnl 13203c15da26Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 13213c15da26Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 13223c15da26Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 13233c15da26Smrgm4_require([_LT_CMD_RELOAD])dnl 13243c15da26Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 13253c15da26Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 13263c15da26Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 13273c15da26Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 13283c15da26Smrgm4_require([_LT_WITH_SYSROOT])dnl 13293c15da26Smrg 13303c15da26Smrg_LT_CONFIG_LIBTOOL_INIT([ 13313c15da26Smrg# See if we are running on zsh, and set the options which allow our 13323c15da26Smrg# commands through without removal of \ escapes INIT. 13333c15da26Smrgif test -n "\${ZSH_VERSION+set}" ; then 13343c15da26Smrg setopt NO_GLOB_SUBST 13353c15da26Smrgfi 13363c15da26Smrg]) 13373c15da26Smrgif test -n "${ZSH_VERSION+set}" ; then 13383c15da26Smrg setopt NO_GLOB_SUBST 1339555991fdSmrgfi 1340126a8a12Smrg 13413c15da26Smrg_LT_CHECK_OBJDIR 1342126a8a12Smrg 13433c15da26Smrgm4_require([_LT_TAG_COMPILER])dnl 1344555991fdSmrg 13453c15da26Smrgcase $host_os in 13463c15da26Smrgaix3*) 13473c15da26Smrg # AIX sometimes has problems with the GCC collect2 program. For some 13483c15da26Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 13493c15da26Smrg # vanish in a puff of smoke. 13503c15da26Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 13513c15da26Smrg COLLECT_NAMES= 13523c15da26Smrg export COLLECT_NAMES 13533c15da26Smrg fi 13543c15da26Smrg ;; 13553c15da26Smrgesac 1356555991fdSmrg 13573c15da26Smrg# Global variables: 13583c15da26Smrgofile=libtool 13593c15da26Smrgcan_build_shared=yes 1360126a8a12Smrg 13613c15da26Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 13623c15da26Smrg# which needs '.lib'). 13633c15da26Smrglibext=a 1364555991fdSmrg 13653c15da26Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1366555991fdSmrg 13673c15da26Smrgold_CC="$CC" 13683c15da26Smrgold_CFLAGS="$CFLAGS" 1369d656433aSmrg 13703c15da26Smrg# Set sane defaults for various variables 13713c15da26Smrgtest -z "$CC" && CC=cc 13723c15da26Smrgtest -z "$LTCC" && LTCC=$CC 13733c15da26Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 13743c15da26Smrgtest -z "$LD" && LD=ld 13753c15da26Smrgtest -z "$ac_objext" && ac_objext=o 1376126a8a12Smrg 13773c15da26Smrg_LT_CC_BASENAME([$compiler]) 1378126a8a12Smrg 13793c15da26Smrg# Only perform the check for file, if the check method requires it 13803c15da26Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 13813c15da26Smrgcase $deplibs_check_method in 13823c15da26Smrgfile_magic*) 13833c15da26Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 13843c15da26Smrg _LT_PATH_MAGIC 13853c15da26Smrg fi 13863c15da26Smrg ;; 13873c15da26Smrgesac 1388126a8a12Smrg 13893c15da26Smrg# Use C for the default configuration in the libtool script 13903c15da26SmrgLT_SUPPORTED_TAG([CC]) 13913c15da26Smrg_LT_LANG_C_CONFIG 13923c15da26Smrg_LT_LANG_DEFAULT_CONFIG 13933c15da26Smrg_LT_CONFIG_COMMANDS 13943c15da26Smrg])# _LT_SETUP 1395555991fdSmrg 1396126a8a12Smrg 13973c15da26Smrg# _LT_PREPARE_SED_QUOTE_VARS 13983c15da26Smrg# -------------------------- 13993c15da26Smrg# Define a few sed substitution that help us do robust quoting. 14003c15da26Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 14013c15da26Smrg[# Backslashify metacharacters that are still active within 14023c15da26Smrg# double-quoted strings. 14033c15da26Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1404555991fdSmrg 14053c15da26Smrg# Same as above, but do not quote variable references. 14063c15da26Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1407126a8a12Smrg 14083c15da26Smrg# Sed substitution to delay expansion of an escaped shell variable in a 14093c15da26Smrg# double_quote_subst'ed string. 14103c15da26Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1411555991fdSmrg 14123c15da26Smrg# Sed substitution to delay expansion of an escaped single quote. 14133c15da26Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1414555991fdSmrg 14153c15da26Smrg# Sed substitution to avoid accidental globbing in evaled expressions 14163c15da26Smrgno_glob_subst='s/\*/\\\*/g' 14173c15da26Smrg]) 1418d656433aSmrg 14193c15da26Smrg# _LT_PROG_LTMAIN 14203c15da26Smrg# --------------- 14213c15da26Smrg# Note that this code is called both from `configure', and `config.status' 14223c15da26Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 14233c15da26Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 14243c15da26Smrg# so we pass a copy along to make sure it has a sensible value anyway. 14253c15da26Smrgm4_defun([_LT_PROG_LTMAIN], 14263c15da26Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 14273c15da26Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 14283c15da26Smrgltmain="$ac_aux_dir/ltmain.sh" 14293c15da26Smrg])# _LT_PROG_LTMAIN 1430d656433aSmrg 1431d656433aSmrg 1432126a8a12Smrg 14333c15da26Smrg# So that we can recreate a full libtool script including additional 14343c15da26Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 14353c15da26Smrg# in macros and then make a single call at the end using the `libtool' 14363c15da26Smrg# label. 1437126a8a12Smrg 1438126a8a12Smrg 14393c15da26Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 14403c15da26Smrg# ---------------------------------------- 14413c15da26Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14423c15da26Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 14433c15da26Smrg[m4_ifval([$1], 14443c15da26Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 14453c15da26Smrg [$1 14463c15da26Smrg])])]) 1447126a8a12Smrg 14483c15da26Smrg# Initialize. 14493c15da26Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1450d656433aSmrg 1451d656433aSmrg 14523c15da26Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 14533c15da26Smrg# ------------------------------ 14543c15da26Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14553c15da26Smrgm4_define([_LT_CONFIG_LIBTOOL], 14563c15da26Smrg[m4_ifval([$1], 14573c15da26Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 14583c15da26Smrg [$1 14593c15da26Smrg])])]) 1460d656433aSmrg 14613c15da26Smrg# Initialize. 14623c15da26Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1463d656433aSmrg 1464d656433aSmrg 14653c15da26Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 14663c15da26Smrg# ----------------------------------------------------- 14673c15da26Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 14683c15da26Smrg[_LT_CONFIG_LIBTOOL([$1]) 14693c15da26Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 14703c15da26Smrg]) 1471d656433aSmrg 1472126a8a12Smrg 14733c15da26Smrg# _LT_FORMAT_COMMENT([COMMENT]) 14743c15da26Smrg# ----------------------------- 14753c15da26Smrg# Add leading comment marks to the start of each line, and a trailing 14763c15da26Smrg# full-stop to the whole comment if one is not present already. 14773c15da26Smrgm4_define([_LT_FORMAT_COMMENT], 14783c15da26Smrg[m4_ifval([$1], [ 14793c15da26Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 14803c15da26Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 14813c15da26Smrg)]) 1482126a8a12Smrg 1483126a8a12Smrg 1484126a8a12Smrg 1485126a8a12Smrg 1486555991fdSmrg 14873c15da26Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 14883c15da26Smrg# ------------------------------------------------------------------- 14893c15da26Smrg# CONFIGNAME is the name given to the value in the libtool script. 14903c15da26Smrg# VARNAME is the (base) name used in the configure script. 14913c15da26Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 14923c15da26Smrg# VARNAME. Any other value will be used directly. 14933c15da26Smrgm4_define([_LT_DECL], 14943c15da26Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 14953c15da26Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 14963c15da26Smrg [m4_ifval([$1], [$1], [$2])]) 14973c15da26Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 14983c15da26Smrg m4_ifval([$4], 14993c15da26Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 15003c15da26Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 15013c15da26Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 15023c15da26Smrg]) 1503126a8a12Smrg 1504555991fdSmrg 15053c15da26Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 15063c15da26Smrg# -------------------------------------------------------- 15073c15da26Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1508126a8a12Smrg 15093c15da26Smrg 15103c15da26Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 15113c15da26Smrg# ------------------------------------------------ 15123c15da26Smrgm4_define([lt_decl_tag_varnames], 15133c15da26Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 15143c15da26Smrg 15153c15da26Smrg 15163c15da26Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 15173c15da26Smrg# --------------------------------------------------------- 15183c15da26Smrgm4_define([_lt_decl_filter], 15193c15da26Smrg[m4_case([$#], 15203c15da26Smrg [0], [m4_fatal([$0: too few arguments: $#])], 15213c15da26Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 15223c15da26Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 15233c15da26Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 15243c15da26Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1525555991fdSmrg]) 1526126a8a12Smrg 1527126a8a12Smrg 15283c15da26Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 15293c15da26Smrg# -------------------------------------------------- 15303c15da26Smrgm4_define([lt_decl_quote_varnames], 15313c15da26Smrg[_lt_decl_filter([value], [1], $@)]) 1532126a8a12Smrg 1533126a8a12Smrg 15343c15da26Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 15353c15da26Smrg# --------------------------------------------------- 15363c15da26Smrgm4_define([lt_decl_dquote_varnames], 15373c15da26Smrg[_lt_decl_filter([value], [2], $@)]) 1538126a8a12Smrg 1539d656433aSmrg 15403c15da26Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 15413c15da26Smrg# --------------------------------------------------- 15423c15da26Smrgm4_define([lt_decl_varnames_tagged], 15433c15da26Smrg[m4_assert([$# <= 2])dnl 15443c15da26Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 15453c15da26Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 15463c15da26Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 15473c15da26Smrgm4_define([_lt_decl_varnames_tagged], 15483c15da26Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1549d656433aSmrg 1550126a8a12Smrg 15513c15da26Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 15523c15da26Smrg# ------------------------------------------------ 15533c15da26Smrgm4_define([lt_decl_all_varnames], 15543c15da26Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 15553c15da26Smrg m4_if([$2], [], 15563c15da26Smrg m4_quote(lt_decl_varnames), 15573c15da26Smrg m4_quote(m4_shift($@))))[]dnl 15583c15da26Smrg]) 15593c15da26Smrgm4_define([_lt_decl_all_varnames], 15603c15da26Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 15613c15da26Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 15623c15da26Smrg]) 1563126a8a12Smrg 1564126a8a12Smrg 15653c15da26Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 15663c15da26Smrg# ------------------------------------ 15673c15da26Smrg# Quote a variable value, and forward it to `config.status' so that its 15683c15da26Smrg# declaration there will have the same value as in `configure'. VARNAME 15693c15da26Smrg# must have a single quote delimited value for this to work. 15703c15da26Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 15713c15da26Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1572126a8a12Smrg 1573126a8a12Smrg 15743c15da26Smrg# _LT_CONFIG_STATUS_DECLARATIONS 15753c15da26Smrg# ------------------------------ 15763c15da26Smrg# We delimit libtool config variables with single quotes, so when 15773c15da26Smrg# we write them to config.status, we have to be sure to quote all 15783c15da26Smrg# embedded single quotes properly. In configure, this macro expands 15793c15da26Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1580555991fdSmrg# 15813c15da26Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 15823c15da26Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 15833c15da26Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 15843c15da26Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1585126a8a12Smrg 1586126a8a12Smrg 15873c15da26Smrg# _LT_LIBTOOL_TAGS 15883c15da26Smrg# ---------------- 15893c15da26Smrg# Output comment and list of tags supported by the script 15903c15da26Smrgm4_defun([_LT_LIBTOOL_TAGS], 15913c15da26Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 15923c15da26Smrgavailable_tags="_LT_TAGS"dnl 15933c15da26Smrg]) 1594126a8a12Smrg 1595126a8a12Smrg 15963c15da26Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 15973c15da26Smrg# ----------------------------------- 15983c15da26Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 15993c15da26Smrg# expand to a commented shell variable setting: 1600555991fdSmrg# 16013c15da26Smrg# # Some comment about what VAR is for. 16023c15da26Smrg# visible_name=$lt_internal_name 16033c15da26Smrgm4_define([_LT_LIBTOOL_DECLARE], 16043c15da26Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 16053c15da26Smrg [description])))[]dnl 16063c15da26Smrgm4_pushdef([_libtool_name], 16073c15da26Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 16083c15da26Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 16093c15da26Smrg [0], [_libtool_name=[$]$1], 16103c15da26Smrg [1], [_libtool_name=$lt_[]$1], 16113c15da26Smrg [2], [_libtool_name=$lt_[]$1], 16123c15da26Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 16133c15da26Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 16143c15da26Smrg]) 1615126a8a12Smrg 1616126a8a12Smrg 16173c15da26Smrg# _LT_LIBTOOL_CONFIG_VARS 16183c15da26Smrg# ----------------------- 16193c15da26Smrg# Produce commented declarations of non-tagged libtool config variables 16203c15da26Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 16213c15da26Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 16223c15da26Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 16233c15da26Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 16243c15da26Smrg[m4_foreach([_lt_var], 16253c15da26Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 16263c15da26Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1627126a8a12Smrg 1628126a8a12Smrg 16293c15da26Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 16303c15da26Smrg# ------------------------- 16313c15da26Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 16323c15da26Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 16333c15da26Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1634126a8a12Smrg 1635126a8a12Smrg 16363c15da26Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 16373c15da26Smrg# ------------------------------ 16383c15da26Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1639126a8a12Smrg 1640126a8a12Smrg 16413c15da26Smrg# _LT_CONFIG_COMMANDS 16423c15da26Smrg# ------------------- 16433c15da26Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 16443c15da26Smrg# variables for single and double quote escaping we saved from calls 16453c15da26Smrg# to _LT_DECL, we can put quote escaped variables declarations 16463c15da26Smrg# into `config.status', and then the shell code to quote escape them in 16473c15da26Smrg# for loops in `config.status'. Finally, any additional code accumulated 16483c15da26Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 16493c15da26Smrgm4_defun([_LT_CONFIG_COMMANDS], 16503c15da26Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 16513c15da26Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 16523c15da26Smrg dnl instead of duplicating it all over again into config.status, 16533c15da26Smrg dnl then we will have config.status run $CONFIG_LT later, so it 16543c15da26Smrg dnl needs to know what name is stored there: 16553c15da26Smrg [AC_CONFIG_COMMANDS([libtool], 16563c15da26Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 16573c15da26Smrg dnl If the libtool generation code is destined for config.status, 16583c15da26Smrg dnl expand the accumulated commands and init code now: 16593c15da26Smrg [AC_CONFIG_COMMANDS([libtool], 16603c15da26Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 16613c15da26Smrg])#_LT_CONFIG_COMMANDS 1662555991fdSmrg 1663555991fdSmrg 16643c15da26Smrg# Initialize. 16653c15da26Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 16663c15da26Smrg[ 1667555991fdSmrg 16683c15da26Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 16693c15da26Smrg# if CDPATH is set. 16703c15da26Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1671126a8a12Smrg 16723c15da26Smrgsed_quote_subst='$sed_quote_subst' 16733c15da26Smrgdouble_quote_subst='$double_quote_subst' 16743c15da26Smrgdelay_variable_subst='$delay_variable_subst' 16753c15da26Smrg_LT_CONFIG_STATUS_DECLARATIONS 16763c15da26SmrgLTCC='$LTCC' 16773c15da26SmrgLTCFLAGS='$LTCFLAGS' 16783c15da26Smrgcompiler='$compiler_DEFAULT' 1679126a8a12Smrg 16803c15da26Smrg# A function that is used when there is no print builtin or printf. 16813c15da26Smrgfunc_fallback_echo () 16823c15da26Smrg{ 16833c15da26Smrg eval 'cat <<_LTECHO_EOF 16843c15da26Smrg\$[]1 16853c15da26Smrg_LTECHO_EOF' 16863c15da26Smrg} 1687126a8a12Smrg 16883c15da26Smrg# Quote evaled strings. 16893c15da26Smrgfor var in lt_decl_all_varnames([[ \ 16903c15da26Smrg]], lt_decl_quote_varnames); do 16913c15da26Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 16923c15da26Smrg *[[\\\\\\\`\\"\\\$]]*) 16933c15da26Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 16943c15da26Smrg ;; 16953c15da26Smrg *) 16963c15da26Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 16973c15da26Smrg ;; 16983c15da26Smrg esac 16993c15da26Smrgdone 1700126a8a12Smrg 17013c15da26Smrg# Double-quote double-evaled strings. 17023c15da26Smrgfor var in lt_decl_all_varnames([[ \ 17033c15da26Smrg]], lt_decl_dquote_varnames); do 17043c15da26Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 17053c15da26Smrg *[[\\\\\\\`\\"\\\$]]*) 17063c15da26Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 17073c15da26Smrg ;; 17083c15da26Smrg *) 17093c15da26Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 17103c15da26Smrg ;; 17113c15da26Smrg esac 17123c15da26Smrgdone 1713126a8a12Smrg 17143c15da26Smrg_LT_OUTPUT_LIBTOOL_INIT 1715555991fdSmrg]) 1716126a8a12Smrg 17173c15da26Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 17183c15da26Smrg# ------------------------------------ 17193c15da26Smrg# Generate a child script FILE with all initialization necessary to 17203c15da26Smrg# reuse the environment learned by the parent script, and make the 17213c15da26Smrg# file executable. If COMMENT is supplied, it is inserted after the 17223c15da26Smrg# `#!' sequence but before initialization text begins. After this 17233c15da26Smrg# macro, additional text can be appended to FILE to form the body of 17243c15da26Smrg# the child script. The macro ends with non-zero status if the 17253c15da26Smrg# file could not be fully written (such as if the disk is full). 17263c15da26Smrgm4_ifdef([AS_INIT_GENERATED], 17273c15da26Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 17283c15da26Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 17293c15da26Smrg[m4_require([AS_PREPARE])]dnl 17303c15da26Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 17313c15da26Smrg[lt_write_fail=0 17323c15da26Smrgcat >$1 <<_ASEOF || lt_write_fail=1 17333c15da26Smrg#! $SHELL 17343c15da26Smrg# Generated by $as_me. 17353c15da26Smrg$2 17363c15da26SmrgSHELL=\${CONFIG_SHELL-$SHELL} 17373c15da26Smrgexport SHELL 17383c15da26Smrg_ASEOF 17393c15da26Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 17403c15da26SmrgAS_SHELL_SANITIZE 17413c15da26Smrg_AS_PREPARE 17423c15da26Smrgexec AS_MESSAGE_FD>&1 17433c15da26Smrg_ASEOF 17443c15da26Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 17453c15da26Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1746126a8a12Smrg 17473c15da26Smrg# LT_OUTPUT 17483c15da26Smrg# --------- 17493c15da26Smrg# This macro allows early generation of the libtool script (before 17503c15da26Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 17513c15da26Smrg# tests. 17523c15da26SmrgAC_DEFUN([LT_OUTPUT], 17533c15da26Smrg[: ${CONFIG_LT=./config.lt} 17543c15da26SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 17553c15da26Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 17563c15da26Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 1757126a8a12Smrg 17583c15da26Smrgcat >>"$CONFIG_LT" <<\_LTEOF 17593c15da26Smrglt_cl_silent=false 17603c15da26Smrgexec AS_MESSAGE_LOG_FD>>config.log 17613c15da26Smrg{ 17623c15da26Smrg echo 17633c15da26Smrg AS_BOX([Running $as_me.]) 17643c15da26Smrg} >&AS_MESSAGE_LOG_FD 1765126a8a12Smrg 17663c15da26Smrglt_cl_help="\ 17673c15da26Smrg\`$as_me' creates a local libtool stub from the current configuration, 17683c15da26Smrgfor use in further configure time tests before the real libtool is 17693c15da26Smrggenerated. 1770126a8a12Smrg 17713c15da26SmrgUsage: $[0] [[OPTIONS]] 1772126a8a12Smrg 17733c15da26Smrg -h, --help print this help, then exit 17743c15da26Smrg -V, --version print version number, then exit 17753c15da26Smrg -q, --quiet do not print progress messages 17763c15da26Smrg -d, --debug don't remove temporary files 1777126a8a12Smrg 17783c15da26SmrgReport bugs to <bug-libtool@gnu.org>." 1779126a8a12Smrg 17803c15da26Smrglt_cl_version="\ 17813c15da26Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 17823c15da26Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 17833c15da26Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1784555991fdSmrg 17850a6b08f8SmrgCopyright (C) 2011 Free Software Foundation, Inc. 17863c15da26SmrgThis config.lt script is free software; the Free Software Foundation 17873c15da26Smrggives unlimited permision to copy, distribute and modify it." 1788555991fdSmrg 17893c15da26Smrgwhile test $[#] != 0 17903c15da26Smrgdo 17913c15da26Smrg case $[1] in 17923c15da26Smrg --version | --v* | -V ) 17933c15da26Smrg echo "$lt_cl_version"; exit 0 ;; 17943c15da26Smrg --help | --h* | -h ) 17953c15da26Smrg echo "$lt_cl_help"; exit 0 ;; 17963c15da26Smrg --debug | --d* | -d ) 17973c15da26Smrg debug=: ;; 17983c15da26Smrg --quiet | --q* | --silent | --s* | -q ) 17993c15da26Smrg lt_cl_silent=: ;; 1800555991fdSmrg 18013c15da26Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 18023c15da26SmrgTry \`$[0] --help' for more information.]) ;; 1803555991fdSmrg 18043c15da26Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 18053c15da26SmrgTry \`$[0] --help' for more information.]) ;; 1806d656433aSmrg esac 18073c15da26Smrg shift 1808555991fdSmrgdone 1809555991fdSmrg 18103c15da26Smrgif $lt_cl_silent; then 18113c15da26Smrg exec AS_MESSAGE_FD>/dev/null 1812555991fdSmrgfi 18133c15da26Smrg_LTEOF 1814555991fdSmrg 18153c15da26Smrgcat >>"$CONFIG_LT" <<_LTEOF 18163c15da26Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 18173c15da26Smrg_LTEOF 1818555991fdSmrg 18193c15da26Smrgcat >>"$CONFIG_LT" <<\_LTEOF 18203c15da26SmrgAC_MSG_NOTICE([creating $ofile]) 18213c15da26Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 18223c15da26SmrgAS_EXIT(0) 18233c15da26Smrg_LTEOF 18243c15da26Smrgchmod +x "$CONFIG_LT" 1825126a8a12Smrg 18263c15da26Smrg# configure is writing to config.log, but config.lt does its own redirection, 18273c15da26Smrg# appending to config.log, which fails on DOS, as config.log is still kept 18283c15da26Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 18293c15da26Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 18303c15da26Smrglt_cl_success=: 18313c15da26Smrgtest "$silent" = yes && 18323c15da26Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 18333c15da26Smrgexec AS_MESSAGE_LOG_FD>/dev/null 18343c15da26Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 18353c15da26Smrgexec AS_MESSAGE_LOG_FD>>config.log 18363c15da26Smrg$lt_cl_success || AS_EXIT(1) 18373c15da26Smrg])# LT_OUTPUT 1838126a8a12Smrg 1839126a8a12Smrg 18403c15da26Smrg# _LT_CONFIG(TAG) 18413c15da26Smrg# --------------- 18423c15da26Smrg# If TAG is the built-in tag, create an initial libtool script with a 18433c15da26Smrg# default configuration from the untagged config vars. Otherwise add code 18443c15da26Smrg# to config.status for appending the configuration named by TAG from the 18453c15da26Smrg# matching tagged config vars. 18463c15da26Smrgm4_defun([_LT_CONFIG], 18473c15da26Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 18483c15da26Smrg_LT_CONFIG_SAVE_COMMANDS([ 18493c15da26Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 18503c15da26Smrg m4_if(_LT_TAG, [C], [ 18513c15da26Smrg # See if we are running on zsh, and set the options which allow our 18523c15da26Smrg # commands through without removal of \ escapes. 18533c15da26Smrg if test -n "${ZSH_VERSION+set}" ; then 18543c15da26Smrg setopt NO_GLOB_SUBST 18553c15da26Smrg fi 1856126a8a12Smrg 18573c15da26Smrg cfgfile="${ofile}T" 18583c15da26Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 18593c15da26Smrg $RM "$cfgfile" 1860126a8a12Smrg 18613c15da26Smrg cat <<_LT_EOF >> "$cfgfile" 18623c15da26Smrg#! $SHELL 1863d656433aSmrg 18643c15da26Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 18653c15da26Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 18663c15da26Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 18673c15da26Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 18683c15da26Smrg# 18693c15da26Smrg_LT_COPYING 18703c15da26Smrg_LT_LIBTOOL_TAGS 1871d656433aSmrg 18723c15da26Smrg# ### BEGIN LIBTOOL CONFIG 18733c15da26Smrg_LT_LIBTOOL_CONFIG_VARS 18743c15da26Smrg_LT_LIBTOOL_TAG_VARS 18753c15da26Smrg# ### END LIBTOOL CONFIG 1876126a8a12Smrg 18773c15da26Smrg_LT_EOF 1878126a8a12Smrg 18793c15da26Smrg case $host_os in 18803c15da26Smrg aix3*) 18813c15da26Smrg cat <<\_LT_EOF >> "$cfgfile" 18823c15da26Smrg# AIX sometimes has problems with the GCC collect2 program. For some 18833c15da26Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 18843c15da26Smrg# vanish in a puff of smoke. 18853c15da26Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 18863c15da26Smrg COLLECT_NAMES= 18873c15da26Smrg export COLLECT_NAMES 18883c15da26Smrgfi 18893c15da26Smrg_LT_EOF 18903c15da26Smrg ;; 18913c15da26Smrg esac 1892126a8a12Smrg 18933c15da26Smrg _LT_PROG_LTMAIN 1894126a8a12Smrg 18953c15da26Smrg # We use sed instead of cat because bash on DJGPP gets confused if 18963c15da26Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 18973c15da26Smrg # text mode, it properly converts lines to CR/LF. This bash problem 18983c15da26Smrg # is reportedly fixed, but why not run on old versions too? 18993c15da26Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 19003c15da26Smrg || (rm -f "$cfgfile"; exit 1) 1901d656433aSmrg 19023c15da26Smrg _LT_PROG_REPLACE_SHELLFNS 1903126a8a12Smrg 19043c15da26Smrg mv -f "$cfgfile" "$ofile" || 19053c15da26Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 19063c15da26Smrg chmod +x "$ofile" 19073c15da26Smrg], 19083c15da26Smrg[cat <<_LT_EOF >> "$ofile" 1909126a8a12Smrg 19103c15da26Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 19113c15da26Smrgdnl in a comment (ie after a #). 19123c15da26Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 19133c15da26Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 19143c15da26Smrg# ### END LIBTOOL TAG CONFIG: $1 19153c15da26Smrg_LT_EOF 19163c15da26Smrg])dnl /m4_if 19173c15da26Smrg], 19183c15da26Smrg[m4_if([$1], [], [ 19193c15da26Smrg PACKAGE='$PACKAGE' 19203c15da26Smrg VERSION='$VERSION' 19213c15da26Smrg TIMESTAMP='$TIMESTAMP' 19223c15da26Smrg RM='$RM' 19233c15da26Smrg ofile='$ofile'], []) 19243c15da26Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 19253c15da26Smrg])# _LT_CONFIG 1926126a8a12Smrg 1927126a8a12Smrg 19283c15da26Smrg# LT_SUPPORTED_TAG(TAG) 19293c15da26Smrg# --------------------- 19303c15da26Smrg# Trace this macro to discover what tags are supported by the libtool 19313c15da26Smrg# --tag option, using: 19323c15da26Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 19333c15da26SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1934d656433aSmrg 1935126a8a12Smrg 19363c15da26Smrg# C support is built-in for now 19373c15da26Smrgm4_define([_LT_LANG_C_enabled], []) 19383c15da26Smrgm4_define([_LT_TAGS], []) 1939d656433aSmrg 1940d656433aSmrg 19413c15da26Smrg# LT_LANG(LANG) 19423c15da26Smrg# ------------- 19433c15da26Smrg# Enable libtool support for the given language if not already enabled. 19443c15da26SmrgAC_DEFUN([LT_LANG], 19453c15da26Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 19463c15da26Smrgm4_case([$1], 19473c15da26Smrg [C], [_LT_LANG(C)], 19483c15da26Smrg [C++], [_LT_LANG(CXX)], 19490a6b08f8Smrg [Go], [_LT_LANG(GO)], 19503c15da26Smrg [Java], [_LT_LANG(GCJ)], 19513c15da26Smrg [Fortran 77], [_LT_LANG(F77)], 19523c15da26Smrg [Fortran], [_LT_LANG(FC)], 19533c15da26Smrg [Windows Resource], [_LT_LANG(RC)], 19543c15da26Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 19553c15da26Smrg [_LT_LANG($1)], 19563c15da26Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 19573c15da26Smrg])# LT_LANG 1958d656433aSmrg 1959d656433aSmrg 19603c15da26Smrg# _LT_LANG(LANGNAME) 19613c15da26Smrg# ------------------ 19623c15da26Smrgm4_defun([_LT_LANG], 19633c15da26Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 19643c15da26Smrg [LT_SUPPORTED_TAG([$1])dnl 19653c15da26Smrg m4_append([_LT_TAGS], [$1 ])dnl 19663c15da26Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 19673c15da26Smrg _LT_LANG_$1_CONFIG($1)])dnl 19683c15da26Smrg])# _LT_LANG 1969126a8a12Smrg 1970126a8a12Smrg 19710a6b08f8Smrgm4_ifndef([AC_PROG_GO], [ 19720a6b08f8Smrg# NOTE: This macro has been submitted for inclusion into # 19730a6b08f8Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 19740a6b08f8Smrg# a released version of Autoconf we should remove this # 19750a6b08f8Smrg# macro and use it instead. # 19760a6b08f8Smrgm4_defun([AC_PROG_GO], 19770a6b08f8Smrg[AC_LANG_PUSH(Go)dnl 19780a6b08f8SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 19790a6b08f8SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 19800a6b08f8Smrg_AC_ARG_VAR_LDFLAGS()dnl 19810a6b08f8SmrgAC_CHECK_TOOL(GOC, gccgo) 19820a6b08f8Smrgif test -z "$GOC"; then 19830a6b08f8Smrg if test -n "$ac_tool_prefix"; then 19840a6b08f8Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 19850a6b08f8Smrg fi 19860a6b08f8Smrgfi 19870a6b08f8Smrgif test -z "$GOC"; then 19880a6b08f8Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 19890a6b08f8Smrgfi 19900a6b08f8Smrg])#m4_defun 19910a6b08f8Smrg])#m4_ifndef 19920a6b08f8Smrg 19930a6b08f8Smrg 19943c15da26Smrg# _LT_LANG_DEFAULT_CONFIG 19953c15da26Smrg# ----------------------- 19963c15da26Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 19973c15da26Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 19983c15da26Smrg [LT_LANG(CXX)], 19993c15da26Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 2000126a8a12Smrg 20013c15da26SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 20023c15da26Smrg [LT_LANG(F77)], 20033c15da26Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2004d656433aSmrg 20053c15da26SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 20063c15da26Smrg [LT_LANG(FC)], 20073c15da26Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2008d656433aSmrg 20093c15da26Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 20103c15da26Smrgdnl pulling things in needlessly. 20113c15da26SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 20123c15da26Smrg [LT_LANG(GCJ)], 20133c15da26Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 20143c15da26Smrg [LT_LANG(GCJ)], 20153c15da26Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 20163c15da26Smrg [LT_LANG(GCJ)], 20173c15da26Smrg [m4_ifdef([AC_PROG_GCJ], 20183c15da26Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 20193c15da26Smrg m4_ifdef([A][M_PROG_GCJ], 20203c15da26Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 20213c15da26Smrg m4_ifdef([LT_PROG_GCJ], 20223c15da26Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 2023126a8a12Smrg 20240a6b08f8SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 20250a6b08f8Smrg [LT_LANG(GO)], 20260a6b08f8Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 20270a6b08f8Smrg 20283c15da26SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 20293c15da26Smrg [LT_LANG(RC)], 20303c15da26Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 20313c15da26Smrg])# _LT_LANG_DEFAULT_CONFIG 2032126a8a12Smrg 20333c15da26Smrg# Obsolete macros: 20343c15da26SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 20353c15da26SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 20363c15da26SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 20373c15da26SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 20383c15da26SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 20393c15da26Smrgdnl aclocal-1.4 backwards compatibility: 20403c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 20413c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 20423c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 20433c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 20443c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 2045126a8a12Smrg 2046126a8a12Smrg 20473c15da26Smrg# _LT_TAG_COMPILER 20483c15da26Smrg# ---------------- 20493c15da26Smrgm4_defun([_LT_TAG_COMPILER], 20503c15da26Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2051126a8a12Smrg 20523c15da26Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 20533c15da26Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 20543c15da26Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 20553c15da26Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2056126a8a12Smrg 20573c15da26Smrg# If no C compiler was specified, use CC. 20583c15da26SmrgLTCC=${LTCC-"$CC"} 2059126a8a12Smrg 20603c15da26Smrg# If no C compiler flags were specified, use CFLAGS. 20613c15da26SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2062126a8a12Smrg 20633c15da26Smrg# Allow CC to be a program name with arguments. 20643c15da26Smrgcompiler=$CC 20653c15da26Smrg])# _LT_TAG_COMPILER 2066126a8a12Smrg 2067126a8a12Smrg 20683c15da26Smrg# _LT_COMPILER_BOILERPLATE 20693c15da26Smrg# ------------------------ 20703c15da26Smrg# Check for compiler boilerplate output or warnings with 20713c15da26Smrg# the simple compiler test code. 20723c15da26Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 20733c15da26Smrg[m4_require([_LT_DECL_SED])dnl 20743c15da26Smrgac_outfile=conftest.$ac_objext 20753c15da26Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 20763c15da26Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20773c15da26Smrg_lt_compiler_boilerplate=`cat conftest.err` 20783c15da26Smrg$RM conftest* 20793c15da26Smrg])# _LT_COMPILER_BOILERPLATE 2080126a8a12Smrg 2081126a8a12Smrg 20823c15da26Smrg# _LT_LINKER_BOILERPLATE 20833c15da26Smrg# ---------------------- 20843c15da26Smrg# Check for linker boilerplate output or warnings with 20853c15da26Smrg# the simple link test code. 20863c15da26Smrgm4_defun([_LT_LINKER_BOILERPLATE], 20873c15da26Smrg[m4_require([_LT_DECL_SED])dnl 20883c15da26Smrgac_outfile=conftest.$ac_objext 20893c15da26Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 20903c15da26Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20913c15da26Smrg_lt_linker_boilerplate=`cat conftest.err` 20923c15da26Smrg$RM -r conftest* 20933c15da26Smrg])# _LT_LINKER_BOILERPLATE 2094126a8a12Smrg 20953c15da26Smrg# _LT_REQUIRED_DARWIN_CHECKS 20963c15da26Smrg# ------------------------- 20973c15da26Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 20983c15da26Smrg case $host_os in 20993c15da26Smrg rhapsody* | darwin*) 21003c15da26Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 21013c15da26Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 21023c15da26Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 21033c15da26Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 21043c15da26Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 21053c15da26Smrg _LT_DECL([], [DSYMUTIL], [1], 21063c15da26Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 21073c15da26Smrg _LT_DECL([], [NMEDIT], [1], 21083c15da26Smrg [Tool to change global to local symbols on Mac OS X]) 21093c15da26Smrg _LT_DECL([], [LIPO], [1], 21103c15da26Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 21113c15da26Smrg _LT_DECL([], [OTOOL], [1], 21123c15da26Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 21133c15da26Smrg _LT_DECL([], [OTOOL64], [1], 21143c15da26Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2115126a8a12Smrg 21163c15da26Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 21173c15da26Smrg [lt_cv_apple_cc_single_mod=no 21183c15da26Smrg if test -z "${LT_MULTI_MODULE}"; then 21193c15da26Smrg # By default we will add the -single_module flag. You can override 21203c15da26Smrg # by either setting the environment variable LT_MULTI_MODULE 21213c15da26Smrg # non-empty at configure time, or by adding -multi_module to the 21223c15da26Smrg # link flags. 21233c15da26Smrg rm -rf libconftest.dylib* 21243c15da26Smrg echo "int foo(void){return 1;}" > conftest.c 21253c15da26Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21263c15da26Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 21273c15da26Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21283c15da26Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 21293c15da26Smrg _lt_result=$? 21300a6b08f8Smrg # If there is a non-empty error log, and "single_module" 21310a6b08f8Smrg # appears in it, assume the flag caused a linker warning 21320a6b08f8Smrg if test -s conftest.err && $GREP single_module conftest.err; then 21330a6b08f8Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21340a6b08f8Smrg # Otherwise, if the output was created with a 0 exit code from 21350a6b08f8Smrg # the compiler, it worked. 21360a6b08f8Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 21373c15da26Smrg lt_cv_apple_cc_single_mod=yes 21383c15da26Smrg else 21393c15da26Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21403c15da26Smrg fi 21413c15da26Smrg rm -rf libconftest.dylib* 21423c15da26Smrg rm -f conftest.* 21433c15da26Smrg fi]) 21440a6b08f8Smrg 21453c15da26Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 21463c15da26Smrg [lt_cv_ld_exported_symbols_list], 21473c15da26Smrg [lt_cv_ld_exported_symbols_list=no 21483c15da26Smrg save_LDFLAGS=$LDFLAGS 21493c15da26Smrg echo "_main" > conftest.sym 21503c15da26Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 21513c15da26Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 21523c15da26Smrg [lt_cv_ld_exported_symbols_list=yes], 21533c15da26Smrg [lt_cv_ld_exported_symbols_list=no]) 21543c15da26Smrg LDFLAGS="$save_LDFLAGS" 21553c15da26Smrg ]) 21560a6b08f8Smrg 21573c15da26Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 21583c15da26Smrg [lt_cv_ld_force_load=no 21593c15da26Smrg cat > conftest.c << _LT_EOF 21603c15da26Smrgint forced_loaded() { return 2;} 21613c15da26Smrg_LT_EOF 21623c15da26Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 21633c15da26Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 21643c15da26Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 21653c15da26Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 21663c15da26Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 21673c15da26Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 21683c15da26Smrg cat > conftest.c << _LT_EOF 21693c15da26Smrgint main() { return 0;} 21703c15da26Smrg_LT_EOF 21713c15da26Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 21723c15da26Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 21733c15da26Smrg _lt_result=$? 21740a6b08f8Smrg if test -s conftest.err && $GREP force_load conftest.err; then 21750a6b08f8Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21760a6b08f8Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 21773c15da26Smrg lt_cv_ld_force_load=yes 21783c15da26Smrg else 21793c15da26Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21803c15da26Smrg fi 21813c15da26Smrg rm -f conftest.err libconftest.a conftest conftest.c 21823c15da26Smrg rm -rf conftest.dSYM 21833c15da26Smrg ]) 21843c15da26Smrg case $host_os in 21853c15da26Smrg rhapsody* | darwin1.[[012]]) 21863c15da26Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 21873c15da26Smrg darwin1.*) 21883c15da26Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 21893c15da26Smrg darwin*) # darwin 5.x on 21903c15da26Smrg # if running on 10.5 or later, the deployment target defaults 21913c15da26Smrg # to the OS version, if on x86, and 10.4, the deployment 21923c15da26Smrg # target defaults to 10.4. Don't you love it? 21933c15da26Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 21943c15da26Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 21953c15da26Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 21963c15da26Smrg 10.[[012]]*) 21973c15da26Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 21983c15da26Smrg 10.*) 21993c15da26Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 22003c15da26Smrg esac 22013c15da26Smrg ;; 22023c15da26Smrg esac 22033c15da26Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 22043c15da26Smrg _lt_dar_single_mod='$single_module' 22053c15da26Smrg fi 22063c15da26Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 22073c15da26Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 22083c15da26Smrg else 22093c15da26Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 22103c15da26Smrg fi 22113c15da26Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 22123c15da26Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 22133c15da26Smrg else 22143c15da26Smrg _lt_dsymutil= 22153c15da26Smrg fi 22163c15da26Smrg ;; 22173c15da26Smrg esac 2218555991fdSmrg]) 2219126a8a12Smrg 2220126a8a12Smrg 22210a6b08f8Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 22220a6b08f8Smrg# --------------------------------- 22233c15da26Smrg# Checks for linker and compiler features on darwin 22243c15da26Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 22253c15da26Smrg[ 22263c15da26Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 22273c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 22283c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=no 22293c15da26Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 22303c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 22313c15da26Smrg if test "$lt_cv_ld_force_load" = "yes"; then 22323c15da26Smrg _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\"`' 22330a6b08f8Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 22340a6b08f8Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 22353c15da26Smrg else 22363c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 22373c15da26Smrg fi 22383c15da26Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 22393c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 22403c15da26Smrg case $cc_basename in 22413c15da26Smrg ifort*) _lt_dar_can_shared=yes ;; 22423c15da26Smrg *) _lt_dar_can_shared=$GCC ;; 22433c15da26Smrg esac 22443c15da26Smrg if test "$_lt_dar_can_shared" = "yes"; then 22453c15da26Smrg output_verbose_link_cmd=func_echo_all 22463c15da26Smrg _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}" 22473c15da26Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 22483c15da26Smrg _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}" 22493c15da26Smrg _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}" 22503c15da26Smrg m4_if([$1], [CXX], 22513c15da26Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 22523c15da26Smrg _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}" 22533c15da26Smrg _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}" 22543c15da26Smrg fi 22553c15da26Smrg],[]) 22563c15da26Smrg else 22573c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 22583c15da26Smrg fi 22593c15da26Smrg]) 2260126a8a12Smrg 22613c15da26Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 22623c15da26Smrg# ---------------------------------- 22633c15da26Smrg# Links a minimal program and checks the executable 22643c15da26Smrg# for the system default hardcoded library path. In most cases, 22653c15da26Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 22663c15da26Smrg# the location of the communication and MPI libs are included too. 22673c15da26Smrg# If we don't find anything, use the default library path according 22683c15da26Smrg# to the aix ld manual. 22693c15da26Smrg# Store the results from the different compilers for each TAGNAME. 22703c15da26Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 22713c15da26Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 22723c15da26Smrg[m4_require([_LT_DECL_SED])dnl 22733c15da26Smrgif test "${lt_cv_aix_libpath+set}" = set; then 22743c15da26Smrg aix_libpath=$lt_cv_aix_libpath 22753c15da26Smrgelse 22763c15da26Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 22773c15da26Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 22783c15da26Smrg lt_aix_libpath_sed='[ 22793c15da26Smrg /Import File Strings/,/^$/ { 22803c15da26Smrg /^0/ { 22813c15da26Smrg s/^0 *\([^ ]*\) *$/\1/ 22823c15da26Smrg p 22833c15da26Smrg } 22843c15da26Smrg }]' 22853c15da26Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22863c15da26Smrg # Check for a 64-bit object if we didn't find anything. 22873c15da26Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22883c15da26Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22893c15da26Smrg fi],[]) 22903c15da26Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22913c15da26Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 22923c15da26Smrg fi 22933c15da26Smrg ]) 22943c15da26Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 22953c15da26Smrgfi 22963c15da26Smrg])# _LT_SYS_MODULE_PATH_AIX 2297126a8a12Smrg 2298126a8a12Smrg 22993c15da26Smrg# _LT_SHELL_INIT(ARG) 2300555991fdSmrg# ------------------- 23013c15da26Smrgm4_define([_LT_SHELL_INIT], 23023c15da26Smrg[m4_divert_text([M4SH-INIT], [$1 23033c15da26Smrg])])# _LT_SHELL_INIT 2304126a8a12Smrg 2305126a8a12Smrg 2306126a8a12Smrg 23073c15da26Smrg# _LT_PROG_ECHO_BACKSLASH 23083c15da26Smrg# ----------------------- 23093c15da26Smrg# Find how we can fake an echo command that does not interpret backslash. 23103c15da26Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 23113c15da26Smrg# of the generated configure script which will find a shell with a builtin 23123c15da26Smrg# printf (which we can use as an echo command). 23133c15da26Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 23143c15da26Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23153c15da26SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23163c15da26SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2317555991fdSmrg 23183c15da26SmrgAC_MSG_CHECKING([how to print strings]) 23193c15da26Smrg# Test print first, because it will be a builtin if present. 23203c15da26Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 23213c15da26Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 23223c15da26Smrg ECHO='print -r --' 23233c15da26Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 23243c15da26Smrg ECHO='printf %s\n' 23253c15da26Smrgelse 23263c15da26Smrg # Use this function as a fallback that always works. 23273c15da26Smrg func_fallback_echo () 23283c15da26Smrg { 23293c15da26Smrg eval 'cat <<_LTECHO_EOF 23303c15da26Smrg$[]1 23313c15da26Smrg_LTECHO_EOF' 23323c15da26Smrg } 23333c15da26Smrg ECHO='func_fallback_echo' 23343c15da26Smrgfi 2335555991fdSmrg 23363c15da26Smrg# func_echo_all arg... 23373c15da26Smrg# Invoke $ECHO with all args, space-separated. 23383c15da26Smrgfunc_echo_all () 2339555991fdSmrg{ 23403c15da26Smrg $ECHO "$*" 2341555991fdSmrg} 2342555991fdSmrg 23433c15da26Smrgcase "$ECHO" in 23443c15da26Smrg printf*) AC_MSG_RESULT([printf]) ;; 23453c15da26Smrg print*) AC_MSG_RESULT([print -r]) ;; 23463c15da26Smrg *) AC_MSG_RESULT([cat]) ;; 23473c15da26Smrgesac 2348126a8a12Smrg 23493c15da26Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 23503c15da26Smrg[_AS_DETECT_SUGGESTED([ 23513c15da26Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 23523c15da26Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23533c15da26Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23543c15da26Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23553c15da26Smrg PATH=/empty FPATH=/empty; export PATH FPATH 23563c15da26Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 23573c15da26Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2358126a8a12Smrg 23593c15da26Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 23603c15da26Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 23613c15da26Smrg])# _LT_PROG_ECHO_BACKSLASH 2362126a8a12Smrg 2363126a8a12Smrg 23643c15da26Smrg# _LT_WITH_SYSROOT 23653c15da26Smrg# ---------------- 23663c15da26SmrgAC_DEFUN([_LT_WITH_SYSROOT], 23673c15da26Smrg[AC_MSG_CHECKING([for sysroot]) 23683c15da26SmrgAC_ARG_WITH([sysroot], 23693c15da26Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 23703c15da26Smrg (or the compiler's sysroot if not specified).], 23713c15da26Smrg[], [with_sysroot=no]) 23723c15da26Smrg 23733c15da26Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 23743c15da26Smrgdnl in case the user passed a directory name. 23753c15da26Smrglt_sysroot= 23763c15da26Smrgcase ${with_sysroot} in #( 23773c15da26Smrg yes) 23783c15da26Smrg if test "$GCC" = yes; then 23793c15da26Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 23803c15da26Smrg fi 23813c15da26Smrg ;; #( 23823c15da26Smrg /*) 23833c15da26Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 23843c15da26Smrg ;; #( 23853c15da26Smrg no|'') 23863c15da26Smrg ;; #( 23873c15da26Smrg *) 23883c15da26Smrg AC_MSG_RESULT([${with_sysroot}]) 23893c15da26Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 23903c15da26Smrg ;; 23913c15da26Smrgesac 2392126a8a12Smrg 23933c15da26Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 23943c15da26Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 23953c15da26Smrg[dependent libraries, and in which our libraries should be installed.])]) 2396126a8a12Smrg 23973c15da26Smrg# _LT_ENABLE_LOCK 23983c15da26Smrg# --------------- 23993c15da26Smrgm4_defun([_LT_ENABLE_LOCK], 24003c15da26Smrg[AC_ARG_ENABLE([libtool-lock], 24013c15da26Smrg [AS_HELP_STRING([--disable-libtool-lock], 24023c15da26Smrg [avoid locking (might break parallel builds)])]) 24033c15da26Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2404126a8a12Smrg 24053c15da26Smrg# Some flags need to be propagated to the compiler or linker for good 24063c15da26Smrg# libtool support. 24073c15da26Smrgcase $host in 24083c15da26Smrgia64-*-hpux*) 24093c15da26Smrg # Find out which ABI we are using. 24103c15da26Smrg echo 'int i;' > conftest.$ac_ext 24113c15da26Smrg if AC_TRY_EVAL(ac_compile); then 24123c15da26Smrg case `/usr/bin/file conftest.$ac_objext` in 24133c15da26Smrg *ELF-32*) 24143c15da26Smrg HPUX_IA64_MODE="32" 24153c15da26Smrg ;; 24163c15da26Smrg *ELF-64*) 24173c15da26Smrg HPUX_IA64_MODE="64" 24183c15da26Smrg ;; 24193c15da26Smrg esac 24203c15da26Smrg fi 24213c15da26Smrg rm -rf conftest* 24223c15da26Smrg ;; 24233c15da26Smrg*-*-irix6*) 24243c15da26Smrg # Find out which ABI we are using. 24253c15da26Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 24263c15da26Smrg if AC_TRY_EVAL(ac_compile); then 24273c15da26Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 24283c15da26Smrg case `/usr/bin/file conftest.$ac_objext` in 24293c15da26Smrg *32-bit*) 24303c15da26Smrg LD="${LD-ld} -melf32bsmip" 24313c15da26Smrg ;; 24323c15da26Smrg *N32*) 24333c15da26Smrg LD="${LD-ld} -melf32bmipn32" 24343c15da26Smrg ;; 24353c15da26Smrg *64-bit*) 24363c15da26Smrg LD="${LD-ld} -melf64bmip" 24373c15da26Smrg ;; 24383c15da26Smrg esac 24393c15da26Smrg else 24403c15da26Smrg case `/usr/bin/file conftest.$ac_objext` in 24413c15da26Smrg *32-bit*) 24423c15da26Smrg LD="${LD-ld} -32" 24433c15da26Smrg ;; 24443c15da26Smrg *N32*) 24453c15da26Smrg LD="${LD-ld} -n32" 24463c15da26Smrg ;; 24473c15da26Smrg *64-bit*) 24483c15da26Smrg LD="${LD-ld} -64" 24493c15da26Smrg ;; 24503c15da26Smrg esac 24513c15da26Smrg fi 24523c15da26Smrg fi 24533c15da26Smrg rm -rf conftest* 24543c15da26Smrg ;; 2455126a8a12Smrg 24563c15da26Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 24573c15da26Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 24583c15da26Smrg # Find out which ABI we are using. 24593c15da26Smrg echo 'int i;' > conftest.$ac_ext 24603c15da26Smrg if AC_TRY_EVAL(ac_compile); then 24613c15da26Smrg case `/usr/bin/file conftest.o` in 24623c15da26Smrg *32-bit*) 24633c15da26Smrg case $host in 24643c15da26Smrg x86_64-*kfreebsd*-gnu) 24653c15da26Smrg LD="${LD-ld} -m elf_i386_fbsd" 24663c15da26Smrg ;; 24673c15da26Smrg x86_64-*linux*) 24683c15da26Smrg LD="${LD-ld} -m elf_i386" 24693c15da26Smrg ;; 24703c15da26Smrg ppc64-*linux*|powerpc64-*linux*) 24713c15da26Smrg LD="${LD-ld} -m elf32ppclinux" 24723c15da26Smrg ;; 24733c15da26Smrg s390x-*linux*) 24743c15da26Smrg LD="${LD-ld} -m elf_s390" 24753c15da26Smrg ;; 24763c15da26Smrg sparc64-*linux*) 24773c15da26Smrg LD="${LD-ld} -m elf32_sparc" 24783c15da26Smrg ;; 24793c15da26Smrg esac 24803c15da26Smrg ;; 24813c15da26Smrg *64-bit*) 24823c15da26Smrg case $host in 24833c15da26Smrg x86_64-*kfreebsd*-gnu) 24843c15da26Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 24853c15da26Smrg ;; 24863c15da26Smrg x86_64-*linux*) 24873c15da26Smrg LD="${LD-ld} -m elf_x86_64" 24883c15da26Smrg ;; 24893c15da26Smrg ppc*-*linux*|powerpc*-*linux*) 24903c15da26Smrg LD="${LD-ld} -m elf64ppc" 24913c15da26Smrg ;; 24923c15da26Smrg s390*-*linux*|s390*-*tpf*) 24933c15da26Smrg LD="${LD-ld} -m elf64_s390" 24943c15da26Smrg ;; 24953c15da26Smrg sparc*-*linux*) 24963c15da26Smrg LD="${LD-ld} -m elf64_sparc" 24973c15da26Smrg ;; 24983c15da26Smrg esac 24993c15da26Smrg ;; 25003c15da26Smrg esac 25013c15da26Smrg fi 25023c15da26Smrg rm -rf conftest* 25033c15da26Smrg ;; 2504126a8a12Smrg 25053c15da26Smrg*-*-sco3.2v5*) 25063c15da26Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 25073c15da26Smrg SAVE_CFLAGS="$CFLAGS" 25083c15da26Smrg CFLAGS="$CFLAGS -belf" 25093c15da26Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 25103c15da26Smrg [AC_LANG_PUSH(C) 25113c15da26Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 25123c15da26Smrg AC_LANG_POP]) 25133c15da26Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 25143c15da26Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 25153c15da26Smrg CFLAGS="$SAVE_CFLAGS" 25163c15da26Smrg fi 25173c15da26Smrg ;; 25180a6b08f8Smrg*-*solaris*) 25193c15da26Smrg # Find out which ABI we are using. 25203c15da26Smrg echo 'int i;' > conftest.$ac_ext 25213c15da26Smrg if AC_TRY_EVAL(ac_compile); then 25223c15da26Smrg case `/usr/bin/file conftest.o` in 25233c15da26Smrg *64-bit*) 25243c15da26Smrg case $lt_cv_prog_gnu_ld in 25250a6b08f8Smrg yes*) 25260a6b08f8Smrg case $host in 25270a6b08f8Smrg i?86-*-solaris*) 25280a6b08f8Smrg LD="${LD-ld} -m elf_x86_64" 25290a6b08f8Smrg ;; 25300a6b08f8Smrg sparc*-*-solaris*) 25310a6b08f8Smrg LD="${LD-ld} -m elf64_sparc" 25320a6b08f8Smrg ;; 25330a6b08f8Smrg esac 25340a6b08f8Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 25350a6b08f8Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 25360a6b08f8Smrg LD="${LD-ld}_sol2" 25370a6b08f8Smrg fi 25380a6b08f8Smrg ;; 25393c15da26Smrg *) 25403c15da26Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 25413c15da26Smrg LD="${LD-ld} -64" 25423c15da26Smrg fi 25433c15da26Smrg ;; 25443c15da26Smrg esac 25453c15da26Smrg ;; 25463c15da26Smrg esac 25473c15da26Smrg fi 25483c15da26Smrg rm -rf conftest* 25493c15da26Smrg ;; 25503c15da26Smrgesac 2551126a8a12Smrg 25523c15da26Smrgneed_locks="$enable_libtool_lock" 25533c15da26Smrg])# _LT_ENABLE_LOCK 2554126a8a12Smrg 2555126a8a12Smrg 25563c15da26Smrg# _LT_PROG_AR 25573c15da26Smrg# ----------- 25583c15da26Smrgm4_defun([_LT_PROG_AR], 25593c15da26Smrg[AC_CHECK_TOOLS(AR, [ar], false) 25603c15da26Smrg: ${AR=ar} 25613c15da26Smrg: ${AR_FLAGS=cru} 25623c15da26Smrg_LT_DECL([], [AR], [1], [The archiver]) 25633c15da26Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 25643c15da26Smrg 25653c15da26SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 25663c15da26Smrg [lt_cv_ar_at_file=no 25673c15da26Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 25683c15da26Smrg [echo conftest.$ac_objext > conftest.lst 25693c15da26Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 25703c15da26Smrg AC_TRY_EVAL([lt_ar_try]) 25713c15da26Smrg if test "$ac_status" -eq 0; then 25723c15da26Smrg # Ensure the archiver fails upon bogus file names. 25733c15da26Smrg rm -f conftest.$ac_objext libconftest.a 25743c15da26Smrg AC_TRY_EVAL([lt_ar_try]) 25753c15da26Smrg if test "$ac_status" -ne 0; then 25763c15da26Smrg lt_cv_ar_at_file=@ 25773c15da26Smrg fi 25783c15da26Smrg fi 25793c15da26Smrg rm -f conftest.* libconftest.a 25803c15da26Smrg ]) 25813c15da26Smrg ]) 2582126a8a12Smrg 25833c15da26Smrgif test "x$lt_cv_ar_at_file" = xno; then 25843c15da26Smrg archiver_list_spec= 25853c15da26Smrgelse 25863c15da26Smrg archiver_list_spec=$lt_cv_ar_at_file 2587555991fdSmrgfi 25883c15da26Smrg_LT_DECL([], [archiver_list_spec], [1], 25893c15da26Smrg [How to feed a file listing to the archiver]) 25903c15da26Smrg])# _LT_PROG_AR 2591126a8a12Smrg 2592126a8a12Smrg 25933c15da26Smrg# _LT_CMD_OLD_ARCHIVE 25943c15da26Smrg# ------------------- 25953c15da26Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 25963c15da26Smrg[_LT_PROG_AR 2597126a8a12Smrg 25983c15da26SmrgAC_CHECK_TOOL(STRIP, strip, :) 25993c15da26Smrgtest -z "$STRIP" && STRIP=: 26003c15da26Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2601126a8a12Smrg 26023c15da26SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 26033c15da26Smrgtest -z "$RANLIB" && RANLIB=: 26043c15da26Smrg_LT_DECL([], [RANLIB], [1], 26053c15da26Smrg [Commands used to install an old-style archive]) 2606126a8a12Smrg 26073c15da26Smrg# Determine commands to create old-style static archives. 26083c15da26Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 26093c15da26Smrgold_postinstall_cmds='chmod 644 $oldlib' 26103c15da26Smrgold_postuninstall_cmds= 2611126a8a12Smrg 26123c15da26Smrgif test -n "$RANLIB"; then 2613555991fdSmrg case $host_os in 26143c15da26Smrg openbsd*) 26150a6b08f8Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 26163c15da26Smrg ;; 26173c15da26Smrg *) 26180a6b08f8Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2619555991fdSmrg ;; 2620555991fdSmrg esac 26210a6b08f8Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 26223c15da26Smrgfi 2623126a8a12Smrg 26243c15da26Smrgcase $host_os in 26253c15da26Smrg darwin*) 26263c15da26Smrg lock_old_archive_extraction=yes ;; 26273c15da26Smrg *) 26283c15da26Smrg lock_old_archive_extraction=no ;; 26293c15da26Smrgesac 26303c15da26Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 26313c15da26Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 26323c15da26Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 26333c15da26Smrg [Commands used to build an old-style archive]) 26343c15da26Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 26353c15da26Smrg [Whether to use a lock for old archive extraction]) 26363c15da26Smrg])# _LT_CMD_OLD_ARCHIVE 2637126a8a12Smrg 2638126a8a12Smrg 26393c15da26Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26403c15da26Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 26413c15da26Smrg# ---------------------------------------------------------------- 26423c15da26Smrg# Check whether the given compiler option works 26433c15da26SmrgAC_DEFUN([_LT_COMPILER_OPTION], 26443c15da26Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26453c15da26Smrgm4_require([_LT_DECL_SED])dnl 26463c15da26SmrgAC_CACHE_CHECK([$1], [$2], 26473c15da26Smrg [$2=no 26483c15da26Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 26493c15da26Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 26503c15da26Smrg lt_compiler_flag="$3" 26513c15da26Smrg # Insert the option either (1) after the last *FLAGS variable, or 26523c15da26Smrg # (2) before a word containing "conftest.", or (3) at the end. 26533c15da26Smrg # Note that $ac_compile itself does not contain backslashes and begins 26543c15da26Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 26553c15da26Smrg # The option is referenced via a variable to avoid confusing sed. 26563c15da26Smrg lt_compile=`echo "$ac_compile" | $SED \ 26573c15da26Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 26583c15da26Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 26593c15da26Smrg -e 's:$: $lt_compiler_flag:'` 26603c15da26Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 26613c15da26Smrg (eval "$lt_compile" 2>conftest.err) 26623c15da26Smrg ac_status=$? 26633c15da26Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 26643c15da26Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 26653c15da26Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 26663c15da26Smrg # The compiler can only warn and ignore the option if not recognized 26673c15da26Smrg # So say no if there are warnings other than the usual output. 26683c15da26Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 26693c15da26Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26703c15da26Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 26713c15da26Smrg $2=yes 26723c15da26Smrg fi 26733c15da26Smrg fi 26743c15da26Smrg $RM conftest* 26753c15da26Smrg]) 2676126a8a12Smrg 26773c15da26Smrgif test x"[$]$2" = xyes; then 26783c15da26Smrg m4_if([$5], , :, [$5]) 26793c15da26Smrgelse 26803c15da26Smrg m4_if([$6], , :, [$6]) 26813c15da26Smrgfi 26823c15da26Smrg])# _LT_COMPILER_OPTION 2683126a8a12Smrg 26843c15da26Smrg# Old name: 26853c15da26SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 26863c15da26Smrgdnl aclocal-1.4 backwards compatibility: 26873c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2688126a8a12Smrg 2689126a8a12Smrg 26903c15da26Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26913c15da26Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 26923c15da26Smrg# ---------------------------------------------------- 26933c15da26Smrg# Check whether the given linker option works 26943c15da26SmrgAC_DEFUN([_LT_LINKER_OPTION], 26953c15da26Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26963c15da26Smrgm4_require([_LT_DECL_SED])dnl 26973c15da26SmrgAC_CACHE_CHECK([$1], [$2], 26983c15da26Smrg [$2=no 26993c15da26Smrg save_LDFLAGS="$LDFLAGS" 27003c15da26Smrg LDFLAGS="$LDFLAGS $3" 27013c15da26Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 27023c15da26Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 27033c15da26Smrg # The linker can only warn and ignore the option if not recognized 27043c15da26Smrg # So say no if there are warnings 27053c15da26Smrg if test -s conftest.err; then 27063c15da26Smrg # Append any errors to the config.log. 27073c15da26Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 27083c15da26Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 27093c15da26Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 27103c15da26Smrg if diff conftest.exp conftest.er2 >/dev/null; then 27113c15da26Smrg $2=yes 27123c15da26Smrg fi 27133c15da26Smrg else 27143c15da26Smrg $2=yes 27153c15da26Smrg fi 27163c15da26Smrg fi 27173c15da26Smrg $RM -r conftest* 27183c15da26Smrg LDFLAGS="$save_LDFLAGS" 27193c15da26Smrg]) 2720126a8a12Smrg 27213c15da26Smrgif test x"[$]$2" = xyes; then 27223c15da26Smrg m4_if([$4], , :, [$4]) 27233c15da26Smrgelse 27243c15da26Smrg m4_if([$5], , :, [$5]) 27253c15da26Smrgfi 27263c15da26Smrg])# _LT_LINKER_OPTION 2727126a8a12Smrg 27283c15da26Smrg# Old name: 27293c15da26SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 27303c15da26Smrgdnl aclocal-1.4 backwards compatibility: 27313c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2732126a8a12Smrg 2733126a8a12Smrg 27343c15da26Smrg# LT_CMD_MAX_LEN 27353c15da26Smrg#--------------- 27363c15da26SmrgAC_DEFUN([LT_CMD_MAX_LEN], 27373c15da26Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 27383c15da26Smrg# find the maximum length of command line arguments 27393c15da26SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 27403c15da26SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 27413c15da26Smrg i=0 27423c15da26Smrg teststring="ABCD" 2743126a8a12Smrg 27443c15da26Smrg case $build_os in 27453c15da26Smrg msdosdjgpp*) 27463c15da26Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 27473c15da26Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 27483c15da26Smrg # during glob expansion). Even if it were fixed, the result of this 27493c15da26Smrg # check would be larger than it should be. 27503c15da26Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 27513c15da26Smrg ;; 2752126a8a12Smrg 27533c15da26Smrg gnu*) 27543c15da26Smrg # Under GNU Hurd, this test is not required because there is 27553c15da26Smrg # no limit to the length of command line arguments. 27563c15da26Smrg # Libtool will interpret -1 as no limit whatsoever 27573c15da26Smrg lt_cv_sys_max_cmd_len=-1; 27583c15da26Smrg ;; 2759126a8a12Smrg 27603c15da26Smrg cygwin* | mingw* | cegcc*) 27613c15da26Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 27623c15da26Smrg # about 5 minutes as the teststring grows exponentially. 27633c15da26Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 27643c15da26Smrg # you end up with a "frozen" computer, even though with patience 27653c15da26Smrg # the test eventually succeeds (with a max line length of 256k). 27663c15da26Smrg # Instead, let's just punt: use the minimum linelength reported by 27673c15da26Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 27683c15da26Smrg lt_cv_sys_max_cmd_len=8192; 27693c15da26Smrg ;; 2770126a8a12Smrg 27713c15da26Smrg mint*) 27723c15da26Smrg # On MiNT this can take a long time and run out of memory. 27733c15da26Smrg lt_cv_sys_max_cmd_len=8192; 27743c15da26Smrg ;; 2775126a8a12Smrg 27763c15da26Smrg amigaos*) 27773c15da26Smrg # On AmigaOS with pdksh, this test takes hours, literally. 27783c15da26Smrg # So we just punt and use a minimum line length of 8192. 27793c15da26Smrg lt_cv_sys_max_cmd_len=8192; 27803c15da26Smrg ;; 2781126a8a12Smrg 27823c15da26Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 27833c15da26Smrg # This has been around since 386BSD, at least. Likely further. 27843c15da26Smrg if test -x /sbin/sysctl; then 27853c15da26Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 27863c15da26Smrg elif test -x /usr/sbin/sysctl; then 27873c15da26Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 27883c15da26Smrg else 27893c15da26Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 27903c15da26Smrg fi 27913c15da26Smrg # And add a safety zone 27923c15da26Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27933c15da26Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27943c15da26Smrg ;; 2795126a8a12Smrg 27963c15da26Smrg interix*) 27973c15da26Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 27983c15da26Smrg lt_cv_sys_max_cmd_len=196608 27993c15da26Smrg ;; 2800126a8a12Smrg 28010a6b08f8Smrg os2*) 28020a6b08f8Smrg # The test takes a long time on OS/2. 28030a6b08f8Smrg lt_cv_sys_max_cmd_len=8192 28040a6b08f8Smrg ;; 28050a6b08f8Smrg 28063c15da26Smrg osf*) 28073c15da26Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 28083c15da26Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 28093c15da26Smrg # nice to cause kernel panics so lets avoid the loop below. 28103c15da26Smrg # First set a reasonable default. 28113c15da26Smrg lt_cv_sys_max_cmd_len=16384 28123c15da26Smrg # 28133c15da26Smrg if test -x /sbin/sysconfig; then 28143c15da26Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 28153c15da26Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 28163c15da26Smrg esac 28173c15da26Smrg fi 28183c15da26Smrg ;; 28193c15da26Smrg sco3.2v5*) 28203c15da26Smrg lt_cv_sys_max_cmd_len=102400 28213c15da26Smrg ;; 28223c15da26Smrg sysv5* | sco5v6* | sysv4.2uw2*) 28233c15da26Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 28243c15da26Smrg if test -n "$kargmax"; then 28253c15da26Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 28263c15da26Smrg else 28273c15da26Smrg lt_cv_sys_max_cmd_len=32768 28283c15da26Smrg fi 28293c15da26Smrg ;; 28303c15da26Smrg *) 28313c15da26Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 28323c15da26Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 28333c15da26Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 28343c15da26Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 28353c15da26Smrg else 28363c15da26Smrg # Make teststring a little bigger before we do anything with it. 28373c15da26Smrg # a 1K string should be a reasonable start. 28383c15da26Smrg for i in 1 2 3 4 5 6 7 8 ; do 28393c15da26Smrg teststring=$teststring$teststring 28403c15da26Smrg done 28413c15da26Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 28423c15da26Smrg # If test is not a shell built-in, we'll probably end up computing a 28433c15da26Smrg # maximum length that is only half of the actual maximum length, but 28443c15da26Smrg # we can't tell. 28450a6b08f8Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 28463c15da26Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 28473c15da26Smrg test $i != 17 # 1/2 MB should be enough 28483c15da26Smrg do 28493c15da26Smrg i=`expr $i + 1` 28503c15da26Smrg teststring=$teststring$teststring 28513c15da26Smrg done 28523c15da26Smrg # Only check the string length outside the loop. 28533c15da26Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 28543c15da26Smrg teststring= 28553c15da26Smrg # Add a significant safety factor because C++ compilers can tack on 28563c15da26Smrg # massive amounts of additional arguments before passing them to the 28573c15da26Smrg # linker. It appears as though 1/2 is a usable value. 28583c15da26Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 28593c15da26Smrg fi 28603c15da26Smrg ;; 28613c15da26Smrg esac 28623c15da26Smrg]) 28633c15da26Smrgif test -n $lt_cv_sys_max_cmd_len ; then 28643c15da26Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 28653c15da26Smrgelse 28663c15da26Smrg AC_MSG_RESULT(none) 28673c15da26Smrgfi 28683c15da26Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 28693c15da26Smrg_LT_DECL([], [max_cmd_len], [0], 28703c15da26Smrg [What is the maximum length of a command?]) 28713c15da26Smrg])# LT_CMD_MAX_LEN 2872126a8a12Smrg 28733c15da26Smrg# Old name: 28743c15da26SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2875555991fdSmrgdnl aclocal-1.4 backwards compatibility: 28763c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2877126a8a12Smrg 2878126a8a12Smrg 28793c15da26Smrg# _LT_HEADER_DLFCN 2880555991fdSmrg# ---------------- 28813c15da26Smrgm4_defun([_LT_HEADER_DLFCN], 28823c15da26Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 28833c15da26Smrg])# _LT_HEADER_DLFCN 2884555991fdSmrg 2885555991fdSmrg 28863c15da26Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 28873c15da26Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 28883c15da26Smrg# ---------------------------------------------------------------- 28893c15da26Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 28903c15da26Smrg[m4_require([_LT_HEADER_DLFCN])dnl 28913c15da26Smrgif test "$cross_compiling" = yes; then : 28923c15da26Smrg [$4] 28933c15da26Smrgelse 28943c15da26Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 28953c15da26Smrg lt_status=$lt_dlunknown 28963c15da26Smrg cat > conftest.$ac_ext <<_LT_EOF 28973c15da26Smrg[#line $LINENO "configure" 28983c15da26Smrg#include "confdefs.h" 2899555991fdSmrg 29003c15da26Smrg#if HAVE_DLFCN_H 29013c15da26Smrg#include <dlfcn.h> 29023c15da26Smrg#endif 2903555991fdSmrg 29043c15da26Smrg#include <stdio.h> 2905555991fdSmrg 29063c15da26Smrg#ifdef RTLD_GLOBAL 29073c15da26Smrg# define LT_DLGLOBAL RTLD_GLOBAL 29083c15da26Smrg#else 29093c15da26Smrg# ifdef DL_GLOBAL 29103c15da26Smrg# define LT_DLGLOBAL DL_GLOBAL 29113c15da26Smrg# else 29123c15da26Smrg# define LT_DLGLOBAL 0 29133c15da26Smrg# endif 29143c15da26Smrg#endif 2915555991fdSmrg 29163c15da26Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 29173c15da26Smrg find out it does not work in some platform. */ 29183c15da26Smrg#ifndef LT_DLLAZY_OR_NOW 29193c15da26Smrg# ifdef RTLD_LAZY 29203c15da26Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 29213c15da26Smrg# else 29223c15da26Smrg# ifdef DL_LAZY 29233c15da26Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 29243c15da26Smrg# else 29253c15da26Smrg# ifdef RTLD_NOW 29263c15da26Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 29273c15da26Smrg# else 29283c15da26Smrg# ifdef DL_NOW 29293c15da26Smrg# define LT_DLLAZY_OR_NOW DL_NOW 29303c15da26Smrg# else 29313c15da26Smrg# define LT_DLLAZY_OR_NOW 0 29323c15da26Smrg# endif 29333c15da26Smrg# endif 29343c15da26Smrg# endif 29353c15da26Smrg# endif 29363c15da26Smrg#endif 2937555991fdSmrg 29383c15da26Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 29393c15da26Smrg correspondingly for the symbols needed. */ 29403c15da26Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 29413c15da26Smrgint fnord () __attribute__((visibility("default"))); 29423c15da26Smrg#endif 2943126a8a12Smrg 29443c15da26Smrgint fnord () { return 42; } 29453c15da26Smrgint main () 29463c15da26Smrg{ 29473c15da26Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 29483c15da26Smrg int status = $lt_dlunknown; 2949126a8a12Smrg 29503c15da26Smrg if (self) 29513c15da26Smrg { 29523c15da26Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 29533c15da26Smrg else 29543c15da26Smrg { 29553c15da26Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 29563c15da26Smrg else puts (dlerror ()); 29573c15da26Smrg } 29583c15da26Smrg /* dlclose (self); */ 29593c15da26Smrg } 2960555991fdSmrg else 29613c15da26Smrg puts (dlerror ()); 29623c15da26Smrg 29633c15da26Smrg return status; 29643c15da26Smrg}] 29653c15da26Smrg_LT_EOF 29663c15da26Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 29673c15da26Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 29683c15da26Smrg lt_status=$? 29693c15da26Smrg case x$lt_status in 29703c15da26Smrg x$lt_dlno_uscore) $1 ;; 29713c15da26Smrg x$lt_dlneed_uscore) $2 ;; 29723c15da26Smrg x$lt_dlunknown|x*) $3 ;; 29733c15da26Smrg esac 29743c15da26Smrg else : 29753c15da26Smrg # compilation failed 29763c15da26Smrg $3 2977555991fdSmrg fi 29783c15da26Smrgfi 29793c15da26Smrgrm -fr conftest* 29803c15da26Smrg])# _LT_TRY_DLOPEN_SELF 2981126a8a12Smrg 2982126a8a12Smrg 29833c15da26Smrg# LT_SYS_DLOPEN_SELF 29843c15da26Smrg# ------------------ 29853c15da26SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 29863c15da26Smrg[m4_require([_LT_HEADER_DLFCN])dnl 29873c15da26Smrgif test "x$enable_dlopen" != xyes; then 29883c15da26Smrg enable_dlopen=unknown 29893c15da26Smrg enable_dlopen_self=unknown 29903c15da26Smrg enable_dlopen_self_static=unknown 29913c15da26Smrgelse 29923c15da26Smrg lt_cv_dlopen=no 29933c15da26Smrg lt_cv_dlopen_libs= 2994126a8a12Smrg 29953c15da26Smrg case $host_os in 29963c15da26Smrg beos*) 29973c15da26Smrg lt_cv_dlopen="load_add_on" 29983c15da26Smrg lt_cv_dlopen_libs= 29993c15da26Smrg lt_cv_dlopen_self=yes 30003c15da26Smrg ;; 3001126a8a12Smrg 30023c15da26Smrg mingw* | pw32* | cegcc*) 30033c15da26Smrg lt_cv_dlopen="LoadLibrary" 30043c15da26Smrg lt_cv_dlopen_libs= 30053c15da26Smrg ;; 3006555991fdSmrg 30073c15da26Smrg cygwin*) 30083c15da26Smrg lt_cv_dlopen="dlopen" 30093c15da26Smrg lt_cv_dlopen_libs= 30103c15da26Smrg ;; 3011555991fdSmrg 30123c15da26Smrg darwin*) 30133c15da26Smrg # if libdl is installed we need to link against it 30143c15da26Smrg AC_CHECK_LIB([dl], [dlopen], 30153c15da26Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 30163c15da26Smrg lt_cv_dlopen="dyld" 30173c15da26Smrg lt_cv_dlopen_libs= 30183c15da26Smrg lt_cv_dlopen_self=yes 30193c15da26Smrg ]) 30203c15da26Smrg ;; 3021555991fdSmrg 30223c15da26Smrg *) 30233c15da26Smrg AC_CHECK_FUNC([shl_load], 30243c15da26Smrg [lt_cv_dlopen="shl_load"], 30253c15da26Smrg [AC_CHECK_LIB([dld], [shl_load], 30263c15da26Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 30273c15da26Smrg [AC_CHECK_FUNC([dlopen], 30283c15da26Smrg [lt_cv_dlopen="dlopen"], 30293c15da26Smrg [AC_CHECK_LIB([dl], [dlopen], 30303c15da26Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 30313c15da26Smrg [AC_CHECK_LIB([svld], [dlopen], 30323c15da26Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 30333c15da26Smrg [AC_CHECK_LIB([dld], [dld_link], 30343c15da26Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 30353c15da26Smrg ]) 30363c15da26Smrg ]) 30373c15da26Smrg ]) 30383c15da26Smrg ]) 30393c15da26Smrg ]) 30403c15da26Smrg ;; 30413c15da26Smrg esac 3042555991fdSmrg 30433c15da26Smrg if test "x$lt_cv_dlopen" != xno; then 30443c15da26Smrg enable_dlopen=yes 30453c15da26Smrg else 30463c15da26Smrg enable_dlopen=no 30473c15da26Smrg fi 3048555991fdSmrg 30493c15da26Smrg case $lt_cv_dlopen in 30503c15da26Smrg dlopen) 30513c15da26Smrg save_CPPFLAGS="$CPPFLAGS" 30523c15da26Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3053555991fdSmrg 30543c15da26Smrg save_LDFLAGS="$LDFLAGS" 30553c15da26Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3056555991fdSmrg 30573c15da26Smrg save_LIBS="$LIBS" 30583c15da26Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 3059555991fdSmrg 30603c15da26Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 30613c15da26Smrg lt_cv_dlopen_self, [dnl 30623c15da26Smrg _LT_TRY_DLOPEN_SELF( 30633c15da26Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 30643c15da26Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 30653c15da26Smrg ]) 3066555991fdSmrg 30673c15da26Smrg if test "x$lt_cv_dlopen_self" = xyes; then 30683c15da26Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 30693c15da26Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 30703c15da26Smrg lt_cv_dlopen_self_static, [dnl 30713c15da26Smrg _LT_TRY_DLOPEN_SELF( 30723c15da26Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 30733c15da26Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 30743c15da26Smrg ]) 3075555991fdSmrg fi 3076555991fdSmrg 30773c15da26Smrg CPPFLAGS="$save_CPPFLAGS" 30783c15da26Smrg LDFLAGS="$save_LDFLAGS" 30793c15da26Smrg LIBS="$save_LIBS" 30803c15da26Smrg ;; 30813c15da26Smrg esac 3082555991fdSmrg 30833c15da26Smrg case $lt_cv_dlopen_self in 30843c15da26Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 30853c15da26Smrg *) enable_dlopen_self=unknown ;; 30863c15da26Smrg esac 3087126a8a12Smrg 30883c15da26Smrg case $lt_cv_dlopen_self_static in 30893c15da26Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 30903c15da26Smrg *) enable_dlopen_self_static=unknown ;; 30913c15da26Smrg esac 30923c15da26Smrgfi 30933c15da26Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 30943c15da26Smrg [Whether dlopen is supported]) 30953c15da26Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 30963c15da26Smrg [Whether dlopen of programs is supported]) 30973c15da26Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 30983c15da26Smrg [Whether dlopen of statically linked programs is supported]) 30993c15da26Smrg])# LT_SYS_DLOPEN_SELF 3100126a8a12Smrg 31013c15da26Smrg# Old name: 31023c15da26SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 31033c15da26Smrgdnl aclocal-1.4 backwards compatibility: 31043c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 3105126a8a12Smrg 3106126a8a12Smrg 31073c15da26Smrg# _LT_COMPILER_C_O([TAGNAME]) 31083c15da26Smrg# --------------------------- 31093c15da26Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 31103c15da26Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 31113c15da26Smrgm4_defun([_LT_COMPILER_C_O], 31123c15da26Smrg[m4_require([_LT_DECL_SED])dnl 31133c15da26Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31143c15da26Smrgm4_require([_LT_TAG_COMPILER])dnl 31153c15da26SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 31163c15da26Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 31173c15da26Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 31183c15da26Smrg $RM -r conftest 2>/dev/null 31193c15da26Smrg mkdir conftest 31203c15da26Smrg cd conftest 31213c15da26Smrg mkdir out 3122555991fdSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 31233c15da26Smrg 31243c15da26Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 3125555991fdSmrg # Insert the option either (1) after the last *FLAGS variable, or 3126555991fdSmrg # (2) before a word containing "conftest.", or (3) at the end. 3127555991fdSmrg # Note that $ac_compile itself does not contain backslashes and begins 3128555991fdSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 3129555991fdSmrg lt_compile=`echo "$ac_compile" | $SED \ 3130555991fdSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3131555991fdSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3132555991fdSmrg -e 's:$: $lt_compiler_flag:'` 3133555991fdSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 31343c15da26Smrg (eval "$lt_compile" 2>out/conftest.err) 3135555991fdSmrg ac_status=$? 31363c15da26Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 3137555991fdSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 31383c15da26Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 31393c15da26Smrg then 3140555991fdSmrg # The compiler can only warn and ignore the option if not recognized 31413c15da26Smrg # So say no if there are warnings 31423c15da26Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 31433c15da26Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 31443c15da26Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 31453c15da26Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3146555991fdSmrg fi 3147555991fdSmrg fi 31483c15da26Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 31493c15da26Smrg $RM conftest* 31503c15da26Smrg # SGI C++ compiler will create directory out/ii_files/ for 31513c15da26Smrg # template instantiation 31523c15da26Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 31533c15da26Smrg $RM out/* && rmdir out 31543c15da26Smrg cd .. 31553c15da26Smrg $RM -r conftest 3156555991fdSmrg $RM conftest* 3157555991fdSmrg]) 31583c15da26Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 31593c15da26Smrg [Does compiler simultaneously support -c and -o options?]) 31603c15da26Smrg])# _LT_COMPILER_C_O 3161126a8a12Smrg 3162126a8a12Smrg 31633c15da26Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 31643c15da26Smrg# ---------------------------------- 31653c15da26Smrg# Check to see if we can do hard links to lock some files if needed 31663c15da26Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 31673c15da26Smrg[m4_require([_LT_ENABLE_LOCK])dnl 31683c15da26Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31693c15da26Smrg_LT_COMPILER_C_O([$1]) 3170126a8a12Smrg 31713c15da26Smrghard_links="nottested" 31723c15da26Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 31733c15da26Smrg # do not overwrite the value of need_locks provided by the user 31743c15da26Smrg AC_MSG_CHECKING([if we can lock with hard links]) 31753c15da26Smrg hard_links=yes 31763c15da26Smrg $RM conftest* 31773c15da26Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31783c15da26Smrg touch conftest.a 31793c15da26Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 31803c15da26Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31813c15da26Smrg AC_MSG_RESULT([$hard_links]) 31823c15da26Smrg if test "$hard_links" = no; then 31833c15da26Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 31843c15da26Smrg need_locks=warn 31853c15da26Smrg fi 31863c15da26Smrgelse 31873c15da26Smrg need_locks=no 31883c15da26Smrgfi 31893c15da26Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 31903c15da26Smrg])# _LT_COMPILER_FILE_LOCKS 3191126a8a12Smrg 3192126a8a12Smrg 31933c15da26Smrg# _LT_CHECK_OBJDIR 31943c15da26Smrg# ---------------- 31953c15da26Smrgm4_defun([_LT_CHECK_OBJDIR], 31963c15da26Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 31973c15da26Smrg[rm -f .libs 2>/dev/null 31983c15da26Smrgmkdir .libs 2>/dev/null 31993c15da26Smrgif test -d .libs; then 32003c15da26Smrg lt_cv_objdir=.libs 3201555991fdSmrgelse 32023c15da26Smrg # MS-DOS does not allow filenames that begin with a dot. 32033c15da26Smrg lt_cv_objdir=_libs 3204555991fdSmrgfi 32053c15da26Smrgrmdir .libs 2>/dev/null]) 32063c15da26Smrgobjdir=$lt_cv_objdir 32073c15da26Smrg_LT_DECL([], [objdir], [0], 32083c15da26Smrg [The name of the directory that contains temporary libtool files])dnl 32093c15da26Smrgm4_pattern_allow([LT_OBJDIR])dnl 32103c15da26SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 32113c15da26Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 32123c15da26Smrg])# _LT_CHECK_OBJDIR 3213126a8a12Smrg 3214126a8a12Smrg 32153c15da26Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 32163c15da26Smrg# -------------------------------------- 32173c15da26Smrg# Check hardcoding attributes. 32183c15da26Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 32193c15da26Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 32203c15da26Smrg_LT_TAGVAR(hardcode_action, $1)= 32213c15da26Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 32223c15da26Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 32233c15da26Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3224126a8a12Smrg 32253c15da26Smrg # We can hardcode non-existent directories. 32263c15da26Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 32273c15da26Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 32283c15da26Smrg # have to relink, otherwise we might link with an installed library 32293c15da26Smrg # when we should be linking with a yet-to-be-installed one 32303c15da26Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 32313c15da26Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 32323c15da26Smrg # Linking always hardcodes the temporary library directory. 32333c15da26Smrg _LT_TAGVAR(hardcode_action, $1)=relink 32343c15da26Smrg else 32353c15da26Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 32363c15da26Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 32373c15da26Smrg fi 32383c15da26Smrgelse 32393c15da26Smrg # We cannot hardcode anything, or else we can only hardcode existing 32403c15da26Smrg # directories. 32413c15da26Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 32423c15da26Smrgfi 32433c15da26SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3244126a8a12Smrg 32453c15da26Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 32463c15da26Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 32473c15da26Smrg # Fast installation is not supported 32483c15da26Smrg enable_fast_install=no 32493c15da26Smrgelif test "$shlibpath_overrides_runpath" = yes || 32503c15da26Smrg test "$enable_shared" = no; then 32513c15da26Smrg # Fast installation is not necessary 32523c15da26Smrg enable_fast_install=needless 32533c15da26Smrgfi 32543c15da26Smrg_LT_TAGDECL([], [hardcode_action], [0], 32553c15da26Smrg [How to hardcode a shared library path into an executable]) 32563c15da26Smrg])# _LT_LINKER_HARDCODE_LIBPATH 3257126a8a12Smrg 3258126a8a12Smrg 32593c15da26Smrg# _LT_CMD_STRIPLIB 32603c15da26Smrg# ---------------- 32613c15da26Smrgm4_defun([_LT_CMD_STRIPLIB], 32623c15da26Smrg[m4_require([_LT_DECL_EGREP]) 32633c15da26Smrgstriplib= 32643c15da26Smrgold_striplib= 32653c15da26SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 32663c15da26Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 32673c15da26Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 32683c15da26Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 32693c15da26Smrg AC_MSG_RESULT([yes]) 32703c15da26Smrgelse 32713c15da26Smrg# FIXME - insert some real tests, host_os isn't really good enough 32723c15da26Smrg case $host_os in 32733c15da26Smrg darwin*) 32743c15da26Smrg if test -n "$STRIP" ; then 32753c15da26Smrg striplib="$STRIP -x" 32763c15da26Smrg old_striplib="$STRIP -S" 32773c15da26Smrg AC_MSG_RESULT([yes]) 3278555991fdSmrg else 32793c15da26Smrg AC_MSG_RESULT([no]) 3280555991fdSmrg fi 3281555991fdSmrg ;; 32823c15da26Smrg *) 32833c15da26Smrg AC_MSG_RESULT([no]) 3284555991fdSmrg ;; 32853c15da26Smrg esac 32863c15da26Smrgfi 32873c15da26Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 32883c15da26Smrg_LT_DECL([], [striplib], [1]) 32893c15da26Smrg])# _LT_CMD_STRIPLIB 3290d656433aSmrg 32913c15da26Smrg 32923c15da26Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 32933c15da26Smrg# ----------------------------- 32943c15da26Smrg# PORTME Fill in your ld.so characteristics 32953c15da26Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 32963c15da26Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 32973c15da26Smrgm4_require([_LT_DECL_EGREP])dnl 32983c15da26Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 32993c15da26Smrgm4_require([_LT_DECL_OBJDUMP])dnl 33003c15da26Smrgm4_require([_LT_DECL_SED])dnl 33013c15da26Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 33023c15da26SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 33033c15da26Smrgm4_if([$1], 33043c15da26Smrg [], [ 33053c15da26Smrgif test "$GCC" = yes; then 33063c15da26Smrg case $host_os in 33073c15da26Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 33083c15da26Smrg *) lt_awk_arg="/^libraries:/" ;; 33093c15da26Smrg esac 33103c15da26Smrg case $host_os in 33113c15da26Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 33123c15da26Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 33133c15da26Smrg esac 33143c15da26Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 33153c15da26Smrg case $lt_search_path_spec in 33163c15da26Smrg *\;*) 33173c15da26Smrg # if the path contains ";" then we assume it to be the separator 33183c15da26Smrg # otherwise default to the standard path separator (i.e. ":") - it is 33193c15da26Smrg # assumed that no part of a normal pathname contains ";" but that should 33203c15da26Smrg # okay in the real world where ";" in dirpaths is itself problematic. 33213c15da26Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3322d656433aSmrg ;; 3323d656433aSmrg *) 33243c15da26Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 33253c15da26Smrg ;; 33263c15da26Smrg esac 33273c15da26Smrg # Ok, now we have the path, separated by spaces, we can step through it 33283c15da26Smrg # and add multilib dir if necessary. 33293c15da26Smrg lt_tmp_lt_search_path_spec= 33303c15da26Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 33313c15da26Smrg for lt_sys_path in $lt_search_path_spec; do 33323c15da26Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 33333c15da26Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 3334555991fdSmrg else 33353c15da26Smrg test -d "$lt_sys_path" && \ 33363c15da26Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 3337555991fdSmrg fi 33383c15da26Smrg done 33393c15da26Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 33403c15da26SmrgBEGIN {RS=" "; FS="/|\n";} { 33413c15da26Smrg lt_foo=""; 33423c15da26Smrg lt_count=0; 33433c15da26Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 33443c15da26Smrg if ($lt_i != "" && $lt_i != ".") { 33453c15da26Smrg if ($lt_i == "..") { 33463c15da26Smrg lt_count++; 33473c15da26Smrg } else { 33483c15da26Smrg if (lt_count == 0) { 33493c15da26Smrg lt_foo="/" $lt_i lt_foo; 33503c15da26Smrg } else { 33513c15da26Smrg lt_count--; 33523c15da26Smrg } 33533c15da26Smrg } 33543c15da26Smrg } 33553c15da26Smrg } 33563c15da26Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 33573c15da26Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 33583c15da26Smrg}'` 33593c15da26Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 33603c15da26Smrg # for these hosts. 33613c15da26Smrg case $host_os in 33623c15da26Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 33633c15da26Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3364d656433aSmrg esac 33653c15da26Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3366555991fdSmrgelse 33673c15da26Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 33683c15da26Smrgfi]) 33693c15da26Smrglibrary_names_spec= 33703c15da26Smrglibname_spec='lib$name' 33713c15da26Smrgsoname_spec= 33723c15da26Smrgshrext_cmds=".so" 33733c15da26Smrgpostinstall_cmds= 33743c15da26Smrgpostuninstall_cmds= 33753c15da26Smrgfinish_cmds= 33763c15da26Smrgfinish_eval= 33773c15da26Smrgshlibpath_var= 33783c15da26Smrgshlibpath_overrides_runpath=unknown 33793c15da26Smrgversion_type=none 33803c15da26Smrgdynamic_linker="$host_os ld.so" 33813c15da26Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 33823c15da26Smrgneed_lib_prefix=unknown 33833c15da26Smrghardcode_into_libs=no 3384126a8a12Smrg 33853c15da26Smrg# when you set need_version to no, make sure it does not cause -set_version 33863c15da26Smrg# flags to be left without arguments 33873c15da26Smrgneed_version=unknown 3388126a8a12Smrg 33893c15da26Smrgcase $host_os in 33903c15da26Smrgaix3*) 33910a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 33923c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 33933c15da26Smrg shlibpath_var=LIBPATH 3394126a8a12Smrg 33953c15da26Smrg # AIX 3 has no versioning support, so we append a major version to the name. 33963c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 33973c15da26Smrg ;; 3398126a8a12Smrg 33993c15da26Smrgaix[[4-9]]*) 34000a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 34013c15da26Smrg need_lib_prefix=no 34023c15da26Smrg need_version=no 34033c15da26Smrg hardcode_into_libs=yes 34043c15da26Smrg if test "$host_cpu" = ia64; then 34053c15da26Smrg # AIX 5 supports IA64 34063c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 34073c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 3408555991fdSmrg else 34093c15da26Smrg # With GCC up to 2.95.x, collect2 would create an import file 34103c15da26Smrg # for dependence libraries. The import file would start with 34113c15da26Smrg # the line `#! .'. This would cause the generated library to 34123c15da26Smrg # depend on `.', always an invalid library. This was fixed in 34133c15da26Smrg # development snapshots of GCC prior to 3.0. 34143c15da26Smrg case $host_os in 34153c15da26Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 34163c15da26Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 34173c15da26Smrg echo ' yes ' 34183c15da26Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 34193c15da26Smrg : 34203c15da26Smrg else 34213c15da26Smrg can_build_shared=no 34223c15da26Smrg fi 34233c15da26Smrg ;; 3424555991fdSmrg esac 34253c15da26Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 34263c15da26Smrg # soname into executable. Probably we can add versioning support to 34273c15da26Smrg # collect2, so additional links can be useful in future. 34283c15da26Smrg if test "$aix_use_runtimelinking" = yes; then 34293c15da26Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 34303c15da26Smrg # instead of lib<name>.a to let people know that these are not 34313c15da26Smrg # typical AIX shared libraries. 34323c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34333c15da26Smrg else 34343c15da26Smrg # We preserve .a as extension for shared libraries through AIX4.2 34353c15da26Smrg # and later when we are not doing run time linking. 34363c15da26Smrg library_names_spec='${libname}${release}.a $libname.a' 34373c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 34383c15da26Smrg fi 34393c15da26Smrg shlibpath_var=LIBPATH 3440555991fdSmrg fi 34413c15da26Smrg ;; 3442126a8a12Smrg 34433c15da26Smrgamigaos*) 34443c15da26Smrg case $host_cpu in 34453c15da26Smrg powerpc) 34463c15da26Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 34473c15da26Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 34483c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34493c15da26Smrg ;; 34503c15da26Smrg m68k) 34513c15da26Smrg library_names_spec='$libname.ixlibrary $libname.a' 34523c15da26Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 34533c15da26Smrg 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' 34543c15da26Smrg ;; 34553c15da26Smrg esac 34563c15da26Smrg ;; 3457126a8a12Smrg 34583c15da26Smrgbeos*) 34593c15da26Smrg library_names_spec='${libname}${shared_ext}' 34603c15da26Smrg dynamic_linker="$host_os ld.so" 34613c15da26Smrg shlibpath_var=LIBRARY_PATH 34623c15da26Smrg ;; 3463126a8a12Smrg 34643c15da26Smrgbsdi[[45]]*) 34650a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 34663c15da26Smrg need_version=no 34673c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34683c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 34693c15da26Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 34703c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 34713c15da26Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 34723c15da26Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 34733c15da26Smrg # the default ld.so.conf also contains /usr/contrib/lib and 34743c15da26Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 34753c15da26Smrg # libtool to hard-code these into programs 34763c15da26Smrg ;; 3477126a8a12Smrg 34783c15da26Smrgcygwin* | mingw* | pw32* | cegcc*) 34793c15da26Smrg version_type=windows 34803c15da26Smrg shrext_cmds=".dll" 34813c15da26Smrg need_version=no 34823c15da26Smrg need_lib_prefix=no 3483126a8a12Smrg 34843c15da26Smrg case $GCC,$cc_basename in 34853c15da26Smrg yes,*) 34863c15da26Smrg # gcc 34873c15da26Smrg library_names_spec='$libname.dll.a' 34883c15da26Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 34893c15da26Smrg postinstall_cmds='base_file=`basename \${file}`~ 34903c15da26Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 34913c15da26Smrg dldir=$destdir/`dirname \$dlpath`~ 34923c15da26Smrg test -d \$dldir || mkdir -p \$dldir~ 34933c15da26Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 34943c15da26Smrg chmod a+x \$dldir/$dlname~ 34953c15da26Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 34963c15da26Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 34973c15da26Smrg fi' 34983c15da26Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 34993c15da26Smrg dlpath=$dir/\$dldll~ 35003c15da26Smrg $RM \$dlpath' 35013c15da26Smrg shlibpath_overrides_runpath=yes 35023c15da26Smrg 35033c15da26Smrg case $host_os in 35043c15da26Smrg cygwin*) 35053c15da26Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 35063c15da26Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35073c15da26Smrgm4_if([$1], [],[ 35083c15da26Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 35093c15da26Smrg ;; 35103c15da26Smrg mingw* | cegcc*) 35113c15da26Smrg # MinGW DLLs use traditional 'lib' prefix 35123c15da26Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35133c15da26Smrg ;; 35143c15da26Smrg pw32*) 35153c15da26Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 35163c15da26Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35173c15da26Smrg ;; 35183c15da26Smrg esac 35193c15da26Smrg dynamic_linker='Win32 ld.exe' 3520555991fdSmrg ;; 3521126a8a12Smrg 35223c15da26Smrg *,cl*) 35233c15da26Smrg # Native MSVC 35243c15da26Smrg libname_spec='$name' 35253c15da26Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35263c15da26Smrg library_names_spec='${libname}.dll.lib' 35273c15da26Smrg 35283c15da26Smrg case $build_os in 35293c15da26Smrg mingw*) 35303c15da26Smrg sys_lib_search_path_spec= 35313c15da26Smrg lt_save_ifs=$IFS 35323c15da26Smrg IFS=';' 35333c15da26Smrg for lt_path in $LIB 35343c15da26Smrg do 35353c15da26Smrg IFS=$lt_save_ifs 35363c15da26Smrg # Let DOS variable expansion print the short 8.3 style file name. 35373c15da26Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 35383c15da26Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 35393c15da26Smrg done 35403c15da26Smrg IFS=$lt_save_ifs 35413c15da26Smrg # Convert to MSYS style. 35423c15da26Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 35433c15da26Smrg ;; 35443c15da26Smrg cygwin*) 35453c15da26Smrg # Convert to unix form, then to dos form, then back to unix form 35463c15da26Smrg # but this time dos style (no spaces!) so that the unix form looks 35473c15da26Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 35483c15da26Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 35493c15da26Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 35503c15da26Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35513c15da26Smrg ;; 35523c15da26Smrg *) 35533c15da26Smrg sys_lib_search_path_spec="$LIB" 35543c15da26Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 35553c15da26Smrg # It is most probably a Windows format PATH. 35563c15da26Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 35573c15da26Smrg else 35583c15da26Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35593c15da26Smrg fi 35603c15da26Smrg # FIXME: find the short name or the path components, as spaces are 35613c15da26Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 35623c15da26Smrg ;; 35633c15da26Smrg esac 35643c15da26Smrg 35653c15da26Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 35663c15da26Smrg postinstall_cmds='base_file=`basename \${file}`~ 35673c15da26Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 35683c15da26Smrg dldir=$destdir/`dirname \$dlpath`~ 35693c15da26Smrg test -d \$dldir || mkdir -p \$dldir~ 35703c15da26Smrg $install_prog $dir/$dlname \$dldir/$dlname' 35713c15da26Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 35723c15da26Smrg dlpath=$dir/\$dldll~ 35733c15da26Smrg $RM \$dlpath' 35743c15da26Smrg shlibpath_overrides_runpath=yes 35753c15da26Smrg dynamic_linker='Win32 link.exe' 3576555991fdSmrg ;; 3577126a8a12Smrg 3578555991fdSmrg *) 35793c15da26Smrg # Assume MSVC wrapper 35803c15da26Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 35813c15da26Smrg dynamic_linker='Win32 ld.exe' 3582555991fdSmrg ;; 3583555991fdSmrg esac 35843c15da26Smrg # FIXME: first we should search . and the directory the executable is in 35853c15da26Smrg shlibpath_var=PATH 35863c15da26Smrg ;; 3587126a8a12Smrg 35883c15da26Smrgdarwin* | rhapsody*) 35893c15da26Smrg dynamic_linker="$host_os dyld" 35903c15da26Smrg version_type=darwin 35913c15da26Smrg need_lib_prefix=no 35923c15da26Smrg need_version=no 35933c15da26Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 35943c15da26Smrg soname_spec='${libname}${release}${major}$shared_ext' 35953c15da26Smrg shlibpath_overrides_runpath=yes 35963c15da26Smrg shlibpath_var=DYLD_LIBRARY_PATH 35973c15da26Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 35983c15da26Smrgm4_if([$1], [],[ 35993c15da26Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 36003c15da26Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 36013c15da26Smrg ;; 3602126a8a12Smrg 36033c15da26Smrgdgux*) 36040a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 36053c15da26Smrg need_lib_prefix=no 36063c15da26Smrg need_version=no 36073c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 36083c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 36093c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 36103c15da26Smrg ;; 3611126a8a12Smrg 36123c15da26Smrgfreebsd* | dragonfly*) 36133c15da26Smrg # DragonFly does not have aout. When/if they implement a new 36143c15da26Smrg # versioning mechanism, adjust this. 36153c15da26Smrg if test -x /usr/bin/objformat; then 36163c15da26Smrg objformat=`/usr/bin/objformat` 36173c15da26Smrg else 36183c15da26Smrg case $host_os in 36190a6b08f8Smrg freebsd[[23]].*) objformat=aout ;; 36203c15da26Smrg *) objformat=elf ;; 36213c15da26Smrg esac 36223c15da26Smrg fi 36233c15da26Smrg version_type=freebsd-$objformat 36243c15da26Smrg case $version_type in 36253c15da26Smrg freebsd-elf*) 36263c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 36273c15da26Smrg need_version=no 36283c15da26Smrg need_lib_prefix=no 36293c15da26Smrg ;; 36303c15da26Smrg freebsd-*) 36313c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 36323c15da26Smrg need_version=yes 36333c15da26Smrg ;; 36343c15da26Smrg esac 36353c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 36363c15da26Smrg case $host_os in 36370a6b08f8Smrg freebsd2.*) 36383c15da26Smrg shlibpath_overrides_runpath=yes 36393c15da26Smrg ;; 36403c15da26Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 36413c15da26Smrg shlibpath_overrides_runpath=yes 36423c15da26Smrg hardcode_into_libs=yes 36433c15da26Smrg ;; 36443c15da26Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 36453c15da26Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 36463c15da26Smrg shlibpath_overrides_runpath=no 36473c15da26Smrg hardcode_into_libs=yes 36483c15da26Smrg ;; 36493c15da26Smrg *) # from 4.6 on, and DragonFly 36503c15da26Smrg shlibpath_overrides_runpath=yes 36513c15da26Smrg hardcode_into_libs=yes 36523c15da26Smrg ;; 36533c15da26Smrg esac 36543c15da26Smrg ;; 3655126a8a12Smrg 36563c15da26Smrggnu*) 36570a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 36583c15da26Smrg need_lib_prefix=no 36593c15da26Smrg need_version=no 36603c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36613c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 36623c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 36630a6b08f8Smrg shlibpath_overrides_runpath=no 36643c15da26Smrg hardcode_into_libs=yes 36653c15da26Smrg ;; 3666126a8a12Smrg 36673c15da26Smrghaiku*) 36680a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 36693c15da26Smrg need_lib_prefix=no 36703c15da26Smrg need_version=no 36713c15da26Smrg dynamic_linker="$host_os runtime_loader" 36723c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36733c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 36743c15da26Smrg shlibpath_var=LIBRARY_PATH 36753c15da26Smrg shlibpath_overrides_runpath=yes 36763c15da26Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 36773c15da26Smrg hardcode_into_libs=yes 36783c15da26Smrg ;; 3679126a8a12Smrg 36803c15da26Smrghpux9* | hpux10* | hpux11*) 36813c15da26Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 36823c15da26Smrg # link against other versions. 36833c15da26Smrg version_type=sunos 36843c15da26Smrg need_lib_prefix=no 36853c15da26Smrg need_version=no 36863c15da26Smrg case $host_cpu in 36873c15da26Smrg ia64*) 36883c15da26Smrg shrext_cmds='.so' 36893c15da26Smrg hardcode_into_libs=yes 36903c15da26Smrg dynamic_linker="$host_os dld.so" 36913c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 36923c15da26Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 36933c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36943c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 36953c15da26Smrg if test "X$HPUX_IA64_MODE" = X32; then 36963c15da26Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 36973c15da26Smrg else 36983c15da26Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 36993c15da26Smrg fi 37003c15da26Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 37013c15da26Smrg ;; 37023c15da26Smrg hppa*64*) 37033c15da26Smrg shrext_cmds='.sl' 37043c15da26Smrg hardcode_into_libs=yes 37053c15da26Smrg dynamic_linker="$host_os dld.sl" 37063c15da26Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 37073c15da26Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 37083c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37093c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 37103c15da26Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 37113c15da26Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 37123c15da26Smrg ;; 37133c15da26Smrg *) 37143c15da26Smrg shrext_cmds='.sl' 37153c15da26Smrg dynamic_linker="$host_os dld.sl" 37163c15da26Smrg shlibpath_var=SHLIB_PATH 37173c15da26Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 37183c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37193c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 3720555991fdSmrg ;; 3721555991fdSmrg esac 37223c15da26Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 37233c15da26Smrg postinstall_cmds='chmod 555 $lib' 37243c15da26Smrg # or fails outright, so override atomically: 37253c15da26Smrg install_override_mode=555 37263c15da26Smrg ;; 3727126a8a12Smrg 37283c15da26Smrginterix[[3-9]]*) 37290a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 37303c15da26Smrg need_lib_prefix=no 37313c15da26Smrg need_version=no 37323c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 37333c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 37343c15da26Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 37353c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 37363c15da26Smrg shlibpath_overrides_runpath=no 37373c15da26Smrg hardcode_into_libs=yes 37383c15da26Smrg ;; 3739126a8a12Smrg 37403c15da26Smrgirix5* | irix6* | nonstopux*) 37413c15da26Smrg case $host_os in 37423c15da26Smrg nonstopux*) version_type=nonstopux ;; 37433c15da26Smrg *) 37443c15da26Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 37450a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 37463c15da26Smrg else 37473c15da26Smrg version_type=irix 37483c15da26Smrg fi ;; 3749555991fdSmrg esac 37503c15da26Smrg need_lib_prefix=no 37513c15da26Smrg need_version=no 37523c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 37533c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 37543c15da26Smrg case $host_os in 37553c15da26Smrg irix5* | nonstopux*) 37563c15da26Smrg libsuff= shlibsuff= 37573c15da26Smrg ;; 37583c15da26Smrg *) 37593c15da26Smrg case $LD in # libtool.m4 will add one of these switches to LD 37603c15da26Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 37613c15da26Smrg libsuff= shlibsuff= libmagic=32-bit;; 37623c15da26Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 37633c15da26Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 37643c15da26Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 37653c15da26Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 37663c15da26Smrg *) libsuff= shlibsuff= libmagic=never-match;; 37673c15da26Smrg esac 37683c15da26Smrg ;; 37693c15da26Smrg esac 37703c15da26Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 37713c15da26Smrg shlibpath_overrides_runpath=no 37723c15da26Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 37733c15da26Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 37743c15da26Smrg hardcode_into_libs=yes 37753c15da26Smrg ;; 3776126a8a12Smrg 37773c15da26Smrg# No shared lib support for Linux oldld, aout, or coff. 37783c15da26Smrglinux*oldld* | linux*aout* | linux*coff*) 37793c15da26Smrg dynamic_linker=no 37803c15da26Smrg ;; 3781126a8a12Smrg 37820a6b08f8Smrg# This must be glibc/ELF. 37833c15da26Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 37840a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 37853c15da26Smrg need_lib_prefix=no 37863c15da26Smrg need_version=no 37873c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37883c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 37893c15da26Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 37903c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 37913c15da26Smrg shlibpath_overrides_runpath=no 3792126a8a12Smrg 37933c15da26Smrg # Some binutils ld are patched to set DT_RUNPATH 37943c15da26Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 37953c15da26Smrg [lt_cv_shlibpath_overrides_runpath=no 37963c15da26Smrg save_LDFLAGS=$LDFLAGS 37973c15da26Smrg save_libdir=$libdir 37983c15da26Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 37993c15da26Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 38003c15da26Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 38013c15da26Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 38023c15da26Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 38033c15da26Smrg LDFLAGS=$save_LDFLAGS 38043c15da26Smrg libdir=$save_libdir 38053c15da26Smrg ]) 38063c15da26Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3807126a8a12Smrg 38083c15da26Smrg # This implies no fast_install, which is unacceptable. 38093c15da26Smrg # Some rework will be needed to allow for fast_install 38103c15da26Smrg # before this can be enabled. 38113c15da26Smrg hardcode_into_libs=yes 3812126a8a12Smrg 38133c15da26Smrg # Append ld.so.conf contents to the search path 38143c15da26Smrg if test -f /etc/ld.so.conf; then 38153c15da26Smrg 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' ' '` 38163c15da26Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3817555991fdSmrg fi 3818126a8a12Smrg 38193c15da26Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 38203c15da26Smrg # powerpc, because MkLinux only supported shared libraries with the 38213c15da26Smrg # GNU dynamic linker. Since this was broken with cross compilers, 38223c15da26Smrg # most powerpc-linux boxes support dynamic linking these days and 38233c15da26Smrg # people can always --disable-shared, the test was removed, and we 38243c15da26Smrg # assume the GNU/Linux dynamic linker is in use. 38253c15da26Smrg dynamic_linker='GNU/Linux ld.so' 38263c15da26Smrg ;; 3827126a8a12Smrg 38283c15da26Smrgnetbsd*) 38293c15da26Smrg version_type=sunos 38303c15da26Smrg need_lib_prefix=no 38313c15da26Smrg need_version=no 38323c15da26Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 38333c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38343c15da26Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38353c15da26Smrg dynamic_linker='NetBSD (a.out) ld.so' 3836555991fdSmrg else 38373c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 38383c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 38393c15da26Smrg dynamic_linker='NetBSD ld.elf_so' 3840555991fdSmrg fi 38413c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 38423c15da26Smrg shlibpath_overrides_runpath=yes 38433c15da26Smrg hardcode_into_libs=yes 38443c15da26Smrg ;; 3845126a8a12Smrg 38463c15da26Smrgnewsos6) 38470a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 38483c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38493c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 38503c15da26Smrg shlibpath_overrides_runpath=yes 38513c15da26Smrg ;; 3852126a8a12Smrg 38533c15da26Smrg*nto* | *qnx*) 38543c15da26Smrg version_type=qnx 38553c15da26Smrg need_lib_prefix=no 38563c15da26Smrg need_version=no 38573c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38583c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 38593c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 38603c15da26Smrg shlibpath_overrides_runpath=no 38613c15da26Smrg hardcode_into_libs=yes 38623c15da26Smrg dynamic_linker='ldqnx.so' 38633c15da26Smrg ;; 3864126a8a12Smrg 38653c15da26Smrgopenbsd*) 38663c15da26Smrg version_type=sunos 38673c15da26Smrg sys_lib_dlsearch_path_spec="/usr/lib" 38683c15da26Smrg need_lib_prefix=no 38693c15da26Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3870555991fdSmrg case $host_os in 38713c15da26Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 38723c15da26Smrg *) need_version=no ;; 3873555991fdSmrg esac 38743c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38753c15da26Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38763c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 38773c15da26Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 38783c15da26Smrg case $host_os in 38793c15da26Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 38803c15da26Smrg shlibpath_overrides_runpath=no 38813c15da26Smrg ;; 38823c15da26Smrg *) 38833c15da26Smrg shlibpath_overrides_runpath=yes 38843c15da26Smrg ;; 38853c15da26Smrg esac 38863c15da26Smrg else 38873c15da26Smrg shlibpath_overrides_runpath=yes 38883c15da26Smrg fi 38893c15da26Smrg ;; 3890555991fdSmrg 38913c15da26Smrgos2*) 38923c15da26Smrg libname_spec='$name' 38933c15da26Smrg shrext_cmds=".dll" 38943c15da26Smrg need_lib_prefix=no 38953c15da26Smrg library_names_spec='$libname${shared_ext} $libname.a' 38963c15da26Smrg dynamic_linker='OS/2 ld.exe' 38973c15da26Smrg shlibpath_var=LIBPATH 38983c15da26Smrg ;; 3899555991fdSmrg 39003c15da26Smrgosf3* | osf4* | osf5*) 39013c15da26Smrg version_type=osf 39023c15da26Smrg need_lib_prefix=no 39033c15da26Smrg need_version=no 39043c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 39053c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39063c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 39073c15da26Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 39083c15da26Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 39093c15da26Smrg ;; 3910555991fdSmrg 39113c15da26Smrgrdos*) 39123c15da26Smrg dynamic_linker=no 39133c15da26Smrg ;; 3914555991fdSmrg 39153c15da26Smrgsolaris*) 39160a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 39173c15da26Smrg need_lib_prefix=no 39183c15da26Smrg need_version=no 39193c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3920555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 39213c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 39223c15da26Smrg shlibpath_overrides_runpath=yes 39233c15da26Smrg hardcode_into_libs=yes 39243c15da26Smrg # ldd complains unless libraries are executable 39253c15da26Smrg postinstall_cmds='chmod +x $lib' 3926555991fdSmrg ;; 3927555991fdSmrg 39283c15da26Smrgsunos4*) 39293c15da26Smrg version_type=sunos 39303c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 39313c15da26Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 39323c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 39333c15da26Smrg shlibpath_overrides_runpath=yes 39343c15da26Smrg if test "$with_gnu_ld" = yes; then 39353c15da26Smrg need_lib_prefix=no 39363c15da26Smrg fi 39373c15da26Smrg need_version=yes 39383c15da26Smrg ;; 39393c15da26Smrg 39403c15da26Smrgsysv4 | sysv4.3*) 39410a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 39423c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39433c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 39443c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 39453c15da26Smrg case $host_vendor in 39463c15da26Smrg sni) 39473c15da26Smrg shlibpath_overrides_runpath=no 39483c15da26Smrg need_lib_prefix=no 39493c15da26Smrg runpath_var=LD_RUN_PATH 39503c15da26Smrg ;; 39513c15da26Smrg siemens) 39523c15da26Smrg need_lib_prefix=no 39533c15da26Smrg ;; 39543c15da26Smrg motorola) 39553c15da26Smrg need_lib_prefix=no 39563c15da26Smrg need_version=no 39573c15da26Smrg shlibpath_overrides_runpath=no 39583c15da26Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 39593c15da26Smrg ;; 39603c15da26Smrg esac 39613c15da26Smrg ;; 39623c15da26Smrg 39633c15da26Smrgsysv4*MP*) 39643c15da26Smrg if test -d /usr/nec ;then 39650a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 39663c15da26Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 39673c15da26Smrg soname_spec='$libname${shared_ext}.$major' 39683c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 39693c15da26Smrg fi 39703c15da26Smrg ;; 39713c15da26Smrg 39723c15da26Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 39733c15da26Smrg version_type=freebsd-elf 3974555991fdSmrg need_lib_prefix=no 3975555991fdSmrg need_version=no 39763c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 39773c15da26Smrg soname_spec='${libname}${release}${shared_ext}$major' 39783c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 39793c15da26Smrg shlibpath_overrides_runpath=yes 3980555991fdSmrg hardcode_into_libs=yes 39813c15da26Smrg if test "$with_gnu_ld" = yes; then 39823c15da26Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3983555991fdSmrg else 39843c15da26Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3985555991fdSmrg case $host_os in 39863c15da26Smrg sco3.2v5*) 39873c15da26Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 39883c15da26Smrg ;; 3989555991fdSmrg esac 3990555991fdSmrg fi 39913c15da26Smrg sys_lib_dlsearch_path_spec='/usr/lib' 3992555991fdSmrg ;; 3993555991fdSmrg 39943c15da26Smrgtpf*) 39953c15da26Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 39960a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 39973c15da26Smrg need_lib_prefix=no 39983c15da26Smrg need_version=no 39993c15da26Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 40003c15da26Smrg shlibpath_var=LD_LIBRARY_PATH 40013c15da26Smrg shlibpath_overrides_runpath=no 40023c15da26Smrg hardcode_into_libs=yes 4003555991fdSmrg ;; 4004555991fdSmrg 40053c15da26Smrguts4*) 40060a6b08f8Smrg version_type=linux # correct to gnu/linux during the next big refactor 4007555991fdSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4008555991fdSmrg soname_spec='${libname}${release}${shared_ext}$major' 4009555991fdSmrg shlibpath_var=LD_LIBRARY_PATH 4010555991fdSmrg ;; 4011555991fdSmrg 40123c15da26Smrg*) 40133c15da26Smrg dynamic_linker=no 40143c15da26Smrg ;; 40153c15da26Smrgesac 40163c15da26SmrgAC_MSG_RESULT([$dynamic_linker]) 40173c15da26Smrgtest "$dynamic_linker" = no && can_build_shared=no 4018555991fdSmrg 40193c15da26Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 40203c15da26Smrgif test "$GCC" = yes; then 40213c15da26Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 40223c15da26Smrgfi 4023555991fdSmrg 40243c15da26Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 40253c15da26Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 40263c15da26Smrgfi 40273c15da26Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 40283c15da26Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 40293c15da26Smrgfi 4030555991fdSmrg 40313c15da26Smrg_LT_DECL([], [variables_saved_for_relink], [1], 40323c15da26Smrg [Variables whose values should be saved in libtool wrapper scripts and 40333c15da26Smrg restored at link time]) 40343c15da26Smrg_LT_DECL([], [need_lib_prefix], [0], 40353c15da26Smrg [Do we need the "lib" prefix for modules?]) 40363c15da26Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 40373c15da26Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 40383c15da26Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 40393c15da26Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 40403c15da26Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 40413c15da26Smrg [Is shlibpath searched before the hard-coded library search path?]) 40423c15da26Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 40433c15da26Smrg_LT_DECL([], [library_names_spec], [1], 40443c15da26Smrg [[List of archive names. First name is the real one, the rest are links. 40453c15da26Smrg The last name is the one that the linker finds with -lNAME]]) 40463c15da26Smrg_LT_DECL([], [soname_spec], [1], 40473c15da26Smrg [[The coded name of the library, if different from the real name]]) 40483c15da26Smrg_LT_DECL([], [install_override_mode], [1], 40493c15da26Smrg [Permission mode override for installation of shared libraries]) 40503c15da26Smrg_LT_DECL([], [postinstall_cmds], [2], 40513c15da26Smrg [Command to use after installation of a shared archive]) 40523c15da26Smrg_LT_DECL([], [postuninstall_cmds], [2], 40533c15da26Smrg [Command to use after uninstallation of a shared archive]) 40543c15da26Smrg_LT_DECL([], [finish_cmds], [2], 40553c15da26Smrg [Commands used to finish a libtool library installation in a directory]) 40563c15da26Smrg_LT_DECL([], [finish_eval], [1], 40573c15da26Smrg [[As "finish_cmds", except a single script fragment to be evaled but 40583c15da26Smrg not shown]]) 40593c15da26Smrg_LT_DECL([], [hardcode_into_libs], [0], 40603c15da26Smrg [Whether we should hardcode library paths into libraries]) 40613c15da26Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 40623c15da26Smrg [Compile-time system search path for libraries]) 40633c15da26Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 40643c15da26Smrg [Run-time system search path for libraries]) 40653c15da26Smrg])# _LT_SYS_DYNAMIC_LINKER 4066555991fdSmrg 4067555991fdSmrg 40683c15da26Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 40693c15da26Smrg# -------------------------- 40703c15da26Smrg# find a file program which can recognize shared library 40713c15da26SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 40723c15da26Smrg[m4_require([_LT_DECL_EGREP])dnl 40733c15da26SmrgAC_MSG_CHECKING([for $1]) 40743c15da26SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 40753c15da26Smrg[case $MAGIC_CMD in 40763c15da26Smrg[[\\/*] | ?:[\\/]*]) 40773c15da26Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4078555991fdSmrg ;; 40793c15da26Smrg*) 40803c15da26Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 40813c15da26Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40823c15da26Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 40833c15da26Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 40843c15da26Smrgdnl not every word. This closes a longstanding sh security hole. 40853c15da26Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 40863c15da26Smrg for ac_dir in $ac_dummy; do 40873c15da26Smrg IFS="$lt_save_ifs" 40883c15da26Smrg test -z "$ac_dir" && ac_dir=. 40893c15da26Smrg if test -f $ac_dir/$1; then 40903c15da26Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 40913c15da26Smrg if test -n "$file_magic_test_file"; then 40923c15da26Smrg case $deplibs_check_method in 40933c15da26Smrg "file_magic "*) 40943c15da26Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 40953c15da26Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40963c15da26Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 40973c15da26Smrg $EGREP "$file_magic_regex" > /dev/null; then 40983c15da26Smrg : 40993c15da26Smrg else 41003c15da26Smrg cat <<_LT_EOF 1>&2 4101555991fdSmrg 41023c15da26Smrg*** Warning: the command libtool uses to detect shared libraries, 41033c15da26Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 41043c15da26Smrg*** The result is that libtool may fail to recognize shared libraries 41053c15da26Smrg*** as such. This will affect the creation of libtool libraries that 41063c15da26Smrg*** depend on shared libraries, but programs linked with such libtool 41073c15da26Smrg*** libraries will work regardless of this problem. Nevertheless, you 41083c15da26Smrg*** may want to report the problem to your system manager and/or to 41093c15da26Smrg*** bug-libtool@gnu.org 41103c15da26Smrg 41113c15da26Smrg_LT_EOF 41123c15da26Smrg fi ;; 41133c15da26Smrg esac 41143c15da26Smrg fi 41153c15da26Smrg break 41163c15da26Smrg fi 41173c15da26Smrg done 41183c15da26Smrg IFS="$lt_save_ifs" 41193c15da26Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 4120555991fdSmrg ;; 41213c15da26Smrgesac]) 41223c15da26SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 41233c15da26Smrgif test -n "$MAGIC_CMD"; then 41243c15da26Smrg AC_MSG_RESULT($MAGIC_CMD) 41253c15da26Smrgelse 41263c15da26Smrg AC_MSG_RESULT(no) 41273c15da26Smrgfi 41283c15da26Smrg_LT_DECL([], [MAGIC_CMD], [0], 41293c15da26Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 41303c15da26Smrg])# _LT_PATH_TOOL_PREFIX 4131555991fdSmrg 41323c15da26Smrg# Old name: 41333c15da26SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 41343c15da26Smrgdnl aclocal-1.4 backwards compatibility: 41353c15da26Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 41363c15da26Smrg 41373c15da26Smrg 41383c15da26Smrg# _LT_PATH_MAGIC 41393c15da26Smrg# -------------- 41403c15da26Smrg# find a file program which can recognize a shared library 41413c15da26Smrgm4_defun([_LT_PATH_MAGIC], 41423c15da26Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 41433c15da26Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 41443c15da26Smrg if test -n "$ac_tool_prefix"; then 41453c15da26Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4146555991fdSmrg else 41473c15da26Smrg MAGIC_CMD=: 4148555991fdSmrg fi 41493c15da26Smrgfi 41503c15da26Smrg])# _LT_PATH_MAGIC 4151555991fdSmrg 4152555991fdSmrg 41533c15da26Smrg# LT_PATH_LD 41543c15da26Smrg# ---------- 41553c15da26Smrg# find the pathname to the GNU or non-GNU linker 41563c15da26SmrgAC_DEFUN([LT_PATH_LD], 41573c15da26Smrg[AC_REQUIRE([AC_PROG_CC])dnl 41583c15da26SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 41593c15da26SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 41603c15da26Smrgm4_require([_LT_DECL_SED])dnl 41613c15da26Smrgm4_require([_LT_DECL_EGREP])dnl 41623c15da26Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4163555991fdSmrg 41643c15da26SmrgAC_ARG_WITH([gnu-ld], 41653c15da26Smrg [AS_HELP_STRING([--with-gnu-ld], 41663c15da26Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 41673c15da26Smrg [test "$withval" = no || with_gnu_ld=yes], 41683c15da26Smrg [with_gnu_ld=no])dnl 4169555991fdSmrg 41703c15da26Smrgac_prog=ld 41713c15da26Smrgif test "$GCC" = yes; then 41723c15da26Smrg # Check if gcc -print-prog-name=ld gives a path. 41733c15da26Smrg AC_MSG_CHECKING([for ld used by $CC]) 41743c15da26Smrg case $host in 41753c15da26Smrg *-*-mingw*) 41763c15da26Smrg # gcc leaves a trailing carriage return which upsets mingw 41773c15da26Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 41783c15da26Smrg *) 41793c15da26Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4180555991fdSmrg esac 41813c15da26Smrg case $ac_prog in 41823c15da26Smrg # Accept absolute paths. 41833c15da26Smrg [[\\/]]* | ?:[[\\/]]*) 41843c15da26Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 41853c15da26Smrg # Canonicalize the pathname of ld 41863c15da26Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 41873c15da26Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 41883c15da26Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 41893c15da26Smrg done 41903c15da26Smrg test -z "$LD" && LD="$ac_prog" 41913c15da26Smrg ;; 41923c15da26Smrg "") 41933c15da26Smrg # If it fails, then pretend we aren't using GCC. 41943c15da26Smrg ac_prog=ld 4195555991fdSmrg ;; 4196555991fdSmrg *) 41973c15da26Smrg # If it is relative, then search for the first ld in PATH. 41983c15da26Smrg with_gnu_ld=unknown 4199555991fdSmrg ;; 4200555991fdSmrg esac 42013c15da26Smrgelif test "$with_gnu_ld" = yes; then 42023c15da26Smrg AC_MSG_CHECKING([for GNU ld]) 42033c15da26Smrgelse 42043c15da26Smrg AC_MSG_CHECKING([for non-GNU ld]) 42053c15da26Smrgfi 42063c15da26SmrgAC_CACHE_VAL(lt_cv_path_LD, 42073c15da26Smrg[if test -z "$LD"; then 42083c15da26Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 42093c15da26Smrg for ac_dir in $PATH; do 42103c15da26Smrg IFS="$lt_save_ifs" 42113c15da26Smrg test -z "$ac_dir" && ac_dir=. 42123c15da26Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 42133c15da26Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 42143c15da26Smrg # Check to see if the program is GNU ld. I'd rather use --version, 42153c15da26Smrg # but apparently some variants of GNU ld only accept -v. 42163c15da26Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 42173c15da26Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 42183c15da26Smrg *GNU* | *'with BFD'*) 42193c15da26Smrg test "$with_gnu_ld" != no && break 42203c15da26Smrg ;; 42213c15da26Smrg *) 42223c15da26Smrg test "$with_gnu_ld" != yes && break 42233c15da26Smrg ;; 42243c15da26Smrg esac 42253c15da26Smrg fi 42263c15da26Smrg done 42273c15da26Smrg IFS="$lt_save_ifs" 42283c15da26Smrgelse 42293c15da26Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 42303c15da26Smrgfi]) 42313c15da26SmrgLD="$lt_cv_path_LD" 42323c15da26Smrgif test -n "$LD"; then 42333c15da26Smrg AC_MSG_RESULT($LD) 42343c15da26Smrgelse 42353c15da26Smrg AC_MSG_RESULT(no) 42363c15da26Smrgfi 42373c15da26Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 42383c15da26Smrg_LT_PATH_LD_GNU 42393c15da26SmrgAC_SUBST([LD]) 4240126a8a12Smrg 42413c15da26Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 42423c15da26Smrg])# LT_PATH_LD 4243126a8a12Smrg 42443c15da26Smrg# Old names: 42453c15da26SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 42463c15da26SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 42473c15da26Smrgdnl aclocal-1.4 backwards compatibility: 42483c15da26Smrgdnl AC_DEFUN([AM_PROG_LD], []) 42493c15da26Smrgdnl AC_DEFUN([AC_PROG_LD], []) 4250126a8a12Smrg 4251126a8a12Smrg 42523c15da26Smrg# _LT_PATH_LD_GNU 42533c15da26Smrg#- -------------- 42543c15da26Smrgm4_defun([_LT_PATH_LD_GNU], 42553c15da26Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 42563c15da26Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 42573c15da26Smrgcase `$LD -v 2>&1 </dev/null` in 42583c15da26Smrg*GNU* | *'with BFD'*) 42593c15da26Smrg lt_cv_prog_gnu_ld=yes 4260555991fdSmrg ;; 42613c15da26Smrg*) 42623c15da26Smrg lt_cv_prog_gnu_ld=no 4263555991fdSmrg ;; 42643c15da26Smrgesac]) 42653c15da26Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 42663c15da26Smrg])# _LT_PATH_LD_GNU 4267126a8a12Smrg 4268126a8a12Smrg 42693c15da26Smrg# _LT_CMD_RELOAD 42703c15da26Smrg# -------------- 42713c15da26Smrg# find reload flag for linker 42723c15da26Smrg# -- PORTME Some linkers may need a different reload flag. 42733c15da26Smrgm4_defun([_LT_CMD_RELOAD], 42743c15da26Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 42753c15da26Smrg lt_cv_ld_reload_flag, 42763c15da26Smrg [lt_cv_ld_reload_flag='-r']) 42773c15da26Smrgreload_flag=$lt_cv_ld_reload_flag 42783c15da26Smrgcase $reload_flag in 42793c15da26Smrg"" | " "*) ;; 42803c15da26Smrg*) reload_flag=" $reload_flag" ;; 42813c15da26Smrgesac 42823c15da26Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 42833c15da26Smrgcase $host_os in 42843c15da26Smrg cygwin* | mingw* | pw32* | cegcc*) 42853c15da26Smrg if test "$GCC" != yes; then 42863c15da26Smrg reload_cmds=false 42873c15da26Smrg fi 42883c15da26Smrg ;; 42893c15da26Smrg darwin*) 42903c15da26Smrg if test "$GCC" = yes; then 42913c15da26Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 42923c15da26Smrg else 42933c15da26Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 42943c15da26Smrg fi 42953c15da26Smrg ;; 42963c15da26Smrgesac 42973c15da26Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 42983c15da26Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 42993c15da26Smrg])# _LT_CMD_RELOAD 4300126a8a12Smrg 4301126a8a12Smrg 43023c15da26Smrg# _LT_CHECK_MAGIC_METHOD 43033c15da26Smrg# ---------------------- 43043c15da26Smrg# how to check for library dependencies 43053c15da26Smrg# -- PORTME fill in with the dynamic library characteristics 43063c15da26Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 43073c15da26Smrg[m4_require([_LT_DECL_EGREP]) 43083c15da26Smrgm4_require([_LT_DECL_OBJDUMP]) 43093c15da26SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 43103c15da26Smrglt_cv_deplibs_check_method, 43113c15da26Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 43123c15da26Smrglt_cv_file_magic_test_file= 43133c15da26Smrglt_cv_deplibs_check_method='unknown' 43143c15da26Smrg# Need to set the preceding variable on all platforms that support 43153c15da26Smrg# interlibrary dependencies. 43163c15da26Smrg# 'none' -- dependencies not supported. 43173c15da26Smrg# `unknown' -- same as none, but documents that we really don't know. 43183c15da26Smrg# 'pass_all' -- all dependencies passed with no checks. 43193c15da26Smrg# 'test_compile' -- check by making test program. 43203c15da26Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 43213c15da26Smrg# which responds to the $file_magic_cmd with a given extended regex. 43223c15da26Smrg# If you have `file' or equivalent on your system and you're not sure 43233c15da26Smrg# whether `pass_all' will *always* work, you probably want this one. 43243c15da26Smrg 43253c15da26Smrgcase $host_os in 43263c15da26Smrgaix[[4-9]]*) 43273c15da26Smrg lt_cv_deplibs_check_method=pass_all 4328555991fdSmrg ;; 4329126a8a12Smrg 43303c15da26Smrgbeos*) 43313c15da26Smrg lt_cv_deplibs_check_method=pass_all 4332555991fdSmrg ;; 4333555991fdSmrg 43343c15da26Smrgbsdi[[45]]*) 43353c15da26Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 43363c15da26Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 43373c15da26Smrg lt_cv_file_magic_test_file=/shlib/libc.so 4338555991fdSmrg ;; 4339555991fdSmrg 43403c15da26Smrgcygwin*) 43413c15da26Smrg # func_win32_libid is a shell function defined in ltmain.sh 43423c15da26Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43433c15da26Smrg lt_cv_file_magic_cmd='func_win32_libid' 4344555991fdSmrg ;; 4345555991fdSmrg 43463c15da26Smrgmingw* | pw32*) 43473c15da26Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 43483c15da26Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 43493c15da26Smrg # unless we find 'file', for example because we are cross-compiling. 43503c15da26Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 43513c15da26Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 43523c15da26Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43533c15da26Smrg lt_cv_file_magic_cmd='func_win32_libid' 43543c15da26Smrg else 43553c15da26Smrg # Keep this pattern in sync with the one in func_win32_libid. 43563c15da26Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 43573c15da26Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 4358555991fdSmrg fi 4359555991fdSmrg ;; 4360555991fdSmrg 43613c15da26Smrgcegcc*) 43623c15da26Smrg # use the weaker test based on 'objdump'. See mingw*. 43633c15da26Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 43643c15da26Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 4365555991fdSmrg ;; 4366126a8a12Smrg 43673c15da26Smrgdarwin* | rhapsody*) 43683c15da26Smrg lt_cv_deplibs_check_method=pass_all 4369555991fdSmrg ;; 4370126a8a12Smrg 43713c15da26Smrgfreebsd* | dragonfly*) 43723c15da26Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 43733c15da26Smrg case $host_cpu in 43743c15da26Smrg i*86 ) 43753c15da26Smrg # Not sure whether the presence of OpenBSD here was a mistake. 43763c15da26Smrg # Let's accept both of them until this is cleared up. 43773c15da26Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 43783c15da26Smrg lt_cv_file_magic_cmd=/usr/bin/file 43793c15da26Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 43803c15da26Smrg ;; 4381555991fdSmrg esac 43823c15da26Smrg else 43833c15da26Smrg lt_cv_deplibs_check_method=pass_all 4384555991fdSmrg fi 4385555991fdSmrg ;; 4386126a8a12Smrg 43873c15da26Smrggnu*) 43883c15da26Smrg lt_cv_deplibs_check_method=pass_all 4389555991fdSmrg ;; 4390126a8a12Smrg 43913c15da26Smrghaiku*) 43923c15da26Smrg lt_cv_deplibs_check_method=pass_all 4393555991fdSmrg ;; 4394126a8a12Smrg 43953c15da26Smrghpux10.20* | hpux11*) 43963c15da26Smrg lt_cv_file_magic_cmd=/usr/bin/file 43973c15da26Smrg case $host_cpu in 43983c15da26Smrg ia64*) 43993c15da26Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 44003c15da26Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 44013c15da26Smrg ;; 44023c15da26Smrg hppa*64*) 44033c15da26Smrg [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]'] 44043c15da26Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 44053c15da26Smrg ;; 44063c15da26Smrg *) 44073c15da26Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 44083c15da26Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 44093c15da26Smrg ;; 44103c15da26Smrg esac 4411555991fdSmrg ;; 4412126a8a12Smrg 44133c15da26Smrginterix[[3-9]]*) 44143c15da26Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 44153c15da26Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 44163c15da26Smrg ;; 4417126a8a12Smrg 44183c15da26Smrgirix5* | irix6* | nonstopux*) 44193c15da26Smrg case $LD in 44203c15da26Smrg *-32|*"-32 ") libmagic=32-bit;; 44213c15da26Smrg *-n32|*"-n32 ") libmagic=N32;; 44223c15da26Smrg *-64|*"-64 ") libmagic=64-bit;; 44233c15da26Smrg *) libmagic=never-match;; 44243c15da26Smrg esac 44253c15da26Smrg lt_cv_deplibs_check_method=pass_all 4426555991fdSmrg ;; 4427126a8a12Smrg 44280a6b08f8Smrg# This must be glibc/ELF. 44293c15da26Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 44303c15da26Smrg lt_cv_deplibs_check_method=pass_all 44313c15da26Smrg ;; 4432555991fdSmrg 44333c15da26Smrgnetbsd*) 44343c15da26Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 44353c15da26Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44363c15da26Smrg else 44373c15da26Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 44383c15da26Smrg fi 4439555991fdSmrg ;; 4440126a8a12Smrg 44413c15da26Smrgnewos6*) 44423c15da26Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 44433c15da26Smrg lt_cv_file_magic_cmd=/usr/bin/file 44443c15da26Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 44453c15da26Smrg ;; 4446126a8a12Smrg 44473c15da26Smrg*nto* | *qnx*) 44483c15da26Smrg lt_cv_deplibs_check_method=pass_all 44493c15da26Smrg ;; 4450126a8a12Smrg 44513c15da26Smrgopenbsd*) 44523c15da26Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 44533c15da26Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4454555991fdSmrg else 44553c15da26Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4456d656433aSmrg fi 44573c15da26Smrg ;; 4458126a8a12Smrg 44593c15da26Smrgosf3* | osf4* | osf5*) 44603c15da26Smrg lt_cv_deplibs_check_method=pass_all 44613c15da26Smrg ;; 4462126a8a12Smrg 44633c15da26Smrgrdos*) 44643c15da26Smrg lt_cv_deplibs_check_method=pass_all 44653c15da26Smrg ;; 4466126a8a12Smrg 44673c15da26Smrgsolaris*) 44683c15da26Smrg lt_cv_deplibs_check_method=pass_all 44693c15da26Smrg ;; 4470126a8a12Smrg 44713c15da26Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 44723c15da26Smrg lt_cv_deplibs_check_method=pass_all 44733c15da26Smrg ;; 44743c15da26Smrg 44753c15da26Smrgsysv4 | sysv4.3*) 44763c15da26Smrg case $host_vendor in 44773c15da26Smrg motorola) 44783c15da26Smrg 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]]' 44793c15da26Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4480555991fdSmrg ;; 44813c15da26Smrg ncr) 44823c15da26Smrg lt_cv_deplibs_check_method=pass_all 44833c15da26Smrg ;; 44843c15da26Smrg sequent) 44853c15da26Smrg lt_cv_file_magic_cmd='/bin/file' 44863c15da26Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 44873c15da26Smrg ;; 44883c15da26Smrg sni) 44893c15da26Smrg lt_cv_file_magic_cmd='/bin/file' 44903c15da26Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 44913c15da26Smrg lt_cv_file_magic_test_file=/lib/libc.so 44923c15da26Smrg ;; 44933c15da26Smrg siemens) 44943c15da26Smrg lt_cv_deplibs_check_method=pass_all 44953c15da26Smrg ;; 44963c15da26Smrg pc) 44973c15da26Smrg lt_cv_deplibs_check_method=pass_all 44983c15da26Smrg ;; 44993c15da26Smrg esac 45003c15da26Smrg ;; 45013c15da26Smrg 45023c15da26Smrgtpf*) 45033c15da26Smrg lt_cv_deplibs_check_method=pass_all 45043c15da26Smrg ;; 45053c15da26Smrgesac 45063c15da26Smrg]) 45073c15da26Smrg 45083c15da26Smrgfile_magic_glob= 45093c15da26Smrgwant_nocaseglob=no 45103c15da26Smrgif test "$build" = "$host"; then 45113c15da26Smrg case $host_os in 45123c15da26Smrg mingw* | pw32*) 45133c15da26Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 45143c15da26Smrg want_nocaseglob=yes 45153c15da26Smrg else 45163c15da26Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 45173c15da26Smrg fi 4518555991fdSmrg ;; 4519555991fdSmrg esac 4520555991fdSmrgfi 45213c15da26Smrg 45223c15da26Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 45233c15da26Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 45243c15da26Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 45253c15da26Smrg 45263c15da26Smrg_LT_DECL([], [deplibs_check_method], [1], 45273c15da26Smrg [Method to check whether dependent libraries are shared objects]) 45283c15da26Smrg_LT_DECL([], [file_magic_cmd], [1], 45293c15da26Smrg [Command to use when deplibs_check_method = "file_magic"]) 45303c15da26Smrg_LT_DECL([], [file_magic_glob], [1], 45313c15da26Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 45323c15da26Smrg_LT_DECL([], [want_nocaseglob], [1], 45333c15da26Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 45343c15da26Smrg])# _LT_CHECK_MAGIC_METHOD 45353c15da26Smrg 45363c15da26Smrg 45373c15da26Smrg# LT_PATH_NM 45383c15da26Smrg# ---------- 45393c15da26Smrg# find the pathname to a BSD- or MS-compatible name lister 45403c15da26SmrgAC_DEFUN([LT_PATH_NM], 45413c15da26Smrg[AC_REQUIRE([AC_PROG_CC])dnl 45423c15da26SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 45433c15da26Smrg[if test -n "$NM"; then 45443c15da26Smrg # Let the user override the test. 45453c15da26Smrg lt_cv_path_NM="$NM" 4546555991fdSmrgelse 45473c15da26Smrg lt_nm_to_check="${ac_tool_prefix}nm" 45483c15da26Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 45493c15da26Smrg lt_nm_to_check="$lt_nm_to_check nm" 45503c15da26Smrg fi 45513c15da26Smrg for lt_tmp_nm in $lt_nm_to_check; do 45523c15da26Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 45533c15da26Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 45543c15da26Smrg IFS="$lt_save_ifs" 45553c15da26Smrg test -z "$ac_dir" && ac_dir=. 45563c15da26Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 45573c15da26Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 45583c15da26Smrg # Check to see if the nm accepts a BSD-compat flag. 45593c15da26Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 45603c15da26Smrg # nm: unknown option "B" ignored 45613c15da26Smrg # Tru64's nm complains that /dev/null is an invalid object file 45623c15da26Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 45633c15da26Smrg */dev/null* | *'Invalid file or object type'*) 45643c15da26Smrg lt_cv_path_NM="$tmp_nm -B" 45653c15da26Smrg break 45663c15da26Smrg ;; 45673c15da26Smrg *) 45683c15da26Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 45693c15da26Smrg */dev/null*) 45703c15da26Smrg lt_cv_path_NM="$tmp_nm -p" 45713c15da26Smrg break 45723c15da26Smrg ;; 45733c15da26Smrg *) 45743c15da26Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 45753c15da26Smrg continue # so that we can try to find one that supports BSD flags 45763c15da26Smrg ;; 45773c15da26Smrg esac 45783c15da26Smrg ;; 45793c15da26Smrg esac 45803c15da26Smrg fi 45813c15da26Smrg done 45823c15da26Smrg IFS="$lt_save_ifs" 45833c15da26Smrg done 45843c15da26Smrg : ${lt_cv_path_NM=no} 4585555991fdSmrgfi]) 45863c15da26Smrgif test "$lt_cv_path_NM" != "no"; then 45873c15da26Smrg NM="$lt_cv_path_NM" 4588555991fdSmrgelse 45893c15da26Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 45903c15da26Smrg if test -n "$DUMPBIN"; then : 45913c15da26Smrg # Let the user override the test. 45923c15da26Smrg else 45933c15da26Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 45943c15da26Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 45953c15da26Smrg *COFF*) 45963c15da26Smrg DUMPBIN="$DUMPBIN -symbols" 45973c15da26Smrg ;; 45983c15da26Smrg *) 45993c15da26Smrg DUMPBIN=: 46003c15da26Smrg ;; 46013c15da26Smrg esac 46023c15da26Smrg fi 46033c15da26Smrg AC_SUBST([DUMPBIN]) 46043c15da26Smrg if test "$DUMPBIN" != ":"; then 46053c15da26Smrg NM="$DUMPBIN" 46063c15da26Smrg fi 4607555991fdSmrgfi 46083c15da26Smrgtest -z "$NM" && NM=nm 46093c15da26SmrgAC_SUBST([NM]) 46103c15da26Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4611d656433aSmrg 46123c15da26SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 46133c15da26Smrg [lt_cv_nm_interface="BSD nm" 46143c15da26Smrg echo "int some_variable = 0;" > conftest.$ac_ext 46153c15da26Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 46163c15da26Smrg (eval "$ac_compile" 2>conftest.err) 46173c15da26Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46183c15da26Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 46193c15da26Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 46203c15da26Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46213c15da26Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 46223c15da26Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 46233c15da26Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 46243c15da26Smrg lt_cv_nm_interface="MS dumpbin" 46253c15da26Smrg fi 46263c15da26Smrg rm -f conftest*]) 46273c15da26Smrg])# LT_PATH_NM 4628d656433aSmrg 4629555991fdSmrg# Old names: 46303c15da26SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 46313c15da26SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4632555991fdSmrgdnl aclocal-1.4 backwards compatibility: 46333c15da26Smrgdnl AC_DEFUN([AM_PROG_NM], []) 46343c15da26Smrgdnl AC_DEFUN([AC_PROG_NM], []) 4635126a8a12Smrg 46363c15da26Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 46373c15da26Smrg# -------------------------------- 46383c15da26Smrg# how to determine the name of the shared library 46393c15da26Smrg# associated with a specific link library. 46403c15da26Smrg# -- PORTME fill in with the dynamic library characteristics 46413c15da26Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 46423c15da26Smrg[m4_require([_LT_DECL_EGREP]) 46433c15da26Smrgm4_require([_LT_DECL_OBJDUMP]) 46443c15da26Smrgm4_require([_LT_DECL_DLLTOOL]) 46453c15da26SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 46463c15da26Smrglt_cv_sharedlib_from_linklib_cmd, 46473c15da26Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4648126a8a12Smrg 46493c15da26Smrgcase $host_os in 46503c15da26Smrgcygwin* | mingw* | pw32* | cegcc*) 46513c15da26Smrg # two different shell functions defined in ltmain.sh 46523c15da26Smrg # decide which to use based on capabilities of $DLLTOOL 46533c15da26Smrg case `$DLLTOOL --help 2>&1` in 46543c15da26Smrg *--identify-strict*) 46553c15da26Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 46563c15da26Smrg ;; 46573c15da26Smrg *) 46583c15da26Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 46593c15da26Smrg ;; 46603c15da26Smrg esac 4661555991fdSmrg ;; 4662555991fdSmrg*) 46633c15da26Smrg # fallback: assume linklib IS sharedlib 46643c15da26Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4665555991fdSmrg ;; 4666555991fdSmrgesac 46673c15da26Smrg]) 46683c15da26Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 46693c15da26Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4670126a8a12Smrg 46713c15da26Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 46723c15da26Smrg [Command to associate shared and link libraries]) 46733c15da26Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4674126a8a12Smrg 46753c15da26Smrg 46763c15da26Smrg# _LT_PATH_MANIFEST_TOOL 4677555991fdSmrg# ---------------------- 46783c15da26Smrg# locate the manifest tool 46793c15da26Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 46803c15da26Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 46813c15da26Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 46823c15da26SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 46833c15da26Smrg [lt_cv_path_mainfest_tool=no 46843c15da26Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 46853c15da26Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 46863c15da26Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46873c15da26Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 46883c15da26Smrg lt_cv_path_mainfest_tool=yes 46893c15da26Smrg fi 46903c15da26Smrg rm -f conftest*]) 46913c15da26Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 46923c15da26Smrg MANIFEST_TOOL=: 46933c15da26Smrgfi 46943c15da26Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 46953c15da26Smrg])# _LT_PATH_MANIFEST_TOOL 4696126a8a12Smrg 4697d656433aSmrg 46983c15da26Smrg# LT_LIB_M 46993c15da26Smrg# -------- 47003c15da26Smrg# check for math library 47013c15da26SmrgAC_DEFUN([LT_LIB_M], 47023c15da26Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47033c15da26SmrgLIBM= 47043c15da26Smrgcase $host in 47053c15da26Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 47063c15da26Smrg # These system don't have libm, or don't need it 4707555991fdSmrg ;; 47083c15da26Smrg*-ncr-sysv4.3*) 47093c15da26Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 47103c15da26Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4711555991fdSmrg ;; 47123c15da26Smrg*) 47133c15da26Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 4714555991fdSmrg ;; 47153c15da26Smrgesac 47163c15da26SmrgAC_SUBST([LIBM]) 47173c15da26Smrg])# LT_LIB_M 4718126a8a12Smrg 47193c15da26Smrg# Old name: 47203c15da26SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 47213c15da26Smrgdnl aclocal-1.4 backwards compatibility: 47223c15da26Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4723555991fdSmrg 4724555991fdSmrg 47253c15da26Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 47263c15da26Smrg# ------------------------------- 47273c15da26Smrgm4_defun([_LT_COMPILER_NO_RTTI], 47283c15da26Smrg[m4_require([_LT_TAG_COMPILER])dnl 4729555991fdSmrg 47303c15da26Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4731555991fdSmrg 47323c15da26Smrgif test "$GCC" = yes; then 47333c15da26Smrg case $cc_basename in 47343c15da26Smrg nvcc*) 47353c15da26Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4736555991fdSmrg *) 47373c15da26Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4738d656433aSmrg esac 4739d656433aSmrg 47403c15da26Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47413c15da26Smrg lt_cv_prog_compiler_rtti_exceptions, 47423c15da26Smrg [-fno-rtti -fno-exceptions], [], 47433c15da26Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 47443c15da26Smrgfi 47453c15da26Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 47463c15da26Smrg [Compiler flag to turn off builtin functions]) 47473c15da26Smrg])# _LT_COMPILER_NO_RTTI 4748d656433aSmrg 4749126a8a12Smrg 47503c15da26Smrg# _LT_CMD_GLOBAL_SYMBOLS 47513c15da26Smrg# ---------------------- 47523c15da26Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 47533c15da26Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47543c15da26SmrgAC_REQUIRE([AC_PROG_CC])dnl 47553c15da26SmrgAC_REQUIRE([AC_PROG_AWK])dnl 47563c15da26SmrgAC_REQUIRE([LT_PATH_NM])dnl 47573c15da26SmrgAC_REQUIRE([LT_PATH_LD])dnl 47583c15da26Smrgm4_require([_LT_DECL_SED])dnl 47593c15da26Smrgm4_require([_LT_DECL_EGREP])dnl 47603c15da26Smrgm4_require([_LT_TAG_COMPILER])dnl 4761126a8a12Smrg 47623c15da26Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 47633c15da26SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 47643c15da26SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 47653c15da26Smrg[ 47663c15da26Smrg# These are sane defaults that work on at least a few old systems. 47673c15da26Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4768555991fdSmrg 47693c15da26Smrg# Character class describing NM global symbol codes. 47703c15da26Smrgsymcode='[[BCDEGRST]]' 4771126a8a12Smrg 47723c15da26Smrg# Regexp to match symbols that can be accessed directly from C. 47733c15da26Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4774126a8a12Smrg 47753c15da26Smrg# Define system-specific variables. 47763c15da26Smrgcase $host_os in 47773c15da26Smrgaix*) 47783c15da26Smrg symcode='[[BCDT]]' 47793c15da26Smrg ;; 47803c15da26Smrgcygwin* | mingw* | pw32* | cegcc*) 47813c15da26Smrg symcode='[[ABCDGISTW]]' 47823c15da26Smrg ;; 47833c15da26Smrghpux*) 47843c15da26Smrg if test "$host_cpu" = ia64; then 47853c15da26Smrg symcode='[[ABCDEGRST]]' 4786555991fdSmrg fi 4787555991fdSmrg ;; 47883c15da26Smrgirix* | nonstopux*) 47893c15da26Smrg symcode='[[BCDEGRST]]' 4790555991fdSmrg ;; 47913c15da26Smrgosf*) 47923c15da26Smrg symcode='[[BCDEGQRST]]' 4793555991fdSmrg ;; 4794555991fdSmrgsolaris*) 47953c15da26Smrg symcode='[[BDRT]]' 4796555991fdSmrg ;; 47973c15da26Smrgsco3.2v5*) 47983c15da26Smrg symcode='[[DT]]' 4799555991fdSmrg ;; 48003c15da26Smrgsysv4.2uw2*) 48013c15da26Smrg symcode='[[DT]]' 48023c15da26Smrg ;; 48033c15da26Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 48043c15da26Smrg symcode='[[ABDT]]' 48053c15da26Smrg ;; 48063c15da26Smrgsysv4) 48073c15da26Smrg symcode='[[DFNSTU]]' 4808555991fdSmrg ;; 48093c15da26Smrgesac 4810d656433aSmrg 48113c15da26Smrg# If we're using GNU nm, then use its standard symbol codes. 48123c15da26Smrgcase `$NM -V 2>&1` in 48133c15da26Smrg*GNU* | *'with BFD'*) 48143c15da26Smrg symcode='[[ABCDGIRSTW]]' ;; 48153c15da26Smrgesac 48163c15da26Smrg 48173c15da26Smrg# Transform an extracted symbol line into a proper C declaration. 48183c15da26Smrg# Some systems (esp. on ia64) link data and code symbols differently, 48193c15da26Smrg# so use this general approach. 48203c15da26Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48213c15da26Smrg 48223c15da26Smrg# Transform an extracted symbol line into symbol name and symbol address 48233c15da26Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 48243c15da26Smrglt_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'" 48253c15da26Smrg 48263c15da26Smrg# Handle CRLF in mingw tool chain 48273c15da26Smrgopt_cr= 48283c15da26Smrgcase $build_os in 48293c15da26Smrgmingw*) 48303c15da26Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4831555991fdSmrg ;; 4832555991fdSmrgesac 4833d656433aSmrg 48343c15da26Smrg# Try without a prefix underscore, then with it. 48353c15da26Smrgfor ac_symprfx in "" "_"; do 4836d656433aSmrg 48373c15da26Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48383c15da26Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4839d656433aSmrg 48403c15da26Smrg # Write the raw and C identifiers. 48413c15da26Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 48423c15da26Smrg # Fake it for dumpbin and say T for any non-static function 48433c15da26Smrg # and D for any global variable. 48443c15da26Smrg # Also find C++ and __fastcall symbols from MSVC++, 48453c15da26Smrg # which start with @ or ?. 48463c15da26Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 48473c15da26Smrg" {last_section=section; section=\$ 3};"\ 48480a6b08f8Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 48493c15da26Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 48503c15da26Smrg" \$ 0!~/External *\|/{next};"\ 48513c15da26Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 48523c15da26Smrg" {if(hide[section]) next};"\ 48533c15da26Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 48543c15da26Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 48553c15da26Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 48563c15da26Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 48573c15da26Smrg" ' prfx=^$ac_symprfx]" 48583c15da26Smrg else 48593c15da26Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4860555991fdSmrg fi 48613c15da26Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4862d656433aSmrg 4863555991fdSmrg # Check to see that the pipe works correctly. 4864555991fdSmrg pipe_works=no 4865d656433aSmrg 4866555991fdSmrg rm -f conftest* 4867555991fdSmrg cat > conftest.$ac_ext <<_LT_EOF 4868555991fdSmrg#ifdef __cplusplus 4869555991fdSmrgextern "C" { 4870555991fdSmrg#endif 4871555991fdSmrgchar nm_test_var; 4872555991fdSmrgvoid nm_test_func(void); 4873555991fdSmrgvoid nm_test_func(void){} 4874555991fdSmrg#ifdef __cplusplus 4875555991fdSmrg} 4876555991fdSmrg#endif 4877555991fdSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4878555991fdSmrg_LT_EOF 4879d656433aSmrg 4880555991fdSmrg if AC_TRY_EVAL(ac_compile); then 4881555991fdSmrg # Now try to grab the symbols. 4882555991fdSmrg nlist=conftest.nm 4883555991fdSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4884555991fdSmrg # Try sorting and uniquifying the output. 4885555991fdSmrg if sort "$nlist" | uniq > "$nlist"T; then 4886555991fdSmrg mv -f "$nlist"T "$nlist" 4887555991fdSmrg else 4888555991fdSmrg rm -f "$nlist"T 4889555991fdSmrg fi 4890d656433aSmrg 4891555991fdSmrg # Make sure that we snagged all the symbols we need. 4892555991fdSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4893555991fdSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4894555991fdSmrg cat <<_LT_EOF > conftest.$ac_ext 48953c15da26Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 48963c15da26Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 48973c15da26Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 48983c15da26Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 48993c15da26Smrg# define LT@&t@_DLSYM_CONST 49003c15da26Smrg#elif defined(__osf__) 49013c15da26Smrg/* This system does not cope well with relocations in const data. */ 49023c15da26Smrg# define LT@&t@_DLSYM_CONST 49033c15da26Smrg#else 49043c15da26Smrg# define LT@&t@_DLSYM_CONST const 49053c15da26Smrg#endif 49063c15da26Smrg 4907555991fdSmrg#ifdef __cplusplus 4908555991fdSmrgextern "C" { 4909555991fdSmrg#endif 4910d656433aSmrg 4911555991fdSmrg_LT_EOF 4912555991fdSmrg # Now generate the symbol file. 4913555991fdSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4914d656433aSmrg 4915555991fdSmrg cat <<_LT_EOF >> conftest.$ac_ext 4916d656433aSmrg 4917555991fdSmrg/* The mapping between symbol names and symbols. */ 49183c15da26SmrgLT@&t@_DLSYM_CONST struct { 4919555991fdSmrg const char *name; 4920555991fdSmrg void *address; 4921555991fdSmrg} 4922555991fdSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4923555991fdSmrg{ 4924555991fdSmrg { "@PROGRAM@", (void *) 0 }, 4925555991fdSmrg_LT_EOF 4926555991fdSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4927555991fdSmrg cat <<\_LT_EOF >> conftest.$ac_ext 4928555991fdSmrg {0, (void *) 0} 4929555991fdSmrg}; 4930d656433aSmrg 4931555991fdSmrg/* This works around a problem in FreeBSD linker */ 4932555991fdSmrg#ifdef FREEBSD_WORKAROUND 4933555991fdSmrgstatic const void *lt_preloaded_setup() { 4934555991fdSmrg return lt__PROGRAM__LTX_preloaded_symbols; 4935555991fdSmrg} 4936555991fdSmrg#endif 4937d656433aSmrg 4938555991fdSmrg#ifdef __cplusplus 4939555991fdSmrg} 4940555991fdSmrg#endif 4941555991fdSmrg_LT_EOF 4942555991fdSmrg # Now try linking the two files. 4943555991fdSmrg mv conftest.$ac_objext conftstm.$ac_objext 49443c15da26Smrg lt_globsym_save_LIBS=$LIBS 49453c15da26Smrg lt_globsym_save_CFLAGS=$CFLAGS 4946555991fdSmrg LIBS="conftstm.$ac_objext" 4947555991fdSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4948555991fdSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4949555991fdSmrg pipe_works=yes 4950555991fdSmrg fi 49513c15da26Smrg LIBS=$lt_globsym_save_LIBS 49523c15da26Smrg CFLAGS=$lt_globsym_save_CFLAGS 4953555991fdSmrg else 4954555991fdSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4955555991fdSmrg fi 4956555991fdSmrg else 4957555991fdSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4958555991fdSmrg fi 4959555991fdSmrg else 4960555991fdSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4961555991fdSmrg fi 4962555991fdSmrg else 4963555991fdSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4964555991fdSmrg cat conftest.$ac_ext >&5 4965555991fdSmrg fi 4966555991fdSmrg rm -rf conftest* conftst* 4967d656433aSmrg 4968555991fdSmrg # Do not use the global_symbol_pipe unless it works. 4969555991fdSmrg if test "$pipe_works" = yes; then 4970555991fdSmrg break 4971555991fdSmrg else 4972555991fdSmrg lt_cv_sys_global_symbol_pipe= 4973555991fdSmrg fi 4974555991fdSmrgdone 4975555991fdSmrg]) 4976555991fdSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4977555991fdSmrg lt_cv_sys_global_symbol_to_cdecl= 4978555991fdSmrgfi 4979555991fdSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4980555991fdSmrg AC_MSG_RESULT(failed) 4981555991fdSmrgelse 4982555991fdSmrg AC_MSG_RESULT(ok) 4983555991fdSmrgfi 4984d656433aSmrg 49853c15da26Smrg# Response file support. 49863c15da26Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 49873c15da26Smrg nm_file_list_spec='@' 49883c15da26Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 49893c15da26Smrg nm_file_list_spec='@' 49903c15da26Smrgfi 49913c15da26Smrg 4992555991fdSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4993555991fdSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 4994555991fdSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4995555991fdSmrg [Transform the output of nm in a proper C declaration]) 4996555991fdSmrg_LT_DECL([global_symbol_to_c_name_address], 4997555991fdSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4998555991fdSmrg [Transform the output of nm in a C name address pair]) 4999555991fdSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 5000555991fdSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 5001555991fdSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 50023c15da26Smrg_LT_DECL([], [nm_file_list_spec], [1], 50033c15da26Smrg [Specify filename containing input files for $NM]) 5004555991fdSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 5005d656433aSmrg 5006d656433aSmrg 5007555991fdSmrg# _LT_COMPILER_PIC([TAGNAME]) 5008555991fdSmrg# --------------------------- 5009555991fdSmrgm4_defun([_LT_COMPILER_PIC], 5010555991fdSmrg[m4_require([_LT_TAG_COMPILER])dnl 5011555991fdSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 5012555991fdSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5013555991fdSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 5014555991fdSmrg 5015555991fdSmrgm4_if([$1], [CXX], [ 5016555991fdSmrg # C++ specific cases for pic, static, wl, etc. 5017555991fdSmrg if test "$GXX" = yes; then 5018555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5019555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5020555991fdSmrg 5021555991fdSmrg case $host_os in 5022555991fdSmrg aix*) 5023555991fdSmrg # All AIX code is PIC. 5024555991fdSmrg if test "$host_cpu" = ia64; then 5025555991fdSmrg # AIX 5 now supports IA64 processor 5026555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5027555991fdSmrg fi 5028555991fdSmrg ;; 5029d656433aSmrg 5030555991fdSmrg amigaos*) 5031555991fdSmrg case $host_cpu in 5032555991fdSmrg powerpc) 5033555991fdSmrg # see comment about AmigaOS4 .so support 5034555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5035555991fdSmrg ;; 5036555991fdSmrg m68k) 5037555991fdSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5038555991fdSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5039555991fdSmrg # like `-m68040'. 5040555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5041d656433aSmrg ;; 5042555991fdSmrg esac 5043555991fdSmrg ;; 5044d656433aSmrg 5045555991fdSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5046555991fdSmrg # PIC is the default for these OSes. 5047555991fdSmrg ;; 5048555991fdSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 5049555991fdSmrg # This hack is so that the source file can tell whether it is being 5050555991fdSmrg # built for inclusion in a dll (and should export symbols for example). 5051555991fdSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5052555991fdSmrg # (--disable-auto-import) libraries 5053555991fdSmrg m4_if([$1], [GCJ], [], 5054555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5055555991fdSmrg ;; 5056555991fdSmrg darwin* | rhapsody*) 5057555991fdSmrg # PIC is the default on this platform 5058555991fdSmrg # Common symbols not allowed in MH_DYLIB files 5059555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5060555991fdSmrg ;; 5061555991fdSmrg *djgpp*) 5062555991fdSmrg # DJGPP does not support shared libraries at all 5063555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5064555991fdSmrg ;; 5065555991fdSmrg haiku*) 5066555991fdSmrg # PIC is the default for Haiku. 5067555991fdSmrg # The "-static" flag exists, but is broken. 5068555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 5069555991fdSmrg ;; 5070555991fdSmrg interix[[3-9]]*) 5071555991fdSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5072555991fdSmrg # Instead, we relocate shared libraries at runtime. 5073555991fdSmrg ;; 5074555991fdSmrg sysv4*MP*) 5075555991fdSmrg if test -d /usr/nec; then 5076555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5077555991fdSmrg fi 5078555991fdSmrg ;; 5079555991fdSmrg hpux*) 5080555991fdSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5081555991fdSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5082555991fdSmrg # sets the default TLS model and affects inlining. 5083555991fdSmrg case $host_cpu in 5084555991fdSmrg hppa*64*) 5085126a8a12Smrg ;; 5086555991fdSmrg *) 5087555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5088555991fdSmrg ;; 5089555991fdSmrg esac 5090555991fdSmrg ;; 5091555991fdSmrg *qnx* | *nto*) 5092555991fdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5093555991fdSmrg # it will coredump. 5094555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5095555991fdSmrg ;; 5096555991fdSmrg *) 5097555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5098555991fdSmrg ;; 5099555991fdSmrg esac 5100555991fdSmrg else 5101555991fdSmrg case $host_os in 5102555991fdSmrg aix[[4-9]]*) 5103555991fdSmrg # All AIX code is PIC. 5104555991fdSmrg if test "$host_cpu" = ia64; then 5105555991fdSmrg # AIX 5 now supports IA64 processor 5106555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5107555991fdSmrg else 5108555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5109555991fdSmrg fi 5110555991fdSmrg ;; 5111555991fdSmrg chorus*) 5112555991fdSmrg case $cc_basename in 5113555991fdSmrg cxch68*) 5114555991fdSmrg # Green Hills C++ Compiler 5115555991fdSmrg # _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" 5116555991fdSmrg ;; 5117555991fdSmrg esac 5118555991fdSmrg ;; 51193c15da26Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 51203c15da26Smrg # This hack is so that the source file can tell whether it is being 51213c15da26Smrg # built for inclusion in a dll (and should export symbols for example). 51223c15da26Smrg m4_if([$1], [GCJ], [], 51233c15da26Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 51243c15da26Smrg ;; 5125555991fdSmrg dgux*) 5126555991fdSmrg case $cc_basename in 5127555991fdSmrg ec++*) 5128555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5129126a8a12Smrg ;; 5130555991fdSmrg ghcx*) 5131555991fdSmrg # Green Hills C++ Compiler 5132555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5133126a8a12Smrg ;; 5134555991fdSmrg *) 5135126a8a12Smrg ;; 5136555991fdSmrg esac 5137555991fdSmrg ;; 5138555991fdSmrg freebsd* | dragonfly*) 5139555991fdSmrg # FreeBSD uses GNU C++ 5140555991fdSmrg ;; 5141555991fdSmrg hpux9* | hpux10* | hpux11*) 5142555991fdSmrg case $cc_basename in 5143555991fdSmrg CC*) 5144555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5145555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5146555991fdSmrg if test "$host_cpu" != ia64; then 5147555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5148555991fdSmrg fi 5149126a8a12Smrg ;; 5150555991fdSmrg aCC*) 5151555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5152555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5153555991fdSmrg case $host_cpu in 5154555991fdSmrg hppa*64*|ia64*) 5155555991fdSmrg # +Z the default 5156d656433aSmrg ;; 5157555991fdSmrg *) 5158555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5159d656433aSmrg ;; 5160d656433aSmrg esac 5161126a8a12Smrg ;; 5162126a8a12Smrg *) 5163126a8a12Smrg ;; 5164126a8a12Smrg esac 5165126a8a12Smrg ;; 5166555991fdSmrg interix*) 5167555991fdSmrg # This is c89, which is MS Visual C++ (no shared libs) 5168555991fdSmrg # Anyone wants to do a port? 5169126a8a12Smrg ;; 5170555991fdSmrg irix5* | irix6* | nonstopux*) 5171555991fdSmrg case $cc_basename in 5172555991fdSmrg CC*) 5173555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5174555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5175555991fdSmrg # CC pic flag -KPIC is the default. 5176126a8a12Smrg ;; 5177126a8a12Smrg *) 5178126a8a12Smrg ;; 5179126a8a12Smrg esac 5180126a8a12Smrg ;; 5181555991fdSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5182555991fdSmrg case $cc_basename in 5183555991fdSmrg KCC*) 5184555991fdSmrg # KAI C++ Compiler 5185555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5186555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5187126a8a12Smrg ;; 5188555991fdSmrg ecpc* ) 5189555991fdSmrg # old Intel C++ for x86_64 which still supported -KPIC. 5190555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5191555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5192555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5193126a8a12Smrg ;; 5194555991fdSmrg icpc* ) 5195555991fdSmrg # Intel C++, used to be incompatible with GCC. 5196555991fdSmrg # ICC 10 doesn't accept -KPIC any more. 5197555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5198555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5199555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5200555991fdSmrg ;; 5201555991fdSmrg pgCC* | pgcpp*) 5202555991fdSmrg # Portland Group C++ compiler 5203555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5204555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5205555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5206555991fdSmrg ;; 5207555991fdSmrg cxx*) 5208555991fdSmrg # Compaq C++ 5209555991fdSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5210555991fdSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5211555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5212555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5213555991fdSmrg ;; 5214555991fdSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 5215555991fdSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 5216555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5217555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5218555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5219126a8a12Smrg ;; 5220126a8a12Smrg *) 5221555991fdSmrg case `$CC -V 2>&1 | sed 5q` in 5222555991fdSmrg *Sun\ C*) 5223555991fdSmrg # Sun C++ 5.9 5224555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5225555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5226555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5227555991fdSmrg ;; 5228555991fdSmrg esac 5229126a8a12Smrg ;; 5230555991fdSmrg esac 5231555991fdSmrg ;; 5232555991fdSmrg lynxos*) 5233555991fdSmrg ;; 5234555991fdSmrg m88k*) 5235555991fdSmrg ;; 5236555991fdSmrg mvs*) 5237555991fdSmrg case $cc_basename in 5238555991fdSmrg cxx*) 5239555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5240555991fdSmrg ;; 5241555991fdSmrg *) 5242555991fdSmrg ;; 5243555991fdSmrg esac 5244555991fdSmrg ;; 5245555991fdSmrg netbsd*) 5246555991fdSmrg ;; 5247555991fdSmrg *qnx* | *nto*) 5248555991fdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5249555991fdSmrg # it will coredump. 5250555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5251d656433aSmrg ;; 5252555991fdSmrg osf3* | osf4* | osf5*) 5253555991fdSmrg case $cc_basename in 5254555991fdSmrg KCC*) 5255555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5256126a8a12Smrg ;; 5257555991fdSmrg RCC*) 5258555991fdSmrg # Rational C++ 2.4.1 5259555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5260126a8a12Smrg ;; 5261555991fdSmrg cxx*) 5262555991fdSmrg # Digital/Compaq C++ 5263555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5264555991fdSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5265555991fdSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5266555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5267555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5268d656433aSmrg ;; 5269555991fdSmrg *) 5270555991fdSmrg ;; 5271555991fdSmrg esac 5272555991fdSmrg ;; 5273555991fdSmrg psos*) 5274555991fdSmrg ;; 5275d656433aSmrg solaris*) 5276555991fdSmrg case $cc_basename in 5277555991fdSmrg CC* | sunCC*) 5278d656433aSmrg # Sun C++ 4.2, 5.x and Centerline C++ 5279555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5280555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5281555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5282d656433aSmrg ;; 5283555991fdSmrg gcx*) 5284d656433aSmrg # Green Hills C++ Compiler 5285555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5286d656433aSmrg ;; 5287555991fdSmrg *) 5288d656433aSmrg ;; 5289555991fdSmrg esac 5290555991fdSmrg ;; 5291555991fdSmrg sunos4*) 5292d656433aSmrg case $cc_basename in 5293555991fdSmrg CC*) 5294555991fdSmrg # Sun C++ 4.x 5295555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5296555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5297555991fdSmrg ;; 5298555991fdSmrg lcc*) 5299555991fdSmrg # Lucid 5300555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5301d656433aSmrg ;; 5302d656433aSmrg *) 5303d656433aSmrg ;; 5304d656433aSmrg esac 5305555991fdSmrg ;; 5306555991fdSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5307555991fdSmrg case $cc_basename in 5308555991fdSmrg CC*) 5309555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5310555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5311555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5312555991fdSmrg ;; 5313555991fdSmrg esac 5314555991fdSmrg ;; 5315d656433aSmrg tandem*) 5316555991fdSmrg case $cc_basename in 5317555991fdSmrg NCC*) 5318d656433aSmrg # NonStop-UX NCC 3.20 5319555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5320d656433aSmrg ;; 5321555991fdSmrg *) 5322d656433aSmrg ;; 5323555991fdSmrg esac 5324555991fdSmrg ;; 5325555991fdSmrg vxworks*) 5326555991fdSmrg ;; 5327555991fdSmrg *) 5328555991fdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5329555991fdSmrg ;; 5330555991fdSmrg esac 5331555991fdSmrg fi 5332555991fdSmrg], 5333555991fdSmrg[ 5334555991fdSmrg if test "$GCC" = yes; then 5335555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5336555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5337555991fdSmrg 5338555991fdSmrg case $host_os in 5339555991fdSmrg aix*) 5340555991fdSmrg # All AIX code is PIC. 5341555991fdSmrg if test "$host_cpu" = ia64; then 5342555991fdSmrg # AIX 5 now supports IA64 processor 5343555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5344555991fdSmrg fi 5345555991fdSmrg ;; 5346555991fdSmrg 5347555991fdSmrg amigaos*) 5348555991fdSmrg case $host_cpu in 5349555991fdSmrg powerpc) 5350555991fdSmrg # see comment about AmigaOS4 .so support 5351555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5352555991fdSmrg ;; 5353555991fdSmrg m68k) 5354555991fdSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5355555991fdSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5356555991fdSmrg # like `-m68040'. 5357555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5358d656433aSmrg ;; 5359555991fdSmrg esac 5360555991fdSmrg ;; 5361555991fdSmrg 5362555991fdSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5363555991fdSmrg # PIC is the default for these OSes. 5364555991fdSmrg ;; 5365126a8a12Smrg 5366555991fdSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 5367555991fdSmrg # This hack is so that the source file can tell whether it is being 5368555991fdSmrg # built for inclusion in a dll (and should export symbols for example). 5369555991fdSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5370555991fdSmrg # (--disable-auto-import) libraries 5371555991fdSmrg m4_if([$1], [GCJ], [], 5372555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5373555991fdSmrg ;; 5374126a8a12Smrg 5375555991fdSmrg darwin* | rhapsody*) 5376555991fdSmrg # PIC is the default on this platform 5377555991fdSmrg # Common symbols not allowed in MH_DYLIB files 5378555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5379555991fdSmrg ;; 5380126a8a12Smrg 5381555991fdSmrg haiku*) 5382555991fdSmrg # PIC is the default for Haiku. 5383555991fdSmrg # The "-static" flag exists, but is broken. 5384555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 5385555991fdSmrg ;; 5386d656433aSmrg 5387555991fdSmrg hpux*) 5388555991fdSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5389555991fdSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5390555991fdSmrg # sets the default TLS model and affects inlining. 5391555991fdSmrg case $host_cpu in 5392555991fdSmrg hppa*64*) 5393555991fdSmrg # +Z the default 5394555991fdSmrg ;; 5395555991fdSmrg *) 5396555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5397555991fdSmrg ;; 5398555991fdSmrg esac 5399555991fdSmrg ;; 5400d656433aSmrg 5401555991fdSmrg interix[[3-9]]*) 5402555991fdSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5403555991fdSmrg # Instead, we relocate shared libraries at runtime. 5404555991fdSmrg ;; 5405d656433aSmrg 5406555991fdSmrg msdosdjgpp*) 5407555991fdSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5408555991fdSmrg # on systems that don't support them. 5409555991fdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5410555991fdSmrg enable_shared=no 5411555991fdSmrg ;; 5412d656433aSmrg 5413555991fdSmrg *nto* | *qnx*) 5414555991fdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5415555991fdSmrg # it will coredump. 5416555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5417555991fdSmrg ;; 5418126a8a12Smrg 5419555991fdSmrg sysv4*MP*) 5420555991fdSmrg if test -d /usr/nec; then 5421555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5422555991fdSmrg fi 5423555991fdSmrg ;; 5424126a8a12Smrg 5425555991fdSmrg *) 5426555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5427555991fdSmrg ;; 5428555991fdSmrg esac 5429126a8a12Smrg 5430555991fdSmrg case $cc_basename in 5431555991fdSmrg nvcc*) # Cuda Compiler Driver 2.2 5432555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 54330a6b08f8Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 54340a6b08f8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 54350a6b08f8Smrg fi 5436555991fdSmrg ;; 5437555991fdSmrg esac 5438555991fdSmrg else 5439555991fdSmrg # PORTME Check for flag to pass linker flags through the system compiler. 5440555991fdSmrg case $host_os in 5441555991fdSmrg aix*) 5442555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5443555991fdSmrg if test "$host_cpu" = ia64; then 5444555991fdSmrg # AIX 5 now supports IA64 processor 5445555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5446555991fdSmrg else 5447555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5448555991fdSmrg fi 5449555991fdSmrg ;; 5450126a8a12Smrg 5451555991fdSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 5452555991fdSmrg # This hack is so that the source file can tell whether it is being 5453555991fdSmrg # built for inclusion in a dll (and should export symbols for example). 5454555991fdSmrg m4_if([$1], [GCJ], [], 5455555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5456555991fdSmrg ;; 5457126a8a12Smrg 5458555991fdSmrg hpux9* | hpux10* | hpux11*) 5459555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5460555991fdSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5461555991fdSmrg # not for PA HP-UX. 5462555991fdSmrg case $host_cpu in 5463555991fdSmrg hppa*64*|ia64*) 5464555991fdSmrg # +Z the default 5465555991fdSmrg ;; 5466555991fdSmrg *) 5467555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5468555991fdSmrg ;; 5469555991fdSmrg esac 5470555991fdSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5471555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5472555991fdSmrg ;; 5473126a8a12Smrg 5474555991fdSmrg irix5* | irix6* | nonstopux*) 5475555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5476555991fdSmrg # PIC (with -KPIC) is the default. 5477555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5478555991fdSmrg ;; 5479126a8a12Smrg 5480555991fdSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5481555991fdSmrg case $cc_basename in 5482555991fdSmrg # old Intel for x86_64 which still supported -KPIC. 5483555991fdSmrg ecc*) 5484555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5485555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5486555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5487555991fdSmrg ;; 5488555991fdSmrg # icc used to be incompatible with GCC. 5489555991fdSmrg # ICC 10 doesn't accept -KPIC any more. 5490555991fdSmrg icc* | ifort*) 5491555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5492555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5493555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5494555991fdSmrg ;; 5495555991fdSmrg # Lahey Fortran 8.1. 5496555991fdSmrg lf95*) 5497555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5498555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5499555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5500555991fdSmrg ;; 55013c15da26Smrg nagfor*) 55023c15da26Smrg # NAG Fortran compiler 55033c15da26Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 55043c15da26Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55053c15da26Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55063c15da26Smrg ;; 5507555991fdSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5508555991fdSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 5509555991fdSmrg # which looks to be a dead project) 5510555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5511555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5512555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5513555991fdSmrg ;; 5514555991fdSmrg ccc*) 5515555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5516555991fdSmrg # All Alpha code is PIC. 5517555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5518555991fdSmrg ;; 5519555991fdSmrg xl* | bgxl* | bgf* | mpixl*) 5520555991fdSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5521555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5522555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5523555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5524555991fdSmrg ;; 5525555991fdSmrg *) 5526555991fdSmrg case `$CC -V 2>&1 | sed 5q` in 55270a6b08f8Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 5528555991fdSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 5529555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5530555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5531555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5532555991fdSmrg ;; 55330a6b08f8Smrg *Sun\ F* | *Sun*Fortran*) 55340a6b08f8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55350a6b08f8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55360a6b08f8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 55370a6b08f8Smrg ;; 5538555991fdSmrg *Sun\ C*) 5539555991fdSmrg # Sun C 5.9 5540555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5541555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5542555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5543555991fdSmrg ;; 55440a6b08f8Smrg *Intel*\ [[CF]]*Compiler*) 55450a6b08f8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55460a6b08f8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 55470a6b08f8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 55480a6b08f8Smrg ;; 55490a6b08f8Smrg *Portland\ Group*) 55500a6b08f8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55510a6b08f8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 55520a6b08f8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55530a6b08f8Smrg ;; 5554555991fdSmrg esac 5555555991fdSmrg ;; 5556555991fdSmrg esac 5557555991fdSmrg ;; 5558126a8a12Smrg 5559555991fdSmrg newsos6) 5560555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5561555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5562555991fdSmrg ;; 5563126a8a12Smrg 5564555991fdSmrg *nto* | *qnx*) 5565555991fdSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5566555991fdSmrg # it will coredump. 5567555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5568555991fdSmrg ;; 5569126a8a12Smrg 5570555991fdSmrg osf3* | osf4* | osf5*) 5571555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5572555991fdSmrg # All OSF/1 code is PIC. 5573555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5574555991fdSmrg ;; 5575126a8a12Smrg 5576555991fdSmrg rdos*) 5577555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5578555991fdSmrg ;; 5579126a8a12Smrg 5580555991fdSmrg solaris*) 5581555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5582555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5583555991fdSmrg case $cc_basename in 5584555991fdSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5585555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5586555991fdSmrg *) 5587555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5588555991fdSmrg esac 5589555991fdSmrg ;; 5590126a8a12Smrg 5591555991fdSmrg sunos4*) 5592555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5593555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5594555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5595555991fdSmrg ;; 5596126a8a12Smrg 5597555991fdSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 5598555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5599555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5600555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5601555991fdSmrg ;; 5602126a8a12Smrg 5603555991fdSmrg sysv4*MP*) 5604555991fdSmrg if test -d /usr/nec ;then 5605555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5606555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5607555991fdSmrg fi 5608555991fdSmrg ;; 5609126a8a12Smrg 5610555991fdSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5611555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5612555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5613555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5614555991fdSmrg ;; 5615d656433aSmrg 5616555991fdSmrg unicos*) 5617555991fdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5618555991fdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5619126a8a12Smrg ;; 5620126a8a12Smrg 5621555991fdSmrg uts4*) 5622555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5623555991fdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5624555991fdSmrg ;; 5625126a8a12Smrg 5626555991fdSmrg *) 5627555991fdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5628d656433aSmrg ;; 5629d656433aSmrg esac 5630555991fdSmrg fi 5631d656433aSmrg]) 5632555991fdSmrgcase $host_os in 5633555991fdSmrg # For platforms which do not support PIC, -DPIC is meaningless: 5634555991fdSmrg *djgpp*) 5635555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5636555991fdSmrg ;; 5637555991fdSmrg *) 5638555991fdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5639555991fdSmrg ;; 5640d656433aSmrgesac 56413c15da26Smrg 56423c15da26SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 56433c15da26Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 56443c15da26Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 56453c15da26Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5646d656433aSmrg 5647555991fdSmrg# 5648555991fdSmrg# Check to make sure the PIC flag actually works. 5649555991fdSmrg# 5650555991fdSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5651555991fdSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5652555991fdSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5653555991fdSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5654555991fdSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5655555991fdSmrg "" | " "*) ;; 5656555991fdSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5657555991fdSmrg esac], 5658555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5659555991fdSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5660555991fdSmrgfi 5661555991fdSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5662555991fdSmrg [Additional compiler flags for building library objects]) 5663126a8a12Smrg 56643c15da26Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 56653c15da26Smrg [How to pass a linker flag through the compiler]) 5666555991fdSmrg# 5667555991fdSmrg# Check to make sure the static flag actually works. 5668555991fdSmrg# 5669555991fdSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5670555991fdSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5671555991fdSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5672555991fdSmrg $lt_tmp_static_flag, 5673555991fdSmrg [], 5674555991fdSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5675555991fdSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5676555991fdSmrg [Compiler flag to prevent dynamic linking]) 5677555991fdSmrg])# _LT_COMPILER_PIC 5678126a8a12Smrg 5679126a8a12Smrg 5680555991fdSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 5681555991fdSmrg# ---------------------------- 5682555991fdSmrg# See if the linker supports building shared libraries. 5683555991fdSmrgm4_defun([_LT_LINKER_SHLIBS], 5684555991fdSmrg[AC_REQUIRE([LT_PATH_LD])dnl 5685555991fdSmrgAC_REQUIRE([LT_PATH_NM])dnl 56863c15da26Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5687555991fdSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5688555991fdSmrgm4_require([_LT_DECL_EGREP])dnl 5689555991fdSmrgm4_require([_LT_DECL_SED])dnl 5690555991fdSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5691555991fdSmrgm4_require([_LT_TAG_COMPILER])dnl 5692555991fdSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5693555991fdSmrgm4_if([$1], [CXX], [ 5694555991fdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56953c15da26Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5696555991fdSmrg case $host_os in 5697555991fdSmrg aix[[4-9]]*) 5698555991fdSmrg # If we're using GNU nm, then we don't want the "-C" option. 5699555991fdSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5700555991fdSmrg # Also, AIX nm treats weak defined symbols like other global defined 5701555991fdSmrg # symbols, whereas GNU nm marks them as "W". 5702555991fdSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5703555991fdSmrg _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' 5704555991fdSmrg else 5705555991fdSmrg _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' 5706555991fdSmrg fi 5707555991fdSmrg ;; 5708555991fdSmrg pw32*) 5709555991fdSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 57103c15da26Smrg ;; 5711555991fdSmrg cygwin* | mingw* | cegcc*) 57123c15da26Smrg case $cc_basename in 57130a6b08f8Smrg cl*) 57140a6b08f8Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 57150a6b08f8Smrg ;; 57163c15da26Smrg *) 57173c15da26Smrg _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' 57183c15da26Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 57193c15da26Smrg ;; 57203c15da26Smrg esac 57213c15da26Smrg ;; 57223c15da26Smrg *) 57233c15da26Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 57243c15da26Smrg ;; 57253c15da26Smrg esac 5726555991fdSmrg], [ 5727555991fdSmrg runpath_var= 5728555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5729555991fdSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5730555991fdSmrg _LT_TAGVAR(archive_cmds, $1)= 5731555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 5732555991fdSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 5733555991fdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5734555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5735555991fdSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5736555991fdSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 5737555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5738555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5739555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5740555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5741555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 5742555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5743555991fdSmrg _LT_TAGVAR(inherit_rpath, $1)=no 5744555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 5745555991fdSmrg _LT_TAGVAR(module_cmds, $1)= 5746555991fdSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 5747555991fdSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5748555991fdSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5749555991fdSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 5750555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5751555991fdSmrg # include_expsyms should be a list of space-separated symbols to be *always* 5752555991fdSmrg # included in the symbol list 5753555991fdSmrg _LT_TAGVAR(include_expsyms, $1)= 5754555991fdSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5755555991fdSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5756555991fdSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5757555991fdSmrg # as well as any symbol that contains `d'. 5758555991fdSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5759555991fdSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5760555991fdSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 5761555991fdSmrg # the symbol is explicitly referenced. Since portable code cannot 5762555991fdSmrg # rely on this symbol name, it's probably fine to never include it in 5763555991fdSmrg # preloaded symbol tables. 5764555991fdSmrg # Exclude shared library initialization/finalization symbols. 5765555991fdSmrgdnl Note also adjust exclude_expsyms for C++ above. 5766555991fdSmrg extract_expsyms_cmds= 5767126a8a12Smrg 5768555991fdSmrg case $host_os in 5769555991fdSmrg cygwin* | mingw* | pw32* | cegcc*) 5770555991fdSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5771555991fdSmrg # When not using gcc, we currently assume that we are using 5772555991fdSmrg # Microsoft Visual C++. 5773555991fdSmrg if test "$GCC" != yes; then 5774555991fdSmrg with_gnu_ld=no 5775555991fdSmrg fi 5776555991fdSmrg ;; 5777555991fdSmrg interix*) 5778555991fdSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5779555991fdSmrg with_gnu_ld=yes 5780555991fdSmrg ;; 5781555991fdSmrg openbsd*) 5782555991fdSmrg with_gnu_ld=no 5783555991fdSmrg ;; 5784555991fdSmrg esac 5785126a8a12Smrg 5786555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5787126a8a12Smrg 5788555991fdSmrg # On some targets, GNU ld is compatible enough with the native linker 5789555991fdSmrg # that we're better off using the native interface for both. 5790555991fdSmrg lt_use_gnu_ld_interface=no 5791555991fdSmrg if test "$with_gnu_ld" = yes; then 5792d656433aSmrg case $host_os in 5793555991fdSmrg aix*) 5794555991fdSmrg # The AIX port of GNU ld has always aspired to compatibility 5795555991fdSmrg # with the native linker. However, as the warning in the GNU ld 5796555991fdSmrg # block says, versions before 2.19.5* couldn't really create working 5797555991fdSmrg # shared libraries, regardless of the interface used. 5798555991fdSmrg case `$LD -v 2>&1` in 5799555991fdSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5800555991fdSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5801555991fdSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5802555991fdSmrg *) 5803555991fdSmrg lt_use_gnu_ld_interface=yes 5804555991fdSmrg ;; 5805555991fdSmrg esac 5806555991fdSmrg ;; 5807555991fdSmrg *) 5808555991fdSmrg lt_use_gnu_ld_interface=yes 5809555991fdSmrg ;; 5810d656433aSmrg esac 5811555991fdSmrg fi 5812d656433aSmrg 5813555991fdSmrg if test "$lt_use_gnu_ld_interface" = yes; then 5814555991fdSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5815555991fdSmrg wlarc='${wl}' 5816126a8a12Smrg 5817555991fdSmrg # Set some defaults for GNU ld with shared library support. These 5818555991fdSmrg # are reset later if shared libraries are not supported. Putting them 5819555991fdSmrg # here allows them to be overridden if necessary. 5820555991fdSmrg runpath_var=LD_RUN_PATH 5821555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5822555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5823555991fdSmrg # ancient GNU ld didn't support --whole-archive et. al. 5824555991fdSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5825555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5826555991fdSmrg else 5827555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5828555991fdSmrg fi 5829555991fdSmrg supports_anon_versioning=no 5830555991fdSmrg case `$LD -v 2>&1` in 5831555991fdSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 5832555991fdSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5833555991fdSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5834555991fdSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5835555991fdSmrg *\ 2.11.*) ;; # other 2.11 versions 5836555991fdSmrg *) supports_anon_versioning=yes ;; 5837555991fdSmrg esac 5838126a8a12Smrg 5839555991fdSmrg # See if GNU ld supports shared libraries. 5840555991fdSmrg case $host_os in 5841555991fdSmrg aix[[3-9]]*) 5842555991fdSmrg # On AIX/PPC, the GNU linker is very broken 5843555991fdSmrg if test "$host_cpu" != ia64; then 5844555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5845555991fdSmrg cat <<_LT_EOF 1>&2 5846126a8a12Smrg 5847555991fdSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5848555991fdSmrg*** to be unable to reliably create shared libraries on AIX. 5849555991fdSmrg*** Therefore, libtool is disabling shared libraries support. If you 5850555991fdSmrg*** really care for shared libraries, you may want to install binutils 5851555991fdSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5852555991fdSmrg*** You will then need to restart the configuration process. 5853126a8a12Smrg 5854555991fdSmrg_LT_EOF 5855555991fdSmrg fi 5856555991fdSmrg ;; 5857126a8a12Smrg 5858555991fdSmrg amigaos*) 5859555991fdSmrg case $host_cpu in 5860555991fdSmrg powerpc) 5861555991fdSmrg # see comment about AmigaOS4 .so support 5862555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5863555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5864555991fdSmrg ;; 5865555991fdSmrg m68k) 5866555991fdSmrg _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)' 5867555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5868555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5869555991fdSmrg ;; 5870555991fdSmrg esac 5871555991fdSmrg ;; 5872126a8a12Smrg 5873555991fdSmrg beos*) 5874555991fdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5875555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5876555991fdSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5877555991fdSmrg # support --undefined. This deserves some investigation. FIXME 5878555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5879555991fdSmrg else 5880555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5881555991fdSmrg fi 5882555991fdSmrg ;; 5883d656433aSmrg 5884555991fdSmrg cygwin* | mingw* | pw32* | cegcc*) 5885555991fdSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5886555991fdSmrg # as there is no search path for DLLs. 5887555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5888555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5889555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5890555991fdSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5891555991fdSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58923c15da26Smrg _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' 58933c15da26Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5894d656433aSmrg 5895555991fdSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5896555991fdSmrg _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' 5897555991fdSmrg # If the export-symbols file already is a .def file (1st line 5898555991fdSmrg # is EXPORTS), use it as is; otherwise, prepend... 5899555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5900555991fdSmrg cp $export_symbols $output_objdir/$soname.def; 5901555991fdSmrg else 5902555991fdSmrg echo EXPORTS > $output_objdir/$soname.def; 5903555991fdSmrg cat $export_symbols >> $output_objdir/$soname.def; 5904555991fdSmrg fi~ 5905555991fdSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5906555991fdSmrg else 5907555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5908555991fdSmrg fi 5909555991fdSmrg ;; 5910d656433aSmrg 5911555991fdSmrg haiku*) 5912555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5913555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5914555991fdSmrg ;; 5915d656433aSmrg 5916555991fdSmrg interix[[3-9]]*) 5917555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5918555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5919555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5920555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5921555991fdSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5922555991fdSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5923555991fdSmrg # default) and relocated if they conflict, which is a slow very memory 5924555991fdSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5925555991fdSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5926555991fdSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5927555991fdSmrg _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' 5928555991fdSmrg _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' 5929555991fdSmrg ;; 5930126a8a12Smrg 5931555991fdSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5932555991fdSmrg tmp_diet=no 5933555991fdSmrg if test "$host_os" = linux-dietlibc; then 5934555991fdSmrg case $cc_basename in 5935555991fdSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5936555991fdSmrg esac 5937555991fdSmrg fi 5938555991fdSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5939555991fdSmrg && test "$tmp_diet" = no 5940555991fdSmrg then 59413c15da26Smrg tmp_addflag=' $pic_flag' 5942555991fdSmrg tmp_sharedflag='-shared' 5943555991fdSmrg case $cc_basename,$host_cpu in 5944555991fdSmrg pgcc*) # Portland Group C compiler 5945555991fdSmrg _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' 5946555991fdSmrg tmp_addflag=' $pic_flag' 5947555991fdSmrg ;; 5948555991fdSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 5949555991fdSmrg # Portland Group f77 and f90 compilers 5950555991fdSmrg _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' 5951555991fdSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5952555991fdSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5953555991fdSmrg tmp_addflag=' -i_dynamic' ;; 5954555991fdSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5955555991fdSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5956555991fdSmrg ifc* | ifort*) # Intel Fortran compiler 5957555991fdSmrg tmp_addflag=' -nofor_main' ;; 5958555991fdSmrg lf95*) # Lahey Fortran 8.1 5959555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5960555991fdSmrg tmp_sharedflag='--shared' ;; 5961555991fdSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5962555991fdSmrg tmp_sharedflag='-qmkshrobj' 5963555991fdSmrg tmp_addflag= ;; 5964555991fdSmrg nvcc*) # Cuda Compiler Driver 2.2 5965555991fdSmrg _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' 5966555991fdSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5967555991fdSmrg ;; 5968555991fdSmrg esac 5969555991fdSmrg case `$CC -V 2>&1 | sed 5q` in 5970555991fdSmrg *Sun\ C*) # Sun C 5.9 5971555991fdSmrg _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' 5972555991fdSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5973555991fdSmrg tmp_sharedflag='-G' ;; 5974555991fdSmrg *Sun\ F*) # Sun Fortran 8.3 5975555991fdSmrg tmp_sharedflag='-G' ;; 5976555991fdSmrg esac 5977555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5978126a8a12Smrg 5979555991fdSmrg if test "x$supports_anon_versioning" = xyes; then 5980555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5981555991fdSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5982555991fdSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5983555991fdSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5984555991fdSmrg fi 5985126a8a12Smrg 5986555991fdSmrg case $cc_basename in 5987555991fdSmrg xlf* | bgf* | bgxlf* | mpixlf*) 5988555991fdSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5989555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 59900a6b08f8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5991555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5992555991fdSmrg if test "x$supports_anon_versioning" = xyes; then 5993555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5994555991fdSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5995555991fdSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5996555991fdSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5997555991fdSmrg fi 5998555991fdSmrg ;; 5999555991fdSmrg esac 6000555991fdSmrg else 6001555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6002555991fdSmrg fi 6003555991fdSmrg ;; 6004126a8a12Smrg 6005555991fdSmrg netbsd*) 6006555991fdSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6007555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6008555991fdSmrg wlarc= 6009555991fdSmrg else 60103c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60113c15da26Smrg _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' 6012555991fdSmrg fi 6013555991fdSmrg ;; 6014126a8a12Smrg 6015555991fdSmrg solaris*) 6016555991fdSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 6017555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6018555991fdSmrg cat <<_LT_EOF 1>&2 6019126a8a12Smrg 6020555991fdSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6021555991fdSmrg*** create shared libraries on Solaris systems. Therefore, libtool 6022555991fdSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 6023555991fdSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 6024555991fdSmrg*** your PATH or compiler configuration so that the native linker is 6025555991fdSmrg*** used, and then restart. 6026126a8a12Smrg 6027555991fdSmrg_LT_EOF 6028555991fdSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60293c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60303c15da26Smrg _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' 6031555991fdSmrg else 6032555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6033555991fdSmrg fi 6034555991fdSmrg ;; 6035126a8a12Smrg 6036555991fdSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6037555991fdSmrg case `$LD -v 2>&1` in 6038555991fdSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6039555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6040555991fdSmrg cat <<_LT_EOF 1>&2 6041d656433aSmrg 6042555991fdSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6043555991fdSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 6044555991fdSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 6045555991fdSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6046555991fdSmrg*** your PATH or compiler configuration so that the native linker is 6047555991fdSmrg*** used, and then restart. 6048d656433aSmrg 6049555991fdSmrg_LT_EOF 6050555991fdSmrg ;; 6051555991fdSmrg *) 6052555991fdSmrg # For security reasons, it is highly recommended that you always 6053555991fdSmrg # use absolute paths for naming shared libraries, and exclude the 6054555991fdSmrg # DT_RUNPATH tag from executables and libraries. But doing so 6055555991fdSmrg # requires that you compile everything twice, which is a pain. 6056555991fdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6057555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6058555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6059555991fdSmrg _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' 6060555991fdSmrg else 6061555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6062555991fdSmrg fi 6063555991fdSmrg ;; 6064555991fdSmrg esac 6065555991fdSmrg ;; 6066d656433aSmrg 6067555991fdSmrg sunos4*) 6068555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6069555991fdSmrg wlarc= 6070555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6071555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6072555991fdSmrg ;; 6073555991fdSmrg 6074555991fdSmrg *) 6075555991fdSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60763c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60773c15da26Smrg _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' 6078555991fdSmrg else 6079555991fdSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6080555991fdSmrg fi 6081555991fdSmrg ;; 6082555991fdSmrg esac 6083d656433aSmrg 6084555991fdSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6085555991fdSmrg runpath_var= 6086555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6087555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6088555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6089555991fdSmrg fi 6090555991fdSmrg else 6091555991fdSmrg # PORTME fill in a description of your system's linker (not GNU ld) 6092555991fdSmrg case $host_os in 6093555991fdSmrg aix3*) 6094555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6095555991fdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6096555991fdSmrg _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' 6097555991fdSmrg # Note: this linker hardcodes the directories in LIBPATH if there 6098555991fdSmrg # are no directories specified by -L. 6099555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6100555991fdSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6101555991fdSmrg # Neither direct hardcoding nor static linking is supported with a 6102555991fdSmrg # broken collect2. 6103555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6104555991fdSmrg fi 6105555991fdSmrg ;; 6106d656433aSmrg 6107555991fdSmrg aix[[4-9]]*) 6108555991fdSmrg if test "$host_cpu" = ia64; then 6109555991fdSmrg # On IA64, the linker does run time linking by default, so we don't 6110555991fdSmrg # have to do anything special. 6111555991fdSmrg aix_use_runtimelinking=no 6112555991fdSmrg exp_sym_flag='-Bexport' 6113555991fdSmrg no_entry_flag="" 6114555991fdSmrg else 6115555991fdSmrg # If we're using GNU nm, then we don't want the "-C" option. 6116555991fdSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6117555991fdSmrg # Also, AIX nm treats weak defined symbols like other global 6118555991fdSmrg # defined symbols, whereas GNU nm marks them as "W". 6119555991fdSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6120555991fdSmrg _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' 6121555991fdSmrg else 6122555991fdSmrg _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' 6123555991fdSmrg fi 6124555991fdSmrg aix_use_runtimelinking=no 6125126a8a12Smrg 6126555991fdSmrg # Test if we are trying to use run time linking or normal 6127555991fdSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6128555991fdSmrg # need to do runtime linking. 6129555991fdSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6130555991fdSmrg for ld_flag in $LDFLAGS; do 6131555991fdSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6132555991fdSmrg aix_use_runtimelinking=yes 6133555991fdSmrg break 6134555991fdSmrg fi 6135555991fdSmrg done 6136555991fdSmrg ;; 6137555991fdSmrg esac 6138126a8a12Smrg 6139555991fdSmrg exp_sym_flag='-bexport' 6140555991fdSmrg no_entry_flag='-bnoentry' 6141555991fdSmrg fi 6142126a8a12Smrg 6143555991fdSmrg # When large executables or shared objects are built, AIX ld can 6144555991fdSmrg # have problems creating the table of contents. If linking a library 6145555991fdSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6146555991fdSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6147555991fdSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6148126a8a12Smrg 6149555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='' 6150555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6151555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6152555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6153555991fdSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6154555991fdSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6155126a8a12Smrg 6156555991fdSmrg if test "$GCC" = yes; then 6157555991fdSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6158555991fdSmrg # We only want to do this on AIX 4.2 and lower, the check 6159555991fdSmrg # below for broken collect2 doesn't work under 4.3+ 6160555991fdSmrg collect2name=`${CC} -print-prog-name=collect2` 6161555991fdSmrg if test -f "$collect2name" && 6162555991fdSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6163555991fdSmrg then 6164555991fdSmrg # We have reworked collect2 6165555991fdSmrg : 6166555991fdSmrg else 6167555991fdSmrg # We have old collect2 6168555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6169555991fdSmrg # It fails to find uninstalled libraries when the uninstalled 6170555991fdSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6171555991fdSmrg # to unsupported forces relinking 6172555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6173555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6174555991fdSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6175555991fdSmrg fi 6176555991fdSmrg ;; 6177555991fdSmrg esac 6178555991fdSmrg shared_flag='-shared' 6179555991fdSmrg if test "$aix_use_runtimelinking" = yes; then 6180555991fdSmrg shared_flag="$shared_flag "'${wl}-G' 6181555991fdSmrg fi 6182555991fdSmrg else 6183555991fdSmrg # not using gcc 6184555991fdSmrg if test "$host_cpu" = ia64; then 6185555991fdSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6186555991fdSmrg # chokes on -Wl,-G. The following line is correct: 6187555991fdSmrg shared_flag='-G' 6188555991fdSmrg else 6189555991fdSmrg if test "$aix_use_runtimelinking" = yes; then 6190555991fdSmrg shared_flag='${wl}-G' 6191555991fdSmrg else 6192555991fdSmrg shared_flag='${wl}-bM:SRE' 6193555991fdSmrg fi 6194555991fdSmrg fi 6195555991fdSmrg fi 6196126a8a12Smrg 6197555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6198555991fdSmrg # It seems that -bexpall does not export symbols beginning with 6199555991fdSmrg # underscore (_), so it is better to generate a list of symbols to export. 6200555991fdSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6201555991fdSmrg if test "$aix_use_runtimelinking" = yes; then 6202555991fdSmrg # Warning - without using the other runtime loading flags (-brtl), 6203555991fdSmrg # -berok will link without error, but may produce a broken library. 6204555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6205555991fdSmrg # Determine the default libpath from the value encoded in an 6206555991fdSmrg # empty executable. 62073c15da26Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6208555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6209555991fdSmrg _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" 6210555991fdSmrg else 6211555991fdSmrg if test "$host_cpu" = ia64; then 6212555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6213555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6214555991fdSmrg _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" 6215555991fdSmrg else 6216555991fdSmrg # Determine the default libpath from the value encoded in an 6217555991fdSmrg # empty executable. 62183c15da26Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6219555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6220555991fdSmrg # Warning - without using the other run time loading flags, 6221555991fdSmrg # -berok will link without error, but may produce a broken library. 6222555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6223555991fdSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6224555991fdSmrg if test "$with_gnu_ld" = yes; then 6225555991fdSmrg # We only use this code for GNU lds that support --whole-archive. 6226555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6227555991fdSmrg else 6228555991fdSmrg # Exported symbols can be pulled into shared objects from archives 6229555991fdSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6230555991fdSmrg fi 6231555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6232555991fdSmrg # This is similar to how AIX traditionally builds its shared libraries. 6233555991fdSmrg _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' 6234555991fdSmrg fi 6235555991fdSmrg fi 6236555991fdSmrg ;; 6237126a8a12Smrg 6238555991fdSmrg amigaos*) 6239555991fdSmrg case $host_cpu in 6240555991fdSmrg powerpc) 6241555991fdSmrg # see comment about AmigaOS4 .so support 6242555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6243555991fdSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6244555991fdSmrg ;; 6245555991fdSmrg m68k) 6246555991fdSmrg _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)' 6247555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6248555991fdSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6249555991fdSmrg ;; 6250555991fdSmrg esac 6251555991fdSmrg ;; 6252126a8a12Smrg 6253555991fdSmrg bsdi[[45]]*) 6254555991fdSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6255555991fdSmrg ;; 6256126a8a12Smrg 6257555991fdSmrg cygwin* | mingw* | pw32* | cegcc*) 6258555991fdSmrg # When not using gcc, we currently assume that we are using 6259555991fdSmrg # Microsoft Visual C++. 6260555991fdSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6261555991fdSmrg # no search path for DLLs. 62623c15da26Smrg case $cc_basename in 62633c15da26Smrg cl*) 62643c15da26Smrg # Native MSVC 62653c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 62663c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 62673c15da26Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 62683c15da26Smrg _LT_TAGVAR(file_list_spec, $1)='@' 62693c15da26Smrg # Tell ltmain to make .lib files, not .a files. 62703c15da26Smrg libext=lib 62713c15da26Smrg # Tell ltmain to make .dll files, not .so files. 62723c15da26Smrg shrext_cmds=".dll" 62733c15da26Smrg # FIXME: Setting linknames here is a bad hack. 62743c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 62753c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 62763c15da26Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 62773c15da26Smrg else 62783c15da26Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 62793c15da26Smrg fi~ 62803c15da26Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 62813c15da26Smrg linknames=' 62823c15da26Smrg # The linker will not automatically build a static lib if we build a DLL. 62833c15da26Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62843c15da26Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 62850a6b08f8Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 62863c15da26Smrg _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' 62873c15da26Smrg # Don't use ranlib 62883c15da26Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 62893c15da26Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 62903c15da26Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 62913c15da26Smrg case $lt_outputfile in 62923c15da26Smrg *.exe|*.EXE) ;; 62933c15da26Smrg *) 62943c15da26Smrg lt_outputfile="$lt_outputfile.exe" 62953c15da26Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 62963c15da26Smrg ;; 62973c15da26Smrg esac~ 62983c15da26Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 62993c15da26Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 63003c15da26Smrg $RM "$lt_outputfile.manifest"; 63013c15da26Smrg fi' 63023c15da26Smrg ;; 63033c15da26Smrg *) 63043c15da26Smrg # Assume MSVC wrapper 63053c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 63063c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 63073c15da26Smrg # Tell ltmain to make .lib files, not .a files. 63083c15da26Smrg libext=lib 63093c15da26Smrg # Tell ltmain to make .dll files, not .so files. 63103c15da26Smrg shrext_cmds=".dll" 63113c15da26Smrg # FIXME: Setting linknames here is a bad hack. 63123c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 63133c15da26Smrg # The linker will automatically build a .lib file if we build a DLL. 63143c15da26Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 63153c15da26Smrg # FIXME: Should let the user specify the lib program. 63163c15da26Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 63173c15da26Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 63183c15da26Smrg ;; 63193c15da26Smrg esac 6320555991fdSmrg ;; 6321126a8a12Smrg 6322555991fdSmrg darwin* | rhapsody*) 6323555991fdSmrg _LT_DARWIN_LINKER_FEATURES($1) 6324555991fdSmrg ;; 6325126a8a12Smrg 6326555991fdSmrg dgux*) 6327555991fdSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6328555991fdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6329555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6330555991fdSmrg ;; 6331126a8a12Smrg 63323c15da26Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 63333c15da26Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 63343c15da26Smrg # does not break anything, and helps significantly (at the cost of a little 63353c15da26Smrg # extra space). 63363c15da26Smrg freebsd2.2*) 63373c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 63383c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63393c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63403c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63413c15da26Smrg ;; 63423c15da26Smrg 63433c15da26Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 63440a6b08f8Smrg freebsd2.*) 63453c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 63463c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63473c15da26Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63483c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63493c15da26Smrg ;; 63503c15da26Smrg 63513c15da26Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 63523c15da26Smrg freebsd* | dragonfly*) 63533c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 63543c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63553c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63563c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63573c15da26Smrg ;; 63583c15da26Smrg 63593c15da26Smrg hpux9*) 63603c15da26Smrg if test "$GCC" = yes; then 63613c15da26Smrg _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' 63623c15da26Smrg else 63633c15da26Smrg _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' 63643c15da26Smrg fi 63653c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63663c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63673c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63683c15da26Smrg 63693c15da26Smrg # hardcode_minus_L: Not really in the search PATH, 63703c15da26Smrg # but as the default location of the library. 63713c15da26Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63723c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63733c15da26Smrg ;; 63743c15da26Smrg 63753c15da26Smrg hpux10*) 63763c15da26Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63773c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 63783c15da26Smrg else 63793c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 63803c15da26Smrg fi 63813c15da26Smrg if test "$with_gnu_ld" = no; then 63823c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63833c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63843c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63853c15da26Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63863c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63873c15da26Smrg # hardcode_minus_L: Not really in the search PATH, 63883c15da26Smrg # but as the default location of the library. 63893c15da26Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63903c15da26Smrg fi 63913c15da26Smrg ;; 63923c15da26Smrg 63933c15da26Smrg hpux11*) 63943c15da26Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63953c15da26Smrg case $host_cpu in 63963c15da26Smrg hppa*64*) 63973c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63983c15da26Smrg ;; 63993c15da26Smrg ia64*) 64003c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64013c15da26Smrg ;; 64023c15da26Smrg *) 64033c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 64043c15da26Smrg ;; 64053c15da26Smrg esac 64063c15da26Smrg else 64073c15da26Smrg case $host_cpu in 64083c15da26Smrg hppa*64*) 64093c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64103c15da26Smrg ;; 64113c15da26Smrg ia64*) 64123c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64133c15da26Smrg ;; 64143c15da26Smrg *) 64153c15da26Smrg m4_if($1, [], [ 64163c15da26Smrg # Older versions of the 11.00 compiler do not understand -b yet 64173c15da26Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 64183c15da26Smrg _LT_LINKER_OPTION([if $CC understands -b], 64193c15da26Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 64203c15da26Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 64213c15da26Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 64223c15da26Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 64233c15da26Smrg ;; 64243c15da26Smrg esac 64253c15da26Smrg fi 64263c15da26Smrg if test "$with_gnu_ld" = no; then 64273c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 64283c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64293c15da26Smrg 64303c15da26Smrg case $host_cpu in 64313c15da26Smrg hppa*64*|ia64*) 64323c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=no 64333c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64343c15da26Smrg ;; 64353c15da26Smrg *) 64363c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64373c15da26Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64383c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 64393c15da26Smrg 64403c15da26Smrg # hardcode_minus_L: Not really in the search PATH, 64413c15da26Smrg # but as the default location of the library. 64423c15da26Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64433c15da26Smrg ;; 64443c15da26Smrg esac 64453c15da26Smrg fi 64463c15da26Smrg ;; 64473c15da26Smrg 64483c15da26Smrg irix5* | irix6* | nonstopux*) 64493c15da26Smrg if test "$GCC" = yes; then 64503c15da26Smrg _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' 64513c15da26Smrg # Try to use the -exported_symbol ld option, if it does not 64523c15da26Smrg # work, assume that -exports_file does not work either and 64533c15da26Smrg # implicitly export all symbols. 64543c15da26Smrg # This should be the same for all languages, so no per-tag cache variable. 64553c15da26Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 64563c15da26Smrg [lt_cv_irix_exported_symbol], 64573c15da26Smrg [save_LDFLAGS="$LDFLAGS" 64583c15da26Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 64593c15da26Smrg AC_LINK_IFELSE( 64603c15da26Smrg [AC_LANG_SOURCE( 64613c15da26Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 64623c15da26Smrg [C++], [[int foo (void) { return 0; }]], 64633c15da26Smrg [Fortran 77], [[ 64643c15da26Smrg subroutine foo 64653c15da26Smrg end]], 64663c15da26Smrg [Fortran], [[ 64673c15da26Smrg subroutine foo 64683c15da26Smrg end]])])], 64693c15da26Smrg [lt_cv_irix_exported_symbol=yes], 64703c15da26Smrg [lt_cv_irix_exported_symbol=no]) 64713c15da26Smrg LDFLAGS="$save_LDFLAGS"]) 64723c15da26Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 64733c15da26Smrg _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' 64743c15da26Smrg fi 64753c15da26Smrg else 64763c15da26Smrg _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' 64773c15da26Smrg _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' 64783c15da26Smrg fi 64793c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64803c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64813c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64823c15da26Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64833c15da26Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64843c15da26Smrg ;; 64853c15da26Smrg 64863c15da26Smrg netbsd*) 64873c15da26Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 64883c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 64893c15da26Smrg else 64903c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 64913c15da26Smrg fi 64923c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64933c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64943c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64953c15da26Smrg ;; 64963c15da26Smrg 64973c15da26Smrg newsos6) 64983c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64993c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65003c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65013c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65023c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65033c15da26Smrg ;; 65043c15da26Smrg 65053c15da26Smrg *nto* | *qnx*) 65063c15da26Smrg ;; 65073c15da26Smrg 65083c15da26Smrg openbsd*) 65093c15da26Smrg if test -f /usr/libexec/ld.so; then 65103c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65113c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65123c15da26Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65133c15da26Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 65143c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65153c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 65163c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65173c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 65183c15da26Smrg else 65193c15da26Smrg case $host_os in 65203c15da26Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 65213c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 65223c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65233c15da26Smrg ;; 65243c15da26Smrg *) 65253c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65263c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65273c15da26Smrg ;; 65283c15da26Smrg esac 65293c15da26Smrg fi 65303c15da26Smrg else 65313c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65323c15da26Smrg fi 65333c15da26Smrg ;; 65343c15da26Smrg 65353c15da26Smrg os2*) 65363c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65373c15da26Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65383c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 65393c15da26Smrg _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' 65403c15da26Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 65413c15da26Smrg ;; 65423c15da26Smrg 65433c15da26Smrg osf3*) 65443c15da26Smrg if test "$GCC" = yes; then 65453c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65463c15da26Smrg _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' 65473c15da26Smrg else 65483c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65493c15da26Smrg _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' 65503c15da26Smrg fi 65513c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65523c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65533c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65543c15da26Smrg ;; 65553c15da26Smrg 65563c15da26Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 65573c15da26Smrg if test "$GCC" = yes; then 65583c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65593c15da26Smrg _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' 65603c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65613c15da26Smrg else 65623c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65633c15da26Smrg _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' 65643c15da26Smrg _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~ 65653c15da26Smrg $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' 65663c15da26Smrg 65673c15da26Smrg # Both c and cxx compiler support -rpath directly 65683c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65693c15da26Smrg fi 65703c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65713c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65723c15da26Smrg ;; 65733c15da26Smrg 65743c15da26Smrg solaris*) 65753c15da26Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 65763c15da26Smrg if test "$GCC" = yes; then 65773c15da26Smrg wlarc='${wl}' 65783c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 65793c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65803c15da26Smrg $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' 65813c15da26Smrg else 65823c15da26Smrg case `$CC -V 2>&1` in 65833c15da26Smrg *"Compilers 5.0"*) 65843c15da26Smrg wlarc='' 65853c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 65863c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65873c15da26Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 65883c15da26Smrg ;; 65893c15da26Smrg *) 65903c15da26Smrg wlarc='${wl}' 65913c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 65923c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65933c15da26Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 65943c15da26Smrg ;; 65953c15da26Smrg esac 65963c15da26Smrg fi 65973c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65983c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65993c15da26Smrg case $host_os in 66003c15da26Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 66013c15da26Smrg *) 66023c15da26Smrg # The compiler driver will combine and reorder linker options, 66033c15da26Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 66043c15da26Smrg # but is careful enough not to reorder. 66053c15da26Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 66063c15da26Smrg if test "$GCC" = yes; then 66073c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 66083c15da26Smrg else 66093c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 66103c15da26Smrg fi 66113c15da26Smrg ;; 66123c15da26Smrg esac 66133c15da26Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66143c15da26Smrg ;; 66153c15da26Smrg 66163c15da26Smrg sunos4*) 66173c15da26Smrg if test "x$host_vendor" = xsequent; then 66183c15da26Smrg # Use $CC to link under sequent, because it throws in some extra .o 66193c15da26Smrg # files that make .init and .fini sections work. 66203c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 66213c15da26Smrg else 66223c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 66233c15da26Smrg fi 66243c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66253c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 66263c15da26Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 66273c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66283c15da26Smrg ;; 66293c15da26Smrg 66303c15da26Smrg sysv4) 66313c15da26Smrg case $host_vendor in 66323c15da26Smrg sni) 66333c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66343c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 66353c15da26Smrg ;; 66363c15da26Smrg siemens) 66373c15da26Smrg ## LD is ld it makes a PLAMLIB 66383c15da26Smrg ## CC just makes a GrossModule. 66393c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 66403c15da26Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 66413c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=no 66423c15da26Smrg ;; 66433c15da26Smrg motorola) 66443c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66453c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 66463c15da26Smrg ;; 66473c15da26Smrg esac 66483c15da26Smrg runpath_var='LD_RUN_PATH' 66493c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66503c15da26Smrg ;; 66513c15da26Smrg 66523c15da26Smrg sysv4.3*) 66533c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66543c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66553c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 66563c15da26Smrg ;; 66573c15da26Smrg 66583c15da26Smrg sysv4*MP*) 66593c15da26Smrg if test -d /usr/nec; then 66603c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66613c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66623c15da26Smrg runpath_var=LD_RUN_PATH 66633c15da26Smrg hardcode_runpath_var=yes 66643c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 66653c15da26Smrg fi 66663c15da26Smrg ;; 66673c15da26Smrg 66683c15da26Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 66693c15da26Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66703c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66713c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66723c15da26Smrg runpath_var='LD_RUN_PATH' 66733c15da26Smrg 66743c15da26Smrg if test "$GCC" = yes; then 66753c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66763c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66773c15da26Smrg else 66783c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66793c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66803c15da26Smrg fi 66813c15da26Smrg ;; 66823c15da26Smrg 66833c15da26Smrg sysv5* | sco3.2v5* | sco5v6*) 66843c15da26Smrg # Note: We can NOT use -z defs as we might desire, because we do not 66853c15da26Smrg # link with -lc, and that would cause any symbols used from libc to 66863c15da26Smrg # always be unresolved, which means just about no library would 66873c15da26Smrg # ever link correctly. If we're not using GNU ld we use -z text 66883c15da26Smrg # though, which does catch some bad symbols but isn't as heavy-handed 66893c15da26Smrg # as -z defs. 66903c15da26Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66913c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 66923c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66933c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66943c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 66953c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 66963c15da26Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66973c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 66983c15da26Smrg runpath_var='LD_RUN_PATH' 66993c15da26Smrg 67003c15da26Smrg if test "$GCC" = yes; then 67013c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67023c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67033c15da26Smrg else 67043c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67053c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67063c15da26Smrg fi 67073c15da26Smrg ;; 67083c15da26Smrg 67093c15da26Smrg uts4*) 67103c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 67113c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67123c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67133c15da26Smrg ;; 67143c15da26Smrg 67153c15da26Smrg *) 67163c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67173c15da26Smrg ;; 67183c15da26Smrg esac 67193c15da26Smrg 67203c15da26Smrg if test x$host_vendor = xsni; then 67213c15da26Smrg case $host in 67223c15da26Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 67233c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 67243c15da26Smrg ;; 67253c15da26Smrg esac 67263c15da26Smrg fi 67273c15da26Smrg fi 67283c15da26Smrg]) 67293c15da26SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 67303c15da26Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 67313c15da26Smrg 67323c15da26Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 67333c15da26Smrg 67343c15da26Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 67353c15da26Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 67363c15da26Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 67373c15da26Smrg [The commands to extract the exported symbol list from a shared archive]) 67383c15da26Smrg 67393c15da26Smrg# 67403c15da26Smrg# Do we need to explicitly link libc? 67413c15da26Smrg# 67423c15da26Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 67433c15da26Smrgx|xyes) 67443c15da26Smrg # Assume -lc should be added 67453c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67463c15da26Smrg 67473c15da26Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 67483c15da26Smrg case $_LT_TAGVAR(archive_cmds, $1) in 67493c15da26Smrg *'~'*) 67503c15da26Smrg # FIXME: we may have to deal with multi-command sequences. 67513c15da26Smrg ;; 67523c15da26Smrg '$CC '*) 67533c15da26Smrg # Test whether the compiler implicitly links with -lc since on some 67543c15da26Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 67553c15da26Smrg # to ld, don't add -lc before -lgcc. 67563c15da26Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 67573c15da26Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 67583c15da26Smrg [$RM conftest* 67593c15da26Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 67603c15da26Smrg 67613c15da26Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 67623c15da26Smrg soname=conftest 67633c15da26Smrg lib=conftest 67643c15da26Smrg libobjs=conftest.$ac_objext 67653c15da26Smrg deplibs= 67663c15da26Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 67673c15da26Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 67683c15da26Smrg compiler_flags=-v 67693c15da26Smrg linker_flags=-v 67703c15da26Smrg verstring= 67713c15da26Smrg output_objdir=. 67723c15da26Smrg libname=conftest 67733c15da26Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 67743c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 67753c15da26Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 67763c15da26Smrg then 67773c15da26Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67783c15da26Smrg else 67793c15da26Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67803c15da26Smrg fi 67813c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 67823c15da26Smrg else 67833c15da26Smrg cat conftest.err 1>&5 67843c15da26Smrg fi 67853c15da26Smrg $RM conftest* 67863c15da26Smrg ]) 67873c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 67883c15da26Smrg ;; 67893c15da26Smrg esac 67903c15da26Smrg fi 67913c15da26Smrg ;; 67923c15da26Smrgesac 67933c15da26Smrg 67943c15da26Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 67953c15da26Smrg [Whether or not to add -lc for building shared libraries]) 67963c15da26Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 67973c15da26Smrg [enable_shared_with_static_runtimes], [0], 67983c15da26Smrg [Whether or not to disallow shared libs when runtime libs are static]) 67993c15da26Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 68003c15da26Smrg [Compiler flag to allow reflexive dlopens]) 68013c15da26Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 68023c15da26Smrg [Compiler flag to generate shared objects directly from archives]) 68033c15da26Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 68043c15da26Smrg [Whether the compiler copes with passing no objects directly]) 68053c15da26Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 68063c15da26Smrg [Create an old-style archive from a shared archive]) 68073c15da26Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 68083c15da26Smrg [Create a temporary old-style archive to link instead of a shared archive]) 68093c15da26Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 68103c15da26Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 68113c15da26Smrg_LT_TAGDECL([], [module_cmds], [2], 68123c15da26Smrg [Commands used to build a loadable module if different from building 68133c15da26Smrg a shared archive.]) 68143c15da26Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 68153c15da26Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 68163c15da26Smrg [Whether we are building with GNU ld or not]) 68173c15da26Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 68183c15da26Smrg [Flag that allows shared libraries with undefined symbols to be built]) 68193c15da26Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 68203c15da26Smrg [Flag that enforces no undefined symbols]) 68213c15da26Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 68223c15da26Smrg [Flag to hardcode $libdir into a binary during linking. 68233c15da26Smrg This must work even if $libdir does not exist]) 68243c15da26Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 68253c15da26Smrg [Whether we need a single "-rpath" flag with a separated argument]) 68263c15da26Smrg_LT_TAGDECL([], [hardcode_direct], [0], 68273c15da26Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68283c15da26Smrg DIR into the resulting binary]) 68293c15da26Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 68303c15da26Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68313c15da26Smrg DIR into the resulting binary and the resulting library dependency is 68323c15da26Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 68333c15da26Smrg library is relocated]) 68343c15da26Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 68353c15da26Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 68363c15da26Smrg into the resulting binary]) 68373c15da26Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 68383c15da26Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 68393c15da26Smrg into the resulting binary]) 68403c15da26Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 68413c15da26Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 68423c15da26Smrg into the library and all subsequent libraries and executables linked 68433c15da26Smrg against it]) 68443c15da26Smrg_LT_TAGDECL([], [inherit_rpath], [0], 68453c15da26Smrg [Set to yes if linker adds runtime paths of dependent libraries 68463c15da26Smrg to runtime path list]) 68473c15da26Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 68483c15da26Smrg [Whether libtool must link a program against all its dependency libraries]) 68493c15da26Smrg_LT_TAGDECL([], [always_export_symbols], [0], 68503c15da26Smrg [Set to "yes" if exported symbols are required]) 68513c15da26Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 68523c15da26Smrg [The commands to list exported symbols]) 68533c15da26Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 68543c15da26Smrg [Symbols that should not be listed in the preloaded symbols]) 68553c15da26Smrg_LT_TAGDECL([], [include_expsyms], [1], 68563c15da26Smrg [Symbols that must always be exported]) 68573c15da26Smrg_LT_TAGDECL([], [prelink_cmds], [2], 68583c15da26Smrg [Commands necessary for linking programs (against libraries) with templates]) 68593c15da26Smrg_LT_TAGDECL([], [postlink_cmds], [2], 68603c15da26Smrg [Commands necessary for finishing linking programs]) 68613c15da26Smrg_LT_TAGDECL([], [file_list_spec], [1], 68623c15da26Smrg [Specify filename containing input files]) 68633c15da26Smrgdnl FIXME: Not yet implemented 68643c15da26Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 68653c15da26Smrgdnl [Compiler flag to generate thread safe objects]) 68663c15da26Smrg])# _LT_LINKER_SHLIBS 68673c15da26Smrg 68683c15da26Smrg 68693c15da26Smrg# _LT_LANG_C_CONFIG([TAG]) 68703c15da26Smrg# ------------------------ 68713c15da26Smrg# Ensure that the configuration variables for a C compiler are suitably 68723c15da26Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 68733c15da26Smrg# the compiler configuration to `libtool'. 68743c15da26Smrgm4_defun([_LT_LANG_C_CONFIG], 68753c15da26Smrg[m4_require([_LT_DECL_EGREP])dnl 68763c15da26Smrglt_save_CC="$CC" 68773c15da26SmrgAC_LANG_PUSH(C) 68783c15da26Smrg 68793c15da26Smrg# Source file extension for C test sources. 68803c15da26Smrgac_ext=c 68813c15da26Smrg 68823c15da26Smrg# Object file extension for compiled C test sources. 68833c15da26Smrgobjext=o 68843c15da26Smrg_LT_TAGVAR(objext, $1)=$objext 68853c15da26Smrg 68863c15da26Smrg# Code to be used in simple compile tests 68873c15da26Smrglt_simple_compile_test_code="int some_variable = 0;" 68883c15da26Smrg 68893c15da26Smrg# Code to be used in simple link tests 68903c15da26Smrglt_simple_link_test_code='int main(){return(0);}' 68913c15da26Smrg 68923c15da26Smrg_LT_TAG_COMPILER 68933c15da26Smrg# Save the default compiler, since it gets overwritten when the other 68943c15da26Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 68953c15da26Smrgcompiler_DEFAULT=$CC 68963c15da26Smrg 68973c15da26Smrg# save warnings/boilerplate of simple test code 68983c15da26Smrg_LT_COMPILER_BOILERPLATE 68993c15da26Smrg_LT_LINKER_BOILERPLATE 69003c15da26Smrg 69013c15da26Smrgif test -n "$compiler"; then 69023c15da26Smrg _LT_COMPILER_NO_RTTI($1) 69033c15da26Smrg _LT_COMPILER_PIC($1) 69043c15da26Smrg _LT_COMPILER_C_O($1) 69053c15da26Smrg _LT_COMPILER_FILE_LOCKS($1) 69063c15da26Smrg _LT_LINKER_SHLIBS($1) 69073c15da26Smrg _LT_SYS_DYNAMIC_LINKER($1) 69083c15da26Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 69093c15da26Smrg LT_SYS_DLOPEN_SELF 69103c15da26Smrg _LT_CMD_STRIPLIB 69113c15da26Smrg 69123c15da26Smrg # Report which library types will actually be built 69133c15da26Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 69143c15da26Smrg AC_MSG_RESULT([$can_build_shared]) 69153c15da26Smrg 69163c15da26Smrg AC_MSG_CHECKING([whether to build shared libraries]) 69173c15da26Smrg test "$can_build_shared" = "no" && enable_shared=no 69183c15da26Smrg 69193c15da26Smrg # On AIX, shared libraries and static libraries use the same namespace, and 69203c15da26Smrg # are all built from PIC. 69213c15da26Smrg case $host_os in 69223c15da26Smrg aix3*) 69233c15da26Smrg test "$enable_shared" = yes && enable_static=no 69243c15da26Smrg if test -n "$RANLIB"; then 69253c15da26Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 69263c15da26Smrg postinstall_cmds='$RANLIB $lib' 69273c15da26Smrg fi 69283c15da26Smrg ;; 69293c15da26Smrg 69303c15da26Smrg aix[[4-9]]*) 69313c15da26Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 69323c15da26Smrg test "$enable_shared" = yes && enable_static=no 69333c15da26Smrg fi 69343c15da26Smrg ;; 69353c15da26Smrg esac 69363c15da26Smrg AC_MSG_RESULT([$enable_shared]) 69373c15da26Smrg 69383c15da26Smrg AC_MSG_CHECKING([whether to build static libraries]) 69393c15da26Smrg # Make sure either enable_shared or enable_static is yes. 69403c15da26Smrg test "$enable_shared" = yes || enable_static=yes 69413c15da26Smrg AC_MSG_RESULT([$enable_static]) 69423c15da26Smrg 69433c15da26Smrg _LT_CONFIG($1) 69443c15da26Smrgfi 69453c15da26SmrgAC_LANG_POP 69463c15da26SmrgCC="$lt_save_CC" 69473c15da26Smrg])# _LT_LANG_C_CONFIG 69483c15da26Smrg 69493c15da26Smrg 69503c15da26Smrg# _LT_LANG_CXX_CONFIG([TAG]) 69513c15da26Smrg# -------------------------- 69523c15da26Smrg# Ensure that the configuration variables for a C++ compiler are suitably 69533c15da26Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 69543c15da26Smrg# the compiler configuration to `libtool'. 69553c15da26Smrgm4_defun([_LT_LANG_CXX_CONFIG], 69563c15da26Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69573c15da26Smrgm4_require([_LT_DECL_EGREP])dnl 69583c15da26Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 69593c15da26Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 69603c15da26Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 69613c15da26Smrg (test "X$CXX" != "Xg++"))) ; then 69623c15da26Smrg AC_PROG_CXXCPP 69633c15da26Smrgelse 69643c15da26Smrg _lt_caught_CXX_error=yes 69653c15da26Smrgfi 69663c15da26Smrg 69673c15da26SmrgAC_LANG_PUSH(C++) 69683c15da26Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 69693c15da26Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 69703c15da26Smrg_LT_TAGVAR(always_export_symbols, $1)=no 69713c15da26Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 69723c15da26Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 69733c15da26Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 69743c15da26Smrg_LT_TAGVAR(hardcode_direct, $1)=no 69753c15da26Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 69763c15da26Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 69773c15da26Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 69783c15da26Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 69793c15da26Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 69803c15da26Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 69813c15da26Smrg_LT_TAGVAR(inherit_rpath, $1)=no 69823c15da26Smrg_LT_TAGVAR(module_cmds, $1)= 69833c15da26Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 69843c15da26Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 69853c15da26Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 69863c15da26Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 69873c15da26Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 69883c15da26Smrg_LT_TAGVAR(no_undefined_flag, $1)= 69893c15da26Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 69903c15da26Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 69913c15da26Smrg 69923c15da26Smrg# Source file extension for C++ test sources. 69933c15da26Smrgac_ext=cpp 69943c15da26Smrg 69953c15da26Smrg# Object file extension for compiled C++ test sources. 69963c15da26Smrgobjext=o 69973c15da26Smrg_LT_TAGVAR(objext, $1)=$objext 69983c15da26Smrg 69993c15da26Smrg# No sense in running all these tests if we already determined that 70003c15da26Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 70013c15da26Smrg# are currently assumed to apply to all compilers on this platform, 70023c15da26Smrg# and will be corrupted by setting them based on a non-working compiler. 70033c15da26Smrgif test "$_lt_caught_CXX_error" != yes; then 70043c15da26Smrg # Code to be used in simple compile tests 70053c15da26Smrg lt_simple_compile_test_code="int some_variable = 0;" 70063c15da26Smrg 70073c15da26Smrg # Code to be used in simple link tests 70083c15da26Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 70093c15da26Smrg 70103c15da26Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 70113c15da26Smrg _LT_TAG_COMPILER 70123c15da26Smrg 70133c15da26Smrg # save warnings/boilerplate of simple test code 70143c15da26Smrg _LT_COMPILER_BOILERPLATE 70153c15da26Smrg _LT_LINKER_BOILERPLATE 70163c15da26Smrg 70173c15da26Smrg # Allow CC to be a program name with arguments. 70183c15da26Smrg lt_save_CC=$CC 70193c15da26Smrg lt_save_CFLAGS=$CFLAGS 70203c15da26Smrg lt_save_LD=$LD 70213c15da26Smrg lt_save_GCC=$GCC 70223c15da26Smrg GCC=$GXX 70233c15da26Smrg lt_save_with_gnu_ld=$with_gnu_ld 70243c15da26Smrg lt_save_path_LD=$lt_cv_path_LD 70253c15da26Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 70263c15da26Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 70273c15da26Smrg else 70283c15da26Smrg $as_unset lt_cv_prog_gnu_ld 70293c15da26Smrg fi 70303c15da26Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 70313c15da26Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 70323c15da26Smrg else 70333c15da26Smrg $as_unset lt_cv_path_LD 70343c15da26Smrg fi 70353c15da26Smrg test -z "${LDCXX+set}" || LD=$LDCXX 70363c15da26Smrg CC=${CXX-"c++"} 70373c15da26Smrg CFLAGS=$CXXFLAGS 70383c15da26Smrg compiler=$CC 70393c15da26Smrg _LT_TAGVAR(compiler, $1)=$CC 70403c15da26Smrg _LT_CC_BASENAME([$compiler]) 70413c15da26Smrg 70423c15da26Smrg if test -n "$compiler"; then 70433c15da26Smrg # We don't want -fno-exception when compiling C++ code, so set the 70443c15da26Smrg # no_builtin_flag separately 70453c15da26Smrg if test "$GXX" = yes; then 70463c15da26Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 70473c15da26Smrg else 70483c15da26Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 70493c15da26Smrg fi 70503c15da26Smrg 70513c15da26Smrg if test "$GXX" = yes; then 70523c15da26Smrg # Set up default GNU C++ configuration 70533c15da26Smrg 70543c15da26Smrg LT_PATH_LD 70553c15da26Smrg 70563c15da26Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 70573c15da26Smrg # archiving commands below assume that GNU ld is being used. 70583c15da26Smrg if test "$with_gnu_ld" = yes; then 70593c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 70603c15da26Smrg _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' 70613c15da26Smrg 70623c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 70633c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 70643c15da26Smrg 70653c15da26Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 70663c15da26Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 70673c15da26Smrg # investigate it a little bit more. (MM) 70683c15da26Smrg wlarc='${wl}' 70693c15da26Smrg 70703c15da26Smrg # ancient GNU ld didn't support --whole-archive et. al. 70713c15da26Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 70723c15da26Smrg $GREP 'no-whole-archive' > /dev/null; then 70733c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 70743c15da26Smrg else 70753c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 70763c15da26Smrg fi 70773c15da26Smrg else 70783c15da26Smrg with_gnu_ld=no 70793c15da26Smrg wlarc= 70803c15da26Smrg 70813c15da26Smrg # A generic and very simple default shared library creation 70823c15da26Smrg # command for GNU C++ for the case where it uses the native 70833c15da26Smrg # linker, instead of GNU ld. If possible, this setting should 70843c15da26Smrg # overridden to take advantage of the native linker features on 70853c15da26Smrg # the platform it is being used on. 70863c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 70873c15da26Smrg fi 70883c15da26Smrg 70893c15da26Smrg # Commands to make compiler produce verbose output that lists 70903c15da26Smrg # what "hidden" libraries, object files and flags are used when 70913c15da26Smrg # linking a shared library. 70923c15da26Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 70933c15da26Smrg 70943c15da26Smrg else 70953c15da26Smrg GXX=no 70963c15da26Smrg with_gnu_ld=no 70973c15da26Smrg wlarc= 70983c15da26Smrg fi 70993c15da26Smrg 71003c15da26Smrg # PORTME: fill in a description of your system's C++ link characteristics 71013c15da26Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 71023c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71033c15da26Smrg case $host_os in 71043c15da26Smrg aix3*) 71053c15da26Smrg # FIXME: insert proper C++ library support 71063c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71073c15da26Smrg ;; 71083c15da26Smrg aix[[4-9]]*) 71093c15da26Smrg if test "$host_cpu" = ia64; then 71103c15da26Smrg # On IA64, the linker does run time linking by default, so we don't 71113c15da26Smrg # have to do anything special. 71123c15da26Smrg aix_use_runtimelinking=no 71133c15da26Smrg exp_sym_flag='-Bexport' 71143c15da26Smrg no_entry_flag="" 71153c15da26Smrg else 71163c15da26Smrg aix_use_runtimelinking=no 71173c15da26Smrg 71183c15da26Smrg # Test if we are trying to use run time linking or normal 71193c15da26Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 71203c15da26Smrg # need to do runtime linking. 71213c15da26Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 71223c15da26Smrg for ld_flag in $LDFLAGS; do 71233c15da26Smrg case $ld_flag in 71243c15da26Smrg *-brtl*) 71253c15da26Smrg aix_use_runtimelinking=yes 71263c15da26Smrg break 71273c15da26Smrg ;; 71283c15da26Smrg esac 71293c15da26Smrg done 71303c15da26Smrg ;; 71313c15da26Smrg esac 71323c15da26Smrg 71333c15da26Smrg exp_sym_flag='-bexport' 71343c15da26Smrg no_entry_flag='-bnoentry' 71353c15da26Smrg fi 71363c15da26Smrg 71373c15da26Smrg # When large executables or shared objects are built, AIX ld can 71383c15da26Smrg # have problems creating the table of contents. If linking a library 71393c15da26Smrg # or program results in "error TOC overflow" add -mminimal-toc to 71403c15da26Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 71413c15da26Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 71423c15da26Smrg 71433c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='' 71443c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71453c15da26Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71463c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 71473c15da26Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 71483c15da26Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 71493c15da26Smrg 71503c15da26Smrg if test "$GXX" = yes; then 71513c15da26Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 71523c15da26Smrg # We only want to do this on AIX 4.2 and lower, the check 71533c15da26Smrg # below for broken collect2 doesn't work under 4.3+ 71543c15da26Smrg collect2name=`${CC} -print-prog-name=collect2` 71553c15da26Smrg if test -f "$collect2name" && 71563c15da26Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 71573c15da26Smrg then 71583c15da26Smrg # We have reworked collect2 71593c15da26Smrg : 71603c15da26Smrg else 71613c15da26Smrg # We have old collect2 71623c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 71633c15da26Smrg # It fails to find uninstalled libraries when the uninstalled 71643c15da26Smrg # path is not listed in the libpath. Setting hardcode_minus_L 71653c15da26Smrg # to unsupported forces relinking 71663c15da26Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 71673c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71683c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 71693c15da26Smrg fi 71703c15da26Smrg esac 71713c15da26Smrg shared_flag='-shared' 71723c15da26Smrg if test "$aix_use_runtimelinking" = yes; then 71733c15da26Smrg shared_flag="$shared_flag "'${wl}-G' 71743c15da26Smrg fi 71753c15da26Smrg else 71763c15da26Smrg # not using gcc 71773c15da26Smrg if test "$host_cpu" = ia64; then 71783c15da26Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 71793c15da26Smrg # chokes on -Wl,-G. The following line is correct: 71803c15da26Smrg shared_flag='-G' 71813c15da26Smrg else 71823c15da26Smrg if test "$aix_use_runtimelinking" = yes; then 71833c15da26Smrg shared_flag='${wl}-G' 71843c15da26Smrg else 71853c15da26Smrg shared_flag='${wl}-bM:SRE' 71863c15da26Smrg fi 71873c15da26Smrg fi 71883c15da26Smrg fi 71893c15da26Smrg 71903c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 71913c15da26Smrg # It seems that -bexpall does not export symbols beginning with 71923c15da26Smrg # underscore (_), so it is better to generate a list of symbols to 71933c15da26Smrg # export. 71943c15da26Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 71953c15da26Smrg if test "$aix_use_runtimelinking" = yes; then 71963c15da26Smrg # Warning - without using the other runtime loading flags (-brtl), 71973c15da26Smrg # -berok will link without error, but may produce a broken library. 71983c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 71993c15da26Smrg # Determine the default libpath from the value encoded in an empty 72003c15da26Smrg # executable. 72013c15da26Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 72023c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72033c15da26Smrg 72043c15da26Smrg _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" 72053c15da26Smrg else 72063c15da26Smrg if test "$host_cpu" = ia64; then 72073c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 72083c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 72093c15da26Smrg _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" 72103c15da26Smrg else 72113c15da26Smrg # Determine the default libpath from the value encoded in an 72123c15da26Smrg # empty executable. 72133c15da26Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 72143c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72153c15da26Smrg # Warning - without using the other run time loading flags, 72163c15da26Smrg # -berok will link without error, but may produce a broken library. 72173c15da26Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 72183c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 72193c15da26Smrg if test "$with_gnu_ld" = yes; then 72203c15da26Smrg # We only use this code for GNU lds that support --whole-archive. 72213c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 72223c15da26Smrg else 72233c15da26Smrg # Exported symbols can be pulled into shared objects from archives 72243c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 72253c15da26Smrg fi 72263c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 72273c15da26Smrg # This is similar to how AIX traditionally builds its shared 72283c15da26Smrg # libraries. 72293c15da26Smrg _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' 72303c15da26Smrg fi 72313c15da26Smrg fi 72323c15da26Smrg ;; 72333c15da26Smrg 72343c15da26Smrg beos*) 72353c15da26Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 72363c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72373c15da26Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 72383c15da26Smrg # support --undefined. This deserves some investigation. FIXME 72393c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72403c15da26Smrg else 72413c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72423c15da26Smrg fi 72433c15da26Smrg ;; 72443c15da26Smrg 72453c15da26Smrg chorus*) 72463c15da26Smrg case $cc_basename in 72473c15da26Smrg *) 72483c15da26Smrg # FIXME: insert proper C++ library support 72493c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72503c15da26Smrg ;; 72513c15da26Smrg esac 72523c15da26Smrg ;; 72533c15da26Smrg 72543c15da26Smrg cygwin* | mingw* | pw32* | cegcc*) 72553c15da26Smrg case $GXX,$cc_basename in 72563c15da26Smrg ,cl* | no,cl*) 72573c15da26Smrg # Native MSVC 72583c15da26Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 72593c15da26Smrg # no search path for DLLs. 72603c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 72613c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72623c15da26Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 72633c15da26Smrg _LT_TAGVAR(file_list_spec, $1)='@' 72643c15da26Smrg # Tell ltmain to make .lib files, not .a files. 72653c15da26Smrg libext=lib 72663c15da26Smrg # Tell ltmain to make .dll files, not .so files. 72673c15da26Smrg shrext_cmds=".dll" 72683c15da26Smrg # FIXME: Setting linknames here is a bad hack. 72693c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 72703c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72713c15da26Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 72723c15da26Smrg else 72733c15da26Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 72743c15da26Smrg fi~ 72753c15da26Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 72763c15da26Smrg linknames=' 72773c15da26Smrg # The linker will not automatically build a static lib if we build a DLL. 72783c15da26Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 72793c15da26Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 72803c15da26Smrg # Don't use ranlib 72813c15da26Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 72823c15da26Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 72833c15da26Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 72843c15da26Smrg case $lt_outputfile in 72853c15da26Smrg *.exe|*.EXE) ;; 72863c15da26Smrg *) 72873c15da26Smrg lt_outputfile="$lt_outputfile.exe" 72883c15da26Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 72893c15da26Smrg ;; 72903c15da26Smrg esac~ 72913c15da26Smrg func_to_tool_file "$lt_outputfile"~ 72923c15da26Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 72933c15da26Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 72943c15da26Smrg $RM "$lt_outputfile.manifest"; 72953c15da26Smrg fi' 72963c15da26Smrg ;; 72973c15da26Smrg *) 72983c15da26Smrg # g++ 72993c15da26Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 73003c15da26Smrg # as there is no search path for DLLs. 73013c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 73023c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 73033c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 73043c15da26Smrg _LT_TAGVAR(always_export_symbols, $1)=no 73053c15da26Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 73063c15da26Smrg 73073c15da26Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 73083c15da26Smrg _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' 73093c15da26Smrg # If the export-symbols file already is a .def file (1st line 73103c15da26Smrg # is EXPORTS), use it as is; otherwise, prepend... 73113c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 73123c15da26Smrg cp $export_symbols $output_objdir/$soname.def; 73133c15da26Smrg else 73143c15da26Smrg echo EXPORTS > $output_objdir/$soname.def; 73153c15da26Smrg cat $export_symbols >> $output_objdir/$soname.def; 73163c15da26Smrg fi~ 73173c15da26Smrg $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' 73183c15da26Smrg else 73193c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73203c15da26Smrg fi 73213c15da26Smrg ;; 73223c15da26Smrg esac 73233c15da26Smrg ;; 73243c15da26Smrg darwin* | rhapsody*) 73253c15da26Smrg _LT_DARWIN_LINKER_FEATURES($1) 73263c15da26Smrg ;; 73273c15da26Smrg 73283c15da26Smrg dgux*) 73293c15da26Smrg case $cc_basename in 73303c15da26Smrg ec++*) 73313c15da26Smrg # FIXME: insert proper C++ library support 73323c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73333c15da26Smrg ;; 73343c15da26Smrg ghcx*) 73353c15da26Smrg # Green Hills C++ Compiler 73363c15da26Smrg # FIXME: insert proper C++ library support 73373c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73383c15da26Smrg ;; 73393c15da26Smrg *) 73403c15da26Smrg # FIXME: insert proper C++ library support 73413c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73423c15da26Smrg ;; 73433c15da26Smrg esac 73443c15da26Smrg ;; 73453c15da26Smrg 73460a6b08f8Smrg freebsd2.*) 73473c15da26Smrg # C++ shared libraries reported to be fairly broken before 73483c15da26Smrg # switch to ELF 73493c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73503c15da26Smrg ;; 73513c15da26Smrg 73523c15da26Smrg freebsd-elf*) 73533c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73543c15da26Smrg ;; 73553c15da26Smrg 73563c15da26Smrg freebsd* | dragonfly*) 73573c15da26Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 73583c15da26Smrg # conventions 73593c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 73603c15da26Smrg ;; 73613c15da26Smrg 73623c15da26Smrg gnu*) 73633c15da26Smrg ;; 73643c15da26Smrg 73653c15da26Smrg haiku*) 73663c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 73673c15da26Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73683c15da26Smrg ;; 73693c15da26Smrg 73703c15da26Smrg hpux9*) 73713c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73723c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73733c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73743c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 73753c15da26Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73763c15da26Smrg # but as the default 73773c15da26Smrg # location of the library. 73783c15da26Smrg 73793c15da26Smrg case $cc_basename in 73803c15da26Smrg CC*) 73813c15da26Smrg # FIXME: insert proper C++ library support 73823c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73833c15da26Smrg ;; 73843c15da26Smrg aCC*) 73853c15da26Smrg _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' 73863c15da26Smrg # Commands to make compiler produce verbose output that lists 73873c15da26Smrg # what "hidden" libraries, object files and flags are used when 73883c15da26Smrg # linking a shared library. 73893c15da26Smrg # 73903c15da26Smrg # There doesn't appear to be a way to prevent this compiler from 73913c15da26Smrg # explicitly linking system object files so we need to strip them 73923c15da26Smrg # from the output so that they don't get included in the library 73933c15da26Smrg # dependencies. 73943c15da26Smrg 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"' 73953c15da26Smrg ;; 73963c15da26Smrg *) 73973c15da26Smrg if test "$GXX" = yes; then 73983c15da26Smrg _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' 73993c15da26Smrg else 74003c15da26Smrg # FIXME: insert proper C++ library support 74013c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74023c15da26Smrg fi 74033c15da26Smrg ;; 74043c15da26Smrg esac 74053c15da26Smrg ;; 74063c15da26Smrg 74073c15da26Smrg hpux10*|hpux11*) 74083c15da26Smrg if test $with_gnu_ld = no; then 74093c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 74103c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74113c15da26Smrg 74123c15da26Smrg case $host_cpu in 74133c15da26Smrg hppa*64*|ia64*) 74143c15da26Smrg ;; 74153c15da26Smrg *) 74163c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74173c15da26Smrg ;; 74183c15da26Smrg esac 74193c15da26Smrg fi 74203c15da26Smrg case $host_cpu in 74213c15da26Smrg hppa*64*|ia64*) 74223c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74233c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74243c15da26Smrg ;; 74253c15da26Smrg *) 74263c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 74273c15da26Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 74283c15da26Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 74293c15da26Smrg # but as the default 74303c15da26Smrg # location of the library. 74313c15da26Smrg ;; 74323c15da26Smrg esac 74333c15da26Smrg 74343c15da26Smrg case $cc_basename in 74353c15da26Smrg CC*) 74363c15da26Smrg # FIXME: insert proper C++ library support 74373c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74383c15da26Smrg ;; 74393c15da26Smrg aCC*) 74403c15da26Smrg case $host_cpu in 74413c15da26Smrg hppa*64*) 74423c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74433c15da26Smrg ;; 74443c15da26Smrg ia64*) 74453c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74463c15da26Smrg ;; 74473c15da26Smrg *) 74483c15da26Smrg _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' 74493c15da26Smrg ;; 74503c15da26Smrg esac 74513c15da26Smrg # Commands to make compiler produce verbose output that lists 74523c15da26Smrg # what "hidden" libraries, object files and flags are used when 74533c15da26Smrg # linking a shared library. 74543c15da26Smrg # 74553c15da26Smrg # There doesn't appear to be a way to prevent this compiler from 74563c15da26Smrg # explicitly linking system object files so we need to strip them 74573c15da26Smrg # from the output so that they don't get included in the library 74583c15da26Smrg # dependencies. 74593c15da26Smrg 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"' 74603c15da26Smrg ;; 74613c15da26Smrg *) 74623c15da26Smrg if test "$GXX" = yes; then 74633c15da26Smrg if test $with_gnu_ld = no; then 74643c15da26Smrg case $host_cpu in 74653c15da26Smrg hppa*64*) 74663c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74673c15da26Smrg ;; 74683c15da26Smrg ia64*) 74693c15da26Smrg _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' 74703c15da26Smrg ;; 74713c15da26Smrg *) 74723c15da26Smrg _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' 74733c15da26Smrg ;; 74743c15da26Smrg esac 74753c15da26Smrg fi 74763c15da26Smrg else 74773c15da26Smrg # FIXME: insert proper C++ library support 74783c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74793c15da26Smrg fi 74803c15da26Smrg ;; 74813c15da26Smrg esac 74823c15da26Smrg ;; 74833c15da26Smrg 74843c15da26Smrg interix[[3-9]]*) 74853c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74863c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74873c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74883c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74893c15da26Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 74903c15da26Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 74913c15da26Smrg # default) and relocated if they conflict, which is a slow very memory 74923c15da26Smrg # consuming and fragmenting process. To avoid this, we pick a random, 74933c15da26Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 74943c15da26Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 74953c15da26Smrg _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' 74963c15da26Smrg _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' 74973c15da26Smrg ;; 74983c15da26Smrg irix5* | irix6*) 74993c15da26Smrg case $cc_basename in 75003c15da26Smrg CC*) 75013c15da26Smrg # SGI C++ 75023c15da26Smrg _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' 75033c15da26Smrg 75043c15da26Smrg # Archives containing C++ object files must be created using 75053c15da26Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 75063c15da26Smrg # necessary to make sure instantiated templates are included 75073c15da26Smrg # in the archive. 75083c15da26Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 75093c15da26Smrg ;; 75103c15da26Smrg *) 75113c15da26Smrg if test "$GXX" = yes; then 75123c15da26Smrg if test "$with_gnu_ld" = no; then 75133c15da26Smrg _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' 75143c15da26Smrg else 75153c15da26Smrg _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' 75163c15da26Smrg fi 75173c15da26Smrg fi 75183c15da26Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 75193c15da26Smrg ;; 75203c15da26Smrg esac 75213c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75223c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 75233c15da26Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 75243c15da26Smrg ;; 75253c15da26Smrg 75263c15da26Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 75273c15da26Smrg case $cc_basename in 75283c15da26Smrg KCC*) 75293c15da26Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 75303c15da26Smrg 75313c15da26Smrg # KCC will only create a shared library if the output file 75323c15da26Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 75333c15da26Smrg # to its proper name (with version) after linking. 75343c15da26Smrg _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' 75353c15da26Smrg _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' 75363c15da26Smrg # Commands to make compiler produce verbose output that lists 75373c15da26Smrg # what "hidden" libraries, object files and flags are used when 75383c15da26Smrg # linking a shared library. 75393c15da26Smrg # 75403c15da26Smrg # There doesn't appear to be a way to prevent this compiler from 75413c15da26Smrg # explicitly linking system object files so we need to strip them 75423c15da26Smrg # from the output so that they don't get included in the library 75433c15da26Smrg # dependencies. 75443c15da26Smrg 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"' 75453c15da26Smrg 75463c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75473c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75483c15da26Smrg 75493c15da26Smrg # Archives containing C++ object files must be created using 75503c15da26Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 75513c15da26Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 75523c15da26Smrg ;; 75533c15da26Smrg icpc* | ecpc* ) 75543c15da26Smrg # Intel C++ 75553c15da26Smrg with_gnu_ld=yes 75563c15da26Smrg # version 8.0 and above of icpc choke on multiply defined symbols 75573c15da26Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 75583c15da26Smrg # earlier do not add the objects themselves. 75593c15da26Smrg case `$CC -V 2>&1` in 75603c15da26Smrg *"Version 7."*) 75613c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75623c15da26Smrg _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' 75633c15da26Smrg ;; 75643c15da26Smrg *) # Version 8.0 or newer 75653c15da26Smrg tmp_idyn= 75663c15da26Smrg case $host_cpu in 75673c15da26Smrg ia64*) tmp_idyn=' -i_dynamic';; 75683c15da26Smrg esac 75693c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75703c15da26Smrg _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' 75713c15da26Smrg ;; 75723c15da26Smrg esac 75733c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 75743c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75753c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75763c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 75773c15da26Smrg ;; 75783c15da26Smrg pgCC* | pgcpp*) 75793c15da26Smrg # Portland Group C++ compiler 75803c15da26Smrg case `$CC -V` in 75813c15da26Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 75823c15da26Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 75833c15da26Smrg rm -rf $tpldir~ 75843c15da26Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 75853c15da26Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 75863c15da26Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 75873c15da26Smrg rm -rf $tpldir~ 75883c15da26Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 75893c15da26Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 75903c15da26Smrg $RANLIB $oldlib' 75913c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 75923c15da26Smrg rm -rf $tpldir~ 75933c15da26Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75943c15da26Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 75953c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 75963c15da26Smrg rm -rf $tpldir~ 75973c15da26Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75983c15da26Smrg $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' 75993c15da26Smrg ;; 76003c15da26Smrg *) # Version 6 and above use weak symbols 76013c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 76023c15da26Smrg _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' 76033c15da26Smrg ;; 76043c15da26Smrg esac 76053c15da26Smrg 76063c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 76073c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76083c15da26Smrg _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' 76093c15da26Smrg ;; 76103c15da26Smrg cxx*) 76113c15da26Smrg # Compaq C++ 76123c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 76133c15da26Smrg _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' 76143c15da26Smrg 76153c15da26Smrg runpath_var=LD_RUN_PATH 76163c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 76173c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 76183c15da26Smrg 76193c15da26Smrg # Commands to make compiler produce verbose output that lists 76203c15da26Smrg # what "hidden" libraries, object files and flags are used when 76213c15da26Smrg # linking a shared library. 76223c15da26Smrg # 76233c15da26Smrg # There doesn't appear to be a way to prevent this compiler from 76243c15da26Smrg # explicitly linking system object files so we need to strip them 76253c15da26Smrg # from the output so that they don't get included in the library 76263c15da26Smrg # dependencies. 76273c15da26Smrg 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' 76283c15da26Smrg ;; 76293c15da26Smrg xl* | mpixl* | bgxl*) 76303c15da26Smrg # IBM XL 8.0 on PPC, with GNU ld 76313c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76323c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76333c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 76343c15da26Smrg if test "x$supports_anon_versioning" = xyes; then 76353c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 76363c15da26Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 76373c15da26Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 76383c15da26Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 76393c15da26Smrg fi 76403c15da26Smrg ;; 76413c15da26Smrg *) 76423c15da26Smrg case `$CC -V 2>&1 | sed 5q` in 76433c15da26Smrg *Sun\ C*) 76443c15da26Smrg # Sun C++ 5.9 76453c15da26Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 76463c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 76473c15da26Smrg _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' 76483c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76493c15da26Smrg _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' 76503c15da26Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 76513c15da26Smrg 76523c15da26Smrg # Not sure whether something based on 76533c15da26Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 76543c15da26Smrg # would be better. 76553c15da26Smrg output_verbose_link_cmd='func_echo_all' 7656126a8a12Smrg 76573c15da26Smrg # Archives containing C++ object files must be created using 76583c15da26Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 76593c15da26Smrg # necessary to make sure instantiated templates are included 76603c15da26Smrg # in the archive. 76613c15da26Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 76623c15da26Smrg ;; 76633c15da26Smrg esac 76643c15da26Smrg ;; 76653c15da26Smrg esac 76663c15da26Smrg ;; 7667555991fdSmrg 76683c15da26Smrg lynxos*) 76693c15da26Smrg # FIXME: insert proper C++ library support 76703c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76713c15da26Smrg ;; 7672126a8a12Smrg 76733c15da26Smrg m88k*) 76743c15da26Smrg # FIXME: insert proper C++ library support 76753c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76763c15da26Smrg ;; 7677126a8a12Smrg 76783c15da26Smrg mvs*) 76793c15da26Smrg case $cc_basename in 76803c15da26Smrg cxx*) 76813c15da26Smrg # FIXME: insert proper C++ library support 76823c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76833c15da26Smrg ;; 76843c15da26Smrg *) 76853c15da26Smrg # FIXME: insert proper C++ library support 76863c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76873c15da26Smrg ;; 76883c15da26Smrg esac 76893c15da26Smrg ;; 7690126a8a12Smrg 76913c15da26Smrg netbsd*) 76923c15da26Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 76933c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 76943c15da26Smrg wlarc= 76953c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76963c15da26Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 76973c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 76983c15da26Smrg fi 76993c15da26Smrg # Workaround some broken pre-1.5 toolchains 77003c15da26Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 77013c15da26Smrg ;; 7702126a8a12Smrg 77033c15da26Smrg *nto* | *qnx*) 77043c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 77053c15da26Smrg ;; 7706126a8a12Smrg 77073c15da26Smrg openbsd2*) 77083c15da26Smrg # C++ shared libraries are fairly broken 77093c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77103c15da26Smrg ;; 7711126a8a12Smrg 77123c15da26Smrg openbsd*) 77133c15da26Smrg if test -f /usr/libexec/ld.so; then 7714555991fdSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 77153c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7716555991fdSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 77173c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 77183c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 77193c15da26Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 77203c15da26Smrg _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' 77213c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 77223c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 77233c15da26Smrg fi 77243c15da26Smrg output_verbose_link_cmd=func_echo_all 77253c15da26Smrg else 77263c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77273c15da26Smrg fi 77283c15da26Smrg ;; 7729126a8a12Smrg 77303c15da26Smrg osf3* | osf4* | osf5*) 77313c15da26Smrg case $cc_basename in 77323c15da26Smrg KCC*) 77333c15da26Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7734126a8a12Smrg 77353c15da26Smrg # KCC will only create a shared library if the output file 77363c15da26Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 77373c15da26Smrg # to its proper name (with version) after linking. 77383c15da26Smrg _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' 7739126a8a12Smrg 77403c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 77413c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77423c15da26Smrg 77433c15da26Smrg # Archives containing C++ object files must be created using 77443c15da26Smrg # the KAI C++ compiler. 77453c15da26Smrg case $host in 77463c15da26Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 77473c15da26Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 77483c15da26Smrg esac 77493c15da26Smrg ;; 77503c15da26Smrg RCC*) 77513c15da26Smrg # Rational C++ 2.4.1 77523c15da26Smrg # FIXME: insert proper C++ library support 77533c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77543c15da26Smrg ;; 77553c15da26Smrg cxx*) 77563c15da26Smrg case $host in 77573c15da26Smrg osf3*) 77583c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77593c15da26Smrg _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' 77603c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 77613c15da26Smrg ;; 77623c15da26Smrg *) 77633c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 77643c15da26Smrg _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' 77653c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 77663c15da26Smrg echo "-hidden">> $lib.exp~ 77673c15da26Smrg $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~ 77683c15da26Smrg $RM $lib.exp' 77693c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 77703c15da26Smrg ;; 77713c15da26Smrg esac 77723c15da26Smrg 77733c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77743c15da26Smrg 77753c15da26Smrg # Commands to make compiler produce verbose output that lists 77763c15da26Smrg # what "hidden" libraries, object files and flags are used when 77773c15da26Smrg # linking a shared library. 77783c15da26Smrg # 77793c15da26Smrg # There doesn't appear to be a way to prevent this compiler from 77803c15da26Smrg # explicitly linking system object files so we need to strip them 77813c15da26Smrg # from the output so that they don't get included in the library 77823c15da26Smrg # dependencies. 77833c15da26Smrg 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"' 77843c15da26Smrg ;; 77853c15da26Smrg *) 77863c15da26Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 77873c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77883c15da26Smrg case $host in 77893c15da26Smrg osf3*) 77903c15da26Smrg _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' 77913c15da26Smrg ;; 77923c15da26Smrg *) 77933c15da26Smrg _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' 77943c15da26Smrg ;; 77953c15da26Smrg esac 7796126a8a12Smrg 77973c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 77983c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7799126a8a12Smrg 78003c15da26Smrg # Commands to make compiler produce verbose output that lists 78013c15da26Smrg # what "hidden" libraries, object files and flags are used when 78023c15da26Smrg # linking a shared library. 78033c15da26Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7804126a8a12Smrg 78053c15da26Smrg else 78063c15da26Smrg # FIXME: insert proper C++ library support 78073c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78083c15da26Smrg fi 78093c15da26Smrg ;; 78103c15da26Smrg esac 78113c15da26Smrg ;; 7812126a8a12Smrg 78133c15da26Smrg psos*) 78143c15da26Smrg # FIXME: insert proper C++ library support 78153c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78163c15da26Smrg ;; 7817126a8a12Smrg 78183c15da26Smrg sunos4*) 78193c15da26Smrg case $cc_basename in 78203c15da26Smrg CC*) 78213c15da26Smrg # Sun C++ 4.x 78223c15da26Smrg # FIXME: insert proper C++ library support 78233c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78243c15da26Smrg ;; 78253c15da26Smrg lcc*) 78263c15da26Smrg # Lucid 78273c15da26Smrg # FIXME: insert proper C++ library support 78283c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78293c15da26Smrg ;; 78303c15da26Smrg *) 78313c15da26Smrg # FIXME: insert proper C++ library support 78323c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78333c15da26Smrg ;; 78343c15da26Smrg esac 78353c15da26Smrg ;; 7836126a8a12Smrg 78373c15da26Smrg solaris*) 78383c15da26Smrg case $cc_basename in 78393c15da26Smrg CC* | sunCC*) 78403c15da26Smrg # Sun C++ 4.2, 5.x and Centerline C++ 78413c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 78423c15da26Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 78433c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 78443c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78453c15da26Smrg $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' 7846126a8a12Smrg 78473c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 78483c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78493c15da26Smrg case $host_os in 78503c15da26Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 78513c15da26Smrg *) 78523c15da26Smrg # The compiler driver will combine and reorder linker options, 78533c15da26Smrg # but understands `-z linker_flag'. 78543c15da26Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 78553c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 78563c15da26Smrg ;; 78573c15da26Smrg esac 78583c15da26Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7859d656433aSmrg 78603c15da26Smrg output_verbose_link_cmd='func_echo_all' 7861126a8a12Smrg 78623c15da26Smrg # Archives containing C++ object files must be created using 78633c15da26Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 78643c15da26Smrg # necessary to make sure instantiated templates are included 78653c15da26Smrg # in the archive. 78663c15da26Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 78673c15da26Smrg ;; 78683c15da26Smrg gcx*) 78693c15da26Smrg # Green Hills C++ Compiler 78703c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7871126a8a12Smrg 78723c15da26Smrg # The C++ compiler must be used to create the archive. 78733c15da26Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 78743c15da26Smrg ;; 78753c15da26Smrg *) 78763c15da26Smrg # GNU C++ compiler with Solaris linker 78773c15da26Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 78783c15da26Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 78793c15da26Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 78803c15da26Smrg _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' 78813c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78823c15da26Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7883126a8a12Smrg 78843c15da26Smrg # Commands to make compiler produce verbose output that lists 78853c15da26Smrg # what "hidden" libraries, object files and flags are used when 78863c15da26Smrg # linking a shared library. 78873c15da26Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78883c15da26Smrg else 78893c15da26Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 78903c15da26Smrg # platform. 78913c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78923c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78933c15da26Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7894126a8a12Smrg 78953c15da26Smrg # Commands to make compiler produce verbose output that lists 78963c15da26Smrg # what "hidden" libraries, object files and flags are used when 78973c15da26Smrg # linking a shared library. 78983c15da26Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78993c15da26Smrg fi 79003c15da26Smrg 79013c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 79023c15da26Smrg case $host_os in 79033c15da26Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 79043c15da26Smrg *) 79053c15da26Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 79063c15da26Smrg ;; 79073c15da26Smrg esac 79083c15da26Smrg fi 79093c15da26Smrg ;; 79103c15da26Smrg esac 79113c15da26Smrg ;; 7912126a8a12Smrg 7913555991fdSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7914555991fdSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7915555991fdSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7916555991fdSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7917555991fdSmrg runpath_var='LD_RUN_PATH' 7918126a8a12Smrg 79193c15da26Smrg case $cc_basename in 79203c15da26Smrg CC*) 79213c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79223c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79233c15da26Smrg ;; 79243c15da26Smrg *) 79253c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79263c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79273c15da26Smrg ;; 79283c15da26Smrg esac 7929555991fdSmrg ;; 7930d656433aSmrg 79313c15da26Smrg sysv5* | sco3.2v5* | sco5v6*) 79323c15da26Smrg # Note: We can NOT use -z defs as we might desire, because we do not 79333c15da26Smrg # link with -lc, and that would cause any symbols used from libc to 79343c15da26Smrg # always be unresolved, which means just about no library would 79353c15da26Smrg # ever link correctly. If we're not using GNU ld we use -z text 79363c15da26Smrg # though, which does catch some bad symbols but isn't as heavy-handed 79373c15da26Smrg # as -z defs. 79383c15da26Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 79393c15da26Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 79403c15da26Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 79413c15da26Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 79423c15da26Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 79433c15da26Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 79443c15da26Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 79453c15da26Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 79463c15da26Smrg runpath_var='LD_RUN_PATH' 7947126a8a12Smrg 79483c15da26Smrg case $cc_basename in 79493c15da26Smrg CC*) 79503c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79513c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79523c15da26Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 79533c15da26Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 79543c15da26Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 79553c15da26Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 79563c15da26Smrg ;; 79573c15da26Smrg *) 79583c15da26Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79593c15da26Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79603c15da26Smrg ;; 79613c15da26Smrg esac 7962555991fdSmrg ;; 7963d656433aSmrg 79643c15da26Smrg tandem*) 79653c15da26Smrg case $cc_basename in 79663c15da26Smrg NCC*) 79673c15da26Smrg # NonStop-UX NCC 3.20 79683c15da26Smrg # FIXME: insert proper C++ library support 79693c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79703c15da26Smrg ;; 79713c15da26Smrg *) 79723c15da26Smrg # FIXME: insert proper C++ library support 79733c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79743c15da26Smrg ;; 79753c15da26Smrg esac 79763c15da26Smrg ;; 7977d656433aSmrg 79783c15da26Smrg vxworks*) 79793c15da26Smrg # FIXME: insert proper C++ library support 79803c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79813c15da26Smrg ;; 79823c15da26Smrg 79833c15da26Smrg *) 79843c15da26Smrg # FIXME: insert proper C++ library support 79853c15da26Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79863c15da26Smrg ;; 7987555991fdSmrg esac 7988d656433aSmrg 79893c15da26Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 79903c15da26Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7991d656433aSmrg 79923c15da26Smrg _LT_TAGVAR(GCC, $1)="$GXX" 79933c15da26Smrg _LT_TAGVAR(LD, $1)="$LD" 7994d656433aSmrg 79953c15da26Smrg ## CAVEAT EMPTOR: 79963c15da26Smrg ## There is no encapsulation within the following macros, do not change 79973c15da26Smrg ## the running order or otherwise move them around unless you know exactly 79983c15da26Smrg ## what you are doing... 79993c15da26Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 80003c15da26Smrg _LT_COMPILER_PIC($1) 80013c15da26Smrg _LT_COMPILER_C_O($1) 80023c15da26Smrg _LT_COMPILER_FILE_LOCKS($1) 80033c15da26Smrg _LT_LINKER_SHLIBS($1) 80043c15da26Smrg _LT_SYS_DYNAMIC_LINKER($1) 80053c15da26Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8006555991fdSmrg 80073c15da26Smrg _LT_CONFIG($1) 80083c15da26Smrg fi # test -n "$compiler" 80093c15da26Smrg 80103c15da26Smrg CC=$lt_save_CC 80113c15da26Smrg CFLAGS=$lt_save_CFLAGS 80123c15da26Smrg LDCXX=$LD 80133c15da26Smrg LD=$lt_save_LD 80143c15da26Smrg GCC=$lt_save_GCC 80153c15da26Smrg with_gnu_ld=$lt_save_with_gnu_ld 80163c15da26Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 80173c15da26Smrg lt_cv_path_LD=$lt_save_path_LD 80183c15da26Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 80193c15da26Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 80203c15da26Smrgfi # test "$_lt_caught_CXX_error" != yes 80213c15da26Smrg 80223c15da26SmrgAC_LANG_POP 80233c15da26Smrg])# _LT_LANG_CXX_CONFIG 80243c15da26Smrg 80253c15da26Smrg 80263c15da26Smrg# _LT_FUNC_STRIPNAME_CNF 80273c15da26Smrg# ---------------------- 80283c15da26Smrg# func_stripname_cnf prefix suffix name 80293c15da26Smrg# strip PREFIX and SUFFIX off of NAME. 80303c15da26Smrg# PREFIX and SUFFIX must not contain globbing or regex special 80313c15da26Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 80323c15da26Smrg# dot (in which case that matches only a dot). 8033555991fdSmrg# 80343c15da26Smrg# This function is identical to the (non-XSI) version of func_stripname, 80353c15da26Smrg# except this one can be used by m4 code that may be executed by configure, 80363c15da26Smrg# rather than the libtool script. 80373c15da26Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 80383c15da26SmrgAC_REQUIRE([_LT_DECL_SED]) 80393c15da26SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 80403c15da26Smrgfunc_stripname_cnf () 80413c15da26Smrg{ 80423c15da26Smrg case ${2} in 80433c15da26Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 80443c15da26Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 80453c15da26Smrg esac 80463c15da26Smrg} # func_stripname_cnf 80473c15da26Smrg])# _LT_FUNC_STRIPNAME_CNF 8048555991fdSmrg 80493c15da26Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 80503c15da26Smrg# --------------------------------- 80513c15da26Smrg# Figure out "hidden" library dependencies from verbose 80523c15da26Smrg# compiler output when linking a shared library. 80533c15da26Smrg# Parse the compiler output and extract the necessary 80543c15da26Smrg# objects, libraries and library flags. 80553c15da26Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 80563c15da26Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 80573c15da26SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 80583c15da26Smrg# Dependencies to place before and after the object being linked: 80593c15da26Smrg_LT_TAGVAR(predep_objects, $1)= 80603c15da26Smrg_LT_TAGVAR(postdep_objects, $1)= 80613c15da26Smrg_LT_TAGVAR(predeps, $1)= 80623c15da26Smrg_LT_TAGVAR(postdeps, $1)= 80633c15da26Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 8064555991fdSmrg 80653c15da26Smrgdnl we can't use the lt_simple_compile_test_code here, 80663c15da26Smrgdnl because it contains code intended for an executable, 80673c15da26Smrgdnl not a library. It's possible we should let each 80683c15da26Smrgdnl tag define a new lt_????_link_test_code variable, 80693c15da26Smrgdnl but it's only used here... 80703c15da26Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 80713c15da26Smrgint a; 80723c15da26Smrgvoid foo (void) { a = 0; } 80733c15da26Smrg_LT_EOF 80743c15da26Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 80753c15da26Smrgclass Foo 80763c15da26Smrg{ 80773c15da26Smrgpublic: 80783c15da26Smrg Foo (void) { a = 0; } 80793c15da26Smrgprivate: 80803c15da26Smrg int a; 80813c15da26Smrg}; 80823c15da26Smrg_LT_EOF 80833c15da26Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 80843c15da26Smrg subroutine foo 80853c15da26Smrg implicit none 80863c15da26Smrg integer*4 a 80873c15da26Smrg a=0 80883c15da26Smrg return 80893c15da26Smrg end 80903c15da26Smrg_LT_EOF 80913c15da26Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 80923c15da26Smrg subroutine foo 80933c15da26Smrg implicit none 80943c15da26Smrg integer a 80953c15da26Smrg a=0 80963c15da26Smrg return 80973c15da26Smrg end 80983c15da26Smrg_LT_EOF 80993c15da26Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 81003c15da26Smrgpublic class foo { 81013c15da26Smrg private int a; 81023c15da26Smrg public void bar (void) { 81033c15da26Smrg a = 0; 81043c15da26Smrg } 81053c15da26Smrg}; 81063c15da26Smrg_LT_EOF 81070a6b08f8Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 81080a6b08f8Smrgpackage foo 81090a6b08f8Smrgfunc foo() { 81100a6b08f8Smrg} 81110a6b08f8Smrg_LT_EOF 81123c15da26Smrg]) 81133c15da26Smrg 81143c15da26Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 81153c15da26Smrgcase "$CC $CFLAGS " in #( 81163c15da26Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 81173c15da26Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 81180a6b08f8Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8119d656433aSmrgesac 8120555991fdSmrg 81213c15da26Smrgdnl Parse the compiler output and extract the necessary 81223c15da26Smrgdnl objects, libraries and library flags. 81233c15da26Smrgif AC_TRY_EVAL(ac_compile); then 81243c15da26Smrg # Parse the compiler output and extract the necessary 81253c15da26Smrg # objects, libraries and library flags. 8126d656433aSmrg 81273c15da26Smrg # Sentinel used to keep track of whether or not we are before 81283c15da26Smrg # the conftest object file. 81293c15da26Smrg pre_test_object_deps_done=no 8130d656433aSmrg 81313c15da26Smrg for p in `eval "$output_verbose_link_cmd"`; do 81323c15da26Smrg case ${prev}${p} in 8133d656433aSmrg 81343c15da26Smrg -L* | -R* | -l*) 81353c15da26Smrg # Some compilers place space between "-{L,R}" and the path. 81363c15da26Smrg # Remove the space. 81373c15da26Smrg if test $p = "-L" || 81383c15da26Smrg test $p = "-R"; then 81393c15da26Smrg prev=$p 81403c15da26Smrg continue 81413c15da26Smrg fi 8142d656433aSmrg 81433c15da26Smrg # Expand the sysroot to ease extracting the directories later. 81443c15da26Smrg if test -z "$prev"; then 81453c15da26Smrg case $p in 81463c15da26Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 81473c15da26Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 81483c15da26Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 81493c15da26Smrg esac 81503c15da26Smrg fi 81513c15da26Smrg case $p in 81523c15da26Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 81533c15da26Smrg esac 81543c15da26Smrg if test "$pre_test_object_deps_done" = no; then 81553c15da26Smrg case ${prev} in 81563c15da26Smrg -L | -R) 81573c15da26Smrg # Internal compiler library paths should come after those 81583c15da26Smrg # provided the user. The postdeps already come after the 81593c15da26Smrg # user supplied libs so there is no need to process them. 81603c15da26Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 81613c15da26Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 81623c15da26Smrg else 81633c15da26Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 81643c15da26Smrg fi 81653c15da26Smrg ;; 81663c15da26Smrg # The "-l" case would never come before the object being 81673c15da26Smrg # linked, so don't bother handling this case. 81683c15da26Smrg esac 81693c15da26Smrg else 81703c15da26Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 81713c15da26Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 81723c15da26Smrg else 81733c15da26Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 81743c15da26Smrg fi 81753c15da26Smrg fi 81763c15da26Smrg prev= 81773c15da26Smrg ;; 8178d656433aSmrg 81793c15da26Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 81803c15da26Smrg *.$objext) 81813c15da26Smrg # This assumes that the test object file only shows up 81823c15da26Smrg # once in the compiler output. 81833c15da26Smrg if test "$p" = "conftest.$objext"; then 81843c15da26Smrg pre_test_object_deps_done=yes 81853c15da26Smrg continue 81863c15da26Smrg fi 8187d656433aSmrg 81883c15da26Smrg if test "$pre_test_object_deps_done" = no; then 81893c15da26Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 81903c15da26Smrg _LT_TAGVAR(predep_objects, $1)="$p" 81913c15da26Smrg else 81923c15da26Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 81933c15da26Smrg fi 81943c15da26Smrg else 81953c15da26Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 81963c15da26Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 81973c15da26Smrg else 81983c15da26Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 81993c15da26Smrg fi 82003c15da26Smrg fi 82013c15da26Smrg ;; 8202d656433aSmrg 82033c15da26Smrg *) ;; # Ignore the rest. 8204d656433aSmrg 82053c15da26Smrg esac 82063c15da26Smrg done 8207d656433aSmrg 82083c15da26Smrg # Clean up. 82093c15da26Smrg rm -f a.out a.exe 82103c15da26Smrgelse 82113c15da26Smrg echo "libtool.m4: error: problem compiling $1 test program" 82123c15da26Smrgfi 8213d656433aSmrg 82143c15da26Smrg$RM -f confest.$objext 82153c15da26SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 8216d656433aSmrg 82173c15da26Smrg# PORTME: override above test on systems where it is broken 82183c15da26Smrgm4_if([$1], [CXX], 82193c15da26Smrg[case $host_os in 82203c15da26Smrginterix[[3-9]]*) 82213c15da26Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 82223c15da26Smrg # hack all around it, let's just trust "g++" to DTRT. 82233c15da26Smrg _LT_TAGVAR(predep_objects,$1)= 82243c15da26Smrg _LT_TAGVAR(postdep_objects,$1)= 82253c15da26Smrg _LT_TAGVAR(postdeps,$1)= 82263c15da26Smrg ;; 8227555991fdSmrg 82283c15da26Smrglinux*) 82293c15da26Smrg case `$CC -V 2>&1 | sed 5q` in 82303c15da26Smrg *Sun\ C*) 82313c15da26Smrg # Sun C++ 5.9 82323c15da26Smrg 82333c15da26Smrg # The more standards-conforming stlport4 library is 82343c15da26Smrg # incompatible with the Cstd library. Avoid specifying 82353c15da26Smrg # it if it's in CXXFLAGS. Ignore libCrun as 82363c15da26Smrg # -library=stlport4 depends on it. 82373c15da26Smrg case " $CXX $CXXFLAGS " in 82383c15da26Smrg *" -library=stlport4 "*) 82393c15da26Smrg solaris_use_stlport4=yes 82403c15da26Smrg ;; 82413c15da26Smrg esac 82423c15da26Smrg 82433c15da26Smrg if test "$solaris_use_stlport4" != yes; then 82443c15da26Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8245555991fdSmrg fi 8246555991fdSmrg ;; 82473c15da26Smrg esac 82483c15da26Smrg ;; 8249d656433aSmrg 82503c15da26Smrgsolaris*) 82513c15da26Smrg case $cc_basename in 82523c15da26Smrg CC* | sunCC*) 82533c15da26Smrg # The more standards-conforming stlport4 library is 82543c15da26Smrg # incompatible with the Cstd library. Avoid specifying 82553c15da26Smrg # it if it's in CXXFLAGS. Ignore libCrun as 82563c15da26Smrg # -library=stlport4 depends on it. 82573c15da26Smrg case " $CXX $CXXFLAGS " in 82583c15da26Smrg *" -library=stlport4 "*) 82593c15da26Smrg solaris_use_stlport4=yes 82603c15da26Smrg ;; 82613c15da26Smrg esac 82623c15da26Smrg 82633c15da26Smrg # Adding this requires a known-good setup of shared libraries for 82643c15da26Smrg # Sun compiler versions before 5.6, else PIC objects from an old 82653c15da26Smrg # archive will be linked into the output, leading to subtle bugs. 82663c15da26Smrg if test "$solaris_use_stlport4" != yes; then 82673c15da26Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8268555991fdSmrg fi 8269d656433aSmrg ;; 8270555991fdSmrg esac 82713c15da26Smrg ;; 82723c15da26Smrgesac 82733c15da26Smrg]) 8274d656433aSmrg 82753c15da26Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 82763c15da26Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 82773c15da26Smrgesac 82783c15da26Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 82793c15da26Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 82803c15da26Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8281555991fdSmrgfi 82823c15da26Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 82833c15da26Smrg [The directories searched by this compiler when creating a shared library]) 82843c15da26Smrg_LT_TAGDECL([], [predep_objects], [1], 82853c15da26Smrg [Dependencies to place before and after the objects being linked to 82863c15da26Smrg create a shared library]) 82873c15da26Smrg_LT_TAGDECL([], [postdep_objects], [1]) 82883c15da26Smrg_LT_TAGDECL([], [predeps], [1]) 82893c15da26Smrg_LT_TAGDECL([], [postdeps], [1]) 82903c15da26Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 82913c15da26Smrg [The library search path used internally by the compiler when linking 82923c15da26Smrg a shared library]) 82933c15da26Smrg])# _LT_SYS_HIDDEN_LIBDEPS 8294d656433aSmrg 8295d656433aSmrg 82963c15da26Smrg# _LT_LANG_F77_CONFIG([TAG]) 8297555991fdSmrg# -------------------------- 82983c15da26Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 82993c15da26Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 83003c15da26Smrg# to write the compiler configuration to `libtool'. 83013c15da26Smrgm4_defun([_LT_LANG_F77_CONFIG], 83023c15da26Smrg[AC_LANG_PUSH(Fortran 77) 83033c15da26Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 83043c15da26Smrg _lt_disable_F77=yes 8305555991fdSmrgfi 8306d656433aSmrg 8307555991fdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8308555991fdSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 8309555991fdSmrg_LT_TAGVAR(always_export_symbols, $1)=no 8310555991fdSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8311555991fdSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8312555991fdSmrg_LT_TAGVAR(hardcode_direct, $1)=no 8313555991fdSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8314555991fdSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8315555991fdSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8316555991fdSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8317555991fdSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 8318555991fdSmrg_LT_TAGVAR(inherit_rpath, $1)=no 8319555991fdSmrg_LT_TAGVAR(module_cmds, $1)= 8320555991fdSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 8321555991fdSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8322555991fdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8323555991fdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8324555991fdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8325555991fdSmrg_LT_TAGVAR(no_undefined_flag, $1)= 8326555991fdSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8327555991fdSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8328d656433aSmrg 83293c15da26Smrg# Source file extension for f77 test sources. 83303c15da26Smrgac_ext=f 8331d656433aSmrg 83323c15da26Smrg# Object file extension for compiled f77 test sources. 8333555991fdSmrgobjext=o 8334555991fdSmrg_LT_TAGVAR(objext, $1)=$objext 8335d656433aSmrg 8336555991fdSmrg# No sense in running all these tests if we already determined that 83373c15da26Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 8338555991fdSmrg# are currently assumed to apply to all compilers on this platform, 8339555991fdSmrg# and will be corrupted by setting them based on a non-working compiler. 83403c15da26Smrgif test "$_lt_disable_F77" != yes; then 8341555991fdSmrg # Code to be used in simple compile tests 83423c15da26Smrg lt_simple_compile_test_code="\ 83433c15da26Smrg subroutine t 83443c15da26Smrg return 83453c15da26Smrg end 83463c15da26Smrg" 8347d656433aSmrg 8348555991fdSmrg # Code to be used in simple link tests 83493c15da26Smrg lt_simple_link_test_code="\ 83503c15da26Smrg program t 83513c15da26Smrg end 83523c15da26Smrg" 8353d656433aSmrg 8354555991fdSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8355555991fdSmrg _LT_TAG_COMPILER 8356d656433aSmrg 8357555991fdSmrg # save warnings/boilerplate of simple test code 8358555991fdSmrg _LT_COMPILER_BOILERPLATE 8359555991fdSmrg _LT_LINKER_BOILERPLATE 8360d656433aSmrg 8361555991fdSmrg # Allow CC to be a program name with arguments. 83623c15da26Smrg lt_save_CC="$CC" 8363555991fdSmrg lt_save_GCC=$GCC 83643c15da26Smrg lt_save_CFLAGS=$CFLAGS 83653c15da26Smrg CC=${F77-"f77"} 83663c15da26Smrg CFLAGS=$FFLAGS 83673c15da26Smrg compiler=$CC 83683c15da26Smrg _LT_TAGVAR(compiler, $1)=$CC 83693c15da26Smrg _LT_CC_BASENAME([$compiler]) 83703c15da26Smrg GCC=$G77 83713c15da26Smrg if test -n "$compiler"; then 83723c15da26Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 83733c15da26Smrg AC_MSG_RESULT([$can_build_shared]) 8374d656433aSmrg 83753c15da26Smrg AC_MSG_CHECKING([whether to build shared libraries]) 83763c15da26Smrg test "$can_build_shared" = "no" && enable_shared=no 83773c15da26Smrg 83783c15da26Smrg # On AIX, shared libraries and static libraries use the same namespace, and 83793c15da26Smrg # are all built from PIC. 83803c15da26Smrg case $host_os in 83813c15da26Smrg aix3*) 83823c15da26Smrg test "$enable_shared" = yes && enable_static=no 83833c15da26Smrg if test -n "$RANLIB"; then 83843c15da26Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 83853c15da26Smrg postinstall_cmds='$RANLIB $lib' 8386555991fdSmrg fi 8387555991fdSmrg ;; 83883c15da26Smrg aix[[4-9]]*) 83893c15da26Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 83903c15da26Smrg test "$enable_shared" = yes && enable_static=no 8391555991fdSmrg fi 8392555991fdSmrg ;; 83933c15da26Smrg esac 83943c15da26Smrg AC_MSG_RESULT([$enable_shared]) 8395d656433aSmrg 83963c15da26Smrg AC_MSG_CHECKING([whether to build static libraries]) 83973c15da26Smrg # Make sure either enable_shared or enable_static is yes. 83983c15da26Smrg test "$enable_shared" = yes || enable_static=yes 83993c15da26Smrg AC_MSG_RESULT([$enable_static]) 8400d656433aSmrg 84013c15da26Smrg _LT_TAGVAR(GCC, $1)="$G77" 84023c15da26Smrg _LT_TAGVAR(LD, $1)="$LD" 8403d656433aSmrg 84043c15da26Smrg ## CAVEAT EMPTOR: 84053c15da26Smrg ## There is no encapsulation within the following macros, do not change 84063c15da26Smrg ## the running order or otherwise move them around unless you know exactly 84073c15da26Smrg ## what you are doing... 84083c15da26Smrg _LT_COMPILER_PIC($1) 84093c15da26Smrg _LT_COMPILER_C_O($1) 84103c15da26Smrg _LT_COMPILER_FILE_LOCKS($1) 84113c15da26Smrg _LT_LINKER_SHLIBS($1) 84123c15da26Smrg _LT_SYS_DYNAMIC_LINKER($1) 84133c15da26Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8414d656433aSmrg 84153c15da26Smrg _LT_CONFIG($1) 84163c15da26Smrg fi # test -n "$compiler" 8417d656433aSmrg 84183c15da26Smrg GCC=$lt_save_GCC 84193c15da26Smrg CC="$lt_save_CC" 84203c15da26Smrg CFLAGS="$lt_save_CFLAGS" 84213c15da26Smrgfi # test "$_lt_disable_F77" != yes 8422d656433aSmrg 84233c15da26SmrgAC_LANG_POP 84243c15da26Smrg])# _LT_LANG_F77_CONFIG 8425d656433aSmrg 8426d656433aSmrg 84273c15da26Smrg# _LT_LANG_FC_CONFIG([TAG]) 84283c15da26Smrg# ------------------------- 84293c15da26Smrg# Ensure that the configuration variables for a Fortran compiler are 84303c15da26Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 84313c15da26Smrg# to write the compiler configuration to `libtool'. 84323c15da26Smrgm4_defun([_LT_LANG_FC_CONFIG], 84333c15da26Smrg[AC_LANG_PUSH(Fortran) 8434d656433aSmrg 84353c15da26Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 84363c15da26Smrg _lt_disable_FC=yes 84373c15da26Smrgfi 8438d656433aSmrg 84393c15da26Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 84403c15da26Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 84413c15da26Smrg_LT_TAGVAR(always_export_symbols, $1)=no 84423c15da26Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 84433c15da26Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 84443c15da26Smrg_LT_TAGVAR(hardcode_direct, $1)=no 84453c15da26Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 84463c15da26Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 84473c15da26Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 84483c15da26Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 84493c15da26Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 84503c15da26Smrg_LT_TAGVAR(inherit_rpath, $1)=no 84513c15da26Smrg_LT_TAGVAR(module_cmds, $1)= 84523c15da26Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 84533c15da26Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 84543c15da26Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 84553c15da26Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 84563c15da26Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 84573c15da26Smrg_LT_TAGVAR(no_undefined_flag, $1)= 84583c15da26Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 84593c15da26Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8460d656433aSmrg 84613c15da26Smrg# Source file extension for fc test sources. 84623c15da26Smrgac_ext=${ac_fc_srcext-f} 84633c15da26Smrg 84643c15da26Smrg# Object file extension for compiled fc test sources. 84653c15da26Smrgobjext=o 84663c15da26Smrg_LT_TAGVAR(objext, $1)=$objext 84673c15da26Smrg 84683c15da26Smrg# No sense in running all these tests if we already determined that 84693c15da26Smrg# the FC compiler isn't working. Some variables (like enable_shared) 84703c15da26Smrg# are currently assumed to apply to all compilers on this platform, 84713c15da26Smrg# and will be corrupted by setting them based on a non-working compiler. 84723c15da26Smrgif test "$_lt_disable_FC" != yes; then 84733c15da26Smrg # Code to be used in simple compile tests 84743c15da26Smrg lt_simple_compile_test_code="\ 84753c15da26Smrg subroutine t 84763c15da26Smrg return 84773c15da26Smrg end 84783c15da26Smrg" 84793c15da26Smrg 84803c15da26Smrg # Code to be used in simple link tests 84813c15da26Smrg lt_simple_link_test_code="\ 84823c15da26Smrg program t 84833c15da26Smrg end 84843c15da26Smrg" 84853c15da26Smrg 84863c15da26Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 84873c15da26Smrg _LT_TAG_COMPILER 84883c15da26Smrg 84893c15da26Smrg # save warnings/boilerplate of simple test code 84903c15da26Smrg _LT_COMPILER_BOILERPLATE 84913c15da26Smrg _LT_LINKER_BOILERPLATE 8492d656433aSmrg 84933c15da26Smrg # Allow CC to be a program name with arguments. 84943c15da26Smrg lt_save_CC="$CC" 84953c15da26Smrg lt_save_GCC=$GCC 84963c15da26Smrg lt_save_CFLAGS=$CFLAGS 84973c15da26Smrg CC=${FC-"f95"} 84983c15da26Smrg CFLAGS=$FCFLAGS 84993c15da26Smrg compiler=$CC 85003c15da26Smrg GCC=$ac_cv_fc_compiler_gnu 8501d656433aSmrg 85023c15da26Smrg _LT_TAGVAR(compiler, $1)=$CC 85033c15da26Smrg _LT_CC_BASENAME([$compiler]) 8504d656433aSmrg 85053c15da26Smrg if test -n "$compiler"; then 85063c15da26Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 85073c15da26Smrg AC_MSG_RESULT([$can_build_shared]) 8508d656433aSmrg 85093c15da26Smrg AC_MSG_CHECKING([whether to build shared libraries]) 85103c15da26Smrg test "$can_build_shared" = "no" && enable_shared=no 8511555991fdSmrg 85123c15da26Smrg # On AIX, shared libraries and static libraries use the same namespace, and 85133c15da26Smrg # are all built from PIC. 85143c15da26Smrg case $host_os in 85153c15da26Smrg aix3*) 85163c15da26Smrg test "$enable_shared" = yes && enable_static=no 85173c15da26Smrg if test -n "$RANLIB"; then 85183c15da26Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 85193c15da26Smrg postinstall_cmds='$RANLIB $lib' 85203c15da26Smrg fi 85213c15da26Smrg ;; 85223c15da26Smrg aix[[4-9]]*) 85233c15da26Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 85243c15da26Smrg test "$enable_shared" = yes && enable_static=no 85253c15da26Smrg fi 85263c15da26Smrg ;; 85273c15da26Smrg esac 85283c15da26Smrg AC_MSG_RESULT([$enable_shared]) 8529d656433aSmrg 85303c15da26Smrg AC_MSG_CHECKING([whether to build static libraries]) 85313c15da26Smrg # Make sure either enable_shared or enable_static is yes. 85323c15da26Smrg test "$enable_shared" = yes || enable_static=yes 85333c15da26Smrg AC_MSG_RESULT([$enable_static]) 8534d656433aSmrg 85353c15da26Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 85363c15da26Smrg _LT_TAGVAR(LD, $1)="$LD" 8537d656433aSmrg 85383c15da26Smrg ## CAVEAT EMPTOR: 85393c15da26Smrg ## There is no encapsulation within the following macros, do not change 85403c15da26Smrg ## the running order or otherwise move them around unless you know exactly 85413c15da26Smrg ## what you are doing... 85423c15da26Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 85433c15da26Smrg _LT_COMPILER_PIC($1) 85443c15da26Smrg _LT_COMPILER_C_O($1) 85453c15da26Smrg _LT_COMPILER_FILE_LOCKS($1) 85463c15da26Smrg _LT_LINKER_SHLIBS($1) 85473c15da26Smrg _LT_SYS_DYNAMIC_LINKER($1) 85483c15da26Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8549d656433aSmrg 85503c15da26Smrg _LT_CONFIG($1) 85513c15da26Smrg fi # test -n "$compiler" 8552d656433aSmrg 85533c15da26Smrg GCC=$lt_save_GCC 85543c15da26Smrg CC=$lt_save_CC 85553c15da26Smrg CFLAGS=$lt_save_CFLAGS 85563c15da26Smrgfi # test "$_lt_disable_FC" != yes 8557d656433aSmrg 85583c15da26SmrgAC_LANG_POP 85593c15da26Smrg])# _LT_LANG_FC_CONFIG 8560d656433aSmrg 8561d656433aSmrg 85623c15da26Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 85633c15da26Smrg# -------------------------- 85643c15da26Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 85653c15da26Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85663c15da26Smrg# to write the compiler configuration to `libtool'. 85673c15da26Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 85683c15da26Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 85693c15da26SmrgAC_LANG_SAVE 8570d656433aSmrg 85713c15da26Smrg# Source file extension for Java test sources. 85723c15da26Smrgac_ext=java 8573d656433aSmrg 85743c15da26Smrg# Object file extension for compiled Java test sources. 85753c15da26Smrgobjext=o 85763c15da26Smrg_LT_TAGVAR(objext, $1)=$objext 8577d656433aSmrg 85783c15da26Smrg# Code to be used in simple compile tests 85793c15da26Smrglt_simple_compile_test_code="class foo {}" 8580d656433aSmrg 85813c15da26Smrg# Code to be used in simple link tests 85823c15da26Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8583d656433aSmrg 85843c15da26Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 85853c15da26Smrg_LT_TAG_COMPILER 8586d656433aSmrg 85873c15da26Smrg# save warnings/boilerplate of simple test code 85883c15da26Smrg_LT_COMPILER_BOILERPLATE 85893c15da26Smrg_LT_LINKER_BOILERPLATE 8590d656433aSmrg 85913c15da26Smrg# Allow CC to be a program name with arguments. 85923c15da26Smrglt_save_CC=$CC 85933c15da26Smrglt_save_CFLAGS=$CFLAGS 85943c15da26Smrglt_save_GCC=$GCC 85953c15da26SmrgGCC=yes 85963c15da26SmrgCC=${GCJ-"gcj"} 85973c15da26SmrgCFLAGS=$GCJFLAGS 85983c15da26Smrgcompiler=$CC 85993c15da26Smrg_LT_TAGVAR(compiler, $1)=$CC 86003c15da26Smrg_LT_TAGVAR(LD, $1)="$LD" 86013c15da26Smrg_LT_CC_BASENAME([$compiler]) 8602d656433aSmrg 86033c15da26Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 86043c15da26Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8605d656433aSmrg 86063c15da26Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 86073c15da26Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 86083c15da26Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8609d656433aSmrg 86103c15da26Smrgif test -n "$compiler"; then 86113c15da26Smrg _LT_COMPILER_NO_RTTI($1) 86123c15da26Smrg _LT_COMPILER_PIC($1) 86133c15da26Smrg _LT_COMPILER_C_O($1) 86143c15da26Smrg _LT_COMPILER_FILE_LOCKS($1) 86153c15da26Smrg _LT_LINKER_SHLIBS($1) 86163c15da26Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8617d656433aSmrg 86183c15da26Smrg _LT_CONFIG($1) 86193c15da26Smrgfi 8620d656433aSmrg 86213c15da26SmrgAC_LANG_RESTORE 8622d656433aSmrg 86233c15da26SmrgGCC=$lt_save_GCC 86243c15da26SmrgCC=$lt_save_CC 86253c15da26SmrgCFLAGS=$lt_save_CFLAGS 86263c15da26Smrg])# _LT_LANG_GCJ_CONFIG 8627d656433aSmrg 8628d656433aSmrg 86290a6b08f8Smrg# _LT_LANG_GO_CONFIG([TAG]) 86300a6b08f8Smrg# -------------------------- 86310a6b08f8Smrg# Ensure that the configuration variables for the GNU Go compiler 86320a6b08f8Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 86330a6b08f8Smrg# to write the compiler configuration to `libtool'. 86340a6b08f8Smrgm4_defun([_LT_LANG_GO_CONFIG], 86350a6b08f8Smrg[AC_REQUIRE([LT_PROG_GO])dnl 86360a6b08f8SmrgAC_LANG_SAVE 86370a6b08f8Smrg 86380a6b08f8Smrg# Source file extension for Go test sources. 86390a6b08f8Smrgac_ext=go 86400a6b08f8Smrg 86410a6b08f8Smrg# Object file extension for compiled Go test sources. 86420a6b08f8Smrgobjext=o 86430a6b08f8Smrg_LT_TAGVAR(objext, $1)=$objext 86440a6b08f8Smrg 86450a6b08f8Smrg# Code to be used in simple compile tests 86460a6b08f8Smrglt_simple_compile_test_code="package main; func main() { }" 86470a6b08f8Smrg 86480a6b08f8Smrg# Code to be used in simple link tests 86490a6b08f8Smrglt_simple_link_test_code='package main; func main() { }' 86500a6b08f8Smrg 86510a6b08f8Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 86520a6b08f8Smrg_LT_TAG_COMPILER 86530a6b08f8Smrg 86540a6b08f8Smrg# save warnings/boilerplate of simple test code 86550a6b08f8Smrg_LT_COMPILER_BOILERPLATE 86560a6b08f8Smrg_LT_LINKER_BOILERPLATE 86570a6b08f8Smrg 86580a6b08f8Smrg# Allow CC to be a program name with arguments. 86590a6b08f8Smrglt_save_CC=$CC 86600a6b08f8Smrglt_save_CFLAGS=$CFLAGS 86610a6b08f8Smrglt_save_GCC=$GCC 86620a6b08f8SmrgGCC=yes 86630a6b08f8SmrgCC=${GOC-"gccgo"} 86640a6b08f8SmrgCFLAGS=$GOFLAGS 86650a6b08f8Smrgcompiler=$CC 86660a6b08f8Smrg_LT_TAGVAR(compiler, $1)=$CC 86670a6b08f8Smrg_LT_TAGVAR(LD, $1)="$LD" 86680a6b08f8Smrg_LT_CC_BASENAME([$compiler]) 86690a6b08f8Smrg 86700a6b08f8Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 86710a6b08f8Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 86720a6b08f8Smrg 86730a6b08f8Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 86740a6b08f8Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 86750a6b08f8Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 86760a6b08f8Smrg 86770a6b08f8Smrgif test -n "$compiler"; then 86780a6b08f8Smrg _LT_COMPILER_NO_RTTI($1) 86790a6b08f8Smrg _LT_COMPILER_PIC($1) 86800a6b08f8Smrg _LT_COMPILER_C_O($1) 86810a6b08f8Smrg _LT_COMPILER_FILE_LOCKS($1) 86820a6b08f8Smrg _LT_LINKER_SHLIBS($1) 86830a6b08f8Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 86840a6b08f8Smrg 86850a6b08f8Smrg _LT_CONFIG($1) 86860a6b08f8Smrgfi 86870a6b08f8Smrg 86880a6b08f8SmrgAC_LANG_RESTORE 86890a6b08f8Smrg 86900a6b08f8SmrgGCC=$lt_save_GCC 86910a6b08f8SmrgCC=$lt_save_CC 86920a6b08f8SmrgCFLAGS=$lt_save_CFLAGS 86930a6b08f8Smrg])# _LT_LANG_GO_CONFIG 86940a6b08f8Smrg 86950a6b08f8Smrg 86963c15da26Smrg# _LT_LANG_RC_CONFIG([TAG]) 86973c15da26Smrg# ------------------------- 86983c15da26Smrg# Ensure that the configuration variables for the Windows resource compiler 86993c15da26Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 87003c15da26Smrg# to write the compiler configuration to `libtool'. 87013c15da26Smrgm4_defun([_LT_LANG_RC_CONFIG], 87023c15da26Smrg[AC_REQUIRE([LT_PROG_RC])dnl 87033c15da26SmrgAC_LANG_SAVE 8704d656433aSmrg 87053c15da26Smrg# Source file extension for RC test sources. 87063c15da26Smrgac_ext=rc 8707d656433aSmrg 87083c15da26Smrg# Object file extension for compiled RC test sources. 87093c15da26Smrgobjext=o 87103c15da26Smrg_LT_TAGVAR(objext, $1)=$objext 8711d656433aSmrg 87123c15da26Smrg# Code to be used in simple compile tests 87133c15da26Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 87143c15da26Smrg 87153c15da26Smrg# Code to be used in simple link tests 87163c15da26Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 87173c15da26Smrg 87183c15da26Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 87193c15da26Smrg_LT_TAG_COMPILER 87203c15da26Smrg 87213c15da26Smrg# save warnings/boilerplate of simple test code 87223c15da26Smrg_LT_COMPILER_BOILERPLATE 87233c15da26Smrg_LT_LINKER_BOILERPLATE 87243c15da26Smrg 87253c15da26Smrg# Allow CC to be a program name with arguments. 87263c15da26Smrglt_save_CC="$CC" 87273c15da26Smrglt_save_CFLAGS=$CFLAGS 87283c15da26Smrglt_save_GCC=$GCC 87293c15da26SmrgGCC= 87303c15da26SmrgCC=${RC-"windres"} 87313c15da26SmrgCFLAGS= 87323c15da26Smrgcompiler=$CC 87333c15da26Smrg_LT_TAGVAR(compiler, $1)=$CC 87343c15da26Smrg_LT_CC_BASENAME([$compiler]) 87353c15da26Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8736d656433aSmrg 87373c15da26Smrgif test -n "$compiler"; then 87383c15da26Smrg : 87393c15da26Smrg _LT_CONFIG($1) 87403c15da26Smrgfi 8741d656433aSmrg 87423c15da26SmrgGCC=$lt_save_GCC 87433c15da26SmrgAC_LANG_RESTORE 87443c15da26SmrgCC=$lt_save_CC 87453c15da26SmrgCFLAGS=$lt_save_CFLAGS 87463c15da26Smrg])# _LT_LANG_RC_CONFIG 8747d656433aSmrg 8748d656433aSmrg 87493c15da26Smrg# LT_PROG_GCJ 87503c15da26Smrg# ----------- 87513c15da26SmrgAC_DEFUN([LT_PROG_GCJ], 87523c15da26Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 87533c15da26Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 87543c15da26Smrg [AC_CHECK_TOOL(GCJ, gcj,) 87553c15da26Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 87563c15da26Smrg AC_SUBST(GCJFLAGS)])])[]dnl 87573c15da26Smrg]) 8758d656433aSmrg 87593c15da26Smrg# Old name: 87603c15da26SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 87613c15da26Smrgdnl aclocal-1.4 backwards compatibility: 87623c15da26Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8763d656433aSmrg 8764d656433aSmrg 87650a6b08f8Smrg# LT_PROG_GO 87660a6b08f8Smrg# ---------- 87670a6b08f8SmrgAC_DEFUN([LT_PROG_GO], 87680a6b08f8Smrg[AC_CHECK_TOOL(GOC, gccgo,) 87690a6b08f8Smrg]) 87700a6b08f8Smrg 87710a6b08f8Smrg 87723c15da26Smrg# LT_PROG_RC 87733c15da26Smrg# ---------- 87743c15da26SmrgAC_DEFUN([LT_PROG_RC], 87753c15da26Smrg[AC_CHECK_TOOL(RC, windres,) 87763c15da26Smrg]) 8777d656433aSmrg 87783c15da26Smrg# Old name: 87793c15da26SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 87803c15da26Smrgdnl aclocal-1.4 backwards compatibility: 87813c15da26Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8782d656433aSmrg 8783d656433aSmrg 87843c15da26Smrg# _LT_DECL_EGREP 87853c15da26Smrg# -------------- 87863c15da26Smrg# If we don't have a new enough Autoconf to choose the best grep 87873c15da26Smrg# available, choose the one first in the user's PATH. 87883c15da26Smrgm4_defun([_LT_DECL_EGREP], 87893c15da26Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 87903c15da26SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 87913c15da26Smrgtest -z "$GREP" && GREP=grep 87923c15da26Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 87933c15da26Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 87943c15da26Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 87953c15da26Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 87963c15da26SmrgAC_SUBST([GREP]) 87973c15da26Smrg]) 8798d656433aSmrg 8799d656433aSmrg 88003c15da26Smrg# _LT_DECL_OBJDUMP 88013c15da26Smrg# -------------- 88023c15da26Smrg# If we don't have a new enough Autoconf to choose the best objdump 88033c15da26Smrg# available, choose the one first in the user's PATH. 88043c15da26Smrgm4_defun([_LT_DECL_OBJDUMP], 88053c15da26Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 88063c15da26Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 88073c15da26Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 88083c15da26SmrgAC_SUBST([OBJDUMP]) 88093c15da26Smrg]) 8810d656433aSmrg 88113c15da26Smrg# _LT_DECL_DLLTOOL 88123c15da26Smrg# ---------------- 88133c15da26Smrg# Ensure DLLTOOL variable is set. 88143c15da26Smrgm4_defun([_LT_DECL_DLLTOOL], 88153c15da26Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 88163c15da26Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 88173c15da26Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 88183c15da26SmrgAC_SUBST([DLLTOOL]) 88193c15da26Smrg]) 8820d656433aSmrg 88213c15da26Smrg# _LT_DECL_SED 88223c15da26Smrg# ------------ 88233c15da26Smrg# Check for a fully-functional sed program, that truncates 88243c15da26Smrg# as few characters as possible. Prefer GNU sed if found. 88253c15da26Smrgm4_defun([_LT_DECL_SED], 88263c15da26Smrg[AC_PROG_SED 88273c15da26Smrgtest -z "$SED" && SED=sed 88283c15da26SmrgXsed="$SED -e 1s/^X//" 88293c15da26Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 88303c15da26Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 88313c15da26Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 88323c15da26Smrg])# _LT_DECL_SED 8833d656433aSmrg 88343c15da26Smrgm4_ifndef([AC_PROG_SED], [ 88353c15da26Smrg# NOTE: This macro has been submitted for inclusion into # 88363c15da26Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 88373c15da26Smrg# a released version of Autoconf we should remove this # 88383c15da26Smrg# macro and use it instead. # 88393c15da26Smrg 88403c15da26Smrgm4_defun([AC_PROG_SED], 88413c15da26Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 88423c15da26SmrgAC_CACHE_VAL(lt_cv_path_SED, 88433c15da26Smrg[# Loop through the user's path and test for sed and gsed. 88443c15da26Smrg# Then use that list of sed's as ones to test for truncation. 88453c15da26Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 88463c15da26Smrgfor as_dir in $PATH 88473c15da26Smrgdo 88483c15da26Smrg IFS=$as_save_IFS 88493c15da26Smrg test -z "$as_dir" && as_dir=. 88503c15da26Smrg for lt_ac_prog in sed gsed; do 88513c15da26Smrg for ac_exec_ext in '' $ac_executable_extensions; do 88523c15da26Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 88533c15da26Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 88543c15da26Smrg fi 88553c15da26Smrg done 88563c15da26Smrg done 88573c15da26Smrgdone 88583c15da26SmrgIFS=$as_save_IFS 88593c15da26Smrglt_ac_max=0 88603c15da26Smrglt_ac_count=0 88613c15da26Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 88623c15da26Smrg# along with /bin/sed that truncates output. 88633c15da26Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 88643c15da26Smrg test ! -f $lt_ac_sed && continue 88653c15da26Smrg cat /dev/null > conftest.in 88663c15da26Smrg lt_ac_count=0 88673c15da26Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 88683c15da26Smrg # Check for GNU sed and select it if it is found. 88693c15da26Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 88703c15da26Smrg lt_cv_path_SED=$lt_ac_sed 88713c15da26Smrg break 88723c15da26Smrg fi 88733c15da26Smrg while true; do 88743c15da26Smrg cat conftest.in conftest.in >conftest.tmp 88753c15da26Smrg mv conftest.tmp conftest.in 88763c15da26Smrg cp conftest.in conftest.nl 88773c15da26Smrg echo >>conftest.nl 88783c15da26Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 88793c15da26Smrg cmp -s conftest.out conftest.nl || break 88803c15da26Smrg # 10000 chars as input seems more than enough 88813c15da26Smrg test $lt_ac_count -gt 10 && break 88823c15da26Smrg lt_ac_count=`expr $lt_ac_count + 1` 88833c15da26Smrg if test $lt_ac_count -gt $lt_ac_max; then 88843c15da26Smrg lt_ac_max=$lt_ac_count 88853c15da26Smrg lt_cv_path_SED=$lt_ac_sed 88863c15da26Smrg fi 88873c15da26Smrg done 88883c15da26Smrgdone 88893c15da26Smrg]) 88903c15da26SmrgSED=$lt_cv_path_SED 88913c15da26SmrgAC_SUBST([SED]) 88923c15da26SmrgAC_MSG_RESULT([$SED]) 88933c15da26Smrg])#AC_PROG_SED 88943c15da26Smrg])#m4_ifndef 8895d656433aSmrg 88963c15da26Smrg# Old name: 88973c15da26SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 88983c15da26Smrgdnl aclocal-1.4 backwards compatibility: 88993c15da26Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8900d656433aSmrg 8901d656433aSmrg 89023c15da26Smrg# _LT_CHECK_SHELL_FEATURES 89033c15da26Smrg# ------------------------ 89043c15da26Smrg# Find out whether the shell is Bourne or XSI compatible, 89053c15da26Smrg# or has some other useful features. 89063c15da26Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 89073c15da26Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 89083c15da26Smrg# Try some XSI features 89093c15da26Smrgxsi_shell=no 89103c15da26Smrg( _lt_dummy="a/b/c" 89113c15da26Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 89123c15da26Smrg = c,a/b,b/c, \ 89133c15da26Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 89143c15da26Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 89153c15da26Smrg && xsi_shell=yes 89163c15da26SmrgAC_MSG_RESULT([$xsi_shell]) 89173c15da26Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8918d656433aSmrg 89193c15da26SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 89203c15da26Smrglt_shell_append=no 89213c15da26Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 89223c15da26Smrg >/dev/null 2>&1 \ 89233c15da26Smrg && lt_shell_append=yes 89243c15da26SmrgAC_MSG_RESULT([$lt_shell_append]) 89253c15da26Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8926d656433aSmrg 89273c15da26Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 89283c15da26Smrg lt_unset=unset 89293c15da26Smrgelse 89303c15da26Smrg lt_unset=false 89313c15da26Smrgfi 89323c15da26Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8933d656433aSmrg 89343c15da26Smrg# test EBCDIC or ASCII 89353c15da26Smrgcase `echo X|tr X '\101'` in 89363c15da26Smrg A) # ASCII based system 89373c15da26Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 89383c15da26Smrg lt_SP2NL='tr \040 \012' 89393c15da26Smrg lt_NL2SP='tr \015\012 \040\040' 89403c15da26Smrg ;; 89413c15da26Smrg *) # EBCDIC based system 89423c15da26Smrg lt_SP2NL='tr \100 \n' 89433c15da26Smrg lt_NL2SP='tr \r\n \100\100' 89443c15da26Smrg ;; 89453c15da26Smrgesac 89463c15da26Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 89473c15da26Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 89483c15da26Smrg])# _LT_CHECK_SHELL_FEATURES 8949d656433aSmrg 8950d656433aSmrg 89513c15da26Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 89523c15da26Smrg# ------------------------------------------------------ 89533c15da26Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 89543c15da26Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 89553c15da26Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 89563c15da26Smrg[dnl { 89573c15da26Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 89583c15da26Smrg$1 ()\ 89593c15da26Smrg{\ 89603c15da26Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 89613c15da26Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 89623c15da26Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89633c15da26Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89643c15da26Smrgtest 0 -eq $? || _lt_function_replace_fail=: 8965555991fdSmrg]) 8966d656433aSmrg 8967d656433aSmrg 89683c15da26Smrg# _LT_PROG_REPLACE_SHELLFNS 89693c15da26Smrg# ------------------------- 89703c15da26Smrg# Replace existing portable implementations of several shell functions with 89713c15da26Smrg# equivalent extended shell implementations where those features are available.. 89723c15da26Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 89733c15da26Smrg[if test x"$xsi_shell" = xyes; then 89743c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 89753c15da26Smrg case ${1} in 89763c15da26Smrg */*) func_dirname_result="${1%/*}${2}" ;; 89773c15da26Smrg * ) func_dirname_result="${3}" ;; 89783c15da26Smrg esac]) 89793c15da26Smrg 89803c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 89813c15da26Smrg func_basename_result="${1##*/}"]) 89823c15da26Smrg 89833c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 89843c15da26Smrg case ${1} in 89853c15da26Smrg */*) func_dirname_result="${1%/*}${2}" ;; 89863c15da26Smrg * ) func_dirname_result="${3}" ;; 89873c15da26Smrg esac 89883c15da26Smrg func_basename_result="${1##*/}"]) 8989d656433aSmrg 89903c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 89913c15da26Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 89923c15da26Smrg # positional parameters, so assign one to ordinary parameter first. 89933c15da26Smrg func_stripname_result=${3} 89943c15da26Smrg func_stripname_result=${func_stripname_result#"${1}"} 89953c15da26Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 8996d656433aSmrg 89973c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 89983c15da26Smrg func_split_long_opt_name=${1%%=*} 89993c15da26Smrg func_split_long_opt_arg=${1#*=}]) 9000d656433aSmrg 90013c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 90023c15da26Smrg func_split_short_opt_arg=${1#??} 90033c15da26Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 9004d656433aSmrg 90053c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 90063c15da26Smrg case ${1} in 90073c15da26Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 90083c15da26Smrg *) func_lo2o_result=${1} ;; 90093c15da26Smrg esac]) 9010d656433aSmrg 90113c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 9012d656433aSmrg 90133c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 9014d656433aSmrg 90153c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 9016555991fdSmrgfi 9017d656433aSmrg 90183c15da26Smrgif test x"$lt_shell_append" = xyes; then 90193c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 9020d656433aSmrg 90213c15da26Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 90223c15da26Smrg func_quote_for_eval "${2}" 90233c15da26Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 90243c15da26Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 9025d656433aSmrg 90263c15da26Smrg # Save a `func_append' function call where possible by direct use of '+=' 90273c15da26Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 90283c15da26Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 90293c15da26Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 90303c15da26Smrg test 0 -eq $? || _lt_function_replace_fail=: 90313c15da26Smrgelse 90323c15da26Smrg # Save a `func_append' function call even when '+=' is not available 90333c15da26Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 90343c15da26Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 90353c15da26Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 90363c15da26Smrg test 0 -eq $? || _lt_function_replace_fail=: 90373c15da26Smrgfi 9038d656433aSmrg 90393c15da26Smrgif test x"$_lt_function_replace_fail" = x":"; then 90403c15da26Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 90413c15da26Smrgfi 90423c15da26Smrg]) 9043d656433aSmrg 90443c15da26Smrg# _LT_PATH_CONVERSION_FUNCTIONS 90453c15da26Smrg# ----------------------------- 90463c15da26Smrg# Determine which file name conversion functions should be used by 90473c15da26Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 90483c15da26Smrg# for certain cross-compile configurations and native mingw. 90493c15da26Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 90503c15da26Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 90513c15da26SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 90523c15da26SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 90533c15da26SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 90543c15da26Smrg[case $host in 90553c15da26Smrg *-*-mingw* ) 90563c15da26Smrg case $build in 90573c15da26Smrg *-*-mingw* ) # actually msys 90583c15da26Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 90593c15da26Smrg ;; 90603c15da26Smrg *-*-cygwin* ) 90613c15da26Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 90623c15da26Smrg ;; 90633c15da26Smrg * ) # otherwise, assume *nix 90643c15da26Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 90653c15da26Smrg ;; 90663c15da26Smrg esac 9067555991fdSmrg ;; 90683c15da26Smrg *-*-cygwin* ) 90693c15da26Smrg case $build in 90703c15da26Smrg *-*-mingw* ) # actually msys 90713c15da26Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 90723c15da26Smrg ;; 90733c15da26Smrg *-*-cygwin* ) 90743c15da26Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 90753c15da26Smrg ;; 90763c15da26Smrg * ) # otherwise, assume *nix 90773c15da26Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 90783c15da26Smrg ;; 9079555991fdSmrg esac 9080555991fdSmrg ;; 90813c15da26Smrg * ) # unhandled hosts (and "normal" native builds) 90823c15da26Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 90833c15da26Smrg ;; 9084555991fdSmrgesac 9085555991fdSmrg]) 90863c15da26Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 90873c15da26SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 90883c15da26Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 90893c15da26Smrg [0], [convert $build file names to $host format])dnl 90903c15da26Smrg 90913c15da26SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 90923c15da26SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 90933c15da26Smrg[#assume ordinary cross tools, or native build. 90943c15da26Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 90953c15da26Smrgcase $host in 90963c15da26Smrg *-*-mingw* ) 90973c15da26Smrg case $build in 90983c15da26Smrg *-*-mingw* ) # actually msys 90993c15da26Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 91003c15da26Smrg ;; 91013c15da26Smrg esac 91023c15da26Smrg ;; 9103555991fdSmrgesac 91043c15da26Smrg]) 91053c15da26Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 91063c15da26SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 91073c15da26Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 91083c15da26Smrg [0], [convert $build files to toolchain format])dnl 91093c15da26Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 9110d656433aSmrg 91113c15da26Smrg# Helper functions for option handling. -*- Autoconf -*- 91123c15da26Smrg# 91133c15da26Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 91143c15da26Smrg# Inc. 91153c15da26Smrg# Written by Gary V. Vaughan, 2004 91163c15da26Smrg# 91173c15da26Smrg# This file is free software; the Free Software Foundation gives 91183c15da26Smrg# unlimited permission to copy and/or distribute it, with or without 91193c15da26Smrg# modifications, as long as this notice is preserved. 9120d656433aSmrg 91213c15da26Smrg# serial 7 ltoptions.m4 9122d656433aSmrg 91233c15da26Smrg# This is to help aclocal find these macros, as it can't see m4_define. 91243c15da26SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9125d656433aSmrg 9126126a8a12Smrg 91273c15da26Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 91283c15da26Smrg# ------------------------------------------ 91293c15da26Smrgm4_define([_LT_MANGLE_OPTION], 91303c15da26Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9131126a8a12Smrg 9132126a8a12Smrg 91333c15da26Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 91343c15da26Smrg# --------------------------------------- 91353c15da26Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 91363c15da26Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 91373c15da26Smrg# saved as a flag. 91383c15da26Smrgm4_define([_LT_SET_OPTION], 91393c15da26Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 91403c15da26Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 91413c15da26Smrg _LT_MANGLE_DEFUN([$1], [$2]), 91423c15da26Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 91433c15da26Smrg]) 9144126a8a12Smrg 9145126a8a12Smrg 91463c15da26Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 91473c15da26Smrg# ------------------------------------------------------------ 91483c15da26Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 91493c15da26Smrgm4_define([_LT_IF_OPTION], 91503c15da26Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9151126a8a12Smrg 9152126a8a12Smrg 91533c15da26Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 91543c15da26Smrg# ------------------------------------------------------- 91553c15da26Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 91563c15da26Smrg# are set. 91573c15da26Smrgm4_define([_LT_UNLESS_OPTIONS], 91583c15da26Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 91593c15da26Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 91603c15da26Smrg [m4_define([$0_found])])])[]dnl 91613c15da26Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 91623c15da26Smrg])[]dnl 91633c15da26Smrg]) 9164126a8a12Smrg 9165126a8a12Smrg 91663c15da26Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 91673c15da26Smrg# ---------------------------------------- 91683c15da26Smrg# OPTION-LIST is a space-separated list of Libtool options associated 91693c15da26Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 91703c15da26Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 91713c15da26Smrg# the unknown option and exit. 91723c15da26Smrgm4_defun([_LT_SET_OPTIONS], 91733c15da26Smrg[# Set options 91743c15da26Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 91753c15da26Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 9176126a8a12Smrg 91773c15da26Smrgm4_if([$1],[LT_INIT],[ 91783c15da26Smrg dnl 91793c15da26Smrg dnl Simply set some default values (i.e off) if boolean options were not 91803c15da26Smrg dnl specified: 91813c15da26Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 91823c15da26Smrg ]) 91833c15da26Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 91843c15da26Smrg ]) 91853c15da26Smrg dnl 91863c15da26Smrg dnl If no reference was made to various pairs of opposing options, then 91873c15da26Smrg dnl we run the default mode handler for the pair. For example, if neither 91883c15da26Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 91893c15da26Smrg dnl archives by default: 91903c15da26Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 91913c15da26Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 91923c15da26Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 91933c15da26Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 91943c15da26Smrg [_LT_ENABLE_FAST_INSTALL]) 91953c15da26Smrg ]) 91963c15da26Smrg])# _LT_SET_OPTIONS 9197126a8a12Smrg 9198126a8a12Smrg 9199126a8a12Smrg 92003c15da26Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 92013c15da26Smrg# ----------------------------------------- 92023c15da26Smrgm4_define([_LT_MANGLE_DEFUN], 92033c15da26Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 92043c15da26Smrg 92053c15da26Smrg 92063c15da26Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 92073c15da26Smrg# ----------------------------------------------- 92083c15da26Smrgm4_define([LT_OPTION_DEFINE], 92093c15da26Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 92103c15da26Smrg])# LT_OPTION_DEFINE 92113c15da26Smrg 92123c15da26Smrg 92133c15da26Smrg# dlopen 92143c15da26Smrg# ------ 92153c15da26SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 92163c15da26Smrg]) 92173c15da26Smrg 92183c15da26SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 92193c15da26Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 92203c15da26SmrgAC_DIAGNOSE([obsolete], 92213c15da26Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 92223c15da26Smrgput the `dlopen' option into LT_INIT's first parameter.]) 92233c15da26Smrg]) 92243c15da26Smrg 92253c15da26Smrgdnl aclocal-1.4 backwards compatibility: 92263c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 92273c15da26Smrg 92283c15da26Smrg 92293c15da26Smrg# win32-dll 92303c15da26Smrg# --------- 92313c15da26Smrg# Declare package support for building win32 dll's. 92323c15da26SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 92333c15da26Smrg[enable_win32_dll=yes 92343c15da26Smrg 92353c15da26Smrgcase $host in 92363c15da26Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 92373c15da26Smrg AC_CHECK_TOOL(AS, as, false) 92383c15da26Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 92393c15da26Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 92403c15da26Smrg ;; 92413c15da26Smrgesac 9242126a8a12Smrg 92433c15da26Smrgtest -z "$AS" && AS=as 92443c15da26Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9245126a8a12Smrg 92463c15da26Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 92473c15da26Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9248126a8a12Smrg 92493c15da26Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 92503c15da26Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 92513c15da26Smrg])# win32-dll 9252126a8a12Smrg 92533c15da26SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 92543c15da26Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 92553c15da26Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 92563c15da26SmrgAC_DIAGNOSE([obsolete], 92573c15da26Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 92583c15da26Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 92593c15da26Smrg]) 9260126a8a12Smrg 92613c15da26Smrgdnl aclocal-1.4 backwards compatibility: 92623c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9263d656433aSmrg 9264d656433aSmrg 92653c15da26Smrg# _LT_ENABLE_SHARED([DEFAULT]) 92663c15da26Smrg# ---------------------------- 92673c15da26Smrg# implement the --enable-shared flag, and supports the `shared' and 92683c15da26Smrg# `disable-shared' LT_INIT options. 92693c15da26Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92703c15da26Smrgm4_define([_LT_ENABLE_SHARED], 92713c15da26Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 92723c15da26SmrgAC_ARG_ENABLE([shared], 92733c15da26Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 92743c15da26Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 92753c15da26Smrg [p=${PACKAGE-default} 92763c15da26Smrg case $enableval in 92773c15da26Smrg yes) enable_shared=yes ;; 92783c15da26Smrg no) enable_shared=no ;; 92793c15da26Smrg *) 92803c15da26Smrg enable_shared=no 92813c15da26Smrg # Look at the argument we got. We use all the common list separators. 92823c15da26Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92833c15da26Smrg for pkg in $enableval; do 92843c15da26Smrg IFS="$lt_save_ifs" 92853c15da26Smrg if test "X$pkg" = "X$p"; then 92863c15da26Smrg enable_shared=yes 92873c15da26Smrg fi 92883c15da26Smrg done 92893c15da26Smrg IFS="$lt_save_ifs" 92903c15da26Smrg ;; 92913c15da26Smrg esac], 92923c15da26Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9293d656433aSmrg 92943c15da26Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 92953c15da26Smrg [Whether or not to build shared libraries]) 92963c15da26Smrg])# _LT_ENABLE_SHARED 9297555991fdSmrg 92983c15da26SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 92993c15da26SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9300d656433aSmrg 93013c15da26Smrg# Old names: 93023c15da26SmrgAC_DEFUN([AC_ENABLE_SHARED], 93033c15da26Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 93043c15da26Smrg]) 9305d656433aSmrg 93063c15da26SmrgAC_DEFUN([AC_DISABLE_SHARED], 93073c15da26Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 93083c15da26Smrg]) 9309d656433aSmrg 93103c15da26SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 93113c15da26SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9312d656433aSmrg 93133c15da26Smrgdnl aclocal-1.4 backwards compatibility: 93143c15da26Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 93153c15da26Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9316d656433aSmrg 9317d656433aSmrg 9318d656433aSmrg 93193c15da26Smrg# _LT_ENABLE_STATIC([DEFAULT]) 93203c15da26Smrg# ---------------------------- 93213c15da26Smrg# implement the --enable-static flag, and support the `static' and 93223c15da26Smrg# `disable-static' LT_INIT options. 93233c15da26Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 93243c15da26Smrgm4_define([_LT_ENABLE_STATIC], 93253c15da26Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 93263c15da26SmrgAC_ARG_ENABLE([static], 93273c15da26Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 93283c15da26Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 93293c15da26Smrg [p=${PACKAGE-default} 93303c15da26Smrg case $enableval in 93313c15da26Smrg yes) enable_static=yes ;; 93323c15da26Smrg no) enable_static=no ;; 93333c15da26Smrg *) 93343c15da26Smrg enable_static=no 93353c15da26Smrg # Look at the argument we got. We use all the common list separators. 93363c15da26Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93373c15da26Smrg for pkg in $enableval; do 93383c15da26Smrg IFS="$lt_save_ifs" 93393c15da26Smrg if test "X$pkg" = "X$p"; then 93403c15da26Smrg enable_static=yes 9341555991fdSmrg fi 93423c15da26Smrg done 93433c15da26Smrg IFS="$lt_save_ifs" 93443c15da26Smrg ;; 93453c15da26Smrg esac], 93463c15da26Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9347d656433aSmrg 93483c15da26Smrg _LT_DECL([build_old_libs], [enable_static], [0], 93493c15da26Smrg [Whether or not to build static libraries]) 93503c15da26Smrg])# _LT_ENABLE_STATIC 9351d656433aSmrg 93523c15da26SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 93533c15da26SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9354d656433aSmrg 93553c15da26Smrg# Old names: 93563c15da26SmrgAC_DEFUN([AC_ENABLE_STATIC], 93573c15da26Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 93583c15da26Smrg]) 9359d656433aSmrg 93603c15da26SmrgAC_DEFUN([AC_DISABLE_STATIC], 93613c15da26Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 93623c15da26Smrg]) 9363d656433aSmrg 93643c15da26SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 93653c15da26SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9366d656433aSmrg 93673c15da26Smrgdnl aclocal-1.4 backwards compatibility: 93683c15da26Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 93693c15da26Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9370d656433aSmrg 9371d656433aSmrg 9372d656433aSmrg 93733c15da26Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 93743c15da26Smrg# ---------------------------------- 93753c15da26Smrg# implement the --enable-fast-install flag, and support the `fast-install' 93763c15da26Smrg# and `disable-fast-install' LT_INIT options. 93773c15da26Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 93783c15da26Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 93793c15da26Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 93803c15da26SmrgAC_ARG_ENABLE([fast-install], 93813c15da26Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 93823c15da26Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 93833c15da26Smrg [p=${PACKAGE-default} 93843c15da26Smrg case $enableval in 93853c15da26Smrg yes) enable_fast_install=yes ;; 93863c15da26Smrg no) enable_fast_install=no ;; 93873c15da26Smrg *) 93883c15da26Smrg enable_fast_install=no 93893c15da26Smrg # Look at the argument we got. We use all the common list separators. 93903c15da26Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93913c15da26Smrg for pkg in $enableval; do 93923c15da26Smrg IFS="$lt_save_ifs" 93933c15da26Smrg if test "X$pkg" = "X$p"; then 93943c15da26Smrg enable_fast_install=yes 93953c15da26Smrg fi 93963c15da26Smrg done 93973c15da26Smrg IFS="$lt_save_ifs" 93983c15da26Smrg ;; 93993c15da26Smrg esac], 94003c15da26Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 94013c15da26Smrg 94023c15da26Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 94033c15da26Smrg [Whether or not to optimize for fast installation])dnl 94043c15da26Smrg])# _LT_ENABLE_FAST_INSTALL 9405d656433aSmrg 94063c15da26SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 94073c15da26SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9408d656433aSmrg 94093c15da26Smrg# Old names: 94103c15da26SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 94113c15da26Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 94123c15da26SmrgAC_DIAGNOSE([obsolete], 94133c15da26Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 94143c15da26Smrgthe `fast-install' option into LT_INIT's first parameter.]) 94153c15da26Smrg]) 9416d656433aSmrg 94173c15da26SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 94183c15da26Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 94193c15da26SmrgAC_DIAGNOSE([obsolete], 94203c15da26Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 94213c15da26Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 94223c15da26Smrg]) 9423d656433aSmrg 94243c15da26Smrgdnl aclocal-1.4 backwards compatibility: 94253c15da26Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 94263c15da26Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9427d656433aSmrg 9428d656433aSmrg 94293c15da26Smrg# _LT_WITH_PIC([MODE]) 94303c15da26Smrg# -------------------- 94313c15da26Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 94323c15da26Smrg# LT_INIT options. 94333c15da26Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 94343c15da26Smrgm4_define([_LT_WITH_PIC], 94353c15da26Smrg[AC_ARG_WITH([pic], 94360a6b08f8Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 94373c15da26Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 94380a6b08f8Smrg [lt_p=${PACKAGE-default} 94390a6b08f8Smrg case $withval in 94400a6b08f8Smrg yes|no) pic_mode=$withval ;; 94410a6b08f8Smrg *) 94420a6b08f8Smrg pic_mode=default 94430a6b08f8Smrg # Look at the argument we got. We use all the common list separators. 94440a6b08f8Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 94450a6b08f8Smrg for lt_pkg in $withval; do 94460a6b08f8Smrg IFS="$lt_save_ifs" 94470a6b08f8Smrg if test "X$lt_pkg" = "X$lt_p"; then 94480a6b08f8Smrg pic_mode=yes 94490a6b08f8Smrg fi 94500a6b08f8Smrg done 94510a6b08f8Smrg IFS="$lt_save_ifs" 94520a6b08f8Smrg ;; 94530a6b08f8Smrg esac], 94543c15da26Smrg [pic_mode=default]) 9455d656433aSmrg 94563c15da26Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9457d656433aSmrg 94583c15da26Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 94593c15da26Smrg])# _LT_WITH_PIC 9460d656433aSmrg 94613c15da26SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 94623c15da26SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9463555991fdSmrg 94643c15da26Smrg# Old name: 94653c15da26SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 94663c15da26Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 94673c15da26SmrgAC_DIAGNOSE([obsolete], 94683c15da26Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 94693c15da26Smrgput the `pic-only' option into LT_INIT's first parameter.]) 94703c15da26Smrg]) 9471d656433aSmrg 94723c15da26Smrgdnl aclocal-1.4 backwards compatibility: 94733c15da26Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9474555991fdSmrg 9475555991fdSmrg 94763c15da26Smrgm4_define([_LTDL_MODE], []) 94773c15da26SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 94783c15da26Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 94793c15da26SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 94803c15da26Smrg [m4_define([_LTDL_MODE], [recursive])]) 94813c15da26SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 94823c15da26Smrg [m4_define([_LTDL_MODE], [subproject])]) 9483555991fdSmrg 94843c15da26Smrgm4_define([_LTDL_TYPE], []) 94853c15da26SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 94863c15da26Smrg [m4_define([_LTDL_TYPE], [installable])]) 94873c15da26SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 94883c15da26Smrg [m4_define([_LTDL_TYPE], [convenience])]) 9489555991fdSmrg 94903c15da26Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 94913c15da26Smrg# 94923c15da26Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 94933c15da26Smrg# Written by Gary V. Vaughan, 2004 94943c15da26Smrg# 94953c15da26Smrg# This file is free software; the Free Software Foundation gives 94963c15da26Smrg# unlimited permission to copy and/or distribute it, with or without 94973c15da26Smrg# modifications, as long as this notice is preserved. 9498555991fdSmrg 94993c15da26Smrg# serial 6 ltsugar.m4 9500555991fdSmrg 95013c15da26Smrg# This is to help aclocal find these macros, as it can't see m4_define. 95023c15da26SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9503555991fdSmrg 9504d656433aSmrg 95053c15da26Smrg# lt_join(SEP, ARG1, [ARG2...]) 95063c15da26Smrg# ----------------------------- 95073c15da26Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 95083c15da26Smrg# associated separator. 95093c15da26Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 95103c15da26Smrg# versions in m4sugar had bugs. 95113c15da26Smrgm4_define([lt_join], 95123c15da26Smrg[m4_if([$#], [1], [], 95133c15da26Smrg [$#], [2], [[$2]], 95143c15da26Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 95153c15da26Smrgm4_define([_lt_join], 95163c15da26Smrg[m4_if([$#$2], [2], [], 95173c15da26Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9518d656433aSmrg 9519d656433aSmrg 95203c15da26Smrg# lt_car(LIST) 95213c15da26Smrg# lt_cdr(LIST) 95223c15da26Smrg# ------------ 95233c15da26Smrg# Manipulate m4 lists. 95243c15da26Smrg# These macros are necessary as long as will still need to support 95253c15da26Smrg# Autoconf-2.59 which quotes differently. 95263c15da26Smrgm4_define([lt_car], [[$1]]) 95273c15da26Smrgm4_define([lt_cdr], 95283c15da26Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 95293c15da26Smrg [$#], 1, [], 95303c15da26Smrg [m4_dquote(m4_shift($@))])]) 95313c15da26Smrgm4_define([lt_unquote], $1) 9532d656433aSmrg 9533d656433aSmrg 95343c15da26Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 95353c15da26Smrg# ------------------------------------------ 95363c15da26Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 95373c15da26Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 95383c15da26Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 95393c15da26Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 95403c15da26Smrg# than defined and empty). 95413c15da26Smrg# 95423c15da26Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 95433c15da26Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 95443c15da26Smrgm4_define([lt_append], 95453c15da26Smrg[m4_define([$1], 95463c15da26Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9547d656433aSmrg 9548d656433aSmrg 9549d656433aSmrg 95503c15da26Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 95513c15da26Smrg# ---------------------------------------------------------- 95523c15da26Smrg# Produce a SEP delimited list of all paired combinations of elements of 95533c15da26Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 95543c15da26Smrg# has the form PREFIXmINFIXSUFFIXn. 95553c15da26Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 95563c15da26Smrgm4_define([lt_combine], 95573c15da26Smrg[m4_if(m4_eval([$# > 3]), [1], 95583c15da26Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 95593c15da26Smrg[[m4_foreach([_Lt_prefix], [$2], 95603c15da26Smrg [m4_foreach([_Lt_suffix], 95613c15da26Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 95623c15da26Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9563d656433aSmrg 9564d656433aSmrg 95653c15da26Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 95663c15da26Smrg# ----------------------------------------------------------------------- 95673c15da26Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 95683c15da26Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 95693c15da26Smrgm4_define([lt_if_append_uniq], 95703c15da26Smrg[m4_ifdef([$1], 95713c15da26Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 95723c15da26Smrg [lt_append([$1], [$2], [$3])$4], 95733c15da26Smrg [$5])], 95743c15da26Smrg [lt_append([$1], [$2], [$3])$4])]) 9575d656433aSmrg 9576d656433aSmrg 95773c15da26Smrg# lt_dict_add(DICT, KEY, VALUE) 95783c15da26Smrg# ----------------------------- 95793c15da26Smrgm4_define([lt_dict_add], 95803c15da26Smrg[m4_define([$1($2)], [$3])]) 9581d656433aSmrg 95823c15da26Smrg 95833c15da26Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 95843c15da26Smrg# -------------------------------------------- 95853c15da26Smrgm4_define([lt_dict_add_subkey], 95863c15da26Smrg[m4_define([$1($2:$3)], [$4])]) 9587d656433aSmrg 9588d656433aSmrg 95893c15da26Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 95903c15da26Smrg# ---------------------------------- 95913c15da26Smrgm4_define([lt_dict_fetch], 95923c15da26Smrg[m4_ifval([$3], 95933c15da26Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 95943c15da26Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9595d656433aSmrg 9596d656433aSmrg 95973c15da26Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 95983c15da26Smrg# ----------------------------------------------------------------- 95993c15da26Smrgm4_define([lt_if_dict_fetch], 96003c15da26Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 96013c15da26Smrg [$5], 96023c15da26Smrg [$6])]) 9603555991fdSmrg 9604555991fdSmrg 96053c15da26Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 96063c15da26Smrg# -------------------------------------------------------------- 96073c15da26Smrgm4_define([lt_dict_filter], 96083c15da26Smrg[m4_if([$5], [], [], 96093c15da26Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 96103c15da26Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 96113c15da26Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9612555991fdSmrg]) 9613555991fdSmrg 96143c15da26Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 96153c15da26Smrg# 96163c15da26Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 96173c15da26Smrg# Written by Scott James Remnant, 2004 96183c15da26Smrg# 96193c15da26Smrg# This file is free software; the Free Software Foundation gives 96203c15da26Smrg# unlimited permission to copy and/or distribute it, with or without 96213c15da26Smrg# modifications, as long as this notice is preserved. 9622d656433aSmrg 96233c15da26Smrg# @configure_input@ 9624d656433aSmrg 96250a6b08f8Smrg# serial 3337 ltversion.m4 96263c15da26Smrg# This file is part of GNU Libtool 9627126a8a12Smrg 96280a6b08f8Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 96290a6b08f8Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 9630126a8a12Smrg 96313c15da26SmrgAC_DEFUN([LTVERSION_VERSION], 96320a6b08f8Smrg[macro_version='2.4.2' 96330a6b08f8Smrgmacro_revision='1.3337' 96343c15da26Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 96353c15da26Smrg_LT_DECL(, macro_revision, 0) 96363c15da26Smrg]) 9637d656433aSmrg 96383c15da26Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 96393c15da26Smrg# 96403c15da26Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 96413c15da26Smrg# Written by Scott James Remnant, 2004. 96423c15da26Smrg# 96433c15da26Smrg# This file is free software; the Free Software Foundation gives 96443c15da26Smrg# unlimited permission to copy and/or distribute it, with or without 96453c15da26Smrg# modifications, as long as this notice is preserved. 9646126a8a12Smrg 96473c15da26Smrg# serial 5 lt~obsolete.m4 9648126a8a12Smrg 96493c15da26Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 96503c15da26Smrg# 96513c15da26Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 96523c15da26Smrg# which have later been changed to m4_define as they aren't part of the 96533c15da26Smrg# exported API, or moved to Autoconf or Automake where they belong. 96543c15da26Smrg# 96553c15da26Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 96563c15da26Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 96573c15da26Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 96583c15da26Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 96593c15da26Smrg# and doesn't know about Autoconf macros at all.) 96603c15da26Smrg# 96613c15da26Smrg# So we provide this file, which has a silly filename so it's always 96623c15da26Smrg# included after everything else. This provides aclocal with the 96633c15da26Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 96643c15da26Smrg# because those macros already exist, or will be overwritten later. 96653c15da26Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 96663c15da26Smrg# 96673c15da26Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 96683c15da26Smrg# Yes, that means every name once taken will need to remain here until 96693c15da26Smrg# we give up compatibility with versions before 1.7, at which point 96703c15da26Smrg# we need to keep only those names which we still refer to. 9671d656433aSmrg 96723c15da26Smrg# This is to help aclocal find these macros, as it can't see m4_define. 96733c15da26SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9674126a8a12Smrg 96753c15da26Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 96763c15da26Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 96773c15da26Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 96783c15da26Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 96793c15da26Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 96803c15da26Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 96813c15da26Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 96823c15da26Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 96833c15da26Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 96843c15da26Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 96853c15da26Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 96863c15da26Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 96873c15da26Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 96883c15da26Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 96893c15da26Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 96903c15da26Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 96913c15da26Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 96923c15da26Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 96933c15da26Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 96943c15da26Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 96953c15da26Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 96963c15da26Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 96973c15da26Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 96983c15da26Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 96993c15da26Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 97003c15da26Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 97013c15da26Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 97023c15da26Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 97033c15da26Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 97043c15da26Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 97053c15da26Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 97063c15da26Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 97073c15da26Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 97083c15da26Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 97093c15da26Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 97103c15da26Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 97113c15da26Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 97123c15da26Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 97133c15da26Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 97143c15da26Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 97153c15da26Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 97163c15da26Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 97173c15da26Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 97183c15da26Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 97193c15da26Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 97203c15da26Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 97213c15da26Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 97223c15da26Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 97233c15da26Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 97243c15da26Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 97253c15da26Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 97263c15da26Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 97273c15da26Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 97283c15da26Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 97293c15da26Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 97303c15da26Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 97313c15da26Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 97323c15da26Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 97333c15da26Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 97343c15da26Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 97353c15da26Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9736126a8a12Smrg 97370a6b08f8Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 97380a6b08f8Smrg# 97390a6b08f8Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 97400a6b08f8Smrg# 97410a6b08f8Smrg# This program is free software; you can redistribute it and/or modify 97420a6b08f8Smrg# it under the terms of the GNU General Public License as published by 97430a6b08f8Smrg# the Free Software Foundation; either version 2 of the License, or 97440a6b08f8Smrg# (at your option) any later version. 97450a6b08f8Smrg# 97460a6b08f8Smrg# This program is distributed in the hope that it will be useful, but 97470a6b08f8Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 97480a6b08f8Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 97490a6b08f8Smrg# General Public License for more details. 97500a6b08f8Smrg# 97510a6b08f8Smrg# You should have received a copy of the GNU General Public License 97520a6b08f8Smrg# along with this program; if not, write to the Free Software 97530a6b08f8Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 97540a6b08f8Smrg# 97550a6b08f8Smrg# As a special exception to the GNU General Public License, if you 97560a6b08f8Smrg# distribute this file as part of a program that contains a 97570a6b08f8Smrg# configuration script generated by Autoconf, you may include it under 97580a6b08f8Smrg# the same distribution terms that you use for the rest of that program. 97590a6b08f8Smrg 97600a6b08f8Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 97610a6b08f8Smrg# ---------------------------------- 97620a6b08f8SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 97630a6b08f8Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 97640a6b08f8Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 97650a6b08f8SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 97660a6b08f8Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 97670a6b08f8Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 97680a6b08f8Smrgfi 97690a6b08f8Smrgif test -n "$PKG_CONFIG"; then 97700a6b08f8Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 97710a6b08f8Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 97720a6b08f8Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 97730a6b08f8Smrg AC_MSG_RESULT([yes]) 97740a6b08f8Smrg else 97750a6b08f8Smrg AC_MSG_RESULT([no]) 97760a6b08f8Smrg PKG_CONFIG="" 97770a6b08f8Smrg fi 97780a6b08f8Smrg 97790a6b08f8Smrgfi[]dnl 97800a6b08f8Smrg])# PKG_PROG_PKG_CONFIG 97810a6b08f8Smrg 97820a6b08f8Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 97830a6b08f8Smrg# 97840a6b08f8Smrg# Check to see whether a particular set of modules exists. Similar 97850a6b08f8Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 97860a6b08f8Smrg# 97870a6b08f8Smrg# 97880a6b08f8Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 97890a6b08f8Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 97900a6b08f8Smrg# PKG_CHECK_EXISTS manually 97910a6b08f8Smrg# -------------------------------------------------------------- 97920a6b08f8SmrgAC_DEFUN([PKG_CHECK_EXISTS], 97930a6b08f8Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 97940a6b08f8Smrgif test -n "$PKG_CONFIG" && \ 97950a6b08f8Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 97960a6b08f8Smrg m4_ifval([$2], [$2], [:]) 97970a6b08f8Smrgm4_ifvaln([$3], [else 97980a6b08f8Smrg $3])dnl 97990a6b08f8Smrgfi]) 98000a6b08f8Smrg 98010a6b08f8Smrg 98020a6b08f8Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 98030a6b08f8Smrg# --------------------------------------------- 98040a6b08f8Smrgm4_define([_PKG_CONFIG], 98050a6b08f8Smrg[if test -n "$$1"; then 98060a6b08f8Smrg pkg_cv_[]$1="$$1" 98070a6b08f8Smrg elif test -n "$PKG_CONFIG"; then 98080a6b08f8Smrg PKG_CHECK_EXISTS([$3], 98090a6b08f8Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 98100a6b08f8Smrg [pkg_failed=yes]) 98110a6b08f8Smrg else 98120a6b08f8Smrg pkg_failed=untried 98130a6b08f8Smrgfi[]dnl 98140a6b08f8Smrg])# _PKG_CONFIG 98150a6b08f8Smrg 98160a6b08f8Smrg# _PKG_SHORT_ERRORS_SUPPORTED 98170a6b08f8Smrg# ----------------------------- 98180a6b08f8SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 98190a6b08f8Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 98200a6b08f8Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 98210a6b08f8Smrg _pkg_short_errors_supported=yes 98220a6b08f8Smrgelse 98230a6b08f8Smrg _pkg_short_errors_supported=no 98240a6b08f8Smrgfi[]dnl 98250a6b08f8Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 98260a6b08f8Smrg 98270a6b08f8Smrg 98280a6b08f8Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 98290a6b08f8Smrg# [ACTION-IF-NOT-FOUND]) 98300a6b08f8Smrg# 98310a6b08f8Smrg# 98320a6b08f8Smrg# Note that if there is a possibility the first call to 98330a6b08f8Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 98340a6b08f8Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 98350a6b08f8Smrg# 98360a6b08f8Smrg# 98370a6b08f8Smrg# -------------------------------------------------------------- 98380a6b08f8SmrgAC_DEFUN([PKG_CHECK_MODULES], 98390a6b08f8Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 98400a6b08f8SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 98410a6b08f8SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 98420a6b08f8Smrg 98430a6b08f8Smrgpkg_failed=no 98440a6b08f8SmrgAC_MSG_CHECKING([for $1]) 98450a6b08f8Smrg 98460a6b08f8Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 98470a6b08f8Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 98480a6b08f8Smrg 98490a6b08f8Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 98500a6b08f8Smrgand $1[]_LIBS to avoid the need to call pkg-config. 98510a6b08f8SmrgSee the pkg-config man page for more details.]) 98520a6b08f8Smrg 98530a6b08f8Smrgif test $pkg_failed = yes; then 98540a6b08f8Smrg _PKG_SHORT_ERRORS_SUPPORTED 98550a6b08f8Smrg if test $_pkg_short_errors_supported = yes; then 98560a6b08f8Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 98570a6b08f8Smrg else 98580a6b08f8Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 98590a6b08f8Smrg fi 98600a6b08f8Smrg # Put the nasty error message in config.log where it belongs 98610a6b08f8Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 98620a6b08f8Smrg 98630a6b08f8Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 98640a6b08f8Smrg[Package requirements ($2) were not met: 98650a6b08f8Smrg 98660a6b08f8Smrg$$1_PKG_ERRORS 98670a6b08f8Smrg 98680a6b08f8SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 98690a6b08f8Smrginstalled software in a non-standard prefix. 98700a6b08f8Smrg 98710a6b08f8Smrg_PKG_TEXT 98720a6b08f8Smrg])], 98730a6b08f8Smrg [AC_MSG_RESULT([no]) 98740a6b08f8Smrg $4]) 98750a6b08f8Smrgelif test $pkg_failed = untried; then 98760a6b08f8Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 98770a6b08f8Smrg[The pkg-config script could not be found or is too old. Make sure it 98780a6b08f8Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 98790a6b08f8Smrgpath to pkg-config. 98800a6b08f8Smrg 98810a6b08f8Smrg_PKG_TEXT 98820a6b08f8Smrg 98830a6b08f8SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 98840a6b08f8Smrg [$4]) 98850a6b08f8Smrgelse 98860a6b08f8Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 98870a6b08f8Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 98880a6b08f8Smrg AC_MSG_RESULT([yes]) 98890a6b08f8Smrg ifelse([$3], , :, [$3]) 98900a6b08f8Smrgfi[]dnl 98910a6b08f8Smrg])# PKG_CHECK_MODULES 98920a6b08f8Smrg 98933c15da26Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 98943c15da26Smrgdnl 98953c15da26Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 98960a6b08f8Smrgdnl 98973c15da26Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 98983c15da26Smrgdnl copy of this software and associated documentation files (the "Software"), 98993c15da26Smrgdnl to deal in the Software without restriction, including without limitation 99003c15da26Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 99013c15da26Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 99023c15da26Smrgdnl Software is furnished to do so, subject to the following conditions: 99033c15da26Smrgdnl 99043c15da26Smrgdnl The above copyright notice and this permission notice (including the next 99053c15da26Smrgdnl paragraph) shall be included in all copies or substantial portions of the 99063c15da26Smrgdnl Software. 99073c15da26Smrgdnl 99083c15da26Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 99093c15da26Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 99103c15da26Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 99113c15da26Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 99123c15da26Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 99133c15da26Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 99143c15da26Smrgdnl DEALINGS IN THE SOFTWARE. 9915126a8a12Smrg 99163c15da26Smrg# XORG_MACROS_VERSION(required-version) 99173c15da26Smrg# ------------------------------------- 99183c15da26Smrg# Minimum version: 1.1.0 99193c15da26Smrg# 99203c15da26Smrg# If you're using a macro added in Version 1.1 or newer, include this in 99213c15da26Smrg# your configure.ac with the minimum required version, such as: 99223c15da26Smrg# XORG_MACROS_VERSION(1.1) 99233c15da26Smrg# 99243c15da26Smrg# To ensure that this macro is defined, also add: 99253c15da26Smrg# m4_ifndef([XORG_MACROS_VERSION], 99263c15da26Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 99273c15da26Smrg# 99283c15da26Smrg# 99290a6b08f8Smrg# See the "minimum version" comment for each macro you use to see what 99303c15da26Smrg# version you require. 99313c15da26Smrgm4_defun([XORG_MACROS_VERSION],[ 99320a6b08f8Smrgm4_define([vers_have], [1.17.1]) 99333c15da26Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 99343c15da26Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 99353c15da26Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 99363c15da26Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 99373c15da26Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 99383c15da26Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 99393c15da26Smrgm4_undefine([vers_have]) 99403c15da26Smrgm4_undefine([maj_have]) 99413c15da26Smrgm4_undefine([maj_needed]) 99423c15da26Smrg]) # XORG_MACROS_VERSION 9943126a8a12Smrg 99443c15da26Smrg# XORG_PROG_RAWCPP() 99453c15da26Smrg# ------------------ 99463c15da26Smrg# Minimum version: 1.0.0 99473c15da26Smrg# 99483c15da26Smrg# Find cpp program and necessary flags for use in pre-processing text files 99493c15da26Smrg# such as man pages and config files 99503c15da26SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 99513c15da26SmrgAC_REQUIRE([AC_PROG_CPP]) 99520a6b08f8SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 99533c15da26Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9954126a8a12Smrg 99553c15da26Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 99563c15da26Smrg# which is not the best choice for supporting other OS'es, but covers most 99573c15da26Smrg# of the ones we need for now. 99583c15da26SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 99593c15da26SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 99603c15da26Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99613c15da26Smrg AC_MSG_RESULT([no]) 99623c15da26Smrgelse 99633c15da26Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99643c15da26Smrg RAWCPPFLAGS=-undef 99653c15da26Smrg AC_MSG_RESULT([yes]) 99663c15da26Smrg # under Cygwin unix is still defined even with -undef 99673c15da26Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99683c15da26Smrg RAWCPPFLAGS="-undef -ansi" 99693c15da26Smrg AC_MSG_RESULT([yes, with -ansi]) 99703c15da26Smrg else 99713c15da26Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 99723c15da26Smrg fi 99733c15da26Smrgfi 99743c15da26Smrgrm -f conftest.$ac_ext 9975126a8a12Smrg 99763c15da26SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 99773c15da26SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 99783c15da26Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 99793c15da26Smrg AC_MSG_RESULT([no]) 99803c15da26Smrgelse 99813c15da26Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 99823c15da26Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 99833c15da26Smrg AC_MSG_RESULT([yes]) 99843c15da26Smrg else 99853c15da26Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 99863c15da26Smrg fi 99873c15da26Smrgfi 99883c15da26Smrgrm -f conftest.$ac_ext 99893c15da26SmrgAC_SUBST(RAWCPPFLAGS) 99903c15da26Smrg]) # XORG_PROG_RAWCPP 9991126a8a12Smrg 99923c15da26Smrg# XORG_MANPAGE_SECTIONS() 99933c15da26Smrg# ----------------------- 99943c15da26Smrg# Minimum version: 1.0.0 99953c15da26Smrg# 99963c15da26Smrg# Determine which sections man pages go in for the different man page types 99973c15da26Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 99983c15da26Smrg# Not sure if there's any better way than just hardcoding by OS name. 99993c15da26Smrg# Override default settings by setting environment variables 100003c15da26Smrg# Added MAN_SUBSTS in version 1.8 100013c15da26Smrg# Added AC_PROG_SED in version 1.8 10002126a8a12Smrg 100033c15da26SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 100043c15da26SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 100053c15da26SmrgAC_REQUIRE([AC_PROG_SED]) 10006126a8a12Smrg 100073c15da26Smrgif test x$APP_MAN_SUFFIX = x ; then 100083c15da26Smrg APP_MAN_SUFFIX=1 100093c15da26Smrgfi 100103c15da26Smrgif test x$APP_MAN_DIR = x ; then 100113c15da26Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 100123c15da26Smrgfi 10013126a8a12Smrg 100143c15da26Smrgif test x$LIB_MAN_SUFFIX = x ; then 100153c15da26Smrg LIB_MAN_SUFFIX=3 100163c15da26Smrgfi 100173c15da26Smrgif test x$LIB_MAN_DIR = x ; then 100183c15da26Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 100193c15da26Smrgfi 10020126a8a12Smrg 100213c15da26Smrgif test x$FILE_MAN_SUFFIX = x ; then 100223c15da26Smrg case $host_os in 100233c15da26Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 100243c15da26Smrg *) FILE_MAN_SUFFIX=5 ;; 100253c15da26Smrg esac 100263c15da26Smrgfi 100273c15da26Smrgif test x$FILE_MAN_DIR = x ; then 100283c15da26Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 100293c15da26Smrgfi 10030126a8a12Smrg 100313c15da26Smrgif test x$MISC_MAN_SUFFIX = x ; then 100323c15da26Smrg case $host_os in 100333c15da26Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 100343c15da26Smrg *) MISC_MAN_SUFFIX=7 ;; 100353c15da26Smrg esac 100363c15da26Smrgfi 100373c15da26Smrgif test x$MISC_MAN_DIR = x ; then 100383c15da26Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 100393c15da26Smrgfi 10040126a8a12Smrg 100413c15da26Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 100423c15da26Smrg case $host_os in 100433c15da26Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 100443c15da26Smrg *) DRIVER_MAN_SUFFIX=4 ;; 100453c15da26Smrg esac 100463c15da26Smrgfi 100473c15da26Smrgif test x$DRIVER_MAN_DIR = x ; then 100483c15da26Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 100493c15da26Smrgfi 10050126a8a12Smrg 100513c15da26Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 100523c15da26Smrg case $host_os in 100533c15da26Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 100543c15da26Smrg *) ADMIN_MAN_SUFFIX=8 ;; 100553c15da26Smrg esac 100563c15da26Smrgfi 100573c15da26Smrgif test x$ADMIN_MAN_DIR = x ; then 100583c15da26Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 100593c15da26Smrgfi 10060126a8a12Smrg 10061126a8a12Smrg 100623c15da26SmrgAC_SUBST([APP_MAN_SUFFIX]) 100633c15da26SmrgAC_SUBST([LIB_MAN_SUFFIX]) 100643c15da26SmrgAC_SUBST([FILE_MAN_SUFFIX]) 100653c15da26SmrgAC_SUBST([MISC_MAN_SUFFIX]) 100663c15da26SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 100673c15da26SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 100683c15da26SmrgAC_SUBST([APP_MAN_DIR]) 100693c15da26SmrgAC_SUBST([LIB_MAN_DIR]) 100703c15da26SmrgAC_SUBST([FILE_MAN_DIR]) 100713c15da26SmrgAC_SUBST([MISC_MAN_DIR]) 100723c15da26SmrgAC_SUBST([DRIVER_MAN_DIR]) 100733c15da26SmrgAC_SUBST([ADMIN_MAN_DIR]) 10074126a8a12Smrg 100753c15da26SmrgXORG_MAN_PAGE="X Version 11" 100763c15da26SmrgAC_SUBST([XORG_MAN_PAGE]) 100773c15da26SmrgMAN_SUBSTS="\ 100783c15da26Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100793c15da26Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100803c15da26Smrg -e 's|__xservername__|Xorg|g' \ 100813c15da26Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 100823c15da26Smrg -e 's|__projectroot__|\$(prefix)|g' \ 100833c15da26Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 100843c15da26Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 100853c15da26Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 100863c15da26Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 100873c15da26Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 100883c15da26Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 100893c15da26Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 100903c15da26SmrgAC_SUBST([MAN_SUBSTS]) 10091555991fdSmrg 100923c15da26Smrg]) # XORG_MANPAGE_SECTIONS 10093126a8a12Smrg 100943c15da26Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 100953c15da26Smrg# ------------------------ 100963c15da26Smrg# Minimum version: 1.7.0 100973c15da26Smrg# 100983c15da26Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 100993c15da26Smrg# provided by xorg-sgml-doctools, if installed. 101003c15da26SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 101013c15da26SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 101023c15da26SmrgXORG_SGML_PATH= 101033c15da26SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 101043c15da26Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 101053c15da26Smrg [m4_ifval([$1],[:], 101063c15da26Smrg [if test x"$cross_compiling" != x"yes" ; then 101073c15da26Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 101083c15da26Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 101093c15da26Smrg fi]) 101103c15da26Smrg ]) 10111126a8a12Smrg 101123c15da26Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 101133c15da26Smrg# the path and the name of the doc stylesheet 101143c15da26Smrgif test "x$XORG_SGML_PATH" != "x" ; then 101153c15da26Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 101163c15da26Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 101173c15da26Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 101183c15da26Smrgelse 101193c15da26Smrg AC_MSG_RESULT([no]) 101203c15da26Smrgfi 10121126a8a12Smrg 101223c15da26SmrgAC_SUBST(XORG_SGML_PATH) 101233c15da26SmrgAC_SUBST(STYLESHEET_SRCDIR) 101243c15da26SmrgAC_SUBST(XSL_STYLESHEET) 101253c15da26SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 101263c15da26Smrg]) # XORG_CHECK_SGML_DOCTOOLS 10127555991fdSmrg 101283c15da26Smrg# XORG_CHECK_LINUXDOC 101293c15da26Smrg# ------------------- 101303c15da26Smrg# Minimum version: 1.0.0 101313c15da26Smrg# 101323c15da26Smrg# Defines the variable MAKE_TEXT if the necessary tools and 101333c15da26Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 101343c15da26Smrg# Whether or not the necessary tools and files are found can be checked 101353c15da26Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 101363c15da26SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 101373c15da26SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101383c15da26SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10139126a8a12Smrg 101403c15da26SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10141126a8a12Smrg 101423c15da26SmrgAC_MSG_CHECKING([whether to build documentation]) 10143126a8a12Smrg 101443c15da26Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 101453c15da26Smrg BUILDDOC=yes 101463c15da26Smrgelse 101473c15da26Smrg BUILDDOC=no 101483c15da26Smrgfi 10149126a8a12Smrg 101503c15da26SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10151126a8a12Smrg 101523c15da26SmrgAC_MSG_RESULT([$BUILDDOC]) 10153d656433aSmrg 101543c15da26SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10155126a8a12Smrg 101563c15da26Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 101573c15da26Smrg BUILDPDFDOC=yes 101583c15da26Smrgelse 101593c15da26Smrg BUILDPDFDOC=no 101603c15da26Smrgfi 10161126a8a12Smrg 101623c15da26SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10163126a8a12Smrg 101643c15da26SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10165126a8a12Smrg 101663c15da26SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 101673c15da26SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 101683c15da26SmrgMAKE_PDF="$PS2PDF" 101693c15da26SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10170126a8a12Smrg 101713c15da26SmrgAC_SUBST(MAKE_TEXT) 101723c15da26SmrgAC_SUBST(MAKE_PS) 101733c15da26SmrgAC_SUBST(MAKE_PDF) 101743c15da26SmrgAC_SUBST(MAKE_HTML) 101753c15da26Smrg]) # XORG_CHECK_LINUXDOC 10176126a8a12Smrg 101773c15da26Smrg# XORG_CHECK_DOCBOOK 101783c15da26Smrg# ------------------- 101793c15da26Smrg# Minimum version: 1.0.0 101803c15da26Smrg# 101813c15da26Smrg# Checks for the ability to build output formats from SGML DocBook source. 101823c15da26Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 101833c15da26Smrg# indicates whether the necessary tools and files are found and, if set, 101843c15da26Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 101853c15da26SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 101863c15da26SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10187126a8a12Smrg 101883c15da26SmrgBUILDTXTDOC=no 101893c15da26SmrgBUILDPDFDOC=no 101903c15da26SmrgBUILDPSDOC=no 101913c15da26SmrgBUILDHTMLDOC=no 10192126a8a12Smrg 101933c15da26SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 101943c15da26SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 101953c15da26SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 101963c15da26SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10197555991fdSmrg 101983c15da26SmrgAC_MSG_CHECKING([whether to build text documentation]) 101993c15da26Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 102003c15da26Smrg test x$BUILD_TXTDOC != xno; then 102013c15da26Smrg BUILDTXTDOC=yes 102023c15da26Smrgfi 102033c15da26SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 102043c15da26SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10205555991fdSmrg 102063c15da26SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 102073c15da26Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 102083c15da26Smrg test x$BUILD_PDFDOC != xno; then 102093c15da26Smrg BUILDPDFDOC=yes 102103c15da26Smrgfi 102113c15da26SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 102123c15da26SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10213555991fdSmrg 102143c15da26SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 102153c15da26Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 102163c15da26Smrg test x$BUILD_PSDOC != xno; then 102173c15da26Smrg BUILDPSDOC=yes 102183c15da26Smrgfi 102193c15da26SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 102203c15da26SmrgAC_MSG_RESULT([$BUILDPSDOC]) 10221126a8a12Smrg 102223c15da26SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 102233c15da26Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 102243c15da26Smrg test x$BUILD_HTMLDOC != xno; then 102253c15da26Smrg BUILDHTMLDOC=yes 102263c15da26Smrgfi 102273c15da26SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 102283c15da26SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10229126a8a12Smrg 102303c15da26SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 102313c15da26SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 102323c15da26SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 102333c15da26SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10234126a8a12Smrg 102353c15da26SmrgAC_SUBST(MAKE_TEXT) 102363c15da26SmrgAC_SUBST(MAKE_PS) 102373c15da26SmrgAC_SUBST(MAKE_PDF) 102383c15da26SmrgAC_SUBST(MAKE_HTML) 102393c15da26Smrg]) # XORG_CHECK_DOCBOOK 10240126a8a12Smrg 102413c15da26Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 102423c15da26Smrg# ---------------- 102433c15da26Smrg# Minimum version: 1.5.0 102443c15da26Smrg# Minimum version for optional DEFAULT argument: 1.11.0 102453c15da26Smrg# 102463c15da26Smrg# Documentation tools are not always available on all platforms and sometimes 102473c15da26Smrg# not at the appropriate level. This macro enables a module to test for the 102483c15da26Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 102493c15da26Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 102503c15da26Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 102513c15da26Smrg# --with-xmlto assumes 'auto'. 102523c15da26Smrg# 102533c15da26Smrg# Interface to module: 102543c15da26Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 102553c15da26Smrg# XMLTO: returns the path of the xmlto program found 102563c15da26Smrg# returns the path set by the user in the environment 102573c15da26Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 102583c15da26Smrg# 'no' user instructs the module not to use xmlto 102593c15da26Smrg# 102603c15da26Smrg# Added in version 1.10.0 102613c15da26Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 102623c15da26Smrg# xmlto for text output requires either lynx, links, or w3m browsers 102633c15da26Smrg# 102643c15da26Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 102653c15da26Smrg# 102663c15da26SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 102673c15da26SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 102683c15da26Smrgm4_define([_defopt], m4_default([$2], [auto])) 102693c15da26SmrgAC_ARG_WITH(xmlto, 102703c15da26Smrg AS_HELP_STRING([--with-xmlto], 102713c15da26Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 102723c15da26Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 102733c15da26Smrgm4_undefine([_defopt]) 10274555991fdSmrg 102753c15da26Smrgif test "x$use_xmlto" = x"auto"; then 102763c15da26Smrg AC_PATH_PROG([XMLTO], [xmlto]) 102773c15da26Smrg if test "x$XMLTO" = "x"; then 102783c15da26Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 102793c15da26Smrg have_xmlto=no 102803c15da26Smrg else 102813c15da26Smrg have_xmlto=yes 102823c15da26Smrg fi 102833c15da26Smrgelif test "x$use_xmlto" = x"yes" ; then 102843c15da26Smrg AC_PATH_PROG([XMLTO], [xmlto]) 102853c15da26Smrg if test "x$XMLTO" = "x"; then 102863c15da26Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 102873c15da26Smrg fi 102883c15da26Smrg have_xmlto=yes 102893c15da26Smrgelif test "x$use_xmlto" = x"no" ; then 102903c15da26Smrg if test "x$XMLTO" != "x"; then 102913c15da26Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 102923c15da26Smrg fi 102933c15da26Smrg have_xmlto=no 102943c15da26Smrgelse 102953c15da26Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 102963c15da26Smrgfi 10297126a8a12Smrg 102983c15da26Smrg# Test for a minimum version of xmlto, if provided. 102993c15da26Smrgm4_ifval([$1], 103003c15da26Smrg[if test "$have_xmlto" = yes; then 103013c15da26Smrg # scrape the xmlto version 103023c15da26Smrg AC_MSG_CHECKING([the xmlto version]) 103033c15da26Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 103043c15da26Smrg AC_MSG_RESULT([$xmlto_version]) 103053c15da26Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 103063c15da26Smrg [if test "x$use_xmlto" = xauto; then 103073c15da26Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 103083c15da26Smrg have_xmlto=no 103093c15da26Smrg else 103103c15da26Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 103113c15da26Smrg fi]) 103123c15da26Smrgfi]) 10313126a8a12Smrg 103143c15da26Smrg# Test for the ability of xmlto to generate a text target 103153c15da26Smrghave_xmlto_text=no 103163c15da26Smrgcat > conftest.xml << "EOF" 103173c15da26SmrgEOF 103183c15da26SmrgAS_IF([test "$have_xmlto" = yes], 103193c15da26Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 103203c15da26Smrg [have_xmlto_text=yes], 103213c15da26Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 103223c15da26Smrgrm -f conftest.xml 103233c15da26SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 103243c15da26SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 103253c15da26Smrg]) # XORG_WITH_XMLTO 10326126a8a12Smrg 103273c15da26Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 103283c15da26Smrg# -------------------------------------------- 103293c15da26Smrg# Minimum version: 1.12.0 103303c15da26Smrg# Minimum version for optional DEFAULT argument: 1.12.0 103313c15da26Smrg# 103323c15da26Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 103333c15da26Smrg# XML-based language used for the transformation of XML documents. 103343c15da26Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 103353c15da26Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 103363c15da26Smrg# The XSLT processor is often used as a standalone tool for transformations. 103373c15da26Smrg# It should not be assumed that this tool is used only to work with documnetation. 103383c15da26Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 103393c15da26Smrg# 103403c15da26Smrg# Interface to module: 103413c15da26Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 103423c15da26Smrg# XSLTPROC: returns the path of the xsltproc program found 103433c15da26Smrg# returns the path set by the user in the environment 103443c15da26Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 103453c15da26Smrg# 'no' user instructs the module not to use xsltproc 103463c15da26Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 103473c15da26Smrg# 103483c15da26Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 103493c15da26Smrg# 103503c15da26SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 103513c15da26SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 103523c15da26Smrg# Preserves the interface, should it be implemented later 103533c15da26Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 103543c15da26Smrgm4_define([_defopt], m4_default([$2], [auto])) 103553c15da26SmrgAC_ARG_WITH(xsltproc, 103563c15da26Smrg AS_HELP_STRING([--with-xsltproc], 103573c15da26Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 103583c15da26Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 103593c15da26Smrgm4_undefine([_defopt]) 103603c15da26Smrg 103613c15da26Smrgif test "x$use_xsltproc" = x"auto"; then 103623c15da26Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103633c15da26Smrg if test "x$XSLTPROC" = "x"; then 103643c15da26Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 103653c15da26Smrg have_xsltproc=no 103663c15da26Smrg else 103673c15da26Smrg have_xsltproc=yes 103683c15da26Smrg fi 103693c15da26Smrgelif test "x$use_xsltproc" = x"yes" ; then 103703c15da26Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103713c15da26Smrg if test "x$XSLTPROC" = "x"; then 103723c15da26Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 103733c15da26Smrg fi 103743c15da26Smrg have_xsltproc=yes 103753c15da26Smrgelif test "x$use_xsltproc" = x"no" ; then 103763c15da26Smrg if test "x$XSLTPROC" != "x"; then 103773c15da26Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 103783c15da26Smrg fi 103793c15da26Smrg have_xsltproc=no 103803c15da26Smrgelse 103813c15da26Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 103823c15da26Smrgfi 10383126a8a12Smrg 103843c15da26SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 103853c15da26Smrg]) # XORG_WITH_XSLTPROC 10386126a8a12Smrg 103873c15da26Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 103883c15da26Smrg# ---------------------------------------- 103893c15da26Smrg# Minimum version: 1.15.0 103903c15da26Smrg# 103913c15da26Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 103923c15da26Smrg# scanning arbitrary text files, extracting information from those text files, 103933c15da26Smrg# and printing reports based on that information. 103943c15da26Smrg# 103953c15da26Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 103963c15da26Smrg# 103973c15da26Smrg# Interface to module: 103983c15da26Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 103993c15da26Smrg# PERL: returns the path of the perl program found 104003c15da26Smrg# returns the path set by the user in the environment 104013c15da26Smrg# --with-perl: 'yes' user instructs the module to use perl 104023c15da26Smrg# 'no' user instructs the module not to use perl 104033c15da26Smrg# have_perl: returns yes if perl found in PATH or no 104043c15da26Smrg# 104053c15da26Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 104063c15da26Smrg# 104073c15da26SmrgAC_DEFUN([XORG_WITH_PERL],[ 104083c15da26SmrgAC_ARG_VAR([PERL], [Path to perl command]) 104093c15da26Smrg# Preserves the interface, should it be implemented later 104103c15da26Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 104113c15da26Smrgm4_define([_defopt], m4_default([$2], [auto])) 104123c15da26SmrgAC_ARG_WITH(perl, 104133c15da26Smrg AS_HELP_STRING([--with-perl], 104143c15da26Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 104153c15da26Smrg [use_perl=$withval], [use_perl=]_defopt) 104163c15da26Smrgm4_undefine([_defopt]) 104173c15da26Smrg 104183c15da26Smrgif test "x$use_perl" = x"auto"; then 104193c15da26Smrg AC_PATH_PROG([PERL], [perl]) 104203c15da26Smrg if test "x$PERL" = "x"; then 104213c15da26Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 104223c15da26Smrg have_perl=no 104233c15da26Smrg else 104243c15da26Smrg have_perl=yes 104253c15da26Smrg fi 104263c15da26Smrgelif test "x$use_perl" = x"yes" ; then 104273c15da26Smrg AC_PATH_PROG([PERL], [perl]) 104283c15da26Smrg if test "x$PERL" = "x"; then 104293c15da26Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 104303c15da26Smrg fi 104313c15da26Smrg have_perl=yes 104323c15da26Smrgelif test "x$use_perl" = x"no" ; then 104333c15da26Smrg if test "x$PERL" != "x"; then 104343c15da26Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 104353c15da26Smrg fi 104363c15da26Smrg have_perl=no 104373c15da26Smrgelse 104383c15da26Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 104393c15da26Smrgfi 10440126a8a12Smrg 104413c15da26SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 104423c15da26Smrg]) # XORG_WITH_PERL 10443126a8a12Smrg 104443c15da26Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 104453c15da26Smrg# ---------------- 104463c15da26Smrg# Minimum version: 1.5.0 104473c15da26Smrg# Minimum version for optional DEFAULT argument: 1.11.0 104483c15da26Smrg# 104493c15da26Smrg# Documentation tools are not always available on all platforms and sometimes 104503c15da26Smrg# not at the appropriate level. This macro enables a module to test for the 104513c15da26Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 104523c15da26Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 104533c15da26Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 104543c15da26Smrg# --with-asciidoc assumes 'auto'. 104553c15da26Smrg# 104563c15da26Smrg# Interface to module: 104573c15da26Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 104583c15da26Smrg# ASCIIDOC: returns the path of the asciidoc program found 104593c15da26Smrg# returns the path set by the user in the environment 104603c15da26Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 104613c15da26Smrg# 'no' user instructs the module not to use asciidoc 104623c15da26Smrg# 104633c15da26Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 104643c15da26Smrg# 104653c15da26SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 104663c15da26SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 104673c15da26Smrgm4_define([_defopt], m4_default([$2], [auto])) 104683c15da26SmrgAC_ARG_WITH(asciidoc, 104693c15da26Smrg AS_HELP_STRING([--with-asciidoc], 104703c15da26Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 104713c15da26Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 104723c15da26Smrgm4_undefine([_defopt]) 10473126a8a12Smrg 104743c15da26Smrgif test "x$use_asciidoc" = x"auto"; then 104753c15da26Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104763c15da26Smrg if test "x$ASCIIDOC" = "x"; then 104773c15da26Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 104783c15da26Smrg have_asciidoc=no 104793c15da26Smrg else 104803c15da26Smrg have_asciidoc=yes 104813c15da26Smrg fi 104823c15da26Smrgelif test "x$use_asciidoc" = x"yes" ; then 104833c15da26Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104843c15da26Smrg if test "x$ASCIIDOC" = "x"; then 104853c15da26Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 104863c15da26Smrg fi 104873c15da26Smrg have_asciidoc=yes 104883c15da26Smrgelif test "x$use_asciidoc" = x"no" ; then 104893c15da26Smrg if test "x$ASCIIDOC" != "x"; then 104903c15da26Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 104913c15da26Smrg fi 104923c15da26Smrg have_asciidoc=no 104933c15da26Smrgelse 104943c15da26Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 104953c15da26Smrgfi 104963c15da26Smrgm4_ifval([$1], 104973c15da26Smrg[if test "$have_asciidoc" = yes; then 104983c15da26Smrg # scrape the asciidoc version 104993c15da26Smrg AC_MSG_CHECKING([the asciidoc version]) 105003c15da26Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 105013c15da26Smrg AC_MSG_RESULT([$asciidoc_version]) 105023c15da26Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 105033c15da26Smrg [if test "x$use_asciidoc" = xauto; then 105043c15da26Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 105053c15da26Smrg have_asciidoc=no 105063c15da26Smrg else 105073c15da26Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 105083c15da26Smrg fi]) 105093c15da26Smrgfi]) 105103c15da26SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 105113c15da26Smrg]) # XORG_WITH_ASCIIDOC 10512126a8a12Smrg 105133c15da26Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 105143c15da26Smrg# -------------------------------- 105153c15da26Smrg# Minimum version: 1.5.0 105163c15da26Smrg# Minimum version for optional DEFAULT argument: 1.11.0 105173c15da26Smrg# 105183c15da26Smrg# Documentation tools are not always available on all platforms and sometimes 105193c15da26Smrg# not at the appropriate level. This macro enables a module to test for the 105203c15da26Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 105213c15da26Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 105223c15da26Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 105233c15da26Smrg# --with-doxygen assumes 'auto'. 105243c15da26Smrg# 105253c15da26Smrg# Interface to module: 105263c15da26Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 105273c15da26Smrg# DOXYGEN: returns the path of the doxygen program found 105283c15da26Smrg# returns the path set by the user in the environment 105293c15da26Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 105303c15da26Smrg# 'no' user instructs the module not to use doxygen 105313c15da26Smrg# 105323c15da26Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 105333c15da26Smrg# 105343c15da26SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 105353c15da26SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 105363c15da26Smrgm4_define([_defopt], m4_default([$2], [auto])) 105373c15da26SmrgAC_ARG_WITH(doxygen, 105383c15da26Smrg AS_HELP_STRING([--with-doxygen], 105393c15da26Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 105403c15da26Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 105413c15da26Smrgm4_undefine([_defopt]) 10542126a8a12Smrg 105433c15da26Smrgif test "x$use_doxygen" = x"auto"; then 105443c15da26Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105453c15da26Smrg if test "x$DOXYGEN" = "x"; then 105463c15da26Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 105473c15da26Smrg have_doxygen=no 105483c15da26Smrg else 105493c15da26Smrg have_doxygen=yes 105503c15da26Smrg fi 105513c15da26Smrgelif test "x$use_doxygen" = x"yes" ; then 105523c15da26Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105533c15da26Smrg if test "x$DOXYGEN" = "x"; then 105543c15da26Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 105553c15da26Smrg fi 105563c15da26Smrg have_doxygen=yes 105573c15da26Smrgelif test "x$use_doxygen" = x"no" ; then 105583c15da26Smrg if test "x$DOXYGEN" != "x"; then 105593c15da26Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 105603c15da26Smrg fi 105613c15da26Smrg have_doxygen=no 105623c15da26Smrgelse 105633c15da26Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 105643c15da26Smrgfi 105653c15da26Smrgm4_ifval([$1], 105663c15da26Smrg[if test "$have_doxygen" = yes; then 105673c15da26Smrg # scrape the doxygen version 105683c15da26Smrg AC_MSG_CHECKING([the doxygen version]) 105693c15da26Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 105703c15da26Smrg AC_MSG_RESULT([$doxygen_version]) 105713c15da26Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 105723c15da26Smrg [if test "x$use_doxygen" = xauto; then 105733c15da26Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 105743c15da26Smrg have_doxygen=no 105753c15da26Smrg else 105763c15da26Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 105773c15da26Smrg fi]) 105783c15da26Smrgfi]) 105793c15da26SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 105803c15da26Smrg]) # XORG_WITH_DOXYGEN 10581126a8a12Smrg 105823c15da26Smrg# XORG_WITH_GROFF([DEFAULT]) 105833c15da26Smrg# ---------------- 105843c15da26Smrg# Minimum version: 1.6.0 105853c15da26Smrg# Minimum version for optional DEFAULT argument: 1.11.0 105863c15da26Smrg# 105873c15da26Smrg# Documentation tools are not always available on all platforms and sometimes 105883c15da26Smrg# not at the appropriate level. This macro enables a module to test for the 105893c15da26Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 105903c15da26Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 105913c15da26Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 105923c15da26Smrg# --with-groff assumes 'auto'. 105933c15da26Smrg# 105943c15da26Smrg# Interface to module: 105953c15da26Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 105963c15da26Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 105973c15da26Smrg# HAVE_GROFF_MS: the -ms macros package 105983c15da26Smrg# GROFF: returns the path of the groff program found 105993c15da26Smrg# returns the path set by the user in the environment 106003c15da26Smrg# --with-groff: 'yes' user instructs the module to use groff 106013c15da26Smrg# 'no' user instructs the module not to use groff 106023c15da26Smrg# 106033c15da26Smrg# Added in version 1.9.0: 106043c15da26Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 106053c15da26Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 106063c15da26Smrg# psselect from the psutils package. 106073c15da26Smrg# the ghostcript package. Refer to the grohtml man pages 106083c15da26Smrg# 106093c15da26Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 106103c15da26Smrg# 106113c15da26Smrg# OS and distros often splits groff in a basic and full package, the former 106123c15da26Smrg# having the groff program and the later having devices, fonts and macros 106133c15da26Smrg# Checking for the groff executable is not enough. 106143c15da26Smrg# 106153c15da26Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 106163c15da26Smrg# unset HAVE_GROFF or GROFF env variables. 106173c15da26Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 106183c15da26Smrg# 106193c15da26SmrgAC_DEFUN([XORG_WITH_GROFF],[ 106203c15da26SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 106213c15da26Smrgm4_define([_defopt], m4_default([$1], [auto])) 106223c15da26SmrgAC_ARG_WITH(groff, 106233c15da26Smrg AS_HELP_STRING([--with-groff], 106243c15da26Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 106253c15da26Smrg [use_groff=$withval], [use_groff=]_defopt) 106263c15da26Smrgm4_undefine([_defopt]) 10627126a8a12Smrg 106283c15da26Smrgif test "x$use_groff" = x"auto"; then 106293c15da26Smrg AC_PATH_PROG([GROFF], [groff]) 106303c15da26Smrg if test "x$GROFF" = "x"; then 106313c15da26Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 106323c15da26Smrg have_groff=no 106333c15da26Smrg else 106343c15da26Smrg have_groff=yes 106353c15da26Smrg fi 106363c15da26Smrgelif test "x$use_groff" = x"yes" ; then 106373c15da26Smrg AC_PATH_PROG([GROFF], [groff]) 106383c15da26Smrg if test "x$GROFF" = "x"; then 106393c15da26Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 106403c15da26Smrg fi 106413c15da26Smrg have_groff=yes 106423c15da26Smrgelif test "x$use_groff" = x"no" ; then 106433c15da26Smrg if test "x$GROFF" != "x"; then 106443c15da26Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 106453c15da26Smrg fi 106463c15da26Smrg have_groff=no 106473c15da26Smrgelse 106483c15da26Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 106493c15da26Smrgfi 10650555991fdSmrg 106513c15da26Smrg# We have groff, test for the presence of the macro packages 106523c15da26Smrgif test "x$have_groff" = x"yes"; then 106533c15da26Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 106543c15da26Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 106553c15da26Smrg groff_ms_works=yes 106563c15da26Smrg else 106573c15da26Smrg groff_ms_works=no 106583c15da26Smrg fi 106593c15da26Smrg AC_MSG_RESULT([$groff_ms_works]) 106603c15da26Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 106613c15da26Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 106623c15da26Smrg groff_mm_works=yes 106633c15da26Smrg else 106643c15da26Smrg groff_mm_works=no 106653c15da26Smrg fi 106663c15da26Smrg AC_MSG_RESULT([$groff_mm_works]) 106673c15da26Smrgfi 10668555991fdSmrg 106693c15da26Smrg# We have groff, test for HTML dependencies, one command per package 106703c15da26Smrgif test "x$have_groff" = x"yes"; then 106713c15da26Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 106723c15da26Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 106733c15da26Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 106743c15da26Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 106753c15da26Smrg have_groff_html=yes 106763c15da26Smrg else 106773c15da26Smrg have_groff_html=no 106783c15da26Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 106793c15da26Smrg fi 106803c15da26Smrgfi 10681555991fdSmrg 106823c15da26Smrg# Set Automake conditionals for Makefiles 106833c15da26SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 106843c15da26SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 106853c15da26SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 106863c15da26SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 106873c15da26Smrg]) # XORG_WITH_GROFF 10688555991fdSmrg 106893c15da26Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 106903c15da26Smrg# --------------------------------------- 106913c15da26Smrg# Minimum version: 1.6.0 106923c15da26Smrg# Minimum version for optional DEFAULT argument: 1.11.0 106933c15da26Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 106943c15da26Smrg# 106953c15da26Smrg# Documentation tools are not always available on all platforms and sometimes 106963c15da26Smrg# not at the appropriate level. This macro enables a module to test for the 106973c15da26Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 106983c15da26Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 106993c15da26Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 107003c15da26Smrg# --with-fop assumes 'auto'. 107013c15da26Smrg# 107023c15da26Smrg# Interface to module: 107033c15da26Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 107043c15da26Smrg# FOP: returns the path of the fop program found 107053c15da26Smrg# returns the path set by the user in the environment 107063c15da26Smrg# --with-fop: 'yes' user instructs the module to use fop 107073c15da26Smrg# 'no' user instructs the module not to use fop 107083c15da26Smrg# 107093c15da26Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 107103c15da26Smrg# 107113c15da26SmrgAC_DEFUN([XORG_WITH_FOP],[ 107123c15da26SmrgAC_ARG_VAR([FOP], [Path to fop command]) 107133c15da26Smrgm4_define([_defopt], m4_default([$2], [auto])) 107143c15da26SmrgAC_ARG_WITH(fop, 107153c15da26Smrg AS_HELP_STRING([--with-fop], 107163c15da26Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 107173c15da26Smrg [use_fop=$withval], [use_fop=]_defopt) 107183c15da26Smrgm4_undefine([_defopt]) 10719126a8a12Smrg 107203c15da26Smrgif test "x$use_fop" = x"auto"; then 107213c15da26Smrg AC_PATH_PROG([FOP], [fop]) 107223c15da26Smrg if test "x$FOP" = "x"; then 107233c15da26Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 107243c15da26Smrg have_fop=no 107253c15da26Smrg else 107263c15da26Smrg have_fop=yes 107273c15da26Smrg fi 107283c15da26Smrgelif test "x$use_fop" = x"yes" ; then 107293c15da26Smrg AC_PATH_PROG([FOP], [fop]) 107303c15da26Smrg if test "x$FOP" = "x"; then 107313c15da26Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 107323c15da26Smrg fi 107333c15da26Smrg have_fop=yes 107343c15da26Smrgelif test "x$use_fop" = x"no" ; then 107353c15da26Smrg if test "x$FOP" != "x"; then 107363c15da26Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 107373c15da26Smrg fi 107383c15da26Smrg have_fop=no 107393c15da26Smrgelse 107403c15da26Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 107413c15da26Smrgfi 10742d656433aSmrg 107433c15da26Smrg# Test for a minimum version of fop, if provided. 107443c15da26Smrgm4_ifval([$1], 107453c15da26Smrg[if test "$have_fop" = yes; then 107463c15da26Smrg # scrape the fop version 107473c15da26Smrg AC_MSG_CHECKING([for fop minimum version]) 107483c15da26Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 107493c15da26Smrg AC_MSG_RESULT([$fop_version]) 107503c15da26Smrg AS_VERSION_COMPARE([$fop_version], [$1], 107513c15da26Smrg [if test "x$use_fop" = xauto; then 107523c15da26Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 107533c15da26Smrg have_fop=no 107543c15da26Smrg else 107553c15da26Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 107563c15da26Smrg fi]) 107573c15da26Smrgfi]) 107583c15da26SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 107593c15da26Smrg]) # XORG_WITH_FOP 10760126a8a12Smrg 107613c15da26Smrg# XORG_WITH_PS2PDF([DEFAULT]) 107623c15da26Smrg# ---------------- 107633c15da26Smrg# Minimum version: 1.6.0 107643c15da26Smrg# Minimum version for optional DEFAULT argument: 1.11.0 107653c15da26Smrg# 107663c15da26Smrg# Documentation tools are not always available on all platforms and sometimes 107673c15da26Smrg# not at the appropriate level. This macro enables a module to test for the 107683c15da26Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 107693c15da26Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 107703c15da26Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 107713c15da26Smrg# --with-ps2pdf assumes 'auto'. 107723c15da26Smrg# 107733c15da26Smrg# Interface to module: 107743c15da26Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 107753c15da26Smrg# PS2PDF: returns the path of the ps2pdf program found 107763c15da26Smrg# returns the path set by the user in the environment 107773c15da26Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 107783c15da26Smrg# 'no' user instructs the module not to use ps2pdf 107793c15da26Smrg# 107803c15da26Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 107813c15da26Smrg# 107823c15da26SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 107833c15da26SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 107843c15da26Smrgm4_define([_defopt], m4_default([$1], [auto])) 107853c15da26SmrgAC_ARG_WITH(ps2pdf, 107863c15da26Smrg AS_HELP_STRING([--with-ps2pdf], 107873c15da26Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 107883c15da26Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 107893c15da26Smrgm4_undefine([_defopt]) 10790126a8a12Smrg 107913c15da26Smrgif test "x$use_ps2pdf" = x"auto"; then 107923c15da26Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 107933c15da26Smrg if test "x$PS2PDF" = "x"; then 107943c15da26Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 107953c15da26Smrg have_ps2pdf=no 107963c15da26Smrg else 107973c15da26Smrg have_ps2pdf=yes 107983c15da26Smrg fi 107993c15da26Smrgelif test "x$use_ps2pdf" = x"yes" ; then 108003c15da26Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 108013c15da26Smrg if test "x$PS2PDF" = "x"; then 108023c15da26Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 108033c15da26Smrg fi 108043c15da26Smrg have_ps2pdf=yes 108053c15da26Smrgelif test "x$use_ps2pdf" = x"no" ; then 108063c15da26Smrg if test "x$PS2PDF" != "x"; then 108073c15da26Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 108083c15da26Smrg fi 108093c15da26Smrg have_ps2pdf=no 108103c15da26Smrgelse 108113c15da26Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 108123c15da26Smrgfi 108133c15da26SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 108143c15da26Smrg]) # XORG_WITH_PS2PDF 10815126a8a12Smrg 108163c15da26Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 108173c15da26Smrg# ---------------- 108183c15da26Smrg# Minimum version: 1.6.0 108193c15da26Smrg# 108203c15da26Smrg# Documentation tools are not always available on all platforms and sometimes 108213c15da26Smrg# not at the appropriate level. This macro enables a builder to skip all 108223c15da26Smrg# documentation targets except traditional man pages. 108233c15da26Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108243c15da26Smrg# maximum flexibilty in controlling documentation building. 108253c15da26Smrg# Refer to: 108263c15da26Smrg# XORG_WITH_XMLTO --with-xmlto 108273c15da26Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 108283c15da26Smrg# XORG_WITH_DOXYGEN --with-doxygen 108293c15da26Smrg# XORG_WITH_FOP --with-fop 108303c15da26Smrg# XORG_WITH_GROFF --with-groff 108313c15da26Smrg# XORG_WITH_PS2PDF --with-ps2pdf 108323c15da26Smrg# 108333c15da26Smrg# Interface to module: 108343c15da26Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 108353c15da26Smrg# --enable-docs: 'yes' user instructs the module to generate docs 108363c15da26Smrg# 'no' user instructs the module not to generate docs 108373c15da26Smrg# parm1: specify the default value, yes or no. 108383c15da26Smrg# 108393c15da26SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 108403c15da26Smrgm4_define([docs_default], m4_default([$1], [yes])) 108413c15da26SmrgAC_ARG_ENABLE(docs, 108423c15da26Smrg AS_HELP_STRING([--enable-docs], 108433c15da26Smrg [Enable building the documentation (default: ]docs_default[)]), 108443c15da26Smrg [build_docs=$enableval], [build_docs=]docs_default) 108453c15da26Smrgm4_undefine([docs_default]) 108463c15da26SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 108473c15da26SmrgAC_MSG_CHECKING([whether to build documentation]) 108483c15da26SmrgAC_MSG_RESULT([$build_docs]) 108493c15da26Smrg]) # XORG_ENABLE_DOCS 10850126a8a12Smrg 108513c15da26Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 108523c15da26Smrg# ---------------- 108533c15da26Smrg# Minimum version: 1.6.0 108543c15da26Smrg# 108553c15da26Smrg# This macro enables a builder to skip all developer documentation. 108563c15da26Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108573c15da26Smrg# maximum flexibilty in controlling documentation building. 108583c15da26Smrg# Refer to: 108593c15da26Smrg# XORG_WITH_XMLTO --with-xmlto 108603c15da26Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 108613c15da26Smrg# XORG_WITH_DOXYGEN --with-doxygen 108623c15da26Smrg# XORG_WITH_FOP --with-fop 108633c15da26Smrg# XORG_WITH_GROFF --with-groff 108643c15da26Smrg# XORG_WITH_PS2PDF --with-ps2pdf 108653c15da26Smrg# 108663c15da26Smrg# Interface to module: 108673c15da26Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 108683c15da26Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 108693c15da26Smrg# 'no' user instructs the module not to generate developer docs 108703c15da26Smrg# parm1: specify the default value, yes or no. 108713c15da26Smrg# 108723c15da26SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 108733c15da26Smrgm4_define([devel_default], m4_default([$1], [yes])) 108743c15da26SmrgAC_ARG_ENABLE(devel-docs, 108753c15da26Smrg AS_HELP_STRING([--enable-devel-docs], 108763c15da26Smrg [Enable building the developer documentation (default: ]devel_default[)]), 108773c15da26Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 108783c15da26Smrgm4_undefine([devel_default]) 108793c15da26SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 108803c15da26SmrgAC_MSG_CHECKING([whether to build developer documentation]) 108813c15da26SmrgAC_MSG_RESULT([$build_devel_docs]) 108823c15da26Smrg]) # XORG_ENABLE_DEVEL_DOCS 10883126a8a12Smrg 108843c15da26Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 108853c15da26Smrg# ---------------- 108863c15da26Smrg# Minimum version: 1.6.0 108873c15da26Smrg# 108883c15da26Smrg# This macro enables a builder to skip all functional specification targets. 108893c15da26Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108903c15da26Smrg# maximum flexibilty in controlling documentation building. 108913c15da26Smrg# Refer to: 108923c15da26Smrg# XORG_WITH_XMLTO --with-xmlto 108933c15da26Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 108943c15da26Smrg# XORG_WITH_DOXYGEN --with-doxygen 108953c15da26Smrg# XORG_WITH_FOP --with-fop 108963c15da26Smrg# XORG_WITH_GROFF --with-groff 108973c15da26Smrg# XORG_WITH_PS2PDF --with-ps2pdf 108983c15da26Smrg# 108993c15da26Smrg# Interface to module: 109003c15da26Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 109013c15da26Smrg# --enable-specs: 'yes' user instructs the module to generate specs 109023c15da26Smrg# 'no' user instructs the module not to generate specs 109033c15da26Smrg# parm1: specify the default value, yes or no. 109043c15da26Smrg# 109053c15da26SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 109063c15da26Smrgm4_define([spec_default], m4_default([$1], [yes])) 109073c15da26SmrgAC_ARG_ENABLE(specs, 109083c15da26Smrg AS_HELP_STRING([--enable-specs], 109093c15da26Smrg [Enable building the specs (default: ]spec_default[)]), 109103c15da26Smrg [build_specs=$enableval], [build_specs=]spec_default) 109113c15da26Smrgm4_undefine([spec_default]) 109123c15da26SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 109133c15da26SmrgAC_MSG_CHECKING([whether to build functional specifications]) 109143c15da26SmrgAC_MSG_RESULT([$build_specs]) 109153c15da26Smrg]) # XORG_ENABLE_SPECS 10916126a8a12Smrg 109173c15da26Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 109183c15da26Smrg# ---------------------------------------------- 109193c15da26Smrg# Minimum version: 1.13.0 109203c15da26Smrg# 109213c15da26Smrg# This macro enables a builder to enable/disable unit testing 109223c15da26Smrg# It makes no assumption about the test cases implementation 109233c15da26Smrg# Test cases may or may not use Automake "Support for test suites" 109243c15da26Smrg# They may or may not use the software utility library GLib 109253c15da26Smrg# 109263c15da26Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 109273c15da26Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 109283c15da26Smrg# The variable enable_unit_tests is used by other macros in this file. 109293c15da26Smrg# 109303c15da26Smrg# Interface to module: 109313c15da26Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 109323c15da26Smrg# enable_unit_tests: used in configure.ac for additional configuration 109333c15da26Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 109343c15da26Smrg# 'no' user instructs the module not to build tests 109353c15da26Smrg# parm1: specify the default value, yes or no. 109363c15da26Smrg# 109373c15da26SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 109383c15da26SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 109393c15da26SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 109403c15da26SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 109413c15da26Smrgm4_define([_defopt], m4_default([$1], [auto])) 109423c15da26SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 109433c15da26Smrg [Enable building unit test cases (default: ]_defopt[)]), 109443c15da26Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 109453c15da26Smrgm4_undefine([_defopt]) 109463c15da26SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 109473c15da26SmrgAC_MSG_CHECKING([whether to build unit test cases]) 109483c15da26SmrgAC_MSG_RESULT([$enable_unit_tests]) 109493c15da26Smrg]) # XORG_ENABLE_UNIT_TESTS 109503c15da26Smrg 109510a6b08f8Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 109520a6b08f8Smrg# ------------------------------------------------------ 109530a6b08f8Smrg# Minimum version: 1.17.0 109540a6b08f8Smrg# 109550a6b08f8Smrg# This macro enables a builder to enable/disable integration testing 109560a6b08f8Smrg# It makes no assumption about the test cases' implementation 109570a6b08f8Smrg# Test cases may or may not use Automake "Support for test suites" 109580a6b08f8Smrg# 109590a6b08f8Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 109600a6b08f8Smrg# usually requires less dependencies and may be built and run under less 109610a6b08f8Smrg# stringent environments than integration tests. 109620a6b08f8Smrg# 109630a6b08f8Smrg# Interface to module: 109640a6b08f8Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 109650a6b08f8Smrg# enable_integration_tests: used in configure.ac for additional configuration 109660a6b08f8Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 109670a6b08f8Smrg# 'no' user instructs the module not to build tests 109680a6b08f8Smrg# parm1: specify the default value, yes or no. 109690a6b08f8Smrg# 109700a6b08f8SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 109710a6b08f8SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 109720a6b08f8Smrgm4_define([_defopt], m4_default([$1], [auto])) 109730a6b08f8SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 109740a6b08f8Smrg [Enable building integration test cases (default: ]_defopt[)]), 109750a6b08f8Smrg [enable_integration_tests=$enableval], 109760a6b08f8Smrg [enable_integration_tests=]_defopt) 109770a6b08f8Smrgm4_undefine([_defopt]) 109780a6b08f8SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 109790a6b08f8Smrg [test "x$enable_integration_tests" != xno]) 109800a6b08f8SmrgAC_MSG_CHECKING([whether to build unit test cases]) 109810a6b08f8SmrgAC_MSG_RESULT([$enable_integration_tests]) 109820a6b08f8Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 109830a6b08f8Smrg 109843c15da26Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 109853c15da26Smrg# ---------------------------------------- 109863c15da26Smrg# Minimum version: 1.13.0 109873c15da26Smrg# 109883c15da26Smrg# GLib is a library which provides advanced data structures and functions. 109893c15da26Smrg# This macro enables a module to test for the presence of Glib. 109903c15da26Smrg# 109913c15da26Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 109923c15da26Smrg# Otherwise the value of $enable_unit_tests is blank. 109933c15da26Smrg# 109940a6b08f8Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 109950a6b08f8Smrg# test support usually requires less dependencies and may be built and run under 109960a6b08f8Smrg# less stringent environments than integration tests. 109970a6b08f8Smrg# 109983c15da26Smrg# Interface to module: 109993c15da26Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 110003c15da26Smrg# with_glib: used in configure.ac to know if GLib has been found 110013c15da26Smrg# --with-glib: 'yes' user instructs the module to use glib 110023c15da26Smrg# 'no' user instructs the module not to use glib 110033c15da26Smrg# 110043c15da26SmrgAC_DEFUN([XORG_WITH_GLIB],[ 110053c15da26SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110063c15da26Smrgm4_define([_defopt], m4_default([$2], [auto])) 110073c15da26SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 110083c15da26Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 110093c15da26Smrg [with_glib=$withval], [with_glib=]_defopt) 110103c15da26Smrgm4_undefine([_defopt]) 110113c15da26Smrg 110123c15da26Smrghave_glib=no 110133c15da26Smrg# Do not probe GLib if user explicitly disabled unit testing 110143c15da26Smrgif test "x$enable_unit_tests" != x"no"; then 110153c15da26Smrg # Do not probe GLib if user explicitly disabled it 110163c15da26Smrg if test "x$with_glib" != x"no"; then 110173c15da26Smrg m4_ifval( 110183c15da26Smrg [$1], 110193c15da26Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 110203c15da26Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 110213c15da26Smrg ) 110223c15da26Smrg fi 110233c15da26Smrgfi 11024126a8a12Smrg 110253c15da26Smrg# Not having GLib when unit testing has been explicitly requested is an error 110263c15da26Smrgif test "x$enable_unit_tests" = x"yes"; then 110273c15da26Smrg if test "x$have_glib" = x"no"; then 110283c15da26Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 110293c15da26Smrg fi 110303c15da26Smrgfi 11031126a8a12Smrg 110323c15da26Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 110333c15da26Smrgif test "x$enable_unit_tests" = x"no"; then 110343c15da26Smrg if test "x$with_glib" = x"yes"; then 110353c15da26Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 110363c15da26Smrg fi 110373c15da26Smrgfi 11038126a8a12Smrg 110393c15da26Smrg# Not having GLib when it has been explicitly requested is an error 110403c15da26Smrgif test "x$with_glib" = x"yes"; then 110413c15da26Smrg if test "x$have_glib" = x"no"; then 110423c15da26Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 110433c15da26Smrg fi 110443c15da26Smrgfi 11045126a8a12Smrg 110463c15da26SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 110473c15da26Smrg]) # XORG_WITH_GLIB 11048126a8a12Smrg 110493c15da26Smrg# XORG_LD_WRAP([required|optional]) 110503c15da26Smrg# --------------------------------- 110513c15da26Smrg# Minimum version: 1.13.0 110523c15da26Smrg# 110533c15da26Smrg# Check if linker supports -wrap, passed via compiler flags 110543c15da26Smrg# 110553c15da26Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 110563c15da26Smrg# Otherwise the value of $enable_unit_tests is blank. 110573c15da26Smrg# 110583c15da26Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 110593c15da26Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 110603c15da26Smrg# available, an argument of "optional" allows use when some unit tests require 110613c15da26Smrg# ld -wrap and others do not. 110623c15da26Smrg# 110633c15da26SmrgAC_DEFUN([XORG_LD_WRAP],[ 110643c15da26SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 110653c15da26Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 110663c15da26Smrg void __wrap_exit(int status) { return; }], 110673c15da26Smrg [exit(0);])]) 110683c15da26Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 110693c15da26Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 110703c15da26Smrg if test "x$have_ld_wrap" = x"no"; then 110713c15da26Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 110723c15da26Smrg fi 110733c15da26Smrgfi 110743c15da26SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 110753c15da26Smrg# 110763c15da26Smrg]) # XORG_LD_WRAP 11077126a8a12Smrg 110783c15da26Smrg# XORG_CHECK_LINKER_FLAGS 110793c15da26Smrg# ----------------------- 110803c15da26Smrg# SYNOPSIS 110813c15da26Smrg# 110823c15da26Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 110833c15da26Smrg# 110843c15da26Smrg# DESCRIPTION 110853c15da26Smrg# 110863c15da26Smrg# Check whether the given linker FLAGS work with the current language's 110873c15da26Smrg# linker, or whether they give an error. 110883c15da26Smrg# 110893c15da26Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 110903c15da26Smrg# success/failure. 110913c15da26Smrg# 110923c15da26Smrg# PROGRAM-SOURCE is the program source to link with, if needed 110933c15da26Smrg# 110943c15da26Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 110953c15da26Smrg# 110963c15da26Smrg# LICENSE 110973c15da26Smrg# 110983c15da26Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 110993c15da26Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 111003c15da26Smrg# Copyright (c) 2009 Matteo Frigo 111013c15da26Smrg# 111023c15da26Smrg# This program is free software: you can redistribute it and/or modify it 111033c15da26Smrg# under the terms of the GNU General Public License as published by the 111043c15da26Smrg# Free Software Foundation, either version 3 of the License, or (at your 111053c15da26Smrg# option) any later version. 111063c15da26Smrg# 111073c15da26Smrg# This program is distributed in the hope that it will be useful, but 111083c15da26Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 111093c15da26Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 111103c15da26Smrg# Public License for more details. 111113c15da26Smrg# 111123c15da26Smrg# You should have received a copy of the GNU General Public License along 111133c15da26Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 111143c15da26Smrg# 111153c15da26Smrg# As a special exception, the respective Autoconf Macro's copyright owner 111163c15da26Smrg# gives unlimited permission to copy, distribute and modify the configure 111173c15da26Smrg# scripts that are the output of Autoconf when processing the Macro. You 111183c15da26Smrg# need not follow the terms of the GNU General Public License when using 111193c15da26Smrg# or distributing such scripts, even though portions of the text of the 111203c15da26Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 111213c15da26Smrg# all other use of the material that constitutes the Autoconf Macro. 111223c15da26Smrg# 111233c15da26Smrg# This special exception to the GPL applies to versions of the Autoconf 111243c15da26Smrg# Macro released by the Autoconf Archive. When you make and distribute a 111253c15da26Smrg# modified version of the Autoconf Macro, you may extend this special 111263c15da26Smrg# exception to the GPL to apply to your modified version as well.# 111273c15da26SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 111283c15da26Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 111293c15da26Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 111303c15da26SmrgAS_LITERAL_IF([$1], 111313c15da26Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 111323c15da26Smrg ax_save_FLAGS=$LDFLAGS 111333c15da26Smrg LDFLAGS="$1" 111343c15da26Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 111353c15da26Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 111363c15da26Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 111373c15da26Smrg LDFLAGS=$ax_save_FLAGS])], 111383c15da26Smrg [ax_save_FLAGS=$LDFLAGS 111393c15da26Smrg LDFLAGS="$1" 111403c15da26Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 111413c15da26Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 111423c15da26Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 111433c15da26Smrg LDFLAGS=$ax_save_FLAGS]) 111443c15da26Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 111453c15da26SmrgAC_MSG_RESULT($xorg_check_linker_flags) 111463c15da26Smrgif test "x$xorg_check_linker_flags" = xyes; then 111473c15da26Smrg m4_default([$2], :) 111483c15da26Smrgelse 111493c15da26Smrg m4_default([$3], :) 111503c15da26Smrgfi 111513c15da26Smrg]) # XORG_CHECK_LINKER_FLAGS 11152126a8a12Smrg 111533c15da26Smrg# XORG_MEMORY_CHECK_FLAGS 111543c15da26Smrg# ----------------------- 111553c15da26Smrg# Minimum version: 1.16.0 111563c15da26Smrg# 111573c15da26Smrg# This macro attempts to find appropriate memory checking functionality 111583c15da26Smrg# for various platforms which unit testing code may use to catch various 111593c15da26Smrg# forms of memory allocation and access errors in testing. 111603c15da26Smrg# 111613c15da26Smrg# Interface to module: 111623c15da26Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 111633c15da26Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 111643c15da26Smrg# 111653c15da26Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 111663c15da26Smrg# 111673c15da26SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11168126a8a12Smrg 111693c15da26SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 111703c15da26SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 111713c15da26Smrg [Environment variables to enable memory checking in tests]) 11172126a8a12Smrg 111733c15da26Smrg# Check for different types of support on different platforms 111743c15da26Smrgcase $host_os in 111753c15da26Smrg solaris*) 111763c15da26Smrg AC_CHECK_LIB([umem], [umem_alloc], 111773c15da26Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 111783c15da26Smrg ;; 111793c15da26Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 111803c15da26Smrg # both directly and inverted, so should not be 0 or 255. 111813c15da26Smrg malloc_debug_env='MALLOC_PERTURB_=15' 111823c15da26Smrg ;; 111833c15da26Smrg darwin*) 111843c15da26Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 111853c15da26Smrg ;; 111863c15da26Smrg *bsd*) 111873c15da26Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 111883c15da26Smrg ;; 111893c15da26Smrgesac 11190126a8a12Smrg 111913c15da26Smrg# User supplied flags override default flags 111923c15da26Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 111933c15da26Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 111943c15da26Smrgfi 11195126a8a12Smrg 111963c15da26SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 111973c15da26Smrg]) # XORG_WITH_LINT 11198126a8a12Smrg 111993c15da26Smrg# XORG_CHECK_MALLOC_ZERO 112003c15da26Smrg# ---------------------- 112013c15da26Smrg# Minimum version: 1.0.0 112023c15da26Smrg# 112033c15da26Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 112043c15da26Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 112053c15da26Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 112063c15da26SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 112073c15da26SmrgAC_ARG_ENABLE(malloc0returnsnull, 112083c15da26Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 112093c15da26Smrg [malloc(0) returns NULL (default: auto)]), 112103c15da26Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 112113c15da26Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11212126a8a12Smrg 112133c15da26SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 112143c15da26Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 112153c15da26Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 112163c15da26Smrg#include <stdlib.h> 112173c15da26Smrg],[ 112183c15da26Smrg char *m0, *r0, *c0, *p; 112193c15da26Smrg m0 = malloc(0); 112203c15da26Smrg p = malloc(10); 112213c15da26Smrg r0 = realloc(p,0); 112223c15da26Smrg c0 = calloc(0,10); 112233c15da26Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 112243c15da26Smrg])], 112253c15da26Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 112263c15da26Smrg [MALLOC_ZERO_RETURNS_NULL=no], 112273c15da26Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 112283c15da26Smrgfi 112293c15da26SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11230126a8a12Smrg 112313c15da26Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 112323c15da26Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 112333c15da26Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 112343c15da26Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 112353c15da26Smrgelse 112363c15da26Smrg MALLOC_ZERO_CFLAGS="" 112373c15da26Smrg XMALLOC_ZERO_CFLAGS="" 112383c15da26Smrg XTMALLOC_ZERO_CFLAGS="" 112393c15da26Smrgfi 11240126a8a12Smrg 112413c15da26SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 112423c15da26SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 112433c15da26SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 112443c15da26Smrg]) # XORG_CHECK_MALLOC_ZERO 11245126a8a12Smrg 112463c15da26Smrg# XORG_WITH_LINT() 112473c15da26Smrg# ---------------- 112483c15da26Smrg# Minimum version: 1.1.0 112493c15da26Smrg# 112503c15da26Smrg# This macro enables the use of a tool that flags some suspicious and 112513c15da26Smrg# non-portable constructs (likely to be bugs) in C language source code. 112523c15da26Smrg# It will attempt to locate the tool and use appropriate options. 112533c15da26Smrg# There are various lint type tools on different platforms. 112543c15da26Smrg# 112553c15da26Smrg# Interface to module: 112563c15da26Smrg# LINT: returns the path to the tool found on the platform 112573c15da26Smrg# or the value set to LINT on the configure cmd line 112583c15da26Smrg# also an Automake conditional 112593c15da26Smrg# LINT_FLAGS: an Automake variable with appropriate flags 112603c15da26Smrg# 112613c15da26Smrg# --with-lint: 'yes' user instructs the module to use lint 112623c15da26Smrg# 'no' user instructs the module not to use lint (default) 112633c15da26Smrg# 112643c15da26Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 112653c15da26Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 112663c15da26Smrg# 112673c15da26SmrgAC_DEFUN([XORG_WITH_LINT],[ 11268555991fdSmrg 112693c15da26SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 112703c15da26SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 112713c15da26SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 112723c15da26Smrg [Use a lint-style source code checker (default: disabled)])], 112733c15da26Smrg [use_lint=$withval], [use_lint=no]) 11274126a8a12Smrg 112753c15da26Smrg# Obtain platform specific info like program name and options 112763c15da26Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 112773c15da26Smrgcase $host_os in 112783c15da26Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 112793c15da26Smrg lint_name=splint 112803c15da26Smrg lint_options="-badflag" 112813c15da26Smrg ;; 112823c15da26Smrg *freebsd* | *netbsd*) 112833c15da26Smrg lint_name=lint 112843c15da26Smrg lint_options="-u -b" 112853c15da26Smrg ;; 112863c15da26Smrg *solaris*) 112873c15da26Smrg lint_name=lint 112883c15da26Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 112893c15da26Smrg ;; 112903c15da26Smrgesac 112913c15da26Smrg 112923c15da26Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 112933c15da26Smrgif test "x$use_lint" = x"yes" ; then 112943c15da26Smrg AC_PATH_PROG([LINT], [$lint_name]) 112953c15da26Smrg if test "x$LINT" = "x"; then 112963c15da26Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 112973c15da26Smrg fi 112983c15da26Smrgelif test "x$use_lint" = x"no" ; then 112993c15da26Smrg if test "x$LINT" != "x"; then 113003c15da26Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 113013c15da26Smrg fi 113023c15da26Smrgelse 113033c15da26Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 113043c15da26Smrgfi 11305126a8a12Smrg 113063c15da26Smrg# User supplied flags override default flags 113073c15da26Smrgif test "x$LINT_FLAGS" != "x"; then 113083c15da26Smrg lint_options=$LINT_FLAGS 113093c15da26Smrgfi 11310126a8a12Smrg 113113c15da26SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 113123c15da26SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11313126a8a12Smrg 113143c15da26Smrg]) # XORG_WITH_LINT 11315555991fdSmrg 113163c15da26Smrg# XORG_LINT_LIBRARY(LIBNAME) 113173c15da26Smrg# -------------------------- 113183c15da26Smrg# Minimum version: 1.1.0 11319126a8a12Smrg# 113203c15da26Smrg# Sets up flags for building lint libraries for checking programs that call 113213c15da26Smrg# functions in the library. 11322555991fdSmrg# 113233c15da26Smrg# Interface to module: 113243c15da26Smrg# LINTLIB - Automake variable with the name of lint library file to make 113253c15da26Smrg# MAKE_LINT_LIB - Automake conditional 113263c15da26Smrg# 113273c15da26Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 113283c15da26Smrg# - 'no' user instructs the module not to create a lint library (default) 11329126a8a12Smrg 113303c15da26SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 113313c15da26SmrgAC_REQUIRE([XORG_WITH_LINT]) 113323c15da26SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 113333c15da26Smrg [Create lint library (default: disabled)])], 113343c15da26Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11335126a8a12Smrg 113363c15da26Smrgif test "x$make_lint_lib" = x"yes" ; then 113373c15da26Smrg LINTLIB=llib-l$1.ln 113383c15da26Smrg if test "x$LINT" = "x"; then 113393c15da26Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 113403c15da26Smrg fi 113413c15da26Smrgelif test "x$make_lint_lib" != x"no" ; then 113423c15da26Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 113433c15da26Smrgfi 11344126a8a12Smrg 113453c15da26SmrgAC_SUBST(LINTLIB) 113463c15da26SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11347126a8a12Smrg 113483c15da26Smrg]) # XORG_LINT_LIBRARY 11349126a8a12Smrg 113503c15da26Smrg# XORG_COMPILER_BRAND 113513c15da26Smrg# ------------------- 113523c15da26Smrg# Minimum version: 1.14.0 113533c15da26Smrg# 113543c15da26Smrg# Checks for various brands of compilers and sets flags as appropriate: 113553c15da26Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 113560a6b08f8Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 113573c15da26Smrg# clang compiler - sets CLANGCC to "yes" 113583c15da26Smrg# Intel compiler - sets INTELCC to "yes" 113593c15da26Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 113603c15da26Smrg# 113613c15da26SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 113620a6b08f8SmrgAC_LANG_CASE( 113630a6b08f8Smrg [C], [ 113640a6b08f8Smrg AC_REQUIRE([AC_PROG_CC_C99]) 113650a6b08f8Smrg ], 113660a6b08f8Smrg [C++], [ 113670a6b08f8Smrg AC_REQUIRE([AC_PROG_CXX]) 113680a6b08f8Smrg ] 113690a6b08f8Smrg) 113703c15da26SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 113713c15da26SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 113723c15da26SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 113733c15da26Smrg]) # XORG_COMPILER_BRAND 11374555991fdSmrg 113753c15da26Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 113763c15da26Smrg# --------------- 113773c15da26Smrg# Minimum version: 1.16.0 11378126a8a12Smrg# 113793c15da26Smrg# Test if the compiler works when passed the given flag as a command line argument. 113803c15da26Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 113813c15da26Smrg# next flag in the list until there are no more options. 113823c15da26Smrg# 113833c15da26Smrg# Note that this does not guarantee that the compiler supports the flag as some 113843c15da26Smrg# compilers will simply ignore arguments that they do not understand, but we do 113853c15da26Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 113863c15da26Smrg# -Werror=unused-command-line-argument 113873c15da26Smrg# 113883c15da26SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 113893c15da26Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 113903c15da26Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 113913c15da26Smrg 113920a6b08f8SmrgAC_LANG_COMPILER_REQUIRE 113930a6b08f8Smrg 113940a6b08f8SmrgAC_LANG_CASE( 113950a6b08f8Smrg [C], [ 113960a6b08f8Smrg AC_REQUIRE([AC_PROG_CC_C99]) 113970a6b08f8Smrg define([PREFIX], [C]) 113980a6b08f8Smrg define([CACHE_PREFIX], [cc]) 113990a6b08f8Smrg define([COMPILER], [$CC]) 114000a6b08f8Smrg ], 114010a6b08f8Smrg [C++], [ 114020a6b08f8Smrg define([PREFIX], [CXX]) 114030a6b08f8Smrg define([CACHE_PREFIX], [cxx]) 114040a6b08f8Smrg define([COMPILER], [$CXX]) 114050a6b08f8Smrg ] 114060a6b08f8Smrg) 114070a6b08f8Smrg 114080a6b08f8Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 114093c15da26Smrg 114100a6b08f8Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 114110a6b08f8Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114120a6b08f8Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 114130a6b08f8Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 114143c15da26Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 114150a6b08f8Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 114160a6b08f8Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 114170a6b08f8Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 114180a6b08f8Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114193c15da26Smrgfi 11420126a8a12Smrg 114210a6b08f8Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 114220a6b08f8Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 114230a6b08f8Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114243c15da26Smrg fi 114250a6b08f8Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 114260a6b08f8Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 114270a6b08f8Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 114283c15da26Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 114290a6b08f8Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 114300a6b08f8Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 114310a6b08f8Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 114320a6b08f8Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114333c15da26Smrgfi 11434126a8a12Smrg 114353c15da26Smrgfound="no" 114363c15da26Smrgm4_foreach([flag], m4_cdr($@), [ 114373c15da26Smrg if test $found = "no" ; then 114380a6b08f8Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 114390a6b08f8Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114403c15da26Smrg fi 114413c15da26Smrg 114420a6b08f8Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 114430a6b08f8Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 114443c15da26Smrg fi 114453c15da26Smrg 114460a6b08f8Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 114473c15da26Smrg 114483c15da26Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 114490a6b08f8Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 114500a6b08f8Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 114510a6b08f8Smrg AC_CACHE_VAL($cacheid, 114523c15da26Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 114530a6b08f8Smrg [eval $cacheid=yes], 114540a6b08f8Smrg [eval $cacheid=no])]) 114553c15da26Smrg 114560a6b08f8Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114573c15da26Smrg 114580a6b08f8Smrg eval supported=\$$cacheid 114593c15da26Smrg AC_MSG_RESULT([$supported]) 114603c15da26Smrg if test "$supported" = "yes" ; then 114613c15da26Smrg $1="$$1 ]flag[" 114623c15da26Smrg found="yes" 114633c15da26Smrg fi 114643c15da26Smrg fi 114653c15da26Smrg]) 114663c15da26Smrg]) # XORG_TESTSET_CFLAG 11467d656433aSmrg 114683c15da26Smrg# XORG_COMPILER_FLAGS 114693c15da26Smrg# --------------- 114703c15da26Smrg# Minimum version: 1.16.0 114713c15da26Smrg# 114720a6b08f8Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 114730a6b08f8Smrg# arguments supported by the selected compiler which do NOT alter the generated 114740a6b08f8Smrg# code. These arguments will cause the compiler to print various warnings 114750a6b08f8Smrg# during compilation AND turn a conservative set of warnings into errors. 114763c15da26Smrg# 114770a6b08f8Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 114780a6b08f8Smrg# future versions of util-macros as options are added to new compilers. 114793c15da26Smrg# 114803c15da26SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 114813c15da26SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11482555991fdSmrg 114833c15da26SmrgAC_ARG_ENABLE(selective-werror, 114843c15da26Smrg AS_HELP_STRING([--disable-selective-werror], 114853c15da26Smrg [Turn off selective compiler errors. (default: enabled)]), 114863c15da26Smrg [SELECTIVE_WERROR=$enableval], 114873c15da26Smrg [SELECTIVE_WERROR=yes]) 11488555991fdSmrg 114890a6b08f8SmrgAC_LANG_CASE( 114900a6b08f8Smrg [C], [ 114910a6b08f8Smrg define([PREFIX], [C]) 114920a6b08f8Smrg ], 114930a6b08f8Smrg [C++], [ 114940a6b08f8Smrg define([PREFIX], [CXX]) 114950a6b08f8Smrg ] 114960a6b08f8Smrg) 114973c15da26Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 114983c15da26Smrgif test "x$SUNCC" = "xyes"; then 114990a6b08f8Smrg [BASE_]PREFIX[FLAGS]="-v" 115003c15da26Smrgelse 115010a6b08f8Smrg [BASE_]PREFIX[FLAGS]="" 115023c15da26Smrgfi 11503555991fdSmrg 115043c15da26Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 115050a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 115060a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 115070a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 115080a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 115090a6b08f8Smrg 115100a6b08f8SmrgAC_LANG_CASE( 115110a6b08f8Smrg [C], [ 115120a6b08f8Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 115130a6b08f8Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 115140a6b08f8Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 115150a6b08f8Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 115160a6b08f8Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 115170a6b08f8Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 115180a6b08f8Smrg ] 115190a6b08f8Smrg) 115203c15da26Smrg 115213c15da26Smrg# This chunk adds additional warnings that could catch undesired effects. 115220a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 115230a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 115240a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 115250a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 115260a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 115270a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 115280a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 115293c15da26Smrg 115303c15da26Smrg# These are currently disabled because they are noisy. They will be enabled 115313c15da26Smrg# in the future once the codebase is sufficiently modernized to silence 115323c15da26Smrg# them. For now, I don't want them to drown out the other warnings. 115330a6b08f8Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 115340a6b08f8Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 115350a6b08f8Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 115363c15da26Smrg 115373c15da26Smrg# Turn some warnings into errors, so we don't accidently get successful builds 115383c15da26Smrg# when there are problems that should be fixed. 115393c15da26Smrg 115403c15da26Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 115410a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 115420a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 115430a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 115440a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 115450a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 115460a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 115470a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 115480a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 115490a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 115500a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 115510a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 115520a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 115530a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 115543c15da26Smrgelse 115553c15da26SmrgAC_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]) 115560a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 115570a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 115580a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 115590a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 115600a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 115610a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 115620a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 115630a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 115640a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 115650a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 115660a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 115670a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 115680a6b08f8SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 115693c15da26Smrgfi 11570555991fdSmrg 115710a6b08f8SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 115723c15da26Smrg]) # XORG_COMPILER_FLAGS 11573555991fdSmrg 115743c15da26Smrg# XORG_CWARNFLAGS 115753c15da26Smrg# --------------- 115763c15da26Smrg# Minimum version: 1.2.0 115773c15da26Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 115783c15da26Smrg# 115793c15da26Smrg# Defines CWARNFLAGS to enable C compiler warnings. 115803c15da26Smrg# 115813c15da26Smrg# This function is deprecated because it defines -fno-strict-aliasing 115823c15da26Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 115833c15da26Smrg# is needed, then it should be added explicitly in the module when 115843c15da26Smrg# it is updated to use BASE_CFLAGS. 115853c15da26Smrg# 115863c15da26SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 115873c15da26SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 115883c15da26SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 115890a6b08f8SmrgAC_LANG_CASE( 115900a6b08f8Smrg [C], [ 115910a6b08f8Smrg CWARNFLAGS="$BASE_CFLAGS" 115920a6b08f8Smrg if test "x$GCC" = xyes ; then 115930a6b08f8Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 115940a6b08f8Smrg fi 115950a6b08f8Smrg AC_SUBST(CWARNFLAGS) 115960a6b08f8Smrg ] 115970a6b08f8Smrg) 115983c15da26Smrg]) # XORG_CWARNFLAGS 11599555991fdSmrg 116003c15da26Smrg# XORG_STRICT_OPTION 116013c15da26Smrg# ----------------------- 116023c15da26Smrg# Minimum version: 1.3.0 116033c15da26Smrg# 116043c15da26Smrg# Add configure option to enable strict compilation flags, such as treating 116053c15da26Smrg# warnings as fatal errors. 116063c15da26Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 116070a6b08f8Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 116083c15da26Smrg# 116093c15da26Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 116103c15da26Smrg# when strict compilation is unconditionally desired. 116113c15da26SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 116123c15da26SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 116133c15da26SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11614555991fdSmrg 116153c15da26SmrgAC_ARG_ENABLE(strict-compilation, 116163c15da26Smrg AS_HELP_STRING([--enable-strict-compilation], 116173c15da26Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 116183c15da26Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11619555991fdSmrg 116200a6b08f8SmrgAC_LANG_CASE( 116210a6b08f8Smrg [C], [ 116220a6b08f8Smrg define([PREFIX], [C]) 116230a6b08f8Smrg ], 116240a6b08f8Smrg [C++], [ 116250a6b08f8Smrg define([PREFIX], [CXX]) 116260a6b08f8Smrg ] 116270a6b08f8Smrg) 116280a6b08f8Smrg 116290a6b08f8Smrg[STRICT_]PREFIX[FLAGS]="" 116300a6b08f8SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 116310a6b08f8SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11632126a8a12Smrg 116333c15da26Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 116343c15da26Smrg# activate it with -Werror, so we add it here explicitly. 116350a6b08f8SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11636126a8a12Smrg 116373c15da26Smrgif test "x$STRICT_COMPILE" = "xyes"; then 116380a6b08f8Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 116390a6b08f8Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 116403c15da26Smrgfi 116410a6b08f8SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 116420a6b08f8SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 116430a6b08f8SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 116443c15da26Smrg]) # XORG_STRICT_OPTION 116453c15da26Smrg 116463c15da26Smrg# XORG_DEFAULT_OPTIONS 116473c15da26Smrg# -------------------- 116483c15da26Smrg# Minimum version: 1.3.0 116493c15da26Smrg# 116503c15da26Smrg# Defines default options for X.Org modules. 116513c15da26Smrg# 116523c15da26SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 116533c15da26SmrgAC_REQUIRE([AC_PROG_INSTALL]) 116543c15da26SmrgXORG_COMPILER_FLAGS 116553c15da26SmrgXORG_CWARNFLAGS 116563c15da26SmrgXORG_STRICT_OPTION 116573c15da26SmrgXORG_RELEASE_VERSION 116583c15da26SmrgXORG_CHANGELOG 116593c15da26SmrgXORG_INSTALL 116603c15da26SmrgXORG_MANPAGE_SECTIONS 116613c15da26Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 116623c15da26Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 116633c15da26Smrg]) # XORG_DEFAULT_OPTIONS 11664126a8a12Smrg 116653c15da26Smrg# XORG_INSTALL() 116663c15da26Smrg# ---------------- 116673c15da26Smrg# Minimum version: 1.4.0 116683c15da26Smrg# 116693c15da26Smrg# Defines the variable INSTALL_CMD as the command to copy 116703c15da26Smrg# INSTALL from $prefix/share/util-macros. 116713c15da26Smrg# 116723c15da26SmrgAC_DEFUN([XORG_INSTALL], [ 116733c15da26SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 116743c15da26Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 116753c15da26SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 116763c15da26Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 116773c15da26Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 116783c15da26Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 116793c15da26SmrgAC_SUBST([INSTALL_CMD]) 116803c15da26Smrg]) # XORG_INSTALL 116813c15da26Smrgdnl Copyright 2005 Red Hat, Inc 116823c15da26Smrgdnl 116833c15da26Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 116843c15da26Smrgdnl documentation for any purpose is hereby granted without fee, provided that 116853c15da26Smrgdnl the above copyright notice appear in all copies and that both that 116863c15da26Smrgdnl copyright notice and this permission notice appear in supporting 116873c15da26Smrgdnl documentation. 116883c15da26Smrgdnl 116893c15da26Smrgdnl The above copyright notice and this permission notice shall be included 116903c15da26Smrgdnl in all copies or substantial portions of the Software. 116913c15da26Smrgdnl 116923c15da26Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 116933c15da26Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 116943c15da26Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 116953c15da26Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 116963c15da26Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 116973c15da26Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 116983c15da26Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 116993c15da26Smrgdnl 117003c15da26Smrgdnl Except as contained in this notice, the name of the copyright holders shall 117013c15da26Smrgdnl not be used in advertising or otherwise to promote the sale, use or 117023c15da26Smrgdnl other dealings in this Software without prior written authorization 117033c15da26Smrgdnl from the copyright holders. 117043c15da26Smrgdnl 11705126a8a12Smrg 117063c15da26Smrg# XORG_RELEASE_VERSION 117073c15da26Smrg# -------------------- 117083c15da26Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 117090a6b08f8Smrg 117103c15da26SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 117113c15da26Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 117123c15da26Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 117133c15da26Smrg [Major version of this package]) 117143c15da26Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 117153c15da26Smrg if test "x$PVM" = "x"; then 117163c15da26Smrg PVM="0" 117173c15da26Smrg fi 117183c15da26Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 117193c15da26Smrg [$PVM], 117203c15da26Smrg [Minor version of this package]) 117213c15da26Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 117223c15da26Smrg if test "x$PVP" = "x"; then 117233c15da26Smrg PVP="0" 117243c15da26Smrg fi 117253c15da26Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 117263c15da26Smrg [$PVP], 117273c15da26Smrg [Patch version of this package]) 11728555991fdSmrg]) 11729126a8a12Smrg 117303c15da26Smrg# XORG_CHANGELOG() 117313c15da26Smrg# ---------------- 117323c15da26Smrg# Minimum version: 1.2.0 11733126a8a12Smrg# 117343c15da26Smrg# Defines the variable CHANGELOG_CMD as the command to generate 117353c15da26Smrg# ChangeLog from git. 11736555991fdSmrg# 117373c15da26Smrg# 117383c15da26SmrgAC_DEFUN([XORG_CHANGELOG], [ 117393c15da26SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 117403c15da26Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 117413c15da26Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 117423c15da26Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 117433c15da26SmrgAC_SUBST([CHANGELOG_CMD]) 117443c15da26Smrg]) # XORG_CHANGELOG 11745126a8a12Smrg 117463c15da26Smrgdnl 117473c15da26Smrgdnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 117483c15da26Smrgdnl 117493c15da26Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 117503c15da26Smrgdnl copy of this software and associated documentation files (the "Software"), 117513c15da26Smrgdnl to deal in the Software without restriction, including without limitation 117523c15da26Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 117533c15da26Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 117543c15da26Smrgdnl Software is furnished to do so, subject to the following conditions: 117553c15da26Smrgdnl 117563c15da26Smrgdnl The above copyright notice and this permission notice (including the next 117573c15da26Smrgdnl paragraph) shall be included in all copies or substantial portions of the 117583c15da26Smrgdnl Software. 117593c15da26Smrgdnl 117603c15da26Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 117613c15da26Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 117623c15da26Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 117633c15da26Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 117643c15da26Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 117653c15da26Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 117663c15da26Smrgdnl DEALINGS IN THE SOFTWARE. 117673c15da26Smrgdnl 11768d656433aSmrg 117693c15da26Smrg# XTRANS_TCP_FLAGS() 117703c15da26Smrg# ------------------ 117713c15da26Smrg# Find needed libraries for TCP sockets, and check for IPv6 support 117723c15da26SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 117733c15da26Smrg # SVR4 hides these in libraries other than libc 117743c15da26Smrg AC_SEARCH_LIBS(socket, [socket]) 117753c15da26Smrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 117763c15da26Smrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 117773c15da26Smrg AC_HAVE_LIBRARY([ws2_32]) 117783c15da26Smrg fi 11779126a8a12Smrg 117803c15da26Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 117813c15da26Smrg AC_ARG_ENABLE(ipv6, 117823c15da26Smrg AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 117833c15da26Smrg [IPV6CONN=$enableval], 117843c15da26Smrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 117853c15da26Smrg AC_MSG_CHECKING([if IPv6 support should be built]) 117863c15da26Smrg if test "$IPV6CONN" = "yes"; then 117873c15da26Smrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 117883c15da26Smrg fi 117893c15da26Smrg AC_MSG_RESULT($IPV6CONN) 11790d656433aSmrg 117913c15da26Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in 117923c15da26Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 117933c15da26Smrg AC_DEFINE([BSD44SOCKETS],1, 117943c15da26Smrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 117953c15da26Smrg#include <sys/types.h> 117963c15da26Smrg#include <sys/socket.h> 117973c15da26Smrg#include <netinet/in.h> 117983c15da26Smrg ]) 11799126a8a12Smrg 118003c15da26Smrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 118013c15da26Smrg AC_CHECK_TYPES([socklen_t], [], [], [ 118023c15da26SmrgAC_INCLUDES_DEFAULT 118033c15da26Smrg#include <sys/socket.h>]) 11804126a8a12Smrg 118053c15da26Smrg]) # XTRANS_TCP_FLAGS 11806126a8a12Smrg 118073c15da26Smrg# XTRANS_CONNECTION_FLAGS() 118083c15da26Smrg# ------------------------- 118093c15da26Smrg# Standard checks for which Xtrans transports to use by the Xorg packages 118103c15da26Smrg# that use Xtrans functions 118113c15da26SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 118123c15da26Smrg AC_REQUIRE([AC_CANONICAL_HOST]) 118133c15da26Smrg AC_REQUIRE([AC_TYPE_SIGNAL]) 118143c15da26Smrg [case $host_os in 118153c15da26Smrg mingw*) unixdef="no" ;; 118163c15da26Smrg *) unixdef="yes" ;; 118173c15da26Smrg esac] 118183c15da26Smrg AC_ARG_ENABLE(unix-transport, 118193c15da26Smrg AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 118203c15da26Smrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 118213c15da26Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 118223c15da26Smrg if test "$UNIXCONN" = "yes"; then 118233c15da26Smrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 118243c15da26Smrg fi 118253c15da26Smrg AC_MSG_RESULT($UNIXCONN) 118263c15da26Smrg AC_ARG_ENABLE(tcp-transport, 118273c15da26Smrg AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 118283c15da26Smrg [TCPCONN=$enableval], [TCPCONN=yes]) 118293c15da26Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 118303c15da26Smrg AC_MSG_RESULT($TCPCONN) 118313c15da26Smrg if test "$TCPCONN" = "yes"; then 118323c15da26Smrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 118333c15da26Smrg XTRANS_TCP_FLAGS 118343c15da26Smrg fi 118353c15da26Smrg [case $host_os in 118363c15da26Smrg solaris*|sco*|sysv4*) localdef="yes" ;; 118373c15da26Smrg *) localdef="no" ;; 118383c15da26Smrg esac] 118393c15da26Smrg AC_ARG_ENABLE(local-transport, 118403c15da26Smrg AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 118413c15da26Smrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 118423c15da26Smrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 118433c15da26Smrg AC_MSG_RESULT($LOCALCONN) 118443c15da26Smrg if test "$LOCALCONN" = "yes"; then 118453c15da26Smrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 118463c15da26Smrg fi 11847126a8a12Smrg 118483c15da26Smrg]) # XTRANS_CONNECTION_FLAGS 118493c15da26Smrg 118503c15da26Smrg 118513c15da26Smrg# XTRANS_SECURE_RPC_FLAGS() 118523c15da26Smrg# ------------------------- 118533c15da26Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 118543c15da26Smrg# so that any necessary networking libraries are already found 118553c15da26SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 118563c15da26Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 118573c15da26Smrg AC_ARG_ENABLE(secure-rpc, 118583c15da26Smrg AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 118593c15da26Smrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 118603c15da26Smrg 118613c15da26Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 118623c15da26Smrg FOUND_SECURE_RPC="no" 118633c15da26Smrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 118643c15da26Smrg [FOUND_SECURE_RPC="yes"]) 118653c15da26Smrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 118663c15da26Smrg if test "x$SECURE_RPC" = "xyes" ; then 118673c15da26Smrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 118683c15da26Smrg fi 118693c15da26Smrg SECURE_RPC="no" 118703c15da26Smrg else 118713c15da26Smrg dnl FreeBSD keeps getsecretkey in librpcsvc 118723c15da26Smrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 118733c15da26Smrg SECURE_RPC="yes" 118743c15da26Smrg fi 118753c15da26Smrg fi 118763c15da26Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 118773c15da26Smrg if test "x$SECURE_RPC" = "xyes" ; then 118783c15da26Smrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 118793c15da26Smrg fi 118803c15da26Smrg AC_MSG_RESULT($SECURE_RPC) 118813c15da26Smrg]) # XTRANS_SECURE_RPC_FLAGS 11882126a8a12Smrg 11883126a8a12Smrg 11884