aclocal.m4 revision b9b4fd27
1b9b4fd27Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2caade7ccSmrg 3caade7ccSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4485f0483Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5caade7ccSmrg# This file is free software; the Free Software Foundation 6caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 7caade7ccSmrg# with or without modifications, as long as this notice is preserved. 8caade7ccSmrg 9caade7ccSmrg# This program is distributed in the hope that it will be useful, 10caade7ccSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11caade7ccSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12caade7ccSmrg# PARTICULAR PURPOSE. 13caade7ccSmrg 14485f0483Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15485f0483Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16b9b4fd27Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 17b9b4fd27Smrg[m4_warning([this file was generated for autoconf 2.65. 18485f0483SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19485f0483SmrgIf you have problems, you may need to regenerate the build system entirely. 20485f0483SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21caade7ccSmrg 22485f0483Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23caade7ccSmrg# 24caade7ccSmrg# This file is free software; the Free Software Foundation 25caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 26caade7ccSmrg# with or without modifications, as long as this notice is preserved. 27caade7ccSmrg 28caade7ccSmrg# AM_AUTOMAKE_VERSION(VERSION) 29caade7ccSmrg# ---------------------------- 30caade7ccSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31caade7ccSmrg# generated from the m4 files accompanying Automake X.Y. 32caade7ccSmrg# (This private macro should not be called outside this file.) 33caade7ccSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 34485f0483Smrg[am__api_version='1.11' 35caade7ccSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36caade7ccSmrgdnl require some minimum version. Point them to the right macro. 37b9b4fd27Smrgm4_if([$1], [1.11.1], [], 38caade7ccSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39caade7ccSmrg]) 40caade7ccSmrg 41caade7ccSmrg# _AM_AUTOCONF_VERSION(VERSION) 42caade7ccSmrg# ----------------------------- 43caade7ccSmrg# aclocal traces this macro to find the Autoconf version. 44caade7ccSmrg# This is a private macro too. Using m4_define simplifies 45caade7ccSmrg# the logic in aclocal, which can simply ignore this definition. 46caade7ccSmrgm4_define([_AM_AUTOCONF_VERSION], []) 47caade7ccSmrg 48caade7ccSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49caade7ccSmrg# ------------------------------- 50caade7ccSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51485f0483Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52caade7ccSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53b9b4fd27Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 54485f0483Smrgm4_ifndef([AC_AUTOCONF_VERSION], 55485f0483Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56485f0483Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57caade7ccSmrg 58caade7ccSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59caade7ccSmrg 60caade7ccSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61caade7ccSmrg# 62caade7ccSmrg# This file is free software; the Free Software Foundation 63caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 64caade7ccSmrg# with or without modifications, as long as this notice is preserved. 65caade7ccSmrg 66caade7ccSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67caade7ccSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68caade7ccSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69caade7ccSmrg# 70caade7ccSmrg# Of course, Automake must honor this variable whenever it calls a 71caade7ccSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 72caade7ccSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73caade7ccSmrg# depending on how configure is run. This is pretty annoying, since 74caade7ccSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75caade7ccSmrg# source directory, any form will work fine, but in subdirectories a 76caade7ccSmrg# relative path needs to be adjusted first. 77caade7ccSmrg# 78caade7ccSmrg# $ac_aux_dir/missing 79caade7ccSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 80caade7ccSmrg# $top_srcdir/$ac_aux_dir/missing 81caade7ccSmrg# fails if $ac_aux_dir is absolute, 82caade7ccSmrg# fails when called from a subdirectory in a VPATH build with 83caade7ccSmrg# a relative $ac_aux_dir 84caade7ccSmrg# 85caade7ccSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86caade7ccSmrg# are both prefixed by $srcdir. In an in-source build this is usually 87caade7ccSmrg# harmless because $srcdir is `.', but things will broke when you 88caade7ccSmrg# start a VPATH build or use an absolute $srcdir. 89caade7ccSmrg# 90caade7ccSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91caade7ccSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92caade7ccSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93caade7ccSmrg# and then we would define $MISSING as 94caade7ccSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 95caade7ccSmrg# This will work as long as MISSING is not called from configure, because 96caade7ccSmrg# unfortunately $(top_srcdir) has no meaning in configure. 97caade7ccSmrg# However there are other variables, like CC, which are often used in 98caade7ccSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99caade7ccSmrg# 100caade7ccSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 101caade7ccSmrg# absolute PATH. The drawback is that using absolute paths prevent a 102caade7ccSmrg# configured tree to be moved without reconfiguration. 103caade7ccSmrg 104caade7ccSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 105caade7ccSmrg[dnl Rely on autoconf to set up CDPATH properly. 106caade7ccSmrgAC_PREREQ([2.50])dnl 107caade7ccSmrg# expand $ac_aux_dir to an absolute path 108caade7ccSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 109caade7ccSmrg]) 110caade7ccSmrg 111caade7ccSmrg# AM_CONDITIONAL -*- Autoconf -*- 112caade7ccSmrg 113485f0483Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114caade7ccSmrg# Free Software Foundation, Inc. 115caade7ccSmrg# 116caade7ccSmrg# This file is free software; the Free Software Foundation 117caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 118caade7ccSmrg# with or without modifications, as long as this notice is preserved. 119caade7ccSmrg 120485f0483Smrg# serial 9 121caade7ccSmrg 122caade7ccSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 123caade7ccSmrg# ------------------------------------- 124caade7ccSmrg# Define a conditional. 125caade7ccSmrgAC_DEFUN([AM_CONDITIONAL], 126caade7ccSmrg[AC_PREREQ(2.52)dnl 127caade7ccSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 128caade7ccSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 129caade7ccSmrgAC_SUBST([$1_TRUE])dnl 130caade7ccSmrgAC_SUBST([$1_FALSE])dnl 131caade7ccSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 132caade7ccSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 133485f0483Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 134caade7ccSmrgif $2; then 135caade7ccSmrg $1_TRUE= 136caade7ccSmrg $1_FALSE='#' 137caade7ccSmrgelse 138caade7ccSmrg $1_TRUE='#' 139caade7ccSmrg $1_FALSE= 140caade7ccSmrgfi 141caade7ccSmrgAC_CONFIG_COMMANDS_PRE( 142caade7ccSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143caade7ccSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 144caade7ccSmrgUsually this means the macro was only invoked conditionally.]]) 145caade7ccSmrgfi])]) 146caade7ccSmrg 147485f0483Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 148caade7ccSmrg# Free Software Foundation, Inc. 149caade7ccSmrg# 150caade7ccSmrg# This file is free software; the Free Software Foundation 151caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 152caade7ccSmrg# with or without modifications, as long as this notice is preserved. 153caade7ccSmrg 154485f0483Smrg# serial 10 155caade7ccSmrg 156caade7ccSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157caade7ccSmrg# written in clear, in which case automake, when reading aclocal.m4, 158caade7ccSmrg# will think it sees a *use*, and therefore will trigger all it's 159caade7ccSmrg# C support machinery. Also note that it means that autoscan, seeing 160caade7ccSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161caade7ccSmrg 162caade7ccSmrg 163caade7ccSmrg# _AM_DEPENDENCIES(NAME) 164caade7ccSmrg# ---------------------- 165caade7ccSmrg# See how the compiler implements dependency checking. 166caade7ccSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167caade7ccSmrg# We try a few techniques and use that to set a single cache variable. 168caade7ccSmrg# 169caade7ccSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170caade7ccSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171caade7ccSmrg# dependency, and given that the user is not expected to run this macro, 172caade7ccSmrg# just rely on AC_PROG_CC. 173caade7ccSmrgAC_DEFUN([_AM_DEPENDENCIES], 174caade7ccSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175caade7ccSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176caade7ccSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177caade7ccSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178caade7ccSmrg 179caade7ccSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180caade7ccSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181caade7ccSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 182caade7ccSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183caade7ccSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184caade7ccSmrg [depcc="$$1" am_compiler_list=]) 185caade7ccSmrg 186caade7ccSmrgAC_CACHE_CHECK([dependency style of $depcc], 187caade7ccSmrg [am_cv_$1_dependencies_compiler_type], 188caade7ccSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189caade7ccSmrg # We make a subdir and do the tests there. Otherwise we can end up 190caade7ccSmrg # making bogus files that we don't know about and never remove. For 191caade7ccSmrg # instance it was reported that on HP-UX the gcc test will end up 192caade7ccSmrg # making a dummy file named `D' -- because `-MD' means `put the output 193caade7ccSmrg # in D'. 194caade7ccSmrg mkdir conftest.dir 195caade7ccSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 196caade7ccSmrg # using a relative directory. 197caade7ccSmrg cp "$am_depcomp" conftest.dir 198caade7ccSmrg cd conftest.dir 199caade7ccSmrg # We will build objects and dependencies in a subdirectory because 200caade7ccSmrg # it helps to detect inapplicable dependency modes. For instance 201caade7ccSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 202caade7ccSmrg # side effect of compilation, but ICC will put the dependencies in 203caade7ccSmrg # the current directory while Tru64 will put them in the object 204caade7ccSmrg # directory. 205caade7ccSmrg mkdir sub 206caade7ccSmrg 207caade7ccSmrg am_cv_$1_dependencies_compiler_type=none 208caade7ccSmrg if test "$am_compiler_list" = ""; then 209caade7ccSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210caade7ccSmrg fi 211485f0483Smrg am__universal=false 212485f0483Smrg m4_case([$1], [CC], 213485f0483Smrg [case " $depcc " in #( 214485f0483Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 215485f0483Smrg esac], 216485f0483Smrg [CXX], 217485f0483Smrg [case " $depcc " in #( 218485f0483Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 219485f0483Smrg esac]) 220485f0483Smrg 221caade7ccSmrg for depmode in $am_compiler_list; do 222caade7ccSmrg # Setup a source with many dependencies, because some compilers 223caade7ccSmrg # like to wrap large dependency lists on column 80 (with \), and 224caade7ccSmrg # we should not choose a depcomp mode which is confused by this. 225caade7ccSmrg # 226caade7ccSmrg # We need to recreate these files for each test, as the compiler may 227caade7ccSmrg # overwrite some of them when testing with obscure command lines. 228caade7ccSmrg # This happens at least with the AIX C compiler. 229caade7ccSmrg : > sub/conftest.c 230caade7ccSmrg for i in 1 2 3 4 5 6; do 231caade7ccSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 232caade7ccSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 233caade7ccSmrg # Solaris 8's {/usr,}/bin/sh. 234caade7ccSmrg touch sub/conftst$i.h 235caade7ccSmrg done 236caade7ccSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237caade7ccSmrg 238485f0483Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 239485f0483Smrg # mode. It turns out that the SunPro C++ compiler does not properly 240485f0483Smrg # handle `-M -o', and we need to detect this. Also, some Intel 241485f0483Smrg # versions had trouble with output in subdirs 242485f0483Smrg am__obj=sub/conftest.${OBJEXT-o} 243485f0483Smrg am__minus_obj="-o $am__obj" 244caade7ccSmrg case $depmode in 245485f0483Smrg gcc) 246485f0483Smrg # This depmode causes a compiler race in universal mode. 247485f0483Smrg test "$am__universal" = false || continue 248485f0483Smrg ;; 249caade7ccSmrg nosideeffect) 250caade7ccSmrg # after this tag, mechanisms are not by side-effect, so they'll 251caade7ccSmrg # only be used when explicitly requested 252caade7ccSmrg if test "x$enable_dependency_tracking" = xyes; then 253caade7ccSmrg continue 254caade7ccSmrg else 255caade7ccSmrg break 256caade7ccSmrg fi 257caade7ccSmrg ;; 258485f0483Smrg msvisualcpp | msvcmsys) 259485f0483Smrg # This compiler won't grok `-c -o', but also, the minuso test has 260485f0483Smrg # not run yet. These depmodes are late enough in the game, and 261485f0483Smrg # so weak that their functioning should not be impacted. 262485f0483Smrg am__obj=conftest.${OBJEXT-o} 263485f0483Smrg am__minus_obj= 264485f0483Smrg ;; 265caade7ccSmrg none) break ;; 266caade7ccSmrg esac 267caade7ccSmrg if depmode=$depmode \ 268485f0483Smrg source=sub/conftest.c object=$am__obj \ 269caade7ccSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 270485f0483Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271caade7ccSmrg >/dev/null 2>conftest.err && 272caade7ccSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273caade7ccSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 274485f0483Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275caade7ccSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276caade7ccSmrg # icc doesn't choke on unknown options, it will just issue warnings 277caade7ccSmrg # or remarks (even with -Werror). So we grep stderr for any message 278caade7ccSmrg # that says an option was ignored or not supported. 279caade7ccSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 280caade7ccSmrg # icc: Command line warning: ignoring option '-M'; no argument required 281caade7ccSmrg # The diagnosis changed in icc 8.0: 282caade7ccSmrg # icc: Command line remark: option '-MP' not supported 283caade7ccSmrg if (grep 'ignoring option' conftest.err || 284caade7ccSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285caade7ccSmrg am_cv_$1_dependencies_compiler_type=$depmode 286caade7ccSmrg break 287caade7ccSmrg fi 288caade7ccSmrg fi 289caade7ccSmrg done 290caade7ccSmrg 291caade7ccSmrg cd .. 292caade7ccSmrg rm -rf conftest.dir 293caade7ccSmrgelse 294caade7ccSmrg am_cv_$1_dependencies_compiler_type=none 295caade7ccSmrgfi 296caade7ccSmrg]) 297caade7ccSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298caade7ccSmrgAM_CONDITIONAL([am__fastdep$1], [ 299caade7ccSmrg test "x$enable_dependency_tracking" != xno \ 300caade7ccSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301caade7ccSmrg]) 302caade7ccSmrg 303caade7ccSmrg 304caade7ccSmrg# AM_SET_DEPDIR 305caade7ccSmrg# ------------- 306caade7ccSmrg# Choose a directory name for dependency files. 307caade7ccSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308caade7ccSmrgAC_DEFUN([AM_SET_DEPDIR], 309caade7ccSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310caade7ccSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311caade7ccSmrg]) 312caade7ccSmrg 313caade7ccSmrg 314caade7ccSmrg# AM_DEP_TRACK 315caade7ccSmrg# ------------ 316caade7ccSmrgAC_DEFUN([AM_DEP_TRACK], 317caade7ccSmrg[AC_ARG_ENABLE(dependency-tracking, 318caade7ccSmrg[ --disable-dependency-tracking speeds up one-time build 319caade7ccSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 320caade7ccSmrgif test "x$enable_dependency_tracking" != xno; then 321caade7ccSmrg am_depcomp="$ac_aux_dir/depcomp" 322caade7ccSmrg AMDEPBACKSLASH='\' 323caade7ccSmrgfi 324caade7ccSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 325caade7ccSmrgAC_SUBST([AMDEPBACKSLASH])dnl 326caade7ccSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327caade7ccSmrg]) 328caade7ccSmrg 329caade7ccSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330caade7ccSmrg 331485f0483Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 332caade7ccSmrg# Free Software Foundation, Inc. 333caade7ccSmrg# 334caade7ccSmrg# This file is free software; the Free Software Foundation 335caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 336caade7ccSmrg# with or without modifications, as long as this notice is preserved. 337caade7ccSmrg 338485f0483Smrg#serial 5 339caade7ccSmrg 340caade7ccSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341caade7ccSmrg# ------------------------------ 342caade7ccSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 343485f0483Smrg[{ 344485f0483Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 345485f0483Smrg # are listed without --file. Let's play safe and only enable the eval 346485f0483Smrg # if we detect the quoting. 347485f0483Smrg case $CONFIG_FILES in 348485f0483Smrg *\'*) eval set x "$CONFIG_FILES" ;; 349485f0483Smrg *) set x $CONFIG_FILES ;; 350485f0483Smrg esac 351485f0483Smrg shift 352485f0483Smrg for mf 353485f0483Smrg do 354485f0483Smrg # Strip MF so we end up with the name of the file. 355485f0483Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 356485f0483Smrg # Check whether this is an Automake generated Makefile or not. 357485f0483Smrg # We used to match only the files named `Makefile.in', but 358485f0483Smrg # some people rename them; so instead we look at the file content. 359485f0483Smrg # Grep'ing the first line is not enough: some people post-process 360485f0483Smrg # each Makefile.in and add a new line on top of each file to say so. 361485f0483Smrg # Grep'ing the whole file is not good either: AIX grep has a line 362485f0483Smrg # limit of 2048, but all sed's we know have understand at least 4000. 363485f0483Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 364485f0483Smrg dirpart=`AS_DIRNAME("$mf")` 365485f0483Smrg else 366485f0483Smrg continue 367485f0483Smrg fi 368485f0483Smrg # Extract the definition of DEPDIR, am__include, and am__quote 369485f0483Smrg # from the Makefile without running `make'. 370485f0483Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 371485f0483Smrg test -z "$DEPDIR" && continue 372485f0483Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 373485f0483Smrg test -z "am__include" && continue 374485f0483Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 375485f0483Smrg # When using ansi2knr, U may be empty or an underscore; expand it 376485f0483Smrg U=`sed -n 's/^U = //p' < "$mf"` 377485f0483Smrg # Find all dependency output files, they are included files with 378485f0483Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 379485f0483Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 380485f0483Smrg # expansion. 381485f0483Smrg for file in `sed -n " 382485f0483Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383485f0483Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 384485f0483Smrg # Make sure the directory exists. 385485f0483Smrg test -f "$dirpart/$file" && continue 386485f0483Smrg fdir=`AS_DIRNAME(["$file"])` 387485f0483Smrg AS_MKDIR_P([$dirpart/$fdir]) 388485f0483Smrg # echo "creating $dirpart/$file" 389485f0483Smrg echo '# dummy' > "$dirpart/$file" 390485f0483Smrg done 391caade7ccSmrg done 392485f0483Smrg} 393caade7ccSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394caade7ccSmrg 395caade7ccSmrg 396caade7ccSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397caade7ccSmrg# ----------------------------- 398caade7ccSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 399caade7ccSmrg# 400caade7ccSmrg# This code is only required when automatic dependency tracking 401caade7ccSmrg# is enabled. FIXME. This creates each `.P' file that we will 402caade7ccSmrg# need in order to bootstrap the dependency handling code. 403caade7ccSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404caade7ccSmrg[AC_CONFIG_COMMANDS([depfiles], 405caade7ccSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406caade7ccSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407caade7ccSmrg]) 408caade7ccSmrg 409caade7ccSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 410caade7ccSmrg# Free Software Foundation, Inc. 411caade7ccSmrg# 412caade7ccSmrg# This file is free software; the Free Software Foundation 413caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 414caade7ccSmrg# with or without modifications, as long as this notice is preserved. 415caade7ccSmrg 416caade7ccSmrg# serial 8 417caade7ccSmrg 418caade7ccSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 419caade7ccSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420caade7ccSmrg 421caade7ccSmrg# Do all the work for Automake. -*- Autoconf -*- 422caade7ccSmrg 423caade7ccSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 424485f0483Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 425caade7ccSmrg# 426caade7ccSmrg# This file is free software; the Free Software Foundation 427caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 428caade7ccSmrg# with or without modifications, as long as this notice is preserved. 429caade7ccSmrg 430485f0483Smrg# serial 16 431caade7ccSmrg 432caade7ccSmrg# This macro actually does too much. Some checks are only needed if 433caade7ccSmrg# your package does certain things. But this isn't really a big deal. 434caade7ccSmrg 435caade7ccSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 436caade7ccSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 437caade7ccSmrg# ----------------------------------------------- 438caade7ccSmrg# The call with PACKAGE and VERSION arguments is the old style 439caade7ccSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 440caade7ccSmrg# and VERSION should now be passed to AC_INIT and removed from 441caade7ccSmrg# the call to AM_INIT_AUTOMAKE. 442caade7ccSmrg# We support both call styles for the transition. After 443caade7ccSmrg# the next Automake release, Autoconf can make the AC_INIT 444caade7ccSmrg# arguments mandatory, and then we can depend on a new Autoconf 445caade7ccSmrg# release and drop the old call support. 446caade7ccSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 447485f0483Smrg[AC_PREREQ([2.62])dnl 448caade7ccSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 449caade7ccSmrgdnl the ones we care about. 450caade7ccSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 451caade7ccSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 452caade7ccSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 453caade7ccSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 454caade7ccSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 455caade7ccSmrg # is not polluted with repeated "-I." 456caade7ccSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 457caade7ccSmrg # test to see if srcdir already configured 458caade7ccSmrg if test -f $srcdir/config.status; then 459caade7ccSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 460caade7ccSmrg fi 461caade7ccSmrgfi 462caade7ccSmrg 463caade7ccSmrg# test whether we have cygpath 464caade7ccSmrgif test -z "$CYGPATH_W"; then 465caade7ccSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 466caade7ccSmrg CYGPATH_W='cygpath -w' 467caade7ccSmrg else 468caade7ccSmrg CYGPATH_W=echo 469caade7ccSmrg fi 470caade7ccSmrgfi 471caade7ccSmrgAC_SUBST([CYGPATH_W]) 472caade7ccSmrg 473caade7ccSmrg# Define the identity of the package. 474caade7ccSmrgdnl Distinguish between old-style and new-style calls. 475caade7ccSmrgm4_ifval([$2], 476caade7ccSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 477caade7ccSmrg AC_SUBST([PACKAGE], [$1])dnl 478caade7ccSmrg AC_SUBST([VERSION], [$2])], 479caade7ccSmrg[_AM_SET_OPTIONS([$1])dnl 480caade7ccSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 481caade7ccSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 482caade7ccSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 483caade7ccSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 484caade7ccSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 485caade7ccSmrg 486caade7ccSmrg_AM_IF_OPTION([no-define],, 487caade7ccSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 488caade7ccSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 489caade7ccSmrg 490caade7ccSmrg# Some tools Automake needs. 491caade7ccSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 492caade7ccSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 493caade7ccSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 494caade7ccSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 495caade7ccSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 496caade7ccSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 497caade7ccSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 498485f0483SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 499485f0483SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 500caade7ccSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 501caade7ccSmrg# We need awk for the "check" target. The system "awk" is bad on 502caade7ccSmrg# some platforms. 503caade7ccSmrgAC_REQUIRE([AC_PROG_AWK])dnl 504caade7ccSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 505caade7ccSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 506caade7ccSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507485f0483Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508485f0483Smrg [_AM_PROG_TAR([v7])])]) 509caade7ccSmrg_AM_IF_OPTION([no-dependencies],, 510caade7ccSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 511485f0483Smrg [_AM_DEPENDENCIES(CC)], 512485f0483Smrg [define([AC_PROG_CC], 513485f0483Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 514caade7ccSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 515485f0483Smrg [_AM_DEPENDENCIES(CXX)], 516485f0483Smrg [define([AC_PROG_CXX], 517485f0483Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 518caade7ccSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 519485f0483Smrg [_AM_DEPENDENCIES(OBJC)], 520485f0483Smrg [define([AC_PROG_OBJC], 521485f0483Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 522caade7ccSmrg]) 523485f0483Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 524485f0483Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 525485f0483Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 526485f0483Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 527485f0483SmrgAC_CONFIG_COMMANDS_PRE(dnl 528485f0483Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 529485f0483Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 530caade7ccSmrg]) 531caade7ccSmrg 532485f0483Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 533485f0483Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 534485f0483Smrgdnl mangled by Autoconf and run in a shell conditional statement. 535485f0483Smrgm4_define([_AC_COMPILER_EXEEXT], 536485f0483Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 537485f0483Smrg 538caade7ccSmrg 539caade7ccSmrg# When config.status generates a header, we must update the stamp-h file. 540caade7ccSmrg# This file resides in the same directory as the config header 541caade7ccSmrg# that is generated. The stamp files are numbered to have different names. 542caade7ccSmrg 543caade7ccSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 544caade7ccSmrg# loop where config.status creates the headers, so we can generate 545caade7ccSmrg# our stamp files there. 546caade7ccSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 547caade7ccSmrg[# Compute $1's index in $config_headers. 548485f0483Smrg_am_arg=$1 549caade7ccSmrg_am_stamp_count=1 550caade7ccSmrgfor _am_header in $config_headers :; do 551caade7ccSmrg case $_am_header in 552485f0483Smrg $_am_arg | $_am_arg:* ) 553caade7ccSmrg break ;; 554caade7ccSmrg * ) 555caade7ccSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 556caade7ccSmrg esac 557caade7ccSmrgdone 558485f0483Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 559caade7ccSmrg 560485f0483Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 561caade7ccSmrg# 562caade7ccSmrg# This file is free software; the Free Software Foundation 563caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 564caade7ccSmrg# with or without modifications, as long as this notice is preserved. 565caade7ccSmrg 566caade7ccSmrg# AM_PROG_INSTALL_SH 567caade7ccSmrg# ------------------ 568caade7ccSmrg# Define $install_sh. 569caade7ccSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 570caade7ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 571485f0483Smrgif test x"${install_sh}" != xset; then 572485f0483Smrg case $am_aux_dir in 573485f0483Smrg *\ * | *\ *) 574485f0483Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 575485f0483Smrg *) 576485f0483Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 577485f0483Smrg esac 578485f0483Smrgfi 579caade7ccSmrgAC_SUBST(install_sh)]) 580caade7ccSmrg 581caade7ccSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 582caade7ccSmrg# 583caade7ccSmrg# This file is free software; the Free Software Foundation 584caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 585caade7ccSmrg# with or without modifications, as long as this notice is preserved. 586caade7ccSmrg 587caade7ccSmrg# serial 2 588caade7ccSmrg 589caade7ccSmrg# Check whether the underlying file-system supports filenames 590caade7ccSmrg# with a leading dot. For instance MS-DOS doesn't. 591caade7ccSmrgAC_DEFUN([AM_SET_LEADING_DOT], 592caade7ccSmrg[rm -rf .tst 2>/dev/null 593caade7ccSmrgmkdir .tst 2>/dev/null 594caade7ccSmrgif test -d .tst; then 595caade7ccSmrg am__leading_dot=. 596caade7ccSmrgelse 597caade7ccSmrg am__leading_dot=_ 598caade7ccSmrgfi 599caade7ccSmrgrmdir .tst 2>/dev/null 600caade7ccSmrgAC_SUBST([am__leading_dot])]) 601caade7ccSmrg 602caade7ccSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 603caade7ccSmrg# From Jim Meyering 604caade7ccSmrg 605485f0483Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 606caade7ccSmrg# Free Software Foundation, Inc. 607caade7ccSmrg# 608caade7ccSmrg# This file is free software; the Free Software Foundation 609caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 610caade7ccSmrg# with or without modifications, as long as this notice is preserved. 611caade7ccSmrg 612485f0483Smrg# serial 5 613caade7ccSmrg 614485f0483Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 615485f0483Smrg# ---------------------------------- 616485f0483Smrg# Control maintainer-specific portions of Makefiles. 617485f0483Smrg# Default is to disable them, unless `enable' is passed literally. 618485f0483Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 619485f0483Smrg# can override the default with the --enable/--disable switch. 620caade7ccSmrgAC_DEFUN([AM_MAINTAINER_MODE], 621485f0483Smrg[m4_case(m4_default([$1], [disable]), 622485f0483Smrg [enable], [m4_define([am_maintainer_other], [disable])], 623485f0483Smrg [disable], [m4_define([am_maintainer_other], [enable])], 624485f0483Smrg [m4_define([am_maintainer_other], [enable]) 625485f0483Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 626485f0483SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 627485f0483Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 628485f0483Smrg AC_ARG_ENABLE([maintainer-mode], 629485f0483Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 630caade7ccSmrg (and sometimes confusing) to the casual installer], 631485f0483Smrg [USE_MAINTAINER_MODE=$enableval], 632485f0483Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633caade7ccSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 634485f0483Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635caade7ccSmrg MAINT=$MAINTAINER_MODE_TRUE 636485f0483Smrg AC_SUBST([MAINT])dnl 637caade7ccSmrg] 638caade7ccSmrg) 639caade7ccSmrg 640caade7ccSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 641caade7ccSmrg 642caade7ccSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 643caade7ccSmrg 644485f0483Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 645caade7ccSmrg# 646caade7ccSmrg# This file is free software; the Free Software Foundation 647caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 648caade7ccSmrg# with or without modifications, as long as this notice is preserved. 649caade7ccSmrg 650485f0483Smrg# serial 4 651caade7ccSmrg 652caade7ccSmrg# AM_MAKE_INCLUDE() 653caade7ccSmrg# ----------------- 654caade7ccSmrg# Check to see how make treats includes. 655caade7ccSmrgAC_DEFUN([AM_MAKE_INCLUDE], 656caade7ccSmrg[am_make=${MAKE-make} 657caade7ccSmrgcat > confinc << 'END' 658caade7ccSmrgam__doit: 659485f0483Smrg @echo this is the am__doit target 660caade7ccSmrg.PHONY: am__doit 661caade7ccSmrgEND 662caade7ccSmrg# If we don't find an include directive, just comment out the code. 663caade7ccSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 664caade7ccSmrgam__include="#" 665caade7ccSmrgam__quote= 666caade7ccSmrg_am_result=none 667caade7ccSmrg# First try GNU make style include. 668caade7ccSmrgecho "include confinc" > confmf 669485f0483Smrg# Ignore all kinds of additional output from `make'. 670485f0483Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 671485f0483Smrg*the\ am__doit\ target*) 672485f0483Smrg am__include=include 673485f0483Smrg am__quote= 674485f0483Smrg _am_result=GNU 675485f0483Smrg ;; 676485f0483Smrgesac 677caade7ccSmrg# Now try BSD make style include. 678caade7ccSmrgif test "$am__include" = "#"; then 679caade7ccSmrg echo '.include "confinc"' > confmf 680485f0483Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 681485f0483Smrg *the\ am__doit\ target*) 682485f0483Smrg am__include=.include 683485f0483Smrg am__quote="\"" 684485f0483Smrg _am_result=BSD 685485f0483Smrg ;; 686485f0483Smrg esac 687caade7ccSmrgfi 688caade7ccSmrgAC_SUBST([am__include]) 689caade7ccSmrgAC_SUBST([am__quote]) 690caade7ccSmrgAC_MSG_RESULT([$_am_result]) 691caade7ccSmrgrm -f confinc confmf 692caade7ccSmrg]) 693caade7ccSmrg 694caade7ccSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695caade7ccSmrg 696485f0483Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 697caade7ccSmrg# Free Software Foundation, Inc. 698caade7ccSmrg# 699caade7ccSmrg# This file is free software; the Free Software Foundation 700caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 701caade7ccSmrg# with or without modifications, as long as this notice is preserved. 702caade7ccSmrg 703485f0483Smrg# serial 6 704caade7ccSmrg 705caade7ccSmrg# AM_MISSING_PROG(NAME, PROGRAM) 706caade7ccSmrg# ------------------------------ 707caade7ccSmrgAC_DEFUN([AM_MISSING_PROG], 708caade7ccSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 709caade7ccSmrg$1=${$1-"${am_missing_run}$2"} 710caade7ccSmrgAC_SUBST($1)]) 711caade7ccSmrg 712caade7ccSmrg 713caade7ccSmrg# AM_MISSING_HAS_RUN 714caade7ccSmrg# ------------------ 715caade7ccSmrg# Define MISSING if not defined so far and test if it supports --run. 716caade7ccSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 717caade7ccSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 718caade7ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 719caade7ccSmrgAC_REQUIRE_AUX_FILE([missing])dnl 720485f0483Smrgif test x"${MISSING+set}" != xset; then 721485f0483Smrg case $am_aux_dir in 722485f0483Smrg *\ * | *\ *) 723485f0483Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 724485f0483Smrg *) 725485f0483Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 726485f0483Smrg esac 727485f0483Smrgfi 728caade7ccSmrg# Use eval to expand $SHELL 729caade7ccSmrgif eval "$MISSING --run true"; then 730caade7ccSmrg am_missing_run="$MISSING --run " 731caade7ccSmrgelse 732caade7ccSmrg am_missing_run= 733caade7ccSmrg AC_MSG_WARN([`missing' script is too old or missing]) 734caade7ccSmrgfi 735caade7ccSmrg]) 736caade7ccSmrg 737caade7ccSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 738caade7ccSmrg# 739caade7ccSmrg# This file is free software; the Free Software Foundation 740caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 741caade7ccSmrg# with or without modifications, as long as this notice is preserved. 742caade7ccSmrg 743caade7ccSmrg# AM_PROG_MKDIR_P 744caade7ccSmrg# --------------- 745caade7ccSmrg# Check for `mkdir -p'. 746caade7ccSmrgAC_DEFUN([AM_PROG_MKDIR_P], 747caade7ccSmrg[AC_PREREQ([2.60])dnl 748caade7ccSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 749caade7ccSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 750caade7ccSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 751caade7ccSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 752caade7ccSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 753caade7ccSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 754caade7ccSmrgdnl adjustment using top_builddir (which is defined more often than 755caade7ccSmrgdnl MKDIR_P). 756caade7ccSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 757caade7ccSmrgcase $mkdir_p in 758caade7ccSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 759caade7ccSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 760caade7ccSmrgesac 761caade7ccSmrg]) 762caade7ccSmrg 763caade7ccSmrg# Helper functions for option handling. -*- Autoconf -*- 764caade7ccSmrg 765485f0483Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 766caade7ccSmrg# 767caade7ccSmrg# This file is free software; the Free Software Foundation 768caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 769caade7ccSmrg# with or without modifications, as long as this notice is preserved. 770caade7ccSmrg 771485f0483Smrg# serial 4 772caade7ccSmrg 773caade7ccSmrg# _AM_MANGLE_OPTION(NAME) 774caade7ccSmrg# ----------------------- 775caade7ccSmrgAC_DEFUN([_AM_MANGLE_OPTION], 776caade7ccSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 777caade7ccSmrg 778caade7ccSmrg# _AM_SET_OPTION(NAME) 779caade7ccSmrg# ------------------------------ 780caade7ccSmrg# Set option NAME. Presently that only means defining a flag for this option. 781caade7ccSmrgAC_DEFUN([_AM_SET_OPTION], 782caade7ccSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 783caade7ccSmrg 784caade7ccSmrg# _AM_SET_OPTIONS(OPTIONS) 785caade7ccSmrg# ---------------------------------- 786caade7ccSmrg# OPTIONS is a space-separated list of Automake options. 787caade7ccSmrgAC_DEFUN([_AM_SET_OPTIONS], 788485f0483Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 789caade7ccSmrg 790caade7ccSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 791caade7ccSmrg# ------------------------------------------- 792caade7ccSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 793caade7ccSmrgAC_DEFUN([_AM_IF_OPTION], 794caade7ccSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 795caade7ccSmrg 796caade7ccSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 797caade7ccSmrg 798485f0483Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 799caade7ccSmrg# Free Software Foundation, Inc. 800caade7ccSmrg# 801caade7ccSmrg# This file is free software; the Free Software Foundation 802caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 803caade7ccSmrg# with or without modifications, as long as this notice is preserved. 804caade7ccSmrg 805485f0483Smrg# serial 5 806caade7ccSmrg 807caade7ccSmrg# AM_SANITY_CHECK 808caade7ccSmrg# --------------- 809caade7ccSmrgAC_DEFUN([AM_SANITY_CHECK], 810caade7ccSmrg[AC_MSG_CHECKING([whether build environment is sane]) 811caade7ccSmrg# Just in case 812caade7ccSmrgsleep 1 813caade7ccSmrgecho timestamp > conftest.file 814485f0483Smrg# Reject unsafe characters in $srcdir or the absolute working directory 815485f0483Smrg# name. Accept space and tab only in the latter. 816485f0483Smrgam_lf=' 817485f0483Smrg' 818485f0483Smrgcase `pwd` in 819485f0483Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 820485f0483Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 821485f0483Smrgesac 822485f0483Smrgcase $srcdir in 823485f0483Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 824485f0483Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 825485f0483Smrgesac 826485f0483Smrg 827caade7ccSmrg# Do `set' in a subshell so we don't clobber the current shell's 828caade7ccSmrg# arguments. Must try -L first in case configure is actually a 829caade7ccSmrg# symlink; some systems play weird games with the mod time of symlinks 830caade7ccSmrg# (eg FreeBSD returns the mod time of the symlink's containing 831caade7ccSmrg# directory). 832caade7ccSmrgif ( 833485f0483Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 834caade7ccSmrg if test "$[*]" = "X"; then 835caade7ccSmrg # -L didn't work. 836485f0483Smrg set X `ls -t "$srcdir/configure" conftest.file` 837caade7ccSmrg fi 838caade7ccSmrg rm -f conftest.file 839caade7ccSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 840caade7ccSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 841caade7ccSmrg 842caade7ccSmrg # If neither matched, then we have a broken ls. This can happen 843caade7ccSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 844caade7ccSmrg # broken ls alias from the environment. This has actually 845caade7ccSmrg # happened. Such a system could not be considered "sane". 846caade7ccSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 847caade7ccSmrgalias in your environment]) 848caade7ccSmrg fi 849caade7ccSmrg 850caade7ccSmrg test "$[2]" = conftest.file 851caade7ccSmrg ) 852caade7ccSmrgthen 853caade7ccSmrg # Ok. 854caade7ccSmrg : 855caade7ccSmrgelse 856caade7ccSmrg AC_MSG_ERROR([newly created file is older than distributed files! 857caade7ccSmrgCheck your system clock]) 858caade7ccSmrgfi 859caade7ccSmrgAC_MSG_RESULT(yes)]) 860caade7ccSmrg 861485f0483Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 862485f0483Smrg# 863485f0483Smrg# This file is free software; the Free Software Foundation 864485f0483Smrg# gives unlimited permission to copy and/or distribute it, 865485f0483Smrg# with or without modifications, as long as this notice is preserved. 866485f0483Smrg 867485f0483Smrg# serial 1 868485f0483Smrg 869485f0483Smrg# AM_SILENT_RULES([DEFAULT]) 870485f0483Smrg# -------------------------- 871485f0483Smrg# Enable less verbose build rules; with the default set to DEFAULT 872485f0483Smrg# (`yes' being less verbose, `no' or empty being verbose). 873485f0483SmrgAC_DEFUN([AM_SILENT_RULES], 874485f0483Smrg[AC_ARG_ENABLE([silent-rules], 875485f0483Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 876485f0483Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 877485f0483Smrgcase $enable_silent_rules in 878485f0483Smrgyes) AM_DEFAULT_VERBOSITY=0;; 879485f0483Smrgno) AM_DEFAULT_VERBOSITY=1;; 880485f0483Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 881485f0483Smrgesac 882485f0483SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 883485f0483SmrgAM_BACKSLASH='\' 884485f0483SmrgAC_SUBST([AM_BACKSLASH])dnl 885485f0483Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 886485f0483Smrg]) 887485f0483Smrg 888caade7ccSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889caade7ccSmrg# 890caade7ccSmrg# This file is free software; the Free Software Foundation 891caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 892caade7ccSmrg# with or without modifications, as long as this notice is preserved. 893caade7ccSmrg 894caade7ccSmrg# AM_PROG_INSTALL_STRIP 895caade7ccSmrg# --------------------- 896caade7ccSmrg# One issue with vendor `install' (even GNU) is that you can't 897caade7ccSmrg# specify the program used to strip binaries. This is especially 898caade7ccSmrg# annoying in cross-compiling environments, where the build's strip 899caade7ccSmrg# is unlikely to handle the host's binaries. 900caade7ccSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 901caade7ccSmrg# always use install-sh in `make install-strip', and initialize 902caade7ccSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 903caade7ccSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 904caade7ccSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 905caade7ccSmrg# Installed binaries are usually stripped using `strip' when the user 906caade7ccSmrg# run `make install-strip'. However `strip' might not be the right 907caade7ccSmrg# tool to use in cross-compilation environments, therefore Automake 908caade7ccSmrg# will honor the `STRIP' environment variable to overrule this program. 909caade7ccSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 910caade7ccSmrgif test "$cross_compiling" != no; then 911caade7ccSmrg AC_CHECK_TOOL([STRIP], [strip], :) 912caade7ccSmrgfi 913caade7ccSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 914caade7ccSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 915caade7ccSmrg 916485f0483Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 917caade7ccSmrg# 918caade7ccSmrg# This file is free software; the Free Software Foundation 919caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 920caade7ccSmrg# with or without modifications, as long as this notice is preserved. 921caade7ccSmrg 922485f0483Smrg# serial 2 923485f0483Smrg 924caade7ccSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 925caade7ccSmrg# --------------------------- 926485f0483Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 927caade7ccSmrg# This macro is traced by Automake. 928caade7ccSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 929caade7ccSmrg 930485f0483Smrg# AM_SUBST_NOTMAKE(VARIABLE) 931485f0483Smrg# --------------------------- 932485f0483Smrg# Public sister of _AM_SUBST_NOTMAKE. 933485f0483SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 934485f0483Smrg 935caade7ccSmrg# Check how to create a tarball. -*- Autoconf -*- 936caade7ccSmrg 937caade7ccSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 938caade7ccSmrg# 939caade7ccSmrg# This file is free software; the Free Software Foundation 940caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 941caade7ccSmrg# with or without modifications, as long as this notice is preserved. 942caade7ccSmrg 943caade7ccSmrg# serial 2 944caade7ccSmrg 945caade7ccSmrg# _AM_PROG_TAR(FORMAT) 946caade7ccSmrg# -------------------- 947caade7ccSmrg# Check how to create a tarball in format FORMAT. 948caade7ccSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 949caade7ccSmrg# 950caade7ccSmrg# Substitute a variable $(am__tar) that is a command 951caade7ccSmrg# writing to stdout a FORMAT-tarball containing the directory 952caade7ccSmrg# $tardir. 953caade7ccSmrg# tardir=directory && $(am__tar) > result.tar 954caade7ccSmrg# 955caade7ccSmrg# Substitute a variable $(am__untar) that extract such 956caade7ccSmrg# a tarball read from stdin. 957caade7ccSmrg# $(am__untar) < result.tar 958caade7ccSmrgAC_DEFUN([_AM_PROG_TAR], 959caade7ccSmrg[# Always define AMTAR for backward compatibility. 960caade7ccSmrgAM_MISSING_PROG([AMTAR], [tar]) 961caade7ccSmrgm4_if([$1], [v7], 962caade7ccSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 963caade7ccSmrg [m4_case([$1], [ustar],, [pax],, 964caade7ccSmrg [m4_fatal([Unknown tar format])]) 965caade7ccSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 966caade7ccSmrg# Loop over all known methods to create a tar archive until one works. 967caade7ccSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 968caade7ccSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 969caade7ccSmrg# Do not fold the above two line into one, because Tru64 sh and 970caade7ccSmrg# Solaris sh will not grok spaces in the rhs of `-'. 971caade7ccSmrgfor _am_tool in $_am_tools 972caade7ccSmrgdo 973caade7ccSmrg case $_am_tool in 974caade7ccSmrg gnutar) 975caade7ccSmrg for _am_tar in tar gnutar gtar; 976caade7ccSmrg do 977caade7ccSmrg AM_RUN_LOG([$_am_tar --version]) && break 978caade7ccSmrg done 979caade7ccSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 980caade7ccSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 981caade7ccSmrg am__untar="$_am_tar -xf -" 982caade7ccSmrg ;; 983caade7ccSmrg plaintar) 984caade7ccSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 985caade7ccSmrg # ustar tarball either. 986caade7ccSmrg (tar --version) >/dev/null 2>&1 && continue 987caade7ccSmrg am__tar='tar chf - "$$tardir"' 988caade7ccSmrg am__tar_='tar chf - "$tardir"' 989caade7ccSmrg am__untar='tar xf -' 990caade7ccSmrg ;; 991caade7ccSmrg pax) 992caade7ccSmrg am__tar='pax -L -x $1 -w "$$tardir"' 993caade7ccSmrg am__tar_='pax -L -x $1 -w "$tardir"' 994caade7ccSmrg am__untar='pax -r' 995caade7ccSmrg ;; 996caade7ccSmrg cpio) 997caade7ccSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 998caade7ccSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 999caade7ccSmrg am__untar='cpio -i -H $1 -d' 1000caade7ccSmrg ;; 1001caade7ccSmrg none) 1002caade7ccSmrg am__tar=false 1003caade7ccSmrg am__tar_=false 1004caade7ccSmrg am__untar=false 1005caade7ccSmrg ;; 1006caade7ccSmrg esac 1007caade7ccSmrg 1008caade7ccSmrg # If the value was cached, stop now. We just wanted to have am__tar 1009caade7ccSmrg # and am__untar set. 1010caade7ccSmrg test -n "${am_cv_prog_tar_$1}" && break 1011caade7ccSmrg 1012caade7ccSmrg # tar/untar a dummy directory, and stop if the command works 1013caade7ccSmrg rm -rf conftest.dir 1014caade7ccSmrg mkdir conftest.dir 1015caade7ccSmrg echo GrepMe > conftest.dir/file 1016caade7ccSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1017caade7ccSmrg rm -rf conftest.dir 1018caade7ccSmrg if test -s conftest.tar; then 1019caade7ccSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1020caade7ccSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1021caade7ccSmrg fi 1022caade7ccSmrgdone 1023caade7ccSmrgrm -rf conftest.dir 1024caade7ccSmrg 1025caade7ccSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1026caade7ccSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1027caade7ccSmrgAC_SUBST([am__tar]) 1028caade7ccSmrgAC_SUBST([am__untar]) 1029caade7ccSmrg]) # _AM_PROG_TAR 1030caade7ccSmrg 1031485f0483Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1032caade7ccSmrgdnl 1033caade7ccSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1034caade7ccSmrgdnl 1035caade7ccSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1036b9b4fd27Smrgdnl copy of this software and associated documentation files (the "Software"), 1037b9b4fd27Smrgdnl to deal in the Software without restriction, including without limitation 1038b9b4fd27Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1039b9b4fd27Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1040b9b4fd27Smrgdnl Software is furnished to do so, subject to the following conditions: 1041caade7ccSmrgdnl 1042b9b4fd27Smrgdnl The above copyright notice and this permission notice (including the next 1043b9b4fd27Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1044b9b4fd27Smrgdnl Software. 1045caade7ccSmrgdnl 1046b9b4fd27Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1047b9b4fd27Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1048b9b4fd27Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1049b9b4fd27Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1050b9b4fd27Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1051b9b4fd27Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1052b9b4fd27Smrgdnl DEALINGS IN THE SOFTWARE. 1053caade7ccSmrg 1054caade7ccSmrg# XORG_MACROS_VERSION(required-version) 1055caade7ccSmrg# ------------------------------------- 1056caade7ccSmrg# Minimum version: 1.1.0 1057caade7ccSmrg# 1058caade7ccSmrg# If you're using a macro added in Version 1.1 or newer, include this in 1059caade7ccSmrg# your configure.ac with the minimum required version, such as: 1060caade7ccSmrg# XORG_MACROS_VERSION(1.1) 1061caade7ccSmrg# 1062485f0483Smrg# To ensure that this macro is defined, also add: 1063485f0483Smrg# m4_ifndef([XORG_MACROS_VERSION], 1064485f0483Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1065caade7ccSmrg# 1066caade7ccSmrg# 1067caade7ccSmrg# See the "minimum version" comment for each macro you use to see what 1068caade7ccSmrg# version you require. 1069485f0483Smrgm4_defun([XORG_MACROS_VERSION],[ 1070b9b4fd27Smrgm4_define([vers_have], [1.7.0]) 1071485f0483Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1072485f0483Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1073485f0483Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1074485f0483Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1075485f0483Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1076485f0483Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1077485f0483Smrgm4_undefine([vers_have]) 1078485f0483Smrgm4_undefine([maj_have]) 1079485f0483Smrgm4_undefine([maj_needed]) 1080caade7ccSmrg]) # XORG_MACROS_VERSION 1081caade7ccSmrg 1082caade7ccSmrg# XORG_PROG_RAWCPP() 1083caade7ccSmrg# ------------------ 1084caade7ccSmrg# Minimum version: 1.0.0 1085caade7ccSmrg# 1086caade7ccSmrg# Find cpp program and necessary flags for use in pre-processing text files 1087caade7ccSmrg# such as man pages and config files 1088caade7ccSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1089caade7ccSmrgAC_REQUIRE([AC_PROG_CPP]) 1090caade7ccSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1091caade7ccSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1092caade7ccSmrg 1093caade7ccSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1094caade7ccSmrg# which is not the best choice for supporting other OS'es, but covers most 1095caade7ccSmrg# of the ones we need for now. 1096caade7ccSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1097caade7ccSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1098caade7ccSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1099caade7ccSmrg AC_MSG_RESULT([no]) 1100caade7ccSmrgelse 1101caade7ccSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1102caade7ccSmrg RAWCPPFLAGS=-undef 1103caade7ccSmrg AC_MSG_RESULT([yes]) 1104485f0483Smrg # under Cygwin unix is still defined even with -undef 1105485f0483Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1106485f0483Smrg RAWCPPFLAGS="-undef -ansi" 1107485f0483Smrg AC_MSG_RESULT([yes, with -ansi]) 1108caade7ccSmrg else 1109caade7ccSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1110caade7ccSmrg fi 1111caade7ccSmrgfi 1112caade7ccSmrgrm -f conftest.$ac_ext 1113caade7ccSmrg 1114caade7ccSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1115caade7ccSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1116caade7ccSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1117caade7ccSmrg AC_MSG_RESULT([no]) 1118caade7ccSmrgelse 1119caade7ccSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1120caade7ccSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1121caade7ccSmrg AC_MSG_RESULT([yes]) 1122caade7ccSmrg else 1123caade7ccSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1124caade7ccSmrg fi 1125caade7ccSmrgfi 1126caade7ccSmrgrm -f conftest.$ac_ext 1127caade7ccSmrgAC_SUBST(RAWCPPFLAGS) 1128caade7ccSmrg]) # XORG_PROG_RAWCPP 1129caade7ccSmrg 1130caade7ccSmrg# XORG_MANPAGE_SECTIONS() 1131caade7ccSmrg# ----------------------- 1132caade7ccSmrg# Minimum version: 1.0.0 1133caade7ccSmrg# 1134caade7ccSmrg# Determine which sections man pages go in for the different man page types 1135caade7ccSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1136caade7ccSmrg# Not sure if there's any better way than just hardcoding by OS name. 1137caade7ccSmrg# Override default settings by setting environment variables 1138b9b4fd27Smrg# Added MAN_SUBSTS in version 1.8 1139caade7ccSmrg 1140caade7ccSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1141caade7ccSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1142caade7ccSmrg 1143caade7ccSmrgif test x$APP_MAN_SUFFIX = x ; then 1144caade7ccSmrg APP_MAN_SUFFIX=1 1145caade7ccSmrgfi 1146caade7ccSmrgif test x$APP_MAN_DIR = x ; then 1147caade7ccSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1148caade7ccSmrgfi 1149caade7ccSmrg 1150caade7ccSmrgif test x$LIB_MAN_SUFFIX = x ; then 1151caade7ccSmrg LIB_MAN_SUFFIX=3 1152caade7ccSmrgfi 1153caade7ccSmrgif test x$LIB_MAN_DIR = x ; then 1154caade7ccSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1155caade7ccSmrgfi 1156caade7ccSmrg 1157caade7ccSmrgif test x$FILE_MAN_SUFFIX = x ; then 1158caade7ccSmrg case $host_os in 1159caade7ccSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 1160caade7ccSmrg *) FILE_MAN_SUFFIX=5 ;; 1161caade7ccSmrg esac 1162caade7ccSmrgfi 1163caade7ccSmrgif test x$FILE_MAN_DIR = x ; then 1164caade7ccSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1165caade7ccSmrgfi 1166caade7ccSmrg 1167caade7ccSmrgif test x$MISC_MAN_SUFFIX = x ; then 1168caade7ccSmrg case $host_os in 1169caade7ccSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 1170caade7ccSmrg *) MISC_MAN_SUFFIX=7 ;; 1171caade7ccSmrg esac 1172caade7ccSmrgfi 1173caade7ccSmrgif test x$MISC_MAN_DIR = x ; then 1174caade7ccSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1175caade7ccSmrgfi 1176caade7ccSmrg 1177caade7ccSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1178caade7ccSmrg case $host_os in 1179caade7ccSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1180caade7ccSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1181caade7ccSmrg esac 1182caade7ccSmrgfi 1183caade7ccSmrgif test x$DRIVER_MAN_DIR = x ; then 1184caade7ccSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1185caade7ccSmrgfi 1186caade7ccSmrg 1187caade7ccSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1188caade7ccSmrg case $host_os in 1189caade7ccSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1190caade7ccSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1191caade7ccSmrg esac 1192caade7ccSmrgfi 1193caade7ccSmrgif test x$ADMIN_MAN_DIR = x ; then 1194caade7ccSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1195caade7ccSmrgfi 1196caade7ccSmrg 1197caade7ccSmrg 1198caade7ccSmrgAC_SUBST([APP_MAN_SUFFIX]) 1199caade7ccSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1200caade7ccSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1201caade7ccSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1202caade7ccSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1203caade7ccSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1204caade7ccSmrgAC_SUBST([APP_MAN_DIR]) 1205caade7ccSmrgAC_SUBST([LIB_MAN_DIR]) 1206caade7ccSmrgAC_SUBST([FILE_MAN_DIR]) 1207caade7ccSmrgAC_SUBST([MISC_MAN_DIR]) 1208caade7ccSmrgAC_SUBST([DRIVER_MAN_DIR]) 1209caade7ccSmrgAC_SUBST([ADMIN_MAN_DIR]) 1210b9b4fd27Smrg 1211b9b4fd27SmrgXORG_MAN_PAGE="X Version 11" 1212b9b4fd27SmrgAC_SUBST([XORG_MAN_PAGE]) 1213b9b4fd27SmrgMAN_SUBSTS="\ 1214b9b4fd27Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1215b9b4fd27Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1216b9b4fd27Smrg -e 's|__xservername__|Xorg|g' \ 1217b9b4fd27Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1218b9b4fd27Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1219b9b4fd27Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1220b9b4fd27Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1221b9b4fd27Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1222b9b4fd27Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1223b9b4fd27Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1224b9b4fd27Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1225b9b4fd27SmrgAC_SUBST([MAN_SUBSTS]) 1226b9b4fd27Smrg 1227caade7ccSmrg]) # XORG_MANPAGE_SECTIONS 1228caade7ccSmrg 1229b9b4fd27Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1230b9b4fd27Smrg# ------------------------ 1231b9b4fd27Smrg# Minimum version: 1.7.0 1232b9b4fd27Smrg# 1233b9b4fd27Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1234b9b4fd27Smrg# provided by xorg-sgml-doctools, if installed. 1235b9b4fd27SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1236b9b4fd27SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1237b9b4fd27SmrgXORG_SGML_PATH= 1238b9b4fd27SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1239b9b4fd27Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1240b9b4fd27Smrg [m4_ifval([$1],[:], 1241b9b4fd27Smrg [if test x"$cross_compiling" != x"yes" ; then 1242b9b4fd27Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1243b9b4fd27Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1244b9b4fd27Smrg fi]) 1245b9b4fd27Smrg ]) 1246b9b4fd27Smrg 1247b9b4fd27Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1248b9b4fd27Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1249b9b4fd27Smrgelse 1250b9b4fd27Smrg AC_MSG_RESULT([no]) 1251b9b4fd27Smrgfi 1252b9b4fd27Smrg 1253b9b4fd27SmrgAC_SUBST(XORG_SGML_PATH) 1254b9b4fd27Smrg]) # XORG_CHECK_SGML_DOCTOOLS 1255b9b4fd27Smrg 1256caade7ccSmrg# XORG_CHECK_LINUXDOC 1257caade7ccSmrg# ------------------- 1258caade7ccSmrg# Minimum version: 1.0.0 1259caade7ccSmrg# 1260caade7ccSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1261caade7ccSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1262caade7ccSmrg# Whether or not the necessary tools and files are found can be checked 1263caade7ccSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1264caade7ccSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1265b9b4fd27SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1266b9b4fd27SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1267caade7ccSmrg 1268caade7ccSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1269caade7ccSmrg 1270b9b4fd27SmrgAC_MSG_CHECKING([whether to build documentation]) 1271caade7ccSmrg 1272b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1273caade7ccSmrg BUILDDOC=yes 1274caade7ccSmrgelse 1275caade7ccSmrg BUILDDOC=no 1276caade7ccSmrgfi 1277caade7ccSmrg 1278caade7ccSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1279caade7ccSmrg 1280caade7ccSmrgAC_MSG_RESULT([$BUILDDOC]) 1281caade7ccSmrg 1282b9b4fd27SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1283caade7ccSmrg 1284b9b4fd27Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1285caade7ccSmrg BUILDPDFDOC=yes 1286caade7ccSmrgelse 1287caade7ccSmrg BUILDPDFDOC=no 1288caade7ccSmrgfi 1289caade7ccSmrg 1290caade7ccSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1291caade7ccSmrg 1292caade7ccSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1293caade7ccSmrg 1294b9b4fd27SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1295caade7ccSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1296caade7ccSmrgMAKE_PDF="$PS2PDF" 1297caade7ccSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1298caade7ccSmrg 1299caade7ccSmrgAC_SUBST(MAKE_TEXT) 1300caade7ccSmrgAC_SUBST(MAKE_PS) 1301caade7ccSmrgAC_SUBST(MAKE_PDF) 1302caade7ccSmrgAC_SUBST(MAKE_HTML) 1303caade7ccSmrg]) # XORG_CHECK_LINUXDOC 1304caade7ccSmrg 1305caade7ccSmrg# XORG_CHECK_DOCBOOK 1306caade7ccSmrg# ------------------- 1307caade7ccSmrg# Minimum version: 1.0.0 1308caade7ccSmrg# 1309caade7ccSmrg# Checks for the ability to build output formats from SGML DocBook source. 1310caade7ccSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1311caade7ccSmrg# indicates whether the necessary tools and files are found and, if set, 1312caade7ccSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1313caade7ccSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1314b9b4fd27SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1315b9b4fd27Smrg 1316caade7ccSmrgBUILDTXTDOC=no 1317caade7ccSmrgBUILDPDFDOC=no 1318caade7ccSmrgBUILDPSDOC=no 1319caade7ccSmrgBUILDHTMLDOC=no 1320caade7ccSmrg 1321caade7ccSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1322caade7ccSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1323caade7ccSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1324caade7ccSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1325caade7ccSmrg 1326b9b4fd27SmrgAC_MSG_CHECKING([whether to build text documentation]) 1327b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1328caade7ccSmrg test x$BUILD_TXTDOC != xno; then 1329caade7ccSmrg BUILDTXTDOC=yes 1330caade7ccSmrgfi 1331caade7ccSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1332caade7ccSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1333caade7ccSmrg 1334b9b4fd27SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1335b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1336caade7ccSmrg test x$BUILD_PDFDOC != xno; then 1337caade7ccSmrg BUILDPDFDOC=yes 1338caade7ccSmrgfi 1339caade7ccSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1340caade7ccSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1341caade7ccSmrg 1342b9b4fd27SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1343b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1344caade7ccSmrg test x$BUILD_PSDOC != xno; then 1345caade7ccSmrg BUILDPSDOC=yes 1346caade7ccSmrgfi 1347caade7ccSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1348caade7ccSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1349caade7ccSmrg 1350b9b4fd27SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1351b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1352caade7ccSmrg test x$BUILD_HTMLDOC != xno; then 1353caade7ccSmrg BUILDHTMLDOC=yes 1354caade7ccSmrgfi 1355caade7ccSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1356caade7ccSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1357caade7ccSmrg 1358caade7ccSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1359caade7ccSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1360caade7ccSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1361caade7ccSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1362caade7ccSmrg 1363caade7ccSmrgAC_SUBST(MAKE_TEXT) 1364caade7ccSmrgAC_SUBST(MAKE_PS) 1365caade7ccSmrgAC_SUBST(MAKE_PDF) 1366caade7ccSmrgAC_SUBST(MAKE_HTML) 1367caade7ccSmrg]) # XORG_CHECK_DOCBOOK 1368caade7ccSmrg 1369b9b4fd27Smrg# XORG_WITH_XMLTO([MIN-VERSION]) 1370b9b4fd27Smrg# ---------------- 1371b9b4fd27Smrg# Minimum version: 1.5.0 1372b9b4fd27Smrg# 1373b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1374b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1375b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1376b9b4fd27Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1377b9b4fd27Smrg# as whether or not to use the xmlto package. 1378b9b4fd27Smrg# 1379b9b4fd27Smrg# Interface to module: 1380b9b4fd27Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1381b9b4fd27Smrg# XMLTO: returns the path of the xmlto program found 1382b9b4fd27Smrg# returns the path set by the user in the environment 1383b9b4fd27Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1384b9b4fd27Smrg# 'no' user instructs the module not to use xmlto 1385b9b4fd27Smrg# 1386b9b4fd27Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1387b9b4fd27Smrg# 1388b9b4fd27SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1389b9b4fd27SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1390b9b4fd27SmrgAC_ARG_WITH(xmlto, 1391b9b4fd27Smrg AS_HELP_STRING([--with-xmlto], 1392b9b4fd27Smrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 1393b9b4fd27Smrg [use_xmlto=$withval], [use_xmlto=auto]) 1394b9b4fd27Smrg 1395b9b4fd27Smrgif test "x$use_xmlto" = x"auto"; then 1396b9b4fd27Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1397b9b4fd27Smrg if test "x$XMLTO" = "x"; then 1398b9b4fd27Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1399b9b4fd27Smrg have_xmlto=no 1400b9b4fd27Smrg else 1401b9b4fd27Smrg have_xmlto=yes 1402b9b4fd27Smrg fi 1403b9b4fd27Smrgelif test "x$use_xmlto" = x"yes" ; then 1404b9b4fd27Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1405b9b4fd27Smrg if test "x$XMLTO" = "x"; then 1406b9b4fd27Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1407b9b4fd27Smrg fi 1408b9b4fd27Smrg have_xmlto=yes 1409b9b4fd27Smrgelif test "x$use_xmlto" = x"no" ; then 1410b9b4fd27Smrg if test "x$XMLTO" != "x"; then 1411b9b4fd27Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1412b9b4fd27Smrg fi 1413b9b4fd27Smrg have_xmlto=no 1414b9b4fd27Smrgelse 1415b9b4fd27Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1416b9b4fd27Smrgfi 1417b9b4fd27Smrgm4_ifval([$1], 1418b9b4fd27Smrg[if test "$have_xmlto" = yes; then 1419b9b4fd27Smrg # scrape the xmlto version 1420b9b4fd27Smrg AC_MSG_CHECKING([the xmlto version]) 1421b9b4fd27Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1422b9b4fd27Smrg AC_MSG_RESULT([$xmlto_version]) 1423b9b4fd27Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1424b9b4fd27Smrg [if test "x$use_xmlto" = xauto; then 1425b9b4fd27Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1426b9b4fd27Smrg have_xmlto=no 1427b9b4fd27Smrg else 1428b9b4fd27Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1429b9b4fd27Smrg fi]) 1430b9b4fd27Smrgfi]) 1431b9b4fd27SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1432b9b4fd27Smrg]) # XORG_WITH_XMLTO 1433b9b4fd27Smrg 1434b9b4fd27Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 1435b9b4fd27Smrg# ---------------- 1436b9b4fd27Smrg# Minimum version: 1.5.0 1437b9b4fd27Smrg# 1438b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1439b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1440b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1441b9b4fd27Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1442b9b4fd27Smrg# as whether or not to use the asciidoc package. 1443b9b4fd27Smrg# 1444b9b4fd27Smrg# Interface to module: 1445b9b4fd27Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1446b9b4fd27Smrg# ASCIIDOC: returns the path of the asciidoc program found 1447b9b4fd27Smrg# returns the path set by the user in the environment 1448b9b4fd27Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1449b9b4fd27Smrg# 'no' user instructs the module not to use asciidoc 1450b9b4fd27Smrg# 1451b9b4fd27Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1452b9b4fd27Smrg# 1453b9b4fd27SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1454b9b4fd27SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1455b9b4fd27SmrgAC_ARG_WITH(asciidoc, 1456b9b4fd27Smrg AS_HELP_STRING([--with-asciidoc], 1457b9b4fd27Smrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 1458b9b4fd27Smrg [use_asciidoc=$withval], [use_asciidoc=auto]) 1459b9b4fd27Smrg 1460b9b4fd27Smrgif test "x$use_asciidoc" = x"auto"; then 1461b9b4fd27Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1462b9b4fd27Smrg if test "x$ASCIIDOC" = "x"; then 1463b9b4fd27Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1464b9b4fd27Smrg have_asciidoc=no 1465b9b4fd27Smrg else 1466b9b4fd27Smrg have_asciidoc=yes 1467b9b4fd27Smrg fi 1468b9b4fd27Smrgelif test "x$use_asciidoc" = x"yes" ; then 1469b9b4fd27Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1470b9b4fd27Smrg if test "x$ASCIIDOC" = "x"; then 1471b9b4fd27Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1472b9b4fd27Smrg fi 1473b9b4fd27Smrg have_asciidoc=yes 1474b9b4fd27Smrgelif test "x$use_asciidoc" = x"no" ; then 1475b9b4fd27Smrg if test "x$ASCIIDOC" != "x"; then 1476b9b4fd27Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1477b9b4fd27Smrg fi 1478b9b4fd27Smrg have_asciidoc=no 1479b9b4fd27Smrgelse 1480b9b4fd27Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1481b9b4fd27Smrgfi 1482b9b4fd27Smrgm4_ifval([$1], 1483b9b4fd27Smrg[if test "$have_asciidoc" = yes; then 1484b9b4fd27Smrg # scrape the asciidoc version 1485b9b4fd27Smrg AC_MSG_CHECKING([the asciidoc version]) 1486b9b4fd27Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1487b9b4fd27Smrg AC_MSG_RESULT([$asciidoc_version]) 1488b9b4fd27Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1489b9b4fd27Smrg [if test "x$use_asciidoc" = xauto; then 1490b9b4fd27Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1491b9b4fd27Smrg have_asciidoc=no 1492b9b4fd27Smrg else 1493b9b4fd27Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1494b9b4fd27Smrg fi]) 1495b9b4fd27Smrgfi]) 1496b9b4fd27SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1497b9b4fd27Smrg]) # XORG_WITH_ASCIIDOC 1498b9b4fd27Smrg 1499b9b4fd27Smrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 1500b9b4fd27Smrg# -------------------------------- 1501b9b4fd27Smrg# Minimum version: 1.5.0 1502b9b4fd27Smrg# 1503b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1504b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1505b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1506b9b4fd27Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1507b9b4fd27Smrg# as whether or not to use the doxygen package. 1508b9b4fd27Smrg# 1509b9b4fd27Smrg# Interface to module: 1510b9b4fd27Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1511b9b4fd27Smrg# DOXYGEN: returns the path of the doxygen program found 1512b9b4fd27Smrg# returns the path set by the user in the environment 1513b9b4fd27Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1514b9b4fd27Smrg# 'no' user instructs the module not to use doxygen 1515b9b4fd27Smrg# 1516b9b4fd27Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1517b9b4fd27Smrg# 1518b9b4fd27SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1519b9b4fd27SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1520b9b4fd27SmrgAC_ARG_WITH(doxygen, 1521b9b4fd27Smrg AS_HELP_STRING([--with-doxygen], 1522b9b4fd27Smrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 1523b9b4fd27Smrg [use_doxygen=$withval], [use_doxygen=auto]) 1524b9b4fd27Smrg 1525b9b4fd27Smrgif test "x$use_doxygen" = x"auto"; then 1526b9b4fd27Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1527b9b4fd27Smrg if test "x$DOXYGEN" = "x"; then 1528b9b4fd27Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1529b9b4fd27Smrg have_doxygen=no 1530b9b4fd27Smrg else 1531b9b4fd27Smrg have_doxygen=yes 1532b9b4fd27Smrg fi 1533b9b4fd27Smrgelif test "x$use_doxygen" = x"yes" ; then 1534b9b4fd27Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1535b9b4fd27Smrg if test "x$DOXYGEN" = "x"; then 1536b9b4fd27Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1537b9b4fd27Smrg fi 1538b9b4fd27Smrg have_doxygen=yes 1539b9b4fd27Smrgelif test "x$use_doxygen" = x"no" ; then 1540b9b4fd27Smrg if test "x$DOXYGEN" != "x"; then 1541b9b4fd27Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1542b9b4fd27Smrg fi 1543b9b4fd27Smrg have_doxygen=no 1544b9b4fd27Smrgelse 1545b9b4fd27Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1546b9b4fd27Smrgfi 1547b9b4fd27Smrgm4_ifval([$1], 1548b9b4fd27Smrg[if test "$have_doxygen" = yes; then 1549b9b4fd27Smrg # scrape the doxygen version 1550b9b4fd27Smrg AC_MSG_CHECKING([the doxygen version]) 1551b9b4fd27Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1552b9b4fd27Smrg AC_MSG_RESULT([$doxygen_version]) 1553b9b4fd27Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1554b9b4fd27Smrg [if test "x$use_doxygen" = xauto; then 1555b9b4fd27Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1556b9b4fd27Smrg have_doxygen=no 1557b9b4fd27Smrg else 1558b9b4fd27Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1559b9b4fd27Smrg fi]) 1560b9b4fd27Smrgfi]) 1561b9b4fd27SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1562b9b4fd27Smrg]) # XORG_WITH_DOXYGEN 1563b9b4fd27Smrg 1564b9b4fd27Smrg# XORG_WITH_GROFF 1565b9b4fd27Smrg# ---------------- 1566b9b4fd27Smrg# Minimum version: 1.6.0 1567b9b4fd27Smrg# 1568b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1569b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1570b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1571b9b4fd27Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1572b9b4fd27Smrg# as whether or not to use the groff package. 1573b9b4fd27Smrg# 1574b9b4fd27Smrg# Interface to module: 1575b9b4fd27Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1576b9b4fd27Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1577b9b4fd27Smrg# HAVE_GROFF_MS: the -ms macros package 1578b9b4fd27Smrg# GROFF: returns the path of the groff program found 1579b9b4fd27Smrg# returns the path set by the user in the environment 1580b9b4fd27Smrg# --with-groff: 'yes' user instructs the module to use groff 1581b9b4fd27Smrg# 'no' user instructs the module not to use groff 1582b9b4fd27Smrg# 1583b9b4fd27Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1584b9b4fd27Smrg# 1585b9b4fd27Smrg# OS and distros often splits groff in a basic and full package, the former 1586b9b4fd27Smrg# having the groff program and the later having devices, fonts and macros 1587b9b4fd27Smrg# Checking for the groff executable is not enough. 1588b9b4fd27Smrg# 1589b9b4fd27Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1590b9b4fd27Smrg# unset HAVE_GROFF or GROFF env variables. 1591b9b4fd27Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1592b9b4fd27Smrg# 1593b9b4fd27SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1594b9b4fd27SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1595b9b4fd27SmrgAC_ARG_WITH(groff, 1596b9b4fd27Smrg AS_HELP_STRING([--with-groff], 1597b9b4fd27Smrg [Use groff to regenerate documentation (default: yes, if installed)]), 1598b9b4fd27Smrg [use_groff=$withval], [use_groff=auto]) 1599b9b4fd27Smrg 1600b9b4fd27Smrgif test "x$use_groff" = x"auto"; then 1601b9b4fd27Smrg AC_PATH_PROG([GROFF], [groff]) 1602b9b4fd27Smrg if test "x$GROFF" = "x"; then 1603b9b4fd27Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1604b9b4fd27Smrg have_groff=no 1605b9b4fd27Smrg else 1606b9b4fd27Smrg have_groff=yes 1607b9b4fd27Smrg fi 1608b9b4fd27Smrgelif test "x$use_groff" = x"yes" ; then 1609b9b4fd27Smrg AC_PATH_PROG([GROFF], [groff]) 1610b9b4fd27Smrg if test "x$GROFF" = "x"; then 1611b9b4fd27Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1612b9b4fd27Smrg fi 1613b9b4fd27Smrg have_groff=yes 1614b9b4fd27Smrgelif test "x$use_groff" = x"no" ; then 1615b9b4fd27Smrg if test "x$GROFF" != "x"; then 1616b9b4fd27Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1617b9b4fd27Smrg fi 1618b9b4fd27Smrg have_groff=no 1619b9b4fd27Smrgelse 1620b9b4fd27Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1621b9b4fd27Smrgfi 1622b9b4fd27Smrg# We have groff, test for the presence of the macro packages 1623b9b4fd27Smrgif test "x$have_groff" = x"yes"; then 1624b9b4fd27Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1625b9b4fd27Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1626b9b4fd27Smrg groff_ms_works=yes 1627b9b4fd27Smrg else 1628b9b4fd27Smrg groff_ms_works=no 1629b9b4fd27Smrg fi 1630b9b4fd27Smrg AC_MSG_RESULT([$groff_ms_works]) 1631b9b4fd27Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1632b9b4fd27Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1633b9b4fd27Smrg groff_mm_works=yes 1634b9b4fd27Smrg else 1635b9b4fd27Smrg groff_mm_works=no 1636b9b4fd27Smrg fi 1637b9b4fd27Smrg AC_MSG_RESULT([$groff_mm_works]) 1638b9b4fd27Smrgfi 1639b9b4fd27SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1640b9b4fd27SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1641b9b4fd27SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1642b9b4fd27Smrg]) # XORG_WITH_GROFF 1643b9b4fd27Smrg 1644b9b4fd27Smrg# XORG_WITH_FOP 1645b9b4fd27Smrg# ---------------- 1646b9b4fd27Smrg# Minimum version: 1.6.0 1647b9b4fd27Smrg# 1648b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1649b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1650b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1651b9b4fd27Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1652b9b4fd27Smrg# as whether or not to use the fop package. 1653b9b4fd27Smrg# 1654b9b4fd27Smrg# Interface to module: 1655b9b4fd27Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1656b9b4fd27Smrg# FOP: returns the path of the fop program found 1657b9b4fd27Smrg# returns the path set by the user in the environment 1658b9b4fd27Smrg# --with-fop: 'yes' user instructs the module to use fop 1659b9b4fd27Smrg# 'no' user instructs the module not to use fop 1660b9b4fd27Smrg# 1661b9b4fd27Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1662b9b4fd27Smrg# 1663b9b4fd27SmrgAC_DEFUN([XORG_WITH_FOP],[ 1664b9b4fd27SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1665b9b4fd27SmrgAC_ARG_WITH(fop, 1666b9b4fd27Smrg AS_HELP_STRING([--with-fop], 1667b9b4fd27Smrg [Use fop to regenerate documentation (default: yes, if installed)]), 1668b9b4fd27Smrg [use_fop=$withval], [use_fop=auto]) 1669b9b4fd27Smrg 1670b9b4fd27Smrgif test "x$use_fop" = x"auto"; then 1671b9b4fd27Smrg AC_PATH_PROG([FOP], [fop]) 1672b9b4fd27Smrg if test "x$FOP" = "x"; then 1673b9b4fd27Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1674b9b4fd27Smrg have_fop=no 1675b9b4fd27Smrg else 1676b9b4fd27Smrg have_fop=yes 1677b9b4fd27Smrg fi 1678b9b4fd27Smrgelif test "x$use_fop" = x"yes" ; then 1679b9b4fd27Smrg AC_PATH_PROG([FOP], [fop]) 1680b9b4fd27Smrg if test "x$FOP" = "x"; then 1681b9b4fd27Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1682b9b4fd27Smrg fi 1683b9b4fd27Smrg have_fop=yes 1684b9b4fd27Smrgelif test "x$use_fop" = x"no" ; then 1685b9b4fd27Smrg if test "x$FOP" != "x"; then 1686b9b4fd27Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1687b9b4fd27Smrg fi 1688b9b4fd27Smrg have_fop=no 1689b9b4fd27Smrgelse 1690b9b4fd27Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1691b9b4fd27Smrgfi 1692b9b4fd27SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1693b9b4fd27Smrg]) # XORG_WITH_FOP 1694b9b4fd27Smrg 1695b9b4fd27Smrg# XORG_WITH_PS2PDF 1696b9b4fd27Smrg# ---------------- 1697b9b4fd27Smrg# Minimum version: 1.6.0 1698b9b4fd27Smrg# 1699b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1700b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1701b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1702b9b4fd27Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1703b9b4fd27Smrg# as whether or not to use the ps2pdf package. 1704b9b4fd27Smrg# 1705b9b4fd27Smrg# Interface to module: 1706b9b4fd27Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1707b9b4fd27Smrg# PS2PDF: returns the path of the ps2pdf program found 1708b9b4fd27Smrg# returns the path set by the user in the environment 1709b9b4fd27Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1710b9b4fd27Smrg# 'no' user instructs the module not to use ps2pdf 1711b9b4fd27Smrg# 1712b9b4fd27Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1713b9b4fd27Smrg# 1714b9b4fd27SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1715b9b4fd27SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1716b9b4fd27SmrgAC_ARG_WITH(ps2pdf, 1717b9b4fd27Smrg AS_HELP_STRING([--with-ps2pdf], 1718b9b4fd27Smrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 1719b9b4fd27Smrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 1720b9b4fd27Smrg 1721b9b4fd27Smrgif test "x$use_ps2pdf" = x"auto"; then 1722b9b4fd27Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1723b9b4fd27Smrg if test "x$PS2PDF" = "x"; then 1724b9b4fd27Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1725b9b4fd27Smrg have_ps2pdf=no 1726b9b4fd27Smrg else 1727b9b4fd27Smrg have_ps2pdf=yes 1728b9b4fd27Smrg fi 1729b9b4fd27Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1730b9b4fd27Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1731b9b4fd27Smrg if test "x$PS2PDF" = "x"; then 1732b9b4fd27Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1733b9b4fd27Smrg fi 1734b9b4fd27Smrg have_ps2pdf=yes 1735b9b4fd27Smrgelif test "x$use_ps2pdf" = x"no" ; then 1736b9b4fd27Smrg if test "x$PS2PDF" != "x"; then 1737b9b4fd27Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1738b9b4fd27Smrg fi 1739b9b4fd27Smrg have_ps2pdf=no 1740b9b4fd27Smrgelse 1741b9b4fd27Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1742b9b4fd27Smrgfi 1743b9b4fd27SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1744b9b4fd27Smrg]) # XORG_WITH_PS2PDF 1745b9b4fd27Smrg 1746b9b4fd27Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1747b9b4fd27Smrg# ---------------- 1748b9b4fd27Smrg# Minimum version: 1.6.0 1749b9b4fd27Smrg# 1750b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1751b9b4fd27Smrg# not at the appropriate level. This macro enables a builder to skip all 1752b9b4fd27Smrg# documentation targets except traditional man pages. 1753b9b4fd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1754b9b4fd27Smrg# maximum flexibilty in controlling documentation building. 1755b9b4fd27Smrg# Refer to: 1756b9b4fd27Smrg# XORG_WITH_XMLTO --with-xmlto 1757b9b4fd27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1758b9b4fd27Smrg# XORG_WITH_DOXYGEN --with-doxygen 1759b9b4fd27Smrg# XORG_WITH_FOP --with-fop 1760b9b4fd27Smrg# XORG_WITH_GROFF --with-groff 1761b9b4fd27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1762b9b4fd27Smrg# 1763b9b4fd27Smrg# Interface to module: 1764b9b4fd27Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1765b9b4fd27Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1766b9b4fd27Smrg# 'no' user instructs the module not to generate docs 1767b9b4fd27Smrg# parm1: specify the default value, yes or no. 1768b9b4fd27Smrg# 1769b9b4fd27SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1770b9b4fd27Smrgdefault=$1 1771b9b4fd27Smrgif test "x$default" = x ; then 1772b9b4fd27Smrg default="yes" 1773b9b4fd27Smrgfi 1774b9b4fd27SmrgAC_ARG_ENABLE(docs, 1775b9b4fd27Smrg AS_HELP_STRING([--enable-docs], 1776b9b4fd27Smrg [Enable building the documentation (default: yes)]), 1777b9b4fd27Smrg [build_docs=$enableval], [build_docs=$default]) 1778b9b4fd27SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1779b9b4fd27SmrgAC_MSG_CHECKING([whether to build documentation]) 1780b9b4fd27SmrgAC_MSG_RESULT([$build_docs]) 1781b9b4fd27Smrg]) # XORG_ENABLE_DOCS 1782b9b4fd27Smrg 1783b9b4fd27Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1784b9b4fd27Smrg# ---------------- 1785b9b4fd27Smrg# Minimum version: 1.6.0 1786b9b4fd27Smrg# 1787b9b4fd27Smrg# This macro enables a builder to skip all developer documentation. 1788b9b4fd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1789b9b4fd27Smrg# maximum flexibilty in controlling documentation building. 1790b9b4fd27Smrg# Refer to: 1791b9b4fd27Smrg# XORG_WITH_XMLTO --with-xmlto 1792b9b4fd27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1793b9b4fd27Smrg# XORG_WITH_DOXYGEN --with-doxygen 1794b9b4fd27Smrg# XORG_WITH_FOP --with-fop 1795b9b4fd27Smrg# XORG_WITH_GROFF --with-groff 1796b9b4fd27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1797b9b4fd27Smrg# 1798b9b4fd27Smrg# Interface to module: 1799b9b4fd27Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1800b9b4fd27Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1801b9b4fd27Smrg# 'no' user instructs the module not to generate developer docs 1802b9b4fd27Smrg# parm1: specify the default value, yes or no. 1803b9b4fd27Smrg# 1804b9b4fd27SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1805b9b4fd27Smrgdevel_default=$1 1806b9b4fd27Smrgif test "x$devel_default" = x ; then 1807b9b4fd27Smrg devel_default="yes" 1808b9b4fd27Smrgfi 1809b9b4fd27SmrgAC_ARG_ENABLE(devel-docs, 1810b9b4fd27Smrg AS_HELP_STRING([--enable-devel-docs], 1811b9b4fd27Smrg [Enable building the developer documentation (default: yes)]), 1812b9b4fd27Smrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 1813b9b4fd27SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1814b9b4fd27SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1815b9b4fd27SmrgAC_MSG_RESULT([$build_devel_docs]) 1816b9b4fd27Smrg]) # XORG_ENABLE_DEVEL_DOCS 1817b9b4fd27Smrg 1818b9b4fd27Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1819b9b4fd27Smrg# ---------------- 1820b9b4fd27Smrg# Minimum version: 1.6.0 1821b9b4fd27Smrg# 1822b9b4fd27Smrg# This macro enables a builder to skip all functional specification targets. 1823b9b4fd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1824b9b4fd27Smrg# maximum flexibilty in controlling documentation building. 1825b9b4fd27Smrg# Refer to: 1826b9b4fd27Smrg# XORG_WITH_XMLTO --with-xmlto 1827b9b4fd27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1828b9b4fd27Smrg# XORG_WITH_DOXYGEN --with-doxygen 1829b9b4fd27Smrg# XORG_WITH_FOP --with-fop 1830b9b4fd27Smrg# XORG_WITH_GROFF --with-groff 1831b9b4fd27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1832b9b4fd27Smrg# 1833b9b4fd27Smrg# Interface to module: 1834b9b4fd27Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1835b9b4fd27Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1836b9b4fd27Smrg# 'no' user instructs the module not to generate specs 1837b9b4fd27Smrg# parm1: specify the default value, yes or no. 1838b9b4fd27Smrg# 1839b9b4fd27SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1840b9b4fd27Smrgspec_default=$1 1841b9b4fd27Smrgif test "x$spec_default" = x ; then 1842b9b4fd27Smrg spec_default="yes" 1843b9b4fd27Smrgfi 1844b9b4fd27SmrgAC_ARG_ENABLE(specs, 1845b9b4fd27Smrg AS_HELP_STRING([--enable-specs], 1846b9b4fd27Smrg [Enable building the specs (default: yes)]), 1847b9b4fd27Smrg [build_specs=$enableval], [build_specs=$spec_default]) 1848b9b4fd27SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1849b9b4fd27SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1850b9b4fd27SmrgAC_MSG_RESULT([$build_specs]) 1851b9b4fd27Smrg]) # XORG_ENABLE_SPECS 1852b9b4fd27Smrg 1853caade7ccSmrg# XORG_CHECK_MALLOC_ZERO 1854caade7ccSmrg# ---------------------- 1855caade7ccSmrg# Minimum version: 1.0.0 1856caade7ccSmrg# 1857caade7ccSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1858caade7ccSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1859caade7ccSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1860caade7ccSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1861caade7ccSmrgAC_ARG_ENABLE(malloc0returnsnull, 1862485f0483Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1863caade7ccSmrg [malloc(0) returns NULL (default: auto)]), 1864caade7ccSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1865caade7ccSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1866caade7ccSmrg 1867caade7ccSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1868caade7ccSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1869caade7ccSmrg AC_RUN_IFELSE([ 1870caade7ccSmrgchar *malloc(); 1871caade7ccSmrgchar *realloc(); 1872caade7ccSmrgchar *calloc(); 1873caade7ccSmrgmain() { 1874caade7ccSmrg char *m0, *r0, *c0, *p; 1875caade7ccSmrg m0 = malloc(0); 1876caade7ccSmrg p = malloc(10); 1877caade7ccSmrg r0 = realloc(p,0); 1878caade7ccSmrg c0 = calloc(0); 1879caade7ccSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1880caade7ccSmrg}], 1881caade7ccSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 1882b9b4fd27Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1883b9b4fd27Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1884caade7ccSmrgfi 1885caade7ccSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1886caade7ccSmrg 1887caade7ccSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1888caade7ccSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1889caade7ccSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1890caade7ccSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1891caade7ccSmrgelse 1892caade7ccSmrg MALLOC_ZERO_CFLAGS="" 1893caade7ccSmrg XMALLOC_ZERO_CFLAGS="" 1894caade7ccSmrg XTMALLOC_ZERO_CFLAGS="" 1895caade7ccSmrgfi 1896caade7ccSmrg 1897caade7ccSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1898caade7ccSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1899caade7ccSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1900caade7ccSmrg]) # XORG_CHECK_MALLOC_ZERO 1901caade7ccSmrg 1902caade7ccSmrg# XORG_WITH_LINT() 1903caade7ccSmrg# ---------------- 1904caade7ccSmrg# Minimum version: 1.1.0 1905caade7ccSmrg# 1906caade7ccSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 1907caade7ccSmrg# is specified. (Use --with-lint=sparse for sparse.) 1908caade7ccSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 1909caade7ccSmrg# Sets $LINT_FLAGS to flags to pass to source checker 1910caade7ccSmrg# Sets LINT automake conditional if enabled (default: disabled) 1911caade7ccSmrg# 1912caade7ccSmrgAC_DEFUN([XORG_WITH_LINT],[ 1913caade7ccSmrg 1914caade7ccSmrg# Allow checking code with lint, sparse, etc. 1915485f0483SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1916caade7ccSmrg [Use a lint-style source code checker (default: disabled)])], 1917caade7ccSmrg [use_lint=$withval], [use_lint=no]) 1918caade7ccSmrgif test "x$use_lint" = "xyes" ; then 1919caade7ccSmrg LINT="lint" 1920caade7ccSmrgelse 1921caade7ccSmrg LINT="$use_lint" 1922caade7ccSmrgfi 1923caade7ccSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 1924caade7ccSmrg case $LINT in 1925caade7ccSmrg lint|*/lint) 1926caade7ccSmrg case $host_os in 1927caade7ccSmrg solaris*) 1928caade7ccSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1929caade7ccSmrg ;; 1930caade7ccSmrg esac 1931caade7ccSmrg ;; 1932caade7ccSmrg esac 1933caade7ccSmrgfi 1934caade7ccSmrg 1935caade7ccSmrgAC_SUBST(LINT) 1936caade7ccSmrgAC_SUBST(LINT_FLAGS) 1937caade7ccSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 1938caade7ccSmrg 1939caade7ccSmrg]) # XORG_WITH_LINT 1940caade7ccSmrg 1941caade7ccSmrg# XORG_LINT_LIBRARY(LIBNAME) 1942caade7ccSmrg# -------------------------- 1943caade7ccSmrg# Minimum version: 1.1.0 1944caade7ccSmrg# 1945caade7ccSmrg# Sets up flags for building lint libraries for checking programs that call 1946caade7ccSmrg# functions in the library. 1947caade7ccSmrg# Disabled by default, enable with --enable-lint-library 1948caade7ccSmrg# Sets: 1949caade7ccSmrg# @LINTLIB@ - name of lint library file to make 1950caade7ccSmrg# MAKE_LINT_LIB - automake conditional 1951caade7ccSmrg# 1952caade7ccSmrg 1953caade7ccSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1954caade7ccSmrgAC_REQUIRE([XORG_WITH_LINT]) 1955caade7ccSmrg# Build lint "library" for more indepth checks of programs calling this library 1956485f0483SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1957caade7ccSmrg [Create lint library (default: disabled)])], 1958caade7ccSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1959caade7ccSmrgif test "x$make_lint_lib" != "xno" ; then 1960caade7ccSmrg if test "x$LINT" = "xno" ; then 1961caade7ccSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1962caade7ccSmrg fi 1963caade7ccSmrg if test "x$make_lint_lib" = "xyes" ; then 1964caade7ccSmrg LINTLIB=llib-l$1.ln 1965caade7ccSmrg else 1966caade7ccSmrg LINTLIB=$make_lint_lib 1967caade7ccSmrg fi 1968caade7ccSmrgfi 1969caade7ccSmrgAC_SUBST(LINTLIB) 1970caade7ccSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1971caade7ccSmrg 1972caade7ccSmrg]) # XORG_LINT_LIBRARY 1973caade7ccSmrg 1974485f0483Smrg# XORG_CWARNFLAGS 1975485f0483Smrg# --------------- 1976485f0483Smrg# Minimum version: 1.2.0 1977485f0483Smrg# 1978485f0483Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1979485f0483Smrg# 1980485f0483SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1981485f0483SmrgAC_REQUIRE([AC_PROG_CC]) 1982485f0483Smrgif test "x$GCC" = xyes ; then 1983485f0483Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 1984485f0483Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 1985b9b4fd27Smrg-Wbad-function-cast -Wformat=2" 1986485f0483Smrg case `$CC -dumpversion` in 1987485f0483Smrg 3.4.* | 4.*) 1988485f0483Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 1989485f0483Smrg ;; 1990485f0483Smrg esac 1991485f0483Smrgelse 1992485f0483Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1993485f0483Smrg if test "x$SUNCC" = "xyes"; then 1994485f0483Smrg CWARNFLAGS="-v" 1995485f0483Smrg fi 1996485f0483Smrgfi 1997485f0483SmrgAC_SUBST(CWARNFLAGS) 1998485f0483Smrg]) # XORG_CWARNFLAGS 1999485f0483Smrg 2000485f0483Smrg# XORG_STRICT_OPTION 2001485f0483Smrg# ----------------------- 2002485f0483Smrg# Minimum version: 1.3.0 2003485f0483Smrg# 2004485f0483Smrg# Add configure option to enable strict compilation 2005485f0483SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 2006485f0483SmrgAC_REQUIRE([AC_PROG_CC]) 2007485f0483SmrgAC_REQUIRE([AC_PROG_CC_C99]) 2008485f0483SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 2009485f0483Smrg 2010485f0483SmrgAC_ARG_ENABLE(strict-compilation, 2011485f0483Smrg AS_HELP_STRING([--enable-strict-compilation], 2012485f0483Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 2013485f0483Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 2014485f0483Smrgif test "x$STRICT_COMPILE" = "xyes"; then 2015485f0483Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2016485f0483Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2017485f0483Smrg if test "x$GCC" = xyes ; then 2018485f0483Smrg STRICT_CFLAGS="-pedantic -Werror" 2019485f0483Smrg elif test "x$SUNCC" = "xyes"; then 2020485f0483Smrg STRICT_CFLAGS="-errwarn" 2021485f0483Smrg elif test "x$INTELCC" = "xyes"; then 2022485f0483Smrg STRICT_CFLAGS="-Werror" 2023485f0483Smrg fi 2024485f0483Smrgfi 2025485f0483SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 2026485f0483SmrgAC_SUBST([CWARNFLAGS]) 2027485f0483Smrg]) # XORG_STRICT_OPTION 2028485f0483Smrg 2029485f0483Smrg# XORG_DEFAULT_OPTIONS 2030485f0483Smrg# -------------------- 2031485f0483Smrg# Minimum version: 1.3.0 2032485f0483Smrg# 2033485f0483Smrg# Defines default options for X.Org modules. 2034485f0483Smrg# 2035485f0483SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 2036485f0483SmrgXORG_CWARNFLAGS 2037485f0483SmrgXORG_STRICT_OPTION 2038485f0483SmrgXORG_RELEASE_VERSION 2039485f0483SmrgXORG_CHANGELOG 2040b9b4fd27SmrgXORG_INSTALL 2041485f0483SmrgXORG_MANPAGE_SECTIONS 2042b9b4fd27Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2043b9b4fd27Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 2044485f0483Smrg]) # XORG_DEFAULT_OPTIONS 2045b9b4fd27Smrg 2046b9b4fd27Smrg# XORG_INSTALL() 2047b9b4fd27Smrg# ---------------- 2048b9b4fd27Smrg# Minimum version: 1.4.0 2049b9b4fd27Smrg# 2050b9b4fd27Smrg# Defines the variable INSTALL_CMD as the command to copy 2051b9b4fd27Smrg# INSTALL from $prefix/share/util-macros. 2052b9b4fd27Smrg# 2053b9b4fd27SmrgAC_DEFUN([XORG_INSTALL], [ 2054b9b4fd27SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2055b9b4fd27Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2056b9b4fd27SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2057b9b4fd27Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2058b9b4fd27Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 2059b9b4fd27Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 2060b9b4fd27SmrgAC_SUBST([INSTALL_CMD]) 2061b9b4fd27Smrg]) # XORG_INSTALL 2062caade7ccSmrgdnl Copyright 2005 Red Hat, Inc 2063caade7ccSmrgdnl 2064caade7ccSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 2065caade7ccSmrgdnl documentation for any purpose is hereby granted without fee, provided that 2066caade7ccSmrgdnl the above copyright notice appear in all copies and that both that 2067caade7ccSmrgdnl copyright notice and this permission notice appear in supporting 2068caade7ccSmrgdnl documentation. 2069caade7ccSmrgdnl 2070caade7ccSmrgdnl The above copyright notice and this permission notice shall be included 2071caade7ccSmrgdnl in all copies or substantial portions of the Software. 2072caade7ccSmrgdnl 2073caade7ccSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2074caade7ccSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2075caade7ccSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2076caade7ccSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2077caade7ccSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2078caade7ccSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2079caade7ccSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 2080caade7ccSmrgdnl 2081caade7ccSmrgdnl Except as contained in this notice, the name of the copyright holders shall 2082caade7ccSmrgdnl not be used in advertising or otherwise to promote the sale, use or 2083caade7ccSmrgdnl other dealings in this Software without prior written authorization 2084caade7ccSmrgdnl from the copyright holders. 2085caade7ccSmrgdnl 2086caade7ccSmrg 2087caade7ccSmrg# XORG_RELEASE_VERSION 2088caade7ccSmrg# -------------------- 2089caade7ccSmrg# Adds --with/without-release-string and changes the PACKAGE and 2090caade7ccSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 2091caade7ccSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 2092caade7ccSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 2093caade7ccSmrg 2094caade7ccSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 2095caade7ccSmrg AC_ARG_WITH(release-version, 2096485f0483Smrg AS_HELP_STRING([--with-release-version=STRING], 2097caade7ccSmrg [Use release version string in package name]), 2098caade7ccSmrg [RELEASE_VERSION="$withval"], 2099caade7ccSmrg [RELEASE_VERSION=""]) 2100caade7ccSmrg if test "x$RELEASE_VERSION" != "x"; then 2101caade7ccSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 2102caade7ccSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 2103caade7ccSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 2104caade7ccSmrg fi 2105caade7ccSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 2106caade7ccSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 2107caade7ccSmrg [Major version of this package]) 2108caade7ccSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 2109caade7ccSmrg if test "x$PVM" = "x"; then 2110caade7ccSmrg PVM="0" 2111caade7ccSmrg fi 2112caade7ccSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 2113caade7ccSmrg [$PVM], 2114caade7ccSmrg [Minor version of this package]) 2115caade7ccSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 2116caade7ccSmrg if test "x$PVP" = "x"; then 2117caade7ccSmrg PVP="0" 2118caade7ccSmrg fi 2119caade7ccSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 2120caade7ccSmrg [$PVP], 2121caade7ccSmrg [Patch version of this package]) 2122caade7ccSmrg]) 2123caade7ccSmrg 2124485f0483Smrg# XORG_CHANGELOG() 2125485f0483Smrg# ---------------- 2126485f0483Smrg# Minimum version: 1.2.0 2127485f0483Smrg# 2128485f0483Smrg# Defines the variable CHANGELOG_CMD as the command to generate 2129485f0483Smrg# ChangeLog from git. 2130485f0483Smrg# 2131485f0483Smrg# 2132485f0483SmrgAC_DEFUN([XORG_CHANGELOG], [ 2133b9b4fd27SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 2134b9b4fd27Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2135b9b4fd27Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 2136485f0483Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 2137485f0483SmrgAC_SUBST([CHANGELOG_CMD]) 2138485f0483Smrg]) # XORG_CHANGELOG 2139485f0483Smrg 2140b9b4fd27Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2141b9b4fd27Smrg# 2142b9b4fd27Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2143b9b4fd27Smrg# 2144b9b4fd27Smrg# This program is free software; you can redistribute it and/or modify 2145b9b4fd27Smrg# it under the terms of the GNU General Public License as published by 2146b9b4fd27Smrg# the Free Software Foundation; either version 2 of the License, or 2147b9b4fd27Smrg# (at your option) any later version. 2148b9b4fd27Smrg# 2149b9b4fd27Smrg# This program is distributed in the hope that it will be useful, but 2150b9b4fd27Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2151b9b4fd27Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2152b9b4fd27Smrg# General Public License for more details. 2153b9b4fd27Smrg# 2154b9b4fd27Smrg# You should have received a copy of the GNU General Public License 2155b9b4fd27Smrg# along with this program; if not, write to the Free Software 2156b9b4fd27Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2157b9b4fd27Smrg# 2158b9b4fd27Smrg# As a special exception to the GNU General Public License, if you 2159b9b4fd27Smrg# distribute this file as part of a program that contains a 2160b9b4fd27Smrg# configuration script generated by Autoconf, you may include it under 2161b9b4fd27Smrg# the same distribution terms that you use for the rest of that program. 2162caade7ccSmrg 2163b9b4fd27Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 2164b9b4fd27Smrg# ---------------------------------- 2165b9b4fd27SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 2166b9b4fd27Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 2167b9b4fd27Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 2168b9b4fd27SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 2169b9b4fd27Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 2170b9b4fd27Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 2171b9b4fd27Smrgfi 2172b9b4fd27Smrgif test -n "$PKG_CONFIG"; then 2173b9b4fd27Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 2174b9b4fd27Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 2175b9b4fd27Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 2176b9b4fd27Smrg AC_MSG_RESULT([yes]) 2177b9b4fd27Smrg else 2178b9b4fd27Smrg AC_MSG_RESULT([no]) 2179b9b4fd27Smrg PKG_CONFIG="" 2180b9b4fd27Smrg fi 2181b9b4fd27Smrg 2182b9b4fd27Smrgfi[]dnl 2183b9b4fd27Smrg])# PKG_PROG_PKG_CONFIG 2184caade7ccSmrg 2185b9b4fd27Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2186b9b4fd27Smrg# 2187b9b4fd27Smrg# Check to see whether a particular set of modules exists. Similar 2188b9b4fd27Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 2189b9b4fd27Smrg# 2190b9b4fd27Smrg# 2191b9b4fd27Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 2192b9b4fd27Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 2193b9b4fd27Smrg# PKG_CHECK_EXISTS manually 2194b9b4fd27Smrg# -------------------------------------------------------------- 2195b9b4fd27SmrgAC_DEFUN([PKG_CHECK_EXISTS], 2196b9b4fd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2197b9b4fd27Smrgif test -n "$PKG_CONFIG" && \ 2198b9b4fd27Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 2199b9b4fd27Smrg m4_ifval([$2], [$2], [:]) 2200b9b4fd27Smrgm4_ifvaln([$3], [else 2201b9b4fd27Smrg $3])dnl 2202b9b4fd27Smrgfi]) 2203caade7ccSmrg 2204caade7ccSmrg 2205b9b4fd27Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 2206b9b4fd27Smrg# --------------------------------------------- 2207b9b4fd27Smrgm4_define([_PKG_CONFIG], 2208b9b4fd27Smrg[if test -n "$$1"; then 2209b9b4fd27Smrg pkg_cv_[]$1="$$1" 2210b9b4fd27Smrg elif test -n "$PKG_CONFIG"; then 2211b9b4fd27Smrg PKG_CHECK_EXISTS([$3], 2212b9b4fd27Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 2213b9b4fd27Smrg [pkg_failed=yes]) 2214b9b4fd27Smrg else 2215b9b4fd27Smrg pkg_failed=untried 2216b9b4fd27Smrgfi[]dnl 2217b9b4fd27Smrg])# _PKG_CONFIG 2218caade7ccSmrg 2219b9b4fd27Smrg# _PKG_SHORT_ERRORS_SUPPORTED 2220b9b4fd27Smrg# ----------------------------- 2221b9b4fd27SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 2222b9b4fd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2223b9b4fd27Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2224b9b4fd27Smrg _pkg_short_errors_supported=yes 2225b9b4fd27Smrgelse 2226b9b4fd27Smrg _pkg_short_errors_supported=no 2227b9b4fd27Smrgfi[]dnl 2228b9b4fd27Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 2229caade7ccSmrg 2230caade7ccSmrg 2231b9b4fd27Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 2232b9b4fd27Smrg# [ACTION-IF-NOT-FOUND]) 2233b9b4fd27Smrg# 2234b9b4fd27Smrg# 2235b9b4fd27Smrg# Note that if there is a possibility the first call to 2236b9b4fd27Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 2237b9b4fd27Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 2238b9b4fd27Smrg# 2239b9b4fd27Smrg# 2240b9b4fd27Smrg# -------------------------------------------------------------- 2241b9b4fd27SmrgAC_DEFUN([PKG_CHECK_MODULES], 2242b9b4fd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2243b9b4fd27SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 2244b9b4fd27SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 2245caade7ccSmrg 2246b9b4fd27Smrgpkg_failed=no 2247b9b4fd27SmrgAC_MSG_CHECKING([for $1]) 2248caade7ccSmrg 2249b9b4fd27Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 2250b9b4fd27Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 2251caade7ccSmrg 2252b9b4fd27Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 2253b9b4fd27Smrgand $1[]_LIBS to avoid the need to call pkg-config. 2254b9b4fd27SmrgSee the pkg-config man page for more details.]) 2255caade7ccSmrg 2256b9b4fd27Smrgif test $pkg_failed = yes; then 2257b9b4fd27Smrg _PKG_SHORT_ERRORS_SUPPORTED 2258b9b4fd27Smrg if test $_pkg_short_errors_supported = yes; then 2259b9b4fd27Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 2260b9b4fd27Smrg else 2261b9b4fd27Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 2262b9b4fd27Smrg fi 2263b9b4fd27Smrg # Put the nasty error message in config.log where it belongs 2264b9b4fd27Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 2265caade7ccSmrg 2266b9b4fd27Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 2267b9b4fd27Smrg[Package requirements ($2) were not met: 2268caade7ccSmrg 2269b9b4fd27Smrg$$1_PKG_ERRORS 2270b9b4fd27Smrg 2271b9b4fd27SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 2272b9b4fd27Smrginstalled software in a non-standard prefix. 2273b9b4fd27Smrg 2274b9b4fd27Smrg_PKG_TEXT 2275b9b4fd27Smrg])], 2276b9b4fd27Smrg [AC_MSG_RESULT([no]) 2277b9b4fd27Smrg $4]) 2278b9b4fd27Smrgelif test $pkg_failed = untried; then 2279b9b4fd27Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 2280b9b4fd27Smrg[The pkg-config script could not be found or is too old. Make sure it 2281b9b4fd27Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 2282b9b4fd27Smrgpath to pkg-config. 2283b9b4fd27Smrg 2284b9b4fd27Smrg_PKG_TEXT 2285b9b4fd27Smrg 2286b9b4fd27SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 2287b9b4fd27Smrg [$4]) 2288b9b4fd27Smrgelse 2289b9b4fd27Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 2290b9b4fd27Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 2291b9b4fd27Smrg AC_MSG_RESULT([yes]) 2292b9b4fd27Smrg ifelse([$3], , :, [$3]) 2293b9b4fd27Smrgfi[]dnl 2294b9b4fd27Smrg])# PKG_CHECK_MODULES 2295b9b4fd27Smrg 2296b9b4fd27Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2297b9b4fd27Smrg# 2298b9b4fd27Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2299b9b4fd27Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 2300b9b4fd27Smrg# Written by Gordon Matzigkeit, 1996 2301b9b4fd27Smrg# 2302b9b4fd27Smrg# This file is free software; the Free Software Foundation gives 2303b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without 2304b9b4fd27Smrg# modifications, as long as this notice is preserved. 2305b9b4fd27Smrg 2306b9b4fd27Smrgm4_define([_LT_COPYING], [dnl 2307b9b4fd27Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2308b9b4fd27Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 2309b9b4fd27Smrg# Written by Gordon Matzigkeit, 1996 2310b9b4fd27Smrg# 2311b9b4fd27Smrg# This file is part of GNU Libtool. 2312b9b4fd27Smrg# 2313b9b4fd27Smrg# GNU Libtool is free software; you can redistribute it and/or 2314b9b4fd27Smrg# modify it under the terms of the GNU General Public License as 2315b9b4fd27Smrg# published by the Free Software Foundation; either version 2 of 2316b9b4fd27Smrg# the License, or (at your option) any later version. 2317b9b4fd27Smrg# 2318b9b4fd27Smrg# As a special exception to the GNU General Public License, 2319b9b4fd27Smrg# if you distribute this file as part of a program or library that 2320b9b4fd27Smrg# is built using GNU Libtool, you may include this file under the 2321b9b4fd27Smrg# same distribution terms that you use for the rest of that program. 2322b9b4fd27Smrg# 2323b9b4fd27Smrg# GNU Libtool is distributed in the hope that it will be useful, 2324b9b4fd27Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2325b9b4fd27Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2326b9b4fd27Smrg# GNU General Public License for more details. 2327b9b4fd27Smrg# 2328b9b4fd27Smrg# You should have received a copy of the GNU General Public License 2329b9b4fd27Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 2330b9b4fd27Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 2331b9b4fd27Smrg# obtained by writing to the Free Software Foundation, Inc., 2332b9b4fd27Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 2333b9b4fd27Smrg]) 2334b9b4fd27Smrg 2335b9b4fd27Smrg# serial 56 LT_INIT 2336b9b4fd27Smrg 2337b9b4fd27Smrg 2338b9b4fd27Smrg# LT_PREREQ(VERSION) 2339b9b4fd27Smrg# ------------------ 2340b9b4fd27Smrg# Complain and exit if this libtool version is less that VERSION. 2341b9b4fd27Smrgm4_defun([LT_PREREQ], 2342b9b4fd27Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 2343b9b4fd27Smrg [m4_default([$3], 2344b9b4fd27Smrg [m4_fatal([Libtool version $1 or higher is required], 2345b9b4fd27Smrg 63)])], 2346b9b4fd27Smrg [$2])]) 2347b9b4fd27Smrg 2348b9b4fd27Smrg 2349b9b4fd27Smrg# _LT_CHECK_BUILDDIR 2350b9b4fd27Smrg# ------------------ 2351b9b4fd27Smrg# Complain if the absolute build directory name contains unusual characters 2352b9b4fd27Smrgm4_defun([_LT_CHECK_BUILDDIR], 2353b9b4fd27Smrg[case `pwd` in 2354b9b4fd27Smrg *\ * | *\ *) 2355b9b4fd27Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 2356b9b4fd27Smrgesac 2357b9b4fd27Smrg]) 2358b9b4fd27Smrg 2359b9b4fd27Smrg 2360b9b4fd27Smrg# LT_INIT([OPTIONS]) 2361b9b4fd27Smrg# ------------------ 2362b9b4fd27SmrgAC_DEFUN([LT_INIT], 2363b9b4fd27Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 2364b9b4fd27SmrgAC_BEFORE([$0], [LT_LANG])dnl 2365b9b4fd27SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 2366b9b4fd27SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 2367b9b4fd27Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 2368b9b4fd27Smrg 2369b9b4fd27Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 2370b9b4fd27Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 2371b9b4fd27Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 2372b9b4fd27Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 2373b9b4fd27Smrgdnl unless we require an AC_DEFUNed macro: 2374b9b4fd27SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 2375b9b4fd27SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 2376b9b4fd27SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 2377b9b4fd27SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 2378b9b4fd27Smrgm4_require([_LT_PROG_LTMAIN])dnl 2379b9b4fd27Smrg 2380b9b4fd27Smrgdnl Parse OPTIONS 2381b9b4fd27Smrg_LT_SET_OPTIONS([$0], [$1]) 2382b9b4fd27Smrg 2383b9b4fd27Smrg# This can be used to rebuild libtool when needed 2384b9b4fd27SmrgLIBTOOL_DEPS="$ltmain" 2385b9b4fd27Smrg 2386b9b4fd27Smrg# Always use our own libtool. 2387b9b4fd27SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 2388b9b4fd27SmrgAC_SUBST(LIBTOOL)dnl 2389b9b4fd27Smrg 2390b9b4fd27Smrg_LT_SETUP 2391b9b4fd27Smrg 2392b9b4fd27Smrg# Only expand once: 2393b9b4fd27Smrgm4_define([LT_INIT]) 2394b9b4fd27Smrg])# LT_INIT 2395b9b4fd27Smrg 2396b9b4fd27Smrg# Old names: 2397b9b4fd27SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 2398b9b4fd27SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 2399b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 2400b9b4fd27Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 2401b9b4fd27Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 2402b9b4fd27Smrg 2403b9b4fd27Smrg 2404b9b4fd27Smrg# _LT_CC_BASENAME(CC) 2405b9b4fd27Smrg# ------------------- 2406b9b4fd27Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2407b9b4fd27Smrgm4_defun([_LT_CC_BASENAME], 2408b9b4fd27Smrg[for cc_temp in $1""; do 2409b9b4fd27Smrg case $cc_temp in 2410b9b4fd27Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2411b9b4fd27Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2412b9b4fd27Smrg \-*) ;; 2413b9b4fd27Smrg *) break;; 2414b9b4fd27Smrg esac 2415b9b4fd27Smrgdone 2416b9b4fd27Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 2417b9b4fd27Smrg]) 2418b9b4fd27Smrg 2419b9b4fd27Smrg 2420b9b4fd27Smrg# _LT_FILEUTILS_DEFAULTS 2421b9b4fd27Smrg# ---------------------- 2422b9b4fd27Smrg# It is okay to use these file commands and assume they have been set 2423b9b4fd27Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 2424b9b4fd27Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 2425b9b4fd27Smrg[: ${CP="cp -f"} 2426b9b4fd27Smrg: ${MV="mv -f"} 2427b9b4fd27Smrg: ${RM="rm -f"} 2428b9b4fd27Smrg])# _LT_FILEUTILS_DEFAULTS 2429b9b4fd27Smrg 2430b9b4fd27Smrg 2431b9b4fd27Smrg# _LT_SETUP 2432b9b4fd27Smrg# --------- 2433b9b4fd27Smrgm4_defun([_LT_SETUP], 2434b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2435b9b4fd27SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2436b9b4fd27Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 2437b9b4fd27Smrg_LT_DECL([], [host], [0])dnl 2438b9b4fd27Smrg_LT_DECL([], [host_os], [0])dnl 2439b9b4fd27Smrgdnl 2440b9b4fd27Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 2441b9b4fd27Smrg_LT_DECL([], [build], [0])dnl 2442b9b4fd27Smrg_LT_DECL([], [build_os], [0])dnl 2443b9b4fd27Smrgdnl 2444b9b4fd27SmrgAC_REQUIRE([AC_PROG_CC])dnl 2445b9b4fd27SmrgAC_REQUIRE([LT_PATH_LD])dnl 2446b9b4fd27SmrgAC_REQUIRE([LT_PATH_NM])dnl 2447b9b4fd27Smrgdnl 2448b9b4fd27SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 2449b9b4fd27Smrgtest -z "$LN_S" && LN_S="ln -s" 2450b9b4fd27Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 2451b9b4fd27Smrgdnl 2452b9b4fd27SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 2453b9b4fd27Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2454b9b4fd27Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2455b9b4fd27Smrgdnl 2456b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2457b9b4fd27Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2458b9b4fd27Smrgm4_require([_LT_CMD_RELOAD])dnl 2459b9b4fd27Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2460b9b4fd27Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2461b9b4fd27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2462b9b4fd27Smrg 2463b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([ 2464b9b4fd27Smrg# See if we are running on zsh, and set the options which allow our 2465b9b4fd27Smrg# commands through without removal of \ escapes INIT. 2466b9b4fd27Smrgif test -n "\${ZSH_VERSION+set}" ; then 2467b9b4fd27Smrg setopt NO_GLOB_SUBST 2468b9b4fd27Smrgfi 2469b9b4fd27Smrg]) 2470b9b4fd27Smrgif test -n "${ZSH_VERSION+set}" ; then 2471b9b4fd27Smrg setopt NO_GLOB_SUBST 2472b9b4fd27Smrgfi 2473b9b4fd27Smrg 2474b9b4fd27Smrg_LT_CHECK_OBJDIR 2475b9b4fd27Smrg 2476b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl 2477b9b4fd27Smrg_LT_PROG_ECHO_BACKSLASH 2478b9b4fd27Smrg 2479b9b4fd27Smrgcase $host_os in 2480b9b4fd27Smrgaix3*) 2481b9b4fd27Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2482b9b4fd27Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2483caade7ccSmrg # vanish in a puff of smoke. 2484caade7ccSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 2485caade7ccSmrg COLLECT_NAMES= 2486caade7ccSmrg export COLLECT_NAMES 2487caade7ccSmrg fi 2488caade7ccSmrg ;; 2489caade7ccSmrgesac 2490caade7ccSmrg 2491caade7ccSmrg# Sed substitution that helps us do robust quoting. It backslashifies 2492caade7ccSmrg# metacharacters that are still active within double-quoted strings. 2493b9b4fd27Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2494caade7ccSmrg 2495caade7ccSmrg# Same as above, but do not quote variable references. 2496b9b4fd27Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2497caade7ccSmrg 2498caade7ccSmrg# Sed substitution to delay expansion of an escaped shell variable in a 2499caade7ccSmrg# double_quote_subst'ed string. 2500caade7ccSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2501caade7ccSmrg 2502b9b4fd27Smrg# Sed substitution to delay expansion of an escaped single quote. 2503b9b4fd27Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2504b9b4fd27Smrg 2505caade7ccSmrg# Sed substitution to avoid accidental globbing in evaled expressions 2506caade7ccSmrgno_glob_subst='s/\*/\\\*/g' 2507caade7ccSmrg 2508caade7ccSmrg# Global variables: 2509b9b4fd27Smrgofile=libtool 2510caade7ccSmrgcan_build_shared=yes 2511caade7ccSmrg 2512caade7ccSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 2513caade7ccSmrg# which needs '.lib'). 2514caade7ccSmrglibext=a 2515caade7ccSmrg 2516b9b4fd27Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2517caade7ccSmrg 2518caade7ccSmrgold_CC="$CC" 2519caade7ccSmrgold_CFLAGS="$CFLAGS" 2520caade7ccSmrg 2521caade7ccSmrg# Set sane defaults for various variables 2522caade7ccSmrgtest -z "$CC" && CC=cc 2523caade7ccSmrgtest -z "$LTCC" && LTCC=$CC 2524caade7ccSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2525caade7ccSmrgtest -z "$LD" && LD=ld 2526caade7ccSmrgtest -z "$ac_objext" && ac_objext=o 2527caade7ccSmrg 2528caade7ccSmrg_LT_CC_BASENAME([$compiler]) 2529caade7ccSmrg 2530caade7ccSmrg# Only perform the check for file, if the check method requires it 2531b9b4fd27Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2532caade7ccSmrgcase $deplibs_check_method in 2533caade7ccSmrgfile_magic*) 2534caade7ccSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2535b9b4fd27Smrg _LT_PATH_MAGIC 2536caade7ccSmrg fi 2537caade7ccSmrg ;; 2538caade7ccSmrgesac 2539caade7ccSmrg 2540b9b4fd27Smrg# Use C for the default configuration in the libtool script 2541b9b4fd27SmrgLT_SUPPORTED_TAG([CC]) 2542b9b4fd27Smrg_LT_LANG_C_CONFIG 2543b9b4fd27Smrg_LT_LANG_DEFAULT_CONFIG 2544b9b4fd27Smrg_LT_CONFIG_COMMANDS 2545b9b4fd27Smrg])# _LT_SETUP 2546485f0483Smrg 2547caade7ccSmrg 2548b9b4fd27Smrg# _LT_PROG_LTMAIN 2549b9b4fd27Smrg# --------------- 2550b9b4fd27Smrg# Note that this code is called both from `configure', and `config.status' 2551b9b4fd27Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2552b9b4fd27Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2553b9b4fd27Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2554b9b4fd27Smrgm4_defun([_LT_PROG_LTMAIN], 2555b9b4fd27Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2556b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2557b9b4fd27Smrgltmain="$ac_aux_dir/ltmain.sh" 2558b9b4fd27Smrg])# _LT_PROG_LTMAIN 2559caade7ccSmrg 2560caade7ccSmrg 2561caade7ccSmrg 2562b9b4fd27Smrg# So that we can recreate a full libtool script including additional 2563b9b4fd27Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2564b9b4fd27Smrg# in macros and then make a single call at the end using the `libtool' 2565b9b4fd27Smrg# label. 2566caade7ccSmrg 2567caade7ccSmrg 2568b9b4fd27Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2569b9b4fd27Smrg# ---------------------------------------- 2570b9b4fd27Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2571b9b4fd27Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2572b9b4fd27Smrg[m4_ifval([$1], 2573b9b4fd27Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 2574b9b4fd27Smrg [$1 2575b9b4fd27Smrg])])]) 2576caade7ccSmrg 2577b9b4fd27Smrg# Initialize. 2578b9b4fd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 2579caade7ccSmrg 2580caade7ccSmrg 2581b9b4fd27Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 2582b9b4fd27Smrg# ------------------------------ 2583b9b4fd27Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2584b9b4fd27Smrgm4_define([_LT_CONFIG_LIBTOOL], 2585b9b4fd27Smrg[m4_ifval([$1], 2586b9b4fd27Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 2587b9b4fd27Smrg [$1 2588b9b4fd27Smrg])])]) 2589b9b4fd27Smrg 2590b9b4fd27Smrg# Initialize. 2591b9b4fd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 2592b9b4fd27Smrg 2593b9b4fd27Smrg 2594b9b4fd27Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 2595b9b4fd27Smrg# ----------------------------------------------------- 2596b9b4fd27Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 2597b9b4fd27Smrg[_LT_CONFIG_LIBTOOL([$1]) 2598b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 2599b9b4fd27Smrg]) 2600caade7ccSmrg 2601b9b4fd27Smrg 2602b9b4fd27Smrg# _LT_FORMAT_COMMENT([COMMENT]) 2603b9b4fd27Smrg# ----------------------------- 2604b9b4fd27Smrg# Add leading comment marks to the start of each line, and a trailing 2605b9b4fd27Smrg# full-stop to the whole comment if one is not present already. 2606b9b4fd27Smrgm4_define([_LT_FORMAT_COMMENT], 2607b9b4fd27Smrg[m4_ifval([$1], [ 2608b9b4fd27Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 2609b9b4fd27Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 2610b9b4fd27Smrg)]) 2611b9b4fd27Smrg 2612b9b4fd27Smrg 2613b9b4fd27Smrg 2614b9b4fd27Smrg 2615b9b4fd27Smrg 2616b9b4fd27Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 2617b9b4fd27Smrg# ------------------------------------------------------------------- 2618b9b4fd27Smrg# CONFIGNAME is the name given to the value in the libtool script. 2619b9b4fd27Smrg# VARNAME is the (base) name used in the configure script. 2620b9b4fd27Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 2621b9b4fd27Smrg# VARNAME. Any other value will be used directly. 2622b9b4fd27Smrgm4_define([_LT_DECL], 2623b9b4fd27Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 2624b9b4fd27Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 2625b9b4fd27Smrg [m4_ifval([$1], [$1], [$2])]) 2626b9b4fd27Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 2627b9b4fd27Smrg m4_ifval([$4], 2628b9b4fd27Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 2629b9b4fd27Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 2630b9b4fd27Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 2631caade7ccSmrg]) 2632caade7ccSmrg 2633caade7ccSmrg 2634b9b4fd27Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 2635b9b4fd27Smrg# -------------------------------------------------------- 2636b9b4fd27Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 2637caade7ccSmrg 2638caade7ccSmrg 2639b9b4fd27Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 2640b9b4fd27Smrg# ------------------------------------------------ 2641b9b4fd27Smrgm4_define([lt_decl_tag_varnames], 2642b9b4fd27Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 2643caade7ccSmrg 2644485f0483Smrg 2645b9b4fd27Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 2646b9b4fd27Smrg# --------------------------------------------------------- 2647b9b4fd27Smrgm4_define([_lt_decl_filter], 2648b9b4fd27Smrg[m4_case([$#], 2649b9b4fd27Smrg [0], [m4_fatal([$0: too few arguments: $#])], 2650b9b4fd27Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 2651b9b4fd27Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 2652b9b4fd27Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 2653b9b4fd27Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 2654485f0483Smrg]) 2655caade7ccSmrg 2656caade7ccSmrg 2657b9b4fd27Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 2658b9b4fd27Smrg# -------------------------------------------------- 2659b9b4fd27Smrgm4_define([lt_decl_quote_varnames], 2660b9b4fd27Smrg[_lt_decl_filter([value], [1], $@)]) 2661caade7ccSmrg 2662caade7ccSmrg 2663b9b4fd27Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 2664b9b4fd27Smrg# --------------------------------------------------- 2665b9b4fd27Smrgm4_define([lt_decl_dquote_varnames], 2666b9b4fd27Smrg[_lt_decl_filter([value], [2], $@)]) 2667caade7ccSmrg 2668caade7ccSmrg 2669b9b4fd27Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 2670b9b4fd27Smrg# --------------------------------------------------- 2671b9b4fd27Smrgm4_define([lt_decl_varnames_tagged], 2672b9b4fd27Smrg[m4_assert([$# <= 2])dnl 2673b9b4fd27Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 2674b9b4fd27Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 2675b9b4fd27Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 2676b9b4fd27Smrgm4_define([_lt_decl_varnames_tagged], 2677b9b4fd27Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 2678caade7ccSmrg 2679caade7ccSmrg 2680b9b4fd27Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 2681b9b4fd27Smrg# ------------------------------------------------ 2682b9b4fd27Smrgm4_define([lt_decl_all_varnames], 2683b9b4fd27Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 2684b9b4fd27Smrg m4_if([$2], [], 2685b9b4fd27Smrg m4_quote(lt_decl_varnames), 2686b9b4fd27Smrg m4_quote(m4_shift($@))))[]dnl 2687b9b4fd27Smrg]) 2688b9b4fd27Smrgm4_define([_lt_decl_all_varnames], 2689b9b4fd27Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 2690b9b4fd27Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 2691b9b4fd27Smrg]) 2692caade7ccSmrg 2693caade7ccSmrg 2694b9b4fd27Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 2695b9b4fd27Smrg# ------------------------------------ 2696b9b4fd27Smrg# Quote a variable value, and forward it to `config.status' so that its 2697b9b4fd27Smrg# declaration there will have the same value as in `configure'. VARNAME 2698b9b4fd27Smrg# must have a single quote delimited value for this to work. 2699b9b4fd27Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 2700b9b4fd27Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 2701caade7ccSmrg 2702caade7ccSmrg 2703b9b4fd27Smrg# _LT_CONFIG_STATUS_DECLARATIONS 2704b9b4fd27Smrg# ------------------------------ 2705b9b4fd27Smrg# We delimit libtool config variables with single quotes, so when 2706b9b4fd27Smrg# we write them to config.status, we have to be sure to quote all 2707b9b4fd27Smrg# embedded single quotes properly. In configure, this macro expands 2708b9b4fd27Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 2709b9b4fd27Smrg# 2710b9b4fd27Smrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 2711b9b4fd27Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 2712b9b4fd27Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 2713b9b4fd27Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 2714caade7ccSmrg 2715caade7ccSmrg 2716b9b4fd27Smrg# _LT_LIBTOOL_TAGS 2717b9b4fd27Smrg# ---------------- 2718b9b4fd27Smrg# Output comment and list of tags supported by the script 2719b9b4fd27Smrgm4_defun([_LT_LIBTOOL_TAGS], 2720b9b4fd27Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 2721b9b4fd27Smrgavailable_tags="_LT_TAGS"dnl 2722b9b4fd27Smrg]) 2723caade7ccSmrg 2724caade7ccSmrg 2725b9b4fd27Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 2726b9b4fd27Smrg# ----------------------------------- 2727b9b4fd27Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 2728b9b4fd27Smrg# expand to a commented shell variable setting: 2729b9b4fd27Smrg# 2730b9b4fd27Smrg# # Some comment about what VAR is for. 2731b9b4fd27Smrg# visible_name=$lt_internal_name 2732b9b4fd27Smrgm4_define([_LT_LIBTOOL_DECLARE], 2733b9b4fd27Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 2734b9b4fd27Smrg [description])))[]dnl 2735b9b4fd27Smrgm4_pushdef([_libtool_name], 2736b9b4fd27Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 2737b9b4fd27Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 2738b9b4fd27Smrg [0], [_libtool_name=[$]$1], 2739b9b4fd27Smrg [1], [_libtool_name=$lt_[]$1], 2740b9b4fd27Smrg [2], [_libtool_name=$lt_[]$1], 2741b9b4fd27Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 2742b9b4fd27Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 2743b9b4fd27Smrg]) 2744caade7ccSmrg 2745caade7ccSmrg 2746b9b4fd27Smrg# _LT_LIBTOOL_CONFIG_VARS 2747b9b4fd27Smrg# ----------------------- 2748b9b4fd27Smrg# Produce commented declarations of non-tagged libtool config variables 2749b9b4fd27Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 2750b9b4fd27Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 2751b9b4fd27Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 2752b9b4fd27Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 2753b9b4fd27Smrg[m4_foreach([_lt_var], 2754b9b4fd27Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 2755b9b4fd27Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 2756caade7ccSmrg 2757caade7ccSmrg 2758b9b4fd27Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 2759b9b4fd27Smrg# ------------------------- 2760b9b4fd27Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 2761b9b4fd27Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 2762b9b4fd27Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 2763caade7ccSmrg 2764b9b4fd27Smrg 2765b9b4fd27Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 2766b9b4fd27Smrg# ------------------------------ 2767b9b4fd27Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 2768b9b4fd27Smrg 2769b9b4fd27Smrg 2770b9b4fd27Smrg# _LT_CONFIG_COMMANDS 2771b9b4fd27Smrg# ------------------- 2772b9b4fd27Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 2773b9b4fd27Smrg# variables for single and double quote escaping we saved from calls 2774b9b4fd27Smrg# to _LT_DECL, we can put quote escaped variables declarations 2775b9b4fd27Smrg# into `config.status', and then the shell code to quote escape them in 2776b9b4fd27Smrg# for loops in `config.status'. Finally, any additional code accumulated 2777b9b4fd27Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 2778b9b4fd27Smrgm4_defun([_LT_CONFIG_COMMANDS], 2779b9b4fd27Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 2780b9b4fd27Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 2781b9b4fd27Smrg dnl instead of duplicating it all over again into config.status, 2782b9b4fd27Smrg dnl then we will have config.status run $CONFIG_LT later, so it 2783b9b4fd27Smrg dnl needs to know what name is stored there: 2784b9b4fd27Smrg [AC_CONFIG_COMMANDS([libtool], 2785b9b4fd27Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 2786b9b4fd27Smrg dnl If the libtool generation code is destined for config.status, 2787b9b4fd27Smrg dnl expand the accumulated commands and init code now: 2788b9b4fd27Smrg [AC_CONFIG_COMMANDS([libtool], 2789b9b4fd27Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 2790b9b4fd27Smrg])#_LT_CONFIG_COMMANDS 2791b9b4fd27Smrg 2792b9b4fd27Smrg 2793b9b4fd27Smrg# Initialize. 2794b9b4fd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 2795b9b4fd27Smrg[ 2796b9b4fd27Smrg 2797b9b4fd27Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 2798b9b4fd27Smrg# if CDPATH is set. 2799b9b4fd27Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 2800b9b4fd27Smrg 2801b9b4fd27Smrgsed_quote_subst='$sed_quote_subst' 2802b9b4fd27Smrgdouble_quote_subst='$double_quote_subst' 2803b9b4fd27Smrgdelay_variable_subst='$delay_variable_subst' 2804b9b4fd27Smrg_LT_CONFIG_STATUS_DECLARATIONS 2805b9b4fd27SmrgLTCC='$LTCC' 2806b9b4fd27SmrgLTCFLAGS='$LTCFLAGS' 2807b9b4fd27Smrgcompiler='$compiler_DEFAULT' 2808b9b4fd27Smrg 2809b9b4fd27Smrg# Quote evaled strings. 2810b9b4fd27Smrgfor var in lt_decl_all_varnames([[ \ 2811b9b4fd27Smrg]], lt_decl_quote_varnames); do 2812b9b4fd27Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 2813b9b4fd27Smrg *[[\\\\\\\`\\"\\\$]]*) 2814b9b4fd27Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 2815caade7ccSmrg ;; 2816b9b4fd27Smrg *) 2817b9b4fd27Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 2818caade7ccSmrg ;; 2819caade7ccSmrg esac 2820b9b4fd27Smrgdone 2821caade7ccSmrg 2822b9b4fd27Smrg# Double-quote double-evaled strings. 2823b9b4fd27Smrgfor var in lt_decl_all_varnames([[ \ 2824b9b4fd27Smrg]], lt_decl_dquote_varnames); do 2825b9b4fd27Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 2826b9b4fd27Smrg *[[\\\\\\\`\\"\\\$]]*) 2827b9b4fd27Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 2828b9b4fd27Smrg ;; 2829b9b4fd27Smrg *) 2830b9b4fd27Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 2831caade7ccSmrg ;; 2832caade7ccSmrg esac 2833b9b4fd27Smrgdone 2834caade7ccSmrg 2835b9b4fd27Smrg# Fix-up fallback echo if it was mangled by the above quoting rules. 2836b9b4fd27Smrgcase \$lt_ECHO in 2837b9b4fd27Smrg*'\\\[$]0 --fallback-echo"')dnl " 2838b9b4fd27Smrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 2839caade7ccSmrg ;; 2840caade7ccSmrgesac 2841caade7ccSmrg 2842b9b4fd27Smrg_LT_OUTPUT_LIBTOOL_INIT 2843b9b4fd27Smrg]) 2844caade7ccSmrg 2845caade7ccSmrg 2846b9b4fd27Smrg# LT_OUTPUT 2847b9b4fd27Smrg# --------- 2848b9b4fd27Smrg# This macro allows early generation of the libtool script (before 2849b9b4fd27Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 2850b9b4fd27Smrg# tests. 2851b9b4fd27SmrgAC_DEFUN([LT_OUTPUT], 2852b9b4fd27Smrg[: ${CONFIG_LT=./config.lt} 2853b9b4fd27SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 2854b9b4fd27Smrgcat >"$CONFIG_LT" <<_LTEOF 2855b9b4fd27Smrg#! $SHELL 2856b9b4fd27Smrg# Generated by $as_me. 2857b9b4fd27Smrg# Run this file to recreate a libtool stub with the current configuration. 2858b9b4fd27Smrg 2859b9b4fd27Smrglt_cl_silent=false 2860b9b4fd27SmrgSHELL=\${CONFIG_SHELL-$SHELL} 2861b9b4fd27Smrg_LTEOF 2862b9b4fd27Smrg 2863b9b4fd27Smrgcat >>"$CONFIG_LT" <<\_LTEOF 2864b9b4fd27SmrgAS_SHELL_SANITIZE 2865b9b4fd27Smrg_AS_PREPARE 2866b9b4fd27Smrg 2867b9b4fd27Smrgexec AS_MESSAGE_FD>&1 2868b9b4fd27Smrgexec AS_MESSAGE_LOG_FD>>config.log 2869b9b4fd27Smrg{ 2870b9b4fd27Smrg echo 2871b9b4fd27Smrg AS_BOX([Running $as_me.]) 2872b9b4fd27Smrg} >&AS_MESSAGE_LOG_FD 2873caade7ccSmrg 2874b9b4fd27Smrglt_cl_help="\ 2875b9b4fd27Smrg\`$as_me' creates a local libtool stub from the current configuration, 2876b9b4fd27Smrgfor use in further configure time tests before the real libtool is 2877b9b4fd27Smrggenerated. 2878caade7ccSmrg 2879b9b4fd27SmrgUsage: $[0] [[OPTIONS]] 2880caade7ccSmrg 2881b9b4fd27Smrg -h, --help print this help, then exit 2882b9b4fd27Smrg -V, --version print version number, then exit 2883b9b4fd27Smrg -q, --quiet do not print progress messages 2884b9b4fd27Smrg -d, --debug don't remove temporary files 2885caade7ccSmrg 2886b9b4fd27SmrgReport bugs to <bug-libtool@gnu.org>." 2887caade7ccSmrg 2888b9b4fd27Smrglt_cl_version="\ 2889b9b4fd27Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 2890b9b4fd27Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 2891b9b4fd27Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 2892b9b4fd27Smrg 2893b9b4fd27SmrgCopyright (C) 2008 Free Software Foundation, Inc. 2894b9b4fd27SmrgThis config.lt script is free software; the Free Software Foundation 2895b9b4fd27Smrggives unlimited permision to copy, distribute and modify it." 2896b9b4fd27Smrg 2897b9b4fd27Smrgwhile test $[#] != 0 2898b9b4fd27Smrgdo 2899b9b4fd27Smrg case $[1] in 2900b9b4fd27Smrg --version | --v* | -V ) 2901b9b4fd27Smrg echo "$lt_cl_version"; exit 0 ;; 2902b9b4fd27Smrg --help | --h* | -h ) 2903b9b4fd27Smrg echo "$lt_cl_help"; exit 0 ;; 2904b9b4fd27Smrg --debug | --d* | -d ) 2905b9b4fd27Smrg debug=: ;; 2906b9b4fd27Smrg --quiet | --q* | --silent | --s* | -q ) 2907b9b4fd27Smrg lt_cl_silent=: ;; 2908b9b4fd27Smrg 2909b9b4fd27Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 2910b9b4fd27SmrgTry \`$[0] --help' for more information.]) ;; 2911b9b4fd27Smrg 2912b9b4fd27Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 2913b9b4fd27SmrgTry \`$[0] --help' for more information.]) ;; 2914b9b4fd27Smrg esac 2915b9b4fd27Smrg shift 2916b9b4fd27Smrgdone 2917b9b4fd27Smrg 2918b9b4fd27Smrgif $lt_cl_silent; then 2919b9b4fd27Smrg exec AS_MESSAGE_FD>/dev/null 2920b9b4fd27Smrgfi 2921b9b4fd27Smrg_LTEOF 2922b9b4fd27Smrg 2923b9b4fd27Smrgcat >>"$CONFIG_LT" <<_LTEOF 2924b9b4fd27Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 2925b9b4fd27Smrg_LTEOF 2926b9b4fd27Smrg 2927b9b4fd27Smrgcat >>"$CONFIG_LT" <<\_LTEOF 2928b9b4fd27SmrgAC_MSG_NOTICE([creating $ofile]) 2929b9b4fd27Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 2930b9b4fd27SmrgAS_EXIT(0) 2931b9b4fd27Smrg_LTEOF 2932b9b4fd27Smrgchmod +x "$CONFIG_LT" 2933b9b4fd27Smrg 2934b9b4fd27Smrg# configure is writing to config.log, but config.lt does its own redirection, 2935b9b4fd27Smrg# appending to config.log, which fails on DOS, as config.log is still kept 2936b9b4fd27Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 2937b9b4fd27Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 2938b9b4fd27Smrgif test "$no_create" != yes; then 2939b9b4fd27Smrg lt_cl_success=: 2940b9b4fd27Smrg test "$silent" = yes && 2941b9b4fd27Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 2942b9b4fd27Smrg exec AS_MESSAGE_LOG_FD>/dev/null 2943b9b4fd27Smrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 2944b9b4fd27Smrg exec AS_MESSAGE_LOG_FD>>config.log 2945b9b4fd27Smrg $lt_cl_success || AS_EXIT(1) 2946caade7ccSmrgfi 2947b9b4fd27Smrg])# LT_OUTPUT 2948caade7ccSmrg 2949caade7ccSmrg 2950b9b4fd27Smrg# _LT_CONFIG(TAG) 2951b9b4fd27Smrg# --------------- 2952b9b4fd27Smrg# If TAG is the built-in tag, create an initial libtool script with a 2953b9b4fd27Smrg# default configuration from the untagged config vars. Otherwise add code 2954b9b4fd27Smrg# to config.status for appending the configuration named by TAG from the 2955b9b4fd27Smrg# matching tagged config vars. 2956b9b4fd27Smrgm4_defun([_LT_CONFIG], 2957b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2958b9b4fd27Smrg_LT_CONFIG_SAVE_COMMANDS([ 2959b9b4fd27Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 2960b9b4fd27Smrg m4_if(_LT_TAG, [C], [ 2961b9b4fd27Smrg # See if we are running on zsh, and set the options which allow our 2962b9b4fd27Smrg # commands through without removal of \ escapes. 2963b9b4fd27Smrg if test -n "${ZSH_VERSION+set}" ; then 2964b9b4fd27Smrg setopt NO_GLOB_SUBST 2965b9b4fd27Smrg fi 2966caade7ccSmrg 2967b9b4fd27Smrg cfgfile="${ofile}T" 2968b9b4fd27Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 2969b9b4fd27Smrg $RM "$cfgfile" 2970caade7ccSmrg 2971b9b4fd27Smrg cat <<_LT_EOF >> "$cfgfile" 2972b9b4fd27Smrg#! $SHELL 2973caade7ccSmrg 2974b9b4fd27Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 2975b9b4fd27Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 2976b9b4fd27Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 2977b9b4fd27Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 2978b9b4fd27Smrg# 2979b9b4fd27Smrg_LT_COPYING 2980b9b4fd27Smrg_LT_LIBTOOL_TAGS 2981caade7ccSmrg 2982b9b4fd27Smrg# ### BEGIN LIBTOOL CONFIG 2983b9b4fd27Smrg_LT_LIBTOOL_CONFIG_VARS 2984b9b4fd27Smrg_LT_LIBTOOL_TAG_VARS 2985b9b4fd27Smrg# ### END LIBTOOL CONFIG 2986caade7ccSmrg 2987b9b4fd27Smrg_LT_EOF 2988caade7ccSmrg 2989b9b4fd27Smrg case $host_os in 2990b9b4fd27Smrg aix3*) 2991b9b4fd27Smrg cat <<\_LT_EOF >> "$cfgfile" 2992b9b4fd27Smrg# AIX sometimes has problems with the GCC collect2 program. For some 2993b9b4fd27Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 2994b9b4fd27Smrg# vanish in a puff of smoke. 2995b9b4fd27Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 2996b9b4fd27Smrg COLLECT_NAMES= 2997b9b4fd27Smrg export COLLECT_NAMES 2998b9b4fd27Smrgfi 2999b9b4fd27Smrg_LT_EOF 3000caade7ccSmrg ;; 3001caade7ccSmrg esac 3002caade7ccSmrg 3003b9b4fd27Smrg _LT_PROG_LTMAIN 3004caade7ccSmrg 3005b9b4fd27Smrg # We use sed instead of cat because bash on DJGPP gets confused if 3006b9b4fd27Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 3007b9b4fd27Smrg # text mode, it properly converts lines to CR/LF. This bash problem 3008b9b4fd27Smrg # is reportedly fixed, but why not run on old versions too? 3009b9b4fd27Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 3010b9b4fd27Smrg || (rm -f "$cfgfile"; exit 1) 3011caade7ccSmrg 3012b9b4fd27Smrg _LT_PROG_XSI_SHELLFNS 3013caade7ccSmrg 3014b9b4fd27Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 3015b9b4fd27Smrg || (rm -f "$cfgfile"; exit 1) 3016caade7ccSmrg 3017b9b4fd27Smrg mv -f "$cfgfile" "$ofile" || 3018b9b4fd27Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 3019b9b4fd27Smrg chmod +x "$ofile" 3020b9b4fd27Smrg], 3021b9b4fd27Smrg[cat <<_LT_EOF >> "$ofile" 3022caade7ccSmrg 3023b9b4fd27Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 3024b9b4fd27Smrgdnl in a comment (ie after a #). 3025b9b4fd27Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 3026b9b4fd27Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 3027b9b4fd27Smrg# ### END LIBTOOL TAG CONFIG: $1 3028b9b4fd27Smrg_LT_EOF 3029b9b4fd27Smrg])dnl /m4_if 3030b9b4fd27Smrg], 3031b9b4fd27Smrg[m4_if([$1], [], [ 3032b9b4fd27Smrg PACKAGE='$PACKAGE' 3033b9b4fd27Smrg VERSION='$VERSION' 3034b9b4fd27Smrg TIMESTAMP='$TIMESTAMP' 3035b9b4fd27Smrg RM='$RM' 3036b9b4fd27Smrg ofile='$ofile'], []) 3037b9b4fd27Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 3038b9b4fd27Smrg])# _LT_CONFIG 3039caade7ccSmrg 3040caade7ccSmrg 3041b9b4fd27Smrg# LT_SUPPORTED_TAG(TAG) 3042b9b4fd27Smrg# --------------------- 3043b9b4fd27Smrg# Trace this macro to discover what tags are supported by the libtool 3044b9b4fd27Smrg# --tag option, using: 3045b9b4fd27Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 3046b9b4fd27SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 3047caade7ccSmrg 3048caade7ccSmrg 3049b9b4fd27Smrg# C support is built-in for now 3050b9b4fd27Smrgm4_define([_LT_LANG_C_enabled], []) 3051b9b4fd27Smrgm4_define([_LT_TAGS], []) 3052caade7ccSmrg 3053caade7ccSmrg 3054b9b4fd27Smrg# LT_LANG(LANG) 3055b9b4fd27Smrg# ------------- 3056b9b4fd27Smrg# Enable libtool support for the given language if not already enabled. 3057b9b4fd27SmrgAC_DEFUN([LT_LANG], 3058b9b4fd27Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 3059b9b4fd27Smrgm4_case([$1], 3060b9b4fd27Smrg [C], [_LT_LANG(C)], 3061b9b4fd27Smrg [C++], [_LT_LANG(CXX)], 3062b9b4fd27Smrg [Java], [_LT_LANG(GCJ)], 3063b9b4fd27Smrg [Fortran 77], [_LT_LANG(F77)], 3064b9b4fd27Smrg [Fortran], [_LT_LANG(FC)], 3065b9b4fd27Smrg [Windows Resource], [_LT_LANG(RC)], 3066b9b4fd27Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 3067b9b4fd27Smrg [_LT_LANG($1)], 3068b9b4fd27Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 3069b9b4fd27Smrg])# LT_LANG 3070b9b4fd27Smrg 3071b9b4fd27Smrg 3072b9b4fd27Smrg# _LT_LANG(LANGNAME) 3073b9b4fd27Smrg# ------------------ 3074b9b4fd27Smrgm4_defun([_LT_LANG], 3075b9b4fd27Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 3076b9b4fd27Smrg [LT_SUPPORTED_TAG([$1])dnl 3077b9b4fd27Smrg m4_append([_LT_TAGS], [$1 ])dnl 3078b9b4fd27Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 3079b9b4fd27Smrg _LT_LANG_$1_CONFIG($1)])dnl 3080b9b4fd27Smrg])# _LT_LANG 3081caade7ccSmrg 3082caade7ccSmrg 3083b9b4fd27Smrg# _LT_LANG_DEFAULT_CONFIG 3084b9b4fd27Smrg# ----------------------- 3085b9b4fd27Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 3086b9b4fd27Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 3087b9b4fd27Smrg [LT_LANG(CXX)], 3088b9b4fd27Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3089b9b4fd27Smrg 3090b9b4fd27SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 3091b9b4fd27Smrg [LT_LANG(F77)], 3092b9b4fd27Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3093b9b4fd27Smrg 3094b9b4fd27SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 3095b9b4fd27Smrg [LT_LANG(FC)], 3096b9b4fd27Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 3097b9b4fd27Smrg 3098b9b4fd27Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 3099b9b4fd27Smrgdnl pulling things in needlessly. 3100b9b4fd27SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 3101b9b4fd27Smrg [LT_LANG(GCJ)], 3102b9b4fd27Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 3103b9b4fd27Smrg [LT_LANG(GCJ)], 3104b9b4fd27Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 3105b9b4fd27Smrg [LT_LANG(GCJ)], 3106b9b4fd27Smrg [m4_ifdef([AC_PROG_GCJ], 3107b9b4fd27Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 3108b9b4fd27Smrg m4_ifdef([A][M_PROG_GCJ], 3109b9b4fd27Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 3110b9b4fd27Smrg m4_ifdef([LT_PROG_GCJ], 3111b9b4fd27Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 3112b9b4fd27Smrg 3113b9b4fd27SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 3114b9b4fd27Smrg [LT_LANG(RC)], 3115b9b4fd27Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 3116b9b4fd27Smrg])# _LT_LANG_DEFAULT_CONFIG 3117b9b4fd27Smrg 3118b9b4fd27Smrg# Obsolete macros: 3119b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 3120b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 3121b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 3122b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 3123b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 3124b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 3125b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 3126b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 3127b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 3128b9b4fd27Smrg 3129b9b4fd27Smrg 3130b9b4fd27Smrg# _LT_TAG_COMPILER 3131b9b4fd27Smrg# ---------------- 3132b9b4fd27Smrgm4_defun([_LT_TAG_COMPILER], 3133b9b4fd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3134caade7ccSmrg 3135b9b4fd27Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 3136b9b4fd27Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 3137b9b4fd27Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 3138b9b4fd27Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 3139caade7ccSmrg 3140b9b4fd27Smrg# If no C compiler was specified, use CC. 3141b9b4fd27SmrgLTCC=${LTCC-"$CC"} 3142caade7ccSmrg 3143b9b4fd27Smrg# If no C compiler flags were specified, use CFLAGS. 3144b9b4fd27SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 3145caade7ccSmrg 3146b9b4fd27Smrg# Allow CC to be a program name with arguments. 3147b9b4fd27Smrgcompiler=$CC 3148b9b4fd27Smrg])# _LT_TAG_COMPILER 3149caade7ccSmrg 3150caade7ccSmrg 3151b9b4fd27Smrg# _LT_COMPILER_BOILERPLATE 3152b9b4fd27Smrg# ------------------------ 3153b9b4fd27Smrg# Check for compiler boilerplate output or warnings with 3154b9b4fd27Smrg# the simple compiler test code. 3155b9b4fd27Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 3156b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl 3157b9b4fd27Smrgac_outfile=conftest.$ac_objext 3158b9b4fd27Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 3159b9b4fd27Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3160b9b4fd27Smrg_lt_compiler_boilerplate=`cat conftest.err` 3161b9b4fd27Smrg$RM conftest* 3162b9b4fd27Smrg])# _LT_COMPILER_BOILERPLATE 3163caade7ccSmrg 3164caade7ccSmrg 3165b9b4fd27Smrg# _LT_LINKER_BOILERPLATE 3166b9b4fd27Smrg# ---------------------- 3167b9b4fd27Smrg# Check for linker boilerplate output or warnings with 3168b9b4fd27Smrg# the simple link test code. 3169b9b4fd27Smrgm4_defun([_LT_LINKER_BOILERPLATE], 3170b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl 3171b9b4fd27Smrgac_outfile=conftest.$ac_objext 3172b9b4fd27Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 3173b9b4fd27Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3174b9b4fd27Smrg_lt_linker_boilerplate=`cat conftest.err` 3175b9b4fd27Smrg$RM -r conftest* 3176b9b4fd27Smrg])# _LT_LINKER_BOILERPLATE 3177caade7ccSmrg 3178b9b4fd27Smrg# _LT_REQUIRED_DARWIN_CHECKS 3179b9b4fd27Smrg# ------------------------- 3180b9b4fd27Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 3181b9b4fd27Smrg case $host_os in 3182b9b4fd27Smrg rhapsody* | darwin*) 3183b9b4fd27Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3184b9b4fd27Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3185b9b4fd27Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 3186b9b4fd27Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 3187b9b4fd27Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 3188b9b4fd27Smrg _LT_DECL([], [DSYMUTIL], [1], 3189b9b4fd27Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 3190b9b4fd27Smrg _LT_DECL([], [NMEDIT], [1], 3191b9b4fd27Smrg [Tool to change global to local symbols on Mac OS X]) 3192b9b4fd27Smrg _LT_DECL([], [LIPO], [1], 3193b9b4fd27Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 3194b9b4fd27Smrg _LT_DECL([], [OTOOL], [1], 3195b9b4fd27Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 3196b9b4fd27Smrg _LT_DECL([], [OTOOL64], [1], 3197b9b4fd27Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 3198caade7ccSmrg 3199b9b4fd27Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3200b9b4fd27Smrg [lt_cv_apple_cc_single_mod=no 3201b9b4fd27Smrg if test -z "${LT_MULTI_MODULE}"; then 3202b9b4fd27Smrg # By default we will add the -single_module flag. You can override 3203b9b4fd27Smrg # by either setting the environment variable LT_MULTI_MODULE 3204b9b4fd27Smrg # non-empty at configure time, or by adding -multi_module to the 3205b9b4fd27Smrg # link flags. 3206b9b4fd27Smrg rm -rf libconftest.dylib* 3207b9b4fd27Smrg echo "int foo(void){return 1;}" > conftest.c 3208b9b4fd27Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3209b9b4fd27Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 3210b9b4fd27Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3211b9b4fd27Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 3212b9b4fd27Smrg _lt_result=$? 3213b9b4fd27Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 3214b9b4fd27Smrg lt_cv_apple_cc_single_mod=yes 3215b9b4fd27Smrg else 3216b9b4fd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3217b9b4fd27Smrg fi 3218b9b4fd27Smrg rm -rf libconftest.dylib* 3219b9b4fd27Smrg rm -f conftest.* 3220b9b4fd27Smrg fi]) 3221b9b4fd27Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3222b9b4fd27Smrg [lt_cv_ld_exported_symbols_list], 3223b9b4fd27Smrg [lt_cv_ld_exported_symbols_list=no 3224b9b4fd27Smrg save_LDFLAGS=$LDFLAGS 3225b9b4fd27Smrg echo "_main" > conftest.sym 3226b9b4fd27Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3227b9b4fd27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3228b9b4fd27Smrg [lt_cv_ld_exported_symbols_list=yes], 3229b9b4fd27Smrg [lt_cv_ld_exported_symbols_list=no]) 3230b9b4fd27Smrg LDFLAGS="$save_LDFLAGS" 3231b9b4fd27Smrg ]) 3232b9b4fd27Smrg case $host_os in 3233b9b4fd27Smrg rhapsody* | darwin1.[[012]]) 3234b9b4fd27Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3235b9b4fd27Smrg darwin1.*) 3236b9b4fd27Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3237b9b4fd27Smrg darwin*) # darwin 5.x on 3238b9b4fd27Smrg # if running on 10.5 or later, the deployment target defaults 3239b9b4fd27Smrg # to the OS version, if on x86, and 10.4, the deployment 3240b9b4fd27Smrg # target defaults to 10.4. Don't you love it? 3241b9b4fd27Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3242b9b4fd27Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3243b9b4fd27Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3244b9b4fd27Smrg 10.[[012]]*) 3245b9b4fd27Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3246b9b4fd27Smrg 10.*) 3247b9b4fd27Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3248b9b4fd27Smrg esac 3249caade7ccSmrg ;; 3250caade7ccSmrg esac 3251b9b4fd27Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3252b9b4fd27Smrg _lt_dar_single_mod='$single_module' 3253b9b4fd27Smrg fi 3254b9b4fd27Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3255b9b4fd27Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3256b9b4fd27Smrg else 3257b9b4fd27Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 3258b9b4fd27Smrg fi 3259b9b4fd27Smrg if test "$DSYMUTIL" != ":"; then 3260b9b4fd27Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 3261b9b4fd27Smrg else 3262b9b4fd27Smrg _lt_dsymutil= 3263b9b4fd27Smrg fi 3264b9b4fd27Smrg ;; 3265caade7ccSmrg esac 3266b9b4fd27Smrg]) 3267caade7ccSmrg 3268b9b4fd27Smrg 3269b9b4fd27Smrg# _LT_DARWIN_LINKER_FEATURES 3270b9b4fd27Smrg# -------------------------- 3271b9b4fd27Smrg# Checks for linker and compiler features on darwin 3272b9b4fd27Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 3273b9b4fd27Smrg[ 3274b9b4fd27Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 3275b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3276b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 3277b9b4fd27Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 3278b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3279b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 3280b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 3281b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3282b9b4fd27Smrg case $cc_basename in 3283b9b4fd27Smrg ifort*) _lt_dar_can_shared=yes ;; 3284b9b4fd27Smrg *) _lt_dar_can_shared=$GCC ;; 3285caade7ccSmrg esac 3286b9b4fd27Smrg if test "$_lt_dar_can_shared" = "yes"; then 3287b9b4fd27Smrg output_verbose_link_cmd=echo 3288b9b4fd27Smrg _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}" 3289b9b4fd27Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3290b9b4fd27Smrg _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}" 3291b9b4fd27Smrg _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}" 3292b9b4fd27Smrg m4_if([$1], [CXX], 3293b9b4fd27Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3294b9b4fd27Smrg _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}" 3295b9b4fd27Smrg _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}" 3296b9b4fd27Smrg fi 3297b9b4fd27Smrg],[]) 3298b9b4fd27Smrg else 3299b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 3300b9b4fd27Smrg fi 3301b9b4fd27Smrg]) 3302caade7ccSmrg 3303b9b4fd27Smrg# _LT_SYS_MODULE_PATH_AIX 3304b9b4fd27Smrg# ----------------------- 3305b9b4fd27Smrg# Links a minimal program and checks the executable 3306b9b4fd27Smrg# for the system default hardcoded library path. In most cases, 3307b9b4fd27Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 3308b9b4fd27Smrg# the location of the communication and MPI libs are included too. 3309b9b4fd27Smrg# If we don't find anything, use the default library path according 3310b9b4fd27Smrg# to the aix ld manual. 3311b9b4fd27Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 3312b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl 3313b9b4fd27SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3314b9b4fd27Smrglt_aix_libpath_sed=' 3315b9b4fd27Smrg /Import File Strings/,/^$/ { 3316b9b4fd27Smrg /^0/ { 3317b9b4fd27Smrg s/^0 *\(.*\)$/\1/ 3318b9b4fd27Smrg p 3319b9b4fd27Smrg } 3320b9b4fd27Smrg }' 3321b9b4fd27Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3322b9b4fd27Smrg# Check for a 64-bit object if we didn't find anything. 3323b9b4fd27Smrgif test -z "$aix_libpath"; then 3324b9b4fd27Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3325b9b4fd27Smrgfi],[]) 3326b9b4fd27Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3327b9b4fd27Smrg])# _LT_SYS_MODULE_PATH_AIX 3328caade7ccSmrg 3329caade7ccSmrg 3330b9b4fd27Smrg# _LT_SHELL_INIT(ARG) 3331b9b4fd27Smrg# ------------------- 3332b9b4fd27Smrgm4_define([_LT_SHELL_INIT], 3333b9b4fd27Smrg[ifdef([AC_DIVERSION_NOTICE], 3334b9b4fd27Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 3335b9b4fd27Smrg [AC_DIVERT_PUSH(NOTICE)]) 3336b9b4fd27Smrg$1 3337b9b4fd27SmrgAC_DIVERT_POP 3338b9b4fd27Smrg])# _LT_SHELL_INIT 3339caade7ccSmrg 3340caade7ccSmrg 3341b9b4fd27Smrg# _LT_PROG_ECHO_BACKSLASH 3342b9b4fd27Smrg# ----------------------- 3343b9b4fd27Smrg# Add some code to the start of the generated configure script which 3344b9b4fd27Smrg# will find an echo command which doesn't interpret backslashes. 3345b9b4fd27Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 3346b9b4fd27Smrg[_LT_SHELL_INIT([ 3347b9b4fd27Smrg# Check that we are running under the correct shell. 3348b9b4fd27SmrgSHELL=${CONFIG_SHELL-/bin/sh} 3349caade7ccSmrg 3350b9b4fd27Smrgcase X$lt_ECHO in 3351b9b4fd27SmrgX*--fallback-echo) 3352b9b4fd27Smrg # Remove one level of quotation (which was required for Make). 3353b9b4fd27Smrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 3354b9b4fd27Smrg ;; 3355b9b4fd27Smrgesac 3356b9b4fd27Smrg 3357b9b4fd27SmrgECHO=${lt_ECHO-echo} 3358b9b4fd27Smrgif test "X[$]1" = X--no-reexec; then 3359b9b4fd27Smrg # Discard the --no-reexec flag, and continue. 3360b9b4fd27Smrg shift 3361b9b4fd27Smrgelif test "X[$]1" = X--fallback-echo; then 3362b9b4fd27Smrg # Avoid inline document here, it may be left over 3363b9b4fd27Smrg : 3364b9b4fd27Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 3365b9b4fd27Smrg # Yippee, $ECHO works! 3366b9b4fd27Smrg : 3367caade7ccSmrgelse 3368b9b4fd27Smrg # Restart under the correct shell. 3369b9b4fd27Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 3370caade7ccSmrgfi 3371caade7ccSmrg 3372b9b4fd27Smrgif test "X[$]1" = X--fallback-echo; then 3373b9b4fd27Smrg # used as fallback echo 3374b9b4fd27Smrg shift 3375b9b4fd27Smrg cat <<_LT_EOF 3376b9b4fd27Smrg[$]* 3377b9b4fd27Smrg_LT_EOF 3378b9b4fd27Smrg exit 0 3379caade7ccSmrgfi 3380caade7ccSmrg 3381b9b4fd27Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3382b9b4fd27Smrg# if CDPATH is set. 3383b9b4fd27Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3384caade7ccSmrg 3385b9b4fd27Smrgif test -z "$lt_ECHO"; then 3386b9b4fd27Smrg if test "X${echo_test_string+set}" != Xset; then 3387b9b4fd27Smrg # find a string as large as possible, as long as the shell can cope with it 3388b9b4fd27Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 3389b9b4fd27Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 3390b9b4fd27Smrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 3391b9b4fd27Smrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 3392b9b4fd27Smrg then 3393b9b4fd27Smrg break 3394b9b4fd27Smrg fi 3395b9b4fd27Smrg done 3396b9b4fd27Smrg fi 3397caade7ccSmrg 3398b9b4fd27Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 3399b9b4fd27Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 3400b9b4fd27Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3401b9b4fd27Smrg : 3402caade7ccSmrg else 3403b9b4fd27Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 3404b9b4fd27Smrg # backslashes. This makes it impossible to quote backslashes using 3405b9b4fd27Smrg # echo "$something" | sed 's/\\/\\\\/g' 3406b9b4fd27Smrg # 3407b9b4fd27Smrg # So, first we look for a working echo in the user's PATH. 3408caade7ccSmrg 3409b9b4fd27Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3410b9b4fd27Smrg for dir in $PATH /usr/ucb; do 3411b9b4fd27Smrg IFS="$lt_save_ifs" 3412b9b4fd27Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 3413b9b4fd27Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 3414b9b4fd27Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 3415b9b4fd27Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3416b9b4fd27Smrg ECHO="$dir/echo" 3417b9b4fd27Smrg break 3418b9b4fd27Smrg fi 3419b9b4fd27Smrg done 3420b9b4fd27Smrg IFS="$lt_save_ifs" 3421caade7ccSmrg 3422b9b4fd27Smrg if test "X$ECHO" = Xecho; then 3423b9b4fd27Smrg # We didn't find a better echo, so look for alternatives. 3424b9b4fd27Smrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 3425b9b4fd27Smrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 3426b9b4fd27Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3427b9b4fd27Smrg # This shell has a builtin print -r that does the trick. 3428b9b4fd27Smrg ECHO='print -r' 3429b9b4fd27Smrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 3430b9b4fd27Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 3431b9b4fd27Smrg # If we have ksh, try running configure again with it. 3432b9b4fd27Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 3433b9b4fd27Smrg export ORIGINAL_CONFIG_SHELL 3434b9b4fd27Smrg CONFIG_SHELL=/bin/ksh 3435b9b4fd27Smrg export CONFIG_SHELL 3436b9b4fd27Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 3437b9b4fd27Smrg else 3438b9b4fd27Smrg # Try using printf. 3439b9b4fd27Smrg ECHO='printf %s\n' 3440b9b4fd27Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 3441b9b4fd27Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 3442b9b4fd27Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3443b9b4fd27Smrg # Cool, printf works 3444b9b4fd27Smrg : 3445b9b4fd27Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 3446b9b4fd27Smrg test "X$echo_testing_string" = 'X\t' && 3447b9b4fd27Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 3448b9b4fd27Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3449b9b4fd27Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 3450b9b4fd27Smrg export CONFIG_SHELL 3451b9b4fd27Smrg SHELL="$CONFIG_SHELL" 3452b9b4fd27Smrg export SHELL 3453b9b4fd27Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 3454b9b4fd27Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 3455b9b4fd27Smrg test "X$echo_testing_string" = 'X\t' && 3456b9b4fd27Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 3457b9b4fd27Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 3458b9b4fd27Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 3459b9b4fd27Smrg else 3460b9b4fd27Smrg # maybe with a smaller string... 3461b9b4fd27Smrg prev=: 3462caade7ccSmrg 3463b9b4fd27Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 3464b9b4fd27Smrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 3465b9b4fd27Smrg then 3466b9b4fd27Smrg break 3467b9b4fd27Smrg fi 3468b9b4fd27Smrg prev="$cmd" 3469b9b4fd27Smrg done 3470b9b4fd27Smrg 3471b9b4fd27Smrg if test "$prev" != 'sed 50q "[$]0"'; then 3472b9b4fd27Smrg echo_test_string=`eval $prev` 3473b9b4fd27Smrg export echo_test_string 3474b9b4fd27Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 3475b9b4fd27Smrg else 3476b9b4fd27Smrg # Oops. We lost completely, so just stick with echo. 3477b9b4fd27Smrg ECHO=echo 3478b9b4fd27Smrg fi 3479b9b4fd27Smrg fi 3480b9b4fd27Smrg fi 3481b9b4fd27Smrg fi 3482b9b4fd27Smrg fi 3483caade7ccSmrgfi 3484b9b4fd27Smrg 3485b9b4fd27Smrg# Copy echo and quote the copy suitably for passing to libtool from 3486b9b4fd27Smrg# the Makefile, instead of quoting the original, which is used later. 3487b9b4fd27Smrglt_ECHO=$ECHO 3488b9b4fd27Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 3489b9b4fd27Smrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 3490caade7ccSmrgfi 3491caade7ccSmrg 3492b9b4fd27SmrgAC_SUBST(lt_ECHO) 3493b9b4fd27Smrg]) 3494b9b4fd27Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 3495b9b4fd27Smrg_LT_DECL([], [ECHO], [1], 3496b9b4fd27Smrg [An echo program that does not interpret backslashes]) 3497b9b4fd27Smrg])# _LT_PROG_ECHO_BACKSLASH 3498caade7ccSmrg 3499caade7ccSmrg 3500b9b4fd27Smrg# _LT_ENABLE_LOCK 3501b9b4fd27Smrg# --------------- 3502b9b4fd27Smrgm4_defun([_LT_ENABLE_LOCK], 3503b9b4fd27Smrg[AC_ARG_ENABLE([libtool-lock], 3504b9b4fd27Smrg [AS_HELP_STRING([--disable-libtool-lock], 3505b9b4fd27Smrg [avoid locking (might break parallel builds)])]) 3506b9b4fd27Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 3507caade7ccSmrg 3508b9b4fd27Smrg# Some flags need to be propagated to the compiler or linker for good 3509b9b4fd27Smrg# libtool support. 3510b9b4fd27Smrgcase $host in 3511b9b4fd27Smrgia64-*-hpux*) 3512b9b4fd27Smrg # Find out which ABI we are using. 3513b9b4fd27Smrg echo 'int i;' > conftest.$ac_ext 3514b9b4fd27Smrg if AC_TRY_EVAL(ac_compile); then 3515b9b4fd27Smrg case `/usr/bin/file conftest.$ac_objext` in 3516b9b4fd27Smrg *ELF-32*) 3517b9b4fd27Smrg HPUX_IA64_MODE="32" 3518b9b4fd27Smrg ;; 3519b9b4fd27Smrg *ELF-64*) 3520b9b4fd27Smrg HPUX_IA64_MODE="64" 3521b9b4fd27Smrg ;; 3522caade7ccSmrg esac 3523b9b4fd27Smrg fi 3524b9b4fd27Smrg rm -rf conftest* 3525b9b4fd27Smrg ;; 3526b9b4fd27Smrg*-*-irix6*) 3527b9b4fd27Smrg # Find out which ABI we are using. 3528b9b4fd27Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 3529b9b4fd27Smrg if AC_TRY_EVAL(ac_compile); then 3530b9b4fd27Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3531b9b4fd27Smrg case `/usr/bin/file conftest.$ac_objext` in 3532b9b4fd27Smrg *32-bit*) 3533b9b4fd27Smrg LD="${LD-ld} -melf32bsmip" 3534b9b4fd27Smrg ;; 3535b9b4fd27Smrg *N32*) 3536b9b4fd27Smrg LD="${LD-ld} -melf32bmipn32" 3537b9b4fd27Smrg ;; 3538b9b4fd27Smrg *64-bit*) 3539b9b4fd27Smrg LD="${LD-ld} -melf64bmip" 3540b9b4fd27Smrg ;; 3541b9b4fd27Smrg esac 3542caade7ccSmrg else 3543b9b4fd27Smrg case `/usr/bin/file conftest.$ac_objext` in 3544b9b4fd27Smrg *32-bit*) 3545b9b4fd27Smrg LD="${LD-ld} -32" 3546b9b4fd27Smrg ;; 3547b9b4fd27Smrg *N32*) 3548b9b4fd27Smrg LD="${LD-ld} -n32" 3549b9b4fd27Smrg ;; 3550b9b4fd27Smrg *64-bit*) 3551b9b4fd27Smrg LD="${LD-ld} -64" 3552b9b4fd27Smrg ;; 3553b9b4fd27Smrg esac 3554caade7ccSmrg fi 3555caade7ccSmrg fi 3556b9b4fd27Smrg rm -rf conftest* 3557caade7ccSmrg ;; 3558caade7ccSmrg 3559b9b4fd27Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 3560b9b4fd27Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 3561b9b4fd27Smrg # Find out which ABI we are using. 3562b9b4fd27Smrg echo 'int i;' > conftest.$ac_ext 3563b9b4fd27Smrg if AC_TRY_EVAL(ac_compile); then 3564b9b4fd27Smrg case `/usr/bin/file conftest.o` in 3565b9b4fd27Smrg *32-bit*) 3566b9b4fd27Smrg case $host in 3567b9b4fd27Smrg x86_64-*kfreebsd*-gnu) 3568b9b4fd27Smrg LD="${LD-ld} -m elf_i386_fbsd" 3569b9b4fd27Smrg ;; 3570b9b4fd27Smrg x86_64-*linux*) 3571b9b4fd27Smrg LD="${LD-ld} -m elf_i386" 3572b9b4fd27Smrg ;; 3573b9b4fd27Smrg ppc64-*linux*|powerpc64-*linux*) 3574b9b4fd27Smrg LD="${LD-ld} -m elf32ppclinux" 3575b9b4fd27Smrg ;; 3576b9b4fd27Smrg s390x-*linux*) 3577b9b4fd27Smrg LD="${LD-ld} -m elf_s390" 3578b9b4fd27Smrg ;; 3579b9b4fd27Smrg sparc64-*linux*) 3580b9b4fd27Smrg LD="${LD-ld} -m elf32_sparc" 3581b9b4fd27Smrg ;; 3582b9b4fd27Smrg esac 3583b9b4fd27Smrg ;; 3584b9b4fd27Smrg *64-bit*) 3585b9b4fd27Smrg case $host in 3586b9b4fd27Smrg x86_64-*kfreebsd*-gnu) 3587b9b4fd27Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 3588b9b4fd27Smrg ;; 3589b9b4fd27Smrg x86_64-*linux*) 3590b9b4fd27Smrg LD="${LD-ld} -m elf_x86_64" 3591b9b4fd27Smrg ;; 3592b9b4fd27Smrg ppc*-*linux*|powerpc*-*linux*) 3593b9b4fd27Smrg LD="${LD-ld} -m elf64ppc" 3594b9b4fd27Smrg ;; 3595b9b4fd27Smrg s390*-*linux*|s390*-*tpf*) 3596b9b4fd27Smrg LD="${LD-ld} -m elf64_s390" 3597b9b4fd27Smrg ;; 3598b9b4fd27Smrg sparc*-*linux*) 3599b9b4fd27Smrg LD="${LD-ld} -m elf64_sparc" 3600b9b4fd27Smrg ;; 3601b9b4fd27Smrg esac 3602b9b4fd27Smrg ;; 3603b9b4fd27Smrg esac 3604b9b4fd27Smrg fi 3605b9b4fd27Smrg rm -rf conftest* 3606caade7ccSmrg ;; 3607caade7ccSmrg 3608b9b4fd27Smrg*-*-sco3.2v5*) 3609b9b4fd27Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 3610b9b4fd27Smrg SAVE_CFLAGS="$CFLAGS" 3611b9b4fd27Smrg CFLAGS="$CFLAGS -belf" 3612b9b4fd27Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 3613b9b4fd27Smrg [AC_LANG_PUSH(C) 3614b9b4fd27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 3615b9b4fd27Smrg AC_LANG_POP]) 3616b9b4fd27Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 3617b9b4fd27Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 3618b9b4fd27Smrg CFLAGS="$SAVE_CFLAGS" 3619b9b4fd27Smrg fi 3620caade7ccSmrg ;; 3621b9b4fd27Smrgsparc*-*solaris*) 3622b9b4fd27Smrg # Find out which ABI we are using. 3623b9b4fd27Smrg echo 'int i;' > conftest.$ac_ext 3624b9b4fd27Smrg if AC_TRY_EVAL(ac_compile); then 3625b9b4fd27Smrg case `/usr/bin/file conftest.o` in 3626b9b4fd27Smrg *64-bit*) 3627b9b4fd27Smrg case $lt_cv_prog_gnu_ld in 3628b9b4fd27Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 3629b9b4fd27Smrg *) 3630b9b4fd27Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 3631b9b4fd27Smrg LD="${LD-ld} -64" 3632b9b4fd27Smrg fi 3633b9b4fd27Smrg ;; 3634b9b4fd27Smrg esac 3635b9b4fd27Smrg ;; 3636b9b4fd27Smrg esac 3637b9b4fd27Smrg fi 3638b9b4fd27Smrg rm -rf conftest* 3639caade7ccSmrg ;; 3640b9b4fd27Smrgesac 3641caade7ccSmrg 3642b9b4fd27Smrgneed_locks="$enable_libtool_lock" 3643b9b4fd27Smrg])# _LT_ENABLE_LOCK 3644caade7ccSmrg 3645caade7ccSmrg 3646b9b4fd27Smrg# _LT_CMD_OLD_ARCHIVE 3647b9b4fd27Smrg# ------------------- 3648b9b4fd27Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 3649b9b4fd27Smrg[AC_CHECK_TOOL(AR, ar, false) 3650b9b4fd27Smrgtest -z "$AR" && AR=ar 3651b9b4fd27Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 3652b9b4fd27Smrg_LT_DECL([], [AR], [1], [The archiver]) 3653b9b4fd27Smrg_LT_DECL([], [AR_FLAGS], [1]) 3654caade7ccSmrg 3655b9b4fd27SmrgAC_CHECK_TOOL(STRIP, strip, :) 3656b9b4fd27Smrgtest -z "$STRIP" && STRIP=: 3657b9b4fd27Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 3658caade7ccSmrg 3659b9b4fd27SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 3660b9b4fd27Smrgtest -z "$RANLIB" && RANLIB=: 3661b9b4fd27Smrg_LT_DECL([], [RANLIB], [1], 3662b9b4fd27Smrg [Commands used to install an old-style archive]) 3663caade7ccSmrg 3664b9b4fd27Smrg# Determine commands to create old-style static archives. 3665b9b4fd27Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 3666b9b4fd27Smrgold_postinstall_cmds='chmod 644 $oldlib' 3667b9b4fd27Smrgold_postuninstall_cmds= 3668caade7ccSmrg 3669b9b4fd27Smrgif test -n "$RANLIB"; then 3670caade7ccSmrg case $host_os in 3671b9b4fd27Smrg openbsd*) 3672b9b4fd27Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 3673caade7ccSmrg ;; 3674b9b4fd27Smrg *) 3675b9b4fd27Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 3676caade7ccSmrg ;; 3677caade7ccSmrg esac 3678b9b4fd27Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 3679b9b4fd27Smrgfi 3680b9b4fd27Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 3681b9b4fd27Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 3682b9b4fd27Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 3683b9b4fd27Smrg [Commands used to build an old-style archive]) 3684b9b4fd27Smrg])# _LT_CMD_OLD_ARCHIVE 3685caade7ccSmrg 3686caade7ccSmrg 3687b9b4fd27Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3688b9b4fd27Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 3689b9b4fd27Smrg# ---------------------------------------------------------------- 3690b9b4fd27Smrg# Check whether the given compiler option works 3691b9b4fd27SmrgAC_DEFUN([_LT_COMPILER_OPTION], 3692b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3693b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 3694b9b4fd27SmrgAC_CACHE_CHECK([$1], [$2], 3695b9b4fd27Smrg [$2=no 3696b9b4fd27Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 3697b9b4fd27Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3698b9b4fd27Smrg lt_compiler_flag="$3" 3699b9b4fd27Smrg # Insert the option either (1) after the last *FLAGS variable, or 3700b9b4fd27Smrg # (2) before a word containing "conftest.", or (3) at the end. 3701b9b4fd27Smrg # Note that $ac_compile itself does not contain backslashes and begins 3702b9b4fd27Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 3703b9b4fd27Smrg # The option is referenced via a variable to avoid confusing sed. 3704b9b4fd27Smrg lt_compile=`echo "$ac_compile" | $SED \ 3705b9b4fd27Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3706b9b4fd27Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3707b9b4fd27Smrg -e 's:$: $lt_compiler_flag:'` 3708b9b4fd27Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3709b9b4fd27Smrg (eval "$lt_compile" 2>conftest.err) 3710b9b4fd27Smrg ac_status=$? 3711b9b4fd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3712b9b4fd27Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3713b9b4fd27Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 3714b9b4fd27Smrg # The compiler can only warn and ignore the option if not recognized 3715b9b4fd27Smrg # So say no if there are warnings other than the usual output. 3716b9b4fd27Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 3717b9b4fd27Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3718b9b4fd27Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 3719b9b4fd27Smrg $2=yes 3720b9b4fd27Smrg fi 3721b9b4fd27Smrg fi 3722b9b4fd27Smrg $RM conftest* 3723b9b4fd27Smrg]) 3724caade7ccSmrg 3725b9b4fd27Smrgif test x"[$]$2" = xyes; then 3726b9b4fd27Smrg m4_if([$5], , :, [$5]) 3727b9b4fd27Smrgelse 3728b9b4fd27Smrg m4_if([$6], , :, [$6]) 3729b9b4fd27Smrgfi 3730b9b4fd27Smrg])# _LT_COMPILER_OPTION 3731caade7ccSmrg 3732b9b4fd27Smrg# Old name: 3733b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 3734b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 3735b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 3736caade7ccSmrg 3737caade7ccSmrg 3738b9b4fd27Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3739b9b4fd27Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 3740b9b4fd27Smrg# ---------------------------------------------------- 3741b9b4fd27Smrg# Check whether the given linker option works 3742b9b4fd27SmrgAC_DEFUN([_LT_LINKER_OPTION], 3743b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3744b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 3745b9b4fd27SmrgAC_CACHE_CHECK([$1], [$2], 3746b9b4fd27Smrg [$2=no 3747b9b4fd27Smrg save_LDFLAGS="$LDFLAGS" 3748b9b4fd27Smrg LDFLAGS="$LDFLAGS $3" 3749b9b4fd27Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 3750b9b4fd27Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 3751b9b4fd27Smrg # The linker can only warn and ignore the option if not recognized 3752b9b4fd27Smrg # So say no if there are warnings 3753b9b4fd27Smrg if test -s conftest.err; then 3754b9b4fd27Smrg # Append any errors to the config.log. 3755b9b4fd27Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 3756b9b4fd27Smrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 3757b9b4fd27Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 3758b9b4fd27Smrg if diff conftest.exp conftest.er2 >/dev/null; then 3759b9b4fd27Smrg $2=yes 3760b9b4fd27Smrg fi 3761b9b4fd27Smrg else 3762b9b4fd27Smrg $2=yes 3763b9b4fd27Smrg fi 3764b9b4fd27Smrg fi 3765b9b4fd27Smrg $RM -r conftest* 3766b9b4fd27Smrg LDFLAGS="$save_LDFLAGS" 3767b9b4fd27Smrg]) 3768caade7ccSmrg 3769b9b4fd27Smrgif test x"[$]$2" = xyes; then 3770b9b4fd27Smrg m4_if([$4], , :, [$4]) 3771b9b4fd27Smrgelse 3772b9b4fd27Smrg m4_if([$5], , :, [$5]) 3773b9b4fd27Smrgfi 3774b9b4fd27Smrg])# _LT_LINKER_OPTION 3775caade7ccSmrg 3776b9b4fd27Smrg# Old name: 3777b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 3778b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 3779b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 3780caade7ccSmrg 3781caade7ccSmrg 3782b9b4fd27Smrg# LT_CMD_MAX_LEN 3783b9b4fd27Smrg#--------------- 3784b9b4fd27SmrgAC_DEFUN([LT_CMD_MAX_LEN], 3785b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3786b9b4fd27Smrg# find the maximum length of command line arguments 3787b9b4fd27SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 3788b9b4fd27SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 3789b9b4fd27Smrg i=0 3790b9b4fd27Smrg teststring="ABCD" 3791caade7ccSmrg 3792b9b4fd27Smrg case $build_os in 3793b9b4fd27Smrg msdosdjgpp*) 3794b9b4fd27Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 3795b9b4fd27Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 3796b9b4fd27Smrg # during glob expansion). Even if it were fixed, the result of this 3797b9b4fd27Smrg # check would be larger than it should be. 3798b9b4fd27Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 3799b9b4fd27Smrg ;; 3800caade7ccSmrg 3801b9b4fd27Smrg gnu*) 3802b9b4fd27Smrg # Under GNU Hurd, this test is not required because there is 3803b9b4fd27Smrg # no limit to the length of command line arguments. 3804b9b4fd27Smrg # Libtool will interpret -1 as no limit whatsoever 3805b9b4fd27Smrg lt_cv_sys_max_cmd_len=-1; 3806b9b4fd27Smrg ;; 3807caade7ccSmrg 3808b9b4fd27Smrg cygwin* | mingw* | cegcc*) 3809b9b4fd27Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 3810b9b4fd27Smrg # about 5 minutes as the teststring grows exponentially. 3811b9b4fd27Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 3812b9b4fd27Smrg # you end up with a "frozen" computer, even though with patience 3813b9b4fd27Smrg # the test eventually succeeds (with a max line length of 256k). 3814b9b4fd27Smrg # Instead, let's just punt: use the minimum linelength reported by 3815b9b4fd27Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 3816b9b4fd27Smrg lt_cv_sys_max_cmd_len=8192; 3817b9b4fd27Smrg ;; 3818caade7ccSmrg 3819b9b4fd27Smrg amigaos*) 3820b9b4fd27Smrg # On AmigaOS with pdksh, this test takes hours, literally. 3821b9b4fd27Smrg # So we just punt and use a minimum line length of 8192. 3822b9b4fd27Smrg lt_cv_sys_max_cmd_len=8192; 3823b9b4fd27Smrg ;; 3824485f0483Smrg 3825b9b4fd27Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 3826b9b4fd27Smrg # This has been around since 386BSD, at least. Likely further. 3827b9b4fd27Smrg if test -x /sbin/sysctl; then 3828b9b4fd27Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 3829b9b4fd27Smrg elif test -x /usr/sbin/sysctl; then 3830b9b4fd27Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 3831b9b4fd27Smrg else 3832b9b4fd27Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 3833b9b4fd27Smrg fi 3834b9b4fd27Smrg # And add a safety zone 3835b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 3836b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 3837b9b4fd27Smrg ;; 3838caade7ccSmrg 3839b9b4fd27Smrg interix*) 3840b9b4fd27Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 3841b9b4fd27Smrg lt_cv_sys_max_cmd_len=196608 3842b9b4fd27Smrg ;; 3843caade7ccSmrg 3844b9b4fd27Smrg osf*) 3845b9b4fd27Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 3846b9b4fd27Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 3847b9b4fd27Smrg # nice to cause kernel panics so lets avoid the loop below. 3848b9b4fd27Smrg # First set a reasonable default. 3849b9b4fd27Smrg lt_cv_sys_max_cmd_len=16384 3850b9b4fd27Smrg # 3851b9b4fd27Smrg if test -x /sbin/sysconfig; then 3852b9b4fd27Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 3853b9b4fd27Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 3854b9b4fd27Smrg esac 3855b9b4fd27Smrg fi 3856b9b4fd27Smrg ;; 3857b9b4fd27Smrg sco3.2v5*) 3858b9b4fd27Smrg lt_cv_sys_max_cmd_len=102400 3859b9b4fd27Smrg ;; 3860b9b4fd27Smrg sysv5* | sco5v6* | sysv4.2uw2*) 3861b9b4fd27Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 3862b9b4fd27Smrg if test -n "$kargmax"; then 3863b9b4fd27Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 3864b9b4fd27Smrg else 3865b9b4fd27Smrg lt_cv_sys_max_cmd_len=32768 3866b9b4fd27Smrg fi 3867b9b4fd27Smrg ;; 3868b9b4fd27Smrg *) 3869b9b4fd27Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 3870b9b4fd27Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 3871b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 3872b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 3873b9b4fd27Smrg else 3874b9b4fd27Smrg # Make teststring a little bigger before we do anything with it. 3875b9b4fd27Smrg # a 1K string should be a reasonable start. 3876b9b4fd27Smrg for i in 1 2 3 4 5 6 7 8 ; do 3877b9b4fd27Smrg teststring=$teststring$teststring 3878b9b4fd27Smrg done 3879b9b4fd27Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 3880b9b4fd27Smrg # If test is not a shell built-in, we'll probably end up computing a 3881b9b4fd27Smrg # maximum length that is only half of the actual maximum length, but 3882b9b4fd27Smrg # we can't tell. 3883b9b4fd27Smrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 3884b9b4fd27Smrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 3885b9b4fd27Smrg test $i != 17 # 1/2 MB should be enough 3886b9b4fd27Smrg do 3887b9b4fd27Smrg i=`expr $i + 1` 3888b9b4fd27Smrg teststring=$teststring$teststring 3889b9b4fd27Smrg done 3890b9b4fd27Smrg # Only check the string length outside the loop. 3891b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 3892b9b4fd27Smrg teststring= 3893b9b4fd27Smrg # Add a significant safety factor because C++ compilers can tack on 3894b9b4fd27Smrg # massive amounts of additional arguments before passing them to the 3895b9b4fd27Smrg # linker. It appears as though 1/2 is a usable value. 3896b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 3897b9b4fd27Smrg fi 3898b9b4fd27Smrg ;; 3899caade7ccSmrg esac 3900b9b4fd27Smrg]) 3901b9b4fd27Smrgif test -n $lt_cv_sys_max_cmd_len ; then 3902b9b4fd27Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 3903b9b4fd27Smrgelse 3904b9b4fd27Smrg AC_MSG_RESULT(none) 3905b9b4fd27Smrgfi 3906b9b4fd27Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 3907b9b4fd27Smrg_LT_DECL([], [max_cmd_len], [0], 3908b9b4fd27Smrg [What is the maximum length of a command?]) 3909b9b4fd27Smrg])# LT_CMD_MAX_LEN 3910caade7ccSmrg 3911b9b4fd27Smrg# Old name: 3912b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 3913b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 3914b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 3915caade7ccSmrg 3916caade7ccSmrg 3917b9b4fd27Smrg# _LT_HEADER_DLFCN 3918b9b4fd27Smrg# ---------------- 3919b9b4fd27Smrgm4_defun([_LT_HEADER_DLFCN], 3920b9b4fd27Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 3921b9b4fd27Smrg])# _LT_HEADER_DLFCN 3922caade7ccSmrg 3923caade7ccSmrg 3924b9b4fd27Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 3925b9b4fd27Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 3926b9b4fd27Smrg# ---------------------------------------------------------------- 3927b9b4fd27Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 3928b9b4fd27Smrg[m4_require([_LT_HEADER_DLFCN])dnl 3929b9b4fd27Smrgif test "$cross_compiling" = yes; then : 3930b9b4fd27Smrg [$4] 3931b9b4fd27Smrgelse 3932b9b4fd27Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 3933b9b4fd27Smrg lt_status=$lt_dlunknown 3934b9b4fd27Smrg cat > conftest.$ac_ext <<_LT_EOF 3935b9b4fd27Smrg[#line __oline__ "configure" 3936b9b4fd27Smrg#include "confdefs.h" 3937485f0483Smrg 3938b9b4fd27Smrg#if HAVE_DLFCN_H 3939b9b4fd27Smrg#include <dlfcn.h> 3940b9b4fd27Smrg#endif 3941caade7ccSmrg 3942b9b4fd27Smrg#include <stdio.h> 3943caade7ccSmrg 3944b9b4fd27Smrg#ifdef RTLD_GLOBAL 3945b9b4fd27Smrg# define LT_DLGLOBAL RTLD_GLOBAL 3946b9b4fd27Smrg#else 3947b9b4fd27Smrg# ifdef DL_GLOBAL 3948b9b4fd27Smrg# define LT_DLGLOBAL DL_GLOBAL 3949b9b4fd27Smrg# else 3950b9b4fd27Smrg# define LT_DLGLOBAL 0 3951b9b4fd27Smrg# endif 3952b9b4fd27Smrg#endif 3953caade7ccSmrg 3954b9b4fd27Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 3955b9b4fd27Smrg find out it does not work in some platform. */ 3956b9b4fd27Smrg#ifndef LT_DLLAZY_OR_NOW 3957b9b4fd27Smrg# ifdef RTLD_LAZY 3958b9b4fd27Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 3959b9b4fd27Smrg# else 3960b9b4fd27Smrg# ifdef DL_LAZY 3961b9b4fd27Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 3962b9b4fd27Smrg# else 3963b9b4fd27Smrg# ifdef RTLD_NOW 3964b9b4fd27Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 3965b9b4fd27Smrg# else 3966b9b4fd27Smrg# ifdef DL_NOW 3967b9b4fd27Smrg# define LT_DLLAZY_OR_NOW DL_NOW 3968b9b4fd27Smrg# else 3969b9b4fd27Smrg# define LT_DLLAZY_OR_NOW 0 3970b9b4fd27Smrg# endif 3971b9b4fd27Smrg# endif 3972b9b4fd27Smrg# endif 3973b9b4fd27Smrg# endif 3974b9b4fd27Smrg#endif 3975caade7ccSmrg 3976b9b4fd27Smrgvoid fnord() { int i=42;} 3977b9b4fd27Smrgint main () 3978b9b4fd27Smrg{ 3979b9b4fd27Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 3980b9b4fd27Smrg int status = $lt_dlunknown; 3981caade7ccSmrg 3982b9b4fd27Smrg if (self) 3983b9b4fd27Smrg { 3984b9b4fd27Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 3985b9b4fd27Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 3986b9b4fd27Smrg /* dlclose (self); */ 3987b9b4fd27Smrg } 3988b9b4fd27Smrg else 3989b9b4fd27Smrg puts (dlerror ()); 3990caade7ccSmrg 3991b9b4fd27Smrg return status; 3992b9b4fd27Smrg}] 3993b9b4fd27Smrg_LT_EOF 3994b9b4fd27Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 3995b9b4fd27Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 3996b9b4fd27Smrg lt_status=$? 3997b9b4fd27Smrg case x$lt_status in 3998b9b4fd27Smrg x$lt_dlno_uscore) $1 ;; 3999b9b4fd27Smrg x$lt_dlneed_uscore) $2 ;; 4000b9b4fd27Smrg x$lt_dlunknown|x*) $3 ;; 4001b9b4fd27Smrg esac 4002b9b4fd27Smrg else : 4003b9b4fd27Smrg # compilation failed 4004b9b4fd27Smrg $3 4005b9b4fd27Smrg fi 4006b9b4fd27Smrgfi 4007b9b4fd27Smrgrm -fr conftest* 4008b9b4fd27Smrg])# _LT_TRY_DLOPEN_SELF 4009caade7ccSmrg 4010caade7ccSmrg 4011b9b4fd27Smrg# LT_SYS_DLOPEN_SELF 4012b9b4fd27Smrg# ------------------ 4013b9b4fd27SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 4014b9b4fd27Smrg[m4_require([_LT_HEADER_DLFCN])dnl 4015b9b4fd27Smrgif test "x$enable_dlopen" != xyes; then 4016b9b4fd27Smrg enable_dlopen=unknown 4017b9b4fd27Smrg enable_dlopen_self=unknown 4018b9b4fd27Smrg enable_dlopen_self_static=unknown 4019b9b4fd27Smrgelse 4020b9b4fd27Smrg lt_cv_dlopen=no 4021b9b4fd27Smrg lt_cv_dlopen_libs= 4022caade7ccSmrg 4023b9b4fd27Smrg case $host_os in 4024b9b4fd27Smrg beos*) 4025b9b4fd27Smrg lt_cv_dlopen="load_add_on" 4026b9b4fd27Smrg lt_cv_dlopen_libs= 4027b9b4fd27Smrg lt_cv_dlopen_self=yes 4028b9b4fd27Smrg ;; 4029caade7ccSmrg 4030b9b4fd27Smrg mingw* | pw32* | cegcc*) 4031b9b4fd27Smrg lt_cv_dlopen="LoadLibrary" 4032b9b4fd27Smrg lt_cv_dlopen_libs= 4033b9b4fd27Smrg ;; 4034caade7ccSmrg 4035b9b4fd27Smrg cygwin*) 4036b9b4fd27Smrg lt_cv_dlopen="dlopen" 4037b9b4fd27Smrg lt_cv_dlopen_libs= 4038b9b4fd27Smrg ;; 4039caade7ccSmrg 4040b9b4fd27Smrg darwin*) 4041b9b4fd27Smrg # if libdl is installed we need to link against it 4042b9b4fd27Smrg AC_CHECK_LIB([dl], [dlopen], 4043b9b4fd27Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 4044b9b4fd27Smrg lt_cv_dlopen="dyld" 4045b9b4fd27Smrg lt_cv_dlopen_libs= 4046b9b4fd27Smrg lt_cv_dlopen_self=yes 4047b9b4fd27Smrg ]) 4048b9b4fd27Smrg ;; 4049caade7ccSmrg 4050b9b4fd27Smrg *) 4051b9b4fd27Smrg AC_CHECK_FUNC([shl_load], 4052b9b4fd27Smrg [lt_cv_dlopen="shl_load"], 4053b9b4fd27Smrg [AC_CHECK_LIB([dld], [shl_load], 4054b9b4fd27Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 4055b9b4fd27Smrg [AC_CHECK_FUNC([dlopen], 4056b9b4fd27Smrg [lt_cv_dlopen="dlopen"], 4057b9b4fd27Smrg [AC_CHECK_LIB([dl], [dlopen], 4058b9b4fd27Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 4059b9b4fd27Smrg [AC_CHECK_LIB([svld], [dlopen], 4060b9b4fd27Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 4061b9b4fd27Smrg [AC_CHECK_LIB([dld], [dld_link], 4062b9b4fd27Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 4063b9b4fd27Smrg ]) 4064b9b4fd27Smrg ]) 4065b9b4fd27Smrg ]) 4066b9b4fd27Smrg ]) 4067b9b4fd27Smrg ]) 4068b9b4fd27Smrg ;; 4069b9b4fd27Smrg esac 4070caade7ccSmrg 4071b9b4fd27Smrg if test "x$lt_cv_dlopen" != xno; then 4072b9b4fd27Smrg enable_dlopen=yes 4073caade7ccSmrg else 4074b9b4fd27Smrg enable_dlopen=no 4075caade7ccSmrg fi 4076caade7ccSmrg 4077b9b4fd27Smrg case $lt_cv_dlopen in 4078b9b4fd27Smrg dlopen) 4079b9b4fd27Smrg save_CPPFLAGS="$CPPFLAGS" 4080b9b4fd27Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 4081caade7ccSmrg 4082b9b4fd27Smrg save_LDFLAGS="$LDFLAGS" 4083b9b4fd27Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 4084caade7ccSmrg 4085b9b4fd27Smrg save_LIBS="$LIBS" 4086b9b4fd27Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 4087caade7ccSmrg 4088b9b4fd27Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 4089b9b4fd27Smrg lt_cv_dlopen_self, [dnl 4090b9b4fd27Smrg _LT_TRY_DLOPEN_SELF( 4091b9b4fd27Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 4092b9b4fd27Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 4093b9b4fd27Smrg ]) 4094caade7ccSmrg 4095b9b4fd27Smrg if test "x$lt_cv_dlopen_self" = xyes; then 4096b9b4fd27Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 4097b9b4fd27Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 4098b9b4fd27Smrg lt_cv_dlopen_self_static, [dnl 4099b9b4fd27Smrg _LT_TRY_DLOPEN_SELF( 4100b9b4fd27Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 4101b9b4fd27Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 4102b9b4fd27Smrg ]) 4103b9b4fd27Smrg fi 4104caade7ccSmrg 4105b9b4fd27Smrg CPPFLAGS="$save_CPPFLAGS" 4106b9b4fd27Smrg LDFLAGS="$save_LDFLAGS" 4107b9b4fd27Smrg LIBS="$save_LIBS" 4108b9b4fd27Smrg ;; 4109b9b4fd27Smrg esac 4110caade7ccSmrg 4111b9b4fd27Smrg case $lt_cv_dlopen_self in 4112b9b4fd27Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 4113b9b4fd27Smrg *) enable_dlopen_self=unknown ;; 4114b9b4fd27Smrg esac 4115caade7ccSmrg 4116b9b4fd27Smrg case $lt_cv_dlopen_self_static in 4117b9b4fd27Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 4118b9b4fd27Smrg *) enable_dlopen_self_static=unknown ;; 4119b9b4fd27Smrg esac 4120b9b4fd27Smrgfi 4121b9b4fd27Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 4122b9b4fd27Smrg [Whether dlopen is supported]) 4123b9b4fd27Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 4124b9b4fd27Smrg [Whether dlopen of programs is supported]) 4125b9b4fd27Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 4126b9b4fd27Smrg [Whether dlopen of statically linked programs is supported]) 4127b9b4fd27Smrg])# LT_SYS_DLOPEN_SELF 4128caade7ccSmrg 4129b9b4fd27Smrg# Old name: 4130b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 4131b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 4132b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 4133caade7ccSmrg 4134caade7ccSmrg 4135b9b4fd27Smrg# _LT_COMPILER_C_O([TAGNAME]) 4136b9b4fd27Smrg# --------------------------- 4137b9b4fd27Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 4138b9b4fd27Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 4139b9b4fd27Smrgm4_defun([_LT_COMPILER_C_O], 4140b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl 4141b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4142b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl 4143b9b4fd27SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 4144b9b4fd27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 4145b9b4fd27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 4146b9b4fd27Smrg $RM -r conftest 2>/dev/null 4147b9b4fd27Smrg mkdir conftest 4148b9b4fd27Smrg cd conftest 4149b9b4fd27Smrg mkdir out 4150b9b4fd27Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4151caade7ccSmrg 4152b9b4fd27Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 4153b9b4fd27Smrg # Insert the option either (1) after the last *FLAGS variable, or 4154b9b4fd27Smrg # (2) before a word containing "conftest.", or (3) at the end. 4155b9b4fd27Smrg # Note that $ac_compile itself does not contain backslashes and begins 4156b9b4fd27Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4157b9b4fd27Smrg lt_compile=`echo "$ac_compile" | $SED \ 4158b9b4fd27Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4159b9b4fd27Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4160b9b4fd27Smrg -e 's:$: $lt_compiler_flag:'` 4161b9b4fd27Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4162b9b4fd27Smrg (eval "$lt_compile" 2>out/conftest.err) 4163b9b4fd27Smrg ac_status=$? 4164b9b4fd27Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 4165b9b4fd27Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4166b9b4fd27Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 4167b9b4fd27Smrg then 4168b9b4fd27Smrg # The compiler can only warn and ignore the option if not recognized 4169b9b4fd27Smrg # So say no if there are warnings 4170b9b4fd27Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 4171b9b4fd27Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 4172b9b4fd27Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 4173b9b4fd27Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4174b9b4fd27Smrg fi 4175b9b4fd27Smrg fi 4176b9b4fd27Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 4177b9b4fd27Smrg $RM conftest* 4178b9b4fd27Smrg # SGI C++ compiler will create directory out/ii_files/ for 4179b9b4fd27Smrg # template instantiation 4180b9b4fd27Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 4181b9b4fd27Smrg $RM out/* && rmdir out 4182b9b4fd27Smrg cd .. 4183b9b4fd27Smrg $RM -r conftest 4184b9b4fd27Smrg $RM conftest* 4185b9b4fd27Smrg]) 4186b9b4fd27Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 4187b9b4fd27Smrg [Does compiler simultaneously support -c and -o options?]) 4188b9b4fd27Smrg])# _LT_COMPILER_C_O 4189caade7ccSmrg 4190caade7ccSmrg 4191b9b4fd27Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 4192b9b4fd27Smrg# ---------------------------------- 4193b9b4fd27Smrg# Check to see if we can do hard links to lock some files if needed 4194b9b4fd27Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 4195b9b4fd27Smrg[m4_require([_LT_ENABLE_LOCK])dnl 4196b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4197b9b4fd27Smrg_LT_COMPILER_C_O([$1]) 4198caade7ccSmrg 4199b9b4fd27Smrghard_links="nottested" 4200b9b4fd27Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 4201b9b4fd27Smrg # do not overwrite the value of need_locks provided by the user 4202b9b4fd27Smrg AC_MSG_CHECKING([if we can lock with hard links]) 4203b9b4fd27Smrg hard_links=yes 4204b9b4fd27Smrg $RM conftest* 4205b9b4fd27Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 4206b9b4fd27Smrg touch conftest.a 4207b9b4fd27Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 4208b9b4fd27Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 4209b9b4fd27Smrg AC_MSG_RESULT([$hard_links]) 4210b9b4fd27Smrg if test "$hard_links" = no; then 4211b9b4fd27Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 4212b9b4fd27Smrg need_locks=warn 4213b9b4fd27Smrg fi 4214b9b4fd27Smrgelse 4215b9b4fd27Smrg need_locks=no 4216b9b4fd27Smrgfi 4217b9b4fd27Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 4218b9b4fd27Smrg])# _LT_COMPILER_FILE_LOCKS 4219caade7ccSmrg 4220caade7ccSmrg 4221b9b4fd27Smrg# _LT_CHECK_OBJDIR 4222b9b4fd27Smrg# ---------------- 4223b9b4fd27Smrgm4_defun([_LT_CHECK_OBJDIR], 4224b9b4fd27Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 4225b9b4fd27Smrg[rm -f .libs 2>/dev/null 4226b9b4fd27Smrgmkdir .libs 2>/dev/null 4227b9b4fd27Smrgif test -d .libs; then 4228b9b4fd27Smrg lt_cv_objdir=.libs 4229caade7ccSmrgelse 4230b9b4fd27Smrg # MS-DOS does not allow filenames that begin with a dot. 4231b9b4fd27Smrg lt_cv_objdir=_libs 4232caade7ccSmrgfi 4233b9b4fd27Smrgrmdir .libs 2>/dev/null]) 4234b9b4fd27Smrgobjdir=$lt_cv_objdir 4235b9b4fd27Smrg_LT_DECL([], [objdir], [0], 4236b9b4fd27Smrg [The name of the directory that contains temporary libtool files])dnl 4237b9b4fd27Smrgm4_pattern_allow([LT_OBJDIR])dnl 4238b9b4fd27SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 4239b9b4fd27Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 4240b9b4fd27Smrg])# _LT_CHECK_OBJDIR 4241caade7ccSmrg 4242caade7ccSmrg 4243b9b4fd27Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 4244b9b4fd27Smrg# -------------------------------------- 4245b9b4fd27Smrg# Check hardcoding attributes. 4246b9b4fd27Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 4247b9b4fd27Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 4248b9b4fd27Smrg_LT_TAGVAR(hardcode_action, $1)= 4249b9b4fd27Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 4250b9b4fd27Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 4251b9b4fd27Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 4252b9b4fd27Smrg 4253b9b4fd27Smrg # We can hardcode non-existent directories. 4254b9b4fd27Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 4255b9b4fd27Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 4256b9b4fd27Smrg # have to relink, otherwise we might link with an installed library 4257b9b4fd27Smrg # when we should be linking with a yet-to-be-installed one 4258b9b4fd27Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 4259b9b4fd27Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 4260b9b4fd27Smrg # Linking always hardcodes the temporary library directory. 4261b9b4fd27Smrg _LT_TAGVAR(hardcode_action, $1)=relink 4262caade7ccSmrg else 4263b9b4fd27Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 4264b9b4fd27Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 4265caade7ccSmrg fi 4266b9b4fd27Smrgelse 4267b9b4fd27Smrg # We cannot hardcode anything, or else we can only hardcode existing 4268b9b4fd27Smrg # directories. 4269b9b4fd27Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 4270caade7ccSmrgfi 4271b9b4fd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 4272caade7ccSmrg 4273b9b4fd27Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 4274b9b4fd27Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 4275b9b4fd27Smrg # Fast installation is not supported 4276b9b4fd27Smrg enable_fast_install=no 4277b9b4fd27Smrgelif test "$shlibpath_overrides_runpath" = yes || 4278b9b4fd27Smrg test "$enable_shared" = no; then 4279b9b4fd27Smrg # Fast installation is not necessary 4280b9b4fd27Smrg enable_fast_install=needless 4281b9b4fd27Smrgfi 4282b9b4fd27Smrg_LT_TAGDECL([], [hardcode_action], [0], 4283b9b4fd27Smrg [How to hardcode a shared library path into an executable]) 4284b9b4fd27Smrg])# _LT_LINKER_HARDCODE_LIBPATH 4285caade7ccSmrg 4286b9b4fd27Smrg 4287b9b4fd27Smrg# _LT_CMD_STRIPLIB 4288b9b4fd27Smrg# ---------------- 4289b9b4fd27Smrgm4_defun([_LT_CMD_STRIPLIB], 4290b9b4fd27Smrg[m4_require([_LT_DECL_EGREP]) 4291b9b4fd27Smrgstriplib= 4292b9b4fd27Smrgold_striplib= 4293b9b4fd27SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 4294b9b4fd27Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 4295b9b4fd27Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 4296b9b4fd27Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 4297b9b4fd27Smrg AC_MSG_RESULT([yes]) 4298b9b4fd27Smrgelse 4299b9b4fd27Smrg# FIXME - insert some real tests, host_os isn't really good enough 4300b9b4fd27Smrg case $host_os in 4301b9b4fd27Smrg darwin*) 4302b9b4fd27Smrg if test -n "$STRIP" ; then 4303b9b4fd27Smrg striplib="$STRIP -x" 4304b9b4fd27Smrg old_striplib="$STRIP -S" 4305b9b4fd27Smrg AC_MSG_RESULT([yes]) 4306b9b4fd27Smrg else 4307b9b4fd27Smrg AC_MSG_RESULT([no]) 4308b9b4fd27Smrg fi 4309caade7ccSmrg ;; 4310caade7ccSmrg *) 4311b9b4fd27Smrg AC_MSG_RESULT([no]) 4312caade7ccSmrg ;; 4313caade7ccSmrg esac 4314caade7ccSmrgfi 4315b9b4fd27Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 4316b9b4fd27Smrg_LT_DECL([], [striplib], [1]) 4317b9b4fd27Smrg])# _LT_CMD_STRIPLIB 4318caade7ccSmrg 4319caade7ccSmrg 4320b9b4fd27Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 4321b9b4fd27Smrg# ----------------------------- 4322b9b4fd27Smrg# PORTME Fill in your ld.so characteristics 4323b9b4fd27Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 4324b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4325b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 4326b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4327b9b4fd27Smrgm4_require([_LT_DECL_OBJDUMP])dnl 4328b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 4329b9b4fd27SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 4330b9b4fd27Smrgm4_if([$1], 4331b9b4fd27Smrg [], [ 4332b9b4fd27Smrgif test "$GCC" = yes; then 4333b9b4fd27Smrg case $host_os in 4334b9b4fd27Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 4335b9b4fd27Smrg *) lt_awk_arg="/^libraries:/" ;; 4336b9b4fd27Smrg esac 4337b9b4fd27Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 4338b9b4fd27Smrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 4339b9b4fd27Smrg # if the path contains ";" then we assume it to be the separator 4340b9b4fd27Smrg # otherwise default to the standard path separator (i.e. ":") - it is 4341b9b4fd27Smrg # assumed that no part of a normal pathname contains ";" but that should 4342b9b4fd27Smrg # okay in the real world where ";" in dirpaths is itself problematic. 4343b9b4fd27Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 4344b9b4fd27Smrg else 4345b9b4fd27Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 4346b9b4fd27Smrg fi 4347b9b4fd27Smrg # Ok, now we have the path, separated by spaces, we can step through it 4348b9b4fd27Smrg # and add multilib dir if necessary. 4349b9b4fd27Smrg lt_tmp_lt_search_path_spec= 4350b9b4fd27Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 4351b9b4fd27Smrg for lt_sys_path in $lt_search_path_spec; do 4352b9b4fd27Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 4353b9b4fd27Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 4354caade7ccSmrg else 4355b9b4fd27Smrg test -d "$lt_sys_path" && \ 4356b9b4fd27Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 4357caade7ccSmrg fi 4358b9b4fd27Smrg done 4359b9b4fd27Smrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 4360b9b4fd27SmrgBEGIN {RS=" "; FS="/|\n";} { 4361b9b4fd27Smrg lt_foo=""; 4362b9b4fd27Smrg lt_count=0; 4363b9b4fd27Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 4364b9b4fd27Smrg if ($lt_i != "" && $lt_i != ".") { 4365b9b4fd27Smrg if ($lt_i == "..") { 4366b9b4fd27Smrg lt_count++; 4367b9b4fd27Smrg } else { 4368b9b4fd27Smrg if (lt_count == 0) { 4369b9b4fd27Smrg lt_foo="/" $lt_i lt_foo; 4370b9b4fd27Smrg } else { 4371b9b4fd27Smrg lt_count--; 4372b9b4fd27Smrg } 4373b9b4fd27Smrg } 4374b9b4fd27Smrg } 4375b9b4fd27Smrg } 4376b9b4fd27Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 4377b9b4fd27Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 4378b9b4fd27Smrg}'` 4379b9b4fd27Smrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 4380b9b4fd27Smrgelse 4381b9b4fd27Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 4382b9b4fd27Smrgfi]) 4383b9b4fd27Smrglibrary_names_spec= 4384b9b4fd27Smrglibname_spec='lib$name' 4385b9b4fd27Smrgsoname_spec= 4386b9b4fd27Smrgshrext_cmds=".so" 4387b9b4fd27Smrgpostinstall_cmds= 4388b9b4fd27Smrgpostuninstall_cmds= 4389b9b4fd27Smrgfinish_cmds= 4390b9b4fd27Smrgfinish_eval= 4391b9b4fd27Smrgshlibpath_var= 4392b9b4fd27Smrgshlibpath_overrides_runpath=unknown 4393b9b4fd27Smrgversion_type=none 4394b9b4fd27Smrgdynamic_linker="$host_os ld.so" 4395b9b4fd27Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 4396b9b4fd27Smrgneed_lib_prefix=unknown 4397b9b4fd27Smrghardcode_into_libs=no 4398caade7ccSmrg 4399b9b4fd27Smrg# when you set need_version to no, make sure it does not cause -set_version 4400b9b4fd27Smrg# flags to be left without arguments 4401b9b4fd27Smrgneed_version=unknown 4402caade7ccSmrg 4403caade7ccSmrgcase $host_os in 4404b9b4fd27Smrgaix3*) 4405b9b4fd27Smrg version_type=linux 4406b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 4407b9b4fd27Smrg shlibpath_var=LIBPATH 4408caade7ccSmrg 4409b9b4fd27Smrg # AIX 3 has no versioning support, so we append a major version to the name. 4410b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4411caade7ccSmrg ;; 4412caade7ccSmrg 4413b9b4fd27Smrgaix[[4-9]]*) 4414b9b4fd27Smrg version_type=linux 4415b9b4fd27Smrg need_lib_prefix=no 4416b9b4fd27Smrg need_version=no 4417b9b4fd27Smrg hardcode_into_libs=yes 4418b9b4fd27Smrg if test "$host_cpu" = ia64; then 4419b9b4fd27Smrg # AIX 5 supports IA64 4420b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 4421b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4422485f0483Smrg else 4423b9b4fd27Smrg # With GCC up to 2.95.x, collect2 would create an import file 4424b9b4fd27Smrg # for dependence libraries. The import file would start with 4425b9b4fd27Smrg # the line `#! .'. This would cause the generated library to 4426b9b4fd27Smrg # depend on `.', always an invalid library. This was fixed in 4427b9b4fd27Smrg # development snapshots of GCC prior to 3.0. 4428b9b4fd27Smrg case $host_os in 4429b9b4fd27Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 4430b9b4fd27Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 4431b9b4fd27Smrg echo ' yes ' 4432b9b4fd27Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 4433b9b4fd27Smrg : 4434b9b4fd27Smrg else 4435b9b4fd27Smrg can_build_shared=no 4436b9b4fd27Smrg fi 4437caade7ccSmrg ;; 4438caade7ccSmrg esac 4439b9b4fd27Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 4440b9b4fd27Smrg # soname into executable. Probably we can add versioning support to 4441b9b4fd27Smrg # collect2, so additional links can be useful in future. 4442b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 4443b9b4fd27Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 4444b9b4fd27Smrg # instead of lib<name>.a to let people know that these are not 4445b9b4fd27Smrg # typical AIX shared libraries. 4446b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4447b9b4fd27Smrg else 4448b9b4fd27Smrg # We preserve .a as extension for shared libraries through AIX4.2 4449b9b4fd27Smrg # and later when we are not doing run time linking. 4450b9b4fd27Smrg library_names_spec='${libname}${release}.a $libname.a' 4451b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4452b9b4fd27Smrg fi 4453b9b4fd27Smrg shlibpath_var=LIBPATH 4454caade7ccSmrg fi 4455caade7ccSmrg ;; 4456caade7ccSmrg 4457b9b4fd27Smrgamigaos*) 4458caade7ccSmrg case $host_cpu in 4459b9b4fd27Smrg powerpc) 4460b9b4fd27Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 4461b9b4fd27Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 4462b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4463caade7ccSmrg ;; 4464b9b4fd27Smrg m68k) 4465b9b4fd27Smrg library_names_spec='$libname.ixlibrary $libname.a' 4466b9b4fd27Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 4467b9b4fd27Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''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' 4468caade7ccSmrg ;; 4469caade7ccSmrg esac 4470caade7ccSmrg ;; 4471caade7ccSmrg 4472b9b4fd27Smrgbeos*) 4473b9b4fd27Smrg library_names_spec='${libname}${shared_ext}' 4474b9b4fd27Smrg dynamic_linker="$host_os ld.so" 4475b9b4fd27Smrg shlibpath_var=LIBRARY_PATH 4476caade7ccSmrg ;; 4477caade7ccSmrg 4478b9b4fd27Smrgbsdi[[45]]*) 4479b9b4fd27Smrg version_type=linux 4480b9b4fd27Smrg need_version=no 4481b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4482b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4483b9b4fd27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 4484b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4485b9b4fd27Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 4486b9b4fd27Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 4487b9b4fd27Smrg # the default ld.so.conf also contains /usr/contrib/lib and 4488b9b4fd27Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 4489b9b4fd27Smrg # libtool to hard-code these into programs 4490caade7ccSmrg ;; 4491caade7ccSmrg 4492b9b4fd27Smrgcygwin* | mingw* | pw32* | cegcc*) 4493b9b4fd27Smrg version_type=windows 4494b9b4fd27Smrg shrext_cmds=".dll" 4495b9b4fd27Smrg need_version=no 4496b9b4fd27Smrg need_lib_prefix=no 4497caade7ccSmrg 4498b9b4fd27Smrg case $GCC,$host_os in 4499b9b4fd27Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 4500b9b4fd27Smrg library_names_spec='$libname.dll.a' 4501b9b4fd27Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 4502b9b4fd27Smrg postinstall_cmds='base_file=`basename \${file}`~ 4503b9b4fd27Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 4504b9b4fd27Smrg dldir=$destdir/`dirname \$dlpath`~ 4505b9b4fd27Smrg test -d \$dldir || mkdir -p \$dldir~ 4506b9b4fd27Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 4507b9b4fd27Smrg chmod a+x \$dldir/$dlname~ 4508b9b4fd27Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 4509b9b4fd27Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 4510b9b4fd27Smrg fi' 4511b9b4fd27Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 4512b9b4fd27Smrg dlpath=$dir/\$dldll~ 4513b9b4fd27Smrg $RM \$dlpath' 4514b9b4fd27Smrg shlibpath_overrides_runpath=yes 4515caade7ccSmrg 4516b9b4fd27Smrg case $host_os in 4517b9b4fd27Smrg cygwin*) 4518b9b4fd27Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 4519b9b4fd27Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4520b9b4fd27Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 4521b9b4fd27Smrg ;; 4522b9b4fd27Smrg mingw* | cegcc*) 4523b9b4fd27Smrg # MinGW DLLs use traditional 'lib' prefix 4524b9b4fd27Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4525b9b4fd27Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 4526b9b4fd27Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 4527b9b4fd27Smrg # It is most probably a Windows format PATH printed by 4528b9b4fd27Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 4529b9b4fd27Smrg # path with ; separators, and with drive letters. We can handle the 4530b9b4fd27Smrg # drive letters (cygwin fileutils understands them), so leave them, 4531b9b4fd27Smrg # especially as we might pass files found there to a mingw objdump, 4532b9b4fd27Smrg # which wouldn't understand a cygwinified path. Ahh. 4533b9b4fd27Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 4534b9b4fd27Smrg else 4535b9b4fd27Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 4536b9b4fd27Smrg fi 4537b9b4fd27Smrg ;; 4538b9b4fd27Smrg pw32*) 4539b9b4fd27Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 4540b9b4fd27Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4541b9b4fd27Smrg ;; 4542b9b4fd27Smrg esac 4543b9b4fd27Smrg ;; 4544b9b4fd27Smrg 4545b9b4fd27Smrg *) 4546b9b4fd27Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 4547b9b4fd27Smrg ;; 4548b9b4fd27Smrg esac 4549b9b4fd27Smrg dynamic_linker='Win32 ld.exe' 4550b9b4fd27Smrg # FIXME: first we should search . and the directory the executable is in 4551b9b4fd27Smrg shlibpath_var=PATH 4552caade7ccSmrg ;; 4553caade7ccSmrg 4554b9b4fd27Smrgdarwin* | rhapsody*) 4555b9b4fd27Smrg dynamic_linker="$host_os dyld" 4556b9b4fd27Smrg version_type=darwin 4557b9b4fd27Smrg need_lib_prefix=no 4558b9b4fd27Smrg need_version=no 4559b9b4fd27Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 4560b9b4fd27Smrg soname_spec='${libname}${release}${major}$shared_ext' 4561b9b4fd27Smrg shlibpath_overrides_runpath=yes 4562b9b4fd27Smrg shlibpath_var=DYLD_LIBRARY_PATH 4563b9b4fd27Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 4564b9b4fd27Smrgm4_if([$1], [],[ 4565b9b4fd27Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 4566b9b4fd27Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 4567caade7ccSmrg ;; 4568caade7ccSmrg 4569b9b4fd27Smrgdgux*) 4570b9b4fd27Smrg version_type=linux 4571b9b4fd27Smrg need_lib_prefix=no 4572b9b4fd27Smrg need_version=no 4573b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 4574b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4575b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4576485f0483Smrg ;; 4577485f0483Smrg 4578b9b4fd27Smrgfreebsd1*) 4579b9b4fd27Smrg dynamic_linker=no 4580caade7ccSmrg ;; 4581caade7ccSmrg 4582b9b4fd27Smrgfreebsd* | dragonfly*) 4583b9b4fd27Smrg # DragonFly does not have aout. When/if they implement a new 4584b9b4fd27Smrg # versioning mechanism, adjust this. 4585b9b4fd27Smrg if test -x /usr/bin/objformat; then 4586b9b4fd27Smrg objformat=`/usr/bin/objformat` 4587b9b4fd27Smrg else 4588b9b4fd27Smrg case $host_os in 4589b9b4fd27Smrg freebsd[[123]]*) objformat=aout ;; 4590b9b4fd27Smrg *) objformat=elf ;; 4591b9b4fd27Smrg esac 4592b9b4fd27Smrg fi 4593b9b4fd27Smrg version_type=freebsd-$objformat 4594b9b4fd27Smrg case $version_type in 4595b9b4fd27Smrg freebsd-elf*) 4596b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 4597b9b4fd27Smrg need_version=no 4598b9b4fd27Smrg need_lib_prefix=no 4599b9b4fd27Smrg ;; 4600b9b4fd27Smrg freebsd-*) 4601b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 4602b9b4fd27Smrg need_version=yes 4603b9b4fd27Smrg ;; 4604b9b4fd27Smrg esac 4605b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4606b9b4fd27Smrg case $host_os in 4607b9b4fd27Smrg freebsd2*) 4608b9b4fd27Smrg shlibpath_overrides_runpath=yes 4609caade7ccSmrg ;; 4610b9b4fd27Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 4611b9b4fd27Smrg shlibpath_overrides_runpath=yes 4612b9b4fd27Smrg hardcode_into_libs=yes 4613caade7ccSmrg ;; 4614b9b4fd27Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 4615b9b4fd27Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 4616b9b4fd27Smrg shlibpath_overrides_runpath=no 4617b9b4fd27Smrg hardcode_into_libs=yes 4618caade7ccSmrg ;; 4619b9b4fd27Smrg *) # from 4.6 on, and DragonFly 4620b9b4fd27Smrg shlibpath_overrides_runpath=yes 4621b9b4fd27Smrg hardcode_into_libs=yes 4622caade7ccSmrg ;; 4623caade7ccSmrg esac 4624caade7ccSmrg ;; 4625caade7ccSmrg 4626b9b4fd27Smrggnu*) 4627b9b4fd27Smrg version_type=linux 4628b9b4fd27Smrg need_lib_prefix=no 4629b9b4fd27Smrg need_version=no 4630b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 4631b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4632b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4633b9b4fd27Smrg hardcode_into_libs=yes 4634caade7ccSmrg ;; 4635caade7ccSmrg 4636b9b4fd27Smrghpux9* | hpux10* | hpux11*) 4637b9b4fd27Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 4638b9b4fd27Smrg # link against other versions. 4639b9b4fd27Smrg version_type=sunos 4640b9b4fd27Smrg need_lib_prefix=no 4641b9b4fd27Smrg need_version=no 4642b9b4fd27Smrg case $host_cpu in 4643b9b4fd27Smrg ia64*) 4644b9b4fd27Smrg shrext_cmds='.so' 4645b9b4fd27Smrg hardcode_into_libs=yes 4646b9b4fd27Smrg dynamic_linker="$host_os dld.so" 4647b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4648b9b4fd27Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4649b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4650b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4651b9b4fd27Smrg if test "X$HPUX_IA64_MODE" = X32; then 4652b9b4fd27Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 4653b9b4fd27Smrg else 4654b9b4fd27Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 4655b9b4fd27Smrg fi 4656b9b4fd27Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4657b9b4fd27Smrg ;; 4658b9b4fd27Smrg hppa*64*) 4659b9b4fd27Smrg shrext_cmds='.sl' 4660b9b4fd27Smrg hardcode_into_libs=yes 4661b9b4fd27Smrg dynamic_linker="$host_os dld.sl" 4662b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 4663b9b4fd27Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4664b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4665b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4666b9b4fd27Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 4667b9b4fd27Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4668b9b4fd27Smrg ;; 4669b9b4fd27Smrg *) 4670b9b4fd27Smrg shrext_cmds='.sl' 4671b9b4fd27Smrg dynamic_linker="$host_os dld.sl" 4672b9b4fd27Smrg shlibpath_var=SHLIB_PATH 4673b9b4fd27Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 4674b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4675b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4676b9b4fd27Smrg ;; 4677b9b4fd27Smrg esac 4678b9b4fd27Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 4679b9b4fd27Smrg postinstall_cmds='chmod 555 $lib' 4680caade7ccSmrg ;; 4681caade7ccSmrg 4682b9b4fd27Smrginterix[[3-9]]*) 4683b9b4fd27Smrg version_type=linux 4684b9b4fd27Smrg need_lib_prefix=no 4685b9b4fd27Smrg need_version=no 4686b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 4687b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4688b9b4fd27Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 4689b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4690b9b4fd27Smrg shlibpath_overrides_runpath=no 4691b9b4fd27Smrg hardcode_into_libs=yes 4692b9b4fd27Smrg ;; 4693caade7ccSmrg 4694b9b4fd27Smrgirix5* | irix6* | nonstopux*) 4695b9b4fd27Smrg case $host_os in 4696b9b4fd27Smrg nonstopux*) version_type=nonstopux ;; 4697b9b4fd27Smrg *) 4698b9b4fd27Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 4699b9b4fd27Smrg version_type=linux 4700b9b4fd27Smrg else 4701b9b4fd27Smrg version_type=irix 4702b9b4fd27Smrg fi ;; 4703caade7ccSmrg esac 4704b9b4fd27Smrg need_lib_prefix=no 4705b9b4fd27Smrg need_version=no 4706b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4707b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 4708b9b4fd27Smrg case $host_os in 4709b9b4fd27Smrg irix5* | nonstopux*) 4710b9b4fd27Smrg libsuff= shlibsuff= 4711b9b4fd27Smrg ;; 4712b9b4fd27Smrg *) 4713b9b4fd27Smrg case $LD in # libtool.m4 will add one of these switches to LD 4714b9b4fd27Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 4715b9b4fd27Smrg libsuff= shlibsuff= libmagic=32-bit;; 4716b9b4fd27Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 4717b9b4fd27Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 4718b9b4fd27Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 4719b9b4fd27Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 4720b9b4fd27Smrg *) libsuff= shlibsuff= libmagic=never-match;; 4721b9b4fd27Smrg esac 4722b9b4fd27Smrg ;; 4723b9b4fd27Smrg esac 4724b9b4fd27Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 4725b9b4fd27Smrg shlibpath_overrides_runpath=no 4726b9b4fd27Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 4727b9b4fd27Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 4728b9b4fd27Smrg hardcode_into_libs=yes 4729b9b4fd27Smrg ;; 4730caade7ccSmrg 4731b9b4fd27Smrg# No shared lib support for Linux oldld, aout, or coff. 4732b9b4fd27Smrglinux*oldld* | linux*aout* | linux*coff*) 4733b9b4fd27Smrg dynamic_linker=no 4734b9b4fd27Smrg ;; 4735caade7ccSmrg 4736b9b4fd27Smrg# This must be Linux ELF. 4737b9b4fd27Smrglinux* | k*bsd*-gnu) 4738b9b4fd27Smrg version_type=linux 4739b9b4fd27Smrg need_lib_prefix=no 4740b9b4fd27Smrg need_version=no 4741b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4742b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4743b9b4fd27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 4744b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4745b9b4fd27Smrg shlibpath_overrides_runpath=no 4746b9b4fd27Smrg # Some binutils ld are patched to set DT_RUNPATH 4747b9b4fd27Smrg save_LDFLAGS=$LDFLAGS 4748b9b4fd27Smrg save_libdir=$libdir 4749b9b4fd27Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 4750b9b4fd27Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 4751b9b4fd27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4752b9b4fd27Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 4753b9b4fd27Smrg [shlibpath_overrides_runpath=yes])]) 4754b9b4fd27Smrg LDFLAGS=$save_LDFLAGS 4755b9b4fd27Smrg libdir=$save_libdir 4756caade7ccSmrg 4757b9b4fd27Smrg # This implies no fast_install, which is unacceptable. 4758b9b4fd27Smrg # Some rework will be needed to allow for fast_install 4759b9b4fd27Smrg # before this can be enabled. 4760b9b4fd27Smrg hardcode_into_libs=yes 4761caade7ccSmrg 4762b9b4fd27Smrg # Append ld.so.conf contents to the search path 4763b9b4fd27Smrg if test -f /etc/ld.so.conf; then 4764b9b4fd27Smrg 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;/^$/d' | tr '\n' ' '` 4765b9b4fd27Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 4766b9b4fd27Smrg fi 4767caade7ccSmrg 4768b9b4fd27Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 4769b9b4fd27Smrg # powerpc, because MkLinux only supported shared libraries with the 4770b9b4fd27Smrg # GNU dynamic linker. Since this was broken with cross compilers, 4771b9b4fd27Smrg # most powerpc-linux boxes support dynamic linking these days and 4772b9b4fd27Smrg # people can always --disable-shared, the test was removed, and we 4773b9b4fd27Smrg # assume the GNU/Linux dynamic linker is in use. 4774b9b4fd27Smrg dynamic_linker='GNU/Linux ld.so' 4775b9b4fd27Smrg ;; 4776caade7ccSmrg 4777b9b4fd27Smrgnetbsd*) 4778b9b4fd27Smrg version_type=sunos 4779b9b4fd27Smrg need_lib_prefix=no 4780b9b4fd27Smrg need_version=no 4781b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4782b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 4783b9b4fd27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 4784b9b4fd27Smrg dynamic_linker='NetBSD (a.out) ld.so' 4785b9b4fd27Smrg else 4786b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 4787b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4788b9b4fd27Smrg dynamic_linker='NetBSD ld.elf_so' 4789b9b4fd27Smrg fi 4790b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4791b9b4fd27Smrg shlibpath_overrides_runpath=yes 4792b9b4fd27Smrg hardcode_into_libs=yes 4793b9b4fd27Smrg ;; 4794caade7ccSmrg 4795b9b4fd27Smrgnewsos6) 4796b9b4fd27Smrg version_type=linux 4797b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4798b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4799b9b4fd27Smrg shlibpath_overrides_runpath=yes 4800b9b4fd27Smrg ;; 4801caade7ccSmrg 4802b9b4fd27Smrg*nto* | *qnx*) 4803b9b4fd27Smrg version_type=qnx 4804b9b4fd27Smrg need_lib_prefix=no 4805b9b4fd27Smrg need_version=no 4806b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4807b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4808b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4809b9b4fd27Smrg shlibpath_overrides_runpath=no 4810b9b4fd27Smrg hardcode_into_libs=yes 4811b9b4fd27Smrg dynamic_linker='ldqnx.so' 4812b9b4fd27Smrg ;; 4813caade7ccSmrg 4814b9b4fd27Smrgopenbsd*) 4815b9b4fd27Smrg version_type=sunos 4816b9b4fd27Smrg sys_lib_dlsearch_path_spec="/usr/lib" 4817b9b4fd27Smrg need_lib_prefix=no 4818b9b4fd27Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 4819b9b4fd27Smrg case $host_os in 4820b9b4fd27Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 4821b9b4fd27Smrg *) need_version=no ;; 4822b9b4fd27Smrg esac 4823b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 4824b9b4fd27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 4825b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4826b9b4fd27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4827b9b4fd27Smrg case $host_os in 4828b9b4fd27Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 4829b9b4fd27Smrg shlibpath_overrides_runpath=no 4830b9b4fd27Smrg ;; 4831b9b4fd27Smrg *) 4832b9b4fd27Smrg shlibpath_overrides_runpath=yes 4833b9b4fd27Smrg ;; 4834b9b4fd27Smrg esac 4835b9b4fd27Smrg else 4836b9b4fd27Smrg shlibpath_overrides_runpath=yes 4837b9b4fd27Smrg fi 4838b9b4fd27Smrg ;; 4839caade7ccSmrg 4840b9b4fd27Smrgos2*) 4841b9b4fd27Smrg libname_spec='$name' 4842b9b4fd27Smrg shrext_cmds=".dll" 4843b9b4fd27Smrg need_lib_prefix=no 4844b9b4fd27Smrg library_names_spec='$libname${shared_ext} $libname.a' 4845b9b4fd27Smrg dynamic_linker='OS/2 ld.exe' 4846b9b4fd27Smrg shlibpath_var=LIBPATH 4847b9b4fd27Smrg ;; 4848caade7ccSmrg 4849b9b4fd27Smrgosf3* | osf4* | osf5*) 4850b9b4fd27Smrg version_type=osf 4851b9b4fd27Smrg need_lib_prefix=no 4852b9b4fd27Smrg need_version=no 4853b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4854b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4855b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4856b9b4fd27Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 4857b9b4fd27Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 4858b9b4fd27Smrg ;; 4859caade7ccSmrg 4860b9b4fd27Smrgrdos*) 4861b9b4fd27Smrg dynamic_linker=no 4862b9b4fd27Smrg ;; 4863caade7ccSmrg 4864b9b4fd27Smrgsolaris*) 4865b9b4fd27Smrg version_type=linux 4866b9b4fd27Smrg need_lib_prefix=no 4867b9b4fd27Smrg need_version=no 4868b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4869b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4870b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4871b9b4fd27Smrg shlibpath_overrides_runpath=yes 4872b9b4fd27Smrg hardcode_into_libs=yes 4873b9b4fd27Smrg # ldd complains unless libraries are executable 4874b9b4fd27Smrg postinstall_cmds='chmod +x $lib' 4875b9b4fd27Smrg ;; 4876caade7ccSmrg 4877b9b4fd27Smrgsunos4*) 4878b9b4fd27Smrg version_type=sunos 4879b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 4880b9b4fd27Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 4881b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4882b9b4fd27Smrg shlibpath_overrides_runpath=yes 4883b9b4fd27Smrg if test "$with_gnu_ld" = yes; then 4884b9b4fd27Smrg need_lib_prefix=no 4885b9b4fd27Smrg fi 4886b9b4fd27Smrg need_version=yes 4887b9b4fd27Smrg ;; 4888caade7ccSmrg 4889b9b4fd27Smrgsysv4 | sysv4.3*) 4890b9b4fd27Smrg version_type=linux 4891b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4892b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4893b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4894b9b4fd27Smrg case $host_vendor in 4895b9b4fd27Smrg sni) 4896b9b4fd27Smrg shlibpath_overrides_runpath=no 4897b9b4fd27Smrg need_lib_prefix=no 4898b9b4fd27Smrg runpath_var=LD_RUN_PATH 4899b9b4fd27Smrg ;; 4900b9b4fd27Smrg siemens) 4901b9b4fd27Smrg need_lib_prefix=no 4902b9b4fd27Smrg ;; 4903b9b4fd27Smrg motorola) 4904b9b4fd27Smrg need_lib_prefix=no 4905b9b4fd27Smrg need_version=no 4906b9b4fd27Smrg shlibpath_overrides_runpath=no 4907b9b4fd27Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 4908b9b4fd27Smrg ;; 4909b9b4fd27Smrg esac 4910b9b4fd27Smrg ;; 4911caade7ccSmrg 4912b9b4fd27Smrgsysv4*MP*) 4913b9b4fd27Smrg if test -d /usr/nec ;then 4914b9b4fd27Smrg version_type=linux 4915b9b4fd27Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 4916b9b4fd27Smrg soname_spec='$libname${shared_ext}.$major' 4917b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4918caade7ccSmrg fi 4919caade7ccSmrg ;; 4920caade7ccSmrg 4921b9b4fd27Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4922b9b4fd27Smrg version_type=freebsd-elf 4923b9b4fd27Smrg need_lib_prefix=no 4924b9b4fd27Smrg need_version=no 4925b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 4926b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4927b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4928b9b4fd27Smrg shlibpath_overrides_runpath=yes 4929b9b4fd27Smrg hardcode_into_libs=yes 4930b9b4fd27Smrg if test "$with_gnu_ld" = yes; then 4931b9b4fd27Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 4932b9b4fd27Smrg else 4933b9b4fd27Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 4934b9b4fd27Smrg case $host_os in 4935b9b4fd27Smrg sco3.2v5*) 4936b9b4fd27Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 4937b9b4fd27Smrg ;; 4938b9b4fd27Smrg esac 4939caade7ccSmrg fi 4940b9b4fd27Smrg sys_lib_dlsearch_path_spec='/usr/lib' 4941b9b4fd27Smrg ;; 4942caade7ccSmrg 4943b9b4fd27Smrgtpf*) 4944b9b4fd27Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 4945b9b4fd27Smrg version_type=linux 4946b9b4fd27Smrg need_lib_prefix=no 4947b9b4fd27Smrg need_version=no 4948b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4949b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4950b9b4fd27Smrg shlibpath_overrides_runpath=no 4951b9b4fd27Smrg hardcode_into_libs=yes 4952b9b4fd27Smrg ;; 4953caade7ccSmrg 4954b9b4fd27Smrguts4*) 4955b9b4fd27Smrg version_type=linux 4956b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4957b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4958b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4959b9b4fd27Smrg ;; 4960b9b4fd27Smrg 4961b9b4fd27Smrg*) 4962b9b4fd27Smrg dynamic_linker=no 4963b9b4fd27Smrg ;; 4964b9b4fd27Smrgesac 4965b9b4fd27SmrgAC_MSG_RESULT([$dynamic_linker]) 4966b9b4fd27Smrgtest "$dynamic_linker" = no && can_build_shared=no 4967b9b4fd27Smrg 4968b9b4fd27Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 4969b9b4fd27Smrgif test "$GCC" = yes; then 4970b9b4fd27Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 4971b9b4fd27Smrgfi 4972caade7ccSmrg 4973b9b4fd27Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 4974b9b4fd27Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 4975b9b4fd27Smrgfi 4976b9b4fd27Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 4977b9b4fd27Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 4978b9b4fd27Smrgfi 4979caade7ccSmrg 4980b9b4fd27Smrg_LT_DECL([], [variables_saved_for_relink], [1], 4981b9b4fd27Smrg [Variables whose values should be saved in libtool wrapper scripts and 4982b9b4fd27Smrg restored at link time]) 4983b9b4fd27Smrg_LT_DECL([], [need_lib_prefix], [0], 4984b9b4fd27Smrg [Do we need the "lib" prefix for modules?]) 4985b9b4fd27Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 4986b9b4fd27Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 4987b9b4fd27Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 4988b9b4fd27Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 4989b9b4fd27Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 4990b9b4fd27Smrg [Is shlibpath searched before the hard-coded library search path?]) 4991b9b4fd27Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 4992b9b4fd27Smrg_LT_DECL([], [library_names_spec], [1], 4993b9b4fd27Smrg [[List of archive names. First name is the real one, the rest are links. 4994b9b4fd27Smrg The last name is the one that the linker finds with -lNAME]]) 4995b9b4fd27Smrg_LT_DECL([], [soname_spec], [1], 4996b9b4fd27Smrg [[The coded name of the library, if different from the real name]]) 4997b9b4fd27Smrg_LT_DECL([], [postinstall_cmds], [2], 4998b9b4fd27Smrg [Command to use after installation of a shared archive]) 4999b9b4fd27Smrg_LT_DECL([], [postuninstall_cmds], [2], 5000b9b4fd27Smrg [Command to use after uninstallation of a shared archive]) 5001b9b4fd27Smrg_LT_DECL([], [finish_cmds], [2], 5002b9b4fd27Smrg [Commands used to finish a libtool library installation in a directory]) 5003b9b4fd27Smrg_LT_DECL([], [finish_eval], [1], 5004b9b4fd27Smrg [[As "finish_cmds", except a single script fragment to be evaled but 5005b9b4fd27Smrg not shown]]) 5006b9b4fd27Smrg_LT_DECL([], [hardcode_into_libs], [0], 5007b9b4fd27Smrg [Whether we should hardcode library paths into libraries]) 5008b9b4fd27Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 5009b9b4fd27Smrg [Compile-time system search path for libraries]) 5010b9b4fd27Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 5011b9b4fd27Smrg [Run-time system search path for libraries]) 5012b9b4fd27Smrg])# _LT_SYS_DYNAMIC_LINKER 5013b9b4fd27Smrg 5014b9b4fd27Smrg 5015b9b4fd27Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 5016caade7ccSmrg# -------------------------- 5017b9b4fd27Smrg# find a file program which can recognize shared library 5018b9b4fd27SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 5019b9b4fd27Smrg[m4_require([_LT_DECL_EGREP])dnl 5020b9b4fd27SmrgAC_MSG_CHECKING([for $1]) 5021b9b4fd27SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 5022b9b4fd27Smrg[case $MAGIC_CMD in 5023b9b4fd27Smrg[[\\/*] | ?:[\\/]*]) 5024b9b4fd27Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 5025b9b4fd27Smrg ;; 5026b9b4fd27Smrg*) 5027b9b4fd27Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 5028b9b4fd27Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5029b9b4fd27Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 5030b9b4fd27Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 5031b9b4fd27Smrgdnl not every word. This closes a longstanding sh security hole. 5032b9b4fd27Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 5033b9b4fd27Smrg for ac_dir in $ac_dummy; do 5034b9b4fd27Smrg IFS="$lt_save_ifs" 5035b9b4fd27Smrg test -z "$ac_dir" && ac_dir=. 5036b9b4fd27Smrg if test -f $ac_dir/$1; then 5037b9b4fd27Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 5038b9b4fd27Smrg if test -n "$file_magic_test_file"; then 5039b9b4fd27Smrg case $deplibs_check_method in 5040b9b4fd27Smrg "file_magic "*) 5041b9b4fd27Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 5042b9b4fd27Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5043b9b4fd27Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 5044b9b4fd27Smrg $EGREP "$file_magic_regex" > /dev/null; then 5045b9b4fd27Smrg : 5046b9b4fd27Smrg else 5047b9b4fd27Smrg cat <<_LT_EOF 1>&2 5048caade7ccSmrg 5049b9b4fd27Smrg*** Warning: the command libtool uses to detect shared libraries, 5050b9b4fd27Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 5051b9b4fd27Smrg*** The result is that libtool may fail to recognize shared libraries 5052b9b4fd27Smrg*** as such. This will affect the creation of libtool libraries that 5053b9b4fd27Smrg*** depend on shared libraries, but programs linked with such libtool 5054b9b4fd27Smrg*** libraries will work regardless of this problem. Nevertheless, you 5055b9b4fd27Smrg*** may want to report the problem to your system manager and/or to 5056b9b4fd27Smrg*** bug-libtool@gnu.org 5057caade7ccSmrg 5058b9b4fd27Smrg_LT_EOF 5059b9b4fd27Smrg fi ;; 5060b9b4fd27Smrg esac 5061b9b4fd27Smrg fi 5062b9b4fd27Smrg break 5063b9b4fd27Smrg fi 5064b9b4fd27Smrg done 5065b9b4fd27Smrg IFS="$lt_save_ifs" 5066b9b4fd27Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 5067b9b4fd27Smrg ;; 5068b9b4fd27Smrgesac]) 5069b9b4fd27SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5070b9b4fd27Smrgif test -n "$MAGIC_CMD"; then 5071b9b4fd27Smrg AC_MSG_RESULT($MAGIC_CMD) 5072b9b4fd27Smrgelse 5073b9b4fd27Smrg AC_MSG_RESULT(no) 5074b9b4fd27Smrgfi 5075b9b4fd27Smrg_LT_DECL([], [MAGIC_CMD], [0], 5076b9b4fd27Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 5077b9b4fd27Smrg])# _LT_PATH_TOOL_PREFIX 5078caade7ccSmrg 5079b9b4fd27Smrg# Old name: 5080b9b4fd27SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 5081b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 5082b9b4fd27Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 5083caade7ccSmrg 5084caade7ccSmrg 5085b9b4fd27Smrg# _LT_PATH_MAGIC 5086b9b4fd27Smrg# -------------- 5087b9b4fd27Smrg# find a file program which can recognize a shared library 5088b9b4fd27Smrgm4_defun([_LT_PATH_MAGIC], 5089b9b4fd27Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 5090b9b4fd27Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 5091b9b4fd27Smrg if test -n "$ac_tool_prefix"; then 5092b9b4fd27Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 5093b9b4fd27Smrg else 5094b9b4fd27Smrg MAGIC_CMD=: 5095b9b4fd27Smrg fi 5096b9b4fd27Smrgfi 5097b9b4fd27Smrg])# _LT_PATH_MAGIC 5098caade7ccSmrg 5099caade7ccSmrg 5100b9b4fd27Smrg# LT_PATH_LD 5101b9b4fd27Smrg# ---------- 5102b9b4fd27Smrg# find the pathname to the GNU or non-GNU linker 5103b9b4fd27SmrgAC_DEFUN([LT_PATH_LD], 5104b9b4fd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 5105b9b4fd27SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 5106b9b4fd27SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 5107b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 5108b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 5109caade7ccSmrg 5110b9b4fd27SmrgAC_ARG_WITH([gnu-ld], 5111b9b4fd27Smrg [AS_HELP_STRING([--with-gnu-ld], 5112b9b4fd27Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 5113b9b4fd27Smrg [test "$withval" = no || with_gnu_ld=yes], 5114b9b4fd27Smrg [with_gnu_ld=no])dnl 5115b9b4fd27Smrg 5116b9b4fd27Smrgac_prog=ld 5117b9b4fd27Smrgif test "$GCC" = yes; then 5118b9b4fd27Smrg # Check if gcc -print-prog-name=ld gives a path. 5119b9b4fd27Smrg AC_MSG_CHECKING([for ld used by $CC]) 5120b9b4fd27Smrg case $host in 5121b9b4fd27Smrg *-*-mingw*) 5122b9b4fd27Smrg # gcc leaves a trailing carriage return which upsets mingw 5123b9b4fd27Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 5124b9b4fd27Smrg *) 5125b9b4fd27Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 5126b9b4fd27Smrg esac 5127b9b4fd27Smrg case $ac_prog in 5128b9b4fd27Smrg # Accept absolute paths. 5129b9b4fd27Smrg [[\\/]]* | ?:[[\\/]]*) 5130b9b4fd27Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 5131b9b4fd27Smrg # Canonicalize the pathname of ld 5132b9b4fd27Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5133b9b4fd27Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5134b9b4fd27Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 5135b9b4fd27Smrg done 5136b9b4fd27Smrg test -z "$LD" && LD="$ac_prog" 5137b9b4fd27Smrg ;; 5138b9b4fd27Smrg "") 5139b9b4fd27Smrg # If it fails, then pretend we aren't using GCC. 5140b9b4fd27Smrg ac_prog=ld 5141b9b4fd27Smrg ;; 5142b9b4fd27Smrg *) 5143b9b4fd27Smrg # If it is relative, then search for the first ld in PATH. 5144b9b4fd27Smrg with_gnu_ld=unknown 5145b9b4fd27Smrg ;; 5146b9b4fd27Smrg esac 5147b9b4fd27Smrgelif test "$with_gnu_ld" = yes; then 5148b9b4fd27Smrg AC_MSG_CHECKING([for GNU ld]) 5149caade7ccSmrgelse 5150b9b4fd27Smrg AC_MSG_CHECKING([for non-GNU ld]) 5151caade7ccSmrgfi 5152b9b4fd27SmrgAC_CACHE_VAL(lt_cv_path_LD, 5153b9b4fd27Smrg[if test -z "$LD"; then 5154b9b4fd27Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5155b9b4fd27Smrg for ac_dir in $PATH; do 5156b9b4fd27Smrg IFS="$lt_save_ifs" 5157b9b4fd27Smrg test -z "$ac_dir" && ac_dir=. 5158b9b4fd27Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 5159b9b4fd27Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 5160b9b4fd27Smrg # Check to see if the program is GNU ld. I'd rather use --version, 5161b9b4fd27Smrg # but apparently some variants of GNU ld only accept -v. 5162b9b4fd27Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 5163b9b4fd27Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 5164b9b4fd27Smrg *GNU* | *'with BFD'*) 5165b9b4fd27Smrg test "$with_gnu_ld" != no && break 5166b9b4fd27Smrg ;; 5167b9b4fd27Smrg *) 5168b9b4fd27Smrg test "$with_gnu_ld" != yes && break 5169b9b4fd27Smrg ;; 5170b9b4fd27Smrg esac 5171b9b4fd27Smrg fi 5172b9b4fd27Smrg done 5173b9b4fd27Smrg IFS="$lt_save_ifs" 5174caade7ccSmrgelse 5175b9b4fd27Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 5176b9b4fd27Smrgfi]) 5177b9b4fd27SmrgLD="$lt_cv_path_LD" 5178b9b4fd27Smrgif test -n "$LD"; then 5179b9b4fd27Smrg AC_MSG_RESULT($LD) 5180caade7ccSmrgelse 5181b9b4fd27Smrg AC_MSG_RESULT(no) 5182caade7ccSmrgfi 5183b9b4fd27Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 5184b9b4fd27Smrg_LT_PATH_LD_GNU 5185b9b4fd27SmrgAC_SUBST([LD]) 5186caade7ccSmrg 5187b9b4fd27Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 5188b9b4fd27Smrg])# LT_PATH_LD 5189caade7ccSmrg 5190b9b4fd27Smrg# Old names: 5191b9b4fd27SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 5192b9b4fd27SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 5193b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 5194b9b4fd27Smrgdnl AC_DEFUN([AM_PROG_LD], []) 5195b9b4fd27Smrgdnl AC_DEFUN([AC_PROG_LD], []) 5196caade7ccSmrg 5197caade7ccSmrg 5198b9b4fd27Smrg# _LT_PATH_LD_GNU 5199b9b4fd27Smrg#- -------------- 5200b9b4fd27Smrgm4_defun([_LT_PATH_LD_GNU], 5201b9b4fd27Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 5202b9b4fd27Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 5203b9b4fd27Smrgcase `$LD -v 2>&1 </dev/null` in 5204b9b4fd27Smrg*GNU* | *'with BFD'*) 5205b9b4fd27Smrg lt_cv_prog_gnu_ld=yes 5206b9b4fd27Smrg ;; 5207b9b4fd27Smrg*) 5208b9b4fd27Smrg lt_cv_prog_gnu_ld=no 5209b9b4fd27Smrg ;; 5210b9b4fd27Smrgesac]) 5211b9b4fd27Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 5212b9b4fd27Smrg])# _LT_PATH_LD_GNU 5213caade7ccSmrg 5214caade7ccSmrg 5215b9b4fd27Smrg# _LT_CMD_RELOAD 5216b9b4fd27Smrg# -------------- 5217b9b4fd27Smrg# find reload flag for linker 5218b9b4fd27Smrg# -- PORTME Some linkers may need a different reload flag. 5219b9b4fd27Smrgm4_defun([_LT_CMD_RELOAD], 5220b9b4fd27Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 5221b9b4fd27Smrg lt_cv_ld_reload_flag, 5222b9b4fd27Smrg [lt_cv_ld_reload_flag='-r']) 5223b9b4fd27Smrgreload_flag=$lt_cv_ld_reload_flag 5224b9b4fd27Smrgcase $reload_flag in 5225b9b4fd27Smrg"" | " "*) ;; 5226b9b4fd27Smrg*) reload_flag=" $reload_flag" ;; 5227b9b4fd27Smrgesac 5228b9b4fd27Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 5229b9b4fd27Smrgcase $host_os in 5230b9b4fd27Smrg darwin*) 5231b9b4fd27Smrg if test "$GCC" = yes; then 5232b9b4fd27Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 5233caade7ccSmrg else 5234b9b4fd27Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 5235caade7ccSmrg fi 5236b9b4fd27Smrg ;; 5237b9b4fd27Smrgesac 5238b9b4fd27Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 5239b9b4fd27Smrg_LT_DECL([], [reload_cmds], [2])dnl 5240b9b4fd27Smrg])# _LT_CMD_RELOAD 5241caade7ccSmrg 5242caade7ccSmrg 5243b9b4fd27Smrg# _LT_CHECK_MAGIC_METHOD 5244b9b4fd27Smrg# ---------------------- 5245b9b4fd27Smrg# how to check for library dependencies 5246b9b4fd27Smrg# -- PORTME fill in with the dynamic library characteristics 5247b9b4fd27Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 5248b9b4fd27Smrg[m4_require([_LT_DECL_EGREP]) 5249b9b4fd27Smrgm4_require([_LT_DECL_OBJDUMP]) 5250b9b4fd27SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 5251b9b4fd27Smrglt_cv_deplibs_check_method, 5252b9b4fd27Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 5253b9b4fd27Smrglt_cv_file_magic_test_file= 5254b9b4fd27Smrglt_cv_deplibs_check_method='unknown' 5255b9b4fd27Smrg# Need to set the preceding variable on all platforms that support 5256b9b4fd27Smrg# interlibrary dependencies. 5257b9b4fd27Smrg# 'none' -- dependencies not supported. 5258b9b4fd27Smrg# `unknown' -- same as none, but documents that we really don't know. 5259b9b4fd27Smrg# 'pass_all' -- all dependencies passed with no checks. 5260b9b4fd27Smrg# 'test_compile' -- check by making test program. 5261b9b4fd27Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 5262b9b4fd27Smrg# which responds to the $file_magic_cmd with a given extended regex. 5263b9b4fd27Smrg# If you have `file' or equivalent on your system and you're not sure 5264b9b4fd27Smrg# whether `pass_all' will *always* work, you probably want this one. 5265caade7ccSmrg 5266caade7ccSmrgcase $host_os in 5267b9b4fd27Smrgaix[[4-9]]*) 5268b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5269b9b4fd27Smrg ;; 5270caade7ccSmrg 5271b9b4fd27Smrgbeos*) 5272b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5273b9b4fd27Smrg ;; 5274caade7ccSmrg 5275b9b4fd27Smrgbsdi[[45]]*) 5276b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 5277b9b4fd27Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 5278b9b4fd27Smrg lt_cv_file_magic_test_file=/shlib/libc.so 5279b9b4fd27Smrg ;; 5280caade7ccSmrg 5281b9b4fd27Smrgcygwin*) 5282b9b4fd27Smrg # func_win32_libid is a shell function defined in ltmain.sh 5283b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5284b9b4fd27Smrg lt_cv_file_magic_cmd='func_win32_libid' 5285b9b4fd27Smrg ;; 5286caade7ccSmrg 5287b9b4fd27Smrgmingw* | pw32*) 5288b9b4fd27Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 5289b9b4fd27Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 5290b9b4fd27Smrg # unless we find 'file', for example because we are cross-compiling. 5291b9b4fd27Smrg if ( file / ) >/dev/null 2>&1; then 5292b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5293b9b4fd27Smrg lt_cv_file_magic_cmd='func_win32_libid' 5294b9b4fd27Smrg else 5295b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 5296b9b4fd27Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5297b9b4fd27Smrg fi 5298b9b4fd27Smrg ;; 5299caade7ccSmrg 5300b9b4fd27Smrgcegcc) 5301b9b4fd27Smrg # use the weaker test based on 'objdump'. See mingw*. 5302b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 5303b9b4fd27Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5304caade7ccSmrg ;; 5305caade7ccSmrg 5306b9b4fd27Smrgdarwin* | rhapsody*) 5307b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5308b9b4fd27Smrg ;; 5309caade7ccSmrg 5310b9b4fd27Smrgfreebsd* | dragonfly*) 5311b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5312caade7ccSmrg case $host_cpu in 5313b9b4fd27Smrg i*86 ) 5314b9b4fd27Smrg # Not sure whether the presence of OpenBSD here was a mistake. 5315b9b4fd27Smrg # Let's accept both of them until this is cleared up. 5316b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 5317b9b4fd27Smrg lt_cv_file_magic_cmd=/usr/bin/file 5318b9b4fd27Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 5319caade7ccSmrg ;; 5320caade7ccSmrg esac 5321b9b4fd27Smrg else 5322b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5323b9b4fd27Smrg fi 5324b9b4fd27Smrg ;; 5325caade7ccSmrg 5326b9b4fd27Smrggnu*) 5327b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5328b9b4fd27Smrg ;; 5329caade7ccSmrg 5330b9b4fd27Smrghpux10.20* | hpux11*) 5331b9b4fd27Smrg lt_cv_file_magic_cmd=/usr/bin/file 5332b9b4fd27Smrg case $host_cpu in 5333b9b4fd27Smrg ia64*) 5334b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 5335b9b4fd27Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 5336caade7ccSmrg ;; 5337b9b4fd27Smrg hppa*64*) 5338b9b4fd27Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 5339b9b4fd27Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 5340caade7ccSmrg ;; 5341b9b4fd27Smrg *) 5342b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 5343b9b4fd27Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 5344caade7ccSmrg ;; 5345b9b4fd27Smrg esac 5346b9b4fd27Smrg ;; 5347caade7ccSmrg 5348b9b4fd27Smrginterix[[3-9]]*) 5349b9b4fd27Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 5350b9b4fd27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 5351b9b4fd27Smrg ;; 5352caade7ccSmrg 5353b9b4fd27Smrgirix5* | irix6* | nonstopux*) 5354b9b4fd27Smrg case $LD in 5355b9b4fd27Smrg *-32|*"-32 ") libmagic=32-bit;; 5356b9b4fd27Smrg *-n32|*"-n32 ") libmagic=N32;; 5357b9b4fd27Smrg *-64|*"-64 ") libmagic=64-bit;; 5358b9b4fd27Smrg *) libmagic=never-match;; 5359b9b4fd27Smrg esac 5360b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5361b9b4fd27Smrg ;; 5362caade7ccSmrg 5363b9b4fd27Smrg# This must be Linux ELF. 5364b9b4fd27Smrglinux* | k*bsd*-gnu) 5365b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5366b9b4fd27Smrg ;; 5367caade7ccSmrg 5368b9b4fd27Smrgnetbsd*) 5369b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5370b9b4fd27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5371b9b4fd27Smrg else 5372b9b4fd27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 5373b9b4fd27Smrg fi 5374b9b4fd27Smrg ;; 5375caade7ccSmrg 5376b9b4fd27Smrgnewos6*) 5377b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 5378b9b4fd27Smrg lt_cv_file_magic_cmd=/usr/bin/file 5379b9b4fd27Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 5380b9b4fd27Smrg ;; 5381caade7ccSmrg 5382b9b4fd27Smrg*nto* | *qnx*) 5383b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5384b9b4fd27Smrg ;; 5385caade7ccSmrg 5386b9b4fd27Smrgopenbsd*) 5387b9b4fd27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5388b9b4fd27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 5389b9b4fd27Smrg else 5390b9b4fd27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5391b9b4fd27Smrg fi 5392b9b4fd27Smrg ;; 5393caade7ccSmrg 5394b9b4fd27Smrgosf3* | osf4* | osf5*) 5395b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5396b9b4fd27Smrg ;; 5397caade7ccSmrg 5398b9b4fd27Smrgrdos*) 5399b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5400b9b4fd27Smrg ;; 5401caade7ccSmrg 5402b9b4fd27Smrgsolaris*) 5403b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5404b9b4fd27Smrg ;; 5405caade7ccSmrg 5406b9b4fd27Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5407b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5408b9b4fd27Smrg ;; 5409caade7ccSmrg 5410b9b4fd27Smrgsysv4 | sysv4.3*) 5411b9b4fd27Smrg case $host_vendor in 5412b9b4fd27Smrg motorola) 5413b9b4fd27Smrg 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]]' 5414b9b4fd27Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 5415caade7ccSmrg ;; 5416b9b4fd27Smrg ncr) 5417b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5418caade7ccSmrg ;; 5419b9b4fd27Smrg sequent) 5420b9b4fd27Smrg lt_cv_file_magic_cmd='/bin/file' 5421b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 5422caade7ccSmrg ;; 5423b9b4fd27Smrg sni) 5424b9b4fd27Smrg lt_cv_file_magic_cmd='/bin/file' 5425b9b4fd27Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 5426b9b4fd27Smrg lt_cv_file_magic_test_file=/lib/libc.so 5427caade7ccSmrg ;; 5428b9b4fd27Smrg siemens) 5429b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5430caade7ccSmrg ;; 5431b9b4fd27Smrg pc) 5432b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5433caade7ccSmrg ;; 5434b9b4fd27Smrg esac 5435b9b4fd27Smrg ;; 5436b9b4fd27Smrg 5437b9b4fd27Smrgtpf*) 5438b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5439b9b4fd27Smrg ;; 5440caade7ccSmrgesac 5441b9b4fd27Smrg]) 5442b9b4fd27Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 5443b9b4fd27Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 5444b9b4fd27Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 5445caade7ccSmrg 5446b9b4fd27Smrg_LT_DECL([], [deplibs_check_method], [1], 5447b9b4fd27Smrg [Method to check whether dependent libraries are shared objects]) 5448b9b4fd27Smrg_LT_DECL([], [file_magic_cmd], [1], 5449b9b4fd27Smrg [Command to use when deplibs_check_method == "file_magic"]) 5450b9b4fd27Smrg])# _LT_CHECK_MAGIC_METHOD 5451caade7ccSmrg 5452caade7ccSmrg 5453b9b4fd27Smrg# LT_PATH_NM 5454b9b4fd27Smrg# ---------- 5455b9b4fd27Smrg# find the pathname to a BSD- or MS-compatible name lister 5456b9b4fd27SmrgAC_DEFUN([LT_PATH_NM], 5457b9b4fd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 5458b9b4fd27SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 5459b9b4fd27Smrg[if test -n "$NM"; then 5460b9b4fd27Smrg # Let the user override the test. 5461b9b4fd27Smrg lt_cv_path_NM="$NM" 5462b9b4fd27Smrgelse 5463b9b4fd27Smrg lt_nm_to_check="${ac_tool_prefix}nm" 5464b9b4fd27Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 5465b9b4fd27Smrg lt_nm_to_check="$lt_nm_to_check nm" 5466b9b4fd27Smrg fi 5467b9b4fd27Smrg for lt_tmp_nm in $lt_nm_to_check; do 5468b9b4fd27Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5469b9b4fd27Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 5470b9b4fd27Smrg IFS="$lt_save_ifs" 5471b9b4fd27Smrg test -z "$ac_dir" && ac_dir=. 5472b9b4fd27Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 5473b9b4fd27Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 5474b9b4fd27Smrg # Check to see if the nm accepts a BSD-compat flag. 5475b9b4fd27Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 5476b9b4fd27Smrg # nm: unknown option "B" ignored 5477b9b4fd27Smrg # Tru64's nm complains that /dev/null is an invalid object file 5478b9b4fd27Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 5479b9b4fd27Smrg */dev/null* | *'Invalid file or object type'*) 5480b9b4fd27Smrg lt_cv_path_NM="$tmp_nm -B" 5481b9b4fd27Smrg break 5482b9b4fd27Smrg ;; 5483b9b4fd27Smrg *) 5484b9b4fd27Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 5485b9b4fd27Smrg */dev/null*) 5486b9b4fd27Smrg lt_cv_path_NM="$tmp_nm -p" 5487b9b4fd27Smrg break 5488b9b4fd27Smrg ;; 5489b9b4fd27Smrg *) 5490b9b4fd27Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 5491b9b4fd27Smrg continue # so that we can try to find one that supports BSD flags 5492b9b4fd27Smrg ;; 5493b9b4fd27Smrg esac 5494b9b4fd27Smrg ;; 5495b9b4fd27Smrg esac 5496b9b4fd27Smrg fi 5497b9b4fd27Smrg done 5498b9b4fd27Smrg IFS="$lt_save_ifs" 5499b9b4fd27Smrg done 5500b9b4fd27Smrg : ${lt_cv_path_NM=no} 5501b9b4fd27Smrgfi]) 5502b9b4fd27Smrgif test "$lt_cv_path_NM" != "no"; then 5503b9b4fd27Smrg NM="$lt_cv_path_NM" 5504b9b4fd27Smrgelse 5505b9b4fd27Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 5506b9b4fd27Smrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 5507b9b4fd27Smrg AC_SUBST([DUMPBIN]) 5508b9b4fd27Smrg if test "$DUMPBIN" != ":"; then 5509b9b4fd27Smrg NM="$DUMPBIN" 5510b9b4fd27Smrg fi 5511b9b4fd27Smrgfi 5512b9b4fd27Smrgtest -z "$NM" && NM=nm 5513b9b4fd27SmrgAC_SUBST([NM]) 5514b9b4fd27Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 5515b9b4fd27Smrg 5516b9b4fd27SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 5517b9b4fd27Smrg [lt_cv_nm_interface="BSD nm" 5518b9b4fd27Smrg echo "int some_variable = 0;" > conftest.$ac_ext 5519b9b4fd27Smrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 5520b9b4fd27Smrg (eval "$ac_compile" 2>conftest.err) 5521b9b4fd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5522b9b4fd27Smrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 5523b9b4fd27Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 5524b9b4fd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5525b9b4fd27Smrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 5526b9b4fd27Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 5527b9b4fd27Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 5528b9b4fd27Smrg lt_cv_nm_interface="MS dumpbin" 5529b9b4fd27Smrg fi 5530b9b4fd27Smrg rm -f conftest*]) 5531b9b4fd27Smrg])# LT_PATH_NM 5532caade7ccSmrg 5533b9b4fd27Smrg# Old names: 5534b9b4fd27SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 5535b9b4fd27SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 5536b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 5537b9b4fd27Smrgdnl AC_DEFUN([AM_PROG_NM], []) 5538b9b4fd27Smrgdnl AC_DEFUN([AC_PROG_NM], []) 5539caade7ccSmrg 5540caade7ccSmrg 5541b9b4fd27Smrg# LT_LIB_M 5542b9b4fd27Smrg# -------- 5543b9b4fd27Smrg# check for math library 5544b9b4fd27SmrgAC_DEFUN([LT_LIB_M], 5545b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5546b9b4fd27SmrgLIBM= 5547b9b4fd27Smrgcase $host in 5548b9b4fd27Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 5549b9b4fd27Smrg # These system don't have libm, or don't need it 5550b9b4fd27Smrg ;; 5551b9b4fd27Smrg*-ncr-sysv4.3*) 5552b9b4fd27Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 5553b9b4fd27Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 5554b9b4fd27Smrg ;; 5555b9b4fd27Smrg*) 5556b9b4fd27Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 5557b9b4fd27Smrg ;; 5558b9b4fd27Smrgesac 5559b9b4fd27SmrgAC_SUBST([LIBM]) 5560b9b4fd27Smrg])# LT_LIB_M 5561caade7ccSmrg 5562b9b4fd27Smrg# Old name: 5563b9b4fd27SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 5564b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 5565b9b4fd27Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 5566caade7ccSmrg 5567caade7ccSmrg 5568b9b4fd27Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 5569b9b4fd27Smrg# ------------------------------- 5570b9b4fd27Smrgm4_defun([_LT_COMPILER_NO_RTTI], 5571b9b4fd27Smrg[m4_require([_LT_TAG_COMPILER])dnl 5572caade7ccSmrg 5573b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5574caade7ccSmrg 5575b9b4fd27Smrgif test "$GCC" = yes; then 5576b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5577caade7ccSmrg 5578b9b4fd27Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5579b9b4fd27Smrg lt_cv_prog_compiler_rtti_exceptions, 5580b9b4fd27Smrg [-fno-rtti -fno-exceptions], [], 5581b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 5582b9b4fd27Smrgfi 5583b9b4fd27Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 5584b9b4fd27Smrg [Compiler flag to turn off builtin functions]) 5585b9b4fd27Smrg])# _LT_COMPILER_NO_RTTI 5586caade7ccSmrg 5587caade7ccSmrg 5588b9b4fd27Smrg# _LT_CMD_GLOBAL_SYMBOLS 5589b9b4fd27Smrg# ---------------------- 5590b9b4fd27Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 5591b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5592b9b4fd27SmrgAC_REQUIRE([AC_PROG_CC])dnl 5593b9b4fd27SmrgAC_REQUIRE([LT_PATH_NM])dnl 5594b9b4fd27SmrgAC_REQUIRE([LT_PATH_LD])dnl 5595b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 5596b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 5597b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl 5598caade7ccSmrg 5599b9b4fd27Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 5600b9b4fd27SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5601b9b4fd27SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 5602b9b4fd27Smrg[ 5603b9b4fd27Smrg# These are sane defaults that work on at least a few old systems. 5604b9b4fd27Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 5605caade7ccSmrg 5606b9b4fd27Smrg# Character class describing NM global symbol codes. 5607b9b4fd27Smrgsymcode='[[BCDEGRST]]' 5608485f0483Smrg 5609b9b4fd27Smrg# Regexp to match symbols that can be accessed directly from C. 5610b9b4fd27Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 5611caade7ccSmrg 5612b9b4fd27Smrg# Define system-specific variables. 5613b9b4fd27Smrgcase $host_os in 5614b9b4fd27Smrgaix*) 5615b9b4fd27Smrg symcode='[[BCDT]]' 5616485f0483Smrg ;; 5617b9b4fd27Smrgcygwin* | mingw* | pw32* | cegcc*) 5618b9b4fd27Smrg symcode='[[ABCDGISTW]]' 5619caade7ccSmrg ;; 5620b9b4fd27Smrghpux*) 5621b9b4fd27Smrg if test "$host_cpu" = ia64; then 5622b9b4fd27Smrg symcode='[[ABCDEGRST]]' 5623caade7ccSmrg fi 5624caade7ccSmrg ;; 5625b9b4fd27Smrgirix* | nonstopux*) 5626b9b4fd27Smrg symcode='[[BCDEGRST]]' 5627b9b4fd27Smrg ;; 5628b9b4fd27Smrgosf*) 5629b9b4fd27Smrg symcode='[[BCDEGQRST]]' 5630b9b4fd27Smrg ;; 5631b9b4fd27Smrgsolaris*) 5632b9b4fd27Smrg symcode='[[BDRT]]' 5633b9b4fd27Smrg ;; 5634b9b4fd27Smrgsco3.2v5*) 5635b9b4fd27Smrg symcode='[[DT]]' 5636b9b4fd27Smrg ;; 5637b9b4fd27Smrgsysv4.2uw2*) 5638b9b4fd27Smrg symcode='[[DT]]' 5639b9b4fd27Smrg ;; 5640b9b4fd27Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 5641b9b4fd27Smrg symcode='[[ABDT]]' 5642b9b4fd27Smrg ;; 5643b9b4fd27Smrgsysv4) 5644b9b4fd27Smrg symcode='[[DFNSTU]]' 5645caade7ccSmrg ;; 5646caade7ccSmrgesac 5647caade7ccSmrg 5648b9b4fd27Smrg# If we're using GNU nm, then use its standard symbol codes. 5649b9b4fd27Smrgcase `$NM -V 2>&1` in 5650b9b4fd27Smrg*GNU* | *'with BFD'*) 5651b9b4fd27Smrg symcode='[[ABCDGIRSTW]]' ;; 5652b9b4fd27Smrgesac 5653caade7ccSmrg 5654b9b4fd27Smrg# Transform an extracted symbol line into a proper C declaration. 5655b9b4fd27Smrg# Some systems (esp. on ia64) link data and code symbols differently, 5656b9b4fd27Smrg# so use this general approach. 5657b9b4fd27Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 5658caade7ccSmrg 5659b9b4fd27Smrg# Transform an extracted symbol line into symbol name and symbol address 5660b9b4fd27Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 5661b9b4fd27Smrglt_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'" 5662caade7ccSmrg 5663b9b4fd27Smrg# Handle CRLF in mingw tool chain 5664b9b4fd27Smrgopt_cr= 5665b9b4fd27Smrgcase $build_os in 5666b9b4fd27Smrgmingw*) 5667b9b4fd27Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 5668b9b4fd27Smrg ;; 5669b9b4fd27Smrgesac 5670caade7ccSmrg 5671b9b4fd27Smrg# Try without a prefix underscore, then with it. 5672b9b4fd27Smrgfor ac_symprfx in "" "_"; do 5673caade7ccSmrg 5674b9b4fd27Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 5675b9b4fd27Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 5676caade7ccSmrg 5677b9b4fd27Smrg # Write the raw and C identifiers. 5678b9b4fd27Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 5679b9b4fd27Smrg # Fake it for dumpbin and say T for any non-static function 5680b9b4fd27Smrg # and D for any global variable. 5681b9b4fd27Smrg # Also find C++ and __fastcall symbols from MSVC++, 5682b9b4fd27Smrg # which start with @ or ?. 5683b9b4fd27Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 5684b9b4fd27Smrg" {last_section=section; section=\$ 3};"\ 5685b9b4fd27Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 5686b9b4fd27Smrg" \$ 0!~/External *\|/{next};"\ 5687b9b4fd27Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 5688b9b4fd27Smrg" {if(hide[section]) next};"\ 5689b9b4fd27Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 5690b9b4fd27Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 5691b9b4fd27Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 5692b9b4fd27Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 5693b9b4fd27Smrg" ' prfx=^$ac_symprfx]" 5694b9b4fd27Smrg else 5695b9b4fd27Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 5696b9b4fd27Smrg fi 5697caade7ccSmrg 5698b9b4fd27Smrg # Check to see that the pipe works correctly. 5699b9b4fd27Smrg pipe_works=no 5700caade7ccSmrg 5701b9b4fd27Smrg rm -f conftest* 5702b9b4fd27Smrg cat > conftest.$ac_ext <<_LT_EOF 5703b9b4fd27Smrg#ifdef __cplusplus 5704b9b4fd27Smrgextern "C" { 5705b9b4fd27Smrg#endif 5706b9b4fd27Smrgchar nm_test_var; 5707b9b4fd27Smrgvoid nm_test_func(void); 5708b9b4fd27Smrgvoid nm_test_func(void){} 5709b9b4fd27Smrg#ifdef __cplusplus 5710b9b4fd27Smrg} 5711b9b4fd27Smrg#endif 5712b9b4fd27Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 5713b9b4fd27Smrg_LT_EOF 5714caade7ccSmrg 5715b9b4fd27Smrg if AC_TRY_EVAL(ac_compile); then 5716b9b4fd27Smrg # Now try to grab the symbols. 5717b9b4fd27Smrg nlist=conftest.nm 5718b9b4fd27Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 5719b9b4fd27Smrg # Try sorting and uniquifying the output. 5720b9b4fd27Smrg if sort "$nlist" | uniq > "$nlist"T; then 5721b9b4fd27Smrg mv -f "$nlist"T "$nlist" 5722b9b4fd27Smrg else 5723b9b4fd27Smrg rm -f "$nlist"T 5724b9b4fd27Smrg fi 5725caade7ccSmrg 5726b9b4fd27Smrg # Make sure that we snagged all the symbols we need. 5727b9b4fd27Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 5728b9b4fd27Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 5729b9b4fd27Smrg cat <<_LT_EOF > conftest.$ac_ext 5730b9b4fd27Smrg#ifdef __cplusplus 5731b9b4fd27Smrgextern "C" { 5732b9b4fd27Smrg#endif 5733caade7ccSmrg 5734b9b4fd27Smrg_LT_EOF 5735b9b4fd27Smrg # Now generate the symbol file. 5736b9b4fd27Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 5737caade7ccSmrg 5738b9b4fd27Smrg cat <<_LT_EOF >> conftest.$ac_ext 5739caade7ccSmrg 5740b9b4fd27Smrg/* The mapping between symbol names and symbols. */ 5741b9b4fd27Smrgconst struct { 5742b9b4fd27Smrg const char *name; 5743b9b4fd27Smrg void *address; 5744b9b4fd27Smrg} 5745b9b4fd27Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 5746b9b4fd27Smrg{ 5747b9b4fd27Smrg { "@PROGRAM@", (void *) 0 }, 5748b9b4fd27Smrg_LT_EOF 5749b9b4fd27Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 5750b9b4fd27Smrg cat <<\_LT_EOF >> conftest.$ac_ext 5751b9b4fd27Smrg {0, (void *) 0} 5752b9b4fd27Smrg}; 5753caade7ccSmrg 5754b9b4fd27Smrg/* This works around a problem in FreeBSD linker */ 5755b9b4fd27Smrg#ifdef FREEBSD_WORKAROUND 5756b9b4fd27Smrgstatic const void *lt_preloaded_setup() { 5757b9b4fd27Smrg return lt__PROGRAM__LTX_preloaded_symbols; 5758b9b4fd27Smrg} 5759b9b4fd27Smrg#endif 5760caade7ccSmrg 5761b9b4fd27Smrg#ifdef __cplusplus 5762b9b4fd27Smrg} 5763b9b4fd27Smrg#endif 5764b9b4fd27Smrg_LT_EOF 5765b9b4fd27Smrg # Now try linking the two files. 5766b9b4fd27Smrg mv conftest.$ac_objext conftstm.$ac_objext 5767b9b4fd27Smrg lt_save_LIBS="$LIBS" 5768b9b4fd27Smrg lt_save_CFLAGS="$CFLAGS" 5769b9b4fd27Smrg LIBS="conftstm.$ac_objext" 5770b9b4fd27Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 5771b9b4fd27Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 5772b9b4fd27Smrg pipe_works=yes 5773b9b4fd27Smrg fi 5774b9b4fd27Smrg LIBS="$lt_save_LIBS" 5775b9b4fd27Smrg CFLAGS="$lt_save_CFLAGS" 5776b9b4fd27Smrg else 5777b9b4fd27Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 5778b9b4fd27Smrg fi 5779b9b4fd27Smrg else 5780b9b4fd27Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 5781b9b4fd27Smrg fi 5782b9b4fd27Smrg else 5783b9b4fd27Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 5784b9b4fd27Smrg fi 5785b9b4fd27Smrg else 5786b9b4fd27Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 5787b9b4fd27Smrg cat conftest.$ac_ext >&5 5788b9b4fd27Smrg fi 5789b9b4fd27Smrg rm -rf conftest* conftst* 5790caade7ccSmrg 5791b9b4fd27Smrg # Do not use the global_symbol_pipe unless it works. 5792b9b4fd27Smrg if test "$pipe_works" = yes; then 5793b9b4fd27Smrg break 5794b9b4fd27Smrg else 5795b9b4fd27Smrg lt_cv_sys_global_symbol_pipe= 5796b9b4fd27Smrg fi 5797b9b4fd27Smrgdone 5798b9b4fd27Smrg]) 5799b9b4fd27Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 5800b9b4fd27Smrg lt_cv_sys_global_symbol_to_cdecl= 5801b9b4fd27Smrgfi 5802b9b4fd27Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 5803b9b4fd27Smrg AC_MSG_RESULT(failed) 5804b9b4fd27Smrgelse 5805b9b4fd27Smrg AC_MSG_RESULT(ok) 5806b9b4fd27Smrgfi 5807caade7ccSmrg 5808b9b4fd27Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 5809b9b4fd27Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 5810b9b4fd27Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 5811b9b4fd27Smrg [Transform the output of nm in a proper C declaration]) 5812b9b4fd27Smrg_LT_DECL([global_symbol_to_c_name_address], 5813b9b4fd27Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 5814b9b4fd27Smrg [Transform the output of nm in a C name address pair]) 5815b9b4fd27Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 5816b9b4fd27Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 5817b9b4fd27Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 5818b9b4fd27Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 5819caade7ccSmrg 5820caade7ccSmrg 5821b9b4fd27Smrg# _LT_COMPILER_PIC([TAGNAME]) 5822b9b4fd27Smrg# --------------------------- 5823b9b4fd27Smrgm4_defun([_LT_COMPILER_PIC], 5824b9b4fd27Smrg[m4_require([_LT_TAG_COMPILER])dnl 5825b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 5826b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5827b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 5828caade7ccSmrg 5829b9b4fd27SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 5830b9b4fd27Smrgm4_if([$1], [CXX], [ 5831b9b4fd27Smrg # C++ specific cases for pic, static, wl, etc. 5832b9b4fd27Smrg if test "$GXX" = yes; then 5833b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5834b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5835caade7ccSmrg 5836b9b4fd27Smrg case $host_os in 5837b9b4fd27Smrg aix*) 5838b9b4fd27Smrg # All AIX code is PIC. 5839b9b4fd27Smrg if test "$host_cpu" = ia64; then 5840b9b4fd27Smrg # AIX 5 now supports IA64 processor 5841b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5842b9b4fd27Smrg fi 5843b9b4fd27Smrg ;; 5844caade7ccSmrg 5845b9b4fd27Smrg amigaos*) 5846b9b4fd27Smrg case $host_cpu in 5847b9b4fd27Smrg powerpc) 5848b9b4fd27Smrg # see comment about AmigaOS4 .so support 5849b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5850b9b4fd27Smrg ;; 5851b9b4fd27Smrg m68k) 5852b9b4fd27Smrg # FIXME: we need at least 68020 code to build shared libraries, but 5853b9b4fd27Smrg # adding the `-m68020' flag to GCC prevents building anything better, 5854b9b4fd27Smrg # like `-m68040'. 5855b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5856b9b4fd27Smrg ;; 5857b9b4fd27Smrg esac 5858b9b4fd27Smrg ;; 5859caade7ccSmrg 5860b9b4fd27Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5861b9b4fd27Smrg # PIC is the default for these OSes. 5862b9b4fd27Smrg ;; 5863b9b4fd27Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 5864b9b4fd27Smrg # This hack is so that the source file can tell whether it is being 5865b9b4fd27Smrg # built for inclusion in a dll (and should export symbols for example). 5866b9b4fd27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5867b9b4fd27Smrg # (--disable-auto-import) libraries 5868b9b4fd27Smrg m4_if([$1], [GCJ], [], 5869b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5870b9b4fd27Smrg ;; 5871b9b4fd27Smrg darwin* | rhapsody*) 5872b9b4fd27Smrg # PIC is the default on this platform 5873b9b4fd27Smrg # Common symbols not allowed in MH_DYLIB files 5874b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5875b9b4fd27Smrg ;; 5876b9b4fd27Smrg *djgpp*) 5877b9b4fd27Smrg # DJGPP does not support shared libraries at all 5878b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5879b9b4fd27Smrg ;; 5880b9b4fd27Smrg interix[[3-9]]*) 5881b9b4fd27Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5882b9b4fd27Smrg # Instead, we relocate shared libraries at runtime. 5883b9b4fd27Smrg ;; 5884b9b4fd27Smrg sysv4*MP*) 5885b9b4fd27Smrg if test -d /usr/nec; then 5886b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5887b9b4fd27Smrg fi 5888b9b4fd27Smrg ;; 5889b9b4fd27Smrg hpux*) 5890b9b4fd27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5891b9b4fd27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5892b9b4fd27Smrg # sets the default TLS model and affects inlining. 5893b9b4fd27Smrg case $host_cpu in 5894b9b4fd27Smrg hppa*64*) 5895b9b4fd27Smrg ;; 5896b9b4fd27Smrg *) 5897b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5898b9b4fd27Smrg ;; 5899b9b4fd27Smrg esac 5900b9b4fd27Smrg ;; 5901b9b4fd27Smrg *qnx* | *nto*) 5902b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5903b9b4fd27Smrg # it will coredump. 5904b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5905caade7ccSmrg ;; 5906caade7ccSmrg *) 5907b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5908caade7ccSmrg ;; 5909caade7ccSmrg esac 5910b9b4fd27Smrg else 5911b9b4fd27Smrg case $host_os in 5912b9b4fd27Smrg aix[[4-9]]*) 5913b9b4fd27Smrg # All AIX code is PIC. 5914b9b4fd27Smrg if test "$host_cpu" = ia64; then 5915b9b4fd27Smrg # AIX 5 now supports IA64 processor 5916b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5917b9b4fd27Smrg else 5918b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5919b9b4fd27Smrg fi 5920b9b4fd27Smrg ;; 5921b9b4fd27Smrg chorus*) 5922b9b4fd27Smrg case $cc_basename in 5923b9b4fd27Smrg cxch68*) 5924b9b4fd27Smrg # Green Hills C++ Compiler 5925b9b4fd27Smrg # _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" 5926b9b4fd27Smrg ;; 5927b9b4fd27Smrg esac 5928b9b4fd27Smrg ;; 5929b9b4fd27Smrg dgux*) 5930b9b4fd27Smrg case $cc_basename in 5931b9b4fd27Smrg ec++*) 5932b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5933b9b4fd27Smrg ;; 5934b9b4fd27Smrg ghcx*) 5935b9b4fd27Smrg # Green Hills C++ Compiler 5936b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5937b9b4fd27Smrg ;; 5938b9b4fd27Smrg *) 5939b9b4fd27Smrg ;; 5940b9b4fd27Smrg esac 5941b9b4fd27Smrg ;; 5942b9b4fd27Smrg freebsd* | dragonfly*) 5943b9b4fd27Smrg # FreeBSD uses GNU C++ 5944b9b4fd27Smrg ;; 5945b9b4fd27Smrg hpux9* | hpux10* | hpux11*) 5946b9b4fd27Smrg case $cc_basename in 5947b9b4fd27Smrg CC*) 5948b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5949b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5950b9b4fd27Smrg if test "$host_cpu" != ia64; then 5951b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5952b9b4fd27Smrg fi 5953b9b4fd27Smrg ;; 5954b9b4fd27Smrg aCC*) 5955b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5956b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5957b9b4fd27Smrg case $host_cpu in 5958b9b4fd27Smrg hppa*64*|ia64*) 5959b9b4fd27Smrg # +Z the default 5960b9b4fd27Smrg ;; 5961b9b4fd27Smrg *) 5962b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5963b9b4fd27Smrg ;; 5964b9b4fd27Smrg esac 5965b9b4fd27Smrg ;; 5966b9b4fd27Smrg *) 5967b9b4fd27Smrg ;; 5968b9b4fd27Smrg esac 5969b9b4fd27Smrg ;; 5970b9b4fd27Smrg interix*) 5971b9b4fd27Smrg # This is c89, which is MS Visual C++ (no shared libs) 5972b9b4fd27Smrg # Anyone wants to do a port? 5973b9b4fd27Smrg ;; 5974b9b4fd27Smrg irix5* | irix6* | nonstopux*) 5975b9b4fd27Smrg case $cc_basename in 5976b9b4fd27Smrg CC*) 5977b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5978b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5979b9b4fd27Smrg # CC pic flag -KPIC is the default. 5980b9b4fd27Smrg ;; 5981b9b4fd27Smrg *) 5982b9b4fd27Smrg ;; 5983b9b4fd27Smrg esac 5984b9b4fd27Smrg ;; 5985b9b4fd27Smrg linux* | k*bsd*-gnu) 5986b9b4fd27Smrg case $cc_basename in 5987b9b4fd27Smrg KCC*) 5988b9b4fd27Smrg # KAI C++ Compiler 5989b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5990b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5991b9b4fd27Smrg ;; 5992b9b4fd27Smrg ecpc* ) 5993b9b4fd27Smrg # old Intel C++ for x86_64 which still supported -KPIC. 5994b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5995b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5996b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5997b9b4fd27Smrg ;; 5998b9b4fd27Smrg icpc* ) 5999b9b4fd27Smrg # Intel C++, used to be incompatible with GCC. 6000b9b4fd27Smrg # ICC 10 doesn't accept -KPIC any more. 6001b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6002b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6003b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6004b9b4fd27Smrg ;; 6005b9b4fd27Smrg pgCC* | pgcpp*) 6006b9b4fd27Smrg # Portland Group C++ compiler 6007b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6008b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6009b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6010b9b4fd27Smrg ;; 6011b9b4fd27Smrg cxx*) 6012b9b4fd27Smrg # Compaq C++ 6013b9b4fd27Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6014b9b4fd27Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6015b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6016b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6017b9b4fd27Smrg ;; 6018b9b4fd27Smrg xlc* | xlC*) 6019b9b4fd27Smrg # IBM XL 8.0 on PPC 6020b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6021b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6022b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6023b9b4fd27Smrg ;; 6024b9b4fd27Smrg *) 6025b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 6026b9b4fd27Smrg *Sun\ C*) 6027b9b4fd27Smrg # Sun C++ 5.9 6028b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6029b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6030b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6031b9b4fd27Smrg ;; 6032b9b4fd27Smrg esac 6033b9b4fd27Smrg ;; 6034b9b4fd27Smrg esac 6035b9b4fd27Smrg ;; 6036b9b4fd27Smrg lynxos*) 6037b9b4fd27Smrg ;; 6038b9b4fd27Smrg m88k*) 6039b9b4fd27Smrg ;; 6040b9b4fd27Smrg mvs*) 6041b9b4fd27Smrg case $cc_basename in 6042b9b4fd27Smrg cxx*) 6043b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6044b9b4fd27Smrg ;; 6045b9b4fd27Smrg *) 6046b9b4fd27Smrg ;; 6047b9b4fd27Smrg esac 6048b9b4fd27Smrg ;; 6049b9b4fd27Smrg netbsd*) 6050b9b4fd27Smrg ;; 6051b9b4fd27Smrg *qnx* | *nto*) 6052b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6053b9b4fd27Smrg # it will coredump. 6054b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6055b9b4fd27Smrg ;; 6056b9b4fd27Smrg osf3* | osf4* | osf5*) 6057b9b4fd27Smrg case $cc_basename in 6058b9b4fd27Smrg KCC*) 6059b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6060b9b4fd27Smrg ;; 6061b9b4fd27Smrg RCC*) 6062b9b4fd27Smrg # Rational C++ 2.4.1 6063b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6064b9b4fd27Smrg ;; 6065b9b4fd27Smrg cxx*) 6066b9b4fd27Smrg # Digital/Compaq C++ 6067b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6068b9b4fd27Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6069b9b4fd27Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6070b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6071b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6072b9b4fd27Smrg ;; 6073b9b4fd27Smrg *) 6074b9b4fd27Smrg ;; 6075b9b4fd27Smrg esac 6076b9b4fd27Smrg ;; 6077b9b4fd27Smrg psos*) 6078b9b4fd27Smrg ;; 6079b9b4fd27Smrg solaris*) 6080b9b4fd27Smrg case $cc_basename in 6081b9b4fd27Smrg CC*) 6082b9b4fd27Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6083b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6084b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6085b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6086b9b4fd27Smrg ;; 6087b9b4fd27Smrg gcx*) 6088b9b4fd27Smrg # Green Hills C++ Compiler 6089b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6090b9b4fd27Smrg ;; 6091b9b4fd27Smrg *) 6092b9b4fd27Smrg ;; 6093b9b4fd27Smrg esac 6094b9b4fd27Smrg ;; 6095b9b4fd27Smrg sunos4*) 6096b9b4fd27Smrg case $cc_basename in 6097b9b4fd27Smrg CC*) 6098b9b4fd27Smrg # Sun C++ 4.x 6099b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6100b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6101b9b4fd27Smrg ;; 6102b9b4fd27Smrg lcc*) 6103b9b4fd27Smrg # Lucid 6104b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6105b9b4fd27Smrg ;; 6106b9b4fd27Smrg *) 6107b9b4fd27Smrg ;; 6108b9b4fd27Smrg esac 6109b9b4fd27Smrg ;; 6110b9b4fd27Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6111b9b4fd27Smrg case $cc_basename in 6112b9b4fd27Smrg CC*) 6113b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6114b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6115b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6116b9b4fd27Smrg ;; 6117b9b4fd27Smrg esac 6118b9b4fd27Smrg ;; 6119b9b4fd27Smrg tandem*) 6120b9b4fd27Smrg case $cc_basename in 6121b9b4fd27Smrg NCC*) 6122b9b4fd27Smrg # NonStop-UX NCC 3.20 6123b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6124b9b4fd27Smrg ;; 6125b9b4fd27Smrg *) 6126b9b4fd27Smrg ;; 6127b9b4fd27Smrg esac 6128b9b4fd27Smrg ;; 6129b9b4fd27Smrg vxworks*) 6130b9b4fd27Smrg ;; 6131b9b4fd27Smrg *) 6132b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6133b9b4fd27Smrg ;; 6134b9b4fd27Smrg esac 6135b9b4fd27Smrg fi 6136b9b4fd27Smrg], 6137b9b4fd27Smrg[ 6138b9b4fd27Smrg if test "$GCC" = yes; then 6139b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6140b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6141caade7ccSmrg 6142b9b4fd27Smrg case $host_os in 6143b9b4fd27Smrg aix*) 6144b9b4fd27Smrg # All AIX code is PIC. 6145b9b4fd27Smrg if test "$host_cpu" = ia64; then 6146b9b4fd27Smrg # AIX 5 now supports IA64 processor 6147b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6148b9b4fd27Smrg fi 6149b9b4fd27Smrg ;; 6150caade7ccSmrg 6151b9b4fd27Smrg amigaos*) 6152b9b4fd27Smrg case $host_cpu in 6153b9b4fd27Smrg powerpc) 6154b9b4fd27Smrg # see comment about AmigaOS4 .so support 6155b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6156b9b4fd27Smrg ;; 6157b9b4fd27Smrg m68k) 6158b9b4fd27Smrg # FIXME: we need at least 68020 code to build shared libraries, but 6159b9b4fd27Smrg # adding the `-m68020' flag to GCC prevents building anything better, 6160b9b4fd27Smrg # like `-m68040'. 6161b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6162b9b4fd27Smrg ;; 6163b9b4fd27Smrg esac 6164b9b4fd27Smrg ;; 6165caade7ccSmrg 6166b9b4fd27Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6167b9b4fd27Smrg # PIC is the default for these OSes. 6168b9b4fd27Smrg ;; 6169caade7ccSmrg 6170b9b4fd27Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6171b9b4fd27Smrg # This hack is so that the source file can tell whether it is being 6172b9b4fd27Smrg # built for inclusion in a dll (and should export symbols for example). 6173b9b4fd27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6174b9b4fd27Smrg # (--disable-auto-import) libraries 6175b9b4fd27Smrg m4_if([$1], [GCJ], [], 6176b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6177b9b4fd27Smrg ;; 6178caade7ccSmrg 6179b9b4fd27Smrg darwin* | rhapsody*) 6180b9b4fd27Smrg # PIC is the default on this platform 6181b9b4fd27Smrg # Common symbols not allowed in MH_DYLIB files 6182b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6183b9b4fd27Smrg ;; 6184caade7ccSmrg 6185b9b4fd27Smrg hpux*) 6186b9b4fd27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6187b9b4fd27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6188b9b4fd27Smrg # sets the default TLS model and affects inlining. 6189b9b4fd27Smrg case $host_cpu in 6190b9b4fd27Smrg hppa*64*) 6191b9b4fd27Smrg # +Z the default 6192b9b4fd27Smrg ;; 6193b9b4fd27Smrg *) 6194b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6195b9b4fd27Smrg ;; 6196b9b4fd27Smrg esac 6197b9b4fd27Smrg ;; 6198caade7ccSmrg 6199b9b4fd27Smrg interix[[3-9]]*) 6200b9b4fd27Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6201b9b4fd27Smrg # Instead, we relocate shared libraries at runtime. 6202b9b4fd27Smrg ;; 6203caade7ccSmrg 6204b9b4fd27Smrg msdosdjgpp*) 6205b9b4fd27Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 6206b9b4fd27Smrg # on systems that don't support them. 6207b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6208b9b4fd27Smrg enable_shared=no 6209b9b4fd27Smrg ;; 6210caade7ccSmrg 6211b9b4fd27Smrg *nto* | *qnx*) 6212b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6213b9b4fd27Smrg # it will coredump. 6214b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6215b9b4fd27Smrg ;; 6216caade7ccSmrg 6217b9b4fd27Smrg sysv4*MP*) 6218b9b4fd27Smrg if test -d /usr/nec; then 6219b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6220b9b4fd27Smrg fi 6221b9b4fd27Smrg ;; 6222caade7ccSmrg 6223b9b4fd27Smrg *) 6224b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6225b9b4fd27Smrg ;; 6226b9b4fd27Smrg esac 6227b9b4fd27Smrg else 6228b9b4fd27Smrg # PORTME Check for flag to pass linker flags through the system compiler. 6229b9b4fd27Smrg case $host_os in 6230b9b4fd27Smrg aix*) 6231b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6232b9b4fd27Smrg if test "$host_cpu" = ia64; then 6233b9b4fd27Smrg # AIX 5 now supports IA64 processor 6234b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6235b9b4fd27Smrg else 6236b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6237b9b4fd27Smrg fi 6238b9b4fd27Smrg ;; 6239caade7ccSmrg 6240b9b4fd27Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6241b9b4fd27Smrg # This hack is so that the source file can tell whether it is being 6242b9b4fd27Smrg # built for inclusion in a dll (and should export symbols for example). 6243b9b4fd27Smrg m4_if([$1], [GCJ], [], 6244b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6245b9b4fd27Smrg ;; 6246caade7ccSmrg 6247b9b4fd27Smrg hpux9* | hpux10* | hpux11*) 6248b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6249b9b4fd27Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6250b9b4fd27Smrg # not for PA HP-UX. 6251b9b4fd27Smrg case $host_cpu in 6252b9b4fd27Smrg hppa*64*|ia64*) 6253b9b4fd27Smrg # +Z the default 6254b9b4fd27Smrg ;; 6255b9b4fd27Smrg *) 6256b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6257b9b4fd27Smrg ;; 6258b9b4fd27Smrg esac 6259b9b4fd27Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 6260b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6261b9b4fd27Smrg ;; 6262caade7ccSmrg 6263b9b4fd27Smrg irix5* | irix6* | nonstopux*) 6264b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6265b9b4fd27Smrg # PIC (with -KPIC) is the default. 6266b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6267b9b4fd27Smrg ;; 6268caade7ccSmrg 6269b9b4fd27Smrg linux* | k*bsd*-gnu) 6270b9b4fd27Smrg case $cc_basename in 6271b9b4fd27Smrg # old Intel for x86_64 which still supported -KPIC. 6272b9b4fd27Smrg ecc*) 6273b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6274b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6275b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6276b9b4fd27Smrg ;; 6277b9b4fd27Smrg # icc used to be incompatible with GCC. 6278b9b4fd27Smrg # ICC 10 doesn't accept -KPIC any more. 6279b9b4fd27Smrg icc* | ifort*) 6280b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6281b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6282b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6283b9b4fd27Smrg ;; 6284b9b4fd27Smrg # Lahey Fortran 8.1. 6285b9b4fd27Smrg lf95*) 6286b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6287b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 6288b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 6289b9b4fd27Smrg ;; 6290b9b4fd27Smrg pgcc* | pgf77* | pgf90* | pgf95*) 6291b9b4fd27Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 6292b9b4fd27Smrg # which looks to be a dead project) 6293b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6294b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6295b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6296b9b4fd27Smrg ;; 6297b9b4fd27Smrg ccc*) 6298b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6299b9b4fd27Smrg # All Alpha code is PIC. 6300b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6301b9b4fd27Smrg ;; 6302b9b4fd27Smrg xl*) 6303b9b4fd27Smrg # IBM XL C 8.0/Fortran 10.1 on PPC 6304b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6305b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6306b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6307b9b4fd27Smrg ;; 6308b9b4fd27Smrg *) 6309b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 6310b9b4fd27Smrg *Sun\ C*) 6311b9b4fd27Smrg # Sun C 5.9 6312b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6313b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6314b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6315b9b4fd27Smrg ;; 6316b9b4fd27Smrg *Sun\ F*) 6317b9b4fd27Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 6318b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6319b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6320b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 6321b9b4fd27Smrg ;; 6322b9b4fd27Smrg esac 6323b9b4fd27Smrg ;; 6324b9b4fd27Smrg esac 6325b9b4fd27Smrg ;; 6326caade7ccSmrg 6327b9b4fd27Smrg newsos6) 6328b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6329b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6330b9b4fd27Smrg ;; 6331caade7ccSmrg 6332b9b4fd27Smrg *nto* | *qnx*) 6333b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6334b9b4fd27Smrg # it will coredump. 6335b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6336b9b4fd27Smrg ;; 6337caade7ccSmrg 6338b9b4fd27Smrg osf3* | osf4* | osf5*) 6339b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6340b9b4fd27Smrg # All OSF/1 code is PIC. 6341b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6342b9b4fd27Smrg ;; 6343caade7ccSmrg 6344b9b4fd27Smrg rdos*) 6345b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6346b9b4fd27Smrg ;; 6347caade7ccSmrg 6348b9b4fd27Smrg solaris*) 6349b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6350b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6351b9b4fd27Smrg case $cc_basename in 6352b9b4fd27Smrg f77* | f90* | f95*) 6353b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6354b9b4fd27Smrg *) 6355b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6356b9b4fd27Smrg esac 6357b9b4fd27Smrg ;; 6358caade7ccSmrg 6359b9b4fd27Smrg sunos4*) 6360b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6361b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6362b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6363b9b4fd27Smrg ;; 6364caade7ccSmrg 6365b9b4fd27Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 6366b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6367b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6368b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6369b9b4fd27Smrg ;; 6370caade7ccSmrg 6371b9b4fd27Smrg sysv4*MP*) 6372b9b4fd27Smrg if test -d /usr/nec ;then 6373b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6374b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6375b9b4fd27Smrg fi 6376b9b4fd27Smrg ;; 6377caade7ccSmrg 6378b9b4fd27Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6379b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6380b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6381b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6382b9b4fd27Smrg ;; 6383caade7ccSmrg 6384b9b4fd27Smrg unicos*) 6385b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6386b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6387b9b4fd27Smrg ;; 6388caade7ccSmrg 6389b9b4fd27Smrg uts4*) 6390b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6391b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6392b9b4fd27Smrg ;; 6393caade7ccSmrg 6394b9b4fd27Smrg *) 6395b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6396b9b4fd27Smrg ;; 6397b9b4fd27Smrg esac 6398b9b4fd27Smrg fi 6399b9b4fd27Smrg]) 6400b9b4fd27Smrgcase $host_os in 6401b9b4fd27Smrg # For platforms which do not support PIC, -DPIC is meaningless: 6402b9b4fd27Smrg *djgpp*) 6403b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6404b9b4fd27Smrg ;; 6405b9b4fd27Smrg *) 6406b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 6407b9b4fd27Smrg ;; 6408b9b4fd27Smrgesac 6409b9b4fd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 6410b9b4fd27Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 6411b9b4fd27Smrg [How to pass a linker flag through the compiler]) 6412caade7ccSmrg 6413b9b4fd27Smrg# 6414b9b4fd27Smrg# Check to make sure the PIC flag actually works. 6415b9b4fd27Smrg# 6416b9b4fd27Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 6417b9b4fd27Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 6418b9b4fd27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 6419b9b4fd27Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 6420b9b4fd27Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 6421b9b4fd27Smrg "" | " "*) ;; 6422b9b4fd27Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6423b9b4fd27Smrg esac], 6424b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6425b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 6426b9b4fd27Smrgfi 6427b9b4fd27Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 6428b9b4fd27Smrg [Additional compiler flags for building library objects]) 6429caade7ccSmrg 6430b9b4fd27Smrg# 6431b9b4fd27Smrg# Check to make sure the static flag actually works. 6432b9b4fd27Smrg# 6433b9b4fd27Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 6434b9b4fd27Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 6435b9b4fd27Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 6436b9b4fd27Smrg $lt_tmp_static_flag, 6437b9b4fd27Smrg [], 6438b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 6439b9b4fd27Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 6440b9b4fd27Smrg [Compiler flag to prevent dynamic linking]) 6441b9b4fd27Smrg])# _LT_COMPILER_PIC 6442caade7ccSmrg 6443caade7ccSmrg 6444b9b4fd27Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 6445b9b4fd27Smrg# ---------------------------- 6446b9b4fd27Smrg# See if the linker supports building shared libraries. 6447b9b4fd27Smrgm4_defun([_LT_LINKER_SHLIBS], 6448b9b4fd27Smrg[AC_REQUIRE([LT_PATH_LD])dnl 6449b9b4fd27SmrgAC_REQUIRE([LT_PATH_NM])dnl 6450b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6451b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 6452b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 6453b9b4fd27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 6454b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl 6455b9b4fd27SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6456b9b4fd27Smrgm4_if([$1], [CXX], [ 6457b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6458b9b4fd27Smrg case $host_os in 6459b9b4fd27Smrg aix[[4-9]]*) 6460b9b4fd27Smrg # If we're using GNU nm, then we don't want the "-C" option. 6461b9b4fd27Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6462b9b4fd27Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6463b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 6464b9b4fd27Smrg else 6465b9b4fd27Smrg _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' 6466b9b4fd27Smrg fi 6467b9b4fd27Smrg ;; 6468b9b4fd27Smrg pw32*) 6469b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 6470b9b4fd27Smrg ;; 6471b9b4fd27Smrg cygwin* | mingw* | cegcc*) 6472b9b4fd27Smrg _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' 6473b9b4fd27Smrg ;; 6474b9b4fd27Smrg *) 6475b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6476b9b4fd27Smrg ;; 6477b9b4fd27Smrg esac 6478b9b4fd27Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6479b9b4fd27Smrg], [ 6480b9b4fd27Smrg runpath_var= 6481b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6482b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6483b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)= 6484b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 6485b9b4fd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 6486b9b4fd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6487b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6488b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6489b9b4fd27Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 6490b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6491b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6492b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6493b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6494b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6495b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 6496b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6497b9b4fd27Smrg _LT_TAGVAR(inherit_rpath, $1)=no 6498b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 6499b9b4fd27Smrg _LT_TAGVAR(module_cmds, $1)= 6500b9b4fd27Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 6501b9b4fd27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 6502b9b4fd27Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6503b9b4fd27Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 6504b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6505b9b4fd27Smrg # include_expsyms should be a list of space-separated symbols to be *always* 6506b9b4fd27Smrg # included in the symbol list 6507b9b4fd27Smrg _LT_TAGVAR(include_expsyms, $1)= 6508b9b4fd27Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 6509b9b4fd27Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 6510b9b4fd27Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6511b9b4fd27Smrg # as well as any symbol that contains `d'. 6512b9b4fd27Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6513b9b4fd27Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6514b9b4fd27Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 6515b9b4fd27Smrg # the symbol is explicitly referenced. Since portable code cannot 6516b9b4fd27Smrg # rely on this symbol name, it's probably fine to never include it in 6517b9b4fd27Smrg # preloaded symbol tables. 6518b9b4fd27Smrg # Exclude shared library initialization/finalization symbols. 6519b9b4fd27Smrgdnl Note also adjust exclude_expsyms for C++ above. 6520b9b4fd27Smrg extract_expsyms_cmds= 6521caade7ccSmrg 6522b9b4fd27Smrg case $host_os in 6523b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 6524b9b4fd27Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 6525b9b4fd27Smrg # When not using gcc, we currently assume that we are using 6526b9b4fd27Smrg # Microsoft Visual C++. 6527b9b4fd27Smrg if test "$GCC" != yes; then 6528b9b4fd27Smrg with_gnu_ld=no 6529b9b4fd27Smrg fi 6530b9b4fd27Smrg ;; 6531b9b4fd27Smrg interix*) 6532b9b4fd27Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 6533b9b4fd27Smrg with_gnu_ld=yes 6534b9b4fd27Smrg ;; 6535b9b4fd27Smrg openbsd*) 6536b9b4fd27Smrg with_gnu_ld=no 6537b9b4fd27Smrg ;; 6538b9b4fd27Smrg esac 6539caade7ccSmrg 6540b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6541b9b4fd27Smrg if test "$with_gnu_ld" = yes; then 6542b9b4fd27Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6543b9b4fd27Smrg wlarc='${wl}' 6544caade7ccSmrg 6545b9b4fd27Smrg # Set some defaults for GNU ld with shared library support. These 6546b9b4fd27Smrg # are reset later if shared libraries are not supported. Putting them 6547b9b4fd27Smrg # here allows them to be overridden if necessary. 6548b9b4fd27Smrg runpath_var=LD_RUN_PATH 6549b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6550b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6551b9b4fd27Smrg # ancient GNU ld didn't support --whole-archive et. al. 6552b9b4fd27Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 6553b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6554b9b4fd27Smrg else 6555b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6556b9b4fd27Smrg fi 6557b9b4fd27Smrg supports_anon_versioning=no 6558b9b4fd27Smrg case `$LD -v 2>&1` in 6559b9b4fd27Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6560b9b4fd27Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6561b9b4fd27Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6562b9b4fd27Smrg *\ 2.11.*) ;; # other 2.11 versions 6563b9b4fd27Smrg *) supports_anon_versioning=yes ;; 6564b9b4fd27Smrg esac 6565caade7ccSmrg 6566b9b4fd27Smrg # See if GNU ld supports shared libraries. 6567b9b4fd27Smrg case $host_os in 6568b9b4fd27Smrg aix[[3-9]]*) 6569b9b4fd27Smrg # On AIX/PPC, the GNU linker is very broken 6570b9b4fd27Smrg if test "$host_cpu" != ia64; then 6571b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6572b9b4fd27Smrg cat <<_LT_EOF 1>&2 6573caade7ccSmrg 6574b9b4fd27Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 6575b9b4fd27Smrg*** to be unable to reliably create shared libraries on AIX. 6576b9b4fd27Smrg*** Therefore, libtool is disabling shared libraries support. If you 6577b9b4fd27Smrg*** really care for shared libraries, you may want to modify your PATH 6578b9b4fd27Smrg*** so that a non-GNU linker is found, and then restart. 6579caade7ccSmrg 6580b9b4fd27Smrg_LT_EOF 6581b9b4fd27Smrg fi 6582b9b4fd27Smrg ;; 6583caade7ccSmrg 6584b9b4fd27Smrg amigaos*) 6585b9b4fd27Smrg case $host_cpu in 6586b9b4fd27Smrg powerpc) 6587b9b4fd27Smrg # see comment about AmigaOS4 .so support 6588b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6589b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6590b9b4fd27Smrg ;; 6591b9b4fd27Smrg m68k) 6592b9b4fd27Smrg _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)' 6593b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6594b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6595b9b4fd27Smrg ;; 6596b9b4fd27Smrg esac 6597b9b4fd27Smrg ;; 6598caade7ccSmrg 6599b9b4fd27Smrg beos*) 6600b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6601b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6602b9b4fd27Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6603b9b4fd27Smrg # support --undefined. This deserves some investigation. FIXME 6604b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6605b9b4fd27Smrg else 6606b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6607b9b4fd27Smrg fi 6608b9b4fd27Smrg ;; 6609caade7ccSmrg 6610b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 6611b9b4fd27Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6612b9b4fd27Smrg # as there is no search path for DLLs. 6613b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6614b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6615b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6616b9b4fd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6617b9b4fd27Smrg _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' 6618b9b4fd27Smrg 6619b9b4fd27Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6620b9b4fd27Smrg _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' 6621b9b4fd27Smrg # If the export-symbols file already is a .def file (1st line 6622b9b4fd27Smrg # is EXPORTS), use it as is; otherwise, prepend... 6623b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6624b9b4fd27Smrg cp $export_symbols $output_objdir/$soname.def; 6625b9b4fd27Smrg else 6626b9b4fd27Smrg echo EXPORTS > $output_objdir/$soname.def; 6627b9b4fd27Smrg cat $export_symbols >> $output_objdir/$soname.def; 6628b9b4fd27Smrg fi~ 6629b9b4fd27Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6630b9b4fd27Smrg else 6631b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6632b9b4fd27Smrg fi 6633b9b4fd27Smrg ;; 6634caade7ccSmrg 6635b9b4fd27Smrg interix[[3-9]]*) 6636b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6637b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6638b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6639b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6640b9b4fd27Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6641b9b4fd27Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6642b9b4fd27Smrg # default) and relocated if they conflict, which is a slow very memory 6643b9b4fd27Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6644b9b4fd27Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6645b9b4fd27Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6646b9b4fd27Smrg _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' 6647b9b4fd27Smrg _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' 6648b9b4fd27Smrg ;; 6649caade7ccSmrg 6650b9b4fd27Smrg gnu* | linux* | tpf* | k*bsd*-gnu) 6651b9b4fd27Smrg tmp_diet=no 6652b9b4fd27Smrg if test "$host_os" = linux-dietlibc; then 6653b9b4fd27Smrg case $cc_basename in 6654b9b4fd27Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 6655b9b4fd27Smrg esac 6656b9b4fd27Smrg fi 6657b9b4fd27Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 6658b9b4fd27Smrg && test "$tmp_diet" = no 6659b9b4fd27Smrg then 6660b9b4fd27Smrg tmp_addflag= 6661b9b4fd27Smrg tmp_sharedflag='-shared' 6662b9b4fd27Smrg case $cc_basename,$host_cpu in 6663b9b4fd27Smrg pgcc*) # Portland Group C compiler 6664b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 6665b9b4fd27Smrg tmp_addflag=' $pic_flag' 6666b9b4fd27Smrg ;; 6667b9b4fd27Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 6668b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 6669b9b4fd27Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 6670b9b4fd27Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6671b9b4fd27Smrg tmp_addflag=' -i_dynamic' ;; 6672b9b4fd27Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6673b9b4fd27Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 6674b9b4fd27Smrg ifc* | ifort*) # Intel Fortran compiler 6675b9b4fd27Smrg tmp_addflag=' -nofor_main' ;; 6676b9b4fd27Smrg lf95*) # Lahey Fortran 8.1 6677b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6678b9b4fd27Smrg tmp_sharedflag='--shared' ;; 6679b9b4fd27Smrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 6680b9b4fd27Smrg tmp_sharedflag='-qmkshrobj' 6681b9b4fd27Smrg tmp_addflag= ;; 6682b9b4fd27Smrg esac 6683b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 6684b9b4fd27Smrg *Sun\ C*) # Sun C 5.9 6685b9b4fd27Smrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 6686b9b4fd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6687b9b4fd27Smrg tmp_sharedflag='-G' ;; 6688b9b4fd27Smrg *Sun\ F*) # Sun Fortran 8.3 6689b9b4fd27Smrg tmp_sharedflag='-G' ;; 6690b9b4fd27Smrg esac 6691b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6692caade7ccSmrg 6693b9b4fd27Smrg if test "x$supports_anon_versioning" = xyes; then 6694b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6695b9b4fd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6696b9b4fd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6697b9b4fd27Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6698b9b4fd27Smrg fi 6699caade7ccSmrg 6700b9b4fd27Smrg case $cc_basename in 6701b9b4fd27Smrg xlf*) 6702b9b4fd27Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 6703b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 6704b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6705b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6706b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 6707b9b4fd27Smrg if test "x$supports_anon_versioning" = xyes; then 6708b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6709b9b4fd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6710b9b4fd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6711b9b4fd27Smrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 6712b9b4fd27Smrg fi 6713b9b4fd27Smrg ;; 6714b9b4fd27Smrg esac 6715b9b4fd27Smrg else 6716b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6717b9b4fd27Smrg fi 6718b9b4fd27Smrg ;; 6719caade7ccSmrg 6720b9b4fd27Smrg netbsd*) 6721b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6722b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6723b9b4fd27Smrg wlarc= 6724b9b4fd27Smrg else 6725b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6726b9b4fd27Smrg _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' 6727b9b4fd27Smrg fi 6728b9b4fd27Smrg ;; 6729caade7ccSmrg 6730b9b4fd27Smrg solaris*) 6731b9b4fd27Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 6732b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6733b9b4fd27Smrg cat <<_LT_EOF 1>&2 6734caade7ccSmrg 6735b9b4fd27Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6736b9b4fd27Smrg*** create shared libraries on Solaris systems. Therefore, libtool 6737b9b4fd27Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 6738b9b4fd27Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 6739b9b4fd27Smrg*** your PATH or compiler configuration so that the native linker is 6740b9b4fd27Smrg*** used, and then restart. 6741caade7ccSmrg 6742b9b4fd27Smrg_LT_EOF 6743b9b4fd27Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6744b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6745b9b4fd27Smrg _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' 6746b9b4fd27Smrg else 6747b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6748b9b4fd27Smrg fi 6749b9b4fd27Smrg ;; 6750caade7ccSmrg 6751b9b4fd27Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 6752b9b4fd27Smrg case `$LD -v 2>&1` in 6753b9b4fd27Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 6754b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6755b9b4fd27Smrg cat <<_LT_EOF 1>&2 6756caade7ccSmrg 6757b9b4fd27Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 6758b9b4fd27Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 6759b9b4fd27Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 6760b9b4fd27Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 6761b9b4fd27Smrg*** your PATH or compiler configuration so that the native linker is 6762b9b4fd27Smrg*** used, and then restart. 6763caade7ccSmrg 6764b9b4fd27Smrg_LT_EOF 6765b9b4fd27Smrg ;; 6766b9b4fd27Smrg *) 6767b9b4fd27Smrg # For security reasons, it is highly recommended that you always 6768b9b4fd27Smrg # use absolute paths for naming shared libraries, and exclude the 6769b9b4fd27Smrg # DT_RUNPATH tag from executables and libraries. But doing so 6770b9b4fd27Smrg # requires that you compile everything twice, which is a pain. 6771b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6772b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6773b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6774b9b4fd27Smrg _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' 6775b9b4fd27Smrg else 6776b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6777b9b4fd27Smrg fi 6778b9b4fd27Smrg ;; 6779b9b4fd27Smrg esac 6780b9b4fd27Smrg ;; 6781caade7ccSmrg 6782b9b4fd27Smrg sunos4*) 6783b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6784b9b4fd27Smrg wlarc= 6785b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6786b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6787b9b4fd27Smrg ;; 6788caade7ccSmrg 6789b9b4fd27Smrg *) 6790b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6791b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6792b9b4fd27Smrg _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' 6793b9b4fd27Smrg else 6794b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6795b9b4fd27Smrg fi 6796b9b4fd27Smrg ;; 6797b9b4fd27Smrg esac 6798caade7ccSmrg 6799b9b4fd27Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6800b9b4fd27Smrg runpath_var= 6801b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6802b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6803b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6804b9b4fd27Smrg fi 6805b9b4fd27Smrg else 6806b9b4fd27Smrg # PORTME fill in a description of your system's linker (not GNU ld) 6807b9b4fd27Smrg case $host_os in 6808b9b4fd27Smrg aix3*) 6809b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6810b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6811b9b4fd27Smrg _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' 6812b9b4fd27Smrg # Note: this linker hardcodes the directories in LIBPATH if there 6813b9b4fd27Smrg # are no directories specified by -L. 6814b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6815b9b4fd27Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6816b9b4fd27Smrg # Neither direct hardcoding nor static linking is supported with a 6817b9b4fd27Smrg # broken collect2. 6818b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6819b9b4fd27Smrg fi 6820b9b4fd27Smrg ;; 6821caade7ccSmrg 6822b9b4fd27Smrg aix[[4-9]]*) 6823b9b4fd27Smrg if test "$host_cpu" = ia64; then 6824b9b4fd27Smrg # On IA64, the linker does run time linking by default, so we don't 6825b9b4fd27Smrg # have to do anything special. 6826b9b4fd27Smrg aix_use_runtimelinking=no 6827b9b4fd27Smrg exp_sym_flag='-Bexport' 6828b9b4fd27Smrg no_entry_flag="" 6829b9b4fd27Smrg else 6830b9b4fd27Smrg # If we're using GNU nm, then we don't want the "-C" option. 6831b9b4fd27Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6832b9b4fd27Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6833b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 6834b9b4fd27Smrg else 6835b9b4fd27Smrg _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' 6836b9b4fd27Smrg fi 6837b9b4fd27Smrg aix_use_runtimelinking=no 6838caade7ccSmrg 6839b9b4fd27Smrg # Test if we are trying to use run time linking or normal 6840b9b4fd27Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6841b9b4fd27Smrg # need to do runtime linking. 6842b9b4fd27Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6843b9b4fd27Smrg for ld_flag in $LDFLAGS; do 6844b9b4fd27Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6845b9b4fd27Smrg aix_use_runtimelinking=yes 6846b9b4fd27Smrg break 6847b9b4fd27Smrg fi 6848b9b4fd27Smrg done 6849b9b4fd27Smrg ;; 6850b9b4fd27Smrg esac 6851caade7ccSmrg 6852b9b4fd27Smrg exp_sym_flag='-bexport' 6853b9b4fd27Smrg no_entry_flag='-bnoentry' 6854b9b4fd27Smrg fi 6855caade7ccSmrg 6856b9b4fd27Smrg # When large executables or shared objects are built, AIX ld can 6857b9b4fd27Smrg # have problems creating the table of contents. If linking a library 6858b9b4fd27Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6859b9b4fd27Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6860b9b4fd27Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6861caade7ccSmrg 6862b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='' 6863b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6864b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6865b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6866b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6867b9b4fd27Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6868485f0483Smrg 6869b9b4fd27Smrg if test "$GCC" = yes; then 6870b9b4fd27Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6871b9b4fd27Smrg # We only want to do this on AIX 4.2 and lower, the check 6872b9b4fd27Smrg # below for broken collect2 doesn't work under 4.3+ 6873b9b4fd27Smrg collect2name=`${CC} -print-prog-name=collect2` 6874b9b4fd27Smrg if test -f "$collect2name" && 6875b9b4fd27Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6876b9b4fd27Smrg then 6877b9b4fd27Smrg # We have reworked collect2 6878b9b4fd27Smrg : 6879b9b4fd27Smrg else 6880b9b4fd27Smrg # We have old collect2 6881b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6882b9b4fd27Smrg # It fails to find uninstalled libraries when the uninstalled 6883b9b4fd27Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6884b9b4fd27Smrg # to unsupported forces relinking 6885b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6886b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6887b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6888b9b4fd27Smrg fi 6889b9b4fd27Smrg ;; 6890b9b4fd27Smrg esac 6891b9b4fd27Smrg shared_flag='-shared' 6892b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 6893b9b4fd27Smrg shared_flag="$shared_flag "'${wl}-G' 6894b9b4fd27Smrg fi 6895b9b4fd27Smrg else 6896b9b4fd27Smrg # not using gcc 6897b9b4fd27Smrg if test "$host_cpu" = ia64; then 6898b9b4fd27Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6899b9b4fd27Smrg # chokes on -Wl,-G. The following line is correct: 6900b9b4fd27Smrg shared_flag='-G' 6901b9b4fd27Smrg else 6902b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 6903b9b4fd27Smrg shared_flag='${wl}-G' 6904b9b4fd27Smrg else 6905b9b4fd27Smrg shared_flag='${wl}-bM:SRE' 6906b9b4fd27Smrg fi 6907b9b4fd27Smrg fi 6908b9b4fd27Smrg fi 6909caade7ccSmrg 6910b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6911b9b4fd27Smrg # It seems that -bexpall does not export symbols beginning with 6912b9b4fd27Smrg # underscore (_), so it is better to generate a list of symbols to export. 6913b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6914b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 6915b9b4fd27Smrg # Warning - without using the other runtime loading flags (-brtl), 6916b9b4fd27Smrg # -berok will link without error, but may produce a broken library. 6917b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6918b9b4fd27Smrg # Determine the default libpath from the value encoded in an 6919b9b4fd27Smrg # empty executable. 6920b9b4fd27Smrg _LT_SYS_MODULE_PATH_AIX 6921b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6922b9b4fd27Smrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6923b9b4fd27Smrg else 6924b9b4fd27Smrg if test "$host_cpu" = ia64; then 6925b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6926b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6927b9b4fd27Smrg _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" 6928b9b4fd27Smrg else 6929b9b4fd27Smrg # Determine the default libpath from the value encoded in an 6930b9b4fd27Smrg # empty executable. 6931b9b4fd27Smrg _LT_SYS_MODULE_PATH_AIX 6932b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6933b9b4fd27Smrg # Warning - without using the other run time loading flags, 6934b9b4fd27Smrg # -berok will link without error, but may produce a broken library. 6935b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6936b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6937b9b4fd27Smrg # Exported symbols can be pulled into shared objects from archives 6938b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6939b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6940b9b4fd27Smrg # This is similar to how AIX traditionally builds its shared libraries. 6941b9b4fd27Smrg _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' 6942b9b4fd27Smrg fi 6943b9b4fd27Smrg fi 6944b9b4fd27Smrg ;; 6945caade7ccSmrg 6946b9b4fd27Smrg amigaos*) 6947b9b4fd27Smrg case $host_cpu in 6948b9b4fd27Smrg powerpc) 6949b9b4fd27Smrg # see comment about AmigaOS4 .so support 6950b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6951b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6952b9b4fd27Smrg ;; 6953b9b4fd27Smrg m68k) 6954b9b4fd27Smrg _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)' 6955b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6956b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6957b9b4fd27Smrg ;; 6958b9b4fd27Smrg esac 6959b9b4fd27Smrg ;; 6960caade7ccSmrg 6961b9b4fd27Smrg bsdi[[45]]*) 6962b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6963b9b4fd27Smrg ;; 6964caade7ccSmrg 6965b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 6966b9b4fd27Smrg # When not using gcc, we currently assume that we are using 6967b9b4fd27Smrg # Microsoft Visual C++. 6968b9b4fd27Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6969b9b4fd27Smrg # no search path for DLLs. 6970b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6971b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6972b9b4fd27Smrg # Tell ltmain to make .lib files, not .a files. 6973b9b4fd27Smrg libext=lib 6974b9b4fd27Smrg # Tell ltmain to make .dll files, not .so files. 6975b9b4fd27Smrg shrext_cmds=".dll" 6976b9b4fd27Smrg # FIXME: Setting linknames here is a bad hack. 6977b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6978b9b4fd27Smrg # The linker will automatically build a .lib file if we build a DLL. 6979b9b4fd27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6980b9b4fd27Smrg # FIXME: Should let the user specify the lib program. 6981b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6982b9b4fd27Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6983b9b4fd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6984b9b4fd27Smrg ;; 6985caade7ccSmrg 6986b9b4fd27Smrg darwin* | rhapsody*) 6987b9b4fd27Smrg _LT_DARWIN_LINKER_FEATURES($1) 6988b9b4fd27Smrg ;; 6989caade7ccSmrg 6990b9b4fd27Smrg dgux*) 6991b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6992b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6993b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6994b9b4fd27Smrg ;; 6995caade7ccSmrg 6996b9b4fd27Smrg freebsd1*) 6997b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6998b9b4fd27Smrg ;; 6999caade7ccSmrg 7000b9b4fd27Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7001b9b4fd27Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 7002b9b4fd27Smrg # does not break anything, and helps significantly (at the cost of a little 7003b9b4fd27Smrg # extra space). 7004b9b4fd27Smrg freebsd2.2*) 7005b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7006b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7007b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7008b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7009b9b4fd27Smrg ;; 7010caade7ccSmrg 7011b9b4fd27Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7012b9b4fd27Smrg freebsd2*) 7013b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7014b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7015b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7016b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7017b9b4fd27Smrg ;; 7018caade7ccSmrg 7019b9b4fd27Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7020b9b4fd27Smrg freebsd* | dragonfly*) 7021b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7022b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7023b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7024b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7025b9b4fd27Smrg ;; 7026caade7ccSmrg 7027b9b4fd27Smrg hpux9*) 7028b9b4fd27Smrg if test "$GCC" = yes; then 7029b9b4fd27Smrg _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' 7030b9b4fd27Smrg else 7031b9b4fd27Smrg _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' 7032b9b4fd27Smrg fi 7033b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7034b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7035b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7036caade7ccSmrg 7037b9b4fd27Smrg # hardcode_minus_L: Not really in the search PATH, 7038b9b4fd27Smrg # but as the default location of the library. 7039b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7040b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7041b9b4fd27Smrg ;; 7042caade7ccSmrg 7043b9b4fd27Smrg hpux10*) 7044b9b4fd27Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7045b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7046b9b4fd27Smrg else 7047b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7048b9b4fd27Smrg fi 7049b9b4fd27Smrg if test "$with_gnu_ld" = no; then 7050b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7051b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7052b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7053b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7054b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7055b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7056b9b4fd27Smrg # hardcode_minus_L: Not really in the search PATH, 7057b9b4fd27Smrg # but as the default location of the library. 7058b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7059b9b4fd27Smrg fi 7060b9b4fd27Smrg ;; 7061caade7ccSmrg 7062b9b4fd27Smrg hpux11*) 7063b9b4fd27Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 7064b9b4fd27Smrg case $host_cpu in 7065b9b4fd27Smrg hppa*64*) 7066b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7067b9b4fd27Smrg ;; 7068b9b4fd27Smrg ia64*) 7069b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7070b9b4fd27Smrg ;; 7071b9b4fd27Smrg *) 7072b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7073b9b4fd27Smrg ;; 7074b9b4fd27Smrg esac 7075b9b4fd27Smrg else 7076b9b4fd27Smrg case $host_cpu in 7077b9b4fd27Smrg hppa*64*) 7078b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7079b9b4fd27Smrg ;; 7080b9b4fd27Smrg ia64*) 7081b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7082b9b4fd27Smrg ;; 7083b9b4fd27Smrg *) 7084b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7085b9b4fd27Smrg ;; 7086b9b4fd27Smrg esac 7087b9b4fd27Smrg fi 7088b9b4fd27Smrg if test "$with_gnu_ld" = no; then 7089b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7090b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7091caade7ccSmrg 7092b9b4fd27Smrg case $host_cpu in 7093b9b4fd27Smrg hppa*64*|ia64*) 7094b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7095b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7096b9b4fd27Smrg ;; 7097b9b4fd27Smrg *) 7098b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7099b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7100b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7101caade7ccSmrg 7102b9b4fd27Smrg # hardcode_minus_L: Not really in the search PATH, 7103b9b4fd27Smrg # but as the default location of the library. 7104b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7105b9b4fd27Smrg ;; 7106b9b4fd27Smrg esac 7107b9b4fd27Smrg fi 7108b9b4fd27Smrg ;; 7109caade7ccSmrg 7110b9b4fd27Smrg irix5* | irix6* | nonstopux*) 7111b9b4fd27Smrg if test "$GCC" = yes; then 7112b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7113b9b4fd27Smrg # Try to use the -exported_symbol ld option, if it does not 7114b9b4fd27Smrg # work, assume that -exports_file does not work either and 7115b9b4fd27Smrg # implicitly export all symbols. 7116b9b4fd27Smrg save_LDFLAGS="$LDFLAGS" 7117b9b4fd27Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 7118b9b4fd27Smrg AC_LINK_IFELSE(int foo(void) {}, 7119b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 7120b9b4fd27Smrg ) 7121b9b4fd27Smrg LDFLAGS="$save_LDFLAGS" 7122b9b4fd27Smrg else 7123b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 7124b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 7125b9b4fd27Smrg fi 7126b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7127b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7128b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7129b9b4fd27Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 7130b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7131b9b4fd27Smrg ;; 7132caade7ccSmrg 7133b9b4fd27Smrg netbsd*) 7134b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7135b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7136b9b4fd27Smrg else 7137b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7138b9b4fd27Smrg fi 7139b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7140b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7141b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7142b9b4fd27Smrg ;; 7143caade7ccSmrg 7144b9b4fd27Smrg newsos6) 7145b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7146b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7147b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7148b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7149b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7150b9b4fd27Smrg ;; 7151caade7ccSmrg 7152b9b4fd27Smrg *nto* | *qnx*) 7153b9b4fd27Smrg ;; 7154caade7ccSmrg 7155b9b4fd27Smrg openbsd*) 7156b9b4fd27Smrg if test -f /usr/libexec/ld.so; then 7157b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7158b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7159b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7160b9b4fd27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7161b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7162b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7163b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7164b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7165b9b4fd27Smrg else 7166b9b4fd27Smrg case $host_os in 7167b9b4fd27Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7168b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7169b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7170b9b4fd27Smrg ;; 7171b9b4fd27Smrg *) 7172b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7173b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7174b9b4fd27Smrg ;; 7175b9b4fd27Smrg esac 7176b9b4fd27Smrg fi 7177b9b4fd27Smrg else 7178b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7179b9b4fd27Smrg fi 7180b9b4fd27Smrg ;; 7181caade7ccSmrg 7182b9b4fd27Smrg os2*) 7183b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7184b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7185b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7186b9b4fd27Smrg _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' 7187b9b4fd27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7188b9b4fd27Smrg ;; 7189caade7ccSmrg 7190b9b4fd27Smrg osf3*) 7191b9b4fd27Smrg if test "$GCC" = yes; then 7192b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7193b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7194b9b4fd27Smrg else 7195b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7196b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 7197b9b4fd27Smrg fi 7198b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7199b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7200b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7201b9b4fd27Smrg ;; 7202caade7ccSmrg 7203b9b4fd27Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 7204b9b4fd27Smrg if test "$GCC" = yes; then 7205b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7206b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7207b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7208b9b4fd27Smrg else 7209b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7210b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 7211b9b4fd27Smrg _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~ 7212b9b4fd27Smrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 7213caade7ccSmrg 7214b9b4fd27Smrg # Both c and cxx compiler support -rpath directly 7215b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7216b9b4fd27Smrg fi 7217b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7218b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7219b9b4fd27Smrg ;; 7220caade7ccSmrg 7221b9b4fd27Smrg solaris*) 7222b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 7223b9b4fd27Smrg if test "$GCC" = yes; then 7224b9b4fd27Smrg wlarc='${wl}' 7225b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7226b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7227b9b4fd27Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7228b9b4fd27Smrg else 7229b9b4fd27Smrg case `$CC -V 2>&1` in 7230b9b4fd27Smrg *"Compilers 5.0"*) 7231b9b4fd27Smrg wlarc='' 7232b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7233b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7234b9b4fd27Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 7235b9b4fd27Smrg ;; 7236b9b4fd27Smrg *) 7237b9b4fd27Smrg wlarc='${wl}' 7238b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 7239b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7240b9b4fd27Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7241b9b4fd27Smrg ;; 7242b9b4fd27Smrg esac 7243b9b4fd27Smrg fi 7244b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7245b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7246b9b4fd27Smrg case $host_os in 7247b9b4fd27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7248b9b4fd27Smrg *) 7249b9b4fd27Smrg # The compiler driver will combine and reorder linker options, 7250b9b4fd27Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 7251b9b4fd27Smrg # but is careful enough not to reorder. 7252b9b4fd27Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7253b9b4fd27Smrg if test "$GCC" = yes; then 7254b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7255b9b4fd27Smrg else 7256b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7257b9b4fd27Smrg fi 7258b9b4fd27Smrg ;; 7259b9b4fd27Smrg esac 7260b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7261b9b4fd27Smrg ;; 7262caade7ccSmrg 7263b9b4fd27Smrg sunos4*) 7264b9b4fd27Smrg if test "x$host_vendor" = xsequent; then 7265b9b4fd27Smrg # Use $CC to link under sequent, because it throws in some extra .o 7266b9b4fd27Smrg # files that make .init and .fini sections work. 7267b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7268b9b4fd27Smrg else 7269b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7270b9b4fd27Smrg fi 7271b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7272b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7273b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7274b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7275b9b4fd27Smrg ;; 7276caade7ccSmrg 7277b9b4fd27Smrg sysv4) 7278b9b4fd27Smrg case $host_vendor in 7279b9b4fd27Smrg sni) 7280b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7281b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7282b9b4fd27Smrg ;; 7283b9b4fd27Smrg siemens) 7284b9b4fd27Smrg ## LD is ld it makes a PLAMLIB 7285b9b4fd27Smrg ## CC just makes a GrossModule. 7286b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7287b9b4fd27Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7288b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7289b9b4fd27Smrg ;; 7290b9b4fd27Smrg motorola) 7291b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7292b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7293b9b4fd27Smrg ;; 7294b9b4fd27Smrg esac 7295b9b4fd27Smrg runpath_var='LD_RUN_PATH' 7296b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7297b9b4fd27Smrg ;; 7298caade7ccSmrg 7299b9b4fd27Smrg sysv4.3*) 7300b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7301b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7302b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 7303b9b4fd27Smrg ;; 7304caade7ccSmrg 7305b9b4fd27Smrg sysv4*MP*) 7306b9b4fd27Smrg if test -d /usr/nec; then 7307b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7308b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7309b9b4fd27Smrg runpath_var=LD_RUN_PATH 7310b9b4fd27Smrg hardcode_runpath_var=yes 7311b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7312b9b4fd27Smrg fi 7313b9b4fd27Smrg ;; 7314caade7ccSmrg 7315b9b4fd27Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7316b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7317b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7318b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7319b9b4fd27Smrg runpath_var='LD_RUN_PATH' 7320caade7ccSmrg 7321b9b4fd27Smrg if test "$GCC" = yes; then 7322b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7323b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7324b9b4fd27Smrg else 7325b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7326b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7327b9b4fd27Smrg fi 7328b9b4fd27Smrg ;; 7329caade7ccSmrg 7330b9b4fd27Smrg sysv5* | sco3.2v5* | sco5v6*) 7331b9b4fd27Smrg # Note: We can NOT use -z defs as we might desire, because we do not 7332b9b4fd27Smrg # link with -lc, and that would cause any symbols used from libc to 7333b9b4fd27Smrg # always be unresolved, which means just about no library would 7334b9b4fd27Smrg # ever link correctly. If we're not using GNU ld we use -z text 7335b9b4fd27Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7336b9b4fd27Smrg # as -z defs. 7337b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7338b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7339b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7340b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7341b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7342b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7343b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7344b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7345b9b4fd27Smrg runpath_var='LD_RUN_PATH' 7346caade7ccSmrg 7347b9b4fd27Smrg if test "$GCC" = yes; then 7348b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7350b9b4fd27Smrg else 7351b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7352b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7353b9b4fd27Smrg fi 7354b9b4fd27Smrg ;; 7355caade7ccSmrg 7356b9b4fd27Smrg uts4*) 7357b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7358b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7359b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7360b9b4fd27Smrg ;; 7361caade7ccSmrg 7362b9b4fd27Smrg *) 7363b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7364b9b4fd27Smrg ;; 7365b9b4fd27Smrg esac 7366caade7ccSmrg 7367b9b4fd27Smrg if test x$host_vendor = xsni; then 7368b9b4fd27Smrg case $host in 7369b9b4fd27Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 7370b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 7371b9b4fd27Smrg ;; 7372b9b4fd27Smrg esac 7373b9b4fd27Smrg fi 7374caade7ccSmrg fi 7375b9b4fd27Smrg]) 7376b9b4fd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7377b9b4fd27Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7378caade7ccSmrg 7379b9b4fd27Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 7380caade7ccSmrg 7381b9b4fd27Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 7382b9b4fd27Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 7383b9b4fd27Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 7384b9b4fd27Smrg [The commands to extract the exported symbol list from a shared archive]) 7385caade7ccSmrg 7386b9b4fd27Smrg# 7387b9b4fd27Smrg# Do we need to explicitly link libc? 7388b9b4fd27Smrg# 7389b9b4fd27Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 7390b9b4fd27Smrgx|xyes) 7391b9b4fd27Smrg # Assume -lc should be added 7392b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7393caade7ccSmrg 7394b9b4fd27Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 7395b9b4fd27Smrg case $_LT_TAGVAR(archive_cmds, $1) in 7396b9b4fd27Smrg *'~'*) 7397b9b4fd27Smrg # FIXME: we may have to deal with multi-command sequences. 7398b9b4fd27Smrg ;; 7399b9b4fd27Smrg '$CC '*) 7400b9b4fd27Smrg # Test whether the compiler implicitly links with -lc since on some 7401b9b4fd27Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 7402b9b4fd27Smrg # to ld, don't add -lc before -lgcc. 7403b9b4fd27Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 7404b9b4fd27Smrg $RM conftest* 7405b9b4fd27Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 7406caade7ccSmrg 7407b9b4fd27Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 7408b9b4fd27Smrg soname=conftest 7409b9b4fd27Smrg lib=conftest 7410b9b4fd27Smrg libobjs=conftest.$ac_objext 7411b9b4fd27Smrg deplibs= 7412b9b4fd27Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 7413b9b4fd27Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 7414b9b4fd27Smrg compiler_flags=-v 7415b9b4fd27Smrg linker_flags=-v 7416b9b4fd27Smrg verstring= 7417b9b4fd27Smrg output_objdir=. 7418b9b4fd27Smrg libname=conftest 7419b9b4fd27Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 7420b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 7421b9b4fd27Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 7422b9b4fd27Smrg then 7423b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7424b9b4fd27Smrg else 7425b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7426b9b4fd27Smrg fi 7427b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7428b9b4fd27Smrg else 7429b9b4fd27Smrg cat conftest.err 1>&5 7430b9b4fd27Smrg fi 7431b9b4fd27Smrg $RM conftest* 7432b9b4fd27Smrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 7433b9b4fd27Smrg ;; 7434b9b4fd27Smrg esac 7435caade7ccSmrg fi 7436caade7ccSmrg ;; 7437caade7ccSmrgesac 7438caade7ccSmrg 7439b9b4fd27Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 7440b9b4fd27Smrg [Whether or not to add -lc for building shared libraries]) 7441b9b4fd27Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 7442b9b4fd27Smrg [enable_shared_with_static_runtimes], [0], 7443b9b4fd27Smrg [Whether or not to disallow shared libs when runtime libs are static]) 7444b9b4fd27Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 7445b9b4fd27Smrg [Compiler flag to allow reflexive dlopens]) 7446b9b4fd27Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 7447b9b4fd27Smrg [Compiler flag to generate shared objects directly from archives]) 7448b9b4fd27Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 7449b9b4fd27Smrg [Whether the compiler copes with passing no objects directly]) 7450b9b4fd27Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 7451b9b4fd27Smrg [Create an old-style archive from a shared archive]) 7452b9b4fd27Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 7453b9b4fd27Smrg [Create a temporary old-style archive to link instead of a shared archive]) 7454b9b4fd27Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 7455b9b4fd27Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 7456b9b4fd27Smrg_LT_TAGDECL([], [module_cmds], [2], 7457b9b4fd27Smrg [Commands used to build a loadable module if different from building 7458b9b4fd27Smrg a shared archive.]) 7459b9b4fd27Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 7460b9b4fd27Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 7461b9b4fd27Smrg [Whether we are building with GNU ld or not]) 7462b9b4fd27Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 7463b9b4fd27Smrg [Flag that allows shared libraries with undefined symbols to be built]) 7464b9b4fd27Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 7465b9b4fd27Smrg [Flag that enforces no undefined symbols]) 7466b9b4fd27Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 7467b9b4fd27Smrg [Flag to hardcode $libdir into a binary during linking. 7468b9b4fd27Smrg This must work even if $libdir does not exist]) 7469b9b4fd27Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 7470b9b4fd27Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 7471b9b4fd27Smrg during linking. This must work even if $libdir does not exist]]) 7472b9b4fd27Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 7473b9b4fd27Smrg [Whether we need a single "-rpath" flag with a separated argument]) 7474b9b4fd27Smrg_LT_TAGDECL([], [hardcode_direct], [0], 7475b9b4fd27Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7476b9b4fd27Smrg DIR into the resulting binary]) 7477b9b4fd27Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 7478b9b4fd27Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7479b9b4fd27Smrg DIR into the resulting binary and the resulting library dependency is 7480b9b4fd27Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 7481b9b4fd27Smrg library is relocated]) 7482b9b4fd27Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 7483b9b4fd27Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 7484b9b4fd27Smrg into the resulting binary]) 7485b9b4fd27Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 7486b9b4fd27Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 7487b9b4fd27Smrg into the resulting binary]) 7488b9b4fd27Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 7489b9b4fd27Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 7490b9b4fd27Smrg into the library and all subsequent libraries and executables linked 7491b9b4fd27Smrg against it]) 7492b9b4fd27Smrg_LT_TAGDECL([], [inherit_rpath], [0], 7493b9b4fd27Smrg [Set to yes if linker adds runtime paths of dependent libraries 7494b9b4fd27Smrg to runtime path list]) 7495b9b4fd27Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 7496b9b4fd27Smrg [Whether libtool must link a program against all its dependency libraries]) 7497b9b4fd27Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 7498b9b4fd27Smrg [Fix the shell variable $srcfile for the compiler]) 7499b9b4fd27Smrg_LT_TAGDECL([], [always_export_symbols], [0], 7500b9b4fd27Smrg [Set to "yes" if exported symbols are required]) 7501b9b4fd27Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 7502b9b4fd27Smrg [The commands to list exported symbols]) 7503b9b4fd27Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 7504b9b4fd27Smrg [Symbols that should not be listed in the preloaded symbols]) 7505b9b4fd27Smrg_LT_TAGDECL([], [include_expsyms], [1], 7506b9b4fd27Smrg [Symbols that must always be exported]) 7507b9b4fd27Smrg_LT_TAGDECL([], [prelink_cmds], [2], 7508b9b4fd27Smrg [Commands necessary for linking programs (against libraries) with templates]) 7509b9b4fd27Smrg_LT_TAGDECL([], [file_list_spec], [1], 7510b9b4fd27Smrg [Specify filename containing input files]) 7511b9b4fd27Smrgdnl FIXME: Not yet implemented 7512b9b4fd27Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 7513b9b4fd27Smrgdnl [Compiler flag to generate thread safe objects]) 7514b9b4fd27Smrg])# _LT_LINKER_SHLIBS 7515b9b4fd27Smrg 7516b9b4fd27Smrg 7517b9b4fd27Smrg# _LT_LANG_C_CONFIG([TAG]) 7518b9b4fd27Smrg# ------------------------ 7519b9b4fd27Smrg# Ensure that the configuration variables for a C compiler are suitably 7520b9b4fd27Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 7521b9b4fd27Smrg# the compiler configuration to `libtool'. 7522b9b4fd27Smrgm4_defun([_LT_LANG_C_CONFIG], 7523b9b4fd27Smrg[m4_require([_LT_DECL_EGREP])dnl 7524b9b4fd27Smrglt_save_CC="$CC" 7525b9b4fd27SmrgAC_LANG_PUSH(C) 7526b9b4fd27Smrg 7527b9b4fd27Smrg# Source file extension for C test sources. 7528b9b4fd27Smrgac_ext=c 7529b9b4fd27Smrg 7530b9b4fd27Smrg# Object file extension for compiled C test sources. 7531b9b4fd27Smrgobjext=o 7532b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 7533caade7ccSmrg 7534b9b4fd27Smrg# Code to be used in simple compile tests 7535b9b4fd27Smrglt_simple_compile_test_code="int some_variable = 0;" 7536caade7ccSmrg 7537b9b4fd27Smrg# Code to be used in simple link tests 7538b9b4fd27Smrglt_simple_link_test_code='int main(){return(0);}' 7539caade7ccSmrg 7540b9b4fd27Smrg_LT_TAG_COMPILER 7541b9b4fd27Smrg# Save the default compiler, since it gets overwritten when the other 7542b9b4fd27Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 7543b9b4fd27Smrgcompiler_DEFAULT=$CC 7544caade7ccSmrg 7545b9b4fd27Smrg# save warnings/boilerplate of simple test code 7546b9b4fd27Smrg_LT_COMPILER_BOILERPLATE 7547b9b4fd27Smrg_LT_LINKER_BOILERPLATE 7548caade7ccSmrg 7549b9b4fd27Smrgif test -n "$compiler"; then 7550b9b4fd27Smrg _LT_COMPILER_NO_RTTI($1) 7551b9b4fd27Smrg _LT_COMPILER_PIC($1) 7552b9b4fd27Smrg _LT_COMPILER_C_O($1) 7553b9b4fd27Smrg _LT_COMPILER_FILE_LOCKS($1) 7554b9b4fd27Smrg _LT_LINKER_SHLIBS($1) 7555b9b4fd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 7556b9b4fd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7557b9b4fd27Smrg LT_SYS_DLOPEN_SELF 7558b9b4fd27Smrg _LT_CMD_STRIPLIB 7559b9b4fd27Smrg 7560b9b4fd27Smrg # Report which library types will actually be built 7561b9b4fd27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7562b9b4fd27Smrg AC_MSG_RESULT([$can_build_shared]) 7563b9b4fd27Smrg 7564b9b4fd27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7565b9b4fd27Smrg test "$can_build_shared" = "no" && enable_shared=no 7566b9b4fd27Smrg 7567b9b4fd27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7568b9b4fd27Smrg # are all built from PIC. 7569b9b4fd27Smrg case $host_os in 7570b9b4fd27Smrg aix3*) 7571b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 7572b9b4fd27Smrg if test -n "$RANLIB"; then 7573b9b4fd27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7574b9b4fd27Smrg postinstall_cmds='$RANLIB $lib' 7575b9b4fd27Smrg fi 7576b9b4fd27Smrg ;; 7577caade7ccSmrg 7578b9b4fd27Smrg aix[[4-9]]*) 7579b9b4fd27Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7580b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 7581b9b4fd27Smrg fi 7582b9b4fd27Smrg ;; 7583b9b4fd27Smrg esac 7584b9b4fd27Smrg AC_MSG_RESULT([$enable_shared]) 7585caade7ccSmrg 7586b9b4fd27Smrg AC_MSG_CHECKING([whether to build static libraries]) 7587b9b4fd27Smrg # Make sure either enable_shared or enable_static is yes. 7588b9b4fd27Smrg test "$enable_shared" = yes || enable_static=yes 7589b9b4fd27Smrg AC_MSG_RESULT([$enable_static]) 7590caade7ccSmrg 7591b9b4fd27Smrg _LT_CONFIG($1) 7592b9b4fd27Smrgfi 7593b9b4fd27SmrgAC_LANG_POP 7594b9b4fd27SmrgCC="$lt_save_CC" 7595b9b4fd27Smrg])# _LT_LANG_C_CONFIG 7596caade7ccSmrg 7597caade7ccSmrg 7598b9b4fd27Smrg# _LT_PROG_CXX 7599b9b4fd27Smrg# ------------ 7600b9b4fd27Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 7601b9b4fd27Smrg# compiler, we have our own version here. 7602b9b4fd27Smrgm4_defun([_LT_PROG_CXX], 7603b9b4fd27Smrg[ 7604b9b4fd27Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 7605b9b4fd27SmrgAC_PROG_CXX 7606b9b4fd27Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 7607b9b4fd27Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 7608b9b4fd27Smrg (test "X$CXX" != "Xg++"))) ; then 7609b9b4fd27Smrg AC_PROG_CXXCPP 7610b9b4fd27Smrgelse 7611b9b4fd27Smrg _lt_caught_CXX_error=yes 7612b9b4fd27Smrgfi 7613b9b4fd27Smrgpopdef([AC_MSG_ERROR]) 7614b9b4fd27Smrg])# _LT_PROG_CXX 7615caade7ccSmrg 7616b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 7617b9b4fd27Smrgdnl AC_DEFUN([_LT_PROG_CXX], []) 7618caade7ccSmrg 7619b9b4fd27Smrg 7620b9b4fd27Smrg# _LT_LANG_CXX_CONFIG([TAG]) 7621b9b4fd27Smrg# -------------------------- 7622b9b4fd27Smrg# Ensure that the configuration variables for a C++ compiler are suitably 7623b9b4fd27Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 7624b9b4fd27Smrg# the compiler configuration to `libtool'. 7625b9b4fd27Smrgm4_defun([_LT_LANG_CXX_CONFIG], 7626b9b4fd27Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl 7627b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 7628b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 7629b9b4fd27Smrg 7630b9b4fd27SmrgAC_LANG_PUSH(C++) 7631b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7632b9b4fd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7633b9b4fd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7634b9b4fd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7635b9b4fd27Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 7636b9b4fd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7637b9b4fd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7638b9b4fd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7639b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7640b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7641b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7642b9b4fd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7643b9b4fd27Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7644b9b4fd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7645b9b4fd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7646b9b4fd27Smrg_LT_TAGVAR(module_cmds, $1)= 7647b9b4fd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7648b9b4fd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7649b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7650b9b4fd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7651b9b4fd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7652b9b4fd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7653b9b4fd27Smrg 7654b9b4fd27Smrg# Source file extension for C++ test sources. 7655b9b4fd27Smrgac_ext=cpp 7656b9b4fd27Smrg 7657b9b4fd27Smrg# Object file extension for compiled C++ test sources. 7658b9b4fd27Smrgobjext=o 7659b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 7660b9b4fd27Smrg 7661b9b4fd27Smrg# No sense in running all these tests if we already determined that 7662b9b4fd27Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 7663b9b4fd27Smrg# are currently assumed to apply to all compilers on this platform, 7664b9b4fd27Smrg# and will be corrupted by setting them based on a non-working compiler. 7665b9b4fd27Smrgif test "$_lt_caught_CXX_error" != yes; then 7666b9b4fd27Smrg # Code to be used in simple compile tests 7667b9b4fd27Smrg lt_simple_compile_test_code="int some_variable = 0;" 7668b9b4fd27Smrg 7669b9b4fd27Smrg # Code to be used in simple link tests 7670b9b4fd27Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7671b9b4fd27Smrg 7672b9b4fd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7673b9b4fd27Smrg _LT_TAG_COMPILER 7674b9b4fd27Smrg 7675b9b4fd27Smrg # save warnings/boilerplate of simple test code 7676b9b4fd27Smrg _LT_COMPILER_BOILERPLATE 7677b9b4fd27Smrg _LT_LINKER_BOILERPLATE 7678b9b4fd27Smrg 7679b9b4fd27Smrg # Allow CC to be a program name with arguments. 7680b9b4fd27Smrg lt_save_CC=$CC 7681b9b4fd27Smrg lt_save_LD=$LD 7682b9b4fd27Smrg lt_save_GCC=$GCC 7683b9b4fd27Smrg GCC=$GXX 7684b9b4fd27Smrg lt_save_with_gnu_ld=$with_gnu_ld 7685b9b4fd27Smrg lt_save_path_LD=$lt_cv_path_LD 7686b9b4fd27Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 7687b9b4fd27Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 7688caade7ccSmrg else 7689b9b4fd27Smrg $as_unset lt_cv_prog_gnu_ld 7690caade7ccSmrg fi 7691b9b4fd27Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 7692b9b4fd27Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 7693caade7ccSmrg else 7694b9b4fd27Smrg $as_unset lt_cv_path_LD 7695caade7ccSmrg fi 7696b9b4fd27Smrg test -z "${LDCXX+set}" || LD=$LDCXX 7697b9b4fd27Smrg CC=${CXX-"c++"} 7698b9b4fd27Smrg compiler=$CC 7699b9b4fd27Smrg _LT_TAGVAR(compiler, $1)=$CC 7700b9b4fd27Smrg _LT_CC_BASENAME([$compiler]) 7701b9b4fd27Smrg 7702b9b4fd27Smrg if test -n "$compiler"; then 7703b9b4fd27Smrg # We don't want -fno-exception when compiling C++ code, so set the 7704b9b4fd27Smrg # no_builtin_flag separately 7705b9b4fd27Smrg if test "$GXX" = yes; then 7706b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7707b9b4fd27Smrg else 7708b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7709b9b4fd27Smrg fi 7710caade7ccSmrg 7711b9b4fd27Smrg if test "$GXX" = yes; then 7712b9b4fd27Smrg # Set up default GNU C++ configuration 7713caade7ccSmrg 7714b9b4fd27Smrg LT_PATH_LD 7715caade7ccSmrg 7716b9b4fd27Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 7717b9b4fd27Smrg # archiving commands below assume that GNU ld is being used. 7718b9b4fd27Smrg if test "$with_gnu_ld" = yes; then 7719b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7720b9b4fd27Smrg _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' 7721caade7ccSmrg 7722b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7723b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7724b9b4fd27Smrg 7725b9b4fd27Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 7726b9b4fd27Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7727b9b4fd27Smrg # investigate it a little bit more. (MM) 7728b9b4fd27Smrg wlarc='${wl}' 7729b9b4fd27Smrg 7730b9b4fd27Smrg # ancient GNU ld didn't support --whole-archive et. al. 7731b9b4fd27Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7732b9b4fd27Smrg $GREP 'no-whole-archive' > /dev/null; then 7733b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7734b9b4fd27Smrg else 7735b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7736b9b4fd27Smrg fi 7737b9b4fd27Smrg else 7738b9b4fd27Smrg with_gnu_ld=no 7739b9b4fd27Smrg wlarc= 7740b9b4fd27Smrg 7741b9b4fd27Smrg # A generic and very simple default shared library creation 7742b9b4fd27Smrg # command for GNU C++ for the case where it uses the native 7743b9b4fd27Smrg # linker, instead of GNU ld. If possible, this setting should 7744b9b4fd27Smrg # overridden to take advantage of the native linker features on 7745b9b4fd27Smrg # the platform it is being used on. 7746b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7747caade7ccSmrg fi 7748b9b4fd27Smrg 7749b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 7750b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 7751b9b4fd27Smrg # linking a shared library. 7752b9b4fd27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 7753b9b4fd27Smrg 7754b9b4fd27Smrg else 7755b9b4fd27Smrg GXX=no 7756b9b4fd27Smrg with_gnu_ld=no 7757b9b4fd27Smrg wlarc= 7758b9b4fd27Smrg fi 7759b9b4fd27Smrg 7760b9b4fd27Smrg # PORTME: fill in a description of your system's C++ link characteristics 7761b9b4fd27Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7762b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7763caade7ccSmrg case $host_os in 7764b9b4fd27Smrg aix3*) 7765b9b4fd27Smrg # FIXME: insert proper C++ library support 7766b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7767b9b4fd27Smrg ;; 7768485f0483Smrg aix[[4-9]]*) 7769b9b4fd27Smrg if test "$host_cpu" = ia64; then 7770b9b4fd27Smrg # On IA64, the linker does run time linking by default, so we don't 7771b9b4fd27Smrg # have to do anything special. 7772b9b4fd27Smrg aix_use_runtimelinking=no 7773b9b4fd27Smrg exp_sym_flag='-Bexport' 7774b9b4fd27Smrg no_entry_flag="" 7775b9b4fd27Smrg else 7776b9b4fd27Smrg aix_use_runtimelinking=no 7777b9b4fd27Smrg 7778b9b4fd27Smrg # Test if we are trying to use run time linking or normal 7779b9b4fd27Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7780b9b4fd27Smrg # need to do runtime linking. 7781b9b4fd27Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7782b9b4fd27Smrg for ld_flag in $LDFLAGS; do 7783b9b4fd27Smrg case $ld_flag in 7784b9b4fd27Smrg *-brtl*) 7785b9b4fd27Smrg aix_use_runtimelinking=yes 7786b9b4fd27Smrg break 7787b9b4fd27Smrg ;; 7788b9b4fd27Smrg esac 7789b9b4fd27Smrg done 7790b9b4fd27Smrg ;; 7791b9b4fd27Smrg esac 7792b9b4fd27Smrg 7793b9b4fd27Smrg exp_sym_flag='-bexport' 7794b9b4fd27Smrg no_entry_flag='-bnoentry' 7795b9b4fd27Smrg fi 7796b9b4fd27Smrg 7797b9b4fd27Smrg # When large executables or shared objects are built, AIX ld can 7798b9b4fd27Smrg # have problems creating the table of contents. If linking a library 7799b9b4fd27Smrg # or program results in "error TOC overflow" add -mminimal-toc to 7800b9b4fd27Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7801b9b4fd27Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7802b9b4fd27Smrg 7803b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='' 7804b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7805b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7806b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7807b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7808b9b4fd27Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7809b9b4fd27Smrg 7810b9b4fd27Smrg if test "$GXX" = yes; then 7811b9b4fd27Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7812b9b4fd27Smrg # We only want to do this on AIX 4.2 and lower, the check 7813b9b4fd27Smrg # below for broken collect2 doesn't work under 4.3+ 7814b9b4fd27Smrg collect2name=`${CC} -print-prog-name=collect2` 7815b9b4fd27Smrg if test -f "$collect2name" && 7816b9b4fd27Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7817b9b4fd27Smrg then 7818b9b4fd27Smrg # We have reworked collect2 7819b9b4fd27Smrg : 7820b9b4fd27Smrg else 7821b9b4fd27Smrg # We have old collect2 7822b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7823b9b4fd27Smrg # It fails to find uninstalled libraries when the uninstalled 7824b9b4fd27Smrg # path is not listed in the libpath. Setting hardcode_minus_L 7825b9b4fd27Smrg # to unsupported forces relinking 7826b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7827b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7828b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7829b9b4fd27Smrg fi 7830b9b4fd27Smrg esac 7831b9b4fd27Smrg shared_flag='-shared' 7832b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 7833b9b4fd27Smrg shared_flag="$shared_flag "'${wl}-G' 7834b9b4fd27Smrg fi 7835b9b4fd27Smrg else 7836b9b4fd27Smrg # not using gcc 7837b9b4fd27Smrg if test "$host_cpu" = ia64; then 7838b9b4fd27Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7839b9b4fd27Smrg # chokes on -Wl,-G. The following line is correct: 7840b9b4fd27Smrg shared_flag='-G' 7841b9b4fd27Smrg else 7842b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 7843b9b4fd27Smrg shared_flag='${wl}-G' 7844b9b4fd27Smrg else 7845b9b4fd27Smrg shared_flag='${wl}-bM:SRE' 7846b9b4fd27Smrg fi 7847b9b4fd27Smrg fi 7848b9b4fd27Smrg fi 7849b9b4fd27Smrg 7850b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7851b9b4fd27Smrg # It seems that -bexpall does not export symbols beginning with 7852b9b4fd27Smrg # underscore (_), so it is better to generate a list of symbols to 7853b9b4fd27Smrg # export. 7854b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7855b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 7856b9b4fd27Smrg # Warning - without using the other runtime loading flags (-brtl), 7857b9b4fd27Smrg # -berok will link without error, but may produce a broken library. 7858b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7859b9b4fd27Smrg # Determine the default libpath from the value encoded in an empty 7860b9b4fd27Smrg # executable. 7861b9b4fd27Smrg _LT_SYS_MODULE_PATH_AIX 7862b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7863b9b4fd27Smrg 7864b9b4fd27Smrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 7865b9b4fd27Smrg else 7866b9b4fd27Smrg if test "$host_cpu" = ia64; then 7867b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7868b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7869b9b4fd27Smrg _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" 7870b9b4fd27Smrg else 7871b9b4fd27Smrg # Determine the default libpath from the value encoded in an 7872b9b4fd27Smrg # empty executable. 7873b9b4fd27Smrg _LT_SYS_MODULE_PATH_AIX 7874b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7875b9b4fd27Smrg # Warning - without using the other run time loading flags, 7876b9b4fd27Smrg # -berok will link without error, but may produce a broken library. 7877b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7878b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7879b9b4fd27Smrg # Exported symbols can be pulled into shared objects from archives 7880b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7881b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7882b9b4fd27Smrg # This is similar to how AIX traditionally builds its shared 7883b9b4fd27Smrg # libraries. 7884b9b4fd27Smrg _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' 7885b9b4fd27Smrg fi 7886b9b4fd27Smrg fi 7887b9b4fd27Smrg ;; 7888b9b4fd27Smrg 7889b9b4fd27Smrg beos*) 7890b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7891b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7892b9b4fd27Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7893b9b4fd27Smrg # support --undefined. This deserves some investigation. FIXME 7894b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7895caade7ccSmrg else 7896b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7897caade7ccSmrg fi 7898caade7ccSmrg ;; 7899b9b4fd27Smrg 7900caade7ccSmrg chorus*) 7901b9b4fd27Smrg case $cc_basename in 7902b9b4fd27Smrg *) 7903b9b4fd27Smrg # FIXME: insert proper C++ library support 7904b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7905caade7ccSmrg ;; 7906b9b4fd27Smrg esac 7907b9b4fd27Smrg ;; 7908b9b4fd27Smrg 7909b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 7910b9b4fd27Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7911b9b4fd27Smrg # as there is no search path for DLLs. 7912b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7913b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7914b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 7915b9b4fd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7916b9b4fd27Smrg 7917b9b4fd27Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7918b9b4fd27Smrg _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' 7919b9b4fd27Smrg # If the export-symbols file already is a .def file (1st line 7920b9b4fd27Smrg # is EXPORTS), use it as is; otherwise, prepend... 7921b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7922b9b4fd27Smrg cp $export_symbols $output_objdir/$soname.def; 7923b9b4fd27Smrg else 7924b9b4fd27Smrg echo EXPORTS > $output_objdir/$soname.def; 7925b9b4fd27Smrg cat $export_symbols >> $output_objdir/$soname.def; 7926b9b4fd27Smrg fi~ 7927b9b4fd27Smrg $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' 7928b9b4fd27Smrg else 7929b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7930b9b4fd27Smrg fi 7931b9b4fd27Smrg ;; 7932b9b4fd27Smrg darwin* | rhapsody*) 7933b9b4fd27Smrg _LT_DARWIN_LINKER_FEATURES($1) 7934caade7ccSmrg ;; 7935b9b4fd27Smrg 7936caade7ccSmrg dgux*) 7937b9b4fd27Smrg case $cc_basename in 7938b9b4fd27Smrg ec++*) 7939b9b4fd27Smrg # FIXME: insert proper C++ library support 7940b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7941caade7ccSmrg ;; 7942b9b4fd27Smrg ghcx*) 7943caade7ccSmrg # Green Hills C++ Compiler 7944b9b4fd27Smrg # FIXME: insert proper C++ library support 7945b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7946caade7ccSmrg ;; 7947b9b4fd27Smrg *) 7948b9b4fd27Smrg # FIXME: insert proper C++ library support 7949b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7950caade7ccSmrg ;; 7951b9b4fd27Smrg esac 7952b9b4fd27Smrg ;; 7953b9b4fd27Smrg 7954b9b4fd27Smrg freebsd[[12]]*) 7955b9b4fd27Smrg # C++ shared libraries reported to be fairly broken before 7956b9b4fd27Smrg # switch to ELF 7957b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7958b9b4fd27Smrg ;; 7959b9b4fd27Smrg 7960b9b4fd27Smrg freebsd-elf*) 7961b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7962b9b4fd27Smrg ;; 7963b9b4fd27Smrg 7964b9b4fd27Smrg freebsd* | dragonfly*) 7965b9b4fd27Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7966b9b4fd27Smrg # conventions 7967b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7968b9b4fd27Smrg ;; 7969b9b4fd27Smrg 7970b9b4fd27Smrg gnu*) 7971b9b4fd27Smrg ;; 7972b9b4fd27Smrg 7973b9b4fd27Smrg hpux9*) 7974b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7975b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7976b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7977b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7978b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7979b9b4fd27Smrg # but as the default 7980b9b4fd27Smrg # location of the library. 7981b9b4fd27Smrg 7982b9b4fd27Smrg case $cc_basename in 7983b9b4fd27Smrg CC*) 7984b9b4fd27Smrg # FIXME: insert proper C++ library support 7985b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7986b9b4fd27Smrg ;; 7987b9b4fd27Smrg aCC*) 7988b9b4fd27Smrg _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' 7989b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 7990b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 7991b9b4fd27Smrg # linking a shared library. 7992b9b4fd27Smrg # 7993b9b4fd27Smrg # There doesn't appear to be a way to prevent this compiler from 7994b9b4fd27Smrg # explicitly linking system object files so we need to strip them 7995b9b4fd27Smrg # from the output so that they don't get included in the library 7996b9b4fd27Smrg # dependencies. 7997b9b4fd27Smrg 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; $ECHO "X$list" | $Xsed' 7998b9b4fd27Smrg ;; 7999b9b4fd27Smrg *) 8000b9b4fd27Smrg if test "$GXX" = yes; then 8001b9b4fd27Smrg _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' 8002b9b4fd27Smrg else 8003b9b4fd27Smrg # FIXME: insert proper C++ library support 8004b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8005b9b4fd27Smrg fi 8006b9b4fd27Smrg ;; 8007b9b4fd27Smrg esac 8008b9b4fd27Smrg ;; 8009b9b4fd27Smrg 8010b9b4fd27Smrg hpux10*|hpux11*) 8011b9b4fd27Smrg if test $with_gnu_ld = no; then 8012b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8013b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8014b9b4fd27Smrg 8015b9b4fd27Smrg case $host_cpu in 8016b9b4fd27Smrg hppa*64*|ia64*) 8017b9b4fd27Smrg ;; 8018b9b4fd27Smrg *) 8019b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8020b9b4fd27Smrg ;; 8021b9b4fd27Smrg esac 8022b9b4fd27Smrg fi 8023b9b4fd27Smrg case $host_cpu in 8024b9b4fd27Smrg hppa*64*|ia64*) 8025b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8026b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8027b9b4fd27Smrg ;; 8028b9b4fd27Smrg *) 8029b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8030b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8031b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8032b9b4fd27Smrg # but as the default 8033b9b4fd27Smrg # location of the library. 8034b9b4fd27Smrg ;; 8035b9b4fd27Smrg esac 8036b9b4fd27Smrg 8037b9b4fd27Smrg case $cc_basename in 8038b9b4fd27Smrg CC*) 8039b9b4fd27Smrg # FIXME: insert proper C++ library support 8040b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8041caade7ccSmrg ;; 8042b9b4fd27Smrg aCC*) 8043caade7ccSmrg case $host_cpu in 8044b9b4fd27Smrg hppa*64*) 8045b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8046b9b4fd27Smrg ;; 8047b9b4fd27Smrg ia64*) 8048b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8049b9b4fd27Smrg ;; 8050b9b4fd27Smrg *) 8051b9b4fd27Smrg _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' 8052b9b4fd27Smrg ;; 8053caade7ccSmrg esac 8054b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8055b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8056b9b4fd27Smrg # linking a shared library. 8057b9b4fd27Smrg # 8058b9b4fd27Smrg # There doesn't appear to be a way to prevent this compiler from 8059b9b4fd27Smrg # explicitly linking system object files so we need to strip them 8060b9b4fd27Smrg # from the output so that they don't get included in the library 8061b9b4fd27Smrg # dependencies. 8062b9b4fd27Smrg 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; $ECHO "X$list" | $Xsed' 8063caade7ccSmrg ;; 8064b9b4fd27Smrg *) 8065b9b4fd27Smrg if test "$GXX" = yes; then 8066b9b4fd27Smrg if test $with_gnu_ld = no; then 8067b9b4fd27Smrg case $host_cpu in 8068b9b4fd27Smrg hppa*64*) 8069b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8070b9b4fd27Smrg ;; 8071b9b4fd27Smrg ia64*) 8072b9b4fd27Smrg _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' 8073b9b4fd27Smrg ;; 8074b9b4fd27Smrg *) 8075b9b4fd27Smrg _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' 8076b9b4fd27Smrg ;; 8077b9b4fd27Smrg esac 8078b9b4fd27Smrg fi 8079b9b4fd27Smrg else 8080b9b4fd27Smrg # FIXME: insert proper C++ library support 8081b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8082b9b4fd27Smrg fi 8083caade7ccSmrg ;; 8084b9b4fd27Smrg esac 8085b9b4fd27Smrg ;; 8086b9b4fd27Smrg 8087b9b4fd27Smrg interix[[3-9]]*) 8088b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8089b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8090b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8091b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8092b9b4fd27Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8093b9b4fd27Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8094b9b4fd27Smrg # default) and relocated if they conflict, which is a slow very memory 8095b9b4fd27Smrg # consuming and fragmenting process. To avoid this, we pick a random, 8096b9b4fd27Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8097b9b4fd27Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8098b9b4fd27Smrg _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' 8099b9b4fd27Smrg _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' 8100caade7ccSmrg ;; 8101b9b4fd27Smrg irix5* | irix6*) 8102b9b4fd27Smrg case $cc_basename in 8103b9b4fd27Smrg CC*) 8104b9b4fd27Smrg # SGI C++ 8105b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 8106b9b4fd27Smrg 8107b9b4fd27Smrg # Archives containing C++ object files must be created using 8108b9b4fd27Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 8109b9b4fd27Smrg # necessary to make sure instantiated templates are included 8110b9b4fd27Smrg # in the archive. 8111b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 8112caade7ccSmrg ;; 8113b9b4fd27Smrg *) 8114b9b4fd27Smrg if test "$GXX" = yes; then 8115b9b4fd27Smrg if test "$with_gnu_ld" = no; then 8116b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8117b9b4fd27Smrg else 8118b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' 8119b9b4fd27Smrg fi 8120b9b4fd27Smrg fi 8121b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8122caade7ccSmrg ;; 8123b9b4fd27Smrg esac 8124b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8125b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8126b9b4fd27Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 8127b9b4fd27Smrg ;; 8128b9b4fd27Smrg 8129485f0483Smrg linux* | k*bsd*-gnu) 8130b9b4fd27Smrg case $cc_basename in 8131b9b4fd27Smrg KCC*) 8132b9b4fd27Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8133b9b4fd27Smrg 8134b9b4fd27Smrg # KCC will only create a shared library if the output file 8135b9b4fd27Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8136b9b4fd27Smrg # to its proper name (with version) after linking. 8137b9b4fd27Smrg _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' 8138b9b4fd27Smrg _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' 8139b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8140b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8141b9b4fd27Smrg # linking a shared library. 8142b9b4fd27Smrg # 8143b9b4fd27Smrg # There doesn't appear to be a way to prevent this compiler from 8144b9b4fd27Smrg # explicitly linking system object files so we need to strip them 8145b9b4fd27Smrg # from the output so that they don't get included in the library 8146b9b4fd27Smrg # dependencies. 8147b9b4fd27Smrg 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; $ECHO "X$list" | $Xsed' 8148b9b4fd27Smrg 8149b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8150b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8151b9b4fd27Smrg 8152b9b4fd27Smrg # Archives containing C++ object files must be created using 8153b9b4fd27Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8154b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8155caade7ccSmrg ;; 8156b9b4fd27Smrg icpc* | ecpc* ) 8157caade7ccSmrg # Intel C++ 8158b9b4fd27Smrg with_gnu_ld=yes 8159b9b4fd27Smrg # version 8.0 and above of icpc choke on multiply defined symbols 8160b9b4fd27Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 8161b9b4fd27Smrg # earlier do not add the objects themselves. 8162b9b4fd27Smrg case `$CC -V 2>&1` in 8163b9b4fd27Smrg *"Version 7."*) 8164b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8165b9b4fd27Smrg _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' 8166b9b4fd27Smrg ;; 8167b9b4fd27Smrg *) # Version 8.0 or newer 8168b9b4fd27Smrg tmp_idyn= 8169b9b4fd27Smrg case $host_cpu in 8170b9b4fd27Smrg ia64*) tmp_idyn=' -i_dynamic';; 8171b9b4fd27Smrg esac 8172b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8173b9b4fd27Smrg _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' 8174b9b4fd27Smrg ;; 8175b9b4fd27Smrg esac 8176b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8177b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8178b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8179b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8180caade7ccSmrg ;; 8181b9b4fd27Smrg pgCC* | pgcpp*) 8182b9b4fd27Smrg # Portland Group C++ compiler 8183b9b4fd27Smrg case `$CC -V` in 8184b9b4fd27Smrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 8185b9b4fd27Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 8186b9b4fd27Smrg rm -rf $tpldir~ 8187b9b4fd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 8188b9b4fd27Smrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 8189b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 8190b9b4fd27Smrg rm -rf $tpldir~ 8191b9b4fd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 8192b9b4fd27Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 8193b9b4fd27Smrg $RANLIB $oldlib' 8194b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 8195b9b4fd27Smrg rm -rf $tpldir~ 8196b9b4fd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8197b9b4fd27Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8198b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 8199b9b4fd27Smrg rm -rf $tpldir~ 8200b9b4fd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8201b9b4fd27Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 8202b9b4fd27Smrg ;; 8203b9b4fd27Smrg *) # Version 6 will use weak symbols 8204b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8205b9b4fd27Smrg _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' 8206b9b4fd27Smrg ;; 8207b9b4fd27Smrg esac 8208b9b4fd27Smrg 8209b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 8210b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8211b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 8212b9b4fd27Smrg ;; 8213caade7ccSmrg cxx*) 8214caade7ccSmrg # Compaq C++ 8215b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8216b9b4fd27Smrg _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' 8217b9b4fd27Smrg 8218b9b4fd27Smrg runpath_var=LD_RUN_PATH 8219b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8220b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8221b9b4fd27Smrg 8222b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8223b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8224b9b4fd27Smrg # linking a shared library. 8225b9b4fd27Smrg # 8226b9b4fd27Smrg # There doesn't appear to be a way to prevent this compiler from 8227b9b4fd27Smrg # explicitly linking system object files so we need to strip them 8228b9b4fd27Smrg # from the output so that they don't get included in the library 8229b9b4fd27Smrg # dependencies. 8230b9b4fd27Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8231b9b4fd27Smrg ;; 8232b9b4fd27Smrg xl*) 8233b9b4fd27Smrg # IBM XL 8.0 on PPC, with GNU ld 8234b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8235b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8236b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8237b9b4fd27Smrg if test "x$supports_anon_versioning" = xyes; then 8238b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8239b9b4fd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8240b9b4fd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8241b9b4fd27Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 8242b9b4fd27Smrg fi 8243caade7ccSmrg ;; 8244caade7ccSmrg *) 8245485f0483Smrg case `$CC -V 2>&1 | sed 5q` in 8246485f0483Smrg *Sun\ C*) 8247485f0483Smrg # Sun C++ 5.9 8248b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8249b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8250b9b4fd27Smrg _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' 8251b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8252b9b4fd27Smrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 8253b9b4fd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8254b9b4fd27Smrg 8255b9b4fd27Smrg # Not sure whether something based on 8256b9b4fd27Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 8257b9b4fd27Smrg # would be better. 8258b9b4fd27Smrg output_verbose_link_cmd='echo' 8259b9b4fd27Smrg 8260b9b4fd27Smrg # Archives containing C++ object files must be created using 8261b9b4fd27Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8262b9b4fd27Smrg # necessary to make sure instantiated templates are included 8263b9b4fd27Smrg # in the archive. 8264b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8265485f0483Smrg ;; 8266485f0483Smrg esac 8267caade7ccSmrg ;; 8268caade7ccSmrg esac 8269caade7ccSmrg ;; 8270b9b4fd27Smrg 8271caade7ccSmrg lynxos*) 8272b9b4fd27Smrg # FIXME: insert proper C++ library support 8273b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8274caade7ccSmrg ;; 8275b9b4fd27Smrg 8276caade7ccSmrg m88k*) 8277b9b4fd27Smrg # FIXME: insert proper C++ library support 8278b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8279caade7ccSmrg ;; 8280b9b4fd27Smrg 8281caade7ccSmrg mvs*) 8282b9b4fd27Smrg case $cc_basename in 8283b9b4fd27Smrg cxx*) 8284b9b4fd27Smrg # FIXME: insert proper C++ library support 8285b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8286caade7ccSmrg ;; 8287caade7ccSmrg *) 8288b9b4fd27Smrg # FIXME: insert proper C++ library support 8289b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8290caade7ccSmrg ;; 8291caade7ccSmrg esac 8292caade7ccSmrg ;; 8293b9b4fd27Smrg 8294caade7ccSmrg netbsd*) 8295b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8296b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 8297b9b4fd27Smrg wlarc= 8298b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8299b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8300b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8301b9b4fd27Smrg fi 8302b9b4fd27Smrg # Workaround some broken pre-1.5 toolchains 8303b9b4fd27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 8304b9b4fd27Smrg ;; 8305b9b4fd27Smrg 8306b9b4fd27Smrg *nto* | *qnx*) 8307b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8308b9b4fd27Smrg ;; 8309b9b4fd27Smrg 8310b9b4fd27Smrg openbsd2*) 8311b9b4fd27Smrg # C++ shared libraries are fairly broken 8312b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8313b9b4fd27Smrg ;; 8314b9b4fd27Smrg 8315b9b4fd27Smrg openbsd*) 8316b9b4fd27Smrg if test -f /usr/libexec/ld.so; then 8317b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8318b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8319b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8320b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8321b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8322b9b4fd27Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 8323b9b4fd27Smrg _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' 8324b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8325b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8326b9b4fd27Smrg fi 8327b9b4fd27Smrg output_verbose_link_cmd=echo 8328b9b4fd27Smrg else 8329b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8330b9b4fd27Smrg fi 8331caade7ccSmrg ;; 8332b9b4fd27Smrg 8333caade7ccSmrg osf3* | osf4* | osf5*) 8334b9b4fd27Smrg case $cc_basename in 8335b9b4fd27Smrg KCC*) 8336b9b4fd27Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8337b9b4fd27Smrg 8338b9b4fd27Smrg # KCC will only create a shared library if the output file 8339b9b4fd27Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8340b9b4fd27Smrg # to its proper name (with version) after linking. 8341b9b4fd27Smrg _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' 8342b9b4fd27Smrg 8343b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8344b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8345b9b4fd27Smrg 8346b9b4fd27Smrg # Archives containing C++ object files must be created using 8347b9b4fd27Smrg # the KAI C++ compiler. 8348b9b4fd27Smrg case $host in 8349b9b4fd27Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 8350b9b4fd27Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 8351b9b4fd27Smrg esac 8352caade7ccSmrg ;; 8353b9b4fd27Smrg RCC*) 8354caade7ccSmrg # Rational C++ 2.4.1 8355b9b4fd27Smrg # FIXME: insert proper C++ library support 8356b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8357caade7ccSmrg ;; 8358b9b4fd27Smrg cxx*) 8359b9b4fd27Smrg case $host in 8360b9b4fd27Smrg osf3*) 8361b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8362b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 8363b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8364b9b4fd27Smrg ;; 8365b9b4fd27Smrg *) 8366b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8367b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 8368b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 8369b9b4fd27Smrg echo "-hidden">> $lib.exp~ 8370b9b4fd27Smrg $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ 8371b9b4fd27Smrg $RM $lib.exp' 8372b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8373b9b4fd27Smrg ;; 8374b9b4fd27Smrg esac 8375b9b4fd27Smrg 8376b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8377b9b4fd27Smrg 8378b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8379b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8380b9b4fd27Smrg # linking a shared library. 8381b9b4fd27Smrg # 8382b9b4fd27Smrg # There doesn't appear to be a way to prevent this compiler from 8383b9b4fd27Smrg # explicitly linking system object files so we need to strip them 8384b9b4fd27Smrg # from the output so that they don't get included in the library 8385b9b4fd27Smrg # dependencies. 8386b9b4fd27Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 8387caade7ccSmrg ;; 8388caade7ccSmrg *) 8389b9b4fd27Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8390b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8391b9b4fd27Smrg case $host in 8392b9b4fd27Smrg osf3*) 8393b9b4fd27Smrg _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8394b9b4fd27Smrg ;; 8395b9b4fd27Smrg *) 8396b9b4fd27Smrg _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" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8397b9b4fd27Smrg ;; 8398b9b4fd27Smrg esac 8399b9b4fd27Smrg 8400b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8401b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8402b9b4fd27Smrg 8403b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8404b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8405b9b4fd27Smrg # linking a shared library. 8406b9b4fd27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 8407b9b4fd27Smrg 8408b9b4fd27Smrg else 8409b9b4fd27Smrg # FIXME: insert proper C++ library support 8410b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8411b9b4fd27Smrg fi 8412caade7ccSmrg ;; 8413b9b4fd27Smrg esac 8414b9b4fd27Smrg ;; 8415b9b4fd27Smrg 8416caade7ccSmrg psos*) 8417b9b4fd27Smrg # FIXME: insert proper C++ library support 8418b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8419b9b4fd27Smrg ;; 8420b9b4fd27Smrg 8421b9b4fd27Smrg sunos4*) 8422b9b4fd27Smrg case $cc_basename in 8423b9b4fd27Smrg CC*) 8424b9b4fd27Smrg # Sun C++ 4.x 8425b9b4fd27Smrg # FIXME: insert proper C++ library support 8426b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8427b9b4fd27Smrg ;; 8428b9b4fd27Smrg lcc*) 8429b9b4fd27Smrg # Lucid 8430b9b4fd27Smrg # FIXME: insert proper C++ library support 8431b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8432b9b4fd27Smrg ;; 8433b9b4fd27Smrg *) 8434b9b4fd27Smrg # FIXME: insert proper C++ library support 8435b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8436b9b4fd27Smrg ;; 8437b9b4fd27Smrg esac 8438b9b4fd27Smrg ;; 8439b9b4fd27Smrg 8440caade7ccSmrg solaris*) 8441b9b4fd27Smrg case $cc_basename in 8442b9b4fd27Smrg CC*) 8443caade7ccSmrg # Sun C++ 4.2, 5.x and Centerline C++ 8444b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 8445b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8446b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8447b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8448b9b4fd27Smrg $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' 8449b9b4fd27Smrg 8450b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8451b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8452b9b4fd27Smrg case $host_os in 8453b9b4fd27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8454b9b4fd27Smrg *) 8455b9b4fd27Smrg # The compiler driver will combine and reorder linker options, 8456b9b4fd27Smrg # but understands `-z linker_flag'. 8457b9b4fd27Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 8458b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 8459b9b4fd27Smrg ;; 8460b9b4fd27Smrg esac 8461b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8462b9b4fd27Smrg 8463b9b4fd27Smrg output_verbose_link_cmd='echo' 8464b9b4fd27Smrg 8465b9b4fd27Smrg # Archives containing C++ object files must be created using 8466b9b4fd27Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8467b9b4fd27Smrg # necessary to make sure instantiated templates are included 8468b9b4fd27Smrg # in the archive. 8469b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8470caade7ccSmrg ;; 8471b9b4fd27Smrg gcx*) 8472caade7ccSmrg # Green Hills C++ Compiler 8473b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8474b9b4fd27Smrg 8475b9b4fd27Smrg # The C++ compiler must be used to create the archive. 8476b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 8477caade7ccSmrg ;; 8478b9b4fd27Smrg *) 8479b9b4fd27Smrg # GNU C++ compiler with Solaris linker 8480b9b4fd27Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8481b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 8482b9b4fd27Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 8483b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8484b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8485b9b4fd27Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8486b9b4fd27Smrg 8487b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8488b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8489b9b4fd27Smrg # linking a shared library. 8490b9b4fd27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 8491b9b4fd27Smrg else 8492b9b4fd27Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 8493b9b4fd27Smrg # platform. 8494b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8495b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8496b9b4fd27Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8497b9b4fd27Smrg 8498b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8499b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8500b9b4fd27Smrg # linking a shared library. 8501b9b4fd27Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 8502b9b4fd27Smrg fi 8503b9b4fd27Smrg 8504b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 8505b9b4fd27Smrg case $host_os in 8506b9b4fd27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8507b9b4fd27Smrg *) 8508b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 8509b9b4fd27Smrg ;; 8510b9b4fd27Smrg esac 8511b9b4fd27Smrg fi 8512caade7ccSmrg ;; 8513b9b4fd27Smrg esac 8514b9b4fd27Smrg ;; 8515b9b4fd27Smrg 8516b9b4fd27Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 8517b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8518b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8519b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8520b9b4fd27Smrg runpath_var='LD_RUN_PATH' 8521b9b4fd27Smrg 8522b9b4fd27Smrg case $cc_basename in 8523b9b4fd27Smrg CC*) 8524b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8525b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8526b9b4fd27Smrg ;; 8527b9b4fd27Smrg *) 8528b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8529b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8530b9b4fd27Smrg ;; 8531b9b4fd27Smrg esac 8532b9b4fd27Smrg ;; 8533b9b4fd27Smrg 8534b9b4fd27Smrg sysv5* | sco3.2v5* | sco5v6*) 8535b9b4fd27Smrg # Note: We can NOT use -z defs as we might desire, because we do not 8536b9b4fd27Smrg # link with -lc, and that would cause any symbols used from libc to 8537b9b4fd27Smrg # always be unresolved, which means just about no library would 8538b9b4fd27Smrg # ever link correctly. If we're not using GNU ld we use -z text 8539b9b4fd27Smrg # though, which does catch some bad symbols but isn't as heavy-handed 8540b9b4fd27Smrg # as -z defs. 8541b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8542b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8543b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8544b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8545b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 8546b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8547b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8548b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8549b9b4fd27Smrg runpath_var='LD_RUN_PATH' 8550b9b4fd27Smrg 8551caade7ccSmrg case $cc_basename in 8552b9b4fd27Smrg CC*) 8553b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8554b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8555caade7ccSmrg ;; 8556caade7ccSmrg *) 8557b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8558b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8559caade7ccSmrg ;; 8560caade7ccSmrg esac 8561b9b4fd27Smrg ;; 8562b9b4fd27Smrg 8563caade7ccSmrg tandem*) 8564b9b4fd27Smrg case $cc_basename in 8565b9b4fd27Smrg NCC*) 8566caade7ccSmrg # NonStop-UX NCC 3.20 8567b9b4fd27Smrg # FIXME: insert proper C++ library support 8568b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8569caade7ccSmrg ;; 8570b9b4fd27Smrg *) 8571b9b4fd27Smrg # FIXME: insert proper C++ library support 8572b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8573caade7ccSmrg ;; 8574b9b4fd27Smrg esac 8575b9b4fd27Smrg ;; 8576b9b4fd27Smrg 8577caade7ccSmrg vxworks*) 8578b9b4fd27Smrg # FIXME: insert proper C++ library support 8579b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8580b9b4fd27Smrg ;; 8581b9b4fd27Smrg 8582caade7ccSmrg *) 8583b9b4fd27Smrg # FIXME: insert proper C++ library support 8584b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8585b9b4fd27Smrg ;; 8586caade7ccSmrg esac 8587caade7ccSmrg 8588b9b4fd27Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8589b9b4fd27Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8590b9b4fd27Smrg 8591b9b4fd27Smrg _LT_TAGVAR(GCC, $1)="$GXX" 8592b9b4fd27Smrg _LT_TAGVAR(LD, $1)="$LD" 8593b9b4fd27Smrg 8594b9b4fd27Smrg ## CAVEAT EMPTOR: 8595b9b4fd27Smrg ## There is no encapsulation within the following macros, do not change 8596b9b4fd27Smrg ## the running order or otherwise move them around unless you know exactly 8597b9b4fd27Smrg ## what you are doing... 8598b9b4fd27Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 8599b9b4fd27Smrg _LT_COMPILER_PIC($1) 8600b9b4fd27Smrg _LT_COMPILER_C_O($1) 8601b9b4fd27Smrg _LT_COMPILER_FILE_LOCKS($1) 8602b9b4fd27Smrg _LT_LINKER_SHLIBS($1) 8603b9b4fd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 8604b9b4fd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8605b9b4fd27Smrg 8606b9b4fd27Smrg _LT_CONFIG($1) 8607b9b4fd27Smrg fi # test -n "$compiler" 8608b9b4fd27Smrg 8609b9b4fd27Smrg CC=$lt_save_CC 8610b9b4fd27Smrg LDCXX=$LD 8611b9b4fd27Smrg LD=$lt_save_LD 8612b9b4fd27Smrg GCC=$lt_save_GCC 8613b9b4fd27Smrg with_gnu_ld=$lt_save_with_gnu_ld 8614b9b4fd27Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 8615b9b4fd27Smrg lt_cv_path_LD=$lt_save_path_LD 8616b9b4fd27Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8617b9b4fd27Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8618b9b4fd27Smrgfi # test "$_lt_caught_CXX_error" != yes 8619b9b4fd27Smrg 8620b9b4fd27SmrgAC_LANG_POP 8621b9b4fd27Smrg])# _LT_LANG_CXX_CONFIG 8622b9b4fd27Smrg 8623b9b4fd27Smrg 8624b9b4fd27Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8625b9b4fd27Smrg# --------------------------------- 8626b9b4fd27Smrg# Figure out "hidden" library dependencies from verbose 8627b9b4fd27Smrg# compiler output when linking a shared library. 8628b9b4fd27Smrg# Parse the compiler output and extract the necessary 8629b9b4fd27Smrg# objects, libraries and library flags. 8630b9b4fd27Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8631b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8632b9b4fd27Smrg# Dependencies to place before and after the object being linked: 8633b9b4fd27Smrg_LT_TAGVAR(predep_objects, $1)= 8634b9b4fd27Smrg_LT_TAGVAR(postdep_objects, $1)= 8635b9b4fd27Smrg_LT_TAGVAR(predeps, $1)= 8636b9b4fd27Smrg_LT_TAGVAR(postdeps, $1)= 8637b9b4fd27Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 8638b9b4fd27Smrg 8639b9b4fd27Smrgdnl we can't use the lt_simple_compile_test_code here, 8640b9b4fd27Smrgdnl because it contains code intended for an executable, 8641b9b4fd27Smrgdnl not a library. It's possible we should let each 8642b9b4fd27Smrgdnl tag define a new lt_????_link_test_code variable, 8643b9b4fd27Smrgdnl but it's only used here... 8644b9b4fd27Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8645b9b4fd27Smrgint a; 8646b9b4fd27Smrgvoid foo (void) { a = 0; } 8647b9b4fd27Smrg_LT_EOF 8648b9b4fd27Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8649b9b4fd27Smrgclass Foo 8650b9b4fd27Smrg{ 8651b9b4fd27Smrgpublic: 8652b9b4fd27Smrg Foo (void) { a = 0; } 8653b9b4fd27Smrgprivate: 8654b9b4fd27Smrg int a; 8655b9b4fd27Smrg}; 8656b9b4fd27Smrg_LT_EOF 8657b9b4fd27Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8658b9b4fd27Smrg subroutine foo 8659b9b4fd27Smrg implicit none 8660b9b4fd27Smrg integer*4 a 8661b9b4fd27Smrg a=0 8662b9b4fd27Smrg return 8663b9b4fd27Smrg end 8664b9b4fd27Smrg_LT_EOF 8665b9b4fd27Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8666b9b4fd27Smrg subroutine foo 8667b9b4fd27Smrg implicit none 8668b9b4fd27Smrg integer a 8669b9b4fd27Smrg a=0 8670b9b4fd27Smrg return 8671b9b4fd27Smrg end 8672b9b4fd27Smrg_LT_EOF 8673b9b4fd27Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8674b9b4fd27Smrgpublic class foo { 8675b9b4fd27Smrg private int a; 8676b9b4fd27Smrg public void bar (void) { 8677b9b4fd27Smrg a = 0; 8678b9b4fd27Smrg } 8679b9b4fd27Smrg}; 8680b9b4fd27Smrg_LT_EOF 8681b9b4fd27Smrg]) 8682b9b4fd27Smrgdnl Parse the compiler output and extract the necessary 8683b9b4fd27Smrgdnl objects, libraries and library flags. 8684b9b4fd27Smrgif AC_TRY_EVAL(ac_compile); then 8685b9b4fd27Smrg # Parse the compiler output and extract the necessary 8686b9b4fd27Smrg # objects, libraries and library flags. 8687b9b4fd27Smrg 8688b9b4fd27Smrg # Sentinel used to keep track of whether or not we are before 8689b9b4fd27Smrg # the conftest object file. 8690b9b4fd27Smrg pre_test_object_deps_done=no 8691b9b4fd27Smrg 8692b9b4fd27Smrg for p in `eval "$output_verbose_link_cmd"`; do 8693b9b4fd27Smrg case $p in 8694b9b4fd27Smrg 8695b9b4fd27Smrg -L* | -R* | -l*) 8696b9b4fd27Smrg # Some compilers place space between "-{L,R}" and the path. 8697b9b4fd27Smrg # Remove the space. 8698b9b4fd27Smrg if test $p = "-L" || 8699b9b4fd27Smrg test $p = "-R"; then 8700b9b4fd27Smrg prev=$p 8701b9b4fd27Smrg continue 8702b9b4fd27Smrg else 8703b9b4fd27Smrg prev= 8704b9b4fd27Smrg fi 8705b9b4fd27Smrg 8706b9b4fd27Smrg if test "$pre_test_object_deps_done" = no; then 8707b9b4fd27Smrg case $p in 8708b9b4fd27Smrg -L* | -R*) 8709b9b4fd27Smrg # Internal compiler library paths should come after those 8710b9b4fd27Smrg # provided the user. The postdeps already come after the 8711b9b4fd27Smrg # user supplied libs so there is no need to process them. 8712b9b4fd27Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8713b9b4fd27Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8714b9b4fd27Smrg else 8715b9b4fd27Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8716b9b4fd27Smrg fi 8717b9b4fd27Smrg ;; 8718b9b4fd27Smrg # The "-l" case would never come before the object being 8719b9b4fd27Smrg # linked, so don't bother handling this case. 8720b9b4fd27Smrg esac 8721b9b4fd27Smrg else 8722b9b4fd27Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8723b9b4fd27Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8724b9b4fd27Smrg else 8725b9b4fd27Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8726b9b4fd27Smrg fi 8727b9b4fd27Smrg fi 8728b9b4fd27Smrg ;; 8729b9b4fd27Smrg 8730b9b4fd27Smrg *.$objext) 8731b9b4fd27Smrg # This assumes that the test object file only shows up 8732b9b4fd27Smrg # once in the compiler output. 8733b9b4fd27Smrg if test "$p" = "conftest.$objext"; then 8734b9b4fd27Smrg pre_test_object_deps_done=yes 8735b9b4fd27Smrg continue 8736b9b4fd27Smrg fi 8737b9b4fd27Smrg 8738b9b4fd27Smrg if test "$pre_test_object_deps_done" = no; then 8739b9b4fd27Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8740b9b4fd27Smrg _LT_TAGVAR(predep_objects, $1)="$p" 8741b9b4fd27Smrg else 8742b9b4fd27Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8743b9b4fd27Smrg fi 8744b9b4fd27Smrg else 8745b9b4fd27Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8746b9b4fd27Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 8747b9b4fd27Smrg else 8748b9b4fd27Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8749b9b4fd27Smrg fi 8750b9b4fd27Smrg fi 8751b9b4fd27Smrg ;; 8752caade7ccSmrg 8753b9b4fd27Smrg *) ;; # Ignore the rest. 8754caade7ccSmrg 8755b9b4fd27Smrg esac 8756b9b4fd27Smrg done 8757caade7ccSmrg 8758b9b4fd27Smrg # Clean up. 8759b9b4fd27Smrg rm -f a.out a.exe 8760b9b4fd27Smrgelse 8761b9b4fd27Smrg echo "libtool.m4: error: problem compiling $1 test program" 8762b9b4fd27Smrgfi 8763caade7ccSmrg 8764b9b4fd27Smrg$RM -f confest.$objext 8765caade7ccSmrg 8766b9b4fd27Smrg# PORTME: override above test on systems where it is broken 8767b9b4fd27Smrgm4_if([$1], [CXX], 8768b9b4fd27Smrg[case $host_os in 8769b9b4fd27Smrginterix[[3-9]]*) 8770b9b4fd27Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 8771b9b4fd27Smrg # hack all around it, let's just trust "g++" to DTRT. 8772b9b4fd27Smrg _LT_TAGVAR(predep_objects,$1)= 8773b9b4fd27Smrg _LT_TAGVAR(postdep_objects,$1)= 8774b9b4fd27Smrg _LT_TAGVAR(postdeps,$1)= 8775b9b4fd27Smrg ;; 8776caade7ccSmrg 8777b9b4fd27Smrglinux*) 8778b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 8779b9b4fd27Smrg *Sun\ C*) 8780b9b4fd27Smrg # Sun C++ 5.9 8781caade7ccSmrg 8782b9b4fd27Smrg # The more standards-conforming stlport4 library is 8783b9b4fd27Smrg # incompatible with the Cstd library. Avoid specifying 8784b9b4fd27Smrg # it if it's in CXXFLAGS. Ignore libCrun as 8785b9b4fd27Smrg # -library=stlport4 depends on it. 8786b9b4fd27Smrg case " $CXX $CXXFLAGS " in 8787b9b4fd27Smrg *" -library=stlport4 "*) 8788b9b4fd27Smrg solaris_use_stlport4=yes 8789caade7ccSmrg ;; 8790b9b4fd27Smrg esac 8791caade7ccSmrg 8792b9b4fd27Smrg if test "$solaris_use_stlport4" != yes; then 8793b9b4fd27Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8794b9b4fd27Smrg fi 8795b9b4fd27Smrg ;; 8796b9b4fd27Smrg esac 8797b9b4fd27Smrg ;; 8798caade7ccSmrg 8799b9b4fd27Smrgsolaris*) 8800b9b4fd27Smrg case $cc_basename in 8801b9b4fd27Smrg CC*) 8802b9b4fd27Smrg # The more standards-conforming stlport4 library is 8803b9b4fd27Smrg # incompatible with the Cstd library. Avoid specifying 8804b9b4fd27Smrg # it if it's in CXXFLAGS. Ignore libCrun as 8805b9b4fd27Smrg # -library=stlport4 depends on it. 8806b9b4fd27Smrg case " $CXX $CXXFLAGS " in 8807b9b4fd27Smrg *" -library=stlport4 "*) 8808b9b4fd27Smrg solaris_use_stlport4=yes 8809caade7ccSmrg ;; 8810caade7ccSmrg esac 8811caade7ccSmrg 8812b9b4fd27Smrg # Adding this requires a known-good setup of shared libraries for 8813b9b4fd27Smrg # Sun compiler versions before 5.6, else PIC objects from an old 8814b9b4fd27Smrg # archive will be linked into the output, leading to subtle bugs. 8815b9b4fd27Smrg if test "$solaris_use_stlport4" != yes; then 8816b9b4fd27Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8817b9b4fd27Smrg fi 8818b9b4fd27Smrg ;; 8819b9b4fd27Smrg esac 8820b9b4fd27Smrg ;; 8821b9b4fd27Smrgesac 8822b9b4fd27Smrg]) 8823caade7ccSmrg 8824b9b4fd27Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 8825b9b4fd27Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8826b9b4fd27Smrgesac 8827b9b4fd27Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8828b9b4fd27Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8829b9b4fd27Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8830b9b4fd27Smrgfi 8831b9b4fd27Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8832b9b4fd27Smrg [The directories searched by this compiler when creating a shared library]) 8833b9b4fd27Smrg_LT_TAGDECL([], [predep_objects], [1], 8834b9b4fd27Smrg [Dependencies to place before and after the objects being linked to 8835b9b4fd27Smrg create a shared library]) 8836b9b4fd27Smrg_LT_TAGDECL([], [postdep_objects], [1]) 8837b9b4fd27Smrg_LT_TAGDECL([], [predeps], [1]) 8838b9b4fd27Smrg_LT_TAGDECL([], [postdeps], [1]) 8839b9b4fd27Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 8840b9b4fd27Smrg [The library search path used internally by the compiler when linking 8841b9b4fd27Smrg a shared library]) 8842b9b4fd27Smrg])# _LT_SYS_HIDDEN_LIBDEPS 8843b9b4fd27Smrg 8844b9b4fd27Smrg 8845b9b4fd27Smrg# _LT_PROG_F77 8846b9b4fd27Smrg# ------------ 8847b9b4fd27Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string 8848b9b4fd27Smrg# if there is no fortran compiler, we have our own version here. 8849b9b4fd27Smrgm4_defun([_LT_PROG_F77], 8850b9b4fd27Smrg[ 8851b9b4fd27Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 8852b9b4fd27SmrgAC_PROG_F77 8853b9b4fd27Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 8854b9b4fd27Smrg _lt_disable_F77=yes 8855b9b4fd27Smrgfi 8856b9b4fd27Smrgpopdef([AC_MSG_ERROR]) 8857b9b4fd27Smrg])# _LT_PROG_F77 8858caade7ccSmrg 8859b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 8860b9b4fd27Smrgdnl AC_DEFUN([_LT_PROG_F77], []) 8861caade7ccSmrg 8862caade7ccSmrg 8863b9b4fd27Smrg# _LT_LANG_F77_CONFIG([TAG]) 8864b9b4fd27Smrg# -------------------------- 8865b9b4fd27Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 8866b9b4fd27Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8867b9b4fd27Smrg# to write the compiler configuration to `libtool'. 8868b9b4fd27Smrgm4_defun([_LT_LANG_F77_CONFIG], 8869b9b4fd27Smrg[AC_REQUIRE([_LT_PROG_F77])dnl 8870b9b4fd27SmrgAC_LANG_PUSH(Fortran 77) 8871b9b4fd27Smrg 8872b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8873b9b4fd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 8874b9b4fd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 8875b9b4fd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8876b9b4fd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8877b9b4fd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 8878b9b4fd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8879b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8880b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 8881b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8882b9b4fd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8883b9b4fd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 8884b9b4fd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 8885b9b4fd27Smrg_LT_TAGVAR(module_cmds, $1)= 8886b9b4fd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 8887b9b4fd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8888b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8889b9b4fd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 8890b9b4fd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8891b9b4fd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8892b9b4fd27Smrg 8893b9b4fd27Smrg# Source file extension for f77 test sources. 8894b9b4fd27Smrgac_ext=f 8895b9b4fd27Smrg 8896b9b4fd27Smrg# Object file extension for compiled f77 test sources. 8897b9b4fd27Smrgobjext=o 8898b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 8899b9b4fd27Smrg 8900b9b4fd27Smrg# No sense in running all these tests if we already determined that 8901b9b4fd27Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 8902b9b4fd27Smrg# are currently assumed to apply to all compilers on this platform, 8903b9b4fd27Smrg# and will be corrupted by setting them based on a non-working compiler. 8904b9b4fd27Smrgif test "$_lt_disable_F77" != yes; then 8905b9b4fd27Smrg # Code to be used in simple compile tests 8906b9b4fd27Smrg lt_simple_compile_test_code="\ 8907b9b4fd27Smrg subroutine t 8908b9b4fd27Smrg return 8909b9b4fd27Smrg end 8910b9b4fd27Smrg" 8911b9b4fd27Smrg 8912b9b4fd27Smrg # Code to be used in simple link tests 8913b9b4fd27Smrg lt_simple_link_test_code="\ 8914b9b4fd27Smrg program t 8915b9b4fd27Smrg end 8916b9b4fd27Smrg" 8917b9b4fd27Smrg 8918b9b4fd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8919b9b4fd27Smrg _LT_TAG_COMPILER 8920b9b4fd27Smrg 8921b9b4fd27Smrg # save warnings/boilerplate of simple test code 8922b9b4fd27Smrg _LT_COMPILER_BOILERPLATE 8923b9b4fd27Smrg _LT_LINKER_BOILERPLATE 8924b9b4fd27Smrg 8925b9b4fd27Smrg # Allow CC to be a program name with arguments. 8926b9b4fd27Smrg lt_save_CC="$CC" 8927b9b4fd27Smrg lt_save_GCC=$GCC 8928b9b4fd27Smrg CC=${F77-"f77"} 8929b9b4fd27Smrg compiler=$CC 8930b9b4fd27Smrg _LT_TAGVAR(compiler, $1)=$CC 8931b9b4fd27Smrg _LT_CC_BASENAME([$compiler]) 8932b9b4fd27Smrg GCC=$G77 8933b9b4fd27Smrg if test -n "$compiler"; then 8934b9b4fd27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8935b9b4fd27Smrg AC_MSG_RESULT([$can_build_shared]) 8936b9b4fd27Smrg 8937b9b4fd27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 8938b9b4fd27Smrg test "$can_build_shared" = "no" && enable_shared=no 8939b9b4fd27Smrg 8940b9b4fd27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 8941b9b4fd27Smrg # are all built from PIC. 8942b9b4fd27Smrg case $host_os in 8943b9b4fd27Smrg aix3*) 8944b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 8945b9b4fd27Smrg if test -n "$RANLIB"; then 8946b9b4fd27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8947b9b4fd27Smrg postinstall_cmds='$RANLIB $lib' 8948b9b4fd27Smrg fi 8949caade7ccSmrg ;; 8950b9b4fd27Smrg aix[[4-9]]*) 8951b9b4fd27Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8952b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 8953b9b4fd27Smrg fi 8954caade7ccSmrg ;; 8955b9b4fd27Smrg esac 8956b9b4fd27Smrg AC_MSG_RESULT([$enable_shared]) 8957b9b4fd27Smrg 8958b9b4fd27Smrg AC_MSG_CHECKING([whether to build static libraries]) 8959b9b4fd27Smrg # Make sure either enable_shared or enable_static is yes. 8960b9b4fd27Smrg test "$enable_shared" = yes || enable_static=yes 8961b9b4fd27Smrg AC_MSG_RESULT([$enable_static]) 8962b9b4fd27Smrg 8963b9b4fd27Smrg _LT_TAGVAR(GCC, $1)="$G77" 8964b9b4fd27Smrg _LT_TAGVAR(LD, $1)="$LD" 8965b9b4fd27Smrg 8966b9b4fd27Smrg ## CAVEAT EMPTOR: 8967b9b4fd27Smrg ## There is no encapsulation within the following macros, do not change 8968b9b4fd27Smrg ## the running order or otherwise move them around unless you know exactly 8969b9b4fd27Smrg ## what you are doing... 8970b9b4fd27Smrg _LT_COMPILER_PIC($1) 8971b9b4fd27Smrg _LT_COMPILER_C_O($1) 8972b9b4fd27Smrg _LT_COMPILER_FILE_LOCKS($1) 8973b9b4fd27Smrg _LT_LINKER_SHLIBS($1) 8974b9b4fd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 8975b9b4fd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8976b9b4fd27Smrg 8977b9b4fd27Smrg _LT_CONFIG($1) 8978b9b4fd27Smrg fi # test -n "$compiler" 8979b9b4fd27Smrg 8980b9b4fd27Smrg GCC=$lt_save_GCC 8981b9b4fd27Smrg CC="$lt_save_CC" 8982b9b4fd27Smrgfi # test "$_lt_disable_F77" != yes 8983b9b4fd27Smrg 8984b9b4fd27SmrgAC_LANG_POP 8985b9b4fd27Smrg])# _LT_LANG_F77_CONFIG 8986b9b4fd27Smrg 8987b9b4fd27Smrg 8988b9b4fd27Smrg# _LT_PROG_FC 8989b9b4fd27Smrg# ----------- 8990b9b4fd27Smrg# Since AC_PROG_FC is broken, in that it returns the empty string 8991b9b4fd27Smrg# if there is no fortran compiler, we have our own version here. 8992b9b4fd27Smrgm4_defun([_LT_PROG_FC], 8993b9b4fd27Smrg[ 8994b9b4fd27Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 8995b9b4fd27SmrgAC_PROG_FC 8996b9b4fd27Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 8997b9b4fd27Smrg _lt_disable_FC=yes 8998b9b4fd27Smrgfi 8999b9b4fd27Smrgpopdef([AC_MSG_ERROR]) 9000b9b4fd27Smrg])# _LT_PROG_FC 9001b9b4fd27Smrg 9002b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 9003b9b4fd27Smrgdnl AC_DEFUN([_LT_PROG_FC], []) 9004b9b4fd27Smrg 9005b9b4fd27Smrg 9006b9b4fd27Smrg# _LT_LANG_FC_CONFIG([TAG]) 9007b9b4fd27Smrg# ------------------------- 9008b9b4fd27Smrg# Ensure that the configuration variables for a Fortran compiler are 9009b9b4fd27Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9010b9b4fd27Smrg# to write the compiler configuration to `libtool'. 9011b9b4fd27Smrgm4_defun([_LT_LANG_FC_CONFIG], 9012b9b4fd27Smrg[AC_REQUIRE([_LT_PROG_FC])dnl 9013b9b4fd27SmrgAC_LANG_PUSH(Fortran) 9014b9b4fd27Smrg 9015b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9016b9b4fd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9017b9b4fd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9018b9b4fd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9019b9b4fd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9020b9b4fd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9021b9b4fd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9022b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9023b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9024b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9025b9b4fd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9026b9b4fd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9027b9b4fd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9028b9b4fd27Smrg_LT_TAGVAR(module_cmds, $1)= 9029b9b4fd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9030b9b4fd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9031b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9032b9b4fd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9033b9b4fd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9034b9b4fd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9035b9b4fd27Smrg 9036b9b4fd27Smrg# Source file extension for fc test sources. 9037b9b4fd27Smrgac_ext=${ac_fc_srcext-f} 9038b9b4fd27Smrg 9039b9b4fd27Smrg# Object file extension for compiled fc test sources. 9040b9b4fd27Smrgobjext=o 9041b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 9042b9b4fd27Smrg 9043b9b4fd27Smrg# No sense in running all these tests if we already determined that 9044b9b4fd27Smrg# the FC compiler isn't working. Some variables (like enable_shared) 9045b9b4fd27Smrg# are currently assumed to apply to all compilers on this platform, 9046b9b4fd27Smrg# and will be corrupted by setting them based on a non-working compiler. 9047b9b4fd27Smrgif test "$_lt_disable_FC" != yes; then 9048b9b4fd27Smrg # Code to be used in simple compile tests 9049b9b4fd27Smrg lt_simple_compile_test_code="\ 9050b9b4fd27Smrg subroutine t 9051b9b4fd27Smrg return 9052b9b4fd27Smrg end 9053b9b4fd27Smrg" 9054b9b4fd27Smrg 9055b9b4fd27Smrg # Code to be used in simple link tests 9056b9b4fd27Smrg lt_simple_link_test_code="\ 9057b9b4fd27Smrg program t 9058b9b4fd27Smrg end 9059b9b4fd27Smrg" 9060b9b4fd27Smrg 9061b9b4fd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9062b9b4fd27Smrg _LT_TAG_COMPILER 9063b9b4fd27Smrg 9064b9b4fd27Smrg # save warnings/boilerplate of simple test code 9065b9b4fd27Smrg _LT_COMPILER_BOILERPLATE 9066b9b4fd27Smrg _LT_LINKER_BOILERPLATE 9067b9b4fd27Smrg 9068b9b4fd27Smrg # Allow CC to be a program name with arguments. 9069b9b4fd27Smrg lt_save_CC="$CC" 9070b9b4fd27Smrg lt_save_GCC=$GCC 9071b9b4fd27Smrg CC=${FC-"f95"} 9072b9b4fd27Smrg compiler=$CC 9073b9b4fd27Smrg GCC=$ac_cv_fc_compiler_gnu 9074b9b4fd27Smrg 9075b9b4fd27Smrg _LT_TAGVAR(compiler, $1)=$CC 9076b9b4fd27Smrg _LT_CC_BASENAME([$compiler]) 9077b9b4fd27Smrg 9078b9b4fd27Smrg if test -n "$compiler"; then 9079b9b4fd27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9080b9b4fd27Smrg AC_MSG_RESULT([$can_build_shared]) 9081b9b4fd27Smrg 9082b9b4fd27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9083b9b4fd27Smrg test "$can_build_shared" = "no" && enable_shared=no 9084b9b4fd27Smrg 9085b9b4fd27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9086b9b4fd27Smrg # are all built from PIC. 9087b9b4fd27Smrg case $host_os in 9088b9b4fd27Smrg aix3*) 9089b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 9090b9b4fd27Smrg if test -n "$RANLIB"; then 9091b9b4fd27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9092b9b4fd27Smrg postinstall_cmds='$RANLIB $lib' 9093b9b4fd27Smrg fi 9094caade7ccSmrg ;; 9095b9b4fd27Smrg aix[[4-9]]*) 9096b9b4fd27Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9097b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 9098b9b4fd27Smrg fi 9099b9b4fd27Smrg ;; 9100b9b4fd27Smrg esac 9101b9b4fd27Smrg AC_MSG_RESULT([$enable_shared]) 9102b9b4fd27Smrg 9103b9b4fd27Smrg AC_MSG_CHECKING([whether to build static libraries]) 9104b9b4fd27Smrg # Make sure either enable_shared or enable_static is yes. 9105b9b4fd27Smrg test "$enable_shared" = yes || enable_static=yes 9106b9b4fd27Smrg AC_MSG_RESULT([$enable_static]) 9107b9b4fd27Smrg 9108b9b4fd27Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 9109b9b4fd27Smrg _LT_TAGVAR(LD, $1)="$LD" 9110b9b4fd27Smrg 9111b9b4fd27Smrg ## CAVEAT EMPTOR: 9112b9b4fd27Smrg ## There is no encapsulation within the following macros, do not change 9113b9b4fd27Smrg ## the running order or otherwise move them around unless you know exactly 9114b9b4fd27Smrg ## what you are doing... 9115b9b4fd27Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 9116b9b4fd27Smrg _LT_COMPILER_PIC($1) 9117b9b4fd27Smrg _LT_COMPILER_C_O($1) 9118b9b4fd27Smrg _LT_COMPILER_FILE_LOCKS($1) 9119b9b4fd27Smrg _LT_LINKER_SHLIBS($1) 9120b9b4fd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 9121b9b4fd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9122b9b4fd27Smrg 9123b9b4fd27Smrg _LT_CONFIG($1) 9124b9b4fd27Smrg fi # test -n "$compiler" 9125b9b4fd27Smrg 9126b9b4fd27Smrg GCC=$lt_save_GCC 9127b9b4fd27Smrg CC="$lt_save_CC" 9128b9b4fd27Smrgfi # test "$_lt_disable_FC" != yes 9129b9b4fd27Smrg 9130b9b4fd27SmrgAC_LANG_POP 9131b9b4fd27Smrg])# _LT_LANG_FC_CONFIG 9132b9b4fd27Smrg 9133b9b4fd27Smrg 9134b9b4fd27Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 9135b9b4fd27Smrg# -------------------------- 9136b9b4fd27Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 9137b9b4fd27Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9138b9b4fd27Smrg# to write the compiler configuration to `libtool'. 9139b9b4fd27Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 9140b9b4fd27Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 9141b9b4fd27SmrgAC_LANG_SAVE 9142b9b4fd27Smrg 9143b9b4fd27Smrg# Source file extension for Java test sources. 9144b9b4fd27Smrgac_ext=java 9145b9b4fd27Smrg 9146b9b4fd27Smrg# Object file extension for compiled Java test sources. 9147b9b4fd27Smrgobjext=o 9148b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 9149b9b4fd27Smrg 9150b9b4fd27Smrg# Code to be used in simple compile tests 9151b9b4fd27Smrglt_simple_compile_test_code="class foo {}" 9152b9b4fd27Smrg 9153b9b4fd27Smrg# Code to be used in simple link tests 9154b9b4fd27Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 9155b9b4fd27Smrg 9156b9b4fd27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9157b9b4fd27Smrg_LT_TAG_COMPILER 9158b9b4fd27Smrg 9159b9b4fd27Smrg# save warnings/boilerplate of simple test code 9160b9b4fd27Smrg_LT_COMPILER_BOILERPLATE 9161b9b4fd27Smrg_LT_LINKER_BOILERPLATE 9162b9b4fd27Smrg 9163b9b4fd27Smrg# Allow CC to be a program name with arguments. 9164b9b4fd27Smrglt_save_CC="$CC" 9165b9b4fd27Smrglt_save_GCC=$GCC 9166b9b4fd27SmrgGCC=yes 9167b9b4fd27SmrgCC=${GCJ-"gcj"} 9168b9b4fd27Smrgcompiler=$CC 9169b9b4fd27Smrg_LT_TAGVAR(compiler, $1)=$CC 9170b9b4fd27Smrg_LT_TAGVAR(LD, $1)="$LD" 9171b9b4fd27Smrg_LT_CC_BASENAME([$compiler]) 9172caade7ccSmrg 9173b9b4fd27Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 9174b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9175caade7ccSmrg 9176b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9177485f0483Smrg 9178b9b4fd27Smrgif test -n "$compiler"; then 9179b9b4fd27Smrg _LT_COMPILER_NO_RTTI($1) 9180b9b4fd27Smrg _LT_COMPILER_PIC($1) 9181b9b4fd27Smrg _LT_COMPILER_C_O($1) 9182b9b4fd27Smrg _LT_COMPILER_FILE_LOCKS($1) 9183b9b4fd27Smrg _LT_LINKER_SHLIBS($1) 9184b9b4fd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9185caade7ccSmrg 9186b9b4fd27Smrg _LT_CONFIG($1) 9187b9b4fd27Smrgfi 9188caade7ccSmrg 9189b9b4fd27SmrgAC_LANG_RESTORE 9190caade7ccSmrg 9191b9b4fd27SmrgGCC=$lt_save_GCC 9192b9b4fd27SmrgCC="$lt_save_CC" 9193b9b4fd27Smrg])# _LT_LANG_GCJ_CONFIG 9194caade7ccSmrg 9195caade7ccSmrg 9196b9b4fd27Smrg# _LT_LANG_RC_CONFIG([TAG]) 9197b9b4fd27Smrg# ------------------------- 9198b9b4fd27Smrg# Ensure that the configuration variables for the Windows resource compiler 9199b9b4fd27Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9200b9b4fd27Smrg# to write the compiler configuration to `libtool'. 9201b9b4fd27Smrgm4_defun([_LT_LANG_RC_CONFIG], 9202b9b4fd27Smrg[AC_REQUIRE([LT_PROG_RC])dnl 9203b9b4fd27SmrgAC_LANG_SAVE 9204caade7ccSmrg 9205b9b4fd27Smrg# Source file extension for RC test sources. 9206b9b4fd27Smrgac_ext=rc 9207caade7ccSmrg 9208b9b4fd27Smrg# Object file extension for compiled RC test sources. 9209b9b4fd27Smrgobjext=o 9210b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 9211caade7ccSmrg 9212b9b4fd27Smrg# Code to be used in simple compile tests 9213b9b4fd27Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 9214b9b4fd27Smrg 9215b9b4fd27Smrg# Code to be used in simple link tests 9216b9b4fd27Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 9217b9b4fd27Smrg 9218b9b4fd27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9219b9b4fd27Smrg_LT_TAG_COMPILER 9220b9b4fd27Smrg 9221b9b4fd27Smrg# save warnings/boilerplate of simple test code 9222b9b4fd27Smrg_LT_COMPILER_BOILERPLATE 9223b9b4fd27Smrg_LT_LINKER_BOILERPLATE 9224b9b4fd27Smrg 9225b9b4fd27Smrg# Allow CC to be a program name with arguments. 9226b9b4fd27Smrglt_save_CC="$CC" 9227b9b4fd27Smrglt_save_GCC=$GCC 9228b9b4fd27SmrgGCC= 9229b9b4fd27SmrgCC=${RC-"windres"} 9230b9b4fd27Smrgcompiler=$CC 9231b9b4fd27Smrg_LT_TAGVAR(compiler, $1)=$CC 9232b9b4fd27Smrg_LT_CC_BASENAME([$compiler]) 9233b9b4fd27Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 9234b9b4fd27Smrg 9235b9b4fd27Smrgif test -n "$compiler"; then 9236b9b4fd27Smrg : 9237b9b4fd27Smrg _LT_CONFIG($1) 9238caade7ccSmrgfi 9239caade7ccSmrg 9240b9b4fd27SmrgGCC=$lt_save_GCC 9241b9b4fd27SmrgAC_LANG_RESTORE 9242b9b4fd27SmrgCC="$lt_save_CC" 9243b9b4fd27Smrg])# _LT_LANG_RC_CONFIG 9244b9b4fd27Smrg 9245b9b4fd27Smrg 9246b9b4fd27Smrg# LT_PROG_GCJ 9247b9b4fd27Smrg# ----------- 9248b9b4fd27SmrgAC_DEFUN([LT_PROG_GCJ], 9249b9b4fd27Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 9250b9b4fd27Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 9251b9b4fd27Smrg [AC_CHECK_TOOL(GCJ, gcj,) 9252b9b4fd27Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 9253b9b4fd27Smrg AC_SUBST(GCJFLAGS)])])[]dnl 9254caade7ccSmrg]) 9255caade7ccSmrg 9256b9b4fd27Smrg# Old name: 9257b9b4fd27SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 9258b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 9259b9b4fd27Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 9260caade7ccSmrg 9261caade7ccSmrg 9262b9b4fd27Smrg# LT_PROG_RC 9263b9b4fd27Smrg# ---------- 9264b9b4fd27SmrgAC_DEFUN([LT_PROG_RC], 9265b9b4fd27Smrg[AC_CHECK_TOOL(RC, windres,) 9266b9b4fd27Smrg]) 9267caade7ccSmrg 9268b9b4fd27Smrg# Old name: 9269b9b4fd27SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 9270b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 9271b9b4fd27Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 9272caade7ccSmrg 9273caade7ccSmrg 9274b9b4fd27Smrg# _LT_DECL_EGREP 9275b9b4fd27Smrg# -------------- 9276b9b4fd27Smrg# If we don't have a new enough Autoconf to choose the best grep 9277b9b4fd27Smrg# available, choose the one first in the user's PATH. 9278b9b4fd27Smrgm4_defun([_LT_DECL_EGREP], 9279b9b4fd27Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 9280b9b4fd27SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 9281b9b4fd27Smrgtest -z "$GREP" && GREP=grep 9282b9b4fd27Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 9283b9b4fd27Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 9284b9b4fd27Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 9285b9b4fd27Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 9286b9b4fd27SmrgAC_SUBST([GREP]) 9287b9b4fd27Smrg]) 9288caade7ccSmrg 9289caade7ccSmrg 9290b9b4fd27Smrg# _LT_DECL_OBJDUMP 9291b9b4fd27Smrg# -------------- 9292b9b4fd27Smrg# If we don't have a new enough Autoconf to choose the best objdump 9293b9b4fd27Smrg# available, choose the one first in the user's PATH. 9294b9b4fd27Smrgm4_defun([_LT_DECL_OBJDUMP], 9295b9b4fd27Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 9296b9b4fd27Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9297b9b4fd27Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 9298b9b4fd27SmrgAC_SUBST([OBJDUMP]) 9299b9b4fd27Smrg]) 9300caade7ccSmrg 9301caade7ccSmrg 9302b9b4fd27Smrg# _LT_DECL_SED 9303b9b4fd27Smrg# ------------ 9304b9b4fd27Smrg# Check for a fully-functional sed program, that truncates 9305b9b4fd27Smrg# as few characters as possible. Prefer GNU sed if found. 9306b9b4fd27Smrgm4_defun([_LT_DECL_SED], 9307b9b4fd27Smrg[AC_PROG_SED 9308b9b4fd27Smrgtest -z "$SED" && SED=sed 9309b9b4fd27SmrgXsed="$SED -e 1s/^X//" 9310b9b4fd27Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 9311b9b4fd27Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 9312b9b4fd27Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 9313b9b4fd27Smrg])# _LT_DECL_SED 9314b9b4fd27Smrg 9315b9b4fd27Smrgm4_ifndef([AC_PROG_SED], [ 9316b9b4fd27Smrg# NOTE: This macro has been submitted for inclusion into # 9317b9b4fd27Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 9318b9b4fd27Smrg# a released version of Autoconf we should remove this # 9319b9b4fd27Smrg# macro and use it instead. # 9320b9b4fd27Smrg 9321b9b4fd27Smrgm4_defun([AC_PROG_SED], 9322b9b4fd27Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 9323b9b4fd27SmrgAC_CACHE_VAL(lt_cv_path_SED, 9324b9b4fd27Smrg[# Loop through the user's path and test for sed and gsed. 9325b9b4fd27Smrg# Then use that list of sed's as ones to test for truncation. 9326b9b4fd27Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9327b9b4fd27Smrgfor as_dir in $PATH 9328b9b4fd27Smrgdo 9329b9b4fd27Smrg IFS=$as_save_IFS 9330b9b4fd27Smrg test -z "$as_dir" && as_dir=. 9331b9b4fd27Smrg for lt_ac_prog in sed gsed; do 9332b9b4fd27Smrg for ac_exec_ext in '' $ac_executable_extensions; do 9333b9b4fd27Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 9334b9b4fd27Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 9335caade7ccSmrg fi 9336b9b4fd27Smrg done 9337b9b4fd27Smrg done 9338b9b4fd27Smrgdone 9339b9b4fd27SmrgIFS=$as_save_IFS 9340b9b4fd27Smrglt_ac_max=0 9341b9b4fd27Smrglt_ac_count=0 9342b9b4fd27Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 9343b9b4fd27Smrg# along with /bin/sed that truncates output. 9344b9b4fd27Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 9345b9b4fd27Smrg test ! -f $lt_ac_sed && continue 9346b9b4fd27Smrg cat /dev/null > conftest.in 9347b9b4fd27Smrg lt_ac_count=0 9348b9b4fd27Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 9349b9b4fd27Smrg # Check for GNU sed and select it if it is found. 9350b9b4fd27Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 9351b9b4fd27Smrg lt_cv_path_SED=$lt_ac_sed 9352b9b4fd27Smrg break 9353b9b4fd27Smrg fi 9354b9b4fd27Smrg while true; do 9355b9b4fd27Smrg cat conftest.in conftest.in >conftest.tmp 9356b9b4fd27Smrg mv conftest.tmp conftest.in 9357b9b4fd27Smrg cp conftest.in conftest.nl 9358b9b4fd27Smrg echo >>conftest.nl 9359b9b4fd27Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 9360b9b4fd27Smrg cmp -s conftest.out conftest.nl || break 9361b9b4fd27Smrg # 10000 chars as input seems more than enough 9362b9b4fd27Smrg test $lt_ac_count -gt 10 && break 9363b9b4fd27Smrg lt_ac_count=`expr $lt_ac_count + 1` 9364b9b4fd27Smrg if test $lt_ac_count -gt $lt_ac_max; then 9365b9b4fd27Smrg lt_ac_max=$lt_ac_count 9366b9b4fd27Smrg lt_cv_path_SED=$lt_ac_sed 9367b9b4fd27Smrg fi 9368b9b4fd27Smrg done 9369b9b4fd27Smrgdone 9370b9b4fd27Smrg]) 9371b9b4fd27SmrgSED=$lt_cv_path_SED 9372b9b4fd27SmrgAC_SUBST([SED]) 9373b9b4fd27SmrgAC_MSG_RESULT([$SED]) 9374b9b4fd27Smrg])#AC_PROG_SED 9375b9b4fd27Smrg])#m4_ifndef 9376b9b4fd27Smrg 9377b9b4fd27Smrg# Old name: 9378b9b4fd27SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 9379b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 9380b9b4fd27Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 9381b9b4fd27Smrg 9382b9b4fd27Smrg 9383b9b4fd27Smrg# _LT_CHECK_SHELL_FEATURES 9384b9b4fd27Smrg# ------------------------ 9385b9b4fd27Smrg# Find out whether the shell is Bourne or XSI compatible, 9386b9b4fd27Smrg# or has some other useful features. 9387b9b4fd27Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 9388b9b4fd27Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 9389b9b4fd27Smrg# Try some XSI features 9390b9b4fd27Smrgxsi_shell=no 9391b9b4fd27Smrg( _lt_dummy="a/b/c" 9392b9b4fd27Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 9393b9b4fd27Smrg = c,a/b,, \ 9394b9b4fd27Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 9395b9b4fd27Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 9396b9b4fd27Smrg && xsi_shell=yes 9397b9b4fd27SmrgAC_MSG_RESULT([$xsi_shell]) 9398b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 9399b9b4fd27Smrg 9400b9b4fd27SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 9401b9b4fd27Smrglt_shell_append=no 9402b9b4fd27Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 9403b9b4fd27Smrg >/dev/null 2>&1 \ 9404b9b4fd27Smrg && lt_shell_append=yes 9405b9b4fd27SmrgAC_MSG_RESULT([$lt_shell_append]) 9406b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 9407b9b4fd27Smrg 9408b9b4fd27Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 9409b9b4fd27Smrg lt_unset=unset 9410b9b4fd27Smrgelse 9411b9b4fd27Smrg lt_unset=false 9412b9b4fd27Smrgfi 9413b9b4fd27Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 9414b9b4fd27Smrg 9415b9b4fd27Smrg# test EBCDIC or ASCII 9416b9b4fd27Smrgcase `echo X|tr X '\101'` in 9417b9b4fd27Smrg A) # ASCII based system 9418b9b4fd27Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 9419b9b4fd27Smrg lt_SP2NL='tr \040 \012' 9420b9b4fd27Smrg lt_NL2SP='tr \015\012 \040\040' 9421b9b4fd27Smrg ;; 9422b9b4fd27Smrg *) # EBCDIC based system 9423b9b4fd27Smrg lt_SP2NL='tr \100 \n' 9424b9b4fd27Smrg lt_NL2SP='tr \r\n \100\100' 9425b9b4fd27Smrg ;; 9426b9b4fd27Smrgesac 9427b9b4fd27Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 9428b9b4fd27Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 9429b9b4fd27Smrg])# _LT_CHECK_SHELL_FEATURES 9430caade7ccSmrg 9431caade7ccSmrg 9432b9b4fd27Smrg# _LT_PROG_XSI_SHELLFNS 9433b9b4fd27Smrg# --------------------- 9434b9b4fd27Smrg# Bourne and XSI compatible variants of some useful shell functions. 9435b9b4fd27Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 9436b9b4fd27Smrg[case $xsi_shell in 9437b9b4fd27Smrg yes) 9438b9b4fd27Smrg cat << \_LT_EOF >> "$cfgfile" 9439b9b4fd27Smrg 9440b9b4fd27Smrg# func_dirname file append nondir_replacement 9441b9b4fd27Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9442b9b4fd27Smrg# otherwise set result to NONDIR_REPLACEMENT. 9443b9b4fd27Smrgfunc_dirname () 9444b9b4fd27Smrg{ 9445b9b4fd27Smrg case ${1} in 9446b9b4fd27Smrg */*) func_dirname_result="${1%/*}${2}" ;; 9447b9b4fd27Smrg * ) func_dirname_result="${3}" ;; 9448b9b4fd27Smrg esac 9449b9b4fd27Smrg} 9450caade7ccSmrg 9451b9b4fd27Smrg# func_basename file 9452b9b4fd27Smrgfunc_basename () 9453b9b4fd27Smrg{ 9454b9b4fd27Smrg func_basename_result="${1##*/}" 9455b9b4fd27Smrg} 9456caade7ccSmrg 9457b9b4fd27Smrg# func_dirname_and_basename file append nondir_replacement 9458b9b4fd27Smrg# perform func_basename and func_dirname in a single function 9459b9b4fd27Smrg# call: 9460b9b4fd27Smrg# dirname: Compute the dirname of FILE. If nonempty, 9461b9b4fd27Smrg# add APPEND to the result, otherwise set result 9462b9b4fd27Smrg# to NONDIR_REPLACEMENT. 9463b9b4fd27Smrg# value returned in "$func_dirname_result" 9464b9b4fd27Smrg# basename: Compute filename of FILE. 9465b9b4fd27Smrg# value retuned in "$func_basename_result" 9466b9b4fd27Smrg# Implementation must be kept synchronized with func_dirname 9467b9b4fd27Smrg# and func_basename. For efficiency, we do not delegate to 9468b9b4fd27Smrg# those functions but instead duplicate the functionality here. 9469b9b4fd27Smrgfunc_dirname_and_basename () 9470b9b4fd27Smrg{ 9471b9b4fd27Smrg case ${1} in 9472b9b4fd27Smrg */*) func_dirname_result="${1%/*}${2}" ;; 9473b9b4fd27Smrg * ) func_dirname_result="${3}" ;; 9474b9b4fd27Smrg esac 9475b9b4fd27Smrg func_basename_result="${1##*/}" 9476b9b4fd27Smrg} 9477caade7ccSmrg 9478b9b4fd27Smrg# func_stripname prefix suffix name 9479b9b4fd27Smrg# strip PREFIX and SUFFIX off of NAME. 9480b9b4fd27Smrg# PREFIX and SUFFIX must not contain globbing or regex special 9481b9b4fd27Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9482b9b4fd27Smrg# dot (in which case that matches only a dot). 9483b9b4fd27Smrgfunc_stripname () 9484b9b4fd27Smrg{ 9485b9b4fd27Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 9486b9b4fd27Smrg # positional parameters, so assign one to ordinary parameter first. 9487b9b4fd27Smrg func_stripname_result=${3} 9488b9b4fd27Smrg func_stripname_result=${func_stripname_result#"${1}"} 9489b9b4fd27Smrg func_stripname_result=${func_stripname_result%"${2}"} 9490b9b4fd27Smrg} 9491caade7ccSmrg 9492b9b4fd27Smrg# func_opt_split 9493b9b4fd27Smrgfunc_opt_split () 9494b9b4fd27Smrg{ 9495b9b4fd27Smrg func_opt_split_opt=${1%%=*} 9496b9b4fd27Smrg func_opt_split_arg=${1#*=} 9497b9b4fd27Smrg} 9498caade7ccSmrg 9499b9b4fd27Smrg# func_lo2o object 9500b9b4fd27Smrgfunc_lo2o () 9501b9b4fd27Smrg{ 9502b9b4fd27Smrg case ${1} in 9503b9b4fd27Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9504b9b4fd27Smrg *) func_lo2o_result=${1} ;; 9505b9b4fd27Smrg esac 9506b9b4fd27Smrg} 9507caade7ccSmrg 9508b9b4fd27Smrg# func_xform libobj-or-source 9509b9b4fd27Smrgfunc_xform () 9510b9b4fd27Smrg{ 9511b9b4fd27Smrg func_xform_result=${1%.*}.lo 9512b9b4fd27Smrg} 9513caade7ccSmrg 9514b9b4fd27Smrg# func_arith arithmetic-term... 9515b9b4fd27Smrgfunc_arith () 9516b9b4fd27Smrg{ 9517b9b4fd27Smrg func_arith_result=$(( $[*] )) 9518b9b4fd27Smrg} 9519b9b4fd27Smrg 9520b9b4fd27Smrg# func_len string 9521b9b4fd27Smrg# STRING may not start with a hyphen. 9522b9b4fd27Smrgfunc_len () 9523b9b4fd27Smrg{ 9524b9b4fd27Smrg func_len_result=${#1} 9525b9b4fd27Smrg} 9526caade7ccSmrg 9527caade7ccSmrg_LT_EOF 9528b9b4fd27Smrg ;; 9529b9b4fd27Smrg *) # Bourne compatible functions. 9530b9b4fd27Smrg cat << \_LT_EOF >> "$cfgfile" 9531caade7ccSmrg 9532b9b4fd27Smrg# func_dirname file append nondir_replacement 9533b9b4fd27Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9534b9b4fd27Smrg# otherwise set result to NONDIR_REPLACEMENT. 9535b9b4fd27Smrgfunc_dirname () 9536b9b4fd27Smrg{ 9537b9b4fd27Smrg # Extract subdirectory from the argument. 9538b9b4fd27Smrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 9539b9b4fd27Smrg if test "X$func_dirname_result" = "X${1}"; then 9540b9b4fd27Smrg func_dirname_result="${3}" 9541b9b4fd27Smrg else 9542b9b4fd27Smrg func_dirname_result="$func_dirname_result${2}" 9543b9b4fd27Smrg fi 9544b9b4fd27Smrg} 9545caade7ccSmrg 9546b9b4fd27Smrg# func_basename file 9547b9b4fd27Smrgfunc_basename () 9548b9b4fd27Smrg{ 9549b9b4fd27Smrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 9550b9b4fd27Smrg} 9551caade7ccSmrg 9552b9b4fd27Smrgdnl func_dirname_and_basename 9553b9b4fd27Smrgdnl A portable version of this function is already defined in general.m4sh 9554b9b4fd27Smrgdnl so there is no need for it here. 9555b9b4fd27Smrg 9556b9b4fd27Smrg# func_stripname prefix suffix name 9557b9b4fd27Smrg# strip PREFIX and SUFFIX off of NAME. 9558b9b4fd27Smrg# PREFIX and SUFFIX must not contain globbing or regex special 9559b9b4fd27Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9560b9b4fd27Smrg# dot (in which case that matches only a dot). 9561b9b4fd27Smrg# func_strip_suffix prefix name 9562b9b4fd27Smrgfunc_stripname () 9563b9b4fd27Smrg{ 9564b9b4fd27Smrg case ${2} in 9565b9b4fd27Smrg .*) func_stripname_result=`$ECHO "X${3}" \ 9566b9b4fd27Smrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 9567b9b4fd27Smrg *) func_stripname_result=`$ECHO "X${3}" \ 9568b9b4fd27Smrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 9569b9b4fd27Smrg esac 9570b9b4fd27Smrg} 9571caade7ccSmrg 9572b9b4fd27Smrg# sed scripts: 9573b9b4fd27Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 9574b9b4fd27Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 9575caade7ccSmrg 9576b9b4fd27Smrg# func_opt_split 9577b9b4fd27Smrgfunc_opt_split () 9578b9b4fd27Smrg{ 9579b9b4fd27Smrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 9580b9b4fd27Smrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 9581b9b4fd27Smrg} 9582caade7ccSmrg 9583b9b4fd27Smrg# func_lo2o object 9584b9b4fd27Smrgfunc_lo2o () 9585b9b4fd27Smrg{ 9586b9b4fd27Smrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 9587b9b4fd27Smrg} 9588caade7ccSmrg 9589b9b4fd27Smrg# func_xform libobj-or-source 9590b9b4fd27Smrgfunc_xform () 9591b9b4fd27Smrg{ 9592b9b4fd27Smrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 9593b9b4fd27Smrg} 9594caade7ccSmrg 9595b9b4fd27Smrg# func_arith arithmetic-term... 9596b9b4fd27Smrgfunc_arith () 9597b9b4fd27Smrg{ 9598b9b4fd27Smrg func_arith_result=`expr "$[@]"` 9599b9b4fd27Smrg} 9600caade7ccSmrg 9601b9b4fd27Smrg# func_len string 9602b9b4fd27Smrg# STRING may not start with a hyphen. 9603b9b4fd27Smrgfunc_len () 9604b9b4fd27Smrg{ 9605b9b4fd27Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 9606b9b4fd27Smrg} 9607caade7ccSmrg 9608b9b4fd27Smrg_LT_EOF 9609b9b4fd27Smrgesac 9610caade7ccSmrg 9611b9b4fd27Smrgcase $lt_shell_append in 9612b9b4fd27Smrg yes) 9613b9b4fd27Smrg cat << \_LT_EOF >> "$cfgfile" 9614caade7ccSmrg 9615b9b4fd27Smrg# func_append var value 9616b9b4fd27Smrg# Append VALUE to the end of shell variable VAR. 9617b9b4fd27Smrgfunc_append () 9618b9b4fd27Smrg{ 9619b9b4fd27Smrg eval "$[1]+=\$[2]" 9620b9b4fd27Smrg} 9621b9b4fd27Smrg_LT_EOF 9622b9b4fd27Smrg ;; 9623b9b4fd27Smrg *) 9624b9b4fd27Smrg cat << \_LT_EOF >> "$cfgfile" 9625caade7ccSmrg 9626b9b4fd27Smrg# func_append var value 9627b9b4fd27Smrg# Append VALUE to the end of shell variable VAR. 9628b9b4fd27Smrgfunc_append () 9629b9b4fd27Smrg{ 9630b9b4fd27Smrg eval "$[1]=\$$[1]\$[2]" 9631b9b4fd27Smrg} 9632caade7ccSmrg 9633b9b4fd27Smrg_LT_EOF 9634b9b4fd27Smrg ;; 9635b9b4fd27Smrg esac 9636b9b4fd27Smrg]) 9637caade7ccSmrg 9638b9b4fd27Smrg# Helper functions for option handling. -*- Autoconf -*- 9639b9b4fd27Smrg# 9640b9b4fd27Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9641b9b4fd27Smrg# Written by Gary V. Vaughan, 2004 9642b9b4fd27Smrg# 9643b9b4fd27Smrg# This file is free software; the Free Software Foundation gives 9644b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without 9645b9b4fd27Smrg# modifications, as long as this notice is preserved. 9646caade7ccSmrg 9647b9b4fd27Smrg# serial 6 ltoptions.m4 9648caade7ccSmrg 9649b9b4fd27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9650b9b4fd27SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9651b9b4fd27Smrg 9652b9b4fd27Smrg 9653b9b4fd27Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9654b9b4fd27Smrg# ------------------------------------------ 9655b9b4fd27Smrgm4_define([_LT_MANGLE_OPTION], 9656b9b4fd27Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9657b9b4fd27Smrg 9658b9b4fd27Smrg 9659b9b4fd27Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9660b9b4fd27Smrg# --------------------------------------- 9661b9b4fd27Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9662b9b4fd27Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9663b9b4fd27Smrg# saved as a flag. 9664b9b4fd27Smrgm4_define([_LT_SET_OPTION], 9665b9b4fd27Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9666b9b4fd27Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9667b9b4fd27Smrg _LT_MANGLE_DEFUN([$1], [$2]), 9668b9b4fd27Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9669b9b4fd27Smrg]) 9670b9b4fd27Smrg 9671b9b4fd27Smrg 9672b9b4fd27Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9673b9b4fd27Smrg# ------------------------------------------------------------ 9674b9b4fd27Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9675b9b4fd27Smrgm4_define([_LT_IF_OPTION], 9676b9b4fd27Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9677b9b4fd27Smrg 9678b9b4fd27Smrg 9679b9b4fd27Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9680b9b4fd27Smrg# ------------------------------------------------------- 9681b9b4fd27Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9682b9b4fd27Smrg# are set. 9683b9b4fd27Smrgm4_define([_LT_UNLESS_OPTIONS], 9684b9b4fd27Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9685b9b4fd27Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9686b9b4fd27Smrg [m4_define([$0_found])])])[]dnl 9687b9b4fd27Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9688b9b4fd27Smrg])[]dnl 9689b9b4fd27Smrg]) 9690caade7ccSmrg 9691caade7ccSmrg 9692b9b4fd27Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9693b9b4fd27Smrg# ---------------------------------------- 9694b9b4fd27Smrg# OPTION-LIST is a space-separated list of Libtool options associated 9695b9b4fd27Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 9696b9b4fd27Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9697b9b4fd27Smrg# the unknown option and exit. 9698b9b4fd27Smrgm4_defun([_LT_SET_OPTIONS], 9699b9b4fd27Smrg[# Set options 9700b9b4fd27Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9701b9b4fd27Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 9702b9b4fd27Smrg 9703b9b4fd27Smrgm4_if([$1],[LT_INIT],[ 9704b9b4fd27Smrg dnl 9705b9b4fd27Smrg dnl Simply set some default values (i.e off) if boolean options were not 9706b9b4fd27Smrg dnl specified: 9707b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9708b9b4fd27Smrg ]) 9709b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9710b9b4fd27Smrg ]) 9711b9b4fd27Smrg dnl 9712b9b4fd27Smrg dnl If no reference was made to various pairs of opposing options, then 9713b9b4fd27Smrg dnl we run the default mode handler for the pair. For example, if neither 9714b9b4fd27Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 9715b9b4fd27Smrg dnl archives by default: 9716b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9717b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9718b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9719b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9720b9b4fd27Smrg [_LT_ENABLE_FAST_INSTALL]) 9721b9b4fd27Smrg ]) 9722b9b4fd27Smrg])# _LT_SET_OPTIONS 9723caade7ccSmrg 9724caade7ccSmrg 9725caade7ccSmrg 9726b9b4fd27Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9727b9b4fd27Smrg# ----------------------------------------- 9728b9b4fd27Smrgm4_define([_LT_MANGLE_DEFUN], 9729b9b4fd27Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9730caade7ccSmrg 9731caade7ccSmrg 9732b9b4fd27Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9733b9b4fd27Smrg# ----------------------------------------------- 9734b9b4fd27Smrgm4_define([LT_OPTION_DEFINE], 9735b9b4fd27Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9736b9b4fd27Smrg])# LT_OPTION_DEFINE 9737caade7ccSmrg 9738caade7ccSmrg 9739b9b4fd27Smrg# dlopen 9740b9b4fd27Smrg# ------ 9741b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9742b9b4fd27Smrg]) 9743caade7ccSmrg 9744b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 9745b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 9746b9b4fd27SmrgAC_DIAGNOSE([obsolete], 9747b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9748b9b4fd27Smrgput the `dlopen' option into LT_INIT's first parameter.]) 9749b9b4fd27Smrg]) 9750caade7ccSmrg 9751b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 9752b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9753caade7ccSmrg 9754caade7ccSmrg 9755b9b4fd27Smrg# win32-dll 9756b9b4fd27Smrg# --------- 9757b9b4fd27Smrg# Declare package support for building win32 dll's. 9758b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 9759b9b4fd27Smrg[enable_win32_dll=yes 9760caade7ccSmrg 9761b9b4fd27Smrgcase $host in 9762b9b4fd27Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 9763b9b4fd27Smrg AC_CHECK_TOOL(AS, as, false) 9764b9b4fd27Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9765b9b4fd27Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 9766b9b4fd27Smrg ;; 9767b9b4fd27Smrgesac 9768caade7ccSmrg 9769b9b4fd27Smrgtest -z "$AS" && AS=as 9770b9b4fd27Smrg_LT_DECL([], [AS], [0], [Assembler program])dnl 9771caade7ccSmrg 9772b9b4fd27Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 9773b9b4fd27Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 9774caade7ccSmrg 9775b9b4fd27Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9776b9b4fd27Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 9777b9b4fd27Smrg])# win32-dll 9778caade7ccSmrg 9779b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9780b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9781b9b4fd27Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 9782b9b4fd27SmrgAC_DIAGNOSE([obsolete], 9783b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9784b9b4fd27Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 9785b9b4fd27Smrg]) 9786caade7ccSmrg 9787b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 9788b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9789caade7ccSmrg 9790caade7ccSmrg 9791b9b4fd27Smrg# _LT_ENABLE_SHARED([DEFAULT]) 9792b9b4fd27Smrg# ---------------------------- 9793b9b4fd27Smrg# implement the --enable-shared flag, and supports the `shared' and 9794b9b4fd27Smrg# `disable-shared' LT_INIT options. 9795b9b4fd27Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9796b9b4fd27Smrgm4_define([_LT_ENABLE_SHARED], 9797b9b4fd27Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9798b9b4fd27SmrgAC_ARG_ENABLE([shared], 9799b9b4fd27Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9800b9b4fd27Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9801b9b4fd27Smrg [p=${PACKAGE-default} 9802b9b4fd27Smrg case $enableval in 9803b9b4fd27Smrg yes) enable_shared=yes ;; 9804b9b4fd27Smrg no) enable_shared=no ;; 9805b9b4fd27Smrg *) 9806b9b4fd27Smrg enable_shared=no 9807b9b4fd27Smrg # Look at the argument we got. We use all the common list separators. 9808b9b4fd27Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9809b9b4fd27Smrg for pkg in $enableval; do 9810b9b4fd27Smrg IFS="$lt_save_ifs" 9811b9b4fd27Smrg if test "X$pkg" = "X$p"; then 9812b9b4fd27Smrg enable_shared=yes 9813b9b4fd27Smrg fi 9814b9b4fd27Smrg done 9815b9b4fd27Smrg IFS="$lt_save_ifs" 9816caade7ccSmrg ;; 9817b9b4fd27Smrg esac], 9818b9b4fd27Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9819caade7ccSmrg 9820b9b4fd27Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 9821b9b4fd27Smrg [Whether or not to build shared libraries]) 9822b9b4fd27Smrg])# _LT_ENABLE_SHARED 9823caade7ccSmrg 9824b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9825b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9826caade7ccSmrg 9827b9b4fd27Smrg# Old names: 9828b9b4fd27SmrgAC_DEFUN([AC_ENABLE_SHARED], 9829b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9830b9b4fd27Smrg]) 9831caade7ccSmrg 9832b9b4fd27SmrgAC_DEFUN([AC_DISABLE_SHARED], 9833b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9834b9b4fd27Smrg]) 9835caade7ccSmrg 9836b9b4fd27SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9837b9b4fd27SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9838b9b4fd27Smrg 9839b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 9840b9b4fd27Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 9841b9b4fd27Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9842caade7ccSmrg 9843caade7ccSmrg 9844caade7ccSmrg 9845b9b4fd27Smrg# _LT_ENABLE_STATIC([DEFAULT]) 9846b9b4fd27Smrg# ---------------------------- 9847b9b4fd27Smrg# implement the --enable-static flag, and support the `static' and 9848b9b4fd27Smrg# `disable-static' LT_INIT options. 9849b9b4fd27Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9850b9b4fd27Smrgm4_define([_LT_ENABLE_STATIC], 9851b9b4fd27Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9852b9b4fd27SmrgAC_ARG_ENABLE([static], 9853b9b4fd27Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9854b9b4fd27Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9855b9b4fd27Smrg [p=${PACKAGE-default} 9856b9b4fd27Smrg case $enableval in 9857b9b4fd27Smrg yes) enable_static=yes ;; 9858b9b4fd27Smrg no) enable_static=no ;; 9859caade7ccSmrg *) 9860b9b4fd27Smrg enable_static=no 9861b9b4fd27Smrg # Look at the argument we got. We use all the common list separators. 9862b9b4fd27Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9863b9b4fd27Smrg for pkg in $enableval; do 9864b9b4fd27Smrg IFS="$lt_save_ifs" 9865b9b4fd27Smrg if test "X$pkg" = "X$p"; then 9866b9b4fd27Smrg enable_static=yes 9867b9b4fd27Smrg fi 9868b9b4fd27Smrg done 9869b9b4fd27Smrg IFS="$lt_save_ifs" 9870caade7ccSmrg ;; 9871b9b4fd27Smrg esac], 9872b9b4fd27Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9873caade7ccSmrg 9874b9b4fd27Smrg _LT_DECL([build_old_libs], [enable_static], [0], 9875b9b4fd27Smrg [Whether or not to build static libraries]) 9876b9b4fd27Smrg])# _LT_ENABLE_STATIC 9877caade7ccSmrg 9878b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9879b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9880caade7ccSmrg 9881b9b4fd27Smrg# Old names: 9882b9b4fd27SmrgAC_DEFUN([AC_ENABLE_STATIC], 9883b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9884b9b4fd27Smrg]) 9885caade7ccSmrg 9886b9b4fd27SmrgAC_DEFUN([AC_DISABLE_STATIC], 9887b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 9888b9b4fd27Smrg]) 9889caade7ccSmrg 9890b9b4fd27SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9891b9b4fd27SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9892b9b4fd27Smrg 9893b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 9894b9b4fd27Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 9895b9b4fd27Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9896caade7ccSmrg 9897caade7ccSmrg 9898caade7ccSmrg 9899b9b4fd27Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9900b9b4fd27Smrg# ---------------------------------- 9901b9b4fd27Smrg# implement the --enable-fast-install flag, and support the `fast-install' 9902b9b4fd27Smrg# and `disable-fast-install' LT_INIT options. 9903b9b4fd27Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9904b9b4fd27Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 9905b9b4fd27Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9906b9b4fd27SmrgAC_ARG_ENABLE([fast-install], 9907b9b4fd27Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9908b9b4fd27Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9909b9b4fd27Smrg [p=${PACKAGE-default} 9910b9b4fd27Smrg case $enableval in 9911b9b4fd27Smrg yes) enable_fast_install=yes ;; 9912b9b4fd27Smrg no) enable_fast_install=no ;; 9913b9b4fd27Smrg *) 9914b9b4fd27Smrg enable_fast_install=no 9915b9b4fd27Smrg # Look at the argument we got. We use all the common list separators. 9916b9b4fd27Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9917b9b4fd27Smrg for pkg in $enableval; do 9918b9b4fd27Smrg IFS="$lt_save_ifs" 9919b9b4fd27Smrg if test "X$pkg" = "X$p"; then 9920b9b4fd27Smrg enable_fast_install=yes 9921b9b4fd27Smrg fi 9922b9b4fd27Smrg done 9923b9b4fd27Smrg IFS="$lt_save_ifs" 9924b9b4fd27Smrg ;; 9925b9b4fd27Smrg esac], 9926b9b4fd27Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9927caade7ccSmrg 9928b9b4fd27Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 9929b9b4fd27Smrg [Whether or not to optimize for fast installation])dnl 9930b9b4fd27Smrg])# _LT_ENABLE_FAST_INSTALL 9931caade7ccSmrg 9932b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9933b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9934caade7ccSmrg 9935b9b4fd27Smrg# Old names: 9936b9b4fd27SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 9937b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9938b9b4fd27SmrgAC_DIAGNOSE([obsolete], 9939b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9940b9b4fd27Smrgthe `fast-install' option into LT_INIT's first parameter.]) 9941caade7ccSmrg]) 9942caade7ccSmrg 9943b9b4fd27SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 9944b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9945b9b4fd27SmrgAC_DIAGNOSE([obsolete], 9946b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9947b9b4fd27Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 9948caade7ccSmrg]) 9949caade7ccSmrg 9950b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 9951b9b4fd27Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9952b9b4fd27Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9953485f0483Smrg 9954485f0483Smrg 9955b9b4fd27Smrg# _LT_WITH_PIC([MODE]) 9956b9b4fd27Smrg# -------------------- 9957b9b4fd27Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9958b9b4fd27Smrg# LT_INIT options. 9959b9b4fd27Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9960b9b4fd27Smrgm4_define([_LT_WITH_PIC], 9961b9b4fd27Smrg[AC_ARG_WITH([pic], 9962b9b4fd27Smrg [AS_HELP_STRING([--with-pic], 9963b9b4fd27Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9964b9b4fd27Smrg [pic_mode="$withval"], 9965b9b4fd27Smrg [pic_mode=default]) 9966485f0483Smrg 9967b9b4fd27Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9968485f0483Smrg 9969b9b4fd27Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9970b9b4fd27Smrg])# _LT_WITH_PIC 9971b9b4fd27Smrg 9972b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9973b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9974b9b4fd27Smrg 9975b9b4fd27Smrg# Old name: 9976b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 9977b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 9978b9b4fd27SmrgAC_DIAGNOSE([obsolete], 9979b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9980b9b4fd27Smrgput the `pic-only' option into LT_INIT's first parameter.]) 9981caade7ccSmrg]) 9982caade7ccSmrg 9983b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 9984b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9985caade7ccSmrg 9986caade7ccSmrg 9987b9b4fd27Smrgm4_define([_LTDL_MODE], []) 9988b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9989b9b4fd27Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 9990b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 9991b9b4fd27Smrg [m4_define([_LTDL_MODE], [recursive])]) 9992b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 9993b9b4fd27Smrg [m4_define([_LTDL_MODE], [subproject])]) 9994b9b4fd27Smrg 9995b9b4fd27Smrgm4_define([_LTDL_TYPE], []) 9996b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 9997b9b4fd27Smrg [m4_define([_LTDL_TYPE], [installable])]) 9998b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 9999b9b4fd27Smrg [m4_define([_LTDL_TYPE], [convenience])]) 10000b9b4fd27Smrg 10001b9b4fd27Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 10002caade7ccSmrg# 10003b9b4fd27Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 10004b9b4fd27Smrg# Written by Gary V. Vaughan, 2004 10005caade7ccSmrg# 10006b9b4fd27Smrg# This file is free software; the Free Software Foundation gives 10007b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without 10008b9b4fd27Smrg# modifications, as long as this notice is preserved. 10009caade7ccSmrg 10010b9b4fd27Smrg# serial 6 ltsugar.m4 10011caade7ccSmrg 10012b9b4fd27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 10013b9b4fd27SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 10014caade7ccSmrg 10015b9b4fd27Smrg 10016b9b4fd27Smrg# lt_join(SEP, ARG1, [ARG2...]) 10017485f0483Smrg# ----------------------------- 10018b9b4fd27Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 10019b9b4fd27Smrg# associated separator. 10020b9b4fd27Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 10021b9b4fd27Smrg# versions in m4sugar had bugs. 10022b9b4fd27Smrgm4_define([lt_join], 10023b9b4fd27Smrg[m4_if([$#], [1], [], 10024b9b4fd27Smrg [$#], [2], [[$2]], 10025b9b4fd27Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 10026b9b4fd27Smrgm4_define([_lt_join], 10027b9b4fd27Smrg[m4_if([$#$2], [2], [], 10028b9b4fd27Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 10029b9b4fd27Smrg 10030b9b4fd27Smrg 10031b9b4fd27Smrg# lt_car(LIST) 10032b9b4fd27Smrg# lt_cdr(LIST) 10033b9b4fd27Smrg# ------------ 10034b9b4fd27Smrg# Manipulate m4 lists. 10035b9b4fd27Smrg# These macros are necessary as long as will still need to support 10036b9b4fd27Smrg# Autoconf-2.59 which quotes differently. 10037b9b4fd27Smrgm4_define([lt_car], [[$1]]) 10038b9b4fd27Smrgm4_define([lt_cdr], 10039b9b4fd27Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 10040b9b4fd27Smrg [$#], 1, [], 10041b9b4fd27Smrg [m4_dquote(m4_shift($@))])]) 10042b9b4fd27Smrgm4_define([lt_unquote], $1) 10043b9b4fd27Smrg 10044b9b4fd27Smrg 10045b9b4fd27Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 10046b9b4fd27Smrg# ------------------------------------------ 10047b9b4fd27Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 10048b9b4fd27Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 10049b9b4fd27Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 10050b9b4fd27Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 10051b9b4fd27Smrg# than defined and empty). 10052b9b4fd27Smrg# 10053b9b4fd27Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 10054b9b4fd27Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 10055b9b4fd27Smrgm4_define([lt_append], 10056b9b4fd27Smrg[m4_define([$1], 10057b9b4fd27Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 10058b9b4fd27Smrg 10059b9b4fd27Smrg 10060b9b4fd27Smrg 10061b9b4fd27Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 10062b9b4fd27Smrg# ---------------------------------------------------------- 10063b9b4fd27Smrg# Produce a SEP delimited list of all paired combinations of elements of 10064b9b4fd27Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 10065b9b4fd27Smrg# has the form PREFIXmINFIXSUFFIXn. 10066b9b4fd27Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 10067b9b4fd27Smrgm4_define([lt_combine], 10068b9b4fd27Smrg[m4_if(m4_eval([$# > 3]), [1], 10069b9b4fd27Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 10070b9b4fd27Smrg[[m4_foreach([_Lt_prefix], [$2], 10071b9b4fd27Smrg [m4_foreach([_Lt_suffix], 10072b9b4fd27Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 10073b9b4fd27Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 10074b9b4fd27Smrg 10075b9b4fd27Smrg 10076b9b4fd27Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 10077b9b4fd27Smrg# ----------------------------------------------------------------------- 10078b9b4fd27Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 10079b9b4fd27Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 10080b9b4fd27Smrgm4_define([lt_if_append_uniq], 10081b9b4fd27Smrg[m4_ifdef([$1], 10082b9b4fd27Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 10083b9b4fd27Smrg [lt_append([$1], [$2], [$3])$4], 10084b9b4fd27Smrg [$5])], 10085b9b4fd27Smrg [lt_append([$1], [$2], [$3])$4])]) 10086b9b4fd27Smrg 10087b9b4fd27Smrg 10088b9b4fd27Smrg# lt_dict_add(DICT, KEY, VALUE) 10089b9b4fd27Smrg# ----------------------------- 10090b9b4fd27Smrgm4_define([lt_dict_add], 10091b9b4fd27Smrg[m4_define([$1($2)], [$3])]) 10092485f0483Smrg 10093485f0483Smrg 10094b9b4fd27Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 10095b9b4fd27Smrg# -------------------------------------------- 10096b9b4fd27Smrgm4_define([lt_dict_add_subkey], 10097b9b4fd27Smrg[m4_define([$1($2:$3)], [$4])]) 10098caade7ccSmrg 10099caade7ccSmrg 10100b9b4fd27Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 10101b9b4fd27Smrg# ---------------------------------- 10102b9b4fd27Smrgm4_define([lt_dict_fetch], 10103b9b4fd27Smrg[m4_ifval([$3], 10104b9b4fd27Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 10105b9b4fd27Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 10106caade7ccSmrg 10107485f0483Smrg 10108b9b4fd27Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 10109b9b4fd27Smrg# ----------------------------------------------------------------- 10110b9b4fd27Smrgm4_define([lt_if_dict_fetch], 10111b9b4fd27Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 10112b9b4fd27Smrg [$5], 10113b9b4fd27Smrg [$6])]) 10114caade7ccSmrg 10115485f0483Smrg 10116b9b4fd27Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 10117b9b4fd27Smrg# -------------------------------------------------------------- 10118b9b4fd27Smrgm4_define([lt_dict_filter], 10119b9b4fd27Smrg[m4_if([$5], [], [], 10120b9b4fd27Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 10121b9b4fd27Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 10122b9b4fd27Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 10123b9b4fd27Smrg]) 10124485f0483Smrg 10125b9b4fd27Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 10126b9b4fd27Smrg# 10127b9b4fd27Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 10128b9b4fd27Smrg# Written by Scott James Remnant, 2004 10129b9b4fd27Smrg# 10130b9b4fd27Smrg# This file is free software; the Free Software Foundation gives 10131b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without 10132b9b4fd27Smrg# modifications, as long as this notice is preserved. 10133caade7ccSmrg 10134b9b4fd27Smrg# Generated from ltversion.in. 10135caade7ccSmrg 10136b9b4fd27Smrg# serial 3017 ltversion.m4 10137b9b4fd27Smrg# This file is part of GNU Libtool 10138caade7ccSmrg 10139b9b4fd27Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6b]) 10140b9b4fd27Smrgm4_define([LT_PACKAGE_REVISION], [1.3017]) 10141b9b4fd27Smrg 10142b9b4fd27SmrgAC_DEFUN([LTVERSION_VERSION], 10143b9b4fd27Smrg[macro_version='2.2.6b' 10144b9b4fd27Smrgmacro_revision='1.3017' 10145b9b4fd27Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 10146b9b4fd27Smrg_LT_DECL(, macro_revision, 0) 10147b9b4fd27Smrg]) 10148b9b4fd27Smrg 10149b9b4fd27Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 10150b9b4fd27Smrg# 10151b9b4fd27Smrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 10152b9b4fd27Smrg# Written by Scott James Remnant, 2004. 10153b9b4fd27Smrg# 10154b9b4fd27Smrg# This file is free software; the Free Software Foundation gives 10155b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without 10156b9b4fd27Smrg# modifications, as long as this notice is preserved. 10157b9b4fd27Smrg 10158b9b4fd27Smrg# serial 4 lt~obsolete.m4 10159b9b4fd27Smrg 10160b9b4fd27Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 10161b9b4fd27Smrg# 10162b9b4fd27Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 10163b9b4fd27Smrg# which have later been changed to m4_define as they aren't part of the 10164b9b4fd27Smrg# exported API, or moved to Autoconf or Automake where they belong. 10165b9b4fd27Smrg# 10166b9b4fd27Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 10167b9b4fd27Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 10168b9b4fd27Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 10169b9b4fd27Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 10170b9b4fd27Smrg# and doesn't know about Autoconf macros at all.) 10171b9b4fd27Smrg# 10172b9b4fd27Smrg# So we provide this file, which has a silly filename so it's always 10173b9b4fd27Smrg# included after everything else. This provides aclocal with the 10174b9b4fd27Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 10175b9b4fd27Smrg# because those macros already exist, or will be overwritten later. 10176b9b4fd27Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 10177b9b4fd27Smrg# 10178b9b4fd27Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 10179b9b4fd27Smrg# Yes, that means every name once taken will need to remain here until 10180b9b4fd27Smrg# we give up compatibility with versions before 1.7, at which point 10181b9b4fd27Smrg# we need to keep only those names which we still refer to. 10182b9b4fd27Smrg 10183b9b4fd27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 10184b9b4fd27SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 10185b9b4fd27Smrg 10186b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 10187b9b4fd27Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 10188b9b4fd27Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 10189b9b4fd27Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 10190b9b4fd27Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 10191b9b4fd27Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 10192b9b4fd27Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 10193b9b4fd27Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 10194b9b4fd27Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 10195b9b4fd27Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 10196b9b4fd27Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 10197b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 10198b9b4fd27Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 10199b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 10200b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 10201b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 10202b9b4fd27Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 10203b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 10204b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 10205b9b4fd27Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 10206b9b4fd27Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 10207b9b4fd27Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 10208b9b4fd27Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 10209b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 10210b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 10211b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 10212b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 10213b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 10214b9b4fd27Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 10215b9b4fd27Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 10216b9b4fd27Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 10217b9b4fd27Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 10218b9b4fd27Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 10219b9b4fd27Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 10220b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 10221b9b4fd27Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 10222b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 10223b9b4fd27Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 10224b9b4fd27Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 10225b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 10226b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 10227b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 10228b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 10229b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 10230b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 10231b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 10232b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 10233b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 10234b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 10235b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 10236b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 10237b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 10238b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 10239b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 10240b9b4fd27Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 10241caade7ccSmrg 10242