aclocal.m4 revision 97cf2ee2
16e7d3316Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2a966c04fSmrg 3a966c04fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42e2dd055Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5a966c04fSmrg# This file is free software; the Free Software Foundation 6a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 7a966c04fSmrg# with or without modifications, as long as this notice is preserved. 8a966c04fSmrg 9a966c04fSmrg# This program is distributed in the hope that it will be useful, 10a966c04fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11a966c04fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12a966c04fSmrg# PARTICULAR PURPOSE. 13a966c04fSmrg 142e2dd055Smrgm4_ifndef([AC_AUTOCONF_VERSION], 152e2dd055Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 166e7d3316Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 176e7d3316Smrg[m4_warning([this file was generated for autoconf 2.68. 182e2dd055SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 192e2dd055SmrgIf you have problems, you may need to regenerate the build system entirely. 202e2dd055SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21a966c04fSmrg 222e2dd055Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23a966c04fSmrg# 24a966c04fSmrg# This file is free software; the Free Software Foundation 25a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 26a966c04fSmrg# with or without modifications, as long as this notice is preserved. 27a966c04fSmrg 28a966c04fSmrg# AM_AUTOMAKE_VERSION(VERSION) 29a966c04fSmrg# ---------------------------- 30a966c04fSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31a966c04fSmrg# generated from the m4 files accompanying Automake X.Y. 32a966c04fSmrg# (This private macro should not be called outside this file.) 33a966c04fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 342e2dd055Smrg[am__api_version='1.11' 35a966c04fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36a966c04fSmrgdnl require some minimum version. Point them to the right macro. 376e7d3316Smrgm4_if([$1], [1.11.1], [], 38a966c04fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39a966c04fSmrg]) 40a966c04fSmrg 41a966c04fSmrg# _AM_AUTOCONF_VERSION(VERSION) 42a966c04fSmrg# ----------------------------- 43a966c04fSmrg# aclocal traces this macro to find the Autoconf version. 44a966c04fSmrg# This is a private macro too. Using m4_define simplifies 45a966c04fSmrg# the logic in aclocal, which can simply ignore this definition. 46a966c04fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 47a966c04fSmrg 48a966c04fSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49a966c04fSmrg# ------------------------------- 50a966c04fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 512e2dd055Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52a966c04fSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 536e7d3316Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 542e2dd055Smrgm4_ifndef([AC_AUTOCONF_VERSION], 552e2dd055Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 562e2dd055Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57a966c04fSmrg 58a966c04fSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59a966c04fSmrg 60a966c04fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61a966c04fSmrg# 62a966c04fSmrg# This file is free software; the Free Software Foundation 63a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 64a966c04fSmrg# with or without modifications, as long as this notice is preserved. 65a966c04fSmrg 66a966c04fSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67a966c04fSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68a966c04fSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69a966c04fSmrg# 70a966c04fSmrg# Of course, Automake must honor this variable whenever it calls a 71a966c04fSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 72a966c04fSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73a966c04fSmrg# depending on how configure is run. This is pretty annoying, since 74a966c04fSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75a966c04fSmrg# source directory, any form will work fine, but in subdirectories a 76a966c04fSmrg# relative path needs to be adjusted first. 77a966c04fSmrg# 78a966c04fSmrg# $ac_aux_dir/missing 79a966c04fSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 80a966c04fSmrg# $top_srcdir/$ac_aux_dir/missing 81a966c04fSmrg# fails if $ac_aux_dir is absolute, 82a966c04fSmrg# fails when called from a subdirectory in a VPATH build with 83a966c04fSmrg# a relative $ac_aux_dir 84a966c04fSmrg# 85a966c04fSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86a966c04fSmrg# are both prefixed by $srcdir. In an in-source build this is usually 87a966c04fSmrg# harmless because $srcdir is `.', but things will broke when you 88a966c04fSmrg# start a VPATH build or use an absolute $srcdir. 89a966c04fSmrg# 90a966c04fSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91a966c04fSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92a966c04fSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93a966c04fSmrg# and then we would define $MISSING as 94a966c04fSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 95a966c04fSmrg# This will work as long as MISSING is not called from configure, because 96a966c04fSmrg# unfortunately $(top_srcdir) has no meaning in configure. 97a966c04fSmrg# However there are other variables, like CC, which are often used in 98a966c04fSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99a966c04fSmrg# 100a966c04fSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 101a966c04fSmrg# absolute PATH. The drawback is that using absolute paths prevent a 102a966c04fSmrg# configured tree to be moved without reconfiguration. 103a966c04fSmrg 104a966c04fSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 105a966c04fSmrg[dnl Rely on autoconf to set up CDPATH properly. 106a966c04fSmrgAC_PREREQ([2.50])dnl 107a966c04fSmrg# expand $ac_aux_dir to an absolute path 108a966c04fSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 109a966c04fSmrg]) 110a966c04fSmrg 111a966c04fSmrg# AM_CONDITIONAL -*- Autoconf -*- 112a966c04fSmrg 1132e2dd055Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114a966c04fSmrg# Free Software Foundation, Inc. 115a966c04fSmrg# 116a966c04fSmrg# This file is free software; the Free Software Foundation 117a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 118a966c04fSmrg# with or without modifications, as long as this notice is preserved. 119a966c04fSmrg 1202e2dd055Smrg# serial 9 121a966c04fSmrg 122a966c04fSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 123a966c04fSmrg# ------------------------------------- 124a966c04fSmrg# Define a conditional. 125a966c04fSmrgAC_DEFUN([AM_CONDITIONAL], 126a966c04fSmrg[AC_PREREQ(2.52)dnl 127a966c04fSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 128a966c04fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 129a966c04fSmrgAC_SUBST([$1_TRUE])dnl 130a966c04fSmrgAC_SUBST([$1_FALSE])dnl 131a966c04fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 132a966c04fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1332e2dd055Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 134a966c04fSmrgif $2; then 135a966c04fSmrg $1_TRUE= 136a966c04fSmrg $1_FALSE='#' 137a966c04fSmrgelse 138a966c04fSmrg $1_TRUE='#' 139a966c04fSmrg $1_FALSE= 140a966c04fSmrgfi 141a966c04fSmrgAC_CONFIG_COMMANDS_PRE( 142a966c04fSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143a966c04fSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 144a966c04fSmrgUsually this means the macro was only invoked conditionally.]]) 145a966c04fSmrgfi])]) 146a966c04fSmrg 1472e2dd055Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 148a966c04fSmrg# Free Software Foundation, Inc. 149a966c04fSmrg# 150a966c04fSmrg# This file is free software; the Free Software Foundation 151a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 152a966c04fSmrg# with or without modifications, as long as this notice is preserved. 153a966c04fSmrg 1542e2dd055Smrg# serial 10 155a966c04fSmrg 156a966c04fSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157a966c04fSmrg# written in clear, in which case automake, when reading aclocal.m4, 158a966c04fSmrg# will think it sees a *use*, and therefore will trigger all it's 159a966c04fSmrg# C support machinery. Also note that it means that autoscan, seeing 160a966c04fSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161a966c04fSmrg 162a966c04fSmrg 163a966c04fSmrg# _AM_DEPENDENCIES(NAME) 164a966c04fSmrg# ---------------------- 165a966c04fSmrg# See how the compiler implements dependency checking. 166a966c04fSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167a966c04fSmrg# We try a few techniques and use that to set a single cache variable. 168a966c04fSmrg# 169a966c04fSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170a966c04fSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171a966c04fSmrg# dependency, and given that the user is not expected to run this macro, 172a966c04fSmrg# just rely on AC_PROG_CC. 173a966c04fSmrgAC_DEFUN([_AM_DEPENDENCIES], 174a966c04fSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175a966c04fSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176a966c04fSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177a966c04fSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178a966c04fSmrg 179a966c04fSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180a966c04fSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181a966c04fSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 182a966c04fSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183a966c04fSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184a966c04fSmrg [depcc="$$1" am_compiler_list=]) 185a966c04fSmrg 186a966c04fSmrgAC_CACHE_CHECK([dependency style of $depcc], 187a966c04fSmrg [am_cv_$1_dependencies_compiler_type], 188a966c04fSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189a966c04fSmrg # We make a subdir and do the tests there. Otherwise we can end up 190a966c04fSmrg # making bogus files that we don't know about and never remove. For 191a966c04fSmrg # instance it was reported that on HP-UX the gcc test will end up 192a966c04fSmrg # making a dummy file named `D' -- because `-MD' means `put the output 193a966c04fSmrg # in D'. 194a966c04fSmrg mkdir conftest.dir 195a966c04fSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 196a966c04fSmrg # using a relative directory. 197a966c04fSmrg cp "$am_depcomp" conftest.dir 198a966c04fSmrg cd conftest.dir 199a966c04fSmrg # We will build objects and dependencies in a subdirectory because 200a966c04fSmrg # it helps to detect inapplicable dependency modes. For instance 201a966c04fSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 202a966c04fSmrg # side effect of compilation, but ICC will put the dependencies in 203a966c04fSmrg # the current directory while Tru64 will put them in the object 204a966c04fSmrg # directory. 205a966c04fSmrg mkdir sub 206a966c04fSmrg 207a966c04fSmrg am_cv_$1_dependencies_compiler_type=none 208a966c04fSmrg if test "$am_compiler_list" = ""; then 209a966c04fSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210a966c04fSmrg fi 2112e2dd055Smrg am__universal=false 2122e2dd055Smrg m4_case([$1], [CC], 2132e2dd055Smrg [case " $depcc " in #( 2142e2dd055Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2152e2dd055Smrg esac], 2162e2dd055Smrg [CXX], 2172e2dd055Smrg [case " $depcc " in #( 2182e2dd055Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2192e2dd055Smrg esac]) 2202e2dd055Smrg 221a966c04fSmrg for depmode in $am_compiler_list; do 222a966c04fSmrg # Setup a source with many dependencies, because some compilers 223a966c04fSmrg # like to wrap large dependency lists on column 80 (with \), and 224a966c04fSmrg # we should not choose a depcomp mode which is confused by this. 225a966c04fSmrg # 226a966c04fSmrg # We need to recreate these files for each test, as the compiler may 227a966c04fSmrg # overwrite some of them when testing with obscure command lines. 228a966c04fSmrg # This happens at least with the AIX C compiler. 229a966c04fSmrg : > sub/conftest.c 230a966c04fSmrg for i in 1 2 3 4 5 6; do 231a966c04fSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 232a966c04fSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 233a966c04fSmrg # Solaris 8's {/usr,}/bin/sh. 234a966c04fSmrg touch sub/conftst$i.h 235a966c04fSmrg done 236a966c04fSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237a966c04fSmrg 2382e2dd055Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 2392e2dd055Smrg # mode. It turns out that the SunPro C++ compiler does not properly 2402e2dd055Smrg # handle `-M -o', and we need to detect this. Also, some Intel 2412e2dd055Smrg # versions had trouble with output in subdirs 2422e2dd055Smrg am__obj=sub/conftest.${OBJEXT-o} 2432e2dd055Smrg am__minus_obj="-o $am__obj" 244a966c04fSmrg case $depmode in 2452e2dd055Smrg gcc) 2462e2dd055Smrg # This depmode causes a compiler race in universal mode. 2472e2dd055Smrg test "$am__universal" = false || continue 2482e2dd055Smrg ;; 249a966c04fSmrg nosideeffect) 250a966c04fSmrg # after this tag, mechanisms are not by side-effect, so they'll 251a966c04fSmrg # only be used when explicitly requested 252a966c04fSmrg if test "x$enable_dependency_tracking" = xyes; then 253a966c04fSmrg continue 254a966c04fSmrg else 255a966c04fSmrg break 256a966c04fSmrg fi 257a966c04fSmrg ;; 2582e2dd055Smrg msvisualcpp | msvcmsys) 2592e2dd055Smrg # This compiler won't grok `-c -o', but also, the minuso test has 2602e2dd055Smrg # not run yet. These depmodes are late enough in the game, and 2612e2dd055Smrg # so weak that their functioning should not be impacted. 2622e2dd055Smrg am__obj=conftest.${OBJEXT-o} 2632e2dd055Smrg am__minus_obj= 2642e2dd055Smrg ;; 265a966c04fSmrg none) break ;; 266a966c04fSmrg esac 267a966c04fSmrg if depmode=$depmode \ 2682e2dd055Smrg source=sub/conftest.c object=$am__obj \ 269a966c04fSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2702e2dd055Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271a966c04fSmrg >/dev/null 2>conftest.err && 272a966c04fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273a966c04fSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2742e2dd055Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275a966c04fSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276a966c04fSmrg # icc doesn't choke on unknown options, it will just issue warnings 277a966c04fSmrg # or remarks (even with -Werror). So we grep stderr for any message 278a966c04fSmrg # that says an option was ignored or not supported. 279a966c04fSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 280a966c04fSmrg # icc: Command line warning: ignoring option '-M'; no argument required 281a966c04fSmrg # The diagnosis changed in icc 8.0: 282a966c04fSmrg # icc: Command line remark: option '-MP' not supported 283a966c04fSmrg if (grep 'ignoring option' conftest.err || 284a966c04fSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285a966c04fSmrg am_cv_$1_dependencies_compiler_type=$depmode 286a966c04fSmrg break 287a966c04fSmrg fi 288a966c04fSmrg fi 289a966c04fSmrg done 290a966c04fSmrg 291a966c04fSmrg cd .. 292a966c04fSmrg rm -rf conftest.dir 293a966c04fSmrgelse 294a966c04fSmrg am_cv_$1_dependencies_compiler_type=none 295a966c04fSmrgfi 296a966c04fSmrg]) 297a966c04fSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298a966c04fSmrgAM_CONDITIONAL([am__fastdep$1], [ 299a966c04fSmrg test "x$enable_dependency_tracking" != xno \ 300a966c04fSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301a966c04fSmrg]) 302a966c04fSmrg 303a966c04fSmrg 304a966c04fSmrg# AM_SET_DEPDIR 305a966c04fSmrg# ------------- 306a966c04fSmrg# Choose a directory name for dependency files. 307a966c04fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308a966c04fSmrgAC_DEFUN([AM_SET_DEPDIR], 309a966c04fSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310a966c04fSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311a966c04fSmrg]) 312a966c04fSmrg 313a966c04fSmrg 314a966c04fSmrg# AM_DEP_TRACK 315a966c04fSmrg# ------------ 316a966c04fSmrgAC_DEFUN([AM_DEP_TRACK], 317a966c04fSmrg[AC_ARG_ENABLE(dependency-tracking, 318a966c04fSmrg[ --disable-dependency-tracking speeds up one-time build 319a966c04fSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 320a966c04fSmrgif test "x$enable_dependency_tracking" != xno; then 321a966c04fSmrg am_depcomp="$ac_aux_dir/depcomp" 322a966c04fSmrg AMDEPBACKSLASH='\' 323a966c04fSmrgfi 324a966c04fSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 325a966c04fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 326a966c04fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327a966c04fSmrg]) 328a966c04fSmrg 329a966c04fSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330a966c04fSmrg 3312e2dd055Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 332a966c04fSmrg# Free Software Foundation, Inc. 333a966c04fSmrg# 334a966c04fSmrg# This file is free software; the Free Software Foundation 335a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 336a966c04fSmrg# with or without modifications, as long as this notice is preserved. 337a966c04fSmrg 3382e2dd055Smrg#serial 5 339a966c04fSmrg 340a966c04fSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341a966c04fSmrg# ------------------------------ 342a966c04fSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3432e2dd055Smrg[{ 3442e2dd055Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 3452e2dd055Smrg # are listed without --file. Let's play safe and only enable the eval 3462e2dd055Smrg # if we detect the quoting. 3472e2dd055Smrg case $CONFIG_FILES in 3482e2dd055Smrg *\'*) eval set x "$CONFIG_FILES" ;; 3492e2dd055Smrg *) set x $CONFIG_FILES ;; 3502e2dd055Smrg esac 3512e2dd055Smrg shift 3522e2dd055Smrg for mf 3532e2dd055Smrg do 3542e2dd055Smrg # Strip MF so we end up with the name of the file. 3552e2dd055Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3562e2dd055Smrg # Check whether this is an Automake generated Makefile or not. 3572e2dd055Smrg # We used to match only the files named `Makefile.in', but 3582e2dd055Smrg # some people rename them; so instead we look at the file content. 3592e2dd055Smrg # Grep'ing the first line is not enough: some people post-process 3602e2dd055Smrg # each Makefile.in and add a new line on top of each file to say so. 3612e2dd055Smrg # Grep'ing the whole file is not good either: AIX grep has a line 3622e2dd055Smrg # limit of 2048, but all sed's we know have understand at least 4000. 3632e2dd055Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3642e2dd055Smrg dirpart=`AS_DIRNAME("$mf")` 3652e2dd055Smrg else 3662e2dd055Smrg continue 3672e2dd055Smrg fi 3682e2dd055Smrg # Extract the definition of DEPDIR, am__include, and am__quote 3692e2dd055Smrg # from the Makefile without running `make'. 3702e2dd055Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3712e2dd055Smrg test -z "$DEPDIR" && continue 3722e2dd055Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3732e2dd055Smrg test -z "am__include" && continue 3742e2dd055Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3752e2dd055Smrg # When using ansi2knr, U may be empty or an underscore; expand it 3762e2dd055Smrg U=`sed -n 's/^U = //p' < "$mf"` 3772e2dd055Smrg # Find all dependency output files, they are included files with 3782e2dd055Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3792e2dd055Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 3802e2dd055Smrg # expansion. 3812e2dd055Smrg for file in `sed -n " 3822e2dd055Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3832e2dd055Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 3842e2dd055Smrg # Make sure the directory exists. 3852e2dd055Smrg test -f "$dirpart/$file" && continue 3862e2dd055Smrg fdir=`AS_DIRNAME(["$file"])` 3872e2dd055Smrg AS_MKDIR_P([$dirpart/$fdir]) 3882e2dd055Smrg # echo "creating $dirpart/$file" 3892e2dd055Smrg echo '# dummy' > "$dirpart/$file" 3902e2dd055Smrg done 391a966c04fSmrg done 3922e2dd055Smrg} 393a966c04fSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394a966c04fSmrg 395a966c04fSmrg 396a966c04fSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397a966c04fSmrg# ----------------------------- 398a966c04fSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 399a966c04fSmrg# 400a966c04fSmrg# This code is only required when automatic dependency tracking 401a966c04fSmrg# is enabled. FIXME. This creates each `.P' file that we will 402a966c04fSmrg# need in order to bootstrap the dependency handling code. 403a966c04fSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404a966c04fSmrg[AC_CONFIG_COMMANDS([depfiles], 405a966c04fSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406a966c04fSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407a966c04fSmrg]) 408a966c04fSmrg 409a966c04fSmrg# Do all the work for Automake. -*- Autoconf -*- 410a966c04fSmrg 411a966c04fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4122e2dd055Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 413a966c04fSmrg# 414a966c04fSmrg# This file is free software; the Free Software Foundation 415a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 416a966c04fSmrg# with or without modifications, as long as this notice is preserved. 417a966c04fSmrg 4182e2dd055Smrg# serial 16 419a966c04fSmrg 420a966c04fSmrg# This macro actually does too much. Some checks are only needed if 421a966c04fSmrg# your package does certain things. But this isn't really a big deal. 422a966c04fSmrg 423a966c04fSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 424a966c04fSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 425a966c04fSmrg# ----------------------------------------------- 426a966c04fSmrg# The call with PACKAGE and VERSION arguments is the old style 427a966c04fSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 428a966c04fSmrg# and VERSION should now be passed to AC_INIT and removed from 429a966c04fSmrg# the call to AM_INIT_AUTOMAKE. 430a966c04fSmrg# We support both call styles for the transition. After 431a966c04fSmrg# the next Automake release, Autoconf can make the AC_INIT 432a966c04fSmrg# arguments mandatory, and then we can depend on a new Autoconf 433a966c04fSmrg# release and drop the old call support. 434a966c04fSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4352e2dd055Smrg[AC_PREREQ([2.62])dnl 436a966c04fSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 437a966c04fSmrgdnl the ones we care about. 438a966c04fSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 439a966c04fSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 440a966c04fSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 441a966c04fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 442a966c04fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 443a966c04fSmrg # is not polluted with repeated "-I." 444a966c04fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 445a966c04fSmrg # test to see if srcdir already configured 446a966c04fSmrg if test -f $srcdir/config.status; then 447a966c04fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 448a966c04fSmrg fi 449a966c04fSmrgfi 450a966c04fSmrg 451a966c04fSmrg# test whether we have cygpath 452a966c04fSmrgif test -z "$CYGPATH_W"; then 453a966c04fSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 454a966c04fSmrg CYGPATH_W='cygpath -w' 455a966c04fSmrg else 456a966c04fSmrg CYGPATH_W=echo 457a966c04fSmrg fi 458a966c04fSmrgfi 459a966c04fSmrgAC_SUBST([CYGPATH_W]) 460a966c04fSmrg 461a966c04fSmrg# Define the identity of the package. 462a966c04fSmrgdnl Distinguish between old-style and new-style calls. 463a966c04fSmrgm4_ifval([$2], 464a966c04fSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 465a966c04fSmrg AC_SUBST([PACKAGE], [$1])dnl 466a966c04fSmrg AC_SUBST([VERSION], [$2])], 467a966c04fSmrg[_AM_SET_OPTIONS([$1])dnl 468a966c04fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 469a966c04fSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 470a966c04fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 471a966c04fSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 472a966c04fSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 473a966c04fSmrg 474a966c04fSmrg_AM_IF_OPTION([no-define],, 475a966c04fSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 476a966c04fSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 477a966c04fSmrg 478a966c04fSmrg# Some tools Automake needs. 479a966c04fSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 480a966c04fSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 481a966c04fSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 482a966c04fSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 483a966c04fSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 484a966c04fSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 485a966c04fSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 4862e2dd055SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4872e2dd055SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 488a966c04fSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 489a966c04fSmrg# We need awk for the "check" target. The system "awk" is bad on 490a966c04fSmrg# some platforms. 491a966c04fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 492a966c04fSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 493a966c04fSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 494a966c04fSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 4952e2dd055Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 4962e2dd055Smrg [_AM_PROG_TAR([v7])])]) 497a966c04fSmrg_AM_IF_OPTION([no-dependencies],, 498a966c04fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 4992e2dd055Smrg [_AM_DEPENDENCIES(CC)], 5002e2dd055Smrg [define([AC_PROG_CC], 5012e2dd055Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 502a966c04fSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5032e2dd055Smrg [_AM_DEPENDENCIES(CXX)], 5042e2dd055Smrg [define([AC_PROG_CXX], 5052e2dd055Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 506a966c04fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5072e2dd055Smrg [_AM_DEPENDENCIES(OBJC)], 5082e2dd055Smrg [define([AC_PROG_OBJC], 5092e2dd055Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 510a966c04fSmrg]) 5112e2dd055Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 5122e2dd055Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 5132e2dd055Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 5142e2dd055Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 5152e2dd055SmrgAC_CONFIG_COMMANDS_PRE(dnl 5162e2dd055Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5172e2dd055Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 518a966c04fSmrg]) 519a966c04fSmrg 5202e2dd055Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5212e2dd055Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5222e2dd055Smrgdnl mangled by Autoconf and run in a shell conditional statement. 5232e2dd055Smrgm4_define([_AC_COMPILER_EXEEXT], 5242e2dd055Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5252e2dd055Smrg 526a966c04fSmrg 527a966c04fSmrg# When config.status generates a header, we must update the stamp-h file. 528a966c04fSmrg# This file resides in the same directory as the config header 529a966c04fSmrg# that is generated. The stamp files are numbered to have different names. 530a966c04fSmrg 531a966c04fSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 532a966c04fSmrg# loop where config.status creates the headers, so we can generate 533a966c04fSmrg# our stamp files there. 534a966c04fSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 535a966c04fSmrg[# Compute $1's index in $config_headers. 5362e2dd055Smrg_am_arg=$1 537a966c04fSmrg_am_stamp_count=1 538a966c04fSmrgfor _am_header in $config_headers :; do 539a966c04fSmrg case $_am_header in 5402e2dd055Smrg $_am_arg | $_am_arg:* ) 541a966c04fSmrg break ;; 542a966c04fSmrg * ) 543a966c04fSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 544a966c04fSmrg esac 545a966c04fSmrgdone 5462e2dd055Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 547a966c04fSmrg 5482e2dd055Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 549a966c04fSmrg# 550a966c04fSmrg# This file is free software; the Free Software Foundation 551a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 552a966c04fSmrg# with or without modifications, as long as this notice is preserved. 553a966c04fSmrg 554a966c04fSmrg# AM_PROG_INSTALL_SH 555a966c04fSmrg# ------------------ 556a966c04fSmrg# Define $install_sh. 557a966c04fSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 558a966c04fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 5592e2dd055Smrgif test x"${install_sh}" != xset; then 5602e2dd055Smrg case $am_aux_dir in 5612e2dd055Smrg *\ * | *\ *) 5622e2dd055Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 5632e2dd055Smrg *) 5642e2dd055Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 5652e2dd055Smrg esac 5662e2dd055Smrgfi 567a966c04fSmrgAC_SUBST(install_sh)]) 568a966c04fSmrg 569a966c04fSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 570a966c04fSmrg# 571a966c04fSmrg# This file is free software; the Free Software Foundation 572a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 573a966c04fSmrg# with or without modifications, as long as this notice is preserved. 574a966c04fSmrg 575a966c04fSmrg# serial 2 576a966c04fSmrg 577a966c04fSmrg# Check whether the underlying file-system supports filenames 578a966c04fSmrg# with a leading dot. For instance MS-DOS doesn't. 579a966c04fSmrgAC_DEFUN([AM_SET_LEADING_DOT], 580a966c04fSmrg[rm -rf .tst 2>/dev/null 581a966c04fSmrgmkdir .tst 2>/dev/null 582a966c04fSmrgif test -d .tst; then 583a966c04fSmrg am__leading_dot=. 584a966c04fSmrgelse 585a966c04fSmrg am__leading_dot=_ 586a966c04fSmrgfi 587a966c04fSmrgrmdir .tst 2>/dev/null 588a966c04fSmrgAC_SUBST([am__leading_dot])]) 589a966c04fSmrg 590a966c04fSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 591a966c04fSmrg# From Jim Meyering 592a966c04fSmrg 5932e2dd055Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 594a966c04fSmrg# Free Software Foundation, Inc. 595a966c04fSmrg# 596a966c04fSmrg# This file is free software; the Free Software Foundation 597a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 598a966c04fSmrg# with or without modifications, as long as this notice is preserved. 599a966c04fSmrg 6002e2dd055Smrg# serial 5 601a966c04fSmrg 6022e2dd055Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 6032e2dd055Smrg# ---------------------------------- 6042e2dd055Smrg# Control maintainer-specific portions of Makefiles. 6052e2dd055Smrg# Default is to disable them, unless `enable' is passed literally. 6062e2dd055Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 6072e2dd055Smrg# can override the default with the --enable/--disable switch. 608a966c04fSmrgAC_DEFUN([AM_MAINTAINER_MODE], 6092e2dd055Smrg[m4_case(m4_default([$1], [disable]), 6102e2dd055Smrg [enable], [m4_define([am_maintainer_other], [disable])], 6112e2dd055Smrg [disable], [m4_define([am_maintainer_other], [enable])], 6122e2dd055Smrg [m4_define([am_maintainer_other], [enable]) 6132e2dd055Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 6142e2dd055SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 6152e2dd055Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 6162e2dd055Smrg AC_ARG_ENABLE([maintainer-mode], 6172e2dd055Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 618a966c04fSmrg (and sometimes confusing) to the casual installer], 6192e2dd055Smrg [USE_MAINTAINER_MODE=$enableval], 6202e2dd055Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 621a966c04fSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 6222e2dd055Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 623a966c04fSmrg MAINT=$MAINTAINER_MODE_TRUE 6242e2dd055Smrg AC_SUBST([MAINT])dnl 625a966c04fSmrg] 626a966c04fSmrg) 627a966c04fSmrg 628a966c04fSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 629a966c04fSmrg 630a966c04fSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 631a966c04fSmrg 6322e2dd055Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 633a966c04fSmrg# 634a966c04fSmrg# This file is free software; the Free Software Foundation 635a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 636a966c04fSmrg# with or without modifications, as long as this notice is preserved. 637a966c04fSmrg 6382e2dd055Smrg# serial 4 639a966c04fSmrg 640a966c04fSmrg# AM_MAKE_INCLUDE() 641a966c04fSmrg# ----------------- 642a966c04fSmrg# Check to see how make treats includes. 643a966c04fSmrgAC_DEFUN([AM_MAKE_INCLUDE], 644a966c04fSmrg[am_make=${MAKE-make} 645a966c04fSmrgcat > confinc << 'END' 646a966c04fSmrgam__doit: 6472e2dd055Smrg @echo this is the am__doit target 648a966c04fSmrg.PHONY: am__doit 649a966c04fSmrgEND 650a966c04fSmrg# If we don't find an include directive, just comment out the code. 651a966c04fSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 652a966c04fSmrgam__include="#" 653a966c04fSmrgam__quote= 654a966c04fSmrg_am_result=none 655a966c04fSmrg# First try GNU make style include. 656a966c04fSmrgecho "include confinc" > confmf 6572e2dd055Smrg# Ignore all kinds of additional output from `make'. 6582e2dd055Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6592e2dd055Smrg*the\ am__doit\ target*) 6602e2dd055Smrg am__include=include 6612e2dd055Smrg am__quote= 6622e2dd055Smrg _am_result=GNU 6632e2dd055Smrg ;; 6642e2dd055Smrgesac 665a966c04fSmrg# Now try BSD make style include. 666a966c04fSmrgif test "$am__include" = "#"; then 667a966c04fSmrg echo '.include "confinc"' > confmf 6682e2dd055Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 6692e2dd055Smrg *the\ am__doit\ target*) 6702e2dd055Smrg am__include=.include 6712e2dd055Smrg am__quote="\"" 6722e2dd055Smrg _am_result=BSD 6732e2dd055Smrg ;; 6742e2dd055Smrg esac 675a966c04fSmrgfi 676a966c04fSmrgAC_SUBST([am__include]) 677a966c04fSmrgAC_SUBST([am__quote]) 678a966c04fSmrgAC_MSG_RESULT([$_am_result]) 679a966c04fSmrgrm -f confinc confmf 680a966c04fSmrg]) 681a966c04fSmrg 682a966c04fSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 683a966c04fSmrg 6842e2dd055Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 685a966c04fSmrg# Free Software Foundation, Inc. 686a966c04fSmrg# 687a966c04fSmrg# This file is free software; the Free Software Foundation 688a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 689a966c04fSmrg# with or without modifications, as long as this notice is preserved. 690a966c04fSmrg 6912e2dd055Smrg# serial 6 692a966c04fSmrg 693a966c04fSmrg# AM_MISSING_PROG(NAME, PROGRAM) 694a966c04fSmrg# ------------------------------ 695a966c04fSmrgAC_DEFUN([AM_MISSING_PROG], 696a966c04fSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 697a966c04fSmrg$1=${$1-"${am_missing_run}$2"} 698a966c04fSmrgAC_SUBST($1)]) 699a966c04fSmrg 700a966c04fSmrg 701a966c04fSmrg# AM_MISSING_HAS_RUN 702a966c04fSmrg# ------------------ 703a966c04fSmrg# Define MISSING if not defined so far and test if it supports --run. 704a966c04fSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 705a966c04fSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 706a966c04fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 707a966c04fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7082e2dd055Smrgif test x"${MISSING+set}" != xset; then 7092e2dd055Smrg case $am_aux_dir in 7102e2dd055Smrg *\ * | *\ *) 7112e2dd055Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7122e2dd055Smrg *) 7132e2dd055Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7142e2dd055Smrg esac 7152e2dd055Smrgfi 716a966c04fSmrg# Use eval to expand $SHELL 717a966c04fSmrgif eval "$MISSING --run true"; then 718a966c04fSmrg am_missing_run="$MISSING --run " 719a966c04fSmrgelse 720a966c04fSmrg am_missing_run= 721a966c04fSmrg AC_MSG_WARN([`missing' script is too old or missing]) 722a966c04fSmrgfi 723a966c04fSmrg]) 724a966c04fSmrg 725a966c04fSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 726a966c04fSmrg# 727a966c04fSmrg# This file is free software; the Free Software Foundation 728a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 729a966c04fSmrg# with or without modifications, as long as this notice is preserved. 730a966c04fSmrg 731a966c04fSmrg# AM_PROG_MKDIR_P 732a966c04fSmrg# --------------- 733a966c04fSmrg# Check for `mkdir -p'. 734a966c04fSmrgAC_DEFUN([AM_PROG_MKDIR_P], 735a966c04fSmrg[AC_PREREQ([2.60])dnl 736a966c04fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 737a966c04fSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 738a966c04fSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 739a966c04fSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 740a966c04fSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 741a966c04fSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 742a966c04fSmrgdnl adjustment using top_builddir (which is defined more often than 743a966c04fSmrgdnl MKDIR_P). 744a966c04fSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 745a966c04fSmrgcase $mkdir_p in 746a966c04fSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 747a966c04fSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 748a966c04fSmrgesac 749a966c04fSmrg]) 750a966c04fSmrg 751a966c04fSmrg# Helper functions for option handling. -*- Autoconf -*- 752a966c04fSmrg 7532e2dd055Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 754a966c04fSmrg# 755a966c04fSmrg# This file is free software; the Free Software Foundation 756a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 757a966c04fSmrg# with or without modifications, as long as this notice is preserved. 758a966c04fSmrg 7592e2dd055Smrg# serial 4 760a966c04fSmrg 761a966c04fSmrg# _AM_MANGLE_OPTION(NAME) 762a966c04fSmrg# ----------------------- 763a966c04fSmrgAC_DEFUN([_AM_MANGLE_OPTION], 764a966c04fSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 765a966c04fSmrg 766a966c04fSmrg# _AM_SET_OPTION(NAME) 767a966c04fSmrg# ------------------------------ 768a966c04fSmrg# Set option NAME. Presently that only means defining a flag for this option. 769a966c04fSmrgAC_DEFUN([_AM_SET_OPTION], 770a966c04fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 771a966c04fSmrg 772a966c04fSmrg# _AM_SET_OPTIONS(OPTIONS) 773a966c04fSmrg# ---------------------------------- 774a966c04fSmrg# OPTIONS is a space-separated list of Automake options. 775a966c04fSmrgAC_DEFUN([_AM_SET_OPTIONS], 7762e2dd055Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 777a966c04fSmrg 778a966c04fSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 779a966c04fSmrg# ------------------------------------------- 780a966c04fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 781a966c04fSmrgAC_DEFUN([_AM_IF_OPTION], 782a966c04fSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 783a966c04fSmrg 784a966c04fSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 785a966c04fSmrg 7862e2dd055Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 787a966c04fSmrg# Free Software Foundation, Inc. 788a966c04fSmrg# 789a966c04fSmrg# This file is free software; the Free Software Foundation 790a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 791a966c04fSmrg# with or without modifications, as long as this notice is preserved. 792a966c04fSmrg 7932e2dd055Smrg# serial 5 794a966c04fSmrg 795a966c04fSmrg# AM_SANITY_CHECK 796a966c04fSmrg# --------------- 797a966c04fSmrgAC_DEFUN([AM_SANITY_CHECK], 798a966c04fSmrg[AC_MSG_CHECKING([whether build environment is sane]) 799a966c04fSmrg# Just in case 800a966c04fSmrgsleep 1 801a966c04fSmrgecho timestamp > conftest.file 8022e2dd055Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8032e2dd055Smrg# name. Accept space and tab only in the latter. 8042e2dd055Smrgam_lf=' 8052e2dd055Smrg' 8062e2dd055Smrgcase `pwd` in 8072e2dd055Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8082e2dd055Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8092e2dd055Smrgesac 8102e2dd055Smrgcase $srcdir in 8112e2dd055Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8122e2dd055Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8132e2dd055Smrgesac 8142e2dd055Smrg 815a966c04fSmrg# Do `set' in a subshell so we don't clobber the current shell's 816a966c04fSmrg# arguments. Must try -L first in case configure is actually a 817a966c04fSmrg# symlink; some systems play weird games with the mod time of symlinks 818a966c04fSmrg# (eg FreeBSD returns the mod time of the symlink's containing 819a966c04fSmrg# directory). 820a966c04fSmrgif ( 8212e2dd055Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 822a966c04fSmrg if test "$[*]" = "X"; then 823a966c04fSmrg # -L didn't work. 8242e2dd055Smrg set X `ls -t "$srcdir/configure" conftest.file` 825a966c04fSmrg fi 826a966c04fSmrg rm -f conftest.file 827a966c04fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 828a966c04fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 829a966c04fSmrg 830a966c04fSmrg # If neither matched, then we have a broken ls. This can happen 831a966c04fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 832a966c04fSmrg # broken ls alias from the environment. This has actually 833a966c04fSmrg # happened. Such a system could not be considered "sane". 834a966c04fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 835a966c04fSmrgalias in your environment]) 836a966c04fSmrg fi 837a966c04fSmrg 838a966c04fSmrg test "$[2]" = conftest.file 839a966c04fSmrg ) 840a966c04fSmrgthen 841a966c04fSmrg # Ok. 842a966c04fSmrg : 843a966c04fSmrgelse 844a966c04fSmrg AC_MSG_ERROR([newly created file is older than distributed files! 845a966c04fSmrgCheck your system clock]) 846a966c04fSmrgfi 847a966c04fSmrgAC_MSG_RESULT(yes)]) 848a966c04fSmrg 8492e2dd055Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 8502e2dd055Smrg# 8512e2dd055Smrg# This file is free software; the Free Software Foundation 8522e2dd055Smrg# gives unlimited permission to copy and/or distribute it, 8532e2dd055Smrg# with or without modifications, as long as this notice is preserved. 8542e2dd055Smrg 8552e2dd055Smrg# serial 1 8562e2dd055Smrg 8572e2dd055Smrg# AM_SILENT_RULES([DEFAULT]) 8582e2dd055Smrg# -------------------------- 8592e2dd055Smrg# Enable less verbose build rules; with the default set to DEFAULT 8602e2dd055Smrg# (`yes' being less verbose, `no' or empty being verbose). 8612e2dd055SmrgAC_DEFUN([AM_SILENT_RULES], 8622e2dd055Smrg[AC_ARG_ENABLE([silent-rules], 8632e2dd055Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 8642e2dd055Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 8652e2dd055Smrgcase $enable_silent_rules in 8662e2dd055Smrgyes) AM_DEFAULT_VERBOSITY=0;; 8672e2dd055Smrgno) AM_DEFAULT_VERBOSITY=1;; 8682e2dd055Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8692e2dd055Smrgesac 8702e2dd055SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8712e2dd055SmrgAM_BACKSLASH='\' 8722e2dd055SmrgAC_SUBST([AM_BACKSLASH])dnl 8732e2dd055Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 8742e2dd055Smrg]) 8752e2dd055Smrg 876a966c04fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 877a966c04fSmrg# 878a966c04fSmrg# This file is free software; the Free Software Foundation 879a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 880a966c04fSmrg# with or without modifications, as long as this notice is preserved. 881a966c04fSmrg 882a966c04fSmrg# AM_PROG_INSTALL_STRIP 883a966c04fSmrg# --------------------- 884a966c04fSmrg# One issue with vendor `install' (even GNU) is that you can't 885a966c04fSmrg# specify the program used to strip binaries. This is especially 886a966c04fSmrg# annoying in cross-compiling environments, where the build's strip 887a966c04fSmrg# is unlikely to handle the host's binaries. 888a966c04fSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 889a966c04fSmrg# always use install-sh in `make install-strip', and initialize 890a966c04fSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 891a966c04fSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 892a966c04fSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 893a966c04fSmrg# Installed binaries are usually stripped using `strip' when the user 894a966c04fSmrg# run `make install-strip'. However `strip' might not be the right 895a966c04fSmrg# tool to use in cross-compilation environments, therefore Automake 896a966c04fSmrg# will honor the `STRIP' environment variable to overrule this program. 897a966c04fSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 898a966c04fSmrgif test "$cross_compiling" != no; then 899a966c04fSmrg AC_CHECK_TOOL([STRIP], [strip], :) 900a966c04fSmrgfi 901a966c04fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 902a966c04fSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 903a966c04fSmrg 9042e2dd055Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 905a966c04fSmrg# 906a966c04fSmrg# This file is free software; the Free Software Foundation 907a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 908a966c04fSmrg# with or without modifications, as long as this notice is preserved. 909a966c04fSmrg 9102e2dd055Smrg# serial 2 9112e2dd055Smrg 912a966c04fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 913a966c04fSmrg# --------------------------- 9142e2dd055Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 915a966c04fSmrg# This macro is traced by Automake. 916a966c04fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 917a966c04fSmrg 9182e2dd055Smrg# AM_SUBST_NOTMAKE(VARIABLE) 9192e2dd055Smrg# --------------------------- 9202e2dd055Smrg# Public sister of _AM_SUBST_NOTMAKE. 9212e2dd055SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9222e2dd055Smrg 923a966c04fSmrg# Check how to create a tarball. -*- Autoconf -*- 924a966c04fSmrg 925a966c04fSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 926a966c04fSmrg# 927a966c04fSmrg# This file is free software; the Free Software Foundation 928a966c04fSmrg# gives unlimited permission to copy and/or distribute it, 929a966c04fSmrg# with or without modifications, as long as this notice is preserved. 930a966c04fSmrg 931a966c04fSmrg# serial 2 932a966c04fSmrg 933a966c04fSmrg# _AM_PROG_TAR(FORMAT) 934a966c04fSmrg# -------------------- 935a966c04fSmrg# Check how to create a tarball in format FORMAT. 936a966c04fSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 937a966c04fSmrg# 938a966c04fSmrg# Substitute a variable $(am__tar) that is a command 939a966c04fSmrg# writing to stdout a FORMAT-tarball containing the directory 940a966c04fSmrg# $tardir. 941a966c04fSmrg# tardir=directory && $(am__tar) > result.tar 942a966c04fSmrg# 943a966c04fSmrg# Substitute a variable $(am__untar) that extract such 944a966c04fSmrg# a tarball read from stdin. 945a966c04fSmrg# $(am__untar) < result.tar 946a966c04fSmrgAC_DEFUN([_AM_PROG_TAR], 947a966c04fSmrg[# Always define AMTAR for backward compatibility. 948a966c04fSmrgAM_MISSING_PROG([AMTAR], [tar]) 949a966c04fSmrgm4_if([$1], [v7], 950a966c04fSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 951a966c04fSmrg [m4_case([$1], [ustar],, [pax],, 952a966c04fSmrg [m4_fatal([Unknown tar format])]) 953a966c04fSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 954a966c04fSmrg# Loop over all known methods to create a tar archive until one works. 955a966c04fSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 956a966c04fSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 957a966c04fSmrg# Do not fold the above two line into one, because Tru64 sh and 958a966c04fSmrg# Solaris sh will not grok spaces in the rhs of `-'. 959a966c04fSmrgfor _am_tool in $_am_tools 960a966c04fSmrgdo 961a966c04fSmrg case $_am_tool in 962a966c04fSmrg gnutar) 963a966c04fSmrg for _am_tar in tar gnutar gtar; 964a966c04fSmrg do 965a966c04fSmrg AM_RUN_LOG([$_am_tar --version]) && break 966a966c04fSmrg done 967a966c04fSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 968a966c04fSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 969a966c04fSmrg am__untar="$_am_tar -xf -" 970a966c04fSmrg ;; 971a966c04fSmrg plaintar) 972a966c04fSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 973a966c04fSmrg # ustar tarball either. 974a966c04fSmrg (tar --version) >/dev/null 2>&1 && continue 975a966c04fSmrg am__tar='tar chf - "$$tardir"' 976a966c04fSmrg am__tar_='tar chf - "$tardir"' 977a966c04fSmrg am__untar='tar xf -' 978a966c04fSmrg ;; 979a966c04fSmrg pax) 980a966c04fSmrg am__tar='pax -L -x $1 -w "$$tardir"' 981a966c04fSmrg am__tar_='pax -L -x $1 -w "$tardir"' 982a966c04fSmrg am__untar='pax -r' 983a966c04fSmrg ;; 984a966c04fSmrg cpio) 985a966c04fSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 986a966c04fSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 987a966c04fSmrg am__untar='cpio -i -H $1 -d' 988a966c04fSmrg ;; 989a966c04fSmrg none) 990a966c04fSmrg am__tar=false 991a966c04fSmrg am__tar_=false 992a966c04fSmrg am__untar=false 993a966c04fSmrg ;; 994a966c04fSmrg esac 995a966c04fSmrg 996a966c04fSmrg # If the value was cached, stop now. We just wanted to have am__tar 997a966c04fSmrg # and am__untar set. 998a966c04fSmrg test -n "${am_cv_prog_tar_$1}" && break 999a966c04fSmrg 1000a966c04fSmrg # tar/untar a dummy directory, and stop if the command works 1001a966c04fSmrg rm -rf conftest.dir 1002a966c04fSmrg mkdir conftest.dir 1003a966c04fSmrg echo GrepMe > conftest.dir/file 1004a966c04fSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1005a966c04fSmrg rm -rf conftest.dir 1006a966c04fSmrg if test -s conftest.tar; then 1007a966c04fSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1008a966c04fSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1009a966c04fSmrg fi 1010a966c04fSmrgdone 1011a966c04fSmrgrm -rf conftest.dir 1012a966c04fSmrg 1013a966c04fSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1014a966c04fSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1015a966c04fSmrgAC_SUBST([am__tar]) 1016a966c04fSmrgAC_SUBST([am__untar]) 1017a966c04fSmrg]) # _AM_PROG_TAR 1018a966c04fSmrg 10196e7d3316Smrgm4_include([m4/ax_define_dir.m4]) 102097cf2ee2Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 102197cf2ee2Smrg# 102297cf2ee2Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1023a966c04fSmrg# 102497cf2ee2Smrg# This program is free software; you can redistribute it and/or modify 102597cf2ee2Smrg# it under the terms of the GNU General Public License as published by 102697cf2ee2Smrg# the Free Software Foundation; either version 2 of the License, or 102797cf2ee2Smrg# (at your option) any later version. 1028a966c04fSmrg# 102997cf2ee2Smrg# This program is distributed in the hope that it will be useful, but 103097cf2ee2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 103197cf2ee2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 103297cf2ee2Smrg# General Public License for more details. 1033a966c04fSmrg# 103497cf2ee2Smrg# You should have received a copy of the GNU General Public License 103597cf2ee2Smrg# along with this program; if not, write to the Free Software 103697cf2ee2Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1037a966c04fSmrg# 103897cf2ee2Smrg# As a special exception to the GNU General Public License, if you 103997cf2ee2Smrg# distribute this file as part of a program that contains a 104097cf2ee2Smrg# configuration script generated by Autoconf, you may include it under 104197cf2ee2Smrg# the same distribution terms that you use for the rest of that program. 1042a966c04fSmrg 104397cf2ee2Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 104497cf2ee2Smrg# ---------------------------------- 104597cf2ee2SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 104697cf2ee2Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 104797cf2ee2Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 104897cf2ee2SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 104997cf2ee2Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 105097cf2ee2Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1051a966c04fSmrgfi 105297cf2ee2Smrgif test -n "$PKG_CONFIG"; then 105397cf2ee2Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 105497cf2ee2Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 105597cf2ee2Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1056a966c04fSmrg AC_MSG_RESULT([yes]) 1057a966c04fSmrg else 105897cf2ee2Smrg AC_MSG_RESULT([no]) 105997cf2ee2Smrg PKG_CONFIG="" 1060a966c04fSmrg fi 106197cf2ee2Smrg 106297cf2ee2Smrgfi[]dnl 106397cf2ee2Smrg])# PKG_PROG_PKG_CONFIG 1064a966c04fSmrg 106597cf2ee2Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1066a966c04fSmrg# 106797cf2ee2Smrg# Check to see whether a particular set of modules exists. Similar 106897cf2ee2Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 106997cf2ee2Smrg# 107097cf2ee2Smrg# 107197cf2ee2Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 107297cf2ee2Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 107397cf2ee2Smrg# PKG_CHECK_EXISTS manually 107497cf2ee2Smrg# -------------------------------------------------------------- 107597cf2ee2SmrgAC_DEFUN([PKG_CHECK_EXISTS], 107697cf2ee2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 107797cf2ee2Smrgif test -n "$PKG_CONFIG" && \ 107897cf2ee2Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 107997cf2ee2Smrg m4_ifval([$2], [$2], [:]) 108097cf2ee2Smrgm4_ifvaln([$3], [else 108197cf2ee2Smrg $3])dnl 108297cf2ee2Smrgfi]) 1083a966c04fSmrg 1084a966c04fSmrg 108597cf2ee2Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 108697cf2ee2Smrg# --------------------------------------------- 108797cf2ee2Smrgm4_define([_PKG_CONFIG], 108897cf2ee2Smrg[if test -n "$$1"; then 108997cf2ee2Smrg pkg_cv_[]$1="$$1" 109097cf2ee2Smrg elif test -n "$PKG_CONFIG"; then 109197cf2ee2Smrg PKG_CHECK_EXISTS([$3], 109297cf2ee2Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 109397cf2ee2Smrg [pkg_failed=yes]) 109497cf2ee2Smrg else 109597cf2ee2Smrg pkg_failed=untried 109697cf2ee2Smrgfi[]dnl 109797cf2ee2Smrg])# _PKG_CONFIG 1098a966c04fSmrg 109997cf2ee2Smrg# _PKG_SHORT_ERRORS_SUPPORTED 110097cf2ee2Smrg# ----------------------------- 110197cf2ee2SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 110297cf2ee2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110397cf2ee2Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 110497cf2ee2Smrg _pkg_short_errors_supported=yes 110597cf2ee2Smrgelse 110697cf2ee2Smrg _pkg_short_errors_supported=no 110797cf2ee2Smrgfi[]dnl 110897cf2ee2Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 1109a966c04fSmrg 1110a966c04fSmrg 111197cf2ee2Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 111297cf2ee2Smrg# [ACTION-IF-NOT-FOUND]) 111397cf2ee2Smrg# 111497cf2ee2Smrg# 111597cf2ee2Smrg# Note that if there is a possibility the first call to 111697cf2ee2Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 111797cf2ee2Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 111897cf2ee2Smrg# 111997cf2ee2Smrg# 112097cf2ee2Smrg# -------------------------------------------------------------- 112197cf2ee2SmrgAC_DEFUN([PKG_CHECK_MODULES], 112297cf2ee2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 112397cf2ee2SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 112497cf2ee2SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1125a966c04fSmrg 112697cf2ee2Smrgpkg_failed=no 112797cf2ee2SmrgAC_MSG_CHECKING([for $1]) 1128a966c04fSmrg 112997cf2ee2Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 113097cf2ee2Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1131a966c04fSmrg 113297cf2ee2Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 113397cf2ee2Smrgand $1[]_LIBS to avoid the need to call pkg-config. 113497cf2ee2SmrgSee the pkg-config man page for more details.]) 11356e7d3316Smrg 113697cf2ee2Smrgif test $pkg_failed = yes; then 113797cf2ee2Smrg _PKG_SHORT_ERRORS_SUPPORTED 113897cf2ee2Smrg if test $_pkg_short_errors_supported = yes; then 113997cf2ee2Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 114097cf2ee2Smrg else 114197cf2ee2Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 114297cf2ee2Smrg fi 114397cf2ee2Smrg # Put the nasty error message in config.log where it belongs 114497cf2ee2Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 11456e7d3316Smrg 114697cf2ee2Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 114797cf2ee2Smrg[Package requirements ($2) were not met: 11486e7d3316Smrg 114997cf2ee2Smrg$$1_PKG_ERRORS 11506e7d3316Smrg 115197cf2ee2SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 115297cf2ee2Smrginstalled software in a non-standard prefix. 1153a966c04fSmrg 115497cf2ee2Smrg_PKG_TEXT 115597cf2ee2Smrg])], 115697cf2ee2Smrg [AC_MSG_RESULT([no]) 115797cf2ee2Smrg $4]) 115897cf2ee2Smrgelif test $pkg_failed = untried; then 115997cf2ee2Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 116097cf2ee2Smrg[The pkg-config script could not be found or is too old. Make sure it 116197cf2ee2Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 116297cf2ee2Smrgpath to pkg-config. 1163a966c04fSmrg 116497cf2ee2Smrg_PKG_TEXT 1165a966c04fSmrg 116697cf2ee2SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 116797cf2ee2Smrg [$4]) 1168a966c04fSmrgelse 116997cf2ee2Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 117097cf2ee2Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 117197cf2ee2Smrg AC_MSG_RESULT([yes]) 117297cf2ee2Smrg ifelse([$3], , :, [$3]) 117397cf2ee2Smrgfi[]dnl 117497cf2ee2Smrg])# PKG_CHECK_MODULES 1175a966c04fSmrg 117697cf2ee2Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 117797cf2ee2Smrg# 117897cf2ee2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 117997cf2ee2Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 118097cf2ee2Smrg# Inc. 118197cf2ee2Smrg# Written by Gordon Matzigkeit, 1996 118297cf2ee2Smrg# 118397cf2ee2Smrg# This file is free software; the Free Software Foundation gives 118497cf2ee2Smrg# unlimited permission to copy and/or distribute it, with or without 118597cf2ee2Smrg# modifications, as long as this notice is preserved. 1186a966c04fSmrg 118797cf2ee2Smrgm4_define([_LT_COPYING], [dnl 118897cf2ee2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 118997cf2ee2Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 119097cf2ee2Smrg# Inc. 119197cf2ee2Smrg# Written by Gordon Matzigkeit, 1996 119297cf2ee2Smrg# 119397cf2ee2Smrg# This file is part of GNU Libtool. 119497cf2ee2Smrg# 119597cf2ee2Smrg# GNU Libtool is free software; you can redistribute it and/or 119697cf2ee2Smrg# modify it under the terms of the GNU General Public License as 119797cf2ee2Smrg# published by the Free Software Foundation; either version 2 of 119897cf2ee2Smrg# the License, or (at your option) any later version. 119997cf2ee2Smrg# 120097cf2ee2Smrg# As a special exception to the GNU General Public License, 120197cf2ee2Smrg# if you distribute this file as part of a program or library that 120297cf2ee2Smrg# is built using GNU Libtool, you may include this file under the 120397cf2ee2Smrg# same distribution terms that you use for the rest of that program. 120497cf2ee2Smrg# 120597cf2ee2Smrg# GNU Libtool is distributed in the hope that it will be useful, 120697cf2ee2Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 120797cf2ee2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 120897cf2ee2Smrg# GNU General Public License for more details. 120997cf2ee2Smrg# 121097cf2ee2Smrg# You should have received a copy of the GNU General Public License 121197cf2ee2Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 121297cf2ee2Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 121397cf2ee2Smrg# obtained by writing to the Free Software Foundation, Inc., 121497cf2ee2Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 121597cf2ee2Smrg]) 1216a966c04fSmrg 121797cf2ee2Smrg# serial 57 LT_INIT 1218a966c04fSmrg 1219a966c04fSmrg 122097cf2ee2Smrg# LT_PREREQ(VERSION) 122197cf2ee2Smrg# ------------------ 122297cf2ee2Smrg# Complain and exit if this libtool version is less that VERSION. 122397cf2ee2Smrgm4_defun([LT_PREREQ], 122497cf2ee2Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 122597cf2ee2Smrg [m4_default([$3], 122697cf2ee2Smrg [m4_fatal([Libtool version $1 or higher is required], 122797cf2ee2Smrg 63)])], 122897cf2ee2Smrg [$2])]) 1229a966c04fSmrg 1230a966c04fSmrg 123197cf2ee2Smrg# _LT_CHECK_BUILDDIR 123297cf2ee2Smrg# ------------------ 123397cf2ee2Smrg# Complain if the absolute build directory name contains unusual characters 123497cf2ee2Smrgm4_defun([_LT_CHECK_BUILDDIR], 123597cf2ee2Smrg[case `pwd` in 123697cf2ee2Smrg *\ * | *\ *) 123797cf2ee2Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 123897cf2ee2Smrgesac 123997cf2ee2Smrg]) 1240a966c04fSmrg 1241a966c04fSmrg 124297cf2ee2Smrg# LT_INIT([OPTIONS]) 124397cf2ee2Smrg# ------------------ 124497cf2ee2SmrgAC_DEFUN([LT_INIT], 124597cf2ee2Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 124697cf2ee2SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 124797cf2ee2SmrgAC_BEFORE([$0], [LT_LANG])dnl 124897cf2ee2SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 124997cf2ee2SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 125097cf2ee2Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 12516e7d3316Smrg 125297cf2ee2Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 125397cf2ee2Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 125497cf2ee2Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 125597cf2ee2Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 125697cf2ee2Smrgdnl unless we require an AC_DEFUNed macro: 125797cf2ee2SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 125897cf2ee2SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 125997cf2ee2SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 126097cf2ee2SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 126197cf2ee2Smrgm4_require([_LT_PROG_LTMAIN])dnl 1262a966c04fSmrg 126397cf2ee2Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1264a966c04fSmrg 126597cf2ee2Smrgdnl Parse OPTIONS 126697cf2ee2Smrg_LT_SET_OPTIONS([$0], [$1]) 1267a966c04fSmrg 126897cf2ee2Smrg# This can be used to rebuild libtool when needed 126997cf2ee2SmrgLIBTOOL_DEPS="$ltmain" 1270a966c04fSmrg 127197cf2ee2Smrg# Always use our own libtool. 127297cf2ee2SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 127397cf2ee2SmrgAC_SUBST(LIBTOOL)dnl 1274a966c04fSmrg 127597cf2ee2Smrg_LT_SETUP 1276a966c04fSmrg 127797cf2ee2Smrg# Only expand once: 127897cf2ee2Smrgm4_define([LT_INIT]) 127997cf2ee2Smrg])# LT_INIT 1280a966c04fSmrg 128197cf2ee2Smrg# Old names: 128297cf2ee2SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 128397cf2ee2SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 128497cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 128597cf2ee2Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 128697cf2ee2Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1287a966c04fSmrg 12886e7d3316Smrg 128997cf2ee2Smrg# _LT_CC_BASENAME(CC) 129097cf2ee2Smrg# ------------------- 129197cf2ee2Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 129297cf2ee2Smrgm4_defun([_LT_CC_BASENAME], 129397cf2ee2Smrg[for cc_temp in $1""; do 129497cf2ee2Smrg case $cc_temp in 129597cf2ee2Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 129697cf2ee2Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 129797cf2ee2Smrg \-*) ;; 129897cf2ee2Smrg *) break;; 129997cf2ee2Smrg esac 130097cf2ee2Smrgdone 130197cf2ee2Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 130297cf2ee2Smrg]) 13036e7d3316Smrg 13046e7d3316Smrg 130597cf2ee2Smrg# _LT_FILEUTILS_DEFAULTS 130697cf2ee2Smrg# ---------------------- 130797cf2ee2Smrg# It is okay to use these file commands and assume they have been set 130897cf2ee2Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 130997cf2ee2Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 131097cf2ee2Smrg[: ${CP="cp -f"} 131197cf2ee2Smrg: ${MV="mv -f"} 131297cf2ee2Smrg: ${RM="rm -f"} 131397cf2ee2Smrg])# _LT_FILEUTILS_DEFAULTS 13146e7d3316Smrg 13156e7d3316Smrg 131697cf2ee2Smrg# _LT_SETUP 131797cf2ee2Smrg# --------- 131897cf2ee2Smrgm4_defun([_LT_SETUP], 131997cf2ee2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 132097cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 132197cf2ee2SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 132297cf2ee2SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 132397cf2ee2Smrg 132497cf2ee2Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 132597cf2ee2Smrg_LT_DECL([], [host], [0])dnl 132697cf2ee2Smrg_LT_DECL([], [host_os], [0])dnl 132797cf2ee2Smrgdnl 132897cf2ee2Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 132997cf2ee2Smrg_LT_DECL([], [build], [0])dnl 133097cf2ee2Smrg_LT_DECL([], [build_os], [0])dnl 133197cf2ee2Smrgdnl 133297cf2ee2SmrgAC_REQUIRE([AC_PROG_CC])dnl 133397cf2ee2SmrgAC_REQUIRE([LT_PATH_LD])dnl 133497cf2ee2SmrgAC_REQUIRE([LT_PATH_NM])dnl 133597cf2ee2Smrgdnl 133697cf2ee2SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 133797cf2ee2Smrgtest -z "$LN_S" && LN_S="ln -s" 133897cf2ee2Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 133997cf2ee2Smrgdnl 134097cf2ee2SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 134197cf2ee2Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 134297cf2ee2Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 134397cf2ee2Smrgdnl 134497cf2ee2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 134597cf2ee2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 134697cf2ee2Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 134797cf2ee2Smrgm4_require([_LT_CMD_RELOAD])dnl 134897cf2ee2Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 134997cf2ee2Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 135097cf2ee2Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 135197cf2ee2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 135297cf2ee2Smrgm4_require([_LT_WITH_SYSROOT])dnl 135397cf2ee2Smrg 135497cf2ee2Smrg_LT_CONFIG_LIBTOOL_INIT([ 135597cf2ee2Smrg# See if we are running on zsh, and set the options which allow our 135697cf2ee2Smrg# commands through without removal of \ escapes INIT. 135797cf2ee2Smrgif test -n "\${ZSH_VERSION+set}" ; then 135897cf2ee2Smrg setopt NO_GLOB_SUBST 135997cf2ee2Smrgfi 136097cf2ee2Smrg]) 136197cf2ee2Smrgif test -n "${ZSH_VERSION+set}" ; then 136297cf2ee2Smrg setopt NO_GLOB_SUBST 13636e7d3316Smrgfi 13646e7d3316Smrg 136597cf2ee2Smrg_LT_CHECK_OBJDIR 13666e7d3316Smrg 136797cf2ee2Smrgm4_require([_LT_TAG_COMPILER])dnl 13686e7d3316Smrg 136997cf2ee2Smrgcase $host_os in 137097cf2ee2Smrgaix3*) 137197cf2ee2Smrg # AIX sometimes has problems with the GCC collect2 program. For some 137297cf2ee2Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 137397cf2ee2Smrg # vanish in a puff of smoke. 137497cf2ee2Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 137597cf2ee2Smrg COLLECT_NAMES= 137697cf2ee2Smrg export COLLECT_NAMES 137797cf2ee2Smrg fi 137897cf2ee2Smrg ;; 137997cf2ee2Smrgesac 13806e7d3316Smrg 138197cf2ee2Smrg# Global variables: 138297cf2ee2Smrgofile=libtool 138397cf2ee2Smrgcan_build_shared=yes 13846e7d3316Smrg 138597cf2ee2Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 138697cf2ee2Smrg# which needs '.lib'). 138797cf2ee2Smrglibext=a 13886e7d3316Smrg 138997cf2ee2Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 13906e7d3316Smrg 139197cf2ee2Smrgold_CC="$CC" 139297cf2ee2Smrgold_CFLAGS="$CFLAGS" 13936e7d3316Smrg 139497cf2ee2Smrg# Set sane defaults for various variables 139597cf2ee2Smrgtest -z "$CC" && CC=cc 139697cf2ee2Smrgtest -z "$LTCC" && LTCC=$CC 139797cf2ee2Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 139897cf2ee2Smrgtest -z "$LD" && LD=ld 139997cf2ee2Smrgtest -z "$ac_objext" && ac_objext=o 14006e7d3316Smrg 140197cf2ee2Smrg_LT_CC_BASENAME([$compiler]) 14026e7d3316Smrg 140397cf2ee2Smrg# Only perform the check for file, if the check method requires it 140497cf2ee2Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 140597cf2ee2Smrgcase $deplibs_check_method in 140697cf2ee2Smrgfile_magic*) 140797cf2ee2Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 140897cf2ee2Smrg _LT_PATH_MAGIC 140997cf2ee2Smrg fi 141097cf2ee2Smrg ;; 141197cf2ee2Smrgesac 14126e7d3316Smrg 141397cf2ee2Smrg# Use C for the default configuration in the libtool script 141497cf2ee2SmrgLT_SUPPORTED_TAG([CC]) 141597cf2ee2Smrg_LT_LANG_C_CONFIG 141697cf2ee2Smrg_LT_LANG_DEFAULT_CONFIG 141797cf2ee2Smrg_LT_CONFIG_COMMANDS 141897cf2ee2Smrg])# _LT_SETUP 14196e7d3316Smrg 1420a966c04fSmrg 142197cf2ee2Smrg# _LT_PREPARE_SED_QUOTE_VARS 142297cf2ee2Smrg# -------------------------- 142397cf2ee2Smrg# Define a few sed substitution that help us do robust quoting. 142497cf2ee2Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 142597cf2ee2Smrg[# Backslashify metacharacters that are still active within 142697cf2ee2Smrg# double-quoted strings. 142797cf2ee2Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1428a966c04fSmrg 142997cf2ee2Smrg# Same as above, but do not quote variable references. 143097cf2ee2Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1431a966c04fSmrg 143297cf2ee2Smrg# Sed substitution to delay expansion of an escaped shell variable in a 143397cf2ee2Smrg# double_quote_subst'ed string. 143497cf2ee2Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1435a966c04fSmrg 143697cf2ee2Smrg# Sed substitution to delay expansion of an escaped single quote. 143797cf2ee2Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1438a966c04fSmrg 143997cf2ee2Smrg# Sed substitution to avoid accidental globbing in evaled expressions 144097cf2ee2Smrgno_glob_subst='s/\*/\\\*/g' 144197cf2ee2Smrg]) 14426e7d3316Smrg 144397cf2ee2Smrg# _LT_PROG_LTMAIN 144497cf2ee2Smrg# --------------- 144597cf2ee2Smrg# Note that this code is called both from `configure', and `config.status' 144697cf2ee2Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 144797cf2ee2Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 144897cf2ee2Smrg# so we pass a copy along to make sure it has a sensible value anyway. 144997cf2ee2Smrgm4_defun([_LT_PROG_LTMAIN], 145097cf2ee2Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 145197cf2ee2Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 145297cf2ee2Smrgltmain="$ac_aux_dir/ltmain.sh" 145397cf2ee2Smrg])# _LT_PROG_LTMAIN 14546e7d3316Smrg 14556e7d3316Smrg 1456a966c04fSmrg 145797cf2ee2Smrg# So that we can recreate a full libtool script including additional 145897cf2ee2Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 145997cf2ee2Smrg# in macros and then make a single call at the end using the `libtool' 146097cf2ee2Smrg# label. 1461a966c04fSmrg 1462a966c04fSmrg 146397cf2ee2Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 146497cf2ee2Smrg# ---------------------------------------- 146597cf2ee2Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 146697cf2ee2Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 146797cf2ee2Smrg[m4_ifval([$1], 146897cf2ee2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 146997cf2ee2Smrg [$1 147097cf2ee2Smrg])])]) 1471a966c04fSmrg 147297cf2ee2Smrg# Initialize. 147397cf2ee2Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 14746e7d3316Smrg 14756e7d3316Smrg 147697cf2ee2Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 147797cf2ee2Smrg# ------------------------------ 147897cf2ee2Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 147997cf2ee2Smrgm4_define([_LT_CONFIG_LIBTOOL], 148097cf2ee2Smrg[m4_ifval([$1], 148197cf2ee2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 148297cf2ee2Smrg [$1 148397cf2ee2Smrg])])]) 1484a966c04fSmrg 148597cf2ee2Smrg# Initialize. 148697cf2ee2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1487a966c04fSmrg 14882e2dd055Smrg 148997cf2ee2Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 149097cf2ee2Smrg# ----------------------------------------------------- 149197cf2ee2Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 149297cf2ee2Smrg[_LT_CONFIG_LIBTOOL([$1]) 149397cf2ee2Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 149497cf2ee2Smrg]) 14952e2dd055Smrg 14962e2dd055Smrg 149797cf2ee2Smrg# _LT_FORMAT_COMMENT([COMMENT]) 149897cf2ee2Smrg# ----------------------------- 149997cf2ee2Smrg# Add leading comment marks to the start of each line, and a trailing 150097cf2ee2Smrg# full-stop to the whole comment if one is not present already. 150197cf2ee2Smrgm4_define([_LT_FORMAT_COMMENT], 150297cf2ee2Smrg[m4_ifval([$1], [ 150397cf2ee2Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 150497cf2ee2Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 150597cf2ee2Smrg)]) 15066e7d3316Smrg 1507a966c04fSmrg 150897cf2ee2Smrg 150997cf2ee2Smrg 151097cf2ee2Smrg 151197cf2ee2Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 151297cf2ee2Smrg# ------------------------------------------------------------------- 151397cf2ee2Smrg# CONFIGNAME is the name given to the value in the libtool script. 151497cf2ee2Smrg# VARNAME is the (base) name used in the configure script. 151597cf2ee2Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 151697cf2ee2Smrg# VARNAME. Any other value will be used directly. 151797cf2ee2Smrgm4_define([_LT_DECL], 151897cf2ee2Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 151997cf2ee2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 152097cf2ee2Smrg [m4_ifval([$1], [$1], [$2])]) 152197cf2ee2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 152297cf2ee2Smrg m4_ifval([$4], 152397cf2ee2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 152497cf2ee2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 152597cf2ee2Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 1526a966c04fSmrg]) 1527a966c04fSmrg 15282e2dd055Smrg 152997cf2ee2Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 153097cf2ee2Smrg# -------------------------------------------------------- 153197cf2ee2Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1532a966c04fSmrg 1533a966c04fSmrg 153497cf2ee2Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 153597cf2ee2Smrg# ------------------------------------------------ 153697cf2ee2Smrgm4_define([lt_decl_tag_varnames], 153797cf2ee2Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 1538a966c04fSmrg 1539a966c04fSmrg 154097cf2ee2Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 154197cf2ee2Smrg# --------------------------------------------------------- 154297cf2ee2Smrgm4_define([_lt_decl_filter], 154397cf2ee2Smrg[m4_case([$#], 154497cf2ee2Smrg [0], [m4_fatal([$0: too few arguments: $#])], 154597cf2ee2Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 154697cf2ee2Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 154797cf2ee2Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 154897cf2ee2Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 154997cf2ee2Smrg]) 1550a966c04fSmrg 1551a966c04fSmrg 155297cf2ee2Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 155397cf2ee2Smrg# -------------------------------------------------- 155497cf2ee2Smrgm4_define([lt_decl_quote_varnames], 155597cf2ee2Smrg[_lt_decl_filter([value], [1], $@)]) 1556a966c04fSmrg 15576e7d3316Smrg 155897cf2ee2Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 155997cf2ee2Smrg# --------------------------------------------------- 156097cf2ee2Smrgm4_define([lt_decl_dquote_varnames], 156197cf2ee2Smrg[_lt_decl_filter([value], [2], $@)]) 1562a966c04fSmrg 1563a966c04fSmrg 156497cf2ee2Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 156597cf2ee2Smrg# --------------------------------------------------- 156697cf2ee2Smrgm4_define([lt_decl_varnames_tagged], 156797cf2ee2Smrg[m4_assert([$# <= 2])dnl 156897cf2ee2Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 156997cf2ee2Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 157097cf2ee2Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 157197cf2ee2Smrgm4_define([_lt_decl_varnames_tagged], 157297cf2ee2Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 15736e7d3316Smrg 15746e7d3316Smrg 157597cf2ee2Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 157697cf2ee2Smrg# ------------------------------------------------ 157797cf2ee2Smrgm4_define([lt_decl_all_varnames], 157897cf2ee2Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 157997cf2ee2Smrg m4_if([$2], [], 158097cf2ee2Smrg m4_quote(lt_decl_varnames), 158197cf2ee2Smrg m4_quote(m4_shift($@))))[]dnl 158297cf2ee2Smrg]) 158397cf2ee2Smrgm4_define([_lt_decl_all_varnames], 158497cf2ee2Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 158597cf2ee2Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 158697cf2ee2Smrg]) 15876e7d3316Smrg 15886e7d3316Smrg 158997cf2ee2Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 159097cf2ee2Smrg# ------------------------------------ 159197cf2ee2Smrg# Quote a variable value, and forward it to `config.status' so that its 159297cf2ee2Smrg# declaration there will have the same value as in `configure'. VARNAME 159397cf2ee2Smrg# must have a single quote delimited value for this to work. 159497cf2ee2Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 159597cf2ee2Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 15966e7d3316Smrg 15976e7d3316Smrg 159897cf2ee2Smrg# _LT_CONFIG_STATUS_DECLARATIONS 159997cf2ee2Smrg# ------------------------------ 160097cf2ee2Smrg# We delimit libtool config variables with single quotes, so when 160197cf2ee2Smrg# we write them to config.status, we have to be sure to quote all 160297cf2ee2Smrg# embedded single quotes properly. In configure, this macro expands 160397cf2ee2Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 160497cf2ee2Smrg# 160597cf2ee2Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 160697cf2ee2Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 160797cf2ee2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 160897cf2ee2Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 16096e7d3316Smrg 16106e7d3316Smrg 161197cf2ee2Smrg# _LT_LIBTOOL_TAGS 161297cf2ee2Smrg# ---------------- 161397cf2ee2Smrg# Output comment and list of tags supported by the script 161497cf2ee2Smrgm4_defun([_LT_LIBTOOL_TAGS], 161597cf2ee2Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 161697cf2ee2Smrgavailable_tags="_LT_TAGS"dnl 161797cf2ee2Smrg]) 16186e7d3316Smrg 161997cf2ee2Smrg 162097cf2ee2Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 162197cf2ee2Smrg# ----------------------------------- 162297cf2ee2Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 162397cf2ee2Smrg# expand to a commented shell variable setting: 16246e7d3316Smrg# 162597cf2ee2Smrg# # Some comment about what VAR is for. 162697cf2ee2Smrg# visible_name=$lt_internal_name 162797cf2ee2Smrgm4_define([_LT_LIBTOOL_DECLARE], 162897cf2ee2Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 162997cf2ee2Smrg [description])))[]dnl 163097cf2ee2Smrgm4_pushdef([_libtool_name], 163197cf2ee2Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 163297cf2ee2Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 163397cf2ee2Smrg [0], [_libtool_name=[$]$1], 163497cf2ee2Smrg [1], [_libtool_name=$lt_[]$1], 163597cf2ee2Smrg [2], [_libtool_name=$lt_[]$1], 163697cf2ee2Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 163797cf2ee2Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 16386e7d3316Smrg]) 16396e7d3316Smrg 16406e7d3316Smrg 164197cf2ee2Smrg# _LT_LIBTOOL_CONFIG_VARS 164297cf2ee2Smrg# ----------------------- 164397cf2ee2Smrg# Produce commented declarations of non-tagged libtool config variables 164497cf2ee2Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 164597cf2ee2Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 164697cf2ee2Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 164797cf2ee2Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 164897cf2ee2Smrg[m4_foreach([_lt_var], 164997cf2ee2Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 165097cf2ee2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 16516e7d3316Smrg 16526e7d3316Smrg 165397cf2ee2Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 165497cf2ee2Smrg# ------------------------- 165597cf2ee2Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 165697cf2ee2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 165797cf2ee2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 16586e7d3316Smrg 16596e7d3316Smrg 166097cf2ee2Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 166197cf2ee2Smrg# ------------------------------ 166297cf2ee2Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 16636e7d3316Smrg 16646e7d3316Smrg 166597cf2ee2Smrg# _LT_CONFIG_COMMANDS 166697cf2ee2Smrg# ------------------- 166797cf2ee2Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 166897cf2ee2Smrg# variables for single and double quote escaping we saved from calls 166997cf2ee2Smrg# to _LT_DECL, we can put quote escaped variables declarations 167097cf2ee2Smrg# into `config.status', and then the shell code to quote escape them in 167197cf2ee2Smrg# for loops in `config.status'. Finally, any additional code accumulated 167297cf2ee2Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 167397cf2ee2Smrgm4_defun([_LT_CONFIG_COMMANDS], 167497cf2ee2Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 167597cf2ee2Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 167697cf2ee2Smrg dnl instead of duplicating it all over again into config.status, 167797cf2ee2Smrg dnl then we will have config.status run $CONFIG_LT later, so it 167897cf2ee2Smrg dnl needs to know what name is stored there: 167997cf2ee2Smrg [AC_CONFIG_COMMANDS([libtool], 168097cf2ee2Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 168197cf2ee2Smrg dnl If the libtool generation code is destined for config.status, 168297cf2ee2Smrg dnl expand the accumulated commands and init code now: 168397cf2ee2Smrg [AC_CONFIG_COMMANDS([libtool], 168497cf2ee2Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 168597cf2ee2Smrg])#_LT_CONFIG_COMMANDS 16866e7d3316Smrg 16876e7d3316Smrg 168897cf2ee2Smrg# Initialize. 168997cf2ee2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 169097cf2ee2Smrg[ 16916e7d3316Smrg 169297cf2ee2Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 169397cf2ee2Smrg# if CDPATH is set. 169497cf2ee2Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 16956e7d3316Smrg 169697cf2ee2Smrgsed_quote_subst='$sed_quote_subst' 169797cf2ee2Smrgdouble_quote_subst='$double_quote_subst' 169897cf2ee2Smrgdelay_variable_subst='$delay_variable_subst' 169997cf2ee2Smrg_LT_CONFIG_STATUS_DECLARATIONS 170097cf2ee2SmrgLTCC='$LTCC' 170197cf2ee2SmrgLTCFLAGS='$LTCFLAGS' 170297cf2ee2Smrgcompiler='$compiler_DEFAULT' 17036e7d3316Smrg 170497cf2ee2Smrg# A function that is used when there is no print builtin or printf. 170597cf2ee2Smrgfunc_fallback_echo () 170697cf2ee2Smrg{ 170797cf2ee2Smrg eval 'cat <<_LTECHO_EOF 170897cf2ee2Smrg\$[]1 170997cf2ee2Smrg_LTECHO_EOF' 171097cf2ee2Smrg} 17116e7d3316Smrg 171297cf2ee2Smrg# Quote evaled strings. 171397cf2ee2Smrgfor var in lt_decl_all_varnames([[ \ 171497cf2ee2Smrg]], lt_decl_quote_varnames); do 171597cf2ee2Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 171697cf2ee2Smrg *[[\\\\\\\`\\"\\\$]]*) 171797cf2ee2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 171897cf2ee2Smrg ;; 171997cf2ee2Smrg *) 172097cf2ee2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 172197cf2ee2Smrg ;; 172297cf2ee2Smrg esac 17236e7d3316Smrgdone 17246e7d3316Smrg 172597cf2ee2Smrg# Double-quote double-evaled strings. 172697cf2ee2Smrgfor var in lt_decl_all_varnames([[ \ 172797cf2ee2Smrg]], lt_decl_dquote_varnames); do 172897cf2ee2Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 172997cf2ee2Smrg *[[\\\\\\\`\\"\\\$]]*) 173097cf2ee2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 173197cf2ee2Smrg ;; 173297cf2ee2Smrg *) 173397cf2ee2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 173497cf2ee2Smrg ;; 173597cf2ee2Smrg esac 173697cf2ee2Smrgdone 17376e7d3316Smrg 173897cf2ee2Smrg_LT_OUTPUT_LIBTOOL_INIT 173997cf2ee2Smrg]) 17406e7d3316Smrg 174197cf2ee2Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 174297cf2ee2Smrg# ------------------------------------ 174397cf2ee2Smrg# Generate a child script FILE with all initialization necessary to 174497cf2ee2Smrg# reuse the environment learned by the parent script, and make the 174597cf2ee2Smrg# file executable. If COMMENT is supplied, it is inserted after the 174697cf2ee2Smrg# `#!' sequence but before initialization text begins. After this 174797cf2ee2Smrg# macro, additional text can be appended to FILE to form the body of 174897cf2ee2Smrg# the child script. The macro ends with non-zero status if the 174997cf2ee2Smrg# file could not be fully written (such as if the disk is full). 175097cf2ee2Smrgm4_ifdef([AS_INIT_GENERATED], 175197cf2ee2Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 175297cf2ee2Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 175397cf2ee2Smrg[m4_require([AS_PREPARE])]dnl 175497cf2ee2Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 175597cf2ee2Smrg[lt_write_fail=0 175697cf2ee2Smrgcat >$1 <<_ASEOF || lt_write_fail=1 175797cf2ee2Smrg#! $SHELL 175897cf2ee2Smrg# Generated by $as_me. 175997cf2ee2Smrg$2 176097cf2ee2SmrgSHELL=\${CONFIG_SHELL-$SHELL} 176197cf2ee2Smrgexport SHELL 176297cf2ee2Smrg_ASEOF 176397cf2ee2Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 176497cf2ee2SmrgAS_SHELL_SANITIZE 176597cf2ee2Smrg_AS_PREPARE 176697cf2ee2Smrgexec AS_MESSAGE_FD>&1 176797cf2ee2Smrg_ASEOF 176897cf2ee2Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 176997cf2ee2Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 17706e7d3316Smrg 177197cf2ee2Smrg# LT_OUTPUT 17726e7d3316Smrg# --------- 177397cf2ee2Smrg# This macro allows early generation of the libtool script (before 177497cf2ee2Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 177597cf2ee2Smrg# tests. 177697cf2ee2SmrgAC_DEFUN([LT_OUTPUT], 177797cf2ee2Smrg[: ${CONFIG_LT=./config.lt} 177897cf2ee2SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 177997cf2ee2Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 178097cf2ee2Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 1781a966c04fSmrg 178297cf2ee2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 178397cf2ee2Smrglt_cl_silent=false 178497cf2ee2Smrgexec AS_MESSAGE_LOG_FD>>config.log 178597cf2ee2Smrg{ 178697cf2ee2Smrg echo 178797cf2ee2Smrg AS_BOX([Running $as_me.]) 178897cf2ee2Smrg} >&AS_MESSAGE_LOG_FD 17896e7d3316Smrg 179097cf2ee2Smrglt_cl_help="\ 179197cf2ee2Smrg\`$as_me' creates a local libtool stub from the current configuration, 179297cf2ee2Smrgfor use in further configure time tests before the real libtool is 179397cf2ee2Smrggenerated. 17946e7d3316Smrg 179597cf2ee2SmrgUsage: $[0] [[OPTIONS]] 1796a966c04fSmrg 179797cf2ee2Smrg -h, --help print this help, then exit 179897cf2ee2Smrg -V, --version print version number, then exit 179997cf2ee2Smrg -q, --quiet do not print progress messages 180097cf2ee2Smrg -d, --debug don't remove temporary files 1801a966c04fSmrg 180297cf2ee2SmrgReport bugs to <bug-libtool@gnu.org>." 1803a966c04fSmrg 180497cf2ee2Smrglt_cl_version="\ 180597cf2ee2Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 180697cf2ee2Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 180797cf2ee2Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1808a966c04fSmrg 180997cf2ee2SmrgCopyright (C) 2010 Free Software Foundation, Inc. 181097cf2ee2SmrgThis config.lt script is free software; the Free Software Foundation 181197cf2ee2Smrggives unlimited permision to copy, distribute and modify it." 1812a966c04fSmrg 181397cf2ee2Smrgwhile test $[#] != 0 181497cf2ee2Smrgdo 181597cf2ee2Smrg case $[1] in 181697cf2ee2Smrg --version | --v* | -V ) 181797cf2ee2Smrg echo "$lt_cl_version"; exit 0 ;; 181897cf2ee2Smrg --help | --h* | -h ) 181997cf2ee2Smrg echo "$lt_cl_help"; exit 0 ;; 182097cf2ee2Smrg --debug | --d* | -d ) 182197cf2ee2Smrg debug=: ;; 182297cf2ee2Smrg --quiet | --q* | --silent | --s* | -q ) 182397cf2ee2Smrg lt_cl_silent=: ;; 1824a966c04fSmrg 182597cf2ee2Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 182697cf2ee2SmrgTry \`$[0] --help' for more information.]) ;; 1827a966c04fSmrg 182897cf2ee2Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 182997cf2ee2SmrgTry \`$[0] --help' for more information.]) ;; 183097cf2ee2Smrg esac 183197cf2ee2Smrg shift 183297cf2ee2Smrgdone 1833a966c04fSmrg 183497cf2ee2Smrgif $lt_cl_silent; then 183597cf2ee2Smrg exec AS_MESSAGE_FD>/dev/null 183697cf2ee2Smrgfi 183797cf2ee2Smrg_LTEOF 1838a966c04fSmrg 183997cf2ee2Smrgcat >>"$CONFIG_LT" <<_LTEOF 184097cf2ee2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 184197cf2ee2Smrg_LTEOF 1842a966c04fSmrg 184397cf2ee2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 184497cf2ee2SmrgAC_MSG_NOTICE([creating $ofile]) 184597cf2ee2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 184697cf2ee2SmrgAS_EXIT(0) 184797cf2ee2Smrg_LTEOF 184897cf2ee2Smrgchmod +x "$CONFIG_LT" 18492e2dd055Smrg 185097cf2ee2Smrg# configure is writing to config.log, but config.lt does its own redirection, 185197cf2ee2Smrg# appending to config.log, which fails on DOS, as config.log is still kept 185297cf2ee2Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 185397cf2ee2Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 185497cf2ee2Smrglt_cl_success=: 185597cf2ee2Smrgtest "$silent" = yes && 185697cf2ee2Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 185797cf2ee2Smrgexec AS_MESSAGE_LOG_FD>/dev/null 185897cf2ee2Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 185997cf2ee2Smrgexec AS_MESSAGE_LOG_FD>>config.log 186097cf2ee2Smrg$lt_cl_success || AS_EXIT(1) 186197cf2ee2Smrg])# LT_OUTPUT 1862a966c04fSmrg 1863a966c04fSmrg 186497cf2ee2Smrg# _LT_CONFIG(TAG) 186597cf2ee2Smrg# --------------- 186697cf2ee2Smrg# If TAG is the built-in tag, create an initial libtool script with a 186797cf2ee2Smrg# default configuration from the untagged config vars. Otherwise add code 186897cf2ee2Smrg# to config.status for appending the configuration named by TAG from the 186997cf2ee2Smrg# matching tagged config vars. 187097cf2ee2Smrgm4_defun([_LT_CONFIG], 187197cf2ee2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 187297cf2ee2Smrg_LT_CONFIG_SAVE_COMMANDS([ 187397cf2ee2Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 187497cf2ee2Smrg m4_if(_LT_TAG, [C], [ 187597cf2ee2Smrg # See if we are running on zsh, and set the options which allow our 187697cf2ee2Smrg # commands through without removal of \ escapes. 187797cf2ee2Smrg if test -n "${ZSH_VERSION+set}" ; then 187897cf2ee2Smrg setopt NO_GLOB_SUBST 187997cf2ee2Smrg fi 1880a966c04fSmrg 188197cf2ee2Smrg cfgfile="${ofile}T" 188297cf2ee2Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 188397cf2ee2Smrg $RM "$cfgfile" 1884a966c04fSmrg 188597cf2ee2Smrg cat <<_LT_EOF >> "$cfgfile" 188697cf2ee2Smrg#! $SHELL 1887a966c04fSmrg 188897cf2ee2Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 188997cf2ee2Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 189097cf2ee2Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 189197cf2ee2Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 189297cf2ee2Smrg# 189397cf2ee2Smrg_LT_COPYING 189497cf2ee2Smrg_LT_LIBTOOL_TAGS 1895a966c04fSmrg 189697cf2ee2Smrg# ### BEGIN LIBTOOL CONFIG 189797cf2ee2Smrg_LT_LIBTOOL_CONFIG_VARS 189897cf2ee2Smrg_LT_LIBTOOL_TAG_VARS 189997cf2ee2Smrg# ### END LIBTOOL CONFIG 1900a966c04fSmrg 190197cf2ee2Smrg_LT_EOF 1902a966c04fSmrg 190397cf2ee2Smrg case $host_os in 190497cf2ee2Smrg aix3*) 190597cf2ee2Smrg cat <<\_LT_EOF >> "$cfgfile" 190697cf2ee2Smrg# AIX sometimes has problems with the GCC collect2 program. For some 190797cf2ee2Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 190897cf2ee2Smrg# vanish in a puff of smoke. 190997cf2ee2Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 191097cf2ee2Smrg COLLECT_NAMES= 191197cf2ee2Smrg export COLLECT_NAMES 191297cf2ee2Smrgfi 191397cf2ee2Smrg_LT_EOF 191497cf2ee2Smrg ;; 191597cf2ee2Smrg esac 1916a966c04fSmrg 191797cf2ee2Smrg _LT_PROG_LTMAIN 1918a966c04fSmrg 191997cf2ee2Smrg # We use sed instead of cat because bash on DJGPP gets confused if 192097cf2ee2Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 192197cf2ee2Smrg # text mode, it properly converts lines to CR/LF. This bash problem 192297cf2ee2Smrg # is reportedly fixed, but why not run on old versions too? 192397cf2ee2Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 192497cf2ee2Smrg || (rm -f "$cfgfile"; exit 1) 19256e7d3316Smrg 192697cf2ee2Smrg _LT_PROG_REPLACE_SHELLFNS 19276e7d3316Smrg 192897cf2ee2Smrg mv -f "$cfgfile" "$ofile" || 192997cf2ee2Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 193097cf2ee2Smrg chmod +x "$ofile" 193197cf2ee2Smrg], 193297cf2ee2Smrg[cat <<_LT_EOF >> "$ofile" 19336e7d3316Smrg 193497cf2ee2Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 193597cf2ee2Smrgdnl in a comment (ie after a #). 193697cf2ee2Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 193797cf2ee2Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 193897cf2ee2Smrg# ### END LIBTOOL TAG CONFIG: $1 193997cf2ee2Smrg_LT_EOF 194097cf2ee2Smrg])dnl /m4_if 194197cf2ee2Smrg], 194297cf2ee2Smrg[m4_if([$1], [], [ 194397cf2ee2Smrg PACKAGE='$PACKAGE' 194497cf2ee2Smrg VERSION='$VERSION' 194597cf2ee2Smrg TIMESTAMP='$TIMESTAMP' 194697cf2ee2Smrg RM='$RM' 194797cf2ee2Smrg ofile='$ofile'], []) 194897cf2ee2Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 194997cf2ee2Smrg])# _LT_CONFIG 19506e7d3316Smrg 19516e7d3316Smrg 195297cf2ee2Smrg# LT_SUPPORTED_TAG(TAG) 195397cf2ee2Smrg# --------------------- 195497cf2ee2Smrg# Trace this macro to discover what tags are supported by the libtool 195597cf2ee2Smrg# --tag option, using: 195697cf2ee2Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 195797cf2ee2SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 19586e7d3316Smrg 19596e7d3316Smrg 196097cf2ee2Smrg# C support is built-in for now 196197cf2ee2Smrgm4_define([_LT_LANG_C_enabled], []) 196297cf2ee2Smrgm4_define([_LT_TAGS], []) 1963a966c04fSmrg 1964a966c04fSmrg 196597cf2ee2Smrg# LT_LANG(LANG) 196697cf2ee2Smrg# ------------- 196797cf2ee2Smrg# Enable libtool support for the given language if not already enabled. 196897cf2ee2SmrgAC_DEFUN([LT_LANG], 196997cf2ee2Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 197097cf2ee2Smrgm4_case([$1], 197197cf2ee2Smrg [C], [_LT_LANG(C)], 197297cf2ee2Smrg [C++], [_LT_LANG(CXX)], 197397cf2ee2Smrg [Java], [_LT_LANG(GCJ)], 197497cf2ee2Smrg [Fortran 77], [_LT_LANG(F77)], 197597cf2ee2Smrg [Fortran], [_LT_LANG(FC)], 197697cf2ee2Smrg [Windows Resource], [_LT_LANG(RC)], 197797cf2ee2Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 197897cf2ee2Smrg [_LT_LANG($1)], 197997cf2ee2Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 198097cf2ee2Smrg])# LT_LANG 19816e7d3316Smrg 19826e7d3316Smrg 198397cf2ee2Smrg# _LT_LANG(LANGNAME) 198497cf2ee2Smrg# ------------------ 198597cf2ee2Smrgm4_defun([_LT_LANG], 198697cf2ee2Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 198797cf2ee2Smrg [LT_SUPPORTED_TAG([$1])dnl 198897cf2ee2Smrg m4_append([_LT_TAGS], [$1 ])dnl 198997cf2ee2Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 199097cf2ee2Smrg _LT_LANG_$1_CONFIG($1)])dnl 199197cf2ee2Smrg])# _LT_LANG 19926e7d3316Smrg 19936e7d3316Smrg 199497cf2ee2Smrg# _LT_LANG_DEFAULT_CONFIG 199597cf2ee2Smrg# ----------------------- 199697cf2ee2Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 199797cf2ee2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 199897cf2ee2Smrg [LT_LANG(CXX)], 199997cf2ee2Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 20006e7d3316Smrg 200197cf2ee2SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 200297cf2ee2Smrg [LT_LANG(F77)], 200397cf2ee2Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2004a966c04fSmrg 200597cf2ee2SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 200697cf2ee2Smrg [LT_LANG(FC)], 200797cf2ee2Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2008a966c04fSmrg 200997cf2ee2Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 201097cf2ee2Smrgdnl pulling things in needlessly. 201197cf2ee2SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 201297cf2ee2Smrg [LT_LANG(GCJ)], 201397cf2ee2Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 201497cf2ee2Smrg [LT_LANG(GCJ)], 201597cf2ee2Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 201697cf2ee2Smrg [LT_LANG(GCJ)], 201797cf2ee2Smrg [m4_ifdef([AC_PROG_GCJ], 201897cf2ee2Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 201997cf2ee2Smrg m4_ifdef([A][M_PROG_GCJ], 202097cf2ee2Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 202197cf2ee2Smrg m4_ifdef([LT_PROG_GCJ], 202297cf2ee2Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 20236e7d3316Smrg 202497cf2ee2SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 202597cf2ee2Smrg [LT_LANG(RC)], 202697cf2ee2Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 202797cf2ee2Smrg])# _LT_LANG_DEFAULT_CONFIG 20286e7d3316Smrg 202997cf2ee2Smrg# Obsolete macros: 203097cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 203197cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 203297cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 203397cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 203497cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 203597cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 203697cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 203797cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 203897cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 203997cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 204097cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 20416e7d3316Smrg 20426e7d3316Smrg 204397cf2ee2Smrg# _LT_TAG_COMPILER 204497cf2ee2Smrg# ---------------- 204597cf2ee2Smrgm4_defun([_LT_TAG_COMPILER], 204697cf2ee2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 20476e7d3316Smrg 204897cf2ee2Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 204997cf2ee2Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 205097cf2ee2Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 205197cf2ee2Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 20526e7d3316Smrg 205397cf2ee2Smrg# If no C compiler was specified, use CC. 205497cf2ee2SmrgLTCC=${LTCC-"$CC"} 20556e7d3316Smrg 205697cf2ee2Smrg# If no C compiler flags were specified, use CFLAGS. 205797cf2ee2SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 20586e7d3316Smrg 205997cf2ee2Smrg# Allow CC to be a program name with arguments. 206097cf2ee2Smrgcompiler=$CC 206197cf2ee2Smrg])# _LT_TAG_COMPILER 20626e7d3316Smrg 20636e7d3316Smrg 206497cf2ee2Smrg# _LT_COMPILER_BOILERPLATE 206597cf2ee2Smrg# ------------------------ 206697cf2ee2Smrg# Check for compiler boilerplate output or warnings with 206797cf2ee2Smrg# the simple compiler test code. 206897cf2ee2Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 206997cf2ee2Smrg[m4_require([_LT_DECL_SED])dnl 207097cf2ee2Smrgac_outfile=conftest.$ac_objext 207197cf2ee2Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 207297cf2ee2Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 207397cf2ee2Smrg_lt_compiler_boilerplate=`cat conftest.err` 207497cf2ee2Smrg$RM conftest* 207597cf2ee2Smrg])# _LT_COMPILER_BOILERPLATE 20766e7d3316Smrg 20776e7d3316Smrg 207897cf2ee2Smrg# _LT_LINKER_BOILERPLATE 207997cf2ee2Smrg# ---------------------- 208097cf2ee2Smrg# Check for linker boilerplate output or warnings with 208197cf2ee2Smrg# the simple link test code. 208297cf2ee2Smrgm4_defun([_LT_LINKER_BOILERPLATE], 208397cf2ee2Smrg[m4_require([_LT_DECL_SED])dnl 208497cf2ee2Smrgac_outfile=conftest.$ac_objext 208597cf2ee2Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 208697cf2ee2Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 208797cf2ee2Smrg_lt_linker_boilerplate=`cat conftest.err` 208897cf2ee2Smrg$RM -r conftest* 208997cf2ee2Smrg])# _LT_LINKER_BOILERPLATE 20906e7d3316Smrg 209197cf2ee2Smrg# _LT_REQUIRED_DARWIN_CHECKS 209297cf2ee2Smrg# ------------------------- 209397cf2ee2Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 209497cf2ee2Smrg case $host_os in 209597cf2ee2Smrg rhapsody* | darwin*) 209697cf2ee2Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 209797cf2ee2Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 209897cf2ee2Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 209997cf2ee2Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 210097cf2ee2Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 210197cf2ee2Smrg _LT_DECL([], [DSYMUTIL], [1], 210297cf2ee2Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 210397cf2ee2Smrg _LT_DECL([], [NMEDIT], [1], 210497cf2ee2Smrg [Tool to change global to local symbols on Mac OS X]) 210597cf2ee2Smrg _LT_DECL([], [LIPO], [1], 210697cf2ee2Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 210797cf2ee2Smrg _LT_DECL([], [OTOOL], [1], 210897cf2ee2Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 210997cf2ee2Smrg _LT_DECL([], [OTOOL64], [1], 211097cf2ee2Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 21116e7d3316Smrg 211297cf2ee2Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 211397cf2ee2Smrg [lt_cv_apple_cc_single_mod=no 211497cf2ee2Smrg if test -z "${LT_MULTI_MODULE}"; then 211597cf2ee2Smrg # By default we will add the -single_module flag. You can override 211697cf2ee2Smrg # by either setting the environment variable LT_MULTI_MODULE 211797cf2ee2Smrg # non-empty at configure time, or by adding -multi_module to the 211897cf2ee2Smrg # link flags. 211997cf2ee2Smrg rm -rf libconftest.dylib* 212097cf2ee2Smrg echo "int foo(void){return 1;}" > conftest.c 212197cf2ee2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 212297cf2ee2Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 212397cf2ee2Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 212497cf2ee2Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 212597cf2ee2Smrg _lt_result=$? 212697cf2ee2Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 212797cf2ee2Smrg lt_cv_apple_cc_single_mod=yes 212897cf2ee2Smrg else 212997cf2ee2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 213097cf2ee2Smrg fi 213197cf2ee2Smrg rm -rf libconftest.dylib* 213297cf2ee2Smrg rm -f conftest.* 213397cf2ee2Smrg fi]) 213497cf2ee2Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 213597cf2ee2Smrg [lt_cv_ld_exported_symbols_list], 213697cf2ee2Smrg [lt_cv_ld_exported_symbols_list=no 213797cf2ee2Smrg save_LDFLAGS=$LDFLAGS 213897cf2ee2Smrg echo "_main" > conftest.sym 213997cf2ee2Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 214097cf2ee2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 214197cf2ee2Smrg [lt_cv_ld_exported_symbols_list=yes], 214297cf2ee2Smrg [lt_cv_ld_exported_symbols_list=no]) 214397cf2ee2Smrg LDFLAGS="$save_LDFLAGS" 214497cf2ee2Smrg ]) 214597cf2ee2Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 214697cf2ee2Smrg [lt_cv_ld_force_load=no 214797cf2ee2Smrg cat > conftest.c << _LT_EOF 214897cf2ee2Smrgint forced_loaded() { return 2;} 214997cf2ee2Smrg_LT_EOF 215097cf2ee2Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 215197cf2ee2Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 215297cf2ee2Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 215397cf2ee2Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 215497cf2ee2Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 215597cf2ee2Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 215697cf2ee2Smrg cat > conftest.c << _LT_EOF 215797cf2ee2Smrgint main() { return 0;} 215897cf2ee2Smrg_LT_EOF 215997cf2ee2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 216097cf2ee2Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 216197cf2ee2Smrg _lt_result=$? 216297cf2ee2Smrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 216397cf2ee2Smrg lt_cv_ld_force_load=yes 216497cf2ee2Smrg else 216597cf2ee2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 216697cf2ee2Smrg fi 216797cf2ee2Smrg rm -f conftest.err libconftest.a conftest conftest.c 216897cf2ee2Smrg rm -rf conftest.dSYM 216997cf2ee2Smrg ]) 217097cf2ee2Smrg case $host_os in 217197cf2ee2Smrg rhapsody* | darwin1.[[012]]) 217297cf2ee2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 217397cf2ee2Smrg darwin1.*) 217497cf2ee2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 217597cf2ee2Smrg darwin*) # darwin 5.x on 217697cf2ee2Smrg # if running on 10.5 or later, the deployment target defaults 217797cf2ee2Smrg # to the OS version, if on x86, and 10.4, the deployment 217897cf2ee2Smrg # target defaults to 10.4. Don't you love it? 217997cf2ee2Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 218097cf2ee2Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 218197cf2ee2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 218297cf2ee2Smrg 10.[[012]]*) 218397cf2ee2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 218497cf2ee2Smrg 10.*) 218597cf2ee2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 218697cf2ee2Smrg esac 218797cf2ee2Smrg ;; 218897cf2ee2Smrg esac 218997cf2ee2Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 219097cf2ee2Smrg _lt_dar_single_mod='$single_module' 219197cf2ee2Smrg fi 219297cf2ee2Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 219397cf2ee2Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 219497cf2ee2Smrg else 219597cf2ee2Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 219697cf2ee2Smrg fi 219797cf2ee2Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 219897cf2ee2Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 219997cf2ee2Smrg else 220097cf2ee2Smrg _lt_dsymutil= 220197cf2ee2Smrg fi 220297cf2ee2Smrg ;; 220397cf2ee2Smrg esac 22046e7d3316Smrg]) 22056e7d3316Smrg 22066e7d3316Smrg 220797cf2ee2Smrg# _LT_DARWIN_LINKER_FEATURES 220897cf2ee2Smrg# -------------------------- 220997cf2ee2Smrg# Checks for linker and compiler features on darwin 221097cf2ee2Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 221197cf2ee2Smrg[ 221297cf2ee2Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 221397cf2ee2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 221497cf2ee2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 221597cf2ee2Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 221697cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 221797cf2ee2Smrg if test "$lt_cv_ld_force_load" = "yes"; then 221897cf2ee2Smrg _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\"`' 221997cf2ee2Smrg else 222097cf2ee2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 222197cf2ee2Smrg fi 222297cf2ee2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 222397cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 222497cf2ee2Smrg case $cc_basename in 222597cf2ee2Smrg ifort*) _lt_dar_can_shared=yes ;; 222697cf2ee2Smrg *) _lt_dar_can_shared=$GCC ;; 222797cf2ee2Smrg esac 222897cf2ee2Smrg if test "$_lt_dar_can_shared" = "yes"; then 222997cf2ee2Smrg output_verbose_link_cmd=func_echo_all 223097cf2ee2Smrg _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}" 223197cf2ee2Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 223297cf2ee2Smrg _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}" 223397cf2ee2Smrg _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}" 223497cf2ee2Smrg m4_if([$1], [CXX], 223597cf2ee2Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 223697cf2ee2Smrg _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}" 223797cf2ee2Smrg _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}" 223897cf2ee2Smrg fi 223997cf2ee2Smrg],[]) 224097cf2ee2Smrg else 224197cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 224297cf2ee2Smrg fi 22436e7d3316Smrg]) 22446e7d3316Smrg 224597cf2ee2Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 224697cf2ee2Smrg# ---------------------------------- 224797cf2ee2Smrg# Links a minimal program and checks the executable 224897cf2ee2Smrg# for the system default hardcoded library path. In most cases, 224997cf2ee2Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 225097cf2ee2Smrg# the location of the communication and MPI libs are included too. 225197cf2ee2Smrg# If we don't find anything, use the default library path according 225297cf2ee2Smrg# to the aix ld manual. 225397cf2ee2Smrg# Store the results from the different compilers for each TAGNAME. 225497cf2ee2Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 225597cf2ee2Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 225697cf2ee2Smrg[m4_require([_LT_DECL_SED])dnl 225797cf2ee2Smrgif test "${lt_cv_aix_libpath+set}" = set; then 225897cf2ee2Smrg aix_libpath=$lt_cv_aix_libpath 225997cf2ee2Smrgelse 226097cf2ee2Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 226197cf2ee2Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 226297cf2ee2Smrg lt_aix_libpath_sed='[ 226397cf2ee2Smrg /Import File Strings/,/^$/ { 226497cf2ee2Smrg /^0/ { 226597cf2ee2Smrg s/^0 *\([^ ]*\) *$/\1/ 226697cf2ee2Smrg p 226797cf2ee2Smrg } 226897cf2ee2Smrg }]' 226997cf2ee2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 227097cf2ee2Smrg # Check for a 64-bit object if we didn't find anything. 227197cf2ee2Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 227297cf2ee2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 227397cf2ee2Smrg fi],[]) 227497cf2ee2Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 227597cf2ee2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 227697cf2ee2Smrg fi 227797cf2ee2Smrg ]) 227897cf2ee2Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 227997cf2ee2Smrgfi 228097cf2ee2Smrg])# _LT_SYS_MODULE_PATH_AIX 22816e7d3316Smrg 22826e7d3316Smrg 228397cf2ee2Smrg# _LT_SHELL_INIT(ARG) 22846e7d3316Smrg# ------------------- 228597cf2ee2Smrgm4_define([_LT_SHELL_INIT], 228697cf2ee2Smrg[m4_divert_text([M4SH-INIT], [$1 228797cf2ee2Smrg])])# _LT_SHELL_INIT 22886e7d3316Smrg 22896e7d3316Smrg 22906e7d3316Smrg 229197cf2ee2Smrg# _LT_PROG_ECHO_BACKSLASH 229297cf2ee2Smrg# ----------------------- 229397cf2ee2Smrg# Find how we can fake an echo command that does not interpret backslash. 229497cf2ee2Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 229597cf2ee2Smrg# of the generated configure script which will find a shell with a builtin 229697cf2ee2Smrg# printf (which we can use as an echo command). 229797cf2ee2Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 229897cf2ee2Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 229997cf2ee2SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 230097cf2ee2SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23016e7d3316Smrg 230297cf2ee2SmrgAC_MSG_CHECKING([how to print strings]) 230397cf2ee2Smrg# Test print first, because it will be a builtin if present. 230497cf2ee2Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 230597cf2ee2Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 230697cf2ee2Smrg ECHO='print -r --' 230797cf2ee2Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 230897cf2ee2Smrg ECHO='printf %s\n' 230997cf2ee2Smrgelse 231097cf2ee2Smrg # Use this function as a fallback that always works. 231197cf2ee2Smrg func_fallback_echo () 231297cf2ee2Smrg { 231397cf2ee2Smrg eval 'cat <<_LTECHO_EOF 231497cf2ee2Smrg$[]1 231597cf2ee2Smrg_LTECHO_EOF' 231697cf2ee2Smrg } 231797cf2ee2Smrg ECHO='func_fallback_echo' 231897cf2ee2Smrgfi 23196e7d3316Smrg 232097cf2ee2Smrg# func_echo_all arg... 232197cf2ee2Smrg# Invoke $ECHO with all args, space-separated. 232297cf2ee2Smrgfunc_echo_all () 23236e7d3316Smrg{ 232497cf2ee2Smrg $ECHO "$*" 23256e7d3316Smrg} 23266e7d3316Smrg 232797cf2ee2Smrgcase "$ECHO" in 232897cf2ee2Smrg printf*) AC_MSG_RESULT([printf]) ;; 232997cf2ee2Smrg print*) AC_MSG_RESULT([print -r]) ;; 233097cf2ee2Smrg *) AC_MSG_RESULT([cat]) ;; 233197cf2ee2Smrgesac 23326e7d3316Smrg 233397cf2ee2Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 233497cf2ee2Smrg[_AS_DETECT_SUGGESTED([ 233597cf2ee2Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 233697cf2ee2Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 233797cf2ee2Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 233897cf2ee2Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 233997cf2ee2Smrg PATH=/empty FPATH=/empty; export PATH FPATH 234097cf2ee2Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 234197cf2ee2Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 23426e7d3316Smrg 234397cf2ee2Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 234497cf2ee2Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 234597cf2ee2Smrg])# _LT_PROG_ECHO_BACKSLASH 23466e7d3316Smrg 23476e7d3316Smrg 234897cf2ee2Smrg# _LT_WITH_SYSROOT 234997cf2ee2Smrg# ---------------- 235097cf2ee2SmrgAC_DEFUN([_LT_WITH_SYSROOT], 235197cf2ee2Smrg[AC_MSG_CHECKING([for sysroot]) 235297cf2ee2SmrgAC_ARG_WITH([sysroot], 235397cf2ee2Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 235497cf2ee2Smrg (or the compiler's sysroot if not specified).], 235597cf2ee2Smrg[], [with_sysroot=no]) 235697cf2ee2Smrg 235797cf2ee2Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 235897cf2ee2Smrgdnl in case the user passed a directory name. 235997cf2ee2Smrglt_sysroot= 236097cf2ee2Smrgcase ${with_sysroot} in #( 236197cf2ee2Smrg yes) 236297cf2ee2Smrg if test "$GCC" = yes; then 236397cf2ee2Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 236497cf2ee2Smrg fi 236597cf2ee2Smrg ;; #( 236697cf2ee2Smrg /*) 236797cf2ee2Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 236897cf2ee2Smrg ;; #( 236997cf2ee2Smrg no|'') 237097cf2ee2Smrg ;; #( 237197cf2ee2Smrg *) 237297cf2ee2Smrg AC_MSG_RESULT([${with_sysroot}]) 237397cf2ee2Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 237497cf2ee2Smrg ;; 237597cf2ee2Smrgesac 23766e7d3316Smrg 237797cf2ee2Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 237897cf2ee2Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 237997cf2ee2Smrg[dependent libraries, and in which our libraries should be installed.])]) 23806e7d3316Smrg 238197cf2ee2Smrg# _LT_ENABLE_LOCK 238297cf2ee2Smrg# --------------- 238397cf2ee2Smrgm4_defun([_LT_ENABLE_LOCK], 238497cf2ee2Smrg[AC_ARG_ENABLE([libtool-lock], 238597cf2ee2Smrg [AS_HELP_STRING([--disable-libtool-lock], 238697cf2ee2Smrg [avoid locking (might break parallel builds)])]) 238797cf2ee2Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 23886e7d3316Smrg 238997cf2ee2Smrg# Some flags need to be propagated to the compiler or linker for good 239097cf2ee2Smrg# libtool support. 239197cf2ee2Smrgcase $host in 239297cf2ee2Smrgia64-*-hpux*) 239397cf2ee2Smrg # Find out which ABI we are using. 239497cf2ee2Smrg echo 'int i;' > conftest.$ac_ext 239597cf2ee2Smrg if AC_TRY_EVAL(ac_compile); then 239697cf2ee2Smrg case `/usr/bin/file conftest.$ac_objext` in 239797cf2ee2Smrg *ELF-32*) 239897cf2ee2Smrg HPUX_IA64_MODE="32" 239997cf2ee2Smrg ;; 240097cf2ee2Smrg *ELF-64*) 240197cf2ee2Smrg HPUX_IA64_MODE="64" 240297cf2ee2Smrg ;; 240397cf2ee2Smrg esac 240497cf2ee2Smrg fi 240597cf2ee2Smrg rm -rf conftest* 240697cf2ee2Smrg ;; 240797cf2ee2Smrg*-*-irix6*) 240897cf2ee2Smrg # Find out which ABI we are using. 240997cf2ee2Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 241097cf2ee2Smrg if AC_TRY_EVAL(ac_compile); then 241197cf2ee2Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 241297cf2ee2Smrg case `/usr/bin/file conftest.$ac_objext` in 241397cf2ee2Smrg *32-bit*) 241497cf2ee2Smrg LD="${LD-ld} -melf32bsmip" 241597cf2ee2Smrg ;; 241697cf2ee2Smrg *N32*) 241797cf2ee2Smrg LD="${LD-ld} -melf32bmipn32" 241897cf2ee2Smrg ;; 241997cf2ee2Smrg *64-bit*) 242097cf2ee2Smrg LD="${LD-ld} -melf64bmip" 242197cf2ee2Smrg ;; 242297cf2ee2Smrg esac 242397cf2ee2Smrg else 242497cf2ee2Smrg case `/usr/bin/file conftest.$ac_objext` in 242597cf2ee2Smrg *32-bit*) 242697cf2ee2Smrg LD="${LD-ld} -32" 242797cf2ee2Smrg ;; 242897cf2ee2Smrg *N32*) 242997cf2ee2Smrg LD="${LD-ld} -n32" 243097cf2ee2Smrg ;; 243197cf2ee2Smrg *64-bit*) 243297cf2ee2Smrg LD="${LD-ld} -64" 243397cf2ee2Smrg ;; 243497cf2ee2Smrg esac 243597cf2ee2Smrg fi 243697cf2ee2Smrg fi 243797cf2ee2Smrg rm -rf conftest* 243897cf2ee2Smrg ;; 24396e7d3316Smrg 244097cf2ee2Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 244197cf2ee2Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 244297cf2ee2Smrg # Find out which ABI we are using. 244397cf2ee2Smrg echo 'int i;' > conftest.$ac_ext 244497cf2ee2Smrg if AC_TRY_EVAL(ac_compile); then 244597cf2ee2Smrg case `/usr/bin/file conftest.o` in 244697cf2ee2Smrg *32-bit*) 244797cf2ee2Smrg case $host in 244897cf2ee2Smrg x86_64-*kfreebsd*-gnu) 244997cf2ee2Smrg LD="${LD-ld} -m elf_i386_fbsd" 245097cf2ee2Smrg ;; 245197cf2ee2Smrg x86_64-*linux*) 245297cf2ee2Smrg LD="${LD-ld} -m elf_i386" 245397cf2ee2Smrg ;; 245497cf2ee2Smrg ppc64-*linux*|powerpc64-*linux*) 245597cf2ee2Smrg LD="${LD-ld} -m elf32ppclinux" 245697cf2ee2Smrg ;; 245797cf2ee2Smrg s390x-*linux*) 245897cf2ee2Smrg LD="${LD-ld} -m elf_s390" 245997cf2ee2Smrg ;; 246097cf2ee2Smrg sparc64-*linux*) 246197cf2ee2Smrg LD="${LD-ld} -m elf32_sparc" 246297cf2ee2Smrg ;; 246397cf2ee2Smrg esac 246497cf2ee2Smrg ;; 246597cf2ee2Smrg *64-bit*) 246697cf2ee2Smrg case $host in 246797cf2ee2Smrg x86_64-*kfreebsd*-gnu) 246897cf2ee2Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 246997cf2ee2Smrg ;; 247097cf2ee2Smrg x86_64-*linux*) 247197cf2ee2Smrg LD="${LD-ld} -m elf_x86_64" 247297cf2ee2Smrg ;; 247397cf2ee2Smrg ppc*-*linux*|powerpc*-*linux*) 247497cf2ee2Smrg LD="${LD-ld} -m elf64ppc" 247597cf2ee2Smrg ;; 247697cf2ee2Smrg s390*-*linux*|s390*-*tpf*) 247797cf2ee2Smrg LD="${LD-ld} -m elf64_s390" 247897cf2ee2Smrg ;; 247997cf2ee2Smrg sparc*-*linux*) 248097cf2ee2Smrg LD="${LD-ld} -m elf64_sparc" 248197cf2ee2Smrg ;; 248297cf2ee2Smrg esac 248397cf2ee2Smrg ;; 248497cf2ee2Smrg esac 248597cf2ee2Smrg fi 248697cf2ee2Smrg rm -rf conftest* 248797cf2ee2Smrg ;; 24886e7d3316Smrg 248997cf2ee2Smrg*-*-sco3.2v5*) 249097cf2ee2Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 249197cf2ee2Smrg SAVE_CFLAGS="$CFLAGS" 249297cf2ee2Smrg CFLAGS="$CFLAGS -belf" 249397cf2ee2Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 249497cf2ee2Smrg [AC_LANG_PUSH(C) 249597cf2ee2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 249697cf2ee2Smrg AC_LANG_POP]) 249797cf2ee2Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 249897cf2ee2Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 249997cf2ee2Smrg CFLAGS="$SAVE_CFLAGS" 250097cf2ee2Smrg fi 250197cf2ee2Smrg ;; 250297cf2ee2Smrgsparc*-*solaris*) 250397cf2ee2Smrg # Find out which ABI we are using. 250497cf2ee2Smrg echo 'int i;' > conftest.$ac_ext 250597cf2ee2Smrg if AC_TRY_EVAL(ac_compile); then 250697cf2ee2Smrg case `/usr/bin/file conftest.o` in 250797cf2ee2Smrg *64-bit*) 250897cf2ee2Smrg case $lt_cv_prog_gnu_ld in 250997cf2ee2Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 251097cf2ee2Smrg *) 251197cf2ee2Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 251297cf2ee2Smrg LD="${LD-ld} -64" 251397cf2ee2Smrg fi 251497cf2ee2Smrg ;; 251597cf2ee2Smrg esac 251697cf2ee2Smrg ;; 251797cf2ee2Smrg esac 251897cf2ee2Smrg fi 251997cf2ee2Smrg rm -rf conftest* 252097cf2ee2Smrg ;; 252197cf2ee2Smrgesac 25226e7d3316Smrg 252397cf2ee2Smrgneed_locks="$enable_libtool_lock" 252497cf2ee2Smrg])# _LT_ENABLE_LOCK 25256e7d3316Smrg 25266e7d3316Smrg 252797cf2ee2Smrg# _LT_PROG_AR 252897cf2ee2Smrg# ----------- 252997cf2ee2Smrgm4_defun([_LT_PROG_AR], 253097cf2ee2Smrg[AC_CHECK_TOOLS(AR, [ar], false) 253197cf2ee2Smrg: ${AR=ar} 253297cf2ee2Smrg: ${AR_FLAGS=cru} 253397cf2ee2Smrg_LT_DECL([], [AR], [1], [The archiver]) 253497cf2ee2Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 253597cf2ee2Smrg 253697cf2ee2SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 253797cf2ee2Smrg [lt_cv_ar_at_file=no 253897cf2ee2Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 253997cf2ee2Smrg [echo conftest.$ac_objext > conftest.lst 254097cf2ee2Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 254197cf2ee2Smrg AC_TRY_EVAL([lt_ar_try]) 254297cf2ee2Smrg if test "$ac_status" -eq 0; then 254397cf2ee2Smrg # Ensure the archiver fails upon bogus file names. 254497cf2ee2Smrg rm -f conftest.$ac_objext libconftest.a 254597cf2ee2Smrg AC_TRY_EVAL([lt_ar_try]) 254697cf2ee2Smrg if test "$ac_status" -ne 0; then 254797cf2ee2Smrg lt_cv_ar_at_file=@ 254897cf2ee2Smrg fi 254997cf2ee2Smrg fi 255097cf2ee2Smrg rm -f conftest.* libconftest.a 255197cf2ee2Smrg ]) 255297cf2ee2Smrg ]) 25536e7d3316Smrg 255497cf2ee2Smrgif test "x$lt_cv_ar_at_file" = xno; then 255597cf2ee2Smrg archiver_list_spec= 255697cf2ee2Smrgelse 255797cf2ee2Smrg archiver_list_spec=$lt_cv_ar_at_file 25586e7d3316Smrgfi 255997cf2ee2Smrg_LT_DECL([], [archiver_list_spec], [1], 256097cf2ee2Smrg [How to feed a file listing to the archiver]) 256197cf2ee2Smrg])# _LT_PROG_AR 25626e7d3316Smrg 25636e7d3316Smrg 256497cf2ee2Smrg# _LT_CMD_OLD_ARCHIVE 256597cf2ee2Smrg# ------------------- 256697cf2ee2Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 256797cf2ee2Smrg[_LT_PROG_AR 25686e7d3316Smrg 256997cf2ee2SmrgAC_CHECK_TOOL(STRIP, strip, :) 257097cf2ee2Smrgtest -z "$STRIP" && STRIP=: 257197cf2ee2Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 25726e7d3316Smrg 257397cf2ee2SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 257497cf2ee2Smrgtest -z "$RANLIB" && RANLIB=: 257597cf2ee2Smrg_LT_DECL([], [RANLIB], [1], 257697cf2ee2Smrg [Commands used to install an old-style archive]) 25776e7d3316Smrg 257897cf2ee2Smrg# Determine commands to create old-style static archives. 257997cf2ee2Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 258097cf2ee2Smrgold_postinstall_cmds='chmod 644 $oldlib' 258197cf2ee2Smrgold_postuninstall_cmds= 25826e7d3316Smrg 258397cf2ee2Smrgif test -n "$RANLIB"; then 25846e7d3316Smrg case $host_os in 258597cf2ee2Smrg openbsd*) 258697cf2ee2Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 258797cf2ee2Smrg ;; 258897cf2ee2Smrg *) 258997cf2ee2Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 25906e7d3316Smrg ;; 25916e7d3316Smrg esac 259297cf2ee2Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 259397cf2ee2Smrgfi 25946e7d3316Smrg 259597cf2ee2Smrgcase $host_os in 259697cf2ee2Smrg darwin*) 259797cf2ee2Smrg lock_old_archive_extraction=yes ;; 259897cf2ee2Smrg *) 259997cf2ee2Smrg lock_old_archive_extraction=no ;; 260097cf2ee2Smrgesac 260197cf2ee2Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 260297cf2ee2Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 260397cf2ee2Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 260497cf2ee2Smrg [Commands used to build an old-style archive]) 260597cf2ee2Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 260697cf2ee2Smrg [Whether to use a lock for old archive extraction]) 260797cf2ee2Smrg])# _LT_CMD_OLD_ARCHIVE 26086e7d3316Smrg 26096e7d3316Smrg 261097cf2ee2Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 261197cf2ee2Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 261297cf2ee2Smrg# ---------------------------------------------------------------- 261397cf2ee2Smrg# Check whether the given compiler option works 261497cf2ee2SmrgAC_DEFUN([_LT_COMPILER_OPTION], 261597cf2ee2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 261697cf2ee2Smrgm4_require([_LT_DECL_SED])dnl 261797cf2ee2SmrgAC_CACHE_CHECK([$1], [$2], 261897cf2ee2Smrg [$2=no 261997cf2ee2Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 262097cf2ee2Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 262197cf2ee2Smrg lt_compiler_flag="$3" 262297cf2ee2Smrg # Insert the option either (1) after the last *FLAGS variable, or 262397cf2ee2Smrg # (2) before a word containing "conftest.", or (3) at the end. 262497cf2ee2Smrg # Note that $ac_compile itself does not contain backslashes and begins 262597cf2ee2Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 262697cf2ee2Smrg # The option is referenced via a variable to avoid confusing sed. 262797cf2ee2Smrg lt_compile=`echo "$ac_compile" | $SED \ 262897cf2ee2Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 262997cf2ee2Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 263097cf2ee2Smrg -e 's:$: $lt_compiler_flag:'` 263197cf2ee2Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 263297cf2ee2Smrg (eval "$lt_compile" 2>conftest.err) 263397cf2ee2Smrg ac_status=$? 263497cf2ee2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 263597cf2ee2Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 263697cf2ee2Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 263797cf2ee2Smrg # The compiler can only warn and ignore the option if not recognized 263897cf2ee2Smrg # So say no if there are warnings other than the usual output. 263997cf2ee2Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 264097cf2ee2Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 264197cf2ee2Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 264297cf2ee2Smrg $2=yes 264397cf2ee2Smrg fi 264497cf2ee2Smrg fi 264597cf2ee2Smrg $RM conftest* 264697cf2ee2Smrg]) 26476e7d3316Smrg 264897cf2ee2Smrgif test x"[$]$2" = xyes; then 264997cf2ee2Smrg m4_if([$5], , :, [$5]) 265097cf2ee2Smrgelse 265197cf2ee2Smrg m4_if([$6], , :, [$6]) 265297cf2ee2Smrgfi 265397cf2ee2Smrg])# _LT_COMPILER_OPTION 26546e7d3316Smrg 265597cf2ee2Smrg# Old name: 265697cf2ee2SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 265797cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 265897cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 26596e7d3316Smrg 26606e7d3316Smrg 266197cf2ee2Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 266297cf2ee2Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 266397cf2ee2Smrg# ---------------------------------------------------- 266497cf2ee2Smrg# Check whether the given linker option works 266597cf2ee2SmrgAC_DEFUN([_LT_LINKER_OPTION], 266697cf2ee2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 266797cf2ee2Smrgm4_require([_LT_DECL_SED])dnl 266897cf2ee2SmrgAC_CACHE_CHECK([$1], [$2], 266997cf2ee2Smrg [$2=no 267097cf2ee2Smrg save_LDFLAGS="$LDFLAGS" 267197cf2ee2Smrg LDFLAGS="$LDFLAGS $3" 267297cf2ee2Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 267397cf2ee2Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 267497cf2ee2Smrg # The linker can only warn and ignore the option if not recognized 267597cf2ee2Smrg # So say no if there are warnings 267697cf2ee2Smrg if test -s conftest.err; then 267797cf2ee2Smrg # Append any errors to the config.log. 267897cf2ee2Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 267997cf2ee2Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 268097cf2ee2Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 268197cf2ee2Smrg if diff conftest.exp conftest.er2 >/dev/null; then 268297cf2ee2Smrg $2=yes 268397cf2ee2Smrg fi 268497cf2ee2Smrg else 268597cf2ee2Smrg $2=yes 268697cf2ee2Smrg fi 268797cf2ee2Smrg fi 268897cf2ee2Smrg $RM -r conftest* 268997cf2ee2Smrg LDFLAGS="$save_LDFLAGS" 269097cf2ee2Smrg]) 26916e7d3316Smrg 269297cf2ee2Smrgif test x"[$]$2" = xyes; then 269397cf2ee2Smrg m4_if([$4], , :, [$4]) 269497cf2ee2Smrgelse 269597cf2ee2Smrg m4_if([$5], , :, [$5]) 269697cf2ee2Smrgfi 269797cf2ee2Smrg])# _LT_LINKER_OPTION 26986e7d3316Smrg 269997cf2ee2Smrg# Old name: 270097cf2ee2SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 270197cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 270297cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 27036e7d3316Smrg 27046e7d3316Smrg 270597cf2ee2Smrg# LT_CMD_MAX_LEN 270697cf2ee2Smrg#--------------- 270797cf2ee2SmrgAC_DEFUN([LT_CMD_MAX_LEN], 270897cf2ee2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 270997cf2ee2Smrg# find the maximum length of command line arguments 271097cf2ee2SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 271197cf2ee2SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 271297cf2ee2Smrg i=0 271397cf2ee2Smrg teststring="ABCD" 27146e7d3316Smrg 271597cf2ee2Smrg case $build_os in 271697cf2ee2Smrg msdosdjgpp*) 271797cf2ee2Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 271897cf2ee2Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 271997cf2ee2Smrg # during glob expansion). Even if it were fixed, the result of this 272097cf2ee2Smrg # check would be larger than it should be. 272197cf2ee2Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 272297cf2ee2Smrg ;; 27236e7d3316Smrg 272497cf2ee2Smrg gnu*) 272597cf2ee2Smrg # Under GNU Hurd, this test is not required because there is 272697cf2ee2Smrg # no limit to the length of command line arguments. 272797cf2ee2Smrg # Libtool will interpret -1 as no limit whatsoever 272897cf2ee2Smrg lt_cv_sys_max_cmd_len=-1; 272997cf2ee2Smrg ;; 27306e7d3316Smrg 273197cf2ee2Smrg cygwin* | mingw* | cegcc*) 273297cf2ee2Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 273397cf2ee2Smrg # about 5 minutes as the teststring grows exponentially. 273497cf2ee2Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 273597cf2ee2Smrg # you end up with a "frozen" computer, even though with patience 273697cf2ee2Smrg # the test eventually succeeds (with a max line length of 256k). 273797cf2ee2Smrg # Instead, let's just punt: use the minimum linelength reported by 273897cf2ee2Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 273997cf2ee2Smrg lt_cv_sys_max_cmd_len=8192; 274097cf2ee2Smrg ;; 27416e7d3316Smrg 274297cf2ee2Smrg mint*) 274397cf2ee2Smrg # On MiNT this can take a long time and run out of memory. 274497cf2ee2Smrg lt_cv_sys_max_cmd_len=8192; 274597cf2ee2Smrg ;; 27466e7d3316Smrg 274797cf2ee2Smrg amigaos*) 274897cf2ee2Smrg # On AmigaOS with pdksh, this test takes hours, literally. 274997cf2ee2Smrg # So we just punt and use a minimum line length of 8192. 275097cf2ee2Smrg lt_cv_sys_max_cmd_len=8192; 275197cf2ee2Smrg ;; 27526e7d3316Smrg 275397cf2ee2Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 275497cf2ee2Smrg # This has been around since 386BSD, at least. Likely further. 275597cf2ee2Smrg if test -x /sbin/sysctl; then 275697cf2ee2Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 275797cf2ee2Smrg elif test -x /usr/sbin/sysctl; then 275897cf2ee2Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 275997cf2ee2Smrg else 276097cf2ee2Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 276197cf2ee2Smrg fi 276297cf2ee2Smrg # And add a safety zone 276397cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 276497cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 276597cf2ee2Smrg ;; 27666e7d3316Smrg 276797cf2ee2Smrg interix*) 276897cf2ee2Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 276997cf2ee2Smrg lt_cv_sys_max_cmd_len=196608 277097cf2ee2Smrg ;; 27716e7d3316Smrg 277297cf2ee2Smrg osf*) 277397cf2ee2Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 277497cf2ee2Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 277597cf2ee2Smrg # nice to cause kernel panics so lets avoid the loop below. 277697cf2ee2Smrg # First set a reasonable default. 277797cf2ee2Smrg lt_cv_sys_max_cmd_len=16384 277897cf2ee2Smrg # 277997cf2ee2Smrg if test -x /sbin/sysconfig; then 278097cf2ee2Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 278197cf2ee2Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 278297cf2ee2Smrg esac 278397cf2ee2Smrg fi 278497cf2ee2Smrg ;; 278597cf2ee2Smrg sco3.2v5*) 278697cf2ee2Smrg lt_cv_sys_max_cmd_len=102400 278797cf2ee2Smrg ;; 278897cf2ee2Smrg sysv5* | sco5v6* | sysv4.2uw2*) 278997cf2ee2Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 279097cf2ee2Smrg if test -n "$kargmax"; then 279197cf2ee2Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 279297cf2ee2Smrg else 279397cf2ee2Smrg lt_cv_sys_max_cmd_len=32768 279497cf2ee2Smrg fi 279597cf2ee2Smrg ;; 279697cf2ee2Smrg *) 279797cf2ee2Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 279897cf2ee2Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 279997cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 280097cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 280197cf2ee2Smrg else 280297cf2ee2Smrg # Make teststring a little bigger before we do anything with it. 280397cf2ee2Smrg # a 1K string should be a reasonable start. 280497cf2ee2Smrg for i in 1 2 3 4 5 6 7 8 ; do 280597cf2ee2Smrg teststring=$teststring$teststring 280697cf2ee2Smrg done 280797cf2ee2Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 280897cf2ee2Smrg # If test is not a shell built-in, we'll probably end up computing a 280997cf2ee2Smrg # maximum length that is only half of the actual maximum length, but 281097cf2ee2Smrg # we can't tell. 281197cf2ee2Smrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 281297cf2ee2Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 281397cf2ee2Smrg test $i != 17 # 1/2 MB should be enough 281497cf2ee2Smrg do 281597cf2ee2Smrg i=`expr $i + 1` 281697cf2ee2Smrg teststring=$teststring$teststring 281797cf2ee2Smrg done 281897cf2ee2Smrg # Only check the string length outside the loop. 281997cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 282097cf2ee2Smrg teststring= 282197cf2ee2Smrg # Add a significant safety factor because C++ compilers can tack on 282297cf2ee2Smrg # massive amounts of additional arguments before passing them to the 282397cf2ee2Smrg # linker. It appears as though 1/2 is a usable value. 282497cf2ee2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 282597cf2ee2Smrg fi 282697cf2ee2Smrg ;; 282797cf2ee2Smrg esac 282897cf2ee2Smrg]) 282997cf2ee2Smrgif test -n $lt_cv_sys_max_cmd_len ; then 283097cf2ee2Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 283197cf2ee2Smrgelse 283297cf2ee2Smrg AC_MSG_RESULT(none) 283397cf2ee2Smrgfi 283497cf2ee2Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 283597cf2ee2Smrg_LT_DECL([], [max_cmd_len], [0], 283697cf2ee2Smrg [What is the maximum length of a command?]) 283797cf2ee2Smrg])# LT_CMD_MAX_LEN 28386e7d3316Smrg 283997cf2ee2Smrg# Old name: 284097cf2ee2SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 28416e7d3316Smrgdnl aclocal-1.4 backwards compatibility: 284297cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 28436e7d3316Smrg 28446e7d3316Smrg 284597cf2ee2Smrg# _LT_HEADER_DLFCN 28466e7d3316Smrg# ---------------- 284797cf2ee2Smrgm4_defun([_LT_HEADER_DLFCN], 284897cf2ee2Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 284997cf2ee2Smrg])# _LT_HEADER_DLFCN 28506e7d3316Smrg 28516e7d3316Smrg 285297cf2ee2Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 285397cf2ee2Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 285497cf2ee2Smrg# ---------------------------------------------------------------- 285597cf2ee2Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 285697cf2ee2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 285797cf2ee2Smrgif test "$cross_compiling" = yes; then : 285897cf2ee2Smrg [$4] 285997cf2ee2Smrgelse 286097cf2ee2Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 286197cf2ee2Smrg lt_status=$lt_dlunknown 286297cf2ee2Smrg cat > conftest.$ac_ext <<_LT_EOF 286397cf2ee2Smrg[#line $LINENO "configure" 286497cf2ee2Smrg#include "confdefs.h" 28656e7d3316Smrg 286697cf2ee2Smrg#if HAVE_DLFCN_H 286797cf2ee2Smrg#include <dlfcn.h> 286897cf2ee2Smrg#endif 28696e7d3316Smrg 287097cf2ee2Smrg#include <stdio.h> 287197cf2ee2Smrg 287297cf2ee2Smrg#ifdef RTLD_GLOBAL 287397cf2ee2Smrg# define LT_DLGLOBAL RTLD_GLOBAL 287497cf2ee2Smrg#else 287597cf2ee2Smrg# ifdef DL_GLOBAL 287697cf2ee2Smrg# define LT_DLGLOBAL DL_GLOBAL 287797cf2ee2Smrg# else 287897cf2ee2Smrg# define LT_DLGLOBAL 0 287997cf2ee2Smrg# endif 288097cf2ee2Smrg#endif 28816e7d3316Smrg 288297cf2ee2Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 288397cf2ee2Smrg find out it does not work in some platform. */ 288497cf2ee2Smrg#ifndef LT_DLLAZY_OR_NOW 288597cf2ee2Smrg# ifdef RTLD_LAZY 288697cf2ee2Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 288797cf2ee2Smrg# else 288897cf2ee2Smrg# ifdef DL_LAZY 288997cf2ee2Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 289097cf2ee2Smrg# else 289197cf2ee2Smrg# ifdef RTLD_NOW 289297cf2ee2Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 289397cf2ee2Smrg# else 289497cf2ee2Smrg# ifdef DL_NOW 289597cf2ee2Smrg# define LT_DLLAZY_OR_NOW DL_NOW 289697cf2ee2Smrg# else 289797cf2ee2Smrg# define LT_DLLAZY_OR_NOW 0 289897cf2ee2Smrg# endif 289997cf2ee2Smrg# endif 290097cf2ee2Smrg# endif 290197cf2ee2Smrg# endif 290297cf2ee2Smrg#endif 29036e7d3316Smrg 290497cf2ee2Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 290597cf2ee2Smrg correspondingly for the symbols needed. */ 290697cf2ee2Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 290797cf2ee2Smrgint fnord () __attribute__((visibility("default"))); 290897cf2ee2Smrg#endif 29096e7d3316Smrg 291097cf2ee2Smrgint fnord () { return 42; } 291197cf2ee2Smrgint main () 291297cf2ee2Smrg{ 291397cf2ee2Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 291497cf2ee2Smrg int status = $lt_dlunknown; 29156e7d3316Smrg 291697cf2ee2Smrg if (self) 291797cf2ee2Smrg { 291897cf2ee2Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 291997cf2ee2Smrg else 292097cf2ee2Smrg { 292197cf2ee2Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 292297cf2ee2Smrg else puts (dlerror ()); 292397cf2ee2Smrg } 292497cf2ee2Smrg /* dlclose (self); */ 292597cf2ee2Smrg } 292697cf2ee2Smrg else 292797cf2ee2Smrg puts (dlerror ()); 292897cf2ee2Smrg 292997cf2ee2Smrg return status; 293097cf2ee2Smrg}] 293197cf2ee2Smrg_LT_EOF 293297cf2ee2Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 293397cf2ee2Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 293497cf2ee2Smrg lt_status=$? 293597cf2ee2Smrg case x$lt_status in 293697cf2ee2Smrg x$lt_dlno_uscore) $1 ;; 293797cf2ee2Smrg x$lt_dlneed_uscore) $2 ;; 293897cf2ee2Smrg x$lt_dlunknown|x*) $3 ;; 293997cf2ee2Smrg esac 294097cf2ee2Smrg else : 294197cf2ee2Smrg # compilation failed 294297cf2ee2Smrg $3 294397cf2ee2Smrg fi 294497cf2ee2Smrgfi 294597cf2ee2Smrgrm -fr conftest* 294697cf2ee2Smrg])# _LT_TRY_DLOPEN_SELF 294797cf2ee2Smrg 294897cf2ee2Smrg 294997cf2ee2Smrg# LT_SYS_DLOPEN_SELF 295097cf2ee2Smrg# ------------------ 295197cf2ee2SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 295297cf2ee2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 295397cf2ee2Smrgif test "x$enable_dlopen" != xyes; then 295497cf2ee2Smrg enable_dlopen=unknown 295597cf2ee2Smrg enable_dlopen_self=unknown 295697cf2ee2Smrg enable_dlopen_self_static=unknown 295797cf2ee2Smrgelse 295897cf2ee2Smrg lt_cv_dlopen=no 295997cf2ee2Smrg lt_cv_dlopen_libs= 29606e7d3316Smrg 29616e7d3316Smrg case $host_os in 296297cf2ee2Smrg beos*) 296397cf2ee2Smrg lt_cv_dlopen="load_add_on" 296497cf2ee2Smrg lt_cv_dlopen_libs= 296597cf2ee2Smrg lt_cv_dlopen_self=yes 296697cf2ee2Smrg ;; 29676e7d3316Smrg 296897cf2ee2Smrg mingw* | pw32* | cegcc*) 296997cf2ee2Smrg lt_cv_dlopen="LoadLibrary" 297097cf2ee2Smrg lt_cv_dlopen_libs= 29712e2dd055Smrg ;; 297297cf2ee2Smrg 297397cf2ee2Smrg cygwin*) 297497cf2ee2Smrg lt_cv_dlopen="dlopen" 297597cf2ee2Smrg lt_cv_dlopen_libs= 29762e2dd055Smrg ;; 2977a966c04fSmrg 297897cf2ee2Smrg darwin*) 297997cf2ee2Smrg # if libdl is installed we need to link against it 298097cf2ee2Smrg AC_CHECK_LIB([dl], [dlopen], 298197cf2ee2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 298297cf2ee2Smrg lt_cv_dlopen="dyld" 298397cf2ee2Smrg lt_cv_dlopen_libs= 298497cf2ee2Smrg lt_cv_dlopen_self=yes 298597cf2ee2Smrg ]) 298697cf2ee2Smrg ;; 29876e7d3316Smrg 298897cf2ee2Smrg *) 298997cf2ee2Smrg AC_CHECK_FUNC([shl_load], 299097cf2ee2Smrg [lt_cv_dlopen="shl_load"], 299197cf2ee2Smrg [AC_CHECK_LIB([dld], [shl_load], 299297cf2ee2Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 299397cf2ee2Smrg [AC_CHECK_FUNC([dlopen], 299497cf2ee2Smrg [lt_cv_dlopen="dlopen"], 299597cf2ee2Smrg [AC_CHECK_LIB([dl], [dlopen], 299697cf2ee2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 299797cf2ee2Smrg [AC_CHECK_LIB([svld], [dlopen], 299897cf2ee2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 299997cf2ee2Smrg [AC_CHECK_LIB([dld], [dld_link], 300097cf2ee2Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 300197cf2ee2Smrg ]) 300297cf2ee2Smrg ]) 300397cf2ee2Smrg ]) 300497cf2ee2Smrg ]) 300597cf2ee2Smrg ]) 300697cf2ee2Smrg ;; 30076e7d3316Smrg esac 300897cf2ee2Smrg 300997cf2ee2Smrg if test "x$lt_cv_dlopen" != xno; then 301097cf2ee2Smrg enable_dlopen=yes 30116e7d3316Smrg else 301297cf2ee2Smrg enable_dlopen=no 30136e7d3316Smrg fi 30146e7d3316Smrg 301597cf2ee2Smrg case $lt_cv_dlopen in 301697cf2ee2Smrg dlopen) 301797cf2ee2Smrg save_CPPFLAGS="$CPPFLAGS" 301897cf2ee2Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3019a966c04fSmrg 302097cf2ee2Smrg save_LDFLAGS="$LDFLAGS" 302197cf2ee2Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3022a966c04fSmrg 302397cf2ee2Smrg save_LIBS="$LIBS" 302497cf2ee2Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 302597cf2ee2Smrg 302697cf2ee2Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 302797cf2ee2Smrg lt_cv_dlopen_self, [dnl 302897cf2ee2Smrg _LT_TRY_DLOPEN_SELF( 302997cf2ee2Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 303097cf2ee2Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 303197cf2ee2Smrg ]) 3032a966c04fSmrg 303397cf2ee2Smrg if test "x$lt_cv_dlopen_self" = xyes; then 303497cf2ee2Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 303597cf2ee2Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 303697cf2ee2Smrg lt_cv_dlopen_self_static, [dnl 303797cf2ee2Smrg _LT_TRY_DLOPEN_SELF( 303897cf2ee2Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 303997cf2ee2Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 304097cf2ee2Smrg ]) 304197cf2ee2Smrg fi 3042a966c04fSmrg 304397cf2ee2Smrg CPPFLAGS="$save_CPPFLAGS" 304497cf2ee2Smrg LDFLAGS="$save_LDFLAGS" 304597cf2ee2Smrg LIBS="$save_LIBS" 304697cf2ee2Smrg ;; 304797cf2ee2Smrg esac 3048a966c04fSmrg 304997cf2ee2Smrg case $lt_cv_dlopen_self in 305097cf2ee2Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 305197cf2ee2Smrg *) enable_dlopen_self=unknown ;; 305297cf2ee2Smrg esac 30536e7d3316Smrg 305497cf2ee2Smrg case $lt_cv_dlopen_self_static in 305597cf2ee2Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 305697cf2ee2Smrg *) enable_dlopen_self_static=unknown ;; 305797cf2ee2Smrg esac 3058a966c04fSmrgfi 305997cf2ee2Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 306097cf2ee2Smrg [Whether dlopen is supported]) 306197cf2ee2Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 306297cf2ee2Smrg [Whether dlopen of programs is supported]) 306397cf2ee2Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 306497cf2ee2Smrg [Whether dlopen of statically linked programs is supported]) 306597cf2ee2Smrg])# LT_SYS_DLOPEN_SELF 3066a966c04fSmrg 306797cf2ee2Smrg# Old name: 306897cf2ee2SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 306997cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 307097cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 3071a966c04fSmrg 3072a966c04fSmrg 307397cf2ee2Smrg# _LT_COMPILER_C_O([TAGNAME]) 307497cf2ee2Smrg# --------------------------- 307597cf2ee2Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 307697cf2ee2Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 307797cf2ee2Smrgm4_defun([_LT_COMPILER_C_O], 307897cf2ee2Smrg[m4_require([_LT_DECL_SED])dnl 307997cf2ee2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 308097cf2ee2Smrgm4_require([_LT_TAG_COMPILER])dnl 308197cf2ee2SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 308297cf2ee2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 308397cf2ee2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 308497cf2ee2Smrg $RM -r conftest 2>/dev/null 308597cf2ee2Smrg mkdir conftest 308697cf2ee2Smrg cd conftest 308797cf2ee2Smrg mkdir out 30882e2dd055Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 308997cf2ee2Smrg 309097cf2ee2Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 3091a966c04fSmrg # Insert the option either (1) after the last *FLAGS variable, or 3092a966c04fSmrg # (2) before a word containing "conftest.", or (3) at the end. 3093a966c04fSmrg # Note that $ac_compile itself does not contain backslashes and begins 3094a966c04fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 3095a966c04fSmrg lt_compile=`echo "$ac_compile" | $SED \ 3096a966c04fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3097a966c04fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3098a966c04fSmrg -e 's:$: $lt_compiler_flag:'` 30996e7d3316Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 310097cf2ee2Smrg (eval "$lt_compile" 2>out/conftest.err) 3101a966c04fSmrg ac_status=$? 310297cf2ee2Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 31036e7d3316Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 310497cf2ee2Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 310597cf2ee2Smrg then 3106a966c04fSmrg # The compiler can only warn and ignore the option if not recognized 310797cf2ee2Smrg # So say no if there are warnings 310897cf2ee2Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 310997cf2ee2Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 311097cf2ee2Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 311197cf2ee2Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3112a966c04fSmrg fi 3113a966c04fSmrg fi 311497cf2ee2Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 311597cf2ee2Smrg $RM conftest* 311697cf2ee2Smrg # SGI C++ compiler will create directory out/ii_files/ for 311797cf2ee2Smrg # template instantiation 311897cf2ee2Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 311997cf2ee2Smrg $RM out/* && rmdir out 312097cf2ee2Smrg cd .. 312197cf2ee2Smrg $RM -r conftest 31226e7d3316Smrg $RM conftest* 3123a966c04fSmrg]) 312497cf2ee2Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 312597cf2ee2Smrg [Does compiler simultaneously support -c and -o options?]) 312697cf2ee2Smrg])# _LT_COMPILER_C_O 3127a966c04fSmrg 31286e7d3316Smrg 312997cf2ee2Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 313097cf2ee2Smrg# ---------------------------------- 313197cf2ee2Smrg# Check to see if we can do hard links to lock some files if needed 313297cf2ee2Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 313397cf2ee2Smrg[m4_require([_LT_ENABLE_LOCK])dnl 313497cf2ee2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 313597cf2ee2Smrg_LT_COMPILER_C_O([$1]) 3136a966c04fSmrg 313797cf2ee2Smrghard_links="nottested" 313897cf2ee2Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 313997cf2ee2Smrg # do not overwrite the value of need_locks provided by the user 314097cf2ee2Smrg AC_MSG_CHECKING([if we can lock with hard links]) 314197cf2ee2Smrg hard_links=yes 314297cf2ee2Smrg $RM conftest* 314397cf2ee2Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 314497cf2ee2Smrg touch conftest.a 314597cf2ee2Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 314697cf2ee2Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 314797cf2ee2Smrg AC_MSG_RESULT([$hard_links]) 314897cf2ee2Smrg if test "$hard_links" = no; then 314997cf2ee2Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 315097cf2ee2Smrg need_locks=warn 315197cf2ee2Smrg fi 3152a966c04fSmrgelse 315397cf2ee2Smrg need_locks=no 3154a966c04fSmrgfi 315597cf2ee2Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 315697cf2ee2Smrg])# _LT_COMPILER_FILE_LOCKS 3157a966c04fSmrg 31586e7d3316Smrg 315997cf2ee2Smrg# _LT_CHECK_OBJDIR 316097cf2ee2Smrg# ---------------- 316197cf2ee2Smrgm4_defun([_LT_CHECK_OBJDIR], 316297cf2ee2Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 316397cf2ee2Smrg[rm -f .libs 2>/dev/null 316497cf2ee2Smrgmkdir .libs 2>/dev/null 316597cf2ee2Smrgif test -d .libs; then 316697cf2ee2Smrg lt_cv_objdir=.libs 316797cf2ee2Smrgelse 316897cf2ee2Smrg # MS-DOS does not allow filenames that begin with a dot. 316997cf2ee2Smrg lt_cv_objdir=_libs 317097cf2ee2Smrgfi 317197cf2ee2Smrgrmdir .libs 2>/dev/null]) 317297cf2ee2Smrgobjdir=$lt_cv_objdir 317397cf2ee2Smrg_LT_DECL([], [objdir], [0], 317497cf2ee2Smrg [The name of the directory that contains temporary libtool files])dnl 317597cf2ee2Smrgm4_pattern_allow([LT_OBJDIR])dnl 317697cf2ee2SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 317797cf2ee2Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 317897cf2ee2Smrg])# _LT_CHECK_OBJDIR 3179a966c04fSmrg 3180a966c04fSmrg 318197cf2ee2Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 318297cf2ee2Smrg# -------------------------------------- 318397cf2ee2Smrg# Check hardcoding attributes. 318497cf2ee2Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 318597cf2ee2Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 318697cf2ee2Smrg_LT_TAGVAR(hardcode_action, $1)= 318797cf2ee2Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 318897cf2ee2Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 318997cf2ee2Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3190a966c04fSmrg 319197cf2ee2Smrg # We can hardcode non-existent directories. 319297cf2ee2Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 319397cf2ee2Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 319497cf2ee2Smrg # have to relink, otherwise we might link with an installed library 319597cf2ee2Smrg # when we should be linking with a yet-to-be-installed one 319697cf2ee2Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 319797cf2ee2Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 319897cf2ee2Smrg # Linking always hardcodes the temporary library directory. 319997cf2ee2Smrg _LT_TAGVAR(hardcode_action, $1)=relink 320097cf2ee2Smrg else 320197cf2ee2Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 320297cf2ee2Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 320397cf2ee2Smrg fi 320497cf2ee2Smrgelse 320597cf2ee2Smrg # We cannot hardcode anything, or else we can only hardcode existing 320697cf2ee2Smrg # directories. 320797cf2ee2Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 320897cf2ee2Smrgfi 320997cf2ee2SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3210a966c04fSmrg 321197cf2ee2Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 321297cf2ee2Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 321397cf2ee2Smrg # Fast installation is not supported 321497cf2ee2Smrg enable_fast_install=no 321597cf2ee2Smrgelif test "$shlibpath_overrides_runpath" = yes || 321697cf2ee2Smrg test "$enable_shared" = no; then 321797cf2ee2Smrg # Fast installation is not necessary 321897cf2ee2Smrg enable_fast_install=needless 321997cf2ee2Smrgfi 322097cf2ee2Smrg_LT_TAGDECL([], [hardcode_action], [0], 322197cf2ee2Smrg [How to hardcode a shared library path into an executable]) 322297cf2ee2Smrg])# _LT_LINKER_HARDCODE_LIBPATH 32236e7d3316Smrg 3224a966c04fSmrg 322597cf2ee2Smrg# _LT_CMD_STRIPLIB 322697cf2ee2Smrg# ---------------- 322797cf2ee2Smrgm4_defun([_LT_CMD_STRIPLIB], 322897cf2ee2Smrg[m4_require([_LT_DECL_EGREP]) 322997cf2ee2Smrgstriplib= 323097cf2ee2Smrgold_striplib= 323197cf2ee2SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 323297cf2ee2Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 323397cf2ee2Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 323497cf2ee2Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 323597cf2ee2Smrg AC_MSG_RESULT([yes]) 323697cf2ee2Smrgelse 323797cf2ee2Smrg# FIXME - insert some real tests, host_os isn't really good enough 323897cf2ee2Smrg case $host_os in 323997cf2ee2Smrg darwin*) 324097cf2ee2Smrg if test -n "$STRIP" ; then 324197cf2ee2Smrg striplib="$STRIP -x" 324297cf2ee2Smrg old_striplib="$STRIP -S" 324397cf2ee2Smrg AC_MSG_RESULT([yes]) 3244a966c04fSmrg else 324597cf2ee2Smrg AC_MSG_RESULT([no]) 3246a966c04fSmrg fi 3247a966c04fSmrg ;; 324897cf2ee2Smrg *) 324997cf2ee2Smrg AC_MSG_RESULT([no]) 3250a966c04fSmrg ;; 325197cf2ee2Smrg esac 325297cf2ee2Smrgfi 325397cf2ee2Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 325497cf2ee2Smrg_LT_DECL([], [striplib], [1]) 325597cf2ee2Smrg])# _LT_CMD_STRIPLIB 3256a966c04fSmrg 325797cf2ee2Smrg 325897cf2ee2Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 325997cf2ee2Smrg# ----------------------------- 326097cf2ee2Smrg# PORTME Fill in your ld.so characteristics 326197cf2ee2Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 326297cf2ee2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 326397cf2ee2Smrgm4_require([_LT_DECL_EGREP])dnl 326497cf2ee2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 326597cf2ee2Smrgm4_require([_LT_DECL_OBJDUMP])dnl 326697cf2ee2Smrgm4_require([_LT_DECL_SED])dnl 326797cf2ee2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 326897cf2ee2SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 326997cf2ee2Smrgm4_if([$1], 327097cf2ee2Smrg [], [ 327197cf2ee2Smrgif test "$GCC" = yes; then 327297cf2ee2Smrg case $host_os in 327397cf2ee2Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 327497cf2ee2Smrg *) lt_awk_arg="/^libraries:/" ;; 327597cf2ee2Smrg esac 327697cf2ee2Smrg case $host_os in 327797cf2ee2Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 327897cf2ee2Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 327997cf2ee2Smrg esac 328097cf2ee2Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 328197cf2ee2Smrg case $lt_search_path_spec in 328297cf2ee2Smrg *\;*) 328397cf2ee2Smrg # if the path contains ";" then we assume it to be the separator 328497cf2ee2Smrg # otherwise default to the standard path separator (i.e. ":") - it is 328597cf2ee2Smrg # assumed that no part of a normal pathname contains ";" but that should 328697cf2ee2Smrg # okay in the real world where ";" in dirpaths is itself problematic. 328797cf2ee2Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 3288a966c04fSmrg ;; 3289a966c04fSmrg *) 329097cf2ee2Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 329197cf2ee2Smrg ;; 329297cf2ee2Smrg esac 329397cf2ee2Smrg # Ok, now we have the path, separated by spaces, we can step through it 329497cf2ee2Smrg # and add multilib dir if necessary. 329597cf2ee2Smrg lt_tmp_lt_search_path_spec= 329697cf2ee2Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 329797cf2ee2Smrg for lt_sys_path in $lt_search_path_spec; do 329897cf2ee2Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 329997cf2ee2Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 33002e2dd055Smrg else 330197cf2ee2Smrg test -d "$lt_sys_path" && \ 330297cf2ee2Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 33032e2dd055Smrg fi 330497cf2ee2Smrg done 330597cf2ee2Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 330697cf2ee2SmrgBEGIN {RS=" "; FS="/|\n";} { 330797cf2ee2Smrg lt_foo=""; 330897cf2ee2Smrg lt_count=0; 330997cf2ee2Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 331097cf2ee2Smrg if ($lt_i != "" && $lt_i != ".") { 331197cf2ee2Smrg if ($lt_i == "..") { 331297cf2ee2Smrg lt_count++; 331397cf2ee2Smrg } else { 331497cf2ee2Smrg if (lt_count == 0) { 331597cf2ee2Smrg lt_foo="/" $lt_i lt_foo; 331697cf2ee2Smrg } else { 331797cf2ee2Smrg lt_count--; 331897cf2ee2Smrg } 331997cf2ee2Smrg } 332097cf2ee2Smrg } 332197cf2ee2Smrg } 332297cf2ee2Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 332397cf2ee2Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 332497cf2ee2Smrg}'` 332597cf2ee2Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 332697cf2ee2Smrg # for these hosts. 332797cf2ee2Smrg case $host_os in 332897cf2ee2Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 332997cf2ee2Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 3330a966c04fSmrg esac 333197cf2ee2Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 3332a966c04fSmrgelse 333397cf2ee2Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 333497cf2ee2Smrgfi]) 333597cf2ee2Smrglibrary_names_spec= 333697cf2ee2Smrglibname_spec='lib$name' 333797cf2ee2Smrgsoname_spec= 333897cf2ee2Smrgshrext_cmds=".so" 333997cf2ee2Smrgpostinstall_cmds= 334097cf2ee2Smrgpostuninstall_cmds= 334197cf2ee2Smrgfinish_cmds= 334297cf2ee2Smrgfinish_eval= 334397cf2ee2Smrgshlibpath_var= 334497cf2ee2Smrgshlibpath_overrides_runpath=unknown 334597cf2ee2Smrgversion_type=none 334697cf2ee2Smrgdynamic_linker="$host_os ld.so" 334797cf2ee2Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 334897cf2ee2Smrgneed_lib_prefix=unknown 334997cf2ee2Smrghardcode_into_libs=no 3350a966c04fSmrg 335197cf2ee2Smrg# when you set need_version to no, make sure it does not cause -set_version 335297cf2ee2Smrg# flags to be left without arguments 335397cf2ee2Smrgneed_version=unknown 3354a966c04fSmrg 335597cf2ee2Smrgcase $host_os in 335697cf2ee2Smrgaix3*) 335797cf2ee2Smrg version_type=linux 335897cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 335997cf2ee2Smrg shlibpath_var=LIBPATH 33606e7d3316Smrg 336197cf2ee2Smrg # AIX 3 has no versioning support, so we append a major version to the name. 336297cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 336397cf2ee2Smrg ;; 3364a966c04fSmrg 336597cf2ee2Smrgaix[[4-9]]*) 336697cf2ee2Smrg version_type=linux 336797cf2ee2Smrg need_lib_prefix=no 336897cf2ee2Smrg need_version=no 336997cf2ee2Smrg hardcode_into_libs=yes 337097cf2ee2Smrg if test "$host_cpu" = ia64; then 337197cf2ee2Smrg # AIX 5 supports IA64 337297cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 337397cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 337497cf2ee2Smrg else 337597cf2ee2Smrg # With GCC up to 2.95.x, collect2 would create an import file 337697cf2ee2Smrg # for dependence libraries. The import file would start with 337797cf2ee2Smrg # the line `#! .'. This would cause the generated library to 337897cf2ee2Smrg # depend on `.', always an invalid library. This was fixed in 337997cf2ee2Smrg # development snapshots of GCC prior to 3.0. 338097cf2ee2Smrg case $host_os in 338197cf2ee2Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 338297cf2ee2Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 338397cf2ee2Smrg echo ' yes ' 338497cf2ee2Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 338597cf2ee2Smrg : 338697cf2ee2Smrg else 338797cf2ee2Smrg can_build_shared=no 338897cf2ee2Smrg fi 338997cf2ee2Smrg ;; 339097cf2ee2Smrg esac 339197cf2ee2Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 339297cf2ee2Smrg # soname into executable. Probably we can add versioning support to 339397cf2ee2Smrg # collect2, so additional links can be useful in future. 339497cf2ee2Smrg if test "$aix_use_runtimelinking" = yes; then 339597cf2ee2Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 339697cf2ee2Smrg # instead of lib<name>.a to let people know that these are not 339797cf2ee2Smrg # typical AIX shared libraries. 339897cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 339997cf2ee2Smrg else 340097cf2ee2Smrg # We preserve .a as extension for shared libraries through AIX4.2 340197cf2ee2Smrg # and later when we are not doing run time linking. 340297cf2ee2Smrg library_names_spec='${libname}${release}.a $libname.a' 340397cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 340497cf2ee2Smrg fi 340597cf2ee2Smrg shlibpath_var=LIBPATH 340697cf2ee2Smrg fi 340797cf2ee2Smrg ;; 3408a966c04fSmrg 340997cf2ee2Smrgamigaos*) 341097cf2ee2Smrg case $host_cpu in 341197cf2ee2Smrg powerpc) 341297cf2ee2Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 341397cf2ee2Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 341497cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 341597cf2ee2Smrg ;; 341697cf2ee2Smrg m68k) 341797cf2ee2Smrg library_names_spec='$libname.ixlibrary $libname.a' 341897cf2ee2Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 341997cf2ee2Smrg 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' 342097cf2ee2Smrg ;; 342197cf2ee2Smrg esac 342297cf2ee2Smrg ;; 3423a966c04fSmrg 342497cf2ee2Smrgbeos*) 342597cf2ee2Smrg library_names_spec='${libname}${shared_ext}' 342697cf2ee2Smrg dynamic_linker="$host_os ld.so" 342797cf2ee2Smrg shlibpath_var=LIBRARY_PATH 342897cf2ee2Smrg ;; 3429a966c04fSmrg 343097cf2ee2Smrgbsdi[[45]]*) 343197cf2ee2Smrg version_type=linux 343297cf2ee2Smrg need_version=no 343397cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 343497cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 343597cf2ee2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 343697cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 343797cf2ee2Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 343897cf2ee2Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 343997cf2ee2Smrg # the default ld.so.conf also contains /usr/contrib/lib and 344097cf2ee2Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 344197cf2ee2Smrg # libtool to hard-code these into programs 344297cf2ee2Smrg ;; 3443a966c04fSmrg 344497cf2ee2Smrgcygwin* | mingw* | pw32* | cegcc*) 344597cf2ee2Smrg version_type=windows 344697cf2ee2Smrg shrext_cmds=".dll" 344797cf2ee2Smrg need_version=no 344897cf2ee2Smrg need_lib_prefix=no 3449a966c04fSmrg 345097cf2ee2Smrg case $GCC,$cc_basename in 345197cf2ee2Smrg yes,*) 345297cf2ee2Smrg # gcc 345397cf2ee2Smrg library_names_spec='$libname.dll.a' 345497cf2ee2Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 345597cf2ee2Smrg postinstall_cmds='base_file=`basename \${file}`~ 345697cf2ee2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 345797cf2ee2Smrg dldir=$destdir/`dirname \$dlpath`~ 345897cf2ee2Smrg test -d \$dldir || mkdir -p \$dldir~ 345997cf2ee2Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 346097cf2ee2Smrg chmod a+x \$dldir/$dlname~ 346197cf2ee2Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 346297cf2ee2Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 346397cf2ee2Smrg fi' 346497cf2ee2Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 346597cf2ee2Smrg dlpath=$dir/\$dldll~ 346697cf2ee2Smrg $RM \$dlpath' 346797cf2ee2Smrg shlibpath_overrides_runpath=yes 3468a966c04fSmrg 346997cf2ee2Smrg case $host_os in 347097cf2ee2Smrg cygwin*) 347197cf2ee2Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 347297cf2ee2Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 347397cf2ee2Smrgm4_if([$1], [],[ 347497cf2ee2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 347597cf2ee2Smrg ;; 347697cf2ee2Smrg mingw* | cegcc*) 347797cf2ee2Smrg # MinGW DLLs use traditional 'lib' prefix 347897cf2ee2Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 347997cf2ee2Smrg ;; 348097cf2ee2Smrg pw32*) 348197cf2ee2Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 348297cf2ee2Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 348397cf2ee2Smrg ;; 348497cf2ee2Smrg esac 348597cf2ee2Smrg dynamic_linker='Win32 ld.exe' 348697cf2ee2Smrg ;; 3487a966c04fSmrg 348897cf2ee2Smrg *,cl*) 348997cf2ee2Smrg # Native MSVC 349097cf2ee2Smrg libname_spec='$name' 349197cf2ee2Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 349297cf2ee2Smrg library_names_spec='${libname}.dll.lib' 349397cf2ee2Smrg 349497cf2ee2Smrg case $build_os in 349597cf2ee2Smrg mingw*) 349697cf2ee2Smrg sys_lib_search_path_spec= 349797cf2ee2Smrg lt_save_ifs=$IFS 349897cf2ee2Smrg IFS=';' 349997cf2ee2Smrg for lt_path in $LIB 350097cf2ee2Smrg do 350197cf2ee2Smrg IFS=$lt_save_ifs 350297cf2ee2Smrg # Let DOS variable expansion print the short 8.3 style file name. 350397cf2ee2Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 350497cf2ee2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 350597cf2ee2Smrg done 350697cf2ee2Smrg IFS=$lt_save_ifs 350797cf2ee2Smrg # Convert to MSYS style. 350897cf2ee2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 350997cf2ee2Smrg ;; 351097cf2ee2Smrg cygwin*) 351197cf2ee2Smrg # Convert to unix form, then to dos form, then back to unix form 351297cf2ee2Smrg # but this time dos style (no spaces!) so that the unix form looks 351397cf2ee2Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 351497cf2ee2Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 351597cf2ee2Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 351697cf2ee2Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 351797cf2ee2Smrg ;; 351897cf2ee2Smrg *) 351997cf2ee2Smrg sys_lib_search_path_spec="$LIB" 352097cf2ee2Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 352197cf2ee2Smrg # It is most probably a Windows format PATH. 352297cf2ee2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 35236e7d3316Smrg else 352497cf2ee2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 352597cf2ee2Smrg fi 352697cf2ee2Smrg # FIXME: find the short name or the path components, as spaces are 352797cf2ee2Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 352897cf2ee2Smrg ;; 3529a966c04fSmrg esac 3530a966c04fSmrg 353197cf2ee2Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 353297cf2ee2Smrg postinstall_cmds='base_file=`basename \${file}`~ 353397cf2ee2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 353497cf2ee2Smrg dldir=$destdir/`dirname \$dlpath`~ 353597cf2ee2Smrg test -d \$dldir || mkdir -p \$dldir~ 353697cf2ee2Smrg $install_prog $dir/$dlname \$dldir/$dlname' 353797cf2ee2Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 353897cf2ee2Smrg dlpath=$dir/\$dldll~ 353997cf2ee2Smrg $RM \$dlpath' 354097cf2ee2Smrg shlibpath_overrides_runpath=yes 354197cf2ee2Smrg dynamic_linker='Win32 link.exe' 3542a966c04fSmrg ;; 3543a966c04fSmrg 354497cf2ee2Smrg *) 354597cf2ee2Smrg # Assume MSVC wrapper 354697cf2ee2Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 354797cf2ee2Smrg dynamic_linker='Win32 ld.exe' 35486e7d3316Smrg ;; 354997cf2ee2Smrg esac 355097cf2ee2Smrg # FIXME: first we should search . and the directory the executable is in 355197cf2ee2Smrg shlibpath_var=PATH 355297cf2ee2Smrg ;; 3553a966c04fSmrg 355497cf2ee2Smrgdarwin* | rhapsody*) 355597cf2ee2Smrg dynamic_linker="$host_os dyld" 355697cf2ee2Smrg version_type=darwin 355797cf2ee2Smrg need_lib_prefix=no 355897cf2ee2Smrg need_version=no 355997cf2ee2Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 356097cf2ee2Smrg soname_spec='${libname}${release}${major}$shared_ext' 356197cf2ee2Smrg shlibpath_overrides_runpath=yes 356297cf2ee2Smrg shlibpath_var=DYLD_LIBRARY_PATH 356397cf2ee2Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 356497cf2ee2Smrgm4_if([$1], [],[ 356597cf2ee2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 356697cf2ee2Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 356797cf2ee2Smrg ;; 3568a966c04fSmrg 356997cf2ee2Smrgdgux*) 357097cf2ee2Smrg version_type=linux 357197cf2ee2Smrg need_lib_prefix=no 357297cf2ee2Smrg need_version=no 357397cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 357497cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 357597cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 357697cf2ee2Smrg ;; 3577a966c04fSmrg 357897cf2ee2Smrgfreebsd1*) 357997cf2ee2Smrg dynamic_linker=no 358097cf2ee2Smrg ;; 3581a966c04fSmrg 358297cf2ee2Smrgfreebsd* | dragonfly*) 358397cf2ee2Smrg # DragonFly does not have aout. When/if they implement a new 358497cf2ee2Smrg # versioning mechanism, adjust this. 358597cf2ee2Smrg if test -x /usr/bin/objformat; then 358697cf2ee2Smrg objformat=`/usr/bin/objformat` 3587a966c04fSmrg else 358897cf2ee2Smrg case $host_os in 358997cf2ee2Smrg freebsd[[123]]*) objformat=aout ;; 359097cf2ee2Smrg *) objformat=elf ;; 359197cf2ee2Smrg esac 3592a966c04fSmrg fi 359397cf2ee2Smrg version_type=freebsd-$objformat 359497cf2ee2Smrg case $version_type in 359597cf2ee2Smrg freebsd-elf*) 359697cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 359797cf2ee2Smrg need_version=no 359897cf2ee2Smrg need_lib_prefix=no 359997cf2ee2Smrg ;; 360097cf2ee2Smrg freebsd-*) 360197cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 360297cf2ee2Smrg need_version=yes 360397cf2ee2Smrg ;; 360497cf2ee2Smrg esac 360597cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 360697cf2ee2Smrg case $host_os in 360797cf2ee2Smrg freebsd2*) 360897cf2ee2Smrg shlibpath_overrides_runpath=yes 360997cf2ee2Smrg ;; 361097cf2ee2Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 361197cf2ee2Smrg shlibpath_overrides_runpath=yes 361297cf2ee2Smrg hardcode_into_libs=yes 361397cf2ee2Smrg ;; 361497cf2ee2Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 361597cf2ee2Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 361697cf2ee2Smrg shlibpath_overrides_runpath=no 361797cf2ee2Smrg hardcode_into_libs=yes 361897cf2ee2Smrg ;; 361997cf2ee2Smrg *) # from 4.6 on, and DragonFly 362097cf2ee2Smrg shlibpath_overrides_runpath=yes 362197cf2ee2Smrg hardcode_into_libs=yes 362297cf2ee2Smrg ;; 362397cf2ee2Smrg esac 362497cf2ee2Smrg ;; 3625a966c04fSmrg 362697cf2ee2Smrggnu*) 362797cf2ee2Smrg version_type=linux 362897cf2ee2Smrg need_lib_prefix=no 362997cf2ee2Smrg need_version=no 363097cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 363197cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 363297cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 363397cf2ee2Smrg hardcode_into_libs=yes 363497cf2ee2Smrg ;; 3635a966c04fSmrg 363697cf2ee2Smrghaiku*) 363797cf2ee2Smrg version_type=linux 363897cf2ee2Smrg need_lib_prefix=no 363997cf2ee2Smrg need_version=no 364097cf2ee2Smrg dynamic_linker="$host_os runtime_loader" 364197cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 364297cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 364397cf2ee2Smrg shlibpath_var=LIBRARY_PATH 364497cf2ee2Smrg shlibpath_overrides_runpath=yes 364597cf2ee2Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 364697cf2ee2Smrg hardcode_into_libs=yes 364797cf2ee2Smrg ;; 3648a966c04fSmrg 364997cf2ee2Smrghpux9* | hpux10* | hpux11*) 365097cf2ee2Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 365197cf2ee2Smrg # link against other versions. 365297cf2ee2Smrg version_type=sunos 365397cf2ee2Smrg need_lib_prefix=no 365497cf2ee2Smrg need_version=no 365597cf2ee2Smrg case $host_cpu in 365697cf2ee2Smrg ia64*) 365797cf2ee2Smrg shrext_cmds='.so' 365897cf2ee2Smrg hardcode_into_libs=yes 365997cf2ee2Smrg dynamic_linker="$host_os dld.so" 366097cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 366197cf2ee2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 366297cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 366397cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 366497cf2ee2Smrg if test "X$HPUX_IA64_MODE" = X32; then 366597cf2ee2Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 366697cf2ee2Smrg else 366797cf2ee2Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3668a966c04fSmrg fi 366997cf2ee2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 367097cf2ee2Smrg ;; 367197cf2ee2Smrg hppa*64*) 367297cf2ee2Smrg shrext_cmds='.sl' 367397cf2ee2Smrg hardcode_into_libs=yes 367497cf2ee2Smrg dynamic_linker="$host_os dld.sl" 367597cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 367697cf2ee2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 367797cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 367897cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 367997cf2ee2Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 368097cf2ee2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 368197cf2ee2Smrg ;; 368297cf2ee2Smrg *) 368397cf2ee2Smrg shrext_cmds='.sl' 368497cf2ee2Smrg dynamic_linker="$host_os dld.sl" 368597cf2ee2Smrg shlibpath_var=SHLIB_PATH 368697cf2ee2Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 368797cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 368897cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 3689a966c04fSmrg ;; 3690a966c04fSmrg esac 369197cf2ee2Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 369297cf2ee2Smrg postinstall_cmds='chmod 555 $lib' 369397cf2ee2Smrg # or fails outright, so override atomically: 369497cf2ee2Smrg install_override_mode=555 369597cf2ee2Smrg ;; 3696a966c04fSmrg 369797cf2ee2Smrginterix[[3-9]]*) 369897cf2ee2Smrg version_type=linux 369997cf2ee2Smrg need_lib_prefix=no 370097cf2ee2Smrg need_version=no 370197cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 370297cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 370397cf2ee2Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 370497cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 370597cf2ee2Smrg shlibpath_overrides_runpath=no 370697cf2ee2Smrg hardcode_into_libs=yes 370797cf2ee2Smrg ;; 3708a966c04fSmrg 370997cf2ee2Smrgirix5* | irix6* | nonstopux*) 371097cf2ee2Smrg case $host_os in 371197cf2ee2Smrg nonstopux*) version_type=nonstopux ;; 371297cf2ee2Smrg *) 371397cf2ee2Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 371497cf2ee2Smrg version_type=linux 371597cf2ee2Smrg else 371697cf2ee2Smrg version_type=irix 371797cf2ee2Smrg fi ;; 3718a966c04fSmrg esac 371997cf2ee2Smrg need_lib_prefix=no 372097cf2ee2Smrg need_version=no 372197cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 372297cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 372397cf2ee2Smrg case $host_os in 372497cf2ee2Smrg irix5* | nonstopux*) 372597cf2ee2Smrg libsuff= shlibsuff= 372697cf2ee2Smrg ;; 372797cf2ee2Smrg *) 372897cf2ee2Smrg case $LD in # libtool.m4 will add one of these switches to LD 372997cf2ee2Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 373097cf2ee2Smrg libsuff= shlibsuff= libmagic=32-bit;; 373197cf2ee2Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 373297cf2ee2Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 373397cf2ee2Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 373497cf2ee2Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 373597cf2ee2Smrg *) libsuff= shlibsuff= libmagic=never-match;; 373697cf2ee2Smrg esac 373797cf2ee2Smrg ;; 373897cf2ee2Smrg esac 373997cf2ee2Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 374097cf2ee2Smrg shlibpath_overrides_runpath=no 374197cf2ee2Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 374297cf2ee2Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 374397cf2ee2Smrg hardcode_into_libs=yes 374497cf2ee2Smrg ;; 37456e7d3316Smrg 374697cf2ee2Smrg# No shared lib support for Linux oldld, aout, or coff. 374797cf2ee2Smrglinux*oldld* | linux*aout* | linux*coff*) 374897cf2ee2Smrg dynamic_linker=no 374997cf2ee2Smrg ;; 3750a966c04fSmrg 375197cf2ee2Smrg# This must be Linux ELF. 375297cf2ee2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 375397cf2ee2Smrg version_type=linux 375497cf2ee2Smrg need_lib_prefix=no 375597cf2ee2Smrg need_version=no 375697cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 375797cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 375897cf2ee2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 375997cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 376097cf2ee2Smrg shlibpath_overrides_runpath=no 3761a966c04fSmrg 376297cf2ee2Smrg # Some binutils ld are patched to set DT_RUNPATH 376397cf2ee2Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 376497cf2ee2Smrg [lt_cv_shlibpath_overrides_runpath=no 376597cf2ee2Smrg save_LDFLAGS=$LDFLAGS 376697cf2ee2Smrg save_libdir=$libdir 376797cf2ee2Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 376897cf2ee2Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 376997cf2ee2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 377097cf2ee2Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 377197cf2ee2Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 377297cf2ee2Smrg LDFLAGS=$save_LDFLAGS 377397cf2ee2Smrg libdir=$save_libdir 377497cf2ee2Smrg ]) 377597cf2ee2Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3776a966c04fSmrg 377797cf2ee2Smrg # This implies no fast_install, which is unacceptable. 377897cf2ee2Smrg # Some rework will be needed to allow for fast_install 377997cf2ee2Smrg # before this can be enabled. 378097cf2ee2Smrg hardcode_into_libs=yes 3781a966c04fSmrg 378297cf2ee2Smrg # Append ld.so.conf contents to the search path 378397cf2ee2Smrg if test -f /etc/ld.so.conf; then 378497cf2ee2Smrg 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' ' '` 378597cf2ee2Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3786a966c04fSmrg fi 3787a966c04fSmrg 378897cf2ee2Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 378997cf2ee2Smrg # powerpc, because MkLinux only supported shared libraries with the 379097cf2ee2Smrg # GNU dynamic linker. Since this was broken with cross compilers, 379197cf2ee2Smrg # most powerpc-linux boxes support dynamic linking these days and 379297cf2ee2Smrg # people can always --disable-shared, the test was removed, and we 379397cf2ee2Smrg # assume the GNU/Linux dynamic linker is in use. 379497cf2ee2Smrg dynamic_linker='GNU/Linux ld.so' 379597cf2ee2Smrg ;; 3796a966c04fSmrg 379797cf2ee2Smrgnetbsd*) 379897cf2ee2Smrg version_type=sunos 379997cf2ee2Smrg need_lib_prefix=no 380097cf2ee2Smrg need_version=no 380197cf2ee2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 380297cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 380397cf2ee2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 380497cf2ee2Smrg dynamic_linker='NetBSD (a.out) ld.so' 3805a966c04fSmrg else 380697cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 380797cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 380897cf2ee2Smrg dynamic_linker='NetBSD ld.elf_so' 3809a966c04fSmrg fi 381097cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 381197cf2ee2Smrg shlibpath_overrides_runpath=yes 381297cf2ee2Smrg hardcode_into_libs=yes 381397cf2ee2Smrg ;; 3814a966c04fSmrg 381597cf2ee2Smrgnewsos6) 381697cf2ee2Smrg version_type=linux 381797cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 381897cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 381997cf2ee2Smrg shlibpath_overrides_runpath=yes 382097cf2ee2Smrg ;; 3821a966c04fSmrg 382297cf2ee2Smrg*nto* | *qnx*) 382397cf2ee2Smrg version_type=qnx 382497cf2ee2Smrg need_lib_prefix=no 382597cf2ee2Smrg need_version=no 382697cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 382797cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 382897cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 382997cf2ee2Smrg shlibpath_overrides_runpath=no 383097cf2ee2Smrg hardcode_into_libs=yes 383197cf2ee2Smrg dynamic_linker='ldqnx.so' 383297cf2ee2Smrg ;; 3833a966c04fSmrg 383497cf2ee2Smrgopenbsd*) 383597cf2ee2Smrg version_type=sunos 383697cf2ee2Smrg sys_lib_dlsearch_path_spec="/usr/lib" 383797cf2ee2Smrg need_lib_prefix=no 383897cf2ee2Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3839a966c04fSmrg case $host_os in 384097cf2ee2Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 384197cf2ee2Smrg *) need_version=no ;; 3842a966c04fSmrg esac 384397cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 384497cf2ee2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 384597cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 384697cf2ee2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 384797cf2ee2Smrg case $host_os in 384897cf2ee2Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 384997cf2ee2Smrg shlibpath_overrides_runpath=no 385097cf2ee2Smrg ;; 385197cf2ee2Smrg *) 385297cf2ee2Smrg shlibpath_overrides_runpath=yes 385397cf2ee2Smrg ;; 385497cf2ee2Smrg esac 385597cf2ee2Smrg else 385697cf2ee2Smrg shlibpath_overrides_runpath=yes 385797cf2ee2Smrg fi 385897cf2ee2Smrg ;; 3859a966c04fSmrg 386097cf2ee2Smrgos2*) 386197cf2ee2Smrg libname_spec='$name' 386297cf2ee2Smrg shrext_cmds=".dll" 386397cf2ee2Smrg need_lib_prefix=no 386497cf2ee2Smrg library_names_spec='$libname${shared_ext} $libname.a' 386597cf2ee2Smrg dynamic_linker='OS/2 ld.exe' 386697cf2ee2Smrg shlibpath_var=LIBPATH 386797cf2ee2Smrg ;; 3868a966c04fSmrg 386997cf2ee2Smrgosf3* | osf4* | osf5*) 387097cf2ee2Smrg version_type=osf 387197cf2ee2Smrg need_lib_prefix=no 387297cf2ee2Smrg need_version=no 387397cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 387497cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 387597cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 387697cf2ee2Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 387797cf2ee2Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 387897cf2ee2Smrg ;; 387997cf2ee2Smrg 388097cf2ee2Smrgrdos*) 388197cf2ee2Smrg dynamic_linker=no 388297cf2ee2Smrg ;; 388397cf2ee2Smrg 388497cf2ee2Smrgsolaris*) 388597cf2ee2Smrg version_type=linux 388697cf2ee2Smrg need_lib_prefix=no 388797cf2ee2Smrg need_version=no 388897cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 388997cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 389097cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 389197cf2ee2Smrg shlibpath_overrides_runpath=yes 389297cf2ee2Smrg hardcode_into_libs=yes 389397cf2ee2Smrg # ldd complains unless libraries are executable 389497cf2ee2Smrg postinstall_cmds='chmod +x $lib' 389597cf2ee2Smrg ;; 389697cf2ee2Smrg 389797cf2ee2Smrgsunos4*) 389897cf2ee2Smrg version_type=sunos 389997cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 390097cf2ee2Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 390197cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 390297cf2ee2Smrg shlibpath_overrides_runpath=yes 390397cf2ee2Smrg if test "$with_gnu_ld" = yes; then 390497cf2ee2Smrg need_lib_prefix=no 390597cf2ee2Smrg fi 390697cf2ee2Smrg need_version=yes 390797cf2ee2Smrg ;; 390897cf2ee2Smrg 390997cf2ee2Smrgsysv4 | sysv4.3*) 391097cf2ee2Smrg version_type=linux 391197cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 391297cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 391397cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 391497cf2ee2Smrg case $host_vendor in 391597cf2ee2Smrg sni) 391697cf2ee2Smrg shlibpath_overrides_runpath=no 391797cf2ee2Smrg need_lib_prefix=no 391897cf2ee2Smrg runpath_var=LD_RUN_PATH 391997cf2ee2Smrg ;; 392097cf2ee2Smrg siemens) 392197cf2ee2Smrg need_lib_prefix=no 392297cf2ee2Smrg ;; 392397cf2ee2Smrg motorola) 392497cf2ee2Smrg need_lib_prefix=no 392597cf2ee2Smrg need_version=no 392697cf2ee2Smrg shlibpath_overrides_runpath=no 392797cf2ee2Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 392897cf2ee2Smrg ;; 39296e7d3316Smrg esac 393097cf2ee2Smrg ;; 3931a966c04fSmrg 393297cf2ee2Smrgsysv4*MP*) 393397cf2ee2Smrg if test -d /usr/nec ;then 393497cf2ee2Smrg version_type=linux 393597cf2ee2Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 393697cf2ee2Smrg soname_spec='$libname${shared_ext}.$major' 393797cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 393897cf2ee2Smrg fi 3939a966c04fSmrg ;; 3940a966c04fSmrg 394197cf2ee2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 394297cf2ee2Smrg version_type=freebsd-elf 3943a966c04fSmrg need_lib_prefix=no 3944a966c04fSmrg need_version=no 394597cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 394697cf2ee2Smrg soname_spec='${libname}${release}${shared_ext}$major' 394797cf2ee2Smrg shlibpath_var=LD_LIBRARY_PATH 394897cf2ee2Smrg shlibpath_overrides_runpath=yes 3949a966c04fSmrg hardcode_into_libs=yes 395097cf2ee2Smrg if test "$with_gnu_ld" = yes; then 395197cf2ee2Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3952a966c04fSmrg else 395397cf2ee2Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3954a966c04fSmrg case $host_os in 395597cf2ee2Smrg sco3.2v5*) 395697cf2ee2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 395797cf2ee2Smrg ;; 3958a966c04fSmrg esac 3959a966c04fSmrg fi 396097cf2ee2Smrg sys_lib_dlsearch_path_spec='/usr/lib' 3961a966c04fSmrg ;; 3962a966c04fSmrg 396397cf2ee2Smrgtpf*) 396497cf2ee2Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3965a966c04fSmrg version_type=linux 396697cf2ee2Smrg need_lib_prefix=no 3967a966c04fSmrg need_version=no 3968a966c04fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3969a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 397097cf2ee2Smrg shlibpath_overrides_runpath=no 397197cf2ee2Smrg hardcode_into_libs=yes 3972a966c04fSmrg ;; 3973a966c04fSmrg 397497cf2ee2Smrguts4*) 3975a966c04fSmrg version_type=linux 397697cf2ee2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3977a966c04fSmrg soname_spec='${libname}${release}${shared_ext}$major' 3978a966c04fSmrg shlibpath_var=LD_LIBRARY_PATH 3979a966c04fSmrg ;; 3980a966c04fSmrg 398197cf2ee2Smrg*) 3982a966c04fSmrg dynamic_linker=no 3983a966c04fSmrg ;; 398497cf2ee2Smrgesac 398597cf2ee2SmrgAC_MSG_RESULT([$dynamic_linker]) 398697cf2ee2Smrgtest "$dynamic_linker" = no && can_build_shared=no 3987a966c04fSmrg 398897cf2ee2Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 398997cf2ee2Smrgif test "$GCC" = yes; then 399097cf2ee2Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 399197cf2ee2Smrgfi 3992a966c04fSmrg 399397cf2ee2Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 399497cf2ee2Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 399597cf2ee2Smrgfi 399697cf2ee2Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 399797cf2ee2Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 399897cf2ee2Smrgfi 3999a966c04fSmrg 400097cf2ee2Smrg_LT_DECL([], [variables_saved_for_relink], [1], 400197cf2ee2Smrg [Variables whose values should be saved in libtool wrapper scripts and 400297cf2ee2Smrg restored at link time]) 400397cf2ee2Smrg_LT_DECL([], [need_lib_prefix], [0], 400497cf2ee2Smrg [Do we need the "lib" prefix for modules?]) 400597cf2ee2Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 400697cf2ee2Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 400797cf2ee2Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 400897cf2ee2Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 400997cf2ee2Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 401097cf2ee2Smrg [Is shlibpath searched before the hard-coded library search path?]) 401197cf2ee2Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 401297cf2ee2Smrg_LT_DECL([], [library_names_spec], [1], 401397cf2ee2Smrg [[List of archive names. First name is the real one, the rest are links. 401497cf2ee2Smrg The last name is the one that the linker finds with -lNAME]]) 401597cf2ee2Smrg_LT_DECL([], [soname_spec], [1], 401697cf2ee2Smrg [[The coded name of the library, if different from the real name]]) 401797cf2ee2Smrg_LT_DECL([], [install_override_mode], [1], 401897cf2ee2Smrg [Permission mode override for installation of shared libraries]) 401997cf2ee2Smrg_LT_DECL([], [postinstall_cmds], [2], 402097cf2ee2Smrg [Command to use after installation of a shared archive]) 402197cf2ee2Smrg_LT_DECL([], [postuninstall_cmds], [2], 402297cf2ee2Smrg [Command to use after uninstallation of a shared archive]) 402397cf2ee2Smrg_LT_DECL([], [finish_cmds], [2], 402497cf2ee2Smrg [Commands used to finish a libtool library installation in a directory]) 402597cf2ee2Smrg_LT_DECL([], [finish_eval], [1], 402697cf2ee2Smrg [[As "finish_cmds", except a single script fragment to be evaled but 402797cf2ee2Smrg not shown]]) 402897cf2ee2Smrg_LT_DECL([], [hardcode_into_libs], [0], 402997cf2ee2Smrg [Whether we should hardcode library paths into libraries]) 403097cf2ee2Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 403197cf2ee2Smrg [Compile-time system search path for libraries]) 403297cf2ee2Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 403397cf2ee2Smrg [Run-time system search path for libraries]) 403497cf2ee2Smrg])# _LT_SYS_DYNAMIC_LINKER 40356e7d3316Smrg 4036a966c04fSmrg 403797cf2ee2Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 403897cf2ee2Smrg# -------------------------- 403997cf2ee2Smrg# find a file program which can recognize shared library 404097cf2ee2SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 404197cf2ee2Smrg[m4_require([_LT_DECL_EGREP])dnl 404297cf2ee2SmrgAC_MSG_CHECKING([for $1]) 404397cf2ee2SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 404497cf2ee2Smrg[case $MAGIC_CMD in 404597cf2ee2Smrg[[\\/*] | ?:[\\/]*]) 404697cf2ee2Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4047a966c04fSmrg ;; 404897cf2ee2Smrg*) 404997cf2ee2Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 405097cf2ee2Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 405197cf2ee2Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 405297cf2ee2Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 405397cf2ee2Smrgdnl not every word. This closes a longstanding sh security hole. 405497cf2ee2Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 405597cf2ee2Smrg for ac_dir in $ac_dummy; do 405697cf2ee2Smrg IFS="$lt_save_ifs" 405797cf2ee2Smrg test -z "$ac_dir" && ac_dir=. 405897cf2ee2Smrg if test -f $ac_dir/$1; then 405997cf2ee2Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 406097cf2ee2Smrg if test -n "$file_magic_test_file"; then 406197cf2ee2Smrg case $deplibs_check_method in 406297cf2ee2Smrg "file_magic "*) 406397cf2ee2Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 406497cf2ee2Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 406597cf2ee2Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 406697cf2ee2Smrg $EGREP "$file_magic_regex" > /dev/null; then 406797cf2ee2Smrg : 406897cf2ee2Smrg else 406997cf2ee2Smrg cat <<_LT_EOF 1>&2 4070a966c04fSmrg 407197cf2ee2Smrg*** Warning: the command libtool uses to detect shared libraries, 407297cf2ee2Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 407397cf2ee2Smrg*** The result is that libtool may fail to recognize shared libraries 407497cf2ee2Smrg*** as such. This will affect the creation of libtool libraries that 407597cf2ee2Smrg*** depend on shared libraries, but programs linked with such libtool 407697cf2ee2Smrg*** libraries will work regardless of this problem. Nevertheless, you 407797cf2ee2Smrg*** may want to report the problem to your system manager and/or to 407897cf2ee2Smrg*** bug-libtool@gnu.org 4079a966c04fSmrg 408097cf2ee2Smrg_LT_EOF 408197cf2ee2Smrg fi ;; 408297cf2ee2Smrg esac 408397cf2ee2Smrg fi 408497cf2ee2Smrg break 408597cf2ee2Smrg fi 408697cf2ee2Smrg done 408797cf2ee2Smrg IFS="$lt_save_ifs" 408897cf2ee2Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 4089a966c04fSmrg ;; 409097cf2ee2Smrgesac]) 409197cf2ee2SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 409297cf2ee2Smrgif test -n "$MAGIC_CMD"; then 409397cf2ee2Smrg AC_MSG_RESULT($MAGIC_CMD) 409497cf2ee2Smrgelse 409597cf2ee2Smrg AC_MSG_RESULT(no) 409697cf2ee2Smrgfi 409797cf2ee2Smrg_LT_DECL([], [MAGIC_CMD], [0], 409897cf2ee2Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 409997cf2ee2Smrg])# _LT_PATH_TOOL_PREFIX 4100a966c04fSmrg 410197cf2ee2Smrg# Old name: 410297cf2ee2SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 410397cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 410497cf2ee2Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 41056e7d3316Smrg 4106a966c04fSmrg 410797cf2ee2Smrg# _LT_PATH_MAGIC 410897cf2ee2Smrg# -------------- 410997cf2ee2Smrg# find a file program which can recognize a shared library 411097cf2ee2Smrgm4_defun([_LT_PATH_MAGIC], 411197cf2ee2Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 411297cf2ee2Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 411397cf2ee2Smrg if test -n "$ac_tool_prefix"; then 411497cf2ee2Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4115a966c04fSmrg else 411697cf2ee2Smrg MAGIC_CMD=: 4117a966c04fSmrg fi 411897cf2ee2Smrgfi 411997cf2ee2Smrg])# _LT_PATH_MAGIC 4120a966c04fSmrg 4121a966c04fSmrg 412297cf2ee2Smrg# LT_PATH_LD 412397cf2ee2Smrg# ---------- 412497cf2ee2Smrg# find the pathname to the GNU or non-GNU linker 412597cf2ee2SmrgAC_DEFUN([LT_PATH_LD], 412697cf2ee2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 412797cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 412897cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 412997cf2ee2Smrgm4_require([_LT_DECL_SED])dnl 413097cf2ee2Smrgm4_require([_LT_DECL_EGREP])dnl 413197cf2ee2Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4132a966c04fSmrg 413397cf2ee2SmrgAC_ARG_WITH([gnu-ld], 413497cf2ee2Smrg [AS_HELP_STRING([--with-gnu-ld], 413597cf2ee2Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 413697cf2ee2Smrg [test "$withval" = no || with_gnu_ld=yes], 413797cf2ee2Smrg [with_gnu_ld=no])dnl 413897cf2ee2Smrg 413997cf2ee2Smrgac_prog=ld 414097cf2ee2Smrgif test "$GCC" = yes; then 414197cf2ee2Smrg # Check if gcc -print-prog-name=ld gives a path. 414297cf2ee2Smrg AC_MSG_CHECKING([for ld used by $CC]) 414397cf2ee2Smrg case $host in 414497cf2ee2Smrg *-*-mingw*) 414597cf2ee2Smrg # gcc leaves a trailing carriage return which upsets mingw 414697cf2ee2Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 414797cf2ee2Smrg *) 414897cf2ee2Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4149a966c04fSmrg esac 415097cf2ee2Smrg case $ac_prog in 415197cf2ee2Smrg # Accept absolute paths. 415297cf2ee2Smrg [[\\/]]* | ?:[[\\/]]*) 415397cf2ee2Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 415497cf2ee2Smrg # Canonicalize the pathname of ld 415597cf2ee2Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 415697cf2ee2Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 415797cf2ee2Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 415897cf2ee2Smrg done 415997cf2ee2Smrg test -z "$LD" && LD="$ac_prog" 416097cf2ee2Smrg ;; 416197cf2ee2Smrg "") 416297cf2ee2Smrg # If it fails, then pretend we aren't using GCC. 416397cf2ee2Smrg ac_prog=ld 416497cf2ee2Smrg ;; 416597cf2ee2Smrg *) 416697cf2ee2Smrg # If it is relative, then search for the first ld in PATH. 416797cf2ee2Smrg with_gnu_ld=unknown 416897cf2ee2Smrg ;; 416997cf2ee2Smrg esac 417097cf2ee2Smrgelif test "$with_gnu_ld" = yes; then 417197cf2ee2Smrg AC_MSG_CHECKING([for GNU ld]) 417297cf2ee2Smrgelse 417397cf2ee2Smrg AC_MSG_CHECKING([for non-GNU ld]) 417497cf2ee2Smrgfi 417597cf2ee2SmrgAC_CACHE_VAL(lt_cv_path_LD, 417697cf2ee2Smrg[if test -z "$LD"; then 417797cf2ee2Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 417897cf2ee2Smrg for ac_dir in $PATH; do 417997cf2ee2Smrg IFS="$lt_save_ifs" 418097cf2ee2Smrg test -z "$ac_dir" && ac_dir=. 418197cf2ee2Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 418297cf2ee2Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 418397cf2ee2Smrg # Check to see if the program is GNU ld. I'd rather use --version, 418497cf2ee2Smrg # but apparently some variants of GNU ld only accept -v. 418597cf2ee2Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 418697cf2ee2Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 418797cf2ee2Smrg *GNU* | *'with BFD'*) 418897cf2ee2Smrg test "$with_gnu_ld" != no && break 4189a966c04fSmrg ;; 4190a966c04fSmrg *) 419197cf2ee2Smrg test "$with_gnu_ld" != yes && break 4192a966c04fSmrg ;; 4193a966c04fSmrg esac 419497cf2ee2Smrg fi 419597cf2ee2Smrg done 419697cf2ee2Smrg IFS="$lt_save_ifs" 419797cf2ee2Smrgelse 419897cf2ee2Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 419997cf2ee2Smrgfi]) 420097cf2ee2SmrgLD="$lt_cv_path_LD" 420197cf2ee2Smrgif test -n "$LD"; then 420297cf2ee2Smrg AC_MSG_RESULT($LD) 420397cf2ee2Smrgelse 420497cf2ee2Smrg AC_MSG_RESULT(no) 420597cf2ee2Smrgfi 420697cf2ee2Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 420797cf2ee2Smrg_LT_PATH_LD_GNU 420897cf2ee2SmrgAC_SUBST([LD]) 4209a966c04fSmrg 421097cf2ee2Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 421197cf2ee2Smrg])# LT_PATH_LD 4212a966c04fSmrg 421397cf2ee2Smrg# Old names: 421497cf2ee2SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 421597cf2ee2SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 421697cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 421797cf2ee2Smrgdnl AC_DEFUN([AM_PROG_LD], []) 421897cf2ee2Smrgdnl AC_DEFUN([AC_PROG_LD], []) 4219a966c04fSmrg 42202e2dd055Smrg 422197cf2ee2Smrg# _LT_PATH_LD_GNU 422297cf2ee2Smrg#- -------------- 422397cf2ee2Smrgm4_defun([_LT_PATH_LD_GNU], 422497cf2ee2Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 422597cf2ee2Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 422697cf2ee2Smrgcase `$LD -v 2>&1 </dev/null` in 422797cf2ee2Smrg*GNU* | *'with BFD'*) 422897cf2ee2Smrg lt_cv_prog_gnu_ld=yes 4229a966c04fSmrg ;; 423097cf2ee2Smrg*) 423197cf2ee2Smrg lt_cv_prog_gnu_ld=no 4232a966c04fSmrg ;; 423397cf2ee2Smrgesac]) 423497cf2ee2Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 423597cf2ee2Smrg])# _LT_PATH_LD_GNU 4236a966c04fSmrg 423797cf2ee2Smrg 423897cf2ee2Smrg# _LT_CMD_RELOAD 423997cf2ee2Smrg# -------------- 424097cf2ee2Smrg# find reload flag for linker 424197cf2ee2Smrg# -- PORTME Some linkers may need a different reload flag. 424297cf2ee2Smrgm4_defun([_LT_CMD_RELOAD], 424397cf2ee2Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 424497cf2ee2Smrg lt_cv_ld_reload_flag, 424597cf2ee2Smrg [lt_cv_ld_reload_flag='-r']) 424697cf2ee2Smrgreload_flag=$lt_cv_ld_reload_flag 424797cf2ee2Smrgcase $reload_flag in 424897cf2ee2Smrg"" | " "*) ;; 424997cf2ee2Smrg*) reload_flag=" $reload_flag" ;; 425097cf2ee2Smrgesac 425197cf2ee2Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 425297cf2ee2Smrgcase $host_os in 425397cf2ee2Smrg cygwin* | mingw* | pw32* | cegcc*) 425497cf2ee2Smrg if test "$GCC" != yes; then 425597cf2ee2Smrg reload_cmds=false 425697cf2ee2Smrg fi 425797cf2ee2Smrg ;; 425897cf2ee2Smrg darwin*) 425997cf2ee2Smrg if test "$GCC" = yes; then 426097cf2ee2Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 426197cf2ee2Smrg else 426297cf2ee2Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 426397cf2ee2Smrg fi 426497cf2ee2Smrg ;; 426597cf2ee2Smrgesac 426697cf2ee2Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 426797cf2ee2Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 426897cf2ee2Smrg])# _LT_CMD_RELOAD 426997cf2ee2Smrg 427097cf2ee2Smrg 427197cf2ee2Smrg# _LT_CHECK_MAGIC_METHOD 427297cf2ee2Smrg# ---------------------- 427397cf2ee2Smrg# how to check for library dependencies 427497cf2ee2Smrg# -- PORTME fill in with the dynamic library characteristics 427597cf2ee2Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 427697cf2ee2Smrg[m4_require([_LT_DECL_EGREP]) 427797cf2ee2Smrgm4_require([_LT_DECL_OBJDUMP]) 427897cf2ee2SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 427997cf2ee2Smrglt_cv_deplibs_check_method, 428097cf2ee2Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 428197cf2ee2Smrglt_cv_file_magic_test_file= 428297cf2ee2Smrglt_cv_deplibs_check_method='unknown' 428397cf2ee2Smrg# Need to set the preceding variable on all platforms that support 428497cf2ee2Smrg# interlibrary dependencies. 428597cf2ee2Smrg# 'none' -- dependencies not supported. 428697cf2ee2Smrg# `unknown' -- same as none, but documents that we really don't know. 428797cf2ee2Smrg# 'pass_all' -- all dependencies passed with no checks. 428897cf2ee2Smrg# 'test_compile' -- check by making test program. 428997cf2ee2Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 429097cf2ee2Smrg# which responds to the $file_magic_cmd with a given extended regex. 429197cf2ee2Smrg# If you have `file' or equivalent on your system and you're not sure 429297cf2ee2Smrg# whether `pass_all' will *always* work, you probably want this one. 429397cf2ee2Smrg 429497cf2ee2Smrgcase $host_os in 429597cf2ee2Smrgaix[[4-9]]*) 429697cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4297a966c04fSmrg ;; 4298a966c04fSmrg 429997cf2ee2Smrgbeos*) 430097cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4301a966c04fSmrg ;; 4302a966c04fSmrg 430397cf2ee2Smrgbsdi[[45]]*) 430497cf2ee2Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 430597cf2ee2Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 430697cf2ee2Smrg lt_cv_file_magic_test_file=/shlib/libc.so 430797cf2ee2Smrg ;; 430897cf2ee2Smrg 430997cf2ee2Smrgcygwin*) 431097cf2ee2Smrg # func_win32_libid is a shell function defined in ltmain.sh 431197cf2ee2Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 431297cf2ee2Smrg lt_cv_file_magic_cmd='func_win32_libid' 431397cf2ee2Smrg ;; 431497cf2ee2Smrg 431597cf2ee2Smrgmingw* | pw32*) 431697cf2ee2Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 431797cf2ee2Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 431897cf2ee2Smrg # unless we find 'file', for example because we are cross-compiling. 431997cf2ee2Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 432097cf2ee2Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 432197cf2ee2Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 432297cf2ee2Smrg lt_cv_file_magic_cmd='func_win32_libid' 4323a966c04fSmrg else 432497cf2ee2Smrg # Keep this pattern in sync with the one in func_win32_libid. 432597cf2ee2Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 432697cf2ee2Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 432797cf2ee2Smrg fi 432897cf2ee2Smrg ;; 432997cf2ee2Smrg 433097cf2ee2Smrgcegcc*) 433197cf2ee2Smrg # use the weaker test based on 'objdump'. See mingw*. 433297cf2ee2Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 433397cf2ee2Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 433497cf2ee2Smrg ;; 433597cf2ee2Smrg 433697cf2ee2Smrgdarwin* | rhapsody*) 433797cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 433897cf2ee2Smrg ;; 433997cf2ee2Smrg 434097cf2ee2Smrgfreebsd* | dragonfly*) 434197cf2ee2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 434297cf2ee2Smrg case $host_cpu in 434397cf2ee2Smrg i*86 ) 434497cf2ee2Smrg # Not sure whether the presence of OpenBSD here was a mistake. 434597cf2ee2Smrg # Let's accept both of them until this is cleared up. 434697cf2ee2Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 434797cf2ee2Smrg lt_cv_file_magic_cmd=/usr/bin/file 434897cf2ee2Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 434997cf2ee2Smrg ;; 4350a966c04fSmrg esac 435197cf2ee2Smrg else 435297cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4353a966c04fSmrg fi 4354a966c04fSmrg ;; 4355a966c04fSmrg 435697cf2ee2Smrggnu*) 435797cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 43586e7d3316Smrg ;; 43596e7d3316Smrg 436097cf2ee2Smrghaiku*) 436197cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4362a966c04fSmrg ;; 4363a966c04fSmrg 436497cf2ee2Smrghpux10.20* | hpux11*) 436597cf2ee2Smrg lt_cv_file_magic_cmd=/usr/bin/file 436697cf2ee2Smrg case $host_cpu in 436797cf2ee2Smrg ia64*) 436897cf2ee2Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 436997cf2ee2Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 437097cf2ee2Smrg ;; 437197cf2ee2Smrg hppa*64*) 437297cf2ee2Smrg [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]'] 437397cf2ee2Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 437497cf2ee2Smrg ;; 437597cf2ee2Smrg *) 437697cf2ee2Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 437797cf2ee2Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 437897cf2ee2Smrg ;; 437997cf2ee2Smrg esac 4380a966c04fSmrg ;; 4381a966c04fSmrg 438297cf2ee2Smrginterix[[3-9]]*) 438397cf2ee2Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 438497cf2ee2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 438597cf2ee2Smrg ;; 4386a966c04fSmrg 438797cf2ee2Smrgirix5* | irix6* | nonstopux*) 438897cf2ee2Smrg case $LD in 438997cf2ee2Smrg *-32|*"-32 ") libmagic=32-bit;; 439097cf2ee2Smrg *-n32|*"-n32 ") libmagic=N32;; 439197cf2ee2Smrg *-64|*"-64 ") libmagic=64-bit;; 439297cf2ee2Smrg *) libmagic=never-match;; 439397cf2ee2Smrg esac 439497cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 439597cf2ee2Smrg ;; 4396a966c04fSmrg 439797cf2ee2Smrg# This must be Linux ELF. 439897cf2ee2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 439997cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 440097cf2ee2Smrg ;; 44016e7d3316Smrg 440297cf2ee2Smrgnetbsd*) 440397cf2ee2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 440497cf2ee2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 440597cf2ee2Smrg else 440697cf2ee2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 440797cf2ee2Smrg fi 440897cf2ee2Smrg ;; 44096e7d3316Smrg 441097cf2ee2Smrgnewos6*) 441197cf2ee2Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 441297cf2ee2Smrg lt_cv_file_magic_cmd=/usr/bin/file 441397cf2ee2Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 44146e7d3316Smrg ;; 4415a966c04fSmrg 441697cf2ee2Smrg*nto* | *qnx*) 441797cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4418a966c04fSmrg ;; 44196e7d3316Smrg 442097cf2ee2Smrgopenbsd*) 442197cf2ee2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 442297cf2ee2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4423a966c04fSmrg else 442497cf2ee2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4425a966c04fSmrg fi 442697cf2ee2Smrg ;; 4427a966c04fSmrg 442897cf2ee2Smrgosf3* | osf4* | osf5*) 442997cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 443097cf2ee2Smrg ;; 4431a966c04fSmrg 443297cf2ee2Smrgrdos*) 443397cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 443497cf2ee2Smrg ;; 44356e7d3316Smrg 443697cf2ee2Smrgsolaris*) 443797cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 443897cf2ee2Smrg ;; 44396e7d3316Smrg 444097cf2ee2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 444197cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 444297cf2ee2Smrg ;; 444397cf2ee2Smrg 444497cf2ee2Smrgsysv4 | sysv4.3*) 444597cf2ee2Smrg case $host_vendor in 444697cf2ee2Smrg motorola) 444797cf2ee2Smrg 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]]' 444897cf2ee2Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4449a966c04fSmrg ;; 445097cf2ee2Smrg ncr) 445197cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 445297cf2ee2Smrg ;; 445397cf2ee2Smrg sequent) 445497cf2ee2Smrg lt_cv_file_magic_cmd='/bin/file' 445597cf2ee2Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 445697cf2ee2Smrg ;; 445797cf2ee2Smrg sni) 445897cf2ee2Smrg lt_cv_file_magic_cmd='/bin/file' 445997cf2ee2Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 446097cf2ee2Smrg lt_cv_file_magic_test_file=/lib/libc.so 446197cf2ee2Smrg ;; 446297cf2ee2Smrg siemens) 446397cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 446497cf2ee2Smrg ;; 446597cf2ee2Smrg pc) 446697cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 4467a966c04fSmrg ;; 4468a966c04fSmrg esac 4469a966c04fSmrg ;; 4470a966c04fSmrg 447197cf2ee2Smrgtpf*) 447297cf2ee2Smrg lt_cv_deplibs_check_method=pass_all 447397cf2ee2Smrg ;; 4474a966c04fSmrgesac 447597cf2ee2Smrg]) 447697cf2ee2Smrg 447797cf2ee2Smrgfile_magic_glob= 447897cf2ee2Smrgwant_nocaseglob=no 447997cf2ee2Smrgif test "$build" = "$host"; then 448097cf2ee2Smrg case $host_os in 448197cf2ee2Smrg mingw* | pw32*) 448297cf2ee2Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 448397cf2ee2Smrg want_nocaseglob=yes 4484a966c04fSmrg else 448597cf2ee2Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 4486a966c04fSmrg fi 4487a966c04fSmrg ;; 448897cf2ee2Smrg esac 448997cf2ee2Smrgfi 4490a966c04fSmrg 449197cf2ee2Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 449297cf2ee2Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 449397cf2ee2Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 44946e7d3316Smrg 44956e7d3316Smrg_LT_DECL([], [deplibs_check_method], [1], 44966e7d3316Smrg [Method to check whether dependent libraries are shared objects]) 44976e7d3316Smrg_LT_DECL([], [file_magic_cmd], [1], 449897cf2ee2Smrg [Command to use when deplibs_check_method = "file_magic"]) 449997cf2ee2Smrg_LT_DECL([], [file_magic_glob], [1], 450097cf2ee2Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 450197cf2ee2Smrg_LT_DECL([], [want_nocaseglob], [1], 450297cf2ee2Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 45036e7d3316Smrg])# _LT_CHECK_MAGIC_METHOD 4504a966c04fSmrg 4505a966c04fSmrg 45066e7d3316Smrg# LT_PATH_NM 4507a966c04fSmrg# ---------- 45086e7d3316Smrg# find the pathname to a BSD- or MS-compatible name lister 45096e7d3316SmrgAC_DEFUN([LT_PATH_NM], 45106e7d3316Smrg[AC_REQUIRE([AC_PROG_CC])dnl 45116e7d3316SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 4512a966c04fSmrg[if test -n "$NM"; then 4513a966c04fSmrg # Let the user override the test. 4514a966c04fSmrg lt_cv_path_NM="$NM" 4515a966c04fSmrgelse 4516a966c04fSmrg lt_nm_to_check="${ac_tool_prefix}nm" 45172e2dd055Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4518a966c04fSmrg lt_nm_to_check="$lt_nm_to_check nm" 4519a966c04fSmrg fi 4520a966c04fSmrg for lt_tmp_nm in $lt_nm_to_check; do 4521a966c04fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4522a966c04fSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4523a966c04fSmrg IFS="$lt_save_ifs" 4524a966c04fSmrg test -z "$ac_dir" && ac_dir=. 4525a966c04fSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 4526a966c04fSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4527a966c04fSmrg # Check to see if the nm accepts a BSD-compat flag. 4528a966c04fSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4529a966c04fSmrg # nm: unknown option "B" ignored 4530a966c04fSmrg # Tru64's nm complains that /dev/null is an invalid object file 4531a966c04fSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4532a966c04fSmrg */dev/null* | *'Invalid file or object type'*) 4533a966c04fSmrg lt_cv_path_NM="$tmp_nm -B" 4534a966c04fSmrg break 4535a966c04fSmrg ;; 4536a966c04fSmrg *) 4537a966c04fSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4538a966c04fSmrg */dev/null*) 4539a966c04fSmrg lt_cv_path_NM="$tmp_nm -p" 4540a966c04fSmrg break 4541a966c04fSmrg ;; 4542a966c04fSmrg *) 4543a966c04fSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4544a966c04fSmrg continue # so that we can try to find one that supports BSD flags 4545a966c04fSmrg ;; 4546a966c04fSmrg esac 4547a966c04fSmrg ;; 4548a966c04fSmrg esac 4549a966c04fSmrg fi 4550a966c04fSmrg done 4551a966c04fSmrg IFS="$lt_save_ifs" 4552a966c04fSmrg done 45536e7d3316Smrg : ${lt_cv_path_NM=no} 4554a966c04fSmrgfi]) 45556e7d3316Smrgif test "$lt_cv_path_NM" != "no"; then 45566e7d3316Smrg NM="$lt_cv_path_NM" 45576e7d3316Smrgelse 45586e7d3316Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 45596e7d3316Smrg if test -n "$DUMPBIN"; then : 45606e7d3316Smrg # Let the user override the test. 45616e7d3316Smrg else 45626e7d3316Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 45636e7d3316Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 45646e7d3316Smrg *COFF*) 45656e7d3316Smrg DUMPBIN="$DUMPBIN -symbols" 45666e7d3316Smrg ;; 45676e7d3316Smrg *) 45686e7d3316Smrg DUMPBIN=: 45696e7d3316Smrg ;; 45706e7d3316Smrg esac 45716e7d3316Smrg fi 45726e7d3316Smrg AC_SUBST([DUMPBIN]) 45736e7d3316Smrg if test "$DUMPBIN" != ":"; then 45746e7d3316Smrg NM="$DUMPBIN" 45756e7d3316Smrg fi 45766e7d3316Smrgfi 45776e7d3316Smrgtest -z "$NM" && NM=nm 45786e7d3316SmrgAC_SUBST([NM]) 45796e7d3316Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 45806e7d3316Smrg 45816e7d3316SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 45826e7d3316Smrg [lt_cv_nm_interface="BSD nm" 45836e7d3316Smrg echo "int some_variable = 0;" > conftest.$ac_ext 45846e7d3316Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 45856e7d3316Smrg (eval "$ac_compile" 2>conftest.err) 45866e7d3316Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 45876e7d3316Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 45886e7d3316Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 45896e7d3316Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 45906e7d3316Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 45916e7d3316Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 45926e7d3316Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 45936e7d3316Smrg lt_cv_nm_interface="MS dumpbin" 45946e7d3316Smrg fi 45956e7d3316Smrg rm -f conftest*]) 45966e7d3316Smrg])# LT_PATH_NM 4597a966c04fSmrg 45986e7d3316Smrg# Old names: 45996e7d3316SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 46006e7d3316SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 46016e7d3316Smrgdnl aclocal-1.4 backwards compatibility: 46026e7d3316Smrgdnl AC_DEFUN([AM_PROG_NM], []) 46036e7d3316Smrgdnl AC_DEFUN([AC_PROG_NM], []) 4604a966c04fSmrg 460597cf2ee2Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 460697cf2ee2Smrg# -------------------------------- 460797cf2ee2Smrg# how to determine the name of the shared library 460897cf2ee2Smrg# associated with a specific link library. 460997cf2ee2Smrg# -- PORTME fill in with the dynamic library characteristics 461097cf2ee2Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 461197cf2ee2Smrg[m4_require([_LT_DECL_EGREP]) 461297cf2ee2Smrgm4_require([_LT_DECL_OBJDUMP]) 461397cf2ee2Smrgm4_require([_LT_DECL_DLLTOOL]) 461497cf2ee2SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 461597cf2ee2Smrglt_cv_sharedlib_from_linklib_cmd, 461697cf2ee2Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 461797cf2ee2Smrg 461897cf2ee2Smrgcase $host_os in 461997cf2ee2Smrgcygwin* | mingw* | pw32* | cegcc*) 462097cf2ee2Smrg # two different shell functions defined in ltmain.sh 462197cf2ee2Smrg # decide which to use based on capabilities of $DLLTOOL 462297cf2ee2Smrg case `$DLLTOOL --help 2>&1` in 462397cf2ee2Smrg *--identify-strict*) 462497cf2ee2Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 462597cf2ee2Smrg ;; 462697cf2ee2Smrg *) 462797cf2ee2Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 462897cf2ee2Smrg ;; 462997cf2ee2Smrg esac 463097cf2ee2Smrg ;; 463197cf2ee2Smrg*) 463297cf2ee2Smrg # fallback: assume linklib IS sharedlib 463397cf2ee2Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 463497cf2ee2Smrg ;; 463597cf2ee2Smrgesac 463697cf2ee2Smrg]) 463797cf2ee2Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 463897cf2ee2Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 463997cf2ee2Smrg 464097cf2ee2Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 464197cf2ee2Smrg [Command to associate shared and link libraries]) 464297cf2ee2Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 464397cf2ee2Smrg 464497cf2ee2Smrg 464597cf2ee2Smrg# _LT_PATH_MANIFEST_TOOL 464697cf2ee2Smrg# ---------------------- 464797cf2ee2Smrg# locate the manifest tool 464897cf2ee2Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 464997cf2ee2Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 465097cf2ee2Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 465197cf2ee2SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 465297cf2ee2Smrg [lt_cv_path_mainfest_tool=no 465397cf2ee2Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 465497cf2ee2Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 465597cf2ee2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 465697cf2ee2Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 465797cf2ee2Smrg lt_cv_path_mainfest_tool=yes 465897cf2ee2Smrg fi 465997cf2ee2Smrg rm -f conftest*]) 466097cf2ee2Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 466197cf2ee2Smrg MANIFEST_TOOL=: 466297cf2ee2Smrgfi 466397cf2ee2Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 466497cf2ee2Smrg])# _LT_PATH_MANIFEST_TOOL 466597cf2ee2Smrg 46666e7d3316Smrg 46676e7d3316Smrg# LT_LIB_M 46686e7d3316Smrg# -------- 4669a966c04fSmrg# check for math library 46706e7d3316SmrgAC_DEFUN([LT_LIB_M], 4671a966c04fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4672a966c04fSmrgLIBM= 4673a966c04fSmrgcase $host in 46746e7d3316Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 4675a966c04fSmrg # These system don't have libm, or don't need it 4676a966c04fSmrg ;; 4677a966c04fSmrg*-ncr-sysv4.3*) 4678a966c04fSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4679a966c04fSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4680a966c04fSmrg ;; 4681a966c04fSmrg*) 4682a966c04fSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 4683a966c04fSmrg ;; 4684a966c04fSmrgesac 46856e7d3316SmrgAC_SUBST([LIBM]) 46866e7d3316Smrg])# LT_LIB_M 4687a966c04fSmrg 46886e7d3316Smrg# Old name: 46896e7d3316SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 46906e7d3316Smrgdnl aclocal-1.4 backwards compatibility: 46916e7d3316Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4692a966c04fSmrg 4693a966c04fSmrg 46946e7d3316Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 46956e7d3316Smrg# ------------------------------- 46966e7d3316Smrgm4_defun([_LT_COMPILER_NO_RTTI], 46976e7d3316Smrg[m4_require([_LT_TAG_COMPILER])dnl 4698a966c04fSmrg 46996e7d3316Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4700a966c04fSmrg 47016e7d3316Smrgif test "$GCC" = yes; then 47026e7d3316Smrg case $cc_basename in 47036e7d3316Smrg nvcc*) 47046e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 47056e7d3316Smrg *) 47066e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 47076e7d3316Smrg esac 4708a966c04fSmrg 47096e7d3316Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47106e7d3316Smrg lt_cv_prog_compiler_rtti_exceptions, 47116e7d3316Smrg [-fno-rtti -fno-exceptions], [], 47126e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4713a966c04fSmrgfi 47146e7d3316Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 47156e7d3316Smrg [Compiler flag to turn off builtin functions]) 47166e7d3316Smrg])# _LT_COMPILER_NO_RTTI 4717a966c04fSmrg 4718a966c04fSmrg 47196e7d3316Smrg# _LT_CMD_GLOBAL_SYMBOLS 47206e7d3316Smrg# ---------------------- 47216e7d3316Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 47226e7d3316Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47236e7d3316SmrgAC_REQUIRE([AC_PROG_CC])dnl 47246e7d3316SmrgAC_REQUIRE([AC_PROG_AWK])dnl 47256e7d3316SmrgAC_REQUIRE([LT_PATH_NM])dnl 47266e7d3316SmrgAC_REQUIRE([LT_PATH_LD])dnl 47276e7d3316Smrgm4_require([_LT_DECL_SED])dnl 47286e7d3316Smrgm4_require([_LT_DECL_EGREP])dnl 47296e7d3316Smrgm4_require([_LT_TAG_COMPILER])dnl 4730a966c04fSmrg 47316e7d3316Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 47326e7d3316SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 47336e7d3316SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 47346e7d3316Smrg[ 47356e7d3316Smrg# These are sane defaults that work on at least a few old systems. 47366e7d3316Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4737a966c04fSmrg 47386e7d3316Smrg# Character class describing NM global symbol codes. 47396e7d3316Smrgsymcode='[[BCDEGRST]]' 4740a966c04fSmrg 47416e7d3316Smrg# Regexp to match symbols that can be accessed directly from C. 47426e7d3316Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4743a966c04fSmrg 47446e7d3316Smrg# Define system-specific variables. 4745a966c04fSmrgcase $host_os in 47466e7d3316Smrgaix*) 47476e7d3316Smrg symcode='[[BCDT]]' 4748a966c04fSmrg ;; 47496e7d3316Smrgcygwin* | mingw* | pw32* | cegcc*) 47506e7d3316Smrg symcode='[[ABCDGISTW]]' 47516e7d3316Smrg ;; 47526e7d3316Smrghpux*) 47536e7d3316Smrg if test "$host_cpu" = ia64; then 47546e7d3316Smrg symcode='[[ABCDEGRST]]' 4755a966c04fSmrg fi 47566e7d3316Smrg ;; 47576e7d3316Smrgirix* | nonstopux*) 47586e7d3316Smrg symcode='[[BCDEGRST]]' 47596e7d3316Smrg ;; 47606e7d3316Smrgosf*) 47616e7d3316Smrg symcode='[[BCDEGQRST]]' 47626e7d3316Smrg ;; 47636e7d3316Smrgsolaris*) 47646e7d3316Smrg symcode='[[BDRT]]' 47656e7d3316Smrg ;; 47666e7d3316Smrgsco3.2v5*) 47676e7d3316Smrg symcode='[[DT]]' 47686e7d3316Smrg ;; 47696e7d3316Smrgsysv4.2uw2*) 47706e7d3316Smrg symcode='[[DT]]' 47716e7d3316Smrg ;; 47726e7d3316Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 47736e7d3316Smrg symcode='[[ABDT]]' 47746e7d3316Smrg ;; 47756e7d3316Smrgsysv4) 47766e7d3316Smrg symcode='[[DFNSTU]]' 47776e7d3316Smrg ;; 4778a966c04fSmrgesac 4779a966c04fSmrg 47806e7d3316Smrg# If we're using GNU nm, then use its standard symbol codes. 47816e7d3316Smrgcase `$NM -V 2>&1` in 47826e7d3316Smrg*GNU* | *'with BFD'*) 47836e7d3316Smrg symcode='[[ABCDGIRSTW]]' ;; 47846e7d3316Smrgesac 4785a966c04fSmrg 47866e7d3316Smrg# Transform an extracted symbol line into a proper C declaration. 47876e7d3316Smrg# Some systems (esp. on ia64) link data and code symbols differently, 47886e7d3316Smrg# so use this general approach. 47896e7d3316Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4790a966c04fSmrg 47916e7d3316Smrg# Transform an extracted symbol line into symbol name and symbol address 479297cf2ee2Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 479397cf2ee2Smrglt_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'" 4794a966c04fSmrg 47956e7d3316Smrg# Handle CRLF in mingw tool chain 47966e7d3316Smrgopt_cr= 47976e7d3316Smrgcase $build_os in 47986e7d3316Smrgmingw*) 47996e7d3316Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48006e7d3316Smrg ;; 48016e7d3316Smrgesac 4802a966c04fSmrg 48036e7d3316Smrg# Try without a prefix underscore, then with it. 48046e7d3316Smrgfor ac_symprfx in "" "_"; do 4805a966c04fSmrg 48066e7d3316Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48076e7d3316Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4808a966c04fSmrg 48096e7d3316Smrg # Write the raw and C identifiers. 48106e7d3316Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 48116e7d3316Smrg # Fake it for dumpbin and say T for any non-static function 48126e7d3316Smrg # and D for any global variable. 48136e7d3316Smrg # Also find C++ and __fastcall symbols from MSVC++, 48146e7d3316Smrg # which start with @ or ?. 48156e7d3316Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 48166e7d3316Smrg" {last_section=section; section=\$ 3};"\ 48176e7d3316Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 48186e7d3316Smrg" \$ 0!~/External *\|/{next};"\ 48196e7d3316Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 48206e7d3316Smrg" {if(hide[section]) next};"\ 48216e7d3316Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 48226e7d3316Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 48236e7d3316Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 48246e7d3316Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 48256e7d3316Smrg" ' prfx=^$ac_symprfx]" 48266e7d3316Smrg else 48276e7d3316Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48286e7d3316Smrg fi 482997cf2ee2Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4830a966c04fSmrg 48316e7d3316Smrg # Check to see that the pipe works correctly. 48326e7d3316Smrg pipe_works=no 4833a966c04fSmrg 48346e7d3316Smrg rm -f conftest* 48356e7d3316Smrg cat > conftest.$ac_ext <<_LT_EOF 48366e7d3316Smrg#ifdef __cplusplus 48376e7d3316Smrgextern "C" { 48386e7d3316Smrg#endif 48396e7d3316Smrgchar nm_test_var; 48406e7d3316Smrgvoid nm_test_func(void); 48416e7d3316Smrgvoid nm_test_func(void){} 48426e7d3316Smrg#ifdef __cplusplus 48436e7d3316Smrg} 48446e7d3316Smrg#endif 48456e7d3316Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 48466e7d3316Smrg_LT_EOF 4847a966c04fSmrg 48486e7d3316Smrg if AC_TRY_EVAL(ac_compile); then 48496e7d3316Smrg # Now try to grab the symbols. 48506e7d3316Smrg nlist=conftest.nm 48516e7d3316Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 48526e7d3316Smrg # Try sorting and uniquifying the output. 48536e7d3316Smrg if sort "$nlist" | uniq > "$nlist"T; then 48546e7d3316Smrg mv -f "$nlist"T "$nlist" 48556e7d3316Smrg else 48566e7d3316Smrg rm -f "$nlist"T 48576e7d3316Smrg fi 4858a966c04fSmrg 48596e7d3316Smrg # Make sure that we snagged all the symbols we need. 48606e7d3316Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 48616e7d3316Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 48626e7d3316Smrg cat <<_LT_EOF > conftest.$ac_ext 486397cf2ee2Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 486497cf2ee2Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 486597cf2ee2Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 486697cf2ee2Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 486797cf2ee2Smrg# define LT@&t@_DLSYM_CONST 486897cf2ee2Smrg#elif defined(__osf__) 486997cf2ee2Smrg/* This system does not cope well with relocations in const data. */ 487097cf2ee2Smrg# define LT@&t@_DLSYM_CONST 487197cf2ee2Smrg#else 487297cf2ee2Smrg# define LT@&t@_DLSYM_CONST const 487397cf2ee2Smrg#endif 487497cf2ee2Smrg 48756e7d3316Smrg#ifdef __cplusplus 48766e7d3316Smrgextern "C" { 48776e7d3316Smrg#endif 4878a966c04fSmrg 48796e7d3316Smrg_LT_EOF 48806e7d3316Smrg # Now generate the symbol file. 48816e7d3316Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4882a966c04fSmrg 48836e7d3316Smrg cat <<_LT_EOF >> conftest.$ac_ext 4884a966c04fSmrg 48856e7d3316Smrg/* The mapping between symbol names and symbols. */ 488697cf2ee2SmrgLT@&t@_DLSYM_CONST struct { 48876e7d3316Smrg const char *name; 48886e7d3316Smrg void *address; 48896e7d3316Smrg} 48906e7d3316Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 48916e7d3316Smrg{ 48926e7d3316Smrg { "@PROGRAM@", (void *) 0 }, 48936e7d3316Smrg_LT_EOF 48946e7d3316Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 48956e7d3316Smrg cat <<\_LT_EOF >> conftest.$ac_ext 48966e7d3316Smrg {0, (void *) 0} 48976e7d3316Smrg}; 4898a966c04fSmrg 48996e7d3316Smrg/* This works around a problem in FreeBSD linker */ 49006e7d3316Smrg#ifdef FREEBSD_WORKAROUND 49016e7d3316Smrgstatic const void *lt_preloaded_setup() { 49026e7d3316Smrg return lt__PROGRAM__LTX_preloaded_symbols; 49036e7d3316Smrg} 49046e7d3316Smrg#endif 4905a966c04fSmrg 49066e7d3316Smrg#ifdef __cplusplus 49076e7d3316Smrg} 49086e7d3316Smrg#endif 49096e7d3316Smrg_LT_EOF 49106e7d3316Smrg # Now try linking the two files. 49116e7d3316Smrg mv conftest.$ac_objext conftstm.$ac_objext 491297cf2ee2Smrg lt_globsym_save_LIBS=$LIBS 491397cf2ee2Smrg lt_globsym_save_CFLAGS=$CFLAGS 49146e7d3316Smrg LIBS="conftstm.$ac_objext" 49156e7d3316Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49166e7d3316Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49176e7d3316Smrg pipe_works=yes 49186e7d3316Smrg fi 491997cf2ee2Smrg LIBS=$lt_globsym_save_LIBS 492097cf2ee2Smrg CFLAGS=$lt_globsym_save_CFLAGS 49216e7d3316Smrg else 49226e7d3316Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49236e7d3316Smrg fi 49246e7d3316Smrg else 49256e7d3316Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49266e7d3316Smrg fi 4927a966c04fSmrg else 49286e7d3316Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4929a966c04fSmrg fi 4930a966c04fSmrg else 49316e7d3316Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49326e7d3316Smrg cat conftest.$ac_ext >&5 4933a966c04fSmrg fi 49346e7d3316Smrg rm -rf conftest* conftst* 4935a966c04fSmrg 49366e7d3316Smrg # Do not use the global_symbol_pipe unless it works. 49376e7d3316Smrg if test "$pipe_works" = yes; then 49386e7d3316Smrg break 49396e7d3316Smrg else 49406e7d3316Smrg lt_cv_sys_global_symbol_pipe= 49416e7d3316Smrg fi 49426e7d3316Smrgdone 49436e7d3316Smrg]) 49446e7d3316Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49456e7d3316Smrg lt_cv_sys_global_symbol_to_cdecl= 49466e7d3316Smrgfi 49476e7d3316Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49486e7d3316Smrg AC_MSG_RESULT(failed) 4949a966c04fSmrgelse 49506e7d3316Smrg AC_MSG_RESULT(ok) 4951a966c04fSmrgfi 4952a966c04fSmrg 495397cf2ee2Smrg# Response file support. 495497cf2ee2Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 495597cf2ee2Smrg nm_file_list_spec='@' 495697cf2ee2Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 495797cf2ee2Smrg nm_file_list_spec='@' 495897cf2ee2Smrgfi 495997cf2ee2Smrg 49606e7d3316Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 49616e7d3316Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 49626e7d3316Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 49636e7d3316Smrg [Transform the output of nm in a proper C declaration]) 49646e7d3316Smrg_LT_DECL([global_symbol_to_c_name_address], 49656e7d3316Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 49666e7d3316Smrg [Transform the output of nm in a C name address pair]) 49676e7d3316Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 49686e7d3316Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 49696e7d3316Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 497097cf2ee2Smrg_LT_DECL([], [nm_file_list_spec], [1], 497197cf2ee2Smrg [Specify filename containing input files for $NM]) 49726e7d3316Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4973a966c04fSmrg 4974a966c04fSmrg 49756e7d3316Smrg# _LT_COMPILER_PIC([TAGNAME]) 49766e7d3316Smrg# --------------------------- 49776e7d3316Smrgm4_defun([_LT_COMPILER_PIC], 49786e7d3316Smrg[m4_require([_LT_TAG_COMPILER])dnl 49796e7d3316Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 49806e7d3316Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 49816e7d3316Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4982a966c04fSmrg 49836e7d3316Smrgm4_if([$1], [CXX], [ 49846e7d3316Smrg # C++ specific cases for pic, static, wl, etc. 49856e7d3316Smrg if test "$GXX" = yes; then 49866e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49876e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4988a966c04fSmrg 49896e7d3316Smrg case $host_os in 49906e7d3316Smrg aix*) 49916e7d3316Smrg # All AIX code is PIC. 4992a966c04fSmrg if test "$host_cpu" = ia64; then 49936e7d3316Smrg # AIX 5 now supports IA64 processor 49946e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4995a966c04fSmrg fi 49966e7d3316Smrg ;; 4997a966c04fSmrg 49986e7d3316Smrg amigaos*) 49996e7d3316Smrg case $host_cpu in 50006e7d3316Smrg powerpc) 50016e7d3316Smrg # see comment about AmigaOS4 .so support 50026e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50036e7d3316Smrg ;; 50046e7d3316Smrg m68k) 50056e7d3316Smrg # FIXME: we need at least 68020 code to build shared libraries, but 50066e7d3316Smrg # adding the `-m68020' flag to GCC prevents building anything better, 50076e7d3316Smrg # like `-m68040'. 50086e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50096e7d3316Smrg ;; 50106e7d3316Smrg esac 50116e7d3316Smrg ;; 5012a966c04fSmrg 50136e7d3316Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50146e7d3316Smrg # PIC is the default for these OSes. 50156e7d3316Smrg ;; 50166e7d3316Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50176e7d3316Smrg # This hack is so that the source file can tell whether it is being 50186e7d3316Smrg # built for inclusion in a dll (and should export symbols for example). 50196e7d3316Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50206e7d3316Smrg # (--disable-auto-import) libraries 50216e7d3316Smrg m4_if([$1], [GCJ], [], 50226e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50236e7d3316Smrg ;; 50246e7d3316Smrg darwin* | rhapsody*) 50256e7d3316Smrg # PIC is the default on this platform 50266e7d3316Smrg # Common symbols not allowed in MH_DYLIB files 50276e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50286e7d3316Smrg ;; 50296e7d3316Smrg *djgpp*) 50306e7d3316Smrg # DJGPP does not support shared libraries at all 50316e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 50326e7d3316Smrg ;; 50336e7d3316Smrg haiku*) 50346e7d3316Smrg # PIC is the default for Haiku. 50356e7d3316Smrg # The "-static" flag exists, but is broken. 50366e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 50376e7d3316Smrg ;; 50386e7d3316Smrg interix[[3-9]]*) 50396e7d3316Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50406e7d3316Smrg # Instead, we relocate shared libraries at runtime. 50416e7d3316Smrg ;; 50426e7d3316Smrg sysv4*MP*) 50436e7d3316Smrg if test -d /usr/nec; then 50446e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50456e7d3316Smrg fi 50466e7d3316Smrg ;; 50476e7d3316Smrg hpux*) 50486e7d3316Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 50496e7d3316Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 50506e7d3316Smrg # sets the default TLS model and affects inlining. 50516e7d3316Smrg case $host_cpu in 50526e7d3316Smrg hppa*64*) 50536e7d3316Smrg ;; 5054a966c04fSmrg *) 50556e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5056a966c04fSmrg ;; 50576e7d3316Smrg esac 50586e7d3316Smrg ;; 50596e7d3316Smrg *qnx* | *nto*) 50606e7d3316Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 50616e7d3316Smrg # it will coredump. 50626e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 50636e7d3316Smrg ;; 50646e7d3316Smrg *) 50656e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50666e7d3316Smrg ;; 5067a966c04fSmrg esac 50686e7d3316Smrg else 50696e7d3316Smrg case $host_os in 50706e7d3316Smrg aix[[4-9]]*) 50716e7d3316Smrg # All AIX code is PIC. 50726e7d3316Smrg if test "$host_cpu" = ia64; then 50736e7d3316Smrg # AIX 5 now supports IA64 processor 50746e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50756e7d3316Smrg else 50766e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 50776e7d3316Smrg fi 5078a966c04fSmrg ;; 50796e7d3316Smrg chorus*) 50806e7d3316Smrg case $cc_basename in 50816e7d3316Smrg cxch68*) 50826e7d3316Smrg # Green Hills C++ Compiler 50836e7d3316Smrg # _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" 5084a966c04fSmrg ;; 5085a966c04fSmrg esac 5086a966c04fSmrg ;; 508797cf2ee2Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 508897cf2ee2Smrg # This hack is so that the source file can tell whether it is being 508997cf2ee2Smrg # built for inclusion in a dll (and should export symbols for example). 509097cf2ee2Smrg m4_if([$1], [GCJ], [], 509197cf2ee2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 509297cf2ee2Smrg ;; 50936e7d3316Smrg dgux*) 50946e7d3316Smrg case $cc_basename in 50956e7d3316Smrg ec++*) 50966e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 50976e7d3316Smrg ;; 50986e7d3316Smrg ghcx*) 50996e7d3316Smrg # Green Hills C++ Compiler 51006e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51016e7d3316Smrg ;; 51026e7d3316Smrg *) 51036e7d3316Smrg ;; 51046e7d3316Smrg esac 51056e7d3316Smrg ;; 51066e7d3316Smrg freebsd* | dragonfly*) 51076e7d3316Smrg # FreeBSD uses GNU C++ 51086e7d3316Smrg ;; 51096e7d3316Smrg hpux9* | hpux10* | hpux11*) 51106e7d3316Smrg case $cc_basename in 51116e7d3316Smrg CC*) 51126e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51136e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51146e7d3316Smrg if test "$host_cpu" != ia64; then 51156e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51166e7d3316Smrg fi 51176e7d3316Smrg ;; 51186e7d3316Smrg aCC*) 51196e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51206e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5121a966c04fSmrg case $host_cpu in 51226e7d3316Smrg hppa*64*|ia64*) 51236e7d3316Smrg # +Z the default 5124a966c04fSmrg ;; 5125a966c04fSmrg *) 51266e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5127a966c04fSmrg ;; 5128a966c04fSmrg esac 51296e7d3316Smrg ;; 51306e7d3316Smrg *) 51316e7d3316Smrg ;; 51326e7d3316Smrg esac 5133a966c04fSmrg ;; 51346e7d3316Smrg interix*) 51356e7d3316Smrg # This is c89, which is MS Visual C++ (no shared libs) 51366e7d3316Smrg # Anyone wants to do a port? 5137a966c04fSmrg ;; 51386e7d3316Smrg irix5* | irix6* | nonstopux*) 51396e7d3316Smrg case $cc_basename in 51406e7d3316Smrg CC*) 51416e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51426e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51436e7d3316Smrg # CC pic flag -KPIC is the default. 51446e7d3316Smrg ;; 51456e7d3316Smrg *) 51466e7d3316Smrg ;; 51476e7d3316Smrg esac 5148a966c04fSmrg ;; 51496e7d3316Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 51506e7d3316Smrg case $cc_basename in 51516e7d3316Smrg KCC*) 51526e7d3316Smrg # KAI C++ Compiler 51536e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51546e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51556e7d3316Smrg ;; 51566e7d3316Smrg ecpc* ) 51576e7d3316Smrg # old Intel C++ for x86_64 which still supported -KPIC. 51586e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51596e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51606e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 51616e7d3316Smrg ;; 51626e7d3316Smrg icpc* ) 51636e7d3316Smrg # Intel C++, used to be incompatible with GCC. 51646e7d3316Smrg # ICC 10 doesn't accept -KPIC any more. 51656e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51666e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51676e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 51686e7d3316Smrg ;; 51696e7d3316Smrg pgCC* | pgcpp*) 51706e7d3316Smrg # Portland Group C++ compiler 51716e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51726e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 51736e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51746e7d3316Smrg ;; 51756e7d3316Smrg cxx*) 51766e7d3316Smrg # Compaq C++ 51776e7d3316Smrg # Make sure the PIC flag is empty. It appears that all Alpha 51786e7d3316Smrg # Linux and Compaq Tru64 Unix objects are PIC. 51796e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 51806e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51816e7d3316Smrg ;; 51826e7d3316Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 51836e7d3316Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 51846e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51856e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 51866e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 51876e7d3316Smrg ;; 51886e7d3316Smrg *) 51896e7d3316Smrg case `$CC -V 2>&1 | sed 5q` in 51906e7d3316Smrg *Sun\ C*) 51916e7d3316Smrg # Sun C++ 5.9 51926e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51936e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51946e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51956e7d3316Smrg ;; 51966e7d3316Smrg esac 51976e7d3316Smrg ;; 51986e7d3316Smrg esac 5199a966c04fSmrg ;; 52006e7d3316Smrg lynxos*) 52016e7d3316Smrg ;; 52026e7d3316Smrg m88k*) 52036e7d3316Smrg ;; 52046e7d3316Smrg mvs*) 52056e7d3316Smrg case $cc_basename in 52066e7d3316Smrg cxx*) 52076e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52086e7d3316Smrg ;; 52096e7d3316Smrg *) 52106e7d3316Smrg ;; 5211a966c04fSmrg esac 5212a966c04fSmrg ;; 52136e7d3316Smrg netbsd*) 5214a966c04fSmrg ;; 52156e7d3316Smrg *qnx* | *nto*) 52166e7d3316Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 52176e7d3316Smrg # it will coredump. 52186e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 52196e7d3316Smrg ;; 52206e7d3316Smrg osf3* | osf4* | osf5*) 52216e7d3316Smrg case $cc_basename in 52226e7d3316Smrg KCC*) 52236e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52246e7d3316Smrg ;; 52256e7d3316Smrg RCC*) 52266e7d3316Smrg # Rational C++ 2.4.1 52276e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52286e7d3316Smrg ;; 52296e7d3316Smrg cxx*) 52306e7d3316Smrg # Digital/Compaq C++ 52316e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52326e7d3316Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52336e7d3316Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52346e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52356e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52366e7d3316Smrg ;; 52376e7d3316Smrg *) 52386e7d3316Smrg ;; 52392e2dd055Smrg esac 52402e2dd055Smrg ;; 52416e7d3316Smrg psos*) 5242a966c04fSmrg ;; 52436e7d3316Smrg solaris*) 52446e7d3316Smrg case $cc_basename in 52456e7d3316Smrg CC* | sunCC*) 52466e7d3316Smrg # Sun C++ 4.2, 5.x and Centerline C++ 52476e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52486e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52496e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52506e7d3316Smrg ;; 52516e7d3316Smrg gcx*) 52526e7d3316Smrg # Green Hills C++ Compiler 52536e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52546e7d3316Smrg ;; 52556e7d3316Smrg *) 52566e7d3316Smrg ;; 52576e7d3316Smrg esac 5258a966c04fSmrg ;; 52596e7d3316Smrg sunos4*) 52606e7d3316Smrg case $cc_basename in 52616e7d3316Smrg CC*) 52626e7d3316Smrg # Sun C++ 4.x 52636e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52646e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52656e7d3316Smrg ;; 52666e7d3316Smrg lcc*) 52676e7d3316Smrg # Lucid 52686e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52696e7d3316Smrg ;; 52706e7d3316Smrg *) 52716e7d3316Smrg ;; 52726e7d3316Smrg esac 52736e7d3316Smrg ;; 52746e7d3316Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 52756e7d3316Smrg case $cc_basename in 52766e7d3316Smrg CC*) 52776e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52786e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52796e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52806e7d3316Smrg ;; 52816e7d3316Smrg esac 5282a966c04fSmrg ;; 52836e7d3316Smrg tandem*) 52846e7d3316Smrg case $cc_basename in 52856e7d3316Smrg NCC*) 52866e7d3316Smrg # NonStop-UX NCC 3.20 52876e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52886e7d3316Smrg ;; 52896e7d3316Smrg *) 52906e7d3316Smrg ;; 52916e7d3316Smrg esac 5292a966c04fSmrg ;; 52936e7d3316Smrg vxworks*) 5294a966c04fSmrg ;; 5295a966c04fSmrg *) 52966e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5297a966c04fSmrg ;; 5298a966c04fSmrg esac 52996e7d3316Smrg fi 53006e7d3316Smrg], 53016e7d3316Smrg[ 53026e7d3316Smrg if test "$GCC" = yes; then 53036e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53046e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5305a966c04fSmrg 53066e7d3316Smrg case $host_os in 53076e7d3316Smrg aix*) 53086e7d3316Smrg # All AIX code is PIC. 53096e7d3316Smrg if test "$host_cpu" = ia64; then 53106e7d3316Smrg # AIX 5 now supports IA64 processor 53116e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53126e7d3316Smrg fi 53136e7d3316Smrg ;; 5314a966c04fSmrg 53156e7d3316Smrg amigaos*) 53166e7d3316Smrg case $host_cpu in 53176e7d3316Smrg powerpc) 53186e7d3316Smrg # see comment about AmigaOS4 .so support 53196e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53206e7d3316Smrg ;; 53216e7d3316Smrg m68k) 53226e7d3316Smrg # FIXME: we need at least 68020 code to build shared libraries, but 53236e7d3316Smrg # adding the `-m68020' flag to GCC prevents building anything better, 53246e7d3316Smrg # like `-m68040'. 53256e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53266e7d3316Smrg ;; 53276e7d3316Smrg esac 53286e7d3316Smrg ;; 5329a966c04fSmrg 53306e7d3316Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53316e7d3316Smrg # PIC is the default for these OSes. 53326e7d3316Smrg ;; 5333a966c04fSmrg 53346e7d3316Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 53356e7d3316Smrg # This hack is so that the source file can tell whether it is being 53366e7d3316Smrg # built for inclusion in a dll (and should export symbols for example). 53376e7d3316Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53386e7d3316Smrg # (--disable-auto-import) libraries 53396e7d3316Smrg m4_if([$1], [GCJ], [], 53406e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53416e7d3316Smrg ;; 5342a966c04fSmrg 53436e7d3316Smrg darwin* | rhapsody*) 53446e7d3316Smrg # PIC is the default on this platform 53456e7d3316Smrg # Common symbols not allowed in MH_DYLIB files 53466e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53476e7d3316Smrg ;; 53486e7d3316Smrg 53496e7d3316Smrg haiku*) 53506e7d3316Smrg # PIC is the default for Haiku. 53516e7d3316Smrg # The "-static" flag exists, but is broken. 53526e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 53536e7d3316Smrg ;; 53546e7d3316Smrg 53556e7d3316Smrg hpux*) 53566e7d3316Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 53576e7d3316Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 53586e7d3316Smrg # sets the default TLS model and affects inlining. 53596e7d3316Smrg case $host_cpu in 53606e7d3316Smrg hppa*64*) 53616e7d3316Smrg # +Z the default 5362a966c04fSmrg ;; 5363a966c04fSmrg *) 53646e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5365a966c04fSmrg ;; 53666e7d3316Smrg esac 53676e7d3316Smrg ;; 5368a966c04fSmrg 53696e7d3316Smrg interix[[3-9]]*) 53706e7d3316Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 53716e7d3316Smrg # Instead, we relocate shared libraries at runtime. 53726e7d3316Smrg ;; 5373a966c04fSmrg 53746e7d3316Smrg msdosdjgpp*) 53756e7d3316Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 53766e7d3316Smrg # on systems that don't support them. 53776e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53786e7d3316Smrg enable_shared=no 53796e7d3316Smrg ;; 5380a966c04fSmrg 53816e7d3316Smrg *nto* | *qnx*) 53826e7d3316Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 53836e7d3316Smrg # it will coredump. 53846e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 53856e7d3316Smrg ;; 5386a966c04fSmrg 53876e7d3316Smrg sysv4*MP*) 53886e7d3316Smrg if test -d /usr/nec; then 53896e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 53906e7d3316Smrg fi 53916e7d3316Smrg ;; 5392a966c04fSmrg 53936e7d3316Smrg *) 53946e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53956e7d3316Smrg ;; 5396a966c04fSmrg esac 5397a966c04fSmrg 5398a966c04fSmrg case $cc_basename in 53996e7d3316Smrg nvcc*) # Cuda Compiler Driver 2.2 54006e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 54016e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 54026e7d3316Smrg ;; 5403a966c04fSmrg esac 54046e7d3316Smrg else 54056e7d3316Smrg # PORTME Check for flag to pass linker flags through the system compiler. 54066e7d3316Smrg case $host_os in 54076e7d3316Smrg aix*) 54086e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54096e7d3316Smrg if test "$host_cpu" = ia64; then 54106e7d3316Smrg # AIX 5 now supports IA64 processor 54116e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54126e7d3316Smrg else 54136e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 54146e7d3316Smrg fi 54156e7d3316Smrg ;; 5416a966c04fSmrg 54176e7d3316Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 54186e7d3316Smrg # This hack is so that the source file can tell whether it is being 54196e7d3316Smrg # built for inclusion in a dll (and should export symbols for example). 54206e7d3316Smrg m4_if([$1], [GCJ], [], 54216e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 54226e7d3316Smrg ;; 54236e7d3316Smrg 54246e7d3316Smrg hpux9* | hpux10* | hpux11*) 54256e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54266e7d3316Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54276e7d3316Smrg # not for PA HP-UX. 54286e7d3316Smrg case $host_cpu in 54296e7d3316Smrg hppa*64*|ia64*) 54306e7d3316Smrg # +Z the default 5431a966c04fSmrg ;; 5432a966c04fSmrg *) 54336e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5434a966c04fSmrg ;; 54356e7d3316Smrg esac 54366e7d3316Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54376e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54386e7d3316Smrg ;; 54396e7d3316Smrg 54406e7d3316Smrg irix5* | irix6* | nonstopux*) 54416e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54426e7d3316Smrg # PIC (with -KPIC) is the default. 54436e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54446e7d3316Smrg ;; 54456e7d3316Smrg 54466e7d3316Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 54476e7d3316Smrg case $cc_basename in 54486e7d3316Smrg # old Intel for x86_64 which still supported -KPIC. 54496e7d3316Smrg ecc*) 54506e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54516e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54526e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54536e7d3316Smrg ;; 54546e7d3316Smrg # icc used to be incompatible with GCC. 54556e7d3316Smrg # ICC 10 doesn't accept -KPIC any more. 54566e7d3316Smrg icc* | ifort*) 54576e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54586e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54596e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54606e7d3316Smrg ;; 54616e7d3316Smrg # Lahey Fortran 8.1. 54626e7d3316Smrg lf95*) 54636e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54646e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 54656e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 54666e7d3316Smrg ;; 546797cf2ee2Smrg nagfor*) 546897cf2ee2Smrg # NAG Fortran compiler 546997cf2ee2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 547097cf2ee2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 547197cf2ee2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 547297cf2ee2Smrg ;; 54736e7d3316Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 54746e7d3316Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 54756e7d3316Smrg # which looks to be a dead project) 54766e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54776e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54786e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54796e7d3316Smrg ;; 54806e7d3316Smrg ccc*) 54816e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54826e7d3316Smrg # All Alpha code is PIC. 54836e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54846e7d3316Smrg ;; 54856e7d3316Smrg xl* | bgxl* | bgf* | mpixl*) 54866e7d3316Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 54876e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54886e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 54896e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5490a966c04fSmrg ;; 5491a966c04fSmrg *) 54926e7d3316Smrg case `$CC -V 2>&1 | sed 5q` in 54936e7d3316Smrg *Sun\ F* | *Sun*Fortran*) 54946e7d3316Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 54956e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54966e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54976e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 54986e7d3316Smrg ;; 54996e7d3316Smrg *Sun\ C*) 55006e7d3316Smrg # Sun C 5.9 55016e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55026e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55036e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55046e7d3316Smrg ;; 55056e7d3316Smrg esac 5506a966c04fSmrg ;; 55076e7d3316Smrg esac 55086e7d3316Smrg ;; 5509a966c04fSmrg 55106e7d3316Smrg newsos6) 55116e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55126e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55136e7d3316Smrg ;; 5514a966c04fSmrg 55156e7d3316Smrg *nto* | *qnx*) 55166e7d3316Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 55176e7d3316Smrg # it will coredump. 55186e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 55196e7d3316Smrg ;; 5520a966c04fSmrg 55216e7d3316Smrg osf3* | osf4* | osf5*) 55226e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55236e7d3316Smrg # All OSF/1 code is PIC. 55246e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55256e7d3316Smrg ;; 5526a966c04fSmrg 55276e7d3316Smrg rdos*) 55286e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55296e7d3316Smrg ;; 5530a966c04fSmrg 55316e7d3316Smrg solaris*) 55326e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55336e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55346e7d3316Smrg case $cc_basename in 55356e7d3316Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 55366e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 55376e7d3316Smrg *) 55386e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 55396e7d3316Smrg esac 55406e7d3316Smrg ;; 5541a966c04fSmrg 55426e7d3316Smrg sunos4*) 55436e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 55446e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55456e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55466e7d3316Smrg ;; 5547a966c04fSmrg 55486e7d3316Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 55496e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55506e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55516e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55526e7d3316Smrg ;; 5553a966c04fSmrg 55546e7d3316Smrg sysv4*MP*) 55556e7d3316Smrg if test -d /usr/nec ;then 55566e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 55576e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55586e7d3316Smrg fi 55596e7d3316Smrg ;; 5560a966c04fSmrg 55616e7d3316Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 55626e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55636e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55646e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55656e7d3316Smrg ;; 5566a966c04fSmrg 55676e7d3316Smrg unicos*) 55686e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55696e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55706e7d3316Smrg ;; 5571a966c04fSmrg 55726e7d3316Smrg uts4*) 55736e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 55746e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55756e7d3316Smrg ;; 5576a966c04fSmrg 55776e7d3316Smrg *) 55786e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55796e7d3316Smrg ;; 5580a966c04fSmrg esac 55816e7d3316Smrg fi 55826e7d3316Smrg]) 55836e7d3316Smrgcase $host_os in 55846e7d3316Smrg # For platforms which do not support PIC, -DPIC is meaningless: 55856e7d3316Smrg *djgpp*) 55866e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 55876e7d3316Smrg ;; 55886e7d3316Smrg *) 55896e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 55906e7d3316Smrg ;; 55916e7d3316Smrgesac 559297cf2ee2Smrg 559397cf2ee2SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 559497cf2ee2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 559597cf2ee2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 559697cf2ee2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5597a966c04fSmrg 55986e7d3316Smrg# 55996e7d3316Smrg# Check to make sure the PIC flag actually works. 56006e7d3316Smrg# 56016e7d3316Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 56026e7d3316Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 56036e7d3316Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 56046e7d3316Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 56056e7d3316Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 56066e7d3316Smrg "" | " "*) ;; 56076e7d3316Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 56086e7d3316Smrg esac], 56096e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 56106e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5611a966c04fSmrgfi 56126e7d3316Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 56136e7d3316Smrg [Additional compiler flags for building library objects]) 5614a966c04fSmrg 561597cf2ee2Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 561697cf2ee2Smrg [How to pass a linker flag through the compiler]) 56176e7d3316Smrg# 56186e7d3316Smrg# Check to make sure the static flag actually works. 56196e7d3316Smrg# 56206e7d3316Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 56216e7d3316Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 56226e7d3316Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 56236e7d3316Smrg $lt_tmp_static_flag, 56246e7d3316Smrg [], 56256e7d3316Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 56266e7d3316Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 56276e7d3316Smrg [Compiler flag to prevent dynamic linking]) 56286e7d3316Smrg])# _LT_COMPILER_PIC 56292e2dd055Smrg 5630a966c04fSmrg 56316e7d3316Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 56326e7d3316Smrg# ---------------------------- 56336e7d3316Smrg# See if the linker supports building shared libraries. 56346e7d3316Smrgm4_defun([_LT_LINKER_SHLIBS], 56356e7d3316Smrg[AC_REQUIRE([LT_PATH_LD])dnl 56366e7d3316SmrgAC_REQUIRE([LT_PATH_NM])dnl 563797cf2ee2Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 56386e7d3316Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 56396e7d3316Smrgm4_require([_LT_DECL_EGREP])dnl 56406e7d3316Smrgm4_require([_LT_DECL_SED])dnl 56416e7d3316Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 56426e7d3316Smrgm4_require([_LT_TAG_COMPILER])dnl 56436e7d3316SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 56446e7d3316Smrgm4_if([$1], [CXX], [ 56456e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 564697cf2ee2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56476e7d3316Smrg case $host_os in 56486e7d3316Smrg aix[[4-9]]*) 56496e7d3316Smrg # If we're using GNU nm, then we don't want the "-C" option. 56506e7d3316Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 56516e7d3316Smrg # Also, AIX nm treats weak defined symbols like other global defined 56526e7d3316Smrg # symbols, whereas GNU nm marks them as "W". 56536e7d3316Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 56546e7d3316Smrg _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' 56556e7d3316Smrg else 56566e7d3316Smrg _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' 56572e2dd055Smrg fi 56582e2dd055Smrg ;; 56596e7d3316Smrg pw32*) 56606e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 566197cf2ee2Smrg ;; 56626e7d3316Smrg cygwin* | mingw* | cegcc*) 566397cf2ee2Smrg case $cc_basename in 566497cf2ee2Smrg cl*) ;; 566597cf2ee2Smrg *) 566697cf2ee2Smrg _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' 566797cf2ee2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 566897cf2ee2Smrg ;; 566997cf2ee2Smrg esac 567097cf2ee2Smrg ;; 56716e7d3316Smrg *) 56726e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 567397cf2ee2Smrg ;; 56746e7d3316Smrg esac 56756e7d3316Smrg], [ 56766e7d3316Smrg runpath_var= 56776e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 56786e7d3316Smrg _LT_TAGVAR(always_export_symbols, $1)=no 56796e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)= 56806e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 56816e7d3316Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 56826e7d3316Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 56836e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 56846e7d3316Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56856e7d3316Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 56866e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 56876e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 56886e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 56896e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 56906e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 56916e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 56926e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 56936e7d3316Smrg _LT_TAGVAR(inherit_rpath, $1)=no 56946e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 56956e7d3316Smrg _LT_TAGVAR(module_cmds, $1)= 56966e7d3316Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 56976e7d3316Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 56986e7d3316Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 56996e7d3316Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 57006e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57016e7d3316Smrg # include_expsyms should be a list of space-separated symbols to be *always* 57026e7d3316Smrg # included in the symbol list 57036e7d3316Smrg _LT_TAGVAR(include_expsyms, $1)= 57046e7d3316Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 57056e7d3316Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 57066e7d3316Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 57076e7d3316Smrg # as well as any symbol that contains `d'. 57086e7d3316Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 57096e7d3316Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 57106e7d3316Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 57116e7d3316Smrg # the symbol is explicitly referenced. Since portable code cannot 57126e7d3316Smrg # rely on this symbol name, it's probably fine to never include it in 57136e7d3316Smrg # preloaded symbol tables. 57146e7d3316Smrg # Exclude shared library initialization/finalization symbols. 57156e7d3316Smrgdnl Note also adjust exclude_expsyms for C++ above. 57166e7d3316Smrg extract_expsyms_cmds= 57172e2dd055Smrg 57186e7d3316Smrg case $host_os in 57196e7d3316Smrg cygwin* | mingw* | pw32* | cegcc*) 57206e7d3316Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 57216e7d3316Smrg # When not using gcc, we currently assume that we are using 57226e7d3316Smrg # Microsoft Visual C++. 57236e7d3316Smrg if test "$GCC" != yes; then 57246e7d3316Smrg with_gnu_ld=no 57252e2dd055Smrg fi 5726a966c04fSmrg ;; 57276e7d3316Smrg interix*) 57286e7d3316Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 57296e7d3316Smrg with_gnu_ld=yes 57306e7d3316Smrg ;; 57316e7d3316Smrg openbsd*) 57326e7d3316Smrg with_gnu_ld=no 57336e7d3316Smrg ;; 5734a966c04fSmrg esac 5735a966c04fSmrg 57366e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5737a966c04fSmrg 57386e7d3316Smrg # On some targets, GNU ld is compatible enough with the native linker 57396e7d3316Smrg # that we're better off using the native interface for both. 57406e7d3316Smrg lt_use_gnu_ld_interface=no 57416e7d3316Smrg if test "$with_gnu_ld" = yes; then 57426e7d3316Smrg case $host_os in 57436e7d3316Smrg aix*) 57446e7d3316Smrg # The AIX port of GNU ld has always aspired to compatibility 57456e7d3316Smrg # with the native linker. However, as the warning in the GNU ld 57466e7d3316Smrg # block says, versions before 2.19.5* couldn't really create working 57476e7d3316Smrg # shared libraries, regardless of the interface used. 57486e7d3316Smrg case `$LD -v 2>&1` in 57496e7d3316Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 57506e7d3316Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 57516e7d3316Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 57526e7d3316Smrg *) 57536e7d3316Smrg lt_use_gnu_ld_interface=yes 57546e7d3316Smrg ;; 57556e7d3316Smrg esac 57566e7d3316Smrg ;; 57576e7d3316Smrg *) 57586e7d3316Smrg lt_use_gnu_ld_interface=yes 57596e7d3316Smrg ;; 57606e7d3316Smrg esac 57616e7d3316Smrg fi 5762a966c04fSmrg 57636e7d3316Smrg if test "$lt_use_gnu_ld_interface" = yes; then 57646e7d3316Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 57656e7d3316Smrg wlarc='${wl}' 5766a966c04fSmrg 57676e7d3316Smrg # Set some defaults for GNU ld with shared library support. These 57686e7d3316Smrg # are reset later if shared libraries are not supported. Putting them 57696e7d3316Smrg # here allows them to be overridden if necessary. 57706e7d3316Smrg runpath_var=LD_RUN_PATH 57716e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 57726e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 57736e7d3316Smrg # ancient GNU ld didn't support --whole-archive et. al. 57746e7d3316Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 57756e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 57766e7d3316Smrg else 57776e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57786e7d3316Smrg fi 57796e7d3316Smrg supports_anon_versioning=no 57806e7d3316Smrg case `$LD -v 2>&1` in 57816e7d3316Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 57826e7d3316Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 57836e7d3316Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 57846e7d3316Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 57856e7d3316Smrg *\ 2.11.*) ;; # other 2.11 versions 57866e7d3316Smrg *) supports_anon_versioning=yes ;; 57876e7d3316Smrg esac 5788a966c04fSmrg 57896e7d3316Smrg # See if GNU ld supports shared libraries. 57906e7d3316Smrg case $host_os in 57916e7d3316Smrg aix[[3-9]]*) 57926e7d3316Smrg # On AIX/PPC, the GNU linker is very broken 57936e7d3316Smrg if test "$host_cpu" != ia64; then 57946e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 57956e7d3316Smrg cat <<_LT_EOF 1>&2 5796a966c04fSmrg 57976e7d3316Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 57986e7d3316Smrg*** to be unable to reliably create shared libraries on AIX. 57996e7d3316Smrg*** Therefore, libtool is disabling shared libraries support. If you 58006e7d3316Smrg*** really care for shared libraries, you may want to install binutils 58016e7d3316Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 58026e7d3316Smrg*** You will then need to restart the configuration process. 5803a966c04fSmrg 58046e7d3316Smrg_LT_EOF 58056e7d3316Smrg fi 58066e7d3316Smrg ;; 5807a966c04fSmrg 58086e7d3316Smrg amigaos*) 58096e7d3316Smrg case $host_cpu in 58106e7d3316Smrg powerpc) 58116e7d3316Smrg # see comment about AmigaOS4 .so support 58126e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58136e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 58146e7d3316Smrg ;; 58156e7d3316Smrg m68k) 58166e7d3316Smrg _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)' 58176e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58186e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58196e7d3316Smrg ;; 58206e7d3316Smrg esac 58216e7d3316Smrg ;; 5822a966c04fSmrg 58236e7d3316Smrg beos*) 58246e7d3316Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 58256e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58266e7d3316Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 58276e7d3316Smrg # support --undefined. This deserves some investigation. FIXME 58286e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58296e7d3316Smrg else 58306e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58316e7d3316Smrg fi 58326e7d3316Smrg ;; 5833a966c04fSmrg 58346e7d3316Smrg cygwin* | mingw* | pw32* | cegcc*) 58356e7d3316Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 58366e7d3316Smrg # as there is no search path for DLLs. 58376e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58386e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 58396e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58406e7d3316Smrg _LT_TAGVAR(always_export_symbols, $1)=no 58416e7d3316Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 584297cf2ee2Smrg _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' 584397cf2ee2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 58446e7d3316Smrg 58456e7d3316Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 58466e7d3316Smrg _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' 58476e7d3316Smrg # If the export-symbols file already is a .def file (1st line 58486e7d3316Smrg # is EXPORTS), use it as is; otherwise, prepend... 58496e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 58506e7d3316Smrg cp $export_symbols $output_objdir/$soname.def; 58516e7d3316Smrg else 58526e7d3316Smrg echo EXPORTS > $output_objdir/$soname.def; 58536e7d3316Smrg cat $export_symbols >> $output_objdir/$soname.def; 58546e7d3316Smrg fi~ 58556e7d3316Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 58566e7d3316Smrg else 58576e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58586e7d3316Smrg fi 58596e7d3316Smrg ;; 5860a966c04fSmrg 58616e7d3316Smrg haiku*) 58626e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58636e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58646e7d3316Smrg ;; 5865a966c04fSmrg 58666e7d3316Smrg interix[[3-9]]*) 58676e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 58686e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58696e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58706e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 58716e7d3316Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 58726e7d3316Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 58736e7d3316Smrg # default) and relocated if they conflict, which is a slow very memory 58746e7d3316Smrg # consuming and fragmenting process. To avoid this, we pick a random, 58756e7d3316Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 58766e7d3316Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 58776e7d3316Smrg _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' 58786e7d3316Smrg _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' 58796e7d3316Smrg ;; 5880a966c04fSmrg 58816e7d3316Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 58826e7d3316Smrg tmp_diet=no 58836e7d3316Smrg if test "$host_os" = linux-dietlibc; then 58846e7d3316Smrg case $cc_basename in 58856e7d3316Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 58866e7d3316Smrg esac 58876e7d3316Smrg fi 58886e7d3316Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 58896e7d3316Smrg && test "$tmp_diet" = no 58906e7d3316Smrg then 589197cf2ee2Smrg tmp_addflag=' $pic_flag' 58926e7d3316Smrg tmp_sharedflag='-shared' 58936e7d3316Smrg case $cc_basename,$host_cpu in 58946e7d3316Smrg pgcc*) # Portland Group C compiler 58956e7d3316Smrg _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' 58966e7d3316Smrg tmp_addflag=' $pic_flag' 58976e7d3316Smrg ;; 58986e7d3316Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 58996e7d3316Smrg # Portland Group f77 and f90 compilers 59006e7d3316Smrg _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' 59016e7d3316Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 59026e7d3316Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 59036e7d3316Smrg tmp_addflag=' -i_dynamic' ;; 59046e7d3316Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 59056e7d3316Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 59066e7d3316Smrg ifc* | ifort*) # Intel Fortran compiler 59076e7d3316Smrg tmp_addflag=' -nofor_main' ;; 59086e7d3316Smrg lf95*) # Lahey Fortran 8.1 59096e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59106e7d3316Smrg tmp_sharedflag='--shared' ;; 59116e7d3316Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 59126e7d3316Smrg tmp_sharedflag='-qmkshrobj' 59136e7d3316Smrg tmp_addflag= ;; 59146e7d3316Smrg nvcc*) # Cuda Compiler Driver 2.2 59156e7d3316Smrg _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' 59166e7d3316Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59176e7d3316Smrg ;; 59186e7d3316Smrg esac 59196e7d3316Smrg case `$CC -V 2>&1 | sed 5q` in 59206e7d3316Smrg *Sun\ C*) # Sun C 5.9 59216e7d3316Smrg _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' 59226e7d3316Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59236e7d3316Smrg tmp_sharedflag='-G' ;; 59246e7d3316Smrg *Sun\ F*) # Sun Fortran 8.3 59256e7d3316Smrg tmp_sharedflag='-G' ;; 59266e7d3316Smrg esac 59276e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5928a966c04fSmrg 59296e7d3316Smrg if test "x$supports_anon_versioning" = xyes; then 59306e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59316e7d3316Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59326e7d3316Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59336e7d3316Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59346e7d3316Smrg fi 5935a966c04fSmrg 59366e7d3316Smrg case $cc_basename in 59376e7d3316Smrg xlf* | bgf* | bgxlf* | mpixlf*) 59386e7d3316Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 59396e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 59406e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 59416e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 59426e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 59436e7d3316Smrg if test "x$supports_anon_versioning" = xyes; then 59446e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59456e7d3316Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59466e7d3316Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59476e7d3316Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 59486e7d3316Smrg fi 59496e7d3316Smrg ;; 59506e7d3316Smrg esac 59516e7d3316Smrg else 59526e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59536e7d3316Smrg fi 59546e7d3316Smrg ;; 5955a966c04fSmrg 59566e7d3316Smrg netbsd*) 59576e7d3316Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 59586e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 59596e7d3316Smrg wlarc= 59606e7d3316Smrg else 596197cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 596297cf2ee2Smrg _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' 59636e7d3316Smrg fi 59646e7d3316Smrg ;; 5965a966c04fSmrg 59666e7d3316Smrg solaris*) 59676e7d3316Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 59686e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59696e7d3316Smrg cat <<_LT_EOF 1>&2 5970a966c04fSmrg 59716e7d3316Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 59726e7d3316Smrg*** create shared libraries on Solaris systems. Therefore, libtool 59736e7d3316Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 59746e7d3316Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 59756e7d3316Smrg*** your PATH or compiler configuration so that the native linker is 59766e7d3316Smrg*** used, and then restart. 5977a966c04fSmrg 59786e7d3316Smrg_LT_EOF 59796e7d3316Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 598097cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 598197cf2ee2Smrg _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' 59826e7d3316Smrg else 59836e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59846e7d3316Smrg fi 59856e7d3316Smrg ;; 5986a966c04fSmrg 59876e7d3316Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 59886e7d3316Smrg case `$LD -v 2>&1` in 59896e7d3316Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 59906e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59916e7d3316Smrg cat <<_LT_EOF 1>&2 5992a966c04fSmrg 59936e7d3316Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 59946e7d3316Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 59956e7d3316Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 59966e7d3316Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 59976e7d3316Smrg*** your PATH or compiler configuration so that the native linker is 59986e7d3316Smrg*** used, and then restart. 5999a966c04fSmrg 60006e7d3316Smrg_LT_EOF 60016e7d3316Smrg ;; 60026e7d3316Smrg *) 60036e7d3316Smrg # For security reasons, it is highly recommended that you always 60046e7d3316Smrg # use absolute paths for naming shared libraries, and exclude the 60056e7d3316Smrg # DT_RUNPATH tag from executables and libraries. But doing so 60066e7d3316Smrg # requires that you compile everything twice, which is a pain. 60076e7d3316Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60086e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 60096e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60106e7d3316Smrg _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' 60116e7d3316Smrg else 60126e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60136e7d3316Smrg fi 60146e7d3316Smrg ;; 60156e7d3316Smrg esac 60166e7d3316Smrg ;; 6017a966c04fSmrg 60186e7d3316Smrg sunos4*) 60196e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 60206e7d3316Smrg wlarc= 60216e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60226e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60236e7d3316Smrg ;; 6024a966c04fSmrg 60256e7d3316Smrg *) 60266e7d3316Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 602797cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 602897cf2ee2Smrg _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' 60296e7d3316Smrg else 60306e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60316e7d3316Smrg fi 60326e7d3316Smrg ;; 60336e7d3316Smrg esac 6034a966c04fSmrg 60356e7d3316Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 60366e7d3316Smrg runpath_var= 60376e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 60386e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 60396e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 60406e7d3316Smrg fi 60416e7d3316Smrg else 60426e7d3316Smrg # PORTME fill in a description of your system's linker (not GNU ld) 60436e7d3316Smrg case $host_os in 60446e7d3316Smrg aix3*) 60456e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 60466e7d3316Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60476e7d3316Smrg _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' 60486e7d3316Smrg # Note: this linker hardcodes the directories in LIBPATH if there 60496e7d3316Smrg # are no directories specified by -L. 60506e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60516e7d3316Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 60526e7d3316Smrg # Neither direct hardcoding nor static linking is supported with a 60536e7d3316Smrg # broken collect2. 60546e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60556e7d3316Smrg fi 60566e7d3316Smrg ;; 6057a966c04fSmrg 60586e7d3316Smrg aix[[4-9]]*) 60596e7d3316Smrg if test "$host_cpu" = ia64; then 60606e7d3316Smrg # On IA64, the linker does run time linking by default, so we don't 60616e7d3316Smrg # have to do anything special. 60626e7d3316Smrg aix_use_runtimelinking=no 60636e7d3316Smrg exp_sym_flag='-Bexport' 60646e7d3316Smrg no_entry_flag="" 60656e7d3316Smrg else 60666e7d3316Smrg # If we're using GNU nm, then we don't want the "-C" option. 60676e7d3316Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 60686e7d3316Smrg # Also, AIX nm treats weak defined symbols like other global 60696e7d3316Smrg # defined symbols, whereas GNU nm marks them as "W". 60706e7d3316Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 60716e7d3316Smrg _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' 60726e7d3316Smrg else 60736e7d3316Smrg _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' 60746e7d3316Smrg fi 60756e7d3316Smrg aix_use_runtimelinking=no 6076a966c04fSmrg 60776e7d3316Smrg # Test if we are trying to use run time linking or normal 60786e7d3316Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60796e7d3316Smrg # need to do runtime linking. 60806e7d3316Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60816e7d3316Smrg for ld_flag in $LDFLAGS; do 60826e7d3316Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 60836e7d3316Smrg aix_use_runtimelinking=yes 60846e7d3316Smrg break 60856e7d3316Smrg fi 60866e7d3316Smrg done 60876e7d3316Smrg ;; 60886e7d3316Smrg esac 6089a966c04fSmrg 60906e7d3316Smrg exp_sym_flag='-bexport' 60916e7d3316Smrg no_entry_flag='-bnoentry' 60926e7d3316Smrg fi 6093a966c04fSmrg 60946e7d3316Smrg # When large executables or shared objects are built, AIX ld can 60956e7d3316Smrg # have problems creating the table of contents. If linking a library 60966e7d3316Smrg # or program results in "error TOC overflow" add -mminimal-toc to 60976e7d3316Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60986e7d3316Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6099a966c04fSmrg 61006e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='' 61016e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 61026e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 61036e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 61046e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 61056e7d3316Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6106a966c04fSmrg 61076e7d3316Smrg if test "$GCC" = yes; then 61086e7d3316Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 61096e7d3316Smrg # We only want to do this on AIX 4.2 and lower, the check 61106e7d3316Smrg # below for broken collect2 doesn't work under 4.3+ 61116e7d3316Smrg collect2name=`${CC} -print-prog-name=collect2` 61126e7d3316Smrg if test -f "$collect2name" && 61136e7d3316Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 61146e7d3316Smrg then 61156e7d3316Smrg # We have reworked collect2 61166e7d3316Smrg : 61176e7d3316Smrg else 61186e7d3316Smrg # We have old collect2 61196e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61206e7d3316Smrg # It fails to find uninstalled libraries when the uninstalled 61216e7d3316Smrg # path is not listed in the libpath. Setting hardcode_minus_L 61226e7d3316Smrg # to unsupported forces relinking 61236e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61246e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61256e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 61266e7d3316Smrg fi 61276e7d3316Smrg ;; 61286e7d3316Smrg esac 61296e7d3316Smrg shared_flag='-shared' 61306e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 61316e7d3316Smrg shared_flag="$shared_flag "'${wl}-G' 61326e7d3316Smrg fi 61336e7d3316Smrg else 61346e7d3316Smrg # not using gcc 61356e7d3316Smrg if test "$host_cpu" = ia64; then 61366e7d3316Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 61376e7d3316Smrg # chokes on -Wl,-G. The following line is correct: 61386e7d3316Smrg shared_flag='-G' 61396e7d3316Smrg else 61406e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 61416e7d3316Smrg shared_flag='${wl}-G' 61426e7d3316Smrg else 61436e7d3316Smrg shared_flag='${wl}-bM:SRE' 61446e7d3316Smrg fi 61456e7d3316Smrg fi 61466e7d3316Smrg fi 6147a966c04fSmrg 61486e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 61496e7d3316Smrg # It seems that -bexpall does not export symbols beginning with 61506e7d3316Smrg # underscore (_), so it is better to generate a list of symbols to export. 61516e7d3316Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 61526e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 61536e7d3316Smrg # Warning - without using the other runtime loading flags (-brtl), 61546e7d3316Smrg # -berok will link without error, but may produce a broken library. 61556e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 61566e7d3316Smrg # Determine the default libpath from the value encoded in an 61576e7d3316Smrg # empty executable. 615897cf2ee2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 61596e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61606e7d3316Smrg _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" 61616e7d3316Smrg else 61626e7d3316Smrg if test "$host_cpu" = ia64; then 61636e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 61646e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 61656e7d3316Smrg _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" 61666e7d3316Smrg else 61676e7d3316Smrg # Determine the default libpath from the value encoded in an 61686e7d3316Smrg # empty executable. 616997cf2ee2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 61706e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61716e7d3316Smrg # Warning - without using the other run time loading flags, 61726e7d3316Smrg # -berok will link without error, but may produce a broken library. 61736e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61746e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 61756e7d3316Smrg if test "$with_gnu_ld" = yes; then 61766e7d3316Smrg # We only use this code for GNU lds that support --whole-archive. 61776e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 61786e7d3316Smrg else 61796e7d3316Smrg # Exported symbols can be pulled into shared objects from archives 61806e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 61816e7d3316Smrg fi 61826e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61836e7d3316Smrg # This is similar to how AIX traditionally builds its shared libraries. 61846e7d3316Smrg _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' 61856e7d3316Smrg fi 61866e7d3316Smrg fi 61876e7d3316Smrg ;; 6188a966c04fSmrg 61896e7d3316Smrg amigaos*) 61906e7d3316Smrg case $host_cpu in 61916e7d3316Smrg powerpc) 61926e7d3316Smrg # see comment about AmigaOS4 .so support 61936e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61946e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 61956e7d3316Smrg ;; 61966e7d3316Smrg m68k) 61976e7d3316Smrg _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)' 61986e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61996e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62006e7d3316Smrg ;; 62016e7d3316Smrg esac 62026e7d3316Smrg ;; 6203a966c04fSmrg 62046e7d3316Smrg bsdi[[45]]*) 62056e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 62066e7d3316Smrg ;; 6207a966c04fSmrg 62086e7d3316Smrg cygwin* | mingw* | pw32* | cegcc*) 62096e7d3316Smrg # When not using gcc, we currently assume that we are using 62106e7d3316Smrg # Microsoft Visual C++. 62116e7d3316Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 62126e7d3316Smrg # no search path for DLLs. 621397cf2ee2Smrg case $cc_basename in 621497cf2ee2Smrg cl*) 621597cf2ee2Smrg # Native MSVC 621697cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 621797cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 621897cf2ee2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 621997cf2ee2Smrg _LT_TAGVAR(file_list_spec, $1)='@' 622097cf2ee2Smrg # Tell ltmain to make .lib files, not .a files. 622197cf2ee2Smrg libext=lib 622297cf2ee2Smrg # Tell ltmain to make .dll files, not .so files. 622397cf2ee2Smrg shrext_cmds=".dll" 622497cf2ee2Smrg # FIXME: Setting linknames here is a bad hack. 622597cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 622697cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 622797cf2ee2Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 622897cf2ee2Smrg else 622997cf2ee2Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 623097cf2ee2Smrg fi~ 623197cf2ee2Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 623297cf2ee2Smrg linknames=' 623397cf2ee2Smrg # The linker will not automatically build a static lib if we build a DLL. 623497cf2ee2Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 623597cf2ee2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 623697cf2ee2Smrg _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' 623797cf2ee2Smrg # Don't use ranlib 623897cf2ee2Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 623997cf2ee2Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 624097cf2ee2Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 624197cf2ee2Smrg case $lt_outputfile in 624297cf2ee2Smrg *.exe|*.EXE) ;; 624397cf2ee2Smrg *) 624497cf2ee2Smrg lt_outputfile="$lt_outputfile.exe" 624597cf2ee2Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 624697cf2ee2Smrg ;; 624797cf2ee2Smrg esac~ 624897cf2ee2Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 624997cf2ee2Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 625097cf2ee2Smrg $RM "$lt_outputfile.manifest"; 625197cf2ee2Smrg fi' 625297cf2ee2Smrg ;; 625397cf2ee2Smrg *) 625497cf2ee2Smrg # Assume MSVC wrapper 625597cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 625697cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 625797cf2ee2Smrg # Tell ltmain to make .lib files, not .a files. 625897cf2ee2Smrg libext=lib 625997cf2ee2Smrg # Tell ltmain to make .dll files, not .so files. 626097cf2ee2Smrg shrext_cmds=".dll" 626197cf2ee2Smrg # FIXME: Setting linknames here is a bad hack. 626297cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 626397cf2ee2Smrg # The linker will automatically build a .lib file if we build a DLL. 626497cf2ee2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 626597cf2ee2Smrg # FIXME: Should let the user specify the lib program. 626697cf2ee2Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 626797cf2ee2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 626897cf2ee2Smrg ;; 626997cf2ee2Smrg esac 62706e7d3316Smrg ;; 6271a966c04fSmrg 62726e7d3316Smrg darwin* | rhapsody*) 62736e7d3316Smrg _LT_DARWIN_LINKER_FEATURES($1) 62746e7d3316Smrg ;; 6275a966c04fSmrg 62766e7d3316Smrg dgux*) 62776e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62786e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62796e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62806e7d3316Smrg ;; 6281a966c04fSmrg 62826e7d3316Smrg freebsd1*) 62836e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62846e7d3316Smrg ;; 6285a966c04fSmrg 62866e7d3316Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 62876e7d3316Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 62886e7d3316Smrg # does not break anything, and helps significantly (at the cost of a little 62896e7d3316Smrg # extra space). 62906e7d3316Smrg freebsd2.2*) 62916e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 62926e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62936e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 62946e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62956e7d3316Smrg ;; 6296a966c04fSmrg 62976e7d3316Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 62986e7d3316Smrg freebsd2*) 62996e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 63006e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63016e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63026e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6303a966c04fSmrg ;; 63046e7d3316Smrg 63056e7d3316Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 63066e7d3316Smrg freebsd* | dragonfly*) 630797cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 63086e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63096e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63106e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6311a966c04fSmrg ;; 6312a966c04fSmrg 63136e7d3316Smrg hpux9*) 63146e7d3316Smrg if test "$GCC" = yes; then 631597cf2ee2Smrg _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' 63166e7d3316Smrg else 63176e7d3316Smrg _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' 63186e7d3316Smrg fi 63196e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63206e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63216e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6322a966c04fSmrg 63236e7d3316Smrg # hardcode_minus_L: Not really in the search PATH, 63246e7d3316Smrg # but as the default location of the library. 63256e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63266e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63276e7d3316Smrg ;; 6328a966c04fSmrg 63296e7d3316Smrg hpux10*) 63306e7d3316Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 633197cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 63326e7d3316Smrg else 63336e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 63346e7d3316Smrg fi 63356e7d3316Smrg if test "$with_gnu_ld" = no; then 63366e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63376e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 63386e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63396e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63406e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63416e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63426e7d3316Smrg # hardcode_minus_L: Not really in the search PATH, 63436e7d3316Smrg # but as the default location of the library. 63446e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63456e7d3316Smrg fi 63466e7d3316Smrg ;; 6347a966c04fSmrg 63486e7d3316Smrg hpux11*) 63496e7d3316Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63506e7d3316Smrg case $host_cpu in 63516e7d3316Smrg hppa*64*) 63526e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63536e7d3316Smrg ;; 63546e7d3316Smrg ia64*) 635597cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 63566e7d3316Smrg ;; 63576e7d3316Smrg *) 635897cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 63596e7d3316Smrg ;; 63606e7d3316Smrg esac 63616e7d3316Smrg else 63626e7d3316Smrg case $host_cpu in 63636e7d3316Smrg hppa*64*) 63646e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63656e7d3316Smrg ;; 63666e7d3316Smrg ia64*) 63676e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 63686e7d3316Smrg ;; 63696e7d3316Smrg *) 63706e7d3316Smrg m4_if($1, [], [ 63716e7d3316Smrg # Older versions of the 11.00 compiler do not understand -b yet 63726e7d3316Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 63736e7d3316Smrg _LT_LINKER_OPTION([if $CC understands -b], 63746e7d3316Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 63756e7d3316Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 63766e7d3316Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 63776e7d3316Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 63786e7d3316Smrg ;; 63796e7d3316Smrg esac 63806e7d3316Smrg fi 63816e7d3316Smrg if test "$with_gnu_ld" = no; then 63826e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63836e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6384a966c04fSmrg 63856e7d3316Smrg case $host_cpu in 63866e7d3316Smrg hppa*64*|ia64*) 63876e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63886e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63896e7d3316Smrg ;; 63906e7d3316Smrg *) 63916e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63926e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63936e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6394a966c04fSmrg 63956e7d3316Smrg # hardcode_minus_L: Not really in the search PATH, 63966e7d3316Smrg # but as the default location of the library. 63976e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63986e7d3316Smrg ;; 63996e7d3316Smrg esac 64006e7d3316Smrg fi 64016e7d3316Smrg ;; 6402a966c04fSmrg 64036e7d3316Smrg irix5* | irix6* | nonstopux*) 64046e7d3316Smrg if test "$GCC" = yes; then 640597cf2ee2Smrg _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' 64066e7d3316Smrg # Try to use the -exported_symbol ld option, if it does not 64076e7d3316Smrg # work, assume that -exports_file does not work either and 64086e7d3316Smrg # implicitly export all symbols. 640997cf2ee2Smrg # This should be the same for all languages, so no per-tag cache variable. 641097cf2ee2Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 641197cf2ee2Smrg [lt_cv_irix_exported_symbol], 641297cf2ee2Smrg [save_LDFLAGS="$LDFLAGS" 641397cf2ee2Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 641497cf2ee2Smrg AC_LINK_IFELSE( 641597cf2ee2Smrg [AC_LANG_SOURCE( 641697cf2ee2Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 641797cf2ee2Smrg [C++], [[int foo (void) { return 0; }]], 641897cf2ee2Smrg [Fortran 77], [[ 641997cf2ee2Smrg subroutine foo 642097cf2ee2Smrg end]], 642197cf2ee2Smrg [Fortran], [[ 642297cf2ee2Smrg subroutine foo 642397cf2ee2Smrg end]])])], 642497cf2ee2Smrg [lt_cv_irix_exported_symbol=yes], 642597cf2ee2Smrg [lt_cv_irix_exported_symbol=no]) 642697cf2ee2Smrg LDFLAGS="$save_LDFLAGS"]) 642797cf2ee2Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 642897cf2ee2Smrg _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' 642997cf2ee2Smrg fi 64306e7d3316Smrg else 64316e7d3316Smrg _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' 64326e7d3316Smrg _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' 64336e7d3316Smrg fi 64346e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64356e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64366e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64376e7d3316Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64386e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64396e7d3316Smrg ;; 6440a966c04fSmrg 64416e7d3316Smrg netbsd*) 64426e7d3316Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 64436e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 64446e7d3316Smrg else 64456e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 64466e7d3316Smrg fi 64476e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64486e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64496e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64506e7d3316Smrg ;; 6451a966c04fSmrg 64526e7d3316Smrg newsos6) 64536e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64546e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64556e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64566e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64576e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64586e7d3316Smrg ;; 6459a966c04fSmrg 64606e7d3316Smrg *nto* | *qnx*) 64616e7d3316Smrg ;; 6462a966c04fSmrg 64636e7d3316Smrg openbsd*) 64646e7d3316Smrg if test -f /usr/libexec/ld.so; then 64656e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64666e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64676e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64686e7d3316Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 64696e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 64706e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 64716e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64726e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 64736e7d3316Smrg else 64746e7d3316Smrg case $host_os in 64756e7d3316Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 64766e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 64776e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64786e7d3316Smrg ;; 64796e7d3316Smrg *) 64806e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 64816e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64826e7d3316Smrg ;; 64836e7d3316Smrg esac 64846e7d3316Smrg fi 64856e7d3316Smrg else 64866e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 64876e7d3316Smrg fi 64886e7d3316Smrg ;; 6489a966c04fSmrg 64906e7d3316Smrg os2*) 64916e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 64926e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64936e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 64946e7d3316Smrg _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' 64956e7d3316Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 64966e7d3316Smrg ;; 6497a966c04fSmrg 64986e7d3316Smrg osf3*) 64996e7d3316Smrg if test "$GCC" = yes; then 65006e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65016e7d3316Smrg _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' 65026e7d3316Smrg else 65036e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65046e7d3316Smrg _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' 65056e7d3316Smrg fi 65066e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65076e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65086e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65096e7d3316Smrg ;; 6510a966c04fSmrg 65116e7d3316Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 65126e7d3316Smrg if test "$GCC" = yes; then 65136e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 651497cf2ee2Smrg _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' 65156e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65166e7d3316Smrg else 65176e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65186e7d3316Smrg _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' 65196e7d3316Smrg _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~ 65206e7d3316Smrg $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' 6521a966c04fSmrg 65226e7d3316Smrg # Both c and cxx compiler support -rpath directly 65236e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65246e7d3316Smrg fi 65256e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65266e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65276e7d3316Smrg ;; 6528a966c04fSmrg 65296e7d3316Smrg solaris*) 65306e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 65316e7d3316Smrg if test "$GCC" = yes; then 65326e7d3316Smrg wlarc='${wl}' 653397cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 65346e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 653597cf2ee2Smrg $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' 65366e7d3316Smrg else 65376e7d3316Smrg case `$CC -V 2>&1` in 65386e7d3316Smrg *"Compilers 5.0"*) 65396e7d3316Smrg wlarc='' 65406e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 65416e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65426e7d3316Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 65436e7d3316Smrg ;; 65446e7d3316Smrg *) 65456e7d3316Smrg wlarc='${wl}' 65466e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 65476e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65486e7d3316Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 65496e7d3316Smrg ;; 65506e7d3316Smrg esac 65516e7d3316Smrg fi 65526e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65536e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65546e7d3316Smrg case $host_os in 65556e7d3316Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 65566e7d3316Smrg *) 65576e7d3316Smrg # The compiler driver will combine and reorder linker options, 65586e7d3316Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 65596e7d3316Smrg # but is careful enough not to reorder. 65606e7d3316Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 65616e7d3316Smrg if test "$GCC" = yes; then 65626e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 65636e7d3316Smrg else 65646e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 65656e7d3316Smrg fi 65666e7d3316Smrg ;; 65676e7d3316Smrg esac 65686e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65696e7d3316Smrg ;; 6570a966c04fSmrg 65716e7d3316Smrg sunos4*) 65726e7d3316Smrg if test "x$host_vendor" = xsequent; then 65736e7d3316Smrg # Use $CC to link under sequent, because it throws in some extra .o 65746e7d3316Smrg # files that make .init and .fini sections work. 65756e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 65766e7d3316Smrg else 65776e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 65786e7d3316Smrg fi 65796e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65806e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65816e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65826e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65836e7d3316Smrg ;; 6584a966c04fSmrg 65856e7d3316Smrg sysv4) 65866e7d3316Smrg case $host_vendor in 65876e7d3316Smrg sni) 65886e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65896e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 65906e7d3316Smrg ;; 65916e7d3316Smrg siemens) 65926e7d3316Smrg ## LD is ld it makes a PLAMLIB 65936e7d3316Smrg ## CC just makes a GrossModule. 65946e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 65956e7d3316Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 65966e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 65976e7d3316Smrg ;; 65986e7d3316Smrg motorola) 65996e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66006e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 66016e7d3316Smrg ;; 66026e7d3316Smrg esac 66036e7d3316Smrg runpath_var='LD_RUN_PATH' 66046e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66056e7d3316Smrg ;; 6606a966c04fSmrg 66076e7d3316Smrg sysv4.3*) 66086e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66096e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66106e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 66116e7d3316Smrg ;; 6612a966c04fSmrg 66136e7d3316Smrg sysv4*MP*) 66146e7d3316Smrg if test -d /usr/nec; then 66156e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66166e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66176e7d3316Smrg runpath_var=LD_RUN_PATH 66186e7d3316Smrg hardcode_runpath_var=yes 66196e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 66206e7d3316Smrg fi 66216e7d3316Smrg ;; 6622a966c04fSmrg 66236e7d3316Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 66246e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66256e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66266e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66276e7d3316Smrg runpath_var='LD_RUN_PATH' 6628a966c04fSmrg 66296e7d3316Smrg if test "$GCC" = yes; then 66306e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66316e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66326e7d3316Smrg else 66336e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66346e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66356e7d3316Smrg fi 66366e7d3316Smrg ;; 6637a966c04fSmrg 66386e7d3316Smrg sysv5* | sco3.2v5* | sco5v6*) 66396e7d3316Smrg # Note: We can NOT use -z defs as we might desire, because we do not 66406e7d3316Smrg # link with -lc, and that would cause any symbols used from libc to 66416e7d3316Smrg # always be unresolved, which means just about no library would 66426e7d3316Smrg # ever link correctly. If we're not using GNU ld we use -z text 66436e7d3316Smrg # though, which does catch some bad symbols but isn't as heavy-handed 66446e7d3316Smrg # as -z defs. 66456e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66466e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 66476e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66486e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66496e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 66506e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 66516e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66526e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 66536e7d3316Smrg runpath_var='LD_RUN_PATH' 6654a966c04fSmrg 66556e7d3316Smrg if test "$GCC" = yes; then 66566e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66576e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66586e7d3316Smrg else 66596e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66606e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66616e7d3316Smrg fi 66626e7d3316Smrg ;; 6663a966c04fSmrg 66646e7d3316Smrg uts4*) 66656e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66666e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66676e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66686e7d3316Smrg ;; 6669a966c04fSmrg 66706e7d3316Smrg *) 66716e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66726e7d3316Smrg ;; 66736e7d3316Smrg esac 6674a966c04fSmrg 66756e7d3316Smrg if test x$host_vendor = xsni; then 66766e7d3316Smrg case $host in 66776e7d3316Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 66786e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 66796e7d3316Smrg ;; 66806e7d3316Smrg esac 66816e7d3316Smrg fi 66826e7d3316Smrg fi 66836e7d3316Smrg]) 66846e7d3316SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 66856e7d3316Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6686a966c04fSmrg 66876e7d3316Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6688a966c04fSmrg 66896e7d3316Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 66906e7d3316Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 66916e7d3316Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 66926e7d3316Smrg [The commands to extract the exported symbol list from a shared archive]) 6693a966c04fSmrg 66946e7d3316Smrg# 66956e7d3316Smrg# Do we need to explicitly link libc? 66966e7d3316Smrg# 66976e7d3316Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 66986e7d3316Smrgx|xyes) 66996e7d3316Smrg # Assume -lc should be added 67006e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6701a966c04fSmrg 67026e7d3316Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 67036e7d3316Smrg case $_LT_TAGVAR(archive_cmds, $1) in 67046e7d3316Smrg *'~'*) 67056e7d3316Smrg # FIXME: we may have to deal with multi-command sequences. 67066e7d3316Smrg ;; 67076e7d3316Smrg '$CC '*) 67086e7d3316Smrg # Test whether the compiler implicitly links with -lc since on some 67096e7d3316Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 67106e7d3316Smrg # to ld, don't add -lc before -lgcc. 67116e7d3316Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 67126e7d3316Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 67136e7d3316Smrg [$RM conftest* 67146e7d3316Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 67156e7d3316Smrg 67166e7d3316Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 67176e7d3316Smrg soname=conftest 67186e7d3316Smrg lib=conftest 67196e7d3316Smrg libobjs=conftest.$ac_objext 67206e7d3316Smrg deplibs= 67216e7d3316Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 67226e7d3316Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 67236e7d3316Smrg compiler_flags=-v 67246e7d3316Smrg linker_flags=-v 67256e7d3316Smrg verstring= 67266e7d3316Smrg output_objdir=. 67276e7d3316Smrg libname=conftest 67286e7d3316Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 67296e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 67306e7d3316Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 67316e7d3316Smrg then 67326e7d3316Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67336e7d3316Smrg else 67346e7d3316Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67356e7d3316Smrg fi 67366e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 67376e7d3316Smrg else 67386e7d3316Smrg cat conftest.err 1>&5 67396e7d3316Smrg fi 67406e7d3316Smrg $RM conftest* 67416e7d3316Smrg ]) 67426e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 67436e7d3316Smrg ;; 67446e7d3316Smrg esac 67456e7d3316Smrg fi 67466e7d3316Smrg ;; 67476e7d3316Smrgesac 6748a966c04fSmrg 67496e7d3316Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 67506e7d3316Smrg [Whether or not to add -lc for building shared libraries]) 67516e7d3316Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 67526e7d3316Smrg [enable_shared_with_static_runtimes], [0], 67536e7d3316Smrg [Whether or not to disallow shared libs when runtime libs are static]) 67546e7d3316Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 67556e7d3316Smrg [Compiler flag to allow reflexive dlopens]) 67566e7d3316Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 67576e7d3316Smrg [Compiler flag to generate shared objects directly from archives]) 67586e7d3316Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 67596e7d3316Smrg [Whether the compiler copes with passing no objects directly]) 67606e7d3316Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 67616e7d3316Smrg [Create an old-style archive from a shared archive]) 67626e7d3316Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 67636e7d3316Smrg [Create a temporary old-style archive to link instead of a shared archive]) 67646e7d3316Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 67656e7d3316Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 67666e7d3316Smrg_LT_TAGDECL([], [module_cmds], [2], 67676e7d3316Smrg [Commands used to build a loadable module if different from building 67686e7d3316Smrg a shared archive.]) 67696e7d3316Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 67706e7d3316Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 67716e7d3316Smrg [Whether we are building with GNU ld or not]) 67726e7d3316Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 67736e7d3316Smrg [Flag that allows shared libraries with undefined symbols to be built]) 67746e7d3316Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 67756e7d3316Smrg [Flag that enforces no undefined symbols]) 67766e7d3316Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 67776e7d3316Smrg [Flag to hardcode $libdir into a binary during linking. 67786e7d3316Smrg This must work even if $libdir does not exist]) 67796e7d3316Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 67806e7d3316Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 67816e7d3316Smrg during linking. This must work even if $libdir does not exist]]) 67826e7d3316Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 67836e7d3316Smrg [Whether we need a single "-rpath" flag with a separated argument]) 67846e7d3316Smrg_LT_TAGDECL([], [hardcode_direct], [0], 67856e7d3316Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 67866e7d3316Smrg DIR into the resulting binary]) 67876e7d3316Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 67886e7d3316Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 67896e7d3316Smrg DIR into the resulting binary and the resulting library dependency is 67906e7d3316Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 67916e7d3316Smrg library is relocated]) 67926e7d3316Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 67936e7d3316Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 67946e7d3316Smrg into the resulting binary]) 67956e7d3316Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 67966e7d3316Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 67976e7d3316Smrg into the resulting binary]) 67986e7d3316Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 67996e7d3316Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 68006e7d3316Smrg into the library and all subsequent libraries and executables linked 68016e7d3316Smrg against it]) 68026e7d3316Smrg_LT_TAGDECL([], [inherit_rpath], [0], 68036e7d3316Smrg [Set to yes if linker adds runtime paths of dependent libraries 68046e7d3316Smrg to runtime path list]) 68056e7d3316Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 68066e7d3316Smrg [Whether libtool must link a program against all its dependency libraries]) 68076e7d3316Smrg_LT_TAGDECL([], [always_export_symbols], [0], 68086e7d3316Smrg [Set to "yes" if exported symbols are required]) 68096e7d3316Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 68106e7d3316Smrg [The commands to list exported symbols]) 68116e7d3316Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 68126e7d3316Smrg [Symbols that should not be listed in the preloaded symbols]) 68136e7d3316Smrg_LT_TAGDECL([], [include_expsyms], [1], 68146e7d3316Smrg [Symbols that must always be exported]) 68156e7d3316Smrg_LT_TAGDECL([], [prelink_cmds], [2], 68166e7d3316Smrg [Commands necessary for linking programs (against libraries) with templates]) 681797cf2ee2Smrg_LT_TAGDECL([], [postlink_cmds], [2], 681897cf2ee2Smrg [Commands necessary for finishing linking programs]) 68196e7d3316Smrg_LT_TAGDECL([], [file_list_spec], [1], 68206e7d3316Smrg [Specify filename containing input files]) 68216e7d3316Smrgdnl FIXME: Not yet implemented 68226e7d3316Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 68236e7d3316Smrgdnl [Compiler flag to generate thread safe objects]) 68246e7d3316Smrg])# _LT_LINKER_SHLIBS 68256e7d3316Smrg 68266e7d3316Smrg 68276e7d3316Smrg# _LT_LANG_C_CONFIG([TAG]) 68286e7d3316Smrg# ------------------------ 68296e7d3316Smrg# Ensure that the configuration variables for a C compiler are suitably 68306e7d3316Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 68316e7d3316Smrg# the compiler configuration to `libtool'. 68326e7d3316Smrgm4_defun([_LT_LANG_C_CONFIG], 68336e7d3316Smrg[m4_require([_LT_DECL_EGREP])dnl 68346e7d3316Smrglt_save_CC="$CC" 68356e7d3316SmrgAC_LANG_PUSH(C) 6836a966c04fSmrg 68376e7d3316Smrg# Source file extension for C test sources. 68386e7d3316Smrgac_ext=c 6839a966c04fSmrg 68406e7d3316Smrg# Object file extension for compiled C test sources. 68416e7d3316Smrgobjext=o 68426e7d3316Smrg_LT_TAGVAR(objext, $1)=$objext 6843a966c04fSmrg 68446e7d3316Smrg# Code to be used in simple compile tests 68456e7d3316Smrglt_simple_compile_test_code="int some_variable = 0;" 6846a966c04fSmrg 68476e7d3316Smrg# Code to be used in simple link tests 68486e7d3316Smrglt_simple_link_test_code='int main(){return(0);}' 6849a966c04fSmrg 68506e7d3316Smrg_LT_TAG_COMPILER 68516e7d3316Smrg# Save the default compiler, since it gets overwritten when the other 68526e7d3316Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 68536e7d3316Smrgcompiler_DEFAULT=$CC 6854a966c04fSmrg 68556e7d3316Smrg# save warnings/boilerplate of simple test code 68566e7d3316Smrg_LT_COMPILER_BOILERPLATE 68576e7d3316Smrg_LT_LINKER_BOILERPLATE 6858a966c04fSmrg 68596e7d3316Smrgif test -n "$compiler"; then 68606e7d3316Smrg _LT_COMPILER_NO_RTTI($1) 68616e7d3316Smrg _LT_COMPILER_PIC($1) 68626e7d3316Smrg _LT_COMPILER_C_O($1) 68636e7d3316Smrg _LT_COMPILER_FILE_LOCKS($1) 68646e7d3316Smrg _LT_LINKER_SHLIBS($1) 68656e7d3316Smrg _LT_SYS_DYNAMIC_LINKER($1) 68666e7d3316Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 68676e7d3316Smrg LT_SYS_DLOPEN_SELF 68686e7d3316Smrg _LT_CMD_STRIPLIB 68696e7d3316Smrg 68706e7d3316Smrg # Report which library types will actually be built 68716e7d3316Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 68726e7d3316Smrg AC_MSG_RESULT([$can_build_shared]) 68736e7d3316Smrg 68746e7d3316Smrg AC_MSG_CHECKING([whether to build shared libraries]) 68756e7d3316Smrg test "$can_build_shared" = "no" && enable_shared=no 68766e7d3316Smrg 68776e7d3316Smrg # On AIX, shared libraries and static libraries use the same namespace, and 68786e7d3316Smrg # are all built from PIC. 68796e7d3316Smrg case $host_os in 68806e7d3316Smrg aix3*) 68816e7d3316Smrg test "$enable_shared" = yes && enable_static=no 68826e7d3316Smrg if test -n "$RANLIB"; then 68836e7d3316Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 68846e7d3316Smrg postinstall_cmds='$RANLIB $lib' 68856e7d3316Smrg fi 68866e7d3316Smrg ;; 6887a966c04fSmrg 68886e7d3316Smrg aix[[4-9]]*) 68896e7d3316Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 68906e7d3316Smrg test "$enable_shared" = yes && enable_static=no 68916e7d3316Smrg fi 68926e7d3316Smrg ;; 68936e7d3316Smrg esac 68946e7d3316Smrg AC_MSG_RESULT([$enable_shared]) 6895a966c04fSmrg 68966e7d3316Smrg AC_MSG_CHECKING([whether to build static libraries]) 68976e7d3316Smrg # Make sure either enable_shared or enable_static is yes. 68986e7d3316Smrg test "$enable_shared" = yes || enable_static=yes 68996e7d3316Smrg AC_MSG_RESULT([$enable_static]) 6900a966c04fSmrg 69016e7d3316Smrg _LT_CONFIG($1) 69026e7d3316Smrgfi 69036e7d3316SmrgAC_LANG_POP 69046e7d3316SmrgCC="$lt_save_CC" 69056e7d3316Smrg])# _LT_LANG_C_CONFIG 6906a966c04fSmrg 6907a966c04fSmrg 69086e7d3316Smrg# _LT_LANG_CXX_CONFIG([TAG]) 69096e7d3316Smrg# -------------------------- 69106e7d3316Smrg# Ensure that the configuration variables for a C++ compiler are suitably 69116e7d3316Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 69126e7d3316Smrg# the compiler configuration to `libtool'. 69136e7d3316Smrgm4_defun([_LT_LANG_CXX_CONFIG], 69146e7d3316Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69156e7d3316Smrgm4_require([_LT_DECL_EGREP])dnl 691697cf2ee2Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 69176e7d3316Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 69186e7d3316Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 69196e7d3316Smrg (test "X$CXX" != "Xg++"))) ; then 69206e7d3316Smrg AC_PROG_CXXCPP 69216e7d3316Smrgelse 69226e7d3316Smrg _lt_caught_CXX_error=yes 69236e7d3316Smrgfi 6924a966c04fSmrg 69256e7d3316SmrgAC_LANG_PUSH(C++) 69266e7d3316Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 69276e7d3316Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 69286e7d3316Smrg_LT_TAGVAR(always_export_symbols, $1)=no 69296e7d3316Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 69306e7d3316Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 69316e7d3316Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 69326e7d3316Smrg_LT_TAGVAR(hardcode_direct, $1)=no 69336e7d3316Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 69346e7d3316Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 69356e7d3316Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 69366e7d3316Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 69376e7d3316Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 69386e7d3316Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 69396e7d3316Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 69406e7d3316Smrg_LT_TAGVAR(inherit_rpath, $1)=no 69416e7d3316Smrg_LT_TAGVAR(module_cmds, $1)= 69426e7d3316Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 69436e7d3316Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 69446e7d3316Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 69456e7d3316Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 69466e7d3316Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 69476e7d3316Smrg_LT_TAGVAR(no_undefined_flag, $1)= 69486e7d3316Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 69496e7d3316Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6950a966c04fSmrg 69516e7d3316Smrg# Source file extension for C++ test sources. 69526e7d3316Smrgac_ext=cpp 6953a966c04fSmrg 69546e7d3316Smrg# Object file extension for compiled C++ test sources. 69556e7d3316Smrgobjext=o 69566e7d3316Smrg_LT_TAGVAR(objext, $1)=$objext 69576e7d3316Smrg 69586e7d3316Smrg# No sense in running all these tests if we already determined that 69596e7d3316Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 69606e7d3316Smrg# are currently assumed to apply to all compilers on this platform, 69616e7d3316Smrg# and will be corrupted by setting them based on a non-working compiler. 69626e7d3316Smrgif test "$_lt_caught_CXX_error" != yes; then 69636e7d3316Smrg # Code to be used in simple compile tests 69646e7d3316Smrg lt_simple_compile_test_code="int some_variable = 0;" 69656e7d3316Smrg 69666e7d3316Smrg # Code to be used in simple link tests 69676e7d3316Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 69686e7d3316Smrg 69696e7d3316Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 69706e7d3316Smrg _LT_TAG_COMPILER 69716e7d3316Smrg 69726e7d3316Smrg # save warnings/boilerplate of simple test code 69736e7d3316Smrg _LT_COMPILER_BOILERPLATE 69746e7d3316Smrg _LT_LINKER_BOILERPLATE 69756e7d3316Smrg 69766e7d3316Smrg # Allow CC to be a program name with arguments. 69776e7d3316Smrg lt_save_CC=$CC 697897cf2ee2Smrg lt_save_CFLAGS=$CFLAGS 69796e7d3316Smrg lt_save_LD=$LD 69806e7d3316Smrg lt_save_GCC=$GCC 69816e7d3316Smrg GCC=$GXX 69826e7d3316Smrg lt_save_with_gnu_ld=$with_gnu_ld 69836e7d3316Smrg lt_save_path_LD=$lt_cv_path_LD 69846e7d3316Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 69856e7d3316Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 69866e7d3316Smrg else 69876e7d3316Smrg $as_unset lt_cv_prog_gnu_ld 69886e7d3316Smrg fi 69896e7d3316Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 69906e7d3316Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 69916e7d3316Smrg else 69926e7d3316Smrg $as_unset lt_cv_path_LD 69936e7d3316Smrg fi 69946e7d3316Smrg test -z "${LDCXX+set}" || LD=$LDCXX 69956e7d3316Smrg CC=${CXX-"c++"} 699697cf2ee2Smrg CFLAGS=$CXXFLAGS 69976e7d3316Smrg compiler=$CC 69986e7d3316Smrg _LT_TAGVAR(compiler, $1)=$CC 69996e7d3316Smrg _LT_CC_BASENAME([$compiler]) 7000a966c04fSmrg 70016e7d3316Smrg if test -n "$compiler"; then 70026e7d3316Smrg # We don't want -fno-exception when compiling C++ code, so set the 70036e7d3316Smrg # no_builtin_flag separately 70046e7d3316Smrg if test "$GXX" = yes; then 70056e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 70066e7d3316Smrg else 70076e7d3316Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 70086e7d3316Smrg fi 7009a966c04fSmrg 70106e7d3316Smrg if test "$GXX" = yes; then 70116e7d3316Smrg # Set up default GNU C++ configuration 7012a966c04fSmrg 70136e7d3316Smrg LT_PATH_LD 7014a966c04fSmrg 70156e7d3316Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 70166e7d3316Smrg # archiving commands below assume that GNU ld is being used. 70176e7d3316Smrg if test "$with_gnu_ld" = yes; then 701897cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 701997cf2ee2Smrg _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' 7020a966c04fSmrg 70216e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 70226e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7023a966c04fSmrg 70246e7d3316Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 70256e7d3316Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 70266e7d3316Smrg # investigate it a little bit more. (MM) 70276e7d3316Smrg wlarc='${wl}' 7028a966c04fSmrg 70296e7d3316Smrg # ancient GNU ld didn't support --whole-archive et. al. 70306e7d3316Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 70316e7d3316Smrg $GREP 'no-whole-archive' > /dev/null; then 70326e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 70336e7d3316Smrg else 70346e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 70356e7d3316Smrg fi 70366e7d3316Smrg else 70376e7d3316Smrg with_gnu_ld=no 70386e7d3316Smrg wlarc= 70396e7d3316Smrg 70406e7d3316Smrg # A generic and very simple default shared library creation 70416e7d3316Smrg # command for GNU C++ for the case where it uses the native 70426e7d3316Smrg # linker, instead of GNU ld. If possible, this setting should 70436e7d3316Smrg # overridden to take advantage of the native linker features on 70446e7d3316Smrg # the platform it is being used on. 70456e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 70466e7d3316Smrg fi 7047a966c04fSmrg 70486e7d3316Smrg # Commands to make compiler produce verbose output that lists 70496e7d3316Smrg # what "hidden" libraries, object files and flags are used when 70506e7d3316Smrg # linking a shared library. 70516e7d3316Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7052a966c04fSmrg 70536e7d3316Smrg else 70546e7d3316Smrg GXX=no 70556e7d3316Smrg with_gnu_ld=no 70566e7d3316Smrg wlarc= 70576e7d3316Smrg fi 7058a966c04fSmrg 70596e7d3316Smrg # PORTME: fill in a description of your system's C++ link characteristics 70606e7d3316Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 70616e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 70626e7d3316Smrg case $host_os in 70636e7d3316Smrg aix3*) 70646e7d3316Smrg # FIXME: insert proper C++ library support 70656e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70666e7d3316Smrg ;; 70676e7d3316Smrg aix[[4-9]]*) 70686e7d3316Smrg if test "$host_cpu" = ia64; then 70696e7d3316Smrg # On IA64, the linker does run time linking by default, so we don't 70706e7d3316Smrg # have to do anything special. 70716e7d3316Smrg aix_use_runtimelinking=no 70726e7d3316Smrg exp_sym_flag='-Bexport' 70736e7d3316Smrg no_entry_flag="" 70746e7d3316Smrg else 70756e7d3316Smrg aix_use_runtimelinking=no 70766e7d3316Smrg 70776e7d3316Smrg # Test if we are trying to use run time linking or normal 70786e7d3316Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 70796e7d3316Smrg # need to do runtime linking. 70806e7d3316Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 70816e7d3316Smrg for ld_flag in $LDFLAGS; do 70826e7d3316Smrg case $ld_flag in 70836e7d3316Smrg *-brtl*) 70846e7d3316Smrg aix_use_runtimelinking=yes 70856e7d3316Smrg break 70866e7d3316Smrg ;; 70876e7d3316Smrg esac 70886e7d3316Smrg done 70896e7d3316Smrg ;; 70906e7d3316Smrg esac 7091a966c04fSmrg 70926e7d3316Smrg exp_sym_flag='-bexport' 70936e7d3316Smrg no_entry_flag='-bnoentry' 70946e7d3316Smrg fi 7095a966c04fSmrg 70966e7d3316Smrg # When large executables or shared objects are built, AIX ld can 70976e7d3316Smrg # have problems creating the table of contents. If linking a library 70986e7d3316Smrg # or program results in "error TOC overflow" add -mminimal-toc to 70996e7d3316Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 71006e7d3316Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 71016e7d3316Smrg 71026e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='' 71036e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71046e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71056e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 71066e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 71076e7d3316Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 71086e7d3316Smrg 71096e7d3316Smrg if test "$GXX" = yes; then 71106e7d3316Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 71116e7d3316Smrg # We only want to do this on AIX 4.2 and lower, the check 71126e7d3316Smrg # below for broken collect2 doesn't work under 4.3+ 71136e7d3316Smrg collect2name=`${CC} -print-prog-name=collect2` 71146e7d3316Smrg if test -f "$collect2name" && 71156e7d3316Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 71166e7d3316Smrg then 71176e7d3316Smrg # We have reworked collect2 71186e7d3316Smrg : 71196e7d3316Smrg else 71206e7d3316Smrg # We have old collect2 71216e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 71226e7d3316Smrg # It fails to find uninstalled libraries when the uninstalled 71236e7d3316Smrg # path is not listed in the libpath. Setting hardcode_minus_L 71246e7d3316Smrg # to unsupported forces relinking 71256e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 71266e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71276e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 71286e7d3316Smrg fi 71296e7d3316Smrg esac 71306e7d3316Smrg shared_flag='-shared' 71316e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 71326e7d3316Smrg shared_flag="$shared_flag "'${wl}-G' 71336e7d3316Smrg fi 71346e7d3316Smrg else 71356e7d3316Smrg # not using gcc 71366e7d3316Smrg if test "$host_cpu" = ia64; then 71376e7d3316Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 71386e7d3316Smrg # chokes on -Wl,-G. The following line is correct: 71396e7d3316Smrg shared_flag='-G' 71406e7d3316Smrg else 71416e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 71426e7d3316Smrg shared_flag='${wl}-G' 71436e7d3316Smrg else 71446e7d3316Smrg shared_flag='${wl}-bM:SRE' 71456e7d3316Smrg fi 71466e7d3316Smrg fi 71476e7d3316Smrg fi 71482e2dd055Smrg 71496e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 71506e7d3316Smrg # It seems that -bexpall does not export symbols beginning with 71516e7d3316Smrg # underscore (_), so it is better to generate a list of symbols to 71526e7d3316Smrg # export. 71536e7d3316Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 71546e7d3316Smrg if test "$aix_use_runtimelinking" = yes; then 71556e7d3316Smrg # Warning - without using the other runtime loading flags (-brtl), 71566e7d3316Smrg # -berok will link without error, but may produce a broken library. 71576e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 71586e7d3316Smrg # Determine the default libpath from the value encoded in an empty 71596e7d3316Smrg # executable. 716097cf2ee2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 71616e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 71626e7d3316Smrg 71636e7d3316Smrg _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" 71646e7d3316Smrg else 71656e7d3316Smrg if test "$host_cpu" = ia64; then 71666e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 71676e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 71686e7d3316Smrg _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" 71696e7d3316Smrg else 71706e7d3316Smrg # Determine the default libpath from the value encoded in an 71716e7d3316Smrg # empty executable. 717297cf2ee2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 71736e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 71746e7d3316Smrg # Warning - without using the other run time loading flags, 71756e7d3316Smrg # -berok will link without error, but may produce a broken library. 71766e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 71776e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 71786e7d3316Smrg if test "$with_gnu_ld" = yes; then 71796e7d3316Smrg # We only use this code for GNU lds that support --whole-archive. 71806e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 71816e7d3316Smrg else 71826e7d3316Smrg # Exported symbols can be pulled into shared objects from archives 71836e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 71846e7d3316Smrg fi 71856e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 71866e7d3316Smrg # This is similar to how AIX traditionally builds its shared 71876e7d3316Smrg # libraries. 71886e7d3316Smrg _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' 71896e7d3316Smrg fi 71906e7d3316Smrg fi 71916e7d3316Smrg ;; 7192a966c04fSmrg 71936e7d3316Smrg beos*) 71946e7d3316Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 71956e7d3316Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71966e7d3316Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 71976e7d3316Smrg # support --undefined. This deserves some investigation. FIXME 71986e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 71996e7d3316Smrg else 72006e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72016e7d3316Smrg fi 72026e7d3316Smrg ;; 7203a966c04fSmrg 72046e7d3316Smrg chorus*) 72056e7d3316Smrg case $cc_basename in 72066e7d3316Smrg *) 72076e7d3316Smrg # FIXME: insert proper C++ library support 72086e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72096e7d3316Smrg ;; 72106e7d3316Smrg esac 72116e7d3316Smrg ;; 7212a966c04fSmrg 72136e7d3316Smrg cygwin* | mingw* | pw32* | cegcc*) 721497cf2ee2Smrg case $GXX,$cc_basename in 721597cf2ee2Smrg ,cl* | no,cl*) 721697cf2ee2Smrg # Native MSVC 721797cf2ee2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 721897cf2ee2Smrg # no search path for DLLs. 721997cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 722097cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 722197cf2ee2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 722297cf2ee2Smrg _LT_TAGVAR(file_list_spec, $1)='@' 722397cf2ee2Smrg # Tell ltmain to make .lib files, not .a files. 722497cf2ee2Smrg libext=lib 722597cf2ee2Smrg # Tell ltmain to make .dll files, not .so files. 722697cf2ee2Smrg shrext_cmds=".dll" 722797cf2ee2Smrg # FIXME: Setting linknames here is a bad hack. 722897cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 722997cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 723097cf2ee2Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 723197cf2ee2Smrg else 723297cf2ee2Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 723397cf2ee2Smrg fi~ 723497cf2ee2Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 723597cf2ee2Smrg linknames=' 723697cf2ee2Smrg # The linker will not automatically build a static lib if we build a DLL. 723797cf2ee2Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 723897cf2ee2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 723997cf2ee2Smrg # Don't use ranlib 724097cf2ee2Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 724197cf2ee2Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 724297cf2ee2Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 724397cf2ee2Smrg case $lt_outputfile in 724497cf2ee2Smrg *.exe|*.EXE) ;; 724597cf2ee2Smrg *) 724697cf2ee2Smrg lt_outputfile="$lt_outputfile.exe" 724797cf2ee2Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 724897cf2ee2Smrg ;; 724997cf2ee2Smrg esac~ 725097cf2ee2Smrg func_to_tool_file "$lt_outputfile"~ 725197cf2ee2Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 725297cf2ee2Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 725397cf2ee2Smrg $RM "$lt_outputfile.manifest"; 725497cf2ee2Smrg fi' 725597cf2ee2Smrg ;; 725697cf2ee2Smrg *) 725797cf2ee2Smrg # g++ 725897cf2ee2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 725997cf2ee2Smrg # as there is no search path for DLLs. 726097cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 726197cf2ee2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 726297cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 726397cf2ee2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 726497cf2ee2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 726597cf2ee2Smrg 726697cf2ee2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 726797cf2ee2Smrg _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' 726897cf2ee2Smrg # If the export-symbols file already is a .def file (1st line 726997cf2ee2Smrg # is EXPORTS), use it as is; otherwise, prepend... 727097cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 727197cf2ee2Smrg cp $export_symbols $output_objdir/$soname.def; 727297cf2ee2Smrg else 727397cf2ee2Smrg echo EXPORTS > $output_objdir/$soname.def; 727497cf2ee2Smrg cat $export_symbols >> $output_objdir/$soname.def; 727597cf2ee2Smrg fi~ 727697cf2ee2Smrg $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' 727797cf2ee2Smrg else 727897cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 727997cf2ee2Smrg fi 728097cf2ee2Smrg ;; 728197cf2ee2Smrg esac 728297cf2ee2Smrg ;; 72836e7d3316Smrg darwin* | rhapsody*) 72846e7d3316Smrg _LT_DARWIN_LINKER_FEATURES($1) 72856e7d3316Smrg ;; 7286a966c04fSmrg 72876e7d3316Smrg dgux*) 72886e7d3316Smrg case $cc_basename in 72896e7d3316Smrg ec++*) 72906e7d3316Smrg # FIXME: insert proper C++ library support 72916e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72926e7d3316Smrg ;; 72936e7d3316Smrg ghcx*) 72946e7d3316Smrg # Green Hills C++ Compiler 72956e7d3316Smrg # FIXME: insert proper C++ library support 72966e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72976e7d3316Smrg ;; 72986e7d3316Smrg *) 72996e7d3316Smrg # FIXME: insert proper C++ library support 73006e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73016e7d3316Smrg ;; 73026e7d3316Smrg esac 73036e7d3316Smrg ;; 7304a966c04fSmrg 73056e7d3316Smrg freebsd[[12]]*) 73066e7d3316Smrg # C++ shared libraries reported to be fairly broken before 73076e7d3316Smrg # switch to ELF 73086e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73096e7d3316Smrg ;; 7310a966c04fSmrg 73116e7d3316Smrg freebsd-elf*) 73126e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73136e7d3316Smrg ;; 7314a966c04fSmrg 73156e7d3316Smrg freebsd* | dragonfly*) 73166e7d3316Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 73176e7d3316Smrg # conventions 73186e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 73196e7d3316Smrg ;; 7320a966c04fSmrg 73216e7d3316Smrg gnu*) 73226e7d3316Smrg ;; 7323a966c04fSmrg 73246e7d3316Smrg haiku*) 73256e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 73266e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73276e7d3316Smrg ;; 7328a966c04fSmrg 73296e7d3316Smrg hpux9*) 73306e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73316e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73326e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73336e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 73346e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73356e7d3316Smrg # but as the default 73366e7d3316Smrg # location of the library. 73376e7d3316Smrg 73386e7d3316Smrg case $cc_basename in 73396e7d3316Smrg CC*) 73406e7d3316Smrg # FIXME: insert proper C++ library support 73416e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73426e7d3316Smrg ;; 73436e7d3316Smrg aCC*) 73446e7d3316Smrg _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' 73456e7d3316Smrg # Commands to make compiler produce verbose output that lists 73466e7d3316Smrg # what "hidden" libraries, object files and flags are used when 73476e7d3316Smrg # linking a shared library. 73486e7d3316Smrg # 73496e7d3316Smrg # There doesn't appear to be a way to prevent this compiler from 73506e7d3316Smrg # explicitly linking system object files so we need to strip them 73516e7d3316Smrg # from the output so that they don't get included in the library 73526e7d3316Smrg # dependencies. 73536e7d3316Smrg 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"' 73546e7d3316Smrg ;; 73556e7d3316Smrg *) 73566e7d3316Smrg if test "$GXX" = yes; then 735797cf2ee2Smrg _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' 73586e7d3316Smrg else 73596e7d3316Smrg # FIXME: insert proper C++ library support 73606e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73616e7d3316Smrg fi 73626e7d3316Smrg ;; 73636e7d3316Smrg esac 73646e7d3316Smrg ;; 7365a966c04fSmrg 73666e7d3316Smrg hpux10*|hpux11*) 73676e7d3316Smrg if test $with_gnu_ld = no; then 73686e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73696e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73706e7d3316Smrg 73716e7d3316Smrg case $host_cpu in 73726e7d3316Smrg hppa*64*|ia64*) 73736e7d3316Smrg ;; 73746e7d3316Smrg *) 73756e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73766e7d3316Smrg ;; 73776e7d3316Smrg esac 73786e7d3316Smrg fi 73796e7d3316Smrg case $host_cpu in 73806e7d3316Smrg hppa*64*|ia64*) 73816e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 73826e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73836e7d3316Smrg ;; 73846e7d3316Smrg *) 73856e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 73866e7d3316Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 73876e7d3316Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73886e7d3316Smrg # but as the default 73896e7d3316Smrg # location of the library. 73906e7d3316Smrg ;; 73916e7d3316Smrg esac 73926e7d3316Smrg 73936e7d3316Smrg case $cc_basename in 73946e7d3316Smrg CC*) 73956e7d3316Smrg # FIXME: insert proper C++ library support 73966e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73976e7d3316Smrg ;; 73986e7d3316Smrg aCC*) 73996e7d3316Smrg case $host_cpu in 74006e7d3316Smrg hppa*64*) 74016e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74026e7d3316Smrg ;; 74036e7d3316Smrg ia64*) 74046e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74056e7d3316Smrg ;; 74066e7d3316Smrg *) 74076e7d3316Smrg _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' 74086e7d3316Smrg ;; 74096e7d3316Smrg esac 74106e7d3316Smrg # Commands to make compiler produce verbose output that lists 74116e7d3316Smrg # what "hidden" libraries, object files and flags are used when 74126e7d3316Smrg # linking a shared library. 74136e7d3316Smrg # 74146e7d3316Smrg # There doesn't appear to be a way to prevent this compiler from 74156e7d3316Smrg # explicitly linking system object files so we need to strip them 74166e7d3316Smrg # from the output so that they don't get included in the library 74176e7d3316Smrg # dependencies. 74186e7d3316Smrg 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"' 74196e7d3316Smrg ;; 74206e7d3316Smrg *) 74216e7d3316Smrg if test "$GXX" = yes; then 74226e7d3316Smrg if test $with_gnu_ld = no; then 74236e7d3316Smrg case $host_cpu in 74246e7d3316Smrg hppa*64*) 74256e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74266e7d3316Smrg ;; 74276e7d3316Smrg ia64*) 742897cf2ee2Smrg _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' 74296e7d3316Smrg ;; 74306e7d3316Smrg *) 743197cf2ee2Smrg _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' 74326e7d3316Smrg ;; 74336e7d3316Smrg esac 74346e7d3316Smrg fi 74356e7d3316Smrg else 74366e7d3316Smrg # FIXME: insert proper C++ library support 74376e7d3316Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74386e7d3316Smrg fi 74396e7d3316Smrg ;; 74406e7d3316Smrg esac 74416e7d3316Smrg ;; 7442a966c04fSmrg 74436e7d3316Smrg interix[[3-9]]*) 74446e7d3316Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74456e7d3316Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74466e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74476e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74486e7d3316Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 74496e7d3316Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 74506e7d3316Smrg # default) and relocated if they conflict, which is a slow very memory 74516e7d3316Smrg # consuming and fragmenting process. To avoid this, we pick a random, 74526e7d3316Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 74536e7d3316Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 74546e7d3316Smrg _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' 74556e7d3316Smrg _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' 74566e7d3316Smrg ;; 74576e7d3316Smrg irix5* | irix6*) 74586e7d3316Smrg case $cc_basename in 74596e7d3316Smrg CC*) 74606e7d3316Smrg # SGI C++ 74616e7d3316Smrg _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' 74626e7d3316Smrg 74636e7d3316Smrg # Archives containing C++ object files must be created using 74646e7d3316Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 74656e7d3316Smrg # necessary to make sure instantiated templates are included 74666e7d3316Smrg # in the archive. 74676e7d3316Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 74686e7d3316Smrg ;; 74696e7d3316Smrg *) 74706e7d3316Smrg if test "$GXX" = yes; then 74716e7d3316Smrg if test "$with_gnu_ld" = no; then 747297cf2ee2Smrg _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' 74736e7d3316Smrg else 747497cf2ee2Smrg _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' 74756e7d3316Smrg fi 74766e7d3316Smrg fi 74776e7d3316Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 74786e7d3316Smrg ;; 74796e7d3316Smrg esac 74806e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 74816e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74826e7d3316Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 74836e7d3316Smrg ;; 7484a966c04fSmrg 74856e7d3316Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 74866e7d3316Smrg case $cc_basename in 74876e7d3316Smrg KCC*) 74886e7d3316Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7489a966c04fSmrg 74906e7d3316Smrg # KCC will only create a shared library if the output file 74916e7d3316Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 74926e7d3316Smrg # to its proper name (with version) after linking. 74936e7d3316Smrg _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' 74946e7d3316Smrg _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' 74956e7d3316Smrg # Commands to make compiler produce verbose output that lists 74966e7d3316Smrg # what "hidden" libraries, object files and flags are used when 74976e7d3316Smrg # linking a shared library. 74986e7d3316Smrg # 74996e7d3316Smrg # There doesn't appear to be a way to prevent this compiler from 75006e7d3316Smrg # explicitly linking system object files so we need to strip them 75016e7d3316Smrg # from the output so that they don't get included in the library 75026e7d3316Smrg # dependencies. 75036e7d3316Smrg 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"' 75046e7d3316Smrg 75056e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75066e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75076e7d3316Smrg 75086e7d3316Smrg # Archives containing C++ object files must be created using 75096e7d3316Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 75106e7d3316Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 75116e7d3316Smrg ;; 75126e7d3316Smrg icpc* | ecpc* ) 75136e7d3316Smrg # Intel C++ 75146e7d3316Smrg with_gnu_ld=yes 75156e7d3316Smrg # version 8.0 and above of icpc choke on multiply defined symbols 75166e7d3316Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 75176e7d3316Smrg # earlier do not add the objects themselves. 75186e7d3316Smrg case `$CC -V 2>&1` in 75196e7d3316Smrg *"Version 7."*) 75206e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75216e7d3316Smrg _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' 75226e7d3316Smrg ;; 75236e7d3316Smrg *) # Version 8.0 or newer 75246e7d3316Smrg tmp_idyn= 75256e7d3316Smrg case $host_cpu in 75266e7d3316Smrg ia64*) tmp_idyn=' -i_dynamic';; 75276e7d3316Smrg esac 75286e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75296e7d3316Smrg _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' 75306e7d3316Smrg ;; 75316e7d3316Smrg esac 75326e7d3316Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 75336e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75346e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75356e7d3316Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 75366e7d3316Smrg ;; 75376e7d3316Smrg pgCC* | pgcpp*) 75386e7d3316Smrg # Portland Group C++ compiler 75396e7d3316Smrg case `$CC -V` in 75406e7d3316Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 75416e7d3316Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 75426e7d3316Smrg rm -rf $tpldir~ 75436e7d3316Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 75446e7d3316Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 75456e7d3316Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 75466e7d3316Smrg rm -rf $tpldir~ 75476e7d3316Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 75486e7d3316Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 75496e7d3316Smrg $RANLIB $oldlib' 75506e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 75516e7d3316Smrg rm -rf $tpldir~ 75526e7d3316Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75536e7d3316Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 75546e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 75556e7d3316Smrg rm -rf $tpldir~ 75566e7d3316Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75576e7d3316Smrg $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' 75586e7d3316Smrg ;; 75596e7d3316Smrg *) # Version 6 and above use weak symbols 75606e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 75616e7d3316Smrg _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' 75626e7d3316Smrg ;; 75636e7d3316Smrg esac 7564a966c04fSmrg 75656e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 75666e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75676e7d3316Smrg _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' 75686e7d3316Smrg ;; 75696e7d3316Smrg cxx*) 75706e7d3316Smrg # Compaq C++ 75716e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75726e7d3316Smrg _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' 7573a966c04fSmrg 75746e7d3316Smrg runpath_var=LD_RUN_PATH 75756e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 75766e7d3316Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7577a966c04fSmrg 75786e7d3316Smrg # Commands to make compiler produce verbose output that lists 75796e7d3316Smrg # what "hidden" libraries, object files and flags are used when 75806e7d3316Smrg # linking a shared library. 75816e7d3316Smrg # 75826e7d3316Smrg # There doesn't appear to be a way to prevent this compiler from 75836e7d3316Smrg # explicitly linking system object files so we need to strip them 75846e7d3316Smrg # from the output so that they don't get included in the library 75856e7d3316Smrg # dependencies. 75866e7d3316Smrg 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' 75876e7d3316Smrg ;; 75886e7d3316Smrg xl* | mpixl* | bgxl*) 75896e7d3316Smrg # IBM XL 8.0 on PPC, with GNU ld 75906e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75916e7d3316Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75926e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75936e7d3316Smrg if test "x$supports_anon_versioning" = xyes; then 75946e7d3316Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 75956e7d3316Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 75966e7d3316Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 75976e7d3316Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 75986e7d3316Smrg fi 75996e7d3316Smrg ;; 76006e7d3316Smrg *) 76016e7d3316Smrg case `$CC -V 2>&1 | sed 5q` in 76026e7d3316Smrg *Sun\ C*) 76036e7d3316Smrg # Sun C++ 5.9 76046e7d3316Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 76056e7d3316Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 76066e7d3316Smrg _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' 76076e7d3316Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76086e7d3316Smrg _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' 76096e7d3316Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 76106e7d3316Smrg 761197cf2ee2Smrg # Not sure whether something based on 761297cf2ee2Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 761397cf2ee2Smrg # would be better. 761497cf2ee2Smrg output_verbose_link_cmd='func_echo_all' 761597cf2ee2Smrg 761697cf2ee2Smrg # Archives containing C++ object files must be created using 761797cf2ee2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 761897cf2ee2Smrg # necessary to make sure instantiated templates are included 761997cf2ee2Smrg # in the archive. 762097cf2ee2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 762197cf2ee2Smrg ;; 762297cf2ee2Smrg esac 762397cf2ee2Smrg ;; 762497cf2ee2Smrg esac 762597cf2ee2Smrg ;; 762697cf2ee2Smrg 762797cf2ee2Smrg lynxos*) 762897cf2ee2Smrg # FIXME: insert proper C++ library support 762997cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 763097cf2ee2Smrg ;; 763197cf2ee2Smrg 763297cf2ee2Smrg m88k*) 763397cf2ee2Smrg # FIXME: insert proper C++ library support 763497cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 763597cf2ee2Smrg ;; 763697cf2ee2Smrg 763797cf2ee2Smrg mvs*) 763897cf2ee2Smrg case $cc_basename in 763997cf2ee2Smrg cxx*) 764097cf2ee2Smrg # FIXME: insert proper C++ library support 764197cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 764297cf2ee2Smrg ;; 764397cf2ee2Smrg *) 764497cf2ee2Smrg # FIXME: insert proper C++ library support 764597cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 764697cf2ee2Smrg ;; 764797cf2ee2Smrg esac 764897cf2ee2Smrg ;; 764997cf2ee2Smrg 765097cf2ee2Smrg netbsd*) 765197cf2ee2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 765297cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 765397cf2ee2Smrg wlarc= 765497cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 765597cf2ee2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 765697cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 765797cf2ee2Smrg fi 765897cf2ee2Smrg # Workaround some broken pre-1.5 toolchains 765997cf2ee2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 766097cf2ee2Smrg ;; 766197cf2ee2Smrg 766297cf2ee2Smrg *nto* | *qnx*) 766397cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 766497cf2ee2Smrg ;; 766597cf2ee2Smrg 766697cf2ee2Smrg openbsd2*) 766797cf2ee2Smrg # C++ shared libraries are fairly broken 766897cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 766997cf2ee2Smrg ;; 767097cf2ee2Smrg 767197cf2ee2Smrg openbsd*) 767297cf2ee2Smrg if test -f /usr/libexec/ld.so; then 767397cf2ee2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 767497cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 767597cf2ee2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 767697cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 767797cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 767897cf2ee2Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 767997cf2ee2Smrg _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' 768097cf2ee2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 768197cf2ee2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 768297cf2ee2Smrg fi 768397cf2ee2Smrg output_verbose_link_cmd=func_echo_all 768497cf2ee2Smrg else 768597cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 768697cf2ee2Smrg fi 768797cf2ee2Smrg ;; 768897cf2ee2Smrg 768997cf2ee2Smrg osf3* | osf4* | osf5*) 769097cf2ee2Smrg case $cc_basename in 769197cf2ee2Smrg KCC*) 769297cf2ee2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 769397cf2ee2Smrg 769497cf2ee2Smrg # KCC will only create a shared library if the output file 769597cf2ee2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 769697cf2ee2Smrg # to its proper name (with version) after linking. 769797cf2ee2Smrg _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' 769897cf2ee2Smrg 769997cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 770097cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 770197cf2ee2Smrg 770297cf2ee2Smrg # Archives containing C++ object files must be created using 770397cf2ee2Smrg # the KAI C++ compiler. 770497cf2ee2Smrg case $host in 770597cf2ee2Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 770697cf2ee2Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 770797cf2ee2Smrg esac 770897cf2ee2Smrg ;; 770997cf2ee2Smrg RCC*) 771097cf2ee2Smrg # Rational C++ 2.4.1 771197cf2ee2Smrg # FIXME: insert proper C++ library support 771297cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 771397cf2ee2Smrg ;; 771497cf2ee2Smrg cxx*) 771597cf2ee2Smrg case $host in 771697cf2ee2Smrg osf3*) 771797cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 771897cf2ee2Smrg _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' 771997cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 772097cf2ee2Smrg ;; 772197cf2ee2Smrg *) 772297cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 772397cf2ee2Smrg _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' 772497cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 772597cf2ee2Smrg echo "-hidden">> $lib.exp~ 772697cf2ee2Smrg $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~ 772797cf2ee2Smrg $RM $lib.exp' 772897cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 772997cf2ee2Smrg ;; 773097cf2ee2Smrg esac 773197cf2ee2Smrg 773297cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 773397cf2ee2Smrg 773497cf2ee2Smrg # Commands to make compiler produce verbose output that lists 773597cf2ee2Smrg # what "hidden" libraries, object files and flags are used when 773697cf2ee2Smrg # linking a shared library. 773797cf2ee2Smrg # 773897cf2ee2Smrg # There doesn't appear to be a way to prevent this compiler from 773997cf2ee2Smrg # explicitly linking system object files so we need to strip them 774097cf2ee2Smrg # from the output so that they don't get included in the library 774197cf2ee2Smrg # dependencies. 774297cf2ee2Smrg 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"' 774397cf2ee2Smrg ;; 774497cf2ee2Smrg *) 774597cf2ee2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 774697cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 774797cf2ee2Smrg case $host in 774897cf2ee2Smrg osf3*) 774997cf2ee2Smrg _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' 775097cf2ee2Smrg ;; 775197cf2ee2Smrg *) 775297cf2ee2Smrg _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' 775397cf2ee2Smrg ;; 775497cf2ee2Smrg esac 775597cf2ee2Smrg 775697cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 775797cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 775897cf2ee2Smrg 775997cf2ee2Smrg # Commands to make compiler produce verbose output that lists 776097cf2ee2Smrg # what "hidden" libraries, object files and flags are used when 776197cf2ee2Smrg # linking a shared library. 776297cf2ee2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 776397cf2ee2Smrg 776497cf2ee2Smrg else 776597cf2ee2Smrg # FIXME: insert proper C++ library support 776697cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 776797cf2ee2Smrg fi 776897cf2ee2Smrg ;; 776997cf2ee2Smrg esac 777097cf2ee2Smrg ;; 777197cf2ee2Smrg 777297cf2ee2Smrg psos*) 777397cf2ee2Smrg # FIXME: insert proper C++ library support 777497cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 777597cf2ee2Smrg ;; 777697cf2ee2Smrg 777797cf2ee2Smrg sunos4*) 777897cf2ee2Smrg case $cc_basename in 777997cf2ee2Smrg CC*) 778097cf2ee2Smrg # Sun C++ 4.x 778197cf2ee2Smrg # FIXME: insert proper C++ library support 778297cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 778397cf2ee2Smrg ;; 778497cf2ee2Smrg lcc*) 778597cf2ee2Smrg # Lucid 778697cf2ee2Smrg # FIXME: insert proper C++ library support 778797cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 778897cf2ee2Smrg ;; 778997cf2ee2Smrg *) 779097cf2ee2Smrg # FIXME: insert proper C++ library support 779197cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 779297cf2ee2Smrg ;; 779397cf2ee2Smrg esac 779497cf2ee2Smrg ;; 779597cf2ee2Smrg 779697cf2ee2Smrg solaris*) 779797cf2ee2Smrg case $cc_basename in 779897cf2ee2Smrg CC* | sunCC*) 779997cf2ee2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 780097cf2ee2Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 780197cf2ee2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 780297cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 780397cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 780497cf2ee2Smrg $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' 780597cf2ee2Smrg 780697cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 780797cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 780897cf2ee2Smrg case $host_os in 780997cf2ee2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 781097cf2ee2Smrg *) 781197cf2ee2Smrg # The compiler driver will combine and reorder linker options, 781297cf2ee2Smrg # but understands `-z linker_flag'. 781397cf2ee2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 781497cf2ee2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 781597cf2ee2Smrg ;; 781697cf2ee2Smrg esac 781797cf2ee2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 781897cf2ee2Smrg 781997cf2ee2Smrg output_verbose_link_cmd='func_echo_all' 782097cf2ee2Smrg 782197cf2ee2Smrg # Archives containing C++ object files must be created using 782297cf2ee2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 782397cf2ee2Smrg # necessary to make sure instantiated templates are included 782497cf2ee2Smrg # in the archive. 782597cf2ee2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 782697cf2ee2Smrg ;; 782797cf2ee2Smrg gcx*) 782897cf2ee2Smrg # Green Hills C++ Compiler 782997cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 783097cf2ee2Smrg 783197cf2ee2Smrg # The C++ compiler must be used to create the archive. 783297cf2ee2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 783397cf2ee2Smrg ;; 783497cf2ee2Smrg *) 783597cf2ee2Smrg # GNU C++ compiler with Solaris linker 783697cf2ee2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 783797cf2ee2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 783897cf2ee2Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 783997cf2ee2Smrg _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' 784097cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 784197cf2ee2Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 784297cf2ee2Smrg 784397cf2ee2Smrg # Commands to make compiler produce verbose output that lists 784497cf2ee2Smrg # what "hidden" libraries, object files and flags are used when 784597cf2ee2Smrg # linking a shared library. 784697cf2ee2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 784797cf2ee2Smrg else 784897cf2ee2Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 784997cf2ee2Smrg # platform. 785097cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 785197cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 785297cf2ee2Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 785397cf2ee2Smrg 785497cf2ee2Smrg # Commands to make compiler produce verbose output that lists 785597cf2ee2Smrg # what "hidden" libraries, object files and flags are used when 785697cf2ee2Smrg # linking a shared library. 785797cf2ee2Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 785897cf2ee2Smrg fi 785997cf2ee2Smrg 786097cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 786197cf2ee2Smrg case $host_os in 786297cf2ee2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 786397cf2ee2Smrg *) 786497cf2ee2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 786597cf2ee2Smrg ;; 786697cf2ee2Smrg esac 786797cf2ee2Smrg fi 786897cf2ee2Smrg ;; 786997cf2ee2Smrg esac 787097cf2ee2Smrg ;; 787197cf2ee2Smrg 787297cf2ee2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 787397cf2ee2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 787497cf2ee2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 787597cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 787697cf2ee2Smrg runpath_var='LD_RUN_PATH' 787797cf2ee2Smrg 787897cf2ee2Smrg case $cc_basename in 787997cf2ee2Smrg CC*) 788097cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788197cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788297cf2ee2Smrg ;; 788397cf2ee2Smrg *) 788497cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788597cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788697cf2ee2Smrg ;; 788797cf2ee2Smrg esac 788897cf2ee2Smrg ;; 788997cf2ee2Smrg 789097cf2ee2Smrg sysv5* | sco3.2v5* | sco5v6*) 789197cf2ee2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 789297cf2ee2Smrg # link with -lc, and that would cause any symbols used from libc to 789397cf2ee2Smrg # always be unresolved, which means just about no library would 789497cf2ee2Smrg # ever link correctly. If we're not using GNU ld we use -z text 789597cf2ee2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 789697cf2ee2Smrg # as -z defs. 789797cf2ee2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 789897cf2ee2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 789997cf2ee2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 790097cf2ee2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 790197cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 790297cf2ee2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 790397cf2ee2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 790497cf2ee2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 790597cf2ee2Smrg runpath_var='LD_RUN_PATH' 790697cf2ee2Smrg 790797cf2ee2Smrg case $cc_basename in 790897cf2ee2Smrg CC*) 790997cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 791097cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 791197cf2ee2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 791297cf2ee2Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 791397cf2ee2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 791497cf2ee2Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 791597cf2ee2Smrg ;; 791697cf2ee2Smrg *) 791797cf2ee2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 791897cf2ee2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 791997cf2ee2Smrg ;; 792097cf2ee2Smrg esac 792197cf2ee2Smrg ;; 792297cf2ee2Smrg 792397cf2ee2Smrg tandem*) 792497cf2ee2Smrg case $cc_basename in 792597cf2ee2Smrg NCC*) 792697cf2ee2Smrg # NonStop-UX NCC 3.20 792797cf2ee2Smrg # FIXME: insert proper C++ library support 792897cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 792997cf2ee2Smrg ;; 793097cf2ee2Smrg *) 793197cf2ee2Smrg # FIXME: insert proper C++ library support 793297cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 793397cf2ee2Smrg ;; 793497cf2ee2Smrg esac 793597cf2ee2Smrg ;; 793697cf2ee2Smrg 793797cf2ee2Smrg vxworks*) 793897cf2ee2Smrg # FIXME: insert proper C++ library support 793997cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 794097cf2ee2Smrg ;; 794197cf2ee2Smrg 794297cf2ee2Smrg *) 794397cf2ee2Smrg # FIXME: insert proper C++ library support 794497cf2ee2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 794597cf2ee2Smrg ;; 794697cf2ee2Smrg esac 794797cf2ee2Smrg 794897cf2ee2Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 794997cf2ee2Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 795097cf2ee2Smrg 795197cf2ee2Smrg _LT_TAGVAR(GCC, $1)="$GXX" 795297cf2ee2Smrg _LT_TAGVAR(LD, $1)="$LD" 795397cf2ee2Smrg 795497cf2ee2Smrg ## CAVEAT EMPTOR: 795597cf2ee2Smrg ## There is no encapsulation within the following macros, do not change 795697cf2ee2Smrg ## the running order or otherwise move them around unless you know exactly 795797cf2ee2Smrg ## what you are doing... 795897cf2ee2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 795997cf2ee2Smrg _LT_COMPILER_PIC($1) 796097cf2ee2Smrg _LT_COMPILER_C_O($1) 796197cf2ee2Smrg _LT_COMPILER_FILE_LOCKS($1) 796297cf2ee2Smrg _LT_LINKER_SHLIBS($1) 796397cf2ee2Smrg _LT_SYS_DYNAMIC_LINKER($1) 796497cf2ee2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 796597cf2ee2Smrg 796697cf2ee2Smrg _LT_CONFIG($1) 796797cf2ee2Smrg fi # test -n "$compiler" 796897cf2ee2Smrg 796997cf2ee2Smrg CC=$lt_save_CC 797097cf2ee2Smrg CFLAGS=$lt_save_CFLAGS 797197cf2ee2Smrg LDCXX=$LD 797297cf2ee2Smrg LD=$lt_save_LD 797397cf2ee2Smrg GCC=$lt_save_GCC 797497cf2ee2Smrg with_gnu_ld=$lt_save_with_gnu_ld 797597cf2ee2Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 797697cf2ee2Smrg lt_cv_path_LD=$lt_save_path_LD 797797cf2ee2Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 797897cf2ee2Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 797997cf2ee2Smrgfi # test "$_lt_caught_CXX_error" != yes 798097cf2ee2Smrg 798197cf2ee2SmrgAC_LANG_POP 798297cf2ee2Smrg])# _LT_LANG_CXX_CONFIG 798397cf2ee2Smrg 798497cf2ee2Smrg 798597cf2ee2Smrg# _LT_FUNC_STRIPNAME_CNF 798697cf2ee2Smrg# ---------------------- 798797cf2ee2Smrg# func_stripname_cnf prefix suffix name 798897cf2ee2Smrg# strip PREFIX and SUFFIX off of NAME. 798997cf2ee2Smrg# PREFIX and SUFFIX must not contain globbing or regex special 799097cf2ee2Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 799197cf2ee2Smrg# dot (in which case that matches only a dot). 799297cf2ee2Smrg# 799397cf2ee2Smrg# This function is identical to the (non-XSI) version of func_stripname, 799497cf2ee2Smrg# except this one can be used by m4 code that may be executed by configure, 799597cf2ee2Smrg# rather than the libtool script. 799697cf2ee2Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 799797cf2ee2SmrgAC_REQUIRE([_LT_DECL_SED]) 799897cf2ee2SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 799997cf2ee2Smrgfunc_stripname_cnf () 800097cf2ee2Smrg{ 800197cf2ee2Smrg case ${2} in 800297cf2ee2Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 800397cf2ee2Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 800497cf2ee2Smrg esac 800597cf2ee2Smrg} # func_stripname_cnf 800697cf2ee2Smrg])# _LT_FUNC_STRIPNAME_CNF 800797cf2ee2Smrg 800897cf2ee2Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 800997cf2ee2Smrg# --------------------------------- 801097cf2ee2Smrg# Figure out "hidden" library dependencies from verbose 801197cf2ee2Smrg# compiler output when linking a shared library. 801297cf2ee2Smrg# Parse the compiler output and extract the necessary 801397cf2ee2Smrg# objects, libraries and library flags. 801497cf2ee2Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 801597cf2ee2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 801697cf2ee2SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 801797cf2ee2Smrg# Dependencies to place before and after the object being linked: 801897cf2ee2Smrg_LT_TAGVAR(predep_objects, $1)= 801997cf2ee2Smrg_LT_TAGVAR(postdep_objects, $1)= 802097cf2ee2Smrg_LT_TAGVAR(predeps, $1)= 802197cf2ee2Smrg_LT_TAGVAR(postdeps, $1)= 802297cf2ee2Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 802397cf2ee2Smrg 802497cf2ee2Smrgdnl we can't use the lt_simple_compile_test_code here, 802597cf2ee2Smrgdnl because it contains code intended for an executable, 802697cf2ee2Smrgdnl not a library. It's possible we should let each 802797cf2ee2Smrgdnl tag define a new lt_????_link_test_code variable, 802897cf2ee2Smrgdnl but it's only used here... 802997cf2ee2Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 803097cf2ee2Smrgint a; 803197cf2ee2Smrgvoid foo (void) { a = 0; } 803297cf2ee2Smrg_LT_EOF 803397cf2ee2Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 803497cf2ee2Smrgclass Foo 803597cf2ee2Smrg{ 803697cf2ee2Smrgpublic: 803797cf2ee2Smrg Foo (void) { a = 0; } 803897cf2ee2Smrgprivate: 803997cf2ee2Smrg int a; 804097cf2ee2Smrg}; 804197cf2ee2Smrg_LT_EOF 804297cf2ee2Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 804397cf2ee2Smrg subroutine foo 804497cf2ee2Smrg implicit none 804597cf2ee2Smrg integer*4 a 804697cf2ee2Smrg a=0 804797cf2ee2Smrg return 804897cf2ee2Smrg end 804997cf2ee2Smrg_LT_EOF 805097cf2ee2Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 805197cf2ee2Smrg subroutine foo 805297cf2ee2Smrg implicit none 805397cf2ee2Smrg integer a 805497cf2ee2Smrg a=0 805597cf2ee2Smrg return 805697cf2ee2Smrg end 805797cf2ee2Smrg_LT_EOF 805897cf2ee2Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 805997cf2ee2Smrgpublic class foo { 806097cf2ee2Smrg private int a; 806197cf2ee2Smrg public void bar (void) { 806297cf2ee2Smrg a = 0; 806397cf2ee2Smrg } 806497cf2ee2Smrg}; 806597cf2ee2Smrg_LT_EOF 806697cf2ee2Smrg]) 806797cf2ee2Smrg 806897cf2ee2Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 806997cf2ee2Smrgcase "$CC $CFLAGS " in #( 807097cf2ee2Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 807197cf2ee2Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 807297cf2ee2Smrgesac 807397cf2ee2Smrg 807497cf2ee2Smrgdnl Parse the compiler output and extract the necessary 807597cf2ee2Smrgdnl objects, libraries and library flags. 807697cf2ee2Smrgif AC_TRY_EVAL(ac_compile); then 807797cf2ee2Smrg # Parse the compiler output and extract the necessary 807897cf2ee2Smrg # objects, libraries and library flags. 807997cf2ee2Smrg 808097cf2ee2Smrg # Sentinel used to keep track of whether or not we are before 808197cf2ee2Smrg # the conftest object file. 808297cf2ee2Smrg pre_test_object_deps_done=no 808397cf2ee2Smrg 808497cf2ee2Smrg for p in `eval "$output_verbose_link_cmd"`; do 808597cf2ee2Smrg case ${prev}${p} in 808697cf2ee2Smrg 808797cf2ee2Smrg -L* | -R* | -l*) 808897cf2ee2Smrg # Some compilers place space between "-{L,R}" and the path. 808997cf2ee2Smrg # Remove the space. 809097cf2ee2Smrg if test $p = "-L" || 809197cf2ee2Smrg test $p = "-R"; then 809297cf2ee2Smrg prev=$p 809397cf2ee2Smrg continue 809497cf2ee2Smrg fi 809597cf2ee2Smrg 809697cf2ee2Smrg # Expand the sysroot to ease extracting the directories later. 809797cf2ee2Smrg if test -z "$prev"; then 809897cf2ee2Smrg case $p in 809997cf2ee2Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 810097cf2ee2Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 810197cf2ee2Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 810297cf2ee2Smrg esac 810397cf2ee2Smrg fi 810497cf2ee2Smrg case $p in 810597cf2ee2Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 810697cf2ee2Smrg esac 810797cf2ee2Smrg if test "$pre_test_object_deps_done" = no; then 810897cf2ee2Smrg case ${prev} in 810997cf2ee2Smrg -L | -R) 811097cf2ee2Smrg # Internal compiler library paths should come after those 811197cf2ee2Smrg # provided the user. The postdeps already come after the 811297cf2ee2Smrg # user supplied libs so there is no need to process them. 811397cf2ee2Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 811497cf2ee2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 811597cf2ee2Smrg else 811697cf2ee2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 811797cf2ee2Smrg fi 811897cf2ee2Smrg ;; 811997cf2ee2Smrg # The "-l" case would never come before the object being 812097cf2ee2Smrg # linked, so don't bother handling this case. 812197cf2ee2Smrg esac 812297cf2ee2Smrg else 812397cf2ee2Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 812497cf2ee2Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 812597cf2ee2Smrg else 812697cf2ee2Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 812797cf2ee2Smrg fi 812897cf2ee2Smrg fi 812997cf2ee2Smrg prev= 813097cf2ee2Smrg ;; 813197cf2ee2Smrg 813297cf2ee2Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 813397cf2ee2Smrg *.$objext) 813497cf2ee2Smrg # This assumes that the test object file only shows up 813597cf2ee2Smrg # once in the compiler output. 813697cf2ee2Smrg if test "$p" = "conftest.$objext"; then 813797cf2ee2Smrg pre_test_object_deps_done=yes 813897cf2ee2Smrg continue 813997cf2ee2Smrg fi 814097cf2ee2Smrg 814197cf2ee2Smrg if test "$pre_test_object_deps_done" = no; then 814297cf2ee2Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 814397cf2ee2Smrg _LT_TAGVAR(predep_objects, $1)="$p" 814497cf2ee2Smrg else 814597cf2ee2Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 814697cf2ee2Smrg fi 814797cf2ee2Smrg else 814897cf2ee2Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 814997cf2ee2Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 815097cf2ee2Smrg else 815197cf2ee2Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 815297cf2ee2Smrg fi 815397cf2ee2Smrg fi 815497cf2ee2Smrg ;; 81556e7d3316Smrg 815697cf2ee2Smrg *) ;; # Ignore the rest. 8157a966c04fSmrg 815897cf2ee2Smrg esac 815997cf2ee2Smrg done 8160a966c04fSmrg 816197cf2ee2Smrg # Clean up. 816297cf2ee2Smrg rm -f a.out a.exe 816397cf2ee2Smrgelse 816497cf2ee2Smrg echo "libtool.m4: error: problem compiling $1 test program" 816597cf2ee2Smrgfi 8166a966c04fSmrg 816797cf2ee2Smrg$RM -f confest.$objext 816897cf2ee2SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 8169a966c04fSmrg 817097cf2ee2Smrg# PORTME: override above test on systems where it is broken 817197cf2ee2Smrgm4_if([$1], [CXX], 817297cf2ee2Smrg[case $host_os in 817397cf2ee2Smrginterix[[3-9]]*) 817497cf2ee2Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 817597cf2ee2Smrg # hack all around it, let's just trust "g++" to DTRT. 817697cf2ee2Smrg _LT_TAGVAR(predep_objects,$1)= 817797cf2ee2Smrg _LT_TAGVAR(postdep_objects,$1)= 817897cf2ee2Smrg _LT_TAGVAR(postdeps,$1)= 817997cf2ee2Smrg ;; 8180a966c04fSmrg 818197cf2ee2Smrglinux*) 818297cf2ee2Smrg case `$CC -V 2>&1 | sed 5q` in 818397cf2ee2Smrg *Sun\ C*) 818497cf2ee2Smrg # Sun C++ 5.9 8185a966c04fSmrg 818697cf2ee2Smrg # The more standards-conforming stlport4 library is 818797cf2ee2Smrg # incompatible with the Cstd library. Avoid specifying 818897cf2ee2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 818997cf2ee2Smrg # -library=stlport4 depends on it. 819097cf2ee2Smrg case " $CXX $CXXFLAGS " in 819197cf2ee2Smrg *" -library=stlport4 "*) 819297cf2ee2Smrg solaris_use_stlport4=yes 819397cf2ee2Smrg ;; 819497cf2ee2Smrg esac 8195a966c04fSmrg 819697cf2ee2Smrg if test "$solaris_use_stlport4" != yes; then 819797cf2ee2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 819897cf2ee2Smrg fi 819997cf2ee2Smrg ;; 820097cf2ee2Smrg esac 820197cf2ee2Smrg ;; 8202a966c04fSmrg 820397cf2ee2Smrgsolaris*) 820497cf2ee2Smrg case $cc_basename in 820597cf2ee2Smrg CC* | sunCC*) 820697cf2ee2Smrg # The more standards-conforming stlport4 library is 820797cf2ee2Smrg # incompatible with the Cstd library. Avoid specifying 820897cf2ee2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 820997cf2ee2Smrg # -library=stlport4 depends on it. 821097cf2ee2Smrg case " $CXX $CXXFLAGS " in 821197cf2ee2Smrg *" -library=stlport4 "*) 821297cf2ee2Smrg solaris_use_stlport4=yes 821397cf2ee2Smrg ;; 821497cf2ee2Smrg esac 82156e7d3316Smrg 821697cf2ee2Smrg # Adding this requires a known-good setup of shared libraries for 821797cf2ee2Smrg # Sun compiler versions before 5.6, else PIC objects from an old 821897cf2ee2Smrg # archive will be linked into the output, leading to subtle bugs. 821997cf2ee2Smrg if test "$solaris_use_stlport4" != yes; then 822097cf2ee2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 822197cf2ee2Smrg fi 822297cf2ee2Smrg ;; 822397cf2ee2Smrg esac 822497cf2ee2Smrg ;; 822597cf2ee2Smrgesac 822697cf2ee2Smrg]) 82276e7d3316Smrg 822897cf2ee2Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 822997cf2ee2Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 823097cf2ee2Smrgesac 823197cf2ee2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 823297cf2ee2Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 823397cf2ee2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 823497cf2ee2Smrgfi 823597cf2ee2Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 823697cf2ee2Smrg [The directories searched by this compiler when creating a shared library]) 823797cf2ee2Smrg_LT_TAGDECL([], [predep_objects], [1], 823897cf2ee2Smrg [Dependencies to place before and after the objects being linked to 823997cf2ee2Smrg create a shared library]) 824097cf2ee2Smrg_LT_TAGDECL([], [postdep_objects], [1]) 824197cf2ee2Smrg_LT_TAGDECL([], [predeps], [1]) 824297cf2ee2Smrg_LT_TAGDECL([], [postdeps], [1]) 824397cf2ee2Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 824497cf2ee2Smrg [The library search path used internally by the compiler when linking 824597cf2ee2Smrg a shared library]) 824697cf2ee2Smrg])# _LT_SYS_HIDDEN_LIBDEPS 82476e7d3316Smrg 8248a966c04fSmrg 824997cf2ee2Smrg# _LT_LANG_F77_CONFIG([TAG]) 825097cf2ee2Smrg# -------------------------- 825197cf2ee2Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 825297cf2ee2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 825397cf2ee2Smrg# to write the compiler configuration to `libtool'. 825497cf2ee2Smrgm4_defun([_LT_LANG_F77_CONFIG], 825597cf2ee2Smrg[AC_LANG_PUSH(Fortran 77) 825697cf2ee2Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 825797cf2ee2Smrg _lt_disable_F77=yes 825897cf2ee2Smrgfi 825997cf2ee2Smrg 826097cf2ee2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 826197cf2ee2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 826297cf2ee2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 826397cf2ee2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 826497cf2ee2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 826597cf2ee2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 826697cf2ee2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 826797cf2ee2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 826897cf2ee2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 826997cf2ee2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 827097cf2ee2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 827197cf2ee2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 827297cf2ee2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 827397cf2ee2Smrg_LT_TAGVAR(module_cmds, $1)= 827497cf2ee2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 827597cf2ee2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 827697cf2ee2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 827797cf2ee2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 827897cf2ee2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 827997cf2ee2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 828097cf2ee2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 828197cf2ee2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 828297cf2ee2Smrg 828397cf2ee2Smrg# Source file extension for f77 test sources. 828497cf2ee2Smrgac_ext=f 828597cf2ee2Smrg 828697cf2ee2Smrg# Object file extension for compiled f77 test sources. 828797cf2ee2Smrgobjext=o 828897cf2ee2Smrg_LT_TAGVAR(objext, $1)=$objext 828997cf2ee2Smrg 829097cf2ee2Smrg# No sense in running all these tests if we already determined that 829197cf2ee2Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 829297cf2ee2Smrg# are currently assumed to apply to all compilers on this platform, 829397cf2ee2Smrg# and will be corrupted by setting them based on a non-working compiler. 829497cf2ee2Smrgif test "$_lt_disable_F77" != yes; then 829597cf2ee2Smrg # Code to be used in simple compile tests 829697cf2ee2Smrg lt_simple_compile_test_code="\ 829797cf2ee2Smrg subroutine t 829897cf2ee2Smrg return 829997cf2ee2Smrg end 830097cf2ee2Smrg" 830197cf2ee2Smrg 830297cf2ee2Smrg # Code to be used in simple link tests 830397cf2ee2Smrg lt_simple_link_test_code="\ 830497cf2ee2Smrg program t 830597cf2ee2Smrg end 830697cf2ee2Smrg" 8307a966c04fSmrg 830897cf2ee2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 830997cf2ee2Smrg _LT_TAG_COMPILER 83106e7d3316Smrg 831197cf2ee2Smrg # save warnings/boilerplate of simple test code 831297cf2ee2Smrg _LT_COMPILER_BOILERPLATE 831397cf2ee2Smrg _LT_LINKER_BOILERPLATE 83146e7d3316Smrg 831597cf2ee2Smrg # Allow CC to be a program name with arguments. 831697cf2ee2Smrg lt_save_CC="$CC" 831797cf2ee2Smrg lt_save_GCC=$GCC 831897cf2ee2Smrg lt_save_CFLAGS=$CFLAGS 831997cf2ee2Smrg CC=${F77-"f77"} 832097cf2ee2Smrg CFLAGS=$FFLAGS 832197cf2ee2Smrg compiler=$CC 832297cf2ee2Smrg _LT_TAGVAR(compiler, $1)=$CC 832397cf2ee2Smrg _LT_CC_BASENAME([$compiler]) 832497cf2ee2Smrg GCC=$G77 832597cf2ee2Smrg if test -n "$compiler"; then 832697cf2ee2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 832797cf2ee2Smrg AC_MSG_RESULT([$can_build_shared]) 83286e7d3316Smrg 832997cf2ee2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 833097cf2ee2Smrg test "$can_build_shared" = "no" && enable_shared=no 8331a966c04fSmrg 833297cf2ee2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 833397cf2ee2Smrg # are all built from PIC. 833497cf2ee2Smrg case $host_os in 833597cf2ee2Smrg aix3*) 833697cf2ee2Smrg test "$enable_shared" = yes && enable_static=no 833797cf2ee2Smrg if test -n "$RANLIB"; then 833897cf2ee2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 833997cf2ee2Smrg postinstall_cmds='$RANLIB $lib' 834097cf2ee2Smrg fi 83416e7d3316Smrg ;; 834297cf2ee2Smrg aix[[4-9]]*) 834397cf2ee2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 834497cf2ee2Smrg test "$enable_shared" = yes && enable_static=no 834597cf2ee2Smrg fi 83466e7d3316Smrg ;; 834797cf2ee2Smrg esac 834897cf2ee2Smrg AC_MSG_RESULT([$enable_shared]) 8349a966c04fSmrg 835097cf2ee2Smrg AC_MSG_CHECKING([whether to build static libraries]) 835197cf2ee2Smrg # Make sure either enable_shared or enable_static is yes. 835297cf2ee2Smrg test "$enable_shared" = yes || enable_static=yes 835397cf2ee2Smrg AC_MSG_RESULT([$enable_static]) 83546e7d3316Smrg 835597cf2ee2Smrg _LT_TAGVAR(GCC, $1)="$G77" 835697cf2ee2Smrg _LT_TAGVAR(LD, $1)="$LD" 8357a966c04fSmrg 835897cf2ee2Smrg ## CAVEAT EMPTOR: 835997cf2ee2Smrg ## There is no encapsulation within the following macros, do not change 836097cf2ee2Smrg ## the running order or otherwise move them around unless you know exactly 836197cf2ee2Smrg ## what you are doing... 836297cf2ee2Smrg _LT_COMPILER_PIC($1) 836397cf2ee2Smrg _LT_COMPILER_C_O($1) 836497cf2ee2Smrg _LT_COMPILER_FILE_LOCKS($1) 836597cf2ee2Smrg _LT_LINKER_SHLIBS($1) 836697cf2ee2Smrg _LT_SYS_DYNAMIC_LINKER($1) 836797cf2ee2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8368a966c04fSmrg 836997cf2ee2Smrg _LT_CONFIG($1) 837097cf2ee2Smrg fi # test -n "$compiler" 8371a966c04fSmrg 837297cf2ee2Smrg GCC=$lt_save_GCC 837397cf2ee2Smrg CC="$lt_save_CC" 837497cf2ee2Smrg CFLAGS="$lt_save_CFLAGS" 837597cf2ee2Smrgfi # test "$_lt_disable_F77" != yes 83766e7d3316Smrg 837797cf2ee2SmrgAC_LANG_POP 837897cf2ee2Smrg])# _LT_LANG_F77_CONFIG 83796e7d3316Smrg 83806e7d3316Smrg 838197cf2ee2Smrg# _LT_LANG_FC_CONFIG([TAG]) 838297cf2ee2Smrg# ------------------------- 838397cf2ee2Smrg# Ensure that the configuration variables for a Fortran compiler are 838497cf2ee2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 838597cf2ee2Smrg# to write the compiler configuration to `libtool'. 838697cf2ee2Smrgm4_defun([_LT_LANG_FC_CONFIG], 838797cf2ee2Smrg[AC_LANG_PUSH(Fortran) 8388a966c04fSmrg 838997cf2ee2Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 839097cf2ee2Smrg _lt_disable_FC=yes 839197cf2ee2Smrgfi 8392a966c04fSmrg 839397cf2ee2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 839497cf2ee2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 839597cf2ee2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 839697cf2ee2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 839797cf2ee2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 839897cf2ee2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 839997cf2ee2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 840097cf2ee2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 840197cf2ee2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 840297cf2ee2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 840397cf2ee2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 840497cf2ee2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 840597cf2ee2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 840697cf2ee2Smrg_LT_TAGVAR(module_cmds, $1)= 840797cf2ee2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 840897cf2ee2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 840997cf2ee2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 841097cf2ee2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 841197cf2ee2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 841297cf2ee2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 841397cf2ee2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 841497cf2ee2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 841597cf2ee2Smrg 841697cf2ee2Smrg# Source file extension for fc test sources. 841797cf2ee2Smrgac_ext=${ac_fc_srcext-f} 841897cf2ee2Smrg 841997cf2ee2Smrg# Object file extension for compiled fc test sources. 842097cf2ee2Smrgobjext=o 842197cf2ee2Smrg_LT_TAGVAR(objext, $1)=$objext 842297cf2ee2Smrg 842397cf2ee2Smrg# No sense in running all these tests if we already determined that 842497cf2ee2Smrg# the FC compiler isn't working. Some variables (like enable_shared) 842597cf2ee2Smrg# are currently assumed to apply to all compilers on this platform, 842697cf2ee2Smrg# and will be corrupted by setting them based on a non-working compiler. 842797cf2ee2Smrgif test "$_lt_disable_FC" != yes; then 842897cf2ee2Smrg # Code to be used in simple compile tests 842997cf2ee2Smrg lt_simple_compile_test_code="\ 843097cf2ee2Smrg subroutine t 843197cf2ee2Smrg return 843297cf2ee2Smrg end 843397cf2ee2Smrg" 843497cf2ee2Smrg 843597cf2ee2Smrg # Code to be used in simple link tests 843697cf2ee2Smrg lt_simple_link_test_code="\ 843797cf2ee2Smrg program t 843897cf2ee2Smrg end 843997cf2ee2Smrg" 844097cf2ee2Smrg 844197cf2ee2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 844297cf2ee2Smrg _LT_TAG_COMPILER 8443a966c04fSmrg 844497cf2ee2Smrg # save warnings/boilerplate of simple test code 844597cf2ee2Smrg _LT_COMPILER_BOILERPLATE 844697cf2ee2Smrg _LT_LINKER_BOILERPLATE 8447a966c04fSmrg 844897cf2ee2Smrg # Allow CC to be a program name with arguments. 844997cf2ee2Smrg lt_save_CC="$CC" 845097cf2ee2Smrg lt_save_GCC=$GCC 845197cf2ee2Smrg lt_save_CFLAGS=$CFLAGS 845297cf2ee2Smrg CC=${FC-"f95"} 845397cf2ee2Smrg CFLAGS=$FCFLAGS 845497cf2ee2Smrg compiler=$CC 845597cf2ee2Smrg GCC=$ac_cv_fc_compiler_gnu 8456a966c04fSmrg 845797cf2ee2Smrg _LT_TAGVAR(compiler, $1)=$CC 845897cf2ee2Smrg _LT_CC_BASENAME([$compiler]) 8459a966c04fSmrg 846097cf2ee2Smrg if test -n "$compiler"; then 846197cf2ee2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 846297cf2ee2Smrg AC_MSG_RESULT([$can_build_shared]) 8463a966c04fSmrg 846497cf2ee2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 846597cf2ee2Smrg test "$can_build_shared" = "no" && enable_shared=no 846697cf2ee2Smrg 846797cf2ee2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 846897cf2ee2Smrg # are all built from PIC. 846997cf2ee2Smrg case $host_os in 847097cf2ee2Smrg aix3*) 847197cf2ee2Smrg test "$enable_shared" = yes && enable_static=no 847297cf2ee2Smrg if test -n "$RANLIB"; then 847397cf2ee2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 847497cf2ee2Smrg postinstall_cmds='$RANLIB $lib' 847597cf2ee2Smrg fi 847697cf2ee2Smrg ;; 847797cf2ee2Smrg aix[[4-9]]*) 847897cf2ee2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 847997cf2ee2Smrg test "$enable_shared" = yes && enable_static=no 848097cf2ee2Smrg fi 84816e7d3316Smrg ;; 84826e7d3316Smrg esac 848397cf2ee2Smrg AC_MSG_RESULT([$enable_shared]) 8484a966c04fSmrg 848597cf2ee2Smrg AC_MSG_CHECKING([whether to build static libraries]) 848697cf2ee2Smrg # Make sure either enable_shared or enable_static is yes. 848797cf2ee2Smrg test "$enable_shared" = yes || enable_static=yes 848897cf2ee2Smrg AC_MSG_RESULT([$enable_static]) 84896e7d3316Smrg 849097cf2ee2Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 84916e7d3316Smrg _LT_TAGVAR(LD, $1)="$LD" 84926e7d3316Smrg 84936e7d3316Smrg ## CAVEAT EMPTOR: 84946e7d3316Smrg ## There is no encapsulation within the following macros, do not change 84956e7d3316Smrg ## the running order or otherwise move them around unless you know exactly 84966e7d3316Smrg ## what you are doing... 84976e7d3316Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 84986e7d3316Smrg _LT_COMPILER_PIC($1) 84996e7d3316Smrg _LT_COMPILER_C_O($1) 85006e7d3316Smrg _LT_COMPILER_FILE_LOCKS($1) 85016e7d3316Smrg _LT_LINKER_SHLIBS($1) 85026e7d3316Smrg _LT_SYS_DYNAMIC_LINKER($1) 85036e7d3316Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 85046e7d3316Smrg 850597cf2ee2Smrg _LT_CONFIG($1) 850697cf2ee2Smrg fi # test -n "$compiler" 850797cf2ee2Smrg 850897cf2ee2Smrg GCC=$lt_save_GCC 850997cf2ee2Smrg CC=$lt_save_CC 851097cf2ee2Smrg CFLAGS=$lt_save_CFLAGS 851197cf2ee2Smrgfi # test "$_lt_disable_FC" != yes 851297cf2ee2Smrg 851397cf2ee2SmrgAC_LANG_POP 851497cf2ee2Smrg])# _LT_LANG_FC_CONFIG 851597cf2ee2Smrg 851697cf2ee2Smrg 851797cf2ee2Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 851897cf2ee2Smrg# -------------------------- 851997cf2ee2Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 852097cf2ee2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 852197cf2ee2Smrg# to write the compiler configuration to `libtool'. 852297cf2ee2Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 852397cf2ee2Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 852497cf2ee2SmrgAC_LANG_SAVE 852597cf2ee2Smrg 852697cf2ee2Smrg# Source file extension for Java test sources. 852797cf2ee2Smrgac_ext=java 852897cf2ee2Smrg 852997cf2ee2Smrg# Object file extension for compiled Java test sources. 853097cf2ee2Smrgobjext=o 853197cf2ee2Smrg_LT_TAGVAR(objext, $1)=$objext 853297cf2ee2Smrg 853397cf2ee2Smrg# Code to be used in simple compile tests 853497cf2ee2Smrglt_simple_compile_test_code="class foo {}" 853597cf2ee2Smrg 853697cf2ee2Smrg# Code to be used in simple link tests 853797cf2ee2Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 853897cf2ee2Smrg 853997cf2ee2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 854097cf2ee2Smrg_LT_TAG_COMPILER 854197cf2ee2Smrg 854297cf2ee2Smrg# save warnings/boilerplate of simple test code 854397cf2ee2Smrg_LT_COMPILER_BOILERPLATE 854497cf2ee2Smrg_LT_LINKER_BOILERPLATE 854597cf2ee2Smrg 854697cf2ee2Smrg# Allow CC to be a program name with arguments. 854797cf2ee2Smrglt_save_CC=$CC 854897cf2ee2Smrglt_save_CFLAGS=$CFLAGS 854997cf2ee2Smrglt_save_GCC=$GCC 855097cf2ee2SmrgGCC=yes 855197cf2ee2SmrgCC=${GCJ-"gcj"} 855297cf2ee2SmrgCFLAGS=$GCJFLAGS 855397cf2ee2Smrgcompiler=$CC 855497cf2ee2Smrg_LT_TAGVAR(compiler, $1)=$CC 855597cf2ee2Smrg_LT_TAGVAR(LD, $1)="$LD" 855697cf2ee2Smrg_LT_CC_BASENAME([$compiler]) 855797cf2ee2Smrg 855897cf2ee2Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 855997cf2ee2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 856097cf2ee2Smrg 856197cf2ee2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 856297cf2ee2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 856397cf2ee2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 856497cf2ee2Smrg 856597cf2ee2Smrgif test -n "$compiler"; then 856697cf2ee2Smrg _LT_COMPILER_NO_RTTI($1) 856797cf2ee2Smrg _LT_COMPILER_PIC($1) 856897cf2ee2Smrg _LT_COMPILER_C_O($1) 856997cf2ee2Smrg _LT_COMPILER_FILE_LOCKS($1) 857097cf2ee2Smrg _LT_LINKER_SHLIBS($1) 857197cf2ee2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 857297cf2ee2Smrg 857397cf2ee2Smrg _LT_CONFIG($1) 857497cf2ee2Smrgfi 857597cf2ee2Smrg 857697cf2ee2SmrgAC_LANG_RESTORE 857797cf2ee2Smrg 857897cf2ee2SmrgGCC=$lt_save_GCC 857997cf2ee2SmrgCC=$lt_save_CC 858097cf2ee2SmrgCFLAGS=$lt_save_CFLAGS 858197cf2ee2Smrg])# _LT_LANG_GCJ_CONFIG 858297cf2ee2Smrg 858397cf2ee2Smrg 858497cf2ee2Smrg# _LT_LANG_RC_CONFIG([TAG]) 858597cf2ee2Smrg# ------------------------- 858697cf2ee2Smrg# Ensure that the configuration variables for the Windows resource compiler 858797cf2ee2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 858897cf2ee2Smrg# to write the compiler configuration to `libtool'. 858997cf2ee2Smrgm4_defun([_LT_LANG_RC_CONFIG], 859097cf2ee2Smrg[AC_REQUIRE([LT_PROG_RC])dnl 859197cf2ee2SmrgAC_LANG_SAVE 859297cf2ee2Smrg 859397cf2ee2Smrg# Source file extension for RC test sources. 859497cf2ee2Smrgac_ext=rc 859597cf2ee2Smrg 859697cf2ee2Smrg# Object file extension for compiled RC test sources. 859797cf2ee2Smrgobjext=o 859897cf2ee2Smrg_LT_TAGVAR(objext, $1)=$objext 859997cf2ee2Smrg 860097cf2ee2Smrg# Code to be used in simple compile tests 860197cf2ee2Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 860297cf2ee2Smrg 860397cf2ee2Smrg# Code to be used in simple link tests 860497cf2ee2Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 860597cf2ee2Smrg 860697cf2ee2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 860797cf2ee2Smrg_LT_TAG_COMPILER 860897cf2ee2Smrg 860997cf2ee2Smrg# save warnings/boilerplate of simple test code 861097cf2ee2Smrg_LT_COMPILER_BOILERPLATE 861197cf2ee2Smrg_LT_LINKER_BOILERPLATE 861297cf2ee2Smrg 861397cf2ee2Smrg# Allow CC to be a program name with arguments. 861497cf2ee2Smrglt_save_CC="$CC" 861597cf2ee2Smrglt_save_CFLAGS=$CFLAGS 861697cf2ee2Smrglt_save_GCC=$GCC 861797cf2ee2SmrgGCC= 861897cf2ee2SmrgCC=${RC-"windres"} 861997cf2ee2SmrgCFLAGS= 862097cf2ee2Smrgcompiler=$CC 862197cf2ee2Smrg_LT_TAGVAR(compiler, $1)=$CC 862297cf2ee2Smrg_LT_CC_BASENAME([$compiler]) 862397cf2ee2Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 862497cf2ee2Smrg 862597cf2ee2Smrgif test -n "$compiler"; then 862697cf2ee2Smrg : 862797cf2ee2Smrg _LT_CONFIG($1) 862897cf2ee2Smrgfi 862997cf2ee2Smrg 863097cf2ee2SmrgGCC=$lt_save_GCC 863197cf2ee2SmrgAC_LANG_RESTORE 863297cf2ee2SmrgCC=$lt_save_CC 863397cf2ee2SmrgCFLAGS=$lt_save_CFLAGS 863497cf2ee2Smrg])# _LT_LANG_RC_CONFIG 863597cf2ee2Smrg 863697cf2ee2Smrg 863797cf2ee2Smrg# LT_PROG_GCJ 863897cf2ee2Smrg# ----------- 863997cf2ee2SmrgAC_DEFUN([LT_PROG_GCJ], 864097cf2ee2Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 864197cf2ee2Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 864297cf2ee2Smrg [AC_CHECK_TOOL(GCJ, gcj,) 864397cf2ee2Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 864497cf2ee2Smrg AC_SUBST(GCJFLAGS)])])[]dnl 864597cf2ee2Smrg]) 864697cf2ee2Smrg 864797cf2ee2Smrg# Old name: 864897cf2ee2SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 864997cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 865097cf2ee2Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 865197cf2ee2Smrg 865297cf2ee2Smrg 865397cf2ee2Smrg# LT_PROG_RC 865497cf2ee2Smrg# ---------- 865597cf2ee2SmrgAC_DEFUN([LT_PROG_RC], 865697cf2ee2Smrg[AC_CHECK_TOOL(RC, windres,) 865797cf2ee2Smrg]) 865897cf2ee2Smrg 865997cf2ee2Smrg# Old name: 866097cf2ee2SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 866197cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 866297cf2ee2Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 866397cf2ee2Smrg 866497cf2ee2Smrg 866597cf2ee2Smrg# _LT_DECL_EGREP 866697cf2ee2Smrg# -------------- 866797cf2ee2Smrg# If we don't have a new enough Autoconf to choose the best grep 866897cf2ee2Smrg# available, choose the one first in the user's PATH. 866997cf2ee2Smrgm4_defun([_LT_DECL_EGREP], 867097cf2ee2Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 867197cf2ee2SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 867297cf2ee2Smrgtest -z "$GREP" && GREP=grep 867397cf2ee2Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 867497cf2ee2Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 867597cf2ee2Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 867697cf2ee2Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 867797cf2ee2SmrgAC_SUBST([GREP]) 867897cf2ee2Smrg]) 867997cf2ee2Smrg 86806e7d3316Smrg 868197cf2ee2Smrg# _LT_DECL_OBJDUMP 868297cf2ee2Smrg# -------------- 868397cf2ee2Smrg# If we don't have a new enough Autoconf to choose the best objdump 868497cf2ee2Smrg# available, choose the one first in the user's PATH. 868597cf2ee2Smrgm4_defun([_LT_DECL_OBJDUMP], 868697cf2ee2Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 868797cf2ee2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 868897cf2ee2Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 868997cf2ee2SmrgAC_SUBST([OBJDUMP]) 869097cf2ee2Smrg]) 8691a966c04fSmrg 869297cf2ee2Smrg# _LT_DECL_DLLTOOL 869397cf2ee2Smrg# ---------------- 869497cf2ee2Smrg# Ensure DLLTOOL variable is set. 869597cf2ee2Smrgm4_defun([_LT_DECL_DLLTOOL], 869697cf2ee2Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 869797cf2ee2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 869897cf2ee2Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 869997cf2ee2SmrgAC_SUBST([DLLTOOL]) 870097cf2ee2Smrg]) 8701a966c04fSmrg 870297cf2ee2Smrg# _LT_DECL_SED 870397cf2ee2Smrg# ------------ 870497cf2ee2Smrg# Check for a fully-functional sed program, that truncates 870597cf2ee2Smrg# as few characters as possible. Prefer GNU sed if found. 870697cf2ee2Smrgm4_defun([_LT_DECL_SED], 870797cf2ee2Smrg[AC_PROG_SED 870897cf2ee2Smrgtest -z "$SED" && SED=sed 870997cf2ee2SmrgXsed="$SED -e 1s/^X//" 871097cf2ee2Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 871197cf2ee2Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 871297cf2ee2Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 871397cf2ee2Smrg])# _LT_DECL_SED 8714a966c04fSmrg 871597cf2ee2Smrgm4_ifndef([AC_PROG_SED], [ 871697cf2ee2Smrg# NOTE: This macro has been submitted for inclusion into # 871797cf2ee2Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 871897cf2ee2Smrg# a released version of Autoconf we should remove this # 871997cf2ee2Smrg# macro and use it instead. # 8720a966c04fSmrg 872197cf2ee2Smrgm4_defun([AC_PROG_SED], 872297cf2ee2Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 872397cf2ee2SmrgAC_CACHE_VAL(lt_cv_path_SED, 872497cf2ee2Smrg[# Loop through the user's path and test for sed and gsed. 872597cf2ee2Smrg# Then use that list of sed's as ones to test for truncation. 872697cf2ee2Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 872797cf2ee2Smrgfor as_dir in $PATH 872897cf2ee2Smrgdo 872997cf2ee2Smrg IFS=$as_save_IFS 873097cf2ee2Smrg test -z "$as_dir" && as_dir=. 873197cf2ee2Smrg for lt_ac_prog in sed gsed; do 873297cf2ee2Smrg for ac_exec_ext in '' $ac_executable_extensions; do 873397cf2ee2Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 873497cf2ee2Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 873597cf2ee2Smrg fi 873697cf2ee2Smrg done 873797cf2ee2Smrg done 873897cf2ee2Smrgdone 873997cf2ee2SmrgIFS=$as_save_IFS 874097cf2ee2Smrglt_ac_max=0 874197cf2ee2Smrglt_ac_count=0 874297cf2ee2Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 874397cf2ee2Smrg# along with /bin/sed that truncates output. 874497cf2ee2Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 874597cf2ee2Smrg test ! -f $lt_ac_sed && continue 874697cf2ee2Smrg cat /dev/null > conftest.in 874797cf2ee2Smrg lt_ac_count=0 874897cf2ee2Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 874997cf2ee2Smrg # Check for GNU sed and select it if it is found. 875097cf2ee2Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 875197cf2ee2Smrg lt_cv_path_SED=$lt_ac_sed 875297cf2ee2Smrg break 875397cf2ee2Smrg fi 875497cf2ee2Smrg while true; do 875597cf2ee2Smrg cat conftest.in conftest.in >conftest.tmp 875697cf2ee2Smrg mv conftest.tmp conftest.in 875797cf2ee2Smrg cp conftest.in conftest.nl 875897cf2ee2Smrg echo >>conftest.nl 875997cf2ee2Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 876097cf2ee2Smrg cmp -s conftest.out conftest.nl || break 876197cf2ee2Smrg # 10000 chars as input seems more than enough 876297cf2ee2Smrg test $lt_ac_count -gt 10 && break 876397cf2ee2Smrg lt_ac_count=`expr $lt_ac_count + 1` 876497cf2ee2Smrg if test $lt_ac_count -gt $lt_ac_max; then 876597cf2ee2Smrg lt_ac_max=$lt_ac_count 876697cf2ee2Smrg lt_cv_path_SED=$lt_ac_sed 876797cf2ee2Smrg fi 876897cf2ee2Smrg done 876997cf2ee2Smrgdone 87706e7d3316Smrg]) 877197cf2ee2SmrgSED=$lt_cv_path_SED 877297cf2ee2SmrgAC_SUBST([SED]) 877397cf2ee2SmrgAC_MSG_RESULT([$SED]) 877497cf2ee2Smrg])#AC_PROG_SED 877597cf2ee2Smrg])#m4_ifndef 8776a966c04fSmrg 877797cf2ee2Smrg# Old name: 877897cf2ee2SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 877997cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 878097cf2ee2Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8781a966c04fSmrg 8782a966c04fSmrg 878397cf2ee2Smrg# _LT_CHECK_SHELL_FEATURES 878497cf2ee2Smrg# ------------------------ 878597cf2ee2Smrg# Find out whether the shell is Bourne or XSI compatible, 878697cf2ee2Smrg# or has some other useful features. 878797cf2ee2Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 878897cf2ee2Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 878997cf2ee2Smrg# Try some XSI features 879097cf2ee2Smrgxsi_shell=no 879197cf2ee2Smrg( _lt_dummy="a/b/c" 879297cf2ee2Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 879397cf2ee2Smrg = c,a/b,b/c, \ 879497cf2ee2Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 879597cf2ee2Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 879697cf2ee2Smrg && xsi_shell=yes 879797cf2ee2SmrgAC_MSG_RESULT([$xsi_shell]) 879897cf2ee2Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 87996e7d3316Smrg 880097cf2ee2SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 880197cf2ee2Smrglt_shell_append=no 880297cf2ee2Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 880397cf2ee2Smrg >/dev/null 2>&1 \ 880497cf2ee2Smrg && lt_shell_append=yes 880597cf2ee2SmrgAC_MSG_RESULT([$lt_shell_append]) 880697cf2ee2Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 88076e7d3316Smrg 880897cf2ee2Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 880997cf2ee2Smrg lt_unset=unset 881097cf2ee2Smrgelse 881197cf2ee2Smrg lt_unset=false 881297cf2ee2Smrgfi 881397cf2ee2Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 88146e7d3316Smrg 881597cf2ee2Smrg# test EBCDIC or ASCII 881697cf2ee2Smrgcase `echo X|tr X '\101'` in 881797cf2ee2Smrg A) # ASCII based system 881897cf2ee2Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 881997cf2ee2Smrg lt_SP2NL='tr \040 \012' 882097cf2ee2Smrg lt_NL2SP='tr \015\012 \040\040' 882197cf2ee2Smrg ;; 882297cf2ee2Smrg *) # EBCDIC based system 882397cf2ee2Smrg lt_SP2NL='tr \100 \n' 882497cf2ee2Smrg lt_NL2SP='tr \r\n \100\100' 882597cf2ee2Smrg ;; 882697cf2ee2Smrgesac 882797cf2ee2Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 882897cf2ee2Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 882997cf2ee2Smrg])# _LT_CHECK_SHELL_FEATURES 883097cf2ee2Smrg 883197cf2ee2Smrg 883297cf2ee2Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 883397cf2ee2Smrg# ------------------------------------------------------ 883497cf2ee2Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 883597cf2ee2Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 883697cf2ee2Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 883797cf2ee2Smrg[dnl { 883897cf2ee2Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 883997cf2ee2Smrg$1 ()\ 884097cf2ee2Smrg{\ 884197cf2ee2Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 884297cf2ee2Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 884397cf2ee2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 884497cf2ee2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 884597cf2ee2Smrgtest 0 -eq $? || _lt_function_replace_fail=: 884697cf2ee2Smrg]) 88476e7d3316Smrg 88486e7d3316Smrg 884997cf2ee2Smrg# _LT_PROG_REPLACE_SHELLFNS 885097cf2ee2Smrg# ------------------------- 885197cf2ee2Smrg# Replace existing portable implementations of several shell functions with 885297cf2ee2Smrg# equivalent extended shell implementations where those features are available.. 885397cf2ee2Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 885497cf2ee2Smrg[if test x"$xsi_shell" = xyes; then 885597cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 885697cf2ee2Smrg case ${1} in 885797cf2ee2Smrg */*) func_dirname_result="${1%/*}${2}" ;; 885897cf2ee2Smrg * ) func_dirname_result="${3}" ;; 885997cf2ee2Smrg esac]) 886097cf2ee2Smrg 886197cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 886297cf2ee2Smrg func_basename_result="${1##*/}"]) 886397cf2ee2Smrg 886497cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 886597cf2ee2Smrg case ${1} in 886697cf2ee2Smrg */*) func_dirname_result="${1%/*}${2}" ;; 886797cf2ee2Smrg * ) func_dirname_result="${3}" ;; 88686e7d3316Smrg esac 886997cf2ee2Smrg func_basename_result="${1##*/}"]) 88706e7d3316Smrg 887197cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 887297cf2ee2Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 887397cf2ee2Smrg # positional parameters, so assign one to ordinary parameter first. 887497cf2ee2Smrg func_stripname_result=${3} 887597cf2ee2Smrg func_stripname_result=${func_stripname_result#"${1}"} 887697cf2ee2Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 887797cf2ee2Smrg 887897cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 887997cf2ee2Smrg func_split_long_opt_name=${1%%=*} 888097cf2ee2Smrg func_split_long_opt_arg=${1#*=}]) 888197cf2ee2Smrg 888297cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 888397cf2ee2Smrg func_split_short_opt_arg=${1#??} 888497cf2ee2Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 888597cf2ee2Smrg 888697cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 888797cf2ee2Smrg case ${1} in 888897cf2ee2Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 888997cf2ee2Smrg *) func_lo2o_result=${1} ;; 889097cf2ee2Smrg esac]) 889197cf2ee2Smrg 889297cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 889397cf2ee2Smrg 889497cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 889597cf2ee2Smrg 889697cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 88976e7d3316Smrgfi 88986e7d3316Smrg 889997cf2ee2Smrgif test x"$lt_shell_append" = xyes; then 890097cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 89016e7d3316Smrg 890297cf2ee2Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 890397cf2ee2Smrg func_quote_for_eval "${2}" 890497cf2ee2Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 890597cf2ee2Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 89066e7d3316Smrg 890797cf2ee2Smrg # Save a `func_append' function call where possible by direct use of '+=' 890897cf2ee2Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 890997cf2ee2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 891097cf2ee2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 891197cf2ee2Smrg test 0 -eq $? || _lt_function_replace_fail=: 891297cf2ee2Smrgelse 891397cf2ee2Smrg # Save a `func_append' function call even when '+=' is not available 891497cf2ee2Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 891597cf2ee2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 891697cf2ee2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 891797cf2ee2Smrg test 0 -eq $? || _lt_function_replace_fail=: 891897cf2ee2Smrgfi 89196e7d3316Smrg 892097cf2ee2Smrgif test x"$_lt_function_replace_fail" = x":"; then 892197cf2ee2Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 892297cf2ee2Smrgfi 892397cf2ee2Smrg]) 89246e7d3316Smrg 892597cf2ee2Smrg# _LT_PATH_CONVERSION_FUNCTIONS 892697cf2ee2Smrg# ----------------------------- 892797cf2ee2Smrg# Determine which file name conversion functions should be used by 892897cf2ee2Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 892997cf2ee2Smrg# for certain cross-compile configurations and native mingw. 893097cf2ee2Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 893197cf2ee2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 893297cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 893397cf2ee2SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 893497cf2ee2SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 893597cf2ee2Smrg[case $host in 893697cf2ee2Smrg *-*-mingw* ) 893797cf2ee2Smrg case $build in 893897cf2ee2Smrg *-*-mingw* ) # actually msys 893997cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 894097cf2ee2Smrg ;; 894197cf2ee2Smrg *-*-cygwin* ) 894297cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 894397cf2ee2Smrg ;; 894497cf2ee2Smrg * ) # otherwise, assume *nix 894597cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 894697cf2ee2Smrg ;; 894797cf2ee2Smrg esac 89486e7d3316Smrg ;; 894997cf2ee2Smrg *-*-cygwin* ) 895097cf2ee2Smrg case $build in 895197cf2ee2Smrg *-*-mingw* ) # actually msys 895297cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 895397cf2ee2Smrg ;; 895497cf2ee2Smrg *-*-cygwin* ) 895597cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 895697cf2ee2Smrg ;; 895797cf2ee2Smrg * ) # otherwise, assume *nix 895897cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 895997cf2ee2Smrg ;; 89606e7d3316Smrg esac 89616e7d3316Smrg ;; 896297cf2ee2Smrg * ) # unhandled hosts (and "normal" native builds) 896397cf2ee2Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 896497cf2ee2Smrg ;; 8965a966c04fSmrgesac 89666e7d3316Smrg]) 896797cf2ee2Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 896897cf2ee2SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 896997cf2ee2Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 897097cf2ee2Smrg [0], [convert $build file names to $host format])dnl 897197cf2ee2Smrg 897297cf2ee2SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 897397cf2ee2SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 897497cf2ee2Smrg[#assume ordinary cross tools, or native build. 897597cf2ee2Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 897697cf2ee2Smrgcase $host in 897797cf2ee2Smrg *-*-mingw* ) 897897cf2ee2Smrg case $build in 897997cf2ee2Smrg *-*-mingw* ) # actually msys 898097cf2ee2Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 898197cf2ee2Smrg ;; 898297cf2ee2Smrg esac 898397cf2ee2Smrg ;; 8984a966c04fSmrgesac 898597cf2ee2Smrg]) 898697cf2ee2Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 898797cf2ee2SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 898897cf2ee2Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 898997cf2ee2Smrg [0], [convert $build files to toolchain format])dnl 899097cf2ee2Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 89916e7d3316Smrg 899297cf2ee2Smrg# Helper functions for option handling. -*- Autoconf -*- 899397cf2ee2Smrg# 899497cf2ee2Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 899597cf2ee2Smrg# Inc. 899697cf2ee2Smrg# Written by Gary V. Vaughan, 2004 899797cf2ee2Smrg# 899897cf2ee2Smrg# This file is free software; the Free Software Foundation gives 899997cf2ee2Smrg# unlimited permission to copy and/or distribute it, with or without 900097cf2ee2Smrg# modifications, as long as this notice is preserved. 90016e7d3316Smrg 900297cf2ee2Smrg# serial 7 ltoptions.m4 9003a966c04fSmrg 900497cf2ee2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 900597cf2ee2SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9006a966c04fSmrg 9007a966c04fSmrg 900897cf2ee2Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 900997cf2ee2Smrg# ------------------------------------------ 901097cf2ee2Smrgm4_define([_LT_MANGLE_OPTION], 901197cf2ee2Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 90126e7d3316Smrg 9013a966c04fSmrg 901497cf2ee2Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 901597cf2ee2Smrg# --------------------------------------- 901697cf2ee2Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 901797cf2ee2Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 901897cf2ee2Smrg# saved as a flag. 901997cf2ee2Smrgm4_define([_LT_SET_OPTION], 902097cf2ee2Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 902197cf2ee2Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 902297cf2ee2Smrg _LT_MANGLE_DEFUN([$1], [$2]), 902397cf2ee2Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 902497cf2ee2Smrg]) 9025a966c04fSmrg 9026a966c04fSmrg 902797cf2ee2Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 902897cf2ee2Smrg# ------------------------------------------------------------ 902997cf2ee2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 903097cf2ee2Smrgm4_define([_LT_IF_OPTION], 903197cf2ee2Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9032a966c04fSmrg 9033a966c04fSmrg 903497cf2ee2Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 903597cf2ee2Smrg# ------------------------------------------------------- 903697cf2ee2Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 903797cf2ee2Smrg# are set. 903897cf2ee2Smrgm4_define([_LT_UNLESS_OPTIONS], 903997cf2ee2Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 904097cf2ee2Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 904197cf2ee2Smrg [m4_define([$0_found])])])[]dnl 904297cf2ee2Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 904397cf2ee2Smrg])[]dnl 904497cf2ee2Smrg]) 904597cf2ee2Smrg 904697cf2ee2Smrg 904797cf2ee2Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 904897cf2ee2Smrg# ---------------------------------------- 904997cf2ee2Smrg# OPTION-LIST is a space-separated list of Libtool options associated 905097cf2ee2Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 905197cf2ee2Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 905297cf2ee2Smrg# the unknown option and exit. 905397cf2ee2Smrgm4_defun([_LT_SET_OPTIONS], 905497cf2ee2Smrg[# Set options 905597cf2ee2Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 905697cf2ee2Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 905797cf2ee2Smrg 905897cf2ee2Smrgm4_if([$1],[LT_INIT],[ 905997cf2ee2Smrg dnl 906097cf2ee2Smrg dnl Simply set some default values (i.e off) if boolean options were not 906197cf2ee2Smrg dnl specified: 906297cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 906397cf2ee2Smrg ]) 906497cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 906597cf2ee2Smrg ]) 906697cf2ee2Smrg dnl 906797cf2ee2Smrg dnl If no reference was made to various pairs of opposing options, then 906897cf2ee2Smrg dnl we run the default mode handler for the pair. For example, if neither 906997cf2ee2Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 907097cf2ee2Smrg dnl archives by default: 907197cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 907297cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 907397cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 907497cf2ee2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 907597cf2ee2Smrg [_LT_ENABLE_FAST_INSTALL]) 907697cf2ee2Smrg ]) 907797cf2ee2Smrg])# _LT_SET_OPTIONS 907897cf2ee2Smrg 9079a966c04fSmrg 90806e7d3316Smrg 908197cf2ee2Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 908297cf2ee2Smrg# ----------------------------------------- 908397cf2ee2Smrgm4_define([_LT_MANGLE_DEFUN], 908497cf2ee2Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 90856e7d3316Smrg 90866e7d3316Smrg 908797cf2ee2Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 908897cf2ee2Smrg# ----------------------------------------------- 908997cf2ee2Smrgm4_define([LT_OPTION_DEFINE], 909097cf2ee2Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 909197cf2ee2Smrg])# LT_OPTION_DEFINE 90926e7d3316Smrg 90936e7d3316Smrg 909497cf2ee2Smrg# dlopen 909597cf2ee2Smrg# ------ 909697cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 909797cf2ee2Smrg]) 9098a966c04fSmrg 909997cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 910097cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 910197cf2ee2SmrgAC_DIAGNOSE([obsolete], 910297cf2ee2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 910397cf2ee2Smrgput the `dlopen' option into LT_INIT's first parameter.]) 910497cf2ee2Smrg]) 9105a966c04fSmrg 910697cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 910797cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9108a966c04fSmrg 91096e7d3316Smrg 911097cf2ee2Smrg# win32-dll 911197cf2ee2Smrg# --------- 911297cf2ee2Smrg# Declare package support for building win32 dll's. 911397cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 911497cf2ee2Smrg[enable_win32_dll=yes 9115a966c04fSmrg 911697cf2ee2Smrgcase $host in 911797cf2ee2Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 911897cf2ee2Smrg AC_CHECK_TOOL(AS, as, false) 911997cf2ee2Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 912097cf2ee2Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 912197cf2ee2Smrg ;; 912297cf2ee2Smrgesac 91236e7d3316Smrg 912497cf2ee2Smrgtest -z "$AS" && AS=as 912597cf2ee2Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 91266e7d3316Smrg 912797cf2ee2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 912897cf2ee2Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 91296e7d3316Smrg 913097cf2ee2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 913197cf2ee2Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 913297cf2ee2Smrg])# win32-dll 9133a966c04fSmrg 913497cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 913597cf2ee2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 913697cf2ee2Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 913797cf2ee2SmrgAC_DIAGNOSE([obsolete], 913897cf2ee2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 913997cf2ee2Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 914097cf2ee2Smrg]) 9141a966c04fSmrg 914297cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 914397cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9144a966c04fSmrg 91456e7d3316Smrg 914697cf2ee2Smrg# _LT_ENABLE_SHARED([DEFAULT]) 914797cf2ee2Smrg# ---------------------------- 914897cf2ee2Smrg# implement the --enable-shared flag, and supports the `shared' and 914997cf2ee2Smrg# `disable-shared' LT_INIT options. 915097cf2ee2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 915197cf2ee2Smrgm4_define([_LT_ENABLE_SHARED], 915297cf2ee2Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 915397cf2ee2SmrgAC_ARG_ENABLE([shared], 915497cf2ee2Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 915597cf2ee2Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 915697cf2ee2Smrg [p=${PACKAGE-default} 915797cf2ee2Smrg case $enableval in 915897cf2ee2Smrg yes) enable_shared=yes ;; 915997cf2ee2Smrg no) enable_shared=no ;; 916097cf2ee2Smrg *) 916197cf2ee2Smrg enable_shared=no 916297cf2ee2Smrg # Look at the argument we got. We use all the common list separators. 916397cf2ee2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 916497cf2ee2Smrg for pkg in $enableval; do 916597cf2ee2Smrg IFS="$lt_save_ifs" 916697cf2ee2Smrg if test "X$pkg" = "X$p"; then 916797cf2ee2Smrg enable_shared=yes 916897cf2ee2Smrg fi 916997cf2ee2Smrg done 917097cf2ee2Smrg IFS="$lt_save_ifs" 917197cf2ee2Smrg ;; 917297cf2ee2Smrg esac], 917397cf2ee2Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 91746e7d3316Smrg 917597cf2ee2Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 917697cf2ee2Smrg [Whether or not to build shared libraries]) 917797cf2ee2Smrg])# _LT_ENABLE_SHARED 91786e7d3316Smrg 917997cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 918097cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 91816e7d3316Smrg 918297cf2ee2Smrg# Old names: 918397cf2ee2SmrgAC_DEFUN([AC_ENABLE_SHARED], 918497cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 918597cf2ee2Smrg]) 91866e7d3316Smrg 918797cf2ee2SmrgAC_DEFUN([AC_DISABLE_SHARED], 918897cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 918997cf2ee2Smrg]) 91906e7d3316Smrg 919197cf2ee2SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 919297cf2ee2SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 91936e7d3316Smrg 919497cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 919597cf2ee2Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 919697cf2ee2Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 91976e7d3316Smrg 91986e7d3316Smrg 91996e7d3316Smrg 920097cf2ee2Smrg# _LT_ENABLE_STATIC([DEFAULT]) 920197cf2ee2Smrg# ---------------------------- 920297cf2ee2Smrg# implement the --enable-static flag, and support the `static' and 920397cf2ee2Smrg# `disable-static' LT_INIT options. 920497cf2ee2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 920597cf2ee2Smrgm4_define([_LT_ENABLE_STATIC], 920697cf2ee2Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 920797cf2ee2SmrgAC_ARG_ENABLE([static], 920897cf2ee2Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 920997cf2ee2Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 921097cf2ee2Smrg [p=${PACKAGE-default} 921197cf2ee2Smrg case $enableval in 921297cf2ee2Smrg yes) enable_static=yes ;; 921397cf2ee2Smrg no) enable_static=no ;; 921497cf2ee2Smrg *) 921597cf2ee2Smrg enable_static=no 921697cf2ee2Smrg # Look at the argument we got. We use all the common list separators. 921797cf2ee2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 921897cf2ee2Smrg for pkg in $enableval; do 921997cf2ee2Smrg IFS="$lt_save_ifs" 922097cf2ee2Smrg if test "X$pkg" = "X$p"; then 922197cf2ee2Smrg enable_static=yes 922297cf2ee2Smrg fi 922397cf2ee2Smrg done 922497cf2ee2Smrg IFS="$lt_save_ifs" 922597cf2ee2Smrg ;; 922697cf2ee2Smrg esac], 922797cf2ee2Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 922897cf2ee2Smrg 922997cf2ee2Smrg _LT_DECL([build_old_libs], [enable_static], [0], 923097cf2ee2Smrg [Whether or not to build static libraries]) 923197cf2ee2Smrg])# _LT_ENABLE_STATIC 923297cf2ee2Smrg 923397cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 923497cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9235a966c04fSmrg 923697cf2ee2Smrg# Old names: 923797cf2ee2SmrgAC_DEFUN([AC_ENABLE_STATIC], 923897cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 923997cf2ee2Smrg]) 9240a966c04fSmrg 924197cf2ee2SmrgAC_DEFUN([AC_DISABLE_STATIC], 924297cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 924397cf2ee2Smrg]) 9244a966c04fSmrg 924597cf2ee2SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 924697cf2ee2SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9247a966c04fSmrg 924897cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 924997cf2ee2Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 925097cf2ee2Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9251a966c04fSmrg 9252a966c04fSmrg 9253a966c04fSmrg 925497cf2ee2Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 925597cf2ee2Smrg# ---------------------------------- 925697cf2ee2Smrg# implement the --enable-fast-install flag, and support the `fast-install' 925797cf2ee2Smrg# and `disable-fast-install' LT_INIT options. 925897cf2ee2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 925997cf2ee2Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 926097cf2ee2Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 926197cf2ee2SmrgAC_ARG_ENABLE([fast-install], 926297cf2ee2Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 926397cf2ee2Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 926497cf2ee2Smrg [p=${PACKAGE-default} 926597cf2ee2Smrg case $enableval in 926697cf2ee2Smrg yes) enable_fast_install=yes ;; 926797cf2ee2Smrg no) enable_fast_install=no ;; 926897cf2ee2Smrg *) 926997cf2ee2Smrg enable_fast_install=no 927097cf2ee2Smrg # Look at the argument we got. We use all the common list separators. 927197cf2ee2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 927297cf2ee2Smrg for pkg in $enableval; do 927397cf2ee2Smrg IFS="$lt_save_ifs" 927497cf2ee2Smrg if test "X$pkg" = "X$p"; then 927597cf2ee2Smrg enable_fast_install=yes 927697cf2ee2Smrg fi 927797cf2ee2Smrg done 927897cf2ee2Smrg IFS="$lt_save_ifs" 927997cf2ee2Smrg ;; 928097cf2ee2Smrg esac], 928197cf2ee2Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9282a966c04fSmrg 928397cf2ee2Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 928497cf2ee2Smrg [Whether or not to optimize for fast installation])dnl 928597cf2ee2Smrg])# _LT_ENABLE_FAST_INSTALL 9286a966c04fSmrg 928797cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 928897cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9289a966c04fSmrg 929097cf2ee2Smrg# Old names: 929197cf2ee2SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 929297cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 929397cf2ee2SmrgAC_DIAGNOSE([obsolete], 929497cf2ee2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 929597cf2ee2Smrgthe `fast-install' option into LT_INIT's first parameter.]) 929697cf2ee2Smrg]) 92976e7d3316Smrg 929897cf2ee2SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 929997cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 930097cf2ee2SmrgAC_DIAGNOSE([obsolete], 930197cf2ee2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 930297cf2ee2Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 930397cf2ee2Smrg]) 93046e7d3316Smrg 930597cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 930697cf2ee2Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 930797cf2ee2Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 93086e7d3316Smrg 93096e7d3316Smrg 931097cf2ee2Smrg# _LT_WITH_PIC([MODE]) 931197cf2ee2Smrg# -------------------- 931297cf2ee2Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 931397cf2ee2Smrg# LT_INIT options. 931497cf2ee2Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 931597cf2ee2Smrgm4_define([_LT_WITH_PIC], 931697cf2ee2Smrg[AC_ARG_WITH([pic], 931797cf2ee2Smrg [AS_HELP_STRING([--with-pic], 931897cf2ee2Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 931997cf2ee2Smrg [pic_mode="$withval"], 932097cf2ee2Smrg [pic_mode=default]) 93216e7d3316Smrg 932297cf2ee2Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 93236e7d3316Smrg 932497cf2ee2Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 932597cf2ee2Smrg])# _LT_WITH_PIC 9326a966c04fSmrg 932797cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 932897cf2ee2SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9329a966c04fSmrg 933097cf2ee2Smrg# Old name: 933197cf2ee2SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 933297cf2ee2Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 933397cf2ee2SmrgAC_DIAGNOSE([obsolete], 933497cf2ee2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 933597cf2ee2Smrgput the `pic-only' option into LT_INIT's first parameter.]) 933697cf2ee2Smrg]) 9337a966c04fSmrg 933897cf2ee2Smrgdnl aclocal-1.4 backwards compatibility: 933997cf2ee2Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9340a966c04fSmrg 9341a966c04fSmrg 934297cf2ee2Smrgm4_define([_LTDL_MODE], []) 934397cf2ee2SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 934497cf2ee2Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 934597cf2ee2SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 934697cf2ee2Smrg [m4_define([_LTDL_MODE], [recursive])]) 934797cf2ee2SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 934897cf2ee2Smrg [m4_define([_LTDL_MODE], [subproject])]) 9349a966c04fSmrg 935097cf2ee2Smrgm4_define([_LTDL_TYPE], []) 935197cf2ee2SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 935297cf2ee2Smrg [m4_define([_LTDL_TYPE], [installable])]) 935397cf2ee2SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 935497cf2ee2Smrg [m4_define([_LTDL_TYPE], [convenience])]) 9355a966c04fSmrg 935697cf2ee2Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 935797cf2ee2Smrg# 935897cf2ee2Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 935997cf2ee2Smrg# Written by Gary V. Vaughan, 2004 936097cf2ee2Smrg# 936197cf2ee2Smrg# This file is free software; the Free Software Foundation gives 936297cf2ee2Smrg# unlimited permission to copy and/or distribute it, with or without 936397cf2ee2Smrg# modifications, as long as this notice is preserved. 93642e2dd055Smrg 936597cf2ee2Smrg# serial 6 ltsugar.m4 9366a966c04fSmrg 936797cf2ee2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 936897cf2ee2SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9369a966c04fSmrg 9370a966c04fSmrg 937197cf2ee2Smrg# lt_join(SEP, ARG1, [ARG2...]) 937297cf2ee2Smrg# ----------------------------- 937397cf2ee2Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 937497cf2ee2Smrg# associated separator. 937597cf2ee2Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 937697cf2ee2Smrg# versions in m4sugar had bugs. 937797cf2ee2Smrgm4_define([lt_join], 937897cf2ee2Smrg[m4_if([$#], [1], [], 937997cf2ee2Smrg [$#], [2], [[$2]], 938097cf2ee2Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 938197cf2ee2Smrgm4_define([_lt_join], 938297cf2ee2Smrg[m4_if([$#$2], [2], [], 938397cf2ee2Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9384a966c04fSmrg 9385a966c04fSmrg 938697cf2ee2Smrg# lt_car(LIST) 938797cf2ee2Smrg# lt_cdr(LIST) 938897cf2ee2Smrg# ------------ 938997cf2ee2Smrg# Manipulate m4 lists. 939097cf2ee2Smrg# These macros are necessary as long as will still need to support 939197cf2ee2Smrg# Autoconf-2.59 which quotes differently. 939297cf2ee2Smrgm4_define([lt_car], [[$1]]) 939397cf2ee2Smrgm4_define([lt_cdr], 939497cf2ee2Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 939597cf2ee2Smrg [$#], 1, [], 939697cf2ee2Smrg [m4_dquote(m4_shift($@))])]) 939797cf2ee2Smrgm4_define([lt_unquote], $1) 9398a966c04fSmrg 9399a966c04fSmrg 940097cf2ee2Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 940197cf2ee2Smrg# ------------------------------------------ 940297cf2ee2Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 940397cf2ee2Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 940497cf2ee2Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 940597cf2ee2Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 940697cf2ee2Smrg# than defined and empty). 940797cf2ee2Smrg# 940897cf2ee2Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 940997cf2ee2Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 941097cf2ee2Smrgm4_define([lt_append], 941197cf2ee2Smrg[m4_define([$1], 941297cf2ee2Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 94136e7d3316Smrg 9414a966c04fSmrg 9415a966c04fSmrg 941697cf2ee2Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 941797cf2ee2Smrg# ---------------------------------------------------------- 941897cf2ee2Smrg# Produce a SEP delimited list of all paired combinations of elements of 941997cf2ee2Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 942097cf2ee2Smrg# has the form PREFIXmINFIXSUFFIXn. 942197cf2ee2Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 942297cf2ee2Smrgm4_define([lt_combine], 942397cf2ee2Smrg[m4_if(m4_eval([$# > 3]), [1], 942497cf2ee2Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 942597cf2ee2Smrg[[m4_foreach([_Lt_prefix], [$2], 942697cf2ee2Smrg [m4_foreach([_Lt_suffix], 942797cf2ee2Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 942897cf2ee2Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 94296e7d3316Smrg 9430a966c04fSmrg 943197cf2ee2Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 943297cf2ee2Smrg# ----------------------------------------------------------------------- 943397cf2ee2Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 943497cf2ee2Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 943597cf2ee2Smrgm4_define([lt_if_append_uniq], 943697cf2ee2Smrg[m4_ifdef([$1], 943797cf2ee2Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 943897cf2ee2Smrg [lt_append([$1], [$2], [$3])$4], 943997cf2ee2Smrg [$5])], 944097cf2ee2Smrg [lt_append([$1], [$2], [$3])$4])]) 9441a966c04fSmrg 94426e7d3316Smrg 944397cf2ee2Smrg# lt_dict_add(DICT, KEY, VALUE) 944497cf2ee2Smrg# ----------------------------- 944597cf2ee2Smrgm4_define([lt_dict_add], 944697cf2ee2Smrg[m4_define([$1($2)], [$3])]) 94476e7d3316Smrg 94486e7d3316Smrg 944997cf2ee2Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 945097cf2ee2Smrg# -------------------------------------------- 945197cf2ee2Smrgm4_define([lt_dict_add_subkey], 945297cf2ee2Smrg[m4_define([$1($2:$3)], [$4])]) 94536e7d3316Smrg 94546e7d3316Smrg 945597cf2ee2Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 945697cf2ee2Smrg# ---------------------------------- 945797cf2ee2Smrgm4_define([lt_dict_fetch], 945897cf2ee2Smrg[m4_ifval([$3], 945997cf2ee2Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 946097cf2ee2Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 94616e7d3316Smrg 94626e7d3316Smrg 946397cf2ee2Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 946497cf2ee2Smrg# ----------------------------------------------------------------- 946597cf2ee2Smrgm4_define([lt_if_dict_fetch], 946697cf2ee2Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 946797cf2ee2Smrg [$5], 946897cf2ee2Smrg [$6])]) 94696e7d3316Smrg 94706e7d3316Smrg 947197cf2ee2Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 947297cf2ee2Smrg# -------------------------------------------------------------- 947397cf2ee2Smrgm4_define([lt_dict_filter], 947497cf2ee2Smrg[m4_if([$5], [], [], 947597cf2ee2Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 947697cf2ee2Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 947797cf2ee2Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 947897cf2ee2Smrg]) 94796e7d3316Smrg 948097cf2ee2Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 948197cf2ee2Smrg# 948297cf2ee2Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 948397cf2ee2Smrg# Written by Scott James Remnant, 2004 948497cf2ee2Smrg# 948597cf2ee2Smrg# This file is free software; the Free Software Foundation gives 948697cf2ee2Smrg# unlimited permission to copy and/or distribute it, with or without 948797cf2ee2Smrg# modifications, as long as this notice is preserved. 94886e7d3316Smrg 948997cf2ee2Smrg# @configure_input@ 94906e7d3316Smrg 949197cf2ee2Smrg# serial 3293 ltversion.m4 949297cf2ee2Smrg# This file is part of GNU Libtool 94936e7d3316Smrg 949497cf2ee2Smrgm4_define([LT_PACKAGE_VERSION], [2.4]) 949597cf2ee2Smrgm4_define([LT_PACKAGE_REVISION], [1.3293]) 94966e7d3316Smrg 949797cf2ee2SmrgAC_DEFUN([LTVERSION_VERSION], 949897cf2ee2Smrg[macro_version='2.4' 949997cf2ee2Smrgmacro_revision='1.3293' 950097cf2ee2Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 950197cf2ee2Smrg_LT_DECL(, macro_revision, 0) 950297cf2ee2Smrg]) 9503a966c04fSmrg 950497cf2ee2Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 950597cf2ee2Smrg# 950697cf2ee2Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 950797cf2ee2Smrg# Written by Scott James Remnant, 2004. 950897cf2ee2Smrg# 950997cf2ee2Smrg# This file is free software; the Free Software Foundation gives 951097cf2ee2Smrg# unlimited permission to copy and/or distribute it, with or without 951197cf2ee2Smrg# modifications, as long as this notice is preserved. 95126e7d3316Smrg 951397cf2ee2Smrg# serial 5 lt~obsolete.m4 95146e7d3316Smrg 951597cf2ee2Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 951697cf2ee2Smrg# 951797cf2ee2Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 951897cf2ee2Smrg# which have later been changed to m4_define as they aren't part of the 951997cf2ee2Smrg# exported API, or moved to Autoconf or Automake where they belong. 952097cf2ee2Smrg# 952197cf2ee2Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 952297cf2ee2Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 952397cf2ee2Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 952497cf2ee2Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 952597cf2ee2Smrg# and doesn't know about Autoconf macros at all.) 952697cf2ee2Smrg# 952797cf2ee2Smrg# So we provide this file, which has a silly filename so it's always 952897cf2ee2Smrg# included after everything else. This provides aclocal with the 952997cf2ee2Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 953097cf2ee2Smrg# because those macros already exist, or will be overwritten later. 953197cf2ee2Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 953297cf2ee2Smrg# 953397cf2ee2Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 953497cf2ee2Smrg# Yes, that means every name once taken will need to remain here until 953597cf2ee2Smrg# we give up compatibility with versions before 1.7, at which point 953697cf2ee2Smrg# we need to keep only those names which we still refer to. 9537a966c04fSmrg 953897cf2ee2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 953997cf2ee2SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9540a966c04fSmrg 954197cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 954297cf2ee2Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 954397cf2ee2Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 954497cf2ee2Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 954597cf2ee2Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 954697cf2ee2Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 954797cf2ee2Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 954897cf2ee2Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 954997cf2ee2Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 955097cf2ee2Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 955197cf2ee2Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 955297cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 955397cf2ee2Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 955497cf2ee2Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 955597cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 955697cf2ee2Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 955797cf2ee2Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 955897cf2ee2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 955997cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 956097cf2ee2Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 956197cf2ee2Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 956297cf2ee2Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 956397cf2ee2Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 956497cf2ee2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 956597cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 956697cf2ee2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 956797cf2ee2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 956897cf2ee2Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 956997cf2ee2Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 957097cf2ee2Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 957197cf2ee2Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 957297cf2ee2Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 957397cf2ee2Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 957497cf2ee2Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 957597cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 957697cf2ee2Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 957797cf2ee2Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 957897cf2ee2Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 957997cf2ee2Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 958097cf2ee2Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 958197cf2ee2Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 958297cf2ee2Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 958397cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 958497cf2ee2Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 958597cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 958697cf2ee2Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 958797cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 958897cf2ee2Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 958997cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 959097cf2ee2Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 959197cf2ee2Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 959297cf2ee2Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 959397cf2ee2Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 959497cf2ee2Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 959597cf2ee2Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 959697cf2ee2Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 959797cf2ee2Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 959897cf2ee2Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 959997cf2ee2Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 960097cf2ee2Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 960197cf2ee2Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9602a966c04fSmrg 960397cf2ee2Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 960497cf2ee2Smrgdnl 960597cf2ee2Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 960697cf2ee2Smrgdnl 960797cf2ee2Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 960897cf2ee2Smrgdnl copy of this software and associated documentation files (the "Software"), 960997cf2ee2Smrgdnl to deal in the Software without restriction, including without limitation 961097cf2ee2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 961197cf2ee2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 961297cf2ee2Smrgdnl Software is furnished to do so, subject to the following conditions: 961397cf2ee2Smrgdnl 961497cf2ee2Smrgdnl The above copyright notice and this permission notice (including the next 961597cf2ee2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 961697cf2ee2Smrgdnl Software. 961797cf2ee2Smrgdnl 961897cf2ee2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 961997cf2ee2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 962097cf2ee2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 962197cf2ee2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 962297cf2ee2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 962397cf2ee2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 962497cf2ee2Smrgdnl DEALINGS IN THE SOFTWARE. 9625a966c04fSmrg 962697cf2ee2Smrg# XORG_MACROS_VERSION(required-version) 962797cf2ee2Smrg# ------------------------------------- 962897cf2ee2Smrg# Minimum version: 1.1.0 962997cf2ee2Smrg# 963097cf2ee2Smrg# If you're using a macro added in Version 1.1 or newer, include this in 963197cf2ee2Smrg# your configure.ac with the minimum required version, such as: 963297cf2ee2Smrg# XORG_MACROS_VERSION(1.1) 963397cf2ee2Smrg# 963497cf2ee2Smrg# To ensure that this macro is defined, also add: 963597cf2ee2Smrg# m4_ifndef([XORG_MACROS_VERSION], 963697cf2ee2Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 963797cf2ee2Smrg# 963897cf2ee2Smrg# 963997cf2ee2Smrg# See the "minimum version" comment for each macro you use to see what 964097cf2ee2Smrg# version you require. 964197cf2ee2Smrgm4_defun([XORG_MACROS_VERSION],[ 964297cf2ee2Smrgm4_define([vers_have], [1.16.2]) 964397cf2ee2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 964497cf2ee2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 964597cf2ee2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 964697cf2ee2Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 964797cf2ee2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 964897cf2ee2Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 964997cf2ee2Smrgm4_undefine([vers_have]) 965097cf2ee2Smrgm4_undefine([maj_have]) 965197cf2ee2Smrgm4_undefine([maj_needed]) 965297cf2ee2Smrg]) # XORG_MACROS_VERSION 9653a966c04fSmrg 965497cf2ee2Smrg# XORG_PROG_RAWCPP() 965597cf2ee2Smrg# ------------------ 965697cf2ee2Smrg# Minimum version: 1.0.0 965797cf2ee2Smrg# 965897cf2ee2Smrg# Find cpp program and necessary flags for use in pre-processing text files 965997cf2ee2Smrg# such as man pages and config files 966097cf2ee2SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 966197cf2ee2SmrgAC_REQUIRE([AC_PROG_CPP]) 966297cf2ee2SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 966397cf2ee2Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9664a966c04fSmrg 966597cf2ee2Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 966697cf2ee2Smrg# which is not the best choice for supporting other OS'es, but covers most 966797cf2ee2Smrg# of the ones we need for now. 966897cf2ee2SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 966997cf2ee2SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 967097cf2ee2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 967197cf2ee2Smrg AC_MSG_RESULT([no]) 967297cf2ee2Smrgelse 967397cf2ee2Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 967497cf2ee2Smrg RAWCPPFLAGS=-undef 967597cf2ee2Smrg AC_MSG_RESULT([yes]) 967697cf2ee2Smrg # under Cygwin unix is still defined even with -undef 967797cf2ee2Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 967897cf2ee2Smrg RAWCPPFLAGS="-undef -ansi" 967997cf2ee2Smrg AC_MSG_RESULT([yes, with -ansi]) 968097cf2ee2Smrg else 968197cf2ee2Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 968297cf2ee2Smrg fi 968397cf2ee2Smrgfi 968497cf2ee2Smrgrm -f conftest.$ac_ext 9685a966c04fSmrg 968697cf2ee2SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 968797cf2ee2SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 968897cf2ee2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 968997cf2ee2Smrg AC_MSG_RESULT([no]) 969097cf2ee2Smrgelse 969197cf2ee2Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 969297cf2ee2Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 969397cf2ee2Smrg AC_MSG_RESULT([yes]) 969497cf2ee2Smrg else 969597cf2ee2Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 969697cf2ee2Smrg fi 969797cf2ee2Smrgfi 969897cf2ee2Smrgrm -f conftest.$ac_ext 969997cf2ee2SmrgAC_SUBST(RAWCPPFLAGS) 970097cf2ee2Smrg]) # XORG_PROG_RAWCPP 97016e7d3316Smrg 970297cf2ee2Smrg# XORG_MANPAGE_SECTIONS() 970397cf2ee2Smrg# ----------------------- 970497cf2ee2Smrg# Minimum version: 1.0.0 970597cf2ee2Smrg# 970697cf2ee2Smrg# Determine which sections man pages go in for the different man page types 970797cf2ee2Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 970897cf2ee2Smrg# Not sure if there's any better way than just hardcoding by OS name. 970997cf2ee2Smrg# Override default settings by setting environment variables 971097cf2ee2Smrg# Added MAN_SUBSTS in version 1.8 971197cf2ee2Smrg# Added AC_PROG_SED in version 1.8 9712a966c04fSmrg 971397cf2ee2SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 971497cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 971597cf2ee2SmrgAC_REQUIRE([AC_PROG_SED]) 9716a966c04fSmrg 971797cf2ee2Smrgif test x$APP_MAN_SUFFIX = x ; then 971897cf2ee2Smrg APP_MAN_SUFFIX=1 971997cf2ee2Smrgfi 972097cf2ee2Smrgif test x$APP_MAN_DIR = x ; then 972197cf2ee2Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 972297cf2ee2Smrgfi 9723a966c04fSmrg 972497cf2ee2Smrgif test x$LIB_MAN_SUFFIX = x ; then 972597cf2ee2Smrg LIB_MAN_SUFFIX=3 972697cf2ee2Smrgfi 972797cf2ee2Smrgif test x$LIB_MAN_DIR = x ; then 972897cf2ee2Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 972997cf2ee2Smrgfi 9730a966c04fSmrg 973197cf2ee2Smrgif test x$FILE_MAN_SUFFIX = x ; then 973297cf2ee2Smrg case $host_os in 973397cf2ee2Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 973497cf2ee2Smrg *) FILE_MAN_SUFFIX=5 ;; 973597cf2ee2Smrg esac 973697cf2ee2Smrgfi 973797cf2ee2Smrgif test x$FILE_MAN_DIR = x ; then 973897cf2ee2Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 973997cf2ee2Smrgfi 9740a966c04fSmrg 974197cf2ee2Smrgif test x$MISC_MAN_SUFFIX = x ; then 974297cf2ee2Smrg case $host_os in 974397cf2ee2Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 974497cf2ee2Smrg *) MISC_MAN_SUFFIX=7 ;; 974597cf2ee2Smrg esac 974697cf2ee2Smrgfi 974797cf2ee2Smrgif test x$MISC_MAN_DIR = x ; then 974897cf2ee2Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 974997cf2ee2Smrgfi 9750a966c04fSmrg 975197cf2ee2Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 975297cf2ee2Smrg case $host_os in 975397cf2ee2Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 975497cf2ee2Smrg *) DRIVER_MAN_SUFFIX=4 ;; 975597cf2ee2Smrg esac 975697cf2ee2Smrgfi 975797cf2ee2Smrgif test x$DRIVER_MAN_DIR = x ; then 975897cf2ee2Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 975997cf2ee2Smrgfi 9760a966c04fSmrg 976197cf2ee2Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 976297cf2ee2Smrg case $host_os in 976397cf2ee2Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 976497cf2ee2Smrg *) ADMIN_MAN_SUFFIX=8 ;; 976597cf2ee2Smrg esac 976697cf2ee2Smrgfi 976797cf2ee2Smrgif test x$ADMIN_MAN_DIR = x ; then 976897cf2ee2Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 976997cf2ee2Smrgfi 9770a966c04fSmrg 9771a966c04fSmrg 977297cf2ee2SmrgAC_SUBST([APP_MAN_SUFFIX]) 977397cf2ee2SmrgAC_SUBST([LIB_MAN_SUFFIX]) 977497cf2ee2SmrgAC_SUBST([FILE_MAN_SUFFIX]) 977597cf2ee2SmrgAC_SUBST([MISC_MAN_SUFFIX]) 977697cf2ee2SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 977797cf2ee2SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 977897cf2ee2SmrgAC_SUBST([APP_MAN_DIR]) 977997cf2ee2SmrgAC_SUBST([LIB_MAN_DIR]) 978097cf2ee2SmrgAC_SUBST([FILE_MAN_DIR]) 978197cf2ee2SmrgAC_SUBST([MISC_MAN_DIR]) 978297cf2ee2SmrgAC_SUBST([DRIVER_MAN_DIR]) 978397cf2ee2SmrgAC_SUBST([ADMIN_MAN_DIR]) 97846e7d3316Smrg 978597cf2ee2SmrgXORG_MAN_PAGE="X Version 11" 978697cf2ee2SmrgAC_SUBST([XORG_MAN_PAGE]) 978797cf2ee2SmrgMAN_SUBSTS="\ 978897cf2ee2Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 978997cf2ee2Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 979097cf2ee2Smrg -e 's|__xservername__|Xorg|g' \ 979197cf2ee2Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 979297cf2ee2Smrg -e 's|__projectroot__|\$(prefix)|g' \ 979397cf2ee2Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 979497cf2ee2Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 979597cf2ee2Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 979697cf2ee2Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 979797cf2ee2Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 979897cf2ee2Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 979997cf2ee2Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 980097cf2ee2SmrgAC_SUBST([MAN_SUBSTS]) 9801a966c04fSmrg 980297cf2ee2Smrg]) # XORG_MANPAGE_SECTIONS 9803a966c04fSmrg 980497cf2ee2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 980597cf2ee2Smrg# ------------------------ 980697cf2ee2Smrg# Minimum version: 1.7.0 98076e7d3316Smrg# 980897cf2ee2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 980997cf2ee2Smrg# provided by xorg-sgml-doctools, if installed. 981097cf2ee2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 981197cf2ee2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 981297cf2ee2SmrgXORG_SGML_PATH= 981397cf2ee2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 981497cf2ee2Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 981597cf2ee2Smrg [m4_ifval([$1],[:], 981697cf2ee2Smrg [if test x"$cross_compiling" != x"yes" ; then 981797cf2ee2Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 981897cf2ee2Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 981997cf2ee2Smrg fi]) 982097cf2ee2Smrg ]) 9821a966c04fSmrg 982297cf2ee2Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 982397cf2ee2Smrg# the path and the name of the doc stylesheet 982497cf2ee2Smrgif test "x$XORG_SGML_PATH" != "x" ; then 982597cf2ee2Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 982697cf2ee2Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 982797cf2ee2Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 982897cf2ee2Smrgelse 982997cf2ee2Smrg AC_MSG_RESULT([no]) 983097cf2ee2Smrgfi 9831a966c04fSmrg 983297cf2ee2SmrgAC_SUBST(XORG_SGML_PATH) 983397cf2ee2SmrgAC_SUBST(STYLESHEET_SRCDIR) 983497cf2ee2SmrgAC_SUBST(XSL_STYLESHEET) 983597cf2ee2SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 983697cf2ee2Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9837a966c04fSmrg 983897cf2ee2Smrg# XORG_CHECK_LINUXDOC 983997cf2ee2Smrg# ------------------- 984097cf2ee2Smrg# Minimum version: 1.0.0 984197cf2ee2Smrg# 984297cf2ee2Smrg# Defines the variable MAKE_TEXT if the necessary tools and 984397cf2ee2Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 984497cf2ee2Smrg# Whether or not the necessary tools and files are found can be checked 984597cf2ee2Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 984697cf2ee2SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 984797cf2ee2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 984897cf2ee2SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9849a966c04fSmrg 985097cf2ee2SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9851a966c04fSmrg 985297cf2ee2SmrgAC_MSG_CHECKING([whether to build documentation]) 9853a966c04fSmrg 985497cf2ee2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 985597cf2ee2Smrg BUILDDOC=yes 985697cf2ee2Smrgelse 985797cf2ee2Smrg BUILDDOC=no 985897cf2ee2Smrgfi 9859a966c04fSmrg 986097cf2ee2SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 98616e7d3316Smrg 986297cf2ee2SmrgAC_MSG_RESULT([$BUILDDOC]) 98636e7d3316Smrg 986497cf2ee2SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9865a966c04fSmrg 986697cf2ee2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 986797cf2ee2Smrg BUILDPDFDOC=yes 986897cf2ee2Smrgelse 986997cf2ee2Smrg BUILDPDFDOC=no 987097cf2ee2Smrgfi 9871a966c04fSmrg 987297cf2ee2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 98736e7d3316Smrg 987497cf2ee2SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 98756e7d3316Smrg 987697cf2ee2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 987797cf2ee2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 987897cf2ee2SmrgMAKE_PDF="$PS2PDF" 987997cf2ee2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 98806e7d3316Smrg 988197cf2ee2SmrgAC_SUBST(MAKE_TEXT) 988297cf2ee2SmrgAC_SUBST(MAKE_PS) 988397cf2ee2SmrgAC_SUBST(MAKE_PDF) 988497cf2ee2SmrgAC_SUBST(MAKE_HTML) 988597cf2ee2Smrg]) # XORG_CHECK_LINUXDOC 98866e7d3316Smrg 988797cf2ee2Smrg# XORG_CHECK_DOCBOOK 988897cf2ee2Smrg# ------------------- 988997cf2ee2Smrg# Minimum version: 1.0.0 989097cf2ee2Smrg# 989197cf2ee2Smrg# Checks for the ability to build output formats from SGML DocBook source. 989297cf2ee2Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 989397cf2ee2Smrg# indicates whether the necessary tools and files are found and, if set, 989497cf2ee2Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 989597cf2ee2SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 989697cf2ee2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9897a966c04fSmrg 989897cf2ee2SmrgBUILDTXTDOC=no 989997cf2ee2SmrgBUILDPDFDOC=no 990097cf2ee2SmrgBUILDPSDOC=no 990197cf2ee2SmrgBUILDHTMLDOC=no 9902a966c04fSmrg 990397cf2ee2SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 990497cf2ee2SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 990597cf2ee2SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 990697cf2ee2SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9907a966c04fSmrg 990897cf2ee2SmrgAC_MSG_CHECKING([whether to build text documentation]) 990997cf2ee2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 991097cf2ee2Smrg test x$BUILD_TXTDOC != xno; then 991197cf2ee2Smrg BUILDTXTDOC=yes 991297cf2ee2Smrgfi 991397cf2ee2SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 991497cf2ee2SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9915a966c04fSmrg 991697cf2ee2SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 991797cf2ee2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 991897cf2ee2Smrg test x$BUILD_PDFDOC != xno; then 991997cf2ee2Smrg BUILDPDFDOC=yes 992097cf2ee2Smrgfi 992197cf2ee2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 992297cf2ee2SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9923a966c04fSmrg 992497cf2ee2SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 992597cf2ee2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 992697cf2ee2Smrg test x$BUILD_PSDOC != xno; then 992797cf2ee2Smrg BUILDPSDOC=yes 992897cf2ee2Smrgfi 992997cf2ee2SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 993097cf2ee2SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9931a966c04fSmrg 993297cf2ee2SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 993397cf2ee2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 993497cf2ee2Smrg test x$BUILD_HTMLDOC != xno; then 993597cf2ee2Smrg BUILDHTMLDOC=yes 993697cf2ee2Smrgfi 993797cf2ee2SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 993897cf2ee2SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9939a966c04fSmrg 994097cf2ee2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 994197cf2ee2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 994297cf2ee2SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 994397cf2ee2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9944a966c04fSmrg 994597cf2ee2SmrgAC_SUBST(MAKE_TEXT) 994697cf2ee2SmrgAC_SUBST(MAKE_PS) 994797cf2ee2SmrgAC_SUBST(MAKE_PDF) 994897cf2ee2SmrgAC_SUBST(MAKE_HTML) 994997cf2ee2Smrg]) # XORG_CHECK_DOCBOOK 9950a966c04fSmrg 995197cf2ee2Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 995297cf2ee2Smrg# ---------------- 995397cf2ee2Smrg# Minimum version: 1.5.0 995497cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 995597cf2ee2Smrg# 995697cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 995797cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 995897cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 995997cf2ee2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 996097cf2ee2Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 996197cf2ee2Smrg# --with-xmlto assumes 'auto'. 996297cf2ee2Smrg# 996397cf2ee2Smrg# Interface to module: 996497cf2ee2Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 996597cf2ee2Smrg# XMLTO: returns the path of the xmlto program found 996697cf2ee2Smrg# returns the path set by the user in the environment 996797cf2ee2Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 996897cf2ee2Smrg# 'no' user instructs the module not to use xmlto 996997cf2ee2Smrg# 997097cf2ee2Smrg# Added in version 1.10.0 997197cf2ee2Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 997297cf2ee2Smrg# xmlto for text output requires either lynx, links, or w3m browsers 997397cf2ee2Smrg# 997497cf2ee2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 997597cf2ee2Smrg# 997697cf2ee2SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 997797cf2ee2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 997897cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 997997cf2ee2SmrgAC_ARG_WITH(xmlto, 998097cf2ee2Smrg AS_HELP_STRING([--with-xmlto], 998197cf2ee2Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 998297cf2ee2Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 998397cf2ee2Smrgm4_undefine([_defopt]) 9984a966c04fSmrg 998597cf2ee2Smrgif test "x$use_xmlto" = x"auto"; then 998697cf2ee2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 998797cf2ee2Smrg if test "x$XMLTO" = "x"; then 998897cf2ee2Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 998997cf2ee2Smrg have_xmlto=no 999097cf2ee2Smrg else 999197cf2ee2Smrg have_xmlto=yes 999297cf2ee2Smrg fi 999397cf2ee2Smrgelif test "x$use_xmlto" = x"yes" ; then 999497cf2ee2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 999597cf2ee2Smrg if test "x$XMLTO" = "x"; then 999697cf2ee2Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 999797cf2ee2Smrg fi 999897cf2ee2Smrg have_xmlto=yes 999997cf2ee2Smrgelif test "x$use_xmlto" = x"no" ; then 1000097cf2ee2Smrg if test "x$XMLTO" != "x"; then 1000197cf2ee2Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1000297cf2ee2Smrg fi 1000397cf2ee2Smrg have_xmlto=no 1000497cf2ee2Smrgelse 1000597cf2ee2Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1000697cf2ee2Smrgfi 10007a966c04fSmrg 1000897cf2ee2Smrg# Test for a minimum version of xmlto, if provided. 1000997cf2ee2Smrgm4_ifval([$1], 1001097cf2ee2Smrg[if test "$have_xmlto" = yes; then 1001197cf2ee2Smrg # scrape the xmlto version 1001297cf2ee2Smrg AC_MSG_CHECKING([the xmlto version]) 1001397cf2ee2Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1001497cf2ee2Smrg AC_MSG_RESULT([$xmlto_version]) 1001597cf2ee2Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1001697cf2ee2Smrg [if test "x$use_xmlto" = xauto; then 1001797cf2ee2Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1001897cf2ee2Smrg have_xmlto=no 1001997cf2ee2Smrg else 1002097cf2ee2Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1002197cf2ee2Smrg fi]) 1002297cf2ee2Smrgfi]) 10023a966c04fSmrg 1002497cf2ee2Smrg# Test for the ability of xmlto to generate a text target 1002597cf2ee2Smrghave_xmlto_text=no 1002697cf2ee2Smrgcat > conftest.xml << "EOF" 1002797cf2ee2SmrgEOF 1002897cf2ee2SmrgAS_IF([test "$have_xmlto" = yes], 1002997cf2ee2Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1003097cf2ee2Smrg [have_xmlto_text=yes], 1003197cf2ee2Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1003297cf2ee2Smrgrm -f conftest.xml 1003397cf2ee2SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1003497cf2ee2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1003597cf2ee2Smrg]) # XORG_WITH_XMLTO 10036a966c04fSmrg 1003797cf2ee2Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1003897cf2ee2Smrg# -------------------------------------------- 1003997cf2ee2Smrg# Minimum version: 1.12.0 1004097cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1004197cf2ee2Smrg# 1004297cf2ee2Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1004397cf2ee2Smrg# XML-based language used for the transformation of XML documents. 1004497cf2ee2Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1004597cf2ee2Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1004697cf2ee2Smrg# The XSLT processor is often used as a standalone tool for transformations. 1004797cf2ee2Smrg# It should not be assumed that this tool is used only to work with documnetation. 1004897cf2ee2Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1004997cf2ee2Smrg# 1005097cf2ee2Smrg# Interface to module: 1005197cf2ee2Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1005297cf2ee2Smrg# XSLTPROC: returns the path of the xsltproc program found 1005397cf2ee2Smrg# returns the path set by the user in the environment 1005497cf2ee2Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1005597cf2ee2Smrg# 'no' user instructs the module not to use xsltproc 1005697cf2ee2Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1005797cf2ee2Smrg# 1005897cf2ee2Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1005997cf2ee2Smrg# 1006097cf2ee2SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1006197cf2ee2SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1006297cf2ee2Smrg# Preserves the interface, should it be implemented later 1006397cf2ee2Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1006497cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1006597cf2ee2SmrgAC_ARG_WITH(xsltproc, 1006697cf2ee2Smrg AS_HELP_STRING([--with-xsltproc], 1006797cf2ee2Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1006897cf2ee2Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1006997cf2ee2Smrgm4_undefine([_defopt]) 10070a966c04fSmrg 1007197cf2ee2Smrgif test "x$use_xsltproc" = x"auto"; then 1007297cf2ee2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1007397cf2ee2Smrg if test "x$XSLTPROC" = "x"; then 1007497cf2ee2Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1007597cf2ee2Smrg have_xsltproc=no 1007697cf2ee2Smrg else 1007797cf2ee2Smrg have_xsltproc=yes 1007897cf2ee2Smrg fi 1007997cf2ee2Smrgelif test "x$use_xsltproc" = x"yes" ; then 1008097cf2ee2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1008197cf2ee2Smrg if test "x$XSLTPROC" = "x"; then 1008297cf2ee2Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1008397cf2ee2Smrg fi 1008497cf2ee2Smrg have_xsltproc=yes 1008597cf2ee2Smrgelif test "x$use_xsltproc" = x"no" ; then 1008697cf2ee2Smrg if test "x$XSLTPROC" != "x"; then 1008797cf2ee2Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1008897cf2ee2Smrg fi 1008997cf2ee2Smrg have_xsltproc=no 1009097cf2ee2Smrgelse 1009197cf2ee2Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1009297cf2ee2Smrgfi 10093a966c04fSmrg 1009497cf2ee2SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1009597cf2ee2Smrg]) # XORG_WITH_XSLTPROC 10096a966c04fSmrg 1009797cf2ee2Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1009897cf2ee2Smrg# ---------------------------------------- 1009997cf2ee2Smrg# Minimum version: 1.15.0 1010097cf2ee2Smrg# 1010197cf2ee2Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1010297cf2ee2Smrg# scanning arbitrary text files, extracting information from those text files, 1010397cf2ee2Smrg# and printing reports based on that information. 1010497cf2ee2Smrg# 1010597cf2ee2Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1010697cf2ee2Smrg# 1010797cf2ee2Smrg# Interface to module: 1010897cf2ee2Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1010997cf2ee2Smrg# PERL: returns the path of the perl program found 1011097cf2ee2Smrg# returns the path set by the user in the environment 1011197cf2ee2Smrg# --with-perl: 'yes' user instructs the module to use perl 1011297cf2ee2Smrg# 'no' user instructs the module not to use perl 1011397cf2ee2Smrg# have_perl: returns yes if perl found in PATH or no 1011497cf2ee2Smrg# 1011597cf2ee2Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1011697cf2ee2Smrg# 1011797cf2ee2SmrgAC_DEFUN([XORG_WITH_PERL],[ 1011897cf2ee2SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1011997cf2ee2Smrg# Preserves the interface, should it be implemented later 1012097cf2ee2Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1012197cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1012297cf2ee2SmrgAC_ARG_WITH(perl, 1012397cf2ee2Smrg AS_HELP_STRING([--with-perl], 1012497cf2ee2Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1012597cf2ee2Smrg [use_perl=$withval], [use_perl=]_defopt) 1012697cf2ee2Smrgm4_undefine([_defopt]) 10127a966c04fSmrg 1012897cf2ee2Smrgif test "x$use_perl" = x"auto"; then 1012997cf2ee2Smrg AC_PATH_PROG([PERL], [perl]) 1013097cf2ee2Smrg if test "x$PERL" = "x"; then 1013197cf2ee2Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1013297cf2ee2Smrg have_perl=no 1013397cf2ee2Smrg else 1013497cf2ee2Smrg have_perl=yes 1013597cf2ee2Smrg fi 1013697cf2ee2Smrgelif test "x$use_perl" = x"yes" ; then 1013797cf2ee2Smrg AC_PATH_PROG([PERL], [perl]) 1013897cf2ee2Smrg if test "x$PERL" = "x"; then 1013997cf2ee2Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1014097cf2ee2Smrg fi 1014197cf2ee2Smrg have_perl=yes 1014297cf2ee2Smrgelif test "x$use_perl" = x"no" ; then 1014397cf2ee2Smrg if test "x$PERL" != "x"; then 1014497cf2ee2Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1014597cf2ee2Smrg fi 1014697cf2ee2Smrg have_perl=no 1014797cf2ee2Smrgelse 1014897cf2ee2Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1014997cf2ee2Smrgfi 10150a966c04fSmrg 1015197cf2ee2SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1015297cf2ee2Smrg]) # XORG_WITH_PERL 10153a966c04fSmrg 1015497cf2ee2Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1015597cf2ee2Smrg# ---------------- 1015697cf2ee2Smrg# Minimum version: 1.5.0 1015797cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1015897cf2ee2Smrg# 1015997cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1016097cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1016197cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1016297cf2ee2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1016397cf2ee2Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1016497cf2ee2Smrg# --with-asciidoc assumes 'auto'. 1016597cf2ee2Smrg# 1016697cf2ee2Smrg# Interface to module: 1016797cf2ee2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1016897cf2ee2Smrg# ASCIIDOC: returns the path of the asciidoc program found 1016997cf2ee2Smrg# returns the path set by the user in the environment 1017097cf2ee2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1017197cf2ee2Smrg# 'no' user instructs the module not to use asciidoc 1017297cf2ee2Smrg# 1017397cf2ee2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1017497cf2ee2Smrg# 1017597cf2ee2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1017697cf2ee2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1017797cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1017897cf2ee2SmrgAC_ARG_WITH(asciidoc, 1017997cf2ee2Smrg AS_HELP_STRING([--with-asciidoc], 1018097cf2ee2Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1018197cf2ee2Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1018297cf2ee2Smrgm4_undefine([_defopt]) 10183a966c04fSmrg 1018497cf2ee2Smrgif test "x$use_asciidoc" = x"auto"; then 1018597cf2ee2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1018697cf2ee2Smrg if test "x$ASCIIDOC" = "x"; then 1018797cf2ee2Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1018897cf2ee2Smrg have_asciidoc=no 1018997cf2ee2Smrg else 1019097cf2ee2Smrg have_asciidoc=yes 1019197cf2ee2Smrg fi 1019297cf2ee2Smrgelif test "x$use_asciidoc" = x"yes" ; then 1019397cf2ee2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1019497cf2ee2Smrg if test "x$ASCIIDOC" = "x"; then 1019597cf2ee2Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1019697cf2ee2Smrg fi 1019797cf2ee2Smrg have_asciidoc=yes 1019897cf2ee2Smrgelif test "x$use_asciidoc" = x"no" ; then 1019997cf2ee2Smrg if test "x$ASCIIDOC" != "x"; then 1020097cf2ee2Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1020197cf2ee2Smrg fi 1020297cf2ee2Smrg have_asciidoc=no 1020397cf2ee2Smrgelse 1020497cf2ee2Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1020597cf2ee2Smrgfi 1020697cf2ee2Smrgm4_ifval([$1], 1020797cf2ee2Smrg[if test "$have_asciidoc" = yes; then 1020897cf2ee2Smrg # scrape the asciidoc version 1020997cf2ee2Smrg AC_MSG_CHECKING([the asciidoc version]) 1021097cf2ee2Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1021197cf2ee2Smrg AC_MSG_RESULT([$asciidoc_version]) 1021297cf2ee2Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1021397cf2ee2Smrg [if test "x$use_asciidoc" = xauto; then 1021497cf2ee2Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1021597cf2ee2Smrg have_asciidoc=no 1021697cf2ee2Smrg else 1021797cf2ee2Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1021897cf2ee2Smrg fi]) 1021997cf2ee2Smrgfi]) 1022097cf2ee2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1022197cf2ee2Smrg]) # XORG_WITH_ASCIIDOC 10222a966c04fSmrg 1022397cf2ee2Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1022497cf2ee2Smrg# -------------------------------- 1022597cf2ee2Smrg# Minimum version: 1.5.0 1022697cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1022797cf2ee2Smrg# 1022897cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1022997cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1023097cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1023197cf2ee2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1023297cf2ee2Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1023397cf2ee2Smrg# --with-doxygen assumes 'auto'. 1023497cf2ee2Smrg# 1023597cf2ee2Smrg# Interface to module: 1023697cf2ee2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1023797cf2ee2Smrg# DOXYGEN: returns the path of the doxygen program found 1023897cf2ee2Smrg# returns the path set by the user in the environment 1023997cf2ee2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1024097cf2ee2Smrg# 'no' user instructs the module not to use doxygen 1024197cf2ee2Smrg# 1024297cf2ee2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1024397cf2ee2Smrg# 1024497cf2ee2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1024597cf2ee2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1024697cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1024797cf2ee2SmrgAC_ARG_WITH(doxygen, 1024897cf2ee2Smrg AS_HELP_STRING([--with-doxygen], 1024997cf2ee2Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1025097cf2ee2Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1025197cf2ee2Smrgm4_undefine([_defopt]) 10252a966c04fSmrg 1025397cf2ee2Smrgif test "x$use_doxygen" = x"auto"; then 1025497cf2ee2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1025597cf2ee2Smrg if test "x$DOXYGEN" = "x"; then 1025697cf2ee2Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1025797cf2ee2Smrg have_doxygen=no 1025897cf2ee2Smrg else 1025997cf2ee2Smrg have_doxygen=yes 1026097cf2ee2Smrg fi 1026197cf2ee2Smrgelif test "x$use_doxygen" = x"yes" ; then 1026297cf2ee2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1026397cf2ee2Smrg if test "x$DOXYGEN" = "x"; then 1026497cf2ee2Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1026597cf2ee2Smrg fi 1026697cf2ee2Smrg have_doxygen=yes 1026797cf2ee2Smrgelif test "x$use_doxygen" = x"no" ; then 1026897cf2ee2Smrg if test "x$DOXYGEN" != "x"; then 1026997cf2ee2Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1027097cf2ee2Smrg fi 1027197cf2ee2Smrg have_doxygen=no 1027297cf2ee2Smrgelse 1027397cf2ee2Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1027497cf2ee2Smrgfi 1027597cf2ee2Smrgm4_ifval([$1], 1027697cf2ee2Smrg[if test "$have_doxygen" = yes; then 1027797cf2ee2Smrg # scrape the doxygen version 1027897cf2ee2Smrg AC_MSG_CHECKING([the doxygen version]) 1027997cf2ee2Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1028097cf2ee2Smrg AC_MSG_RESULT([$doxygen_version]) 1028197cf2ee2Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1028297cf2ee2Smrg [if test "x$use_doxygen" = xauto; then 1028397cf2ee2Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1028497cf2ee2Smrg have_doxygen=no 1028597cf2ee2Smrg else 1028697cf2ee2Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1028797cf2ee2Smrg fi]) 1028897cf2ee2Smrgfi]) 1028997cf2ee2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1029097cf2ee2Smrg]) # XORG_WITH_DOXYGEN 10291a966c04fSmrg 1029297cf2ee2Smrg# XORG_WITH_GROFF([DEFAULT]) 1029397cf2ee2Smrg# ---------------- 1029497cf2ee2Smrg# Minimum version: 1.6.0 1029597cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1029697cf2ee2Smrg# 1029797cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1029897cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1029997cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1030097cf2ee2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1030197cf2ee2Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1030297cf2ee2Smrg# --with-groff assumes 'auto'. 1030397cf2ee2Smrg# 1030497cf2ee2Smrg# Interface to module: 1030597cf2ee2Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1030697cf2ee2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1030797cf2ee2Smrg# HAVE_GROFF_MS: the -ms macros package 1030897cf2ee2Smrg# GROFF: returns the path of the groff program found 1030997cf2ee2Smrg# returns the path set by the user in the environment 1031097cf2ee2Smrg# --with-groff: 'yes' user instructs the module to use groff 1031197cf2ee2Smrg# 'no' user instructs the module not to use groff 1031297cf2ee2Smrg# 1031397cf2ee2Smrg# Added in version 1.9.0: 1031497cf2ee2Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1031597cf2ee2Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1031697cf2ee2Smrg# psselect from the psutils package. 1031797cf2ee2Smrg# the ghostcript package. Refer to the grohtml man pages 1031897cf2ee2Smrg# 1031997cf2ee2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1032097cf2ee2Smrg# 1032197cf2ee2Smrg# OS and distros often splits groff in a basic and full package, the former 1032297cf2ee2Smrg# having the groff program and the later having devices, fonts and macros 1032397cf2ee2Smrg# Checking for the groff executable is not enough. 1032497cf2ee2Smrg# 1032597cf2ee2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1032697cf2ee2Smrg# unset HAVE_GROFF or GROFF env variables. 1032797cf2ee2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1032897cf2ee2Smrg# 1032997cf2ee2SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1033097cf2ee2SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1033197cf2ee2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1033297cf2ee2SmrgAC_ARG_WITH(groff, 1033397cf2ee2Smrg AS_HELP_STRING([--with-groff], 1033497cf2ee2Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1033597cf2ee2Smrg [use_groff=$withval], [use_groff=]_defopt) 1033697cf2ee2Smrgm4_undefine([_defopt]) 10337a966c04fSmrg 1033897cf2ee2Smrgif test "x$use_groff" = x"auto"; then 1033997cf2ee2Smrg AC_PATH_PROG([GROFF], [groff]) 1034097cf2ee2Smrg if test "x$GROFF" = "x"; then 1034197cf2ee2Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1034297cf2ee2Smrg have_groff=no 1034397cf2ee2Smrg else 1034497cf2ee2Smrg have_groff=yes 1034597cf2ee2Smrg fi 1034697cf2ee2Smrgelif test "x$use_groff" = x"yes" ; then 1034797cf2ee2Smrg AC_PATH_PROG([GROFF], [groff]) 1034897cf2ee2Smrg if test "x$GROFF" = "x"; then 1034997cf2ee2Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1035097cf2ee2Smrg fi 1035197cf2ee2Smrg have_groff=yes 1035297cf2ee2Smrgelif test "x$use_groff" = x"no" ; then 1035397cf2ee2Smrg if test "x$GROFF" != "x"; then 1035497cf2ee2Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1035597cf2ee2Smrg fi 1035697cf2ee2Smrg have_groff=no 1035797cf2ee2Smrgelse 1035897cf2ee2Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1035997cf2ee2Smrgfi 10360a966c04fSmrg 1036197cf2ee2Smrg# We have groff, test for the presence of the macro packages 1036297cf2ee2Smrgif test "x$have_groff" = x"yes"; then 1036397cf2ee2Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1036497cf2ee2Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1036597cf2ee2Smrg groff_ms_works=yes 1036697cf2ee2Smrg else 1036797cf2ee2Smrg groff_ms_works=no 1036897cf2ee2Smrg fi 1036997cf2ee2Smrg AC_MSG_RESULT([$groff_ms_works]) 1037097cf2ee2Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1037197cf2ee2Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1037297cf2ee2Smrg groff_mm_works=yes 1037397cf2ee2Smrg else 1037497cf2ee2Smrg groff_mm_works=no 1037597cf2ee2Smrg fi 1037697cf2ee2Smrg AC_MSG_RESULT([$groff_mm_works]) 1037797cf2ee2Smrgfi 10378a966c04fSmrg 1037997cf2ee2Smrg# We have groff, test for HTML dependencies, one command per package 1038097cf2ee2Smrgif test "x$have_groff" = x"yes"; then 1038197cf2ee2Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1038297cf2ee2Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1038397cf2ee2Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1038497cf2ee2Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1038597cf2ee2Smrg have_groff_html=yes 1038697cf2ee2Smrg else 1038797cf2ee2Smrg have_groff_html=no 1038897cf2ee2Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1038997cf2ee2Smrg fi 1039097cf2ee2Smrgfi 10391a966c04fSmrg 1039297cf2ee2Smrg# Set Automake conditionals for Makefiles 1039397cf2ee2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1039497cf2ee2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1039597cf2ee2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1039697cf2ee2SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1039797cf2ee2Smrg]) # XORG_WITH_GROFF 10398a966c04fSmrg 1039997cf2ee2Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1040097cf2ee2Smrg# --------------------------------------- 1040197cf2ee2Smrg# Minimum version: 1.6.0 1040297cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1040397cf2ee2Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1040497cf2ee2Smrg# 1040597cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1040697cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1040797cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1040897cf2ee2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1040997cf2ee2Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1041097cf2ee2Smrg# --with-fop assumes 'auto'. 1041197cf2ee2Smrg# 1041297cf2ee2Smrg# Interface to module: 1041397cf2ee2Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1041497cf2ee2Smrg# FOP: returns the path of the fop program found 1041597cf2ee2Smrg# returns the path set by the user in the environment 1041697cf2ee2Smrg# --with-fop: 'yes' user instructs the module to use fop 1041797cf2ee2Smrg# 'no' user instructs the module not to use fop 1041897cf2ee2Smrg# 1041997cf2ee2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1042097cf2ee2Smrg# 1042197cf2ee2SmrgAC_DEFUN([XORG_WITH_FOP],[ 1042297cf2ee2SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1042397cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1042497cf2ee2SmrgAC_ARG_WITH(fop, 1042597cf2ee2Smrg AS_HELP_STRING([--with-fop], 1042697cf2ee2Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1042797cf2ee2Smrg [use_fop=$withval], [use_fop=]_defopt) 1042897cf2ee2Smrgm4_undefine([_defopt]) 10429a966c04fSmrg 1043097cf2ee2Smrgif test "x$use_fop" = x"auto"; then 1043197cf2ee2Smrg AC_PATH_PROG([FOP], [fop]) 1043297cf2ee2Smrg if test "x$FOP" = "x"; then 1043397cf2ee2Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1043497cf2ee2Smrg have_fop=no 1043597cf2ee2Smrg else 1043697cf2ee2Smrg have_fop=yes 1043797cf2ee2Smrg fi 1043897cf2ee2Smrgelif test "x$use_fop" = x"yes" ; then 1043997cf2ee2Smrg AC_PATH_PROG([FOP], [fop]) 1044097cf2ee2Smrg if test "x$FOP" = "x"; then 1044197cf2ee2Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1044297cf2ee2Smrg fi 1044397cf2ee2Smrg have_fop=yes 1044497cf2ee2Smrgelif test "x$use_fop" = x"no" ; then 1044597cf2ee2Smrg if test "x$FOP" != "x"; then 1044697cf2ee2Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1044797cf2ee2Smrg fi 1044897cf2ee2Smrg have_fop=no 1044997cf2ee2Smrgelse 1045097cf2ee2Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1045197cf2ee2Smrgfi 10452a966c04fSmrg 1045397cf2ee2Smrg# Test for a minimum version of fop, if provided. 1045497cf2ee2Smrgm4_ifval([$1], 1045597cf2ee2Smrg[if test "$have_fop" = yes; then 1045697cf2ee2Smrg # scrape the fop version 1045797cf2ee2Smrg AC_MSG_CHECKING([for fop minimum version]) 1045897cf2ee2Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1045997cf2ee2Smrg AC_MSG_RESULT([$fop_version]) 1046097cf2ee2Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1046197cf2ee2Smrg [if test "x$use_fop" = xauto; then 1046297cf2ee2Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1046397cf2ee2Smrg have_fop=no 1046497cf2ee2Smrg else 1046597cf2ee2Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1046697cf2ee2Smrg fi]) 1046797cf2ee2Smrgfi]) 1046897cf2ee2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1046997cf2ee2Smrg]) # XORG_WITH_FOP 10470a966c04fSmrg 1047197cf2ee2Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1047297cf2ee2Smrg# ---------------- 1047397cf2ee2Smrg# Minimum version: 1.6.0 1047497cf2ee2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1047597cf2ee2Smrg# 1047697cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1047797cf2ee2Smrg# not at the appropriate level. This macro enables a module to test for the 1047897cf2ee2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1047997cf2ee2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1048097cf2ee2Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1048197cf2ee2Smrg# --with-ps2pdf assumes 'auto'. 1048297cf2ee2Smrg# 1048397cf2ee2Smrg# Interface to module: 1048497cf2ee2Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1048597cf2ee2Smrg# PS2PDF: returns the path of the ps2pdf program found 1048697cf2ee2Smrg# returns the path set by the user in the environment 1048797cf2ee2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1048897cf2ee2Smrg# 'no' user instructs the module not to use ps2pdf 1048997cf2ee2Smrg# 1049097cf2ee2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1049197cf2ee2Smrg# 1049297cf2ee2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1049397cf2ee2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1049497cf2ee2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1049597cf2ee2SmrgAC_ARG_WITH(ps2pdf, 1049697cf2ee2Smrg AS_HELP_STRING([--with-ps2pdf], 1049797cf2ee2Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1049897cf2ee2Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1049997cf2ee2Smrgm4_undefine([_defopt]) 10500a966c04fSmrg 1050197cf2ee2Smrgif test "x$use_ps2pdf" = x"auto"; then 1050297cf2ee2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1050397cf2ee2Smrg if test "x$PS2PDF" = "x"; then 1050497cf2ee2Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1050597cf2ee2Smrg have_ps2pdf=no 1050697cf2ee2Smrg else 1050797cf2ee2Smrg have_ps2pdf=yes 1050897cf2ee2Smrg fi 1050997cf2ee2Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1051097cf2ee2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1051197cf2ee2Smrg if test "x$PS2PDF" = "x"; then 1051297cf2ee2Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1051397cf2ee2Smrg fi 1051497cf2ee2Smrg have_ps2pdf=yes 1051597cf2ee2Smrgelif test "x$use_ps2pdf" = x"no" ; then 1051697cf2ee2Smrg if test "x$PS2PDF" != "x"; then 1051797cf2ee2Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1051897cf2ee2Smrg fi 1051997cf2ee2Smrg have_ps2pdf=no 1052097cf2ee2Smrgelse 1052197cf2ee2Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1052297cf2ee2Smrgfi 1052397cf2ee2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1052497cf2ee2Smrg]) # XORG_WITH_PS2PDF 10525a966c04fSmrg 1052697cf2ee2Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1052797cf2ee2Smrg# ---------------- 1052897cf2ee2Smrg# Minimum version: 1.6.0 1052997cf2ee2Smrg# 1053097cf2ee2Smrg# Documentation tools are not always available on all platforms and sometimes 1053197cf2ee2Smrg# not at the appropriate level. This macro enables a builder to skip all 1053297cf2ee2Smrg# documentation targets except traditional man pages. 1053397cf2ee2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1053497cf2ee2Smrg# maximum flexibilty in controlling documentation building. 1053597cf2ee2Smrg# Refer to: 1053697cf2ee2Smrg# XORG_WITH_XMLTO --with-xmlto 1053797cf2ee2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1053897cf2ee2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1053997cf2ee2Smrg# XORG_WITH_FOP --with-fop 1054097cf2ee2Smrg# XORG_WITH_GROFF --with-groff 1054197cf2ee2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1054297cf2ee2Smrg# 1054397cf2ee2Smrg# Interface to module: 1054497cf2ee2Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1054597cf2ee2Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1054697cf2ee2Smrg# 'no' user instructs the module not to generate docs 1054797cf2ee2Smrg# parm1: specify the default value, yes or no. 1054897cf2ee2Smrg# 1054997cf2ee2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1055097cf2ee2Smrgm4_define([docs_default], m4_default([$1], [yes])) 1055197cf2ee2SmrgAC_ARG_ENABLE(docs, 1055297cf2ee2Smrg AS_HELP_STRING([--enable-docs], 1055397cf2ee2Smrg [Enable building the documentation (default: ]docs_default[)]), 1055497cf2ee2Smrg [build_docs=$enableval], [build_docs=]docs_default) 1055597cf2ee2Smrgm4_undefine([docs_default]) 1055697cf2ee2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1055797cf2ee2SmrgAC_MSG_CHECKING([whether to build documentation]) 1055897cf2ee2SmrgAC_MSG_RESULT([$build_docs]) 1055997cf2ee2Smrg]) # XORG_ENABLE_DOCS 10560a966c04fSmrg 1056197cf2ee2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1056297cf2ee2Smrg# ---------------- 1056397cf2ee2Smrg# Minimum version: 1.6.0 1056497cf2ee2Smrg# 1056597cf2ee2Smrg# This macro enables a builder to skip all developer documentation. 1056697cf2ee2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1056797cf2ee2Smrg# maximum flexibilty in controlling documentation building. 1056897cf2ee2Smrg# Refer to: 1056997cf2ee2Smrg# XORG_WITH_XMLTO --with-xmlto 1057097cf2ee2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1057197cf2ee2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1057297cf2ee2Smrg# XORG_WITH_FOP --with-fop 1057397cf2ee2Smrg# XORG_WITH_GROFF --with-groff 1057497cf2ee2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1057597cf2ee2Smrg# 1057697cf2ee2Smrg# Interface to module: 1057797cf2ee2Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1057897cf2ee2Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1057997cf2ee2Smrg# 'no' user instructs the module not to generate developer docs 1058097cf2ee2Smrg# parm1: specify the default value, yes or no. 1058197cf2ee2Smrg# 1058297cf2ee2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1058397cf2ee2Smrgm4_define([devel_default], m4_default([$1], [yes])) 1058497cf2ee2SmrgAC_ARG_ENABLE(devel-docs, 1058597cf2ee2Smrg AS_HELP_STRING([--enable-devel-docs], 1058697cf2ee2Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1058797cf2ee2Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1058897cf2ee2Smrgm4_undefine([devel_default]) 1058997cf2ee2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1059097cf2ee2SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1059197cf2ee2SmrgAC_MSG_RESULT([$build_devel_docs]) 1059297cf2ee2Smrg]) # XORG_ENABLE_DEVEL_DOCS 10593a966c04fSmrg 1059497cf2ee2Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1059597cf2ee2Smrg# ---------------- 1059697cf2ee2Smrg# Minimum version: 1.6.0 1059797cf2ee2Smrg# 1059897cf2ee2Smrg# This macro enables a builder to skip all functional specification targets. 1059997cf2ee2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1060097cf2ee2Smrg# maximum flexibilty in controlling documentation building. 1060197cf2ee2Smrg# Refer to: 1060297cf2ee2Smrg# XORG_WITH_XMLTO --with-xmlto 1060397cf2ee2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1060497cf2ee2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1060597cf2ee2Smrg# XORG_WITH_FOP --with-fop 1060697cf2ee2Smrg# XORG_WITH_GROFF --with-groff 1060797cf2ee2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1060897cf2ee2Smrg# 1060997cf2ee2Smrg# Interface to module: 1061097cf2ee2Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1061197cf2ee2Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1061297cf2ee2Smrg# 'no' user instructs the module not to generate specs 1061397cf2ee2Smrg# parm1: specify the default value, yes or no. 1061497cf2ee2Smrg# 1061597cf2ee2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1061697cf2ee2Smrgm4_define([spec_default], m4_default([$1], [yes])) 1061797cf2ee2SmrgAC_ARG_ENABLE(specs, 1061897cf2ee2Smrg AS_HELP_STRING([--enable-specs], 1061997cf2ee2Smrg [Enable building the specs (default: ]spec_default[)]), 1062097cf2ee2Smrg [build_specs=$enableval], [build_specs=]spec_default) 1062197cf2ee2Smrgm4_undefine([spec_default]) 1062297cf2ee2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1062397cf2ee2SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1062497cf2ee2SmrgAC_MSG_RESULT([$build_specs]) 1062597cf2ee2Smrg]) # XORG_ENABLE_SPECS 10626a966c04fSmrg 1062797cf2ee2Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1062897cf2ee2Smrg# ---------------------------------------------- 1062997cf2ee2Smrg# Minimum version: 1.13.0 1063097cf2ee2Smrg# 1063197cf2ee2Smrg# This macro enables a builder to enable/disable unit testing 1063297cf2ee2Smrg# It makes no assumption about the test cases implementation 1063397cf2ee2Smrg# Test cases may or may not use Automake "Support for test suites" 1063497cf2ee2Smrg# They may or may not use the software utility library GLib 1063597cf2ee2Smrg# 1063697cf2ee2Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1063797cf2ee2Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1063897cf2ee2Smrg# The variable enable_unit_tests is used by other macros in this file. 1063997cf2ee2Smrg# 1064097cf2ee2Smrg# Interface to module: 1064197cf2ee2Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1064297cf2ee2Smrg# enable_unit_tests: used in configure.ac for additional configuration 1064397cf2ee2Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1064497cf2ee2Smrg# 'no' user instructs the module not to build tests 1064597cf2ee2Smrg# parm1: specify the default value, yes or no. 1064697cf2ee2Smrg# 1064797cf2ee2SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1064897cf2ee2SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1064997cf2ee2SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1065097cf2ee2SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1065197cf2ee2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1065297cf2ee2SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1065397cf2ee2Smrg [Enable building unit test cases (default: ]_defopt[)]), 1065497cf2ee2Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1065597cf2ee2Smrgm4_undefine([_defopt]) 1065697cf2ee2SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1065797cf2ee2SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1065897cf2ee2SmrgAC_MSG_RESULT([$enable_unit_tests]) 1065997cf2ee2Smrg]) # XORG_ENABLE_UNIT_TESTS 10660a966c04fSmrg 1066197cf2ee2Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1066297cf2ee2Smrg# ---------------------------------------- 1066397cf2ee2Smrg# Minimum version: 1.13.0 1066497cf2ee2Smrg# 1066597cf2ee2Smrg# GLib is a library which provides advanced data structures and functions. 1066697cf2ee2Smrg# This macro enables a module to test for the presence of Glib. 1066797cf2ee2Smrg# 1066897cf2ee2Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1066997cf2ee2Smrg# Otherwise the value of $enable_unit_tests is blank. 1067097cf2ee2Smrg# 1067197cf2ee2Smrg# Interface to module: 1067297cf2ee2Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1067397cf2ee2Smrg# with_glib: used in configure.ac to know if GLib has been found 1067497cf2ee2Smrg# --with-glib: 'yes' user instructs the module to use glib 1067597cf2ee2Smrg# 'no' user instructs the module not to use glib 1067697cf2ee2Smrg# 1067797cf2ee2SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1067897cf2ee2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1067997cf2ee2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1068097cf2ee2SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1068197cf2ee2Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1068297cf2ee2Smrg [with_glib=$withval], [with_glib=]_defopt) 1068397cf2ee2Smrgm4_undefine([_defopt]) 10684a966c04fSmrg 1068597cf2ee2Smrghave_glib=no 1068697cf2ee2Smrg# Do not probe GLib if user explicitly disabled unit testing 1068797cf2ee2Smrgif test "x$enable_unit_tests" != x"no"; then 1068897cf2ee2Smrg # Do not probe GLib if user explicitly disabled it 1068997cf2ee2Smrg if test "x$with_glib" != x"no"; then 1069097cf2ee2Smrg m4_ifval( 1069197cf2ee2Smrg [$1], 1069297cf2ee2Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1069397cf2ee2Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1069497cf2ee2Smrg ) 1069597cf2ee2Smrg fi 1069697cf2ee2Smrgfi 10697a966c04fSmrg 1069897cf2ee2Smrg# Not having GLib when unit testing has been explicitly requested is an error 1069997cf2ee2Smrgif test "x$enable_unit_tests" = x"yes"; then 1070097cf2ee2Smrg if test "x$have_glib" = x"no"; then 1070197cf2ee2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1070297cf2ee2Smrg fi 1070397cf2ee2Smrgfi 10704a966c04fSmrg 1070597cf2ee2Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1070697cf2ee2Smrgif test "x$enable_unit_tests" = x"no"; then 1070797cf2ee2Smrg if test "x$with_glib" = x"yes"; then 1070897cf2ee2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1070997cf2ee2Smrg fi 1071097cf2ee2Smrgfi 10711a966c04fSmrg 1071297cf2ee2Smrg# Not having GLib when it has been explicitly requested is an error 1071397cf2ee2Smrgif test "x$with_glib" = x"yes"; then 1071497cf2ee2Smrg if test "x$have_glib" = x"no"; then 1071597cf2ee2Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1071697cf2ee2Smrg fi 1071797cf2ee2Smrgfi 10718a966c04fSmrg 1071997cf2ee2SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1072097cf2ee2Smrg]) # XORG_WITH_GLIB 10721a966c04fSmrg 1072297cf2ee2Smrg# XORG_LD_WRAP([required|optional]) 1072397cf2ee2Smrg# --------------------------------- 1072497cf2ee2Smrg# Minimum version: 1.13.0 1072597cf2ee2Smrg# 1072697cf2ee2Smrg# Check if linker supports -wrap, passed via compiler flags 1072797cf2ee2Smrg# 1072897cf2ee2Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1072997cf2ee2Smrg# Otherwise the value of $enable_unit_tests is blank. 1073097cf2ee2Smrg# 1073197cf2ee2Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1073297cf2ee2Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1073397cf2ee2Smrg# available, an argument of "optional" allows use when some unit tests require 1073497cf2ee2Smrg# ld -wrap and others do not. 1073597cf2ee2Smrg# 1073697cf2ee2SmrgAC_DEFUN([XORG_LD_WRAP],[ 1073797cf2ee2SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1073897cf2ee2Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1073997cf2ee2Smrg void __wrap_exit(int status) { return; }], 1074097cf2ee2Smrg [exit(0);])]) 1074197cf2ee2Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1074297cf2ee2Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1074397cf2ee2Smrg if test "x$have_ld_wrap" = x"no"; then 1074497cf2ee2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1074597cf2ee2Smrg fi 1074697cf2ee2Smrgfi 1074797cf2ee2SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1074897cf2ee2Smrg# 1074997cf2ee2Smrg]) # XORG_LD_WRAP 10750a966c04fSmrg 1075197cf2ee2Smrg# XORG_CHECK_LINKER_FLAGS 1075297cf2ee2Smrg# ----------------------- 1075397cf2ee2Smrg# SYNOPSIS 1075497cf2ee2Smrg# 1075597cf2ee2Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1075697cf2ee2Smrg# 1075797cf2ee2Smrg# DESCRIPTION 1075897cf2ee2Smrg# 1075997cf2ee2Smrg# Check whether the given linker FLAGS work with the current language's 1076097cf2ee2Smrg# linker, or whether they give an error. 1076197cf2ee2Smrg# 1076297cf2ee2Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1076397cf2ee2Smrg# success/failure. 1076497cf2ee2Smrg# 1076597cf2ee2Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1076697cf2ee2Smrg# 1076797cf2ee2Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1076897cf2ee2Smrg# 1076997cf2ee2Smrg# LICENSE 1077097cf2ee2Smrg# 1077197cf2ee2Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1077297cf2ee2Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1077397cf2ee2Smrg# Copyright (c) 2009 Matteo Frigo 1077497cf2ee2Smrg# 1077597cf2ee2Smrg# This program is free software: you can redistribute it and/or modify it 1077697cf2ee2Smrg# under the terms of the GNU General Public License as published by the 1077797cf2ee2Smrg# Free Software Foundation, either version 3 of the License, or (at your 1077897cf2ee2Smrg# option) any later version. 1077997cf2ee2Smrg# 1078097cf2ee2Smrg# This program is distributed in the hope that it will be useful, but 1078197cf2ee2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1078297cf2ee2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1078397cf2ee2Smrg# Public License for more details. 1078497cf2ee2Smrg# 1078597cf2ee2Smrg# You should have received a copy of the GNU General Public License along 1078697cf2ee2Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1078797cf2ee2Smrg# 1078897cf2ee2Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1078997cf2ee2Smrg# gives unlimited permission to copy, distribute and modify the configure 1079097cf2ee2Smrg# scripts that are the output of Autoconf when processing the Macro. You 1079197cf2ee2Smrg# need not follow the terms of the GNU General Public License when using 1079297cf2ee2Smrg# or distributing such scripts, even though portions of the text of the 1079397cf2ee2Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1079497cf2ee2Smrg# all other use of the material that constitutes the Autoconf Macro. 1079597cf2ee2Smrg# 1079697cf2ee2Smrg# This special exception to the GPL applies to versions of the Autoconf 1079797cf2ee2Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1079897cf2ee2Smrg# modified version of the Autoconf Macro, you may extend this special 1079997cf2ee2Smrg# exception to the GPL to apply to your modified version as well.# 1080097cf2ee2SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1080197cf2ee2Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1080297cf2ee2Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1080397cf2ee2SmrgAS_LITERAL_IF([$1], 1080497cf2ee2Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1080597cf2ee2Smrg ax_save_FLAGS=$LDFLAGS 1080697cf2ee2Smrg LDFLAGS="$1" 1080797cf2ee2Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1080897cf2ee2Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1080997cf2ee2Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1081097cf2ee2Smrg LDFLAGS=$ax_save_FLAGS])], 1081197cf2ee2Smrg [ax_save_FLAGS=$LDFLAGS 1081297cf2ee2Smrg LDFLAGS="$1" 1081397cf2ee2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1081497cf2ee2Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1081597cf2ee2Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1081697cf2ee2Smrg LDFLAGS=$ax_save_FLAGS]) 1081797cf2ee2Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1081897cf2ee2SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1081997cf2ee2Smrgif test "x$xorg_check_linker_flags" = xyes; then 1082097cf2ee2Smrg m4_default([$2], :) 1082197cf2ee2Smrgelse 1082297cf2ee2Smrg m4_default([$3], :) 1082397cf2ee2Smrgfi 1082497cf2ee2Smrg]) # XORG_CHECK_LINKER_FLAGS 10825a966c04fSmrg 1082697cf2ee2Smrg# XORG_MEMORY_CHECK_FLAGS 1082797cf2ee2Smrg# ----------------------- 1082897cf2ee2Smrg# Minimum version: 1.16.0 1082997cf2ee2Smrg# 1083097cf2ee2Smrg# This macro attempts to find appropriate memory checking functionality 1083197cf2ee2Smrg# for various platforms which unit testing code may use to catch various 1083297cf2ee2Smrg# forms of memory allocation and access errors in testing. 1083397cf2ee2Smrg# 1083497cf2ee2Smrg# Interface to module: 1083597cf2ee2Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1083697cf2ee2Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1083797cf2ee2Smrg# 1083897cf2ee2Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1083997cf2ee2Smrg# 1084097cf2ee2SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 108412e2dd055Smrg 1084297cf2ee2SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1084397cf2ee2SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1084497cf2ee2Smrg [Environment variables to enable memory checking in tests]) 108452e2dd055Smrg 1084697cf2ee2Smrg# Check for different types of support on different platforms 1084797cf2ee2Smrgcase $host_os in 1084897cf2ee2Smrg solaris*) 1084997cf2ee2Smrg AC_CHECK_LIB([umem], [umem_alloc], 1085097cf2ee2Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1085197cf2ee2Smrg ;; 1085297cf2ee2Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1085397cf2ee2Smrg # both directly and inverted, so should not be 0 or 255. 1085497cf2ee2Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1085597cf2ee2Smrg ;; 1085697cf2ee2Smrg darwin*) 1085797cf2ee2Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1085897cf2ee2Smrg ;; 1085997cf2ee2Smrg *bsd*) 1086097cf2ee2Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1086197cf2ee2Smrg ;; 1086297cf2ee2Smrgesac 108632e2dd055Smrg 1086497cf2ee2Smrg# User supplied flags override default flags 1086597cf2ee2Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1086697cf2ee2Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1086797cf2ee2Smrgfi 108682e2dd055Smrg 1086997cf2ee2SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1087097cf2ee2Smrg]) # XORG_WITH_LINT 10871a966c04fSmrg 1087297cf2ee2Smrg# XORG_CHECK_MALLOC_ZERO 1087397cf2ee2Smrg# ---------------------- 1087497cf2ee2Smrg# Minimum version: 1.0.0 10875a966c04fSmrg# 1087697cf2ee2Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1087797cf2ee2Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1087897cf2ee2Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1087997cf2ee2SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1088097cf2ee2SmrgAC_ARG_ENABLE(malloc0returnsnull, 1088197cf2ee2Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1088297cf2ee2Smrg [malloc(0) returns NULL (default: auto)]), 1088397cf2ee2Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1088497cf2ee2Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10885a966c04fSmrg 1088697cf2ee2SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1088797cf2ee2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1088897cf2ee2Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1088997cf2ee2Smrg#include <stdlib.h> 1089097cf2ee2Smrg],[ 1089197cf2ee2Smrg char *m0, *r0, *c0, *p; 1089297cf2ee2Smrg m0 = malloc(0); 1089397cf2ee2Smrg p = malloc(10); 1089497cf2ee2Smrg r0 = realloc(p,0); 1089597cf2ee2Smrg c0 = calloc(0,10); 1089697cf2ee2Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1089797cf2ee2Smrg])], 1089897cf2ee2Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1089997cf2ee2Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1090097cf2ee2Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1090197cf2ee2Smrgfi 1090297cf2ee2SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10903a966c04fSmrg 1090497cf2ee2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1090597cf2ee2Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1090697cf2ee2Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1090797cf2ee2Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1090897cf2ee2Smrgelse 1090997cf2ee2Smrg MALLOC_ZERO_CFLAGS="" 1091097cf2ee2Smrg XMALLOC_ZERO_CFLAGS="" 1091197cf2ee2Smrg XTMALLOC_ZERO_CFLAGS="" 1091297cf2ee2Smrgfi 109136e7d3316Smrg 1091497cf2ee2SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1091597cf2ee2SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1091697cf2ee2SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1091797cf2ee2Smrg]) # XORG_CHECK_MALLOC_ZERO 109186e7d3316Smrg 1091997cf2ee2Smrg# XORG_WITH_LINT() 1092097cf2ee2Smrg# ---------------- 1092197cf2ee2Smrg# Minimum version: 1.1.0 1092297cf2ee2Smrg# 1092397cf2ee2Smrg# This macro enables the use of a tool that flags some suspicious and 1092497cf2ee2Smrg# non-portable constructs (likely to be bugs) in C language source code. 1092597cf2ee2Smrg# It will attempt to locate the tool and use appropriate options. 1092697cf2ee2Smrg# There are various lint type tools on different platforms. 1092797cf2ee2Smrg# 1092897cf2ee2Smrg# Interface to module: 1092997cf2ee2Smrg# LINT: returns the path to the tool found on the platform 1093097cf2ee2Smrg# or the value set to LINT on the configure cmd line 1093197cf2ee2Smrg# also an Automake conditional 1093297cf2ee2Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1093397cf2ee2Smrg# 1093497cf2ee2Smrg# --with-lint: 'yes' user instructs the module to use lint 1093597cf2ee2Smrg# 'no' user instructs the module not to use lint (default) 1093697cf2ee2Smrg# 1093797cf2ee2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1093897cf2ee2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1093997cf2ee2Smrg# 1094097cf2ee2SmrgAC_DEFUN([XORG_WITH_LINT],[ 109416e7d3316Smrg 1094297cf2ee2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1094397cf2ee2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1094497cf2ee2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1094597cf2ee2Smrg [Use a lint-style source code checker (default: disabled)])], 1094697cf2ee2Smrg [use_lint=$withval], [use_lint=no]) 109476e7d3316Smrg 1094897cf2ee2Smrg# Obtain platform specific info like program name and options 1094997cf2ee2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1095097cf2ee2Smrgcase $host_os in 1095197cf2ee2Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1095297cf2ee2Smrg lint_name=splint 1095397cf2ee2Smrg lint_options="-badflag" 1095497cf2ee2Smrg ;; 1095597cf2ee2Smrg *freebsd* | *netbsd*) 1095697cf2ee2Smrg lint_name=lint 1095797cf2ee2Smrg lint_options="-u -b" 1095897cf2ee2Smrg ;; 1095997cf2ee2Smrg *solaris*) 1096097cf2ee2Smrg lint_name=lint 1096197cf2ee2Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1096297cf2ee2Smrg ;; 1096397cf2ee2Smrgesac 109646e7d3316Smrg 1096597cf2ee2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1096697cf2ee2Smrgif test "x$use_lint" = x"yes" ; then 1096797cf2ee2Smrg AC_PATH_PROG([LINT], [$lint_name]) 1096897cf2ee2Smrg if test "x$LINT" = "x"; then 1096997cf2ee2Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1097097cf2ee2Smrg fi 1097197cf2ee2Smrgelif test "x$use_lint" = x"no" ; then 1097297cf2ee2Smrg if test "x$LINT" != "x"; then 1097397cf2ee2Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1097497cf2ee2Smrg fi 1097597cf2ee2Smrgelse 1097697cf2ee2Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1097797cf2ee2Smrgfi 109786e7d3316Smrg 1097997cf2ee2Smrg# User supplied flags override default flags 1098097cf2ee2Smrgif test "x$LINT_FLAGS" != "x"; then 1098197cf2ee2Smrg lint_options=$LINT_FLAGS 1098297cf2ee2Smrgfi 109836e7d3316Smrg 1098497cf2ee2SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1098597cf2ee2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 109866e7d3316Smrg 1098797cf2ee2Smrg]) # XORG_WITH_LINT 109886e7d3316Smrg 1098997cf2ee2Smrg# XORG_LINT_LIBRARY(LIBNAME) 1099097cf2ee2Smrg# -------------------------- 1099197cf2ee2Smrg# Minimum version: 1.1.0 1099297cf2ee2Smrg# 1099397cf2ee2Smrg# Sets up flags for building lint libraries for checking programs that call 1099497cf2ee2Smrg# functions in the library. 1099597cf2ee2Smrg# 1099697cf2ee2Smrg# Interface to module: 1099797cf2ee2Smrg# LINTLIB - Automake variable with the name of lint library file to make 1099897cf2ee2Smrg# MAKE_LINT_LIB - Automake conditional 1099997cf2ee2Smrg# 1100097cf2ee2Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1100197cf2ee2Smrg# - 'no' user instructs the module not to create a lint library (default) 110026e7d3316Smrg 1100397cf2ee2SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1100497cf2ee2SmrgAC_REQUIRE([XORG_WITH_LINT]) 1100597cf2ee2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1100697cf2ee2Smrg [Create lint library (default: disabled)])], 1100797cf2ee2Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 110086e7d3316Smrg 1100997cf2ee2Smrgif test "x$make_lint_lib" = x"yes" ; then 1101097cf2ee2Smrg LINTLIB=llib-l$1.ln 1101197cf2ee2Smrg if test "x$LINT" = "x"; then 1101297cf2ee2Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1101397cf2ee2Smrg fi 1101497cf2ee2Smrgelif test "x$make_lint_lib" != x"no" ; then 1101597cf2ee2Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1101697cf2ee2Smrgfi 110176e7d3316Smrg 1101897cf2ee2SmrgAC_SUBST(LINTLIB) 1101997cf2ee2SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 110206e7d3316Smrg 1102197cf2ee2Smrg]) # XORG_LINT_LIBRARY 1102297cf2ee2Smrg 1102397cf2ee2Smrg# XORG_COMPILER_BRAND 1102497cf2ee2Smrg# ------------------- 1102597cf2ee2Smrg# Minimum version: 1.14.0 1102697cf2ee2Smrg# 1102797cf2ee2Smrg# Checks for various brands of compilers and sets flags as appropriate: 1102897cf2ee2Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1102997cf2ee2Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1103097cf2ee2Smrg# clang compiler - sets CLANGCC to "yes" 1103197cf2ee2Smrg# Intel compiler - sets INTELCC to "yes" 1103297cf2ee2Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1103397cf2ee2Smrg# 1103497cf2ee2SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1103597cf2ee2SmrgAC_LANG_CASE( 1103697cf2ee2Smrg [C], [ 1103797cf2ee2Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1103897cf2ee2Smrg ], 1103997cf2ee2Smrg [C++], [ 1104097cf2ee2Smrg AC_REQUIRE([AC_PROG_CXX]) 1104197cf2ee2Smrg ] 1104297cf2ee2Smrg) 1104397cf2ee2SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1104497cf2ee2SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1104597cf2ee2SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1104697cf2ee2Smrg]) # XORG_COMPILER_BRAND 11047a966c04fSmrg 1104897cf2ee2Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1104997cf2ee2Smrg# --------------- 1105097cf2ee2Smrg# Minimum version: 1.16.0 1105197cf2ee2Smrg# 1105297cf2ee2Smrg# Test if the compiler works when passed the given flag as a command line argument. 1105397cf2ee2Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1105497cf2ee2Smrg# next flag in the list until there are no more options. 1105597cf2ee2Smrg# 1105697cf2ee2Smrg# Note that this does not guarantee that the compiler supports the flag as some 1105797cf2ee2Smrg# compilers will simply ignore arguments that they do not understand, but we do 1105897cf2ee2Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1105997cf2ee2Smrg# -Werror=unused-command-line-argument 1106097cf2ee2Smrg# 1106197cf2ee2SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1106297cf2ee2Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1106397cf2ee2Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1106497cf2ee2Smrg 1106597cf2ee2SmrgAC_LANG_COMPILER_REQUIRE 1106697cf2ee2Smrg 1106797cf2ee2SmrgAC_LANG_CASE( 1106897cf2ee2Smrg [C], [ 1106997cf2ee2Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1107097cf2ee2Smrg define([PREFIX], [C]) 1107197cf2ee2Smrg ], 1107297cf2ee2Smrg [C++], [ 1107397cf2ee2Smrg define([PREFIX], [CXX]) 1107497cf2ee2Smrg ] 1107597cf2ee2Smrg) 11076a966c04fSmrg 1107797cf2ee2Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1107897cf2ee2Smrg 1107997cf2ee2Smrgif test "x$xorg_testset_unknown_warning_option" = "x" ; then 1108097cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1108197cf2ee2Smrg AC_CACHE_CHECK([if compiler supports -Werror=unknown-warning-option], 1108297cf2ee2Smrg xorg_cv_compiler_flag_unknown_warning_option, 1108397cf2ee2Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1108497cf2ee2Smrg [xorg_cv_compiler_flag_unknown_warning_option=yes], 1108597cf2ee2Smrg [xorg_cv_compiler_flag_unknown_warning_option=no])) 1108697cf2ee2Smrg xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option 1108797cf2ee2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1108897cf2ee2Smrgfi 11089a966c04fSmrg 1109097cf2ee2Smrgif test "x$xorg_testset_unused_command_line_argument" = "x" ; then 1109197cf2ee2Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1109297cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1109397cf2ee2Smrg fi 1109497cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1109597cf2ee2Smrg AC_CACHE_CHECK([if compiler supports -Werror=unused-command-line-argument], 1109697cf2ee2Smrg xorg_cv_compiler_flag_unused_command_line_argument, 1109797cf2ee2Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1109897cf2ee2Smrg [xorg_cv_compiler_flag_unused_command_line_argument=yes], 1109997cf2ee2Smrg [xorg_cv_compiler_flag_unused_command_line_argument=no])) 1110097cf2ee2Smrg xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument 1110197cf2ee2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1110297cf2ee2Smrgfi 111032e2dd055Smrg 1110497cf2ee2Smrgfound="no" 1110597cf2ee2Smrgm4_foreach([flag], m4_cdr($@), [ 1110697cf2ee2Smrg if test $found = "no" ; then 1110797cf2ee2Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1110897cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1110997cf2ee2Smrg fi 1111097cf2ee2Smrg 1111197cf2ee2Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 1111297cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1111397cf2ee2Smrg fi 1111497cf2ee2Smrg 1111597cf2ee2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1111697cf2ee2Smrg 1111797cf2ee2Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1111897cf2ee2Smrg AC_MSG_CHECKING([if $CC supports ]flag[]) 1111997cf2ee2Smrg cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])` 1112097cf2ee2Smrg AC_CACHE_VAL(AS_TR_SH($cacheid), 1112197cf2ee2Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1112297cf2ee2Smrg [eval AS_TR_SH($cacheid)=yes], 1112397cf2ee2Smrg [eval AS_TR_SH($cacheid)=no])]) 1112497cf2ee2Smrg 1112597cf2ee2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1112697cf2ee2Smrg 1112797cf2ee2Smrg eval supported=$AS_TR_SH($cacheid) 1112897cf2ee2Smrg AC_MSG_RESULT([$supported]) 1112997cf2ee2Smrg if test "$supported" = "yes" ; then 1113097cf2ee2Smrg $1="$$1 ]flag[" 1113197cf2ee2Smrg found="yes" 1113297cf2ee2Smrg fi 1113397cf2ee2Smrg fi 1113497cf2ee2Smrg]) 1113597cf2ee2Smrg]) # XORG_TESTSET_CFLAG 111362e2dd055Smrg 1113797cf2ee2Smrg# XORG_COMPILER_FLAGS 1113897cf2ee2Smrg# --------------- 1113997cf2ee2Smrg# Minimum version: 1.16.0 1114097cf2ee2Smrg# 1114197cf2ee2Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1114297cf2ee2Smrg# arguments supported by the selected compiler which do NOT alter the generated 1114397cf2ee2Smrg# code. These arguments will cause the compiler to print various warnings 1114497cf2ee2Smrg# during compilation AND turn a conservative set of warnings into errors. 1114597cf2ee2Smrg# 1114697cf2ee2Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1114797cf2ee2Smrg# future versions of util-macros as options are added to new compilers. 1114897cf2ee2Smrg# 1114997cf2ee2SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1115097cf2ee2SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1115197cf2ee2Smrg 1115297cf2ee2SmrgAC_ARG_ENABLE(selective-werror, 1115397cf2ee2Smrg AS_HELP_STRING([--disable-selective-werror], 1115497cf2ee2Smrg [Turn off selective compiler errors. (default: enabled)]), 1115597cf2ee2Smrg [SELECTIVE_WERROR=$enableval], 1115697cf2ee2Smrg [SELECTIVE_WERROR=yes]) 1115797cf2ee2Smrg 1115897cf2ee2SmrgAC_LANG_CASE( 1115997cf2ee2Smrg [C], [ 1116097cf2ee2Smrg define([PREFIX], [C]) 1116197cf2ee2Smrg ], 1116297cf2ee2Smrg [C++], [ 1116397cf2ee2Smrg define([PREFIX], [CXX]) 1116497cf2ee2Smrg ] 1116597cf2ee2Smrg) 1116697cf2ee2Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1116797cf2ee2Smrgif test "x$SUNCC" = "xyes"; then 1116897cf2ee2Smrg [BASE_]PREFIX[FLAGS]="-v" 1116997cf2ee2Smrgelse 1117097cf2ee2Smrg [BASE_]PREFIX[FLAGS]="" 1117197cf2ee2Smrgfi 11172a966c04fSmrg 1117397cf2ee2Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1117497cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1117597cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1117697cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1117797cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1117897cf2ee2Smrg 1117997cf2ee2SmrgAC_LANG_CASE( 1118097cf2ee2Smrg [C], [ 1118197cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1118297cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1118397cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1118497cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1118597cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 1118697cf2ee2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1118797cf2ee2Smrg ] 1118897cf2ee2Smrg) 11189a966c04fSmrg 1119097cf2ee2Smrg# This chunk adds additional warnings that could catch undesired effects. 1119197cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1119297cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1119397cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1119497cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1119597cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1119697cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1119797cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1119897cf2ee2Smrg 1119997cf2ee2Smrg# These are currently disabled because they are noisy. They will be enabled 1120097cf2ee2Smrg# in the future once the codebase is sufficiently modernized to silence 1120197cf2ee2Smrg# them. For now, I don't want them to drown out the other warnings. 1120297cf2ee2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1120397cf2ee2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1120497cf2ee2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1120597cf2ee2Smrg 1120697cf2ee2Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1120797cf2ee2Smrg# when there are problems that should be fixed. 1120897cf2ee2Smrg 1120997cf2ee2Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1121097cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1121197cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1121297cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1121397cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1121497cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1121597cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1121697cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1121797cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1121897cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1121997cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1122097cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1122197cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1122297cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1122397cf2ee2Smrgelse 1122497cf2ee2SmrgAC_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]) 1122597cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1122697cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1122797cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1122897cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1122997cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1123097cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1123197cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1123297cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1123397cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1123497cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1123597cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1123697cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1123797cf2ee2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1123897cf2ee2Smrgfi 11239a966c04fSmrg 1124097cf2ee2SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1124197cf2ee2Smrg]) # XORG_COMPILER_FLAGS 112422e2dd055Smrg 1124397cf2ee2Smrg# XORG_CWARNFLAGS 1124497cf2ee2Smrg# --------------- 1124597cf2ee2Smrg# Minimum version: 1.2.0 1124697cf2ee2Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 112476e7d3316Smrg# 1124897cf2ee2Smrg# Defines CWARNFLAGS to enable C compiler warnings. 112496e7d3316Smrg# 1125097cf2ee2Smrg# This function is deprecated because it defines -fno-strict-aliasing 1125197cf2ee2Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1125297cf2ee2Smrg# is needed, then it should be added explicitly in the module when 1125397cf2ee2Smrg# it is updated to use BASE_CFLAGS. 1125497cf2ee2Smrg# 1125597cf2ee2SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1125697cf2ee2SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1125797cf2ee2SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1125897cf2ee2SmrgAC_LANG_CASE( 1125997cf2ee2Smrg [C], [ 1126097cf2ee2Smrg CWARNFLAGS="$BASE_CFLAGS" 1126197cf2ee2Smrg if test "x$GCC" = xyes ; then 1126297cf2ee2Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1126397cf2ee2Smrg fi 1126497cf2ee2Smrg AC_SUBST(CWARNFLAGS) 1126597cf2ee2Smrg ] 1126697cf2ee2Smrg) 1126797cf2ee2Smrg]) # XORG_CWARNFLAGS 11268a966c04fSmrg 1126997cf2ee2Smrg# XORG_STRICT_OPTION 1127097cf2ee2Smrg# ----------------------- 1127197cf2ee2Smrg# Minimum version: 1.3.0 1127297cf2ee2Smrg# 1127397cf2ee2Smrg# Add configure option to enable strict compilation flags, such as treating 1127497cf2ee2Smrg# warnings as fatal errors. 1127597cf2ee2Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1127697cf2ee2Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1127797cf2ee2Smrg# 1127897cf2ee2Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1127997cf2ee2Smrg# when strict compilation is unconditionally desired. 1128097cf2ee2SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1128197cf2ee2SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1128297cf2ee2SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 112832e2dd055Smrg 1128497cf2ee2SmrgAC_ARG_ENABLE(strict-compilation, 1128597cf2ee2Smrg AS_HELP_STRING([--enable-strict-compilation], 1128697cf2ee2Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1128797cf2ee2Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 112882e2dd055Smrg 1128997cf2ee2SmrgAC_LANG_CASE( 1129097cf2ee2Smrg [C], [ 1129197cf2ee2Smrg define([PREFIX], [C]) 1129297cf2ee2Smrg ], 1129397cf2ee2Smrg [C++], [ 1129497cf2ee2Smrg define([PREFIX], [CXX]) 1129597cf2ee2Smrg ] 1129697cf2ee2Smrg) 11297a966c04fSmrg 1129897cf2ee2Smrg[STRICT_]PREFIX[FLAGS]="" 1129997cf2ee2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1130097cf2ee2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11301a966c04fSmrg 1130297cf2ee2Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1130397cf2ee2Smrg# activate it with -Werror, so we add it here explicitly. 1130497cf2ee2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11305a966c04fSmrg 1130697cf2ee2Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1130797cf2ee2Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1130897cf2ee2Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1130997cf2ee2Smrgfi 1131097cf2ee2SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1131197cf2ee2SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1131297cf2ee2SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1131397cf2ee2Smrg]) # XORG_STRICT_OPTION 113146e7d3316Smrg 1131597cf2ee2Smrg# XORG_DEFAULT_OPTIONS 1131697cf2ee2Smrg# -------------------- 1131797cf2ee2Smrg# Minimum version: 1.3.0 113186e7d3316Smrg# 1131997cf2ee2Smrg# Defines default options for X.Org modules. 113206e7d3316Smrg# 1132197cf2ee2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1132297cf2ee2SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1132397cf2ee2SmrgXORG_COMPILER_FLAGS 1132497cf2ee2SmrgXORG_CWARNFLAGS 1132597cf2ee2SmrgXORG_STRICT_OPTION 1132697cf2ee2SmrgXORG_RELEASE_VERSION 1132797cf2ee2SmrgXORG_CHANGELOG 1132897cf2ee2SmrgXORG_INSTALL 1132997cf2ee2SmrgXORG_MANPAGE_SECTIONS 1133097cf2ee2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1133197cf2ee2Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1133297cf2ee2Smrg]) # XORG_DEFAULT_OPTIONS 1133397cf2ee2Smrg 1133497cf2ee2Smrg# XORG_INSTALL() 1133597cf2ee2Smrg# ---------------- 1133697cf2ee2Smrg# Minimum version: 1.4.0 113376e7d3316Smrg# 1133897cf2ee2Smrg# Defines the variable INSTALL_CMD as the command to copy 1133997cf2ee2Smrg# INSTALL from $prefix/share/util-macros. 113406e7d3316Smrg# 1134197cf2ee2SmrgAC_DEFUN([XORG_INSTALL], [ 1134297cf2ee2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1134397cf2ee2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1134497cf2ee2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1134597cf2ee2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1134697cf2ee2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1134797cf2ee2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1134897cf2ee2SmrgAC_SUBST([INSTALL_CMD]) 1134997cf2ee2Smrg]) # XORG_INSTALL 1135097cf2ee2Smrgdnl Copyright 2005 Red Hat, Inc 1135197cf2ee2Smrgdnl 1135297cf2ee2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1135397cf2ee2Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1135497cf2ee2Smrgdnl the above copyright notice appear in all copies and that both that 1135597cf2ee2Smrgdnl copyright notice and this permission notice appear in supporting 1135697cf2ee2Smrgdnl documentation. 1135797cf2ee2Smrgdnl 1135897cf2ee2Smrgdnl The above copyright notice and this permission notice shall be included 1135997cf2ee2Smrgdnl in all copies or substantial portions of the Software. 1136097cf2ee2Smrgdnl 1136197cf2ee2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1136297cf2ee2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1136397cf2ee2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1136497cf2ee2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1136597cf2ee2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1136697cf2ee2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1136797cf2ee2Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1136897cf2ee2Smrgdnl 1136997cf2ee2Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1137097cf2ee2Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1137197cf2ee2Smrgdnl other dealings in this Software without prior written authorization 1137297cf2ee2Smrgdnl from the copyright holders. 1137397cf2ee2Smrgdnl 113746e7d3316Smrg 1137597cf2ee2Smrg# XORG_RELEASE_VERSION 1137697cf2ee2Smrg# -------------------- 1137797cf2ee2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1137897cf2ee2Smrg 1137997cf2ee2SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1138097cf2ee2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1138197cf2ee2Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1138297cf2ee2Smrg [Major version of this package]) 1138397cf2ee2Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1138497cf2ee2Smrg if test "x$PVM" = "x"; then 1138597cf2ee2Smrg PVM="0" 1138697cf2ee2Smrg fi 1138797cf2ee2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1138897cf2ee2Smrg [$PVM], 1138997cf2ee2Smrg [Minor version of this package]) 1139097cf2ee2Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1139197cf2ee2Smrg if test "x$PVP" = "x"; then 1139297cf2ee2Smrg PVP="0" 1139397cf2ee2Smrg fi 1139497cf2ee2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1139597cf2ee2Smrg [$PVP], 1139697cf2ee2Smrg [Patch version of this package]) 1139797cf2ee2Smrg]) 113986e7d3316Smrg 1139997cf2ee2Smrg# XORG_CHANGELOG() 1140097cf2ee2Smrg# ---------------- 1140197cf2ee2Smrg# Minimum version: 1.2.0 1140297cf2ee2Smrg# 1140397cf2ee2Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1140497cf2ee2Smrg# ChangeLog from git. 1140597cf2ee2Smrg# 1140697cf2ee2Smrg# 1140797cf2ee2SmrgAC_DEFUN([XORG_CHANGELOG], [ 1140897cf2ee2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1140997cf2ee2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1141097cf2ee2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1141197cf2ee2Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1141297cf2ee2SmrgAC_SUBST([CHANGELOG_CMD]) 1141397cf2ee2Smrg]) # XORG_CHANGELOG 11414a966c04fSmrg 11415