aclocal.m4 revision 249c3046
11477040fSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2444c061aSmrg 3444c061aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42ae83157Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5444c061aSmrg# This file is free software; the Free Software Foundation 6444c061aSmrg# gives unlimited permission to copy and/or distribute it, 7444c061aSmrg# with or without modifications, as long as this notice is preserved. 8444c061aSmrg 9444c061aSmrg# This program is distributed in the hope that it will be useful, 10444c061aSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11444c061aSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12444c061aSmrg# PARTICULAR PURPOSE. 13444c061aSmrg 142265a131Smrgm4_ifndef([AC_AUTOCONF_VERSION], 152265a131Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16249c3046Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 17249c3046Smrg[m4_warning([this file was generated for autoconf 2.68. 182265a131SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 192265a131SmrgIf you have problems, you may need to regenerate the build system entirely. 202265a131SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21444c061aSmrg 22249c3046Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23444c061aSmrg# 24249c3046Smrg# This file is free software; the Free Software Foundation 25249c3046Smrg# gives unlimited permission to copy and/or distribute it, 26249c3046Smrg# with or without modifications, as long as this notice is preserved. 27249c3046Smrg 28249c3046Smrg# AM_AUTOMAKE_VERSION(VERSION) 29249c3046Smrg# ---------------------------- 30249c3046Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31249c3046Smrg# generated from the m4 files accompanying Automake X.Y. 32249c3046Smrg# (This private macro should not be called outside this file.) 33249c3046SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 34249c3046Smrg[am__api_version='1.11' 35249c3046Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36249c3046Smrgdnl require some minimum version. Point them to the right macro. 37249c3046Smrgm4_if([$1], [1.11.1], [], 38249c3046Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39249c3046Smrg]) 40249c3046Smrg 41249c3046Smrg# _AM_AUTOCONF_VERSION(VERSION) 42249c3046Smrg# ----------------------------- 43249c3046Smrg# aclocal traces this macro to find the Autoconf version. 44249c3046Smrg# This is a private macro too. Using m4_define simplifies 45249c3046Smrg# the logic in aclocal, which can simply ignore this definition. 46249c3046Smrgm4_define([_AM_AUTOCONF_VERSION], []) 47249c3046Smrg 48249c3046Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49249c3046Smrg# ------------------------------- 50249c3046Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51249c3046Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52249c3046SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53249c3046Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 54249c3046Smrgm4_ifndef([AC_AUTOCONF_VERSION], 55249c3046Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56249c3046Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57249c3046Smrg 58249c3046Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59249c3046Smrg 60249c3046Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61444c061aSmrg# 62249c3046Smrg# This file is free software; the Free Software Foundation 63249c3046Smrg# gives unlimited permission to copy and/or distribute it, 64249c3046Smrg# with or without modifications, as long as this notice is preserved. 651477040fSmrg 66249c3046Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67249c3046Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68249c3046Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69444c061aSmrg# 70249c3046Smrg# Of course, Automake must honor this variable whenever it calls a 71249c3046Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 72249c3046Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73249c3046Smrg# depending on how configure is run. This is pretty annoying, since 74249c3046Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75249c3046Smrg# source directory, any form will work fine, but in subdirectories a 76249c3046Smrg# relative path needs to be adjusted first. 77444c061aSmrg# 78249c3046Smrg# $ac_aux_dir/missing 79249c3046Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 80249c3046Smrg# $top_srcdir/$ac_aux_dir/missing 81249c3046Smrg# fails if $ac_aux_dir is absolute, 82249c3046Smrg# fails when called from a subdirectory in a VPATH build with 83249c3046Smrg# a relative $ac_aux_dir 84444c061aSmrg# 85249c3046Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86249c3046Smrg# are both prefixed by $srcdir. In an in-source build this is usually 87249c3046Smrg# harmless because $srcdir is `.', but things will broke when you 88249c3046Smrg# start a VPATH build or use an absolute $srcdir. 89444c061aSmrg# 90249c3046Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91249c3046Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92249c3046Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93249c3046Smrg# and then we would define $MISSING as 94249c3046Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 95249c3046Smrg# This will work as long as MISSING is not called from configure, because 96249c3046Smrg# unfortunately $(top_srcdir) has no meaning in configure. 97249c3046Smrg# However there are other variables, like CC, which are often used in 98249c3046Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 992265a131Smrg# 100249c3046Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 101249c3046Smrg# absolute PATH. The drawback is that using absolute paths prevent a 102249c3046Smrg# configured tree to be moved without reconfiguration. 1031477040fSmrg 104249c3046SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 105249c3046Smrg[dnl Rely on autoconf to set up CDPATH properly. 106249c3046SmrgAC_PREREQ([2.50])dnl 107249c3046Smrg# expand $ac_aux_dir to an absolute path 108249c3046Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 1092265a131Smrg]) 110444c061aSmrg 111249c3046Smrg# AM_CONDITIONAL -*- Autoconf -*- 112444c061aSmrg 113249c3046Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114249c3046Smrg# Free Software Foundation, Inc. 115249c3046Smrg# 116249c3046Smrg# This file is free software; the Free Software Foundation 117249c3046Smrg# gives unlimited permission to copy and/or distribute it, 118249c3046Smrg# with or without modifications, as long as this notice is preserved. 119444c061aSmrg 120249c3046Smrg# serial 9 121444c061aSmrg 122249c3046Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 123249c3046Smrg# ------------------------------------- 124249c3046Smrg# Define a conditional. 125249c3046SmrgAC_DEFUN([AM_CONDITIONAL], 126249c3046Smrg[AC_PREREQ(2.52)dnl 127249c3046Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 128249c3046Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 129249c3046SmrgAC_SUBST([$1_TRUE])dnl 130249c3046SmrgAC_SUBST([$1_FALSE])dnl 131249c3046Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 132249c3046Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 133249c3046Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 134249c3046Smrgif $2; then 135249c3046Smrg $1_TRUE= 136249c3046Smrg $1_FALSE='#' 137249c3046Smrgelse 138249c3046Smrg $1_TRUE='#' 139249c3046Smrg $1_FALSE= 140249c3046Smrgfi 141249c3046SmrgAC_CONFIG_COMMANDS_PRE( 142249c3046Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143249c3046Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 144249c3046SmrgUsually this means the macro was only invoked conditionally.]]) 145249c3046Smrgfi])]) 146444c061aSmrg 147249c3046Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 148249c3046Smrg# Free Software Foundation, Inc. 149249c3046Smrg# 150249c3046Smrg# This file is free software; the Free Software Foundation 151249c3046Smrg# gives unlimited permission to copy and/or distribute it, 152249c3046Smrg# with or without modifications, as long as this notice is preserved. 153444c061aSmrg 154249c3046Smrg# serial 10 1552265a131Smrg 156249c3046Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157249c3046Smrg# written in clear, in which case automake, when reading aclocal.m4, 158249c3046Smrg# will think it sees a *use*, and therefore will trigger all it's 159249c3046Smrg# C support machinery. Also note that it means that autoscan, seeing 160249c3046Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1611477040fSmrg 1621477040fSmrg 163249c3046Smrg# _AM_DEPENDENCIES(NAME) 1642265a131Smrg# ---------------------- 165249c3046Smrg# See how the compiler implements dependency checking. 166249c3046Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167249c3046Smrg# We try a few techniques and use that to set a single cache variable. 168249c3046Smrg# 169249c3046Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170249c3046Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171249c3046Smrg# dependency, and given that the user is not expected to run this macro, 172249c3046Smrg# just rely on AC_PROG_CC. 173249c3046SmrgAC_DEFUN([_AM_DEPENDENCIES], 174249c3046Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175249c3046SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176249c3046SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177249c3046SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1781477040fSmrg 179249c3046Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180249c3046Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181249c3046Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 182249c3046Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183249c3046Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184249c3046Smrg [depcc="$$1" am_compiler_list=]) 1851477040fSmrg 186249c3046SmrgAC_CACHE_CHECK([dependency style of $depcc], 187249c3046Smrg [am_cv_$1_dependencies_compiler_type], 188249c3046Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189249c3046Smrg # We make a subdir and do the tests there. Otherwise we can end up 190249c3046Smrg # making bogus files that we don't know about and never remove. For 191249c3046Smrg # instance it was reported that on HP-UX the gcc test will end up 192249c3046Smrg # making a dummy file named `D' -- because `-MD' means `put the output 193249c3046Smrg # in D'. 194249c3046Smrg mkdir conftest.dir 195249c3046Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 196249c3046Smrg # using a relative directory. 197249c3046Smrg cp "$am_depcomp" conftest.dir 198249c3046Smrg cd conftest.dir 199249c3046Smrg # We will build objects and dependencies in a subdirectory because 200249c3046Smrg # it helps to detect inapplicable dependency modes. For instance 201249c3046Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 202249c3046Smrg # side effect of compilation, but ICC will put the dependencies in 203249c3046Smrg # the current directory while Tru64 will put them in the object 204249c3046Smrg # directory. 205249c3046Smrg mkdir sub 206444c061aSmrg 207249c3046Smrg am_cv_$1_dependencies_compiler_type=none 208249c3046Smrg if test "$am_compiler_list" = ""; then 209249c3046Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2102265a131Smrg fi 211249c3046Smrg am__universal=false 212249c3046Smrg m4_case([$1], [CC], 213249c3046Smrg [case " $depcc " in #( 214249c3046Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 215249c3046Smrg esac], 216249c3046Smrg [CXX], 217249c3046Smrg [case " $depcc " in #( 218249c3046Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 219249c3046Smrg esac]) 2201477040fSmrg 221249c3046Smrg for depmode in $am_compiler_list; do 222249c3046Smrg # Setup a source with many dependencies, because some compilers 223249c3046Smrg # like to wrap large dependency lists on column 80 (with \), and 224249c3046Smrg # we should not choose a depcomp mode which is confused by this. 225249c3046Smrg # 226249c3046Smrg # We need to recreate these files for each test, as the compiler may 227249c3046Smrg # overwrite some of them when testing with obscure command lines. 228249c3046Smrg # This happens at least with the AIX C compiler. 229249c3046Smrg : > sub/conftest.c 230249c3046Smrg for i in 1 2 3 4 5 6; do 231249c3046Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 232249c3046Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 233249c3046Smrg # Solaris 8's {/usr,}/bin/sh. 234249c3046Smrg touch sub/conftst$i.h 235249c3046Smrg done 236249c3046Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2371477040fSmrg 238249c3046Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 239249c3046Smrg # mode. It turns out that the SunPro C++ compiler does not properly 240249c3046Smrg # handle `-M -o', and we need to detect this. Also, some Intel 241249c3046Smrg # versions had trouble with output in subdirs 242249c3046Smrg am__obj=sub/conftest.${OBJEXT-o} 243249c3046Smrg am__minus_obj="-o $am__obj" 244249c3046Smrg case $depmode in 245249c3046Smrg gcc) 246249c3046Smrg # This depmode causes a compiler race in universal mode. 247249c3046Smrg test "$am__universal" = false || continue 248249c3046Smrg ;; 249249c3046Smrg nosideeffect) 250249c3046Smrg # after this tag, mechanisms are not by side-effect, so they'll 251249c3046Smrg # only be used when explicitly requested 252249c3046Smrg if test "x$enable_dependency_tracking" = xyes; then 253249c3046Smrg continue 254249c3046Smrg else 255249c3046Smrg break 256249c3046Smrg fi 257249c3046Smrg ;; 258249c3046Smrg msvisualcpp | msvcmsys) 259249c3046Smrg # This compiler won't grok `-c -o', but also, the minuso test has 260249c3046Smrg # not run yet. These depmodes are late enough in the game, and 261249c3046Smrg # so weak that their functioning should not be impacted. 262249c3046Smrg am__obj=conftest.${OBJEXT-o} 263249c3046Smrg am__minus_obj= 264249c3046Smrg ;; 265249c3046Smrg none) break ;; 266249c3046Smrg esac 267249c3046Smrg if depmode=$depmode \ 268249c3046Smrg source=sub/conftest.c object=$am__obj \ 269249c3046Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 270249c3046Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271249c3046Smrg >/dev/null 2>conftest.err && 272249c3046Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273249c3046Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 274249c3046Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275249c3046Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276249c3046Smrg # icc doesn't choke on unknown options, it will just issue warnings 277249c3046Smrg # or remarks (even with -Werror). So we grep stderr for any message 278249c3046Smrg # that says an option was ignored or not supported. 279249c3046Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 280249c3046Smrg # icc: Command line warning: ignoring option '-M'; no argument required 281249c3046Smrg # The diagnosis changed in icc 8.0: 282249c3046Smrg # icc: Command line remark: option '-MP' not supported 283249c3046Smrg if (grep 'ignoring option' conftest.err || 284249c3046Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285249c3046Smrg am_cv_$1_dependencies_compiler_type=$depmode 286249c3046Smrg break 287249c3046Smrg fi 288249c3046Smrg fi 289249c3046Smrg done 2901477040fSmrg 291249c3046Smrg cd .. 292249c3046Smrg rm -rf conftest.dir 293249c3046Smrgelse 294249c3046Smrg am_cv_$1_dependencies_compiler_type=none 295249c3046Smrgfi 296249c3046Smrg]) 297249c3046SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298249c3046SmrgAM_CONDITIONAL([am__fastdep$1], [ 299249c3046Smrg test "x$enable_dependency_tracking" != xno \ 300249c3046Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301249c3046Smrg]) 3021477040fSmrg 3031477040fSmrg 304249c3046Smrg# AM_SET_DEPDIR 305249c3046Smrg# ------------- 306249c3046Smrg# Choose a directory name for dependency files. 307249c3046Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308249c3046SmrgAC_DEFUN([AM_SET_DEPDIR], 309249c3046Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310249c3046SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311249c3046Smrg]) 3121477040fSmrg 3131477040fSmrg 314249c3046Smrg# AM_DEP_TRACK 315249c3046Smrg# ------------ 316249c3046SmrgAC_DEFUN([AM_DEP_TRACK], 317249c3046Smrg[AC_ARG_ENABLE(dependency-tracking, 318249c3046Smrg[ --disable-dependency-tracking speeds up one-time build 319249c3046Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 320249c3046Smrgif test "x$enable_dependency_tracking" != xno; then 321249c3046Smrg am_depcomp="$ac_aux_dir/depcomp" 322249c3046Smrg AMDEPBACKSLASH='\' 323249c3046Smrgfi 324249c3046SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 325249c3046SmrgAC_SUBST([AMDEPBACKSLASH])dnl 326249c3046Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327249c3046Smrg]) 3281477040fSmrg 329249c3046Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3301477040fSmrg 331249c3046Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 332249c3046Smrg# Free Software Foundation, Inc. 333249c3046Smrg# 334249c3046Smrg# This file is free software; the Free Software Foundation 335249c3046Smrg# gives unlimited permission to copy and/or distribute it, 336249c3046Smrg# with or without modifications, as long as this notice is preserved. 3371477040fSmrg 338249c3046Smrg#serial 5 3391477040fSmrg 340249c3046Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3411477040fSmrg# ------------------------------ 342249c3046SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 343249c3046Smrg[{ 344249c3046Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 345249c3046Smrg # are listed without --file. Let's play safe and only enable the eval 346249c3046Smrg # if we detect the quoting. 347249c3046Smrg case $CONFIG_FILES in 348249c3046Smrg *\'*) eval set x "$CONFIG_FILES" ;; 349249c3046Smrg *) set x $CONFIG_FILES ;; 350249c3046Smrg esac 351249c3046Smrg shift 352249c3046Smrg for mf 353249c3046Smrg do 354249c3046Smrg # Strip MF so we end up with the name of the file. 355249c3046Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 356249c3046Smrg # Check whether this is an Automake generated Makefile or not. 357249c3046Smrg # We used to match only the files named `Makefile.in', but 358249c3046Smrg # some people rename them; so instead we look at the file content. 359249c3046Smrg # Grep'ing the first line is not enough: some people post-process 360249c3046Smrg # each Makefile.in and add a new line on top of each file to say so. 361249c3046Smrg # Grep'ing the whole file is not good either: AIX grep has a line 362249c3046Smrg # limit of 2048, but all sed's we know have understand at least 4000. 363249c3046Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 364249c3046Smrg dirpart=`AS_DIRNAME("$mf")` 365249c3046Smrg else 366249c3046Smrg continue 367249c3046Smrg fi 368249c3046Smrg # Extract the definition of DEPDIR, am__include, and am__quote 369249c3046Smrg # from the Makefile without running `make'. 370249c3046Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 371249c3046Smrg test -z "$DEPDIR" && continue 372249c3046Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 373249c3046Smrg test -z "am__include" && continue 374249c3046Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 375249c3046Smrg # When using ansi2knr, U may be empty or an underscore; expand it 376249c3046Smrg U=`sed -n 's/^U = //p' < "$mf"` 377249c3046Smrg # Find all dependency output files, they are included files with 378249c3046Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 379249c3046Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 380249c3046Smrg # expansion. 381249c3046Smrg for file in `sed -n " 382249c3046Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383249c3046Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 384249c3046Smrg # Make sure the directory exists. 385249c3046Smrg test -f "$dirpart/$file" && continue 386249c3046Smrg fdir=`AS_DIRNAME(["$file"])` 387249c3046Smrg AS_MKDIR_P([$dirpart/$fdir]) 388249c3046Smrg # echo "creating $dirpart/$file" 389249c3046Smrg echo '# dummy' > "$dirpart/$file" 390249c3046Smrg done 391249c3046Smrg done 392249c3046Smrg} 393249c3046Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3941477040fSmrg 3951477040fSmrg 396249c3046Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397249c3046Smrg# ----------------------------- 398249c3046Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 399249c3046Smrg# 400249c3046Smrg# This code is only required when automatic dependency tracking 401249c3046Smrg# is enabled. FIXME. This creates each `.P' file that we will 402249c3046Smrg# need in order to bootstrap the dependency handling code. 403249c3046SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404249c3046Smrg[AC_CONFIG_COMMANDS([depfiles], 405249c3046Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406249c3046Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4072ae83157Smrg]) 4081477040fSmrg 409249c3046Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 410249c3046Smrg# Free Software Foundation, Inc. 411249c3046Smrg# 412249c3046Smrg# This file is free software; the Free Software Foundation 413249c3046Smrg# gives unlimited permission to copy and/or distribute it, 414249c3046Smrg# with or without modifications, as long as this notice is preserved. 4151477040fSmrg 416249c3046Smrg# serial 8 4171477040fSmrg 418249c3046Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 419249c3046SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 4201477040fSmrg 421249c3046Smrg# Do all the work for Automake. -*- Autoconf -*- 4221477040fSmrg 423249c3046Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 424249c3046Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 425249c3046Smrg# 426249c3046Smrg# This file is free software; the Free Software Foundation 427249c3046Smrg# gives unlimited permission to copy and/or distribute it, 428249c3046Smrg# with or without modifications, as long as this notice is preserved. 4291477040fSmrg 430249c3046Smrg# serial 16 4312265a131Smrg 432249c3046Smrg# This macro actually does too much. Some checks are only needed if 433249c3046Smrg# your package does certain things. But this isn't really a big deal. 4342265a131Smrg 435249c3046Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 436249c3046Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 437249c3046Smrg# ----------------------------------------------- 438249c3046Smrg# The call with PACKAGE and VERSION arguments is the old style 439249c3046Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 440249c3046Smrg# and VERSION should now be passed to AC_INIT and removed from 441249c3046Smrg# the call to AM_INIT_AUTOMAKE. 442249c3046Smrg# We support both call styles for the transition. After 443249c3046Smrg# the next Automake release, Autoconf can make the AC_INIT 444249c3046Smrg# arguments mandatory, and then we can depend on a new Autoconf 445249c3046Smrg# release and drop the old call support. 446249c3046SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 447249c3046Smrg[AC_PREREQ([2.62])dnl 448249c3046Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 449249c3046Smrgdnl the ones we care about. 450249c3046Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 451249c3046SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 452249c3046SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 453249c3046Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 454249c3046Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 455249c3046Smrg # is not polluted with repeated "-I." 456249c3046Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 457249c3046Smrg # test to see if srcdir already configured 458249c3046Smrg if test -f $srcdir/config.status; then 459249c3046Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 460249c3046Smrg fi 461249c3046Smrgfi 4621477040fSmrg 463249c3046Smrg# test whether we have cygpath 464249c3046Smrgif test -z "$CYGPATH_W"; then 465249c3046Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 466249c3046Smrg CYGPATH_W='cygpath -w' 467249c3046Smrg else 468249c3046Smrg CYGPATH_W=echo 469249c3046Smrg fi 470249c3046Smrgfi 471249c3046SmrgAC_SUBST([CYGPATH_W]) 4721477040fSmrg 473249c3046Smrg# Define the identity of the package. 474249c3046Smrgdnl Distinguish between old-style and new-style calls. 475249c3046Smrgm4_ifval([$2], 476249c3046Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 477249c3046Smrg AC_SUBST([PACKAGE], [$1])dnl 478249c3046Smrg AC_SUBST([VERSION], [$2])], 479249c3046Smrg[_AM_SET_OPTIONS([$1])dnl 480249c3046Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 481249c3046Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 482249c3046Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 483249c3046Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 484249c3046Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4851477040fSmrg 486249c3046Smrg_AM_IF_OPTION([no-define],, 487249c3046Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 488249c3046Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4891477040fSmrg 490249c3046Smrg# Some tools Automake needs. 491249c3046SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 492249c3046SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 493249c3046SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 494249c3046SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 495249c3046SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 496249c3046SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 497249c3046SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 498249c3046SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 499249c3046SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 500249c3046SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 501249c3046Smrg# We need awk for the "check" target. The system "awk" is bad on 502249c3046Smrg# some platforms. 503249c3046SmrgAC_REQUIRE([AC_PROG_AWK])dnl 504249c3046SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 505249c3046SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 506249c3046Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507249c3046Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508249c3046Smrg [_AM_PROG_TAR([v7])])]) 509249c3046Smrg_AM_IF_OPTION([no-dependencies],, 510249c3046Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 511249c3046Smrg [_AM_DEPENDENCIES(CC)], 512249c3046Smrg [define([AC_PROG_CC], 513249c3046Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 514249c3046SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 515249c3046Smrg [_AM_DEPENDENCIES(CXX)], 516249c3046Smrg [define([AC_PROG_CXX], 517249c3046Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 518249c3046SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 519249c3046Smrg [_AM_DEPENDENCIES(OBJC)], 520249c3046Smrg [define([AC_PROG_OBJC], 521249c3046Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 522249c3046Smrg]) 523249c3046Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 524249c3046Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 525249c3046Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 526249c3046Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 527249c3046SmrgAC_CONFIG_COMMANDS_PRE(dnl 528249c3046Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 529249c3046Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5302ae83157Smrg]) 5312265a131Smrg 532249c3046Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 533249c3046Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 534249c3046Smrgdnl mangled by Autoconf and run in a shell conditional statement. 535249c3046Smrgm4_define([_AC_COMPILER_EXEEXT], 536249c3046Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5371477040fSmrg 5381477040fSmrg 539249c3046Smrg# When config.status generates a header, we must update the stamp-h file. 540249c3046Smrg# This file resides in the same directory as the config header 541249c3046Smrg# that is generated. The stamp files are numbered to have different names. 5421477040fSmrg 543249c3046Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 544249c3046Smrg# loop where config.status creates the headers, so we can generate 545249c3046Smrg# our stamp files there. 546249c3046SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 547249c3046Smrg[# Compute $1's index in $config_headers. 548249c3046Smrg_am_arg=$1 549249c3046Smrg_am_stamp_count=1 550249c3046Smrgfor _am_header in $config_headers :; do 551249c3046Smrg case $_am_header in 552249c3046Smrg $_am_arg | $_am_arg:* ) 553249c3046Smrg break ;; 554249c3046Smrg * ) 555249c3046Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 556249c3046Smrg esac 557249c3046Smrgdone 558249c3046Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5591477040fSmrg 560249c3046Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 561249c3046Smrg# 562249c3046Smrg# This file is free software; the Free Software Foundation 563249c3046Smrg# gives unlimited permission to copy and/or distribute it, 564249c3046Smrg# with or without modifications, as long as this notice is preserved. 5651477040fSmrg 566249c3046Smrg# AM_PROG_INSTALL_SH 567249c3046Smrg# ------------------ 568249c3046Smrg# Define $install_sh. 569249c3046SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 570249c3046Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 571249c3046Smrgif test x"${install_sh}" != xset; then 572249c3046Smrg case $am_aux_dir in 573249c3046Smrg *\ * | *\ *) 574249c3046Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 575249c3046Smrg *) 576249c3046Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 577249c3046Smrg esac 578249c3046Smrgfi 579249c3046SmrgAC_SUBST(install_sh)]) 5801477040fSmrg 581249c3046Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 582249c3046Smrg# 583249c3046Smrg# This file is free software; the Free Software Foundation 584249c3046Smrg# gives unlimited permission to copy and/or distribute it, 585249c3046Smrg# with or without modifications, as long as this notice is preserved. 5862265a131Smrg 587249c3046Smrg# serial 2 5882265a131Smrg 589249c3046Smrg# Check whether the underlying file-system supports filenames 590249c3046Smrg# with a leading dot. For instance MS-DOS doesn't. 591249c3046SmrgAC_DEFUN([AM_SET_LEADING_DOT], 592249c3046Smrg[rm -rf .tst 2>/dev/null 593249c3046Smrgmkdir .tst 2>/dev/null 594249c3046Smrgif test -d .tst; then 595249c3046Smrg am__leading_dot=. 596249c3046Smrgelse 597249c3046Smrg am__leading_dot=_ 598249c3046Smrgfi 599249c3046Smrgrmdir .tst 2>/dev/null 600249c3046SmrgAC_SUBST([am__leading_dot])]) 6012265a131Smrg 602249c3046Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 603249c3046Smrg# From Jim Meyering 6042265a131Smrg 605249c3046Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 606249c3046Smrg# Free Software Foundation, Inc. 6071477040fSmrg# 608249c3046Smrg# This file is free software; the Free Software Foundation 609249c3046Smrg# gives unlimited permission to copy and/or distribute it, 610249c3046Smrg# with or without modifications, as long as this notice is preserved. 6112265a131Smrg 612249c3046Smrg# serial 5 6132265a131Smrg 614249c3046Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 615249c3046Smrg# ---------------------------------- 616249c3046Smrg# Control maintainer-specific portions of Makefiles. 617249c3046Smrg# Default is to disable them, unless `enable' is passed literally. 618249c3046Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 619249c3046Smrg# can override the default with the --enable/--disable switch. 620249c3046SmrgAC_DEFUN([AM_MAINTAINER_MODE], 621249c3046Smrg[m4_case(m4_default([$1], [disable]), 622249c3046Smrg [enable], [m4_define([am_maintainer_other], [disable])], 623249c3046Smrg [disable], [m4_define([am_maintainer_other], [enable])], 624249c3046Smrg [m4_define([am_maintainer_other], [enable]) 625249c3046Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 626249c3046SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 627249c3046Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 628249c3046Smrg AC_ARG_ENABLE([maintainer-mode], 629249c3046Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 630249c3046Smrg (and sometimes confusing) to the casual installer], 631249c3046Smrg [USE_MAINTAINER_MODE=$enableval], 632249c3046Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633249c3046Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 634249c3046Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635249c3046Smrg MAINT=$MAINTAINER_MODE_TRUE 636249c3046Smrg AC_SUBST([MAINT])dnl 637249c3046Smrg] 638249c3046Smrg) 639444c061aSmrg 640249c3046SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6411477040fSmrg 642249c3046Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 643444c061aSmrg 644249c3046Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 645249c3046Smrg# 646249c3046Smrg# This file is free software; the Free Software Foundation 647249c3046Smrg# gives unlimited permission to copy and/or distribute it, 648249c3046Smrg# with or without modifications, as long as this notice is preserved. 649444c061aSmrg 650249c3046Smrg# serial 4 651444c061aSmrg 652249c3046Smrg# AM_MAKE_INCLUDE() 653249c3046Smrg# ----------------- 654249c3046Smrg# Check to see how make treats includes. 655249c3046SmrgAC_DEFUN([AM_MAKE_INCLUDE], 656249c3046Smrg[am_make=${MAKE-make} 657249c3046Smrgcat > confinc << 'END' 658249c3046Smrgam__doit: 659249c3046Smrg @echo this is the am__doit target 660249c3046Smrg.PHONY: am__doit 661249c3046SmrgEND 662249c3046Smrg# If we don't find an include directive, just comment out the code. 663249c3046SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 664249c3046Smrgam__include="#" 665249c3046Smrgam__quote= 666249c3046Smrg_am_result=none 667249c3046Smrg# First try GNU make style include. 668249c3046Smrgecho "include confinc" > confmf 669249c3046Smrg# Ignore all kinds of additional output from `make'. 670249c3046Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 671249c3046Smrg*the\ am__doit\ target*) 672249c3046Smrg am__include=include 673249c3046Smrg am__quote= 674249c3046Smrg _am_result=GNU 675249c3046Smrg ;; 676249c3046Smrgesac 677249c3046Smrg# Now try BSD make style include. 678249c3046Smrgif test "$am__include" = "#"; then 679249c3046Smrg echo '.include "confinc"' > confmf 680249c3046Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 681249c3046Smrg *the\ am__doit\ target*) 682249c3046Smrg am__include=.include 683249c3046Smrg am__quote="\"" 684249c3046Smrg _am_result=BSD 685249c3046Smrg ;; 686249c3046Smrg esac 687249c3046Smrgfi 688249c3046SmrgAC_SUBST([am__include]) 689249c3046SmrgAC_SUBST([am__quote]) 690249c3046SmrgAC_MSG_RESULT([$_am_result]) 691249c3046Smrgrm -f confinc confmf 692249c3046Smrg]) 693444c061aSmrg 694249c3046Smrg# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 695249c3046Smrg# Free Software Foundation, Inc. 696249c3046Smrg# 697249c3046Smrg# This file is free software; the Free Software Foundation 698249c3046Smrg# gives unlimited permission to copy and/or distribute it, 699249c3046Smrg# with or without modifications, as long as this notice is preserved. 700444c061aSmrg 701249c3046Smrg# serial 6 702444c061aSmrg 703249c3046Smrg# AM_PROG_CC_C_O 704249c3046Smrg# -------------- 705249c3046Smrg# Like AC_PROG_CC_C_O, but changed for automake. 706249c3046SmrgAC_DEFUN([AM_PROG_CC_C_O], 707249c3046Smrg[AC_REQUIRE([AC_PROG_CC_C_O])dnl 708249c3046SmrgAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 709249c3046SmrgAC_REQUIRE_AUX_FILE([compile])dnl 710249c3046Smrg# FIXME: we rely on the cache variable name because 711249c3046Smrg# there is no other way. 712249c3046Smrgset dummy $CC 713249c3046Smrgam_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` 714249c3046Smrgeval am_t=\$ac_cv_prog_cc_${am_cc}_c_o 715249c3046Smrgif test "$am_t" != yes; then 716249c3046Smrg # Losing compiler, so override with the script. 717249c3046Smrg # FIXME: It is wrong to rewrite CC. 718249c3046Smrg # But if we don't then we get into trouble of one sort or another. 719249c3046Smrg # A longer-term fix would be to have automake use am__CC in this case, 720249c3046Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 721249c3046Smrg CC="$am_aux_dir/compile $CC" 722249c3046Smrgfi 723249c3046Smrgdnl Make sure AC_PROG_CC is never called again, or it will override our 724249c3046Smrgdnl setting of CC. 725249c3046Smrgm4_define([AC_PROG_CC], 726249c3046Smrg [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) 727249c3046Smrg]) 728444c061aSmrg 729249c3046Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 730444c061aSmrg 731249c3046Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 732249c3046Smrg# Free Software Foundation, Inc. 733249c3046Smrg# 734249c3046Smrg# This file is free software; the Free Software Foundation 735249c3046Smrg# gives unlimited permission to copy and/or distribute it, 736249c3046Smrg# with or without modifications, as long as this notice is preserved. 7371477040fSmrg 738249c3046Smrg# serial 6 739444c061aSmrg 740249c3046Smrg# AM_MISSING_PROG(NAME, PROGRAM) 741249c3046Smrg# ------------------------------ 742249c3046SmrgAC_DEFUN([AM_MISSING_PROG], 743249c3046Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 744249c3046Smrg$1=${$1-"${am_missing_run}$2"} 745249c3046SmrgAC_SUBST($1)]) 7462265a131Smrg 7471477040fSmrg 748249c3046Smrg# AM_MISSING_HAS_RUN 749249c3046Smrg# ------------------ 750249c3046Smrg# Define MISSING if not defined so far and test if it supports --run. 751249c3046Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 752249c3046SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 753249c3046Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 754249c3046SmrgAC_REQUIRE_AUX_FILE([missing])dnl 755249c3046Smrgif test x"${MISSING+set}" != xset; then 756249c3046Smrg case $am_aux_dir in 757249c3046Smrg *\ * | *\ *) 758249c3046Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 759249c3046Smrg *) 760249c3046Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 761249c3046Smrg esac 762249c3046Smrgfi 763249c3046Smrg# Use eval to expand $SHELL 764249c3046Smrgif eval "$MISSING --run true"; then 765249c3046Smrg am_missing_run="$MISSING --run " 766249c3046Smrgelse 767249c3046Smrg am_missing_run= 768249c3046Smrg AC_MSG_WARN([`missing' script is too old or missing]) 769249c3046Smrgfi 770249c3046Smrg]) 7712265a131Smrg 772249c3046Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 773249c3046Smrg# 774249c3046Smrg# This file is free software; the Free Software Foundation 775249c3046Smrg# gives unlimited permission to copy and/or distribute it, 776249c3046Smrg# with or without modifications, as long as this notice is preserved. 7771477040fSmrg 778249c3046Smrg# AM_PROG_MKDIR_P 779249c3046Smrg# --------------- 780249c3046Smrg# Check for `mkdir -p'. 781249c3046SmrgAC_DEFUN([AM_PROG_MKDIR_P], 782249c3046Smrg[AC_PREREQ([2.60])dnl 783249c3046SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 784249c3046Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 785249c3046Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 786249c3046Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 787249c3046Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 788249c3046Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 789249c3046Smrgdnl adjustment using top_builddir (which is defined more often than 790249c3046Smrgdnl MKDIR_P). 791249c3046SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 792249c3046Smrgcase $mkdir_p in 793249c3046Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 794249c3046Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7951477040fSmrgesac 796444c061aSmrg]) 797444c061aSmrg 798249c3046Smrg# Helper functions for option handling. -*- Autoconf -*- 799444c061aSmrg 800249c3046Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 801249c3046Smrg# 802249c3046Smrg# This file is free software; the Free Software Foundation 803249c3046Smrg# gives unlimited permission to copy and/or distribute it, 804249c3046Smrg# with or without modifications, as long as this notice is preserved. 8051477040fSmrg 806249c3046Smrg# serial 4 8071477040fSmrg 808249c3046Smrg# _AM_MANGLE_OPTION(NAME) 809249c3046Smrg# ----------------------- 810249c3046SmrgAC_DEFUN([_AM_MANGLE_OPTION], 811249c3046Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 812444c061aSmrg 813249c3046Smrg# _AM_SET_OPTION(NAME) 814249c3046Smrg# ------------------------------ 815249c3046Smrg# Set option NAME. Presently that only means defining a flag for this option. 816249c3046SmrgAC_DEFUN([_AM_SET_OPTION], 817249c3046Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 818444c061aSmrg 819249c3046Smrg# _AM_SET_OPTIONS(OPTIONS) 820249c3046Smrg# ---------------------------------- 821249c3046Smrg# OPTIONS is a space-separated list of Automake options. 822249c3046SmrgAC_DEFUN([_AM_SET_OPTIONS], 823249c3046Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 8242265a131Smrg 825249c3046Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 826249c3046Smrg# ------------------------------------------- 827249c3046Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 828249c3046SmrgAC_DEFUN([_AM_IF_OPTION], 829249c3046Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 830444c061aSmrg 831249c3046Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8321477040fSmrg 833249c3046Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 834249c3046Smrg# Free Software Foundation, Inc. 835249c3046Smrg# 836249c3046Smrg# This file is free software; the Free Software Foundation 837249c3046Smrg# gives unlimited permission to copy and/or distribute it, 838249c3046Smrg# with or without modifications, as long as this notice is preserved. 8391477040fSmrg 840249c3046Smrg# serial 5 8411477040fSmrg 842249c3046Smrg# AM_SANITY_CHECK 843249c3046Smrg# --------------- 844249c3046SmrgAC_DEFUN([AM_SANITY_CHECK], 845249c3046Smrg[AC_MSG_CHECKING([whether build environment is sane]) 846249c3046Smrg# Just in case 847249c3046Smrgsleep 1 848249c3046Smrgecho timestamp > conftest.file 849249c3046Smrg# Reject unsafe characters in $srcdir or the absolute working directory 850249c3046Smrg# name. Accept space and tab only in the latter. 851249c3046Smrgam_lf=' 852249c3046Smrg' 853249c3046Smrgcase `pwd` in 854249c3046Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 855249c3046Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 856249c3046Smrgesac 857249c3046Smrgcase $srcdir in 858249c3046Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 859249c3046Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 860249c3046Smrgesac 8611477040fSmrg 862249c3046Smrg# Do `set' in a subshell so we don't clobber the current shell's 863249c3046Smrg# arguments. Must try -L first in case configure is actually a 864249c3046Smrg# symlink; some systems play weird games with the mod time of symlinks 865249c3046Smrg# (eg FreeBSD returns the mod time of the symlink's containing 866249c3046Smrg# directory). 867249c3046Smrgif ( 868249c3046Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 869249c3046Smrg if test "$[*]" = "X"; then 870249c3046Smrg # -L didn't work. 871249c3046Smrg set X `ls -t "$srcdir/configure" conftest.file` 872249c3046Smrg fi 873249c3046Smrg rm -f conftest.file 874249c3046Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 875249c3046Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8761477040fSmrg 877249c3046Smrg # If neither matched, then we have a broken ls. This can happen 878249c3046Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 879249c3046Smrg # broken ls alias from the environment. This has actually 880249c3046Smrg # happened. Such a system could not be considered "sane". 881249c3046Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 882249c3046Smrgalias in your environment]) 883249c3046Smrg fi 8841477040fSmrg 885249c3046Smrg test "$[2]" = conftest.file 886249c3046Smrg ) 887249c3046Smrgthen 888249c3046Smrg # Ok. 889249c3046Smrg : 890249c3046Smrgelse 891249c3046Smrg AC_MSG_ERROR([newly created file is older than distributed files! 892249c3046SmrgCheck your system clock]) 8932ae83157Smrgfi 894249c3046SmrgAC_MSG_RESULT(yes)]) 8951477040fSmrg 896249c3046Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 897249c3046Smrg# 898249c3046Smrg# This file is free software; the Free Software Foundation 899249c3046Smrg# gives unlimited permission to copy and/or distribute it, 900249c3046Smrg# with or without modifications, as long as this notice is preserved. 9011477040fSmrg 902249c3046Smrg# serial 1 9031477040fSmrg 904249c3046Smrg# AM_SILENT_RULES([DEFAULT]) 905249c3046Smrg# -------------------------- 906249c3046Smrg# Enable less verbose build rules; with the default set to DEFAULT 907249c3046Smrg# (`yes' being less verbose, `no' or empty being verbose). 908249c3046SmrgAC_DEFUN([AM_SILENT_RULES], 909249c3046Smrg[AC_ARG_ENABLE([silent-rules], 910249c3046Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 911249c3046Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 912249c3046Smrgcase $enable_silent_rules in 913249c3046Smrgyes) AM_DEFAULT_VERBOSITY=0;; 914249c3046Smrgno) AM_DEFAULT_VERBOSITY=1;; 915249c3046Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 916249c3046Smrgesac 917249c3046SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 918249c3046SmrgAM_BACKSLASH='\' 919249c3046SmrgAC_SUBST([AM_BACKSLASH])dnl 920249c3046Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 921249c3046Smrg]) 922249c3046Smrg 923249c3046Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 924249c3046Smrg# 925249c3046Smrg# This file is free software; the Free Software Foundation 926249c3046Smrg# gives unlimited permission to copy and/or distribute it, 927249c3046Smrg# with or without modifications, as long as this notice is preserved. 928249c3046Smrg 929249c3046Smrg# AM_PROG_INSTALL_STRIP 930249c3046Smrg# --------------------- 931249c3046Smrg# One issue with vendor `install' (even GNU) is that you can't 932249c3046Smrg# specify the program used to strip binaries. This is especially 933249c3046Smrg# annoying in cross-compiling environments, where the build's strip 934249c3046Smrg# is unlikely to handle the host's binaries. 935249c3046Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 936249c3046Smrg# always use install-sh in `make install-strip', and initialize 937249c3046Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 938249c3046SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 939249c3046Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 940249c3046Smrg# Installed binaries are usually stripped using `strip' when the user 941249c3046Smrg# run `make install-strip'. However `strip' might not be the right 942249c3046Smrg# tool to use in cross-compilation environments, therefore Automake 943249c3046Smrg# will honor the `STRIP' environment variable to overrule this program. 944249c3046Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 945249c3046Smrgif test "$cross_compiling" != no; then 946249c3046Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9471477040fSmrgfi 948249c3046SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 949249c3046SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 950444c061aSmrg 951249c3046Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 952249c3046Smrg# 953249c3046Smrg# This file is free software; the Free Software Foundation 954249c3046Smrg# gives unlimited permission to copy and/or distribute it, 955249c3046Smrg# with or without modifications, as long as this notice is preserved. 9561477040fSmrg 957249c3046Smrg# serial 2 9581477040fSmrg 959249c3046Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 960249c3046Smrg# --------------------------- 961249c3046Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 962249c3046Smrg# This macro is traced by Automake. 963249c3046SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9641477040fSmrg 965249c3046Smrg# AM_SUBST_NOTMAKE(VARIABLE) 966249c3046Smrg# --------------------------- 967249c3046Smrg# Public sister of _AM_SUBST_NOTMAKE. 968249c3046SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9691477040fSmrg 970249c3046Smrg# Check how to create a tarball. -*- Autoconf -*- 971444c061aSmrg 972249c3046Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 973249c3046Smrg# 974249c3046Smrg# This file is free software; the Free Software Foundation 975249c3046Smrg# gives unlimited permission to copy and/or distribute it, 976249c3046Smrg# with or without modifications, as long as this notice is preserved. 977444c061aSmrg 978249c3046Smrg# serial 2 9791477040fSmrg 980249c3046Smrg# _AM_PROG_TAR(FORMAT) 981249c3046Smrg# -------------------- 982249c3046Smrg# Check how to create a tarball in format FORMAT. 983249c3046Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 984249c3046Smrg# 985249c3046Smrg# Substitute a variable $(am__tar) that is a command 986249c3046Smrg# writing to stdout a FORMAT-tarball containing the directory 987249c3046Smrg# $tardir. 988249c3046Smrg# tardir=directory && $(am__tar) > result.tar 989249c3046Smrg# 990249c3046Smrg# Substitute a variable $(am__untar) that extract such 991249c3046Smrg# a tarball read from stdin. 992249c3046Smrg# $(am__untar) < result.tar 993249c3046SmrgAC_DEFUN([_AM_PROG_TAR], 994249c3046Smrg[# Always define AMTAR for backward compatibility. 995249c3046SmrgAM_MISSING_PROG([AMTAR], [tar]) 996249c3046Smrgm4_if([$1], [v7], 997249c3046Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 998249c3046Smrg [m4_case([$1], [ustar],, [pax],, 999249c3046Smrg [m4_fatal([Unknown tar format])]) 1000249c3046SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 1001249c3046Smrg# Loop over all known methods to create a tar archive until one works. 1002249c3046Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1003249c3046Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1004249c3046Smrg# Do not fold the above two line into one, because Tru64 sh and 1005249c3046Smrg# Solaris sh will not grok spaces in the rhs of `-'. 1006249c3046Smrgfor _am_tool in $_am_tools 1007249c3046Smrgdo 1008249c3046Smrg case $_am_tool in 1009249c3046Smrg gnutar) 1010249c3046Smrg for _am_tar in tar gnutar gtar; 1011249c3046Smrg do 1012249c3046Smrg AM_RUN_LOG([$_am_tar --version]) && break 1013249c3046Smrg done 1014249c3046Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1015249c3046Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1016249c3046Smrg am__untar="$_am_tar -xf -" 1017249c3046Smrg ;; 1018249c3046Smrg plaintar) 1019249c3046Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1020249c3046Smrg # ustar tarball either. 1021249c3046Smrg (tar --version) >/dev/null 2>&1 && continue 1022249c3046Smrg am__tar='tar chf - "$$tardir"' 1023249c3046Smrg am__tar_='tar chf - "$tardir"' 1024249c3046Smrg am__untar='tar xf -' 1025249c3046Smrg ;; 1026249c3046Smrg pax) 1027249c3046Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1028249c3046Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1029249c3046Smrg am__untar='pax -r' 1030249c3046Smrg ;; 1031249c3046Smrg cpio) 1032249c3046Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1033249c3046Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1034249c3046Smrg am__untar='cpio -i -H $1 -d' 1035249c3046Smrg ;; 1036249c3046Smrg none) 1037249c3046Smrg am__tar=false 1038249c3046Smrg am__tar_=false 1039249c3046Smrg am__untar=false 10401477040fSmrg ;; 10411477040fSmrg esac 1042444c061aSmrg 1043249c3046Smrg # If the value was cached, stop now. We just wanted to have am__tar 1044249c3046Smrg # and am__untar set. 1045249c3046Smrg test -n "${am_cv_prog_tar_$1}" && break 1046444c061aSmrg 1047249c3046Smrg # tar/untar a dummy directory, and stop if the command works 1048249c3046Smrg rm -rf conftest.dir 1049249c3046Smrg mkdir conftest.dir 1050249c3046Smrg echo GrepMe > conftest.dir/file 1051249c3046Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1052249c3046Smrg rm -rf conftest.dir 1053249c3046Smrg if test -s conftest.tar; then 1054249c3046Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1055249c3046Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1056249c3046Smrg fi 1057249c3046Smrgdone 1058249c3046Smrgrm -rf conftest.dir 1059444c061aSmrg 1060249c3046SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1061249c3046SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1062249c3046SmrgAC_SUBST([am__tar]) 1063249c3046SmrgAC_SUBST([am__untar]) 1064249c3046Smrg]) # _AM_PROG_TAR 1065444c061aSmrg 1066249c3046Smrgm4_include([m4/ax_define_dir.m4]) 1067249c3046Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1068249c3046Smrgdnl 1069249c3046Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 1070249c3046Smrgdnl 1071249c3046Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1072249c3046Smrgdnl copy of this software and associated documentation files (the "Software"), 1073249c3046Smrgdnl to deal in the Software without restriction, including without limitation 1074249c3046Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1075249c3046Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1076249c3046Smrgdnl Software is furnished to do so, subject to the following conditions: 1077249c3046Smrgdnl 1078249c3046Smrgdnl The above copyright notice and this permission notice (including the next 1079249c3046Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1080249c3046Smrgdnl Software. 1081249c3046Smrgdnl 1082249c3046Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1083249c3046Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1084249c3046Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1085249c3046Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1086249c3046Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1087249c3046Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1088249c3046Smrgdnl DEALINGS IN THE SOFTWARE. 1089444c061aSmrg 1090249c3046Smrg# XORG_MACROS_VERSION(required-version) 1091249c3046Smrg# ------------------------------------- 1092249c3046Smrg# Minimum version: 1.1.0 1093249c3046Smrg# 1094249c3046Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1095249c3046Smrg# your configure.ac with the minimum required version, such as: 1096249c3046Smrg# XORG_MACROS_VERSION(1.1) 1097249c3046Smrg# 1098249c3046Smrg# To ensure that this macro is defined, also add: 1099249c3046Smrg# m4_ifndef([XORG_MACROS_VERSION], 1100249c3046Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1101249c3046Smrg# 1102249c3046Smrg# 1103249c3046Smrg# See the "minimum version" comment for each macro you use to see what 1104249c3046Smrg# version you require. 1105249c3046Smrgm4_defun([XORG_MACROS_VERSION],[ 1106249c3046Smrgm4_define([vers_have], [1.10.1]) 1107249c3046Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1108249c3046Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1109249c3046Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1110249c3046Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1111249c3046Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1112249c3046Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1113249c3046Smrgm4_undefine([vers_have]) 1114249c3046Smrgm4_undefine([maj_have]) 1115249c3046Smrgm4_undefine([maj_needed]) 1116249c3046Smrg]) # XORG_MACROS_VERSION 11172ae83157Smrg 1118249c3046Smrg# XORG_PROG_RAWCPP() 1119249c3046Smrg# ------------------ 1120249c3046Smrg# Minimum version: 1.0.0 1121249c3046Smrg# 1122249c3046Smrg# Find cpp program and necessary flags for use in pre-processing text files 1123249c3046Smrg# such as man pages and config files 1124249c3046SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1125249c3046SmrgAC_REQUIRE([AC_PROG_CPP]) 1126249c3046SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1127249c3046Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 11282ae83157Smrg 1129249c3046Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1130249c3046Smrg# which is not the best choice for supporting other OS'es, but covers most 1131249c3046Smrg# of the ones we need for now. 1132249c3046SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1133249c3046SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1134249c3046Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1135249c3046Smrg AC_MSG_RESULT([no]) 1136249c3046Smrgelse 1137249c3046Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1138249c3046Smrg RAWCPPFLAGS=-undef 1139249c3046Smrg AC_MSG_RESULT([yes]) 1140249c3046Smrg # under Cygwin unix is still defined even with -undef 1141249c3046Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1142249c3046Smrg RAWCPPFLAGS="-undef -ansi" 1143249c3046Smrg AC_MSG_RESULT([yes, with -ansi]) 1144249c3046Smrg else 1145249c3046Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1146249c3046Smrg fi 1147249c3046Smrgfi 1148249c3046Smrgrm -f conftest.$ac_ext 11492265a131Smrg 1150249c3046SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1151249c3046SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1152249c3046Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1153249c3046Smrg AC_MSG_RESULT([no]) 1154249c3046Smrgelse 1155249c3046Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1156249c3046Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1157249c3046Smrg AC_MSG_RESULT([yes]) 1158249c3046Smrg else 1159249c3046Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1160249c3046Smrg fi 1161249c3046Smrgfi 1162249c3046Smrgrm -f conftest.$ac_ext 1163249c3046SmrgAC_SUBST(RAWCPPFLAGS) 1164249c3046Smrg]) # XORG_PROG_RAWCPP 1165444c061aSmrg 1166249c3046Smrg# XORG_MANPAGE_SECTIONS() 1167249c3046Smrg# ----------------------- 1168249c3046Smrg# Minimum version: 1.0.0 1169249c3046Smrg# 1170249c3046Smrg# Determine which sections man pages go in for the different man page types 1171249c3046Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1172249c3046Smrg# Not sure if there's any better way than just hardcoding by OS name. 1173249c3046Smrg# Override default settings by setting environment variables 1174249c3046Smrg# Added MAN_SUBSTS in version 1.8 1175249c3046Smrg# Added AC_PROG_SED in version 1.8 1176444c061aSmrg 1177249c3046SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1178249c3046SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1179249c3046SmrgAC_REQUIRE([AC_PROG_SED]) 1180444c061aSmrg 1181249c3046Smrgif test x$APP_MAN_SUFFIX = x ; then 1182249c3046Smrg APP_MAN_SUFFIX=1 1183249c3046Smrgfi 1184249c3046Smrgif test x$APP_MAN_DIR = x ; then 1185249c3046Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1186249c3046Smrgfi 11871477040fSmrg 1188249c3046Smrgif test x$LIB_MAN_SUFFIX = x ; then 1189249c3046Smrg LIB_MAN_SUFFIX=3 1190249c3046Smrgfi 1191249c3046Smrgif test x$LIB_MAN_DIR = x ; then 1192249c3046Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1193249c3046Smrgfi 11941477040fSmrg 1195249c3046Smrgif test x$FILE_MAN_SUFFIX = x ; then 1196249c3046Smrg case $host_os in 1197249c3046Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1198249c3046Smrg *) FILE_MAN_SUFFIX=5 ;; 1199249c3046Smrg esac 1200249c3046Smrgfi 1201249c3046Smrgif test x$FILE_MAN_DIR = x ; then 1202249c3046Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1203249c3046Smrgfi 1204444c061aSmrg 1205249c3046Smrgif test x$MISC_MAN_SUFFIX = x ; then 1206249c3046Smrg case $host_os in 1207249c3046Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1208249c3046Smrg *) MISC_MAN_SUFFIX=7 ;; 1209249c3046Smrg esac 1210249c3046Smrgfi 1211249c3046Smrgif test x$MISC_MAN_DIR = x ; then 1212249c3046Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1213249c3046Smrgfi 1214444c061aSmrg 1215249c3046Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1216249c3046Smrg case $host_os in 1217249c3046Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1218249c3046Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1219249c3046Smrg esac 1220249c3046Smrgfi 1221249c3046Smrgif test x$DRIVER_MAN_DIR = x ; then 1222249c3046Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1223249c3046Smrgfi 12241477040fSmrg 1225249c3046Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1226249c3046Smrg case $host_os in 1227249c3046Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1228249c3046Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1229249c3046Smrg esac 1230249c3046Smrgfi 1231249c3046Smrgif test x$ADMIN_MAN_DIR = x ; then 1232249c3046Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1233249c3046Smrgfi 12341477040fSmrg 12351477040fSmrg 1236249c3046SmrgAC_SUBST([APP_MAN_SUFFIX]) 1237249c3046SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1238249c3046SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1239249c3046SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1240249c3046SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1241249c3046SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1242249c3046SmrgAC_SUBST([APP_MAN_DIR]) 1243249c3046SmrgAC_SUBST([LIB_MAN_DIR]) 1244249c3046SmrgAC_SUBST([FILE_MAN_DIR]) 1245249c3046SmrgAC_SUBST([MISC_MAN_DIR]) 1246249c3046SmrgAC_SUBST([DRIVER_MAN_DIR]) 1247249c3046SmrgAC_SUBST([ADMIN_MAN_DIR]) 12481477040fSmrg 1249249c3046SmrgXORG_MAN_PAGE="X Version 11" 1250249c3046SmrgAC_SUBST([XORG_MAN_PAGE]) 1251249c3046SmrgMAN_SUBSTS="\ 1252249c3046Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1253249c3046Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1254249c3046Smrg -e 's|__xservername__|Xorg|g' \ 1255249c3046Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1256249c3046Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1257249c3046Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1258249c3046Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1259249c3046Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1260249c3046Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1261249c3046Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1262249c3046Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1263249c3046Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1264249c3046SmrgAC_SUBST([MAN_SUBSTS]) 12651477040fSmrg 1266249c3046Smrg]) # XORG_MANPAGE_SECTIONS 12671477040fSmrg 1268249c3046Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1269249c3046Smrg# ------------------------ 1270249c3046Smrg# Minimum version: 1.7.0 1271249c3046Smrg# 1272249c3046Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1273249c3046Smrg# provided by xorg-sgml-doctools, if installed. 1274249c3046SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1275249c3046SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1276249c3046SmrgXORG_SGML_PATH= 1277249c3046SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1278249c3046Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1279249c3046Smrg [m4_ifval([$1],[:], 1280249c3046Smrg [if test x"$cross_compiling" != x"yes" ; then 1281249c3046Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1282249c3046Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1283249c3046Smrg fi]) 1284249c3046Smrg ]) 12851477040fSmrg 1286249c3046Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1287249c3046Smrg# the path and the name of the doc stylesheet 1288249c3046Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1289249c3046Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1290249c3046Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1291249c3046Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1292249c3046Smrgelse 1293249c3046Smrg AC_MSG_RESULT([no]) 1294249c3046Smrgfi 1295444c061aSmrg 1296249c3046SmrgAC_SUBST(XORG_SGML_PATH) 1297249c3046SmrgAC_SUBST(STYLESHEET_SRCDIR) 1298249c3046SmrgAC_SUBST(XSL_STYLESHEET) 1299249c3046SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1300249c3046Smrg]) # XORG_CHECK_SGML_DOCTOOLS 13012265a131Smrg 1302249c3046Smrg# XORG_CHECK_LINUXDOC 1303249c3046Smrg# ------------------- 1304249c3046Smrg# Minimum version: 1.0.0 1305249c3046Smrg# 1306249c3046Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1307249c3046Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1308249c3046Smrg# Whether or not the necessary tools and files are found can be checked 1309249c3046Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1310249c3046SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1311249c3046SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1312249c3046SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 13132265a131Smrg 1314249c3046SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 13152265a131Smrg 1316249c3046SmrgAC_MSG_CHECKING([whether to build documentation]) 1317444c061aSmrg 1318249c3046Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1319249c3046Smrg BUILDDOC=yes 1320249c3046Smrgelse 1321249c3046Smrg BUILDDOC=no 1322249c3046Smrgfi 1323444c061aSmrg 1324249c3046SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 13252265a131Smrg 1326249c3046SmrgAC_MSG_RESULT([$BUILDDOC]) 1327444c061aSmrg 1328249c3046SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1329444c061aSmrg 1330249c3046Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1331249c3046Smrg BUILDPDFDOC=yes 1332249c3046Smrgelse 1333249c3046Smrg BUILDPDFDOC=no 1334249c3046Smrgfi 1335444c061aSmrg 1336249c3046SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1337444c061aSmrg 1338249c3046SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1339444c061aSmrg 1340249c3046SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1341249c3046SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1342249c3046SmrgMAKE_PDF="$PS2PDF" 1343249c3046SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1344444c061aSmrg 1345249c3046SmrgAC_SUBST(MAKE_TEXT) 1346249c3046SmrgAC_SUBST(MAKE_PS) 1347249c3046SmrgAC_SUBST(MAKE_PDF) 1348249c3046SmrgAC_SUBST(MAKE_HTML) 1349249c3046Smrg]) # XORG_CHECK_LINUXDOC 1350444c061aSmrg 1351249c3046Smrg# XORG_CHECK_DOCBOOK 13521477040fSmrg# ------------------- 1353249c3046Smrg# Minimum version: 1.0.0 1354249c3046Smrg# 1355249c3046Smrg# Checks for the ability to build output formats from SGML DocBook source. 1356249c3046Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1357249c3046Smrg# indicates whether the necessary tools and files are found and, if set, 1358249c3046Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1359249c3046SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1360249c3046SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1361444c061aSmrg 1362249c3046SmrgBUILDTXTDOC=no 1363249c3046SmrgBUILDPDFDOC=no 1364249c3046SmrgBUILDPSDOC=no 1365249c3046SmrgBUILDHTMLDOC=no 1366444c061aSmrg 1367249c3046SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1368249c3046SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1369249c3046SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1370249c3046SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1371444c061aSmrg 1372249c3046SmrgAC_MSG_CHECKING([whether to build text documentation]) 1373249c3046Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1374249c3046Smrg test x$BUILD_TXTDOC != xno; then 1375249c3046Smrg BUILDTXTDOC=yes 13762ae83157Smrgfi 1377249c3046SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1378249c3046SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1379444c061aSmrg 1380249c3046SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1381249c3046Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1382249c3046Smrg test x$BUILD_PDFDOC != xno; then 1383249c3046Smrg BUILDPDFDOC=yes 13842ae83157Smrgfi 1385249c3046SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1386249c3046SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1387444c061aSmrg 1388249c3046SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1389249c3046Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1390249c3046Smrg test x$BUILD_PSDOC != xno; then 1391249c3046Smrg BUILDPSDOC=yes 1392249c3046Smrgfi 1393249c3046SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1394249c3046SmrgAC_MSG_RESULT([$BUILDPSDOC]) 13952265a131Smrg 1396249c3046SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1397249c3046Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1398249c3046Smrg test x$BUILD_HTMLDOC != xno; then 1399249c3046Smrg BUILDHTMLDOC=yes 1400249c3046Smrgfi 1401249c3046SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1402249c3046SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 14032265a131Smrg 1404249c3046SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1405249c3046SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1406249c3046SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1407249c3046SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 14082265a131Smrg 1409249c3046SmrgAC_SUBST(MAKE_TEXT) 1410249c3046SmrgAC_SUBST(MAKE_PS) 1411249c3046SmrgAC_SUBST(MAKE_PDF) 1412249c3046SmrgAC_SUBST(MAKE_HTML) 1413249c3046Smrg]) # XORG_CHECK_DOCBOOK 1414249c3046Smrg 1415249c3046Smrg# XORG_WITH_XMLTO([MIN-VERSION]) 1416249c3046Smrg# ---------------- 1417249c3046Smrg# Minimum version: 1.5.0 1418249c3046Smrg# 1419249c3046Smrg# Documentation tools are not always available on all platforms and sometimes 1420249c3046Smrg# not at the appropriate level. This macro enables a module to test for the 1421249c3046Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1422249c3046Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1423249c3046Smrg# as whether or not to use the xmlto package. 1424249c3046Smrg# 1425249c3046Smrg# Interface to module: 1426249c3046Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1427249c3046Smrg# XMLTO: returns the path of the xmlto program found 1428249c3046Smrg# returns the path set by the user in the environment 1429249c3046Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1430249c3046Smrg# 'no' user instructs the module not to use xmlto 1431249c3046Smrg# 1432249c3046Smrg# Added in version 1.10.0 1433249c3046Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1434249c3046Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1435249c3046Smrg# 1436249c3046Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1437249c3046Smrg# 1438249c3046SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1439249c3046SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1440249c3046SmrgAC_ARG_WITH(xmlto, 1441249c3046Smrg AS_HELP_STRING([--with-xmlto], 1442249c3046Smrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 1443249c3046Smrg [use_xmlto=$withval], [use_xmlto=auto]) 1444249c3046Smrg 1445249c3046Smrgif test "x$use_xmlto" = x"auto"; then 1446249c3046Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1447249c3046Smrg if test "x$XMLTO" = "x"; then 1448249c3046Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1449249c3046Smrg have_xmlto=no 1450249c3046Smrg else 1451249c3046Smrg have_xmlto=yes 1452249c3046Smrg fi 1453249c3046Smrgelif test "x$use_xmlto" = x"yes" ; then 1454249c3046Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1455249c3046Smrg if test "x$XMLTO" = "x"; then 1456249c3046Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1457249c3046Smrg fi 1458249c3046Smrg have_xmlto=yes 1459249c3046Smrgelif test "x$use_xmlto" = x"no" ; then 1460249c3046Smrg if test "x$XMLTO" != "x"; then 1461249c3046Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1462249c3046Smrg fi 1463249c3046Smrg have_xmlto=no 1464249c3046Smrgelse 1465249c3046Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1466249c3046Smrgfi 1467249c3046Smrg 1468249c3046Smrg# Test for a minimum version of xmlto, if provided. 1469249c3046Smrgm4_ifval([$1], 1470249c3046Smrg[if test "$have_xmlto" = yes; then 1471249c3046Smrg # scrape the xmlto version 1472249c3046Smrg AC_MSG_CHECKING([the xmlto version]) 1473249c3046Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1474249c3046Smrg AC_MSG_RESULT([$xmlto_version]) 1475249c3046Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1476249c3046Smrg [if test "x$use_xmlto" = xauto; then 1477249c3046Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1478249c3046Smrg have_xmlto=no 14791477040fSmrg else 1480249c3046Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1481249c3046Smrg fi]) 1482249c3046Smrgfi]) 14832265a131Smrg 1484249c3046Smrg# Test for the ability of xmlto to generate a text target 1485249c3046Smrghave_xmlto_text=no 1486249c3046Smrgcat > conftest.xml << "EOF" 1487249c3046SmrgEOF 1488249c3046SmrgAS_IF([test "$have_xmlto" = yes], 1489249c3046Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1490249c3046Smrg [have_xmlto_text=yes], 1491249c3046Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1492249c3046Smrgrm -f conftest.xml 1493249c3046SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1494249c3046SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1495249c3046Smrg]) # XORG_WITH_XMLTO 14962ae83157Smrg 1497249c3046Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 1498249c3046Smrg# ---------------- 1499249c3046Smrg# Minimum version: 1.5.0 1500249c3046Smrg# 1501249c3046Smrg# Documentation tools are not always available on all platforms and sometimes 1502249c3046Smrg# not at the appropriate level. This macro enables a module to test for the 1503249c3046Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1504249c3046Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1505249c3046Smrg# as whether or not to use the asciidoc package. 1506249c3046Smrg# 1507249c3046Smrg# Interface to module: 1508249c3046Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1509249c3046Smrg# ASCIIDOC: returns the path of the asciidoc program found 1510249c3046Smrg# returns the path set by the user in the environment 1511249c3046Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1512249c3046Smrg# 'no' user instructs the module not to use asciidoc 1513249c3046Smrg# 1514249c3046Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1515249c3046Smrg# 1516249c3046SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1517249c3046SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1518249c3046SmrgAC_ARG_WITH(asciidoc, 1519249c3046Smrg AS_HELP_STRING([--with-asciidoc], 1520249c3046Smrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 1521249c3046Smrg [use_asciidoc=$withval], [use_asciidoc=auto]) 1522249c3046Smrg 1523249c3046Smrgif test "x$use_asciidoc" = x"auto"; then 1524249c3046Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1525249c3046Smrg if test "x$ASCIIDOC" = "x"; then 1526249c3046Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1527249c3046Smrg have_asciidoc=no 1528249c3046Smrg else 1529249c3046Smrg have_asciidoc=yes 1530249c3046Smrg fi 1531249c3046Smrgelif test "x$use_asciidoc" = x"yes" ; then 1532249c3046Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1533249c3046Smrg if test "x$ASCIIDOC" = "x"; then 1534249c3046Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1535249c3046Smrg fi 1536249c3046Smrg have_asciidoc=yes 1537249c3046Smrgelif test "x$use_asciidoc" = x"no" ; then 1538249c3046Smrg if test "x$ASCIIDOC" != "x"; then 1539249c3046Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1540249c3046Smrg fi 1541249c3046Smrg have_asciidoc=no 1542249c3046Smrgelse 1543249c3046Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 15441477040fSmrgfi 1545249c3046Smrgm4_ifval([$1], 1546249c3046Smrg[if test "$have_asciidoc" = yes; then 1547249c3046Smrg # scrape the asciidoc version 1548249c3046Smrg AC_MSG_CHECKING([the asciidoc version]) 1549249c3046Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1550249c3046Smrg AC_MSG_RESULT([$asciidoc_version]) 1551249c3046Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1552249c3046Smrg [if test "x$use_asciidoc" = xauto; then 1553249c3046Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1554249c3046Smrg have_asciidoc=no 1555249c3046Smrg else 1556249c3046Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1557249c3046Smrg fi]) 1558249c3046Smrgfi]) 1559249c3046SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1560249c3046Smrg]) # XORG_WITH_ASCIIDOC 1561249c3046Smrg 1562249c3046Smrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 1563249c3046Smrg# -------------------------------- 1564249c3046Smrg# Minimum version: 1.5.0 1565249c3046Smrg# 1566249c3046Smrg# Documentation tools are not always available on all platforms and sometimes 1567249c3046Smrg# not at the appropriate level. This macro enables a module to test for the 1568249c3046Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1569249c3046Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1570249c3046Smrg# as whether or not to use the doxygen package. 1571249c3046Smrg# 1572249c3046Smrg# Interface to module: 1573249c3046Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1574249c3046Smrg# DOXYGEN: returns the path of the doxygen program found 1575249c3046Smrg# returns the path set by the user in the environment 1576249c3046Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1577249c3046Smrg# 'no' user instructs the module not to use doxygen 1578249c3046Smrg# 1579249c3046Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1580249c3046Smrg# 1581249c3046SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1582249c3046SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1583249c3046SmrgAC_ARG_WITH(doxygen, 1584249c3046Smrg AS_HELP_STRING([--with-doxygen], 1585249c3046Smrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 1586249c3046Smrg [use_doxygen=$withval], [use_doxygen=auto]) 1587444c061aSmrg 1588249c3046Smrgif test "x$use_doxygen" = x"auto"; then 1589249c3046Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1590249c3046Smrg if test "x$DOXYGEN" = "x"; then 1591249c3046Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1592249c3046Smrg have_doxygen=no 1593249c3046Smrg else 1594249c3046Smrg have_doxygen=yes 1595249c3046Smrg fi 1596249c3046Smrgelif test "x$use_doxygen" = x"yes" ; then 1597249c3046Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1598249c3046Smrg if test "x$DOXYGEN" = "x"; then 1599249c3046Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1600249c3046Smrg fi 1601249c3046Smrg have_doxygen=yes 1602249c3046Smrgelif test "x$use_doxygen" = x"no" ; then 1603249c3046Smrg if test "x$DOXYGEN" != "x"; then 1604249c3046Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1605249c3046Smrg fi 1606249c3046Smrg have_doxygen=no 1607249c3046Smrgelse 1608249c3046Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 16091477040fSmrgfi 1610249c3046Smrgm4_ifval([$1], 1611249c3046Smrg[if test "$have_doxygen" = yes; then 1612249c3046Smrg # scrape the doxygen version 1613249c3046Smrg AC_MSG_CHECKING([the doxygen version]) 1614249c3046Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1615249c3046Smrg AC_MSG_RESULT([$doxygen_version]) 1616249c3046Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1617249c3046Smrg [if test "x$use_doxygen" = xauto; then 1618249c3046Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1619249c3046Smrg have_doxygen=no 1620249c3046Smrg else 1621249c3046Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1622249c3046Smrg fi]) 1623249c3046Smrgfi]) 1624249c3046SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1625249c3046Smrg]) # XORG_WITH_DOXYGEN 1626444c061aSmrg 1627249c3046Smrg# XORG_WITH_GROFF 1628249c3046Smrg# ---------------- 1629249c3046Smrg# Minimum version: 1.6.0 1630249c3046Smrg# 1631249c3046Smrg# Documentation tools are not always available on all platforms and sometimes 1632249c3046Smrg# not at the appropriate level. This macro enables a module to test for the 1633249c3046Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1634249c3046Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1635249c3046Smrg# as whether or not to use the groff package. 1636249c3046Smrg# 1637249c3046Smrg# Interface to module: 1638249c3046Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1639249c3046Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1640249c3046Smrg# HAVE_GROFF_MS: the -ms macros package 1641249c3046Smrg# GROFF: returns the path of the groff program found 1642249c3046Smrg# returns the path set by the user in the environment 1643249c3046Smrg# --with-groff: 'yes' user instructs the module to use groff 1644249c3046Smrg# 'no' user instructs the module not to use groff 1645249c3046Smrg# 1646249c3046Smrg# Added in version 1.9.0: 1647249c3046Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1648249c3046Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1649249c3046Smrg# psselect from the psutils package. 1650249c3046Smrg# the ghostcript package. Refer to the grohtml man pages 1651249c3046Smrg# 1652249c3046Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1653249c3046Smrg# 1654249c3046Smrg# OS and distros often splits groff in a basic and full package, the former 1655249c3046Smrg# having the groff program and the later having devices, fonts and macros 1656249c3046Smrg# Checking for the groff executable is not enough. 1657249c3046Smrg# 1658249c3046Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1659249c3046Smrg# unset HAVE_GROFF or GROFF env variables. 1660249c3046Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1661249c3046Smrg# 1662249c3046SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1663249c3046SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1664249c3046SmrgAC_ARG_WITH(groff, 1665249c3046Smrg AS_HELP_STRING([--with-groff], 1666249c3046Smrg [Use groff to regenerate documentation (default: yes, if installed)]), 1667249c3046Smrg [use_groff=$withval], [use_groff=auto]) 1668444c061aSmrg 1669249c3046Smrgif test "x$use_groff" = x"auto"; then 1670249c3046Smrg AC_PATH_PROG([GROFF], [groff]) 1671249c3046Smrg if test "x$GROFF" = "x"; then 1672249c3046Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1673249c3046Smrg have_groff=no 1674249c3046Smrg else 1675249c3046Smrg have_groff=yes 1676249c3046Smrg fi 1677249c3046Smrgelif test "x$use_groff" = x"yes" ; then 1678249c3046Smrg AC_PATH_PROG([GROFF], [groff]) 1679249c3046Smrg if test "x$GROFF" = "x"; then 1680249c3046Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1681249c3046Smrg fi 1682249c3046Smrg have_groff=yes 1683249c3046Smrgelif test "x$use_groff" = x"no" ; then 1684249c3046Smrg if test "x$GROFF" != "x"; then 1685249c3046Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1686249c3046Smrg fi 1687249c3046Smrg have_groff=no 1688249c3046Smrgelse 1689249c3046Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1690249c3046Smrgfi 1691444c061aSmrg 1692249c3046Smrg# We have groff, test for the presence of the macro packages 1693249c3046Smrgif test "x$have_groff" = x"yes"; then 1694249c3046Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1695249c3046Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1696249c3046Smrg groff_ms_works=yes 1697249c3046Smrg else 1698249c3046Smrg groff_ms_works=no 1699249c3046Smrg fi 1700249c3046Smrg AC_MSG_RESULT([$groff_ms_works]) 1701249c3046Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1702249c3046Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1703249c3046Smrg groff_mm_works=yes 1704249c3046Smrg else 1705249c3046Smrg groff_mm_works=no 1706249c3046Smrg fi 1707249c3046Smrg AC_MSG_RESULT([$groff_mm_works]) 1708249c3046Smrgfi 17092ae83157Smrg 1710249c3046Smrg# We have groff, test for HTML dependencies, one command per package 1711249c3046Smrgif test "x$have_groff" = x"yes"; then 1712249c3046Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1713249c3046Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1714249c3046Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1715249c3046Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1716249c3046Smrg have_groff_html=yes 1717249c3046Smrg else 1718249c3046Smrg have_groff_html=no 1719249c3046Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1720249c3046Smrg fi 1721249c3046Smrgfi 17222265a131Smrg 1723249c3046Smrg# Set Automake conditionals for Makefiles 1724249c3046SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1725249c3046SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1726249c3046SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1727249c3046SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1728249c3046Smrg]) # XORG_WITH_GROFF 17292265a131Smrg 1730249c3046Smrg# XORG_WITH_FOP 1731249c3046Smrg# ---------------- 1732249c3046Smrg# Minimum version: 1.6.0 1733249c3046Smrg# 1734249c3046Smrg# Documentation tools are not always available on all platforms and sometimes 1735249c3046Smrg# not at the appropriate level. This macro enables a module to test for the 1736249c3046Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1737249c3046Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1738249c3046Smrg# as whether or not to use the fop package. 1739249c3046Smrg# 1740249c3046Smrg# Interface to module: 1741249c3046Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1742249c3046Smrg# FOP: returns the path of the fop program found 1743249c3046Smrg# returns the path set by the user in the environment 1744249c3046Smrg# --with-fop: 'yes' user instructs the module to use fop 1745249c3046Smrg# 'no' user instructs the module not to use fop 1746249c3046Smrg# 1747249c3046Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1748249c3046Smrg# 1749249c3046SmrgAC_DEFUN([XORG_WITH_FOP],[ 1750249c3046SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1751249c3046SmrgAC_ARG_WITH(fop, 1752249c3046Smrg AS_HELP_STRING([--with-fop], 1753249c3046Smrg [Use fop to regenerate documentation (default: yes, if installed)]), 1754249c3046Smrg [use_fop=$withval], [use_fop=auto]) 17552265a131Smrg 1756249c3046Smrgif test "x$use_fop" = x"auto"; then 1757249c3046Smrg AC_PATH_PROG([FOP], [fop]) 1758249c3046Smrg if test "x$FOP" = "x"; then 1759249c3046Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1760249c3046Smrg have_fop=no 1761249c3046Smrg else 1762249c3046Smrg have_fop=yes 1763249c3046Smrg fi 1764249c3046Smrgelif test "x$use_fop" = x"yes" ; then 1765249c3046Smrg AC_PATH_PROG([FOP], [fop]) 1766249c3046Smrg if test "x$FOP" = "x"; then 1767249c3046Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1768249c3046Smrg fi 1769249c3046Smrg have_fop=yes 1770249c3046Smrgelif test "x$use_fop" = x"no" ; then 1771249c3046Smrg if test "x$FOP" != "x"; then 1772249c3046Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1773249c3046Smrg fi 1774249c3046Smrg have_fop=no 1775249c3046Smrgelse 1776249c3046Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1777444c061aSmrgfi 1778249c3046SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1779249c3046Smrg]) # XORG_WITH_FOP 1780444c061aSmrg 1781249c3046Smrg# XORG_WITH_PS2PDF 1782249c3046Smrg# ---------------- 1783249c3046Smrg# Minimum version: 1.6.0 1784249c3046Smrg# 1785249c3046Smrg# Documentation tools are not always available on all platforms and sometimes 1786249c3046Smrg# not at the appropriate level. This macro enables a module to test for the 1787249c3046Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1788249c3046Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1789249c3046Smrg# as whether or not to use the ps2pdf package. 1790249c3046Smrg# 1791249c3046Smrg# Interface to module: 1792249c3046Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1793249c3046Smrg# PS2PDF: returns the path of the ps2pdf program found 1794249c3046Smrg# returns the path set by the user in the environment 1795249c3046Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1796249c3046Smrg# 'no' user instructs the module not to use ps2pdf 1797249c3046Smrg# 1798249c3046Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1799249c3046Smrg# 1800249c3046SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1801249c3046SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1802249c3046SmrgAC_ARG_WITH(ps2pdf, 1803249c3046Smrg AS_HELP_STRING([--with-ps2pdf], 1804249c3046Smrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 1805249c3046Smrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 18062265a131Smrg 1807249c3046Smrgif test "x$use_ps2pdf" = x"auto"; then 1808249c3046Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1809249c3046Smrg if test "x$PS2PDF" = "x"; then 1810249c3046Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1811249c3046Smrg have_ps2pdf=no 1812249c3046Smrg else 1813249c3046Smrg have_ps2pdf=yes 18141477040fSmrg fi 1815249c3046Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1816249c3046Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1817249c3046Smrg if test "x$PS2PDF" = "x"; then 1818249c3046Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1819249c3046Smrg fi 1820249c3046Smrg have_ps2pdf=yes 1821249c3046Smrgelif test "x$use_ps2pdf" = x"no" ; then 1822249c3046Smrg if test "x$PS2PDF" != "x"; then 1823249c3046Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1824249c3046Smrg fi 1825249c3046Smrg have_ps2pdf=no 18262ae83157Smrgelse 1827249c3046Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 18282ae83157Smrgfi 1829249c3046SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1830249c3046Smrg]) # XORG_WITH_PS2PDF 1831444c061aSmrg 1832249c3046Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1833249c3046Smrg# ---------------- 1834249c3046Smrg# Minimum version: 1.6.0 1835249c3046Smrg# 1836249c3046Smrg# Documentation tools are not always available on all platforms and sometimes 1837249c3046Smrg# not at the appropriate level. This macro enables a builder to skip all 1838249c3046Smrg# documentation targets except traditional man pages. 1839249c3046Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1840249c3046Smrg# maximum flexibilty in controlling documentation building. 1841249c3046Smrg# Refer to: 1842249c3046Smrg# XORG_WITH_XMLTO --with-xmlto 1843249c3046Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1844249c3046Smrg# XORG_WITH_DOXYGEN --with-doxygen 1845249c3046Smrg# XORG_WITH_FOP --with-fop 1846249c3046Smrg# XORG_WITH_GROFF --with-groff 1847249c3046Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1848249c3046Smrg# 1849249c3046Smrg# Interface to module: 1850249c3046Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1851249c3046Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1852249c3046Smrg# 'no' user instructs the module not to generate docs 1853249c3046Smrg# parm1: specify the default value, yes or no. 1854249c3046Smrg# 1855249c3046SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1856249c3046Smrgdefault=$1 1857249c3046Smrgif test "x$default" = x ; then 1858249c3046Smrg default="yes" 1859249c3046Smrgfi 1860249c3046SmrgAC_ARG_ENABLE(docs, 1861249c3046Smrg AS_HELP_STRING([--enable-docs], 1862249c3046Smrg [Enable building the documentation (default: yes)]), 1863249c3046Smrg [build_docs=$enableval], [build_docs=$default]) 1864249c3046SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1865249c3046SmrgAC_MSG_CHECKING([whether to build documentation]) 1866249c3046SmrgAC_MSG_RESULT([$build_docs]) 1867249c3046Smrg]) # XORG_ENABLE_DOCS 1868444c061aSmrg 1869249c3046Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1870249c3046Smrg# ---------------- 1871249c3046Smrg# Minimum version: 1.6.0 1872249c3046Smrg# 1873249c3046Smrg# This macro enables a builder to skip all developer documentation. 1874249c3046Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1875249c3046Smrg# maximum flexibilty in controlling documentation building. 1876249c3046Smrg# Refer to: 1877249c3046Smrg# XORG_WITH_XMLTO --with-xmlto 1878249c3046Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1879249c3046Smrg# XORG_WITH_DOXYGEN --with-doxygen 1880249c3046Smrg# XORG_WITH_FOP --with-fop 1881249c3046Smrg# XORG_WITH_GROFF --with-groff 1882249c3046Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1883249c3046Smrg# 1884249c3046Smrg# Interface to module: 1885249c3046Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1886249c3046Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1887249c3046Smrg# 'no' user instructs the module not to generate developer docs 1888249c3046Smrg# parm1: specify the default value, yes or no. 1889249c3046Smrg# 1890249c3046SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1891249c3046Smrgdevel_default=$1 1892249c3046Smrgif test "x$devel_default" = x ; then 1893249c3046Smrg devel_default="yes" 1894249c3046Smrgfi 1895249c3046SmrgAC_ARG_ENABLE(devel-docs, 1896249c3046Smrg AS_HELP_STRING([--enable-devel-docs], 1897249c3046Smrg [Enable building the developer documentation (default: yes)]), 1898249c3046Smrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 1899249c3046SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1900249c3046SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1901249c3046SmrgAC_MSG_RESULT([$build_devel_docs]) 1902249c3046Smrg]) # XORG_ENABLE_DEVEL_DOCS 1903444c061aSmrg 1904249c3046Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1905249c3046Smrg# ---------------- 1906249c3046Smrg# Minimum version: 1.6.0 1907249c3046Smrg# 1908249c3046Smrg# This macro enables a builder to skip all functional specification targets. 1909249c3046Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1910249c3046Smrg# maximum flexibilty in controlling documentation building. 1911249c3046Smrg# Refer to: 1912249c3046Smrg# XORG_WITH_XMLTO --with-xmlto 1913249c3046Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1914249c3046Smrg# XORG_WITH_DOXYGEN --with-doxygen 1915249c3046Smrg# XORG_WITH_FOP --with-fop 1916249c3046Smrg# XORG_WITH_GROFF --with-groff 1917249c3046Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1918249c3046Smrg# 1919249c3046Smrg# Interface to module: 1920249c3046Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1921249c3046Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1922249c3046Smrg# 'no' user instructs the module not to generate specs 1923249c3046Smrg# parm1: specify the default value, yes or no. 1924249c3046Smrg# 1925249c3046SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1926249c3046Smrgspec_default=$1 1927249c3046Smrgif test "x$spec_default" = x ; then 1928249c3046Smrg spec_default="yes" 1929249c3046Smrgfi 1930249c3046SmrgAC_ARG_ENABLE(specs, 1931249c3046Smrg AS_HELP_STRING([--enable-specs], 1932249c3046Smrg [Enable building the specs (default: yes)]), 1933249c3046Smrg [build_specs=$enableval], [build_specs=$spec_default]) 1934249c3046SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1935249c3046SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1936249c3046SmrgAC_MSG_RESULT([$build_specs]) 1937249c3046Smrg]) # XORG_ENABLE_SPECS 19381477040fSmrg 1939249c3046Smrg# XORG_CHECK_MALLOC_ZERO 1940249c3046Smrg# ---------------------- 1941249c3046Smrg# Minimum version: 1.0.0 1942249c3046Smrg# 1943249c3046Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1944249c3046Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1945249c3046Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1946249c3046SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1947249c3046SmrgAC_ARG_ENABLE(malloc0returnsnull, 1948249c3046Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1949249c3046Smrg [malloc(0) returns NULL (default: auto)]), 1950249c3046Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1951249c3046Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1952249c3046Smrg 1953249c3046SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1954249c3046Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1955249c3046Smrg AC_RUN_IFELSE([ 1956249c3046Smrgchar *malloc(); 1957249c3046Smrgchar *realloc(); 1958249c3046Smrgchar *calloc(); 1959249c3046Smrgmain() { 1960249c3046Smrg char *m0, *r0, *c0, *p; 1961249c3046Smrg m0 = malloc(0); 1962249c3046Smrg p = malloc(10); 1963249c3046Smrg r0 = realloc(p,0); 1964249c3046Smrg c0 = calloc(0); 1965249c3046Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1966249c3046Smrg}], 1967249c3046Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1968249c3046Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1969249c3046Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1970249c3046Smrgfi 1971249c3046SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1972249c3046Smrg 1973249c3046Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1974249c3046Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1975249c3046Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1976249c3046Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 19772ae83157Smrgelse 1978249c3046Smrg MALLOC_ZERO_CFLAGS="" 1979249c3046Smrg XMALLOC_ZERO_CFLAGS="" 1980249c3046Smrg XTMALLOC_ZERO_CFLAGS="" 19812ae83157Smrgfi 1982444c061aSmrg 1983249c3046SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1984249c3046SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1985249c3046SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1986249c3046Smrg]) # XORG_CHECK_MALLOC_ZERO 1987444c061aSmrg 1988249c3046Smrg# XORG_WITH_LINT() 1989249c3046Smrg# ---------------- 1990249c3046Smrg# Minimum version: 1.1.0 1991249c3046Smrg# 1992249c3046Smrg# This macro enables the use of a tool that flags some suspicious and 1993249c3046Smrg# non-portable constructs (likely to be bugs) in C language source code. 1994249c3046Smrg# It will attempt to locate the tool and use appropriate options. 1995249c3046Smrg# There are various lint type tools on different platforms. 1996249c3046Smrg# 1997249c3046Smrg# Interface to module: 1998249c3046Smrg# LINT: returns the path to the tool found on the platform 1999249c3046Smrg# or the value set to LINT on the configure cmd line 2000249c3046Smrg# also an Automake conditional 2001249c3046Smrg# LINT_FLAGS: an Automake variable with appropriate flags 2002249c3046Smrg# 2003249c3046Smrg# --with-lint: 'yes' user instructs the module to use lint 2004249c3046Smrg# 'no' user instructs the module not to use lint (default) 2005249c3046Smrg# 2006249c3046Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2007249c3046Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2008249c3046Smrg# 2009249c3046SmrgAC_DEFUN([XORG_WITH_LINT],[ 2010444c061aSmrg 2011249c3046SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2012249c3046SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2013249c3046SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2014249c3046Smrg [Use a lint-style source code checker (default: disabled)])], 2015249c3046Smrg [use_lint=$withval], [use_lint=no]) 2016444c061aSmrg 2017249c3046Smrg# Obtain platform specific info like program name and options 2018249c3046Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2019249c3046Smrgcase $host_os in 2020249c3046Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2021249c3046Smrg lint_name=splint 2022249c3046Smrg lint_options="-badflag" 2023249c3046Smrg ;; 2024249c3046Smrg *freebsd* | *netbsd*) 2025249c3046Smrg lint_name=lint 2026249c3046Smrg lint_options="-u -b" 2027249c3046Smrg ;; 2028249c3046Smrg *solaris*) 2029249c3046Smrg lint_name=lint 2030249c3046Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2031249c3046Smrg ;; 2032249c3046Smrgesac 2033444c061aSmrg 2034249c3046Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2035249c3046Smrgif test "x$use_lint" = x"yes" ; then 2036249c3046Smrg AC_PATH_PROG([LINT], [$lint_name]) 2037249c3046Smrg if test "x$LINT" = "x"; then 2038249c3046Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2039249c3046Smrg fi 2040249c3046Smrgelif test "x$use_lint" = x"no" ; then 2041249c3046Smrg if test "x$LINT" != "x"; then 2042249c3046Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2043249c3046Smrg fi 20441477040fSmrgelse 2045249c3046Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 20462265a131Smrgfi 2047444c061aSmrg 2048249c3046Smrg# User supplied flags override default flags 2049249c3046Smrgif test "x$LINT_FLAGS" != "x"; then 2050249c3046Smrg lint_options=$LINT_FLAGS 2051249c3046Smrgfi 2052444c061aSmrg 2053249c3046SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2054249c3046SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2055444c061aSmrg 2056249c3046Smrg]) # XORG_WITH_LINT 20572265a131Smrg 2058249c3046Smrg# XORG_LINT_LIBRARY(LIBNAME) 2059249c3046Smrg# -------------------------- 2060249c3046Smrg# Minimum version: 1.1.0 2061249c3046Smrg# 2062249c3046Smrg# Sets up flags for building lint libraries for checking programs that call 2063249c3046Smrg# functions in the library. 2064249c3046Smrg# 2065249c3046Smrg# Interface to module: 2066249c3046Smrg# LINTLIB - Automake variable with the name of lint library file to make 2067249c3046Smrg# MAKE_LINT_LIB - Automake conditional 2068249c3046Smrg# 2069249c3046Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2070249c3046Smrg# - 'no' user instructs the module not to create a lint library (default) 20712265a131Smrg 2072249c3046SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2073249c3046SmrgAC_REQUIRE([XORG_WITH_LINT]) 2074249c3046SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2075249c3046Smrg [Create lint library (default: disabled)])], 2076249c3046Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2077444c061aSmrg 2078249c3046Smrgif test "x$make_lint_lib" = x"yes" ; then 2079249c3046Smrg LINTLIB=llib-l$1.ln 2080249c3046Smrg if test "x$LINT" = "x"; then 2081249c3046Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2082249c3046Smrg fi 2083249c3046Smrgelif test "x$make_lint_lib" != x"no" ; then 2084249c3046Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2085249c3046Smrgfi 2086444c061aSmrg 2087249c3046SmrgAC_SUBST(LINTLIB) 2088249c3046SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2089444c061aSmrg 2090249c3046Smrg]) # XORG_LINT_LIBRARY 2091444c061aSmrg 2092249c3046Smrg# XORG_CWARNFLAGS 2093249c3046Smrg# --------------- 2094249c3046Smrg# Minimum version: 1.2.0 2095249c3046Smrg# 2096249c3046Smrg# Defines CWARNFLAGS to enable C compiler warnings. 2097249c3046Smrg# 2098249c3046SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 2099249c3046SmrgAC_REQUIRE([AC_PROG_CC_C99]) 2100249c3046Smrgif test "x$GCC" = xyes ; then 2101249c3046Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 2102249c3046Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 2103249c3046Smrg-Wbad-function-cast -Wformat=2" 2104249c3046Smrg case `$CC -dumpversion` in 2105249c3046Smrg 3.4.* | 4.*) 2106249c3046Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 2107249c3046Smrg ;; 21081477040fSmrg esac 2109249c3046Smrgelse 2110249c3046Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2111249c3046Smrg if test "x$SUNCC" = "xyes"; then 2112249c3046Smrg CWARNFLAGS="-v" 2113249c3046Smrg fi 21142ae83157Smrgfi 2115249c3046SmrgAC_SUBST(CWARNFLAGS) 2116249c3046Smrg]) # XORG_CWARNFLAGS 2117444c061aSmrg 2118249c3046Smrg# XORG_STRICT_OPTION 2119249c3046Smrg# ----------------------- 2120249c3046Smrg# Minimum version: 1.3.0 2121249c3046Smrg# 2122249c3046Smrg# Add configure option to enable strict compilation 2123249c3046SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 2124249c3046Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 2125249c3046SmrgAC_REQUIRE([AC_PROG_CC_C99]) 2126249c3046SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 21272ae83157Smrg 2128249c3046SmrgAC_ARG_ENABLE(strict-compilation, 2129249c3046Smrg AS_HELP_STRING([--enable-strict-compilation], 2130249c3046Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 2131249c3046Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 2132249c3046Smrgif test "x$STRICT_COMPILE" = "xyes"; then 2133249c3046Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2134249c3046Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2135249c3046Smrg if test "x$GCC" = xyes ; then 2136249c3046Smrg STRICT_CFLAGS="-pedantic -Werror" 2137249c3046Smrg elif test "x$SUNCC" = "xyes"; then 2138249c3046Smrg STRICT_CFLAGS="-errwarn" 2139249c3046Smrg elif test "x$INTELCC" = "xyes"; then 2140249c3046Smrg STRICT_CFLAGS="-Werror" 2141249c3046Smrg fi 2142249c3046Smrgfi 2143249c3046SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 2144249c3046SmrgAC_SUBST([CWARNFLAGS]) 2145249c3046Smrg]) # XORG_STRICT_OPTION 2146444c061aSmrg 2147249c3046Smrg# XORG_DEFAULT_OPTIONS 2148249c3046Smrg# -------------------- 2149249c3046Smrg# Minimum version: 1.3.0 2150249c3046Smrg# 2151249c3046Smrg# Defines default options for X.Org modules. 2152249c3046Smrg# 2153249c3046SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 2154249c3046SmrgAC_REQUIRE([AC_PROG_INSTALL]) 2155249c3046SmrgXORG_CWARNFLAGS 2156249c3046SmrgXORG_STRICT_OPTION 2157249c3046SmrgXORG_RELEASE_VERSION 2158249c3046SmrgXORG_CHANGELOG 2159249c3046SmrgXORG_INSTALL 2160249c3046SmrgXORG_MANPAGE_SECTIONS 2161249c3046Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2162249c3046Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 2163249c3046Smrg]) # XORG_DEFAULT_OPTIONS 2164444c061aSmrg 2165249c3046Smrg# XORG_INSTALL() 2166249c3046Smrg# ---------------- 2167249c3046Smrg# Minimum version: 1.4.0 2168249c3046Smrg# 2169249c3046Smrg# Defines the variable INSTALL_CMD as the command to copy 2170249c3046Smrg# INSTALL from $prefix/share/util-macros. 2171249c3046Smrg# 2172249c3046SmrgAC_DEFUN([XORG_INSTALL], [ 2173249c3046SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2174249c3046Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2175249c3046SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2176249c3046Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2177249c3046Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 2178249c3046Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 2179249c3046SmrgAC_SUBST([INSTALL_CMD]) 2180249c3046Smrg]) # XORG_INSTALL 2181249c3046Smrgdnl Copyright 2005 Red Hat, Inc 2182249c3046Smrgdnl 2183249c3046Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 2184249c3046Smrgdnl documentation for any purpose is hereby granted without fee, provided that 2185249c3046Smrgdnl the above copyright notice appear in all copies and that both that 2186249c3046Smrgdnl copyright notice and this permission notice appear in supporting 2187249c3046Smrgdnl documentation. 2188249c3046Smrgdnl 2189249c3046Smrgdnl The above copyright notice and this permission notice shall be included 2190249c3046Smrgdnl in all copies or substantial portions of the Software. 2191249c3046Smrgdnl 2192249c3046Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2193249c3046Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2194249c3046Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2195249c3046Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2196249c3046Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2197249c3046Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2198249c3046Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 2199249c3046Smrgdnl 2200249c3046Smrgdnl Except as contained in this notice, the name of the copyright holders shall 2201249c3046Smrgdnl not be used in advertising or otherwise to promote the sale, use or 2202249c3046Smrgdnl other dealings in this Software without prior written authorization 2203249c3046Smrgdnl from the copyright holders. 2204249c3046Smrgdnl 2205444c061aSmrg 2206249c3046Smrg# XORG_RELEASE_VERSION 2207249c3046Smrg# -------------------- 2208249c3046Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 2209249c3046Smrg 2210249c3046SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 2211249c3046Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 2212249c3046Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 2213249c3046Smrg [Major version of this package]) 2214249c3046Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 2215249c3046Smrg if test "x$PVM" = "x"; then 2216249c3046Smrg PVM="0" 2217249c3046Smrg fi 2218249c3046Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 2219249c3046Smrg [$PVM], 2220249c3046Smrg [Minor version of this package]) 2221249c3046Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 2222249c3046Smrg if test "x$PVP" = "x"; then 2223249c3046Smrg PVP="0" 2224249c3046Smrg fi 2225249c3046Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 2226249c3046Smrg [$PVP], 2227249c3046Smrg [Patch version of this package]) 2228249c3046Smrg]) 2229444c061aSmrg 2230249c3046Smrg# XORG_CHANGELOG() 2231249c3046Smrg# ---------------- 2232249c3046Smrg# Minimum version: 1.2.0 2233249c3046Smrg# 2234249c3046Smrg# Defines the variable CHANGELOG_CMD as the command to generate 2235249c3046Smrg# ChangeLog from git. 2236249c3046Smrg# 2237249c3046Smrg# 2238249c3046SmrgAC_DEFUN([XORG_CHANGELOG], [ 2239249c3046SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 2240249c3046Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2241249c3046Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 2242249c3046Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 2243249c3046SmrgAC_SUBST([CHANGELOG_CMD]) 2244249c3046Smrg]) # XORG_CHANGELOG 2245444c061aSmrg 2246249c3046Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2247249c3046Smrg# 2248249c3046Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2249249c3046Smrg# 2250249c3046Smrg# This program is free software; you can redistribute it and/or modify 2251249c3046Smrg# it under the terms of the GNU General Public License as published by 2252249c3046Smrg# the Free Software Foundation; either version 2 of the License, or 2253249c3046Smrg# (at your option) any later version. 2254249c3046Smrg# 2255249c3046Smrg# This program is distributed in the hope that it will be useful, but 2256249c3046Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2257249c3046Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2258249c3046Smrg# General Public License for more details. 2259249c3046Smrg# 2260249c3046Smrg# You should have received a copy of the GNU General Public License 2261249c3046Smrg# along with this program; if not, write to the Free Software 2262249c3046Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2263249c3046Smrg# 2264249c3046Smrg# As a special exception to the GNU General Public License, if you 2265249c3046Smrg# distribute this file as part of a program that contains a 2266249c3046Smrg# configuration script generated by Autoconf, you may include it under 2267249c3046Smrg# the same distribution terms that you use for the rest of that program. 2268444c061aSmrg 2269249c3046Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 2270249c3046Smrg# ---------------------------------- 2271249c3046SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 2272249c3046Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 2273249c3046Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 2274249c3046SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 2275249c3046Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 2276249c3046Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 2277249c3046Smrgfi 2278249c3046Smrgif test -n "$PKG_CONFIG"; then 2279249c3046Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 2280249c3046Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 2281249c3046Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 2282249c3046Smrg AC_MSG_RESULT([yes]) 2283249c3046Smrg else 2284249c3046Smrg AC_MSG_RESULT([no]) 2285249c3046Smrg PKG_CONFIG="" 2286249c3046Smrg fi 2287249c3046Smrg 2288249c3046Smrgfi[]dnl 2289249c3046Smrg])# PKG_PROG_PKG_CONFIG 2290444c061aSmrg 2291249c3046Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2292249c3046Smrg# 2293249c3046Smrg# Check to see whether a particular set of modules exists. Similar 2294249c3046Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 2295249c3046Smrg# 2296249c3046Smrg# 2297249c3046Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 2298249c3046Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 2299249c3046Smrg# PKG_CHECK_EXISTS manually 2300249c3046Smrg# -------------------------------------------------------------- 2301249c3046SmrgAC_DEFUN([PKG_CHECK_EXISTS], 2302249c3046Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2303249c3046Smrgif test -n "$PKG_CONFIG" && \ 2304249c3046Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 2305249c3046Smrg m4_ifval([$2], [$2], [:]) 2306249c3046Smrgm4_ifvaln([$3], [else 2307249c3046Smrg $3])dnl 2308249c3046Smrgfi]) 2309444c061aSmrg 2310444c061aSmrg 2311249c3046Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 2312249c3046Smrg# --------------------------------------------- 2313249c3046Smrgm4_define([_PKG_CONFIG], 2314249c3046Smrg[if test -n "$$1"; then 2315249c3046Smrg pkg_cv_[]$1="$$1" 2316249c3046Smrg elif test -n "$PKG_CONFIG"; then 2317249c3046Smrg PKG_CHECK_EXISTS([$3], 2318249c3046Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 2319249c3046Smrg [pkg_failed=yes]) 2320249c3046Smrg else 2321249c3046Smrg pkg_failed=untried 2322249c3046Smrgfi[]dnl 2323249c3046Smrg])# _PKG_CONFIG 2324444c061aSmrg 2325249c3046Smrg# _PKG_SHORT_ERRORS_SUPPORTED 2326249c3046Smrg# ----------------------------- 2327249c3046SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 2328249c3046Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2329249c3046Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2330249c3046Smrg _pkg_short_errors_supported=yes 2331249c3046Smrgelse 2332249c3046Smrg _pkg_short_errors_supported=no 2333249c3046Smrgfi[]dnl 2334249c3046Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 2335444c061aSmrg 2336444c061aSmrg 2337249c3046Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 2338249c3046Smrg# [ACTION-IF-NOT-FOUND]) 2339249c3046Smrg# 2340249c3046Smrg# 2341249c3046Smrg# Note that if there is a possibility the first call to 2342249c3046Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 2343249c3046Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 2344249c3046Smrg# 2345249c3046Smrg# 2346249c3046Smrg# -------------------------------------------------------------- 2347249c3046SmrgAC_DEFUN([PKG_CHECK_MODULES], 2348249c3046Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2349249c3046SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 2350249c3046SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 2351444c061aSmrg 2352249c3046Smrgpkg_failed=no 2353249c3046SmrgAC_MSG_CHECKING([for $1]) 2354444c061aSmrg 2355249c3046Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 2356249c3046Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 2357444c061aSmrg 2358249c3046Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 2359249c3046Smrgand $1[]_LIBS to avoid the need to call pkg-config. 2360249c3046SmrgSee the pkg-config man page for more details.]) 2361444c061aSmrg 2362249c3046Smrgif test $pkg_failed = yes; then 2363249c3046Smrg _PKG_SHORT_ERRORS_SUPPORTED 2364249c3046Smrg if test $_pkg_short_errors_supported = yes; then 2365249c3046Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 2366249c3046Smrg else 2367249c3046Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 2368249c3046Smrg fi 2369249c3046Smrg # Put the nasty error message in config.log where it belongs 2370249c3046Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 2371444c061aSmrg 2372249c3046Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 2373249c3046Smrg[Package requirements ($2) were not met: 2374444c061aSmrg 2375249c3046Smrg$$1_PKG_ERRORS 2376444c061aSmrg 2377249c3046SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 2378249c3046Smrginstalled software in a non-standard prefix. 2379444c061aSmrg 2380249c3046Smrg_PKG_TEXT 2381249c3046Smrg])], 2382249c3046Smrg [AC_MSG_RESULT([no]) 2383249c3046Smrg $4]) 2384249c3046Smrgelif test $pkg_failed = untried; then 2385249c3046Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 2386249c3046Smrg[The pkg-config script could not be found or is too old. Make sure it 2387249c3046Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 2388249c3046Smrgpath to pkg-config. 2389444c061aSmrg 2390249c3046Smrg_PKG_TEXT 2391444c061aSmrg 2392249c3046SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 2393249c3046Smrg [$4]) 23941477040fSmrgelse 2395249c3046Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 2396249c3046Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 2397249c3046Smrg AC_MSG_RESULT([yes]) 2398249c3046Smrg ifelse([$3], , :, [$3]) 2399249c3046Smrgfi[]dnl 2400249c3046Smrg])# PKG_CHECK_MODULES 24012265a131Smrg 2402249c3046Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2403249c3046Smrg# 2404249c3046Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2405249c3046Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2406249c3046Smrg# Inc. 2407249c3046Smrg# Written by Gordon Matzigkeit, 1996 2408249c3046Smrg# 2409249c3046Smrg# This file is free software; the Free Software Foundation gives 2410249c3046Smrg# unlimited permission to copy and/or distribute it, with or without 2411249c3046Smrg# modifications, as long as this notice is preserved. 24122265a131Smrg 2413249c3046Smrgm4_define([_LT_COPYING], [dnl 2414249c3046Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2415249c3046Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2416249c3046Smrg# Inc. 2417249c3046Smrg# Written by Gordon Matzigkeit, 1996 2418249c3046Smrg# 2419249c3046Smrg# This file is part of GNU Libtool. 2420249c3046Smrg# 2421249c3046Smrg# GNU Libtool is free software; you can redistribute it and/or 2422249c3046Smrg# modify it under the terms of the GNU General Public License as 2423249c3046Smrg# published by the Free Software Foundation; either version 2 of 2424249c3046Smrg# the License, or (at your option) any later version. 2425249c3046Smrg# 2426249c3046Smrg# As a special exception to the GNU General Public License, 2427249c3046Smrg# if you distribute this file as part of a program or library that 2428249c3046Smrg# is built using GNU Libtool, you may include this file under the 2429249c3046Smrg# same distribution terms that you use for the rest of that program. 2430249c3046Smrg# 2431249c3046Smrg# GNU Libtool is distributed in the hope that it will be useful, 2432249c3046Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2433249c3046Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2434249c3046Smrg# GNU General Public License for more details. 2435249c3046Smrg# 2436249c3046Smrg# You should have received a copy of the GNU General Public License 2437249c3046Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 2438249c3046Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 2439249c3046Smrg# obtained by writing to the Free Software Foundation, Inc., 2440249c3046Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 2441249c3046Smrg]) 2442444c061aSmrg 2443249c3046Smrg# serial 57 LT_INIT 2444444c061aSmrg 2445444c061aSmrg 2446249c3046Smrg# LT_PREREQ(VERSION) 2447249c3046Smrg# ------------------ 2448249c3046Smrg# Complain and exit if this libtool version is less that VERSION. 2449249c3046Smrgm4_defun([LT_PREREQ], 2450249c3046Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 2451249c3046Smrg [m4_default([$3], 2452249c3046Smrg [m4_fatal([Libtool version $1 or higher is required], 2453249c3046Smrg 63)])], 2454249c3046Smrg [$2])]) 2455444c061aSmrg 24562265a131Smrg 2457249c3046Smrg# _LT_CHECK_BUILDDIR 2458249c3046Smrg# ------------------ 2459249c3046Smrg# Complain if the absolute build directory name contains unusual characters 2460249c3046Smrgm4_defun([_LT_CHECK_BUILDDIR], 2461249c3046Smrg[case `pwd` in 2462249c3046Smrg *\ * | *\ *) 2463249c3046Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 2464249c3046Smrgesac 2465249c3046Smrg]) 24662265a131Smrg 24672ae83157Smrg 2468249c3046Smrg# LT_INIT([OPTIONS]) 2469249c3046Smrg# ------------------ 2470249c3046SmrgAC_DEFUN([LT_INIT], 2471249c3046Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 2472249c3046SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 2473249c3046SmrgAC_BEFORE([$0], [LT_LANG])dnl 2474249c3046SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 2475249c3046SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 2476249c3046Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 2477444c061aSmrg 2478249c3046Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 2479249c3046Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 2480249c3046Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 2481249c3046Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 2482249c3046Smrgdnl unless we require an AC_DEFUNed macro: 2483249c3046SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 2484249c3046SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 2485249c3046SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 2486249c3046SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 2487249c3046Smrgm4_require([_LT_PROG_LTMAIN])dnl 2488444c061aSmrg 2489249c3046Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 2490444c061aSmrg 2491249c3046Smrgdnl Parse OPTIONS 2492249c3046Smrg_LT_SET_OPTIONS([$0], [$1]) 2493444c061aSmrg 2494249c3046Smrg# This can be used to rebuild libtool when needed 2495249c3046SmrgLIBTOOL_DEPS="$ltmain" 24961477040fSmrg 2497249c3046Smrg# Always use our own libtool. 2498249c3046SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 2499249c3046SmrgAC_SUBST(LIBTOOL)dnl 2500444c061aSmrg 2501249c3046Smrg_LT_SETUP 25022ae83157Smrg 2503249c3046Smrg# Only expand once: 2504249c3046Smrgm4_define([LT_INIT]) 2505249c3046Smrg])# LT_INIT 25062ae83157Smrg 2507249c3046Smrg# Old names: 2508249c3046SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 2509249c3046SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 2510249c3046Smrgdnl aclocal-1.4 backwards compatibility: 2511249c3046Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 2512249c3046Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 25132ae83157Smrg 25141477040fSmrg 2515249c3046Smrg# _LT_CC_BASENAME(CC) 2516249c3046Smrg# ------------------- 2517249c3046Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2518249c3046Smrgm4_defun([_LT_CC_BASENAME], 2519249c3046Smrg[for cc_temp in $1""; do 2520249c3046Smrg case $cc_temp in 2521249c3046Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2522249c3046Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2523249c3046Smrg \-*) ;; 2524249c3046Smrg *) break;; 25251477040fSmrg esac 2526249c3046Smrgdone 2527249c3046Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 2528249c3046Smrg]) 2529444c061aSmrg 2530444c061aSmrg 2531249c3046Smrg# _LT_FILEUTILS_DEFAULTS 2532249c3046Smrg# ---------------------- 2533249c3046Smrg# It is okay to use these file commands and assume they have been set 2534249c3046Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 2535249c3046Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 2536249c3046Smrg[: ${CP="cp -f"} 2537249c3046Smrg: ${MV="mv -f"} 2538249c3046Smrg: ${RM="rm -f"} 2539249c3046Smrg])# _LT_FILEUTILS_DEFAULTS 25401477040fSmrg 25411477040fSmrg 2542249c3046Smrg# _LT_SETUP 2543249c3046Smrg# --------- 2544249c3046Smrgm4_defun([_LT_SETUP], 2545249c3046Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2546249c3046SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2547249c3046SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 2548249c3046SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 2549444c061aSmrg 2550249c3046Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 2551249c3046Smrg_LT_DECL([], [host], [0])dnl 2552249c3046Smrg_LT_DECL([], [host_os], [0])dnl 2553249c3046Smrgdnl 2554249c3046Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 2555249c3046Smrg_LT_DECL([], [build], [0])dnl 2556249c3046Smrg_LT_DECL([], [build_os], [0])dnl 2557249c3046Smrgdnl 2558249c3046SmrgAC_REQUIRE([AC_PROG_CC])dnl 2559249c3046SmrgAC_REQUIRE([LT_PATH_LD])dnl 2560249c3046SmrgAC_REQUIRE([LT_PATH_NM])dnl 2561249c3046Smrgdnl 2562249c3046SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 2563249c3046Smrgtest -z "$LN_S" && LN_S="ln -s" 2564249c3046Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 2565249c3046Smrgdnl 2566249c3046SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 2567249c3046Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2568249c3046Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2569249c3046Smrgdnl 2570249c3046Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2571249c3046Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2572249c3046Smrgm4_require([_LT_CMD_RELOAD])dnl 2573249c3046Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2574249c3046Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2575249c3046Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 25762265a131Smrg 2577249c3046Smrg_LT_CONFIG_LIBTOOL_INIT([ 2578249c3046Smrg# See if we are running on zsh, and set the options which allow our 2579249c3046Smrg# commands through without removal of \ escapes INIT. 2580249c3046Smrgif test -n "\${ZSH_VERSION+set}" ; then 2581249c3046Smrg setopt NO_GLOB_SUBST 2582249c3046Smrgfi 2583249c3046Smrg]) 2584249c3046Smrgif test -n "${ZSH_VERSION+set}" ; then 2585249c3046Smrg setopt NO_GLOB_SUBST 2586249c3046Smrgfi 2587444c061aSmrg 2588249c3046Smrg_LT_CHECK_OBJDIR 25892265a131Smrg 2590249c3046Smrgm4_require([_LT_TAG_COMPILER])dnl 2591444c061aSmrg 2592249c3046Smrgcase $host_os in 2593249c3046Smrgaix3*) 2594249c3046Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2595249c3046Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2596249c3046Smrg # vanish in a puff of smoke. 2597249c3046Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 2598249c3046Smrg COLLECT_NAMES= 2599249c3046Smrg export COLLECT_NAMES 26001477040fSmrg fi 26011477040fSmrg ;; 2602249c3046Smrgesac 2603444c061aSmrg 2604249c3046Smrg# Global variables: 2605249c3046Smrgofile=libtool 2606249c3046Smrgcan_build_shared=yes 2607444c061aSmrg 2608249c3046Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 2609249c3046Smrg# which needs '.lib'). 2610249c3046Smrglibext=a 26112265a131Smrg 2612249c3046Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2613249c3046Smrg 2614249c3046Smrgold_CC="$CC" 2615249c3046Smrgold_CFLAGS="$CFLAGS" 2616249c3046Smrg 2617249c3046Smrg# Set sane defaults for various variables 2618249c3046Smrgtest -z "$CC" && CC=cc 2619249c3046Smrgtest -z "$LTCC" && LTCC=$CC 2620249c3046Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2621249c3046Smrgtest -z "$LD" && LD=ld 2622249c3046Smrgtest -z "$ac_objext" && ac_objext=o 2623249c3046Smrg 2624249c3046Smrg_LT_CC_BASENAME([$compiler]) 2625249c3046Smrg 2626249c3046Smrg# Only perform the check for file, if the check method requires it 2627249c3046Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2628249c3046Smrgcase $deplibs_check_method in 2629249c3046Smrgfile_magic*) 2630249c3046Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2631249c3046Smrg _LT_PATH_MAGIC 26321477040fSmrg fi 26331477040fSmrg ;; 2634249c3046Smrgesac 26352265a131Smrg 2636249c3046Smrg# Use C for the default configuration in the libtool script 2637249c3046SmrgLT_SUPPORTED_TAG([CC]) 2638249c3046Smrg_LT_LANG_C_CONFIG 2639249c3046Smrg_LT_LANG_DEFAULT_CONFIG 2640249c3046Smrg_LT_CONFIG_COMMANDS 2641249c3046Smrg])# _LT_SETUP 2642444c061aSmrg 2643444c061aSmrg 2644249c3046Smrg# _LT_PREPARE_SED_QUOTE_VARS 2645249c3046Smrg# -------------------------- 2646249c3046Smrg# Define a few sed substitution that help us do robust quoting. 2647249c3046Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2648249c3046Smrg[# Backslashify metacharacters that are still active within 2649249c3046Smrg# double-quoted strings. 2650249c3046Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2651444c061aSmrg 2652249c3046Smrg# Same as above, but do not quote variable references. 2653249c3046Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2654444c061aSmrg 2655249c3046Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2656249c3046Smrg# double_quote_subst'ed string. 2657249c3046Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2658444c061aSmrg 2659249c3046Smrg# Sed substitution to delay expansion of an escaped single quote. 2660249c3046Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2661444c061aSmrg 2662249c3046Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2663249c3046Smrgno_glob_subst='s/\*/\\\*/g' 2664249c3046Smrg]) 2665444c061aSmrg 2666249c3046Smrg# _LT_PROG_LTMAIN 2667249c3046Smrg# --------------- 2668249c3046Smrg# Note that this code is called both from `configure', and `config.status' 2669249c3046Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2670249c3046Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2671249c3046Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2672249c3046Smrgm4_defun([_LT_PROG_LTMAIN], 2673249c3046Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2674249c3046Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2675249c3046Smrgltmain="$ac_aux_dir/ltmain.sh" 2676249c3046Smrg])# _LT_PROG_LTMAIN 2677444c061aSmrg 2678444c061aSmrg 2679444c061aSmrg 2680249c3046Smrg# So that we can recreate a full libtool script including additional 2681249c3046Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2682249c3046Smrg# in macros and then make a single call at the end using the `libtool' 2683249c3046Smrg# label. 2684444c061aSmrg 2685444c061aSmrg 2686249c3046Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2687249c3046Smrg# ---------------------------------------- 2688249c3046Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2689249c3046Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2690249c3046Smrg[m4_ifval([$1], 2691249c3046Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 2692249c3046Smrg [$1 2693249c3046Smrg])])]) 2694444c061aSmrg 2695249c3046Smrg# Initialize. 2696249c3046Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 26971477040fSmrg 26981477040fSmrg 2699249c3046Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 2700249c3046Smrg# ------------------------------ 2701249c3046Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2702249c3046Smrgm4_define([_LT_CONFIG_LIBTOOL], 2703249c3046Smrg[m4_ifval([$1], 2704249c3046Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 2705249c3046Smrg [$1 2706249c3046Smrg])])]) 2707444c061aSmrg 2708249c3046Smrg# Initialize. 2709249c3046Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 2710444c061aSmrg 27112265a131Smrg 2712249c3046Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 2713249c3046Smrg# ----------------------------------------------------- 2714249c3046Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 2715249c3046Smrg[_LT_CONFIG_LIBTOOL([$1]) 2716249c3046Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 2717249c3046Smrg]) 27182265a131Smrg 27191477040fSmrg 2720249c3046Smrg# _LT_FORMAT_COMMENT([COMMENT]) 2721249c3046Smrg# ----------------------------- 2722249c3046Smrg# Add leading comment marks to the start of each line, and a trailing 2723249c3046Smrg# full-stop to the whole comment if one is not present already. 2724249c3046Smrgm4_define([_LT_FORMAT_COMMENT], 2725249c3046Smrg[m4_ifval([$1], [ 2726249c3046Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 2727249c3046Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 2728249c3046Smrg)]) 2729444c061aSmrg 2730444c061aSmrg 2731444c061aSmrg 27321477040fSmrg 2733444c061aSmrg 2734249c3046Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 2735249c3046Smrg# ------------------------------------------------------------------- 2736249c3046Smrg# CONFIGNAME is the name given to the value in the libtool script. 2737249c3046Smrg# VARNAME is the (base) name used in the configure script. 2738249c3046Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 2739249c3046Smrg# VARNAME. Any other value will be used directly. 2740249c3046Smrgm4_define([_LT_DECL], 2741249c3046Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 2742249c3046Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 2743249c3046Smrg [m4_ifval([$1], [$1], [$2])]) 2744249c3046Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 2745249c3046Smrg m4_ifval([$4], 2746249c3046Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 2747249c3046Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 2748249c3046Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 2749249c3046Smrg]) 2750444c061aSmrg 2751444c061aSmrg 2752249c3046Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 2753249c3046Smrg# -------------------------------------------------------- 2754249c3046Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 2755444c061aSmrg 27562265a131Smrg 2757249c3046Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 2758249c3046Smrg# ------------------------------------------------ 2759249c3046Smrgm4_define([lt_decl_tag_varnames], 2760249c3046Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 27612265a131Smrg 27622265a131Smrg 2763249c3046Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 2764249c3046Smrg# --------------------------------------------------------- 2765249c3046Smrgm4_define([_lt_decl_filter], 2766249c3046Smrg[m4_case([$#], 2767249c3046Smrg [0], [m4_fatal([$0: too few arguments: $#])], 2768249c3046Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 2769249c3046Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 2770249c3046Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 2771249c3046Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 2772249c3046Smrg]) 2773444c061aSmrg 27742ae83157Smrg 2775249c3046Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 2776249c3046Smrg# -------------------------------------------------- 2777249c3046Smrgm4_define([lt_decl_quote_varnames], 2778249c3046Smrg[_lt_decl_filter([value], [1], $@)]) 27792ae83157Smrg 2780444c061aSmrg 2781249c3046Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 2782249c3046Smrg# --------------------------------------------------- 2783249c3046Smrgm4_define([lt_decl_dquote_varnames], 2784249c3046Smrg[_lt_decl_filter([value], [2], $@)]) 2785444c061aSmrg 2786444c061aSmrg 2787249c3046Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 2788249c3046Smrg# --------------------------------------------------- 2789249c3046Smrgm4_define([lt_decl_varnames_tagged], 2790249c3046Smrg[m4_assert([$# <= 2])dnl 2791249c3046Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 2792249c3046Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 2793249c3046Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 2794249c3046Smrgm4_define([_lt_decl_varnames_tagged], 2795249c3046Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 2796444c061aSmrg 2797444c061aSmrg 2798249c3046Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 2799249c3046Smrg# ------------------------------------------------ 2800249c3046Smrgm4_define([lt_decl_all_varnames], 2801249c3046Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 2802249c3046Smrg m4_if([$2], [], 2803249c3046Smrg m4_quote(lt_decl_varnames), 2804249c3046Smrg m4_quote(m4_shift($@))))[]dnl 2805249c3046Smrg]) 2806249c3046Smrgm4_define([_lt_decl_all_varnames], 2807249c3046Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 2808249c3046Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 2809249c3046Smrg]) 2810444c061aSmrg 2811444c061aSmrg 2812249c3046Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 2813249c3046Smrg# ------------------------------------ 2814249c3046Smrg# Quote a variable value, and forward it to `config.status' so that its 2815249c3046Smrg# declaration there will have the same value as in `configure'. VARNAME 2816249c3046Smrg# must have a single quote delimited value for this to work. 2817249c3046Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 2818249c3046Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 2819444c061aSmrg 28202265a131Smrg 2821249c3046Smrg# _LT_CONFIG_STATUS_DECLARATIONS 2822249c3046Smrg# ------------------------------ 2823249c3046Smrg# We delimit libtool config variables with single quotes, so when 2824249c3046Smrg# we write them to config.status, we have to be sure to quote all 2825249c3046Smrg# embedded single quotes properly. In configure, this macro expands 2826249c3046Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 2827249c3046Smrg# 2828249c3046Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 2829249c3046Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 2830249c3046Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 2831249c3046Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 28321477040fSmrg 28331477040fSmrg 2834249c3046Smrg# _LT_LIBTOOL_TAGS 2835249c3046Smrg# ---------------- 2836249c3046Smrg# Output comment and list of tags supported by the script 2837249c3046Smrgm4_defun([_LT_LIBTOOL_TAGS], 2838249c3046Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 2839249c3046Smrgavailable_tags="_LT_TAGS"dnl 2840249c3046Smrg]) 28411477040fSmrg 28422265a131Smrg 2843249c3046Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 2844249c3046Smrg# ----------------------------------- 2845249c3046Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 2846249c3046Smrg# expand to a commented shell variable setting: 2847249c3046Smrg# 2848249c3046Smrg# # Some comment about what VAR is for. 2849249c3046Smrg# visible_name=$lt_internal_name 2850249c3046Smrgm4_define([_LT_LIBTOOL_DECLARE], 2851249c3046Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 2852249c3046Smrg [description])))[]dnl 2853249c3046Smrgm4_pushdef([_libtool_name], 2854249c3046Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 2855249c3046Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 2856249c3046Smrg [0], [_libtool_name=[$]$1], 2857249c3046Smrg [1], [_libtool_name=$lt_[]$1], 2858249c3046Smrg [2], [_libtool_name=$lt_[]$1], 2859249c3046Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 2860249c3046Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 2861249c3046Smrg]) 28622265a131Smrg 2863444c061aSmrg 2864249c3046Smrg# _LT_LIBTOOL_CONFIG_VARS 2865249c3046Smrg# ----------------------- 2866249c3046Smrg# Produce commented declarations of non-tagged libtool config variables 2867249c3046Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 2868249c3046Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 2869249c3046Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 2870249c3046Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 2871249c3046Smrg[m4_foreach([_lt_var], 2872249c3046Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 2873249c3046Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 2874444c061aSmrg 2875444c061aSmrg 2876249c3046Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 2877249c3046Smrg# ------------------------- 2878249c3046Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 2879249c3046Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 2880249c3046Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 2881444c061aSmrg 2882444c061aSmrg 2883249c3046Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 2884249c3046Smrg# ------------------------------ 2885249c3046Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 2886444c061aSmrg 28872ae83157Smrg 2888249c3046Smrg# _LT_CONFIG_COMMANDS 2889249c3046Smrg# ------------------- 2890249c3046Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 2891249c3046Smrg# variables for single and double quote escaping we saved from calls 2892249c3046Smrg# to _LT_DECL, we can put quote escaped variables declarations 2893249c3046Smrg# into `config.status', and then the shell code to quote escape them in 2894249c3046Smrg# for loops in `config.status'. Finally, any additional code accumulated 2895249c3046Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 2896249c3046Smrgm4_defun([_LT_CONFIG_COMMANDS], 2897249c3046Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 2898249c3046Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 2899249c3046Smrg dnl instead of duplicating it all over again into config.status, 2900249c3046Smrg dnl then we will have config.status run $CONFIG_LT later, so it 2901249c3046Smrg dnl needs to know what name is stored there: 2902249c3046Smrg [AC_CONFIG_COMMANDS([libtool], 2903249c3046Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 2904249c3046Smrg dnl If the libtool generation code is destined for config.status, 2905249c3046Smrg dnl expand the accumulated commands and init code now: 2906249c3046Smrg [AC_CONFIG_COMMANDS([libtool], 2907249c3046Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 2908249c3046Smrg])#_LT_CONFIG_COMMANDS 29092ae83157Smrg 29102ae83157Smrg 2911249c3046Smrg# Initialize. 2912249c3046Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 2913249c3046Smrg[ 29142ae83157Smrg 2915249c3046Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 2916249c3046Smrg# if CDPATH is set. 2917249c3046Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 29181477040fSmrg 2919249c3046Smrgsed_quote_subst='$sed_quote_subst' 2920249c3046Smrgdouble_quote_subst='$double_quote_subst' 2921249c3046Smrgdelay_variable_subst='$delay_variable_subst' 2922249c3046Smrg_LT_CONFIG_STATUS_DECLARATIONS 2923249c3046SmrgLTCC='$LTCC' 2924249c3046SmrgLTCFLAGS='$LTCFLAGS' 2925249c3046Smrgcompiler='$compiler_DEFAULT' 29262ae83157Smrg 2927249c3046Smrg# A function that is used when there is no print builtin or printf. 2928249c3046Smrgfunc_fallback_echo () 2929249c3046Smrg{ 2930249c3046Smrg eval 'cat <<_LTECHO_EOF 2931249c3046Smrg\$[]1 2932249c3046Smrg_LTECHO_EOF' 2933249c3046Smrg} 29342ae83157Smrg 2935249c3046Smrg# Quote evaled strings. 2936249c3046Smrgfor var in lt_decl_all_varnames([[ \ 2937249c3046Smrg]], lt_decl_quote_varnames); do 2938249c3046Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 2939249c3046Smrg *[[\\\\\\\`\\"\\\$]]*) 2940249c3046Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 2941249c3046Smrg ;; 2942249c3046Smrg *) 2943249c3046Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 2944249c3046Smrg ;; 2945249c3046Smrg esac 2946249c3046Smrgdone 29472ae83157Smrg 2948249c3046Smrg# Double-quote double-evaled strings. 2949249c3046Smrgfor var in lt_decl_all_varnames([[ \ 2950249c3046Smrg]], lt_decl_dquote_varnames); do 2951249c3046Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 2952249c3046Smrg *[[\\\\\\\`\\"\\\$]]*) 2953249c3046Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 2954249c3046Smrg ;; 2955249c3046Smrg *) 2956249c3046Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 2957249c3046Smrg ;; 2958249c3046Smrg esac 2959249c3046Smrgdone 29602ae83157Smrg 2961249c3046Smrg_LT_OUTPUT_LIBTOOL_INIT 2962249c3046Smrg]) 29632ae83157Smrg 2964249c3046Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 2965249c3046Smrg# ------------------------------------ 2966249c3046Smrg# Generate a child script FILE with all initialization necessary to 2967249c3046Smrg# reuse the environment learned by the parent script, and make the 2968249c3046Smrg# file executable. If COMMENT is supplied, it is inserted after the 2969249c3046Smrg# `#!' sequence but before initialization text begins. After this 2970249c3046Smrg# macro, additional text can be appended to FILE to form the body of 2971249c3046Smrg# the child script. The macro ends with non-zero status if the 2972249c3046Smrg# file could not be fully written (such as if the disk is full). 2973249c3046Smrgm4_ifdef([AS_INIT_GENERATED], 2974249c3046Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 2975249c3046Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 2976249c3046Smrg[m4_require([AS_PREPARE])]dnl 2977249c3046Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 2978249c3046Smrg[lt_write_fail=0 2979249c3046Smrgcat >$1 <<_ASEOF || lt_write_fail=1 2980249c3046Smrg#! $SHELL 2981249c3046Smrg# Generated by $as_me. 2982249c3046Smrg$2 2983249c3046SmrgSHELL=\${CONFIG_SHELL-$SHELL} 2984249c3046Smrgexport SHELL 2985249c3046Smrg_ASEOF 2986249c3046Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 2987249c3046SmrgAS_SHELL_SANITIZE 2988249c3046Smrg_AS_PREPARE 2989249c3046Smrgexec AS_MESSAGE_FD>&1 2990249c3046Smrg_ASEOF 2991249c3046Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 2992249c3046Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 29932ae83157Smrg 2994249c3046Smrg# LT_OUTPUT 2995249c3046Smrg# --------- 2996249c3046Smrg# This macro allows early generation of the libtool script (before 2997249c3046Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 2998249c3046Smrg# tests. 2999249c3046SmrgAC_DEFUN([LT_OUTPUT], 3000249c3046Smrg[: ${CONFIG_LT=./config.lt} 3001249c3046SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 3002249c3046Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3003249c3046Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 30042ae83157Smrg 3005249c3046Smrgcat >>"$CONFIG_LT" <<\_LTEOF 3006249c3046Smrglt_cl_silent=false 3007249c3046Smrgexec AS_MESSAGE_LOG_FD>>config.log 3008249c3046Smrg{ 3009249c3046Smrg echo 3010249c3046Smrg AS_BOX([Running $as_me.]) 3011249c3046Smrg} >&AS_MESSAGE_LOG_FD 30122ae83157Smrg 3013249c3046Smrglt_cl_help="\ 3014249c3046Smrg\`$as_me' creates a local libtool stub from the current configuration, 3015249c3046Smrgfor use in further configure time tests before the real libtool is 3016249c3046Smrggenerated. 30172ae83157Smrg 3018249c3046SmrgUsage: $[0] [[OPTIONS]] 30192ae83157Smrg 3020249c3046Smrg -h, --help print this help, then exit 3021249c3046Smrg -V, --version print version number, then exit 3022249c3046Smrg -q, --quiet do not print progress messages 3023249c3046Smrg -d, --debug don't remove temporary files 3024444c061aSmrg 3025249c3046SmrgReport bugs to <bug-libtool@gnu.org>." 3026444c061aSmrg 3027249c3046Smrglt_cl_version="\ 3028249c3046Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3029249c3046Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3030249c3046Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 3031444c061aSmrg 3032249c3046SmrgCopyright (C) 2010 Free Software Foundation, Inc. 3033249c3046SmrgThis config.lt script is free software; the Free Software Foundation 3034249c3046Smrggives unlimited permision to copy, distribute and modify it." 3035444c061aSmrg 3036249c3046Smrgwhile test $[#] != 0 3037249c3046Smrgdo 3038249c3046Smrg case $[1] in 3039249c3046Smrg --version | --v* | -V ) 3040249c3046Smrg echo "$lt_cl_version"; exit 0 ;; 3041249c3046Smrg --help | --h* | -h ) 3042249c3046Smrg echo "$lt_cl_help"; exit 0 ;; 3043249c3046Smrg --debug | --d* | -d ) 3044249c3046Smrg debug=: ;; 3045249c3046Smrg --quiet | --q* | --silent | --s* | -q ) 3046249c3046Smrg lt_cl_silent=: ;; 3047444c061aSmrg 3048249c3046Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 3049249c3046SmrgTry \`$[0] --help' for more information.]) ;; 30502ae83157Smrg 3051249c3046Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 3052249c3046SmrgTry \`$[0] --help' for more information.]) ;; 3053249c3046Smrg esac 3054249c3046Smrg shift 3055249c3046Smrgdone 30562ae83157Smrg 3057249c3046Smrgif $lt_cl_silent; then 3058249c3046Smrg exec AS_MESSAGE_FD>/dev/null 3059249c3046Smrgfi 3060249c3046Smrg_LTEOF 30612ae83157Smrg 3062249c3046Smrgcat >>"$CONFIG_LT" <<_LTEOF 3063249c3046Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 3064249c3046Smrg_LTEOF 30652ae83157Smrg 3066249c3046Smrgcat >>"$CONFIG_LT" <<\_LTEOF 3067249c3046SmrgAC_MSG_NOTICE([creating $ofile]) 3068249c3046Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 3069249c3046SmrgAS_EXIT(0) 3070249c3046Smrg_LTEOF 3071249c3046Smrgchmod +x "$CONFIG_LT" 30722ae83157Smrg 3073249c3046Smrg# configure is writing to config.log, but config.lt does its own redirection, 3074249c3046Smrg# appending to config.log, which fails on DOS, as config.log is still kept 3075249c3046Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 3076249c3046Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 3077249c3046Smrglt_cl_success=: 3078249c3046Smrgtest "$silent" = yes && 3079249c3046Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 3080249c3046Smrgexec AS_MESSAGE_LOG_FD>/dev/null 3081249c3046Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 3082249c3046Smrgexec AS_MESSAGE_LOG_FD>>config.log 3083249c3046Smrg$lt_cl_success || AS_EXIT(1) 3084249c3046Smrg])# LT_OUTPUT 30852ae83157Smrg 30862ae83157Smrg 3087249c3046Smrg# _LT_CONFIG(TAG) 3088249c3046Smrg# --------------- 3089249c3046Smrg# If TAG is the built-in tag, create an initial libtool script with a 3090249c3046Smrg# default configuration from the untagged config vars. Otherwise add code 3091249c3046Smrg# to config.status for appending the configuration named by TAG from the 3092249c3046Smrg# matching tagged config vars. 3093249c3046Smrgm4_defun([_LT_CONFIG], 3094249c3046Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3095249c3046Smrg_LT_CONFIG_SAVE_COMMANDS([ 3096249c3046Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 3097249c3046Smrg m4_if(_LT_TAG, [C], [ 3098249c3046Smrg # See if we are running on zsh, and set the options which allow our 3099249c3046Smrg # commands through without removal of \ escapes. 3100249c3046Smrg if test -n "${ZSH_VERSION+set}" ; then 3101249c3046Smrg setopt NO_GLOB_SUBST 3102249c3046Smrg fi 31032ae83157Smrg 3104249c3046Smrg cfgfile="${ofile}T" 3105249c3046Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 3106249c3046Smrg $RM "$cfgfile" 31072ae83157Smrg 3108249c3046Smrg cat <<_LT_EOF >> "$cfgfile" 3109249c3046Smrg#! $SHELL 31102ae83157Smrg 3111249c3046Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 3112249c3046Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 3113249c3046Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3114249c3046Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 3115249c3046Smrg# 3116249c3046Smrg_LT_COPYING 3117249c3046Smrg_LT_LIBTOOL_TAGS 3118444c061aSmrg 3119249c3046Smrg# ### BEGIN LIBTOOL CONFIG 3120249c3046Smrg_LT_LIBTOOL_CONFIG_VARS 3121249c3046Smrg_LT_LIBTOOL_TAG_VARS 3122249c3046Smrg# ### END LIBTOOL CONFIG 3123444c061aSmrg 31241477040fSmrg_LT_EOF 31252ae83157Smrg 3126249c3046Smrg case $host_os in 3127249c3046Smrg aix3*) 3128249c3046Smrg cat <<\_LT_EOF >> "$cfgfile" 3129249c3046Smrg# AIX sometimes has problems with the GCC collect2 program. For some 3130249c3046Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 3131249c3046Smrg# vanish in a puff of smoke. 3132249c3046Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 3133249c3046Smrg COLLECT_NAMES= 3134249c3046Smrg export COLLECT_NAMES 3135249c3046Smrgfi 31361477040fSmrg_LT_EOF 3137249c3046Smrg ;; 3138249c3046Smrg esac 3139444c061aSmrg 3140249c3046Smrg _LT_PROG_LTMAIN 3141444c061aSmrg 3142249c3046Smrg # We use sed instead of cat because bash on DJGPP gets confused if 3143249c3046Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 3144249c3046Smrg # text mode, it properly converts lines to CR/LF. This bash problem 3145249c3046Smrg # is reportedly fixed, but why not run on old versions too? 3146249c3046Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 3147249c3046Smrg || (rm -f "$cfgfile"; exit 1) 3148249c3046Smrg 3149249c3046Smrg _LT_PROG_XSI_SHELLFNS 3150249c3046Smrg 3151249c3046Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 3152249c3046Smrg || (rm -f "$cfgfile"; exit 1) 3153249c3046Smrg 3154249c3046Smrg mv -f "$cfgfile" "$ofile" || 3155249c3046Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 3156249c3046Smrg chmod +x "$ofile" 3157249c3046Smrg], 3158249c3046Smrg[cat <<_LT_EOF >> "$ofile" 3159249c3046Smrg 3160249c3046Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 3161249c3046Smrgdnl in a comment (ie after a #). 3162249c3046Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 3163249c3046Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 3164249c3046Smrg# ### END LIBTOOL TAG CONFIG: $1 31651477040fSmrg_LT_EOF 3166249c3046Smrg])dnl /m4_if 3167249c3046Smrg], 3168249c3046Smrg[m4_if([$1], [], [ 3169249c3046Smrg PACKAGE='$PACKAGE' 3170249c3046Smrg VERSION='$VERSION' 3171249c3046Smrg TIMESTAMP='$TIMESTAMP' 3172249c3046Smrg RM='$RM' 3173249c3046Smrg ofile='$ofile'], []) 3174249c3046Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 3175249c3046Smrg])# _LT_CONFIG 3176444c061aSmrg 3177444c061aSmrg 3178249c3046Smrg# LT_SUPPORTED_TAG(TAG) 3179249c3046Smrg# --------------------- 3180249c3046Smrg# Trace this macro to discover what tags are supported by the libtool 3181249c3046Smrg# --tag option, using: 3182249c3046Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 3183249c3046SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 3184444c061aSmrg 31852ae83157Smrg 3186249c3046Smrg# C support is built-in for now 3187249c3046Smrgm4_define([_LT_LANG_C_enabled], []) 3188249c3046Smrgm4_define([_LT_TAGS], []) 31892ae83157Smrg 3190444c061aSmrg 3191249c3046Smrg# LT_LANG(LANG) 3192249c3046Smrg# ------------- 3193249c3046Smrg# Enable libtool support for the given language if not already enabled. 3194249c3046SmrgAC_DEFUN([LT_LANG], 3195249c3046Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 3196249c3046Smrgm4_case([$1], 3197249c3046Smrg [C], [_LT_LANG(C)], 3198249c3046Smrg [C++], [_LT_LANG(CXX)], 3199249c3046Smrg [Java], [_LT_LANG(GCJ)], 3200249c3046Smrg [Fortran 77], [_LT_LANG(F77)], 3201249c3046Smrg [Fortran], [_LT_LANG(FC)], 3202249c3046Smrg [Windows Resource], [_LT_LANG(RC)], 3203249c3046Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 3204249c3046Smrg [_LT_LANG($1)], 3205249c3046Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 3206249c3046Smrg])# LT_LANG 3207444c061aSmrg 3208444c061aSmrg 3209249c3046Smrg# _LT_LANG(LANGNAME) 3210249c3046Smrg# ------------------ 3211249c3046Smrgm4_defun([_LT_LANG], 3212249c3046Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 3213249c3046Smrg [LT_SUPPORTED_TAG([$1])dnl 3214249c3046Smrg m4_append([_LT_TAGS], [$1 ])dnl 3215249c3046Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 3216249c3046Smrg _LT_LANG_$1_CONFIG($1)])dnl 3217249c3046Smrg])# _LT_LANG 3218249c3046Smrg 3219249c3046Smrg 3220249c3046Smrg# _LT_LANG_DEFAULT_CONFIG 3221249c3046Smrg# ----------------------- 3222249c3046Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 3223249c3046Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 3224249c3046Smrg [LT_LANG(CXX)], 3225249c3046Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3226249c3046Smrg 3227249c3046SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 3228249c3046Smrg [LT_LANG(F77)], 3229249c3046Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3230249c3046Smrg 3231249c3046SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 3232249c3046Smrg [LT_LANG(FC)], 3233249c3046Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 3234249c3046Smrg 3235249c3046Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 3236249c3046Smrgdnl pulling things in needlessly. 3237249c3046SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 3238249c3046Smrg [LT_LANG(GCJ)], 3239249c3046Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 3240249c3046Smrg [LT_LANG(GCJ)], 3241249c3046Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 3242249c3046Smrg [LT_LANG(GCJ)], 3243249c3046Smrg [m4_ifdef([AC_PROG_GCJ], 3244249c3046Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 3245249c3046Smrg m4_ifdef([A][M_PROG_GCJ], 3246249c3046Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 3247249c3046Smrg m4_ifdef([LT_PROG_GCJ], 3248249c3046Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 3249249c3046Smrg 3250249c3046SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 3251249c3046Smrg [LT_LANG(RC)], 3252249c3046Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 3253249c3046Smrg])# _LT_LANG_DEFAULT_CONFIG 3254249c3046Smrg 3255249c3046Smrg# Obsolete macros: 3256249c3046SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 3257249c3046SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 3258249c3046SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 3259249c3046SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 3260249c3046SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 3261249c3046Smrgdnl aclocal-1.4 backwards compatibility: 3262249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 3263249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 3264249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 3265249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 3266249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 3267249c3046Smrg 3268249c3046Smrg 3269249c3046Smrg# _LT_TAG_COMPILER 3270249c3046Smrg# ---------------- 3271249c3046Smrgm4_defun([_LT_TAG_COMPILER], 3272249c3046Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3273249c3046Smrg 3274249c3046Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 3275249c3046Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 3276249c3046Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 3277249c3046Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 3278249c3046Smrg 3279249c3046Smrg# If no C compiler was specified, use CC. 3280249c3046SmrgLTCC=${LTCC-"$CC"} 3281249c3046Smrg 3282249c3046Smrg# If no C compiler flags were specified, use CFLAGS. 3283249c3046SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 3284249c3046Smrg 3285249c3046Smrg# Allow CC to be a program name with arguments. 3286249c3046Smrgcompiler=$CC 3287249c3046Smrg])# _LT_TAG_COMPILER 3288249c3046Smrg 3289249c3046Smrg 3290249c3046Smrg# _LT_COMPILER_BOILERPLATE 3291249c3046Smrg# ------------------------ 3292249c3046Smrg# Check for compiler boilerplate output or warnings with 3293249c3046Smrg# the simple compiler test code. 3294249c3046Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 3295249c3046Smrg[m4_require([_LT_DECL_SED])dnl 3296249c3046Smrgac_outfile=conftest.$ac_objext 3297249c3046Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 3298249c3046Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3299249c3046Smrg_lt_compiler_boilerplate=`cat conftest.err` 3300249c3046Smrg$RM conftest* 3301249c3046Smrg])# _LT_COMPILER_BOILERPLATE 3302249c3046Smrg 3303249c3046Smrg 3304249c3046Smrg# _LT_LINKER_BOILERPLATE 3305249c3046Smrg# ---------------------- 3306249c3046Smrg# Check for linker boilerplate output or warnings with 3307249c3046Smrg# the simple link test code. 3308249c3046Smrgm4_defun([_LT_LINKER_BOILERPLATE], 3309249c3046Smrg[m4_require([_LT_DECL_SED])dnl 3310249c3046Smrgac_outfile=conftest.$ac_objext 3311249c3046Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 3312249c3046Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3313249c3046Smrg_lt_linker_boilerplate=`cat conftest.err` 3314249c3046Smrg$RM -r conftest* 3315249c3046Smrg])# _LT_LINKER_BOILERPLATE 3316249c3046Smrg 3317249c3046Smrg# _LT_REQUIRED_DARWIN_CHECKS 3318249c3046Smrg# ------------------------- 3319249c3046Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 3320249c3046Smrg case $host_os in 3321249c3046Smrg rhapsody* | darwin*) 3322249c3046Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3323249c3046Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3324249c3046Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 3325249c3046Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 3326249c3046Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 3327249c3046Smrg _LT_DECL([], [DSYMUTIL], [1], 3328249c3046Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 3329249c3046Smrg _LT_DECL([], [NMEDIT], [1], 3330249c3046Smrg [Tool to change global to local symbols on Mac OS X]) 3331249c3046Smrg _LT_DECL([], [LIPO], [1], 3332249c3046Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 3333249c3046Smrg _LT_DECL([], [OTOOL], [1], 3334249c3046Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 3335249c3046Smrg _LT_DECL([], [OTOOL64], [1], 3336249c3046Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 3337249c3046Smrg 3338249c3046Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3339249c3046Smrg [lt_cv_apple_cc_single_mod=no 3340249c3046Smrg if test -z "${LT_MULTI_MODULE}"; then 3341249c3046Smrg # By default we will add the -single_module flag. You can override 3342249c3046Smrg # by either setting the environment variable LT_MULTI_MODULE 3343249c3046Smrg # non-empty at configure time, or by adding -multi_module to the 3344249c3046Smrg # link flags. 3345249c3046Smrg rm -rf libconftest.dylib* 3346249c3046Smrg echo "int foo(void){return 1;}" > conftest.c 3347249c3046Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3348249c3046Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 3349249c3046Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3350249c3046Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 3351249c3046Smrg _lt_result=$? 3352249c3046Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 3353249c3046Smrg lt_cv_apple_cc_single_mod=yes 33541477040fSmrg else 3355249c3046Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 33561477040fSmrg fi 3357249c3046Smrg rm -rf libconftest.dylib* 3358249c3046Smrg rm -f conftest.* 3359249c3046Smrg fi]) 3360249c3046Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3361249c3046Smrg [lt_cv_ld_exported_symbols_list], 3362249c3046Smrg [lt_cv_ld_exported_symbols_list=no 3363249c3046Smrg save_LDFLAGS=$LDFLAGS 3364249c3046Smrg echo "_main" > conftest.sym 3365249c3046Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3366249c3046Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3367249c3046Smrg [lt_cv_ld_exported_symbols_list=yes], 3368249c3046Smrg [lt_cv_ld_exported_symbols_list=no]) 3369249c3046Smrg LDFLAGS="$save_LDFLAGS" 3370249c3046Smrg ]) 3371249c3046Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 3372249c3046Smrg [lt_cv_ld_force_load=no 3373249c3046Smrg cat > conftest.c << _LT_EOF 3374249c3046Smrgint forced_loaded() { return 2;} 3375249c3046Smrg_LT_EOF 3376249c3046Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 3377249c3046Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 3378249c3046Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 3379249c3046Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 3380249c3046Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 3381249c3046Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 3382249c3046Smrg cat > conftest.c << _LT_EOF 3383249c3046Smrgint main() { return 0;} 3384249c3046Smrg_LT_EOF 3385249c3046Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 3386249c3046Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 3387249c3046Smrg _lt_result=$? 3388249c3046Smrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 3389249c3046Smrg lt_cv_ld_force_load=yes 3390249c3046Smrg else 3391249c3046Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3392249c3046Smrg fi 3393249c3046Smrg rm -f conftest.err libconftest.a conftest conftest.c 3394249c3046Smrg rm -rf conftest.dSYM 3395249c3046Smrg ]) 3396249c3046Smrg case $host_os in 3397249c3046Smrg rhapsody* | darwin1.[[012]]) 3398249c3046Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3399249c3046Smrg darwin1.*) 3400249c3046Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3401249c3046Smrg darwin*) # darwin 5.x on 3402249c3046Smrg # if running on 10.5 or later, the deployment target defaults 3403249c3046Smrg # to the OS version, if on x86, and 10.4, the deployment 3404249c3046Smrg # target defaults to 10.4. Don't you love it? 3405249c3046Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3406249c3046Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3407249c3046Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3408249c3046Smrg 10.[[012]]*) 3409249c3046Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3410249c3046Smrg 10.*) 3411249c3046Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3412249c3046Smrg esac 3413249c3046Smrg ;; 3414249c3046Smrg esac 3415249c3046Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3416249c3046Smrg _lt_dar_single_mod='$single_module' 3417249c3046Smrg fi 3418249c3046Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3419249c3046Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3420249c3046Smrg else 3421249c3046Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 3422249c3046Smrg fi 3423249c3046Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 3424249c3046Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 3425249c3046Smrg else 3426249c3046Smrg _lt_dsymutil= 3427249c3046Smrg fi 3428249c3046Smrg ;; 3429249c3046Smrg esac 3430249c3046Smrg]) 3431249c3046Smrg 3432249c3046Smrg 3433249c3046Smrg# _LT_DARWIN_LINKER_FEATURES 3434249c3046Smrg# -------------------------- 3435249c3046Smrg# Checks for linker and compiler features on darwin 3436249c3046Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 3437249c3046Smrg[ 3438249c3046Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 3439249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3440249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=no 3441249c3046Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 3442249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3443249c3046Smrg if test "$lt_cv_ld_force_load" = "yes"; then 3444249c3046Smrg _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\"`' 3445249c3046Smrg else 3446249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 3447249c3046Smrg fi 3448249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 3449249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3450249c3046Smrg case $cc_basename in 3451249c3046Smrg ifort*) _lt_dar_can_shared=yes ;; 3452249c3046Smrg *) _lt_dar_can_shared=$GCC ;; 3453249c3046Smrg esac 3454249c3046Smrg if test "$_lt_dar_can_shared" = "yes"; then 3455249c3046Smrg output_verbose_link_cmd=func_echo_all 3456249c3046Smrg _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}" 3457249c3046Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3458249c3046Smrg _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}" 3459249c3046Smrg _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}" 3460249c3046Smrg m4_if([$1], [CXX], 3461249c3046Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3462249c3046Smrg _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}" 3463249c3046Smrg _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}" 3464249c3046Smrg fi 3465249c3046Smrg],[]) 3466249c3046Smrg else 3467249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 3468249c3046Smrg fi 3469249c3046Smrg]) 3470249c3046Smrg 3471249c3046Smrg# _LT_SYS_MODULE_PATH_AIX 3472249c3046Smrg# ----------------------- 3473249c3046Smrg# Links a minimal program and checks the executable 3474249c3046Smrg# for the system default hardcoded library path. In most cases, 3475249c3046Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 3476249c3046Smrg# the location of the communication and MPI libs are included too. 3477249c3046Smrg# If we don't find anything, use the default library path according 3478249c3046Smrg# to the aix ld manual. 3479249c3046Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 3480249c3046Smrg[m4_require([_LT_DECL_SED])dnl 3481249c3046SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3482249c3046Smrglt_aix_libpath_sed=' 3483249c3046Smrg /Import File Strings/,/^$/ { 3484249c3046Smrg /^0/ { 3485249c3046Smrg s/^0 *\(.*\)$/\1/ 3486249c3046Smrg p 3487249c3046Smrg } 3488249c3046Smrg }' 3489249c3046Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3490249c3046Smrg# Check for a 64-bit object if we didn't find anything. 3491249c3046Smrgif test -z "$aix_libpath"; then 3492249c3046Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3493249c3046Smrgfi],[]) 3494249c3046Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3495249c3046Smrg])# _LT_SYS_MODULE_PATH_AIX 3496249c3046Smrg 3497249c3046Smrg 3498249c3046Smrg# _LT_SHELL_INIT(ARG) 3499249c3046Smrg# ------------------- 3500249c3046Smrgm4_define([_LT_SHELL_INIT], 3501249c3046Smrg[m4_divert_text([M4SH-INIT], [$1 3502249c3046Smrg])])# _LT_SHELL_INIT 3503249c3046Smrg 3504249c3046Smrg 3505249c3046Smrg 3506249c3046Smrg# _LT_PROG_ECHO_BACKSLASH 3507249c3046Smrg# ----------------------- 3508249c3046Smrg# Find how we can fake an echo command that does not interpret backslash. 3509249c3046Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 3510249c3046Smrg# of the generated configure script which will find a shell with a builtin 3511249c3046Smrg# printf (which we can use as an echo command). 3512249c3046Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 3513249c3046Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3514249c3046SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3515249c3046SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3516249c3046Smrg 3517249c3046SmrgAC_MSG_CHECKING([how to print strings]) 3518249c3046Smrg# Test print first, because it will be a builtin if present. 3519249c3046Smrgif test "X`print -r -- -n 2>/dev/null`" = X-n && \ 3520249c3046Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 3521249c3046Smrg ECHO='print -r --' 3522249c3046Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 3523249c3046Smrg ECHO='printf %s\n' 3524249c3046Smrgelse 3525249c3046Smrg # Use this function as a fallback that always works. 3526249c3046Smrg func_fallback_echo () 3527249c3046Smrg { 3528249c3046Smrg eval 'cat <<_LTECHO_EOF 3529249c3046Smrg$[]1 3530249c3046Smrg_LTECHO_EOF' 3531249c3046Smrg } 3532249c3046Smrg ECHO='func_fallback_echo' 3533249c3046Smrgfi 3534249c3046Smrg 3535249c3046Smrg# func_echo_all arg... 3536249c3046Smrg# Invoke $ECHO with all args, space-separated. 3537249c3046Smrgfunc_echo_all () 3538249c3046Smrg{ 3539249c3046Smrg $ECHO "$*" 3540249c3046Smrg} 3541249c3046Smrg 3542249c3046Smrgcase "$ECHO" in 3543249c3046Smrg printf*) AC_MSG_RESULT([printf]) ;; 3544249c3046Smrg print*) AC_MSG_RESULT([print -r]) ;; 3545249c3046Smrg *) AC_MSG_RESULT([cat]) ;; 3546249c3046Smrgesac 3547249c3046Smrg 3548249c3046Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 3549249c3046Smrg[_AS_DETECT_SUGGESTED([ 3550249c3046Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 3551249c3046Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3552249c3046Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3553249c3046Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3554249c3046Smrg PATH=/empty FPATH=/empty; export PATH FPATH 3555249c3046Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 3556249c3046Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 3557249c3046Smrg 3558249c3046Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 3559249c3046Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 3560249c3046Smrg])# _LT_PROG_ECHO_BACKSLASH 3561249c3046Smrg 3562249c3046Smrg 3563249c3046Smrg# _LT_ENABLE_LOCK 3564249c3046Smrg# --------------- 3565249c3046Smrgm4_defun([_LT_ENABLE_LOCK], 3566249c3046Smrg[AC_ARG_ENABLE([libtool-lock], 3567249c3046Smrg [AS_HELP_STRING([--disable-libtool-lock], 3568249c3046Smrg [avoid locking (might break parallel builds)])]) 3569249c3046Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 3570249c3046Smrg 3571249c3046Smrg# Some flags need to be propagated to the compiler or linker for good 3572249c3046Smrg# libtool support. 3573249c3046Smrgcase $host in 3574249c3046Smrgia64-*-hpux*) 3575249c3046Smrg # Find out which ABI we are using. 3576249c3046Smrg echo 'int i;' > conftest.$ac_ext 3577249c3046Smrg if AC_TRY_EVAL(ac_compile); then 3578249c3046Smrg case `/usr/bin/file conftest.$ac_objext` in 3579249c3046Smrg *ELF-32*) 3580249c3046Smrg HPUX_IA64_MODE="32" 35811477040fSmrg ;; 3582249c3046Smrg *ELF-64*) 3583249c3046Smrg HPUX_IA64_MODE="64" 35841477040fSmrg ;; 3585249c3046Smrg esac 3586249c3046Smrg fi 3587249c3046Smrg rm -rf conftest* 3588249c3046Smrg ;; 3589249c3046Smrg*-*-irix6*) 3590249c3046Smrg # Find out which ABI we are using. 3591249c3046Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 3592249c3046Smrg if AC_TRY_EVAL(ac_compile); then 3593249c3046Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3594249c3046Smrg case `/usr/bin/file conftest.$ac_objext` in 3595249c3046Smrg *32-bit*) 3596249c3046Smrg LD="${LD-ld} -melf32bsmip" 3597249c3046Smrg ;; 3598249c3046Smrg *N32*) 3599249c3046Smrg LD="${LD-ld} -melf32bmipn32" 3600249c3046Smrg ;; 3601249c3046Smrg *64-bit*) 3602249c3046Smrg LD="${LD-ld} -melf64bmip" 36031477040fSmrg ;; 3604249c3046Smrg esac 3605249c3046Smrg else 3606249c3046Smrg case `/usr/bin/file conftest.$ac_objext` in 3607249c3046Smrg *32-bit*) 3608249c3046Smrg LD="${LD-ld} -32" 3609249c3046Smrg ;; 3610249c3046Smrg *N32*) 3611249c3046Smrg LD="${LD-ld} -n32" 3612249c3046Smrg ;; 3613249c3046Smrg *64-bit*) 3614249c3046Smrg LD="${LD-ld} -64" 3615249c3046Smrg ;; 3616249c3046Smrg esac 3617249c3046Smrg fi 3618249c3046Smrg fi 3619249c3046Smrg rm -rf conftest* 3620249c3046Smrg ;; 3621249c3046Smrg 3622249c3046Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 3623249c3046Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 3624249c3046Smrg # Find out which ABI we are using. 3625249c3046Smrg echo 'int i;' > conftest.$ac_ext 3626249c3046Smrg if AC_TRY_EVAL(ac_compile); then 3627249c3046Smrg case `/usr/bin/file conftest.o` in 3628249c3046Smrg *32-bit*) 3629249c3046Smrg case $host in 3630249c3046Smrg x86_64-*kfreebsd*-gnu) 3631249c3046Smrg LD="${LD-ld} -m elf_i386_fbsd" 36321477040fSmrg ;; 3633249c3046Smrg x86_64-*linux*) 3634249c3046Smrg LD="${LD-ld} -m elf_i386" 36351477040fSmrg ;; 3636249c3046Smrg ppc64-*linux*|powerpc64-*linux*) 3637249c3046Smrg LD="${LD-ld} -m elf32ppclinux" 36381477040fSmrg ;; 3639249c3046Smrg s390x-*linux*) 3640249c3046Smrg LD="${LD-ld} -m elf_s390" 36411477040fSmrg ;; 3642249c3046Smrg sparc64-*linux*) 3643249c3046Smrg LD="${LD-ld} -m elf32_sparc" 36441477040fSmrg ;; 36451477040fSmrg esac 36461477040fSmrg ;; 3647249c3046Smrg *64-bit*) 3648249c3046Smrg case $host in 3649249c3046Smrg x86_64-*kfreebsd*-gnu) 3650249c3046Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 36511477040fSmrg ;; 3652249c3046Smrg x86_64-*linux*) 3653249c3046Smrg LD="${LD-ld} -m elf_x86_64" 36541477040fSmrg ;; 3655249c3046Smrg ppc*-*linux*|powerpc*-*linux*) 3656249c3046Smrg LD="${LD-ld} -m elf64ppc" 3657249c3046Smrg ;; 3658249c3046Smrg s390*-*linux*|s390*-*tpf*) 3659249c3046Smrg LD="${LD-ld} -m elf64_s390" 3660249c3046Smrg ;; 3661249c3046Smrg sparc*-*linux*) 3662249c3046Smrg LD="${LD-ld} -m elf64_sparc" 36631477040fSmrg ;; 36641477040fSmrg esac 36651477040fSmrg ;; 3666249c3046Smrg esac 3667249c3046Smrg fi 3668249c3046Smrg rm -rf conftest* 3669249c3046Smrg ;; 3670249c3046Smrg 3671249c3046Smrg*-*-sco3.2v5*) 3672249c3046Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 3673249c3046Smrg SAVE_CFLAGS="$CFLAGS" 3674249c3046Smrg CFLAGS="$CFLAGS -belf" 3675249c3046Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 3676249c3046Smrg [AC_LANG_PUSH(C) 3677249c3046Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 3678249c3046Smrg AC_LANG_POP]) 3679249c3046Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 3680249c3046Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 3681249c3046Smrg CFLAGS="$SAVE_CFLAGS" 3682249c3046Smrg fi 3683249c3046Smrg ;; 3684249c3046Smrgsparc*-*solaris*) 3685249c3046Smrg # Find out which ABI we are using. 3686249c3046Smrg echo 'int i;' > conftest.$ac_ext 3687249c3046Smrg if AC_TRY_EVAL(ac_compile); then 3688249c3046Smrg case `/usr/bin/file conftest.o` in 3689249c3046Smrg *64-bit*) 3690249c3046Smrg case $lt_cv_prog_gnu_ld in 3691249c3046Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 36921477040fSmrg *) 3693249c3046Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 3694249c3046Smrg LD="${LD-ld} -64" 3695249c3046Smrg fi 36961477040fSmrg ;; 3697249c3046Smrg esac 3698249c3046Smrg ;; 3699249c3046Smrg esac 3700249c3046Smrg fi 3701249c3046Smrg rm -rf conftest* 3702249c3046Smrg ;; 3703249c3046Smrgesac 3704249c3046Smrg 3705249c3046Smrgneed_locks="$enable_libtool_lock" 3706249c3046Smrg])# _LT_ENABLE_LOCK 3707249c3046Smrg 3708249c3046Smrg 3709249c3046Smrg# _LT_CMD_OLD_ARCHIVE 3710249c3046Smrg# ------------------- 3711249c3046Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 3712249c3046Smrg[AC_CHECK_TOOL(AR, ar, false) 3713249c3046Smrgtest -z "$AR" && AR=ar 3714249c3046Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 3715249c3046Smrg_LT_DECL([], [AR], [1], [The archiver]) 3716249c3046Smrg_LT_DECL([], [AR_FLAGS], [1]) 3717249c3046Smrg 3718249c3046SmrgAC_CHECK_TOOL(STRIP, strip, :) 3719249c3046Smrgtest -z "$STRIP" && STRIP=: 3720249c3046Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 3721249c3046Smrg 3722249c3046SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 3723249c3046Smrgtest -z "$RANLIB" && RANLIB=: 3724249c3046Smrg_LT_DECL([], [RANLIB], [1], 3725249c3046Smrg [Commands used to install an old-style archive]) 3726249c3046Smrg 3727249c3046Smrg# Determine commands to create old-style static archives. 3728249c3046Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 3729249c3046Smrgold_postinstall_cmds='chmod 644 $oldlib' 3730249c3046Smrgold_postuninstall_cmds= 3731249c3046Smrg 3732249c3046Smrgif test -n "$RANLIB"; then 3733249c3046Smrg case $host_os in 3734249c3046Smrg openbsd*) 3735249c3046Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 3736249c3046Smrg ;; 3737249c3046Smrg *) 3738249c3046Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 3739249c3046Smrg ;; 3740249c3046Smrg esac 3741249c3046Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 3742249c3046Smrgfi 3743249c3046Smrg 3744249c3046Smrgcase $host_os in 3745249c3046Smrg darwin*) 3746249c3046Smrg lock_old_archive_extraction=yes ;; 3747249c3046Smrg *) 3748249c3046Smrg lock_old_archive_extraction=no ;; 3749249c3046Smrgesac 3750249c3046Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 3751249c3046Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 3752249c3046Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 3753249c3046Smrg [Commands used to build an old-style archive]) 3754249c3046Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 3755249c3046Smrg [Whether to use a lock for old archive extraction]) 3756249c3046Smrg])# _LT_CMD_OLD_ARCHIVE 3757249c3046Smrg 3758249c3046Smrg 3759249c3046Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3760249c3046Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 3761249c3046Smrg# ---------------------------------------------------------------- 3762249c3046Smrg# Check whether the given compiler option works 3763249c3046SmrgAC_DEFUN([_LT_COMPILER_OPTION], 3764249c3046Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3765249c3046Smrgm4_require([_LT_DECL_SED])dnl 3766249c3046SmrgAC_CACHE_CHECK([$1], [$2], 3767249c3046Smrg [$2=no 3768249c3046Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 3769249c3046Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3770249c3046Smrg lt_compiler_flag="$3" 3771249c3046Smrg # Insert the option either (1) after the last *FLAGS variable, or 3772249c3046Smrg # (2) before a word containing "conftest.", or (3) at the end. 3773249c3046Smrg # Note that $ac_compile itself does not contain backslashes and begins 3774249c3046Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 3775249c3046Smrg # The option is referenced via a variable to avoid confusing sed. 3776249c3046Smrg lt_compile=`echo "$ac_compile" | $SED \ 3777249c3046Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3778249c3046Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3779249c3046Smrg -e 's:$: $lt_compiler_flag:'` 3780249c3046Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3781249c3046Smrg (eval "$lt_compile" 2>conftest.err) 3782249c3046Smrg ac_status=$? 3783249c3046Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3784249c3046Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3785249c3046Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 3786249c3046Smrg # The compiler can only warn and ignore the option if not recognized 3787249c3046Smrg # So say no if there are warnings other than the usual output. 3788249c3046Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 3789249c3046Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3790249c3046Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 3791249c3046Smrg $2=yes 3792249c3046Smrg fi 3793249c3046Smrg fi 3794249c3046Smrg $RM conftest* 3795249c3046Smrg]) 3796249c3046Smrg 3797249c3046Smrgif test x"[$]$2" = xyes; then 3798249c3046Smrg m4_if([$5], , :, [$5]) 3799249c3046Smrgelse 3800249c3046Smrg m4_if([$6], , :, [$6]) 3801249c3046Smrgfi 3802249c3046Smrg])# _LT_COMPILER_OPTION 3803249c3046Smrg 3804249c3046Smrg# Old name: 3805249c3046SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 3806249c3046Smrgdnl aclocal-1.4 backwards compatibility: 3807249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 3808249c3046Smrg 3809249c3046Smrg 3810249c3046Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3811249c3046Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 3812249c3046Smrg# ---------------------------------------------------- 3813249c3046Smrg# Check whether the given linker option works 3814249c3046SmrgAC_DEFUN([_LT_LINKER_OPTION], 3815249c3046Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3816249c3046Smrgm4_require([_LT_DECL_SED])dnl 3817249c3046SmrgAC_CACHE_CHECK([$1], [$2], 3818249c3046Smrg [$2=no 3819249c3046Smrg save_LDFLAGS="$LDFLAGS" 3820249c3046Smrg LDFLAGS="$LDFLAGS $3" 3821249c3046Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 3822249c3046Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 3823249c3046Smrg # The linker can only warn and ignore the option if not recognized 3824249c3046Smrg # So say no if there are warnings 3825249c3046Smrg if test -s conftest.err; then 3826249c3046Smrg # Append any errors to the config.log. 3827249c3046Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 3828249c3046Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 3829249c3046Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3830249c3046Smrg if diff conftest.exp conftest.er2 >/dev/null; then 3831249c3046Smrg $2=yes 3832249c3046Smrg fi 3833249c3046Smrg else 3834249c3046Smrg $2=yes 3835249c3046Smrg fi 3836249c3046Smrg fi 3837249c3046Smrg $RM -r conftest* 3838249c3046Smrg LDFLAGS="$save_LDFLAGS" 3839249c3046Smrg]) 3840249c3046Smrg 3841249c3046Smrgif test x"[$]$2" = xyes; then 3842249c3046Smrg m4_if([$4], , :, [$4]) 3843249c3046Smrgelse 3844249c3046Smrg m4_if([$5], , :, [$5]) 3845249c3046Smrgfi 3846249c3046Smrg])# _LT_LINKER_OPTION 3847249c3046Smrg 3848249c3046Smrg# Old name: 3849249c3046SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 3850249c3046Smrgdnl aclocal-1.4 backwards compatibility: 3851249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 3852249c3046Smrg 3853249c3046Smrg 3854249c3046Smrg# LT_CMD_MAX_LEN 3855249c3046Smrg#--------------- 3856249c3046SmrgAC_DEFUN([LT_CMD_MAX_LEN], 3857249c3046Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3858249c3046Smrg# find the maximum length of command line arguments 3859249c3046SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 3860249c3046SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 3861249c3046Smrg i=0 3862249c3046Smrg teststring="ABCD" 3863249c3046Smrg 3864249c3046Smrg case $build_os in 3865249c3046Smrg msdosdjgpp*) 3866249c3046Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 3867249c3046Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 3868249c3046Smrg # during glob expansion). Even if it were fixed, the result of this 3869249c3046Smrg # check would be larger than it should be. 3870249c3046Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 3871249c3046Smrg ;; 3872249c3046Smrg 3873249c3046Smrg gnu*) 3874249c3046Smrg # Under GNU Hurd, this test is not required because there is 3875249c3046Smrg # no limit to the length of command line arguments. 3876249c3046Smrg # Libtool will interpret -1 as no limit whatsoever 3877249c3046Smrg lt_cv_sys_max_cmd_len=-1; 3878249c3046Smrg ;; 3879249c3046Smrg 3880249c3046Smrg cygwin* | mingw* | cegcc*) 3881249c3046Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 3882249c3046Smrg # about 5 minutes as the teststring grows exponentially. 3883249c3046Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 3884249c3046Smrg # you end up with a "frozen" computer, even though with patience 3885249c3046Smrg # the test eventually succeeds (with a max line length of 256k). 3886249c3046Smrg # Instead, let's just punt: use the minimum linelength reported by 3887249c3046Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 3888249c3046Smrg lt_cv_sys_max_cmd_len=8192; 3889249c3046Smrg ;; 3890249c3046Smrg 3891249c3046Smrg mint*) 3892249c3046Smrg # On MiNT this can take a long time and run out of memory. 3893249c3046Smrg lt_cv_sys_max_cmd_len=8192; 3894249c3046Smrg ;; 3895249c3046Smrg 3896249c3046Smrg amigaos*) 3897249c3046Smrg # On AmigaOS with pdksh, this test takes hours, literally. 3898249c3046Smrg # So we just punt and use a minimum line length of 8192. 3899249c3046Smrg lt_cv_sys_max_cmd_len=8192; 3900249c3046Smrg ;; 3901249c3046Smrg 3902249c3046Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 3903249c3046Smrg # This has been around since 386BSD, at least. Likely further. 3904249c3046Smrg if test -x /sbin/sysctl; then 3905249c3046Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 3906249c3046Smrg elif test -x /usr/sbin/sysctl; then 3907249c3046Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 3908249c3046Smrg else 3909249c3046Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 3910249c3046Smrg fi 3911249c3046Smrg # And add a safety zone 3912249c3046Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 3913249c3046Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 3914249c3046Smrg ;; 3915249c3046Smrg 3916249c3046Smrg interix*) 3917249c3046Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 3918249c3046Smrg lt_cv_sys_max_cmd_len=196608 3919249c3046Smrg ;; 3920249c3046Smrg 3921249c3046Smrg osf*) 3922249c3046Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 3923249c3046Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 3924249c3046Smrg # nice to cause kernel panics so lets avoid the loop below. 3925249c3046Smrg # First set a reasonable default. 3926249c3046Smrg lt_cv_sys_max_cmd_len=16384 3927249c3046Smrg # 3928249c3046Smrg if test -x /sbin/sysconfig; then 3929249c3046Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 3930249c3046Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 3931249c3046Smrg esac 3932249c3046Smrg fi 3933249c3046Smrg ;; 3934249c3046Smrg sco3.2v5*) 3935249c3046Smrg lt_cv_sys_max_cmd_len=102400 3936249c3046Smrg ;; 3937249c3046Smrg sysv5* | sco5v6* | sysv4.2uw2*) 3938249c3046Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 3939249c3046Smrg if test -n "$kargmax"; then 3940249c3046Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 3941249c3046Smrg else 3942249c3046Smrg lt_cv_sys_max_cmd_len=32768 3943249c3046Smrg fi 3944249c3046Smrg ;; 3945249c3046Smrg *) 3946249c3046Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 3947249c3046Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 3948249c3046Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 3949249c3046Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 3950249c3046Smrg else 3951249c3046Smrg # Make teststring a little bigger before we do anything with it. 3952249c3046Smrg # a 1K string should be a reasonable start. 3953249c3046Smrg for i in 1 2 3 4 5 6 7 8 ; do 3954249c3046Smrg teststring=$teststring$teststring 3955249c3046Smrg done 3956249c3046Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 3957249c3046Smrg # If test is not a shell built-in, we'll probably end up computing a 3958249c3046Smrg # maximum length that is only half of the actual maximum length, but 3959249c3046Smrg # we can't tell. 3960249c3046Smrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 3961249c3046Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 3962249c3046Smrg test $i != 17 # 1/2 MB should be enough 3963249c3046Smrg do 3964249c3046Smrg i=`expr $i + 1` 3965249c3046Smrg teststring=$teststring$teststring 3966249c3046Smrg done 3967249c3046Smrg # Only check the string length outside the loop. 3968249c3046Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 3969249c3046Smrg teststring= 3970249c3046Smrg # Add a significant safety factor because C++ compilers can tack on 3971249c3046Smrg # massive amounts of additional arguments before passing them to the 3972249c3046Smrg # linker. It appears as though 1/2 is a usable value. 3973249c3046Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 3974249c3046Smrg fi 3975249c3046Smrg ;; 3976249c3046Smrg esac 3977249c3046Smrg]) 3978249c3046Smrgif test -n $lt_cv_sys_max_cmd_len ; then 3979249c3046Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 3980249c3046Smrgelse 3981249c3046Smrg AC_MSG_RESULT(none) 3982249c3046Smrgfi 3983249c3046Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 3984249c3046Smrg_LT_DECL([], [max_cmd_len], [0], 3985249c3046Smrg [What is the maximum length of a command?]) 3986249c3046Smrg])# LT_CMD_MAX_LEN 3987249c3046Smrg 3988249c3046Smrg# Old name: 3989249c3046SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 3990249c3046Smrgdnl aclocal-1.4 backwards compatibility: 3991249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 3992249c3046Smrg 3993249c3046Smrg 3994249c3046Smrg# _LT_HEADER_DLFCN 3995249c3046Smrg# ---------------- 3996249c3046Smrgm4_defun([_LT_HEADER_DLFCN], 3997249c3046Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 3998249c3046Smrg])# _LT_HEADER_DLFCN 3999249c3046Smrg 4000249c3046Smrg 4001249c3046Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 4002249c3046Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 4003249c3046Smrg# ---------------------------------------------------------------- 4004249c3046Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 4005249c3046Smrg[m4_require([_LT_HEADER_DLFCN])dnl 4006249c3046Smrgif test "$cross_compiling" = yes; then : 4007249c3046Smrg [$4] 4008249c3046Smrgelse 4009249c3046Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 4010249c3046Smrg lt_status=$lt_dlunknown 4011249c3046Smrg cat > conftest.$ac_ext <<_LT_EOF 4012249c3046Smrg[#line $LINENO "configure" 4013249c3046Smrg#include "confdefs.h" 4014249c3046Smrg 4015249c3046Smrg#if HAVE_DLFCN_H 4016249c3046Smrg#include <dlfcn.h> 4017249c3046Smrg#endif 4018249c3046Smrg 4019249c3046Smrg#include <stdio.h> 4020249c3046Smrg 4021249c3046Smrg#ifdef RTLD_GLOBAL 4022249c3046Smrg# define LT_DLGLOBAL RTLD_GLOBAL 4023249c3046Smrg#else 4024249c3046Smrg# ifdef DL_GLOBAL 4025249c3046Smrg# define LT_DLGLOBAL DL_GLOBAL 4026249c3046Smrg# else 4027249c3046Smrg# define LT_DLGLOBAL 0 4028249c3046Smrg# endif 4029249c3046Smrg#endif 4030249c3046Smrg 4031249c3046Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 4032249c3046Smrg find out it does not work in some platform. */ 4033249c3046Smrg#ifndef LT_DLLAZY_OR_NOW 4034249c3046Smrg# ifdef RTLD_LAZY 4035249c3046Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 4036249c3046Smrg# else 4037249c3046Smrg# ifdef DL_LAZY 4038249c3046Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 4039249c3046Smrg# else 4040249c3046Smrg# ifdef RTLD_NOW 4041249c3046Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 4042249c3046Smrg# else 4043249c3046Smrg# ifdef DL_NOW 4044249c3046Smrg# define LT_DLLAZY_OR_NOW DL_NOW 4045249c3046Smrg# else 4046249c3046Smrg# define LT_DLLAZY_OR_NOW 0 4047249c3046Smrg# endif 4048249c3046Smrg# endif 4049249c3046Smrg# endif 4050249c3046Smrg# endif 4051249c3046Smrg#endif 4052249c3046Smrg 4053249c3046Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 4054249c3046Smrg correspondingly for the symbols needed. */ 4055249c3046Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 4056249c3046Smrgvoid fnord () __attribute__((visibility("default"))); 4057249c3046Smrg#endif 4058249c3046Smrg 4059249c3046Smrgvoid fnord () { int i=42; } 4060249c3046Smrgint main () 4061249c3046Smrg{ 4062249c3046Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 4063249c3046Smrg int status = $lt_dlunknown; 4064249c3046Smrg 4065249c3046Smrg if (self) 4066249c3046Smrg { 4067249c3046Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 4068249c3046Smrg else 4069249c3046Smrg { 4070249c3046Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 4071249c3046Smrg else puts (dlerror ()); 4072249c3046Smrg } 4073249c3046Smrg /* dlclose (self); */ 4074249c3046Smrg } 4075249c3046Smrg else 4076249c3046Smrg puts (dlerror ()); 4077249c3046Smrg 4078249c3046Smrg return status; 4079249c3046Smrg}] 4080249c3046Smrg_LT_EOF 4081249c3046Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 4082249c3046Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 4083249c3046Smrg lt_status=$? 4084249c3046Smrg case x$lt_status in 4085249c3046Smrg x$lt_dlno_uscore) $1 ;; 4086249c3046Smrg x$lt_dlneed_uscore) $2 ;; 4087249c3046Smrg x$lt_dlunknown|x*) $3 ;; 40881477040fSmrg esac 4089249c3046Smrg else : 4090249c3046Smrg # compilation failed 4091249c3046Smrg $3 40921477040fSmrg fi 4093249c3046Smrgfi 4094249c3046Smrgrm -fr conftest* 4095249c3046Smrg])# _LT_TRY_DLOPEN_SELF 4096444c061aSmrg 4097444c061aSmrg 4098249c3046Smrg# LT_SYS_DLOPEN_SELF 4099249c3046Smrg# ------------------ 4100249c3046SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 4101249c3046Smrg[m4_require([_LT_HEADER_DLFCN])dnl 4102249c3046Smrgif test "x$enable_dlopen" != xyes; then 4103249c3046Smrg enable_dlopen=unknown 4104249c3046Smrg enable_dlopen_self=unknown 4105249c3046Smrg enable_dlopen_self_static=unknown 4106249c3046Smrgelse 4107249c3046Smrg lt_cv_dlopen=no 4108249c3046Smrg lt_cv_dlopen_libs= 41092ae83157Smrg 4110249c3046Smrg case $host_os in 4111249c3046Smrg beos*) 4112249c3046Smrg lt_cv_dlopen="load_add_on" 4113249c3046Smrg lt_cv_dlopen_libs= 4114249c3046Smrg lt_cv_dlopen_self=yes 4115249c3046Smrg ;; 41162ae83157Smrg 4117249c3046Smrg mingw* | pw32* | cegcc*) 4118249c3046Smrg lt_cv_dlopen="LoadLibrary" 4119249c3046Smrg lt_cv_dlopen_libs= 4120249c3046Smrg ;; 4121444c061aSmrg 4122249c3046Smrg cygwin*) 4123249c3046Smrg lt_cv_dlopen="dlopen" 4124249c3046Smrg lt_cv_dlopen_libs= 4125249c3046Smrg ;; 4126444c061aSmrg 4127249c3046Smrg darwin*) 4128249c3046Smrg # if libdl is installed we need to link against it 4129249c3046Smrg AC_CHECK_LIB([dl], [dlopen], 4130249c3046Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 4131249c3046Smrg lt_cv_dlopen="dyld" 4132249c3046Smrg lt_cv_dlopen_libs= 4133249c3046Smrg lt_cv_dlopen_self=yes 4134249c3046Smrg ]) 4135249c3046Smrg ;; 4136444c061aSmrg 4137249c3046Smrg *) 4138249c3046Smrg AC_CHECK_FUNC([shl_load], 4139249c3046Smrg [lt_cv_dlopen="shl_load"], 4140249c3046Smrg [AC_CHECK_LIB([dld], [shl_load], 4141249c3046Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 4142249c3046Smrg [AC_CHECK_FUNC([dlopen], 4143249c3046Smrg [lt_cv_dlopen="dlopen"], 4144249c3046Smrg [AC_CHECK_LIB([dl], [dlopen], 4145249c3046Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 4146249c3046Smrg [AC_CHECK_LIB([svld], [dlopen], 4147249c3046Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 4148249c3046Smrg [AC_CHECK_LIB([dld], [dld_link], 4149249c3046Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 4150249c3046Smrg ]) 4151249c3046Smrg ]) 4152249c3046Smrg ]) 4153249c3046Smrg ]) 4154249c3046Smrg ]) 4155249c3046Smrg ;; 4156249c3046Smrg esac 4157444c061aSmrg 4158249c3046Smrg if test "x$lt_cv_dlopen" != xno; then 4159249c3046Smrg enable_dlopen=yes 4160249c3046Smrg else 4161249c3046Smrg enable_dlopen=no 4162249c3046Smrg fi 41632265a131Smrg 4164249c3046Smrg case $lt_cv_dlopen in 4165249c3046Smrg dlopen) 4166249c3046Smrg save_CPPFLAGS="$CPPFLAGS" 4167249c3046Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 4168444c061aSmrg 4169249c3046Smrg save_LDFLAGS="$LDFLAGS" 4170249c3046Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 41712265a131Smrg 4172249c3046Smrg save_LIBS="$LIBS" 4173249c3046Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 41742265a131Smrg 4175249c3046Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 4176249c3046Smrg lt_cv_dlopen_self, [dnl 4177249c3046Smrg _LT_TRY_DLOPEN_SELF( 4178249c3046Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 4179249c3046Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 4180249c3046Smrg ]) 4181444c061aSmrg 4182249c3046Smrg if test "x$lt_cv_dlopen_self" = xyes; then 4183249c3046Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 4184249c3046Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 4185249c3046Smrg lt_cv_dlopen_self_static, [dnl 4186249c3046Smrg _LT_TRY_DLOPEN_SELF( 4187249c3046Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 4188249c3046Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 4189249c3046Smrg ]) 4190249c3046Smrg fi 41912265a131Smrg 4192249c3046Smrg CPPFLAGS="$save_CPPFLAGS" 4193249c3046Smrg LDFLAGS="$save_LDFLAGS" 4194249c3046Smrg LIBS="$save_LIBS" 4195249c3046Smrg ;; 4196249c3046Smrg esac 41972265a131Smrg 4198249c3046Smrg case $lt_cv_dlopen_self in 4199249c3046Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 4200249c3046Smrg *) enable_dlopen_self=unknown ;; 4201249c3046Smrg esac 42022265a131Smrg 4203249c3046Smrg case $lt_cv_dlopen_self_static in 4204249c3046Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 4205249c3046Smrg *) enable_dlopen_self_static=unknown ;; 4206249c3046Smrg esac 4207249c3046Smrgfi 4208249c3046Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 4209249c3046Smrg [Whether dlopen is supported]) 4210249c3046Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 4211249c3046Smrg [Whether dlopen of programs is supported]) 4212249c3046Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 4213249c3046Smrg [Whether dlopen of statically linked programs is supported]) 4214249c3046Smrg])# LT_SYS_DLOPEN_SELF 42152265a131Smrg 4216249c3046Smrg# Old name: 4217249c3046SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 4218249c3046Smrgdnl aclocal-1.4 backwards compatibility: 4219249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 42202265a131Smrg 42212265a131Smrg 4222249c3046Smrg# _LT_COMPILER_C_O([TAGNAME]) 4223249c3046Smrg# --------------------------- 4224249c3046Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 4225249c3046Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 4226249c3046Smrgm4_defun([_LT_COMPILER_C_O], 4227249c3046Smrg[m4_require([_LT_DECL_SED])dnl 4228249c3046Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4229249c3046Smrgm4_require([_LT_TAG_COMPILER])dnl 4230249c3046SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 4231249c3046Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 4232249c3046Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 4233249c3046Smrg $RM -r conftest 2>/dev/null 4234249c3046Smrg mkdir conftest 4235249c3046Smrg cd conftest 4236249c3046Smrg mkdir out 4237249c3046Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 42382265a131Smrg 4239249c3046Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 4240249c3046Smrg # Insert the option either (1) after the last *FLAGS variable, or 4241249c3046Smrg # (2) before a word containing "conftest.", or (3) at the end. 4242249c3046Smrg # Note that $ac_compile itself does not contain backslashes and begins 4243249c3046Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4244249c3046Smrg lt_compile=`echo "$ac_compile" | $SED \ 4245249c3046Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4246249c3046Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4247249c3046Smrg -e 's:$: $lt_compiler_flag:'` 4248249c3046Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4249249c3046Smrg (eval "$lt_compile" 2>out/conftest.err) 4250249c3046Smrg ac_status=$? 4251249c3046Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 4252249c3046Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4253249c3046Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 4254249c3046Smrg then 4255249c3046Smrg # The compiler can only warn and ignore the option if not recognized 4256249c3046Smrg # So say no if there are warnings 4257249c3046Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 4258249c3046Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 4259249c3046Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 4260249c3046Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4261249c3046Smrg fi 4262249c3046Smrg fi 4263249c3046Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 4264249c3046Smrg $RM conftest* 4265249c3046Smrg # SGI C++ compiler will create directory out/ii_files/ for 4266249c3046Smrg # template instantiation 4267249c3046Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 4268249c3046Smrg $RM out/* && rmdir out 4269249c3046Smrg cd .. 4270249c3046Smrg $RM -r conftest 4271249c3046Smrg $RM conftest* 4272249c3046Smrg]) 4273249c3046Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 4274249c3046Smrg [Does compiler simultaneously support -c and -o options?]) 4275249c3046Smrg])# _LT_COMPILER_C_O 42762265a131Smrg 4277444c061aSmrg 4278249c3046Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 4279249c3046Smrg# ---------------------------------- 4280249c3046Smrg# Check to see if we can do hard links to lock some files if needed 4281249c3046Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 4282249c3046Smrg[m4_require([_LT_ENABLE_LOCK])dnl 4283249c3046Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4284249c3046Smrg_LT_COMPILER_C_O([$1]) 4285444c061aSmrg 4286249c3046Smrghard_links="nottested" 4287249c3046Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 4288249c3046Smrg # do not overwrite the value of need_locks provided by the user 4289249c3046Smrg AC_MSG_CHECKING([if we can lock with hard links]) 4290249c3046Smrg hard_links=yes 4291249c3046Smrg $RM conftest* 4292249c3046Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 4293249c3046Smrg touch conftest.a 4294249c3046Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 4295249c3046Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 4296249c3046Smrg AC_MSG_RESULT([$hard_links]) 4297249c3046Smrg if test "$hard_links" = no; then 4298249c3046Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 4299249c3046Smrg need_locks=warn 4300249c3046Smrg fi 4301249c3046Smrgelse 4302249c3046Smrg need_locks=no 4303249c3046Smrgfi 4304249c3046Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 4305249c3046Smrg])# _LT_COMPILER_FILE_LOCKS 43062265a131Smrg 4307444c061aSmrg 4308249c3046Smrg# _LT_CHECK_OBJDIR 4309249c3046Smrg# ---------------- 4310249c3046Smrgm4_defun([_LT_CHECK_OBJDIR], 4311249c3046Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 4312249c3046Smrg[rm -f .libs 2>/dev/null 4313249c3046Smrgmkdir .libs 2>/dev/null 4314249c3046Smrgif test -d .libs; then 4315249c3046Smrg lt_cv_objdir=.libs 4316249c3046Smrgelse 4317249c3046Smrg # MS-DOS does not allow filenames that begin with a dot. 4318249c3046Smrg lt_cv_objdir=_libs 4319249c3046Smrgfi 4320249c3046Smrgrmdir .libs 2>/dev/null]) 4321249c3046Smrgobjdir=$lt_cv_objdir 4322249c3046Smrg_LT_DECL([], [objdir], [0], 4323249c3046Smrg [The name of the directory that contains temporary libtool files])dnl 4324249c3046Smrgm4_pattern_allow([LT_OBJDIR])dnl 4325249c3046SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 4326249c3046Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 4327249c3046Smrg])# _LT_CHECK_OBJDIR 4328444c061aSmrg 43291477040fSmrg 4330249c3046Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 4331249c3046Smrg# -------------------------------------- 4332249c3046Smrg# Check hardcoding attributes. 4333249c3046Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 4334249c3046Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 4335249c3046Smrg_LT_TAGVAR(hardcode_action, $1)= 4336249c3046Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 4337249c3046Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 4338249c3046Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 4339444c061aSmrg 4340249c3046Smrg # We can hardcode non-existent directories. 4341249c3046Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 4342249c3046Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 4343249c3046Smrg # have to relink, otherwise we might link with an installed library 4344249c3046Smrg # when we should be linking with a yet-to-be-installed one 4345249c3046Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 4346249c3046Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 4347249c3046Smrg # Linking always hardcodes the temporary library directory. 4348249c3046Smrg _LT_TAGVAR(hardcode_action, $1)=relink 4349249c3046Smrg else 4350249c3046Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 4351249c3046Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 4352249c3046Smrg fi 4353249c3046Smrgelse 4354249c3046Smrg # We cannot hardcode anything, or else we can only hardcode existing 4355249c3046Smrg # directories. 4356249c3046Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 43571477040fSmrgfi 4358249c3046SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 4359444c061aSmrg 4360249c3046Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 4361249c3046Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 4362249c3046Smrg # Fast installation is not supported 4363249c3046Smrg enable_fast_install=no 4364249c3046Smrgelif test "$shlibpath_overrides_runpath" = yes || 4365249c3046Smrg test "$enable_shared" = no; then 4366249c3046Smrg # Fast installation is not necessary 4367249c3046Smrg enable_fast_install=needless 4368249c3046Smrgfi 4369249c3046Smrg_LT_TAGDECL([], [hardcode_action], [0], 4370249c3046Smrg [How to hardcode a shared library path into an executable]) 4371249c3046Smrg])# _LT_LINKER_HARDCODE_LIBPATH 4372444c061aSmrg 4373444c061aSmrg 4374249c3046Smrg# _LT_CMD_STRIPLIB 4375249c3046Smrg# ---------------- 4376249c3046Smrgm4_defun([_LT_CMD_STRIPLIB], 4377249c3046Smrg[m4_require([_LT_DECL_EGREP]) 4378249c3046Smrgstriplib= 4379249c3046Smrgold_striplib= 4380249c3046SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 4381249c3046Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 4382249c3046Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 4383249c3046Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 4384249c3046Smrg AC_MSG_RESULT([yes]) 4385249c3046Smrgelse 4386249c3046Smrg# FIXME - insert some real tests, host_os isn't really good enough 4387249c3046Smrg case $host_os in 4388249c3046Smrg darwin*) 4389249c3046Smrg if test -n "$STRIP" ; then 4390249c3046Smrg striplib="$STRIP -x" 4391249c3046Smrg old_striplib="$STRIP -S" 4392249c3046Smrg AC_MSG_RESULT([yes]) 4393249c3046Smrg else 4394249c3046Smrg AC_MSG_RESULT([no]) 43951477040fSmrg fi 43961477040fSmrg ;; 4397249c3046Smrg *) 4398249c3046Smrg AC_MSG_RESULT([no]) 43991477040fSmrg ;; 44001477040fSmrg esac 4401249c3046Smrgfi 4402249c3046Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 4403249c3046Smrg_LT_DECL([], [striplib], [1]) 4404249c3046Smrg])# _LT_CMD_STRIPLIB 4405444c061aSmrg 4406444c061aSmrg 4407249c3046Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 4408249c3046Smrg# ----------------------------- 4409249c3046Smrg# PORTME Fill in your ld.so characteristics 4410249c3046Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 4411249c3046Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4412249c3046Smrgm4_require([_LT_DECL_EGREP])dnl 4413249c3046Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4414249c3046Smrgm4_require([_LT_DECL_OBJDUMP])dnl 4415249c3046Smrgm4_require([_LT_DECL_SED])dnl 4416249c3046Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 4417249c3046SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 4418249c3046Smrgm4_if([$1], 4419249c3046Smrg [], [ 4420249c3046Smrgif test "$GCC" = yes; then 4421249c3046Smrg case $host_os in 4422249c3046Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 4423249c3046Smrg *) lt_awk_arg="/^libraries:/" ;; 4424249c3046Smrg esac 4425249c3046Smrg case $host_os in 4426249c3046Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 4427249c3046Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 4428249c3046Smrg esac 4429249c3046Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 4430249c3046Smrg case $lt_search_path_spec in 4431249c3046Smrg *\;*) 4432249c3046Smrg # if the path contains ";" then we assume it to be the separator 4433249c3046Smrg # otherwise default to the standard path separator (i.e. ":") - it is 4434249c3046Smrg # assumed that no part of a normal pathname contains ";" but that should 4435249c3046Smrg # okay in the real world where ";" in dirpaths is itself problematic. 4436249c3046Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 4437249c3046Smrg ;; 4438249c3046Smrg *) 4439249c3046Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 4440249c3046Smrg ;; 4441249c3046Smrg esac 4442249c3046Smrg # Ok, now we have the path, separated by spaces, we can step through it 4443249c3046Smrg # and add multilib dir if necessary. 4444249c3046Smrg lt_tmp_lt_search_path_spec= 4445249c3046Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 4446249c3046Smrg for lt_sys_path in $lt_search_path_spec; do 4447249c3046Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 4448249c3046Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 44491477040fSmrg else 4450249c3046Smrg test -d "$lt_sys_path" && \ 4451249c3046Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 44521477040fSmrg fi 4453249c3046Smrg done 4454249c3046Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 4455249c3046SmrgBEGIN {RS=" "; FS="/|\n";} { 4456249c3046Smrg lt_foo=""; 4457249c3046Smrg lt_count=0; 4458249c3046Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 4459249c3046Smrg if ($lt_i != "" && $lt_i != ".") { 4460249c3046Smrg if ($lt_i == "..") { 4461249c3046Smrg lt_count++; 4462249c3046Smrg } else { 4463249c3046Smrg if (lt_count == 0) { 4464249c3046Smrg lt_foo="/" $lt_i lt_foo; 4465249c3046Smrg } else { 4466249c3046Smrg lt_count--; 4467249c3046Smrg } 4468249c3046Smrg } 4469249c3046Smrg } 4470249c3046Smrg } 4471249c3046Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 4472249c3046Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 4473249c3046Smrg}'` 4474249c3046Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 4475249c3046Smrg # for these hosts. 4476249c3046Smrg case $host_os in 4477249c3046Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 4478249c3046Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 4479249c3046Smrg esac 4480249c3046Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 4481249c3046Smrgelse 4482249c3046Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 4483249c3046Smrgfi]) 4484249c3046Smrglibrary_names_spec= 4485249c3046Smrglibname_spec='lib$name' 4486249c3046Smrgsoname_spec= 4487249c3046Smrgshrext_cmds=".so" 4488249c3046Smrgpostinstall_cmds= 4489249c3046Smrgpostuninstall_cmds= 4490249c3046Smrgfinish_cmds= 4491249c3046Smrgfinish_eval= 4492249c3046Smrgshlibpath_var= 4493249c3046Smrgshlibpath_overrides_runpath=unknown 4494249c3046Smrgversion_type=none 4495249c3046Smrgdynamic_linker="$host_os ld.so" 4496249c3046Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 4497249c3046Smrgneed_lib_prefix=unknown 4498249c3046Smrghardcode_into_libs=no 4499444c061aSmrg 4500249c3046Smrg# when you set need_version to no, make sure it does not cause -set_version 4501249c3046Smrg# flags to be left without arguments 4502249c3046Smrgneed_version=unknown 4503444c061aSmrg 4504249c3046Smrgcase $host_os in 4505249c3046Smrgaix3*) 4506249c3046Smrg version_type=linux 4507249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 4508249c3046Smrg shlibpath_var=LIBPATH 4509444c061aSmrg 4510249c3046Smrg # AIX 3 has no versioning support, so we append a major version to the name. 4511249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4512249c3046Smrg ;; 4513444c061aSmrg 4514249c3046Smrgaix[[4-9]]*) 4515249c3046Smrg version_type=linux 4516249c3046Smrg need_lib_prefix=no 4517249c3046Smrg need_version=no 4518249c3046Smrg hardcode_into_libs=yes 4519249c3046Smrg if test "$host_cpu" = ia64; then 4520249c3046Smrg # AIX 5 supports IA64 4521249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 4522249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4523249c3046Smrg else 4524249c3046Smrg # With GCC up to 2.95.x, collect2 would create an import file 4525249c3046Smrg # for dependence libraries. The import file would start with 4526249c3046Smrg # the line `#! .'. This would cause the generated library to 4527249c3046Smrg # depend on `.', always an invalid library. This was fixed in 4528249c3046Smrg # development snapshots of GCC prior to 3.0. 4529249c3046Smrg case $host_os in 4530249c3046Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 4531249c3046Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 4532249c3046Smrg echo ' yes ' 4533249c3046Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 4534249c3046Smrg : 45351477040fSmrg else 4536249c3046Smrg can_build_shared=no 45371477040fSmrg fi 45381477040fSmrg ;; 4539249c3046Smrg esac 4540249c3046Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 4541249c3046Smrg # soname into executable. Probably we can add versioning support to 4542249c3046Smrg # collect2, so additional links can be useful in future. 4543249c3046Smrg if test "$aix_use_runtimelinking" = yes; then 4544249c3046Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 4545249c3046Smrg # instead of lib<name>.a to let people know that these are not 4546249c3046Smrg # typical AIX shared libraries. 4547249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4548249c3046Smrg else 4549249c3046Smrg # We preserve .a as extension for shared libraries through AIX4.2 4550249c3046Smrg # and later when we are not doing run time linking. 4551249c3046Smrg library_names_spec='${libname}${release}.a $libname.a' 4552249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4553249c3046Smrg fi 4554249c3046Smrg shlibpath_var=LIBPATH 4555249c3046Smrg fi 4556249c3046Smrg ;; 4557444c061aSmrg 4558249c3046Smrgamigaos*) 4559249c3046Smrg case $host_cpu in 4560249c3046Smrg powerpc) 4561249c3046Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 4562249c3046Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 4563249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4564249c3046Smrg ;; 4565249c3046Smrg m68k) 4566249c3046Smrg library_names_spec='$libname.ixlibrary $libname.a' 4567249c3046Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 4568249c3046Smrg 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' 4569249c3046Smrg ;; 4570249c3046Smrg esac 4571249c3046Smrg ;; 4572249c3046Smrg 4573249c3046Smrgbeos*) 4574249c3046Smrg library_names_spec='${libname}${shared_ext}' 4575249c3046Smrg dynamic_linker="$host_os ld.so" 4576249c3046Smrg shlibpath_var=LIBRARY_PATH 4577249c3046Smrg ;; 4578249c3046Smrg 4579249c3046Smrgbsdi[[45]]*) 4580249c3046Smrg version_type=linux 4581249c3046Smrg need_version=no 4582249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4583249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4584249c3046Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 4585249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4586249c3046Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 4587249c3046Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 4588249c3046Smrg # the default ld.so.conf also contains /usr/contrib/lib and 4589249c3046Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 4590249c3046Smrg # libtool to hard-code these into programs 4591249c3046Smrg ;; 4592249c3046Smrg 4593249c3046Smrgcygwin* | mingw* | pw32* | cegcc*) 4594249c3046Smrg version_type=windows 4595249c3046Smrg shrext_cmds=".dll" 4596249c3046Smrg need_version=no 4597249c3046Smrg need_lib_prefix=no 4598249c3046Smrg 4599249c3046Smrg case $GCC,$host_os in 4600249c3046Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 4601249c3046Smrg library_names_spec='$libname.dll.a' 4602249c3046Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 4603249c3046Smrg postinstall_cmds='base_file=`basename \${file}`~ 4604249c3046Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 4605249c3046Smrg dldir=$destdir/`dirname \$dlpath`~ 4606249c3046Smrg test -d \$dldir || mkdir -p \$dldir~ 4607249c3046Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 4608249c3046Smrg chmod a+x \$dldir/$dlname~ 4609249c3046Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 4610249c3046Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 4611249c3046Smrg fi' 4612249c3046Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 4613249c3046Smrg dlpath=$dir/\$dldll~ 4614249c3046Smrg $RM \$dlpath' 4615249c3046Smrg shlibpath_overrides_runpath=yes 4616249c3046Smrg 4617249c3046Smrg case $host_os in 4618249c3046Smrg cygwin*) 4619249c3046Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 4620249c3046Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4621249c3046Smrgm4_if([$1], [],[ 4622249c3046Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 4623249c3046Smrg ;; 4624249c3046Smrg mingw* | cegcc*) 4625249c3046Smrg # MinGW DLLs use traditional 'lib' prefix 4626249c3046Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 46271477040fSmrg ;; 4628249c3046Smrg pw32*) 4629249c3046Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 4630249c3046Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4631249c3046Smrg ;; 4632249c3046Smrg esac 4633249c3046Smrg ;; 4634444c061aSmrg 4635249c3046Smrg *) 4636249c3046Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 4637249c3046Smrg ;; 4638249c3046Smrg esac 4639249c3046Smrg dynamic_linker='Win32 ld.exe' 4640249c3046Smrg # FIXME: first we should search . and the directory the executable is in 4641249c3046Smrg shlibpath_var=PATH 4642249c3046Smrg ;; 4643444c061aSmrg 4644249c3046Smrgdarwin* | rhapsody*) 4645249c3046Smrg dynamic_linker="$host_os dyld" 4646249c3046Smrg version_type=darwin 4647249c3046Smrg need_lib_prefix=no 4648249c3046Smrg need_version=no 4649249c3046Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 4650249c3046Smrg soname_spec='${libname}${release}${major}$shared_ext' 4651249c3046Smrg shlibpath_overrides_runpath=yes 4652249c3046Smrg shlibpath_var=DYLD_LIBRARY_PATH 4653249c3046Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 4654249c3046Smrgm4_if([$1], [],[ 4655249c3046Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 4656249c3046Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 4657249c3046Smrg ;; 4658444c061aSmrg 4659249c3046Smrgdgux*) 4660249c3046Smrg version_type=linux 4661249c3046Smrg need_lib_prefix=no 4662249c3046Smrg need_version=no 4663249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 4664249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4665249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4666249c3046Smrg ;; 4667249c3046Smrg 4668249c3046Smrgfreebsd1*) 4669249c3046Smrg dynamic_linker=no 4670249c3046Smrg ;; 4671249c3046Smrg 4672249c3046Smrgfreebsd* | dragonfly*) 4673249c3046Smrg # DragonFly does not have aout. When/if they implement a new 4674249c3046Smrg # versioning mechanism, adjust this. 4675249c3046Smrg if test -x /usr/bin/objformat; then 4676249c3046Smrg objformat=`/usr/bin/objformat` 4677249c3046Smrg else 4678249c3046Smrg case $host_os in 4679249c3046Smrg freebsd[[123]]*) objformat=aout ;; 4680249c3046Smrg *) objformat=elf ;; 4681249c3046Smrg esac 4682249c3046Smrg fi 4683249c3046Smrg version_type=freebsd-$objformat 4684249c3046Smrg case $version_type in 4685249c3046Smrg freebsd-elf*) 4686249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 4687249c3046Smrg need_version=no 4688249c3046Smrg need_lib_prefix=no 4689249c3046Smrg ;; 4690249c3046Smrg freebsd-*) 4691249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 4692249c3046Smrg need_version=yes 46931477040fSmrg ;; 4694249c3046Smrg esac 4695249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4696249c3046Smrg case $host_os in 4697249c3046Smrg freebsd2*) 4698249c3046Smrg shlibpath_overrides_runpath=yes 4699249c3046Smrg ;; 4700249c3046Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 4701249c3046Smrg shlibpath_overrides_runpath=yes 4702249c3046Smrg hardcode_into_libs=yes 4703249c3046Smrg ;; 4704249c3046Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 4705249c3046Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 4706249c3046Smrg shlibpath_overrides_runpath=no 4707249c3046Smrg hardcode_into_libs=yes 4708249c3046Smrg ;; 4709249c3046Smrg *) # from 4.6 on, and DragonFly 4710249c3046Smrg shlibpath_overrides_runpath=yes 4711249c3046Smrg hardcode_into_libs=yes 4712249c3046Smrg ;; 4713249c3046Smrg esac 4714249c3046Smrg ;; 4715444c061aSmrg 4716249c3046Smrggnu*) 4717249c3046Smrg version_type=linux 4718249c3046Smrg need_lib_prefix=no 4719249c3046Smrg need_version=no 4720249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 4721249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4722249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4723249c3046Smrg hardcode_into_libs=yes 4724249c3046Smrg ;; 4725444c061aSmrg 4726249c3046Smrghaiku*) 4727249c3046Smrg version_type=linux 4728249c3046Smrg need_lib_prefix=no 4729249c3046Smrg need_version=no 4730249c3046Smrg dynamic_linker="$host_os runtime_loader" 4731249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 4732249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4733249c3046Smrg shlibpath_var=LIBRARY_PATH 4734249c3046Smrg shlibpath_overrides_runpath=yes 4735249c3046Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 4736249c3046Smrg hardcode_into_libs=yes 4737249c3046Smrg ;; 4738444c061aSmrg 4739249c3046Smrghpux9* | hpux10* | hpux11*) 4740249c3046Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 4741249c3046Smrg # link against other versions. 4742249c3046Smrg version_type=sunos 4743249c3046Smrg need_lib_prefix=no 4744249c3046Smrg need_version=no 4745249c3046Smrg case $host_cpu in 4746249c3046Smrg ia64*) 4747249c3046Smrg shrext_cmds='.so' 4748249c3046Smrg hardcode_into_libs=yes 4749249c3046Smrg dynamic_linker="$host_os dld.so" 4750249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4751249c3046Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4752249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4753249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4754249c3046Smrg if test "X$HPUX_IA64_MODE" = X32; then 4755249c3046Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 4756249c3046Smrg else 4757249c3046Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 4758249c3046Smrg fi 4759249c3046Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4760249c3046Smrg ;; 4761249c3046Smrg hppa*64*) 4762249c3046Smrg shrext_cmds='.sl' 4763249c3046Smrg hardcode_into_libs=yes 4764249c3046Smrg dynamic_linker="$host_os dld.sl" 4765249c3046Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 4766249c3046Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4767249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4768249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4769249c3046Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 4770249c3046Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4771249c3046Smrg ;; 4772249c3046Smrg *) 4773249c3046Smrg shrext_cmds='.sl' 4774249c3046Smrg dynamic_linker="$host_os dld.sl" 4775249c3046Smrg shlibpath_var=SHLIB_PATH 4776249c3046Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 4777249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4778249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4779249c3046Smrg ;; 4780249c3046Smrg esac 4781249c3046Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 4782249c3046Smrg postinstall_cmds='chmod 555 $lib' 4783249c3046Smrg # or fails outright, so override atomically: 4784249c3046Smrg install_override_mode=555 4785249c3046Smrg ;; 4786444c061aSmrg 4787249c3046Smrginterix[[3-9]]*) 4788249c3046Smrg version_type=linux 4789249c3046Smrg need_lib_prefix=no 4790249c3046Smrg need_version=no 4791249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 4792249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4793249c3046Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 4794249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4795249c3046Smrg shlibpath_overrides_runpath=no 4796249c3046Smrg hardcode_into_libs=yes 4797249c3046Smrg ;; 47982265a131Smrg 4799249c3046Smrgirix5* | irix6* | nonstopux*) 4800249c3046Smrg case $host_os in 4801249c3046Smrg nonstopux*) version_type=nonstopux ;; 48021477040fSmrg *) 4803249c3046Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 4804249c3046Smrg version_type=linux 4805249c3046Smrg else 4806249c3046Smrg version_type=irix 4807249c3046Smrg fi ;; 4808249c3046Smrg esac 4809249c3046Smrg need_lib_prefix=no 4810249c3046Smrg need_version=no 4811249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4812249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 4813249c3046Smrg case $host_os in 4814249c3046Smrg irix5* | nonstopux*) 4815249c3046Smrg libsuff= shlibsuff= 4816249c3046Smrg ;; 4817249c3046Smrg *) 4818249c3046Smrg case $LD in # libtool.m4 will add one of these switches to LD 4819249c3046Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 4820249c3046Smrg libsuff= shlibsuff= libmagic=32-bit;; 4821249c3046Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 4822249c3046Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 4823249c3046Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 4824249c3046Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 4825249c3046Smrg *) libsuff= shlibsuff= libmagic=never-match;; 48261477040fSmrg esac 4827249c3046Smrg ;; 4828249c3046Smrg esac 4829249c3046Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 4830249c3046Smrg shlibpath_overrides_runpath=no 4831249c3046Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 4832249c3046Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 4833249c3046Smrg hardcode_into_libs=yes 4834249c3046Smrg ;; 4835444c061aSmrg 4836249c3046Smrg# No shared lib support for Linux oldld, aout, or coff. 4837249c3046Smrglinux*oldld* | linux*aout* | linux*coff*) 4838249c3046Smrg dynamic_linker=no 4839249c3046Smrg ;; 48402ae83157Smrg 4841249c3046Smrg# This must be Linux ELF. 4842249c3046Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 4843249c3046Smrg version_type=linux 4844249c3046Smrg need_lib_prefix=no 4845249c3046Smrg need_version=no 4846249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4847249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4848249c3046Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 4849249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4850249c3046Smrg shlibpath_overrides_runpath=no 4851444c061aSmrg 4852249c3046Smrg # Some binutils ld are patched to set DT_RUNPATH 4853249c3046Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 4854249c3046Smrg [lt_cv_shlibpath_overrides_runpath=no 4855249c3046Smrg save_LDFLAGS=$LDFLAGS 4856249c3046Smrg save_libdir=$libdir 4857249c3046Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 4858249c3046Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 4859249c3046Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4860249c3046Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 4861249c3046Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 4862249c3046Smrg LDFLAGS=$save_LDFLAGS 4863249c3046Smrg libdir=$save_libdir 4864249c3046Smrg ]) 4865249c3046Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 4866444c061aSmrg 4867249c3046Smrg # This implies no fast_install, which is unacceptable. 4868249c3046Smrg # Some rework will be needed to allow for fast_install 4869249c3046Smrg # before this can be enabled. 4870249c3046Smrg hardcode_into_libs=yes 4871444c061aSmrg 4872249c3046Smrg # Append ld.so.conf contents to the search path 4873249c3046Smrg if test -f /etc/ld.so.conf; then 4874249c3046Smrg 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' ' '` 4875249c3046Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 4876249c3046Smrg fi 4877444c061aSmrg 4878249c3046Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 4879249c3046Smrg # powerpc, because MkLinux only supported shared libraries with the 4880249c3046Smrg # GNU dynamic linker. Since this was broken with cross compilers, 4881249c3046Smrg # most powerpc-linux boxes support dynamic linking these days and 4882249c3046Smrg # people can always --disable-shared, the test was removed, and we 4883249c3046Smrg # assume the GNU/Linux dynamic linker is in use. 4884249c3046Smrg dynamic_linker='GNU/Linux ld.so' 4885249c3046Smrg ;; 4886444c061aSmrg 4887249c3046Smrgnetbsd*) 4888249c3046Smrg version_type=sunos 4889249c3046Smrg need_lib_prefix=no 4890249c3046Smrg need_version=no 4891249c3046Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4892249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 4893249c3046Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 4894249c3046Smrg dynamic_linker='NetBSD (a.out) ld.so' 4895249c3046Smrg else 4896249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 4897249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4898249c3046Smrg dynamic_linker='NetBSD ld.elf_so' 4899249c3046Smrg fi 4900249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4901249c3046Smrg shlibpath_overrides_runpath=yes 4902249c3046Smrg hardcode_into_libs=yes 4903249c3046Smrg ;; 4904444c061aSmrg 4905249c3046Smrgnewsos6) 4906249c3046Smrg version_type=linux 4907249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4908249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4909249c3046Smrg shlibpath_overrides_runpath=yes 4910249c3046Smrg ;; 49111477040fSmrg 4912249c3046Smrg*nto* | *qnx*) 4913249c3046Smrg version_type=qnx 4914249c3046Smrg need_lib_prefix=no 4915249c3046Smrg need_version=no 4916249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4917249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4918249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4919249c3046Smrg shlibpath_overrides_runpath=no 4920249c3046Smrg hardcode_into_libs=yes 4921249c3046Smrg dynamic_linker='ldqnx.so' 4922249c3046Smrg ;; 4923249c3046Smrg 4924249c3046Smrgopenbsd*) 4925249c3046Smrg version_type=sunos 4926249c3046Smrg sys_lib_dlsearch_path_spec="/usr/lib" 4927249c3046Smrg need_lib_prefix=no 4928249c3046Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 4929249c3046Smrg case $host_os in 4930249c3046Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 4931249c3046Smrg *) need_version=no ;; 4932249c3046Smrg esac 4933249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 4934249c3046Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 4935249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4936249c3046Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4937249c3046Smrg case $host_os in 4938249c3046Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 4939249c3046Smrg shlibpath_overrides_runpath=no 4940249c3046Smrg ;; 4941249c3046Smrg *) 4942249c3046Smrg shlibpath_overrides_runpath=yes 4943249c3046Smrg ;; 49441477040fSmrg esac 4945249c3046Smrg else 4946249c3046Smrg shlibpath_overrides_runpath=yes 4947249c3046Smrg fi 4948249c3046Smrg ;; 4949444c061aSmrg 4950249c3046Smrgos2*) 4951249c3046Smrg libname_spec='$name' 4952249c3046Smrg shrext_cmds=".dll" 4953249c3046Smrg need_lib_prefix=no 4954249c3046Smrg library_names_spec='$libname${shared_ext} $libname.a' 4955249c3046Smrg dynamic_linker='OS/2 ld.exe' 4956249c3046Smrg shlibpath_var=LIBPATH 4957249c3046Smrg ;; 49581477040fSmrg 4959249c3046Smrgosf3* | osf4* | osf5*) 4960249c3046Smrg version_type=osf 4961249c3046Smrg need_lib_prefix=no 4962249c3046Smrg need_version=no 4963249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4964249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4965249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4966249c3046Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 4967249c3046Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 4968249c3046Smrg ;; 49691477040fSmrg 4970249c3046Smrgrdos*) 4971249c3046Smrg dynamic_linker=no 4972249c3046Smrg ;; 49731477040fSmrg 4974249c3046Smrgsolaris*) 4975249c3046Smrg version_type=linux 4976249c3046Smrg need_lib_prefix=no 4977249c3046Smrg need_version=no 4978249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4979249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 4980249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4981249c3046Smrg shlibpath_overrides_runpath=yes 4982249c3046Smrg hardcode_into_libs=yes 4983249c3046Smrg # ldd complains unless libraries are executable 4984249c3046Smrg postinstall_cmds='chmod +x $lib' 4985249c3046Smrg ;; 49861477040fSmrg 4987249c3046Smrgsunos4*) 4988249c3046Smrg version_type=sunos 4989249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 4990249c3046Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 4991249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 4992249c3046Smrg shlibpath_overrides_runpath=yes 4993249c3046Smrg if test "$with_gnu_ld" = yes; then 4994249c3046Smrg need_lib_prefix=no 4995249c3046Smrg fi 4996249c3046Smrg need_version=yes 4997249c3046Smrg ;; 49981477040fSmrg 4999249c3046Smrgsysv4 | sysv4.3*) 5000249c3046Smrg version_type=linux 5001249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5002249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 5003249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 5004249c3046Smrg case $host_vendor in 5005249c3046Smrg sni) 5006249c3046Smrg shlibpath_overrides_runpath=no 5007249c3046Smrg need_lib_prefix=no 5008249c3046Smrg runpath_var=LD_RUN_PATH 50091477040fSmrg ;; 5010249c3046Smrg siemens) 5011249c3046Smrg need_lib_prefix=no 50121477040fSmrg ;; 5013249c3046Smrg motorola) 5014249c3046Smrg need_lib_prefix=no 5015249c3046Smrg need_version=no 5016249c3046Smrg shlibpath_overrides_runpath=no 5017249c3046Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 50181477040fSmrg ;; 5019249c3046Smrg esac 5020249c3046Smrg ;; 50211477040fSmrg 5022249c3046Smrgsysv4*MP*) 5023249c3046Smrg if test -d /usr/nec ;then 5024249c3046Smrg version_type=linux 5025249c3046Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 5026249c3046Smrg soname_spec='$libname${shared_ext}.$major' 5027249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 5028249c3046Smrg fi 5029249c3046Smrg ;; 5030249c3046Smrg 5031249c3046Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5032249c3046Smrg version_type=freebsd-elf 5033249c3046Smrg need_lib_prefix=no 5034249c3046Smrg need_version=no 5035249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 5036249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 5037249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 5038249c3046Smrg shlibpath_overrides_runpath=yes 5039249c3046Smrg hardcode_into_libs=yes 5040249c3046Smrg if test "$with_gnu_ld" = yes; then 5041249c3046Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 5042249c3046Smrg else 5043249c3046Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 5044249c3046Smrg case $host_os in 5045249c3046Smrg sco3.2v5*) 5046249c3046Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 5047249c3046Smrg ;; 5048249c3046Smrg esac 5049249c3046Smrg fi 5050249c3046Smrg sys_lib_dlsearch_path_spec='/usr/lib' 5051249c3046Smrg ;; 5052444c061aSmrg 5053249c3046Smrgtpf*) 5054249c3046Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 5055249c3046Smrg version_type=linux 5056249c3046Smrg need_lib_prefix=no 5057249c3046Smrg need_version=no 5058249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5059249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 5060249c3046Smrg shlibpath_overrides_runpath=no 5061249c3046Smrg hardcode_into_libs=yes 5062249c3046Smrg ;; 50631477040fSmrg 5064249c3046Smrguts4*) 5065249c3046Smrg version_type=linux 5066249c3046Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5067249c3046Smrg soname_spec='${libname}${release}${shared_ext}$major' 5068249c3046Smrg shlibpath_var=LD_LIBRARY_PATH 5069249c3046Smrg ;; 5070444c061aSmrg 5071249c3046Smrg*) 5072249c3046Smrg dynamic_linker=no 5073249c3046Smrg ;; 5074249c3046Smrgesac 5075249c3046SmrgAC_MSG_RESULT([$dynamic_linker]) 5076249c3046Smrgtest "$dynamic_linker" = no && can_build_shared=no 5077444c061aSmrg 5078249c3046Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 5079249c3046Smrgif test "$GCC" = yes; then 5080249c3046Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 5081249c3046Smrgfi 5082444c061aSmrg 5083249c3046Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 5084249c3046Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 5085249c3046Smrgfi 5086249c3046Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 5087249c3046Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 5088249c3046Smrgfi 5089444c061aSmrg 5090249c3046Smrg_LT_DECL([], [variables_saved_for_relink], [1], 5091249c3046Smrg [Variables whose values should be saved in libtool wrapper scripts and 5092249c3046Smrg restored at link time]) 5093249c3046Smrg_LT_DECL([], [need_lib_prefix], [0], 5094249c3046Smrg [Do we need the "lib" prefix for modules?]) 5095249c3046Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 5096249c3046Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 5097249c3046Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 5098249c3046Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 5099249c3046Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 5100249c3046Smrg [Is shlibpath searched before the hard-coded library search path?]) 5101249c3046Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 5102249c3046Smrg_LT_DECL([], [library_names_spec], [1], 5103249c3046Smrg [[List of archive names. First name is the real one, the rest are links. 5104249c3046Smrg The last name is the one that the linker finds with -lNAME]]) 5105249c3046Smrg_LT_DECL([], [soname_spec], [1], 5106249c3046Smrg [[The coded name of the library, if different from the real name]]) 5107249c3046Smrg_LT_DECL([], [install_override_mode], [1], 5108249c3046Smrg [Permission mode override for installation of shared libraries]) 5109249c3046Smrg_LT_DECL([], [postinstall_cmds], [2], 5110249c3046Smrg [Command to use after installation of a shared archive]) 5111249c3046Smrg_LT_DECL([], [postuninstall_cmds], [2], 5112249c3046Smrg [Command to use after uninstallation of a shared archive]) 5113249c3046Smrg_LT_DECL([], [finish_cmds], [2], 5114249c3046Smrg [Commands used to finish a libtool library installation in a directory]) 5115249c3046Smrg_LT_DECL([], [finish_eval], [1], 5116249c3046Smrg [[As "finish_cmds", except a single script fragment to be evaled but 5117249c3046Smrg not shown]]) 5118249c3046Smrg_LT_DECL([], [hardcode_into_libs], [0], 5119249c3046Smrg [Whether we should hardcode library paths into libraries]) 5120249c3046Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 5121249c3046Smrg [Compile-time system search path for libraries]) 5122249c3046Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 5123249c3046Smrg [Run-time system search path for libraries]) 5124249c3046Smrg])# _LT_SYS_DYNAMIC_LINKER 5125444c061aSmrg 5126444c061aSmrg 5127249c3046Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 5128249c3046Smrg# -------------------------- 5129249c3046Smrg# find a file program which can recognize shared library 5130249c3046SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 5131249c3046Smrg[m4_require([_LT_DECL_EGREP])dnl 5132249c3046SmrgAC_MSG_CHECKING([for $1]) 5133249c3046SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 5134249c3046Smrg[case $MAGIC_CMD in 5135249c3046Smrg[[\\/*] | ?:[\\/]*]) 5136249c3046Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 5137249c3046Smrg ;; 5138249c3046Smrg*) 5139249c3046Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 5140249c3046Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5141249c3046Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 5142249c3046Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 5143249c3046Smrgdnl not every word. This closes a longstanding sh security hole. 5144249c3046Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 5145249c3046Smrg for ac_dir in $ac_dummy; do 5146249c3046Smrg IFS="$lt_save_ifs" 5147249c3046Smrg test -z "$ac_dir" && ac_dir=. 5148249c3046Smrg if test -f $ac_dir/$1; then 5149249c3046Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 5150249c3046Smrg if test -n "$file_magic_test_file"; then 5151249c3046Smrg case $deplibs_check_method in 5152249c3046Smrg "file_magic "*) 5153249c3046Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 5154249c3046Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5155249c3046Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 5156249c3046Smrg $EGREP "$file_magic_regex" > /dev/null; then 5157249c3046Smrg : 5158249c3046Smrg else 5159249c3046Smrg cat <<_LT_EOF 1>&2 5160444c061aSmrg 5161249c3046Smrg*** Warning: the command libtool uses to detect shared libraries, 5162249c3046Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 5163249c3046Smrg*** The result is that libtool may fail to recognize shared libraries 5164249c3046Smrg*** as such. This will affect the creation of libtool libraries that 5165249c3046Smrg*** depend on shared libraries, but programs linked with such libtool 5166249c3046Smrg*** libraries will work regardless of this problem. Nevertheless, you 5167249c3046Smrg*** may want to report the problem to your system manager and/or to 5168249c3046Smrg*** bug-libtool@gnu.org 5169444c061aSmrg 5170249c3046Smrg_LT_EOF 5171249c3046Smrg fi ;; 5172249c3046Smrg esac 51731477040fSmrg fi 5174249c3046Smrg break 5175249c3046Smrg fi 5176249c3046Smrg done 5177249c3046Smrg IFS="$lt_save_ifs" 5178249c3046Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 5179249c3046Smrg ;; 5180249c3046Smrgesac]) 5181249c3046SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5182249c3046Smrgif test -n "$MAGIC_CMD"; then 5183249c3046Smrg AC_MSG_RESULT($MAGIC_CMD) 5184249c3046Smrgelse 5185249c3046Smrg AC_MSG_RESULT(no) 5186249c3046Smrgfi 5187249c3046Smrg_LT_DECL([], [MAGIC_CMD], [0], 5188249c3046Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 5189249c3046Smrg])# _LT_PATH_TOOL_PREFIX 5190249c3046Smrg 5191249c3046Smrg# Old name: 5192249c3046SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 5193249c3046Smrgdnl aclocal-1.4 backwards compatibility: 5194249c3046Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 51951477040fSmrg 51961477040fSmrg 5197249c3046Smrg# _LT_PATH_MAGIC 5198249c3046Smrg# -------------- 5199249c3046Smrg# find a file program which can recognize a shared library 5200249c3046Smrgm4_defun([_LT_PATH_MAGIC], 5201249c3046Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 5202249c3046Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 5203249c3046Smrg if test -n "$ac_tool_prefix"; then 5204249c3046Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 5205249c3046Smrg else 5206249c3046Smrg MAGIC_CMD=: 5207249c3046Smrg fi 5208249c3046Smrgfi 5209249c3046Smrg])# _LT_PATH_MAGIC 5210444c061aSmrg 5211444c061aSmrg 5212249c3046Smrg# LT_PATH_LD 5213249c3046Smrg# ---------- 5214249c3046Smrg# find the pathname to the GNU or non-GNU linker 5215249c3046SmrgAC_DEFUN([LT_PATH_LD], 5216249c3046Smrg[AC_REQUIRE([AC_PROG_CC])dnl 5217249c3046SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 5218249c3046SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 5219249c3046Smrgm4_require([_LT_DECL_SED])dnl 5220249c3046Smrgm4_require([_LT_DECL_EGREP])dnl 5221249c3046Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 5222444c061aSmrg 5223249c3046SmrgAC_ARG_WITH([gnu-ld], 5224249c3046Smrg [AS_HELP_STRING([--with-gnu-ld], 5225249c3046Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 5226249c3046Smrg [test "$withval" = no || with_gnu_ld=yes], 5227249c3046Smrg [with_gnu_ld=no])dnl 5228444c061aSmrg 5229249c3046Smrgac_prog=ld 5230249c3046Smrgif test "$GCC" = yes; then 5231249c3046Smrg # Check if gcc -print-prog-name=ld gives a path. 5232249c3046Smrg AC_MSG_CHECKING([for ld used by $CC]) 5233249c3046Smrg case $host in 5234249c3046Smrg *-*-mingw*) 5235249c3046Smrg # gcc leaves a trailing carriage return which upsets mingw 5236249c3046Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 5237249c3046Smrg *) 5238249c3046Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 5239249c3046Smrg esac 5240249c3046Smrg case $ac_prog in 5241249c3046Smrg # Accept absolute paths. 5242249c3046Smrg [[\\/]]* | ?:[[\\/]]*) 5243249c3046Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 5244249c3046Smrg # Canonicalize the pathname of ld 5245249c3046Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5246249c3046Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5247249c3046Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 5248249c3046Smrg done 5249249c3046Smrg test -z "$LD" && LD="$ac_prog" 52501477040fSmrg ;; 5251249c3046Smrg "") 5252249c3046Smrg # If it fails, then pretend we aren't using GCC. 5253249c3046Smrg ac_prog=ld 5254249c3046Smrg ;; 5255249c3046Smrg *) 5256249c3046Smrg # If it is relative, then search for the first ld in PATH. 5257249c3046Smrg with_gnu_ld=unknown 5258249c3046Smrg ;; 5259249c3046Smrg esac 5260249c3046Smrgelif test "$with_gnu_ld" = yes; then 5261249c3046Smrg AC_MSG_CHECKING([for GNU ld]) 5262249c3046Smrgelse 5263249c3046Smrg AC_MSG_CHECKING([for non-GNU ld]) 5264249c3046Smrgfi 5265249c3046SmrgAC_CACHE_VAL(lt_cv_path_LD, 5266249c3046Smrg[if test -z "$LD"; then 5267249c3046Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5268249c3046Smrg for ac_dir in $PATH; do 5269249c3046Smrg IFS="$lt_save_ifs" 5270249c3046Smrg test -z "$ac_dir" && ac_dir=. 5271249c3046Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 5272249c3046Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 5273249c3046Smrg # Check to see if the program is GNU ld. I'd rather use --version, 5274249c3046Smrg # but apparently some variants of GNU ld only accept -v. 5275249c3046Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 5276249c3046Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 5277249c3046Smrg *GNU* | *'with BFD'*) 5278249c3046Smrg test "$with_gnu_ld" != no && break 52792265a131Smrg ;; 5280249c3046Smrg *) 5281249c3046Smrg test "$with_gnu_ld" != yes && break 52822265a131Smrg ;; 52831477040fSmrg esac 5284249c3046Smrg fi 5285249c3046Smrg done 5286249c3046Smrg IFS="$lt_save_ifs" 5287249c3046Smrgelse 5288249c3046Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 5289249c3046Smrgfi]) 5290249c3046SmrgLD="$lt_cv_path_LD" 5291249c3046Smrgif test -n "$LD"; then 5292249c3046Smrg AC_MSG_RESULT($LD) 5293249c3046Smrgelse 5294249c3046Smrg AC_MSG_RESULT(no) 5295249c3046Smrgfi 5296249c3046Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 5297249c3046Smrg_LT_PATH_LD_GNU 5298249c3046SmrgAC_SUBST([LD]) 5299444c061aSmrg 5300249c3046Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 5301249c3046Smrg])# LT_PATH_LD 5302444c061aSmrg 5303249c3046Smrg# Old names: 5304249c3046SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 5305249c3046SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 5306249c3046Smrgdnl aclocal-1.4 backwards compatibility: 5307249c3046Smrgdnl AC_DEFUN([AM_PROG_LD], []) 5308249c3046Smrgdnl AC_DEFUN([AC_PROG_LD], []) 5309249c3046Smrg 5310249c3046Smrg 5311249c3046Smrg# _LT_PATH_LD_GNU 5312249c3046Smrg#- -------------- 5313249c3046Smrgm4_defun([_LT_PATH_LD_GNU], 5314249c3046Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 5315249c3046Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 5316249c3046Smrgcase `$LD -v 2>&1 </dev/null` in 5317249c3046Smrg*GNU* | *'with BFD'*) 5318249c3046Smrg lt_cv_prog_gnu_ld=yes 5319249c3046Smrg ;; 5320249c3046Smrg*) 5321249c3046Smrg lt_cv_prog_gnu_ld=no 5322249c3046Smrg ;; 5323249c3046Smrgesac]) 5324249c3046Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 5325249c3046Smrg])# _LT_PATH_LD_GNU 5326249c3046Smrg 5327249c3046Smrg 5328249c3046Smrg# _LT_CMD_RELOAD 5329249c3046Smrg# -------------- 5330249c3046Smrg# find reload flag for linker 5331249c3046Smrg# -- PORTME Some linkers may need a different reload flag. 5332249c3046Smrgm4_defun([_LT_CMD_RELOAD], 5333249c3046Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 5334249c3046Smrg lt_cv_ld_reload_flag, 5335249c3046Smrg [lt_cv_ld_reload_flag='-r']) 5336249c3046Smrgreload_flag=$lt_cv_ld_reload_flag 5337249c3046Smrgcase $reload_flag in 5338249c3046Smrg"" | " "*) ;; 5339249c3046Smrg*) reload_flag=" $reload_flag" ;; 5340249c3046Smrgesac 5341249c3046Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 5342249c3046Smrgcase $host_os in 5343249c3046Smrg darwin*) 5344249c3046Smrg if test "$GCC" = yes; then 5345249c3046Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 5346249c3046Smrg else 5347249c3046Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 5348249c3046Smrg fi 5349249c3046Smrg ;; 5350249c3046Smrgesac 5351249c3046Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 5352249c3046Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 5353249c3046Smrg])# _LT_CMD_RELOAD 5354444c061aSmrg 5355444c061aSmrg 5356249c3046Smrg# _LT_CHECK_MAGIC_METHOD 5357249c3046Smrg# ---------------------- 5358249c3046Smrg# how to check for library dependencies 5359249c3046Smrg# -- PORTME fill in with the dynamic library characteristics 5360249c3046Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 5361249c3046Smrg[m4_require([_LT_DECL_EGREP]) 5362249c3046Smrgm4_require([_LT_DECL_OBJDUMP]) 5363249c3046SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 5364249c3046Smrglt_cv_deplibs_check_method, 5365249c3046Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 5366249c3046Smrglt_cv_file_magic_test_file= 5367249c3046Smrglt_cv_deplibs_check_method='unknown' 5368249c3046Smrg# Need to set the preceding variable on all platforms that support 5369249c3046Smrg# interlibrary dependencies. 5370249c3046Smrg# 'none' -- dependencies not supported. 5371249c3046Smrg# `unknown' -- same as none, but documents that we really don't know. 5372249c3046Smrg# 'pass_all' -- all dependencies passed with no checks. 5373249c3046Smrg# 'test_compile' -- check by making test program. 5374249c3046Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 5375249c3046Smrg# which responds to the $file_magic_cmd with a given extended regex. 5376249c3046Smrg# If you have `file' or equivalent on your system and you're not sure 5377249c3046Smrg# whether `pass_all' will *always* work, you probably want this one. 5378444c061aSmrg 5379249c3046Smrgcase $host_os in 5380249c3046Smrgaix[[4-9]]*) 5381249c3046Smrg lt_cv_deplibs_check_method=pass_all 5382249c3046Smrg ;; 5383444c061aSmrg 5384249c3046Smrgbeos*) 5385249c3046Smrg lt_cv_deplibs_check_method=pass_all 5386249c3046Smrg ;; 5387444c061aSmrg 5388249c3046Smrgbsdi[[45]]*) 5389249c3046Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 5390249c3046Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 5391249c3046Smrg lt_cv_file_magic_test_file=/shlib/libc.so 5392249c3046Smrg ;; 5393444c061aSmrg 5394249c3046Smrgcygwin*) 5395249c3046Smrg # func_win32_libid is a shell function defined in ltmain.sh 5396249c3046Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5397249c3046Smrg lt_cv_file_magic_cmd='func_win32_libid' 5398249c3046Smrg ;; 5399444c061aSmrg 5400249c3046Smrgmingw* | pw32*) 5401249c3046Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 5402249c3046Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 5403249c3046Smrg # unless we find 'file', for example because we are cross-compiling. 5404249c3046Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 5405249c3046Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 5406249c3046Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5407249c3046Smrg lt_cv_file_magic_cmd='func_win32_libid' 5408249c3046Smrg else 5409249c3046Smrg # Keep this pattern in sync with the one in func_win32_libid. 5410249c3046Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 5411249c3046Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 54121477040fSmrg fi 5413249c3046Smrg ;; 54142ae83157Smrg 5415249c3046Smrgcegcc*) 5416249c3046Smrg # use the weaker test based on 'objdump'. See mingw*. 5417249c3046Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 5418249c3046Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5419249c3046Smrg ;; 5420444c061aSmrg 5421249c3046Smrgdarwin* | rhapsody*) 5422249c3046Smrg lt_cv_deplibs_check_method=pass_all 5423249c3046Smrg ;; 5424444c061aSmrg 5425249c3046Smrgfreebsd* | dragonfly*) 5426249c3046Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5427249c3046Smrg case $host_cpu in 5428249c3046Smrg i*86 ) 5429249c3046Smrg # Not sure whether the presence of OpenBSD here was a mistake. 5430249c3046Smrg # Let's accept both of them until this is cleared up. 5431249c3046Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 5432249c3046Smrg lt_cv_file_magic_cmd=/usr/bin/file 5433249c3046Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 54342265a131Smrg ;; 54352265a131Smrg esac 5436249c3046Smrg else 5437249c3046Smrg lt_cv_deplibs_check_method=pass_all 54381477040fSmrg fi 54392265a131Smrg ;; 5440444c061aSmrg 5441249c3046Smrggnu*) 5442249c3046Smrg lt_cv_deplibs_check_method=pass_all 5443249c3046Smrg ;; 5444249c3046Smrg 5445249c3046Smrghaiku*) 5446249c3046Smrg lt_cv_deplibs_check_method=pass_all 5447249c3046Smrg ;; 5448249c3046Smrg 5449249c3046Smrghpux10.20* | hpux11*) 5450249c3046Smrg lt_cv_file_magic_cmd=/usr/bin/file 5451249c3046Smrg case $host_cpu in 5452249c3046Smrg ia64*) 5453249c3046Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 5454249c3046Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 5455249c3046Smrg ;; 5456249c3046Smrg hppa*64*) 5457249c3046Smrg [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]'] 5458249c3046Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 5459249c3046Smrg ;; 5460249c3046Smrg *) 5461249c3046Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 5462249c3046Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 5463249c3046Smrg ;; 5464249c3046Smrg esac 5465249c3046Smrg ;; 54661477040fSmrg 5467249c3046Smrginterix[[3-9]]*) 5468249c3046Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 5469249c3046Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 5470249c3046Smrg ;; 54711477040fSmrg 5472249c3046Smrgirix5* | irix6* | nonstopux*) 5473249c3046Smrg case $LD in 5474249c3046Smrg *-32|*"-32 ") libmagic=32-bit;; 5475249c3046Smrg *-n32|*"-n32 ") libmagic=N32;; 5476249c3046Smrg *-64|*"-64 ") libmagic=64-bit;; 5477249c3046Smrg *) libmagic=never-match;; 5478249c3046Smrg esac 5479249c3046Smrg lt_cv_deplibs_check_method=pass_all 5480249c3046Smrg ;; 5481444c061aSmrg 5482249c3046Smrg# This must be Linux ELF. 5483249c3046Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 5484249c3046Smrg lt_cv_deplibs_check_method=pass_all 5485249c3046Smrg ;; 5486444c061aSmrg 5487249c3046Smrgnetbsd*) 5488249c3046Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5489249c3046Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5490249c3046Smrg else 5491249c3046Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 5492249c3046Smrg fi 5493249c3046Smrg ;; 54942ae83157Smrg 5495249c3046Smrgnewos6*) 5496249c3046Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 5497249c3046Smrg lt_cv_file_magic_cmd=/usr/bin/file 5498249c3046Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 5499249c3046Smrg ;; 5500444c061aSmrg 5501249c3046Smrg*nto* | *qnx*) 5502249c3046Smrg lt_cv_deplibs_check_method=pass_all 5503249c3046Smrg ;; 5504444c061aSmrg 5505249c3046Smrgopenbsd*) 5506249c3046Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5507249c3046Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 5508249c3046Smrg else 5509249c3046Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5510249c3046Smrg fi 5511249c3046Smrg ;; 5512444c061aSmrg 5513249c3046Smrgosf3* | osf4* | osf5*) 5514249c3046Smrg lt_cv_deplibs_check_method=pass_all 5515249c3046Smrg ;; 5516444c061aSmrg 5517249c3046Smrgrdos*) 5518249c3046Smrg lt_cv_deplibs_check_method=pass_all 5519249c3046Smrg ;; 55201477040fSmrg 5521249c3046Smrgsolaris*) 5522249c3046Smrg lt_cv_deplibs_check_method=pass_all 5523249c3046Smrg ;; 55241477040fSmrg 5525249c3046Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5526249c3046Smrg lt_cv_deplibs_check_method=pass_all 5527249c3046Smrg ;; 55281477040fSmrg 5529249c3046Smrgsysv4 | sysv4.3*) 5530249c3046Smrg case $host_vendor in 5531249c3046Smrg motorola) 5532249c3046Smrg 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]]' 5533249c3046Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 55341477040fSmrg ;; 5535249c3046Smrg ncr) 5536249c3046Smrg lt_cv_deplibs_check_method=pass_all 5537249c3046Smrg ;; 5538249c3046Smrg sequent) 5539249c3046Smrg lt_cv_file_magic_cmd='/bin/file' 5540249c3046Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 5541249c3046Smrg ;; 5542249c3046Smrg sni) 5543249c3046Smrg lt_cv_file_magic_cmd='/bin/file' 5544249c3046Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 5545249c3046Smrg lt_cv_file_magic_test_file=/lib/libc.so 5546249c3046Smrg ;; 5547249c3046Smrg siemens) 5548249c3046Smrg lt_cv_deplibs_check_method=pass_all 5549249c3046Smrg ;; 5550249c3046Smrg pc) 5551249c3046Smrg lt_cv_deplibs_check_method=pass_all 55521477040fSmrg ;; 55531477040fSmrg esac 5554249c3046Smrg ;; 5555444c061aSmrg 5556249c3046Smrgtpf*) 5557249c3046Smrg lt_cv_deplibs_check_method=pass_all 5558249c3046Smrg ;; 5559249c3046Smrgesac 5560249c3046Smrg]) 5561249c3046Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 5562249c3046Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 5563249c3046Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 5564444c061aSmrg 5565249c3046Smrg_LT_DECL([], [deplibs_check_method], [1], 5566249c3046Smrg [Method to check whether dependent libraries are shared objects]) 5567249c3046Smrg_LT_DECL([], [file_magic_cmd], [1], 5568249c3046Smrg [Command to use when deplibs_check_method == "file_magic"]) 5569249c3046Smrg])# _LT_CHECK_MAGIC_METHOD 5570444c061aSmrg 5571444c061aSmrg 5572249c3046Smrg# LT_PATH_NM 5573249c3046Smrg# ---------- 5574249c3046Smrg# find the pathname to a BSD- or MS-compatible name lister 5575249c3046SmrgAC_DEFUN([LT_PATH_NM], 5576249c3046Smrg[AC_REQUIRE([AC_PROG_CC])dnl 5577249c3046SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 5578249c3046Smrg[if test -n "$NM"; then 5579249c3046Smrg # Let the user override the test. 5580249c3046Smrg lt_cv_path_NM="$NM" 55811477040fSmrgelse 5582249c3046Smrg lt_nm_to_check="${ac_tool_prefix}nm" 5583249c3046Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 5584249c3046Smrg lt_nm_to_check="$lt_nm_to_check nm" 5585249c3046Smrg fi 5586249c3046Smrg for lt_tmp_nm in $lt_nm_to_check; do 5587249c3046Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5588249c3046Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 5589249c3046Smrg IFS="$lt_save_ifs" 5590249c3046Smrg test -z "$ac_dir" && ac_dir=. 5591249c3046Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 5592249c3046Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 5593249c3046Smrg # Check to see if the nm accepts a BSD-compat flag. 5594249c3046Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 5595249c3046Smrg # nm: unknown option "B" ignored 5596249c3046Smrg # Tru64's nm complains that /dev/null is an invalid object file 5597249c3046Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 5598249c3046Smrg */dev/null* | *'Invalid file or object type'*) 5599249c3046Smrg lt_cv_path_NM="$tmp_nm -B" 5600249c3046Smrg break 5601249c3046Smrg ;; 5602249c3046Smrg *) 5603249c3046Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 5604249c3046Smrg */dev/null*) 5605249c3046Smrg lt_cv_path_NM="$tmp_nm -p" 5606249c3046Smrg break 5607249c3046Smrg ;; 5608249c3046Smrg *) 5609249c3046Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 5610249c3046Smrg continue # so that we can try to find one that supports BSD flags 5611249c3046Smrg ;; 5612249c3046Smrg esac 5613249c3046Smrg ;; 5614249c3046Smrg esac 5615249c3046Smrg fi 5616249c3046Smrg done 5617249c3046Smrg IFS="$lt_save_ifs" 5618249c3046Smrg done 5619249c3046Smrg : ${lt_cv_path_NM=no} 5620249c3046Smrgfi]) 5621249c3046Smrgif test "$lt_cv_path_NM" != "no"; then 5622249c3046Smrg NM="$lt_cv_path_NM" 5623249c3046Smrgelse 5624249c3046Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 5625249c3046Smrg if test -n "$DUMPBIN"; then : 5626249c3046Smrg # Let the user override the test. 5627249c3046Smrg else 5628249c3046Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 5629249c3046Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 5630249c3046Smrg *COFF*) 5631249c3046Smrg DUMPBIN="$DUMPBIN -symbols" 5632249c3046Smrg ;; 5633249c3046Smrg *) 5634249c3046Smrg DUMPBIN=: 5635249c3046Smrg ;; 5636249c3046Smrg esac 5637249c3046Smrg fi 5638249c3046Smrg AC_SUBST([DUMPBIN]) 5639249c3046Smrg if test "$DUMPBIN" != ":"; then 5640249c3046Smrg NM="$DUMPBIN" 5641249c3046Smrg fi 56421477040fSmrgfi 5643249c3046Smrgtest -z "$NM" && NM=nm 5644249c3046SmrgAC_SUBST([NM]) 5645249c3046Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 5646444c061aSmrg 5647249c3046SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 5648249c3046Smrg [lt_cv_nm_interface="BSD nm" 5649249c3046Smrg echo "int some_variable = 0;" > conftest.$ac_ext 5650249c3046Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 5651249c3046Smrg (eval "$ac_compile" 2>conftest.err) 5652249c3046Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5653249c3046Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 5654249c3046Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 5655249c3046Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5656249c3046Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 5657249c3046Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 5658249c3046Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 5659249c3046Smrg lt_cv_nm_interface="MS dumpbin" 5660249c3046Smrg fi 5661249c3046Smrg rm -f conftest*]) 5662249c3046Smrg])# LT_PATH_NM 5663444c061aSmrg 5664249c3046Smrg# Old names: 5665249c3046SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 5666249c3046SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 5667249c3046Smrgdnl aclocal-1.4 backwards compatibility: 5668249c3046Smrgdnl AC_DEFUN([AM_PROG_NM], []) 5669249c3046Smrgdnl AC_DEFUN([AC_PROG_NM], []) 56701477040fSmrg 56711477040fSmrg 5672249c3046Smrg# LT_LIB_M 5673249c3046Smrg# -------- 5674249c3046Smrg# check for math library 5675249c3046SmrgAC_DEFUN([LT_LIB_M], 5676249c3046Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5677249c3046SmrgLIBM= 5678249c3046Smrgcase $host in 5679249c3046Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 5680249c3046Smrg # These system don't have libm, or don't need it 5681249c3046Smrg ;; 5682249c3046Smrg*-ncr-sysv4.3*) 5683249c3046Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 5684249c3046Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 5685249c3046Smrg ;; 5686249c3046Smrg*) 5687249c3046Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 5688249c3046Smrg ;; 5689249c3046Smrgesac 5690249c3046SmrgAC_SUBST([LIBM]) 5691249c3046Smrg])# LT_LIB_M 56921477040fSmrg 5693249c3046Smrg# Old name: 5694249c3046SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 5695249c3046Smrgdnl aclocal-1.4 backwards compatibility: 5696249c3046Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 56971477040fSmrg 56981477040fSmrg 5699249c3046Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 5700249c3046Smrg# ------------------------------- 5701249c3046Smrgm4_defun([_LT_COMPILER_NO_RTTI], 5702249c3046Smrg[m4_require([_LT_TAG_COMPILER])dnl 5703444c061aSmrg 5704249c3046Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5705444c061aSmrg 5706249c3046Smrgif test "$GCC" = yes; then 5707249c3046Smrg case $cc_basename in 5708249c3046Smrg nvcc*) 5709249c3046Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 5710249c3046Smrg *) 5711249c3046Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 5712249c3046Smrg esac 5713444c061aSmrg 5714249c3046Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5715249c3046Smrg lt_cv_prog_compiler_rtti_exceptions, 5716249c3046Smrg [-fno-rtti -fno-exceptions], [], 5717249c3046Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 5718249c3046Smrgfi 5719249c3046Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 5720249c3046Smrg [Compiler flag to turn off builtin functions]) 5721249c3046Smrg])# _LT_COMPILER_NO_RTTI 5722444c061aSmrg 5723444c061aSmrg 5724249c3046Smrg# _LT_CMD_GLOBAL_SYMBOLS 5725249c3046Smrg# ---------------------- 5726249c3046Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 5727249c3046Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5728249c3046SmrgAC_REQUIRE([AC_PROG_CC])dnl 5729249c3046SmrgAC_REQUIRE([AC_PROG_AWK])dnl 5730249c3046SmrgAC_REQUIRE([LT_PATH_NM])dnl 5731249c3046SmrgAC_REQUIRE([LT_PATH_LD])dnl 5732249c3046Smrgm4_require([_LT_DECL_SED])dnl 5733249c3046Smrgm4_require([_LT_DECL_EGREP])dnl 5734249c3046Smrgm4_require([_LT_TAG_COMPILER])dnl 5735444c061aSmrg 5736249c3046Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 5737249c3046SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5738249c3046SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 5739249c3046Smrg[ 5740249c3046Smrg# These are sane defaults that work on at least a few old systems. 5741249c3046Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 5742444c061aSmrg 5743249c3046Smrg# Character class describing NM global symbol codes. 5744249c3046Smrgsymcode='[[BCDEGRST]]' 57451477040fSmrg 5746249c3046Smrg# Regexp to match symbols that can be accessed directly from C. 5747249c3046Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 5748444c061aSmrg 5749249c3046Smrg# Define system-specific variables. 5750249c3046Smrgcase $host_os in 5751249c3046Smrgaix*) 5752249c3046Smrg symcode='[[BCDT]]' 5753249c3046Smrg ;; 5754249c3046Smrgcygwin* | mingw* | pw32* | cegcc*) 5755249c3046Smrg symcode='[[ABCDGISTW]]' 5756249c3046Smrg ;; 5757249c3046Smrghpux*) 5758249c3046Smrg if test "$host_cpu" = ia64; then 5759249c3046Smrg symcode='[[ABCDEGRST]]' 5760249c3046Smrg fi 5761249c3046Smrg ;; 5762249c3046Smrgirix* | nonstopux*) 5763249c3046Smrg symcode='[[BCDEGRST]]' 5764249c3046Smrg ;; 5765249c3046Smrgosf*) 5766249c3046Smrg symcode='[[BCDEGQRST]]' 5767249c3046Smrg ;; 5768249c3046Smrgsolaris*) 5769249c3046Smrg symcode='[[BDRT]]' 5770249c3046Smrg ;; 5771249c3046Smrgsco3.2v5*) 5772249c3046Smrg symcode='[[DT]]' 5773249c3046Smrg ;; 5774249c3046Smrgsysv4.2uw2*) 5775249c3046Smrg symcode='[[DT]]' 5776249c3046Smrg ;; 5777249c3046Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 5778249c3046Smrg symcode='[[ABDT]]' 5779249c3046Smrg ;; 5780249c3046Smrgsysv4) 5781249c3046Smrg symcode='[[DFNSTU]]' 5782249c3046Smrg ;; 5783249c3046Smrgesac 5784444c061aSmrg 5785249c3046Smrg# If we're using GNU nm, then use its standard symbol codes. 5786249c3046Smrgcase `$NM -V 2>&1` in 5787249c3046Smrg*GNU* | *'with BFD'*) 5788249c3046Smrg symcode='[[ABCDGIRSTW]]' ;; 5789249c3046Smrgesac 5790444c061aSmrg 5791249c3046Smrg# Transform an extracted symbol line into a proper C declaration. 5792249c3046Smrg# Some systems (esp. on ia64) link data and code symbols differently, 5793249c3046Smrg# so use this general approach. 5794249c3046Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 57951477040fSmrg 5796249c3046Smrg# Transform an extracted symbol line into symbol name and symbol address 5797249c3046Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 5798249c3046Smrglt_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'" 5799444c061aSmrg 5800249c3046Smrg# Handle CRLF in mingw tool chain 5801249c3046Smrgopt_cr= 5802249c3046Smrgcase $build_os in 5803249c3046Smrgmingw*) 5804249c3046Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 5805249c3046Smrg ;; 5806249c3046Smrgesac 5807444c061aSmrg 5808249c3046Smrg# Try without a prefix underscore, then with it. 5809249c3046Smrgfor ac_symprfx in "" "_"; do 58101477040fSmrg 5811249c3046Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 5812249c3046Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 58131477040fSmrg 5814249c3046Smrg # Write the raw and C identifiers. 5815249c3046Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 5816249c3046Smrg # Fake it for dumpbin and say T for any non-static function 5817249c3046Smrg # and D for any global variable. 5818249c3046Smrg # Also find C++ and __fastcall symbols from MSVC++, 5819249c3046Smrg # which start with @ or ?. 5820249c3046Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 5821249c3046Smrg" {last_section=section; section=\$ 3};"\ 5822249c3046Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 5823249c3046Smrg" \$ 0!~/External *\|/{next};"\ 5824249c3046Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 5825249c3046Smrg" {if(hide[section]) next};"\ 5826249c3046Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 5827249c3046Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 5828249c3046Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 5829249c3046Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 5830249c3046Smrg" ' prfx=^$ac_symprfx]" 5831249c3046Smrg else 5832249c3046Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 5833249c3046Smrg fi 5834444c061aSmrg 5835249c3046Smrg # Check to see that the pipe works correctly. 5836249c3046Smrg pipe_works=no 58371477040fSmrg 5838249c3046Smrg rm -f conftest* 5839249c3046Smrg cat > conftest.$ac_ext <<_LT_EOF 5840249c3046Smrg#ifdef __cplusplus 5841249c3046Smrgextern "C" { 5842249c3046Smrg#endif 5843249c3046Smrgchar nm_test_var; 5844249c3046Smrgvoid nm_test_func(void); 5845249c3046Smrgvoid nm_test_func(void){} 5846249c3046Smrg#ifdef __cplusplus 5847249c3046Smrg} 5848249c3046Smrg#endif 5849249c3046Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 5850249c3046Smrg_LT_EOF 5851444c061aSmrg 5852249c3046Smrg if AC_TRY_EVAL(ac_compile); then 5853249c3046Smrg # Now try to grab the symbols. 5854249c3046Smrg nlist=conftest.nm 5855249c3046Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 5856249c3046Smrg # Try sorting and uniquifying the output. 5857249c3046Smrg if sort "$nlist" | uniq > "$nlist"T; then 5858249c3046Smrg mv -f "$nlist"T "$nlist" 5859249c3046Smrg else 5860249c3046Smrg rm -f "$nlist"T 5861249c3046Smrg fi 5862444c061aSmrg 5863249c3046Smrg # Make sure that we snagged all the symbols we need. 5864249c3046Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 5865249c3046Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 5866249c3046Smrg cat <<_LT_EOF > conftest.$ac_ext 5867249c3046Smrg#ifdef __cplusplus 5868249c3046Smrgextern "C" { 5869249c3046Smrg#endif 5870444c061aSmrg 5871249c3046Smrg_LT_EOF 5872249c3046Smrg # Now generate the symbol file. 5873249c3046Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 58741477040fSmrg 5875249c3046Smrg cat <<_LT_EOF >> conftest.$ac_ext 58762265a131Smrg 5877249c3046Smrg/* The mapping between symbol names and symbols. */ 5878249c3046Smrgconst struct { 5879249c3046Smrg const char *name; 5880249c3046Smrg void *address; 5881249c3046Smrg} 5882249c3046Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 5883249c3046Smrg{ 5884249c3046Smrg { "@PROGRAM@", (void *) 0 }, 5885249c3046Smrg_LT_EOF 5886249c3046Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 5887249c3046Smrg cat <<\_LT_EOF >> conftest.$ac_ext 5888249c3046Smrg {0, (void *) 0} 5889249c3046Smrg}; 58902265a131Smrg 5891249c3046Smrg/* This works around a problem in FreeBSD linker */ 5892249c3046Smrg#ifdef FREEBSD_WORKAROUND 5893249c3046Smrgstatic const void *lt_preloaded_setup() { 5894249c3046Smrg return lt__PROGRAM__LTX_preloaded_symbols; 5895249c3046Smrg} 5896249c3046Smrg#endif 58972265a131Smrg 5898249c3046Smrg#ifdef __cplusplus 5899249c3046Smrg} 5900249c3046Smrg#endif 5901249c3046Smrg_LT_EOF 5902249c3046Smrg # Now try linking the two files. 5903249c3046Smrg mv conftest.$ac_objext conftstm.$ac_objext 5904249c3046Smrg lt_save_LIBS="$LIBS" 5905249c3046Smrg lt_save_CFLAGS="$CFLAGS" 5906249c3046Smrg LIBS="conftstm.$ac_objext" 5907249c3046Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 5908249c3046Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 5909249c3046Smrg pipe_works=yes 5910249c3046Smrg fi 5911249c3046Smrg LIBS="$lt_save_LIBS" 5912249c3046Smrg CFLAGS="$lt_save_CFLAGS" 5913249c3046Smrg else 5914249c3046Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 5915249c3046Smrg fi 5916249c3046Smrg else 5917249c3046Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 5918249c3046Smrg fi 5919249c3046Smrg else 5920249c3046Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 5921249c3046Smrg fi 5922249c3046Smrg else 5923249c3046Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 5924249c3046Smrg cat conftest.$ac_ext >&5 5925249c3046Smrg fi 5926249c3046Smrg rm -rf conftest* conftst* 59272265a131Smrg 5928249c3046Smrg # Do not use the global_symbol_pipe unless it works. 5929249c3046Smrg if test "$pipe_works" = yes; then 5930249c3046Smrg break 5931249c3046Smrg else 5932249c3046Smrg lt_cv_sys_global_symbol_pipe= 5933249c3046Smrg fi 5934249c3046Smrgdone 5935249c3046Smrg]) 5936249c3046Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 5937249c3046Smrg lt_cv_sys_global_symbol_to_cdecl= 5938249c3046Smrgfi 5939249c3046Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 5940249c3046Smrg AC_MSG_RESULT(failed) 5941249c3046Smrgelse 5942249c3046Smrg AC_MSG_RESULT(ok) 5943249c3046Smrgfi 59442265a131Smrg 5945249c3046Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 5946249c3046Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 5947249c3046Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 5948249c3046Smrg [Transform the output of nm in a proper C declaration]) 5949249c3046Smrg_LT_DECL([global_symbol_to_c_name_address], 5950249c3046Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 5951249c3046Smrg [Transform the output of nm in a C name address pair]) 5952249c3046Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 5953249c3046Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 5954249c3046Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 5955249c3046Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 59562265a131Smrg 59571477040fSmrg 5958249c3046Smrg# _LT_COMPILER_PIC([TAGNAME]) 5959249c3046Smrg# --------------------------- 5960249c3046Smrgm4_defun([_LT_COMPILER_PIC], 5961249c3046Smrg[m4_require([_LT_TAG_COMPILER])dnl 5962249c3046Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 5963249c3046Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5964249c3046Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 59652265a131Smrg 5966249c3046SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5967249c3046Smrgm4_if([$1], [CXX], [ 5968249c3046Smrg # C++ specific cases for pic, static, wl, etc. 5969249c3046Smrg if test "$GXX" = yes; then 5970249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5971249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 59721477040fSmrg 5973249c3046Smrg case $host_os in 5974249c3046Smrg aix*) 5975249c3046Smrg # All AIX code is PIC. 5976249c3046Smrg if test "$host_cpu" = ia64; then 5977249c3046Smrg # AIX 5 now supports IA64 processor 5978249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5979249c3046Smrg fi 5980249c3046Smrg ;; 59811477040fSmrg 5982249c3046Smrg amigaos*) 5983249c3046Smrg case $host_cpu in 5984249c3046Smrg powerpc) 5985249c3046Smrg # see comment about AmigaOS4 .so support 5986249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5987249c3046Smrg ;; 5988249c3046Smrg m68k) 5989249c3046Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5990249c3046Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5991249c3046Smrg # like `-m68040'. 5992249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 59931477040fSmrg ;; 5994249c3046Smrg esac 5995249c3046Smrg ;; 59962265a131Smrg 5997249c3046Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5998249c3046Smrg # PIC is the default for these OSes. 5999249c3046Smrg ;; 6000249c3046Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 6001249c3046Smrg # This hack is so that the source file can tell whether it is being 6002249c3046Smrg # built for inclusion in a dll (and should export symbols for example). 6003249c3046Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6004249c3046Smrg # (--disable-auto-import) libraries 6005249c3046Smrg m4_if([$1], [GCJ], [], 6006249c3046Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6007249c3046Smrg ;; 6008249c3046Smrg darwin* | rhapsody*) 6009249c3046Smrg # PIC is the default on this platform 6010249c3046Smrg # Common symbols not allowed in MH_DYLIB files 6011249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6012249c3046Smrg ;; 6013249c3046Smrg *djgpp*) 6014249c3046Smrg # DJGPP does not support shared libraries at all 6015249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6016249c3046Smrg ;; 6017249c3046Smrg haiku*) 6018249c3046Smrg # PIC is the default for Haiku. 6019249c3046Smrg # The "-static" flag exists, but is broken. 6020249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 6021249c3046Smrg ;; 6022249c3046Smrg interix[[3-9]]*) 6023249c3046Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6024249c3046Smrg # Instead, we relocate shared libraries at runtime. 6025249c3046Smrg ;; 6026249c3046Smrg sysv4*MP*) 6027249c3046Smrg if test -d /usr/nec; then 6028249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6029249c3046Smrg fi 6030249c3046Smrg ;; 6031249c3046Smrg hpux*) 6032249c3046Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6033249c3046Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6034249c3046Smrg # sets the default TLS model and affects inlining. 6035249c3046Smrg case $host_cpu in 6036249c3046Smrg hppa*64*) 6037249c3046Smrg ;; 6038249c3046Smrg *) 6039249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6040249c3046Smrg ;; 6041249c3046Smrg esac 6042249c3046Smrg ;; 6043249c3046Smrg *qnx* | *nto*) 6044249c3046Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6045249c3046Smrg # it will coredump. 6046249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6047249c3046Smrg ;; 6048249c3046Smrg *) 6049249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6050249c3046Smrg ;; 6051249c3046Smrg esac 6052249c3046Smrg else 6053249c3046Smrg case $host_os in 6054249c3046Smrg aix[[4-9]]*) 6055249c3046Smrg # All AIX code is PIC. 6056249c3046Smrg if test "$host_cpu" = ia64; then 6057249c3046Smrg # AIX 5 now supports IA64 processor 6058249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6059249c3046Smrg else 6060249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6061249c3046Smrg fi 6062249c3046Smrg ;; 6063249c3046Smrg chorus*) 6064249c3046Smrg case $cc_basename in 6065249c3046Smrg cxch68*) 6066249c3046Smrg # Green Hills C++ Compiler 6067249c3046Smrg # _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" 6068249c3046Smrg ;; 6069249c3046Smrg esac 60701477040fSmrg ;; 6071249c3046Smrg dgux*) 6072249c3046Smrg case $cc_basename in 6073249c3046Smrg ec++*) 6074249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 60751477040fSmrg ;; 6076249c3046Smrg ghcx*) 6077249c3046Smrg # Green Hills C++ Compiler 6078249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 60791477040fSmrg ;; 6080249c3046Smrg *) 60811477040fSmrg ;; 6082249c3046Smrg esac 6083249c3046Smrg ;; 6084249c3046Smrg freebsd* | dragonfly*) 6085249c3046Smrg # FreeBSD uses GNU C++ 6086249c3046Smrg ;; 6087249c3046Smrg hpux9* | hpux10* | hpux11*) 6088249c3046Smrg case $cc_basename in 6089249c3046Smrg CC*) 6090249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6091249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6092249c3046Smrg if test "$host_cpu" != ia64; then 6093249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6094249c3046Smrg fi 60951477040fSmrg ;; 6096249c3046Smrg aCC*) 6097249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6098249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6099249c3046Smrg case $host_cpu in 6100249c3046Smrg hppa*64*|ia64*) 6101249c3046Smrg # +Z the default 61021477040fSmrg ;; 6103249c3046Smrg *) 6104249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 61051477040fSmrg ;; 61061477040fSmrg esac 6107249c3046Smrg ;; 6108249c3046Smrg *) 6109249c3046Smrg ;; 6110249c3046Smrg esac 6111249c3046Smrg ;; 6112249c3046Smrg interix*) 6113249c3046Smrg # This is c89, which is MS Visual C++ (no shared libs) 6114249c3046Smrg # Anyone wants to do a port? 6115249c3046Smrg ;; 6116249c3046Smrg irix5* | irix6* | nonstopux*) 6117249c3046Smrg case $cc_basename in 6118249c3046Smrg CC*) 6119249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6120249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6121249c3046Smrg # CC pic flag -KPIC is the default. 6122249c3046Smrg ;; 6123249c3046Smrg *) 6124249c3046Smrg ;; 6125249c3046Smrg esac 6126249c3046Smrg ;; 6127249c3046Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6128249c3046Smrg case $cc_basename in 6129249c3046Smrg KCC*) 6130249c3046Smrg # KAI C++ Compiler 6131249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6132249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6133249c3046Smrg ;; 6134249c3046Smrg ecpc* ) 6135249c3046Smrg # old Intel C++ for x86_64 which still supported -KPIC. 6136249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6137249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6138249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6139249c3046Smrg ;; 6140249c3046Smrg icpc* ) 6141249c3046Smrg # Intel C++, used to be incompatible with GCC. 6142249c3046Smrg # ICC 10 doesn't accept -KPIC any more. 6143249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6144249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6145249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6146249c3046Smrg ;; 6147249c3046Smrg pgCC* | pgcpp*) 6148249c3046Smrg # Portland Group C++ compiler 6149249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6150249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6151249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6152249c3046Smrg ;; 61531477040fSmrg cxx*) 61541477040fSmrg # Compaq C++ 6155249c3046Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6156249c3046Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6157249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6158249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 61591477040fSmrg ;; 6160249c3046Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 6161249c3046Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 6162249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6163249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6164249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 61651477040fSmrg ;; 61661477040fSmrg *) 61671477040fSmrg case `$CC -V 2>&1 | sed 5q` in 61681477040fSmrg *Sun\ C*) 61691477040fSmrg # Sun C++ 5.9 6170249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6171249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6172249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 61731477040fSmrg ;; 61741477040fSmrg esac 61751477040fSmrg ;; 61761477040fSmrg esac 61771477040fSmrg ;; 61781477040fSmrg lynxos*) 61791477040fSmrg ;; 6180249c3046Smrg m88k*) 61811477040fSmrg ;; 6182249c3046Smrg mvs*) 6183249c3046Smrg case $cc_basename in 6184249c3046Smrg cxx*) 6185249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6186249c3046Smrg ;; 6187249c3046Smrg *) 6188249c3046Smrg ;; 6189249c3046Smrg esac 61901477040fSmrg ;; 6191249c3046Smrg netbsd*) 61921477040fSmrg ;; 6193249c3046Smrg *qnx* | *nto*) 6194249c3046Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6195249c3046Smrg # it will coredump. 6196249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6197249c3046Smrg ;; 61981477040fSmrg osf3* | osf4* | osf5*) 6199249c3046Smrg case $cc_basename in 6200249c3046Smrg KCC*) 6201249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 62021477040fSmrg ;; 6203249c3046Smrg RCC*) 62041477040fSmrg # Rational C++ 2.4.1 6205249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 62061477040fSmrg ;; 6207249c3046Smrg cxx*) 6208249c3046Smrg # Digital/Compaq C++ 6209249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6210249c3046Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6211249c3046Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6212249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6213249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 62141477040fSmrg ;; 62151477040fSmrg *) 62161477040fSmrg ;; 6217249c3046Smrg esac 6218249c3046Smrg ;; 62191477040fSmrg psos*) 6220249c3046Smrg ;; 62211477040fSmrg solaris*) 6222249c3046Smrg case $cc_basename in 6223249c3046Smrg CC* | sunCC*) 62241477040fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6225249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6226249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6227249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6228249c3046Smrg ;; 6229249c3046Smrg gcx*) 6230249c3046Smrg # Green Hills C++ Compiler 6231249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6232249c3046Smrg ;; 6233249c3046Smrg *) 6234249c3046Smrg ;; 6235249c3046Smrg esac 6236249c3046Smrg ;; 6237249c3046Smrg sunos4*) 62381477040fSmrg case $cc_basename in 6239249c3046Smrg CC*) 6240249c3046Smrg # Sun C++ 4.x 6241249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6242249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6243249c3046Smrg ;; 6244249c3046Smrg lcc*) 6245249c3046Smrg # Lucid 6246249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 62471477040fSmrg ;; 62481477040fSmrg *) 62491477040fSmrg ;; 62501477040fSmrg esac 6251249c3046Smrg ;; 6252249c3046Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6253249c3046Smrg case $cc_basename in 6254249c3046Smrg CC*) 6255249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6256249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6257249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6258249c3046Smrg ;; 6259249c3046Smrg esac 6260249c3046Smrg ;; 62611477040fSmrg tandem*) 6262249c3046Smrg case $cc_basename in 6263249c3046Smrg NCC*) 62641477040fSmrg # NonStop-UX NCC 3.20 6265249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 62661477040fSmrg ;; 6267249c3046Smrg *) 62681477040fSmrg ;; 6269249c3046Smrg esac 6270249c3046Smrg ;; 62711477040fSmrg vxworks*) 6272249c3046Smrg ;; 62731477040fSmrg *) 6274249c3046Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6275249c3046Smrg ;; 62761477040fSmrg esac 6277249c3046Smrg fi 6278249c3046Smrg], 6279249c3046Smrg[ 6280249c3046Smrg if test "$GCC" = yes; then 6281249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6282249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 62832265a131Smrg 6284249c3046Smrg case $host_os in 6285249c3046Smrg aix*) 6286249c3046Smrg # All AIX code is PIC. 6287249c3046Smrg if test "$host_cpu" = ia64; then 6288249c3046Smrg # AIX 5 now supports IA64 processor 6289249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6290249c3046Smrg fi 6291249c3046Smrg ;; 62922265a131Smrg 6293249c3046Smrg amigaos*) 6294249c3046Smrg case $host_cpu in 6295249c3046Smrg powerpc) 6296249c3046Smrg # see comment about AmigaOS4 .so support 6297249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6298249c3046Smrg ;; 6299249c3046Smrg m68k) 6300249c3046Smrg # FIXME: we need at least 68020 code to build shared libraries, but 6301249c3046Smrg # adding the `-m68020' flag to GCC prevents building anything better, 6302249c3046Smrg # like `-m68040'. 6303249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6304249c3046Smrg ;; 6305249c3046Smrg esac 6306249c3046Smrg ;; 63072265a131Smrg 6308249c3046Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6309249c3046Smrg # PIC is the default for these OSes. 6310249c3046Smrg ;; 63112265a131Smrg 6312249c3046Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6313249c3046Smrg # This hack is so that the source file can tell whether it is being 6314249c3046Smrg # built for inclusion in a dll (and should export symbols for example). 6315249c3046Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6316249c3046Smrg # (--disable-auto-import) libraries 6317249c3046Smrg m4_if([$1], [GCJ], [], 6318249c3046Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6319249c3046Smrg ;; 63202265a131Smrg 6321249c3046Smrg darwin* | rhapsody*) 6322249c3046Smrg # PIC is the default on this platform 6323249c3046Smrg # Common symbols not allowed in MH_DYLIB files 6324249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6325249c3046Smrg ;; 63262265a131Smrg 6327249c3046Smrg haiku*) 6328249c3046Smrg # PIC is the default for Haiku. 6329249c3046Smrg # The "-static" flag exists, but is broken. 6330249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 6331249c3046Smrg ;; 63322265a131Smrg 6333249c3046Smrg hpux*) 6334249c3046Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6335249c3046Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6336249c3046Smrg # sets the default TLS model and affects inlining. 6337249c3046Smrg case $host_cpu in 6338249c3046Smrg hppa*64*) 6339249c3046Smrg # +Z the default 6340249c3046Smrg ;; 6341249c3046Smrg *) 6342249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6343249c3046Smrg ;; 6344249c3046Smrg esac 63451477040fSmrg ;; 63462265a131Smrg 6347249c3046Smrg interix[[3-9]]*) 6348249c3046Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6349249c3046Smrg # Instead, we relocate shared libraries at runtime. 6350249c3046Smrg ;; 63512265a131Smrg 6352249c3046Smrg msdosdjgpp*) 6353249c3046Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 6354249c3046Smrg # on systems that don't support them. 6355249c3046Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6356249c3046Smrg enable_shared=no 63571477040fSmrg ;; 63582265a131Smrg 6359249c3046Smrg *nto* | *qnx*) 6360249c3046Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6361249c3046Smrg # it will coredump. 6362249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6363249c3046Smrg ;; 63642265a131Smrg 6365249c3046Smrg sysv4*MP*) 6366249c3046Smrg if test -d /usr/nec; then 6367249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6368249c3046Smrg fi 6369249c3046Smrg ;; 63701477040fSmrg 6371249c3046Smrg *) 6372249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6373249c3046Smrg ;; 6374249c3046Smrg esac 63751477040fSmrg 6376249c3046Smrg case $cc_basename in 6377249c3046Smrg nvcc*) # Cuda Compiler Driver 2.2 6378249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 6379249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 6380249c3046Smrg ;; 6381249c3046Smrg esac 6382249c3046Smrg else 6383249c3046Smrg # PORTME Check for flag to pass linker flags through the system compiler. 6384249c3046Smrg case $host_os in 6385249c3046Smrg aix*) 6386249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6387249c3046Smrg if test "$host_cpu" = ia64; then 6388249c3046Smrg # AIX 5 now supports IA64 processor 6389249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6390249c3046Smrg else 6391249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6392249c3046Smrg fi 6393249c3046Smrg ;; 63942265a131Smrg 6395249c3046Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6396249c3046Smrg # This hack is so that the source file can tell whether it is being 6397249c3046Smrg # built for inclusion in a dll (and should export symbols for example). 6398249c3046Smrg m4_if([$1], [GCJ], [], 6399249c3046Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6400249c3046Smrg ;; 64012265a131Smrg 6402249c3046Smrg hpux9* | hpux10* | hpux11*) 6403249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6404249c3046Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6405249c3046Smrg # not for PA HP-UX. 6406249c3046Smrg case $host_cpu in 6407249c3046Smrg hppa*64*|ia64*) 6408249c3046Smrg # +Z the default 6409249c3046Smrg ;; 6410249c3046Smrg *) 6411249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6412249c3046Smrg ;; 6413249c3046Smrg esac 6414249c3046Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 6415249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6416249c3046Smrg ;; 64172265a131Smrg 6418249c3046Smrg irix5* | irix6* | nonstopux*) 6419249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6420249c3046Smrg # PIC (with -KPIC) is the default. 6421249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6422249c3046Smrg ;; 64232265a131Smrg 6424249c3046Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6425249c3046Smrg case $cc_basename in 6426249c3046Smrg # old Intel for x86_64 which still supported -KPIC. 6427249c3046Smrg ecc*) 6428249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6429249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6430249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6431249c3046Smrg ;; 6432249c3046Smrg # icc used to be incompatible with GCC. 6433249c3046Smrg # ICC 10 doesn't accept -KPIC any more. 6434249c3046Smrg icc* | ifort*) 6435249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6436249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6437249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6438249c3046Smrg ;; 6439249c3046Smrg # Lahey Fortran 8.1. 6440249c3046Smrg lf95*) 6441249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6442249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 6443249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 6444249c3046Smrg ;; 6445249c3046Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 6446249c3046Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 6447249c3046Smrg # which looks to be a dead project) 6448249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6449249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6450249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6451249c3046Smrg ;; 6452249c3046Smrg ccc*) 6453249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6454249c3046Smrg # All Alpha code is PIC. 6455249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6456249c3046Smrg ;; 6457249c3046Smrg xl* | bgxl* | bgf* | mpixl*) 6458249c3046Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 6459249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6460249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6461249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6462249c3046Smrg ;; 6463249c3046Smrg *) 6464249c3046Smrg case `$CC -V 2>&1 | sed 5q` in 6465249c3046Smrg *Sun\ F* | *Sun*Fortran*) 6466249c3046Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 6467249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6468249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6469249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 6470249c3046Smrg ;; 6471249c3046Smrg *Sun\ C*) 6472249c3046Smrg # Sun C 5.9 6473249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6474249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6475249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6476249c3046Smrg ;; 6477249c3046Smrg esac 6478249c3046Smrg ;; 6479249c3046Smrg esac 6480249c3046Smrg ;; 64812265a131Smrg 6482249c3046Smrg newsos6) 6483249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6484249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6485249c3046Smrg ;; 64862265a131Smrg 6487249c3046Smrg *nto* | *qnx*) 6488249c3046Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6489249c3046Smrg # it will coredump. 6490249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6491249c3046Smrg ;; 64921477040fSmrg 6493249c3046Smrg osf3* | osf4* | osf5*) 6494249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6495249c3046Smrg # All OSF/1 code is PIC. 6496249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6497249c3046Smrg ;; 64982265a131Smrg 6499249c3046Smrg rdos*) 6500249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6501249c3046Smrg ;; 65022265a131Smrg 6503249c3046Smrg solaris*) 6504249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6505249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6506249c3046Smrg case $cc_basename in 6507249c3046Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 6508249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6509249c3046Smrg *) 6510249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6511249c3046Smrg esac 6512249c3046Smrg ;; 65132265a131Smrg 6514249c3046Smrg sunos4*) 6515249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6516249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6517249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6518249c3046Smrg ;; 65192265a131Smrg 6520249c3046Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 6521249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6522249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6523249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6524249c3046Smrg ;; 65252265a131Smrg 6526249c3046Smrg sysv4*MP*) 6527249c3046Smrg if test -d /usr/nec ;then 6528249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6529249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6530249c3046Smrg fi 6531249c3046Smrg ;; 65322265a131Smrg 6533249c3046Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6534249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6535249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6536249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6537249c3046Smrg ;; 65381477040fSmrg 6539249c3046Smrg unicos*) 6540249c3046Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6541249c3046Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6542249c3046Smrg ;; 65431477040fSmrg 6544249c3046Smrg uts4*) 6545249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6546249c3046Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6547249c3046Smrg ;; 65481477040fSmrg 6549249c3046Smrg *) 6550249c3046Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6551249c3046Smrg ;; 6552249c3046Smrg esac 6553249c3046Smrg fi 6554249c3046Smrg]) 6555249c3046Smrgcase $host_os in 6556249c3046Smrg # For platforms which do not support PIC, -DPIC is meaningless: 6557249c3046Smrg *djgpp*) 6558249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6559249c3046Smrg ;; 6560249c3046Smrg *) 6561249c3046Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 6562249c3046Smrg ;; 6563249c3046Smrgesac 6564249c3046SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 6565249c3046Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 6566249c3046Smrg [How to pass a linker flag through the compiler]) 65671477040fSmrg 6568249c3046Smrg# 6569249c3046Smrg# Check to make sure the PIC flag actually works. 6570249c3046Smrg# 6571249c3046Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 6572249c3046Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 6573249c3046Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 6574249c3046Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 6575249c3046Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 6576249c3046Smrg "" | " "*) ;; 6577249c3046Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6578249c3046Smrg esac], 6579249c3046Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6580249c3046Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 6581249c3046Smrgfi 6582249c3046Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 6583249c3046Smrg [Additional compiler flags for building library objects]) 65841477040fSmrg 6585249c3046Smrg# 6586249c3046Smrg# Check to make sure the static flag actually works. 6587249c3046Smrg# 6588249c3046Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 6589249c3046Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 6590249c3046Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 6591249c3046Smrg $lt_tmp_static_flag, 6592249c3046Smrg [], 6593249c3046Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 6594249c3046Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 6595249c3046Smrg [Compiler flag to prevent dynamic linking]) 6596249c3046Smrg])# _LT_COMPILER_PIC 65972265a131Smrg 65982265a131Smrg 6599249c3046Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 6600249c3046Smrg# ---------------------------- 6601249c3046Smrg# See if the linker supports building shared libraries. 6602249c3046Smrgm4_defun([_LT_LINKER_SHLIBS], 6603249c3046Smrg[AC_REQUIRE([LT_PATH_LD])dnl 6604249c3046SmrgAC_REQUIRE([LT_PATH_NM])dnl 6605249c3046Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6606249c3046Smrgm4_require([_LT_DECL_EGREP])dnl 6607249c3046Smrgm4_require([_LT_DECL_SED])dnl 6608249c3046Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 6609249c3046Smrgm4_require([_LT_TAG_COMPILER])dnl 6610249c3046SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6611249c3046Smrgm4_if([$1], [CXX], [ 6612249c3046Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6613249c3046Smrg case $host_os in 6614249c3046Smrg aix[[4-9]]*) 6615249c3046Smrg # If we're using GNU nm, then we don't want the "-C" option. 6616249c3046Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6617249c3046Smrg # Also, AIX nm treats weak defined symbols like other global defined 6618249c3046Smrg # symbols, whereas GNU nm marks them as "W". 6619249c3046Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6620249c3046Smrg _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' 6621249c3046Smrg else 6622249c3046Smrg _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' 6623249c3046Smrg fi 6624249c3046Smrg ;; 6625249c3046Smrg pw32*) 6626249c3046Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 6627249c3046Smrg ;; 6628249c3046Smrg cygwin* | mingw* | cegcc*) 6629249c3046Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 6630249c3046Smrg ;; 6631249c3046Smrg *) 6632249c3046Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6633249c3046Smrg ;; 6634249c3046Smrg esac 6635249c3046Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6636249c3046Smrg], [ 6637249c3046Smrg runpath_var= 6638249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6639249c3046Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6640249c3046Smrg _LT_TAGVAR(archive_cmds, $1)= 6641249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 6642249c3046Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 6643249c3046Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6644249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6645249c3046Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6646249c3046Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 6647249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6648249c3046Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6649249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6650249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6651249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6652249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 6653249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6654249c3046Smrg _LT_TAGVAR(inherit_rpath, $1)=no 6655249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 6656249c3046Smrg _LT_TAGVAR(module_cmds, $1)= 6657249c3046Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 6658249c3046Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 6659249c3046Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6660249c3046Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 6661249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6662249c3046Smrg # include_expsyms should be a list of space-separated symbols to be *always* 6663249c3046Smrg # included in the symbol list 6664249c3046Smrg _LT_TAGVAR(include_expsyms, $1)= 6665249c3046Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 6666249c3046Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 6667249c3046Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6668249c3046Smrg # as well as any symbol that contains `d'. 6669249c3046Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6670249c3046Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6671249c3046Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 6672249c3046Smrg # the symbol is explicitly referenced. Since portable code cannot 6673249c3046Smrg # rely on this symbol name, it's probably fine to never include it in 6674249c3046Smrg # preloaded symbol tables. 6675249c3046Smrg # Exclude shared library initialization/finalization symbols. 6676249c3046Smrgdnl Note also adjust exclude_expsyms for C++ above. 6677249c3046Smrg extract_expsyms_cmds= 66782265a131Smrg 6679249c3046Smrg case $host_os in 6680249c3046Smrg cygwin* | mingw* | pw32* | cegcc*) 6681249c3046Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 6682249c3046Smrg # When not using gcc, we currently assume that we are using 6683249c3046Smrg # Microsoft Visual C++. 6684249c3046Smrg if test "$GCC" != yes; then 6685249c3046Smrg with_gnu_ld=no 6686249c3046Smrg fi 6687249c3046Smrg ;; 6688249c3046Smrg interix*) 6689249c3046Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 6690249c3046Smrg with_gnu_ld=yes 6691249c3046Smrg ;; 6692249c3046Smrg openbsd*) 6693249c3046Smrg with_gnu_ld=no 6694249c3046Smrg ;; 6695249c3046Smrg esac 66962265a131Smrg 6697249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 66982265a131Smrg 6699249c3046Smrg # On some targets, GNU ld is compatible enough with the native linker 6700249c3046Smrg # that we're better off using the native interface for both. 6701249c3046Smrg lt_use_gnu_ld_interface=no 6702249c3046Smrg if test "$with_gnu_ld" = yes; then 6703249c3046Smrg case $host_os in 6704249c3046Smrg aix*) 6705249c3046Smrg # The AIX port of GNU ld has always aspired to compatibility 6706249c3046Smrg # with the native linker. However, as the warning in the GNU ld 6707249c3046Smrg # block says, versions before 2.19.5* couldn't really create working 6708249c3046Smrg # shared libraries, regardless of the interface used. 6709249c3046Smrg case `$LD -v 2>&1` in 6710249c3046Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 6711249c3046Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 6712249c3046Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 6713249c3046Smrg *) 6714249c3046Smrg lt_use_gnu_ld_interface=yes 6715249c3046Smrg ;; 6716249c3046Smrg esac 6717249c3046Smrg ;; 6718249c3046Smrg *) 6719249c3046Smrg lt_use_gnu_ld_interface=yes 6720249c3046Smrg ;; 6721249c3046Smrg esac 6722249c3046Smrg fi 67232265a131Smrg 6724249c3046Smrg if test "$lt_use_gnu_ld_interface" = yes; then 6725249c3046Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6726249c3046Smrg wlarc='${wl}' 67271477040fSmrg 6728249c3046Smrg # Set some defaults for GNU ld with shared library support. These 6729249c3046Smrg # are reset later if shared libraries are not supported. Putting them 6730249c3046Smrg # here allows them to be overridden if necessary. 6731249c3046Smrg runpath_var=LD_RUN_PATH 6732249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6733249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6734249c3046Smrg # ancient GNU ld didn't support --whole-archive et. al. 6735249c3046Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 6736249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6737249c3046Smrg else 6738249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6739249c3046Smrg fi 6740249c3046Smrg supports_anon_versioning=no 6741249c3046Smrg case `$LD -v 2>&1` in 6742249c3046Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 6743249c3046Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6744249c3046Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6745249c3046Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6746249c3046Smrg *\ 2.11.*) ;; # other 2.11 versions 6747249c3046Smrg *) supports_anon_versioning=yes ;; 6748249c3046Smrg esac 67491477040fSmrg 6750249c3046Smrg # See if GNU ld supports shared libraries. 6751249c3046Smrg case $host_os in 6752249c3046Smrg aix[[3-9]]*) 6753249c3046Smrg # On AIX/PPC, the GNU linker is very broken 6754249c3046Smrg if test "$host_cpu" != ia64; then 6755249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6756249c3046Smrg cat <<_LT_EOF 1>&2 67571477040fSmrg 6758249c3046Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 6759249c3046Smrg*** to be unable to reliably create shared libraries on AIX. 6760249c3046Smrg*** Therefore, libtool is disabling shared libraries support. If you 6761249c3046Smrg*** really care for shared libraries, you may want to install binutils 6762249c3046Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 6763249c3046Smrg*** You will then need to restart the configuration process. 67641477040fSmrg 6765249c3046Smrg_LT_EOF 6766249c3046Smrg fi 6767249c3046Smrg ;; 67682265a131Smrg 6769249c3046Smrg amigaos*) 6770249c3046Smrg case $host_cpu in 6771249c3046Smrg powerpc) 6772249c3046Smrg # see comment about AmigaOS4 .so support 6773249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6774249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6775249c3046Smrg ;; 6776249c3046Smrg m68k) 6777249c3046Smrg _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)' 6778249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6779249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6780249c3046Smrg ;; 6781249c3046Smrg esac 6782249c3046Smrg ;; 67832265a131Smrg 6784249c3046Smrg beos*) 6785249c3046Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6786249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6787249c3046Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6788249c3046Smrg # support --undefined. This deserves some investigation. FIXME 6789249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6790249c3046Smrg else 6791249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6792249c3046Smrg fi 6793249c3046Smrg ;; 67942265a131Smrg 6795249c3046Smrg cygwin* | mingw* | pw32* | cegcc*) 6796249c3046Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6797249c3046Smrg # as there is no search path for DLLs. 6798249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6799249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6800249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6801249c3046Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6802249c3046Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6803249c3046Smrg _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' 68042265a131Smrg 6805249c3046Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6806249c3046Smrg _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' 6807249c3046Smrg # If the export-symbols file already is a .def file (1st line 6808249c3046Smrg # is EXPORTS), use it as is; otherwise, prepend... 6809249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6810249c3046Smrg cp $export_symbols $output_objdir/$soname.def; 6811249c3046Smrg else 6812249c3046Smrg echo EXPORTS > $output_objdir/$soname.def; 6813249c3046Smrg cat $export_symbols >> $output_objdir/$soname.def; 6814249c3046Smrg fi~ 6815249c3046Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6816249c3046Smrg else 6817249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6818249c3046Smrg fi 6819249c3046Smrg ;; 68202265a131Smrg 6821249c3046Smrg haiku*) 6822249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6823249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6824249c3046Smrg ;; 68252265a131Smrg 6826249c3046Smrg interix[[3-9]]*) 6827249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6828249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6829249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6830249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6831249c3046Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6832249c3046Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6833249c3046Smrg # default) and relocated if they conflict, which is a slow very memory 6834249c3046Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6835249c3046Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6836249c3046Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6837249c3046Smrg _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' 6838249c3046Smrg _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' 6839249c3046Smrg ;; 68402265a131Smrg 6841249c3046Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 6842249c3046Smrg tmp_diet=no 6843249c3046Smrg if test "$host_os" = linux-dietlibc; then 6844249c3046Smrg case $cc_basename in 6845249c3046Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 6846249c3046Smrg esac 6847249c3046Smrg fi 6848249c3046Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 6849249c3046Smrg && test "$tmp_diet" = no 6850249c3046Smrg then 6851249c3046Smrg tmp_addflag= 6852249c3046Smrg tmp_sharedflag='-shared' 6853249c3046Smrg case $cc_basename,$host_cpu in 6854249c3046Smrg pgcc*) # Portland Group C compiler 6855249c3046Smrg _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' 6856249c3046Smrg tmp_addflag=' $pic_flag' 6857249c3046Smrg ;; 6858249c3046Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 6859249c3046Smrg # Portland Group f77 and f90 compilers 6860249c3046Smrg _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' 6861249c3046Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 6862249c3046Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6863249c3046Smrg tmp_addflag=' -i_dynamic' ;; 6864249c3046Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6865249c3046Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 6866249c3046Smrg ifc* | ifort*) # Intel Fortran compiler 6867249c3046Smrg tmp_addflag=' -nofor_main' ;; 6868249c3046Smrg lf95*) # Lahey Fortran 8.1 6869249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6870249c3046Smrg tmp_sharedflag='--shared' ;; 6871249c3046Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 6872249c3046Smrg tmp_sharedflag='-qmkshrobj' 6873249c3046Smrg tmp_addflag= ;; 6874249c3046Smrg nvcc*) # Cuda Compiler Driver 2.2 6875249c3046Smrg _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' 6876249c3046Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6877249c3046Smrg ;; 6878249c3046Smrg esac 6879249c3046Smrg case `$CC -V 2>&1 | sed 5q` in 6880249c3046Smrg *Sun\ C*) # Sun C 5.9 6881249c3046Smrg _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' 6882249c3046Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6883249c3046Smrg tmp_sharedflag='-G' ;; 6884249c3046Smrg *Sun\ F*) # Sun Fortran 8.3 6885249c3046Smrg tmp_sharedflag='-G' ;; 6886249c3046Smrg esac 6887249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 68882265a131Smrg 6889249c3046Smrg if test "x$supports_anon_versioning" = xyes; then 6890249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6891249c3046Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6892249c3046Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6893249c3046Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 68941477040fSmrg fi 68951477040fSmrg 6896249c3046Smrg case $cc_basename in 6897249c3046Smrg xlf* | bgf* | bgxlf* | mpixlf*) 6898249c3046Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 6899249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 6900249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6901249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6902249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 6903249c3046Smrg if test "x$supports_anon_versioning" = xyes; then 6904249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6905249c3046Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6906249c3046Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6907249c3046Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 6908249c3046Smrg fi 6909249c3046Smrg ;; 6910249c3046Smrg esac 6911249c3046Smrg else 6912249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6913249c3046Smrg fi 6914249c3046Smrg ;; 69151477040fSmrg 6916249c3046Smrg netbsd*) 6917249c3046Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6918249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6919249c3046Smrg wlarc= 6920249c3046Smrg else 6921249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6922249c3046Smrg _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' 6923249c3046Smrg fi 6924249c3046Smrg ;; 69251477040fSmrg 6926249c3046Smrg solaris*) 6927249c3046Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 6928249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6929249c3046Smrg cat <<_LT_EOF 1>&2 69301477040fSmrg 6931249c3046Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6932249c3046Smrg*** create shared libraries on Solaris systems. Therefore, libtool 6933249c3046Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 6934249c3046Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 6935249c3046Smrg*** your PATH or compiler configuration so that the native linker is 6936249c3046Smrg*** used, and then restart. 69372265a131Smrg 6938249c3046Smrg_LT_EOF 6939249c3046Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6940249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6941249c3046Smrg _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' 6942249c3046Smrg else 6943249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6944249c3046Smrg fi 6945249c3046Smrg ;; 69462265a131Smrg 6947249c3046Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6948249c3046Smrg case `$LD -v 2>&1` in 6949249c3046Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6950249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6951249c3046Smrg cat <<_LT_EOF 1>&2 69522265a131Smrg 6953249c3046Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6954249c3046Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 6955249c3046Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 6956249c3046Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6957249c3046Smrg*** your PATH or compiler configuration so that the native linker is 6958249c3046Smrg*** used, and then restart. 69592265a131Smrg 6960249c3046Smrg_LT_EOF 6961249c3046Smrg ;; 6962249c3046Smrg *) 6963249c3046Smrg # For security reasons, it is highly recommended that you always 6964249c3046Smrg # use absolute paths for naming shared libraries, and exclude the 6965249c3046Smrg # DT_RUNPATH tag from executables and libraries. But doing so 6966249c3046Smrg # requires that you compile everything twice, which is a pain. 6967249c3046Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6968249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6969249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6970249c3046Smrg _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' 6971249c3046Smrg else 6972249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6973249c3046Smrg fi 6974249c3046Smrg ;; 6975249c3046Smrg esac 6976249c3046Smrg ;; 69772265a131Smrg 6978249c3046Smrg sunos4*) 6979249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6980249c3046Smrg wlarc= 6981249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6982249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6983249c3046Smrg ;; 69842265a131Smrg 6985249c3046Smrg *) 6986249c3046Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6987249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6988249c3046Smrg _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' 6989249c3046Smrg else 6990249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6991249c3046Smrg fi 6992249c3046Smrg ;; 6993249c3046Smrg esac 69942265a131Smrg 6995249c3046Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6996249c3046Smrg runpath_var= 6997249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6998249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6999249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7000249c3046Smrg fi 7001249c3046Smrg else 7002249c3046Smrg # PORTME fill in a description of your system's linker (not GNU ld) 7003249c3046Smrg case $host_os in 7004249c3046Smrg aix3*) 7005249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7006249c3046Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7007249c3046Smrg _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' 7008249c3046Smrg # Note: this linker hardcodes the directories in LIBPATH if there 7009249c3046Smrg # are no directories specified by -L. 7010249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7011249c3046Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 7012249c3046Smrg # Neither direct hardcoding nor static linking is supported with a 7013249c3046Smrg # broken collect2. 7014249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7015249c3046Smrg fi 7016249c3046Smrg ;; 70172265a131Smrg 7018249c3046Smrg aix[[4-9]]*) 7019249c3046Smrg if test "$host_cpu" = ia64; then 7020249c3046Smrg # On IA64, the linker does run time linking by default, so we don't 7021249c3046Smrg # have to do anything special. 7022249c3046Smrg aix_use_runtimelinking=no 7023249c3046Smrg exp_sym_flag='-Bexport' 7024249c3046Smrg no_entry_flag="" 7025249c3046Smrg else 7026249c3046Smrg # If we're using GNU nm, then we don't want the "-C" option. 7027249c3046Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 7028249c3046Smrg # Also, AIX nm treats weak defined symbols like other global 7029249c3046Smrg # defined symbols, whereas GNU nm marks them as "W". 7030249c3046Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 7031249c3046Smrg _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' 7032249c3046Smrg else 7033249c3046Smrg _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' 7034249c3046Smrg fi 7035249c3046Smrg aix_use_runtimelinking=no 70362265a131Smrg 7037249c3046Smrg # Test if we are trying to use run time linking or normal 7038249c3046Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7039249c3046Smrg # need to do runtime linking. 7040249c3046Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7041249c3046Smrg for ld_flag in $LDFLAGS; do 7042249c3046Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 7043249c3046Smrg aix_use_runtimelinking=yes 7044249c3046Smrg break 7045249c3046Smrg fi 7046249c3046Smrg done 7047249c3046Smrg ;; 7048249c3046Smrg esac 70492265a131Smrg 7050249c3046Smrg exp_sym_flag='-bexport' 7051249c3046Smrg no_entry_flag='-bnoentry' 7052249c3046Smrg fi 70532265a131Smrg 7054249c3046Smrg # When large executables or shared objects are built, AIX ld can 7055249c3046Smrg # have problems creating the table of contents. If linking a library 7056249c3046Smrg # or program results in "error TOC overflow" add -mminimal-toc to 7057249c3046Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7058249c3046Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 70592265a131Smrg 7060249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='' 7061249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7062249c3046Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7063249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7064249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7065249c3046Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 70662265a131Smrg 7067249c3046Smrg if test "$GCC" = yes; then 7068249c3046Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7069249c3046Smrg # We only want to do this on AIX 4.2 and lower, the check 7070249c3046Smrg # below for broken collect2 doesn't work under 4.3+ 7071249c3046Smrg collect2name=`${CC} -print-prog-name=collect2` 7072249c3046Smrg if test -f "$collect2name" && 7073249c3046Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7074249c3046Smrg then 7075249c3046Smrg # We have reworked collect2 7076249c3046Smrg : 7077249c3046Smrg else 7078249c3046Smrg # We have old collect2 7079249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7080249c3046Smrg # It fails to find uninstalled libraries when the uninstalled 7081249c3046Smrg # path is not listed in the libpath. Setting hardcode_minus_L 7082249c3046Smrg # to unsupported forces relinking 7083249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7084249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7085249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7086249c3046Smrg fi 7087249c3046Smrg ;; 7088249c3046Smrg esac 7089249c3046Smrg shared_flag='-shared' 7090249c3046Smrg if test "$aix_use_runtimelinking" = yes; then 7091249c3046Smrg shared_flag="$shared_flag "'${wl}-G' 7092249c3046Smrg fi 7093249c3046Smrg else 7094249c3046Smrg # not using gcc 7095249c3046Smrg if test "$host_cpu" = ia64; then 7096249c3046Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7097249c3046Smrg # chokes on -Wl,-G. The following line is correct: 7098249c3046Smrg shared_flag='-G' 7099249c3046Smrg else 7100249c3046Smrg if test "$aix_use_runtimelinking" = yes; then 7101249c3046Smrg shared_flag='${wl}-G' 7102249c3046Smrg else 7103249c3046Smrg shared_flag='${wl}-bM:SRE' 7104249c3046Smrg fi 7105249c3046Smrg fi 7106249c3046Smrg fi 7107249c3046Smrg 7108249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7109249c3046Smrg # It seems that -bexpall does not export symbols beginning with 7110249c3046Smrg # underscore (_), so it is better to generate a list of symbols to export. 7111249c3046Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7112249c3046Smrg if test "$aix_use_runtimelinking" = yes; then 7113249c3046Smrg # Warning - without using the other runtime loading flags (-brtl), 7114249c3046Smrg # -berok will link without error, but may produce a broken library. 7115249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7116249c3046Smrg # Determine the default libpath from the value encoded in an 7117249c3046Smrg # empty executable. 7118249c3046Smrg _LT_SYS_MODULE_PATH_AIX 7119249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7120249c3046Smrg _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" 7121249c3046Smrg else 7122249c3046Smrg if test "$host_cpu" = ia64; then 7123249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7124249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7125249c3046Smrg _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" 7126249c3046Smrg else 7127249c3046Smrg # Determine the default libpath from the value encoded in an 7128249c3046Smrg # empty executable. 7129249c3046Smrg _LT_SYS_MODULE_PATH_AIX 7130249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7131249c3046Smrg # Warning - without using the other run time loading flags, 7132249c3046Smrg # -berok will link without error, but may produce a broken library. 7133249c3046Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7134249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7135249c3046Smrg if test "$with_gnu_ld" = yes; then 7136249c3046Smrg # We only use this code for GNU lds that support --whole-archive. 7137249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7138249c3046Smrg else 7139249c3046Smrg # Exported symbols can be pulled into shared objects from archives 7140249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7141249c3046Smrg fi 7142249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7143249c3046Smrg # This is similar to how AIX traditionally builds its shared libraries. 7144249c3046Smrg _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' 7145249c3046Smrg fi 7146249c3046Smrg fi 7147249c3046Smrg ;; 71482265a131Smrg 7149249c3046Smrg amigaos*) 7150249c3046Smrg case $host_cpu in 7151249c3046Smrg powerpc) 7152249c3046Smrg # see comment about AmigaOS4 .so support 7153249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7154249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 7155249c3046Smrg ;; 7156249c3046Smrg m68k) 7157249c3046Smrg _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)' 7158249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7159249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7160249c3046Smrg ;; 7161249c3046Smrg esac 7162249c3046Smrg ;; 71632265a131Smrg 7164249c3046Smrg bsdi[[45]]*) 7165249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7166249c3046Smrg ;; 71672265a131Smrg 7168249c3046Smrg cygwin* | mingw* | pw32* | cegcc*) 7169249c3046Smrg # When not using gcc, we currently assume that we are using 7170249c3046Smrg # Microsoft Visual C++. 7171249c3046Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 7172249c3046Smrg # no search path for DLLs. 7173249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7174249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7175249c3046Smrg # Tell ltmain to make .lib files, not .a files. 7176249c3046Smrg libext=lib 7177249c3046Smrg # Tell ltmain to make .dll files, not .so files. 7178249c3046Smrg shrext_cmds=".dll" 7179249c3046Smrg # FIXME: Setting linknames here is a bad hack. 7180249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 7181249c3046Smrg # The linker will automatically build a .lib file if we build a DLL. 7182249c3046Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7183249c3046Smrg # FIXME: Should let the user specify the lib program. 7184249c3046Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 7185249c3046Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7186249c3046Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7187249c3046Smrg ;; 71882265a131Smrg 7189249c3046Smrg darwin* | rhapsody*) 7190249c3046Smrg _LT_DARWIN_LINKER_FEATURES($1) 7191249c3046Smrg ;; 71922265a131Smrg 7193249c3046Smrg dgux*) 7194249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7195249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7196249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7197249c3046Smrg ;; 71982265a131Smrg 7199249c3046Smrg freebsd1*) 7200249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7201249c3046Smrg ;; 72022265a131Smrg 7203249c3046Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7204249c3046Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 7205249c3046Smrg # does not break anything, and helps significantly (at the cost of a little 7206249c3046Smrg # extra space). 7207249c3046Smrg freebsd2.2*) 7208249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7209249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7210249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7211249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7212249c3046Smrg ;; 72132265a131Smrg 7214249c3046Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7215249c3046Smrg freebsd2*) 7216249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7217249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7218249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7219249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7220249c3046Smrg ;; 72212265a131Smrg 7222249c3046Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7223249c3046Smrg freebsd* | dragonfly*) 7224249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7225249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7226249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7227249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7228249c3046Smrg ;; 72291477040fSmrg 7230249c3046Smrg hpux9*) 7231249c3046Smrg if test "$GCC" = yes; then 7232249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7233249c3046Smrg else 7234249c3046Smrg _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' 7235249c3046Smrg fi 7236249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7237249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7238249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 72391477040fSmrg 7240249c3046Smrg # hardcode_minus_L: Not really in the search PATH, 7241249c3046Smrg # but as the default location of the library. 7242249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7243249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7244249c3046Smrg ;; 72451477040fSmrg 7246249c3046Smrg hpux10*) 7247249c3046Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7248249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7249249c3046Smrg else 7250249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7251249c3046Smrg fi 7252249c3046Smrg if test "$with_gnu_ld" = no; then 7253249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7254249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7255249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7256249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7257249c3046Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7258249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7259249c3046Smrg # hardcode_minus_L: Not really in the search PATH, 7260249c3046Smrg # but as the default location of the library. 7261249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7262249c3046Smrg fi 7263249c3046Smrg ;; 72641477040fSmrg 7265249c3046Smrg hpux11*) 7266249c3046Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7267249c3046Smrg case $host_cpu in 7268249c3046Smrg hppa*64*) 7269249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7270249c3046Smrg ;; 7271249c3046Smrg ia64*) 7272249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7273249c3046Smrg ;; 7274249c3046Smrg *) 7275249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7276249c3046Smrg ;; 7277249c3046Smrg esac 7278249c3046Smrg else 7279249c3046Smrg case $host_cpu in 7280249c3046Smrg hppa*64*) 7281249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7282249c3046Smrg ;; 7283249c3046Smrg ia64*) 7284249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7285249c3046Smrg ;; 7286249c3046Smrg *) 7287249c3046Smrg m4_if($1, [], [ 7288249c3046Smrg # Older versions of the 11.00 compiler do not understand -b yet 7289249c3046Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 7290249c3046Smrg _LT_LINKER_OPTION([if $CC understands -b], 7291249c3046Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 7292249c3046Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 7293249c3046Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 7294249c3046Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 7295249c3046Smrg ;; 7296249c3046Smrg esac 7297249c3046Smrg fi 7298249c3046Smrg if test "$with_gnu_ld" = no; then 7299249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7300249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73012265a131Smrg 7302249c3046Smrg case $host_cpu in 7303249c3046Smrg hppa*64*|ia64*) 7304249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7305249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7306249c3046Smrg ;; 7307249c3046Smrg *) 7308249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7309249c3046Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7310249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73112265a131Smrg 7312249c3046Smrg # hardcode_minus_L: Not really in the search PATH, 7313249c3046Smrg # but as the default location of the library. 7314249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7315249c3046Smrg ;; 7316249c3046Smrg esac 7317249c3046Smrg fi 7318249c3046Smrg ;; 73191477040fSmrg 7320249c3046Smrg irix5* | irix6* | nonstopux*) 7321249c3046Smrg if test "$GCC" = yes; then 7322249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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' 7323249c3046Smrg # Try to use the -exported_symbol ld option, if it does not 7324249c3046Smrg # work, assume that -exports_file does not work either and 7325249c3046Smrg # implicitly export all symbols. 7326249c3046Smrg save_LDFLAGS="$LDFLAGS" 7327249c3046Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 7328249c3046Smrg AC_LINK_IFELSE(int foo(void) {}, 7329249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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' 7330249c3046Smrg ) 7331249c3046Smrg LDFLAGS="$save_LDFLAGS" 7332249c3046Smrg else 7333249c3046Smrg _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' 7334249c3046Smrg _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' 7335249c3046Smrg fi 7336249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7337249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7338249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7339249c3046Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 7340249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7341249c3046Smrg ;; 73422265a131Smrg 7343249c3046Smrg netbsd*) 7344249c3046Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7345249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7346249c3046Smrg else 7347249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7348249c3046Smrg fi 7349249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7350249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7351249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7352249c3046Smrg ;; 73532265a131Smrg 7354249c3046Smrg newsos6) 7355249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7356249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7357249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7358249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7359249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7360249c3046Smrg ;; 73612265a131Smrg 7362249c3046Smrg *nto* | *qnx*) 7363249c3046Smrg ;; 73642265a131Smrg 7365249c3046Smrg openbsd*) 7366249c3046Smrg if test -f /usr/libexec/ld.so; then 7367249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7368249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7369249c3046Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7370249c3046Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7371249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7372249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7373249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7374249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7375249c3046Smrg else 7376249c3046Smrg case $host_os in 7377249c3046Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7378249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7379249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7380249c3046Smrg ;; 7381249c3046Smrg *) 7382249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7383249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7384249c3046Smrg ;; 7385249c3046Smrg esac 7386249c3046Smrg fi 7387249c3046Smrg else 7388249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7389249c3046Smrg fi 7390249c3046Smrg ;; 73912265a131Smrg 7392249c3046Smrg os2*) 7393249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7394249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7395249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7396249c3046Smrg _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' 7397249c3046Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7398249c3046Smrg ;; 73992265a131Smrg 7400249c3046Smrg osf3*) 7401249c3046Smrg if test "$GCC" = yes; then 7402249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7403249c3046Smrg _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' 7404249c3046Smrg else 7405249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7406249c3046Smrg _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' 7407249c3046Smrg fi 7408249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7409249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7410249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7411249c3046Smrg ;; 74122265a131Smrg 7413249c3046Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 7414249c3046Smrg if test "$GCC" = yes; then 7415249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7416249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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' 7417249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7418249c3046Smrg else 7419249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7420249c3046Smrg _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' 7421249c3046Smrg _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~ 7422249c3046Smrg $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' 74232265a131Smrg 7424249c3046Smrg # Both c and cxx compiler support -rpath directly 7425249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7426249c3046Smrg fi 7427249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7428249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7429249c3046Smrg ;; 74302265a131Smrg 7431249c3046Smrg solaris*) 7432249c3046Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 7433249c3046Smrg if test "$GCC" = yes; then 7434249c3046Smrg wlarc='${wl}' 7435249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7436249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7437249c3046Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7438249c3046Smrg else 7439249c3046Smrg case `$CC -V 2>&1` in 7440249c3046Smrg *"Compilers 5.0"*) 7441249c3046Smrg wlarc='' 7442249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7443249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7444249c3046Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 7445249c3046Smrg ;; 7446249c3046Smrg *) 7447249c3046Smrg wlarc='${wl}' 7448249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 7449249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7450249c3046Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7451249c3046Smrg ;; 7452249c3046Smrg esac 7453249c3046Smrg fi 7454249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7455249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7456249c3046Smrg case $host_os in 7457249c3046Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7458249c3046Smrg *) 7459249c3046Smrg # The compiler driver will combine and reorder linker options, 7460249c3046Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 7461249c3046Smrg # but is careful enough not to reorder. 7462249c3046Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7463249c3046Smrg if test "$GCC" = yes; then 7464249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7465249c3046Smrg else 7466249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7467249c3046Smrg fi 7468249c3046Smrg ;; 7469249c3046Smrg esac 7470249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7471249c3046Smrg ;; 74722265a131Smrg 7473249c3046Smrg sunos4*) 7474249c3046Smrg if test "x$host_vendor" = xsequent; then 7475249c3046Smrg # Use $CC to link under sequent, because it throws in some extra .o 7476249c3046Smrg # files that make .init and .fini sections work. 7477249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7478249c3046Smrg else 7479249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7480249c3046Smrg fi 7481249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7482249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7483249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7484249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7485249c3046Smrg ;; 74862265a131Smrg 7487249c3046Smrg sysv4) 7488249c3046Smrg case $host_vendor in 7489249c3046Smrg sni) 7490249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7491249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7492249c3046Smrg ;; 7493249c3046Smrg siemens) 7494249c3046Smrg ## LD is ld it makes a PLAMLIB 7495249c3046Smrg ## CC just makes a GrossModule. 7496249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7497249c3046Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7498249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7499249c3046Smrg ;; 7500249c3046Smrg motorola) 7501249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7502249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7503249c3046Smrg ;; 7504249c3046Smrg esac 7505249c3046Smrg runpath_var='LD_RUN_PATH' 7506249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7507249c3046Smrg ;; 75082265a131Smrg 7509249c3046Smrg sysv4.3*) 7510249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7511249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7512249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 7513249c3046Smrg ;; 75141477040fSmrg 7515249c3046Smrg sysv4*MP*) 7516249c3046Smrg if test -d /usr/nec; then 7517249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7518249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7519249c3046Smrg runpath_var=LD_RUN_PATH 7520249c3046Smrg hardcode_runpath_var=yes 7521249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7522249c3046Smrg fi 7523249c3046Smrg ;; 75241477040fSmrg 7525249c3046Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7526249c3046Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7527249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7528249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7529249c3046Smrg runpath_var='LD_RUN_PATH' 75301477040fSmrg 7531249c3046Smrg if test "$GCC" = yes; then 7532249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7533249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7534249c3046Smrg else 7535249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7536249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7537249c3046Smrg fi 7538249c3046Smrg ;; 75391477040fSmrg 7540249c3046Smrg sysv5* | sco3.2v5* | sco5v6*) 7541249c3046Smrg # Note: We can NOT use -z defs as we might desire, because we do not 7542249c3046Smrg # link with -lc, and that would cause any symbols used from libc to 7543249c3046Smrg # always be unresolved, which means just about no library would 7544249c3046Smrg # ever link correctly. If we're not using GNU ld we use -z text 7545249c3046Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7546249c3046Smrg # as -z defs. 7547249c3046Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7548249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7549249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7550249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7551249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7552249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7553249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7554249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7555249c3046Smrg runpath_var='LD_RUN_PATH' 75561477040fSmrg 7557249c3046Smrg if test "$GCC" = yes; then 7558249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7559249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7560249c3046Smrg else 7561249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7562249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7563249c3046Smrg fi 7564249c3046Smrg ;; 75651477040fSmrg 7566249c3046Smrg uts4*) 7567249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7568249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7569249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7570249c3046Smrg ;; 75712265a131Smrg 7572249c3046Smrg *) 7573249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7574249c3046Smrg ;; 7575249c3046Smrg esac 75762265a131Smrg 7577249c3046Smrg if test x$host_vendor = xsni; then 7578249c3046Smrg case $host in 7579249c3046Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 7580249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 7581249c3046Smrg ;; 7582249c3046Smrg esac 7583249c3046Smrg fi 7584249c3046Smrg fi 7585249c3046Smrg]) 7586249c3046SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7587249c3046Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 75881477040fSmrg 7589249c3046Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 75902265a131Smrg 7591249c3046Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 7592249c3046Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 7593249c3046Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 7594249c3046Smrg [The commands to extract the exported symbol list from a shared archive]) 75952265a131Smrg 7596249c3046Smrg# 7597249c3046Smrg# Do we need to explicitly link libc? 7598249c3046Smrg# 7599249c3046Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 7600249c3046Smrgx|xyes) 7601249c3046Smrg # Assume -lc should be added 7602249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7603249c3046Smrg 7604249c3046Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 7605249c3046Smrg case $_LT_TAGVAR(archive_cmds, $1) in 7606249c3046Smrg *'~'*) 7607249c3046Smrg # FIXME: we may have to deal with multi-command sequences. 7608249c3046Smrg ;; 7609249c3046Smrg '$CC '*) 7610249c3046Smrg # Test whether the compiler implicitly links with -lc since on some 7611249c3046Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 7612249c3046Smrg # to ld, don't add -lc before -lgcc. 7613249c3046Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 7614249c3046Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 7615249c3046Smrg [$RM conftest* 7616249c3046Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 7617249c3046Smrg 7618249c3046Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 7619249c3046Smrg soname=conftest 7620249c3046Smrg lib=conftest 7621249c3046Smrg libobjs=conftest.$ac_objext 7622249c3046Smrg deplibs= 7623249c3046Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 7624249c3046Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 7625249c3046Smrg compiler_flags=-v 7626249c3046Smrg linker_flags=-v 7627249c3046Smrg verstring= 7628249c3046Smrg output_objdir=. 7629249c3046Smrg libname=conftest 7630249c3046Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 7631249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 7632249c3046Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 7633249c3046Smrg then 7634249c3046Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7635249c3046Smrg else 7636249c3046Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7637249c3046Smrg fi 7638249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7639249c3046Smrg else 7640249c3046Smrg cat conftest.err 1>&5 7641249c3046Smrg fi 7642249c3046Smrg $RM conftest* 7643249c3046Smrg ]) 7644249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 7645249c3046Smrg ;; 7646249c3046Smrg esac 7647249c3046Smrg fi 7648249c3046Smrg ;; 7649249c3046Smrgesac 7650249c3046Smrg 7651249c3046Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 7652249c3046Smrg [Whether or not to add -lc for building shared libraries]) 7653249c3046Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 7654249c3046Smrg [enable_shared_with_static_runtimes], [0], 7655249c3046Smrg [Whether or not to disallow shared libs when runtime libs are static]) 7656249c3046Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 7657249c3046Smrg [Compiler flag to allow reflexive dlopens]) 7658249c3046Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 7659249c3046Smrg [Compiler flag to generate shared objects directly from archives]) 7660249c3046Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 7661249c3046Smrg [Whether the compiler copes with passing no objects directly]) 7662249c3046Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 7663249c3046Smrg [Create an old-style archive from a shared archive]) 7664249c3046Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 7665249c3046Smrg [Create a temporary old-style archive to link instead of a shared archive]) 7666249c3046Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 7667249c3046Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 7668249c3046Smrg_LT_TAGDECL([], [module_cmds], [2], 7669249c3046Smrg [Commands used to build a loadable module if different from building 7670249c3046Smrg a shared archive.]) 7671249c3046Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 7672249c3046Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 7673249c3046Smrg [Whether we are building with GNU ld or not]) 7674249c3046Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 7675249c3046Smrg [Flag that allows shared libraries with undefined symbols to be built]) 7676249c3046Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 7677249c3046Smrg [Flag that enforces no undefined symbols]) 7678249c3046Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 7679249c3046Smrg [Flag to hardcode $libdir into a binary during linking. 7680249c3046Smrg This must work even if $libdir does not exist]) 7681249c3046Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 7682249c3046Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 7683249c3046Smrg during linking. This must work even if $libdir does not exist]]) 7684249c3046Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 7685249c3046Smrg [Whether we need a single "-rpath" flag with a separated argument]) 7686249c3046Smrg_LT_TAGDECL([], [hardcode_direct], [0], 7687249c3046Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7688249c3046Smrg DIR into the resulting binary]) 7689249c3046Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 7690249c3046Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7691249c3046Smrg DIR into the resulting binary and the resulting library dependency is 7692249c3046Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 7693249c3046Smrg library is relocated]) 7694249c3046Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 7695249c3046Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 7696249c3046Smrg into the resulting binary]) 7697249c3046Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 7698249c3046Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 7699249c3046Smrg into the resulting binary]) 7700249c3046Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 7701249c3046Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 7702249c3046Smrg into the library and all subsequent libraries and executables linked 7703249c3046Smrg against it]) 7704249c3046Smrg_LT_TAGDECL([], [inherit_rpath], [0], 7705249c3046Smrg [Set to yes if linker adds runtime paths of dependent libraries 7706249c3046Smrg to runtime path list]) 7707249c3046Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 7708249c3046Smrg [Whether libtool must link a program against all its dependency libraries]) 7709249c3046Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 7710249c3046Smrg [Fix the shell variable $srcfile for the compiler]) 7711249c3046Smrg_LT_TAGDECL([], [always_export_symbols], [0], 7712249c3046Smrg [Set to "yes" if exported symbols are required]) 7713249c3046Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 7714249c3046Smrg [The commands to list exported symbols]) 7715249c3046Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 7716249c3046Smrg [Symbols that should not be listed in the preloaded symbols]) 7717249c3046Smrg_LT_TAGDECL([], [include_expsyms], [1], 7718249c3046Smrg [Symbols that must always be exported]) 7719249c3046Smrg_LT_TAGDECL([], [prelink_cmds], [2], 7720249c3046Smrg [Commands necessary for linking programs (against libraries) with templates]) 7721249c3046Smrg_LT_TAGDECL([], [file_list_spec], [1], 7722249c3046Smrg [Specify filename containing input files]) 7723249c3046Smrgdnl FIXME: Not yet implemented 7724249c3046Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 7725249c3046Smrgdnl [Compiler flag to generate thread safe objects]) 7726249c3046Smrg])# _LT_LINKER_SHLIBS 77272265a131Smrg 77282265a131Smrg 7729249c3046Smrg# _LT_LANG_C_CONFIG([TAG]) 7730249c3046Smrg# ------------------------ 7731249c3046Smrg# Ensure that the configuration variables for a C compiler are suitably 7732249c3046Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 7733249c3046Smrg# the compiler configuration to `libtool'. 7734249c3046Smrgm4_defun([_LT_LANG_C_CONFIG], 7735249c3046Smrg[m4_require([_LT_DECL_EGREP])dnl 7736249c3046Smrglt_save_CC="$CC" 7737249c3046SmrgAC_LANG_PUSH(C) 77382265a131Smrg 7739249c3046Smrg# Source file extension for C test sources. 7740249c3046Smrgac_ext=c 77412265a131Smrg 7742249c3046Smrg# Object file extension for compiled C test sources. 7743249c3046Smrgobjext=o 7744249c3046Smrg_LT_TAGVAR(objext, $1)=$objext 77452265a131Smrg 7746249c3046Smrg# Code to be used in simple compile tests 7747249c3046Smrglt_simple_compile_test_code="int some_variable = 0;" 77482265a131Smrg 7749249c3046Smrg# Code to be used in simple link tests 7750249c3046Smrglt_simple_link_test_code='int main(){return(0);}' 77512265a131Smrg 7752249c3046Smrg_LT_TAG_COMPILER 7753249c3046Smrg# Save the default compiler, since it gets overwritten when the other 7754249c3046Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 7755249c3046Smrgcompiler_DEFAULT=$CC 77562265a131Smrg 7757249c3046Smrg# save warnings/boilerplate of simple test code 7758249c3046Smrg_LT_COMPILER_BOILERPLATE 7759249c3046Smrg_LT_LINKER_BOILERPLATE 77601477040fSmrg 7761249c3046Smrgif test -n "$compiler"; then 7762249c3046Smrg _LT_COMPILER_NO_RTTI($1) 7763249c3046Smrg _LT_COMPILER_PIC($1) 7764249c3046Smrg _LT_COMPILER_C_O($1) 7765249c3046Smrg _LT_COMPILER_FILE_LOCKS($1) 7766249c3046Smrg _LT_LINKER_SHLIBS($1) 7767249c3046Smrg _LT_SYS_DYNAMIC_LINKER($1) 7768249c3046Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7769249c3046Smrg LT_SYS_DLOPEN_SELF 7770249c3046Smrg _LT_CMD_STRIPLIB 77712265a131Smrg 7772249c3046Smrg # Report which library types will actually be built 7773249c3046Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7774249c3046Smrg AC_MSG_RESULT([$can_build_shared]) 77751477040fSmrg 7776249c3046Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7777249c3046Smrg test "$can_build_shared" = "no" && enable_shared=no 7778249c3046Smrg 7779249c3046Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7780249c3046Smrg # are all built from PIC. 7781249c3046Smrg case $host_os in 7782249c3046Smrg aix3*) 7783249c3046Smrg test "$enable_shared" = yes && enable_static=no 7784249c3046Smrg if test -n "$RANLIB"; then 7785249c3046Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7786249c3046Smrg postinstall_cmds='$RANLIB $lib' 7787249c3046Smrg fi 7788249c3046Smrg ;; 7789249c3046Smrg 7790249c3046Smrg aix[[4-9]]*) 7791249c3046Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7792249c3046Smrg test "$enable_shared" = yes && enable_static=no 7793249c3046Smrg fi 7794249c3046Smrg ;; 77951477040fSmrg esac 7796249c3046Smrg AC_MSG_RESULT([$enable_shared]) 77972265a131Smrg 7798249c3046Smrg AC_MSG_CHECKING([whether to build static libraries]) 7799249c3046Smrg # Make sure either enable_shared or enable_static is yes. 7800249c3046Smrg test "$enable_shared" = yes || enable_static=yes 7801249c3046Smrg AC_MSG_RESULT([$enable_static]) 78021477040fSmrg 7803249c3046Smrg _LT_CONFIG($1) 7804249c3046Smrgfi 7805249c3046SmrgAC_LANG_POP 7806249c3046SmrgCC="$lt_save_CC" 7807249c3046Smrg])# _LT_LANG_C_CONFIG 78081477040fSmrg 78091477040fSmrg 7810249c3046Smrg# _LT_LANG_CXX_CONFIG([TAG]) 7811249c3046Smrg# -------------------------- 7812249c3046Smrg# Ensure that the configuration variables for a C++ compiler are suitably 7813249c3046Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 7814249c3046Smrg# the compiler configuration to `libtool'. 7815249c3046Smrgm4_defun([_LT_LANG_CXX_CONFIG], 7816249c3046Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7817249c3046Smrgm4_require([_LT_DECL_EGREP])dnl 7818249c3046Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 7819249c3046Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 7820249c3046Smrg (test "X$CXX" != "Xg++"))) ; then 7821249c3046Smrg AC_PROG_CXXCPP 7822249c3046Smrgelse 7823249c3046Smrg _lt_caught_CXX_error=yes 7824249c3046Smrgfi 78251477040fSmrg 7826249c3046SmrgAC_LANG_PUSH(C++) 7827249c3046Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7828249c3046Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7829249c3046Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7830249c3046Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7831249c3046Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 7832249c3046Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7833249c3046Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7834249c3046Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7835249c3046Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7836249c3046Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7837249c3046Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7838249c3046Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7839249c3046Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7840249c3046Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7841249c3046Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7842249c3046Smrg_LT_TAGVAR(module_cmds, $1)= 7843249c3046Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7844249c3046Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7845249c3046Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7846249c3046Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7847249c3046Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7848249c3046Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7849249c3046Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7850249c3046Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78511477040fSmrg 7852249c3046Smrg# Source file extension for C++ test sources. 7853249c3046Smrgac_ext=cpp 78541477040fSmrg 7855249c3046Smrg# Object file extension for compiled C++ test sources. 7856249c3046Smrgobjext=o 7857249c3046Smrg_LT_TAGVAR(objext, $1)=$objext 78581477040fSmrg 7859249c3046Smrg# No sense in running all these tests if we already determined that 7860249c3046Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 7861249c3046Smrg# are currently assumed to apply to all compilers on this platform, 7862249c3046Smrg# and will be corrupted by setting them based on a non-working compiler. 7863249c3046Smrgif test "$_lt_caught_CXX_error" != yes; then 7864249c3046Smrg # Code to be used in simple compile tests 7865249c3046Smrg lt_simple_compile_test_code="int some_variable = 0;" 78661477040fSmrg 7867249c3046Smrg # Code to be used in simple link tests 7868249c3046Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 78691477040fSmrg 7870249c3046Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7871249c3046Smrg _LT_TAG_COMPILER 7872249c3046Smrg 7873249c3046Smrg # save warnings/boilerplate of simple test code 7874249c3046Smrg _LT_COMPILER_BOILERPLATE 7875249c3046Smrg _LT_LINKER_BOILERPLATE 78761477040fSmrg 7877249c3046Smrg # Allow CC to be a program name with arguments. 7878249c3046Smrg lt_save_CC=$CC 7879249c3046Smrg lt_save_LD=$LD 7880249c3046Smrg lt_save_GCC=$GCC 7881249c3046Smrg GCC=$GXX 7882249c3046Smrg lt_save_with_gnu_ld=$with_gnu_ld 7883249c3046Smrg lt_save_path_LD=$lt_cv_path_LD 7884249c3046Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 7885249c3046Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 7886249c3046Smrg else 7887249c3046Smrg $as_unset lt_cv_prog_gnu_ld 7888249c3046Smrg fi 7889249c3046Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 7890249c3046Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 7891249c3046Smrg else 7892249c3046Smrg $as_unset lt_cv_path_LD 7893249c3046Smrg fi 7894249c3046Smrg test -z "${LDCXX+set}" || LD=$LDCXX 7895249c3046Smrg CC=${CXX-"c++"} 7896249c3046Smrg compiler=$CC 7897249c3046Smrg _LT_TAGVAR(compiler, $1)=$CC 7898249c3046Smrg _LT_CC_BASENAME([$compiler]) 78992265a131Smrg 7900249c3046Smrg if test -n "$compiler"; then 7901249c3046Smrg # We don't want -fno-exception when compiling C++ code, so set the 7902249c3046Smrg # no_builtin_flag separately 7903249c3046Smrg if test "$GXX" = yes; then 7904249c3046Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7905249c3046Smrg else 7906249c3046Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7907249c3046Smrg fi 79081477040fSmrg 7909249c3046Smrg if test "$GXX" = yes; then 7910249c3046Smrg # Set up default GNU C++ configuration 79111477040fSmrg 7912249c3046Smrg LT_PATH_LD 79131477040fSmrg 7914249c3046Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 7915249c3046Smrg # archiving commands below assume that GNU ld is being used. 7916249c3046Smrg if test "$with_gnu_ld" = yes; then 7917249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7918249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 79191477040fSmrg 7920249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7921249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 79222265a131Smrg 7923249c3046Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 7924249c3046Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7925249c3046Smrg # investigate it a little bit more. (MM) 7926249c3046Smrg wlarc='${wl}' 79271477040fSmrg 7928249c3046Smrg # ancient GNU ld didn't support --whole-archive et. al. 7929249c3046Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7930249c3046Smrg $GREP 'no-whole-archive' > /dev/null; then 7931249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7932249c3046Smrg else 7933249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7934249c3046Smrg fi 7935249c3046Smrg else 7936249c3046Smrg with_gnu_ld=no 7937249c3046Smrg wlarc= 79382265a131Smrg 7939249c3046Smrg # A generic and very simple default shared library creation 7940249c3046Smrg # command for GNU C++ for the case where it uses the native 7941249c3046Smrg # linker, instead of GNU ld. If possible, this setting should 7942249c3046Smrg # overridden to take advantage of the native linker features on 7943249c3046Smrg # the platform it is being used on. 7944249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7945249c3046Smrg fi 7946444c061aSmrg 7947249c3046Smrg # Commands to make compiler produce verbose output that lists 7948249c3046Smrg # what "hidden" libraries, object files and flags are used when 7949249c3046Smrg # linking a shared library. 7950249c3046Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 79511477040fSmrg 7952249c3046Smrg else 7953249c3046Smrg GXX=no 7954249c3046Smrg with_gnu_ld=no 7955249c3046Smrg wlarc= 7956249c3046Smrg fi 79571477040fSmrg 7958249c3046Smrg # PORTME: fill in a description of your system's C++ link characteristics 7959249c3046Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7960249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7961249c3046Smrg case $host_os in 7962249c3046Smrg aix3*) 7963249c3046Smrg # FIXME: insert proper C++ library support 7964249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7965249c3046Smrg ;; 7966249c3046Smrg aix[[4-9]]*) 7967249c3046Smrg if test "$host_cpu" = ia64; then 7968249c3046Smrg # On IA64, the linker does run time linking by default, so we don't 7969249c3046Smrg # have to do anything special. 7970249c3046Smrg aix_use_runtimelinking=no 7971249c3046Smrg exp_sym_flag='-Bexport' 7972249c3046Smrg no_entry_flag="" 7973249c3046Smrg else 7974249c3046Smrg aix_use_runtimelinking=no 79751477040fSmrg 7976249c3046Smrg # Test if we are trying to use run time linking or normal 7977249c3046Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7978249c3046Smrg # need to do runtime linking. 7979249c3046Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7980249c3046Smrg for ld_flag in $LDFLAGS; do 7981249c3046Smrg case $ld_flag in 7982249c3046Smrg *-brtl*) 7983249c3046Smrg aix_use_runtimelinking=yes 7984249c3046Smrg break 7985249c3046Smrg ;; 7986249c3046Smrg esac 7987249c3046Smrg done 7988249c3046Smrg ;; 7989249c3046Smrg esac 79901477040fSmrg 7991249c3046Smrg exp_sym_flag='-bexport' 7992249c3046Smrg no_entry_flag='-bnoentry' 7993249c3046Smrg fi 79941477040fSmrg 7995249c3046Smrg # When large executables or shared objects are built, AIX ld can 7996249c3046Smrg # have problems creating the table of contents. If linking a library 7997249c3046Smrg # or program results in "error TOC overflow" add -mminimal-toc to 7998249c3046Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7999249c3046Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 80001477040fSmrg 8001249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='' 8002249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8003249c3046Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8004249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8005249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8006249c3046Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 80071477040fSmrg 8008249c3046Smrg if test "$GXX" = yes; then 8009249c3046Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8010249c3046Smrg # We only want to do this on AIX 4.2 and lower, the check 8011249c3046Smrg # below for broken collect2 doesn't work under 4.3+ 8012249c3046Smrg collect2name=`${CC} -print-prog-name=collect2` 8013249c3046Smrg if test -f "$collect2name" && 8014249c3046Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8015249c3046Smrg then 8016249c3046Smrg # We have reworked collect2 8017249c3046Smrg : 8018249c3046Smrg else 8019249c3046Smrg # We have old collect2 8020249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8021249c3046Smrg # It fails to find uninstalled libraries when the uninstalled 8022249c3046Smrg # path is not listed in the libpath. Setting hardcode_minus_L 8023249c3046Smrg # to unsupported forces relinking 8024249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8025249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8026249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8027249c3046Smrg fi 8028249c3046Smrg esac 8029249c3046Smrg shared_flag='-shared' 8030249c3046Smrg if test "$aix_use_runtimelinking" = yes; then 8031249c3046Smrg shared_flag="$shared_flag "'${wl}-G' 8032249c3046Smrg fi 8033249c3046Smrg else 8034249c3046Smrg # not using gcc 8035249c3046Smrg if test "$host_cpu" = ia64; then 8036249c3046Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8037249c3046Smrg # chokes on -Wl,-G. The following line is correct: 8038249c3046Smrg shared_flag='-G' 8039249c3046Smrg else 8040249c3046Smrg if test "$aix_use_runtimelinking" = yes; then 8041249c3046Smrg shared_flag='${wl}-G' 8042249c3046Smrg else 8043249c3046Smrg shared_flag='${wl}-bM:SRE' 8044249c3046Smrg fi 8045249c3046Smrg fi 8046249c3046Smrg fi 80471477040fSmrg 8048249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 8049249c3046Smrg # It seems that -bexpall does not export symbols beginning with 8050249c3046Smrg # underscore (_), so it is better to generate a list of symbols to 8051249c3046Smrg # export. 8052249c3046Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8053249c3046Smrg if test "$aix_use_runtimelinking" = yes; then 8054249c3046Smrg # Warning - without using the other runtime loading flags (-brtl), 8055249c3046Smrg # -berok will link without error, but may produce a broken library. 8056249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8057249c3046Smrg # Determine the default libpath from the value encoded in an empty 8058249c3046Smrg # executable. 8059249c3046Smrg _LT_SYS_MODULE_PATH_AIX 8060249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 80611477040fSmrg 8062249c3046Smrg _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" 8063249c3046Smrg else 8064249c3046Smrg if test "$host_cpu" = ia64; then 8065249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 8066249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8067249c3046Smrg _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" 8068249c3046Smrg else 8069249c3046Smrg # Determine the default libpath from the value encoded in an 8070249c3046Smrg # empty executable. 8071249c3046Smrg _LT_SYS_MODULE_PATH_AIX 8072249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8073249c3046Smrg # Warning - without using the other run time loading flags, 8074249c3046Smrg # -berok will link without error, but may produce a broken library. 8075249c3046Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 8076249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 8077249c3046Smrg if test "$with_gnu_ld" = yes; then 8078249c3046Smrg # We only use this code for GNU lds that support --whole-archive. 8079249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8080249c3046Smrg else 8081249c3046Smrg # Exported symbols can be pulled into shared objects from archives 8082249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8083249c3046Smrg fi 8084249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8085249c3046Smrg # This is similar to how AIX traditionally builds its shared 8086249c3046Smrg # libraries. 8087249c3046Smrg _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' 8088249c3046Smrg fi 8089249c3046Smrg fi 8090249c3046Smrg ;; 80911477040fSmrg 8092249c3046Smrg beos*) 8093249c3046Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8094249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8095249c3046Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8096249c3046Smrg # support --undefined. This deserves some investigation. FIXME 8097249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8098249c3046Smrg else 8099249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8100249c3046Smrg fi 8101249c3046Smrg ;; 81021477040fSmrg 8103249c3046Smrg chorus*) 8104249c3046Smrg case $cc_basename in 8105249c3046Smrg *) 8106249c3046Smrg # FIXME: insert proper C++ library support 8107249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8108249c3046Smrg ;; 8109249c3046Smrg esac 8110249c3046Smrg ;; 81111477040fSmrg 8112249c3046Smrg cygwin* | mingw* | pw32* | cegcc*) 8113249c3046Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8114249c3046Smrg # as there is no search path for DLLs. 8115249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8116249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 8117249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8118249c3046Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8119249c3046Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 81201477040fSmrg 8121249c3046Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8122249c3046Smrg _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' 8123249c3046Smrg # If the export-symbols file already is a .def file (1st line 8124249c3046Smrg # is EXPORTS), use it as is; otherwise, prepend... 8125249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 8126249c3046Smrg cp $export_symbols $output_objdir/$soname.def; 8127249c3046Smrg else 8128249c3046Smrg echo EXPORTS > $output_objdir/$soname.def; 8129249c3046Smrg cat $export_symbols >> $output_objdir/$soname.def; 8130249c3046Smrg fi~ 8131249c3046Smrg $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' 8132249c3046Smrg else 8133249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8134249c3046Smrg fi 8135249c3046Smrg ;; 8136249c3046Smrg darwin* | rhapsody*) 8137249c3046Smrg _LT_DARWIN_LINKER_FEATURES($1) 8138249c3046Smrg ;; 81391477040fSmrg 8140249c3046Smrg dgux*) 8141249c3046Smrg case $cc_basename in 8142249c3046Smrg ec++*) 8143249c3046Smrg # FIXME: insert proper C++ library support 8144249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8145249c3046Smrg ;; 8146249c3046Smrg ghcx*) 8147249c3046Smrg # Green Hills C++ Compiler 8148249c3046Smrg # FIXME: insert proper C++ library support 8149249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8150249c3046Smrg ;; 8151249c3046Smrg *) 8152249c3046Smrg # FIXME: insert proper C++ library support 8153249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8154249c3046Smrg ;; 8155249c3046Smrg esac 8156249c3046Smrg ;; 81571477040fSmrg 8158249c3046Smrg freebsd[[12]]*) 8159249c3046Smrg # C++ shared libraries reported to be fairly broken before 8160249c3046Smrg # switch to ELF 8161249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8162249c3046Smrg ;; 81631477040fSmrg 8164249c3046Smrg freebsd-elf*) 8165249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8166249c3046Smrg ;; 81671477040fSmrg 8168249c3046Smrg freebsd* | dragonfly*) 8169249c3046Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 8170249c3046Smrg # conventions 8171249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8172249c3046Smrg ;; 81731477040fSmrg 8174249c3046Smrg gnu*) 8175249c3046Smrg ;; 81761477040fSmrg 8177249c3046Smrg haiku*) 8178249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8179249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8180249c3046Smrg ;; 81811477040fSmrg 8182249c3046Smrg hpux9*) 8183249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8184249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8185249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8186249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8187249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8188249c3046Smrg # but as the default 8189249c3046Smrg # location of the library. 81901477040fSmrg 8191249c3046Smrg case $cc_basename in 8192249c3046Smrg CC*) 8193249c3046Smrg # FIXME: insert proper C++ library support 8194249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8195249c3046Smrg ;; 8196249c3046Smrg aCC*) 8197249c3046Smrg _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' 8198249c3046Smrg # Commands to make compiler produce verbose output that lists 8199249c3046Smrg # what "hidden" libraries, object files and flags are used when 8200249c3046Smrg # linking a shared library. 8201249c3046Smrg # 8202249c3046Smrg # There doesn't appear to be a way to prevent this compiler from 8203249c3046Smrg # explicitly linking system object files so we need to strip them 8204249c3046Smrg # from the output so that they don't get included in the library 8205249c3046Smrg # dependencies. 8206249c3046Smrg 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"' 8207249c3046Smrg ;; 8208249c3046Smrg *) 8209249c3046Smrg if test "$GXX" = yes; then 8210249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' 8211249c3046Smrg else 8212249c3046Smrg # FIXME: insert proper C++ library support 8213249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8214249c3046Smrg fi 8215249c3046Smrg ;; 8216249c3046Smrg esac 8217249c3046Smrg ;; 82181477040fSmrg 8219249c3046Smrg hpux10*|hpux11*) 8220249c3046Smrg if test $with_gnu_ld = no; then 8221249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8222249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 82231477040fSmrg 8224249c3046Smrg case $host_cpu in 8225249c3046Smrg hppa*64*|ia64*) 8226249c3046Smrg ;; 8227249c3046Smrg *) 8228249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8229249c3046Smrg ;; 8230249c3046Smrg esac 8231249c3046Smrg fi 8232249c3046Smrg case $host_cpu in 8233249c3046Smrg hppa*64*|ia64*) 8234249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8235249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8236249c3046Smrg ;; 8237249c3046Smrg *) 8238249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8239249c3046Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8240249c3046Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8241249c3046Smrg # but as the default 8242249c3046Smrg # location of the library. 8243249c3046Smrg ;; 8244249c3046Smrg esac 82451477040fSmrg 8246249c3046Smrg case $cc_basename in 8247249c3046Smrg CC*) 8248249c3046Smrg # FIXME: insert proper C++ library support 8249249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8250249c3046Smrg ;; 8251249c3046Smrg aCC*) 8252249c3046Smrg case $host_cpu in 8253249c3046Smrg hppa*64*) 8254249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8255249c3046Smrg ;; 8256249c3046Smrg ia64*) 8257249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8258249c3046Smrg ;; 8259249c3046Smrg *) 8260249c3046Smrg _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' 8261249c3046Smrg ;; 8262249c3046Smrg esac 8263249c3046Smrg # Commands to make compiler produce verbose output that lists 8264249c3046Smrg # what "hidden" libraries, object files and flags are used when 8265249c3046Smrg # linking a shared library. 8266249c3046Smrg # 8267249c3046Smrg # There doesn't appear to be a way to prevent this compiler from 8268249c3046Smrg # explicitly linking system object files so we need to strip them 8269249c3046Smrg # from the output so that they don't get included in the library 8270249c3046Smrg # dependencies. 8271249c3046Smrg 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"' 8272249c3046Smrg ;; 8273249c3046Smrg *) 8274249c3046Smrg if test "$GXX" = yes; then 8275249c3046Smrg if test $with_gnu_ld = no; then 8276249c3046Smrg case $host_cpu in 8277249c3046Smrg hppa*64*) 8278249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8279249c3046Smrg ;; 8280249c3046Smrg ia64*) 8281249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8282249c3046Smrg ;; 8283249c3046Smrg *) 8284249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8285249c3046Smrg ;; 8286249c3046Smrg esac 8287249c3046Smrg fi 8288249c3046Smrg else 8289249c3046Smrg # FIXME: insert proper C++ library support 8290249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8291249c3046Smrg fi 8292249c3046Smrg ;; 8293249c3046Smrg esac 8294249c3046Smrg ;; 82951477040fSmrg 8296249c3046Smrg interix[[3-9]]*) 8297249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8298249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8299249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8300249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8301249c3046Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8302249c3046Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8303249c3046Smrg # default) and relocated if they conflict, which is a slow very memory 8304249c3046Smrg # consuming and fragmenting process. To avoid this, we pick a random, 8305249c3046Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8306249c3046Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8307249c3046Smrg _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' 8308249c3046Smrg _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' 8309249c3046Smrg ;; 8310249c3046Smrg irix5* | irix6*) 8311249c3046Smrg case $cc_basename in 8312249c3046Smrg CC*) 8313249c3046Smrg # SGI C++ 8314249c3046Smrg _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' 83151477040fSmrg 8316249c3046Smrg # Archives containing C++ object files must be created using 8317249c3046Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 8318249c3046Smrg # necessary to make sure instantiated templates are included 8319249c3046Smrg # in the archive. 8320249c3046Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 8321249c3046Smrg ;; 8322249c3046Smrg *) 8323249c3046Smrg if test "$GXX" = yes; then 8324249c3046Smrg if test "$with_gnu_ld" = no; then 8325249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8326249c3046Smrg else 8327249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8328249c3046Smrg fi 8329249c3046Smrg fi 8330249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8331249c3046Smrg ;; 8332249c3046Smrg esac 8333249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8334249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8335249c3046Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 8336249c3046Smrg ;; 83371477040fSmrg 8338249c3046Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 8339249c3046Smrg case $cc_basename in 8340249c3046Smrg KCC*) 8341249c3046Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 83421477040fSmrg 8343249c3046Smrg # KCC will only create a shared library if the output file 8344249c3046Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8345249c3046Smrg # to its proper name (with version) after linking. 8346249c3046Smrg _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' 8347249c3046Smrg _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' 8348249c3046Smrg # Commands to make compiler produce verbose output that lists 8349249c3046Smrg # what "hidden" libraries, object files and flags are used when 8350249c3046Smrg # linking a shared library. 8351249c3046Smrg # 8352249c3046Smrg # There doesn't appear to be a way to prevent this compiler from 8353249c3046Smrg # explicitly linking system object files so we need to strip them 8354249c3046Smrg # from the output so that they don't get included in the library 8355249c3046Smrg # dependencies. 8356249c3046Smrg 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"' 83571477040fSmrg 8358249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8359249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 83601477040fSmrg 8361249c3046Smrg # Archives containing C++ object files must be created using 8362249c3046Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8363249c3046Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8364249c3046Smrg ;; 8365249c3046Smrg icpc* | ecpc* ) 8366249c3046Smrg # Intel C++ 8367249c3046Smrg with_gnu_ld=yes 8368249c3046Smrg # version 8.0 and above of icpc choke on multiply defined symbols 8369249c3046Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 8370249c3046Smrg # earlier do not add the objects themselves. 8371249c3046Smrg case `$CC -V 2>&1` in 8372249c3046Smrg *"Version 7."*) 8373249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8374249c3046Smrg _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' 8375249c3046Smrg ;; 8376249c3046Smrg *) # Version 8.0 or newer 8377249c3046Smrg tmp_idyn= 8378249c3046Smrg case $host_cpu in 8379249c3046Smrg ia64*) tmp_idyn=' -i_dynamic';; 8380249c3046Smrg esac 8381249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8382249c3046Smrg _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' 8383249c3046Smrg ;; 8384249c3046Smrg esac 8385249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8386249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8387249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8388249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8389249c3046Smrg ;; 8390249c3046Smrg pgCC* | pgcpp*) 8391249c3046Smrg # Portland Group C++ compiler 8392249c3046Smrg case `$CC -V` in 8393249c3046Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 8394249c3046Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 8395249c3046Smrg rm -rf $tpldir~ 8396249c3046Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 8397249c3046Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 8398249c3046Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 8399249c3046Smrg rm -rf $tpldir~ 8400249c3046Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 8401249c3046Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 8402249c3046Smrg $RANLIB $oldlib' 8403249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 8404249c3046Smrg rm -rf $tpldir~ 8405249c3046Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8406249c3046Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8407249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 8408249c3046Smrg rm -rf $tpldir~ 8409249c3046Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8410249c3046Smrg $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' 8411249c3046Smrg ;; 8412249c3046Smrg *) # Version 6 and above use weak symbols 8413249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8414249c3046Smrg _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' 8415249c3046Smrg ;; 8416249c3046Smrg esac 84171477040fSmrg 8418249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 8419249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8420249c3046Smrg _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' 8421249c3046Smrg ;; 8422249c3046Smrg cxx*) 8423249c3046Smrg # Compaq C++ 8424249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8425249c3046Smrg _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' 84261477040fSmrg 8427249c3046Smrg runpath_var=LD_RUN_PATH 8428249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8429249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 84301477040fSmrg 8431249c3046Smrg # Commands to make compiler produce verbose output that lists 8432249c3046Smrg # what "hidden" libraries, object files and flags are used when 8433249c3046Smrg # linking a shared library. 8434249c3046Smrg # 8435249c3046Smrg # There doesn't appear to be a way to prevent this compiler from 8436249c3046Smrg # explicitly linking system object files so we need to strip them 8437249c3046Smrg # from the output so that they don't get included in the library 8438249c3046Smrg # dependencies. 8439249c3046Smrg 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' 8440249c3046Smrg ;; 8441249c3046Smrg xl* | mpixl* | bgxl*) 8442249c3046Smrg # IBM XL 8.0 on PPC, with GNU ld 8443249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8444249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8445249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8446249c3046Smrg if test "x$supports_anon_versioning" = xyes; then 8447249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8448249c3046Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8449249c3046Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8450249c3046Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 8451249c3046Smrg fi 8452249c3046Smrg ;; 8453249c3046Smrg *) 8454249c3046Smrg case `$CC -V 2>&1 | sed 5q` in 8455249c3046Smrg *Sun\ C*) 8456249c3046Smrg # Sun C++ 5.9 8457249c3046Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8458249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8459249c3046Smrg _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' 8460249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8461249c3046Smrg _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' 8462249c3046Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 84631477040fSmrg 8464249c3046Smrg # Not sure whether something based on 8465249c3046Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 8466249c3046Smrg # would be better. 8467249c3046Smrg output_verbose_link_cmd='func_echo_all' 84681477040fSmrg 8469249c3046Smrg # Archives containing C++ object files must be created using 8470249c3046Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8471249c3046Smrg # necessary to make sure instantiated templates are included 8472249c3046Smrg # in the archive. 8473249c3046Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8474249c3046Smrg ;; 8475249c3046Smrg esac 8476249c3046Smrg ;; 8477249c3046Smrg esac 8478249c3046Smrg ;; 84791477040fSmrg 8480249c3046Smrg lynxos*) 8481249c3046Smrg # FIXME: insert proper C++ library support 8482249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8483249c3046Smrg ;; 84841477040fSmrg 8485249c3046Smrg m88k*) 8486249c3046Smrg # FIXME: insert proper C++ library support 8487249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8488249c3046Smrg ;; 84891477040fSmrg 8490249c3046Smrg mvs*) 8491249c3046Smrg case $cc_basename in 8492249c3046Smrg cxx*) 8493249c3046Smrg # FIXME: insert proper C++ library support 8494249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8495249c3046Smrg ;; 8496249c3046Smrg *) 8497249c3046Smrg # FIXME: insert proper C++ library support 8498249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8499249c3046Smrg ;; 8500249c3046Smrg esac 8501249c3046Smrg ;; 85021477040fSmrg 8503249c3046Smrg netbsd*) 8504249c3046Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8505249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 8506249c3046Smrg wlarc= 8507249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8508249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8509249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8510249c3046Smrg fi 8511249c3046Smrg # Workaround some broken pre-1.5 toolchains 8512249c3046Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 8513249c3046Smrg ;; 85141477040fSmrg 8515249c3046Smrg *nto* | *qnx*) 8516249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8517249c3046Smrg ;; 85181477040fSmrg 8519249c3046Smrg openbsd2*) 8520249c3046Smrg # C++ shared libraries are fairly broken 8521249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8522249c3046Smrg ;; 85231477040fSmrg 8524249c3046Smrg openbsd*) 8525249c3046Smrg if test -f /usr/libexec/ld.so; then 8526249c3046Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8527249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8528249c3046Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8529249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8530249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8531249c3046Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 8532249c3046Smrg _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' 8533249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8534249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8535249c3046Smrg fi 8536249c3046Smrg output_verbose_link_cmd=func_echo_all 8537249c3046Smrg else 8538249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 85391477040fSmrg fi 8540249c3046Smrg ;; 85411477040fSmrg 8542249c3046Smrg osf3* | osf4* | osf5*) 8543249c3046Smrg case $cc_basename in 8544249c3046Smrg KCC*) 8545249c3046Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 85461477040fSmrg 8547249c3046Smrg # KCC will only create a shared library if the output file 8548249c3046Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8549249c3046Smrg # to its proper name (with version) after linking. 8550249c3046Smrg _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' 85511477040fSmrg 8552249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8553249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 85541477040fSmrg 8555249c3046Smrg # Archives containing C++ object files must be created using 8556249c3046Smrg # the KAI C++ compiler. 8557249c3046Smrg case $host in 8558249c3046Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 8559249c3046Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 8560249c3046Smrg esac 8561249c3046Smrg ;; 8562249c3046Smrg RCC*) 8563249c3046Smrg # Rational C++ 2.4.1 8564249c3046Smrg # FIXME: insert proper C++ library support 8565249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8566249c3046Smrg ;; 8567249c3046Smrg cxx*) 8568249c3046Smrg case $host in 8569249c3046Smrg osf3*) 8570249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8571249c3046Smrg _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' 8572249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8573249c3046Smrg ;; 8574249c3046Smrg *) 8575249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8576249c3046Smrg _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' 8577249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 8578249c3046Smrg echo "-hidden">> $lib.exp~ 8579249c3046Smrg $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~ 8580249c3046Smrg $RM $lib.exp' 8581249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8582249c3046Smrg ;; 8583249c3046Smrg esac 85841477040fSmrg 8585249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8586249c3046Smrg 8587249c3046Smrg # Commands to make compiler produce verbose output that lists 8588249c3046Smrg # what "hidden" libraries, object files and flags are used when 8589249c3046Smrg # linking a shared library. 8590249c3046Smrg # 8591249c3046Smrg # There doesn't appear to be a way to prevent this compiler from 8592249c3046Smrg # explicitly linking system object files so we need to strip them 8593249c3046Smrg # from the output so that they don't get included in the library 8594249c3046Smrg # dependencies. 8595249c3046Smrg 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"' 8596249c3046Smrg ;; 8597249c3046Smrg *) 8598249c3046Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8599249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8600249c3046Smrg case $host in 8601249c3046Smrg osf3*) 8602249c3046Smrg _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' 8603249c3046Smrg ;; 8604249c3046Smrg *) 8605249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8606249c3046Smrg ;; 8607249c3046Smrg esac 86081477040fSmrg 8609249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8610249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 86111477040fSmrg 8612249c3046Smrg # Commands to make compiler produce verbose output that lists 8613249c3046Smrg # what "hidden" libraries, object files and flags are used when 8614249c3046Smrg # linking a shared library. 8615249c3046Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 86161477040fSmrg 8617249c3046Smrg else 8618249c3046Smrg # FIXME: insert proper C++ library support 8619249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8620249c3046Smrg fi 8621249c3046Smrg ;; 8622249c3046Smrg esac 8623249c3046Smrg ;; 86241477040fSmrg 8625249c3046Smrg psos*) 8626249c3046Smrg # FIXME: insert proper C++ library support 8627249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8628249c3046Smrg ;; 86291477040fSmrg 8630249c3046Smrg sunos4*) 8631249c3046Smrg case $cc_basename in 8632249c3046Smrg CC*) 8633249c3046Smrg # Sun C++ 4.x 8634249c3046Smrg # FIXME: insert proper C++ library support 8635249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8636249c3046Smrg ;; 8637249c3046Smrg lcc*) 8638249c3046Smrg # Lucid 8639249c3046Smrg # FIXME: insert proper C++ library support 8640249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8641249c3046Smrg ;; 8642249c3046Smrg *) 8643249c3046Smrg # FIXME: insert proper C++ library support 8644249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8645249c3046Smrg ;; 8646249c3046Smrg esac 8647249c3046Smrg ;; 86481477040fSmrg 8649249c3046Smrg solaris*) 8650249c3046Smrg case $cc_basename in 8651249c3046Smrg CC* | sunCC*) 8652249c3046Smrg # Sun C++ 4.2, 5.x and Centerline C++ 8653249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 8654249c3046Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8655249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8656249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8657249c3046Smrg $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' 86581477040fSmrg 8659249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8660249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8661249c3046Smrg case $host_os in 8662249c3046Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8663249c3046Smrg *) 8664249c3046Smrg # The compiler driver will combine and reorder linker options, 8665249c3046Smrg # but understands `-z linker_flag'. 8666249c3046Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 8667249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 8668249c3046Smrg ;; 8669249c3046Smrg esac 8670249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 86711477040fSmrg 8672249c3046Smrg output_verbose_link_cmd='func_echo_all' 86731477040fSmrg 8674249c3046Smrg # Archives containing C++ object files must be created using 8675249c3046Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8676249c3046Smrg # necessary to make sure instantiated templates are included 8677249c3046Smrg # in the archive. 8678249c3046Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8679249c3046Smrg ;; 8680249c3046Smrg gcx*) 8681249c3046Smrg # Green Hills C++ Compiler 8682249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 86831477040fSmrg 8684249c3046Smrg # The C++ compiler must be used to create the archive. 8685249c3046Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 8686249c3046Smrg ;; 8687249c3046Smrg *) 8688249c3046Smrg # GNU C++ compiler with Solaris linker 8689249c3046Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8690249c3046Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 8691249c3046Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 8692249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8693249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8694249c3046Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 86951477040fSmrg 8696249c3046Smrg # Commands to make compiler produce verbose output that lists 8697249c3046Smrg # what "hidden" libraries, object files and flags are used when 8698249c3046Smrg # linking a shared library. 8699249c3046Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8700249c3046Smrg else 8701249c3046Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 8702249c3046Smrg # platform. 8703249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8704249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8705249c3046Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 87061477040fSmrg 8707249c3046Smrg # Commands to make compiler produce verbose output that lists 8708249c3046Smrg # what "hidden" libraries, object files and flags are used when 8709249c3046Smrg # linking a shared library. 8710249c3046Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8711249c3046Smrg fi 87121477040fSmrg 8713249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 8714249c3046Smrg case $host_os in 8715249c3046Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8716249c3046Smrg *) 8717249c3046Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 8718249c3046Smrg ;; 8719249c3046Smrg esac 8720249c3046Smrg fi 8721249c3046Smrg ;; 8722249c3046Smrg esac 8723249c3046Smrg ;; 87241477040fSmrg 8725249c3046Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 8726249c3046Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8727249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8728249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8729249c3046Smrg runpath_var='LD_RUN_PATH' 87301477040fSmrg 8731249c3046Smrg case $cc_basename in 8732249c3046Smrg CC*) 8733249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8734249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8735249c3046Smrg ;; 8736249c3046Smrg *) 8737249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8738249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8739249c3046Smrg ;; 8740249c3046Smrg esac 8741249c3046Smrg ;; 87421477040fSmrg 8743249c3046Smrg sysv5* | sco3.2v5* | sco5v6*) 8744249c3046Smrg # Note: We can NOT use -z defs as we might desire, because we do not 8745249c3046Smrg # link with -lc, and that would cause any symbols used from libc to 8746249c3046Smrg # always be unresolved, which means just about no library would 8747249c3046Smrg # ever link correctly. If we're not using GNU ld we use -z text 8748249c3046Smrg # though, which does catch some bad symbols but isn't as heavy-handed 8749249c3046Smrg # as -z defs. 8750249c3046Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8751249c3046Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8752249c3046Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8753249c3046Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8754249c3046Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 8755249c3046Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8756249c3046Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8757249c3046Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8758249c3046Smrg runpath_var='LD_RUN_PATH' 87591477040fSmrg 8760249c3046Smrg case $cc_basename in 8761249c3046Smrg CC*) 8762249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8763249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8764249c3046Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 8765249c3046Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 8766249c3046Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 8767249c3046Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 8768249c3046Smrg ;; 8769249c3046Smrg *) 8770249c3046Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8771249c3046Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8772249c3046Smrg ;; 8773249c3046Smrg esac 8774249c3046Smrg ;; 87751477040fSmrg 8776249c3046Smrg tandem*) 8777249c3046Smrg case $cc_basename in 8778249c3046Smrg NCC*) 8779249c3046Smrg # NonStop-UX NCC 3.20 8780249c3046Smrg # FIXME: insert proper C++ library support 8781249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8782249c3046Smrg ;; 8783249c3046Smrg *) 8784249c3046Smrg # FIXME: insert proper C++ library support 8785249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8786249c3046Smrg ;; 8787249c3046Smrg esac 8788249c3046Smrg ;; 87891477040fSmrg 8790249c3046Smrg vxworks*) 8791249c3046Smrg # FIXME: insert proper C++ library support 8792249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8793249c3046Smrg ;; 87941477040fSmrg 8795249c3046Smrg *) 8796249c3046Smrg # FIXME: insert proper C++ library support 8797249c3046Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8798249c3046Smrg ;; 8799249c3046Smrg esac 88001477040fSmrg 8801249c3046Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8802249c3046Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 88031477040fSmrg 8804249c3046Smrg _LT_TAGVAR(GCC, $1)="$GXX" 8805249c3046Smrg _LT_TAGVAR(LD, $1)="$LD" 88061477040fSmrg 8807249c3046Smrg ## CAVEAT EMPTOR: 8808249c3046Smrg ## There is no encapsulation within the following macros, do not change 8809249c3046Smrg ## the running order or otherwise move them around unless you know exactly 8810249c3046Smrg ## what you are doing... 8811249c3046Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 8812249c3046Smrg _LT_COMPILER_PIC($1) 8813249c3046Smrg _LT_COMPILER_C_O($1) 8814249c3046Smrg _LT_COMPILER_FILE_LOCKS($1) 8815249c3046Smrg _LT_LINKER_SHLIBS($1) 8816249c3046Smrg _LT_SYS_DYNAMIC_LINKER($1) 8817249c3046Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 88181477040fSmrg 8819249c3046Smrg _LT_CONFIG($1) 8820249c3046Smrg fi # test -n "$compiler" 88211477040fSmrg 8822249c3046Smrg CC=$lt_save_CC 8823249c3046Smrg LDCXX=$LD 8824249c3046Smrg LD=$lt_save_LD 8825249c3046Smrg GCC=$lt_save_GCC 8826249c3046Smrg with_gnu_ld=$lt_save_with_gnu_ld 8827249c3046Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 8828249c3046Smrg lt_cv_path_LD=$lt_save_path_LD 8829249c3046Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8830249c3046Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8831249c3046Smrgfi # test "$_lt_caught_CXX_error" != yes 88321477040fSmrg 8833249c3046SmrgAC_LANG_POP 8834249c3046Smrg])# _LT_LANG_CXX_CONFIG 88351477040fSmrg 88361477040fSmrg 8837249c3046Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8838249c3046Smrg# --------------------------------- 8839249c3046Smrg# Figure out "hidden" library dependencies from verbose 8840249c3046Smrg# compiler output when linking a shared library. 8841249c3046Smrg# Parse the compiler output and extract the necessary 8842249c3046Smrg# objects, libraries and library flags. 8843249c3046Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8844249c3046Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8845249c3046Smrg# Dependencies to place before and after the object being linked: 8846249c3046Smrg_LT_TAGVAR(predep_objects, $1)= 8847249c3046Smrg_LT_TAGVAR(postdep_objects, $1)= 8848249c3046Smrg_LT_TAGVAR(predeps, $1)= 8849249c3046Smrg_LT_TAGVAR(postdeps, $1)= 8850249c3046Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 8851249c3046Smrg 8852249c3046Smrgdnl we can't use the lt_simple_compile_test_code here, 8853249c3046Smrgdnl because it contains code intended for an executable, 8854249c3046Smrgdnl not a library. It's possible we should let each 8855249c3046Smrgdnl tag define a new lt_????_link_test_code variable, 8856249c3046Smrgdnl but it's only used here... 8857249c3046Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8858249c3046Smrgint a; 8859249c3046Smrgvoid foo (void) { a = 0; } 8860249c3046Smrg_LT_EOF 8861249c3046Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8862249c3046Smrgclass Foo 8863249c3046Smrg{ 8864249c3046Smrgpublic: 8865249c3046Smrg Foo (void) { a = 0; } 8866249c3046Smrgprivate: 8867249c3046Smrg int a; 8868249c3046Smrg}; 8869249c3046Smrg_LT_EOF 8870249c3046Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8871249c3046Smrg subroutine foo 8872249c3046Smrg implicit none 8873249c3046Smrg integer*4 a 8874249c3046Smrg a=0 8875249c3046Smrg return 8876249c3046Smrg end 8877249c3046Smrg_LT_EOF 8878249c3046Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8879249c3046Smrg subroutine foo 8880249c3046Smrg implicit none 8881249c3046Smrg integer a 8882249c3046Smrg a=0 8883249c3046Smrg return 8884249c3046Smrg end 8885249c3046Smrg_LT_EOF 8886249c3046Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8887249c3046Smrgpublic class foo { 8888249c3046Smrg private int a; 8889249c3046Smrg public void bar (void) { 8890249c3046Smrg a = 0; 8891249c3046Smrg } 8892249c3046Smrg}; 8893249c3046Smrg_LT_EOF 8894249c3046Smrg]) 8895249c3046Smrgdnl Parse the compiler output and extract the necessary 8896249c3046Smrgdnl objects, libraries and library flags. 8897249c3046Smrgif AC_TRY_EVAL(ac_compile); then 8898249c3046Smrg # Parse the compiler output and extract the necessary 8899249c3046Smrg # objects, libraries and library flags. 89001477040fSmrg 8901249c3046Smrg # Sentinel used to keep track of whether or not we are before 8902249c3046Smrg # the conftest object file. 8903249c3046Smrg pre_test_object_deps_done=no 89041477040fSmrg 8905249c3046Smrg for p in `eval "$output_verbose_link_cmd"`; do 8906249c3046Smrg case $p in 89071477040fSmrg 8908249c3046Smrg -L* | -R* | -l*) 8909249c3046Smrg # Some compilers place space between "-{L,R}" and the path. 8910249c3046Smrg # Remove the space. 8911249c3046Smrg if test $p = "-L" || 8912249c3046Smrg test $p = "-R"; then 8913249c3046Smrg prev=$p 8914249c3046Smrg continue 8915249c3046Smrg else 8916249c3046Smrg prev= 8917249c3046Smrg fi 89181477040fSmrg 8919249c3046Smrg if test "$pre_test_object_deps_done" = no; then 8920249c3046Smrg case $p in 8921249c3046Smrg -L* | -R*) 8922249c3046Smrg # Internal compiler library paths should come after those 8923249c3046Smrg # provided the user. The postdeps already come after the 8924249c3046Smrg # user supplied libs so there is no need to process them. 8925249c3046Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8926249c3046Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8927249c3046Smrg else 8928249c3046Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8929249c3046Smrg fi 8930249c3046Smrg ;; 8931249c3046Smrg # The "-l" case would never come before the object being 8932249c3046Smrg # linked, so don't bother handling this case. 8933249c3046Smrg esac 8934249c3046Smrg else 8935249c3046Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8936249c3046Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8937249c3046Smrg else 8938249c3046Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8939249c3046Smrg fi 8940249c3046Smrg fi 8941249c3046Smrg ;; 89421477040fSmrg 8943249c3046Smrg *.$objext) 8944249c3046Smrg # This assumes that the test object file only shows up 8945249c3046Smrg # once in the compiler output. 8946249c3046Smrg if test "$p" = "conftest.$objext"; then 8947249c3046Smrg pre_test_object_deps_done=yes 8948249c3046Smrg continue 8949249c3046Smrg fi 89501477040fSmrg 8951249c3046Smrg if test "$pre_test_object_deps_done" = no; then 8952249c3046Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8953249c3046Smrg _LT_TAGVAR(predep_objects, $1)="$p" 8954249c3046Smrg else 8955249c3046Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8956249c3046Smrg fi 8957249c3046Smrg else 8958249c3046Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8959249c3046Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 8960249c3046Smrg else 8961249c3046Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8962249c3046Smrg fi 8963249c3046Smrg fi 8964249c3046Smrg ;; 89651477040fSmrg 8966249c3046Smrg *) ;; # Ignore the rest. 89671477040fSmrg 8968249c3046Smrg esac 8969249c3046Smrg done 89701477040fSmrg 8971249c3046Smrg # Clean up. 8972249c3046Smrg rm -f a.out a.exe 8973249c3046Smrgelse 8974249c3046Smrg echo "libtool.m4: error: problem compiling $1 test program" 8975249c3046Smrgfi 89761477040fSmrg 8977249c3046Smrg$RM -f confest.$objext 89781477040fSmrg 8979249c3046Smrg# PORTME: override above test on systems where it is broken 8980249c3046Smrgm4_if([$1], [CXX], 8981249c3046Smrg[case $host_os in 8982249c3046Smrginterix[[3-9]]*) 8983249c3046Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 8984249c3046Smrg # hack all around it, let's just trust "g++" to DTRT. 8985249c3046Smrg _LT_TAGVAR(predep_objects,$1)= 8986249c3046Smrg _LT_TAGVAR(postdep_objects,$1)= 8987249c3046Smrg _LT_TAGVAR(postdeps,$1)= 8988249c3046Smrg ;; 89891477040fSmrg 8990249c3046Smrglinux*) 8991249c3046Smrg case `$CC -V 2>&1 | sed 5q` in 8992249c3046Smrg *Sun\ C*) 8993249c3046Smrg # Sun C++ 5.9 89941477040fSmrg 8995249c3046Smrg # The more standards-conforming stlport4 library is 8996249c3046Smrg # incompatible with the Cstd library. Avoid specifying 8997249c3046Smrg # it if it's in CXXFLAGS. Ignore libCrun as 8998249c3046Smrg # -library=stlport4 depends on it. 8999249c3046Smrg case " $CXX $CXXFLAGS " in 9000249c3046Smrg *" -library=stlport4 "*) 9001249c3046Smrg solaris_use_stlport4=yes 9002249c3046Smrg ;; 9003249c3046Smrg esac 90041477040fSmrg 9005249c3046Smrg if test "$solaris_use_stlport4" != yes; then 9006249c3046Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9007249c3046Smrg fi 9008249c3046Smrg ;; 9009249c3046Smrg esac 9010249c3046Smrg ;; 90111477040fSmrg 9012249c3046Smrgsolaris*) 9013249c3046Smrg case $cc_basename in 9014249c3046Smrg CC* | sunCC*) 9015249c3046Smrg # The more standards-conforming stlport4 library is 9016249c3046Smrg # incompatible with the Cstd library. Avoid specifying 9017249c3046Smrg # it if it's in CXXFLAGS. Ignore libCrun as 9018249c3046Smrg # -library=stlport4 depends on it. 9019249c3046Smrg case " $CXX $CXXFLAGS " in 9020249c3046Smrg *" -library=stlport4 "*) 9021249c3046Smrg solaris_use_stlport4=yes 9022249c3046Smrg ;; 9023249c3046Smrg esac 90241477040fSmrg 9025249c3046Smrg # Adding this requires a known-good setup of shared libraries for 9026249c3046Smrg # Sun compiler versions before 5.6, else PIC objects from an old 9027249c3046Smrg # archive will be linked into the output, leading to subtle bugs. 9028249c3046Smrg if test "$solaris_use_stlport4" != yes; then 9029249c3046Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9030249c3046Smrg fi 9031249c3046Smrg ;; 9032249c3046Smrg esac 9033249c3046Smrg ;; 9034249c3046Smrgesac 9035249c3046Smrg]) 90361477040fSmrg 9037249c3046Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 9038249c3046Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 9039249c3046Smrgesac 9040249c3046Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 9041249c3046Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 9042249c3046Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 9043249c3046Smrgfi 9044249c3046Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 9045249c3046Smrg [The directories searched by this compiler when creating a shared library]) 9046249c3046Smrg_LT_TAGDECL([], [predep_objects], [1], 9047249c3046Smrg [Dependencies to place before and after the objects being linked to 9048249c3046Smrg create a shared library]) 9049249c3046Smrg_LT_TAGDECL([], [postdep_objects], [1]) 9050249c3046Smrg_LT_TAGDECL([], [predeps], [1]) 9051249c3046Smrg_LT_TAGDECL([], [postdeps], [1]) 9052249c3046Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 9053249c3046Smrg [The library search path used internally by the compiler when linking 9054249c3046Smrg a shared library]) 9055249c3046Smrg])# _LT_SYS_HIDDEN_LIBDEPS 90561477040fSmrg 9057249c3046Smrg 9058249c3046Smrg# _LT_LANG_F77_CONFIG([TAG]) 9059249c3046Smrg# -------------------------- 9060249c3046Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 9061249c3046Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9062249c3046Smrg# to write the compiler configuration to `libtool'. 9063249c3046Smrgm4_defun([_LT_LANG_F77_CONFIG], 9064249c3046Smrg[AC_LANG_PUSH(Fortran 77) 9065249c3046Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 9066249c3046Smrg _lt_disable_F77=yes 90671477040fSmrgfi 90681477040fSmrg 9069249c3046Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9070249c3046Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9071249c3046Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9072249c3046Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9073249c3046Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9074249c3046Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9075249c3046Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9076249c3046Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9077249c3046Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9078249c3046Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9079249c3046Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9080249c3046Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9081249c3046Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9082249c3046Smrg_LT_TAGVAR(module_cmds, $1)= 9083249c3046Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9084249c3046Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9085249c3046Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9086249c3046Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9087249c3046Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9088249c3046Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9089249c3046Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9090249c3046Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 90911477040fSmrg 9092249c3046Smrg# Source file extension for f77 test sources. 9093249c3046Smrgac_ext=f 90941477040fSmrg 9095249c3046Smrg# Object file extension for compiled f77 test sources. 9096249c3046Smrgobjext=o 9097249c3046Smrg_LT_TAGVAR(objext, $1)=$objext 90981477040fSmrg 9099249c3046Smrg# No sense in running all these tests if we already determined that 9100249c3046Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 9101249c3046Smrg# are currently assumed to apply to all compilers on this platform, 9102249c3046Smrg# and will be corrupted by setting them based on a non-working compiler. 9103249c3046Smrgif test "$_lt_disable_F77" != yes; then 9104249c3046Smrg # Code to be used in simple compile tests 9105249c3046Smrg lt_simple_compile_test_code="\ 9106249c3046Smrg subroutine t 9107249c3046Smrg return 9108249c3046Smrg end 9109249c3046Smrg" 91101477040fSmrg 9111249c3046Smrg # Code to be used in simple link tests 9112249c3046Smrg lt_simple_link_test_code="\ 9113249c3046Smrg program t 9114249c3046Smrg end 9115249c3046Smrg" 91161477040fSmrg 9117249c3046Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9118249c3046Smrg _LT_TAG_COMPILER 91191477040fSmrg 9120249c3046Smrg # save warnings/boilerplate of simple test code 9121249c3046Smrg _LT_COMPILER_BOILERPLATE 9122249c3046Smrg _LT_LINKER_BOILERPLATE 91231477040fSmrg 9124249c3046Smrg # Allow CC to be a program name with arguments. 9125249c3046Smrg lt_save_CC="$CC" 9126249c3046Smrg lt_save_GCC=$GCC 9127249c3046Smrg CC=${F77-"f77"} 9128249c3046Smrg compiler=$CC 9129249c3046Smrg _LT_TAGVAR(compiler, $1)=$CC 9130249c3046Smrg _LT_CC_BASENAME([$compiler]) 9131249c3046Smrg GCC=$G77 9132249c3046Smrg if test -n "$compiler"; then 9133249c3046Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9134249c3046Smrg AC_MSG_RESULT([$can_build_shared]) 91351477040fSmrg 9136249c3046Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9137249c3046Smrg test "$can_build_shared" = "no" && enable_shared=no 91381477040fSmrg 9139249c3046Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9140249c3046Smrg # are all built from PIC. 9141249c3046Smrg case $host_os in 9142249c3046Smrg aix3*) 9143249c3046Smrg test "$enable_shared" = yes && enable_static=no 9144249c3046Smrg if test -n "$RANLIB"; then 9145249c3046Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9146249c3046Smrg postinstall_cmds='$RANLIB $lib' 91471477040fSmrg fi 9148249c3046Smrg ;; 9149249c3046Smrg aix[[4-9]]*) 9150249c3046Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9151249c3046Smrg test "$enable_shared" = yes && enable_static=no 9152249c3046Smrg fi 9153249c3046Smrg ;; 9154249c3046Smrg esac 9155249c3046Smrg AC_MSG_RESULT([$enable_shared]) 91561477040fSmrg 9157249c3046Smrg AC_MSG_CHECKING([whether to build static libraries]) 9158249c3046Smrg # Make sure either enable_shared or enable_static is yes. 9159249c3046Smrg test "$enable_shared" = yes || enable_static=yes 9160249c3046Smrg AC_MSG_RESULT([$enable_static]) 91611477040fSmrg 9162249c3046Smrg _LT_TAGVAR(GCC, $1)="$G77" 9163249c3046Smrg _LT_TAGVAR(LD, $1)="$LD" 91641477040fSmrg 9165249c3046Smrg ## CAVEAT EMPTOR: 9166249c3046Smrg ## There is no encapsulation within the following macros, do not change 9167249c3046Smrg ## the running order or otherwise move them around unless you know exactly 9168249c3046Smrg ## what you are doing... 9169249c3046Smrg _LT_COMPILER_PIC($1) 9170249c3046Smrg _LT_COMPILER_C_O($1) 9171249c3046Smrg _LT_COMPILER_FILE_LOCKS($1) 9172249c3046Smrg _LT_LINKER_SHLIBS($1) 9173249c3046Smrg _LT_SYS_DYNAMIC_LINKER($1) 9174249c3046Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 91751477040fSmrg 9176249c3046Smrg _LT_CONFIG($1) 9177249c3046Smrg fi # test -n "$compiler" 91781477040fSmrg 9179249c3046Smrg GCC=$lt_save_GCC 9180249c3046Smrg CC="$lt_save_CC" 9181249c3046Smrgfi # test "$_lt_disable_F77" != yes 91821477040fSmrg 9183249c3046SmrgAC_LANG_POP 9184249c3046Smrg])# _LT_LANG_F77_CONFIG 91851477040fSmrg 91861477040fSmrg 9187249c3046Smrg# _LT_LANG_FC_CONFIG([TAG]) 9188249c3046Smrg# ------------------------- 9189249c3046Smrg# Ensure that the configuration variables for a Fortran compiler are 9190249c3046Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9191249c3046Smrg# to write the compiler configuration to `libtool'. 9192249c3046Smrgm4_defun([_LT_LANG_FC_CONFIG], 9193249c3046Smrg[AC_LANG_PUSH(Fortran) 91941477040fSmrg 9195249c3046Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 9196249c3046Smrg _lt_disable_FC=yes 91971477040fSmrgfi 91981477040fSmrg 9199249c3046Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9200249c3046Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9201249c3046Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9202249c3046Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9203249c3046Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9204249c3046Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9205249c3046Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9206249c3046Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9207249c3046Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9208249c3046Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9209249c3046Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9210249c3046Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9211249c3046Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9212249c3046Smrg_LT_TAGVAR(module_cmds, $1)= 9213249c3046Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9214249c3046Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9215249c3046Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9216249c3046Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9217249c3046Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9218249c3046Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9219249c3046Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9220249c3046Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 92211477040fSmrg 9222249c3046Smrg# Source file extension for fc test sources. 9223249c3046Smrgac_ext=${ac_fc_srcext-f} 92241477040fSmrg 9225249c3046Smrg# Object file extension for compiled fc test sources. 9226249c3046Smrgobjext=o 9227249c3046Smrg_LT_TAGVAR(objext, $1)=$objext 92281477040fSmrg 9229249c3046Smrg# No sense in running all these tests if we already determined that 9230249c3046Smrg# the FC compiler isn't working. Some variables (like enable_shared) 9231249c3046Smrg# are currently assumed to apply to all compilers on this platform, 9232249c3046Smrg# and will be corrupted by setting them based on a non-working compiler. 9233249c3046Smrgif test "$_lt_disable_FC" != yes; then 9234249c3046Smrg # Code to be used in simple compile tests 9235249c3046Smrg lt_simple_compile_test_code="\ 9236249c3046Smrg subroutine t 9237249c3046Smrg return 9238249c3046Smrg end 9239249c3046Smrg" 92401477040fSmrg 9241249c3046Smrg # Code to be used in simple link tests 9242249c3046Smrg lt_simple_link_test_code="\ 9243249c3046Smrg program t 9244249c3046Smrg end 9245249c3046Smrg" 92461477040fSmrg 9247249c3046Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9248249c3046Smrg _LT_TAG_COMPILER 92492265a131Smrg 9250249c3046Smrg # save warnings/boilerplate of simple test code 9251249c3046Smrg _LT_COMPILER_BOILERPLATE 9252249c3046Smrg _LT_LINKER_BOILERPLATE 92532265a131Smrg 9254249c3046Smrg # Allow CC to be a program name with arguments. 9255249c3046Smrg lt_save_CC="$CC" 9256249c3046Smrg lt_save_GCC=$GCC 9257249c3046Smrg CC=${FC-"f95"} 9258249c3046Smrg compiler=$CC 9259249c3046Smrg GCC=$ac_cv_fc_compiler_gnu 92602265a131Smrg 9261249c3046Smrg _LT_TAGVAR(compiler, $1)=$CC 9262249c3046Smrg _LT_CC_BASENAME([$compiler]) 9263249c3046Smrg 9264249c3046Smrg if test -n "$compiler"; then 9265249c3046Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9266249c3046Smrg AC_MSG_RESULT([$can_build_shared]) 9267249c3046Smrg 9268249c3046Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9269249c3046Smrg test "$can_build_shared" = "no" && enable_shared=no 9270249c3046Smrg 9271249c3046Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9272249c3046Smrg # are all built from PIC. 92731477040fSmrg case $host_os in 9274249c3046Smrg aix3*) 9275249c3046Smrg test "$enable_shared" = yes && enable_static=no 9276249c3046Smrg if test -n "$RANLIB"; then 9277249c3046Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9278249c3046Smrg postinstall_cmds='$RANLIB $lib' 9279249c3046Smrg fi 9280249c3046Smrg ;; 9281249c3046Smrg aix[[4-9]]*) 9282249c3046Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9283249c3046Smrg test "$enable_shared" = yes && enable_static=no 9284249c3046Smrg fi 9285249c3046Smrg ;; 92861477040fSmrg esac 9287249c3046Smrg AC_MSG_RESULT([$enable_shared]) 92882265a131Smrg 9289249c3046Smrg AC_MSG_CHECKING([whether to build static libraries]) 9290249c3046Smrg # Make sure either enable_shared or enable_static is yes. 9291249c3046Smrg test "$enable_shared" = yes || enable_static=yes 9292249c3046Smrg AC_MSG_RESULT([$enable_static]) 92932265a131Smrg 9294249c3046Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 9295249c3046Smrg _LT_TAGVAR(LD, $1)="$LD" 92962265a131Smrg 9297249c3046Smrg ## CAVEAT EMPTOR: 9298249c3046Smrg ## There is no encapsulation within the following macros, do not change 9299249c3046Smrg ## the running order or otherwise move them around unless you know exactly 9300249c3046Smrg ## what you are doing... 9301249c3046Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 9302249c3046Smrg _LT_COMPILER_PIC($1) 9303249c3046Smrg _LT_COMPILER_C_O($1) 9304249c3046Smrg _LT_COMPILER_FILE_LOCKS($1) 9305249c3046Smrg _LT_LINKER_SHLIBS($1) 9306249c3046Smrg _LT_SYS_DYNAMIC_LINKER($1) 9307249c3046Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 93081477040fSmrg 9309249c3046Smrg _LT_CONFIG($1) 9310249c3046Smrg fi # test -n "$compiler" 93111477040fSmrg 9312249c3046Smrg GCC=$lt_save_GCC 9313249c3046Smrg CC="$lt_save_CC" 9314249c3046Smrgfi # test "$_lt_disable_FC" != yes 93151477040fSmrg 9316249c3046SmrgAC_LANG_POP 9317249c3046Smrg])# _LT_LANG_FC_CONFIG 93181477040fSmrg 93191477040fSmrg 9320249c3046Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 9321249c3046Smrg# -------------------------- 9322249c3046Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 9323249c3046Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9324249c3046Smrg# to write the compiler configuration to `libtool'. 9325249c3046Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 9326249c3046Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 9327249c3046SmrgAC_LANG_SAVE 93281477040fSmrg 9329249c3046Smrg# Source file extension for Java test sources. 9330249c3046Smrgac_ext=java 93311477040fSmrg 9332249c3046Smrg# Object file extension for compiled Java test sources. 9333249c3046Smrgobjext=o 9334249c3046Smrg_LT_TAGVAR(objext, $1)=$objext 93351477040fSmrg 9336249c3046Smrg# Code to be used in simple compile tests 9337249c3046Smrglt_simple_compile_test_code="class foo {}" 93381477040fSmrg 9339249c3046Smrg# Code to be used in simple link tests 9340249c3046Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 93411477040fSmrg 9342249c3046Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9343249c3046Smrg_LT_TAG_COMPILER 93441477040fSmrg 9345249c3046Smrg# save warnings/boilerplate of simple test code 9346249c3046Smrg_LT_COMPILER_BOILERPLATE 9347249c3046Smrg_LT_LINKER_BOILERPLATE 93481477040fSmrg 9349249c3046Smrg# Allow CC to be a program name with arguments. 9350249c3046Smrglt_save_CC="$CC" 9351249c3046Smrglt_save_GCC=$GCC 9352249c3046SmrgGCC=yes 9353249c3046SmrgCC=${GCJ-"gcj"} 9354249c3046Smrgcompiler=$CC 9355249c3046Smrg_LT_TAGVAR(compiler, $1)=$CC 9356249c3046Smrg_LT_TAGVAR(LD, $1)="$LD" 9357249c3046Smrg_LT_CC_BASENAME([$compiler]) 93581477040fSmrg 9359249c3046Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 9360249c3046Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 93611477040fSmrg 9362249c3046Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9363249c3046Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9364249c3046Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 93651477040fSmrg 9366249c3046Smrgif test -n "$compiler"; then 9367249c3046Smrg _LT_COMPILER_NO_RTTI($1) 9368249c3046Smrg _LT_COMPILER_PIC($1) 9369249c3046Smrg _LT_COMPILER_C_O($1) 9370249c3046Smrg _LT_COMPILER_FILE_LOCKS($1) 9371249c3046Smrg _LT_LINKER_SHLIBS($1) 9372249c3046Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 93731477040fSmrg 9374249c3046Smrg _LT_CONFIG($1) 93751477040fSmrgfi 93761477040fSmrg 9377249c3046SmrgAC_LANG_RESTORE 93781477040fSmrg 9379249c3046SmrgGCC=$lt_save_GCC 9380249c3046SmrgCC="$lt_save_CC" 9381249c3046Smrg])# _LT_LANG_GCJ_CONFIG 93821477040fSmrg 93831477040fSmrg 9384249c3046Smrg# _LT_LANG_RC_CONFIG([TAG]) 9385249c3046Smrg# ------------------------- 9386249c3046Smrg# Ensure that the configuration variables for the Windows resource compiler 9387249c3046Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9388249c3046Smrg# to write the compiler configuration to `libtool'. 9389249c3046Smrgm4_defun([_LT_LANG_RC_CONFIG], 9390249c3046Smrg[AC_REQUIRE([LT_PROG_RC])dnl 9391249c3046SmrgAC_LANG_SAVE 93921477040fSmrg 9393249c3046Smrg# Source file extension for RC test sources. 9394249c3046Smrgac_ext=rc 93951477040fSmrg 9396249c3046Smrg# Object file extension for compiled RC test sources. 9397249c3046Smrgobjext=o 9398249c3046Smrg_LT_TAGVAR(objext, $1)=$objext 93991477040fSmrg 9400249c3046Smrg# Code to be used in simple compile tests 9401249c3046Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 94021477040fSmrg 9403249c3046Smrg# Code to be used in simple link tests 9404249c3046Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 94051477040fSmrg 9406249c3046Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9407249c3046Smrg_LT_TAG_COMPILER 9408444c061aSmrg 9409249c3046Smrg# save warnings/boilerplate of simple test code 9410249c3046Smrg_LT_COMPILER_BOILERPLATE 9411249c3046Smrg_LT_LINKER_BOILERPLATE 94121477040fSmrg 9413249c3046Smrg# Allow CC to be a program name with arguments. 9414249c3046Smrglt_save_CC="$CC" 9415249c3046Smrglt_save_GCC=$GCC 9416249c3046SmrgGCC= 9417249c3046SmrgCC=${RC-"windres"} 9418249c3046Smrgcompiler=$CC 9419249c3046Smrg_LT_TAGVAR(compiler, $1)=$CC 9420249c3046Smrg_LT_CC_BASENAME([$compiler]) 9421249c3046Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 9422249c3046Smrg 9423249c3046Smrgif test -n "$compiler"; then 9424249c3046Smrg : 9425249c3046Smrg _LT_CONFIG($1) 94261477040fSmrgfi 9427444c061aSmrg 9428249c3046SmrgGCC=$lt_save_GCC 9429249c3046SmrgAC_LANG_RESTORE 9430249c3046SmrgCC="$lt_save_CC" 9431249c3046Smrg])# _LT_LANG_RC_CONFIG 94321477040fSmrg 9433444c061aSmrg 9434249c3046Smrg# LT_PROG_GCJ 9435249c3046Smrg# ----------- 9436249c3046SmrgAC_DEFUN([LT_PROG_GCJ], 9437249c3046Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 9438249c3046Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 9439249c3046Smrg [AC_CHECK_TOOL(GCJ, gcj,) 9440249c3046Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 9441249c3046Smrg AC_SUBST(GCJFLAGS)])])[]dnl 9442249c3046Smrg]) 94431477040fSmrg 9444249c3046Smrg# Old name: 9445249c3046SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 9446249c3046Smrgdnl aclocal-1.4 backwards compatibility: 9447249c3046Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 9448444c061aSmrg 94491477040fSmrg 9450249c3046Smrg# LT_PROG_RC 9451249c3046Smrg# ---------- 9452249c3046SmrgAC_DEFUN([LT_PROG_RC], 9453249c3046Smrg[AC_CHECK_TOOL(RC, windres,) 9454249c3046Smrg]) 9455249c3046Smrg 9456249c3046Smrg# Old name: 9457249c3046SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 9458249c3046Smrgdnl aclocal-1.4 backwards compatibility: 9459249c3046Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 9460249c3046Smrg 9461249c3046Smrg 9462249c3046Smrg# _LT_DECL_EGREP 9463249c3046Smrg# -------------- 9464249c3046Smrg# If we don't have a new enough Autoconf to choose the best grep 9465249c3046Smrg# available, choose the one first in the user's PATH. 9466249c3046Smrgm4_defun([_LT_DECL_EGREP], 9467249c3046Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 9468249c3046SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 9469249c3046Smrgtest -z "$GREP" && GREP=grep 9470249c3046Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 9471249c3046Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 9472249c3046Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 9473249c3046Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 9474249c3046SmrgAC_SUBST([GREP]) 9475249c3046Smrg]) 9476249c3046Smrg 9477444c061aSmrg 9478249c3046Smrg# _LT_DECL_OBJDUMP 9479249c3046Smrg# -------------- 9480249c3046Smrg# If we don't have a new enough Autoconf to choose the best objdump 9481249c3046Smrg# available, choose the one first in the user's PATH. 9482249c3046Smrgm4_defun([_LT_DECL_OBJDUMP], 9483249c3046Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 9484249c3046Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9485249c3046Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 9486249c3046SmrgAC_SUBST([OBJDUMP]) 9487249c3046Smrg]) 94881477040fSmrg 94891477040fSmrg 9490249c3046Smrg# _LT_DECL_SED 9491249c3046Smrg# ------------ 9492249c3046Smrg# Check for a fully-functional sed program, that truncates 9493249c3046Smrg# as few characters as possible. Prefer GNU sed if found. 9494249c3046Smrgm4_defun([_LT_DECL_SED], 9495249c3046Smrg[AC_PROG_SED 9496249c3046Smrgtest -z "$SED" && SED=sed 9497249c3046SmrgXsed="$SED -e 1s/^X//" 9498249c3046Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 9499249c3046Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 9500249c3046Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 9501249c3046Smrg])# _LT_DECL_SED 9502444c061aSmrg 9503249c3046Smrgm4_ifndef([AC_PROG_SED], [ 9504249c3046Smrg# NOTE: This macro has been submitted for inclusion into # 9505249c3046Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 9506249c3046Smrg# a released version of Autoconf we should remove this # 9507249c3046Smrg# macro and use it instead. # 9508444c061aSmrg 9509249c3046Smrgm4_defun([AC_PROG_SED], 9510249c3046Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 9511249c3046SmrgAC_CACHE_VAL(lt_cv_path_SED, 9512249c3046Smrg[# Loop through the user's path and test for sed and gsed. 9513249c3046Smrg# Then use that list of sed's as ones to test for truncation. 9514249c3046Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9515249c3046Smrgfor as_dir in $PATH 9516249c3046Smrgdo 9517249c3046Smrg IFS=$as_save_IFS 9518249c3046Smrg test -z "$as_dir" && as_dir=. 9519249c3046Smrg for lt_ac_prog in sed gsed; do 9520249c3046Smrg for ac_exec_ext in '' $ac_executable_extensions; do 9521249c3046Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 9522249c3046Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 9523249c3046Smrg fi 9524249c3046Smrg done 9525249c3046Smrg done 9526249c3046Smrgdone 9527249c3046SmrgIFS=$as_save_IFS 9528249c3046Smrglt_ac_max=0 9529249c3046Smrglt_ac_count=0 9530249c3046Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 9531249c3046Smrg# along with /bin/sed that truncates output. 9532249c3046Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 9533249c3046Smrg test ! -f $lt_ac_sed && continue 9534249c3046Smrg cat /dev/null > conftest.in 9535249c3046Smrg lt_ac_count=0 9536249c3046Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 9537249c3046Smrg # Check for GNU sed and select it if it is found. 9538249c3046Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 9539249c3046Smrg lt_cv_path_SED=$lt_ac_sed 9540249c3046Smrg break 9541249c3046Smrg fi 9542249c3046Smrg while true; do 9543249c3046Smrg cat conftest.in conftest.in >conftest.tmp 9544249c3046Smrg mv conftest.tmp conftest.in 9545249c3046Smrg cp conftest.in conftest.nl 9546249c3046Smrg echo >>conftest.nl 9547249c3046Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 9548249c3046Smrg cmp -s conftest.out conftest.nl || break 9549249c3046Smrg # 10000 chars as input seems more than enough 9550249c3046Smrg test $lt_ac_count -gt 10 && break 9551249c3046Smrg lt_ac_count=`expr $lt_ac_count + 1` 9552249c3046Smrg if test $lt_ac_count -gt $lt_ac_max; then 9553249c3046Smrg lt_ac_max=$lt_ac_count 9554249c3046Smrg lt_cv_path_SED=$lt_ac_sed 9555249c3046Smrg fi 9556249c3046Smrg done 9557249c3046Smrgdone 9558249c3046Smrg]) 9559249c3046SmrgSED=$lt_cv_path_SED 9560249c3046SmrgAC_SUBST([SED]) 9561249c3046SmrgAC_MSG_RESULT([$SED]) 9562249c3046Smrg])#AC_PROG_SED 9563249c3046Smrg])#m4_ifndef 9564444c061aSmrg 9565249c3046Smrg# Old name: 9566249c3046SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 9567249c3046Smrgdnl aclocal-1.4 backwards compatibility: 9568249c3046Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 9569444c061aSmrg 95702265a131Smrg 9571249c3046Smrg# _LT_CHECK_SHELL_FEATURES 9572249c3046Smrg# ------------------------ 9573249c3046Smrg# Find out whether the shell is Bourne or XSI compatible, 9574249c3046Smrg# or has some other useful features. 9575249c3046Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 9576249c3046Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 9577249c3046Smrg# Try some XSI features 9578249c3046Smrgxsi_shell=no 9579249c3046Smrg( _lt_dummy="a/b/c" 9580249c3046Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 9581249c3046Smrg = c,a/b,, \ 9582249c3046Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 9583249c3046Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 9584249c3046Smrg && xsi_shell=yes 9585249c3046SmrgAC_MSG_RESULT([$xsi_shell]) 9586249c3046Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 9587444c061aSmrg 9588249c3046SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 9589249c3046Smrglt_shell_append=no 9590249c3046Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 9591249c3046Smrg >/dev/null 2>&1 \ 9592249c3046Smrg && lt_shell_append=yes 9593249c3046SmrgAC_MSG_RESULT([$lt_shell_append]) 9594249c3046Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 9595249c3046Smrg 9596249c3046Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 9597249c3046Smrg lt_unset=unset 95981477040fSmrgelse 9599249c3046Smrg lt_unset=false 96001477040fSmrgfi 9601249c3046Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 96022265a131Smrg 9603249c3046Smrg# test EBCDIC or ASCII 9604249c3046Smrgcase `echo X|tr X '\101'` in 9605249c3046Smrg A) # ASCII based system 9606249c3046Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 9607249c3046Smrg lt_SP2NL='tr \040 \012' 9608249c3046Smrg lt_NL2SP='tr \015\012 \040\040' 9609249c3046Smrg ;; 9610249c3046Smrg *) # EBCDIC based system 9611249c3046Smrg lt_SP2NL='tr \100 \n' 9612249c3046Smrg lt_NL2SP='tr \r\n \100\100' 9613249c3046Smrg ;; 9614249c3046Smrgesac 9615249c3046Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 9616249c3046Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 9617249c3046Smrg])# _LT_CHECK_SHELL_FEATURES 9618444c061aSmrg 9619444c061aSmrg 9620249c3046Smrg# _LT_PROG_XSI_SHELLFNS 9621249c3046Smrg# --------------------- 9622249c3046Smrg# Bourne and XSI compatible variants of some useful shell functions. 9623249c3046Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 9624249c3046Smrg[case $xsi_shell in 9625249c3046Smrg yes) 9626249c3046Smrg cat << \_LT_EOF >> "$cfgfile" 9627444c061aSmrg 9628249c3046Smrg# func_dirname file append nondir_replacement 9629249c3046Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9630249c3046Smrg# otherwise set result to NONDIR_REPLACEMENT. 9631249c3046Smrgfunc_dirname () 9632249c3046Smrg{ 9633249c3046Smrg case ${1} in 9634249c3046Smrg */*) func_dirname_result="${1%/*}${2}" ;; 9635249c3046Smrg * ) func_dirname_result="${3}" ;; 9636249c3046Smrg esac 9637249c3046Smrg} 9638444c061aSmrg 9639249c3046Smrg# func_basename file 9640249c3046Smrgfunc_basename () 9641249c3046Smrg{ 9642249c3046Smrg func_basename_result="${1##*/}" 9643249c3046Smrg} 9644444c061aSmrg 9645249c3046Smrg# func_dirname_and_basename file append nondir_replacement 9646249c3046Smrg# perform func_basename and func_dirname in a single function 9647249c3046Smrg# call: 9648249c3046Smrg# dirname: Compute the dirname of FILE. If nonempty, 9649249c3046Smrg# add APPEND to the result, otherwise set result 9650249c3046Smrg# to NONDIR_REPLACEMENT. 9651249c3046Smrg# value returned in "$func_dirname_result" 9652249c3046Smrg# basename: Compute filename of FILE. 9653249c3046Smrg# value retuned in "$func_basename_result" 9654249c3046Smrg# Implementation must be kept synchronized with func_dirname 9655249c3046Smrg# and func_basename. For efficiency, we do not delegate to 9656249c3046Smrg# those functions but instead duplicate the functionality here. 9657249c3046Smrgfunc_dirname_and_basename () 9658249c3046Smrg{ 9659249c3046Smrg case ${1} in 9660249c3046Smrg */*) func_dirname_result="${1%/*}${2}" ;; 9661249c3046Smrg * ) func_dirname_result="${3}" ;; 9662249c3046Smrg esac 9663249c3046Smrg func_basename_result="${1##*/}" 9664249c3046Smrg} 9665444c061aSmrg 9666249c3046Smrg# func_stripname prefix suffix name 9667249c3046Smrg# strip PREFIX and SUFFIX off of NAME. 9668249c3046Smrg# PREFIX and SUFFIX must not contain globbing or regex special 9669249c3046Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9670249c3046Smrg# dot (in which case that matches only a dot). 9671249c3046Smrgfunc_stripname () 9672249c3046Smrg{ 9673249c3046Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 9674249c3046Smrg # positional parameters, so assign one to ordinary parameter first. 9675249c3046Smrg func_stripname_result=${3} 9676249c3046Smrg func_stripname_result=${func_stripname_result#"${1}"} 9677249c3046Smrg func_stripname_result=${func_stripname_result%"${2}"} 9678249c3046Smrg} 9679444c061aSmrg 9680249c3046Smrg# func_opt_split 9681249c3046Smrgfunc_opt_split () 9682249c3046Smrg{ 9683249c3046Smrg func_opt_split_opt=${1%%=*} 9684249c3046Smrg func_opt_split_arg=${1#*=} 9685249c3046Smrg} 9686444c061aSmrg 9687249c3046Smrg# func_lo2o object 9688249c3046Smrgfunc_lo2o () 9689249c3046Smrg{ 9690249c3046Smrg case ${1} in 9691249c3046Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9692249c3046Smrg *) func_lo2o_result=${1} ;; 9693249c3046Smrg esac 9694249c3046Smrg} 96951477040fSmrg 9696249c3046Smrg# func_xform libobj-or-source 9697249c3046Smrgfunc_xform () 9698249c3046Smrg{ 9699249c3046Smrg func_xform_result=${1%.*}.lo 9700249c3046Smrg} 9701444c061aSmrg 9702249c3046Smrg# func_arith arithmetic-term... 9703249c3046Smrgfunc_arith () 9704249c3046Smrg{ 9705249c3046Smrg func_arith_result=$(( $[*] )) 9706249c3046Smrg} 9707444c061aSmrg 9708249c3046Smrg# func_len string 9709249c3046Smrg# STRING may not start with a hyphen. 9710249c3046Smrgfunc_len () 9711249c3046Smrg{ 9712249c3046Smrg func_len_result=${#1} 9713249c3046Smrg} 9714444c061aSmrg 9715249c3046Smrg_LT_EOF 9716249c3046Smrg ;; 9717249c3046Smrg *) # Bourne compatible functions. 9718249c3046Smrg cat << \_LT_EOF >> "$cfgfile" 9719444c061aSmrg 9720249c3046Smrg# func_dirname file append nondir_replacement 9721249c3046Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9722249c3046Smrg# otherwise set result to NONDIR_REPLACEMENT. 9723249c3046Smrgfunc_dirname () 9724249c3046Smrg{ 9725249c3046Smrg # Extract subdirectory from the argument. 9726249c3046Smrg func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` 9727249c3046Smrg if test "X$func_dirname_result" = "X${1}"; then 9728249c3046Smrg func_dirname_result="${3}" 9729249c3046Smrg else 9730249c3046Smrg func_dirname_result="$func_dirname_result${2}" 9731249c3046Smrg fi 9732249c3046Smrg} 9733444c061aSmrg 9734249c3046Smrg# func_basename file 9735249c3046Smrgfunc_basename () 9736249c3046Smrg{ 9737249c3046Smrg func_basename_result=`$ECHO "${1}" | $SED "$basename"` 9738249c3046Smrg} 9739444c061aSmrg 9740249c3046Smrgdnl func_dirname_and_basename 9741249c3046Smrgdnl A portable version of this function is already defined in general.m4sh 9742249c3046Smrgdnl so there is no need for it here. 9743444c061aSmrg 9744249c3046Smrg# func_stripname prefix suffix name 9745249c3046Smrg# strip PREFIX and SUFFIX off of NAME. 9746249c3046Smrg# PREFIX and SUFFIX must not contain globbing or regex special 9747249c3046Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9748249c3046Smrg# dot (in which case that matches only a dot). 9749249c3046Smrg# func_strip_suffix prefix name 9750249c3046Smrgfunc_stripname () 9751249c3046Smrg{ 9752249c3046Smrg case ${2} in 9753249c3046Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 9754249c3046Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 9755249c3046Smrg esac 9756249c3046Smrg} 9757444c061aSmrg 9758249c3046Smrg# sed scripts: 9759249c3046Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 9760249c3046Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 9761444c061aSmrg 9762249c3046Smrg# func_opt_split 9763249c3046Smrgfunc_opt_split () 9764249c3046Smrg{ 9765249c3046Smrg func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` 9766249c3046Smrg func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` 9767249c3046Smrg} 9768444c061aSmrg 9769249c3046Smrg# func_lo2o object 9770249c3046Smrgfunc_lo2o () 9771249c3046Smrg{ 9772249c3046Smrg func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 9773249c3046Smrg} 9774444c061aSmrg 9775249c3046Smrg# func_xform libobj-or-source 9776249c3046Smrgfunc_xform () 9777249c3046Smrg{ 9778249c3046Smrg func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` 9779249c3046Smrg} 97802ae83157Smrg 9781249c3046Smrg# func_arith arithmetic-term... 9782249c3046Smrgfunc_arith () 9783249c3046Smrg{ 9784249c3046Smrg func_arith_result=`expr "$[@]"` 9785249c3046Smrg} 97862ae83157Smrg 9787249c3046Smrg# func_len string 9788249c3046Smrg# STRING may not start with a hyphen. 9789249c3046Smrgfunc_len () 9790249c3046Smrg{ 9791249c3046Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 9792249c3046Smrg} 97932ae83157Smrg 9794249c3046Smrg_LT_EOF 9795249c3046Smrgesac 9796444c061aSmrg 9797249c3046Smrgcase $lt_shell_append in 9798249c3046Smrg yes) 9799249c3046Smrg cat << \_LT_EOF >> "$cfgfile" 9800444c061aSmrg 9801249c3046Smrg# func_append var value 9802249c3046Smrg# Append VALUE to the end of shell variable VAR. 9803249c3046Smrgfunc_append () 9804249c3046Smrg{ 9805249c3046Smrg eval "$[1]+=\$[2]" 9806249c3046Smrg} 9807249c3046Smrg_LT_EOF 9808249c3046Smrg ;; 9809249c3046Smrg *) 9810249c3046Smrg cat << \_LT_EOF >> "$cfgfile" 9811444c061aSmrg 9812249c3046Smrg# func_append var value 9813249c3046Smrg# Append VALUE to the end of shell variable VAR. 9814249c3046Smrgfunc_append () 9815249c3046Smrg{ 9816249c3046Smrg eval "$[1]=\$$[1]\$[2]" 9817249c3046Smrg} 9818444c061aSmrg 9819249c3046Smrg_LT_EOF 9820249c3046Smrg ;; 9821249c3046Smrg esac 9822249c3046Smrg]) 9823249c3046Smrg 9824249c3046Smrg# Helper functions for option handling. -*- Autoconf -*- 98251477040fSmrg# 9826249c3046Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9827249c3046Smrg# Inc. 9828249c3046Smrg# Written by Gary V. Vaughan, 2004 9829249c3046Smrg# 9830249c3046Smrg# This file is free software; the Free Software Foundation gives 9831249c3046Smrg# unlimited permission to copy and/or distribute it, with or without 9832249c3046Smrg# modifications, as long as this notice is preserved. 9833444c061aSmrg 9834249c3046Smrg# serial 7 ltoptions.m4 9835444c061aSmrg 9836249c3046Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9837249c3046SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 98381477040fSmrg 9839444c061aSmrg 9840249c3046Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9841249c3046Smrg# ------------------------------------------ 9842249c3046Smrgm4_define([_LT_MANGLE_OPTION], 9843249c3046Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9844444c061aSmrg 9845444c061aSmrg 9846249c3046Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9847249c3046Smrg# --------------------------------------- 9848249c3046Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9849249c3046Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9850249c3046Smrg# saved as a flag. 9851249c3046Smrgm4_define([_LT_SET_OPTION], 9852249c3046Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9853249c3046Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9854249c3046Smrg _LT_MANGLE_DEFUN([$1], [$2]), 9855249c3046Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 98561477040fSmrg]) 9857444c061aSmrg 9858444c061aSmrg 9859249c3046Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9860249c3046Smrg# ------------------------------------------------------------ 9861249c3046Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9862249c3046Smrgm4_define([_LT_IF_OPTION], 9863249c3046Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9864444c061aSmrg 9865444c061aSmrg 9866249c3046Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9867249c3046Smrg# ------------------------------------------------------- 9868249c3046Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9869249c3046Smrg# are set. 9870249c3046Smrgm4_define([_LT_UNLESS_OPTIONS], 9871249c3046Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9872249c3046Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9873249c3046Smrg [m4_define([$0_found])])])[]dnl 9874249c3046Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9875249c3046Smrg])[]dnl 98761477040fSmrg]) 9877444c061aSmrg 98781477040fSmrg 9879249c3046Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9880249c3046Smrg# ---------------------------------------- 9881249c3046Smrg# OPTION-LIST is a space-separated list of Libtool options associated 9882249c3046Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 9883249c3046Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9884249c3046Smrg# the unknown option and exit. 9885249c3046Smrgm4_defun([_LT_SET_OPTIONS], 9886249c3046Smrg[# Set options 9887249c3046Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9888249c3046Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 98891477040fSmrg 9890249c3046Smrgm4_if([$1],[LT_INIT],[ 9891249c3046Smrg dnl 9892249c3046Smrg dnl Simply set some default values (i.e off) if boolean options were not 9893249c3046Smrg dnl specified: 9894249c3046Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9895249c3046Smrg ]) 9896249c3046Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9897249c3046Smrg ]) 9898249c3046Smrg dnl 9899249c3046Smrg dnl If no reference was made to various pairs of opposing options, then 9900249c3046Smrg dnl we run the default mode handler for the pair. For example, if neither 9901249c3046Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 9902249c3046Smrg dnl archives by default: 9903249c3046Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9904249c3046Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9905249c3046Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9906249c3046Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9907249c3046Smrg [_LT_ENABLE_FAST_INSTALL]) 9908249c3046Smrg ]) 9909249c3046Smrg])# _LT_SET_OPTIONS 99101477040fSmrg 99111477040fSmrg 9912444c061aSmrg 9913249c3046Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9914249c3046Smrg# ----------------------------------------- 9915249c3046Smrgm4_define([_LT_MANGLE_DEFUN], 9916249c3046Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9917444c061aSmrg 9918444c061aSmrg 9919249c3046Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9920249c3046Smrg# ----------------------------------------------- 9921249c3046Smrgm4_define([LT_OPTION_DEFINE], 9922249c3046Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9923249c3046Smrg])# LT_OPTION_DEFINE 9924444c061aSmrg 9925444c061aSmrg 9926249c3046Smrg# dlopen 9927249c3046Smrg# ------ 9928249c3046SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9929249c3046Smrg]) 9930444c061aSmrg 9931249c3046SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 9932249c3046Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 9933249c3046SmrgAC_DIAGNOSE([obsolete], 9934249c3046Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9935249c3046Smrgput the `dlopen' option into LT_INIT's first parameter.]) 9936249c3046Smrg]) 9937444c061aSmrg 9938249c3046Smrgdnl aclocal-1.4 backwards compatibility: 9939249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 99402ae83157Smrg 99412ae83157Smrg 9942249c3046Smrg# win32-dll 9943249c3046Smrg# --------- 9944249c3046Smrg# Declare package support for building win32 dll's. 9945249c3046SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 9946249c3046Smrg[enable_win32_dll=yes 9947444c061aSmrg 9948249c3046Smrgcase $host in 9949249c3046Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9950249c3046Smrg AC_CHECK_TOOL(AS, as, false) 9951249c3046Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9952249c3046Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 9953249c3046Smrg ;; 9954249c3046Smrgesac 9955444c061aSmrg 9956249c3046Smrgtest -z "$AS" && AS=as 9957249c3046Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9958444c061aSmrg 9959249c3046Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 9960249c3046Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9961444c061aSmrg 9962249c3046Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9963249c3046Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9964249c3046Smrg])# win32-dll 9965444c061aSmrg 9966249c3046SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9967249c3046Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9968249c3046Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 9969249c3046SmrgAC_DIAGNOSE([obsolete], 9970249c3046Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9971249c3046Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 9972249c3046Smrg]) 9973444c061aSmrg 9974249c3046Smrgdnl aclocal-1.4 backwards compatibility: 9975249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9976444c061aSmrg 9977444c061aSmrg 9978249c3046Smrg# _LT_ENABLE_SHARED([DEFAULT]) 9979249c3046Smrg# ---------------------------- 9980249c3046Smrg# implement the --enable-shared flag, and supports the `shared' and 9981249c3046Smrg# `disable-shared' LT_INIT options. 9982249c3046Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9983249c3046Smrgm4_define([_LT_ENABLE_SHARED], 9984249c3046Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9985249c3046SmrgAC_ARG_ENABLE([shared], 9986249c3046Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9987249c3046Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9988249c3046Smrg [p=${PACKAGE-default} 9989249c3046Smrg case $enableval in 9990249c3046Smrg yes) enable_shared=yes ;; 9991249c3046Smrg no) enable_shared=no ;; 9992249c3046Smrg *) 9993249c3046Smrg enable_shared=no 9994249c3046Smrg # Look at the argument we got. We use all the common list separators. 9995249c3046Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9996249c3046Smrg for pkg in $enableval; do 9997249c3046Smrg IFS="$lt_save_ifs" 9998249c3046Smrg if test "X$pkg" = "X$p"; then 9999249c3046Smrg enable_shared=yes 10000249c3046Smrg fi 10001249c3046Smrg done 10002249c3046Smrg IFS="$lt_save_ifs" 10003249c3046Smrg ;; 10004249c3046Smrg esac], 10005249c3046Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 10006444c061aSmrg 10007249c3046Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 10008249c3046Smrg [Whether or not to build shared libraries]) 10009249c3046Smrg])# _LT_ENABLE_SHARED 100101477040fSmrg 10011249c3046SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 10012249c3046SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 10013444c061aSmrg 10014249c3046Smrg# Old names: 10015249c3046SmrgAC_DEFUN([AC_ENABLE_SHARED], 10016249c3046Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 10017249c3046Smrg]) 10018444c061aSmrg 10019249c3046SmrgAC_DEFUN([AC_DISABLE_SHARED], 10020249c3046Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 10021249c3046Smrg]) 10022444c061aSmrg 10023249c3046SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 10024249c3046SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 10025444c061aSmrg 10026249c3046Smrgdnl aclocal-1.4 backwards compatibility: 10027249c3046Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 10028249c3046Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 10029444c061aSmrg 10030444c061aSmrg 10031444c061aSmrg 10032249c3046Smrg# _LT_ENABLE_STATIC([DEFAULT]) 10033249c3046Smrg# ---------------------------- 10034249c3046Smrg# implement the --enable-static flag, and support the `static' and 10035249c3046Smrg# `disable-static' LT_INIT options. 10036249c3046Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10037249c3046Smrgm4_define([_LT_ENABLE_STATIC], 10038249c3046Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 10039249c3046SmrgAC_ARG_ENABLE([static], 10040249c3046Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 10041249c3046Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 10042249c3046Smrg [p=${PACKAGE-default} 10043249c3046Smrg case $enableval in 10044249c3046Smrg yes) enable_static=yes ;; 10045249c3046Smrg no) enable_static=no ;; 10046249c3046Smrg *) 10047249c3046Smrg enable_static=no 10048249c3046Smrg # Look at the argument we got. We use all the common list separators. 10049249c3046Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10050249c3046Smrg for pkg in $enableval; do 10051249c3046Smrg IFS="$lt_save_ifs" 10052249c3046Smrg if test "X$pkg" = "X$p"; then 10053249c3046Smrg enable_static=yes 10054249c3046Smrg fi 10055249c3046Smrg done 10056249c3046Smrg IFS="$lt_save_ifs" 10057249c3046Smrg ;; 10058249c3046Smrg esac], 10059249c3046Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 10060444c061aSmrg 10061249c3046Smrg _LT_DECL([build_old_libs], [enable_static], [0], 10062249c3046Smrg [Whether or not to build static libraries]) 10063249c3046Smrg])# _LT_ENABLE_STATIC 10064444c061aSmrg 10065249c3046SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 10066249c3046SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 10067444c061aSmrg 10068249c3046Smrg# Old names: 10069249c3046SmrgAC_DEFUN([AC_ENABLE_STATIC], 10070249c3046Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 10071249c3046Smrg]) 10072444c061aSmrg 10073249c3046SmrgAC_DEFUN([AC_DISABLE_STATIC], 10074249c3046Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 100751477040fSmrg]) 100762ae83157Smrg 10077249c3046SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 10078249c3046SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 10079444c061aSmrg 10080249c3046Smrgdnl aclocal-1.4 backwards compatibility: 10081249c3046Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 10082249c3046Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 10083444c061aSmrg 10084249c3046Smrg 10085249c3046Smrg 10086249c3046Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 10087249c3046Smrg# ---------------------------------- 10088249c3046Smrg# implement the --enable-fast-install flag, and support the `fast-install' 10089249c3046Smrg# and `disable-fast-install' LT_INIT options. 10090249c3046Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10091249c3046Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 10092249c3046Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 10093249c3046SmrgAC_ARG_ENABLE([fast-install], 10094249c3046Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 10095249c3046Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 10096249c3046Smrg [p=${PACKAGE-default} 10097249c3046Smrg case $enableval in 10098249c3046Smrg yes) enable_fast_install=yes ;; 10099249c3046Smrg no) enable_fast_install=no ;; 10100249c3046Smrg *) 10101249c3046Smrg enable_fast_install=no 10102249c3046Smrg # Look at the argument we got. We use all the common list separators. 10103249c3046Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10104249c3046Smrg for pkg in $enableval; do 10105249c3046Smrg IFS="$lt_save_ifs" 10106249c3046Smrg if test "X$pkg" = "X$p"; then 10107249c3046Smrg enable_fast_install=yes 10108249c3046Smrg fi 10109249c3046Smrg done 10110249c3046Smrg IFS="$lt_save_ifs" 10111249c3046Smrg ;; 10112249c3046Smrg esac], 10113249c3046Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 10114249c3046Smrg 10115249c3046Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 10116249c3046Smrg [Whether or not to optimize for fast installation])dnl 10117249c3046Smrg])# _LT_ENABLE_FAST_INSTALL 10118249c3046Smrg 10119249c3046SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 10120249c3046SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 10121249c3046Smrg 10122249c3046Smrg# Old names: 10123249c3046SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 10124249c3046Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 10125249c3046SmrgAC_DIAGNOSE([obsolete], 10126249c3046Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10127249c3046Smrgthe `fast-install' option into LT_INIT's first parameter.]) 101281477040fSmrg]) 10129444c061aSmrg 10130249c3046SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 10131249c3046Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 10132249c3046SmrgAC_DIAGNOSE([obsolete], 10133249c3046Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10134249c3046Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 10135249c3046Smrg]) 10136444c061aSmrg 10137249c3046Smrgdnl aclocal-1.4 backwards compatibility: 10138249c3046Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 10139249c3046Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 10140249c3046Smrg 10141249c3046Smrg 10142249c3046Smrg# _LT_WITH_PIC([MODE]) 10143249c3046Smrg# -------------------- 10144249c3046Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 10145249c3046Smrg# LT_INIT options. 10146249c3046Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 10147249c3046Smrgm4_define([_LT_WITH_PIC], 10148249c3046Smrg[AC_ARG_WITH([pic], 10149249c3046Smrg [AS_HELP_STRING([--with-pic], 10150249c3046Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 10151249c3046Smrg [pic_mode="$withval"], 10152249c3046Smrg [pic_mode=default]) 10153444c061aSmrg 10154249c3046Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 10155444c061aSmrg 10156249c3046Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 10157249c3046Smrg])# _LT_WITH_PIC 101581477040fSmrg 10159249c3046SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 10160249c3046SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 101611477040fSmrg 10162249c3046Smrg# Old name: 10163249c3046SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 10164249c3046Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 10165249c3046SmrgAC_DIAGNOSE([obsolete], 10166249c3046Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10167249c3046Smrgput the `pic-only' option into LT_INIT's first parameter.]) 10168444c061aSmrg]) 10169444c061aSmrg 10170249c3046Smrgdnl aclocal-1.4 backwards compatibility: 10171249c3046Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 101722ae83157Smrg 10173444c061aSmrg 10174249c3046Smrgm4_define([_LTDL_MODE], []) 10175249c3046SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 10176249c3046Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 10177249c3046SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 10178249c3046Smrg [m4_define([_LTDL_MODE], [recursive])]) 10179249c3046SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 10180249c3046Smrg [m4_define([_LTDL_MODE], [subproject])]) 101812265a131Smrg 10182249c3046Smrgm4_define([_LTDL_TYPE], []) 10183249c3046SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 10184249c3046Smrg [m4_define([_LTDL_TYPE], [installable])]) 10185249c3046SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 10186249c3046Smrg [m4_define([_LTDL_TYPE], [convenience])]) 10187249c3046Smrg 10188249c3046Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 101892ae83157Smrg# 10190249c3046Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 10191249c3046Smrg# Written by Gary V. Vaughan, 2004 10192249c3046Smrg# 10193249c3046Smrg# This file is free software; the Free Software Foundation gives 10194249c3046Smrg# unlimited permission to copy and/or distribute it, with or without 10195249c3046Smrg# modifications, as long as this notice is preserved. 101962265a131Smrg 10197249c3046Smrg# serial 6 ltsugar.m4 10198444c061aSmrg 10199249c3046Smrg# This is to help aclocal find these macros, as it can't see m4_define. 10200249c3046SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 10201444c061aSmrg 102022265a131Smrg 10203249c3046Smrg# lt_join(SEP, ARG1, [ARG2...]) 10204249c3046Smrg# ----------------------------- 10205249c3046Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 10206249c3046Smrg# associated separator. 10207249c3046Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 10208249c3046Smrg# versions in m4sugar had bugs. 10209249c3046Smrgm4_define([lt_join], 10210249c3046Smrg[m4_if([$#], [1], [], 10211249c3046Smrg [$#], [2], [[$2]], 10212249c3046Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 10213249c3046Smrgm4_define([_lt_join], 10214249c3046Smrg[m4_if([$#$2], [2], [], 10215249c3046Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 102162265a131Smrg 102172ae83157Smrg 10218249c3046Smrg# lt_car(LIST) 10219249c3046Smrg# lt_cdr(LIST) 10220249c3046Smrg# ------------ 10221249c3046Smrg# Manipulate m4 lists. 10222249c3046Smrg# These macros are necessary as long as will still need to support 10223249c3046Smrg# Autoconf-2.59 which quotes differently. 10224249c3046Smrgm4_define([lt_car], [[$1]]) 10225249c3046Smrgm4_define([lt_cdr], 10226249c3046Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 10227249c3046Smrg [$#], 1, [], 10228249c3046Smrg [m4_dquote(m4_shift($@))])]) 10229249c3046Smrgm4_define([lt_unquote], $1) 102302ae83157Smrg 10231249c3046Smrg 10232249c3046Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 10233249c3046Smrg# ------------------------------------------ 10234249c3046Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 10235249c3046Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 10236249c3046Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 10237249c3046Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 10238249c3046Smrg# than defined and empty). 102391477040fSmrg# 10240249c3046Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 10241249c3046Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 10242249c3046Smrgm4_define([lt_append], 10243249c3046Smrg[m4_define([$1], 10244249c3046Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 102452ae83157Smrg 102462ae83157Smrg 102472ae83157Smrg 10248249c3046Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 10249249c3046Smrg# ---------------------------------------------------------- 10250249c3046Smrg# Produce a SEP delimited list of all paired combinations of elements of 10251249c3046Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 10252249c3046Smrg# has the form PREFIXmINFIXSUFFIXn. 10253249c3046Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 10254249c3046Smrgm4_define([lt_combine], 10255249c3046Smrg[m4_if(m4_eval([$# > 3]), [1], 10256249c3046Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 10257249c3046Smrg[[m4_foreach([_Lt_prefix], [$2], 10258249c3046Smrg [m4_foreach([_Lt_suffix], 10259249c3046Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 10260249c3046Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 102612ae83157Smrg 10262444c061aSmrg 10263249c3046Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 10264249c3046Smrg# ----------------------------------------------------------------------- 10265249c3046Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 10266249c3046Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 10267249c3046Smrgm4_define([lt_if_append_uniq], 10268249c3046Smrg[m4_ifdef([$1], 10269249c3046Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 10270249c3046Smrg [lt_append([$1], [$2], [$3])$4], 10271249c3046Smrg [$5])], 10272249c3046Smrg [lt_append([$1], [$2], [$3])$4])]) 102731477040fSmrg 10274444c061aSmrg 10275249c3046Smrg# lt_dict_add(DICT, KEY, VALUE) 10276249c3046Smrg# ----------------------------- 10277249c3046Smrgm4_define([lt_dict_add], 10278249c3046Smrg[m4_define([$1($2)], [$3])]) 10279249c3046Smrg 10280249c3046Smrg 10281249c3046Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 10282249c3046Smrg# -------------------------------------------- 10283249c3046Smrgm4_define([lt_dict_add_subkey], 10284249c3046Smrg[m4_define([$1($2:$3)], [$4])]) 10285249c3046Smrg 10286249c3046Smrg 10287249c3046Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 10288249c3046Smrg# ---------------------------------- 10289249c3046Smrgm4_define([lt_dict_fetch], 10290249c3046Smrg[m4_ifval([$3], 10291249c3046Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 10292249c3046Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 10293249c3046Smrg 102942265a131Smrg 10295249c3046Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 10296249c3046Smrg# ----------------------------------------------------------------- 10297249c3046Smrgm4_define([lt_if_dict_fetch], 10298249c3046Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 10299249c3046Smrg [$5], 10300249c3046Smrg [$6])]) 103012265a131Smrg 10302444c061aSmrg 10303249c3046Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 10304249c3046Smrg# -------------------------------------------------------------- 10305249c3046Smrgm4_define([lt_dict_filter], 10306249c3046Smrg[m4_if([$5], [], [], 10307249c3046Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 10308249c3046Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 10309249c3046Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 10310249c3046Smrg]) 103112ae83157Smrg 10312249c3046Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 103132ae83157Smrg# 10314249c3046Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 10315249c3046Smrg# Written by Scott James Remnant, 2004 10316249c3046Smrg# 10317249c3046Smrg# This file is free software; the Free Software Foundation gives 10318249c3046Smrg# unlimited permission to copy and/or distribute it, with or without 10319249c3046Smrg# modifications, as long as this notice is preserved. 103202265a131Smrg 10321249c3046Smrg# Generated from ltversion.in. 103222265a131Smrg 10323249c3046Smrg# serial 3175 ltversion.m4 10324249c3046Smrg# This file is part of GNU Libtool 10325444c061aSmrg 10326249c3046Smrgm4_define([LT_PACKAGE_VERSION], [2.2.10]) 10327249c3046Smrgm4_define([LT_PACKAGE_REVISION], [1.3175]) 10328444c061aSmrg 10329249c3046SmrgAC_DEFUN([LTVERSION_VERSION], 10330249c3046Smrg[macro_version='2.2.10' 10331249c3046Smrgmacro_revision='1.3175' 10332249c3046Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 10333249c3046Smrg_LT_DECL(, macro_revision, 0) 10334249c3046Smrg]) 10335444c061aSmrg 10336249c3046Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 103371477040fSmrg# 10338249c3046Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 10339249c3046Smrg# Written by Scott James Remnant, 2004. 10340249c3046Smrg# 10341249c3046Smrg# This file is free software; the Free Software Foundation gives 10342249c3046Smrg# unlimited permission to copy and/or distribute it, with or without 10343249c3046Smrg# modifications, as long as this notice is preserved. 10344444c061aSmrg 10345249c3046Smrg# serial 5 lt~obsolete.m4 10346444c061aSmrg 10347249c3046Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 103481477040fSmrg# 10349249c3046Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 10350249c3046Smrg# which have later been changed to m4_define as they aren't part of the 10351249c3046Smrg# exported API, or moved to Autoconf or Automake where they belong. 103521477040fSmrg# 10353249c3046Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 10354249c3046Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 10355249c3046Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 10356249c3046Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 10357249c3046Smrg# and doesn't know about Autoconf macros at all.) 10358249c3046Smrg# 10359249c3046Smrg# So we provide this file, which has a silly filename so it's always 10360249c3046Smrg# included after everything else. This provides aclocal with the 10361249c3046Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 10362249c3046Smrg# because those macros already exist, or will be overwritten later. 10363249c3046Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 10364249c3046Smrg# 10365249c3046Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 10366249c3046Smrg# Yes, that means every name once taken will need to remain here until 10367249c3046Smrg# we give up compatibility with versions before 1.7, at which point 10368249c3046Smrg# we need to keep only those names which we still refer to. 10369444c061aSmrg 10370249c3046Smrg# This is to help aclocal find these macros, as it can't see m4_define. 10371249c3046SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 103722265a131Smrg 10373249c3046Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 10374249c3046Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 10375249c3046Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 10376249c3046Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 10377249c3046Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 10378249c3046Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 10379249c3046Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 10380249c3046Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 10381249c3046Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 10382249c3046Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 10383249c3046Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 10384249c3046Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 10385249c3046Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 10386249c3046Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 10387249c3046Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 10388249c3046Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 10389249c3046Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 10390249c3046Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 10391249c3046Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 10392249c3046Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 10393249c3046Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 10394249c3046Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 10395249c3046Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 10396249c3046Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 10397249c3046Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 10398249c3046Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 10399249c3046Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 10400249c3046Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 10401249c3046Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 10402249c3046Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 10403249c3046Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 10404249c3046Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 10405249c3046Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 10406249c3046Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 10407249c3046Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 10408249c3046Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 10409249c3046Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 10410249c3046Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 10411249c3046Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 10412249c3046Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 10413249c3046Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 10414249c3046Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 10415249c3046Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 10416249c3046Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 10417249c3046Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 10418249c3046Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 10419249c3046Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 10420249c3046Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 10421249c3046Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 10422249c3046Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 10423249c3046Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 10424249c3046Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 10425249c3046Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 10426249c3046Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 10427249c3046Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 10428249c3046Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 10429249c3046Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 10430249c3046Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 10431249c3046Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 10432249c3046Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 10433249c3046Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 10434444c061aSmrg 10435