aclocal.m4 revision a5602400
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 16e8a5466aSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 17e8a5466aSmrg[m4_warning([this file was generated for autoconf 2.68. 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# Do all the work for Automake. -*- Autoconf -*- 410caade7ccSmrg 411caade7ccSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 412485f0483Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 413caade7ccSmrg# 414caade7ccSmrg# This file is free software; the Free Software Foundation 415caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 416caade7ccSmrg# with or without modifications, as long as this notice is preserved. 417caade7ccSmrg 418485f0483Smrg# serial 16 419caade7ccSmrg 420caade7ccSmrg# This macro actually does too much. Some checks are only needed if 421caade7ccSmrg# your package does certain things. But this isn't really a big deal. 422caade7ccSmrg 423caade7ccSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 424caade7ccSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 425caade7ccSmrg# ----------------------------------------------- 426caade7ccSmrg# The call with PACKAGE and VERSION arguments is the old style 427caade7ccSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 428caade7ccSmrg# and VERSION should now be passed to AC_INIT and removed from 429caade7ccSmrg# the call to AM_INIT_AUTOMAKE. 430caade7ccSmrg# We support both call styles for the transition. After 431caade7ccSmrg# the next Automake release, Autoconf can make the AC_INIT 432caade7ccSmrg# arguments mandatory, and then we can depend on a new Autoconf 433caade7ccSmrg# release and drop the old call support. 434caade7ccSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 435485f0483Smrg[AC_PREREQ([2.62])dnl 436caade7ccSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 437caade7ccSmrgdnl the ones we care about. 438caade7ccSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 439caade7ccSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 440caade7ccSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 441caade7ccSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 442caade7ccSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 443caade7ccSmrg # is not polluted with repeated "-I." 444caade7ccSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 445caade7ccSmrg # test to see if srcdir already configured 446caade7ccSmrg if test -f $srcdir/config.status; then 447caade7ccSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 448caade7ccSmrg fi 449caade7ccSmrgfi 450caade7ccSmrg 451caade7ccSmrg# test whether we have cygpath 452caade7ccSmrgif test -z "$CYGPATH_W"; then 453caade7ccSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 454caade7ccSmrg CYGPATH_W='cygpath -w' 455caade7ccSmrg else 456caade7ccSmrg CYGPATH_W=echo 457caade7ccSmrg fi 458caade7ccSmrgfi 459caade7ccSmrgAC_SUBST([CYGPATH_W]) 460caade7ccSmrg 461caade7ccSmrg# Define the identity of the package. 462caade7ccSmrgdnl Distinguish between old-style and new-style calls. 463caade7ccSmrgm4_ifval([$2], 464caade7ccSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 465caade7ccSmrg AC_SUBST([PACKAGE], [$1])dnl 466caade7ccSmrg AC_SUBST([VERSION], [$2])], 467caade7ccSmrg[_AM_SET_OPTIONS([$1])dnl 468caade7ccSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 469caade7ccSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 470caade7ccSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 471caade7ccSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 472caade7ccSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 473caade7ccSmrg 474caade7ccSmrg_AM_IF_OPTION([no-define],, 475caade7ccSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 476caade7ccSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 477caade7ccSmrg 478caade7ccSmrg# Some tools Automake needs. 479caade7ccSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 480caade7ccSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 481caade7ccSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 482caade7ccSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 483caade7ccSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 484caade7ccSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 485caade7ccSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 486485f0483SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 487485f0483SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 488caade7ccSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 489caade7ccSmrg# We need awk for the "check" target. The system "awk" is bad on 490caade7ccSmrg# some platforms. 491caade7ccSmrgAC_REQUIRE([AC_PROG_AWK])dnl 492caade7ccSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 493caade7ccSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 494caade7ccSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 495485f0483Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 496485f0483Smrg [_AM_PROG_TAR([v7])])]) 497caade7ccSmrg_AM_IF_OPTION([no-dependencies],, 498caade7ccSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 499485f0483Smrg [_AM_DEPENDENCIES(CC)], 500485f0483Smrg [define([AC_PROG_CC], 501485f0483Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 502caade7ccSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 503485f0483Smrg [_AM_DEPENDENCIES(CXX)], 504485f0483Smrg [define([AC_PROG_CXX], 505485f0483Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 506caade7ccSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 507485f0483Smrg [_AM_DEPENDENCIES(OBJC)], 508485f0483Smrg [define([AC_PROG_OBJC], 509485f0483Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 510caade7ccSmrg]) 511485f0483Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 512485f0483Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 513485f0483Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 514485f0483Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 515485f0483SmrgAC_CONFIG_COMMANDS_PRE(dnl 516485f0483Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 517485f0483Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 518caade7ccSmrg]) 519caade7ccSmrg 520485f0483Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 521485f0483Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 522485f0483Smrgdnl mangled by Autoconf and run in a shell conditional statement. 523485f0483Smrgm4_define([_AC_COMPILER_EXEEXT], 524485f0483Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 525485f0483Smrg 526caade7ccSmrg 527caade7ccSmrg# When config.status generates a header, we must update the stamp-h file. 528caade7ccSmrg# This file resides in the same directory as the config header 529caade7ccSmrg# that is generated. The stamp files are numbered to have different names. 530caade7ccSmrg 531caade7ccSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 532caade7ccSmrg# loop where config.status creates the headers, so we can generate 533caade7ccSmrg# our stamp files there. 534caade7ccSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 535caade7ccSmrg[# Compute $1's index in $config_headers. 536485f0483Smrg_am_arg=$1 537caade7ccSmrg_am_stamp_count=1 538caade7ccSmrgfor _am_header in $config_headers :; do 539caade7ccSmrg case $_am_header in 540485f0483Smrg $_am_arg | $_am_arg:* ) 541caade7ccSmrg break ;; 542caade7ccSmrg * ) 543caade7ccSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 544caade7ccSmrg esac 545caade7ccSmrgdone 546485f0483Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 547caade7ccSmrg 548485f0483Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 549caade7ccSmrg# 550caade7ccSmrg# This file is free software; the Free Software Foundation 551caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 552caade7ccSmrg# with or without modifications, as long as this notice is preserved. 553caade7ccSmrg 554caade7ccSmrg# AM_PROG_INSTALL_SH 555caade7ccSmrg# ------------------ 556caade7ccSmrg# Define $install_sh. 557caade7ccSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 558caade7ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 559485f0483Smrgif test x"${install_sh}" != xset; then 560485f0483Smrg case $am_aux_dir in 561485f0483Smrg *\ * | *\ *) 562485f0483Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 563485f0483Smrg *) 564485f0483Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 565485f0483Smrg esac 566485f0483Smrgfi 567caade7ccSmrgAC_SUBST(install_sh)]) 568caade7ccSmrg 569caade7ccSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 570caade7ccSmrg# 571caade7ccSmrg# This file is free software; the Free Software Foundation 572caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 573caade7ccSmrg# with or without modifications, as long as this notice is preserved. 574caade7ccSmrg 575caade7ccSmrg# serial 2 576caade7ccSmrg 577caade7ccSmrg# Check whether the underlying file-system supports filenames 578caade7ccSmrg# with a leading dot. For instance MS-DOS doesn't. 579caade7ccSmrgAC_DEFUN([AM_SET_LEADING_DOT], 580caade7ccSmrg[rm -rf .tst 2>/dev/null 581caade7ccSmrgmkdir .tst 2>/dev/null 582caade7ccSmrgif test -d .tst; then 583caade7ccSmrg am__leading_dot=. 584caade7ccSmrgelse 585caade7ccSmrg am__leading_dot=_ 586caade7ccSmrgfi 587caade7ccSmrgrmdir .tst 2>/dev/null 588caade7ccSmrgAC_SUBST([am__leading_dot])]) 589caade7ccSmrg 590caade7ccSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 591caade7ccSmrg# From Jim Meyering 592caade7ccSmrg 593485f0483Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 594caade7ccSmrg# Free Software Foundation, Inc. 595caade7ccSmrg# 596caade7ccSmrg# This file is free software; the Free Software Foundation 597caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 598caade7ccSmrg# with or without modifications, as long as this notice is preserved. 599caade7ccSmrg 600485f0483Smrg# serial 5 601caade7ccSmrg 602485f0483Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 603485f0483Smrg# ---------------------------------- 604485f0483Smrg# Control maintainer-specific portions of Makefiles. 605485f0483Smrg# Default is to disable them, unless `enable' is passed literally. 606485f0483Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 607485f0483Smrg# can override the default with the --enable/--disable switch. 608caade7ccSmrgAC_DEFUN([AM_MAINTAINER_MODE], 609485f0483Smrg[m4_case(m4_default([$1], [disable]), 610485f0483Smrg [enable], [m4_define([am_maintainer_other], [disable])], 611485f0483Smrg [disable], [m4_define([am_maintainer_other], [enable])], 612485f0483Smrg [m4_define([am_maintainer_other], [enable]) 613485f0483Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 614485f0483SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 615485f0483Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 616485f0483Smrg AC_ARG_ENABLE([maintainer-mode], 617485f0483Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 618caade7ccSmrg (and sometimes confusing) to the casual installer], 619485f0483Smrg [USE_MAINTAINER_MODE=$enableval], 620485f0483Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 621caade7ccSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 622485f0483Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 623caade7ccSmrg MAINT=$MAINTAINER_MODE_TRUE 624485f0483Smrg AC_SUBST([MAINT])dnl 625caade7ccSmrg] 626caade7ccSmrg) 627caade7ccSmrg 628caade7ccSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 629caade7ccSmrg 630caade7ccSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 631caade7ccSmrg 632485f0483Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 633caade7ccSmrg# 634caade7ccSmrg# This file is free software; the Free Software Foundation 635caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 636caade7ccSmrg# with or without modifications, as long as this notice is preserved. 637caade7ccSmrg 638485f0483Smrg# serial 4 639caade7ccSmrg 640caade7ccSmrg# AM_MAKE_INCLUDE() 641caade7ccSmrg# ----------------- 642caade7ccSmrg# Check to see how make treats includes. 643caade7ccSmrgAC_DEFUN([AM_MAKE_INCLUDE], 644caade7ccSmrg[am_make=${MAKE-make} 645caade7ccSmrgcat > confinc << 'END' 646caade7ccSmrgam__doit: 647485f0483Smrg @echo this is the am__doit target 648caade7ccSmrg.PHONY: am__doit 649caade7ccSmrgEND 650caade7ccSmrg# If we don't find an include directive, just comment out the code. 651caade7ccSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 652caade7ccSmrgam__include="#" 653caade7ccSmrgam__quote= 654caade7ccSmrg_am_result=none 655caade7ccSmrg# First try GNU make style include. 656caade7ccSmrgecho "include confinc" > confmf 657485f0483Smrg# Ignore all kinds of additional output from `make'. 658485f0483Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 659485f0483Smrg*the\ am__doit\ target*) 660485f0483Smrg am__include=include 661485f0483Smrg am__quote= 662485f0483Smrg _am_result=GNU 663485f0483Smrg ;; 664485f0483Smrgesac 665caade7ccSmrg# Now try BSD make style include. 666caade7ccSmrgif test "$am__include" = "#"; then 667caade7ccSmrg echo '.include "confinc"' > confmf 668485f0483Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 669485f0483Smrg *the\ am__doit\ target*) 670485f0483Smrg am__include=.include 671485f0483Smrg am__quote="\"" 672485f0483Smrg _am_result=BSD 673485f0483Smrg ;; 674485f0483Smrg esac 675caade7ccSmrgfi 676caade7ccSmrgAC_SUBST([am__include]) 677caade7ccSmrgAC_SUBST([am__quote]) 678caade7ccSmrgAC_MSG_RESULT([$_am_result]) 679caade7ccSmrgrm -f confinc confmf 680caade7ccSmrg]) 681caade7ccSmrg 682caade7ccSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 683caade7ccSmrg 684485f0483Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 685caade7ccSmrg# Free Software Foundation, Inc. 686caade7ccSmrg# 687caade7ccSmrg# This file is free software; the Free Software Foundation 688caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 689caade7ccSmrg# with or without modifications, as long as this notice is preserved. 690caade7ccSmrg 691485f0483Smrg# serial 6 692caade7ccSmrg 693caade7ccSmrg# AM_MISSING_PROG(NAME, PROGRAM) 694caade7ccSmrg# ------------------------------ 695caade7ccSmrgAC_DEFUN([AM_MISSING_PROG], 696caade7ccSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 697caade7ccSmrg$1=${$1-"${am_missing_run}$2"} 698caade7ccSmrgAC_SUBST($1)]) 699caade7ccSmrg 700caade7ccSmrg 701caade7ccSmrg# AM_MISSING_HAS_RUN 702caade7ccSmrg# ------------------ 703caade7ccSmrg# Define MISSING if not defined so far and test if it supports --run. 704caade7ccSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 705caade7ccSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 706caade7ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 707caade7ccSmrgAC_REQUIRE_AUX_FILE([missing])dnl 708485f0483Smrgif test x"${MISSING+set}" != xset; then 709485f0483Smrg case $am_aux_dir in 710485f0483Smrg *\ * | *\ *) 711485f0483Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 712485f0483Smrg *) 713485f0483Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 714485f0483Smrg esac 715485f0483Smrgfi 716caade7ccSmrg# Use eval to expand $SHELL 717caade7ccSmrgif eval "$MISSING --run true"; then 718caade7ccSmrg am_missing_run="$MISSING --run " 719caade7ccSmrgelse 720caade7ccSmrg am_missing_run= 721caade7ccSmrg AC_MSG_WARN([`missing' script is too old or missing]) 722caade7ccSmrgfi 723caade7ccSmrg]) 724caade7ccSmrg 725caade7ccSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 726caade7ccSmrg# 727caade7ccSmrg# This file is free software; the Free Software Foundation 728caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 729caade7ccSmrg# with or without modifications, as long as this notice is preserved. 730caade7ccSmrg 731caade7ccSmrg# AM_PROG_MKDIR_P 732caade7ccSmrg# --------------- 733caade7ccSmrg# Check for `mkdir -p'. 734caade7ccSmrgAC_DEFUN([AM_PROG_MKDIR_P], 735caade7ccSmrg[AC_PREREQ([2.60])dnl 736caade7ccSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 737caade7ccSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 738caade7ccSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 739caade7ccSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 740caade7ccSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 741caade7ccSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 742caade7ccSmrgdnl adjustment using top_builddir (which is defined more often than 743caade7ccSmrgdnl MKDIR_P). 744caade7ccSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 745caade7ccSmrgcase $mkdir_p in 746caade7ccSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 747caade7ccSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 748caade7ccSmrgesac 749caade7ccSmrg]) 750caade7ccSmrg 751caade7ccSmrg# Helper functions for option handling. -*- Autoconf -*- 752caade7ccSmrg 753485f0483Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 754caade7ccSmrg# 755caade7ccSmrg# This file is free software; the Free Software Foundation 756caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 757caade7ccSmrg# with or without modifications, as long as this notice is preserved. 758caade7ccSmrg 759485f0483Smrg# serial 4 760caade7ccSmrg 761caade7ccSmrg# _AM_MANGLE_OPTION(NAME) 762caade7ccSmrg# ----------------------- 763caade7ccSmrgAC_DEFUN([_AM_MANGLE_OPTION], 764caade7ccSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 765caade7ccSmrg 766caade7ccSmrg# _AM_SET_OPTION(NAME) 767caade7ccSmrg# ------------------------------ 768caade7ccSmrg# Set option NAME. Presently that only means defining a flag for this option. 769caade7ccSmrgAC_DEFUN([_AM_SET_OPTION], 770caade7ccSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 771caade7ccSmrg 772caade7ccSmrg# _AM_SET_OPTIONS(OPTIONS) 773caade7ccSmrg# ---------------------------------- 774caade7ccSmrg# OPTIONS is a space-separated list of Automake options. 775caade7ccSmrgAC_DEFUN([_AM_SET_OPTIONS], 776485f0483Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 777caade7ccSmrg 778caade7ccSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 779caade7ccSmrg# ------------------------------------------- 780caade7ccSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 781caade7ccSmrgAC_DEFUN([_AM_IF_OPTION], 782caade7ccSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 783caade7ccSmrg 784caade7ccSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 785caade7ccSmrg 786485f0483Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 787caade7ccSmrg# Free Software Foundation, Inc. 788caade7ccSmrg# 789caade7ccSmrg# This file is free software; the Free Software Foundation 790caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 791caade7ccSmrg# with or without modifications, as long as this notice is preserved. 792caade7ccSmrg 793485f0483Smrg# serial 5 794caade7ccSmrg 795caade7ccSmrg# AM_SANITY_CHECK 796caade7ccSmrg# --------------- 797caade7ccSmrgAC_DEFUN([AM_SANITY_CHECK], 798caade7ccSmrg[AC_MSG_CHECKING([whether build environment is sane]) 799caade7ccSmrg# Just in case 800caade7ccSmrgsleep 1 801caade7ccSmrgecho timestamp > conftest.file 802485f0483Smrg# Reject unsafe characters in $srcdir or the absolute working directory 803485f0483Smrg# name. Accept space and tab only in the latter. 804485f0483Smrgam_lf=' 805485f0483Smrg' 806485f0483Smrgcase `pwd` in 807485f0483Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 808485f0483Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 809485f0483Smrgesac 810485f0483Smrgcase $srcdir in 811485f0483Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 812485f0483Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 813485f0483Smrgesac 814485f0483Smrg 815caade7ccSmrg# Do `set' in a subshell so we don't clobber the current shell's 816caade7ccSmrg# arguments. Must try -L first in case configure is actually a 817caade7ccSmrg# symlink; some systems play weird games with the mod time of symlinks 818caade7ccSmrg# (eg FreeBSD returns the mod time of the symlink's containing 819caade7ccSmrg# directory). 820caade7ccSmrgif ( 821485f0483Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 822caade7ccSmrg if test "$[*]" = "X"; then 823caade7ccSmrg # -L didn't work. 824485f0483Smrg set X `ls -t "$srcdir/configure" conftest.file` 825caade7ccSmrg fi 826caade7ccSmrg rm -f conftest.file 827caade7ccSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 828caade7ccSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 829caade7ccSmrg 830caade7ccSmrg # If neither matched, then we have a broken ls. This can happen 831caade7ccSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 832caade7ccSmrg # broken ls alias from the environment. This has actually 833caade7ccSmrg # happened. Such a system could not be considered "sane". 834caade7ccSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 835caade7ccSmrgalias in your environment]) 836caade7ccSmrg fi 837caade7ccSmrg 838caade7ccSmrg test "$[2]" = conftest.file 839caade7ccSmrg ) 840caade7ccSmrgthen 841caade7ccSmrg # Ok. 842caade7ccSmrg : 843caade7ccSmrgelse 844caade7ccSmrg AC_MSG_ERROR([newly created file is older than distributed files! 845caade7ccSmrgCheck your system clock]) 846caade7ccSmrgfi 847caade7ccSmrgAC_MSG_RESULT(yes)]) 848caade7ccSmrg 849485f0483Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 850485f0483Smrg# 851485f0483Smrg# This file is free software; the Free Software Foundation 852485f0483Smrg# gives unlimited permission to copy and/or distribute it, 853485f0483Smrg# with or without modifications, as long as this notice is preserved. 854485f0483Smrg 855485f0483Smrg# serial 1 856485f0483Smrg 857485f0483Smrg# AM_SILENT_RULES([DEFAULT]) 858485f0483Smrg# -------------------------- 859485f0483Smrg# Enable less verbose build rules; with the default set to DEFAULT 860485f0483Smrg# (`yes' being less verbose, `no' or empty being verbose). 861485f0483SmrgAC_DEFUN([AM_SILENT_RULES], 862485f0483Smrg[AC_ARG_ENABLE([silent-rules], 863485f0483Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 864485f0483Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 865485f0483Smrgcase $enable_silent_rules in 866485f0483Smrgyes) AM_DEFAULT_VERBOSITY=0;; 867485f0483Smrgno) AM_DEFAULT_VERBOSITY=1;; 868485f0483Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 869485f0483Smrgesac 870485f0483SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 871485f0483SmrgAM_BACKSLASH='\' 872485f0483SmrgAC_SUBST([AM_BACKSLASH])dnl 873485f0483Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 874485f0483Smrg]) 875485f0483Smrg 876caade7ccSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 877caade7ccSmrg# 878caade7ccSmrg# This file is free software; the Free Software Foundation 879caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 880caade7ccSmrg# with or without modifications, as long as this notice is preserved. 881caade7ccSmrg 882caade7ccSmrg# AM_PROG_INSTALL_STRIP 883caade7ccSmrg# --------------------- 884caade7ccSmrg# One issue with vendor `install' (even GNU) is that you can't 885caade7ccSmrg# specify the program used to strip binaries. This is especially 886caade7ccSmrg# annoying in cross-compiling environments, where the build's strip 887caade7ccSmrg# is unlikely to handle the host's binaries. 888caade7ccSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 889caade7ccSmrg# always use install-sh in `make install-strip', and initialize 890caade7ccSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 891caade7ccSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 892caade7ccSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 893caade7ccSmrg# Installed binaries are usually stripped using `strip' when the user 894caade7ccSmrg# run `make install-strip'. However `strip' might not be the right 895caade7ccSmrg# tool to use in cross-compilation environments, therefore Automake 896caade7ccSmrg# will honor the `STRIP' environment variable to overrule this program. 897caade7ccSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 898caade7ccSmrgif test "$cross_compiling" != no; then 899caade7ccSmrg AC_CHECK_TOOL([STRIP], [strip], :) 900caade7ccSmrgfi 901caade7ccSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 902caade7ccSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 903caade7ccSmrg 904485f0483Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 905caade7ccSmrg# 906caade7ccSmrg# This file is free software; the Free Software Foundation 907caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 908caade7ccSmrg# with or without modifications, as long as this notice is preserved. 909caade7ccSmrg 910485f0483Smrg# serial 2 911485f0483Smrg 912caade7ccSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 913caade7ccSmrg# --------------------------- 914485f0483Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 915caade7ccSmrg# This macro is traced by Automake. 916caade7ccSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 917caade7ccSmrg 918485f0483Smrg# AM_SUBST_NOTMAKE(VARIABLE) 919485f0483Smrg# --------------------------- 920485f0483Smrg# Public sister of _AM_SUBST_NOTMAKE. 921485f0483SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 922485f0483Smrg 923caade7ccSmrg# Check how to create a tarball. -*- Autoconf -*- 924caade7ccSmrg 925caade7ccSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 926caade7ccSmrg# 927caade7ccSmrg# This file is free software; the Free Software Foundation 928caade7ccSmrg# gives unlimited permission to copy and/or distribute it, 929caade7ccSmrg# with or without modifications, as long as this notice is preserved. 930caade7ccSmrg 931caade7ccSmrg# serial 2 932caade7ccSmrg 933caade7ccSmrg# _AM_PROG_TAR(FORMAT) 934caade7ccSmrg# -------------------- 935caade7ccSmrg# Check how to create a tarball in format FORMAT. 936caade7ccSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 937caade7ccSmrg# 938caade7ccSmrg# Substitute a variable $(am__tar) that is a command 939caade7ccSmrg# writing to stdout a FORMAT-tarball containing the directory 940caade7ccSmrg# $tardir. 941caade7ccSmrg# tardir=directory && $(am__tar) > result.tar 942caade7ccSmrg# 943caade7ccSmrg# Substitute a variable $(am__untar) that extract such 944caade7ccSmrg# a tarball read from stdin. 945caade7ccSmrg# $(am__untar) < result.tar 946caade7ccSmrgAC_DEFUN([_AM_PROG_TAR], 947caade7ccSmrg[# Always define AMTAR for backward compatibility. 948caade7ccSmrgAM_MISSING_PROG([AMTAR], [tar]) 949caade7ccSmrgm4_if([$1], [v7], 950caade7ccSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 951caade7ccSmrg [m4_case([$1], [ustar],, [pax],, 952caade7ccSmrg [m4_fatal([Unknown tar format])]) 953caade7ccSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 954caade7ccSmrg# Loop over all known methods to create a tar archive until one works. 955caade7ccSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 956caade7ccSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 957caade7ccSmrg# Do not fold the above two line into one, because Tru64 sh and 958caade7ccSmrg# Solaris sh will not grok spaces in the rhs of `-'. 959caade7ccSmrgfor _am_tool in $_am_tools 960caade7ccSmrgdo 961caade7ccSmrg case $_am_tool in 962caade7ccSmrg gnutar) 963caade7ccSmrg for _am_tar in tar gnutar gtar; 964caade7ccSmrg do 965caade7ccSmrg AM_RUN_LOG([$_am_tar --version]) && break 966caade7ccSmrg done 967caade7ccSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 968caade7ccSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 969caade7ccSmrg am__untar="$_am_tar -xf -" 970caade7ccSmrg ;; 971caade7ccSmrg plaintar) 972caade7ccSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 973caade7ccSmrg # ustar tarball either. 974caade7ccSmrg (tar --version) >/dev/null 2>&1 && continue 975caade7ccSmrg am__tar='tar chf - "$$tardir"' 976caade7ccSmrg am__tar_='tar chf - "$tardir"' 977caade7ccSmrg am__untar='tar xf -' 978caade7ccSmrg ;; 979caade7ccSmrg pax) 980caade7ccSmrg am__tar='pax -L -x $1 -w "$$tardir"' 981caade7ccSmrg am__tar_='pax -L -x $1 -w "$tardir"' 982caade7ccSmrg am__untar='pax -r' 983caade7ccSmrg ;; 984caade7ccSmrg cpio) 985caade7ccSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 986caade7ccSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 987caade7ccSmrg am__untar='cpio -i -H $1 -d' 988caade7ccSmrg ;; 989caade7ccSmrg none) 990caade7ccSmrg am__tar=false 991caade7ccSmrg am__tar_=false 992caade7ccSmrg am__untar=false 993caade7ccSmrg ;; 994caade7ccSmrg esac 995caade7ccSmrg 996caade7ccSmrg # If the value was cached, stop now. We just wanted to have am__tar 997caade7ccSmrg # and am__untar set. 998caade7ccSmrg test -n "${am_cv_prog_tar_$1}" && break 999caade7ccSmrg 1000caade7ccSmrg # tar/untar a dummy directory, and stop if the command works 1001caade7ccSmrg rm -rf conftest.dir 1002caade7ccSmrg mkdir conftest.dir 1003caade7ccSmrg echo GrepMe > conftest.dir/file 1004caade7ccSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1005caade7ccSmrg rm -rf conftest.dir 1006caade7ccSmrg if test -s conftest.tar; then 1007caade7ccSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1008caade7ccSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1009caade7ccSmrg fi 1010caade7ccSmrgdone 1011caade7ccSmrgrm -rf conftest.dir 1012caade7ccSmrg 1013caade7ccSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1014caade7ccSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1015caade7ccSmrgAC_SUBST([am__tar]) 1016caade7ccSmrgAC_SUBST([am__untar]) 1017caade7ccSmrg]) # _AM_PROG_TAR 1018caade7ccSmrg 1019485f0483Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1020caade7ccSmrgdnl 1021e8a5466aSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 1022caade7ccSmrgdnl 1023caade7ccSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1024b9b4fd27Smrgdnl copy of this software and associated documentation files (the "Software"), 1025b9b4fd27Smrgdnl to deal in the Software without restriction, including without limitation 1026b9b4fd27Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1027b9b4fd27Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1028b9b4fd27Smrgdnl Software is furnished to do so, subject to the following conditions: 1029caade7ccSmrgdnl 1030b9b4fd27Smrgdnl The above copyright notice and this permission notice (including the next 1031b9b4fd27Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1032b9b4fd27Smrgdnl Software. 1033caade7ccSmrgdnl 1034b9b4fd27Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1035b9b4fd27Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1036b9b4fd27Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1037b9b4fd27Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1038b9b4fd27Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1039b9b4fd27Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1040b9b4fd27Smrgdnl DEALINGS IN THE SOFTWARE. 1041caade7ccSmrg 1042caade7ccSmrg# XORG_MACROS_VERSION(required-version) 1043caade7ccSmrg# ------------------------------------- 1044caade7ccSmrg# Minimum version: 1.1.0 1045caade7ccSmrg# 1046caade7ccSmrg# If you're using a macro added in Version 1.1 or newer, include this in 1047caade7ccSmrg# your configure.ac with the minimum required version, such as: 1048caade7ccSmrg# XORG_MACROS_VERSION(1.1) 1049caade7ccSmrg# 1050485f0483Smrg# To ensure that this macro is defined, also add: 1051485f0483Smrg# m4_ifndef([XORG_MACROS_VERSION], 1052485f0483Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1053caade7ccSmrg# 1054caade7ccSmrg# 1055caade7ccSmrg# See the "minimum version" comment for each macro you use to see what 1056caade7ccSmrg# version you require. 1057485f0483Smrgm4_defun([XORG_MACROS_VERSION],[ 1058a5602400Smrgm4_define([vers_have], [1.14.0]) 1059485f0483Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1060485f0483Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1061485f0483Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1062485f0483Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1063485f0483Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1064485f0483Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1065485f0483Smrgm4_undefine([vers_have]) 1066485f0483Smrgm4_undefine([maj_have]) 1067485f0483Smrgm4_undefine([maj_needed]) 1068caade7ccSmrg]) # XORG_MACROS_VERSION 1069caade7ccSmrg 1070caade7ccSmrg# XORG_PROG_RAWCPP() 1071caade7ccSmrg# ------------------ 1072caade7ccSmrg# Minimum version: 1.0.0 1073caade7ccSmrg# 1074caade7ccSmrg# Find cpp program and necessary flags for use in pre-processing text files 1075caade7ccSmrg# such as man pages and config files 1076caade7ccSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1077caade7ccSmrgAC_REQUIRE([AC_PROG_CPP]) 1078caade7ccSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1079caade7ccSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1080caade7ccSmrg 1081caade7ccSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1082caade7ccSmrg# which is not the best choice for supporting other OS'es, but covers most 1083caade7ccSmrg# of the ones we need for now. 1084caade7ccSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1085caade7ccSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1086caade7ccSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1087caade7ccSmrg AC_MSG_RESULT([no]) 1088caade7ccSmrgelse 1089caade7ccSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1090caade7ccSmrg RAWCPPFLAGS=-undef 1091caade7ccSmrg AC_MSG_RESULT([yes]) 1092485f0483Smrg # under Cygwin unix is still defined even with -undef 1093485f0483Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1094485f0483Smrg RAWCPPFLAGS="-undef -ansi" 1095485f0483Smrg AC_MSG_RESULT([yes, with -ansi]) 1096caade7ccSmrg else 1097caade7ccSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1098caade7ccSmrg fi 1099caade7ccSmrgfi 1100caade7ccSmrgrm -f conftest.$ac_ext 1101caade7ccSmrg 1102caade7ccSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1103caade7ccSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1104caade7ccSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1105caade7ccSmrg AC_MSG_RESULT([no]) 1106caade7ccSmrgelse 1107caade7ccSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1108caade7ccSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1109caade7ccSmrg AC_MSG_RESULT([yes]) 1110caade7ccSmrg else 1111caade7ccSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1112caade7ccSmrg fi 1113caade7ccSmrgfi 1114caade7ccSmrgrm -f conftest.$ac_ext 1115caade7ccSmrgAC_SUBST(RAWCPPFLAGS) 1116caade7ccSmrg]) # XORG_PROG_RAWCPP 1117caade7ccSmrg 1118caade7ccSmrg# XORG_MANPAGE_SECTIONS() 1119caade7ccSmrg# ----------------------- 1120caade7ccSmrg# Minimum version: 1.0.0 1121caade7ccSmrg# 1122caade7ccSmrg# Determine which sections man pages go in for the different man page types 1123caade7ccSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1124caade7ccSmrg# Not sure if there's any better way than just hardcoding by OS name. 1125caade7ccSmrg# Override default settings by setting environment variables 1126b9b4fd27Smrg# Added MAN_SUBSTS in version 1.8 1127e8a5466aSmrg# Added AC_PROG_SED in version 1.8 1128caade7ccSmrg 1129caade7ccSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1130caade7ccSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1131e8a5466aSmrgAC_REQUIRE([AC_PROG_SED]) 1132caade7ccSmrg 1133caade7ccSmrgif test x$APP_MAN_SUFFIX = x ; then 1134caade7ccSmrg APP_MAN_SUFFIX=1 1135caade7ccSmrgfi 1136caade7ccSmrgif test x$APP_MAN_DIR = x ; then 1137caade7ccSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1138caade7ccSmrgfi 1139caade7ccSmrg 1140caade7ccSmrgif test x$LIB_MAN_SUFFIX = x ; then 1141caade7ccSmrg LIB_MAN_SUFFIX=3 1142caade7ccSmrgfi 1143caade7ccSmrgif test x$LIB_MAN_DIR = x ; then 1144caade7ccSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1145caade7ccSmrgfi 1146caade7ccSmrg 1147caade7ccSmrgif test x$FILE_MAN_SUFFIX = x ; then 1148caade7ccSmrg case $host_os in 1149caade7ccSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 1150caade7ccSmrg *) FILE_MAN_SUFFIX=5 ;; 1151caade7ccSmrg esac 1152caade7ccSmrgfi 1153caade7ccSmrgif test x$FILE_MAN_DIR = x ; then 1154caade7ccSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1155caade7ccSmrgfi 1156caade7ccSmrg 1157caade7ccSmrgif test x$MISC_MAN_SUFFIX = x ; then 1158caade7ccSmrg case $host_os in 1159caade7ccSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 1160caade7ccSmrg *) MISC_MAN_SUFFIX=7 ;; 1161caade7ccSmrg esac 1162caade7ccSmrgfi 1163caade7ccSmrgif test x$MISC_MAN_DIR = x ; then 1164caade7ccSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1165caade7ccSmrgfi 1166caade7ccSmrg 1167caade7ccSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1168caade7ccSmrg case $host_os in 1169caade7ccSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1170caade7ccSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1171caade7ccSmrg esac 1172caade7ccSmrgfi 1173caade7ccSmrgif test x$DRIVER_MAN_DIR = x ; then 1174caade7ccSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1175caade7ccSmrgfi 1176caade7ccSmrg 1177caade7ccSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1178caade7ccSmrg case $host_os in 1179caade7ccSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1180caade7ccSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1181caade7ccSmrg esac 1182caade7ccSmrgfi 1183caade7ccSmrgif test x$ADMIN_MAN_DIR = x ; then 1184caade7ccSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1185caade7ccSmrgfi 1186caade7ccSmrg 1187caade7ccSmrg 1188caade7ccSmrgAC_SUBST([APP_MAN_SUFFIX]) 1189caade7ccSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1190caade7ccSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1191caade7ccSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1192caade7ccSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1193caade7ccSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1194caade7ccSmrgAC_SUBST([APP_MAN_DIR]) 1195caade7ccSmrgAC_SUBST([LIB_MAN_DIR]) 1196caade7ccSmrgAC_SUBST([FILE_MAN_DIR]) 1197caade7ccSmrgAC_SUBST([MISC_MAN_DIR]) 1198caade7ccSmrgAC_SUBST([DRIVER_MAN_DIR]) 1199caade7ccSmrgAC_SUBST([ADMIN_MAN_DIR]) 1200b9b4fd27Smrg 1201b9b4fd27SmrgXORG_MAN_PAGE="X Version 11" 1202b9b4fd27SmrgAC_SUBST([XORG_MAN_PAGE]) 1203b9b4fd27SmrgMAN_SUBSTS="\ 1204b9b4fd27Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1205b9b4fd27Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1206b9b4fd27Smrg -e 's|__xservername__|Xorg|g' \ 1207b9b4fd27Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1208b9b4fd27Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1209e8a5466aSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1210b9b4fd27Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1211b9b4fd27Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1212b9b4fd27Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1213b9b4fd27Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1214b9b4fd27Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1215b9b4fd27Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1216b9b4fd27SmrgAC_SUBST([MAN_SUBSTS]) 1217b9b4fd27Smrg 1218caade7ccSmrg]) # XORG_MANPAGE_SECTIONS 1219caade7ccSmrg 1220b9b4fd27Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1221b9b4fd27Smrg# ------------------------ 1222b9b4fd27Smrg# Minimum version: 1.7.0 1223b9b4fd27Smrg# 1224b9b4fd27Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1225b9b4fd27Smrg# provided by xorg-sgml-doctools, if installed. 1226b9b4fd27SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1227b9b4fd27SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1228b9b4fd27SmrgXORG_SGML_PATH= 1229b9b4fd27SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1230b9b4fd27Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1231b9b4fd27Smrg [m4_ifval([$1],[:], 1232b9b4fd27Smrg [if test x"$cross_compiling" != x"yes" ; then 1233b9b4fd27Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1234b9b4fd27Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1235b9b4fd27Smrg fi]) 1236b9b4fd27Smrg ]) 1237b9b4fd27Smrg 1238e8a5466aSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1239e8a5466aSmrg# the path and the name of the doc stylesheet 1240b9b4fd27Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1241b9b4fd27Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1242e8a5466aSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1243e8a5466aSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1244b9b4fd27Smrgelse 1245b9b4fd27Smrg AC_MSG_RESULT([no]) 1246b9b4fd27Smrgfi 1247b9b4fd27Smrg 1248b9b4fd27SmrgAC_SUBST(XORG_SGML_PATH) 1249e8a5466aSmrgAC_SUBST(STYLESHEET_SRCDIR) 1250e8a5466aSmrgAC_SUBST(XSL_STYLESHEET) 1251e8a5466aSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1252b9b4fd27Smrg]) # XORG_CHECK_SGML_DOCTOOLS 1253b9b4fd27Smrg 1254caade7ccSmrg# XORG_CHECK_LINUXDOC 1255caade7ccSmrg# ------------------- 1256caade7ccSmrg# Minimum version: 1.0.0 1257caade7ccSmrg# 1258caade7ccSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1259caade7ccSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1260caade7ccSmrg# Whether or not the necessary tools and files are found can be checked 1261caade7ccSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1262caade7ccSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1263b9b4fd27SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1264b9b4fd27SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1265caade7ccSmrg 1266caade7ccSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1267caade7ccSmrg 1268b9b4fd27SmrgAC_MSG_CHECKING([whether to build documentation]) 1269caade7ccSmrg 1270b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1271caade7ccSmrg BUILDDOC=yes 1272caade7ccSmrgelse 1273caade7ccSmrg BUILDDOC=no 1274caade7ccSmrgfi 1275caade7ccSmrg 1276caade7ccSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1277caade7ccSmrg 1278caade7ccSmrgAC_MSG_RESULT([$BUILDDOC]) 1279caade7ccSmrg 1280b9b4fd27SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1281caade7ccSmrg 1282b9b4fd27Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1283caade7ccSmrg BUILDPDFDOC=yes 1284caade7ccSmrgelse 1285caade7ccSmrg BUILDPDFDOC=no 1286caade7ccSmrgfi 1287caade7ccSmrg 1288caade7ccSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1289caade7ccSmrg 1290caade7ccSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1291caade7ccSmrg 1292b9b4fd27SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1293caade7ccSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1294caade7ccSmrgMAKE_PDF="$PS2PDF" 1295caade7ccSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1296caade7ccSmrg 1297caade7ccSmrgAC_SUBST(MAKE_TEXT) 1298caade7ccSmrgAC_SUBST(MAKE_PS) 1299caade7ccSmrgAC_SUBST(MAKE_PDF) 1300caade7ccSmrgAC_SUBST(MAKE_HTML) 1301caade7ccSmrg]) # XORG_CHECK_LINUXDOC 1302caade7ccSmrg 1303caade7ccSmrg# XORG_CHECK_DOCBOOK 1304caade7ccSmrg# ------------------- 1305caade7ccSmrg# Minimum version: 1.0.0 1306caade7ccSmrg# 1307caade7ccSmrg# Checks for the ability to build output formats from SGML DocBook source. 1308caade7ccSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1309caade7ccSmrg# indicates whether the necessary tools and files are found and, if set, 1310caade7ccSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1311caade7ccSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1312b9b4fd27SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1313b9b4fd27Smrg 1314caade7ccSmrgBUILDTXTDOC=no 1315caade7ccSmrgBUILDPDFDOC=no 1316caade7ccSmrgBUILDPSDOC=no 1317caade7ccSmrgBUILDHTMLDOC=no 1318caade7ccSmrg 1319caade7ccSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1320caade7ccSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1321caade7ccSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1322caade7ccSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1323caade7ccSmrg 1324b9b4fd27SmrgAC_MSG_CHECKING([whether to build text documentation]) 1325b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1326caade7ccSmrg test x$BUILD_TXTDOC != xno; then 1327caade7ccSmrg BUILDTXTDOC=yes 1328caade7ccSmrgfi 1329caade7ccSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1330caade7ccSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1331caade7ccSmrg 1332b9b4fd27SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1333b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1334caade7ccSmrg test x$BUILD_PDFDOC != xno; then 1335caade7ccSmrg BUILDPDFDOC=yes 1336caade7ccSmrgfi 1337caade7ccSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1338caade7ccSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1339caade7ccSmrg 1340b9b4fd27SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1341b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1342caade7ccSmrg test x$BUILD_PSDOC != xno; then 1343caade7ccSmrg BUILDPSDOC=yes 1344caade7ccSmrgfi 1345caade7ccSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1346caade7ccSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1347caade7ccSmrg 1348b9b4fd27SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1349b9b4fd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1350caade7ccSmrg test x$BUILD_HTMLDOC != xno; then 1351caade7ccSmrg BUILDHTMLDOC=yes 1352caade7ccSmrgfi 1353caade7ccSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1354caade7ccSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1355caade7ccSmrg 1356caade7ccSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1357caade7ccSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1358caade7ccSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1359caade7ccSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1360caade7ccSmrg 1361caade7ccSmrgAC_SUBST(MAKE_TEXT) 1362caade7ccSmrgAC_SUBST(MAKE_PS) 1363caade7ccSmrgAC_SUBST(MAKE_PDF) 1364caade7ccSmrgAC_SUBST(MAKE_HTML) 1365caade7ccSmrg]) # XORG_CHECK_DOCBOOK 1366caade7ccSmrg 1367a5602400Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1368b9b4fd27Smrg# ---------------- 1369b9b4fd27Smrg# Minimum version: 1.5.0 1370a5602400Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1371b9b4fd27Smrg# 1372b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1373b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1374b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1375b9b4fd27Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1376a5602400Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1377a5602400Smrg# --with-xmlto assumes 'auto'. 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# 1386e8a5466aSmrg# Added in version 1.10.0 1387e8a5466aSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1388e8a5466aSmrg# xmlto for text output requires either lynx, links, or w3m browsers 1389e8a5466aSmrg# 1390b9b4fd27Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1391b9b4fd27Smrg# 1392b9b4fd27SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1393b9b4fd27SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1394a5602400Smrgm4_define([_defopt], m4_default([$2], [auto])) 1395b9b4fd27SmrgAC_ARG_WITH(xmlto, 1396b9b4fd27Smrg AS_HELP_STRING([--with-xmlto], 1397a5602400Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1398a5602400Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1399a5602400Smrgm4_undefine([_defopt]) 1400b9b4fd27Smrg 1401b9b4fd27Smrgif test "x$use_xmlto" = x"auto"; then 1402b9b4fd27Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1403b9b4fd27Smrg if test "x$XMLTO" = "x"; then 1404b9b4fd27Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1405b9b4fd27Smrg have_xmlto=no 1406b9b4fd27Smrg else 1407b9b4fd27Smrg have_xmlto=yes 1408b9b4fd27Smrg fi 1409b9b4fd27Smrgelif test "x$use_xmlto" = x"yes" ; then 1410b9b4fd27Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1411b9b4fd27Smrg if test "x$XMLTO" = "x"; then 1412b9b4fd27Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1413b9b4fd27Smrg fi 1414b9b4fd27Smrg have_xmlto=yes 1415b9b4fd27Smrgelif test "x$use_xmlto" = x"no" ; then 1416b9b4fd27Smrg if test "x$XMLTO" != "x"; then 1417b9b4fd27Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1418b9b4fd27Smrg fi 1419b9b4fd27Smrg have_xmlto=no 1420b9b4fd27Smrgelse 1421b9b4fd27Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1422b9b4fd27Smrgfi 1423e8a5466aSmrg 1424e8a5466aSmrg# Test for a minimum version of xmlto, if provided. 1425b9b4fd27Smrgm4_ifval([$1], 1426b9b4fd27Smrg[if test "$have_xmlto" = yes; then 1427b9b4fd27Smrg # scrape the xmlto version 1428b9b4fd27Smrg AC_MSG_CHECKING([the xmlto version]) 1429b9b4fd27Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1430b9b4fd27Smrg AC_MSG_RESULT([$xmlto_version]) 1431b9b4fd27Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1432b9b4fd27Smrg [if test "x$use_xmlto" = xauto; then 1433b9b4fd27Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1434b9b4fd27Smrg have_xmlto=no 1435b9b4fd27Smrg else 1436b9b4fd27Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1437b9b4fd27Smrg fi]) 1438b9b4fd27Smrgfi]) 1439e8a5466aSmrg 1440e8a5466aSmrg# Test for the ability of xmlto to generate a text target 1441e8a5466aSmrghave_xmlto_text=no 1442e8a5466aSmrgcat > conftest.xml << "EOF" 1443e8a5466aSmrgEOF 1444e8a5466aSmrgAS_IF([test "$have_xmlto" = yes], 1445e8a5466aSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1446e8a5466aSmrg [have_xmlto_text=yes], 1447e8a5466aSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1448e8a5466aSmrgrm -f conftest.xml 1449e8a5466aSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1450b9b4fd27SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1451b9b4fd27Smrg]) # XORG_WITH_XMLTO 1452b9b4fd27Smrg 1453a5602400Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1454a5602400Smrg# -------------------------------------------- 1455a5602400Smrg# Minimum version: 1.12.0 1456a5602400Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1457a5602400Smrg# 1458a5602400Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1459a5602400Smrg# XML-based language used for the transformation of XML documents. 1460a5602400Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1461a5602400Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1462a5602400Smrg# The XSLT processor is often used as a standalone tool for transformations. 1463a5602400Smrg# It should not be assumed that this tool is used only to work with documnetation. 1464a5602400Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1465a5602400Smrg# 1466a5602400Smrg# Interface to module: 1467a5602400Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1468a5602400Smrg# XSLTPROC: returns the path of the xsltproc program found 1469a5602400Smrg# returns the path set by the user in the environment 1470a5602400Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1471a5602400Smrg# 'no' user instructs the module not to use xsltproc 1472a5602400Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1473a5602400Smrg# 1474a5602400Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1475a5602400Smrg# 1476a5602400SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1477a5602400SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1478a5602400Smrgm4_define([_defopt], m4_default([$2], [auto])) 1479a5602400SmrgAC_ARG_WITH(xsltproc, 1480a5602400Smrg AS_HELP_STRING([--with-xsltproc], 1481a5602400Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1482a5602400Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1483a5602400Smrgm4_undefine([_defopt]) 1484a5602400Smrg 1485a5602400Smrgif test "x$use_xsltproc" = x"auto"; then 1486a5602400Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1487a5602400Smrg if test "x$XSLTPROC" = "x"; then 1488a5602400Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1489a5602400Smrg have_xsltproc=no 1490a5602400Smrg else 1491a5602400Smrg have_xsltproc=yes 1492a5602400Smrg fi 1493a5602400Smrgelif test "x$use_xsltproc" = x"yes" ; then 1494a5602400Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1495a5602400Smrg if test "x$XSLTPROC" = "x"; then 1496a5602400Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1497a5602400Smrg fi 1498a5602400Smrg have_xsltproc=yes 1499a5602400Smrgelif test "x$use_xsltproc" = x"no" ; then 1500a5602400Smrg if test "x$XSLTPROC" != "x"; then 1501a5602400Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1502a5602400Smrg fi 1503a5602400Smrg have_xsltproc=no 1504a5602400Smrgelse 1505a5602400Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1506a5602400Smrgfi 1507a5602400Smrg 1508a5602400Smrg# Checking for minimum version is not implemented 1509a5602400Smrg# but we want to keep the interface consistent with other commands 1510a5602400Smrgm4_ifval([$1],[AC_MSG_WARN(Checking for MIN-VERSION is not implemented.)]) 1511a5602400Smrg 1512a5602400SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1513a5602400Smrg]) # XORG_WITH_XSLTPROC 1514a5602400Smrg 1515a5602400Smrg 1516a5602400Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1517b9b4fd27Smrg# ---------------- 1518b9b4fd27Smrg# Minimum version: 1.5.0 1519a5602400Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1520b9b4fd27Smrg# 1521b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1522b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1523b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1524b9b4fd27Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1525a5602400Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1526a5602400Smrg# --with-asciidoc assumes 'auto'. 1527b9b4fd27Smrg# 1528b9b4fd27Smrg# Interface to module: 1529b9b4fd27Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1530b9b4fd27Smrg# ASCIIDOC: returns the path of the asciidoc program found 1531b9b4fd27Smrg# returns the path set by the user in the environment 1532b9b4fd27Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1533b9b4fd27Smrg# 'no' user instructs the module not to use asciidoc 1534b9b4fd27Smrg# 1535b9b4fd27Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1536b9b4fd27Smrg# 1537b9b4fd27SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1538b9b4fd27SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1539a5602400Smrgm4_define([_defopt], m4_default([$2], [auto])) 1540b9b4fd27SmrgAC_ARG_WITH(asciidoc, 1541b9b4fd27Smrg AS_HELP_STRING([--with-asciidoc], 1542a5602400Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1543a5602400Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1544a5602400Smrgm4_undefine([_defopt]) 1545b9b4fd27Smrg 1546b9b4fd27Smrgif test "x$use_asciidoc" = x"auto"; then 1547b9b4fd27Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1548b9b4fd27Smrg if test "x$ASCIIDOC" = "x"; then 1549b9b4fd27Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1550b9b4fd27Smrg have_asciidoc=no 1551b9b4fd27Smrg else 1552b9b4fd27Smrg have_asciidoc=yes 1553b9b4fd27Smrg fi 1554b9b4fd27Smrgelif test "x$use_asciidoc" = x"yes" ; then 1555b9b4fd27Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1556b9b4fd27Smrg if test "x$ASCIIDOC" = "x"; then 1557b9b4fd27Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1558b9b4fd27Smrg fi 1559b9b4fd27Smrg have_asciidoc=yes 1560b9b4fd27Smrgelif test "x$use_asciidoc" = x"no" ; then 1561b9b4fd27Smrg if test "x$ASCIIDOC" != "x"; then 1562b9b4fd27Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1563b9b4fd27Smrg fi 1564b9b4fd27Smrg have_asciidoc=no 1565b9b4fd27Smrgelse 1566b9b4fd27Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1567b9b4fd27Smrgfi 1568b9b4fd27Smrgm4_ifval([$1], 1569b9b4fd27Smrg[if test "$have_asciidoc" = yes; then 1570b9b4fd27Smrg # scrape the asciidoc version 1571b9b4fd27Smrg AC_MSG_CHECKING([the asciidoc version]) 1572b9b4fd27Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1573b9b4fd27Smrg AC_MSG_RESULT([$asciidoc_version]) 1574b9b4fd27Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1575b9b4fd27Smrg [if test "x$use_asciidoc" = xauto; then 1576b9b4fd27Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1577b9b4fd27Smrg have_asciidoc=no 1578b9b4fd27Smrg else 1579b9b4fd27Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1580b9b4fd27Smrg fi]) 1581b9b4fd27Smrgfi]) 1582b9b4fd27SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1583b9b4fd27Smrg]) # XORG_WITH_ASCIIDOC 1584b9b4fd27Smrg 1585a5602400Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1586b9b4fd27Smrg# -------------------------------- 1587b9b4fd27Smrg# Minimum version: 1.5.0 1588a5602400Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1589b9b4fd27Smrg# 1590b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1591b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1592b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1593b9b4fd27Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1594a5602400Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1595a5602400Smrg# --with-doxygen assumes 'auto'. 1596b9b4fd27Smrg# 1597b9b4fd27Smrg# Interface to module: 1598b9b4fd27Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1599b9b4fd27Smrg# DOXYGEN: returns the path of the doxygen program found 1600b9b4fd27Smrg# returns the path set by the user in the environment 1601b9b4fd27Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1602b9b4fd27Smrg# 'no' user instructs the module not to use doxygen 1603b9b4fd27Smrg# 1604b9b4fd27Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1605b9b4fd27Smrg# 1606b9b4fd27SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1607b9b4fd27SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1608a5602400Smrgm4_define([_defopt], m4_default([$2], [auto])) 1609b9b4fd27SmrgAC_ARG_WITH(doxygen, 1610b9b4fd27Smrg AS_HELP_STRING([--with-doxygen], 1611a5602400Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1612a5602400Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1613a5602400Smrgm4_undefine([_defopt]) 1614b9b4fd27Smrg 1615b9b4fd27Smrgif test "x$use_doxygen" = x"auto"; then 1616b9b4fd27Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1617b9b4fd27Smrg if test "x$DOXYGEN" = "x"; then 1618b9b4fd27Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1619b9b4fd27Smrg have_doxygen=no 1620b9b4fd27Smrg else 1621b9b4fd27Smrg have_doxygen=yes 1622b9b4fd27Smrg fi 1623b9b4fd27Smrgelif test "x$use_doxygen" = x"yes" ; then 1624b9b4fd27Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1625b9b4fd27Smrg if test "x$DOXYGEN" = "x"; then 1626b9b4fd27Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1627b9b4fd27Smrg fi 1628b9b4fd27Smrg have_doxygen=yes 1629b9b4fd27Smrgelif test "x$use_doxygen" = x"no" ; then 1630b9b4fd27Smrg if test "x$DOXYGEN" != "x"; then 1631b9b4fd27Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1632b9b4fd27Smrg fi 1633b9b4fd27Smrg have_doxygen=no 1634b9b4fd27Smrgelse 1635b9b4fd27Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1636b9b4fd27Smrgfi 1637b9b4fd27Smrgm4_ifval([$1], 1638b9b4fd27Smrg[if test "$have_doxygen" = yes; then 1639b9b4fd27Smrg # scrape the doxygen version 1640b9b4fd27Smrg AC_MSG_CHECKING([the doxygen version]) 1641b9b4fd27Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1642b9b4fd27Smrg AC_MSG_RESULT([$doxygen_version]) 1643b9b4fd27Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1644b9b4fd27Smrg [if test "x$use_doxygen" = xauto; then 1645b9b4fd27Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1646b9b4fd27Smrg have_doxygen=no 1647b9b4fd27Smrg else 1648b9b4fd27Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1649b9b4fd27Smrg fi]) 1650b9b4fd27Smrgfi]) 1651b9b4fd27SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1652b9b4fd27Smrg]) # XORG_WITH_DOXYGEN 1653b9b4fd27Smrg 1654a5602400Smrg# XORG_WITH_GROFF([DEFAULT]) 1655b9b4fd27Smrg# ---------------- 1656b9b4fd27Smrg# Minimum version: 1.6.0 1657a5602400Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1658b9b4fd27Smrg# 1659b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1660b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1661b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1662b9b4fd27Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1663a5602400Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1664a5602400Smrg# --with-groff assumes 'auto'. 1665b9b4fd27Smrg# 1666b9b4fd27Smrg# Interface to module: 1667b9b4fd27Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1668b9b4fd27Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1669b9b4fd27Smrg# HAVE_GROFF_MS: the -ms macros package 1670b9b4fd27Smrg# GROFF: returns the path of the groff program found 1671b9b4fd27Smrg# returns the path set by the user in the environment 1672b9b4fd27Smrg# --with-groff: 'yes' user instructs the module to use groff 1673b9b4fd27Smrg# 'no' user instructs the module not to use groff 1674b9b4fd27Smrg# 1675e8a5466aSmrg# Added in version 1.9.0: 1676e8a5466aSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1677e8a5466aSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1678e8a5466aSmrg# psselect from the psutils package. 1679e8a5466aSmrg# the ghostcript package. Refer to the grohtml man pages 1680e8a5466aSmrg# 1681b9b4fd27Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1682b9b4fd27Smrg# 1683b9b4fd27Smrg# OS and distros often splits groff in a basic and full package, the former 1684b9b4fd27Smrg# having the groff program and the later having devices, fonts and macros 1685b9b4fd27Smrg# Checking for the groff executable is not enough. 1686b9b4fd27Smrg# 1687b9b4fd27Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1688b9b4fd27Smrg# unset HAVE_GROFF or GROFF env variables. 1689b9b4fd27Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1690b9b4fd27Smrg# 1691b9b4fd27SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1692b9b4fd27SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1693a5602400Smrgm4_define([_defopt], m4_default([$1], [auto])) 1694b9b4fd27SmrgAC_ARG_WITH(groff, 1695b9b4fd27Smrg AS_HELP_STRING([--with-groff], 1696a5602400Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1697a5602400Smrg [use_groff=$withval], [use_groff=]_defopt) 1698a5602400Smrgm4_undefine([_defopt]) 1699b9b4fd27Smrg 1700b9b4fd27Smrgif test "x$use_groff" = x"auto"; then 1701b9b4fd27Smrg AC_PATH_PROG([GROFF], [groff]) 1702b9b4fd27Smrg if test "x$GROFF" = "x"; then 1703b9b4fd27Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1704b9b4fd27Smrg have_groff=no 1705b9b4fd27Smrg else 1706b9b4fd27Smrg have_groff=yes 1707b9b4fd27Smrg fi 1708b9b4fd27Smrgelif test "x$use_groff" = x"yes" ; then 1709b9b4fd27Smrg AC_PATH_PROG([GROFF], [groff]) 1710b9b4fd27Smrg if test "x$GROFF" = "x"; then 1711b9b4fd27Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1712b9b4fd27Smrg fi 1713b9b4fd27Smrg have_groff=yes 1714b9b4fd27Smrgelif test "x$use_groff" = x"no" ; then 1715b9b4fd27Smrg if test "x$GROFF" != "x"; then 1716b9b4fd27Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1717b9b4fd27Smrg fi 1718b9b4fd27Smrg have_groff=no 1719b9b4fd27Smrgelse 1720b9b4fd27Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1721b9b4fd27Smrgfi 1722e8a5466aSmrg 1723b9b4fd27Smrg# We have groff, test for the presence of the macro packages 1724b9b4fd27Smrgif test "x$have_groff" = x"yes"; then 1725b9b4fd27Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1726b9b4fd27Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1727b9b4fd27Smrg groff_ms_works=yes 1728b9b4fd27Smrg else 1729b9b4fd27Smrg groff_ms_works=no 1730b9b4fd27Smrg fi 1731b9b4fd27Smrg AC_MSG_RESULT([$groff_ms_works]) 1732b9b4fd27Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1733b9b4fd27Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1734b9b4fd27Smrg groff_mm_works=yes 1735b9b4fd27Smrg else 1736b9b4fd27Smrg groff_mm_works=no 1737b9b4fd27Smrg fi 1738b9b4fd27Smrg AC_MSG_RESULT([$groff_mm_works]) 1739b9b4fd27Smrgfi 1740e8a5466aSmrg 1741e8a5466aSmrg# We have groff, test for HTML dependencies, one command per package 1742e8a5466aSmrgif test "x$have_groff" = x"yes"; then 1743e8a5466aSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1744e8a5466aSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1745e8a5466aSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1746e8a5466aSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1747e8a5466aSmrg have_groff_html=yes 1748e8a5466aSmrg else 1749e8a5466aSmrg have_groff_html=no 1750e8a5466aSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1751e8a5466aSmrg fi 1752e8a5466aSmrgfi 1753e8a5466aSmrg 1754e8a5466aSmrg# Set Automake conditionals for Makefiles 1755b9b4fd27SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1756b9b4fd27SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1757b9b4fd27SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1758e8a5466aSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1759b9b4fd27Smrg]) # XORG_WITH_GROFF 1760b9b4fd27Smrg 1761a5602400Smrg# XORG_WITH_FOP([DEFAULT]) 1762b9b4fd27Smrg# ---------------- 1763b9b4fd27Smrg# Minimum version: 1.6.0 1764a5602400Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1765b9b4fd27Smrg# 1766b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1767b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1768b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1769b9b4fd27Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1770a5602400Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1771a5602400Smrg# --with-fop assumes 'auto'. 1772b9b4fd27Smrg# 1773b9b4fd27Smrg# Interface to module: 1774b9b4fd27Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1775b9b4fd27Smrg# FOP: returns the path of the fop program found 1776b9b4fd27Smrg# returns the path set by the user in the environment 1777b9b4fd27Smrg# --with-fop: 'yes' user instructs the module to use fop 1778b9b4fd27Smrg# 'no' user instructs the module not to use fop 1779b9b4fd27Smrg# 1780b9b4fd27Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1781b9b4fd27Smrg# 1782b9b4fd27SmrgAC_DEFUN([XORG_WITH_FOP],[ 1783b9b4fd27SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1784a5602400Smrgm4_define([_defopt], m4_default([$1], [auto])) 1785b9b4fd27SmrgAC_ARG_WITH(fop, 1786b9b4fd27Smrg AS_HELP_STRING([--with-fop], 1787a5602400Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1788a5602400Smrg [use_fop=$withval], [use_fop=]_defopt) 1789a5602400Smrgm4_undefine([_defopt]) 1790b9b4fd27Smrg 1791b9b4fd27Smrgif test "x$use_fop" = x"auto"; then 1792b9b4fd27Smrg AC_PATH_PROG([FOP], [fop]) 1793b9b4fd27Smrg if test "x$FOP" = "x"; then 1794b9b4fd27Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1795b9b4fd27Smrg have_fop=no 1796b9b4fd27Smrg else 1797b9b4fd27Smrg have_fop=yes 1798b9b4fd27Smrg fi 1799b9b4fd27Smrgelif test "x$use_fop" = x"yes" ; then 1800b9b4fd27Smrg AC_PATH_PROG([FOP], [fop]) 1801b9b4fd27Smrg if test "x$FOP" = "x"; then 1802b9b4fd27Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1803b9b4fd27Smrg fi 1804b9b4fd27Smrg have_fop=yes 1805b9b4fd27Smrgelif test "x$use_fop" = x"no" ; then 1806b9b4fd27Smrg if test "x$FOP" != "x"; then 1807b9b4fd27Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1808b9b4fd27Smrg fi 1809b9b4fd27Smrg have_fop=no 1810b9b4fd27Smrgelse 1811b9b4fd27Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1812b9b4fd27Smrgfi 1813b9b4fd27SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1814b9b4fd27Smrg]) # XORG_WITH_FOP 1815b9b4fd27Smrg 1816a5602400Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1817b9b4fd27Smrg# ---------------- 1818b9b4fd27Smrg# Minimum version: 1.6.0 1819a5602400Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1820b9b4fd27Smrg# 1821b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1822b9b4fd27Smrg# not at the appropriate level. This macro enables a module to test for the 1823b9b4fd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1824b9b4fd27Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1825a5602400Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1826a5602400Smrg# --with-ps2pdf assumes 'auto'. 1827b9b4fd27Smrg# 1828b9b4fd27Smrg# Interface to module: 1829b9b4fd27Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1830b9b4fd27Smrg# PS2PDF: returns the path of the ps2pdf program found 1831b9b4fd27Smrg# returns the path set by the user in the environment 1832b9b4fd27Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1833b9b4fd27Smrg# 'no' user instructs the module not to use ps2pdf 1834b9b4fd27Smrg# 1835b9b4fd27Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1836b9b4fd27Smrg# 1837b9b4fd27SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1838b9b4fd27SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1839a5602400Smrgm4_define([_defopt], m4_default([$1], [auto])) 1840b9b4fd27SmrgAC_ARG_WITH(ps2pdf, 1841b9b4fd27Smrg AS_HELP_STRING([--with-ps2pdf], 1842a5602400Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1843a5602400Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1844a5602400Smrgm4_undefine([_defopt]) 1845b9b4fd27Smrg 1846b9b4fd27Smrgif test "x$use_ps2pdf" = x"auto"; then 1847b9b4fd27Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1848b9b4fd27Smrg if test "x$PS2PDF" = "x"; then 1849b9b4fd27Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1850b9b4fd27Smrg have_ps2pdf=no 1851b9b4fd27Smrg else 1852b9b4fd27Smrg have_ps2pdf=yes 1853b9b4fd27Smrg fi 1854b9b4fd27Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1855b9b4fd27Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1856b9b4fd27Smrg if test "x$PS2PDF" = "x"; then 1857b9b4fd27Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1858b9b4fd27Smrg fi 1859b9b4fd27Smrg have_ps2pdf=yes 1860b9b4fd27Smrgelif test "x$use_ps2pdf" = x"no" ; then 1861b9b4fd27Smrg if test "x$PS2PDF" != "x"; then 1862b9b4fd27Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1863b9b4fd27Smrg fi 1864b9b4fd27Smrg have_ps2pdf=no 1865b9b4fd27Smrgelse 1866b9b4fd27Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1867b9b4fd27Smrgfi 1868b9b4fd27SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1869b9b4fd27Smrg]) # XORG_WITH_PS2PDF 1870b9b4fd27Smrg 1871b9b4fd27Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1872b9b4fd27Smrg# ---------------- 1873b9b4fd27Smrg# Minimum version: 1.6.0 1874b9b4fd27Smrg# 1875b9b4fd27Smrg# Documentation tools are not always available on all platforms and sometimes 1876b9b4fd27Smrg# not at the appropriate level. This macro enables a builder to skip all 1877b9b4fd27Smrg# documentation targets except traditional man pages. 1878b9b4fd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1879b9b4fd27Smrg# maximum flexibilty in controlling documentation building. 1880b9b4fd27Smrg# Refer to: 1881b9b4fd27Smrg# XORG_WITH_XMLTO --with-xmlto 1882b9b4fd27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1883b9b4fd27Smrg# XORG_WITH_DOXYGEN --with-doxygen 1884b9b4fd27Smrg# XORG_WITH_FOP --with-fop 1885b9b4fd27Smrg# XORG_WITH_GROFF --with-groff 1886b9b4fd27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1887b9b4fd27Smrg# 1888b9b4fd27Smrg# Interface to module: 1889b9b4fd27Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1890b9b4fd27Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1891b9b4fd27Smrg# 'no' user instructs the module not to generate docs 1892b9b4fd27Smrg# parm1: specify the default value, yes or no. 1893b9b4fd27Smrg# 1894b9b4fd27SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1895a5602400Smrgm4_define([docs_default], m4_default([$1], [yes])) 1896b9b4fd27SmrgAC_ARG_ENABLE(docs, 1897b9b4fd27Smrg AS_HELP_STRING([--enable-docs], 1898a5602400Smrg [Enable building the documentation (default: ]docs_default[)]), 1899a5602400Smrg [build_docs=$enableval], [build_docs=]docs_default) 1900a5602400Smrgm4_undefine([docs_default]) 1901b9b4fd27SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1902b9b4fd27SmrgAC_MSG_CHECKING([whether to build documentation]) 1903b9b4fd27SmrgAC_MSG_RESULT([$build_docs]) 1904b9b4fd27Smrg]) # XORG_ENABLE_DOCS 1905b9b4fd27Smrg 1906b9b4fd27Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1907b9b4fd27Smrg# ---------------- 1908b9b4fd27Smrg# Minimum version: 1.6.0 1909b9b4fd27Smrg# 1910b9b4fd27Smrg# This macro enables a builder to skip all developer documentation. 1911b9b4fd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1912b9b4fd27Smrg# maximum flexibilty in controlling documentation building. 1913b9b4fd27Smrg# Refer to: 1914b9b4fd27Smrg# XORG_WITH_XMLTO --with-xmlto 1915b9b4fd27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1916b9b4fd27Smrg# XORG_WITH_DOXYGEN --with-doxygen 1917b9b4fd27Smrg# XORG_WITH_FOP --with-fop 1918b9b4fd27Smrg# XORG_WITH_GROFF --with-groff 1919b9b4fd27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1920b9b4fd27Smrg# 1921b9b4fd27Smrg# Interface to module: 1922b9b4fd27Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1923b9b4fd27Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1924b9b4fd27Smrg# 'no' user instructs the module not to generate developer docs 1925b9b4fd27Smrg# parm1: specify the default value, yes or no. 1926b9b4fd27Smrg# 1927b9b4fd27SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1928a5602400Smrgm4_define([devel_default], m4_default([$1], [yes])) 1929b9b4fd27SmrgAC_ARG_ENABLE(devel-docs, 1930b9b4fd27Smrg AS_HELP_STRING([--enable-devel-docs], 1931a5602400Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1932a5602400Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1933a5602400Smrgm4_undefine([devel_default]) 1934b9b4fd27SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1935b9b4fd27SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1936b9b4fd27SmrgAC_MSG_RESULT([$build_devel_docs]) 1937b9b4fd27Smrg]) # XORG_ENABLE_DEVEL_DOCS 1938b9b4fd27Smrg 1939b9b4fd27Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1940b9b4fd27Smrg# ---------------- 1941b9b4fd27Smrg# Minimum version: 1.6.0 1942b9b4fd27Smrg# 1943b9b4fd27Smrg# This macro enables a builder to skip all functional specification targets. 1944b9b4fd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1945b9b4fd27Smrg# maximum flexibilty in controlling documentation building. 1946b9b4fd27Smrg# Refer to: 1947b9b4fd27Smrg# XORG_WITH_XMLTO --with-xmlto 1948b9b4fd27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1949b9b4fd27Smrg# XORG_WITH_DOXYGEN --with-doxygen 1950b9b4fd27Smrg# XORG_WITH_FOP --with-fop 1951b9b4fd27Smrg# XORG_WITH_GROFF --with-groff 1952b9b4fd27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1953b9b4fd27Smrg# 1954b9b4fd27Smrg# Interface to module: 1955b9b4fd27Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1956b9b4fd27Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1957b9b4fd27Smrg# 'no' user instructs the module not to generate specs 1958b9b4fd27Smrg# parm1: specify the default value, yes or no. 1959b9b4fd27Smrg# 1960b9b4fd27SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1961a5602400Smrgm4_define([spec_default], m4_default([$1], [yes])) 1962b9b4fd27SmrgAC_ARG_ENABLE(specs, 1963b9b4fd27Smrg AS_HELP_STRING([--enable-specs], 1964a5602400Smrg [Enable building the specs (default: ]spec_default[)]), 1965a5602400Smrg [build_specs=$enableval], [build_specs=]spec_default) 1966a5602400Smrgm4_undefine([spec_default]) 1967b9b4fd27SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1968b9b4fd27SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1969b9b4fd27SmrgAC_MSG_RESULT([$build_specs]) 1970b9b4fd27Smrg]) # XORG_ENABLE_SPECS 1971b9b4fd27Smrg 1972a5602400Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1973a5602400Smrg# ---------------------------------------------- 1974a5602400Smrg# Minimum version: 1.13.0 1975a5602400Smrg# 1976a5602400Smrg# This macro enables a builder to enable/disable unit testing 1977a5602400Smrg# It makes no assumption about the test cases implementation 1978a5602400Smrg# Test cases may or may not use Automake "Support for test suites" 1979a5602400Smrg# They may or may not use the software utility library GLib 1980a5602400Smrg# 1981a5602400Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1982a5602400Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1983a5602400Smrg# The variable enable_unit_tests is used by other macros in this file. 1984a5602400Smrg# 1985a5602400Smrg# Interface to module: 1986a5602400Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1987a5602400Smrg# enable_unit_tests: used in configure.ac for additional configuration 1988a5602400Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1989a5602400Smrg# 'no' user instructs the module not to build tests 1990a5602400Smrg# parm1: specify the default value, yes or no. 1991a5602400Smrg# 1992a5602400SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1993a5602400SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1994a5602400SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1995a5602400Smrgm4_define([_defopt], m4_default([$1], [auto])) 1996a5602400SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1997a5602400Smrg [Enable building unit test cases (default: ]_defopt[)]), 1998a5602400Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1999a5602400Smrgm4_undefine([_defopt]) 2000a5602400SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2001a5602400SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2002a5602400SmrgAC_MSG_RESULT([$enable_unit_tests]) 2003a5602400Smrg]) # XORG_ENABLE_UNIT_TESTS 2004a5602400Smrg 2005a5602400Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2006a5602400Smrg# ---------------------------------------- 2007a5602400Smrg# Minimum version: 1.13.0 2008a5602400Smrg# 2009a5602400Smrg# GLib is a library which provides advanced data structures and functions. 2010a5602400Smrg# This macro enables a module to test for the presence of Glib. 2011a5602400Smrg# 2012a5602400Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2013a5602400Smrg# Otherwise the value of $enable_unit_tests is blank. 2014a5602400Smrg# 2015a5602400Smrg# Interface to module: 2016a5602400Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 2017a5602400Smrg# with_glib: used in configure.ac to know if GLib has been found 2018a5602400Smrg# --with-glib: 'yes' user instructs the module to use glib 2019a5602400Smrg# 'no' user instructs the module not to use glib 2020a5602400Smrg# 2021a5602400SmrgAC_DEFUN([XORG_WITH_GLIB],[ 2022a5602400SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2023a5602400Smrgm4_define([_defopt], m4_default([$2], [auto])) 2024a5602400SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2025a5602400Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 2026a5602400Smrg [with_glib=$withval], [with_glib=]_defopt) 2027a5602400Smrgm4_undefine([_defopt]) 2028a5602400Smrg 2029a5602400Smrghave_glib=no 2030a5602400Smrg# Do not probe GLib if user explicitly disabled unit testing 2031a5602400Smrgif test "x$enable_unit_tests" != x"no"; then 2032a5602400Smrg # Do not probe GLib if user explicitly disabled it 2033a5602400Smrg if test "x$with_glib" != x"no"; then 2034a5602400Smrg m4_ifval( 2035a5602400Smrg [$1], 2036a5602400Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2037a5602400Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2038a5602400Smrg ) 2039a5602400Smrg fi 2040a5602400Smrgfi 2041a5602400Smrg 2042a5602400Smrg# Not having GLib when unit testing has been explicitly requested is an error 2043a5602400Smrgif test "x$enable_unit_tests" = x"yes"; then 2044a5602400Smrg if test "x$have_glib" = x"no"; then 2045a5602400Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2046a5602400Smrg fi 2047a5602400Smrgfi 2048a5602400Smrg 2049a5602400Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 2050a5602400Smrgif test "x$enable_unit_tests" = x"no"; then 2051a5602400Smrg if test "x$with_glib" = x"yes"; then 2052a5602400Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2053a5602400Smrg fi 2054a5602400Smrgfi 2055a5602400Smrg 2056a5602400Smrg# Not having GLib when it has been explicitly requested is an error 2057a5602400Smrgif test "x$with_glib" = x"yes"; then 2058a5602400Smrg if test "x$have_glib" = x"no"; then 2059a5602400Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2060a5602400Smrg fi 2061a5602400Smrgfi 2062a5602400Smrg 2063a5602400SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2064a5602400Smrg]) # XORG_WITH_GLIB 2065a5602400Smrg 2066a5602400Smrg# XORG_LD_WRAP 2067a5602400Smrg# ------------ 2068a5602400Smrg# Minimum version: 1.13.0 2069a5602400Smrg# 2070a5602400Smrg# Check if linker supports -wrap, passed via compiler flags 2071a5602400Smrg# 2072a5602400Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2073a5602400Smrg# Otherwise the value of $enable_unit_tests is blank. 2074a5602400Smrg# 2075a5602400SmrgAC_DEFUN([XORG_LD_WRAP],[ 2076a5602400SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no]) 2077a5602400Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 2078a5602400Smrgif test "x$enable_unit_tests" = x"yes"; then 2079a5602400Smrg if test "x$have_ld_wrap" = x"no"; then 2080a5602400Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2081a5602400Smrg fi 2082a5602400Smrgfi 2083a5602400SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2084a5602400Smrg# 2085a5602400Smrg]) # XORG_LD_WRAP 2086a5602400Smrg 2087a5602400Smrg# XORG_CHECK_LINKER_FLAGS 2088a5602400Smrg# ----------------------- 2089a5602400Smrg# SYNOPSIS 2090a5602400Smrg# 2091a5602400Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE]) 2092a5602400Smrg# 2093a5602400Smrg# DESCRIPTION 2094a5602400Smrg# 2095a5602400Smrg# Check whether the given linker FLAGS work with the current language's 2096a5602400Smrg# linker, or whether they give an error. 2097a5602400Smrg# 2098a5602400Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2099a5602400Smrg# success/failure. 2100a5602400Smrg# 2101a5602400Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2102a5602400Smrg# 2103a5602400Smrg# LICENSE 2104a5602400Smrg# 2105a5602400Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2106a5602400Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2107a5602400Smrg# Copyright (c) 2009 Matteo Frigo 2108a5602400Smrg# 2109a5602400Smrg# This program is free software: you can redistribute it and/or modify it 2110a5602400Smrg# under the terms of the GNU General Public License as published by the 2111a5602400Smrg# Free Software Foundation, either version 3 of the License, or (at your 2112a5602400Smrg# option) any later version. 2113a5602400Smrg# 2114a5602400Smrg# This program is distributed in the hope that it will be useful, but 2115a5602400Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2116a5602400Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2117a5602400Smrg# Public License for more details. 2118a5602400Smrg# 2119a5602400Smrg# You should have received a copy of the GNU General Public License along 2120a5602400Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2121a5602400Smrg# 2122a5602400Smrg# As a special exception, the respective Autoconf Macro's copyright owner 2123a5602400Smrg# gives unlimited permission to copy, distribute and modify the configure 2124a5602400Smrg# scripts that are the output of Autoconf when processing the Macro. You 2125a5602400Smrg# need not follow the terms of the GNU General Public License when using 2126a5602400Smrg# or distributing such scripts, even though portions of the text of the 2127a5602400Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 2128a5602400Smrg# all other use of the material that constitutes the Autoconf Macro. 2129a5602400Smrg# 2130a5602400Smrg# This special exception to the GPL applies to versions of the Autoconf 2131a5602400Smrg# Macro released by the Autoconf Archive. When you make and distribute a 2132a5602400Smrg# modified version of the Autoconf Macro, you may extend this special 2133a5602400Smrg# exception to the GPL to apply to your modified version as well.# 2134a5602400SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2135a5602400Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2136a5602400Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2137a5602400SmrgAS_LITERAL_IF([$1], 2138a5602400Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2139a5602400Smrg ax_save_FLAGS=$LDFLAGS 2140a5602400Smrg LDFLAGS="$1" 2141a5602400Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2142a5602400Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2143a5602400Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2144a5602400Smrg LDFLAGS=$ax_save_FLAGS])], 2145a5602400Smrg [ax_save_FLAGS=$LDFLAGS 2146a5602400Smrg LDFLAGS="$1" 2147a5602400Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2148a5602400Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2149a5602400Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2150a5602400Smrg LDFLAGS=$ax_save_FLAGS]) 2151a5602400Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2152a5602400SmrgAC_MSG_RESULT($xorg_check_linker_flags) 2153a5602400Smrgif test "x$xorg_check_linker_flags" = xyes; then 2154a5602400Smrg m4_default([$2], :) 2155a5602400Smrgelse 2156a5602400Smrg m4_default([$3], :) 2157a5602400Smrgfi 2158a5602400Smrg]) # XORG_CHECK_LINKER_FLAGS 2159a5602400Smrg 2160caade7ccSmrg# XORG_CHECK_MALLOC_ZERO 2161caade7ccSmrg# ---------------------- 2162caade7ccSmrg# Minimum version: 1.0.0 2163caade7ccSmrg# 2164caade7ccSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2165caade7ccSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 2166caade7ccSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2167caade7ccSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2168caade7ccSmrgAC_ARG_ENABLE(malloc0returnsnull, 2169485f0483Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 2170caade7ccSmrg [malloc(0) returns NULL (default: auto)]), 2171caade7ccSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2172caade7ccSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2173caade7ccSmrg 2174caade7ccSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2175caade7ccSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2176a5602400Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2177a5602400Smrg#include <stdlib.h> 2178a5602400Smrg],[ 2179caade7ccSmrg char *m0, *r0, *c0, *p; 2180caade7ccSmrg m0 = malloc(0); 2181caade7ccSmrg p = malloc(10); 2182caade7ccSmrg r0 = realloc(p,0); 2183a5602400Smrg c0 = calloc(0,10); 2184a5602400Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2185a5602400Smrg])], 2186caade7ccSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 2187b9b4fd27Smrg [MALLOC_ZERO_RETURNS_NULL=no], 2188b9b4fd27Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 2189caade7ccSmrgfi 2190caade7ccSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2191caade7ccSmrg 2192caade7ccSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2193caade7ccSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2194caade7ccSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2195caade7ccSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2196caade7ccSmrgelse 2197caade7ccSmrg MALLOC_ZERO_CFLAGS="" 2198caade7ccSmrg XMALLOC_ZERO_CFLAGS="" 2199caade7ccSmrg XTMALLOC_ZERO_CFLAGS="" 2200caade7ccSmrgfi 2201caade7ccSmrg 2202caade7ccSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2203caade7ccSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2204caade7ccSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2205caade7ccSmrg]) # XORG_CHECK_MALLOC_ZERO 2206caade7ccSmrg 2207caade7ccSmrg# XORG_WITH_LINT() 2208caade7ccSmrg# ---------------- 2209caade7ccSmrg# Minimum version: 1.1.0 2210caade7ccSmrg# 2211e8a5466aSmrg# This macro enables the use of a tool that flags some suspicious and 2212e8a5466aSmrg# non-portable constructs (likely to be bugs) in C language source code. 2213e8a5466aSmrg# It will attempt to locate the tool and use appropriate options. 2214e8a5466aSmrg# There are various lint type tools on different platforms. 2215e8a5466aSmrg# 2216e8a5466aSmrg# Interface to module: 2217e8a5466aSmrg# LINT: returns the path to the tool found on the platform 2218e8a5466aSmrg# or the value set to LINT on the configure cmd line 2219e8a5466aSmrg# also an Automake conditional 2220e8a5466aSmrg# LINT_FLAGS: an Automake variable with appropriate flags 2221e8a5466aSmrg# 2222e8a5466aSmrg# --with-lint: 'yes' user instructs the module to use lint 2223e8a5466aSmrg# 'no' user instructs the module not to use lint (default) 2224e8a5466aSmrg# 2225e8a5466aSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2226e8a5466aSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2227caade7ccSmrg# 2228caade7ccSmrgAC_DEFUN([XORG_WITH_LINT],[ 2229caade7ccSmrg 2230e8a5466aSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2231e8a5466aSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2232485f0483SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2233caade7ccSmrg [Use a lint-style source code checker (default: disabled)])], 2234caade7ccSmrg [use_lint=$withval], [use_lint=no]) 2235e8a5466aSmrg 2236e8a5466aSmrg# Obtain platform specific info like program name and options 2237e8a5466aSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2238e8a5466aSmrgcase $host_os in 2239e8a5466aSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2240e8a5466aSmrg lint_name=splint 2241e8a5466aSmrg lint_options="-badflag" 2242e8a5466aSmrg ;; 2243e8a5466aSmrg *freebsd* | *netbsd*) 2244e8a5466aSmrg lint_name=lint 2245e8a5466aSmrg lint_options="-u -b" 2246e8a5466aSmrg ;; 2247e8a5466aSmrg *solaris*) 2248e8a5466aSmrg lint_name=lint 2249e8a5466aSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2250e8a5466aSmrg ;; 2251e8a5466aSmrgesac 2252e8a5466aSmrg 2253e8a5466aSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2254e8a5466aSmrgif test "x$use_lint" = x"yes" ; then 2255e8a5466aSmrg AC_PATH_PROG([LINT], [$lint_name]) 2256e8a5466aSmrg if test "x$LINT" = "x"; then 2257e8a5466aSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2258e8a5466aSmrg fi 2259e8a5466aSmrgelif test "x$use_lint" = x"no" ; then 2260e8a5466aSmrg if test "x$LINT" != "x"; then 2261e8a5466aSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2262e8a5466aSmrg fi 2263caade7ccSmrgelse 2264e8a5466aSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2265caade7ccSmrgfi 2266e8a5466aSmrg 2267e8a5466aSmrg# User supplied flags override default flags 2268e8a5466aSmrgif test "x$LINT_FLAGS" != "x"; then 2269e8a5466aSmrg lint_options=$LINT_FLAGS 2270caade7ccSmrgfi 2271caade7ccSmrg 2272e8a5466aSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2273e8a5466aSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2274caade7ccSmrg 2275caade7ccSmrg]) # XORG_WITH_LINT 2276caade7ccSmrg 2277caade7ccSmrg# XORG_LINT_LIBRARY(LIBNAME) 2278caade7ccSmrg# -------------------------- 2279caade7ccSmrg# Minimum version: 1.1.0 2280caade7ccSmrg# 2281caade7ccSmrg# Sets up flags for building lint libraries for checking programs that call 2282caade7ccSmrg# functions in the library. 2283caade7ccSmrg# 2284e8a5466aSmrg# Interface to module: 2285e8a5466aSmrg# LINTLIB - Automake variable with the name of lint library file to make 2286e8a5466aSmrg# MAKE_LINT_LIB - Automake conditional 2287e8a5466aSmrg# 2288e8a5466aSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2289e8a5466aSmrg# - 'no' user instructs the module not to create a lint library (default) 2290caade7ccSmrg 2291caade7ccSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2292caade7ccSmrgAC_REQUIRE([XORG_WITH_LINT]) 2293485f0483SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2294caade7ccSmrg [Create lint library (default: disabled)])], 2295caade7ccSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2296e8a5466aSmrg 2297e8a5466aSmrgif test "x$make_lint_lib" = x"yes" ; then 2298e8a5466aSmrg LINTLIB=llib-l$1.ln 2299e8a5466aSmrg if test "x$LINT" = "x"; then 2300e8a5466aSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2301e8a5466aSmrg fi 2302e8a5466aSmrgelif test "x$make_lint_lib" != x"no" ; then 2303e8a5466aSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2304caade7ccSmrgfi 2305e8a5466aSmrg 2306caade7ccSmrgAC_SUBST(LINTLIB) 2307caade7ccSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2308caade7ccSmrg 2309caade7ccSmrg]) # XORG_LINT_LIBRARY 2310caade7ccSmrg 2311a5602400Smrg# XORG_COMPILER_BRAND 2312a5602400Smrg# ------------------- 2313a5602400Smrg# Minimum version: 1.14.0 2314a5602400Smrg# 2315a5602400Smrg# Checks for various brands of compilers and sets flags as appropriate: 2316a5602400Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2317a5602400Smrg# clang compiler - sets CLANGCC to "yes" 2318a5602400Smrg# Intel compiler - sets INTELCC to "yes" 2319a5602400Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2320a5602400Smrg# 2321a5602400SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 2322a5602400SmrgAC_REQUIRE([AC_PROG_CC_C99]) 2323a5602400SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2324a5602400SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2325a5602400SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2326a5602400Smrg]) # XORG_COMPILER_BRAND 2327a5602400Smrg 2328485f0483Smrg# XORG_CWARNFLAGS 2329485f0483Smrg# --------------- 2330485f0483Smrg# Minimum version: 1.2.0 2331485f0483Smrg# 2332485f0483Smrg# Defines CWARNFLAGS to enable C compiler warnings. 2333485f0483Smrg# 2334485f0483SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 2335e8a5466aSmrgAC_REQUIRE([AC_PROG_CC_C99]) 2336a5602400SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 2337485f0483Smrgif test "x$GCC" = xyes ; then 2338485f0483Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 2339485f0483Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 2340b9b4fd27Smrg-Wbad-function-cast -Wformat=2" 2341485f0483Smrg case `$CC -dumpversion` in 2342485f0483Smrg 3.4.* | 4.*) 2343485f0483Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 2344485f0483Smrg ;; 2345485f0483Smrg esac 2346485f0483Smrgelse 2347485f0483Smrg if test "x$SUNCC" = "xyes"; then 2348485f0483Smrg CWARNFLAGS="-v" 2349485f0483Smrg fi 2350485f0483Smrgfi 2351485f0483SmrgAC_SUBST(CWARNFLAGS) 2352485f0483Smrg]) # XORG_CWARNFLAGS 2353485f0483Smrg 2354485f0483Smrg# XORG_STRICT_OPTION 2355485f0483Smrg# ----------------------- 2356485f0483Smrg# Minimum version: 1.3.0 2357485f0483Smrg# 2358a5602400Smrg# Add configure option to enable strict compilation flags, such as treating 2359a5602400Smrg# warnings as fatal errors. 2360a5602400Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 2361a5602400Smrg# $CWARNFLAGS. 2362a5602400Smrg# 2363a5602400Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 2364a5602400Smrg# when strict compilation is unconditionally desired. 2365485f0483SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 2366e8a5466aSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 2367485f0483SmrgAC_REQUIRE([AC_PROG_CC_C99]) 2368a5602400SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 2369485f0483SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 2370485f0483Smrg 2371485f0483SmrgAC_ARG_ENABLE(strict-compilation, 2372485f0483Smrg AS_HELP_STRING([--enable-strict-compilation], 2373485f0483Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 2374485f0483Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 2375a5602400Smrgif test "x$GCC" = xyes ; then 2376a5602400Smrg STRICT_CFLAGS="-pedantic -Werror" 2377a5602400Smrg # Add -Werror=attributes if supported (gcc 4.2 & later) 2378a5602400Smrg AC_MSG_CHECKING([if $CC supports -Werror=attributes]) 2379a5602400Smrg save_CFLAGS="$CFLAGS" 2380a5602400Smrg CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes" 2381a5602400Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])], 2382a5602400Smrg [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" 2383a5602400Smrg AC_MSG_RESULT([yes])], 2384a5602400Smrg [AC_MSG_RESULT([no])]) 2385a5602400Smrg CFLAGS="$save_CFLAGS" 2386a5602400Smrgelif test "x$SUNCC" = "xyes"; then 2387a5602400Smrg STRICT_CFLAGS="-errwarn" 2388a5602400Smrgelif test "x$INTELCC" = "xyes"; then 2389a5602400Smrg STRICT_CFLAGS="-Werror" 2390a5602400Smrgfi 2391485f0483Smrgif test "x$STRICT_COMPILE" = "xyes"; then 2392a5602400Smrg CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 2393485f0483Smrgfi 2394a5602400SmrgAC_SUBST([STRICT_CFLAGS]) 2395485f0483SmrgAC_SUBST([CWARNFLAGS]) 2396485f0483Smrg]) # XORG_STRICT_OPTION 2397485f0483Smrg 2398485f0483Smrg# XORG_DEFAULT_OPTIONS 2399485f0483Smrg# -------------------- 2400485f0483Smrg# Minimum version: 1.3.0 2401485f0483Smrg# 2402485f0483Smrg# Defines default options for X.Org modules. 2403485f0483Smrg# 2404485f0483SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 2405e8a5466aSmrgAC_REQUIRE([AC_PROG_INSTALL]) 2406485f0483SmrgXORG_CWARNFLAGS 2407485f0483SmrgXORG_STRICT_OPTION 2408485f0483SmrgXORG_RELEASE_VERSION 2409485f0483SmrgXORG_CHANGELOG 2410b9b4fd27SmrgXORG_INSTALL 2411485f0483SmrgXORG_MANPAGE_SECTIONS 2412b9b4fd27Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2413b9b4fd27Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 2414485f0483Smrg]) # XORG_DEFAULT_OPTIONS 2415b9b4fd27Smrg 2416b9b4fd27Smrg# XORG_INSTALL() 2417b9b4fd27Smrg# ---------------- 2418b9b4fd27Smrg# Minimum version: 1.4.0 2419b9b4fd27Smrg# 2420b9b4fd27Smrg# Defines the variable INSTALL_CMD as the command to copy 2421b9b4fd27Smrg# INSTALL from $prefix/share/util-macros. 2422b9b4fd27Smrg# 2423b9b4fd27SmrgAC_DEFUN([XORG_INSTALL], [ 2424b9b4fd27SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2425b9b4fd27Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2426b9b4fd27SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2427b9b4fd27Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2428b9b4fd27Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 2429b9b4fd27Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 2430b9b4fd27SmrgAC_SUBST([INSTALL_CMD]) 2431b9b4fd27Smrg]) # XORG_INSTALL 2432caade7ccSmrgdnl Copyright 2005 Red Hat, Inc 2433caade7ccSmrgdnl 2434caade7ccSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 2435caade7ccSmrgdnl documentation for any purpose is hereby granted without fee, provided that 2436caade7ccSmrgdnl the above copyright notice appear in all copies and that both that 2437caade7ccSmrgdnl copyright notice and this permission notice appear in supporting 2438caade7ccSmrgdnl documentation. 2439caade7ccSmrgdnl 2440caade7ccSmrgdnl The above copyright notice and this permission notice shall be included 2441caade7ccSmrgdnl in all copies or substantial portions of the Software. 2442caade7ccSmrgdnl 2443caade7ccSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2444caade7ccSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2445caade7ccSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2446caade7ccSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2447caade7ccSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2448caade7ccSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2449caade7ccSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 2450caade7ccSmrgdnl 2451caade7ccSmrgdnl Except as contained in this notice, the name of the copyright holders shall 2452caade7ccSmrgdnl not be used in advertising or otherwise to promote the sale, use or 2453caade7ccSmrgdnl other dealings in this Software without prior written authorization 2454caade7ccSmrgdnl from the copyright holders. 2455caade7ccSmrgdnl 2456caade7ccSmrg 2457caade7ccSmrg# XORG_RELEASE_VERSION 2458caade7ccSmrg# -------------------- 2459e8a5466aSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 2460caade7ccSmrg 2461caade7ccSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 2462caade7ccSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 2463caade7ccSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 2464caade7ccSmrg [Major version of this package]) 2465caade7ccSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 2466caade7ccSmrg if test "x$PVM" = "x"; then 2467caade7ccSmrg PVM="0" 2468caade7ccSmrg fi 2469caade7ccSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 2470caade7ccSmrg [$PVM], 2471caade7ccSmrg [Minor version of this package]) 2472caade7ccSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 2473caade7ccSmrg if test "x$PVP" = "x"; then 2474caade7ccSmrg PVP="0" 2475caade7ccSmrg fi 2476caade7ccSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 2477caade7ccSmrg [$PVP], 2478caade7ccSmrg [Patch version of this package]) 2479caade7ccSmrg]) 2480caade7ccSmrg 2481485f0483Smrg# XORG_CHANGELOG() 2482485f0483Smrg# ---------------- 2483485f0483Smrg# Minimum version: 1.2.0 2484485f0483Smrg# 2485485f0483Smrg# Defines the variable CHANGELOG_CMD as the command to generate 2486485f0483Smrg# ChangeLog from git. 2487485f0483Smrg# 2488485f0483Smrg# 2489485f0483SmrgAC_DEFUN([XORG_CHANGELOG], [ 2490b9b4fd27SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 2491b9b4fd27Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2492b9b4fd27Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 2493485f0483Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 2494485f0483SmrgAC_SUBST([CHANGELOG_CMD]) 2495485f0483Smrg]) # XORG_CHANGELOG 2496485f0483Smrg 2497b9b4fd27Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2498b9b4fd27Smrg# 2499b9b4fd27Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2500b9b4fd27Smrg# 2501b9b4fd27Smrg# This program is free software; you can redistribute it and/or modify 2502b9b4fd27Smrg# it under the terms of the GNU General Public License as published by 2503b9b4fd27Smrg# the Free Software Foundation; either version 2 of the License, or 2504b9b4fd27Smrg# (at your option) any later version. 2505b9b4fd27Smrg# 2506b9b4fd27Smrg# This program is distributed in the hope that it will be useful, but 2507b9b4fd27Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2508b9b4fd27Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2509b9b4fd27Smrg# General Public License for more details. 2510b9b4fd27Smrg# 2511b9b4fd27Smrg# You should have received a copy of the GNU General Public License 2512b9b4fd27Smrg# along with this program; if not, write to the Free Software 2513b9b4fd27Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2514b9b4fd27Smrg# 2515b9b4fd27Smrg# As a special exception to the GNU General Public License, if you 2516b9b4fd27Smrg# distribute this file as part of a program that contains a 2517b9b4fd27Smrg# configuration script generated by Autoconf, you may include it under 2518b9b4fd27Smrg# the same distribution terms that you use for the rest of that program. 2519caade7ccSmrg 2520b9b4fd27Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 2521b9b4fd27Smrg# ---------------------------------- 2522b9b4fd27SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 2523b9b4fd27Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 2524b9b4fd27Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 2525b9b4fd27SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 2526b9b4fd27Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 2527b9b4fd27Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 2528b9b4fd27Smrgfi 2529b9b4fd27Smrgif test -n "$PKG_CONFIG"; then 2530b9b4fd27Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 2531b9b4fd27Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 2532b9b4fd27Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 2533b9b4fd27Smrg AC_MSG_RESULT([yes]) 2534b9b4fd27Smrg else 2535b9b4fd27Smrg AC_MSG_RESULT([no]) 2536b9b4fd27Smrg PKG_CONFIG="" 2537b9b4fd27Smrg fi 2538b9b4fd27Smrg 2539b9b4fd27Smrgfi[]dnl 2540b9b4fd27Smrg])# PKG_PROG_PKG_CONFIG 2541caade7ccSmrg 2542b9b4fd27Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2543b9b4fd27Smrg# 2544b9b4fd27Smrg# Check to see whether a particular set of modules exists. Similar 2545b9b4fd27Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 2546b9b4fd27Smrg# 2547b9b4fd27Smrg# 2548b9b4fd27Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 2549b9b4fd27Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 2550b9b4fd27Smrg# PKG_CHECK_EXISTS manually 2551b9b4fd27Smrg# -------------------------------------------------------------- 2552b9b4fd27SmrgAC_DEFUN([PKG_CHECK_EXISTS], 2553b9b4fd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2554b9b4fd27Smrgif test -n "$PKG_CONFIG" && \ 2555b9b4fd27Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 2556b9b4fd27Smrg m4_ifval([$2], [$2], [:]) 2557b9b4fd27Smrgm4_ifvaln([$3], [else 2558b9b4fd27Smrg $3])dnl 2559b9b4fd27Smrgfi]) 2560caade7ccSmrg 2561caade7ccSmrg 2562b9b4fd27Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 2563b9b4fd27Smrg# --------------------------------------------- 2564b9b4fd27Smrgm4_define([_PKG_CONFIG], 2565b9b4fd27Smrg[if test -n "$$1"; then 2566b9b4fd27Smrg pkg_cv_[]$1="$$1" 2567b9b4fd27Smrg elif test -n "$PKG_CONFIG"; then 2568b9b4fd27Smrg PKG_CHECK_EXISTS([$3], 2569b9b4fd27Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 2570b9b4fd27Smrg [pkg_failed=yes]) 2571b9b4fd27Smrg else 2572b9b4fd27Smrg pkg_failed=untried 2573b9b4fd27Smrgfi[]dnl 2574b9b4fd27Smrg])# _PKG_CONFIG 2575caade7ccSmrg 2576b9b4fd27Smrg# _PKG_SHORT_ERRORS_SUPPORTED 2577b9b4fd27Smrg# ----------------------------- 2578b9b4fd27SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 2579b9b4fd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2580b9b4fd27Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2581b9b4fd27Smrg _pkg_short_errors_supported=yes 2582b9b4fd27Smrgelse 2583b9b4fd27Smrg _pkg_short_errors_supported=no 2584b9b4fd27Smrgfi[]dnl 2585b9b4fd27Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 2586caade7ccSmrg 2587caade7ccSmrg 2588b9b4fd27Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 2589b9b4fd27Smrg# [ACTION-IF-NOT-FOUND]) 2590b9b4fd27Smrg# 2591b9b4fd27Smrg# 2592b9b4fd27Smrg# Note that if there is a possibility the first call to 2593b9b4fd27Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 2594b9b4fd27Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 2595b9b4fd27Smrg# 2596b9b4fd27Smrg# 2597b9b4fd27Smrg# -------------------------------------------------------------- 2598b9b4fd27SmrgAC_DEFUN([PKG_CHECK_MODULES], 2599b9b4fd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2600b9b4fd27SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 2601b9b4fd27SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 2602caade7ccSmrg 2603b9b4fd27Smrgpkg_failed=no 2604b9b4fd27SmrgAC_MSG_CHECKING([for $1]) 2605caade7ccSmrg 2606b9b4fd27Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 2607b9b4fd27Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 2608caade7ccSmrg 2609b9b4fd27Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 2610b9b4fd27Smrgand $1[]_LIBS to avoid the need to call pkg-config. 2611b9b4fd27SmrgSee the pkg-config man page for more details.]) 2612caade7ccSmrg 2613b9b4fd27Smrgif test $pkg_failed = yes; then 2614b9b4fd27Smrg _PKG_SHORT_ERRORS_SUPPORTED 2615b9b4fd27Smrg if test $_pkg_short_errors_supported = yes; then 2616b9b4fd27Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 2617b9b4fd27Smrg else 2618b9b4fd27Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 2619b9b4fd27Smrg fi 2620b9b4fd27Smrg # Put the nasty error message in config.log where it belongs 2621b9b4fd27Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 2622caade7ccSmrg 2623b9b4fd27Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 2624b9b4fd27Smrg[Package requirements ($2) were not met: 2625caade7ccSmrg 2626b9b4fd27Smrg$$1_PKG_ERRORS 2627b9b4fd27Smrg 2628b9b4fd27SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 2629b9b4fd27Smrginstalled software in a non-standard prefix. 2630b9b4fd27Smrg 2631b9b4fd27Smrg_PKG_TEXT 2632b9b4fd27Smrg])], 2633b9b4fd27Smrg [AC_MSG_RESULT([no]) 2634b9b4fd27Smrg $4]) 2635b9b4fd27Smrgelif test $pkg_failed = untried; then 2636b9b4fd27Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 2637b9b4fd27Smrg[The pkg-config script could not be found or is too old. Make sure it 2638b9b4fd27Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 2639b9b4fd27Smrgpath to pkg-config. 2640b9b4fd27Smrg 2641b9b4fd27Smrg_PKG_TEXT 2642b9b4fd27Smrg 2643b9b4fd27SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 2644b9b4fd27Smrg [$4]) 2645b9b4fd27Smrgelse 2646b9b4fd27Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 2647b9b4fd27Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 2648b9b4fd27Smrg AC_MSG_RESULT([yes]) 2649b9b4fd27Smrg ifelse([$3], , :, [$3]) 2650b9b4fd27Smrgfi[]dnl 2651b9b4fd27Smrg])# PKG_CHECK_MODULES 2652b9b4fd27Smrg 2653b9b4fd27Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2654b9b4fd27Smrg# 2655b9b4fd27Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2656e8a5466aSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2657e8a5466aSmrg# Inc. 2658b9b4fd27Smrg# Written by Gordon Matzigkeit, 1996 2659b9b4fd27Smrg# 2660b9b4fd27Smrg# This file is free software; the Free Software Foundation gives 2661b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without 2662b9b4fd27Smrg# modifications, as long as this notice is preserved. 2663b9b4fd27Smrg 2664b9b4fd27Smrgm4_define([_LT_COPYING], [dnl 2665b9b4fd27Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2666e8a5466aSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2667e8a5466aSmrg# Inc. 2668b9b4fd27Smrg# Written by Gordon Matzigkeit, 1996 2669b9b4fd27Smrg# 2670b9b4fd27Smrg# This file is part of GNU Libtool. 2671b9b4fd27Smrg# 2672b9b4fd27Smrg# GNU Libtool is free software; you can redistribute it and/or 2673b9b4fd27Smrg# modify it under the terms of the GNU General Public License as 2674b9b4fd27Smrg# published by the Free Software Foundation; either version 2 of 2675b9b4fd27Smrg# the License, or (at your option) any later version. 2676b9b4fd27Smrg# 2677b9b4fd27Smrg# As a special exception to the GNU General Public License, 2678b9b4fd27Smrg# if you distribute this file as part of a program or library that 2679b9b4fd27Smrg# is built using GNU Libtool, you may include this file under the 2680b9b4fd27Smrg# same distribution terms that you use for the rest of that program. 2681b9b4fd27Smrg# 2682b9b4fd27Smrg# GNU Libtool is distributed in the hope that it will be useful, 2683b9b4fd27Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2684b9b4fd27Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2685b9b4fd27Smrg# GNU General Public License for more details. 2686b9b4fd27Smrg# 2687b9b4fd27Smrg# You should have received a copy of the GNU General Public License 2688b9b4fd27Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 2689b9b4fd27Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 2690b9b4fd27Smrg# obtained by writing to the Free Software Foundation, Inc., 2691b9b4fd27Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 2692b9b4fd27Smrg]) 2693b9b4fd27Smrg 2694e8a5466aSmrg# serial 57 LT_INIT 2695b9b4fd27Smrg 2696b9b4fd27Smrg 2697b9b4fd27Smrg# LT_PREREQ(VERSION) 2698b9b4fd27Smrg# ------------------ 2699b9b4fd27Smrg# Complain and exit if this libtool version is less that VERSION. 2700b9b4fd27Smrgm4_defun([LT_PREREQ], 2701b9b4fd27Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 2702b9b4fd27Smrg [m4_default([$3], 2703b9b4fd27Smrg [m4_fatal([Libtool version $1 or higher is required], 2704b9b4fd27Smrg 63)])], 2705b9b4fd27Smrg [$2])]) 2706b9b4fd27Smrg 2707b9b4fd27Smrg 2708b9b4fd27Smrg# _LT_CHECK_BUILDDIR 2709b9b4fd27Smrg# ------------------ 2710b9b4fd27Smrg# Complain if the absolute build directory name contains unusual characters 2711b9b4fd27Smrgm4_defun([_LT_CHECK_BUILDDIR], 2712b9b4fd27Smrg[case `pwd` in 2713b9b4fd27Smrg *\ * | *\ *) 2714b9b4fd27Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 2715b9b4fd27Smrgesac 2716b9b4fd27Smrg]) 2717b9b4fd27Smrg 2718b9b4fd27Smrg 2719b9b4fd27Smrg# LT_INIT([OPTIONS]) 2720b9b4fd27Smrg# ------------------ 2721b9b4fd27SmrgAC_DEFUN([LT_INIT], 2722b9b4fd27Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 2723e8a5466aSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 2724b9b4fd27SmrgAC_BEFORE([$0], [LT_LANG])dnl 2725b9b4fd27SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 2726b9b4fd27SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 2727b9b4fd27Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 2728b9b4fd27Smrg 2729b9b4fd27Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 2730b9b4fd27Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 2731b9b4fd27Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 2732b9b4fd27Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 2733b9b4fd27Smrgdnl unless we require an AC_DEFUNed macro: 2734b9b4fd27SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 2735b9b4fd27SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 2736b9b4fd27SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 2737b9b4fd27SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 2738b9b4fd27Smrgm4_require([_LT_PROG_LTMAIN])dnl 2739b9b4fd27Smrg 2740e8a5466aSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 2741e8a5466aSmrg 2742b9b4fd27Smrgdnl Parse OPTIONS 2743b9b4fd27Smrg_LT_SET_OPTIONS([$0], [$1]) 2744b9b4fd27Smrg 2745b9b4fd27Smrg# This can be used to rebuild libtool when needed 2746b9b4fd27SmrgLIBTOOL_DEPS="$ltmain" 2747b9b4fd27Smrg 2748b9b4fd27Smrg# Always use our own libtool. 2749b9b4fd27SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 2750b9b4fd27SmrgAC_SUBST(LIBTOOL)dnl 2751b9b4fd27Smrg 2752b9b4fd27Smrg_LT_SETUP 2753b9b4fd27Smrg 2754b9b4fd27Smrg# Only expand once: 2755b9b4fd27Smrgm4_define([LT_INIT]) 2756b9b4fd27Smrg])# LT_INIT 2757b9b4fd27Smrg 2758b9b4fd27Smrg# Old names: 2759b9b4fd27SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 2760b9b4fd27SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 2761b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 2762b9b4fd27Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 2763b9b4fd27Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 2764b9b4fd27Smrg 2765b9b4fd27Smrg 2766b9b4fd27Smrg# _LT_CC_BASENAME(CC) 2767b9b4fd27Smrg# ------------------- 2768b9b4fd27Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2769b9b4fd27Smrgm4_defun([_LT_CC_BASENAME], 2770b9b4fd27Smrg[for cc_temp in $1""; do 2771b9b4fd27Smrg case $cc_temp in 2772b9b4fd27Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2773b9b4fd27Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2774b9b4fd27Smrg \-*) ;; 2775b9b4fd27Smrg *) break;; 2776b9b4fd27Smrg esac 2777b9b4fd27Smrgdone 2778e8a5466aSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 2779b9b4fd27Smrg]) 2780b9b4fd27Smrg 2781b9b4fd27Smrg 2782b9b4fd27Smrg# _LT_FILEUTILS_DEFAULTS 2783b9b4fd27Smrg# ---------------------- 2784b9b4fd27Smrg# It is okay to use these file commands and assume they have been set 2785b9b4fd27Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 2786b9b4fd27Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 2787b9b4fd27Smrg[: ${CP="cp -f"} 2788b9b4fd27Smrg: ${MV="mv -f"} 2789b9b4fd27Smrg: ${RM="rm -f"} 2790b9b4fd27Smrg])# _LT_FILEUTILS_DEFAULTS 2791b9b4fd27Smrg 2792b9b4fd27Smrg 2793b9b4fd27Smrg# _LT_SETUP 2794b9b4fd27Smrg# --------- 2795b9b4fd27Smrgm4_defun([_LT_SETUP], 2796b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2797b9b4fd27SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2798e8a5466aSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 2799e8a5466aSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 2800e8a5466aSmrg 2801b9b4fd27Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 2802b9b4fd27Smrg_LT_DECL([], [host], [0])dnl 2803b9b4fd27Smrg_LT_DECL([], [host_os], [0])dnl 2804b9b4fd27Smrgdnl 2805b9b4fd27Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 2806b9b4fd27Smrg_LT_DECL([], [build], [0])dnl 2807b9b4fd27Smrg_LT_DECL([], [build_os], [0])dnl 2808b9b4fd27Smrgdnl 2809b9b4fd27SmrgAC_REQUIRE([AC_PROG_CC])dnl 2810b9b4fd27SmrgAC_REQUIRE([LT_PATH_LD])dnl 2811b9b4fd27SmrgAC_REQUIRE([LT_PATH_NM])dnl 2812b9b4fd27Smrgdnl 2813b9b4fd27SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 2814b9b4fd27Smrgtest -z "$LN_S" && LN_S="ln -s" 2815b9b4fd27Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 2816b9b4fd27Smrgdnl 2817b9b4fd27SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 2818b9b4fd27Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2819b9b4fd27Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2820b9b4fd27Smrgdnl 2821b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2822b9b4fd27Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2823a5602400Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 2824b9b4fd27Smrgm4_require([_LT_CMD_RELOAD])dnl 2825b9b4fd27Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2826a5602400Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 2827b9b4fd27Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2828b9b4fd27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2829a5602400Smrgm4_require([_LT_WITH_SYSROOT])dnl 2830b9b4fd27Smrg 2831b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([ 2832b9b4fd27Smrg# See if we are running on zsh, and set the options which allow our 2833b9b4fd27Smrg# commands through without removal of \ escapes INIT. 2834b9b4fd27Smrgif test -n "\${ZSH_VERSION+set}" ; then 2835b9b4fd27Smrg setopt NO_GLOB_SUBST 2836b9b4fd27Smrgfi 2837b9b4fd27Smrg]) 2838b9b4fd27Smrgif test -n "${ZSH_VERSION+set}" ; then 2839b9b4fd27Smrg setopt NO_GLOB_SUBST 2840b9b4fd27Smrgfi 2841b9b4fd27Smrg 2842b9b4fd27Smrg_LT_CHECK_OBJDIR 2843b9b4fd27Smrg 2844b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl 2845b9b4fd27Smrg 2846b9b4fd27Smrgcase $host_os in 2847b9b4fd27Smrgaix3*) 2848b9b4fd27Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2849b9b4fd27Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2850caade7ccSmrg # vanish in a puff of smoke. 2851caade7ccSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 2852caade7ccSmrg COLLECT_NAMES= 2853caade7ccSmrg export COLLECT_NAMES 2854caade7ccSmrg fi 2855caade7ccSmrg ;; 2856caade7ccSmrgesac 2857caade7ccSmrg 2858caade7ccSmrg# Global variables: 2859b9b4fd27Smrgofile=libtool 2860caade7ccSmrgcan_build_shared=yes 2861caade7ccSmrg 2862caade7ccSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 2863caade7ccSmrg# which needs '.lib'). 2864caade7ccSmrglibext=a 2865caade7ccSmrg 2866b9b4fd27Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2867caade7ccSmrg 2868caade7ccSmrgold_CC="$CC" 2869caade7ccSmrgold_CFLAGS="$CFLAGS" 2870caade7ccSmrg 2871caade7ccSmrg# Set sane defaults for various variables 2872caade7ccSmrgtest -z "$CC" && CC=cc 2873caade7ccSmrgtest -z "$LTCC" && LTCC=$CC 2874caade7ccSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2875caade7ccSmrgtest -z "$LD" && LD=ld 2876caade7ccSmrgtest -z "$ac_objext" && ac_objext=o 2877caade7ccSmrg 2878caade7ccSmrg_LT_CC_BASENAME([$compiler]) 2879caade7ccSmrg 2880caade7ccSmrg# Only perform the check for file, if the check method requires it 2881b9b4fd27Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2882caade7ccSmrgcase $deplibs_check_method in 2883caade7ccSmrgfile_magic*) 2884caade7ccSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2885b9b4fd27Smrg _LT_PATH_MAGIC 2886caade7ccSmrg fi 2887caade7ccSmrg ;; 2888caade7ccSmrgesac 2889caade7ccSmrg 2890b9b4fd27Smrg# Use C for the default configuration in the libtool script 2891b9b4fd27SmrgLT_SUPPORTED_TAG([CC]) 2892b9b4fd27Smrg_LT_LANG_C_CONFIG 2893b9b4fd27Smrg_LT_LANG_DEFAULT_CONFIG 2894b9b4fd27Smrg_LT_CONFIG_COMMANDS 2895b9b4fd27Smrg])# _LT_SETUP 2896485f0483Smrg 2897caade7ccSmrg 2898e8a5466aSmrg# _LT_PREPARE_SED_QUOTE_VARS 2899e8a5466aSmrg# -------------------------- 2900e8a5466aSmrg# Define a few sed substitution that help us do robust quoting. 2901e8a5466aSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2902e8a5466aSmrg[# Backslashify metacharacters that are still active within 2903e8a5466aSmrg# double-quoted strings. 2904e8a5466aSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2905e8a5466aSmrg 2906e8a5466aSmrg# Same as above, but do not quote variable references. 2907e8a5466aSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2908e8a5466aSmrg 2909e8a5466aSmrg# Sed substitution to delay expansion of an escaped shell variable in a 2910e8a5466aSmrg# double_quote_subst'ed string. 2911e8a5466aSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2912e8a5466aSmrg 2913e8a5466aSmrg# Sed substitution to delay expansion of an escaped single quote. 2914e8a5466aSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2915e8a5466aSmrg 2916e8a5466aSmrg# Sed substitution to avoid accidental globbing in evaled expressions 2917e8a5466aSmrgno_glob_subst='s/\*/\\\*/g' 2918e8a5466aSmrg]) 2919e8a5466aSmrg 2920b9b4fd27Smrg# _LT_PROG_LTMAIN 2921b9b4fd27Smrg# --------------- 2922b9b4fd27Smrg# Note that this code is called both from `configure', and `config.status' 2923b9b4fd27Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2924b9b4fd27Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2925b9b4fd27Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2926b9b4fd27Smrgm4_defun([_LT_PROG_LTMAIN], 2927b9b4fd27Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2928b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2929b9b4fd27Smrgltmain="$ac_aux_dir/ltmain.sh" 2930b9b4fd27Smrg])# _LT_PROG_LTMAIN 2931caade7ccSmrg 2932caade7ccSmrg 2933caade7ccSmrg 2934b9b4fd27Smrg# So that we can recreate a full libtool script including additional 2935b9b4fd27Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2936b9b4fd27Smrg# in macros and then make a single call at the end using the `libtool' 2937b9b4fd27Smrg# label. 2938caade7ccSmrg 2939caade7ccSmrg 2940b9b4fd27Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2941b9b4fd27Smrg# ---------------------------------------- 2942b9b4fd27Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2943b9b4fd27Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2944b9b4fd27Smrg[m4_ifval([$1], 2945b9b4fd27Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 2946b9b4fd27Smrg [$1 2947b9b4fd27Smrg])])]) 2948caade7ccSmrg 2949b9b4fd27Smrg# Initialize. 2950b9b4fd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 2951caade7ccSmrg 2952caade7ccSmrg 2953b9b4fd27Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 2954b9b4fd27Smrg# ------------------------------ 2955b9b4fd27Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2956b9b4fd27Smrgm4_define([_LT_CONFIG_LIBTOOL], 2957b9b4fd27Smrg[m4_ifval([$1], 2958b9b4fd27Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 2959b9b4fd27Smrg [$1 2960b9b4fd27Smrg])])]) 2961b9b4fd27Smrg 2962b9b4fd27Smrg# Initialize. 2963b9b4fd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 2964b9b4fd27Smrg 2965b9b4fd27Smrg 2966b9b4fd27Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 2967b9b4fd27Smrg# ----------------------------------------------------- 2968b9b4fd27Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 2969b9b4fd27Smrg[_LT_CONFIG_LIBTOOL([$1]) 2970b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 2971b9b4fd27Smrg]) 2972caade7ccSmrg 2973b9b4fd27Smrg 2974b9b4fd27Smrg# _LT_FORMAT_COMMENT([COMMENT]) 2975b9b4fd27Smrg# ----------------------------- 2976b9b4fd27Smrg# Add leading comment marks to the start of each line, and a trailing 2977b9b4fd27Smrg# full-stop to the whole comment if one is not present already. 2978b9b4fd27Smrgm4_define([_LT_FORMAT_COMMENT], 2979b9b4fd27Smrg[m4_ifval([$1], [ 2980b9b4fd27Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 2981b9b4fd27Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 2982b9b4fd27Smrg)]) 2983b9b4fd27Smrg 2984b9b4fd27Smrg 2985b9b4fd27Smrg 2986b9b4fd27Smrg 2987b9b4fd27Smrg 2988b9b4fd27Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 2989b9b4fd27Smrg# ------------------------------------------------------------------- 2990b9b4fd27Smrg# CONFIGNAME is the name given to the value in the libtool script. 2991b9b4fd27Smrg# VARNAME is the (base) name used in the configure script. 2992b9b4fd27Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 2993b9b4fd27Smrg# VARNAME. Any other value will be used directly. 2994b9b4fd27Smrgm4_define([_LT_DECL], 2995b9b4fd27Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 2996b9b4fd27Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 2997b9b4fd27Smrg [m4_ifval([$1], [$1], [$2])]) 2998b9b4fd27Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 2999b9b4fd27Smrg m4_ifval([$4], 3000b9b4fd27Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3001b9b4fd27Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3002b9b4fd27Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3003caade7ccSmrg]) 3004caade7ccSmrg 3005caade7ccSmrg 3006b9b4fd27Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3007b9b4fd27Smrg# -------------------------------------------------------- 3008b9b4fd27Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3009caade7ccSmrg 3010caade7ccSmrg 3011b9b4fd27Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3012b9b4fd27Smrg# ------------------------------------------------ 3013b9b4fd27Smrgm4_define([lt_decl_tag_varnames], 3014b9b4fd27Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3015caade7ccSmrg 3016485f0483Smrg 3017b9b4fd27Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3018b9b4fd27Smrg# --------------------------------------------------------- 3019b9b4fd27Smrgm4_define([_lt_decl_filter], 3020b9b4fd27Smrg[m4_case([$#], 3021b9b4fd27Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3022b9b4fd27Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3023b9b4fd27Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3024b9b4fd27Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3025b9b4fd27Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3026485f0483Smrg]) 3027caade7ccSmrg 3028caade7ccSmrg 3029b9b4fd27Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3030b9b4fd27Smrg# -------------------------------------------------- 3031b9b4fd27Smrgm4_define([lt_decl_quote_varnames], 3032b9b4fd27Smrg[_lt_decl_filter([value], [1], $@)]) 3033caade7ccSmrg 3034caade7ccSmrg 3035b9b4fd27Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3036b9b4fd27Smrg# --------------------------------------------------- 3037b9b4fd27Smrgm4_define([lt_decl_dquote_varnames], 3038b9b4fd27Smrg[_lt_decl_filter([value], [2], $@)]) 3039caade7ccSmrg 3040caade7ccSmrg 3041b9b4fd27Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3042b9b4fd27Smrg# --------------------------------------------------- 3043b9b4fd27Smrgm4_define([lt_decl_varnames_tagged], 3044b9b4fd27Smrg[m4_assert([$# <= 2])dnl 3045b9b4fd27Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 3046b9b4fd27Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3047b9b4fd27Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3048b9b4fd27Smrgm4_define([_lt_decl_varnames_tagged], 3049b9b4fd27Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3050caade7ccSmrg 3051caade7ccSmrg 3052b9b4fd27Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3053b9b4fd27Smrg# ------------------------------------------------ 3054b9b4fd27Smrgm4_define([lt_decl_all_varnames], 3055b9b4fd27Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 3056b9b4fd27Smrg m4_if([$2], [], 3057b9b4fd27Smrg m4_quote(lt_decl_varnames), 3058b9b4fd27Smrg m4_quote(m4_shift($@))))[]dnl 3059b9b4fd27Smrg]) 3060b9b4fd27Smrgm4_define([_lt_decl_all_varnames], 3061b9b4fd27Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 3062b9b4fd27Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3063b9b4fd27Smrg]) 3064caade7ccSmrg 3065caade7ccSmrg 3066b9b4fd27Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3067b9b4fd27Smrg# ------------------------------------ 3068b9b4fd27Smrg# Quote a variable value, and forward it to `config.status' so that its 3069b9b4fd27Smrg# declaration there will have the same value as in `configure'. VARNAME 3070b9b4fd27Smrg# must have a single quote delimited value for this to work. 3071b9b4fd27Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 3072e8a5466aSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3073caade7ccSmrg 3074caade7ccSmrg 3075b9b4fd27Smrg# _LT_CONFIG_STATUS_DECLARATIONS 3076b9b4fd27Smrg# ------------------------------ 3077b9b4fd27Smrg# We delimit libtool config variables with single quotes, so when 3078b9b4fd27Smrg# we write them to config.status, we have to be sure to quote all 3079b9b4fd27Smrg# embedded single quotes properly. In configure, this macro expands 3080b9b4fd27Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3081b9b4fd27Smrg# 3082e8a5466aSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3083b9b4fd27Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3084b9b4fd27Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3085b9b4fd27Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3086caade7ccSmrg 3087caade7ccSmrg 3088b9b4fd27Smrg# _LT_LIBTOOL_TAGS 3089b9b4fd27Smrg# ---------------- 3090b9b4fd27Smrg# Output comment and list of tags supported by the script 3091b9b4fd27Smrgm4_defun([_LT_LIBTOOL_TAGS], 3092b9b4fd27Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3093b9b4fd27Smrgavailable_tags="_LT_TAGS"dnl 3094b9b4fd27Smrg]) 3095caade7ccSmrg 3096caade7ccSmrg 3097b9b4fd27Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3098b9b4fd27Smrg# ----------------------------------- 3099b9b4fd27Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 3100b9b4fd27Smrg# expand to a commented shell variable setting: 3101b9b4fd27Smrg# 3102b9b4fd27Smrg# # Some comment about what VAR is for. 3103b9b4fd27Smrg# visible_name=$lt_internal_name 3104b9b4fd27Smrgm4_define([_LT_LIBTOOL_DECLARE], 3105b9b4fd27Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3106b9b4fd27Smrg [description])))[]dnl 3107b9b4fd27Smrgm4_pushdef([_libtool_name], 3108b9b4fd27Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3109b9b4fd27Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3110b9b4fd27Smrg [0], [_libtool_name=[$]$1], 3111b9b4fd27Smrg [1], [_libtool_name=$lt_[]$1], 3112b9b4fd27Smrg [2], [_libtool_name=$lt_[]$1], 3113b9b4fd27Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3114b9b4fd27Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3115b9b4fd27Smrg]) 3116caade7ccSmrg 3117caade7ccSmrg 3118b9b4fd27Smrg# _LT_LIBTOOL_CONFIG_VARS 3119b9b4fd27Smrg# ----------------------- 3120b9b4fd27Smrg# Produce commented declarations of non-tagged libtool config variables 3121b9b4fd27Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 3122b9b4fd27Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3123b9b4fd27Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 3124b9b4fd27Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 3125b9b4fd27Smrg[m4_foreach([_lt_var], 3126b9b4fd27Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3127b9b4fd27Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3128caade7ccSmrg 3129caade7ccSmrg 3130b9b4fd27Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 3131b9b4fd27Smrg# ------------------------- 3132b9b4fd27Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 3133b9b4fd27Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3134b9b4fd27Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3135caade7ccSmrg 3136b9b4fd27Smrg 3137b9b4fd27Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 3138b9b4fd27Smrg# ------------------------------ 3139b9b4fd27Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3140b9b4fd27Smrg 3141b9b4fd27Smrg 3142b9b4fd27Smrg# _LT_CONFIG_COMMANDS 3143b9b4fd27Smrg# ------------------- 3144b9b4fd27Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3145b9b4fd27Smrg# variables for single and double quote escaping we saved from calls 3146b9b4fd27Smrg# to _LT_DECL, we can put quote escaped variables declarations 3147b9b4fd27Smrg# into `config.status', and then the shell code to quote escape them in 3148b9b4fd27Smrg# for loops in `config.status'. Finally, any additional code accumulated 3149b9b4fd27Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3150b9b4fd27Smrgm4_defun([_LT_CONFIG_COMMANDS], 3151b9b4fd27Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3152b9b4fd27Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3153b9b4fd27Smrg dnl instead of duplicating it all over again into config.status, 3154b9b4fd27Smrg dnl then we will have config.status run $CONFIG_LT later, so it 3155b9b4fd27Smrg dnl needs to know what name is stored there: 3156b9b4fd27Smrg [AC_CONFIG_COMMANDS([libtool], 3157b9b4fd27Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3158b9b4fd27Smrg dnl If the libtool generation code is destined for config.status, 3159b9b4fd27Smrg dnl expand the accumulated commands and init code now: 3160b9b4fd27Smrg [AC_CONFIG_COMMANDS([libtool], 3161b9b4fd27Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3162b9b4fd27Smrg])#_LT_CONFIG_COMMANDS 3163b9b4fd27Smrg 3164b9b4fd27Smrg 3165b9b4fd27Smrg# Initialize. 3166b9b4fd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3167b9b4fd27Smrg[ 3168b9b4fd27Smrg 3169b9b4fd27Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3170b9b4fd27Smrg# if CDPATH is set. 3171b9b4fd27Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3172b9b4fd27Smrg 3173b9b4fd27Smrgsed_quote_subst='$sed_quote_subst' 3174b9b4fd27Smrgdouble_quote_subst='$double_quote_subst' 3175b9b4fd27Smrgdelay_variable_subst='$delay_variable_subst' 3176b9b4fd27Smrg_LT_CONFIG_STATUS_DECLARATIONS 3177b9b4fd27SmrgLTCC='$LTCC' 3178b9b4fd27SmrgLTCFLAGS='$LTCFLAGS' 3179b9b4fd27Smrgcompiler='$compiler_DEFAULT' 3180b9b4fd27Smrg 3181e8a5466aSmrg# A function that is used when there is no print builtin or printf. 3182e8a5466aSmrgfunc_fallback_echo () 3183e8a5466aSmrg{ 3184e8a5466aSmrg eval 'cat <<_LTECHO_EOF 3185e8a5466aSmrg\$[]1 3186e8a5466aSmrg_LTECHO_EOF' 3187e8a5466aSmrg} 3188e8a5466aSmrg 3189b9b4fd27Smrg# Quote evaled strings. 3190b9b4fd27Smrgfor var in lt_decl_all_varnames([[ \ 3191b9b4fd27Smrg]], lt_decl_quote_varnames); do 3192e8a5466aSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3193b9b4fd27Smrg *[[\\\\\\\`\\"\\\$]]*) 3194e8a5466aSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 3195caade7ccSmrg ;; 3196b9b4fd27Smrg *) 3197b9b4fd27Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3198caade7ccSmrg ;; 3199caade7ccSmrg esac 3200b9b4fd27Smrgdone 3201caade7ccSmrg 3202b9b4fd27Smrg# Double-quote double-evaled strings. 3203b9b4fd27Smrgfor var in lt_decl_all_varnames([[ \ 3204b9b4fd27Smrg]], lt_decl_dquote_varnames); do 3205e8a5466aSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3206b9b4fd27Smrg *[[\\\\\\\`\\"\\\$]]*) 3207e8a5466aSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 3208b9b4fd27Smrg ;; 3209b9b4fd27Smrg *) 3210b9b4fd27Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3211caade7ccSmrg ;; 3212caade7ccSmrg esac 3213b9b4fd27Smrgdone 3214caade7ccSmrg 3215b9b4fd27Smrg_LT_OUTPUT_LIBTOOL_INIT 3216b9b4fd27Smrg]) 3217caade7ccSmrg 3218e8a5466aSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3219e8a5466aSmrg# ------------------------------------ 3220e8a5466aSmrg# Generate a child script FILE with all initialization necessary to 3221e8a5466aSmrg# reuse the environment learned by the parent script, and make the 3222e8a5466aSmrg# file executable. If COMMENT is supplied, it is inserted after the 3223e8a5466aSmrg# `#!' sequence but before initialization text begins. After this 3224e8a5466aSmrg# macro, additional text can be appended to FILE to form the body of 3225e8a5466aSmrg# the child script. The macro ends with non-zero status if the 3226e8a5466aSmrg# file could not be fully written (such as if the disk is full). 3227e8a5466aSmrgm4_ifdef([AS_INIT_GENERATED], 3228e8a5466aSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3229e8a5466aSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 3230e8a5466aSmrg[m4_require([AS_PREPARE])]dnl 3231e8a5466aSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3232e8a5466aSmrg[lt_write_fail=0 3233e8a5466aSmrgcat >$1 <<_ASEOF || lt_write_fail=1 3234e8a5466aSmrg#! $SHELL 3235e8a5466aSmrg# Generated by $as_me. 3236e8a5466aSmrg$2 3237e8a5466aSmrgSHELL=\${CONFIG_SHELL-$SHELL} 3238e8a5466aSmrgexport SHELL 3239e8a5466aSmrg_ASEOF 3240e8a5466aSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 3241e8a5466aSmrgAS_SHELL_SANITIZE 3242e8a5466aSmrg_AS_PREPARE 3243e8a5466aSmrgexec AS_MESSAGE_FD>&1 3244e8a5466aSmrg_ASEOF 3245e8a5466aSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 3246e8a5466aSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 3247caade7ccSmrg 3248b9b4fd27Smrg# LT_OUTPUT 3249b9b4fd27Smrg# --------- 3250b9b4fd27Smrg# This macro allows early generation of the libtool script (before 3251b9b4fd27Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 3252b9b4fd27Smrg# tests. 3253b9b4fd27SmrgAC_DEFUN([LT_OUTPUT], 3254b9b4fd27Smrg[: ${CONFIG_LT=./config.lt} 3255b9b4fd27SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 3256e8a5466aSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3257e8a5466aSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 3258b9b4fd27Smrg 3259b9b4fd27Smrgcat >>"$CONFIG_LT" <<\_LTEOF 3260e8a5466aSmrglt_cl_silent=false 3261b9b4fd27Smrgexec AS_MESSAGE_LOG_FD>>config.log 3262b9b4fd27Smrg{ 3263b9b4fd27Smrg echo 3264b9b4fd27Smrg AS_BOX([Running $as_me.]) 3265b9b4fd27Smrg} >&AS_MESSAGE_LOG_FD 3266caade7ccSmrg 3267b9b4fd27Smrglt_cl_help="\ 3268b9b4fd27Smrg\`$as_me' creates a local libtool stub from the current configuration, 3269b9b4fd27Smrgfor use in further configure time tests before the real libtool is 3270b9b4fd27Smrggenerated. 3271caade7ccSmrg 3272b9b4fd27SmrgUsage: $[0] [[OPTIONS]] 3273caade7ccSmrg 3274b9b4fd27Smrg -h, --help print this help, then exit 3275b9b4fd27Smrg -V, --version print version number, then exit 3276b9b4fd27Smrg -q, --quiet do not print progress messages 3277b9b4fd27Smrg -d, --debug don't remove temporary files 3278caade7ccSmrg 3279b9b4fd27SmrgReport bugs to <bug-libtool@gnu.org>." 3280caade7ccSmrg 3281b9b4fd27Smrglt_cl_version="\ 3282b9b4fd27Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3283b9b4fd27Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3284b9b4fd27Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 3285b9b4fd27Smrg 3286e8a5466aSmrgCopyright (C) 2010 Free Software Foundation, Inc. 3287b9b4fd27SmrgThis config.lt script is free software; the Free Software Foundation 3288b9b4fd27Smrggives unlimited permision to copy, distribute and modify it." 3289b9b4fd27Smrg 3290b9b4fd27Smrgwhile test $[#] != 0 3291b9b4fd27Smrgdo 3292b9b4fd27Smrg case $[1] in 3293b9b4fd27Smrg --version | --v* | -V ) 3294b9b4fd27Smrg echo "$lt_cl_version"; exit 0 ;; 3295b9b4fd27Smrg --help | --h* | -h ) 3296b9b4fd27Smrg echo "$lt_cl_help"; exit 0 ;; 3297b9b4fd27Smrg --debug | --d* | -d ) 3298b9b4fd27Smrg debug=: ;; 3299b9b4fd27Smrg --quiet | --q* | --silent | --s* | -q ) 3300b9b4fd27Smrg lt_cl_silent=: ;; 3301b9b4fd27Smrg 3302b9b4fd27Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 3303b9b4fd27SmrgTry \`$[0] --help' for more information.]) ;; 3304b9b4fd27Smrg 3305b9b4fd27Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 3306b9b4fd27SmrgTry \`$[0] --help' for more information.]) ;; 3307b9b4fd27Smrg esac 3308b9b4fd27Smrg shift 3309b9b4fd27Smrgdone 3310b9b4fd27Smrg 3311b9b4fd27Smrgif $lt_cl_silent; then 3312b9b4fd27Smrg exec AS_MESSAGE_FD>/dev/null 3313b9b4fd27Smrgfi 3314b9b4fd27Smrg_LTEOF 3315b9b4fd27Smrg 3316b9b4fd27Smrgcat >>"$CONFIG_LT" <<_LTEOF 3317b9b4fd27Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 3318b9b4fd27Smrg_LTEOF 3319b9b4fd27Smrg 3320b9b4fd27Smrgcat >>"$CONFIG_LT" <<\_LTEOF 3321b9b4fd27SmrgAC_MSG_NOTICE([creating $ofile]) 3322b9b4fd27Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 3323b9b4fd27SmrgAS_EXIT(0) 3324b9b4fd27Smrg_LTEOF 3325b9b4fd27Smrgchmod +x "$CONFIG_LT" 3326b9b4fd27Smrg 3327b9b4fd27Smrg# configure is writing to config.log, but config.lt does its own redirection, 3328b9b4fd27Smrg# appending to config.log, which fails on DOS, as config.log is still kept 3329b9b4fd27Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 3330b9b4fd27Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 3331e8a5466aSmrglt_cl_success=: 3332e8a5466aSmrgtest "$silent" = yes && 3333e8a5466aSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 3334e8a5466aSmrgexec AS_MESSAGE_LOG_FD>/dev/null 3335e8a5466aSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 3336e8a5466aSmrgexec AS_MESSAGE_LOG_FD>>config.log 3337e8a5466aSmrg$lt_cl_success || AS_EXIT(1) 3338b9b4fd27Smrg])# LT_OUTPUT 3339caade7ccSmrg 3340caade7ccSmrg 3341b9b4fd27Smrg# _LT_CONFIG(TAG) 3342b9b4fd27Smrg# --------------- 3343b9b4fd27Smrg# If TAG is the built-in tag, create an initial libtool script with a 3344b9b4fd27Smrg# default configuration from the untagged config vars. Otherwise add code 3345b9b4fd27Smrg# to config.status for appending the configuration named by TAG from the 3346b9b4fd27Smrg# matching tagged config vars. 3347b9b4fd27Smrgm4_defun([_LT_CONFIG], 3348b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3349b9b4fd27Smrg_LT_CONFIG_SAVE_COMMANDS([ 3350b9b4fd27Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 3351b9b4fd27Smrg m4_if(_LT_TAG, [C], [ 3352b9b4fd27Smrg # See if we are running on zsh, and set the options which allow our 3353b9b4fd27Smrg # commands through without removal of \ escapes. 3354b9b4fd27Smrg if test -n "${ZSH_VERSION+set}" ; then 3355b9b4fd27Smrg setopt NO_GLOB_SUBST 3356b9b4fd27Smrg fi 3357caade7ccSmrg 3358b9b4fd27Smrg cfgfile="${ofile}T" 3359b9b4fd27Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 3360b9b4fd27Smrg $RM "$cfgfile" 3361caade7ccSmrg 3362b9b4fd27Smrg cat <<_LT_EOF >> "$cfgfile" 3363b9b4fd27Smrg#! $SHELL 3364caade7ccSmrg 3365b9b4fd27Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 3366b9b4fd27Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 3367b9b4fd27Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3368b9b4fd27Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 3369b9b4fd27Smrg# 3370b9b4fd27Smrg_LT_COPYING 3371b9b4fd27Smrg_LT_LIBTOOL_TAGS 3372caade7ccSmrg 3373b9b4fd27Smrg# ### BEGIN LIBTOOL CONFIG 3374b9b4fd27Smrg_LT_LIBTOOL_CONFIG_VARS 3375b9b4fd27Smrg_LT_LIBTOOL_TAG_VARS 3376b9b4fd27Smrg# ### END LIBTOOL CONFIG 3377caade7ccSmrg 3378b9b4fd27Smrg_LT_EOF 3379caade7ccSmrg 3380b9b4fd27Smrg case $host_os in 3381b9b4fd27Smrg aix3*) 3382b9b4fd27Smrg cat <<\_LT_EOF >> "$cfgfile" 3383b9b4fd27Smrg# AIX sometimes has problems with the GCC collect2 program. For some 3384b9b4fd27Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 3385b9b4fd27Smrg# vanish in a puff of smoke. 3386b9b4fd27Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 3387b9b4fd27Smrg COLLECT_NAMES= 3388b9b4fd27Smrg export COLLECT_NAMES 3389b9b4fd27Smrgfi 3390b9b4fd27Smrg_LT_EOF 3391caade7ccSmrg ;; 3392caade7ccSmrg esac 3393caade7ccSmrg 3394b9b4fd27Smrg _LT_PROG_LTMAIN 3395caade7ccSmrg 3396b9b4fd27Smrg # We use sed instead of cat because bash on DJGPP gets confused if 3397b9b4fd27Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 3398b9b4fd27Smrg # text mode, it properly converts lines to CR/LF. This bash problem 3399b9b4fd27Smrg # is reportedly fixed, but why not run on old versions too? 3400a5602400Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 3401a5602400Smrg || (rm -f "$cfgfile"; exit 1) 3402caade7ccSmrg 3403a5602400Smrg _LT_PROG_REPLACE_SHELLFNS 3404caade7ccSmrg 3405a5602400Smrg mv -f "$cfgfile" "$ofile" || 3406b9b4fd27Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 3407b9b4fd27Smrg chmod +x "$ofile" 3408b9b4fd27Smrg], 3409b9b4fd27Smrg[cat <<_LT_EOF >> "$ofile" 3410caade7ccSmrg 3411b9b4fd27Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 3412b9b4fd27Smrgdnl in a comment (ie after a #). 3413b9b4fd27Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 3414b9b4fd27Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 3415b9b4fd27Smrg# ### END LIBTOOL TAG CONFIG: $1 3416b9b4fd27Smrg_LT_EOF 3417b9b4fd27Smrg])dnl /m4_if 3418b9b4fd27Smrg], 3419b9b4fd27Smrg[m4_if([$1], [], [ 3420b9b4fd27Smrg PACKAGE='$PACKAGE' 3421b9b4fd27Smrg VERSION='$VERSION' 3422b9b4fd27Smrg TIMESTAMP='$TIMESTAMP' 3423b9b4fd27Smrg RM='$RM' 3424b9b4fd27Smrg ofile='$ofile'], []) 3425b9b4fd27Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 3426b9b4fd27Smrg])# _LT_CONFIG 3427caade7ccSmrg 3428caade7ccSmrg 3429b9b4fd27Smrg# LT_SUPPORTED_TAG(TAG) 3430b9b4fd27Smrg# --------------------- 3431b9b4fd27Smrg# Trace this macro to discover what tags are supported by the libtool 3432b9b4fd27Smrg# --tag option, using: 3433b9b4fd27Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 3434b9b4fd27SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 3435caade7ccSmrg 3436caade7ccSmrg 3437b9b4fd27Smrg# C support is built-in for now 3438b9b4fd27Smrgm4_define([_LT_LANG_C_enabled], []) 3439b9b4fd27Smrgm4_define([_LT_TAGS], []) 3440caade7ccSmrg 3441caade7ccSmrg 3442b9b4fd27Smrg# LT_LANG(LANG) 3443b9b4fd27Smrg# ------------- 3444b9b4fd27Smrg# Enable libtool support for the given language if not already enabled. 3445b9b4fd27SmrgAC_DEFUN([LT_LANG], 3446b9b4fd27Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 3447b9b4fd27Smrgm4_case([$1], 3448b9b4fd27Smrg [C], [_LT_LANG(C)], 3449b9b4fd27Smrg [C++], [_LT_LANG(CXX)], 3450b9b4fd27Smrg [Java], [_LT_LANG(GCJ)], 3451b9b4fd27Smrg [Fortran 77], [_LT_LANG(F77)], 3452b9b4fd27Smrg [Fortran], [_LT_LANG(FC)], 3453b9b4fd27Smrg [Windows Resource], [_LT_LANG(RC)], 3454b9b4fd27Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 3455b9b4fd27Smrg [_LT_LANG($1)], 3456b9b4fd27Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 3457b9b4fd27Smrg])# LT_LANG 3458b9b4fd27Smrg 3459b9b4fd27Smrg 3460b9b4fd27Smrg# _LT_LANG(LANGNAME) 3461b9b4fd27Smrg# ------------------ 3462b9b4fd27Smrgm4_defun([_LT_LANG], 3463b9b4fd27Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 3464b9b4fd27Smrg [LT_SUPPORTED_TAG([$1])dnl 3465b9b4fd27Smrg m4_append([_LT_TAGS], [$1 ])dnl 3466b9b4fd27Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 3467b9b4fd27Smrg _LT_LANG_$1_CONFIG($1)])dnl 3468b9b4fd27Smrg])# _LT_LANG 3469caade7ccSmrg 3470caade7ccSmrg 3471b9b4fd27Smrg# _LT_LANG_DEFAULT_CONFIG 3472b9b4fd27Smrg# ----------------------- 3473b9b4fd27Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 3474b9b4fd27Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 3475b9b4fd27Smrg [LT_LANG(CXX)], 3476b9b4fd27Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3477b9b4fd27Smrg 3478b9b4fd27SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 3479b9b4fd27Smrg [LT_LANG(F77)], 3480b9b4fd27Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3481b9b4fd27Smrg 3482b9b4fd27SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 3483b9b4fd27Smrg [LT_LANG(FC)], 3484b9b4fd27Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 3485b9b4fd27Smrg 3486b9b4fd27Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 3487b9b4fd27Smrgdnl pulling things in needlessly. 3488b9b4fd27SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 3489b9b4fd27Smrg [LT_LANG(GCJ)], 3490b9b4fd27Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 3491b9b4fd27Smrg [LT_LANG(GCJ)], 3492b9b4fd27Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 3493b9b4fd27Smrg [LT_LANG(GCJ)], 3494b9b4fd27Smrg [m4_ifdef([AC_PROG_GCJ], 3495b9b4fd27Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 3496b9b4fd27Smrg m4_ifdef([A][M_PROG_GCJ], 3497b9b4fd27Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 3498b9b4fd27Smrg m4_ifdef([LT_PROG_GCJ], 3499b9b4fd27Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 3500b9b4fd27Smrg 3501b9b4fd27SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 3502b9b4fd27Smrg [LT_LANG(RC)], 3503b9b4fd27Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 3504b9b4fd27Smrg])# _LT_LANG_DEFAULT_CONFIG 3505b9b4fd27Smrg 3506b9b4fd27Smrg# Obsolete macros: 3507b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 3508b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 3509b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 3510b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 3511e8a5466aSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 3512b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 3513b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 3514b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 3515b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 3516b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 3517e8a5466aSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 3518b9b4fd27Smrg 3519b9b4fd27Smrg 3520b9b4fd27Smrg# _LT_TAG_COMPILER 3521b9b4fd27Smrg# ---------------- 3522b9b4fd27Smrgm4_defun([_LT_TAG_COMPILER], 3523b9b4fd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3524caade7ccSmrg 3525b9b4fd27Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 3526b9b4fd27Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 3527b9b4fd27Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 3528b9b4fd27Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 3529caade7ccSmrg 3530b9b4fd27Smrg# If no C compiler was specified, use CC. 3531b9b4fd27SmrgLTCC=${LTCC-"$CC"} 3532caade7ccSmrg 3533b9b4fd27Smrg# If no C compiler flags were specified, use CFLAGS. 3534b9b4fd27SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 3535caade7ccSmrg 3536b9b4fd27Smrg# Allow CC to be a program name with arguments. 3537b9b4fd27Smrgcompiler=$CC 3538b9b4fd27Smrg])# _LT_TAG_COMPILER 3539caade7ccSmrg 3540caade7ccSmrg 3541b9b4fd27Smrg# _LT_COMPILER_BOILERPLATE 3542b9b4fd27Smrg# ------------------------ 3543b9b4fd27Smrg# Check for compiler boilerplate output or warnings with 3544b9b4fd27Smrg# the simple compiler test code. 3545b9b4fd27Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 3546b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl 3547b9b4fd27Smrgac_outfile=conftest.$ac_objext 3548b9b4fd27Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 3549b9b4fd27Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3550b9b4fd27Smrg_lt_compiler_boilerplate=`cat conftest.err` 3551b9b4fd27Smrg$RM conftest* 3552b9b4fd27Smrg])# _LT_COMPILER_BOILERPLATE 3553caade7ccSmrg 3554caade7ccSmrg 3555b9b4fd27Smrg# _LT_LINKER_BOILERPLATE 3556b9b4fd27Smrg# ---------------------- 3557b9b4fd27Smrg# Check for linker boilerplate output or warnings with 3558b9b4fd27Smrg# the simple link test code. 3559b9b4fd27Smrgm4_defun([_LT_LINKER_BOILERPLATE], 3560b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl 3561b9b4fd27Smrgac_outfile=conftest.$ac_objext 3562b9b4fd27Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 3563b9b4fd27Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3564b9b4fd27Smrg_lt_linker_boilerplate=`cat conftest.err` 3565b9b4fd27Smrg$RM -r conftest* 3566b9b4fd27Smrg])# _LT_LINKER_BOILERPLATE 3567caade7ccSmrg 3568b9b4fd27Smrg# _LT_REQUIRED_DARWIN_CHECKS 3569b9b4fd27Smrg# ------------------------- 3570b9b4fd27Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 3571b9b4fd27Smrg case $host_os in 3572b9b4fd27Smrg rhapsody* | darwin*) 3573b9b4fd27Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3574b9b4fd27Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3575b9b4fd27Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 3576b9b4fd27Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 3577b9b4fd27Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 3578b9b4fd27Smrg _LT_DECL([], [DSYMUTIL], [1], 3579b9b4fd27Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 3580b9b4fd27Smrg _LT_DECL([], [NMEDIT], [1], 3581b9b4fd27Smrg [Tool to change global to local symbols on Mac OS X]) 3582b9b4fd27Smrg _LT_DECL([], [LIPO], [1], 3583b9b4fd27Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 3584b9b4fd27Smrg _LT_DECL([], [OTOOL], [1], 3585b9b4fd27Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 3586b9b4fd27Smrg _LT_DECL([], [OTOOL64], [1], 3587b9b4fd27Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 3588caade7ccSmrg 3589b9b4fd27Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3590b9b4fd27Smrg [lt_cv_apple_cc_single_mod=no 3591b9b4fd27Smrg if test -z "${LT_MULTI_MODULE}"; then 3592b9b4fd27Smrg # By default we will add the -single_module flag. You can override 3593b9b4fd27Smrg # by either setting the environment variable LT_MULTI_MODULE 3594b9b4fd27Smrg # non-empty at configure time, or by adding -multi_module to the 3595b9b4fd27Smrg # link flags. 3596b9b4fd27Smrg rm -rf libconftest.dylib* 3597b9b4fd27Smrg echo "int foo(void){return 1;}" > conftest.c 3598b9b4fd27Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3599b9b4fd27Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 3600b9b4fd27Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3601b9b4fd27Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 3602b9b4fd27Smrg _lt_result=$? 3603b9b4fd27Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 3604b9b4fd27Smrg lt_cv_apple_cc_single_mod=yes 3605b9b4fd27Smrg else 3606b9b4fd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3607b9b4fd27Smrg fi 3608b9b4fd27Smrg rm -rf libconftest.dylib* 3609b9b4fd27Smrg rm -f conftest.* 3610b9b4fd27Smrg fi]) 3611b9b4fd27Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3612b9b4fd27Smrg [lt_cv_ld_exported_symbols_list], 3613b9b4fd27Smrg [lt_cv_ld_exported_symbols_list=no 3614b9b4fd27Smrg save_LDFLAGS=$LDFLAGS 3615b9b4fd27Smrg echo "_main" > conftest.sym 3616b9b4fd27Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3617b9b4fd27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3618b9b4fd27Smrg [lt_cv_ld_exported_symbols_list=yes], 3619b9b4fd27Smrg [lt_cv_ld_exported_symbols_list=no]) 3620b9b4fd27Smrg LDFLAGS="$save_LDFLAGS" 3621b9b4fd27Smrg ]) 3622e8a5466aSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 3623e8a5466aSmrg [lt_cv_ld_force_load=no 3624e8a5466aSmrg cat > conftest.c << _LT_EOF 3625e8a5466aSmrgint forced_loaded() { return 2;} 3626e8a5466aSmrg_LT_EOF 3627e8a5466aSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 3628e8a5466aSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 3629e8a5466aSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 3630e8a5466aSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 3631e8a5466aSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 3632e8a5466aSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 3633e8a5466aSmrg cat > conftest.c << _LT_EOF 3634e8a5466aSmrgint main() { return 0;} 3635e8a5466aSmrg_LT_EOF 3636e8a5466aSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 3637e8a5466aSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 3638e8a5466aSmrg _lt_result=$? 3639e8a5466aSmrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 3640e8a5466aSmrg lt_cv_ld_force_load=yes 3641e8a5466aSmrg else 3642e8a5466aSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3643e8a5466aSmrg fi 3644e8a5466aSmrg rm -f conftest.err libconftest.a conftest conftest.c 3645e8a5466aSmrg rm -rf conftest.dSYM 3646e8a5466aSmrg ]) 3647b9b4fd27Smrg case $host_os in 3648b9b4fd27Smrg rhapsody* | darwin1.[[012]]) 3649b9b4fd27Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3650b9b4fd27Smrg darwin1.*) 3651b9b4fd27Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3652b9b4fd27Smrg darwin*) # darwin 5.x on 3653b9b4fd27Smrg # if running on 10.5 or later, the deployment target defaults 3654b9b4fd27Smrg # to the OS version, if on x86, and 10.4, the deployment 3655b9b4fd27Smrg # target defaults to 10.4. Don't you love it? 3656b9b4fd27Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3657b9b4fd27Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3658b9b4fd27Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3659b9b4fd27Smrg 10.[[012]]*) 3660b9b4fd27Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3661b9b4fd27Smrg 10.*) 3662b9b4fd27Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3663b9b4fd27Smrg esac 3664caade7ccSmrg ;; 3665caade7ccSmrg esac 3666b9b4fd27Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3667b9b4fd27Smrg _lt_dar_single_mod='$single_module' 3668b9b4fd27Smrg fi 3669b9b4fd27Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3670b9b4fd27Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3671b9b4fd27Smrg else 3672b9b4fd27Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 3673b9b4fd27Smrg fi 3674e8a5466aSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 3675b9b4fd27Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 3676b9b4fd27Smrg else 3677b9b4fd27Smrg _lt_dsymutil= 3678b9b4fd27Smrg fi 3679b9b4fd27Smrg ;; 3680caade7ccSmrg esac 3681b9b4fd27Smrg]) 3682caade7ccSmrg 3683b9b4fd27Smrg 3684b9b4fd27Smrg# _LT_DARWIN_LINKER_FEATURES 3685b9b4fd27Smrg# -------------------------- 3686b9b4fd27Smrg# Checks for linker and compiler features on darwin 3687b9b4fd27Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 3688b9b4fd27Smrg[ 3689b9b4fd27Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 3690b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3691b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 3692b9b4fd27Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 3693b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3694e8a5466aSmrg if test "$lt_cv_ld_force_load" = "yes"; then 3695e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 3696e8a5466aSmrg else 3697e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 3698e8a5466aSmrg fi 3699b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 3700b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3701b9b4fd27Smrg case $cc_basename in 3702b9b4fd27Smrg ifort*) _lt_dar_can_shared=yes ;; 3703b9b4fd27Smrg *) _lt_dar_can_shared=$GCC ;; 3704caade7ccSmrg esac 3705b9b4fd27Smrg if test "$_lt_dar_can_shared" = "yes"; then 3706e8a5466aSmrg output_verbose_link_cmd=func_echo_all 3707b9b4fd27Smrg _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}" 3708b9b4fd27Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3709b9b4fd27Smrg _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}" 3710b9b4fd27Smrg _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}" 3711b9b4fd27Smrg m4_if([$1], [CXX], 3712b9b4fd27Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3713b9b4fd27Smrg _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}" 3714b9b4fd27Smrg _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}" 3715b9b4fd27Smrg fi 3716b9b4fd27Smrg],[]) 3717b9b4fd27Smrg else 3718b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 3719b9b4fd27Smrg fi 3720b9b4fd27Smrg]) 3721caade7ccSmrg 3722a5602400Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 3723a5602400Smrg# ---------------------------------- 3724b9b4fd27Smrg# Links a minimal program and checks the executable 3725b9b4fd27Smrg# for the system default hardcoded library path. In most cases, 3726b9b4fd27Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 3727b9b4fd27Smrg# the location of the communication and MPI libs are included too. 3728b9b4fd27Smrg# If we don't find anything, use the default library path according 3729b9b4fd27Smrg# to the aix ld manual. 3730a5602400Smrg# Store the results from the different compilers for each TAGNAME. 3731a5602400Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 3732b9b4fd27Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 3733b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl 3734a5602400Smrgif test "${lt_cv_aix_libpath+set}" = set; then 3735a5602400Smrg aix_libpath=$lt_cv_aix_libpath 3736a5602400Smrgelse 3737a5602400Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 3738a5602400Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 3739a5602400Smrg lt_aix_libpath_sed='[ 3740a5602400Smrg /Import File Strings/,/^$/ { 3741a5602400Smrg /^0/ { 3742a5602400Smrg s/^0 *\([^ ]*\) *$/\1/ 3743a5602400Smrg p 3744a5602400Smrg } 3745a5602400Smrg }]' 3746a5602400Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3747a5602400Smrg # Check for a 64-bit object if we didn't find anything. 3748a5602400Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 3749a5602400Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3750a5602400Smrg fi],[]) 3751a5602400Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 3752a5602400Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 3753a5602400Smrg fi 3754a5602400Smrg ]) 3755a5602400Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 3756a5602400Smrgfi 3757b9b4fd27Smrg])# _LT_SYS_MODULE_PATH_AIX 3758caade7ccSmrg 3759caade7ccSmrg 3760b9b4fd27Smrg# _LT_SHELL_INIT(ARG) 3761b9b4fd27Smrg# ------------------- 3762b9b4fd27Smrgm4_define([_LT_SHELL_INIT], 3763e8a5466aSmrg[m4_divert_text([M4SH-INIT], [$1 3764e8a5466aSmrg])])# _LT_SHELL_INIT 3765e8a5466aSmrg 3766caade7ccSmrg 3767caade7ccSmrg 3768b9b4fd27Smrg# _LT_PROG_ECHO_BACKSLASH 3769b9b4fd27Smrg# ----------------------- 3770e8a5466aSmrg# Find how we can fake an echo command that does not interpret backslash. 3771e8a5466aSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 3772e8a5466aSmrg# of the generated configure script which will find a shell with a builtin 3773e8a5466aSmrg# printf (which we can use as an echo command). 3774b9b4fd27Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 3775e8a5466aSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3776e8a5466aSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3777e8a5466aSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3778e8a5466aSmrg 3779e8a5466aSmrgAC_MSG_CHECKING([how to print strings]) 3780e8a5466aSmrg# Test print first, because it will be a builtin if present. 3781a5602400Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 3782e8a5466aSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 3783e8a5466aSmrg ECHO='print -r --' 3784e8a5466aSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 3785e8a5466aSmrg ECHO='printf %s\n' 3786caade7ccSmrgelse 3787e8a5466aSmrg # Use this function as a fallback that always works. 3788e8a5466aSmrg func_fallback_echo () 3789e8a5466aSmrg { 3790e8a5466aSmrg eval 'cat <<_LTECHO_EOF 3791e8a5466aSmrg$[]1 3792e8a5466aSmrg_LTECHO_EOF' 3793e8a5466aSmrg } 3794e8a5466aSmrg ECHO='func_fallback_echo' 3795caade7ccSmrgfi 3796caade7ccSmrg 3797e8a5466aSmrg# func_echo_all arg... 3798e8a5466aSmrg# Invoke $ECHO with all args, space-separated. 3799e8a5466aSmrgfunc_echo_all () 3800e8a5466aSmrg{ 3801e8a5466aSmrg $ECHO "$*" 3802e8a5466aSmrg} 3803b9b4fd27Smrg 3804e8a5466aSmrgcase "$ECHO" in 3805e8a5466aSmrg printf*) AC_MSG_RESULT([printf]) ;; 3806e8a5466aSmrg print*) AC_MSG_RESULT([print -r]) ;; 3807e8a5466aSmrg *) AC_MSG_RESULT([cat]) ;; 3808e8a5466aSmrgesac 3809b9b4fd27Smrg 3810e8a5466aSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 3811e8a5466aSmrg[_AS_DETECT_SUGGESTED([ 3812e8a5466aSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 3813e8a5466aSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3814e8a5466aSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3815e8a5466aSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3816e8a5466aSmrg PATH=/empty FPATH=/empty; export PATH FPATH 3817e8a5466aSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 3818e8a5466aSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 3819caade7ccSmrg 3820b9b4fd27Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 3821e8a5466aSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 3822b9b4fd27Smrg])# _LT_PROG_ECHO_BACKSLASH 3823caade7ccSmrg 3824caade7ccSmrg 3825a5602400Smrg# _LT_WITH_SYSROOT 3826a5602400Smrg# ---------------- 3827a5602400SmrgAC_DEFUN([_LT_WITH_SYSROOT], 3828a5602400Smrg[AC_MSG_CHECKING([for sysroot]) 3829a5602400SmrgAC_ARG_WITH([sysroot], 3830a5602400Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 3831a5602400Smrg (or the compiler's sysroot if not specified).], 3832a5602400Smrg[], [with_sysroot=no]) 3833a5602400Smrg 3834a5602400Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 3835a5602400Smrgdnl in case the user passed a directory name. 3836a5602400Smrglt_sysroot= 3837a5602400Smrgcase ${with_sysroot} in #( 3838a5602400Smrg yes) 3839a5602400Smrg if test "$GCC" = yes; then 3840a5602400Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 3841a5602400Smrg fi 3842a5602400Smrg ;; #( 3843a5602400Smrg /*) 3844a5602400Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 3845a5602400Smrg ;; #( 3846a5602400Smrg no|'') 3847a5602400Smrg ;; #( 3848a5602400Smrg *) 3849a5602400Smrg AC_MSG_RESULT([${with_sysroot}]) 3850a5602400Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 3851a5602400Smrg ;; 3852a5602400Smrgesac 3853a5602400Smrg 3854a5602400Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 3855a5602400Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 3856a5602400Smrg[dependent libraries, and in which our libraries should be installed.])]) 3857a5602400Smrg 3858b9b4fd27Smrg# _LT_ENABLE_LOCK 3859b9b4fd27Smrg# --------------- 3860b9b4fd27Smrgm4_defun([_LT_ENABLE_LOCK], 3861b9b4fd27Smrg[AC_ARG_ENABLE([libtool-lock], 3862b9b4fd27Smrg [AS_HELP_STRING([--disable-libtool-lock], 3863b9b4fd27Smrg [avoid locking (might break parallel builds)])]) 3864b9b4fd27Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 3865caade7ccSmrg 3866b9b4fd27Smrg# Some flags need to be propagated to the compiler or linker for good 3867b9b4fd27Smrg# libtool support. 3868b9b4fd27Smrgcase $host in 3869b9b4fd27Smrgia64-*-hpux*) 3870b9b4fd27Smrg # Find out which ABI we are using. 3871b9b4fd27Smrg echo 'int i;' > conftest.$ac_ext 3872b9b4fd27Smrg if AC_TRY_EVAL(ac_compile); then 3873b9b4fd27Smrg case `/usr/bin/file conftest.$ac_objext` in 3874b9b4fd27Smrg *ELF-32*) 3875b9b4fd27Smrg HPUX_IA64_MODE="32" 3876b9b4fd27Smrg ;; 3877b9b4fd27Smrg *ELF-64*) 3878b9b4fd27Smrg HPUX_IA64_MODE="64" 3879b9b4fd27Smrg ;; 3880caade7ccSmrg esac 3881b9b4fd27Smrg fi 3882b9b4fd27Smrg rm -rf conftest* 3883b9b4fd27Smrg ;; 3884b9b4fd27Smrg*-*-irix6*) 3885b9b4fd27Smrg # Find out which ABI we are using. 3886e8a5466aSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 3887b9b4fd27Smrg if AC_TRY_EVAL(ac_compile); then 3888b9b4fd27Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3889b9b4fd27Smrg case `/usr/bin/file conftest.$ac_objext` in 3890b9b4fd27Smrg *32-bit*) 3891b9b4fd27Smrg LD="${LD-ld} -melf32bsmip" 3892b9b4fd27Smrg ;; 3893b9b4fd27Smrg *N32*) 3894b9b4fd27Smrg LD="${LD-ld} -melf32bmipn32" 3895b9b4fd27Smrg ;; 3896b9b4fd27Smrg *64-bit*) 3897b9b4fd27Smrg LD="${LD-ld} -melf64bmip" 3898b9b4fd27Smrg ;; 3899b9b4fd27Smrg esac 3900caade7ccSmrg else 3901b9b4fd27Smrg case `/usr/bin/file conftest.$ac_objext` in 3902b9b4fd27Smrg *32-bit*) 3903b9b4fd27Smrg LD="${LD-ld} -32" 3904b9b4fd27Smrg ;; 3905b9b4fd27Smrg *N32*) 3906b9b4fd27Smrg LD="${LD-ld} -n32" 3907b9b4fd27Smrg ;; 3908b9b4fd27Smrg *64-bit*) 3909b9b4fd27Smrg LD="${LD-ld} -64" 3910b9b4fd27Smrg ;; 3911b9b4fd27Smrg esac 3912caade7ccSmrg fi 3913caade7ccSmrg fi 3914b9b4fd27Smrg rm -rf conftest* 3915caade7ccSmrg ;; 3916caade7ccSmrg 3917b9b4fd27Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 3918b9b4fd27Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 3919b9b4fd27Smrg # Find out which ABI we are using. 3920b9b4fd27Smrg echo 'int i;' > conftest.$ac_ext 3921b9b4fd27Smrg if AC_TRY_EVAL(ac_compile); then 3922b9b4fd27Smrg case `/usr/bin/file conftest.o` in 3923b9b4fd27Smrg *32-bit*) 3924b9b4fd27Smrg case $host in 3925b9b4fd27Smrg x86_64-*kfreebsd*-gnu) 3926b9b4fd27Smrg LD="${LD-ld} -m elf_i386_fbsd" 3927b9b4fd27Smrg ;; 3928b9b4fd27Smrg x86_64-*linux*) 3929b9b4fd27Smrg LD="${LD-ld} -m elf_i386" 3930b9b4fd27Smrg ;; 3931b9b4fd27Smrg ppc64-*linux*|powerpc64-*linux*) 3932b9b4fd27Smrg LD="${LD-ld} -m elf32ppclinux" 3933b9b4fd27Smrg ;; 3934b9b4fd27Smrg s390x-*linux*) 3935b9b4fd27Smrg LD="${LD-ld} -m elf_s390" 3936b9b4fd27Smrg ;; 3937b9b4fd27Smrg sparc64-*linux*) 3938b9b4fd27Smrg LD="${LD-ld} -m elf32_sparc" 3939b9b4fd27Smrg ;; 3940b9b4fd27Smrg esac 3941b9b4fd27Smrg ;; 3942b9b4fd27Smrg *64-bit*) 3943b9b4fd27Smrg case $host in 3944b9b4fd27Smrg x86_64-*kfreebsd*-gnu) 3945b9b4fd27Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 3946b9b4fd27Smrg ;; 3947b9b4fd27Smrg x86_64-*linux*) 3948b9b4fd27Smrg LD="${LD-ld} -m elf_x86_64" 3949b9b4fd27Smrg ;; 3950b9b4fd27Smrg ppc*-*linux*|powerpc*-*linux*) 3951b9b4fd27Smrg LD="${LD-ld} -m elf64ppc" 3952b9b4fd27Smrg ;; 3953b9b4fd27Smrg s390*-*linux*|s390*-*tpf*) 3954b9b4fd27Smrg LD="${LD-ld} -m elf64_s390" 3955b9b4fd27Smrg ;; 3956b9b4fd27Smrg sparc*-*linux*) 3957b9b4fd27Smrg LD="${LD-ld} -m elf64_sparc" 3958b9b4fd27Smrg ;; 3959b9b4fd27Smrg esac 3960b9b4fd27Smrg ;; 3961b9b4fd27Smrg esac 3962b9b4fd27Smrg fi 3963b9b4fd27Smrg rm -rf conftest* 3964caade7ccSmrg ;; 3965caade7ccSmrg 3966b9b4fd27Smrg*-*-sco3.2v5*) 3967b9b4fd27Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 3968b9b4fd27Smrg SAVE_CFLAGS="$CFLAGS" 3969b9b4fd27Smrg CFLAGS="$CFLAGS -belf" 3970b9b4fd27Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 3971b9b4fd27Smrg [AC_LANG_PUSH(C) 3972b9b4fd27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 3973b9b4fd27Smrg AC_LANG_POP]) 3974b9b4fd27Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 3975b9b4fd27Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 3976b9b4fd27Smrg CFLAGS="$SAVE_CFLAGS" 3977b9b4fd27Smrg fi 3978caade7ccSmrg ;; 3979b9b4fd27Smrgsparc*-*solaris*) 3980b9b4fd27Smrg # Find out which ABI we are using. 3981b9b4fd27Smrg echo 'int i;' > conftest.$ac_ext 3982b9b4fd27Smrg if AC_TRY_EVAL(ac_compile); then 3983b9b4fd27Smrg case `/usr/bin/file conftest.o` in 3984b9b4fd27Smrg *64-bit*) 3985b9b4fd27Smrg case $lt_cv_prog_gnu_ld in 3986b9b4fd27Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 3987b9b4fd27Smrg *) 3988b9b4fd27Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 3989b9b4fd27Smrg LD="${LD-ld} -64" 3990b9b4fd27Smrg fi 3991b9b4fd27Smrg ;; 3992b9b4fd27Smrg esac 3993b9b4fd27Smrg ;; 3994b9b4fd27Smrg esac 3995b9b4fd27Smrg fi 3996b9b4fd27Smrg rm -rf conftest* 3997caade7ccSmrg ;; 3998b9b4fd27Smrgesac 3999caade7ccSmrg 4000b9b4fd27Smrgneed_locks="$enable_libtool_lock" 4001b9b4fd27Smrg])# _LT_ENABLE_LOCK 4002caade7ccSmrg 4003caade7ccSmrg 4004a5602400Smrg# _LT_PROG_AR 4005a5602400Smrg# ----------- 4006a5602400Smrgm4_defun([_LT_PROG_AR], 4007a5602400Smrg[AC_CHECK_TOOLS(AR, [ar], false) 4008a5602400Smrg: ${AR=ar} 4009a5602400Smrg: ${AR_FLAGS=cru} 4010a5602400Smrg_LT_DECL([], [AR], [1], [The archiver]) 4011a5602400Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 4012a5602400Smrg 4013a5602400SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 4014a5602400Smrg [lt_cv_ar_at_file=no 4015a5602400Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 4016a5602400Smrg [echo conftest.$ac_objext > conftest.lst 4017a5602400Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 4018a5602400Smrg AC_TRY_EVAL([lt_ar_try]) 4019a5602400Smrg if test "$ac_status" -eq 0; then 4020a5602400Smrg # Ensure the archiver fails upon bogus file names. 4021a5602400Smrg rm -f conftest.$ac_objext libconftest.a 4022a5602400Smrg AC_TRY_EVAL([lt_ar_try]) 4023a5602400Smrg if test "$ac_status" -ne 0; then 4024a5602400Smrg lt_cv_ar_at_file=@ 4025a5602400Smrg fi 4026a5602400Smrg fi 4027a5602400Smrg rm -f conftest.* libconftest.a 4028a5602400Smrg ]) 4029a5602400Smrg ]) 4030a5602400Smrg 4031a5602400Smrgif test "x$lt_cv_ar_at_file" = xno; then 4032a5602400Smrg archiver_list_spec= 4033a5602400Smrgelse 4034a5602400Smrg archiver_list_spec=$lt_cv_ar_at_file 4035a5602400Smrgfi 4036a5602400Smrg_LT_DECL([], [archiver_list_spec], [1], 4037a5602400Smrg [How to feed a file listing to the archiver]) 4038a5602400Smrg])# _LT_PROG_AR 4039a5602400Smrg 4040a5602400Smrg 4041b9b4fd27Smrg# _LT_CMD_OLD_ARCHIVE 4042b9b4fd27Smrg# ------------------- 4043b9b4fd27Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 4044a5602400Smrg[_LT_PROG_AR 4045caade7ccSmrg 4046b9b4fd27SmrgAC_CHECK_TOOL(STRIP, strip, :) 4047b9b4fd27Smrgtest -z "$STRIP" && STRIP=: 4048b9b4fd27Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4049caade7ccSmrg 4050b9b4fd27SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 4051b9b4fd27Smrgtest -z "$RANLIB" && RANLIB=: 4052b9b4fd27Smrg_LT_DECL([], [RANLIB], [1], 4053b9b4fd27Smrg [Commands used to install an old-style archive]) 4054caade7ccSmrg 4055b9b4fd27Smrg# Determine commands to create old-style static archives. 4056b9b4fd27Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4057b9b4fd27Smrgold_postinstall_cmds='chmod 644 $oldlib' 4058b9b4fd27Smrgold_postuninstall_cmds= 4059caade7ccSmrg 4060b9b4fd27Smrgif test -n "$RANLIB"; then 4061caade7ccSmrg case $host_os in 4062b9b4fd27Smrg openbsd*) 4063b9b4fd27Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 4064caade7ccSmrg ;; 4065b9b4fd27Smrg *) 4066b9b4fd27Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 4067caade7ccSmrg ;; 4068caade7ccSmrg esac 4069b9b4fd27Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 4070b9b4fd27Smrgfi 4071e8a5466aSmrg 4072e8a5466aSmrgcase $host_os in 4073e8a5466aSmrg darwin*) 4074e8a5466aSmrg lock_old_archive_extraction=yes ;; 4075e8a5466aSmrg *) 4076e8a5466aSmrg lock_old_archive_extraction=no ;; 4077e8a5466aSmrgesac 4078b9b4fd27Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 4079b9b4fd27Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 4080b9b4fd27Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 4081b9b4fd27Smrg [Commands used to build an old-style archive]) 4082e8a5466aSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 4083e8a5466aSmrg [Whether to use a lock for old archive extraction]) 4084b9b4fd27Smrg])# _LT_CMD_OLD_ARCHIVE 4085caade7ccSmrg 4086caade7ccSmrg 4087b9b4fd27Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4088b9b4fd27Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4089b9b4fd27Smrg# ---------------------------------------------------------------- 4090b9b4fd27Smrg# Check whether the given compiler option works 4091b9b4fd27SmrgAC_DEFUN([_LT_COMPILER_OPTION], 4092b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4093b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 4094b9b4fd27SmrgAC_CACHE_CHECK([$1], [$2], 4095b9b4fd27Smrg [$2=no 4096b9b4fd27Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 4097b9b4fd27Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4098b9b4fd27Smrg lt_compiler_flag="$3" 4099b9b4fd27Smrg # Insert the option either (1) after the last *FLAGS variable, or 4100b9b4fd27Smrg # (2) before a word containing "conftest.", or (3) at the end. 4101b9b4fd27Smrg # Note that $ac_compile itself does not contain backslashes and begins 4102b9b4fd27Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4103b9b4fd27Smrg # The option is referenced via a variable to avoid confusing sed. 4104b9b4fd27Smrg lt_compile=`echo "$ac_compile" | $SED \ 4105b9b4fd27Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4106b9b4fd27Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4107b9b4fd27Smrg -e 's:$: $lt_compiler_flag:'` 4108e8a5466aSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4109b9b4fd27Smrg (eval "$lt_compile" 2>conftest.err) 4110b9b4fd27Smrg ac_status=$? 4111b9b4fd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4112e8a5466aSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4113b9b4fd27Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 4114b9b4fd27Smrg # The compiler can only warn and ignore the option if not recognized 4115b9b4fd27Smrg # So say no if there are warnings other than the usual output. 4116e8a5466aSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 4117b9b4fd27Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4118b9b4fd27Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 4119b9b4fd27Smrg $2=yes 4120b9b4fd27Smrg fi 4121b9b4fd27Smrg fi 4122b9b4fd27Smrg $RM conftest* 4123b9b4fd27Smrg]) 4124caade7ccSmrg 4125b9b4fd27Smrgif test x"[$]$2" = xyes; then 4126b9b4fd27Smrg m4_if([$5], , :, [$5]) 4127b9b4fd27Smrgelse 4128b9b4fd27Smrg m4_if([$6], , :, [$6]) 4129b9b4fd27Smrgfi 4130b9b4fd27Smrg])# _LT_COMPILER_OPTION 4131caade7ccSmrg 4132b9b4fd27Smrg# Old name: 4133b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 4134b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 4135b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 4136caade7ccSmrg 4137caade7ccSmrg 4138b9b4fd27Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4139b9b4fd27Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 4140b9b4fd27Smrg# ---------------------------------------------------- 4141b9b4fd27Smrg# Check whether the given linker option works 4142b9b4fd27SmrgAC_DEFUN([_LT_LINKER_OPTION], 4143b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4144b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 4145b9b4fd27SmrgAC_CACHE_CHECK([$1], [$2], 4146b9b4fd27Smrg [$2=no 4147b9b4fd27Smrg save_LDFLAGS="$LDFLAGS" 4148b9b4fd27Smrg LDFLAGS="$LDFLAGS $3" 4149b9b4fd27Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 4150b9b4fd27Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 4151b9b4fd27Smrg # The linker can only warn and ignore the option if not recognized 4152b9b4fd27Smrg # So say no if there are warnings 4153b9b4fd27Smrg if test -s conftest.err; then 4154b9b4fd27Smrg # Append any errors to the config.log. 4155b9b4fd27Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 4156e8a5466aSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 4157b9b4fd27Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4158b9b4fd27Smrg if diff conftest.exp conftest.er2 >/dev/null; then 4159b9b4fd27Smrg $2=yes 4160b9b4fd27Smrg fi 4161b9b4fd27Smrg else 4162b9b4fd27Smrg $2=yes 4163b9b4fd27Smrg fi 4164b9b4fd27Smrg fi 4165b9b4fd27Smrg $RM -r conftest* 4166b9b4fd27Smrg LDFLAGS="$save_LDFLAGS" 4167b9b4fd27Smrg]) 4168caade7ccSmrg 4169b9b4fd27Smrgif test x"[$]$2" = xyes; then 4170b9b4fd27Smrg m4_if([$4], , :, [$4]) 4171b9b4fd27Smrgelse 4172b9b4fd27Smrg m4_if([$5], , :, [$5]) 4173b9b4fd27Smrgfi 4174b9b4fd27Smrg])# _LT_LINKER_OPTION 4175caade7ccSmrg 4176b9b4fd27Smrg# Old name: 4177b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 4178b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 4179b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 4180caade7ccSmrg 4181caade7ccSmrg 4182b9b4fd27Smrg# LT_CMD_MAX_LEN 4183b9b4fd27Smrg#--------------- 4184b9b4fd27SmrgAC_DEFUN([LT_CMD_MAX_LEN], 4185b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4186b9b4fd27Smrg# find the maximum length of command line arguments 4187b9b4fd27SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 4188b9b4fd27SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 4189b9b4fd27Smrg i=0 4190b9b4fd27Smrg teststring="ABCD" 4191caade7ccSmrg 4192b9b4fd27Smrg case $build_os in 4193b9b4fd27Smrg msdosdjgpp*) 4194b9b4fd27Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 4195b9b4fd27Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 4196b9b4fd27Smrg # during glob expansion). Even if it were fixed, the result of this 4197b9b4fd27Smrg # check would be larger than it should be. 4198b9b4fd27Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 4199b9b4fd27Smrg ;; 4200caade7ccSmrg 4201b9b4fd27Smrg gnu*) 4202b9b4fd27Smrg # Under GNU Hurd, this test is not required because there is 4203b9b4fd27Smrg # no limit to the length of command line arguments. 4204b9b4fd27Smrg # Libtool will interpret -1 as no limit whatsoever 4205b9b4fd27Smrg lt_cv_sys_max_cmd_len=-1; 4206b9b4fd27Smrg ;; 4207caade7ccSmrg 4208b9b4fd27Smrg cygwin* | mingw* | cegcc*) 4209b9b4fd27Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 4210b9b4fd27Smrg # about 5 minutes as the teststring grows exponentially. 4211b9b4fd27Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 4212b9b4fd27Smrg # you end up with a "frozen" computer, even though with patience 4213b9b4fd27Smrg # the test eventually succeeds (with a max line length of 256k). 4214b9b4fd27Smrg # Instead, let's just punt: use the minimum linelength reported by 4215b9b4fd27Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 4216b9b4fd27Smrg lt_cv_sys_max_cmd_len=8192; 4217b9b4fd27Smrg ;; 4218caade7ccSmrg 4219e8a5466aSmrg mint*) 4220e8a5466aSmrg # On MiNT this can take a long time and run out of memory. 4221e8a5466aSmrg lt_cv_sys_max_cmd_len=8192; 4222e8a5466aSmrg ;; 4223e8a5466aSmrg 4224b9b4fd27Smrg amigaos*) 4225b9b4fd27Smrg # On AmigaOS with pdksh, this test takes hours, literally. 4226b9b4fd27Smrg # So we just punt and use a minimum line length of 8192. 4227b9b4fd27Smrg lt_cv_sys_max_cmd_len=8192; 4228b9b4fd27Smrg ;; 4229485f0483Smrg 4230b9b4fd27Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 4231b9b4fd27Smrg # This has been around since 386BSD, at least. Likely further. 4232b9b4fd27Smrg if test -x /sbin/sysctl; then 4233b9b4fd27Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 4234b9b4fd27Smrg elif test -x /usr/sbin/sysctl; then 4235b9b4fd27Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 4236b9b4fd27Smrg else 4237b9b4fd27Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 4238b9b4fd27Smrg fi 4239b9b4fd27Smrg # And add a safety zone 4240b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 4241b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 4242b9b4fd27Smrg ;; 4243caade7ccSmrg 4244b9b4fd27Smrg interix*) 4245b9b4fd27Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 4246b9b4fd27Smrg lt_cv_sys_max_cmd_len=196608 4247b9b4fd27Smrg ;; 4248caade7ccSmrg 4249b9b4fd27Smrg osf*) 4250b9b4fd27Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 4251b9b4fd27Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 4252b9b4fd27Smrg # nice to cause kernel panics so lets avoid the loop below. 4253b9b4fd27Smrg # First set a reasonable default. 4254b9b4fd27Smrg lt_cv_sys_max_cmd_len=16384 4255b9b4fd27Smrg # 4256b9b4fd27Smrg if test -x /sbin/sysconfig; then 4257b9b4fd27Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 4258b9b4fd27Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 4259b9b4fd27Smrg esac 4260b9b4fd27Smrg fi 4261b9b4fd27Smrg ;; 4262b9b4fd27Smrg sco3.2v5*) 4263b9b4fd27Smrg lt_cv_sys_max_cmd_len=102400 4264b9b4fd27Smrg ;; 4265b9b4fd27Smrg sysv5* | sco5v6* | sysv4.2uw2*) 4266b9b4fd27Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 4267b9b4fd27Smrg if test -n "$kargmax"; then 4268b9b4fd27Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 4269b9b4fd27Smrg else 4270b9b4fd27Smrg lt_cv_sys_max_cmd_len=32768 4271b9b4fd27Smrg fi 4272b9b4fd27Smrg ;; 4273b9b4fd27Smrg *) 4274b9b4fd27Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 4275b9b4fd27Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 4276b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 4277b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 4278b9b4fd27Smrg else 4279b9b4fd27Smrg # Make teststring a little bigger before we do anything with it. 4280b9b4fd27Smrg # a 1K string should be a reasonable start. 4281b9b4fd27Smrg for i in 1 2 3 4 5 6 7 8 ; do 4282b9b4fd27Smrg teststring=$teststring$teststring 4283b9b4fd27Smrg done 4284b9b4fd27Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 4285b9b4fd27Smrg # If test is not a shell built-in, we'll probably end up computing a 4286b9b4fd27Smrg # maximum length that is only half of the actual maximum length, but 4287b9b4fd27Smrg # we can't tell. 4288e8a5466aSmrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 4289e8a5466aSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 4290b9b4fd27Smrg test $i != 17 # 1/2 MB should be enough 4291b9b4fd27Smrg do 4292b9b4fd27Smrg i=`expr $i + 1` 4293b9b4fd27Smrg teststring=$teststring$teststring 4294b9b4fd27Smrg done 4295b9b4fd27Smrg # Only check the string length outside the loop. 4296b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 4297b9b4fd27Smrg teststring= 4298b9b4fd27Smrg # Add a significant safety factor because C++ compilers can tack on 4299b9b4fd27Smrg # massive amounts of additional arguments before passing them to the 4300b9b4fd27Smrg # linker. It appears as though 1/2 is a usable value. 4301b9b4fd27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 4302b9b4fd27Smrg fi 4303b9b4fd27Smrg ;; 4304caade7ccSmrg esac 4305b9b4fd27Smrg]) 4306b9b4fd27Smrgif test -n $lt_cv_sys_max_cmd_len ; then 4307b9b4fd27Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 4308b9b4fd27Smrgelse 4309b9b4fd27Smrg AC_MSG_RESULT(none) 4310b9b4fd27Smrgfi 4311b9b4fd27Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 4312b9b4fd27Smrg_LT_DECL([], [max_cmd_len], [0], 4313b9b4fd27Smrg [What is the maximum length of a command?]) 4314b9b4fd27Smrg])# LT_CMD_MAX_LEN 4315caade7ccSmrg 4316b9b4fd27Smrg# Old name: 4317b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 4318b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 4319b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 4320caade7ccSmrg 4321caade7ccSmrg 4322b9b4fd27Smrg# _LT_HEADER_DLFCN 4323b9b4fd27Smrg# ---------------- 4324b9b4fd27Smrgm4_defun([_LT_HEADER_DLFCN], 4325b9b4fd27Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 4326b9b4fd27Smrg])# _LT_HEADER_DLFCN 4327caade7ccSmrg 4328caade7ccSmrg 4329b9b4fd27Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 4330b9b4fd27Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 4331b9b4fd27Smrg# ---------------------------------------------------------------- 4332b9b4fd27Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 4333b9b4fd27Smrg[m4_require([_LT_HEADER_DLFCN])dnl 4334b9b4fd27Smrgif test "$cross_compiling" = yes; then : 4335b9b4fd27Smrg [$4] 4336b9b4fd27Smrgelse 4337b9b4fd27Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 4338b9b4fd27Smrg lt_status=$lt_dlunknown 4339b9b4fd27Smrg cat > conftest.$ac_ext <<_LT_EOF 4340e8a5466aSmrg[#line $LINENO "configure" 4341b9b4fd27Smrg#include "confdefs.h" 4342485f0483Smrg 4343b9b4fd27Smrg#if HAVE_DLFCN_H 4344b9b4fd27Smrg#include <dlfcn.h> 4345b9b4fd27Smrg#endif 4346caade7ccSmrg 4347b9b4fd27Smrg#include <stdio.h> 4348caade7ccSmrg 4349b9b4fd27Smrg#ifdef RTLD_GLOBAL 4350b9b4fd27Smrg# define LT_DLGLOBAL RTLD_GLOBAL 4351b9b4fd27Smrg#else 4352b9b4fd27Smrg# ifdef DL_GLOBAL 4353b9b4fd27Smrg# define LT_DLGLOBAL DL_GLOBAL 4354b9b4fd27Smrg# else 4355b9b4fd27Smrg# define LT_DLGLOBAL 0 4356b9b4fd27Smrg# endif 4357b9b4fd27Smrg#endif 4358caade7ccSmrg 4359b9b4fd27Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 4360b9b4fd27Smrg find out it does not work in some platform. */ 4361b9b4fd27Smrg#ifndef LT_DLLAZY_OR_NOW 4362b9b4fd27Smrg# ifdef RTLD_LAZY 4363b9b4fd27Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 4364b9b4fd27Smrg# else 4365b9b4fd27Smrg# ifdef DL_LAZY 4366b9b4fd27Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 4367b9b4fd27Smrg# else 4368b9b4fd27Smrg# ifdef RTLD_NOW 4369b9b4fd27Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 4370b9b4fd27Smrg# else 4371b9b4fd27Smrg# ifdef DL_NOW 4372b9b4fd27Smrg# define LT_DLLAZY_OR_NOW DL_NOW 4373b9b4fd27Smrg# else 4374b9b4fd27Smrg# define LT_DLLAZY_OR_NOW 0 4375b9b4fd27Smrg# endif 4376b9b4fd27Smrg# endif 4377b9b4fd27Smrg# endif 4378b9b4fd27Smrg# endif 4379b9b4fd27Smrg#endif 4380caade7ccSmrg 4381e8a5466aSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 4382e8a5466aSmrg correspondingly for the symbols needed. */ 4383e8a5466aSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 4384a5602400Smrgint fnord () __attribute__((visibility("default"))); 4385e8a5466aSmrg#endif 4386e8a5466aSmrg 4387a5602400Smrgint fnord () { return 42; } 4388b9b4fd27Smrgint main () 4389b9b4fd27Smrg{ 4390b9b4fd27Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 4391b9b4fd27Smrg int status = $lt_dlunknown; 4392caade7ccSmrg 4393b9b4fd27Smrg if (self) 4394b9b4fd27Smrg { 4395b9b4fd27Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 4396e8a5466aSmrg else 4397e8a5466aSmrg { 4398e8a5466aSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 4399e8a5466aSmrg else puts (dlerror ()); 4400e8a5466aSmrg } 4401b9b4fd27Smrg /* dlclose (self); */ 4402b9b4fd27Smrg } 4403b9b4fd27Smrg else 4404b9b4fd27Smrg puts (dlerror ()); 4405caade7ccSmrg 4406b9b4fd27Smrg return status; 4407b9b4fd27Smrg}] 4408b9b4fd27Smrg_LT_EOF 4409b9b4fd27Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 4410b9b4fd27Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 4411b9b4fd27Smrg lt_status=$? 4412b9b4fd27Smrg case x$lt_status in 4413b9b4fd27Smrg x$lt_dlno_uscore) $1 ;; 4414b9b4fd27Smrg x$lt_dlneed_uscore) $2 ;; 4415b9b4fd27Smrg x$lt_dlunknown|x*) $3 ;; 4416b9b4fd27Smrg esac 4417b9b4fd27Smrg else : 4418b9b4fd27Smrg # compilation failed 4419b9b4fd27Smrg $3 4420b9b4fd27Smrg fi 4421b9b4fd27Smrgfi 4422b9b4fd27Smrgrm -fr conftest* 4423b9b4fd27Smrg])# _LT_TRY_DLOPEN_SELF 4424caade7ccSmrg 4425caade7ccSmrg 4426b9b4fd27Smrg# LT_SYS_DLOPEN_SELF 4427b9b4fd27Smrg# ------------------ 4428b9b4fd27SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 4429b9b4fd27Smrg[m4_require([_LT_HEADER_DLFCN])dnl 4430b9b4fd27Smrgif test "x$enable_dlopen" != xyes; then 4431b9b4fd27Smrg enable_dlopen=unknown 4432b9b4fd27Smrg enable_dlopen_self=unknown 4433b9b4fd27Smrg enable_dlopen_self_static=unknown 4434b9b4fd27Smrgelse 4435b9b4fd27Smrg lt_cv_dlopen=no 4436b9b4fd27Smrg lt_cv_dlopen_libs= 4437caade7ccSmrg 4438b9b4fd27Smrg case $host_os in 4439b9b4fd27Smrg beos*) 4440b9b4fd27Smrg lt_cv_dlopen="load_add_on" 4441b9b4fd27Smrg lt_cv_dlopen_libs= 4442b9b4fd27Smrg lt_cv_dlopen_self=yes 4443b9b4fd27Smrg ;; 4444caade7ccSmrg 4445b9b4fd27Smrg mingw* | pw32* | cegcc*) 4446b9b4fd27Smrg lt_cv_dlopen="LoadLibrary" 4447b9b4fd27Smrg lt_cv_dlopen_libs= 4448b9b4fd27Smrg ;; 4449caade7ccSmrg 4450b9b4fd27Smrg cygwin*) 4451b9b4fd27Smrg lt_cv_dlopen="dlopen" 4452b9b4fd27Smrg lt_cv_dlopen_libs= 4453b9b4fd27Smrg ;; 4454caade7ccSmrg 4455b9b4fd27Smrg darwin*) 4456b9b4fd27Smrg # if libdl is installed we need to link against it 4457b9b4fd27Smrg AC_CHECK_LIB([dl], [dlopen], 4458b9b4fd27Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 4459b9b4fd27Smrg lt_cv_dlopen="dyld" 4460b9b4fd27Smrg lt_cv_dlopen_libs= 4461b9b4fd27Smrg lt_cv_dlopen_self=yes 4462b9b4fd27Smrg ]) 4463b9b4fd27Smrg ;; 4464caade7ccSmrg 4465b9b4fd27Smrg *) 4466b9b4fd27Smrg AC_CHECK_FUNC([shl_load], 4467b9b4fd27Smrg [lt_cv_dlopen="shl_load"], 4468b9b4fd27Smrg [AC_CHECK_LIB([dld], [shl_load], 4469b9b4fd27Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 4470b9b4fd27Smrg [AC_CHECK_FUNC([dlopen], 4471b9b4fd27Smrg [lt_cv_dlopen="dlopen"], 4472b9b4fd27Smrg [AC_CHECK_LIB([dl], [dlopen], 4473b9b4fd27Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 4474b9b4fd27Smrg [AC_CHECK_LIB([svld], [dlopen], 4475b9b4fd27Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 4476b9b4fd27Smrg [AC_CHECK_LIB([dld], [dld_link], 4477b9b4fd27Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 4478b9b4fd27Smrg ]) 4479b9b4fd27Smrg ]) 4480b9b4fd27Smrg ]) 4481b9b4fd27Smrg ]) 4482b9b4fd27Smrg ]) 4483b9b4fd27Smrg ;; 4484b9b4fd27Smrg esac 4485caade7ccSmrg 4486b9b4fd27Smrg if test "x$lt_cv_dlopen" != xno; then 4487b9b4fd27Smrg enable_dlopen=yes 4488caade7ccSmrg else 4489b9b4fd27Smrg enable_dlopen=no 4490caade7ccSmrg fi 4491caade7ccSmrg 4492b9b4fd27Smrg case $lt_cv_dlopen in 4493b9b4fd27Smrg dlopen) 4494b9b4fd27Smrg save_CPPFLAGS="$CPPFLAGS" 4495b9b4fd27Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 4496caade7ccSmrg 4497b9b4fd27Smrg save_LDFLAGS="$LDFLAGS" 4498b9b4fd27Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 4499caade7ccSmrg 4500b9b4fd27Smrg save_LIBS="$LIBS" 4501b9b4fd27Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 4502caade7ccSmrg 4503b9b4fd27Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 4504b9b4fd27Smrg lt_cv_dlopen_self, [dnl 4505b9b4fd27Smrg _LT_TRY_DLOPEN_SELF( 4506b9b4fd27Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 4507b9b4fd27Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 4508b9b4fd27Smrg ]) 4509caade7ccSmrg 4510b9b4fd27Smrg if test "x$lt_cv_dlopen_self" = xyes; then 4511b9b4fd27Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 4512b9b4fd27Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 4513b9b4fd27Smrg lt_cv_dlopen_self_static, [dnl 4514b9b4fd27Smrg _LT_TRY_DLOPEN_SELF( 4515b9b4fd27Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 4516b9b4fd27Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 4517b9b4fd27Smrg ]) 4518b9b4fd27Smrg fi 4519caade7ccSmrg 4520b9b4fd27Smrg CPPFLAGS="$save_CPPFLAGS" 4521b9b4fd27Smrg LDFLAGS="$save_LDFLAGS" 4522b9b4fd27Smrg LIBS="$save_LIBS" 4523b9b4fd27Smrg ;; 4524b9b4fd27Smrg esac 4525caade7ccSmrg 4526b9b4fd27Smrg case $lt_cv_dlopen_self in 4527b9b4fd27Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 4528b9b4fd27Smrg *) enable_dlopen_self=unknown ;; 4529b9b4fd27Smrg esac 4530caade7ccSmrg 4531b9b4fd27Smrg case $lt_cv_dlopen_self_static in 4532b9b4fd27Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 4533b9b4fd27Smrg *) enable_dlopen_self_static=unknown ;; 4534b9b4fd27Smrg esac 4535b9b4fd27Smrgfi 4536b9b4fd27Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 4537b9b4fd27Smrg [Whether dlopen is supported]) 4538b9b4fd27Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 4539b9b4fd27Smrg [Whether dlopen of programs is supported]) 4540b9b4fd27Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 4541b9b4fd27Smrg [Whether dlopen of statically linked programs is supported]) 4542b9b4fd27Smrg])# LT_SYS_DLOPEN_SELF 4543caade7ccSmrg 4544b9b4fd27Smrg# Old name: 4545b9b4fd27SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 4546b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 4547b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 4548caade7ccSmrg 4549caade7ccSmrg 4550b9b4fd27Smrg# _LT_COMPILER_C_O([TAGNAME]) 4551b9b4fd27Smrg# --------------------------- 4552b9b4fd27Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 4553b9b4fd27Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 4554b9b4fd27Smrgm4_defun([_LT_COMPILER_C_O], 4555b9b4fd27Smrg[m4_require([_LT_DECL_SED])dnl 4556b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4557b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl 4558b9b4fd27SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 4559b9b4fd27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 4560b9b4fd27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 4561b9b4fd27Smrg $RM -r conftest 2>/dev/null 4562b9b4fd27Smrg mkdir conftest 4563b9b4fd27Smrg cd conftest 4564b9b4fd27Smrg mkdir out 4565b9b4fd27Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4566caade7ccSmrg 4567b9b4fd27Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 4568b9b4fd27Smrg # Insert the option either (1) after the last *FLAGS variable, or 4569b9b4fd27Smrg # (2) before a word containing "conftest.", or (3) at the end. 4570b9b4fd27Smrg # Note that $ac_compile itself does not contain backslashes and begins 4571b9b4fd27Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 4572b9b4fd27Smrg lt_compile=`echo "$ac_compile" | $SED \ 4573b9b4fd27Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4574b9b4fd27Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4575b9b4fd27Smrg -e 's:$: $lt_compiler_flag:'` 4576e8a5466aSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4577b9b4fd27Smrg (eval "$lt_compile" 2>out/conftest.err) 4578b9b4fd27Smrg ac_status=$? 4579b9b4fd27Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 4580e8a5466aSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4581b9b4fd27Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 4582b9b4fd27Smrg then 4583b9b4fd27Smrg # The compiler can only warn and ignore the option if not recognized 4584b9b4fd27Smrg # So say no if there are warnings 4585e8a5466aSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 4586b9b4fd27Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 4587b9b4fd27Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 4588b9b4fd27Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4589b9b4fd27Smrg fi 4590b9b4fd27Smrg fi 4591b9b4fd27Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 4592b9b4fd27Smrg $RM conftest* 4593b9b4fd27Smrg # SGI C++ compiler will create directory out/ii_files/ for 4594b9b4fd27Smrg # template instantiation 4595b9b4fd27Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 4596b9b4fd27Smrg $RM out/* && rmdir out 4597b9b4fd27Smrg cd .. 4598b9b4fd27Smrg $RM -r conftest 4599b9b4fd27Smrg $RM conftest* 4600b9b4fd27Smrg]) 4601b9b4fd27Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 4602b9b4fd27Smrg [Does compiler simultaneously support -c and -o options?]) 4603b9b4fd27Smrg])# _LT_COMPILER_C_O 4604caade7ccSmrg 4605caade7ccSmrg 4606b9b4fd27Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 4607b9b4fd27Smrg# ---------------------------------- 4608b9b4fd27Smrg# Check to see if we can do hard links to lock some files if needed 4609b9b4fd27Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 4610b9b4fd27Smrg[m4_require([_LT_ENABLE_LOCK])dnl 4611b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4612b9b4fd27Smrg_LT_COMPILER_C_O([$1]) 4613caade7ccSmrg 4614b9b4fd27Smrghard_links="nottested" 4615b9b4fd27Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 4616b9b4fd27Smrg # do not overwrite the value of need_locks provided by the user 4617b9b4fd27Smrg AC_MSG_CHECKING([if we can lock with hard links]) 4618b9b4fd27Smrg hard_links=yes 4619b9b4fd27Smrg $RM conftest* 4620b9b4fd27Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 4621b9b4fd27Smrg touch conftest.a 4622b9b4fd27Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 4623b9b4fd27Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 4624b9b4fd27Smrg AC_MSG_RESULT([$hard_links]) 4625b9b4fd27Smrg if test "$hard_links" = no; then 4626b9b4fd27Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 4627b9b4fd27Smrg need_locks=warn 4628b9b4fd27Smrg fi 4629b9b4fd27Smrgelse 4630b9b4fd27Smrg need_locks=no 4631b9b4fd27Smrgfi 4632b9b4fd27Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 4633b9b4fd27Smrg])# _LT_COMPILER_FILE_LOCKS 4634caade7ccSmrg 4635caade7ccSmrg 4636b9b4fd27Smrg# _LT_CHECK_OBJDIR 4637b9b4fd27Smrg# ---------------- 4638b9b4fd27Smrgm4_defun([_LT_CHECK_OBJDIR], 4639b9b4fd27Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 4640b9b4fd27Smrg[rm -f .libs 2>/dev/null 4641b9b4fd27Smrgmkdir .libs 2>/dev/null 4642b9b4fd27Smrgif test -d .libs; then 4643b9b4fd27Smrg lt_cv_objdir=.libs 4644caade7ccSmrgelse 4645b9b4fd27Smrg # MS-DOS does not allow filenames that begin with a dot. 4646b9b4fd27Smrg lt_cv_objdir=_libs 4647caade7ccSmrgfi 4648b9b4fd27Smrgrmdir .libs 2>/dev/null]) 4649b9b4fd27Smrgobjdir=$lt_cv_objdir 4650b9b4fd27Smrg_LT_DECL([], [objdir], [0], 4651b9b4fd27Smrg [The name of the directory that contains temporary libtool files])dnl 4652b9b4fd27Smrgm4_pattern_allow([LT_OBJDIR])dnl 4653b9b4fd27SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 4654b9b4fd27Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 4655b9b4fd27Smrg])# _LT_CHECK_OBJDIR 4656caade7ccSmrg 4657caade7ccSmrg 4658b9b4fd27Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 4659b9b4fd27Smrg# -------------------------------------- 4660b9b4fd27Smrg# Check hardcoding attributes. 4661b9b4fd27Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 4662b9b4fd27Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 4663b9b4fd27Smrg_LT_TAGVAR(hardcode_action, $1)= 4664b9b4fd27Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 4665b9b4fd27Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 4666b9b4fd27Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 4667b9b4fd27Smrg 4668b9b4fd27Smrg # We can hardcode non-existent directories. 4669b9b4fd27Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 4670b9b4fd27Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 4671b9b4fd27Smrg # have to relink, otherwise we might link with an installed library 4672b9b4fd27Smrg # when we should be linking with a yet-to-be-installed one 4673b9b4fd27Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 4674b9b4fd27Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 4675b9b4fd27Smrg # Linking always hardcodes the temporary library directory. 4676b9b4fd27Smrg _LT_TAGVAR(hardcode_action, $1)=relink 4677caade7ccSmrg else 4678b9b4fd27Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 4679b9b4fd27Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 4680caade7ccSmrg fi 4681b9b4fd27Smrgelse 4682b9b4fd27Smrg # We cannot hardcode anything, or else we can only hardcode existing 4683b9b4fd27Smrg # directories. 4684b9b4fd27Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 4685caade7ccSmrgfi 4686b9b4fd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 4687caade7ccSmrg 4688b9b4fd27Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 4689b9b4fd27Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 4690b9b4fd27Smrg # Fast installation is not supported 4691b9b4fd27Smrg enable_fast_install=no 4692b9b4fd27Smrgelif test "$shlibpath_overrides_runpath" = yes || 4693b9b4fd27Smrg test "$enable_shared" = no; then 4694b9b4fd27Smrg # Fast installation is not necessary 4695b9b4fd27Smrg enable_fast_install=needless 4696b9b4fd27Smrgfi 4697b9b4fd27Smrg_LT_TAGDECL([], [hardcode_action], [0], 4698b9b4fd27Smrg [How to hardcode a shared library path into an executable]) 4699b9b4fd27Smrg])# _LT_LINKER_HARDCODE_LIBPATH 4700caade7ccSmrg 4701b9b4fd27Smrg 4702b9b4fd27Smrg# _LT_CMD_STRIPLIB 4703b9b4fd27Smrg# ---------------- 4704b9b4fd27Smrgm4_defun([_LT_CMD_STRIPLIB], 4705b9b4fd27Smrg[m4_require([_LT_DECL_EGREP]) 4706b9b4fd27Smrgstriplib= 4707b9b4fd27Smrgold_striplib= 4708b9b4fd27SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 4709b9b4fd27Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 4710b9b4fd27Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 4711b9b4fd27Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 4712b9b4fd27Smrg AC_MSG_RESULT([yes]) 4713b9b4fd27Smrgelse 4714b9b4fd27Smrg# FIXME - insert some real tests, host_os isn't really good enough 4715b9b4fd27Smrg case $host_os in 4716b9b4fd27Smrg darwin*) 4717b9b4fd27Smrg if test -n "$STRIP" ; then 4718b9b4fd27Smrg striplib="$STRIP -x" 4719b9b4fd27Smrg old_striplib="$STRIP -S" 4720b9b4fd27Smrg AC_MSG_RESULT([yes]) 4721b9b4fd27Smrg else 4722b9b4fd27Smrg AC_MSG_RESULT([no]) 4723b9b4fd27Smrg fi 4724caade7ccSmrg ;; 4725caade7ccSmrg *) 4726b9b4fd27Smrg AC_MSG_RESULT([no]) 4727caade7ccSmrg ;; 4728caade7ccSmrg esac 4729caade7ccSmrgfi 4730b9b4fd27Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 4731b9b4fd27Smrg_LT_DECL([], [striplib], [1]) 4732b9b4fd27Smrg])# _LT_CMD_STRIPLIB 4733caade7ccSmrg 4734caade7ccSmrg 4735b9b4fd27Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 4736b9b4fd27Smrg# ----------------------------- 4737b9b4fd27Smrg# PORTME Fill in your ld.so characteristics 4738b9b4fd27Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 4739b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4740b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 4741b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4742b9b4fd27Smrgm4_require([_LT_DECL_OBJDUMP])dnl 4743b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 4744e8a5466aSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 4745b9b4fd27SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 4746b9b4fd27Smrgm4_if([$1], 4747b9b4fd27Smrg [], [ 4748b9b4fd27Smrgif test "$GCC" = yes; then 4749b9b4fd27Smrg case $host_os in 4750b9b4fd27Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 4751b9b4fd27Smrg *) lt_awk_arg="/^libraries:/" ;; 4752b9b4fd27Smrg esac 4753e8a5466aSmrg case $host_os in 4754e8a5466aSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 4755e8a5466aSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 4756e8a5466aSmrg esac 4757e8a5466aSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 4758e8a5466aSmrg case $lt_search_path_spec in 4759e8a5466aSmrg *\;*) 4760b9b4fd27Smrg # if the path contains ";" then we assume it to be the separator 4761b9b4fd27Smrg # otherwise default to the standard path separator (i.e. ":") - it is 4762b9b4fd27Smrg # assumed that no part of a normal pathname contains ";" but that should 4763b9b4fd27Smrg # okay in the real world where ";" in dirpaths is itself problematic. 4764e8a5466aSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 4765e8a5466aSmrg ;; 4766e8a5466aSmrg *) 4767e8a5466aSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 4768e8a5466aSmrg ;; 4769e8a5466aSmrg esac 4770b9b4fd27Smrg # Ok, now we have the path, separated by spaces, we can step through it 4771b9b4fd27Smrg # and add multilib dir if necessary. 4772b9b4fd27Smrg lt_tmp_lt_search_path_spec= 4773b9b4fd27Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 4774b9b4fd27Smrg for lt_sys_path in $lt_search_path_spec; do 4775b9b4fd27Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 4776b9b4fd27Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 4777caade7ccSmrg else 4778b9b4fd27Smrg test -d "$lt_sys_path" && \ 4779b9b4fd27Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 4780caade7ccSmrg fi 4781b9b4fd27Smrg done 4782e8a5466aSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 4783b9b4fd27SmrgBEGIN {RS=" "; FS="/|\n";} { 4784b9b4fd27Smrg lt_foo=""; 4785b9b4fd27Smrg lt_count=0; 4786b9b4fd27Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 4787b9b4fd27Smrg if ($lt_i != "" && $lt_i != ".") { 4788b9b4fd27Smrg if ($lt_i == "..") { 4789b9b4fd27Smrg lt_count++; 4790b9b4fd27Smrg } else { 4791b9b4fd27Smrg if (lt_count == 0) { 4792b9b4fd27Smrg lt_foo="/" $lt_i lt_foo; 4793b9b4fd27Smrg } else { 4794b9b4fd27Smrg lt_count--; 4795b9b4fd27Smrg } 4796b9b4fd27Smrg } 4797b9b4fd27Smrg } 4798b9b4fd27Smrg } 4799b9b4fd27Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 4800b9b4fd27Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 4801b9b4fd27Smrg}'` 4802e8a5466aSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 4803e8a5466aSmrg # for these hosts. 4804e8a5466aSmrg case $host_os in 4805e8a5466aSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 4806e8a5466aSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 4807e8a5466aSmrg esac 4808e8a5466aSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 4809b9b4fd27Smrgelse 4810b9b4fd27Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 4811b9b4fd27Smrgfi]) 4812b9b4fd27Smrglibrary_names_spec= 4813b9b4fd27Smrglibname_spec='lib$name' 4814b9b4fd27Smrgsoname_spec= 4815b9b4fd27Smrgshrext_cmds=".so" 4816b9b4fd27Smrgpostinstall_cmds= 4817b9b4fd27Smrgpostuninstall_cmds= 4818b9b4fd27Smrgfinish_cmds= 4819b9b4fd27Smrgfinish_eval= 4820b9b4fd27Smrgshlibpath_var= 4821b9b4fd27Smrgshlibpath_overrides_runpath=unknown 4822b9b4fd27Smrgversion_type=none 4823b9b4fd27Smrgdynamic_linker="$host_os ld.so" 4824b9b4fd27Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 4825b9b4fd27Smrgneed_lib_prefix=unknown 4826b9b4fd27Smrghardcode_into_libs=no 4827caade7ccSmrg 4828b9b4fd27Smrg# when you set need_version to no, make sure it does not cause -set_version 4829b9b4fd27Smrg# flags to be left without arguments 4830b9b4fd27Smrgneed_version=unknown 4831caade7ccSmrg 4832caade7ccSmrgcase $host_os in 4833b9b4fd27Smrgaix3*) 4834b9b4fd27Smrg version_type=linux 4835b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 4836b9b4fd27Smrg shlibpath_var=LIBPATH 4837caade7ccSmrg 4838b9b4fd27Smrg # AIX 3 has no versioning support, so we append a major version to the name. 4839b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4840caade7ccSmrg ;; 4841caade7ccSmrg 4842b9b4fd27Smrgaix[[4-9]]*) 4843b9b4fd27Smrg version_type=linux 4844b9b4fd27Smrg need_lib_prefix=no 4845b9b4fd27Smrg need_version=no 4846b9b4fd27Smrg hardcode_into_libs=yes 4847b9b4fd27Smrg if test "$host_cpu" = ia64; then 4848b9b4fd27Smrg # AIX 5 supports IA64 4849b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 4850b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4851485f0483Smrg else 4852b9b4fd27Smrg # With GCC up to 2.95.x, collect2 would create an import file 4853b9b4fd27Smrg # for dependence libraries. The import file would start with 4854b9b4fd27Smrg # the line `#! .'. This would cause the generated library to 4855b9b4fd27Smrg # depend on `.', always an invalid library. This was fixed in 4856b9b4fd27Smrg # development snapshots of GCC prior to 3.0. 4857b9b4fd27Smrg case $host_os in 4858b9b4fd27Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 4859b9b4fd27Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 4860b9b4fd27Smrg echo ' yes ' 4861b9b4fd27Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 4862b9b4fd27Smrg : 4863b9b4fd27Smrg else 4864b9b4fd27Smrg can_build_shared=no 4865b9b4fd27Smrg fi 4866caade7ccSmrg ;; 4867caade7ccSmrg esac 4868b9b4fd27Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 4869b9b4fd27Smrg # soname into executable. Probably we can add versioning support to 4870b9b4fd27Smrg # collect2, so additional links can be useful in future. 4871b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 4872b9b4fd27Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 4873b9b4fd27Smrg # instead of lib<name>.a to let people know that these are not 4874b9b4fd27Smrg # typical AIX shared libraries. 4875b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4876b9b4fd27Smrg else 4877b9b4fd27Smrg # We preserve .a as extension for shared libraries through AIX4.2 4878b9b4fd27Smrg # and later when we are not doing run time linking. 4879b9b4fd27Smrg library_names_spec='${libname}${release}.a $libname.a' 4880b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4881b9b4fd27Smrg fi 4882b9b4fd27Smrg shlibpath_var=LIBPATH 4883caade7ccSmrg fi 4884caade7ccSmrg ;; 4885caade7ccSmrg 4886b9b4fd27Smrgamigaos*) 4887caade7ccSmrg case $host_cpu in 4888b9b4fd27Smrg powerpc) 4889b9b4fd27Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 4890b9b4fd27Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 4891b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4892caade7ccSmrg ;; 4893b9b4fd27Smrg m68k) 4894b9b4fd27Smrg library_names_spec='$libname.ixlibrary $libname.a' 4895b9b4fd27Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 4896e8a5466aSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 4897caade7ccSmrg ;; 4898caade7ccSmrg esac 4899caade7ccSmrg ;; 4900caade7ccSmrg 4901b9b4fd27Smrgbeos*) 4902b9b4fd27Smrg library_names_spec='${libname}${shared_ext}' 4903b9b4fd27Smrg dynamic_linker="$host_os ld.so" 4904b9b4fd27Smrg shlibpath_var=LIBRARY_PATH 4905caade7ccSmrg ;; 4906caade7ccSmrg 4907b9b4fd27Smrgbsdi[[45]]*) 4908b9b4fd27Smrg version_type=linux 4909b9b4fd27Smrg need_version=no 4910b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4911b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4912b9b4fd27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 4913b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 4914b9b4fd27Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 4915b9b4fd27Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 4916b9b4fd27Smrg # the default ld.so.conf also contains /usr/contrib/lib and 4917b9b4fd27Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 4918b9b4fd27Smrg # libtool to hard-code these into programs 4919caade7ccSmrg ;; 4920caade7ccSmrg 4921b9b4fd27Smrgcygwin* | mingw* | pw32* | cegcc*) 4922b9b4fd27Smrg version_type=windows 4923b9b4fd27Smrg shrext_cmds=".dll" 4924b9b4fd27Smrg need_version=no 4925b9b4fd27Smrg need_lib_prefix=no 4926caade7ccSmrg 4927a5602400Smrg case $GCC,$cc_basename in 4928a5602400Smrg yes,*) 4929a5602400Smrg # gcc 4930b9b4fd27Smrg library_names_spec='$libname.dll.a' 4931b9b4fd27Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 4932b9b4fd27Smrg postinstall_cmds='base_file=`basename \${file}`~ 4933b9b4fd27Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 4934b9b4fd27Smrg dldir=$destdir/`dirname \$dlpath`~ 4935b9b4fd27Smrg test -d \$dldir || mkdir -p \$dldir~ 4936b9b4fd27Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 4937b9b4fd27Smrg chmod a+x \$dldir/$dlname~ 4938b9b4fd27Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 4939b9b4fd27Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 4940b9b4fd27Smrg fi' 4941b9b4fd27Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 4942b9b4fd27Smrg dlpath=$dir/\$dldll~ 4943b9b4fd27Smrg $RM \$dlpath' 4944b9b4fd27Smrg shlibpath_overrides_runpath=yes 4945caade7ccSmrg 4946b9b4fd27Smrg case $host_os in 4947b9b4fd27Smrg cygwin*) 4948b9b4fd27Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 4949b9b4fd27Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4950e8a5466aSmrgm4_if([$1], [],[ 4951e8a5466aSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 4952b9b4fd27Smrg ;; 4953b9b4fd27Smrg mingw* | cegcc*) 4954b9b4fd27Smrg # MinGW DLLs use traditional 'lib' prefix 4955b9b4fd27Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4956b9b4fd27Smrg ;; 4957b9b4fd27Smrg pw32*) 4958b9b4fd27Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 4959b9b4fd27Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4960b9b4fd27Smrg ;; 4961b9b4fd27Smrg esac 4962a5602400Smrg dynamic_linker='Win32 ld.exe' 4963a5602400Smrg ;; 4964a5602400Smrg 4965a5602400Smrg *,cl*) 4966a5602400Smrg # Native MSVC 4967a5602400Smrg libname_spec='$name' 4968a5602400Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4969a5602400Smrg library_names_spec='${libname}.dll.lib' 4970a5602400Smrg 4971a5602400Smrg case $build_os in 4972a5602400Smrg mingw*) 4973a5602400Smrg sys_lib_search_path_spec= 4974a5602400Smrg lt_save_ifs=$IFS 4975a5602400Smrg IFS=';' 4976a5602400Smrg for lt_path in $LIB 4977a5602400Smrg do 4978a5602400Smrg IFS=$lt_save_ifs 4979a5602400Smrg # Let DOS variable expansion print the short 8.3 style file name. 4980a5602400Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 4981a5602400Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 4982a5602400Smrg done 4983a5602400Smrg IFS=$lt_save_ifs 4984a5602400Smrg # Convert to MSYS style. 4985a5602400Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 4986a5602400Smrg ;; 4987a5602400Smrg cygwin*) 4988a5602400Smrg # Convert to unix form, then to dos form, then back to unix form 4989a5602400Smrg # but this time dos style (no spaces!) so that the unix form looks 4990a5602400Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 4991a5602400Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 4992a5602400Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 4993a5602400Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 4994a5602400Smrg ;; 4995a5602400Smrg *) 4996a5602400Smrg sys_lib_search_path_spec="$LIB" 4997a5602400Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 4998a5602400Smrg # It is most probably a Windows format PATH. 4999a5602400Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 5000a5602400Smrg else 5001a5602400Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 5002a5602400Smrg fi 5003a5602400Smrg # FIXME: find the short name or the path components, as spaces are 5004a5602400Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 5005a5602400Smrg ;; 5006a5602400Smrg esac 5007a5602400Smrg 5008a5602400Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 5009a5602400Smrg postinstall_cmds='base_file=`basename \${file}`~ 5010a5602400Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 5011a5602400Smrg dldir=$destdir/`dirname \$dlpath`~ 5012a5602400Smrg test -d \$dldir || mkdir -p \$dldir~ 5013a5602400Smrg $install_prog $dir/$dlname \$dldir/$dlname' 5014a5602400Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5015a5602400Smrg dlpath=$dir/\$dldll~ 5016a5602400Smrg $RM \$dlpath' 5017a5602400Smrg shlibpath_overrides_runpath=yes 5018a5602400Smrg dynamic_linker='Win32 link.exe' 5019b9b4fd27Smrg ;; 5020b9b4fd27Smrg 5021b9b4fd27Smrg *) 5022a5602400Smrg # Assume MSVC wrapper 5023b9b4fd27Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 5024a5602400Smrg dynamic_linker='Win32 ld.exe' 5025b9b4fd27Smrg ;; 5026b9b4fd27Smrg esac 5027b9b4fd27Smrg # FIXME: first we should search . and the directory the executable is in 5028b9b4fd27Smrg shlibpath_var=PATH 5029caade7ccSmrg ;; 5030caade7ccSmrg 5031b9b4fd27Smrgdarwin* | rhapsody*) 5032b9b4fd27Smrg dynamic_linker="$host_os dyld" 5033b9b4fd27Smrg version_type=darwin 5034b9b4fd27Smrg need_lib_prefix=no 5035b9b4fd27Smrg need_version=no 5036b9b4fd27Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 5037b9b4fd27Smrg soname_spec='${libname}${release}${major}$shared_ext' 5038b9b4fd27Smrg shlibpath_overrides_runpath=yes 5039b9b4fd27Smrg shlibpath_var=DYLD_LIBRARY_PATH 5040b9b4fd27Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 5041b9b4fd27Smrgm4_if([$1], [],[ 5042b9b4fd27Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 5043b9b4fd27Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 5044caade7ccSmrg ;; 5045caade7ccSmrg 5046b9b4fd27Smrgdgux*) 5047b9b4fd27Smrg version_type=linux 5048b9b4fd27Smrg need_lib_prefix=no 5049b9b4fd27Smrg need_version=no 5050b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 5051b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5052b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5053485f0483Smrg ;; 5054485f0483Smrg 5055b9b4fd27Smrgfreebsd1*) 5056b9b4fd27Smrg dynamic_linker=no 5057caade7ccSmrg ;; 5058caade7ccSmrg 5059b9b4fd27Smrgfreebsd* | dragonfly*) 5060b9b4fd27Smrg # DragonFly does not have aout. When/if they implement a new 5061b9b4fd27Smrg # versioning mechanism, adjust this. 5062b9b4fd27Smrg if test -x /usr/bin/objformat; then 5063b9b4fd27Smrg objformat=`/usr/bin/objformat` 5064b9b4fd27Smrg else 5065b9b4fd27Smrg case $host_os in 5066b9b4fd27Smrg freebsd[[123]]*) objformat=aout ;; 5067b9b4fd27Smrg *) objformat=elf ;; 5068b9b4fd27Smrg esac 5069b9b4fd27Smrg fi 5070b9b4fd27Smrg version_type=freebsd-$objformat 5071b9b4fd27Smrg case $version_type in 5072b9b4fd27Smrg freebsd-elf*) 5073b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 5074b9b4fd27Smrg need_version=no 5075b9b4fd27Smrg need_lib_prefix=no 5076b9b4fd27Smrg ;; 5077b9b4fd27Smrg freebsd-*) 5078b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 5079b9b4fd27Smrg need_version=yes 5080b9b4fd27Smrg ;; 5081b9b4fd27Smrg esac 5082b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5083b9b4fd27Smrg case $host_os in 5084b9b4fd27Smrg freebsd2*) 5085b9b4fd27Smrg shlibpath_overrides_runpath=yes 5086caade7ccSmrg ;; 5087b9b4fd27Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 5088b9b4fd27Smrg shlibpath_overrides_runpath=yes 5089b9b4fd27Smrg hardcode_into_libs=yes 5090caade7ccSmrg ;; 5091b9b4fd27Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 5092b9b4fd27Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 5093b9b4fd27Smrg shlibpath_overrides_runpath=no 5094b9b4fd27Smrg hardcode_into_libs=yes 5095caade7ccSmrg ;; 5096b9b4fd27Smrg *) # from 4.6 on, and DragonFly 5097b9b4fd27Smrg shlibpath_overrides_runpath=yes 5098b9b4fd27Smrg hardcode_into_libs=yes 5099caade7ccSmrg ;; 5100caade7ccSmrg esac 5101caade7ccSmrg ;; 5102caade7ccSmrg 5103b9b4fd27Smrggnu*) 5104b9b4fd27Smrg version_type=linux 5105b9b4fd27Smrg need_lib_prefix=no 5106b9b4fd27Smrg need_version=no 5107b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 5108b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5109b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5110b9b4fd27Smrg hardcode_into_libs=yes 5111caade7ccSmrg ;; 5112caade7ccSmrg 5113e8a5466aSmrghaiku*) 5114e8a5466aSmrg version_type=linux 5115e8a5466aSmrg need_lib_prefix=no 5116e8a5466aSmrg need_version=no 5117e8a5466aSmrg dynamic_linker="$host_os runtime_loader" 5118e8a5466aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 5119e8a5466aSmrg soname_spec='${libname}${release}${shared_ext}$major' 5120e8a5466aSmrg shlibpath_var=LIBRARY_PATH 5121e8a5466aSmrg shlibpath_overrides_runpath=yes 5122e8a5466aSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 5123e8a5466aSmrg hardcode_into_libs=yes 5124e8a5466aSmrg ;; 5125e8a5466aSmrg 5126b9b4fd27Smrghpux9* | hpux10* | hpux11*) 5127b9b4fd27Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 5128b9b4fd27Smrg # link against other versions. 5129b9b4fd27Smrg version_type=sunos 5130b9b4fd27Smrg need_lib_prefix=no 5131b9b4fd27Smrg need_version=no 5132b9b4fd27Smrg case $host_cpu in 5133b9b4fd27Smrg ia64*) 5134b9b4fd27Smrg shrext_cmds='.so' 5135b9b4fd27Smrg hardcode_into_libs=yes 5136b9b4fd27Smrg dynamic_linker="$host_os dld.so" 5137b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5138b9b4fd27Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 5139b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5140b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5141b9b4fd27Smrg if test "X$HPUX_IA64_MODE" = X32; then 5142b9b4fd27Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 5143b9b4fd27Smrg else 5144b9b4fd27Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 5145b9b4fd27Smrg fi 5146b9b4fd27Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 5147b9b4fd27Smrg ;; 5148b9b4fd27Smrg hppa*64*) 5149b9b4fd27Smrg shrext_cmds='.sl' 5150b9b4fd27Smrg hardcode_into_libs=yes 5151b9b4fd27Smrg dynamic_linker="$host_os dld.sl" 5152b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 5153b9b4fd27Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 5154b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5155b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5156b9b4fd27Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 5157b9b4fd27Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 5158b9b4fd27Smrg ;; 5159b9b4fd27Smrg *) 5160b9b4fd27Smrg shrext_cmds='.sl' 5161b9b4fd27Smrg dynamic_linker="$host_os dld.sl" 5162b9b4fd27Smrg shlibpath_var=SHLIB_PATH 5163b9b4fd27Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 5164b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5165b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5166b9b4fd27Smrg ;; 5167b9b4fd27Smrg esac 5168e8a5466aSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 5169b9b4fd27Smrg postinstall_cmds='chmod 555 $lib' 5170e8a5466aSmrg # or fails outright, so override atomically: 5171e8a5466aSmrg install_override_mode=555 5172caade7ccSmrg ;; 5173caade7ccSmrg 5174b9b4fd27Smrginterix[[3-9]]*) 5175b9b4fd27Smrg version_type=linux 5176b9b4fd27Smrg need_lib_prefix=no 5177b9b4fd27Smrg need_version=no 5178b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 5179b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5180b9b4fd27Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 5181b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5182b9b4fd27Smrg shlibpath_overrides_runpath=no 5183b9b4fd27Smrg hardcode_into_libs=yes 5184b9b4fd27Smrg ;; 5185caade7ccSmrg 5186b9b4fd27Smrgirix5* | irix6* | nonstopux*) 5187b9b4fd27Smrg case $host_os in 5188b9b4fd27Smrg nonstopux*) version_type=nonstopux ;; 5189b9b4fd27Smrg *) 5190b9b4fd27Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 5191b9b4fd27Smrg version_type=linux 5192b9b4fd27Smrg else 5193b9b4fd27Smrg version_type=irix 5194b9b4fd27Smrg fi ;; 5195caade7ccSmrg esac 5196b9b4fd27Smrg need_lib_prefix=no 5197b9b4fd27Smrg need_version=no 5198b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5199b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 5200b9b4fd27Smrg case $host_os in 5201b9b4fd27Smrg irix5* | nonstopux*) 5202b9b4fd27Smrg libsuff= shlibsuff= 5203b9b4fd27Smrg ;; 5204b9b4fd27Smrg *) 5205b9b4fd27Smrg case $LD in # libtool.m4 will add one of these switches to LD 5206b9b4fd27Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 5207b9b4fd27Smrg libsuff= shlibsuff= libmagic=32-bit;; 5208b9b4fd27Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 5209b9b4fd27Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 5210b9b4fd27Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 5211b9b4fd27Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 5212b9b4fd27Smrg *) libsuff= shlibsuff= libmagic=never-match;; 5213b9b4fd27Smrg esac 5214b9b4fd27Smrg ;; 5215b9b4fd27Smrg esac 5216b9b4fd27Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 5217b9b4fd27Smrg shlibpath_overrides_runpath=no 5218b9b4fd27Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 5219b9b4fd27Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 5220b9b4fd27Smrg hardcode_into_libs=yes 5221b9b4fd27Smrg ;; 5222caade7ccSmrg 5223b9b4fd27Smrg# No shared lib support for Linux oldld, aout, or coff. 5224b9b4fd27Smrglinux*oldld* | linux*aout* | linux*coff*) 5225b9b4fd27Smrg dynamic_linker=no 5226b9b4fd27Smrg ;; 5227caade7ccSmrg 5228b9b4fd27Smrg# This must be Linux ELF. 5229e8a5466aSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 5230b9b4fd27Smrg version_type=linux 5231b9b4fd27Smrg need_lib_prefix=no 5232b9b4fd27Smrg need_version=no 5233b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5234b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5235b9b4fd27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 5236b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5237b9b4fd27Smrg shlibpath_overrides_runpath=no 5238e8a5466aSmrg 5239b9b4fd27Smrg # Some binutils ld are patched to set DT_RUNPATH 5240e8a5466aSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 5241e8a5466aSmrg [lt_cv_shlibpath_overrides_runpath=no 5242e8a5466aSmrg save_LDFLAGS=$LDFLAGS 5243e8a5466aSmrg save_libdir=$libdir 5244e8a5466aSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 5245e8a5466aSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 5246e8a5466aSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 5247e8a5466aSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 5248e8a5466aSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 5249e8a5466aSmrg LDFLAGS=$save_LDFLAGS 5250e8a5466aSmrg libdir=$save_libdir 5251e8a5466aSmrg ]) 5252e8a5466aSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 5253caade7ccSmrg 5254b9b4fd27Smrg # This implies no fast_install, which is unacceptable. 5255b9b4fd27Smrg # Some rework will be needed to allow for fast_install 5256b9b4fd27Smrg # before this can be enabled. 5257b9b4fd27Smrg hardcode_into_libs=yes 5258caade7ccSmrg 5259b9b4fd27Smrg # Append ld.so.conf contents to the search path 5260b9b4fd27Smrg if test -f /etc/ld.so.conf; then 5261e8a5466aSmrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 5262b9b4fd27Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 5263b9b4fd27Smrg fi 5264caade7ccSmrg 5265b9b4fd27Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 5266b9b4fd27Smrg # powerpc, because MkLinux only supported shared libraries with the 5267b9b4fd27Smrg # GNU dynamic linker. Since this was broken with cross compilers, 5268b9b4fd27Smrg # most powerpc-linux boxes support dynamic linking these days and 5269b9b4fd27Smrg # people can always --disable-shared, the test was removed, and we 5270b9b4fd27Smrg # assume the GNU/Linux dynamic linker is in use. 5271b9b4fd27Smrg dynamic_linker='GNU/Linux ld.so' 5272b9b4fd27Smrg ;; 5273caade7ccSmrg 5274b9b4fd27Smrgnetbsd*) 5275b9b4fd27Smrg version_type=sunos 5276b9b4fd27Smrg need_lib_prefix=no 5277b9b4fd27Smrg need_version=no 5278b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5279b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5280b9b4fd27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 5281b9b4fd27Smrg dynamic_linker='NetBSD (a.out) ld.so' 5282b9b4fd27Smrg else 5283b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 5284b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5285b9b4fd27Smrg dynamic_linker='NetBSD ld.elf_so' 5286b9b4fd27Smrg fi 5287b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5288b9b4fd27Smrg shlibpath_overrides_runpath=yes 5289b9b4fd27Smrg hardcode_into_libs=yes 5290b9b4fd27Smrg ;; 5291caade7ccSmrg 5292b9b4fd27Smrgnewsos6) 5293b9b4fd27Smrg version_type=linux 5294b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5295b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5296b9b4fd27Smrg shlibpath_overrides_runpath=yes 5297b9b4fd27Smrg ;; 5298caade7ccSmrg 5299b9b4fd27Smrg*nto* | *qnx*) 5300b9b4fd27Smrg version_type=qnx 5301b9b4fd27Smrg need_lib_prefix=no 5302b9b4fd27Smrg need_version=no 5303b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5304b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5305b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5306b9b4fd27Smrg shlibpath_overrides_runpath=no 5307b9b4fd27Smrg hardcode_into_libs=yes 5308b9b4fd27Smrg dynamic_linker='ldqnx.so' 5309b9b4fd27Smrg ;; 5310caade7ccSmrg 5311b9b4fd27Smrgopenbsd*) 5312b9b4fd27Smrg version_type=sunos 5313b9b4fd27Smrg sys_lib_dlsearch_path_spec="/usr/lib" 5314b9b4fd27Smrg need_lib_prefix=no 5315b9b4fd27Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 5316b9b4fd27Smrg case $host_os in 5317b9b4fd27Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 5318b9b4fd27Smrg *) need_version=no ;; 5319b9b4fd27Smrg esac 5320b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5321b9b4fd27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 5322b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5323b9b4fd27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5324b9b4fd27Smrg case $host_os in 5325b9b4fd27Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 5326b9b4fd27Smrg shlibpath_overrides_runpath=no 5327b9b4fd27Smrg ;; 5328b9b4fd27Smrg *) 5329b9b4fd27Smrg shlibpath_overrides_runpath=yes 5330b9b4fd27Smrg ;; 5331b9b4fd27Smrg esac 5332b9b4fd27Smrg else 5333b9b4fd27Smrg shlibpath_overrides_runpath=yes 5334b9b4fd27Smrg fi 5335b9b4fd27Smrg ;; 5336caade7ccSmrg 5337b9b4fd27Smrgos2*) 5338b9b4fd27Smrg libname_spec='$name' 5339b9b4fd27Smrg shrext_cmds=".dll" 5340b9b4fd27Smrg need_lib_prefix=no 5341b9b4fd27Smrg library_names_spec='$libname${shared_ext} $libname.a' 5342b9b4fd27Smrg dynamic_linker='OS/2 ld.exe' 5343b9b4fd27Smrg shlibpath_var=LIBPATH 5344b9b4fd27Smrg ;; 5345caade7ccSmrg 5346b9b4fd27Smrgosf3* | osf4* | osf5*) 5347b9b4fd27Smrg version_type=osf 5348b9b4fd27Smrg need_lib_prefix=no 5349b9b4fd27Smrg need_version=no 5350b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5351b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5352b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5353b9b4fd27Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 5354b9b4fd27Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 5355b9b4fd27Smrg ;; 5356caade7ccSmrg 5357b9b4fd27Smrgrdos*) 5358b9b4fd27Smrg dynamic_linker=no 5359b9b4fd27Smrg ;; 5360caade7ccSmrg 5361b9b4fd27Smrgsolaris*) 5362b9b4fd27Smrg version_type=linux 5363b9b4fd27Smrg need_lib_prefix=no 5364b9b4fd27Smrg need_version=no 5365b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5366b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5367b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5368b9b4fd27Smrg shlibpath_overrides_runpath=yes 5369b9b4fd27Smrg hardcode_into_libs=yes 5370b9b4fd27Smrg # ldd complains unless libraries are executable 5371b9b4fd27Smrg postinstall_cmds='chmod +x $lib' 5372b9b4fd27Smrg ;; 5373caade7ccSmrg 5374b9b4fd27Smrgsunos4*) 5375b9b4fd27Smrg version_type=sunos 5376b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5377b9b4fd27Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 5378b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5379b9b4fd27Smrg shlibpath_overrides_runpath=yes 5380b9b4fd27Smrg if test "$with_gnu_ld" = yes; then 5381b9b4fd27Smrg need_lib_prefix=no 5382b9b4fd27Smrg fi 5383b9b4fd27Smrg need_version=yes 5384b9b4fd27Smrg ;; 5385caade7ccSmrg 5386b9b4fd27Smrgsysv4 | sysv4.3*) 5387b9b4fd27Smrg version_type=linux 5388b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5389b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5390b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5391b9b4fd27Smrg case $host_vendor in 5392b9b4fd27Smrg sni) 5393b9b4fd27Smrg shlibpath_overrides_runpath=no 5394b9b4fd27Smrg need_lib_prefix=no 5395b9b4fd27Smrg runpath_var=LD_RUN_PATH 5396b9b4fd27Smrg ;; 5397b9b4fd27Smrg siemens) 5398b9b4fd27Smrg need_lib_prefix=no 5399b9b4fd27Smrg ;; 5400b9b4fd27Smrg motorola) 5401b9b4fd27Smrg need_lib_prefix=no 5402b9b4fd27Smrg need_version=no 5403b9b4fd27Smrg shlibpath_overrides_runpath=no 5404b9b4fd27Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 5405b9b4fd27Smrg ;; 5406b9b4fd27Smrg esac 5407b9b4fd27Smrg ;; 5408caade7ccSmrg 5409b9b4fd27Smrgsysv4*MP*) 5410b9b4fd27Smrg if test -d /usr/nec ;then 5411b9b4fd27Smrg version_type=linux 5412b9b4fd27Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 5413b9b4fd27Smrg soname_spec='$libname${shared_ext}.$major' 5414b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5415caade7ccSmrg fi 5416caade7ccSmrg ;; 5417caade7ccSmrg 5418b9b4fd27Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5419b9b4fd27Smrg version_type=freebsd-elf 5420b9b4fd27Smrg need_lib_prefix=no 5421b9b4fd27Smrg need_version=no 5422b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 5423b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5424b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5425b9b4fd27Smrg shlibpath_overrides_runpath=yes 5426b9b4fd27Smrg hardcode_into_libs=yes 5427b9b4fd27Smrg if test "$with_gnu_ld" = yes; then 5428b9b4fd27Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 5429b9b4fd27Smrg else 5430b9b4fd27Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 5431b9b4fd27Smrg case $host_os in 5432b9b4fd27Smrg sco3.2v5*) 5433b9b4fd27Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 5434b9b4fd27Smrg ;; 5435b9b4fd27Smrg esac 5436caade7ccSmrg fi 5437b9b4fd27Smrg sys_lib_dlsearch_path_spec='/usr/lib' 5438b9b4fd27Smrg ;; 5439caade7ccSmrg 5440b9b4fd27Smrgtpf*) 5441b9b4fd27Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 5442b9b4fd27Smrg version_type=linux 5443b9b4fd27Smrg need_lib_prefix=no 5444b9b4fd27Smrg need_version=no 5445b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5446b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5447b9b4fd27Smrg shlibpath_overrides_runpath=no 5448b9b4fd27Smrg hardcode_into_libs=yes 5449b9b4fd27Smrg ;; 5450caade7ccSmrg 5451b9b4fd27Smrguts4*) 5452b9b4fd27Smrg version_type=linux 5453b9b4fd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5454b9b4fd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 5455b9b4fd27Smrg shlibpath_var=LD_LIBRARY_PATH 5456b9b4fd27Smrg ;; 5457b9b4fd27Smrg 5458b9b4fd27Smrg*) 5459b9b4fd27Smrg dynamic_linker=no 5460b9b4fd27Smrg ;; 5461b9b4fd27Smrgesac 5462b9b4fd27SmrgAC_MSG_RESULT([$dynamic_linker]) 5463b9b4fd27Smrgtest "$dynamic_linker" = no && can_build_shared=no 5464b9b4fd27Smrg 5465b9b4fd27Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 5466b9b4fd27Smrgif test "$GCC" = yes; then 5467b9b4fd27Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 5468b9b4fd27Smrgfi 5469caade7ccSmrg 5470b9b4fd27Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 5471b9b4fd27Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 5472b9b4fd27Smrgfi 5473b9b4fd27Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 5474b9b4fd27Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 5475b9b4fd27Smrgfi 5476caade7ccSmrg 5477b9b4fd27Smrg_LT_DECL([], [variables_saved_for_relink], [1], 5478b9b4fd27Smrg [Variables whose values should be saved in libtool wrapper scripts and 5479b9b4fd27Smrg restored at link time]) 5480b9b4fd27Smrg_LT_DECL([], [need_lib_prefix], [0], 5481b9b4fd27Smrg [Do we need the "lib" prefix for modules?]) 5482b9b4fd27Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 5483b9b4fd27Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 5484b9b4fd27Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 5485b9b4fd27Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 5486b9b4fd27Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 5487b9b4fd27Smrg [Is shlibpath searched before the hard-coded library search path?]) 5488b9b4fd27Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 5489b9b4fd27Smrg_LT_DECL([], [library_names_spec], [1], 5490b9b4fd27Smrg [[List of archive names. First name is the real one, the rest are links. 5491b9b4fd27Smrg The last name is the one that the linker finds with -lNAME]]) 5492b9b4fd27Smrg_LT_DECL([], [soname_spec], [1], 5493b9b4fd27Smrg [[The coded name of the library, if different from the real name]]) 5494e8a5466aSmrg_LT_DECL([], [install_override_mode], [1], 5495e8a5466aSmrg [Permission mode override for installation of shared libraries]) 5496b9b4fd27Smrg_LT_DECL([], [postinstall_cmds], [2], 5497b9b4fd27Smrg [Command to use after installation of a shared archive]) 5498b9b4fd27Smrg_LT_DECL([], [postuninstall_cmds], [2], 5499b9b4fd27Smrg [Command to use after uninstallation of a shared archive]) 5500b9b4fd27Smrg_LT_DECL([], [finish_cmds], [2], 5501b9b4fd27Smrg [Commands used to finish a libtool library installation in a directory]) 5502b9b4fd27Smrg_LT_DECL([], [finish_eval], [1], 5503b9b4fd27Smrg [[As "finish_cmds", except a single script fragment to be evaled but 5504b9b4fd27Smrg not shown]]) 5505b9b4fd27Smrg_LT_DECL([], [hardcode_into_libs], [0], 5506b9b4fd27Smrg [Whether we should hardcode library paths into libraries]) 5507b9b4fd27Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 5508b9b4fd27Smrg [Compile-time system search path for libraries]) 5509b9b4fd27Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 5510b9b4fd27Smrg [Run-time system search path for libraries]) 5511b9b4fd27Smrg])# _LT_SYS_DYNAMIC_LINKER 5512b9b4fd27Smrg 5513b9b4fd27Smrg 5514b9b4fd27Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 5515caade7ccSmrg# -------------------------- 5516b9b4fd27Smrg# find a file program which can recognize shared library 5517b9b4fd27SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 5518b9b4fd27Smrg[m4_require([_LT_DECL_EGREP])dnl 5519b9b4fd27SmrgAC_MSG_CHECKING([for $1]) 5520b9b4fd27SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 5521b9b4fd27Smrg[case $MAGIC_CMD in 5522b9b4fd27Smrg[[\\/*] | ?:[\\/]*]) 5523b9b4fd27Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 5524b9b4fd27Smrg ;; 5525b9b4fd27Smrg*) 5526b9b4fd27Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 5527b9b4fd27Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5528b9b4fd27Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 5529b9b4fd27Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 5530b9b4fd27Smrgdnl not every word. This closes a longstanding sh security hole. 5531b9b4fd27Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 5532b9b4fd27Smrg for ac_dir in $ac_dummy; do 5533b9b4fd27Smrg IFS="$lt_save_ifs" 5534b9b4fd27Smrg test -z "$ac_dir" && ac_dir=. 5535b9b4fd27Smrg if test -f $ac_dir/$1; then 5536b9b4fd27Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 5537b9b4fd27Smrg if test -n "$file_magic_test_file"; then 5538b9b4fd27Smrg case $deplibs_check_method in 5539b9b4fd27Smrg "file_magic "*) 5540b9b4fd27Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 5541b9b4fd27Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5542b9b4fd27Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 5543b9b4fd27Smrg $EGREP "$file_magic_regex" > /dev/null; then 5544b9b4fd27Smrg : 5545b9b4fd27Smrg else 5546b9b4fd27Smrg cat <<_LT_EOF 1>&2 5547caade7ccSmrg 5548b9b4fd27Smrg*** Warning: the command libtool uses to detect shared libraries, 5549b9b4fd27Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 5550b9b4fd27Smrg*** The result is that libtool may fail to recognize shared libraries 5551b9b4fd27Smrg*** as such. This will affect the creation of libtool libraries that 5552b9b4fd27Smrg*** depend on shared libraries, but programs linked with such libtool 5553b9b4fd27Smrg*** libraries will work regardless of this problem. Nevertheless, you 5554b9b4fd27Smrg*** may want to report the problem to your system manager and/or to 5555b9b4fd27Smrg*** bug-libtool@gnu.org 5556caade7ccSmrg 5557b9b4fd27Smrg_LT_EOF 5558b9b4fd27Smrg fi ;; 5559b9b4fd27Smrg esac 5560b9b4fd27Smrg fi 5561b9b4fd27Smrg break 5562b9b4fd27Smrg fi 5563b9b4fd27Smrg done 5564b9b4fd27Smrg IFS="$lt_save_ifs" 5565b9b4fd27Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 5566b9b4fd27Smrg ;; 5567b9b4fd27Smrgesac]) 5568b9b4fd27SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5569b9b4fd27Smrgif test -n "$MAGIC_CMD"; then 5570b9b4fd27Smrg AC_MSG_RESULT($MAGIC_CMD) 5571b9b4fd27Smrgelse 5572b9b4fd27Smrg AC_MSG_RESULT(no) 5573b9b4fd27Smrgfi 5574b9b4fd27Smrg_LT_DECL([], [MAGIC_CMD], [0], 5575b9b4fd27Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 5576b9b4fd27Smrg])# _LT_PATH_TOOL_PREFIX 5577caade7ccSmrg 5578b9b4fd27Smrg# Old name: 5579b9b4fd27SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 5580b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 5581b9b4fd27Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 5582caade7ccSmrg 5583caade7ccSmrg 5584b9b4fd27Smrg# _LT_PATH_MAGIC 5585b9b4fd27Smrg# -------------- 5586b9b4fd27Smrg# find a file program which can recognize a shared library 5587b9b4fd27Smrgm4_defun([_LT_PATH_MAGIC], 5588b9b4fd27Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 5589b9b4fd27Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 5590b9b4fd27Smrg if test -n "$ac_tool_prefix"; then 5591b9b4fd27Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 5592b9b4fd27Smrg else 5593b9b4fd27Smrg MAGIC_CMD=: 5594b9b4fd27Smrg fi 5595b9b4fd27Smrgfi 5596b9b4fd27Smrg])# _LT_PATH_MAGIC 5597caade7ccSmrg 5598caade7ccSmrg 5599b9b4fd27Smrg# LT_PATH_LD 5600b9b4fd27Smrg# ---------- 5601b9b4fd27Smrg# find the pathname to the GNU or non-GNU linker 5602b9b4fd27SmrgAC_DEFUN([LT_PATH_LD], 5603b9b4fd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 5604b9b4fd27SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 5605b9b4fd27SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 5606b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 5607b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 5608e8a5466aSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 5609caade7ccSmrg 5610b9b4fd27SmrgAC_ARG_WITH([gnu-ld], 5611b9b4fd27Smrg [AS_HELP_STRING([--with-gnu-ld], 5612b9b4fd27Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 5613b9b4fd27Smrg [test "$withval" = no || with_gnu_ld=yes], 5614b9b4fd27Smrg [with_gnu_ld=no])dnl 5615b9b4fd27Smrg 5616b9b4fd27Smrgac_prog=ld 5617b9b4fd27Smrgif test "$GCC" = yes; then 5618b9b4fd27Smrg # Check if gcc -print-prog-name=ld gives a path. 5619b9b4fd27Smrg AC_MSG_CHECKING([for ld used by $CC]) 5620b9b4fd27Smrg case $host in 5621b9b4fd27Smrg *-*-mingw*) 5622b9b4fd27Smrg # gcc leaves a trailing carriage return which upsets mingw 5623b9b4fd27Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 5624b9b4fd27Smrg *) 5625b9b4fd27Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 5626b9b4fd27Smrg esac 5627b9b4fd27Smrg case $ac_prog in 5628b9b4fd27Smrg # Accept absolute paths. 5629b9b4fd27Smrg [[\\/]]* | ?:[[\\/]]*) 5630b9b4fd27Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 5631b9b4fd27Smrg # Canonicalize the pathname of ld 5632b9b4fd27Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5633b9b4fd27Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5634b9b4fd27Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 5635b9b4fd27Smrg done 5636b9b4fd27Smrg test -z "$LD" && LD="$ac_prog" 5637b9b4fd27Smrg ;; 5638b9b4fd27Smrg "") 5639b9b4fd27Smrg # If it fails, then pretend we aren't using GCC. 5640b9b4fd27Smrg ac_prog=ld 5641b9b4fd27Smrg ;; 5642b9b4fd27Smrg *) 5643b9b4fd27Smrg # If it is relative, then search for the first ld in PATH. 5644b9b4fd27Smrg with_gnu_ld=unknown 5645b9b4fd27Smrg ;; 5646b9b4fd27Smrg esac 5647b9b4fd27Smrgelif test "$with_gnu_ld" = yes; then 5648b9b4fd27Smrg AC_MSG_CHECKING([for GNU ld]) 5649caade7ccSmrgelse 5650b9b4fd27Smrg AC_MSG_CHECKING([for non-GNU ld]) 5651caade7ccSmrgfi 5652b9b4fd27SmrgAC_CACHE_VAL(lt_cv_path_LD, 5653b9b4fd27Smrg[if test -z "$LD"; then 5654b9b4fd27Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5655b9b4fd27Smrg for ac_dir in $PATH; do 5656b9b4fd27Smrg IFS="$lt_save_ifs" 5657b9b4fd27Smrg test -z "$ac_dir" && ac_dir=. 5658b9b4fd27Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 5659b9b4fd27Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 5660b9b4fd27Smrg # Check to see if the program is GNU ld. I'd rather use --version, 5661b9b4fd27Smrg # but apparently some variants of GNU ld only accept -v. 5662b9b4fd27Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 5663b9b4fd27Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 5664b9b4fd27Smrg *GNU* | *'with BFD'*) 5665b9b4fd27Smrg test "$with_gnu_ld" != no && break 5666b9b4fd27Smrg ;; 5667b9b4fd27Smrg *) 5668b9b4fd27Smrg test "$with_gnu_ld" != yes && break 5669b9b4fd27Smrg ;; 5670b9b4fd27Smrg esac 5671b9b4fd27Smrg fi 5672b9b4fd27Smrg done 5673b9b4fd27Smrg IFS="$lt_save_ifs" 5674caade7ccSmrgelse 5675b9b4fd27Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 5676b9b4fd27Smrgfi]) 5677b9b4fd27SmrgLD="$lt_cv_path_LD" 5678b9b4fd27Smrgif test -n "$LD"; then 5679b9b4fd27Smrg AC_MSG_RESULT($LD) 5680caade7ccSmrgelse 5681b9b4fd27Smrg AC_MSG_RESULT(no) 5682caade7ccSmrgfi 5683b9b4fd27Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 5684b9b4fd27Smrg_LT_PATH_LD_GNU 5685b9b4fd27SmrgAC_SUBST([LD]) 5686caade7ccSmrg 5687b9b4fd27Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 5688b9b4fd27Smrg])# LT_PATH_LD 5689caade7ccSmrg 5690b9b4fd27Smrg# Old names: 5691b9b4fd27SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 5692b9b4fd27SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 5693b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 5694b9b4fd27Smrgdnl AC_DEFUN([AM_PROG_LD], []) 5695b9b4fd27Smrgdnl AC_DEFUN([AC_PROG_LD], []) 5696caade7ccSmrg 5697caade7ccSmrg 5698b9b4fd27Smrg# _LT_PATH_LD_GNU 5699b9b4fd27Smrg#- -------------- 5700b9b4fd27Smrgm4_defun([_LT_PATH_LD_GNU], 5701b9b4fd27Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 5702b9b4fd27Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 5703b9b4fd27Smrgcase `$LD -v 2>&1 </dev/null` in 5704b9b4fd27Smrg*GNU* | *'with BFD'*) 5705b9b4fd27Smrg lt_cv_prog_gnu_ld=yes 5706b9b4fd27Smrg ;; 5707b9b4fd27Smrg*) 5708b9b4fd27Smrg lt_cv_prog_gnu_ld=no 5709b9b4fd27Smrg ;; 5710b9b4fd27Smrgesac]) 5711b9b4fd27Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 5712b9b4fd27Smrg])# _LT_PATH_LD_GNU 5713caade7ccSmrg 5714caade7ccSmrg 5715b9b4fd27Smrg# _LT_CMD_RELOAD 5716b9b4fd27Smrg# -------------- 5717b9b4fd27Smrg# find reload flag for linker 5718b9b4fd27Smrg# -- PORTME Some linkers may need a different reload flag. 5719b9b4fd27Smrgm4_defun([_LT_CMD_RELOAD], 5720b9b4fd27Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 5721b9b4fd27Smrg lt_cv_ld_reload_flag, 5722b9b4fd27Smrg [lt_cv_ld_reload_flag='-r']) 5723b9b4fd27Smrgreload_flag=$lt_cv_ld_reload_flag 5724b9b4fd27Smrgcase $reload_flag in 5725b9b4fd27Smrg"" | " "*) ;; 5726b9b4fd27Smrg*) reload_flag=" $reload_flag" ;; 5727b9b4fd27Smrgesac 5728b9b4fd27Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 5729b9b4fd27Smrgcase $host_os in 5730a5602400Smrg cygwin* | mingw* | pw32* | cegcc*) 5731a5602400Smrg if test "$GCC" != yes; then 5732a5602400Smrg reload_cmds=false 5733a5602400Smrg fi 5734a5602400Smrg ;; 5735b9b4fd27Smrg darwin*) 5736b9b4fd27Smrg if test "$GCC" = yes; then 5737b9b4fd27Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 5738caade7ccSmrg else 5739b9b4fd27Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 5740caade7ccSmrg fi 5741b9b4fd27Smrg ;; 5742b9b4fd27Smrgesac 5743e8a5466aSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 5744e8a5466aSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 5745b9b4fd27Smrg])# _LT_CMD_RELOAD 5746caade7ccSmrg 5747caade7ccSmrg 5748b9b4fd27Smrg# _LT_CHECK_MAGIC_METHOD 5749b9b4fd27Smrg# ---------------------- 5750b9b4fd27Smrg# how to check for library dependencies 5751b9b4fd27Smrg# -- PORTME fill in with the dynamic library characteristics 5752b9b4fd27Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 5753b9b4fd27Smrg[m4_require([_LT_DECL_EGREP]) 5754b9b4fd27Smrgm4_require([_LT_DECL_OBJDUMP]) 5755b9b4fd27SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 5756b9b4fd27Smrglt_cv_deplibs_check_method, 5757b9b4fd27Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 5758b9b4fd27Smrglt_cv_file_magic_test_file= 5759b9b4fd27Smrglt_cv_deplibs_check_method='unknown' 5760b9b4fd27Smrg# Need to set the preceding variable on all platforms that support 5761b9b4fd27Smrg# interlibrary dependencies. 5762b9b4fd27Smrg# 'none' -- dependencies not supported. 5763b9b4fd27Smrg# `unknown' -- same as none, but documents that we really don't know. 5764b9b4fd27Smrg# 'pass_all' -- all dependencies passed with no checks. 5765b9b4fd27Smrg# 'test_compile' -- check by making test program. 5766b9b4fd27Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 5767b9b4fd27Smrg# which responds to the $file_magic_cmd with a given extended regex. 5768b9b4fd27Smrg# If you have `file' or equivalent on your system and you're not sure 5769b9b4fd27Smrg# whether `pass_all' will *always* work, you probably want this one. 5770caade7ccSmrg 5771caade7ccSmrgcase $host_os in 5772b9b4fd27Smrgaix[[4-9]]*) 5773b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5774b9b4fd27Smrg ;; 5775caade7ccSmrg 5776b9b4fd27Smrgbeos*) 5777b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5778b9b4fd27Smrg ;; 5779caade7ccSmrg 5780b9b4fd27Smrgbsdi[[45]]*) 5781b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 5782b9b4fd27Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 5783b9b4fd27Smrg lt_cv_file_magic_test_file=/shlib/libc.so 5784b9b4fd27Smrg ;; 5785caade7ccSmrg 5786b9b4fd27Smrgcygwin*) 5787b9b4fd27Smrg # func_win32_libid is a shell function defined in ltmain.sh 5788b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5789b9b4fd27Smrg lt_cv_file_magic_cmd='func_win32_libid' 5790b9b4fd27Smrg ;; 5791caade7ccSmrg 5792b9b4fd27Smrgmingw* | pw32*) 5793b9b4fd27Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 5794b9b4fd27Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 5795b9b4fd27Smrg # unless we find 'file', for example because we are cross-compiling. 5796e8a5466aSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 5797e8a5466aSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 5798b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5799b9b4fd27Smrg lt_cv_file_magic_cmd='func_win32_libid' 5800b9b4fd27Smrg else 5801e8a5466aSmrg # Keep this pattern in sync with the one in func_win32_libid. 5802e8a5466aSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 5803b9b4fd27Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5804b9b4fd27Smrg fi 5805b9b4fd27Smrg ;; 5806caade7ccSmrg 5807e8a5466aSmrgcegcc*) 5808b9b4fd27Smrg # use the weaker test based on 'objdump'. See mingw*. 5809b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 5810b9b4fd27Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5811caade7ccSmrg ;; 5812caade7ccSmrg 5813b9b4fd27Smrgdarwin* | rhapsody*) 5814b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5815b9b4fd27Smrg ;; 5816caade7ccSmrg 5817b9b4fd27Smrgfreebsd* | dragonfly*) 5818b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5819caade7ccSmrg case $host_cpu in 5820b9b4fd27Smrg i*86 ) 5821b9b4fd27Smrg # Not sure whether the presence of OpenBSD here was a mistake. 5822b9b4fd27Smrg # Let's accept both of them until this is cleared up. 5823b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 5824b9b4fd27Smrg lt_cv_file_magic_cmd=/usr/bin/file 5825b9b4fd27Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 5826caade7ccSmrg ;; 5827caade7ccSmrg esac 5828b9b4fd27Smrg else 5829b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5830b9b4fd27Smrg fi 5831b9b4fd27Smrg ;; 5832caade7ccSmrg 5833b9b4fd27Smrggnu*) 5834b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5835b9b4fd27Smrg ;; 5836caade7ccSmrg 5837e8a5466aSmrghaiku*) 5838e8a5466aSmrg lt_cv_deplibs_check_method=pass_all 5839e8a5466aSmrg ;; 5840e8a5466aSmrg 5841b9b4fd27Smrghpux10.20* | hpux11*) 5842b9b4fd27Smrg lt_cv_file_magic_cmd=/usr/bin/file 5843b9b4fd27Smrg case $host_cpu in 5844b9b4fd27Smrg ia64*) 5845b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 5846b9b4fd27Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 5847caade7ccSmrg ;; 5848b9b4fd27Smrg hppa*64*) 5849e8a5466aSmrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 5850b9b4fd27Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 5851caade7ccSmrg ;; 5852b9b4fd27Smrg *) 5853e8a5466aSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 5854b9b4fd27Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 5855caade7ccSmrg ;; 5856b9b4fd27Smrg esac 5857b9b4fd27Smrg ;; 5858caade7ccSmrg 5859b9b4fd27Smrginterix[[3-9]]*) 5860b9b4fd27Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 5861b9b4fd27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 5862b9b4fd27Smrg ;; 5863caade7ccSmrg 5864b9b4fd27Smrgirix5* | irix6* | nonstopux*) 5865b9b4fd27Smrg case $LD in 5866b9b4fd27Smrg *-32|*"-32 ") libmagic=32-bit;; 5867b9b4fd27Smrg *-n32|*"-n32 ") libmagic=N32;; 5868b9b4fd27Smrg *-64|*"-64 ") libmagic=64-bit;; 5869b9b4fd27Smrg *) libmagic=never-match;; 5870b9b4fd27Smrg esac 5871b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5872b9b4fd27Smrg ;; 5873caade7ccSmrg 5874b9b4fd27Smrg# This must be Linux ELF. 5875e8a5466aSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 5876b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5877b9b4fd27Smrg ;; 5878caade7ccSmrg 5879b9b4fd27Smrgnetbsd*) 5880b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5881b9b4fd27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5882b9b4fd27Smrg else 5883b9b4fd27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 5884b9b4fd27Smrg fi 5885b9b4fd27Smrg ;; 5886caade7ccSmrg 5887b9b4fd27Smrgnewos6*) 5888b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 5889b9b4fd27Smrg lt_cv_file_magic_cmd=/usr/bin/file 5890b9b4fd27Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 5891b9b4fd27Smrg ;; 5892caade7ccSmrg 5893b9b4fd27Smrg*nto* | *qnx*) 5894b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5895b9b4fd27Smrg ;; 5896caade7ccSmrg 5897b9b4fd27Smrgopenbsd*) 5898b9b4fd27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5899b9b4fd27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 5900b9b4fd27Smrg else 5901b9b4fd27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5902b9b4fd27Smrg fi 5903b9b4fd27Smrg ;; 5904caade7ccSmrg 5905b9b4fd27Smrgosf3* | osf4* | osf5*) 5906b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5907b9b4fd27Smrg ;; 5908caade7ccSmrg 5909b9b4fd27Smrgrdos*) 5910b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5911b9b4fd27Smrg ;; 5912caade7ccSmrg 5913b9b4fd27Smrgsolaris*) 5914b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5915b9b4fd27Smrg ;; 5916caade7ccSmrg 5917b9b4fd27Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5918b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5919b9b4fd27Smrg ;; 5920caade7ccSmrg 5921b9b4fd27Smrgsysv4 | sysv4.3*) 5922b9b4fd27Smrg case $host_vendor in 5923b9b4fd27Smrg motorola) 5924b9b4fd27Smrg 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]]' 5925b9b4fd27Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 5926caade7ccSmrg ;; 5927b9b4fd27Smrg ncr) 5928b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5929caade7ccSmrg ;; 5930b9b4fd27Smrg sequent) 5931b9b4fd27Smrg lt_cv_file_magic_cmd='/bin/file' 5932b9b4fd27Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 5933caade7ccSmrg ;; 5934b9b4fd27Smrg sni) 5935b9b4fd27Smrg lt_cv_file_magic_cmd='/bin/file' 5936b9b4fd27Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 5937b9b4fd27Smrg lt_cv_file_magic_test_file=/lib/libc.so 5938caade7ccSmrg ;; 5939b9b4fd27Smrg siemens) 5940b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5941caade7ccSmrg ;; 5942b9b4fd27Smrg pc) 5943b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5944caade7ccSmrg ;; 5945b9b4fd27Smrg esac 5946b9b4fd27Smrg ;; 5947b9b4fd27Smrg 5948b9b4fd27Smrgtpf*) 5949b9b4fd27Smrg lt_cv_deplibs_check_method=pass_all 5950b9b4fd27Smrg ;; 5951caade7ccSmrgesac 5952b9b4fd27Smrg]) 5953a5602400Smrg 5954a5602400Smrgfile_magic_glob= 5955a5602400Smrgwant_nocaseglob=no 5956a5602400Smrgif test "$build" = "$host"; then 5957a5602400Smrg case $host_os in 5958a5602400Smrg mingw* | pw32*) 5959a5602400Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 5960a5602400Smrg want_nocaseglob=yes 5961a5602400Smrg else 5962a5602400Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 5963a5602400Smrg fi 5964a5602400Smrg ;; 5965a5602400Smrg esac 5966a5602400Smrgfi 5967a5602400Smrg 5968b9b4fd27Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 5969b9b4fd27Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 5970b9b4fd27Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 5971caade7ccSmrg 5972b9b4fd27Smrg_LT_DECL([], [deplibs_check_method], [1], 5973b9b4fd27Smrg [Method to check whether dependent libraries are shared objects]) 5974b9b4fd27Smrg_LT_DECL([], [file_magic_cmd], [1], 5975a5602400Smrg [Command to use when deplibs_check_method = "file_magic"]) 5976a5602400Smrg_LT_DECL([], [file_magic_glob], [1], 5977a5602400Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 5978a5602400Smrg_LT_DECL([], [want_nocaseglob], [1], 5979a5602400Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 5980b9b4fd27Smrg])# _LT_CHECK_MAGIC_METHOD 5981caade7ccSmrg 5982caade7ccSmrg 5983b9b4fd27Smrg# LT_PATH_NM 5984b9b4fd27Smrg# ---------- 5985b9b4fd27Smrg# find the pathname to a BSD- or MS-compatible name lister 5986b9b4fd27SmrgAC_DEFUN([LT_PATH_NM], 5987b9b4fd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 5988b9b4fd27SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 5989b9b4fd27Smrg[if test -n "$NM"; then 5990b9b4fd27Smrg # Let the user override the test. 5991b9b4fd27Smrg lt_cv_path_NM="$NM" 5992b9b4fd27Smrgelse 5993b9b4fd27Smrg lt_nm_to_check="${ac_tool_prefix}nm" 5994b9b4fd27Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 5995b9b4fd27Smrg lt_nm_to_check="$lt_nm_to_check nm" 5996b9b4fd27Smrg fi 5997b9b4fd27Smrg for lt_tmp_nm in $lt_nm_to_check; do 5998b9b4fd27Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5999b9b4fd27Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 6000b9b4fd27Smrg IFS="$lt_save_ifs" 6001b9b4fd27Smrg test -z "$ac_dir" && ac_dir=. 6002b9b4fd27Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 6003b9b4fd27Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 6004b9b4fd27Smrg # Check to see if the nm accepts a BSD-compat flag. 6005b9b4fd27Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 6006b9b4fd27Smrg # nm: unknown option "B" ignored 6007b9b4fd27Smrg # Tru64's nm complains that /dev/null is an invalid object file 6008b9b4fd27Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 6009b9b4fd27Smrg */dev/null* | *'Invalid file or object type'*) 6010b9b4fd27Smrg lt_cv_path_NM="$tmp_nm -B" 6011b9b4fd27Smrg break 6012b9b4fd27Smrg ;; 6013b9b4fd27Smrg *) 6014b9b4fd27Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 6015b9b4fd27Smrg */dev/null*) 6016b9b4fd27Smrg lt_cv_path_NM="$tmp_nm -p" 6017b9b4fd27Smrg break 6018b9b4fd27Smrg ;; 6019b9b4fd27Smrg *) 6020b9b4fd27Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 6021b9b4fd27Smrg continue # so that we can try to find one that supports BSD flags 6022b9b4fd27Smrg ;; 6023b9b4fd27Smrg esac 6024b9b4fd27Smrg ;; 6025b9b4fd27Smrg esac 6026b9b4fd27Smrg fi 6027b9b4fd27Smrg done 6028b9b4fd27Smrg IFS="$lt_save_ifs" 6029b9b4fd27Smrg done 6030b9b4fd27Smrg : ${lt_cv_path_NM=no} 6031b9b4fd27Smrgfi]) 6032b9b4fd27Smrgif test "$lt_cv_path_NM" != "no"; then 6033b9b4fd27Smrg NM="$lt_cv_path_NM" 6034b9b4fd27Smrgelse 6035b9b4fd27Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 6036e8a5466aSmrg if test -n "$DUMPBIN"; then : 6037e8a5466aSmrg # Let the user override the test. 6038e8a5466aSmrg else 6039e8a5466aSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 6040e8a5466aSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 6041e8a5466aSmrg *COFF*) 6042e8a5466aSmrg DUMPBIN="$DUMPBIN -symbols" 6043e8a5466aSmrg ;; 6044e8a5466aSmrg *) 6045e8a5466aSmrg DUMPBIN=: 6046e8a5466aSmrg ;; 6047e8a5466aSmrg esac 6048e8a5466aSmrg fi 6049b9b4fd27Smrg AC_SUBST([DUMPBIN]) 6050b9b4fd27Smrg if test "$DUMPBIN" != ":"; then 6051b9b4fd27Smrg NM="$DUMPBIN" 6052b9b4fd27Smrg fi 6053b9b4fd27Smrgfi 6054b9b4fd27Smrgtest -z "$NM" && NM=nm 6055b9b4fd27SmrgAC_SUBST([NM]) 6056b9b4fd27Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 6057b9b4fd27Smrg 6058b9b4fd27SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 6059b9b4fd27Smrg [lt_cv_nm_interface="BSD nm" 6060b9b4fd27Smrg echo "int some_variable = 0;" > conftest.$ac_ext 6061e8a5466aSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 6062b9b4fd27Smrg (eval "$ac_compile" 2>conftest.err) 6063b9b4fd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 6064e8a5466aSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 6065b9b4fd27Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 6066b9b4fd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 6067e8a5466aSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 6068b9b4fd27Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 6069b9b4fd27Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 6070b9b4fd27Smrg lt_cv_nm_interface="MS dumpbin" 6071b9b4fd27Smrg fi 6072b9b4fd27Smrg rm -f conftest*]) 6073b9b4fd27Smrg])# LT_PATH_NM 6074caade7ccSmrg 6075b9b4fd27Smrg# Old names: 6076b9b4fd27SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 6077b9b4fd27SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 6078b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 6079b9b4fd27Smrgdnl AC_DEFUN([AM_PROG_NM], []) 6080b9b4fd27Smrgdnl AC_DEFUN([AC_PROG_NM], []) 6081caade7ccSmrg 6082a5602400Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 6083a5602400Smrg# -------------------------------- 6084a5602400Smrg# how to determine the name of the shared library 6085a5602400Smrg# associated with a specific link library. 6086a5602400Smrg# -- PORTME fill in with the dynamic library characteristics 6087a5602400Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 6088a5602400Smrg[m4_require([_LT_DECL_EGREP]) 6089a5602400Smrgm4_require([_LT_DECL_OBJDUMP]) 6090a5602400Smrgm4_require([_LT_DECL_DLLTOOL]) 6091a5602400SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 6092a5602400Smrglt_cv_sharedlib_from_linklib_cmd, 6093a5602400Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 6094a5602400Smrg 6095a5602400Smrgcase $host_os in 6096a5602400Smrgcygwin* | mingw* | pw32* | cegcc*) 6097a5602400Smrg # two different shell functions defined in ltmain.sh 6098a5602400Smrg # decide which to use based on capabilities of $DLLTOOL 6099a5602400Smrg case `$DLLTOOL --help 2>&1` in 6100a5602400Smrg *--identify-strict*) 6101a5602400Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 6102a5602400Smrg ;; 6103a5602400Smrg *) 6104a5602400Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 6105a5602400Smrg ;; 6106a5602400Smrg esac 6107a5602400Smrg ;; 6108a5602400Smrg*) 6109a5602400Smrg # fallback: assume linklib IS sharedlib 6110a5602400Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 6111a5602400Smrg ;; 6112a5602400Smrgesac 6113a5602400Smrg]) 6114a5602400Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 6115a5602400Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 6116a5602400Smrg 6117a5602400Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 6118a5602400Smrg [Command to associate shared and link libraries]) 6119a5602400Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 6120a5602400Smrg 6121a5602400Smrg 6122a5602400Smrg# _LT_PATH_MANIFEST_TOOL 6123a5602400Smrg# ---------------------- 6124a5602400Smrg# locate the manifest tool 6125a5602400Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 6126a5602400Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 6127a5602400Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 6128a5602400SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 6129a5602400Smrg [lt_cv_path_mainfest_tool=no 6130a5602400Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 6131a5602400Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 6132a5602400Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 6133a5602400Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 6134a5602400Smrg lt_cv_path_mainfest_tool=yes 6135a5602400Smrg fi 6136a5602400Smrg rm -f conftest*]) 6137a5602400Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 6138a5602400Smrg MANIFEST_TOOL=: 6139a5602400Smrgfi 6140a5602400Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 6141a5602400Smrg])# _LT_PATH_MANIFEST_TOOL 6142a5602400Smrg 6143caade7ccSmrg 6144b9b4fd27Smrg# LT_LIB_M 6145b9b4fd27Smrg# -------- 6146b9b4fd27Smrg# check for math library 6147b9b4fd27SmrgAC_DEFUN([LT_LIB_M], 6148b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 6149b9b4fd27SmrgLIBM= 6150b9b4fd27Smrgcase $host in 6151e8a5466aSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 6152b9b4fd27Smrg # These system don't have libm, or don't need it 6153b9b4fd27Smrg ;; 6154b9b4fd27Smrg*-ncr-sysv4.3*) 6155b9b4fd27Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 6156b9b4fd27Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 6157b9b4fd27Smrg ;; 6158b9b4fd27Smrg*) 6159b9b4fd27Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 6160b9b4fd27Smrg ;; 6161b9b4fd27Smrgesac 6162b9b4fd27SmrgAC_SUBST([LIBM]) 6163b9b4fd27Smrg])# LT_LIB_M 6164caade7ccSmrg 6165b9b4fd27Smrg# Old name: 6166b9b4fd27SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 6167b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 6168b9b4fd27Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 6169caade7ccSmrg 6170caade7ccSmrg 6171b9b4fd27Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 6172b9b4fd27Smrg# ------------------------------- 6173b9b4fd27Smrgm4_defun([_LT_COMPILER_NO_RTTI], 6174b9b4fd27Smrg[m4_require([_LT_TAG_COMPILER])dnl 6175caade7ccSmrg 6176b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6177caade7ccSmrg 6178b9b4fd27Smrgif test "$GCC" = yes; then 6179e8a5466aSmrg case $cc_basename in 6180e8a5466aSmrg nvcc*) 6181e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 6182e8a5466aSmrg *) 6183e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 6184e8a5466aSmrg esac 6185caade7ccSmrg 6186b9b4fd27Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 6187b9b4fd27Smrg lt_cv_prog_compiler_rtti_exceptions, 6188b9b4fd27Smrg [-fno-rtti -fno-exceptions], [], 6189b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 6190b9b4fd27Smrgfi 6191b9b4fd27Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 6192b9b4fd27Smrg [Compiler flag to turn off builtin functions]) 6193b9b4fd27Smrg])# _LT_COMPILER_NO_RTTI 6194caade7ccSmrg 6195caade7ccSmrg 6196b9b4fd27Smrg# _LT_CMD_GLOBAL_SYMBOLS 6197b9b4fd27Smrg# ---------------------- 6198b9b4fd27Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 6199b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 6200b9b4fd27SmrgAC_REQUIRE([AC_PROG_CC])dnl 6201e8a5466aSmrgAC_REQUIRE([AC_PROG_AWK])dnl 6202b9b4fd27SmrgAC_REQUIRE([LT_PATH_NM])dnl 6203b9b4fd27SmrgAC_REQUIRE([LT_PATH_LD])dnl 6204b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 6205b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 6206b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl 6207caade7ccSmrg 6208b9b4fd27Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 6209b9b4fd27SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 6210b9b4fd27SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 6211b9b4fd27Smrg[ 6212b9b4fd27Smrg# These are sane defaults that work on at least a few old systems. 6213b9b4fd27Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 6214caade7ccSmrg 6215b9b4fd27Smrg# Character class describing NM global symbol codes. 6216b9b4fd27Smrgsymcode='[[BCDEGRST]]' 6217485f0483Smrg 6218b9b4fd27Smrg# Regexp to match symbols that can be accessed directly from C. 6219b9b4fd27Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 6220caade7ccSmrg 6221b9b4fd27Smrg# Define system-specific variables. 6222b9b4fd27Smrgcase $host_os in 6223b9b4fd27Smrgaix*) 6224b9b4fd27Smrg symcode='[[BCDT]]' 6225485f0483Smrg ;; 6226b9b4fd27Smrgcygwin* | mingw* | pw32* | cegcc*) 6227b9b4fd27Smrg symcode='[[ABCDGISTW]]' 6228caade7ccSmrg ;; 6229b9b4fd27Smrghpux*) 6230b9b4fd27Smrg if test "$host_cpu" = ia64; then 6231b9b4fd27Smrg symcode='[[ABCDEGRST]]' 6232caade7ccSmrg fi 6233caade7ccSmrg ;; 6234b9b4fd27Smrgirix* | nonstopux*) 6235b9b4fd27Smrg symcode='[[BCDEGRST]]' 6236b9b4fd27Smrg ;; 6237b9b4fd27Smrgosf*) 6238b9b4fd27Smrg symcode='[[BCDEGQRST]]' 6239b9b4fd27Smrg ;; 6240b9b4fd27Smrgsolaris*) 6241b9b4fd27Smrg symcode='[[BDRT]]' 6242b9b4fd27Smrg ;; 6243b9b4fd27Smrgsco3.2v5*) 6244b9b4fd27Smrg symcode='[[DT]]' 6245b9b4fd27Smrg ;; 6246b9b4fd27Smrgsysv4.2uw2*) 6247b9b4fd27Smrg symcode='[[DT]]' 6248b9b4fd27Smrg ;; 6249b9b4fd27Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 6250b9b4fd27Smrg symcode='[[ABDT]]' 6251b9b4fd27Smrg ;; 6252b9b4fd27Smrgsysv4) 6253b9b4fd27Smrg symcode='[[DFNSTU]]' 6254caade7ccSmrg ;; 6255caade7ccSmrgesac 6256caade7ccSmrg 6257b9b4fd27Smrg# If we're using GNU nm, then use its standard symbol codes. 6258b9b4fd27Smrgcase `$NM -V 2>&1` in 6259b9b4fd27Smrg*GNU* | *'with BFD'*) 6260b9b4fd27Smrg symcode='[[ABCDGIRSTW]]' ;; 6261b9b4fd27Smrgesac 6262caade7ccSmrg 6263b9b4fd27Smrg# Transform an extracted symbol line into a proper C declaration. 6264b9b4fd27Smrg# Some systems (esp. on ia64) link data and code symbols differently, 6265b9b4fd27Smrg# so use this general approach. 6266b9b4fd27Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6267caade7ccSmrg 6268b9b4fd27Smrg# Transform an extracted symbol line into symbol name and symbol address 6269a5602400Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 6270a5602400Smrglt_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'" 6271caade7ccSmrg 6272b9b4fd27Smrg# Handle CRLF in mingw tool chain 6273b9b4fd27Smrgopt_cr= 6274b9b4fd27Smrgcase $build_os in 6275b9b4fd27Smrgmingw*) 6276b9b4fd27Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 6277b9b4fd27Smrg ;; 6278b9b4fd27Smrgesac 6279caade7ccSmrg 6280b9b4fd27Smrg# Try without a prefix underscore, then with it. 6281b9b4fd27Smrgfor ac_symprfx in "" "_"; do 6282caade7ccSmrg 6283b9b4fd27Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 6284b9b4fd27Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 6285caade7ccSmrg 6286b9b4fd27Smrg # Write the raw and C identifiers. 6287b9b4fd27Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 6288b9b4fd27Smrg # Fake it for dumpbin and say T for any non-static function 6289b9b4fd27Smrg # and D for any global variable. 6290b9b4fd27Smrg # Also find C++ and __fastcall symbols from MSVC++, 6291b9b4fd27Smrg # which start with @ or ?. 6292b9b4fd27Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 6293b9b4fd27Smrg" {last_section=section; section=\$ 3};"\ 6294b9b4fd27Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 6295b9b4fd27Smrg" \$ 0!~/External *\|/{next};"\ 6296b9b4fd27Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 6297b9b4fd27Smrg" {if(hide[section]) next};"\ 6298b9b4fd27Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 6299b9b4fd27Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 6300b9b4fd27Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 6301b9b4fd27Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 6302b9b4fd27Smrg" ' prfx=^$ac_symprfx]" 6303b9b4fd27Smrg else 6304b9b4fd27Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 6305b9b4fd27Smrg fi 6306a5602400Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 6307caade7ccSmrg 6308b9b4fd27Smrg # Check to see that the pipe works correctly. 6309b9b4fd27Smrg pipe_works=no 6310caade7ccSmrg 6311b9b4fd27Smrg rm -f conftest* 6312b9b4fd27Smrg cat > conftest.$ac_ext <<_LT_EOF 6313b9b4fd27Smrg#ifdef __cplusplus 6314b9b4fd27Smrgextern "C" { 6315b9b4fd27Smrg#endif 6316b9b4fd27Smrgchar nm_test_var; 6317b9b4fd27Smrgvoid nm_test_func(void); 6318b9b4fd27Smrgvoid nm_test_func(void){} 6319b9b4fd27Smrg#ifdef __cplusplus 6320b9b4fd27Smrg} 6321b9b4fd27Smrg#endif 6322b9b4fd27Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 6323b9b4fd27Smrg_LT_EOF 6324caade7ccSmrg 6325b9b4fd27Smrg if AC_TRY_EVAL(ac_compile); then 6326b9b4fd27Smrg # Now try to grab the symbols. 6327b9b4fd27Smrg nlist=conftest.nm 6328e8a5466aSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 6329b9b4fd27Smrg # Try sorting and uniquifying the output. 6330b9b4fd27Smrg if sort "$nlist" | uniq > "$nlist"T; then 6331b9b4fd27Smrg mv -f "$nlist"T "$nlist" 6332b9b4fd27Smrg else 6333b9b4fd27Smrg rm -f "$nlist"T 6334b9b4fd27Smrg fi 6335caade7ccSmrg 6336b9b4fd27Smrg # Make sure that we snagged all the symbols we need. 6337b9b4fd27Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 6338b9b4fd27Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 6339b9b4fd27Smrg cat <<_LT_EOF > conftest.$ac_ext 6340a5602400Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 6341a5602400Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 6342a5602400Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 6343a5602400Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 6344a5602400Smrg# define LT@&t@_DLSYM_CONST 6345a5602400Smrg#elif defined(__osf__) 6346a5602400Smrg/* This system does not cope well with relocations in const data. */ 6347a5602400Smrg# define LT@&t@_DLSYM_CONST 6348a5602400Smrg#else 6349a5602400Smrg# define LT@&t@_DLSYM_CONST const 6350a5602400Smrg#endif 6351a5602400Smrg 6352b9b4fd27Smrg#ifdef __cplusplus 6353b9b4fd27Smrgextern "C" { 6354b9b4fd27Smrg#endif 6355caade7ccSmrg 6356b9b4fd27Smrg_LT_EOF 6357b9b4fd27Smrg # Now generate the symbol file. 6358b9b4fd27Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 6359caade7ccSmrg 6360b9b4fd27Smrg cat <<_LT_EOF >> conftest.$ac_ext 6361caade7ccSmrg 6362b9b4fd27Smrg/* The mapping between symbol names and symbols. */ 6363a5602400SmrgLT@&t@_DLSYM_CONST struct { 6364b9b4fd27Smrg const char *name; 6365b9b4fd27Smrg void *address; 6366b9b4fd27Smrg} 6367b9b4fd27Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 6368b9b4fd27Smrg{ 6369b9b4fd27Smrg { "@PROGRAM@", (void *) 0 }, 6370b9b4fd27Smrg_LT_EOF 6371b9b4fd27Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 6372b9b4fd27Smrg cat <<\_LT_EOF >> conftest.$ac_ext 6373b9b4fd27Smrg {0, (void *) 0} 6374b9b4fd27Smrg}; 6375caade7ccSmrg 6376b9b4fd27Smrg/* This works around a problem in FreeBSD linker */ 6377b9b4fd27Smrg#ifdef FREEBSD_WORKAROUND 6378b9b4fd27Smrgstatic const void *lt_preloaded_setup() { 6379b9b4fd27Smrg return lt__PROGRAM__LTX_preloaded_symbols; 6380b9b4fd27Smrg} 6381b9b4fd27Smrg#endif 6382caade7ccSmrg 6383b9b4fd27Smrg#ifdef __cplusplus 6384b9b4fd27Smrg} 6385b9b4fd27Smrg#endif 6386b9b4fd27Smrg_LT_EOF 6387b9b4fd27Smrg # Now try linking the two files. 6388b9b4fd27Smrg mv conftest.$ac_objext conftstm.$ac_objext 6389a5602400Smrg lt_globsym_save_LIBS=$LIBS 6390a5602400Smrg lt_globsym_save_CFLAGS=$CFLAGS 6391b9b4fd27Smrg LIBS="conftstm.$ac_objext" 6392b9b4fd27Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 6393b9b4fd27Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 6394b9b4fd27Smrg pipe_works=yes 6395b9b4fd27Smrg fi 6396a5602400Smrg LIBS=$lt_globsym_save_LIBS 6397a5602400Smrg CFLAGS=$lt_globsym_save_CFLAGS 6398b9b4fd27Smrg else 6399b9b4fd27Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 6400b9b4fd27Smrg fi 6401b9b4fd27Smrg else 6402b9b4fd27Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 6403b9b4fd27Smrg fi 6404b9b4fd27Smrg else 6405b9b4fd27Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 6406b9b4fd27Smrg fi 6407b9b4fd27Smrg else 6408b9b4fd27Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 6409b9b4fd27Smrg cat conftest.$ac_ext >&5 6410b9b4fd27Smrg fi 6411b9b4fd27Smrg rm -rf conftest* conftst* 6412caade7ccSmrg 6413b9b4fd27Smrg # Do not use the global_symbol_pipe unless it works. 6414b9b4fd27Smrg if test "$pipe_works" = yes; then 6415b9b4fd27Smrg break 6416b9b4fd27Smrg else 6417b9b4fd27Smrg lt_cv_sys_global_symbol_pipe= 6418b9b4fd27Smrg fi 6419b9b4fd27Smrgdone 6420b9b4fd27Smrg]) 6421b9b4fd27Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 6422b9b4fd27Smrg lt_cv_sys_global_symbol_to_cdecl= 6423b9b4fd27Smrgfi 6424b9b4fd27Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 6425b9b4fd27Smrg AC_MSG_RESULT(failed) 6426b9b4fd27Smrgelse 6427b9b4fd27Smrg AC_MSG_RESULT(ok) 6428b9b4fd27Smrgfi 6429caade7ccSmrg 6430a5602400Smrg# Response file support. 6431a5602400Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 6432a5602400Smrg nm_file_list_spec='@' 6433a5602400Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 6434a5602400Smrg nm_file_list_spec='@' 6435a5602400Smrgfi 6436a5602400Smrg 6437b9b4fd27Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 6438b9b4fd27Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 6439b9b4fd27Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 6440b9b4fd27Smrg [Transform the output of nm in a proper C declaration]) 6441b9b4fd27Smrg_LT_DECL([global_symbol_to_c_name_address], 6442b9b4fd27Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 6443b9b4fd27Smrg [Transform the output of nm in a C name address pair]) 6444b9b4fd27Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 6445b9b4fd27Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 6446b9b4fd27Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 6447a5602400Smrg_LT_DECL([], [nm_file_list_spec], [1], 6448a5602400Smrg [Specify filename containing input files for $NM]) 6449b9b4fd27Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 6450caade7ccSmrg 6451caade7ccSmrg 6452b9b4fd27Smrg# _LT_COMPILER_PIC([TAGNAME]) 6453b9b4fd27Smrg# --------------------------- 6454b9b4fd27Smrgm4_defun([_LT_COMPILER_PIC], 6455b9b4fd27Smrg[m4_require([_LT_TAG_COMPILER])dnl 6456b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 6457b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6458b9b4fd27Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 6459caade7ccSmrg 6460b9b4fd27Smrgm4_if([$1], [CXX], [ 6461b9b4fd27Smrg # C++ specific cases for pic, static, wl, etc. 6462b9b4fd27Smrg if test "$GXX" = yes; then 6463b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6464b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6465caade7ccSmrg 6466b9b4fd27Smrg case $host_os in 6467b9b4fd27Smrg aix*) 6468b9b4fd27Smrg # All AIX code is PIC. 6469b9b4fd27Smrg if test "$host_cpu" = ia64; then 6470b9b4fd27Smrg # AIX 5 now supports IA64 processor 6471b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6472b9b4fd27Smrg fi 6473b9b4fd27Smrg ;; 6474caade7ccSmrg 6475b9b4fd27Smrg amigaos*) 6476b9b4fd27Smrg case $host_cpu in 6477b9b4fd27Smrg powerpc) 6478b9b4fd27Smrg # see comment about AmigaOS4 .so support 6479b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6480b9b4fd27Smrg ;; 6481b9b4fd27Smrg m68k) 6482b9b4fd27Smrg # FIXME: we need at least 68020 code to build shared libraries, but 6483b9b4fd27Smrg # adding the `-m68020' flag to GCC prevents building anything better, 6484b9b4fd27Smrg # like `-m68040'. 6485b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6486b9b4fd27Smrg ;; 6487b9b4fd27Smrg esac 6488b9b4fd27Smrg ;; 6489caade7ccSmrg 6490b9b4fd27Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6491b9b4fd27Smrg # PIC is the default for these OSes. 6492b9b4fd27Smrg ;; 6493b9b4fd27Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 6494b9b4fd27Smrg # This hack is so that the source file can tell whether it is being 6495b9b4fd27Smrg # built for inclusion in a dll (and should export symbols for example). 6496b9b4fd27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6497b9b4fd27Smrg # (--disable-auto-import) libraries 6498b9b4fd27Smrg m4_if([$1], [GCJ], [], 6499b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6500b9b4fd27Smrg ;; 6501b9b4fd27Smrg darwin* | rhapsody*) 6502b9b4fd27Smrg # PIC is the default on this platform 6503b9b4fd27Smrg # Common symbols not allowed in MH_DYLIB files 6504b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6505b9b4fd27Smrg ;; 6506b9b4fd27Smrg *djgpp*) 6507b9b4fd27Smrg # DJGPP does not support shared libraries at all 6508b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6509b9b4fd27Smrg ;; 6510e8a5466aSmrg haiku*) 6511e8a5466aSmrg # PIC is the default for Haiku. 6512e8a5466aSmrg # The "-static" flag exists, but is broken. 6513e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 6514e8a5466aSmrg ;; 6515b9b4fd27Smrg interix[[3-9]]*) 6516b9b4fd27Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6517b9b4fd27Smrg # Instead, we relocate shared libraries at runtime. 6518b9b4fd27Smrg ;; 6519b9b4fd27Smrg sysv4*MP*) 6520b9b4fd27Smrg if test -d /usr/nec; then 6521b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6522b9b4fd27Smrg fi 6523b9b4fd27Smrg ;; 6524b9b4fd27Smrg hpux*) 6525b9b4fd27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6526b9b4fd27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6527b9b4fd27Smrg # sets the default TLS model and affects inlining. 6528b9b4fd27Smrg case $host_cpu in 6529b9b4fd27Smrg hppa*64*) 6530b9b4fd27Smrg ;; 6531b9b4fd27Smrg *) 6532b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6533b9b4fd27Smrg ;; 6534b9b4fd27Smrg esac 6535b9b4fd27Smrg ;; 6536b9b4fd27Smrg *qnx* | *nto*) 6537b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6538b9b4fd27Smrg # it will coredump. 6539b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6540caade7ccSmrg ;; 6541caade7ccSmrg *) 6542b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6543caade7ccSmrg ;; 6544caade7ccSmrg esac 6545b9b4fd27Smrg else 6546b9b4fd27Smrg case $host_os in 6547b9b4fd27Smrg aix[[4-9]]*) 6548b9b4fd27Smrg # All AIX code is PIC. 6549b9b4fd27Smrg if test "$host_cpu" = ia64; then 6550b9b4fd27Smrg # AIX 5 now supports IA64 processor 6551b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6552b9b4fd27Smrg else 6553b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6554b9b4fd27Smrg fi 6555b9b4fd27Smrg ;; 6556b9b4fd27Smrg chorus*) 6557b9b4fd27Smrg case $cc_basename in 6558b9b4fd27Smrg cxch68*) 6559b9b4fd27Smrg # Green Hills C++ Compiler 6560b9b4fd27Smrg # _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" 6561b9b4fd27Smrg ;; 6562b9b4fd27Smrg esac 6563b9b4fd27Smrg ;; 6564a5602400Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 6565a5602400Smrg # This hack is so that the source file can tell whether it is being 6566a5602400Smrg # built for inclusion in a dll (and should export symbols for example). 6567a5602400Smrg m4_if([$1], [GCJ], [], 6568a5602400Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6569a5602400Smrg ;; 6570b9b4fd27Smrg dgux*) 6571b9b4fd27Smrg case $cc_basename in 6572b9b4fd27Smrg ec++*) 6573b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6574b9b4fd27Smrg ;; 6575b9b4fd27Smrg ghcx*) 6576b9b4fd27Smrg # Green Hills C++ Compiler 6577b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6578b9b4fd27Smrg ;; 6579b9b4fd27Smrg *) 6580b9b4fd27Smrg ;; 6581b9b4fd27Smrg esac 6582b9b4fd27Smrg ;; 6583b9b4fd27Smrg freebsd* | dragonfly*) 6584b9b4fd27Smrg # FreeBSD uses GNU C++ 6585b9b4fd27Smrg ;; 6586b9b4fd27Smrg hpux9* | hpux10* | hpux11*) 6587b9b4fd27Smrg case $cc_basename in 6588b9b4fd27Smrg CC*) 6589b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6590b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6591b9b4fd27Smrg if test "$host_cpu" != ia64; then 6592b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6593b9b4fd27Smrg fi 6594b9b4fd27Smrg ;; 6595b9b4fd27Smrg aCC*) 6596b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6597b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6598b9b4fd27Smrg case $host_cpu in 6599b9b4fd27Smrg hppa*64*|ia64*) 6600b9b4fd27Smrg # +Z the default 6601b9b4fd27Smrg ;; 6602b9b4fd27Smrg *) 6603b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6604b9b4fd27Smrg ;; 6605b9b4fd27Smrg esac 6606b9b4fd27Smrg ;; 6607b9b4fd27Smrg *) 6608b9b4fd27Smrg ;; 6609b9b4fd27Smrg esac 6610b9b4fd27Smrg ;; 6611b9b4fd27Smrg interix*) 6612b9b4fd27Smrg # This is c89, which is MS Visual C++ (no shared libs) 6613b9b4fd27Smrg # Anyone wants to do a port? 6614b9b4fd27Smrg ;; 6615b9b4fd27Smrg irix5* | irix6* | nonstopux*) 6616b9b4fd27Smrg case $cc_basename in 6617b9b4fd27Smrg CC*) 6618b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6619b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6620b9b4fd27Smrg # CC pic flag -KPIC is the default. 6621b9b4fd27Smrg ;; 6622b9b4fd27Smrg *) 6623b9b4fd27Smrg ;; 6624b9b4fd27Smrg esac 6625b9b4fd27Smrg ;; 6626e8a5466aSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6627b9b4fd27Smrg case $cc_basename in 6628b9b4fd27Smrg KCC*) 6629b9b4fd27Smrg # KAI C++ Compiler 6630b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6631b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6632b9b4fd27Smrg ;; 6633b9b4fd27Smrg ecpc* ) 6634b9b4fd27Smrg # old Intel C++ for x86_64 which still supported -KPIC. 6635b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6636b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6637b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6638b9b4fd27Smrg ;; 6639b9b4fd27Smrg icpc* ) 6640b9b4fd27Smrg # Intel C++, used to be incompatible with GCC. 6641b9b4fd27Smrg # ICC 10 doesn't accept -KPIC any more. 6642b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6643b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6644b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6645b9b4fd27Smrg ;; 6646b9b4fd27Smrg pgCC* | pgcpp*) 6647b9b4fd27Smrg # Portland Group C++ compiler 6648b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6649b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6650b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6651b9b4fd27Smrg ;; 6652b9b4fd27Smrg cxx*) 6653b9b4fd27Smrg # Compaq C++ 6654b9b4fd27Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6655b9b4fd27Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6656b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6657b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6658b9b4fd27Smrg ;; 6659e8a5466aSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 6660e8a5466aSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 6661b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6662b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6663b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6664b9b4fd27Smrg ;; 6665b9b4fd27Smrg *) 6666b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 6667b9b4fd27Smrg *Sun\ C*) 6668b9b4fd27Smrg # Sun C++ 5.9 6669b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6670b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6671b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6672b9b4fd27Smrg ;; 6673b9b4fd27Smrg esac 6674b9b4fd27Smrg ;; 6675b9b4fd27Smrg esac 6676b9b4fd27Smrg ;; 6677b9b4fd27Smrg lynxos*) 6678b9b4fd27Smrg ;; 6679b9b4fd27Smrg m88k*) 6680b9b4fd27Smrg ;; 6681b9b4fd27Smrg mvs*) 6682b9b4fd27Smrg case $cc_basename in 6683b9b4fd27Smrg cxx*) 6684b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6685b9b4fd27Smrg ;; 6686b9b4fd27Smrg *) 6687b9b4fd27Smrg ;; 6688b9b4fd27Smrg esac 6689b9b4fd27Smrg ;; 6690b9b4fd27Smrg netbsd*) 6691b9b4fd27Smrg ;; 6692b9b4fd27Smrg *qnx* | *nto*) 6693b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6694b9b4fd27Smrg # it will coredump. 6695b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6696b9b4fd27Smrg ;; 6697b9b4fd27Smrg osf3* | osf4* | osf5*) 6698b9b4fd27Smrg case $cc_basename in 6699b9b4fd27Smrg KCC*) 6700b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6701b9b4fd27Smrg ;; 6702b9b4fd27Smrg RCC*) 6703b9b4fd27Smrg # Rational C++ 2.4.1 6704b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6705b9b4fd27Smrg ;; 6706b9b4fd27Smrg cxx*) 6707b9b4fd27Smrg # Digital/Compaq C++ 6708b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6709b9b4fd27Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6710b9b4fd27Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6711b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6712b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6713b9b4fd27Smrg ;; 6714b9b4fd27Smrg *) 6715b9b4fd27Smrg ;; 6716b9b4fd27Smrg esac 6717b9b4fd27Smrg ;; 6718b9b4fd27Smrg psos*) 6719b9b4fd27Smrg ;; 6720b9b4fd27Smrg solaris*) 6721b9b4fd27Smrg case $cc_basename in 6722e8a5466aSmrg CC* | sunCC*) 6723b9b4fd27Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6724b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6725b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6726b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6727b9b4fd27Smrg ;; 6728b9b4fd27Smrg gcx*) 6729b9b4fd27Smrg # Green Hills C++ Compiler 6730b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6731b9b4fd27Smrg ;; 6732b9b4fd27Smrg *) 6733b9b4fd27Smrg ;; 6734b9b4fd27Smrg esac 6735b9b4fd27Smrg ;; 6736b9b4fd27Smrg sunos4*) 6737b9b4fd27Smrg case $cc_basename in 6738b9b4fd27Smrg CC*) 6739b9b4fd27Smrg # Sun C++ 4.x 6740b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6741b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6742b9b4fd27Smrg ;; 6743b9b4fd27Smrg lcc*) 6744b9b4fd27Smrg # Lucid 6745b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6746b9b4fd27Smrg ;; 6747b9b4fd27Smrg *) 6748b9b4fd27Smrg ;; 6749b9b4fd27Smrg esac 6750b9b4fd27Smrg ;; 6751b9b4fd27Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6752b9b4fd27Smrg case $cc_basename in 6753b9b4fd27Smrg CC*) 6754b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6755b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6756b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6757b9b4fd27Smrg ;; 6758b9b4fd27Smrg esac 6759b9b4fd27Smrg ;; 6760b9b4fd27Smrg tandem*) 6761b9b4fd27Smrg case $cc_basename in 6762b9b4fd27Smrg NCC*) 6763b9b4fd27Smrg # NonStop-UX NCC 3.20 6764b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6765b9b4fd27Smrg ;; 6766b9b4fd27Smrg *) 6767b9b4fd27Smrg ;; 6768b9b4fd27Smrg esac 6769b9b4fd27Smrg ;; 6770b9b4fd27Smrg vxworks*) 6771b9b4fd27Smrg ;; 6772b9b4fd27Smrg *) 6773b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6774b9b4fd27Smrg ;; 6775b9b4fd27Smrg esac 6776b9b4fd27Smrg fi 6777b9b4fd27Smrg], 6778b9b4fd27Smrg[ 6779b9b4fd27Smrg if test "$GCC" = yes; then 6780b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6781b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6782caade7ccSmrg 6783b9b4fd27Smrg case $host_os in 6784b9b4fd27Smrg aix*) 6785b9b4fd27Smrg # All AIX code is PIC. 6786b9b4fd27Smrg if test "$host_cpu" = ia64; then 6787b9b4fd27Smrg # AIX 5 now supports IA64 processor 6788b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6789b9b4fd27Smrg fi 6790b9b4fd27Smrg ;; 6791caade7ccSmrg 6792b9b4fd27Smrg amigaos*) 6793b9b4fd27Smrg case $host_cpu in 6794b9b4fd27Smrg powerpc) 6795b9b4fd27Smrg # see comment about AmigaOS4 .so support 6796b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6797b9b4fd27Smrg ;; 6798b9b4fd27Smrg m68k) 6799b9b4fd27Smrg # FIXME: we need at least 68020 code to build shared libraries, but 6800b9b4fd27Smrg # adding the `-m68020' flag to GCC prevents building anything better, 6801b9b4fd27Smrg # like `-m68040'. 6802b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6803b9b4fd27Smrg ;; 6804b9b4fd27Smrg esac 6805b9b4fd27Smrg ;; 6806caade7ccSmrg 6807b9b4fd27Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6808b9b4fd27Smrg # PIC is the default for these OSes. 6809b9b4fd27Smrg ;; 6810caade7ccSmrg 6811b9b4fd27Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6812b9b4fd27Smrg # This hack is so that the source file can tell whether it is being 6813b9b4fd27Smrg # built for inclusion in a dll (and should export symbols for example). 6814b9b4fd27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6815b9b4fd27Smrg # (--disable-auto-import) libraries 6816b9b4fd27Smrg m4_if([$1], [GCJ], [], 6817b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6818b9b4fd27Smrg ;; 6819caade7ccSmrg 6820b9b4fd27Smrg darwin* | rhapsody*) 6821b9b4fd27Smrg # PIC is the default on this platform 6822b9b4fd27Smrg # Common symbols not allowed in MH_DYLIB files 6823b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6824b9b4fd27Smrg ;; 6825caade7ccSmrg 6826e8a5466aSmrg haiku*) 6827e8a5466aSmrg # PIC is the default for Haiku. 6828e8a5466aSmrg # The "-static" flag exists, but is broken. 6829e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 6830e8a5466aSmrg ;; 6831e8a5466aSmrg 6832b9b4fd27Smrg hpux*) 6833b9b4fd27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6834b9b4fd27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6835b9b4fd27Smrg # sets the default TLS model and affects inlining. 6836b9b4fd27Smrg case $host_cpu in 6837b9b4fd27Smrg hppa*64*) 6838b9b4fd27Smrg # +Z the default 6839b9b4fd27Smrg ;; 6840b9b4fd27Smrg *) 6841b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6842b9b4fd27Smrg ;; 6843b9b4fd27Smrg esac 6844b9b4fd27Smrg ;; 6845caade7ccSmrg 6846b9b4fd27Smrg interix[[3-9]]*) 6847b9b4fd27Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6848b9b4fd27Smrg # Instead, we relocate shared libraries at runtime. 6849b9b4fd27Smrg ;; 6850caade7ccSmrg 6851b9b4fd27Smrg msdosdjgpp*) 6852b9b4fd27Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 6853b9b4fd27Smrg # on systems that don't support them. 6854b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6855b9b4fd27Smrg enable_shared=no 6856b9b4fd27Smrg ;; 6857caade7ccSmrg 6858b9b4fd27Smrg *nto* | *qnx*) 6859b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6860b9b4fd27Smrg # it will coredump. 6861b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6862b9b4fd27Smrg ;; 6863caade7ccSmrg 6864b9b4fd27Smrg sysv4*MP*) 6865b9b4fd27Smrg if test -d /usr/nec; then 6866b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6867b9b4fd27Smrg fi 6868b9b4fd27Smrg ;; 6869caade7ccSmrg 6870b9b4fd27Smrg *) 6871b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6872b9b4fd27Smrg ;; 6873b9b4fd27Smrg esac 6874e8a5466aSmrg 6875e8a5466aSmrg case $cc_basename in 6876e8a5466aSmrg nvcc*) # Cuda Compiler Driver 2.2 6877e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 6878e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 6879e8a5466aSmrg ;; 6880e8a5466aSmrg esac 6881b9b4fd27Smrg else 6882b9b4fd27Smrg # PORTME Check for flag to pass linker flags through the system compiler. 6883b9b4fd27Smrg case $host_os in 6884b9b4fd27Smrg aix*) 6885b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6886b9b4fd27Smrg if test "$host_cpu" = ia64; then 6887b9b4fd27Smrg # AIX 5 now supports IA64 processor 6888b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6889b9b4fd27Smrg else 6890b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6891b9b4fd27Smrg fi 6892b9b4fd27Smrg ;; 6893caade7ccSmrg 6894b9b4fd27Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6895b9b4fd27Smrg # This hack is so that the source file can tell whether it is being 6896b9b4fd27Smrg # built for inclusion in a dll (and should export symbols for example). 6897b9b4fd27Smrg m4_if([$1], [GCJ], [], 6898b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6899b9b4fd27Smrg ;; 6900caade7ccSmrg 6901b9b4fd27Smrg hpux9* | hpux10* | hpux11*) 6902b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6903b9b4fd27Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6904b9b4fd27Smrg # not for PA HP-UX. 6905b9b4fd27Smrg case $host_cpu in 6906b9b4fd27Smrg hppa*64*|ia64*) 6907b9b4fd27Smrg # +Z the default 6908b9b4fd27Smrg ;; 6909b9b4fd27Smrg *) 6910b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6911b9b4fd27Smrg ;; 6912b9b4fd27Smrg esac 6913b9b4fd27Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 6914b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6915b9b4fd27Smrg ;; 6916caade7ccSmrg 6917b9b4fd27Smrg irix5* | irix6* | nonstopux*) 6918b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6919b9b4fd27Smrg # PIC (with -KPIC) is the default. 6920b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6921b9b4fd27Smrg ;; 6922caade7ccSmrg 6923e8a5466aSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6924b9b4fd27Smrg case $cc_basename in 6925b9b4fd27Smrg # old Intel for x86_64 which still supported -KPIC. 6926b9b4fd27Smrg ecc*) 6927b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6928b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6929b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6930b9b4fd27Smrg ;; 6931b9b4fd27Smrg # icc used to be incompatible with GCC. 6932b9b4fd27Smrg # ICC 10 doesn't accept -KPIC any more. 6933b9b4fd27Smrg icc* | ifort*) 6934b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6935b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6936b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6937b9b4fd27Smrg ;; 6938b9b4fd27Smrg # Lahey Fortran 8.1. 6939b9b4fd27Smrg lf95*) 6940b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6941b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 6942b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 6943b9b4fd27Smrg ;; 6944a5602400Smrg nagfor*) 6945a5602400Smrg # NAG Fortran compiler 6946a5602400Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 6947a5602400Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6948a5602400Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6949a5602400Smrg ;; 6950e8a5466aSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 6951b9b4fd27Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 6952b9b4fd27Smrg # which looks to be a dead project) 6953b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6954b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6955b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6956b9b4fd27Smrg ;; 6957b9b4fd27Smrg ccc*) 6958b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6959b9b4fd27Smrg # All Alpha code is PIC. 6960b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6961b9b4fd27Smrg ;; 6962e8a5466aSmrg xl* | bgxl* | bgf* | mpixl*) 6963e8a5466aSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 6964b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6965b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6966b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6967b9b4fd27Smrg ;; 6968b9b4fd27Smrg *) 6969b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 6970e8a5466aSmrg *Sun\ F* | *Sun*Fortran*) 6971e8a5466aSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 6972b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6973b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6974e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 6975b9b4fd27Smrg ;; 6976e8a5466aSmrg *Sun\ C*) 6977e8a5466aSmrg # Sun C 5.9 6978b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6979b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6980e8a5466aSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6981b9b4fd27Smrg ;; 6982b9b4fd27Smrg esac 6983b9b4fd27Smrg ;; 6984b9b4fd27Smrg esac 6985b9b4fd27Smrg ;; 6986caade7ccSmrg 6987b9b4fd27Smrg newsos6) 6988b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6989b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6990b9b4fd27Smrg ;; 6991caade7ccSmrg 6992b9b4fd27Smrg *nto* | *qnx*) 6993b9b4fd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6994b9b4fd27Smrg # it will coredump. 6995b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6996b9b4fd27Smrg ;; 6997caade7ccSmrg 6998b9b4fd27Smrg osf3* | osf4* | osf5*) 6999b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7000b9b4fd27Smrg # All OSF/1 code is PIC. 7001b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7002b9b4fd27Smrg ;; 7003caade7ccSmrg 7004b9b4fd27Smrg rdos*) 7005b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7006b9b4fd27Smrg ;; 7007caade7ccSmrg 7008b9b4fd27Smrg solaris*) 7009b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7010b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7011b9b4fd27Smrg case $cc_basename in 7012e8a5466aSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 7013b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 7014b9b4fd27Smrg *) 7015b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 7016b9b4fd27Smrg esac 7017b9b4fd27Smrg ;; 7018caade7ccSmrg 7019b9b4fd27Smrg sunos4*) 7020b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7021b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7022b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7023b9b4fd27Smrg ;; 7024caade7ccSmrg 7025b9b4fd27Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 7026b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7027b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7028b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7029b9b4fd27Smrg ;; 7030caade7ccSmrg 7031b9b4fd27Smrg sysv4*MP*) 7032b9b4fd27Smrg if test -d /usr/nec ;then 7033b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 7034b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7035b9b4fd27Smrg fi 7036b9b4fd27Smrg ;; 7037caade7ccSmrg 7038b9b4fd27Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7039b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7040b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7041b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7042b9b4fd27Smrg ;; 7043caade7ccSmrg 7044b9b4fd27Smrg unicos*) 7045b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7046b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7047b9b4fd27Smrg ;; 7048caade7ccSmrg 7049b9b4fd27Smrg uts4*) 7050b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7051b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7052b9b4fd27Smrg ;; 7053caade7ccSmrg 7054b9b4fd27Smrg *) 7055b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7056b9b4fd27Smrg ;; 7057b9b4fd27Smrg esac 7058b9b4fd27Smrg fi 7059b9b4fd27Smrg]) 7060b9b4fd27Smrgcase $host_os in 7061b9b4fd27Smrg # For platforms which do not support PIC, -DPIC is meaningless: 7062b9b4fd27Smrg *djgpp*) 7063b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7064b9b4fd27Smrg ;; 7065b9b4fd27Smrg *) 7066b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 7067b9b4fd27Smrg ;; 7068b9b4fd27Smrgesac 7069a5602400Smrg 7070a5602400SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 7071a5602400Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 7072a5602400Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 7073a5602400Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 7074caade7ccSmrg 7075b9b4fd27Smrg# 7076b9b4fd27Smrg# Check to make sure the PIC flag actually works. 7077b9b4fd27Smrg# 7078b9b4fd27Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 7079b9b4fd27Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 7080b9b4fd27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 7081b9b4fd27Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 7082b9b4fd27Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 7083b9b4fd27Smrg "" | " "*) ;; 7084b9b4fd27Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 7085b9b4fd27Smrg esac], 7086b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7087b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 7088b9b4fd27Smrgfi 7089b9b4fd27Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 7090b9b4fd27Smrg [Additional compiler flags for building library objects]) 7091caade7ccSmrg 7092a5602400Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 7093a5602400Smrg [How to pass a linker flag through the compiler]) 7094b9b4fd27Smrg# 7095b9b4fd27Smrg# Check to make sure the static flag actually works. 7096b9b4fd27Smrg# 7097b9b4fd27Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 7098b9b4fd27Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 7099b9b4fd27Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 7100b9b4fd27Smrg $lt_tmp_static_flag, 7101b9b4fd27Smrg [], 7102b9b4fd27Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 7103b9b4fd27Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 7104b9b4fd27Smrg [Compiler flag to prevent dynamic linking]) 7105b9b4fd27Smrg])# _LT_COMPILER_PIC 7106caade7ccSmrg 7107caade7ccSmrg 7108b9b4fd27Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 7109b9b4fd27Smrg# ---------------------------- 7110b9b4fd27Smrg# See if the linker supports building shared libraries. 7111b9b4fd27Smrgm4_defun([_LT_LINKER_SHLIBS], 7112b9b4fd27Smrg[AC_REQUIRE([LT_PATH_LD])dnl 7113b9b4fd27SmrgAC_REQUIRE([LT_PATH_NM])dnl 7114a5602400Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 7115b9b4fd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 7116b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 7117b9b4fd27Smrgm4_require([_LT_DECL_SED])dnl 7118b9b4fd27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 7119b9b4fd27Smrgm4_require([_LT_TAG_COMPILER])dnl 7120b9b4fd27SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7121b9b4fd27Smrgm4_if([$1], [CXX], [ 7122b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7123a5602400Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 7124b9b4fd27Smrg case $host_os in 7125b9b4fd27Smrg aix[[4-9]]*) 7126b9b4fd27Smrg # If we're using GNU nm, then we don't want the "-C" option. 7127b9b4fd27Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 7128e8a5466aSmrg # Also, AIX nm treats weak defined symbols like other global defined 7129e8a5466aSmrg # symbols, whereas GNU nm marks them as "W". 7130b9b4fd27Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 7131e8a5466aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 7132b9b4fd27Smrg else 7133b9b4fd27Smrg _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' 7134b9b4fd27Smrg fi 7135b9b4fd27Smrg ;; 7136b9b4fd27Smrg pw32*) 7137b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 7138a5602400Smrg ;; 7139b9b4fd27Smrg cygwin* | mingw* | cegcc*) 7140a5602400Smrg case $cc_basename in 7141a5602400Smrg cl*) ;; 7142a5602400Smrg *) 7143a5602400Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 7144a5602400Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 7145a5602400Smrg ;; 7146a5602400Smrg esac 7147a5602400Smrg ;; 7148b9b4fd27Smrg *) 7149b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7150a5602400Smrg ;; 7151b9b4fd27Smrg esac 7152b9b4fd27Smrg], [ 7153b9b4fd27Smrg runpath_var= 7154b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 7155b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 7156b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)= 7157b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 7158b9b4fd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 7159b9b4fd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7160b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 7161b9b4fd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7162b9b4fd27Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 7163b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7164b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 7165b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7166b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7167b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7168b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 7169b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7170b9b4fd27Smrg _LT_TAGVAR(inherit_rpath, $1)=no 7171b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 7172b9b4fd27Smrg _LT_TAGVAR(module_cmds, $1)= 7173b9b4fd27Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 7174b9b4fd27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 7175b9b4fd27Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 7176b9b4fd27Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 7177b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7178b9b4fd27Smrg # include_expsyms should be a list of space-separated symbols to be *always* 7179b9b4fd27Smrg # included in the symbol list 7180b9b4fd27Smrg _LT_TAGVAR(include_expsyms, $1)= 7181b9b4fd27Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 7182b9b4fd27Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 7183b9b4fd27Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 7184b9b4fd27Smrg # as well as any symbol that contains `d'. 7185b9b4fd27Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 7186b9b4fd27Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 7187b9b4fd27Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 7188b9b4fd27Smrg # the symbol is explicitly referenced. Since portable code cannot 7189b9b4fd27Smrg # rely on this symbol name, it's probably fine to never include it in 7190b9b4fd27Smrg # preloaded symbol tables. 7191b9b4fd27Smrg # Exclude shared library initialization/finalization symbols. 7192b9b4fd27Smrgdnl Note also adjust exclude_expsyms for C++ above. 7193b9b4fd27Smrg extract_expsyms_cmds= 7194caade7ccSmrg 7195b9b4fd27Smrg case $host_os in 7196b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 7197b9b4fd27Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 7198b9b4fd27Smrg # When not using gcc, we currently assume that we are using 7199b9b4fd27Smrg # Microsoft Visual C++. 7200b9b4fd27Smrg if test "$GCC" != yes; then 7201b9b4fd27Smrg with_gnu_ld=no 7202b9b4fd27Smrg fi 7203b9b4fd27Smrg ;; 7204b9b4fd27Smrg interix*) 7205b9b4fd27Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 7206b9b4fd27Smrg with_gnu_ld=yes 7207b9b4fd27Smrg ;; 7208b9b4fd27Smrg openbsd*) 7209b9b4fd27Smrg with_gnu_ld=no 7210b9b4fd27Smrg ;; 7211b9b4fd27Smrg esac 7212caade7ccSmrg 7213b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7214e8a5466aSmrg 7215e8a5466aSmrg # On some targets, GNU ld is compatible enough with the native linker 7216e8a5466aSmrg # that we're better off using the native interface for both. 7217e8a5466aSmrg lt_use_gnu_ld_interface=no 7218b9b4fd27Smrg if test "$with_gnu_ld" = yes; then 7219e8a5466aSmrg case $host_os in 7220e8a5466aSmrg aix*) 7221e8a5466aSmrg # The AIX port of GNU ld has always aspired to compatibility 7222e8a5466aSmrg # with the native linker. However, as the warning in the GNU ld 7223e8a5466aSmrg # block says, versions before 2.19.5* couldn't really create working 7224e8a5466aSmrg # shared libraries, regardless of the interface used. 7225e8a5466aSmrg case `$LD -v 2>&1` in 7226e8a5466aSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 7227e8a5466aSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 7228e8a5466aSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 7229e8a5466aSmrg *) 7230e8a5466aSmrg lt_use_gnu_ld_interface=yes 7231e8a5466aSmrg ;; 7232e8a5466aSmrg esac 7233e8a5466aSmrg ;; 7234e8a5466aSmrg *) 7235e8a5466aSmrg lt_use_gnu_ld_interface=yes 7236e8a5466aSmrg ;; 7237e8a5466aSmrg esac 7238e8a5466aSmrg fi 7239e8a5466aSmrg 7240e8a5466aSmrg if test "$lt_use_gnu_ld_interface" = yes; then 7241b9b4fd27Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 7242b9b4fd27Smrg wlarc='${wl}' 7243caade7ccSmrg 7244b9b4fd27Smrg # Set some defaults for GNU ld with shared library support. These 7245b9b4fd27Smrg # are reset later if shared libraries are not supported. Putting them 7246b9b4fd27Smrg # here allows them to be overridden if necessary. 7247b9b4fd27Smrg runpath_var=LD_RUN_PATH 7248b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7249b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7250b9b4fd27Smrg # ancient GNU ld didn't support --whole-archive et. al. 7251b9b4fd27Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 7252b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7253b9b4fd27Smrg else 7254b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7255b9b4fd27Smrg fi 7256b9b4fd27Smrg supports_anon_versioning=no 7257b9b4fd27Smrg case `$LD -v 2>&1` in 7258e8a5466aSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 7259b9b4fd27Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 7260b9b4fd27Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 7261b9b4fd27Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 7262b9b4fd27Smrg *\ 2.11.*) ;; # other 2.11 versions 7263b9b4fd27Smrg *) supports_anon_versioning=yes ;; 7264b9b4fd27Smrg esac 7265caade7ccSmrg 7266b9b4fd27Smrg # See if GNU ld supports shared libraries. 7267b9b4fd27Smrg case $host_os in 7268b9b4fd27Smrg aix[[3-9]]*) 7269b9b4fd27Smrg # On AIX/PPC, the GNU linker is very broken 7270b9b4fd27Smrg if test "$host_cpu" != ia64; then 7271b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7272b9b4fd27Smrg cat <<_LT_EOF 1>&2 7273caade7ccSmrg 7274e8a5466aSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 7275b9b4fd27Smrg*** to be unable to reliably create shared libraries on AIX. 7276b9b4fd27Smrg*** Therefore, libtool is disabling shared libraries support. If you 7277e8a5466aSmrg*** really care for shared libraries, you may want to install binutils 7278e8a5466aSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 7279e8a5466aSmrg*** You will then need to restart the configuration process. 7280caade7ccSmrg 7281b9b4fd27Smrg_LT_EOF 7282b9b4fd27Smrg fi 7283b9b4fd27Smrg ;; 7284caade7ccSmrg 7285b9b4fd27Smrg amigaos*) 7286b9b4fd27Smrg case $host_cpu in 7287b9b4fd27Smrg powerpc) 7288b9b4fd27Smrg # see comment about AmigaOS4 .so support 7289b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7290b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 7291b9b4fd27Smrg ;; 7292b9b4fd27Smrg m68k) 7293b9b4fd27Smrg _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)' 7294b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7295b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7296b9b4fd27Smrg ;; 7297b9b4fd27Smrg esac 7298b9b4fd27Smrg ;; 7299caade7ccSmrg 7300b9b4fd27Smrg beos*) 7301b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7302b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7303b9b4fd27Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7304b9b4fd27Smrg # support --undefined. This deserves some investigation. FIXME 7305b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7306b9b4fd27Smrg else 7307b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7308b9b4fd27Smrg fi 7309b9b4fd27Smrg ;; 7310caade7ccSmrg 7311b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 7312b9b4fd27Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7313b9b4fd27Smrg # as there is no search path for DLLs. 7314b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7315e8a5466aSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7316b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7317b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 7318b9b4fd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7319a5602400Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 7320a5602400Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 7321b9b4fd27Smrg 7322b9b4fd27Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7323b9b4fd27Smrg _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' 7324b9b4fd27Smrg # If the export-symbols file already is a .def file (1st line 7325b9b4fd27Smrg # is EXPORTS), use it as is; otherwise, prepend... 7326b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7327b9b4fd27Smrg cp $export_symbols $output_objdir/$soname.def; 7328b9b4fd27Smrg else 7329b9b4fd27Smrg echo EXPORTS > $output_objdir/$soname.def; 7330b9b4fd27Smrg cat $export_symbols >> $output_objdir/$soname.def; 7331b9b4fd27Smrg fi~ 7332b9b4fd27Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 7333b9b4fd27Smrg else 7334b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7335b9b4fd27Smrg fi 7336b9b4fd27Smrg ;; 7337caade7ccSmrg 7338e8a5466aSmrg haiku*) 7339e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7340e8a5466aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7341e8a5466aSmrg ;; 7342e8a5466aSmrg 7343b9b4fd27Smrg interix[[3-9]]*) 7344b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7345b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7346b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7347b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7348b9b4fd27Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7349b9b4fd27Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 7350b9b4fd27Smrg # default) and relocated if they conflict, which is a slow very memory 7351b9b4fd27Smrg # consuming and fragmenting process. To avoid this, we pick a random, 7352b9b4fd27Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7353b9b4fd27Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7354b9b4fd27Smrg _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' 7355b9b4fd27Smrg _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' 7356b9b4fd27Smrg ;; 7357caade7ccSmrg 7358e8a5466aSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 7359b9b4fd27Smrg tmp_diet=no 7360b9b4fd27Smrg if test "$host_os" = linux-dietlibc; then 7361b9b4fd27Smrg case $cc_basename in 7362b9b4fd27Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 7363b9b4fd27Smrg esac 7364b9b4fd27Smrg fi 7365b9b4fd27Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 7366b9b4fd27Smrg && test "$tmp_diet" = no 7367b9b4fd27Smrg then 7368a5602400Smrg tmp_addflag=' $pic_flag' 7369b9b4fd27Smrg tmp_sharedflag='-shared' 7370b9b4fd27Smrg case $cc_basename,$host_cpu in 7371b9b4fd27Smrg pgcc*) # Portland Group C compiler 7372e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 7373b9b4fd27Smrg tmp_addflag=' $pic_flag' 7374b9b4fd27Smrg ;; 7375e8a5466aSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 7376e8a5466aSmrg # Portland Group f77 and f90 compilers 7377e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 7378b9b4fd27Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 7379b9b4fd27Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 7380b9b4fd27Smrg tmp_addflag=' -i_dynamic' ;; 7381b9b4fd27Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 7382b9b4fd27Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 7383b9b4fd27Smrg ifc* | ifort*) # Intel Fortran compiler 7384b9b4fd27Smrg tmp_addflag=' -nofor_main' ;; 7385b9b4fd27Smrg lf95*) # Lahey Fortran 8.1 7386b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7387b9b4fd27Smrg tmp_sharedflag='--shared' ;; 7388e8a5466aSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 7389b9b4fd27Smrg tmp_sharedflag='-qmkshrobj' 7390b9b4fd27Smrg tmp_addflag= ;; 7391e8a5466aSmrg nvcc*) # Cuda Compiler Driver 2.2 7392e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 7393e8a5466aSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7394e8a5466aSmrg ;; 7395b9b4fd27Smrg esac 7396b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 7397b9b4fd27Smrg *Sun\ C*) # Sun C 5.9 7398e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 7399b9b4fd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7400b9b4fd27Smrg tmp_sharedflag='-G' ;; 7401b9b4fd27Smrg *Sun\ F*) # Sun Fortran 8.3 7402b9b4fd27Smrg tmp_sharedflag='-G' ;; 7403b9b4fd27Smrg esac 7404b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7405caade7ccSmrg 7406b9b4fd27Smrg if test "x$supports_anon_versioning" = xyes; then 7407b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7408b9b4fd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7409b9b4fd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7410b9b4fd27Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7411b9b4fd27Smrg fi 7412caade7ccSmrg 7413b9b4fd27Smrg case $cc_basename in 7414e8a5466aSmrg xlf* | bgf* | bgxlf* | mpixlf*) 7415b9b4fd27Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 7416b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 7417b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7418b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 7419e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 7420b9b4fd27Smrg if test "x$supports_anon_versioning" = xyes; then 7421b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7422b9b4fd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7423b9b4fd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7424e8a5466aSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 7425b9b4fd27Smrg fi 7426b9b4fd27Smrg ;; 7427b9b4fd27Smrg esac 7428b9b4fd27Smrg else 7429b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7430b9b4fd27Smrg fi 7431b9b4fd27Smrg ;; 7432caade7ccSmrg 7433b9b4fd27Smrg netbsd*) 7434b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7435b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 7436b9b4fd27Smrg wlarc= 7437b9b4fd27Smrg else 7438a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7439a5602400Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7440b9b4fd27Smrg fi 7441b9b4fd27Smrg ;; 7442caade7ccSmrg 7443b9b4fd27Smrg solaris*) 7444b9b4fd27Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 7445b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7446b9b4fd27Smrg cat <<_LT_EOF 1>&2 7447caade7ccSmrg 7448b9b4fd27Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 7449b9b4fd27Smrg*** create shared libraries on Solaris systems. Therefore, libtool 7450b9b4fd27Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 7451b9b4fd27Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 7452b9b4fd27Smrg*** your PATH or compiler configuration so that the native linker is 7453b9b4fd27Smrg*** used, and then restart. 7454caade7ccSmrg 7455b9b4fd27Smrg_LT_EOF 7456b9b4fd27Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7457a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7458a5602400Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7459b9b4fd27Smrg else 7460b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7461b9b4fd27Smrg fi 7462b9b4fd27Smrg ;; 7463caade7ccSmrg 7464b9b4fd27Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 7465b9b4fd27Smrg case `$LD -v 2>&1` in 7466b9b4fd27Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 7467b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7468b9b4fd27Smrg cat <<_LT_EOF 1>&2 7469caade7ccSmrg 7470b9b4fd27Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 7471b9b4fd27Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 7472b9b4fd27Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 7473b9b4fd27Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 7474b9b4fd27Smrg*** your PATH or compiler configuration so that the native linker is 7475b9b4fd27Smrg*** used, and then restart. 7476caade7ccSmrg 7477b9b4fd27Smrg_LT_EOF 7478b9b4fd27Smrg ;; 7479b9b4fd27Smrg *) 7480b9b4fd27Smrg # For security reasons, it is highly recommended that you always 7481b9b4fd27Smrg # use absolute paths for naming shared libraries, and exclude the 7482b9b4fd27Smrg # DT_RUNPATH tag from executables and libraries. But doing so 7483b9b4fd27Smrg # requires that you compile everything twice, which is a pain. 7484b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7485b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7486b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7487b9b4fd27Smrg _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' 7488b9b4fd27Smrg else 7489b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7490b9b4fd27Smrg fi 7491b9b4fd27Smrg ;; 7492b9b4fd27Smrg esac 7493b9b4fd27Smrg ;; 7494caade7ccSmrg 7495b9b4fd27Smrg sunos4*) 7496b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7497b9b4fd27Smrg wlarc= 7498b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7499b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7500b9b4fd27Smrg ;; 7501caade7ccSmrg 7502b9b4fd27Smrg *) 7503b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7504a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7505a5602400Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7506b9b4fd27Smrg else 7507b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7508b9b4fd27Smrg fi 7509b9b4fd27Smrg ;; 7510b9b4fd27Smrg esac 7511caade7ccSmrg 7512b9b4fd27Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 7513b9b4fd27Smrg runpath_var= 7514b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7515b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 7516b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7517b9b4fd27Smrg fi 7518b9b4fd27Smrg else 7519b9b4fd27Smrg # PORTME fill in a description of your system's linker (not GNU ld) 7520b9b4fd27Smrg case $host_os in 7521b9b4fd27Smrg aix3*) 7522b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7523b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7524b9b4fd27Smrg _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' 7525b9b4fd27Smrg # Note: this linker hardcodes the directories in LIBPATH if there 7526b9b4fd27Smrg # are no directories specified by -L. 7527b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7528b9b4fd27Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 7529b9b4fd27Smrg # Neither direct hardcoding nor static linking is supported with a 7530b9b4fd27Smrg # broken collect2. 7531b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7532b9b4fd27Smrg fi 7533b9b4fd27Smrg ;; 7534caade7ccSmrg 7535b9b4fd27Smrg aix[[4-9]]*) 7536b9b4fd27Smrg if test "$host_cpu" = ia64; then 7537b9b4fd27Smrg # On IA64, the linker does run time linking by default, so we don't 7538b9b4fd27Smrg # have to do anything special. 7539b9b4fd27Smrg aix_use_runtimelinking=no 7540b9b4fd27Smrg exp_sym_flag='-Bexport' 7541b9b4fd27Smrg no_entry_flag="" 7542b9b4fd27Smrg else 7543b9b4fd27Smrg # If we're using GNU nm, then we don't want the "-C" option. 7544b9b4fd27Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 7545e8a5466aSmrg # Also, AIX nm treats weak defined symbols like other global 7546e8a5466aSmrg # defined symbols, whereas GNU nm marks them as "W". 7547b9b4fd27Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 7548e8a5466aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 7549b9b4fd27Smrg else 7550b9b4fd27Smrg _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' 7551b9b4fd27Smrg fi 7552b9b4fd27Smrg aix_use_runtimelinking=no 7553caade7ccSmrg 7554b9b4fd27Smrg # Test if we are trying to use run time linking or normal 7555b9b4fd27Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7556b9b4fd27Smrg # need to do runtime linking. 7557b9b4fd27Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7558b9b4fd27Smrg for ld_flag in $LDFLAGS; do 7559b9b4fd27Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 7560b9b4fd27Smrg aix_use_runtimelinking=yes 7561b9b4fd27Smrg break 7562b9b4fd27Smrg fi 7563b9b4fd27Smrg done 7564b9b4fd27Smrg ;; 7565b9b4fd27Smrg esac 7566caade7ccSmrg 7567b9b4fd27Smrg exp_sym_flag='-bexport' 7568b9b4fd27Smrg no_entry_flag='-bnoentry' 7569b9b4fd27Smrg fi 7570caade7ccSmrg 7571b9b4fd27Smrg # When large executables or shared objects are built, AIX ld can 7572b9b4fd27Smrg # have problems creating the table of contents. If linking a library 7573b9b4fd27Smrg # or program results in "error TOC overflow" add -mminimal-toc to 7574b9b4fd27Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7575b9b4fd27Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7576caade7ccSmrg 7577b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='' 7578b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7579b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7580b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7581b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7582b9b4fd27Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7583485f0483Smrg 7584b9b4fd27Smrg if test "$GCC" = yes; then 7585b9b4fd27Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7586b9b4fd27Smrg # We only want to do this on AIX 4.2 and lower, the check 7587b9b4fd27Smrg # below for broken collect2 doesn't work under 4.3+ 7588b9b4fd27Smrg collect2name=`${CC} -print-prog-name=collect2` 7589b9b4fd27Smrg if test -f "$collect2name" && 7590b9b4fd27Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7591b9b4fd27Smrg then 7592b9b4fd27Smrg # We have reworked collect2 7593b9b4fd27Smrg : 7594b9b4fd27Smrg else 7595b9b4fd27Smrg # We have old collect2 7596b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7597b9b4fd27Smrg # It fails to find uninstalled libraries when the uninstalled 7598b9b4fd27Smrg # path is not listed in the libpath. Setting hardcode_minus_L 7599b9b4fd27Smrg # to unsupported forces relinking 7600b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7601b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7602b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7603b9b4fd27Smrg fi 7604b9b4fd27Smrg ;; 7605b9b4fd27Smrg esac 7606b9b4fd27Smrg shared_flag='-shared' 7607b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 7608b9b4fd27Smrg shared_flag="$shared_flag "'${wl}-G' 7609b9b4fd27Smrg fi 7610b9b4fd27Smrg else 7611b9b4fd27Smrg # not using gcc 7612b9b4fd27Smrg if test "$host_cpu" = ia64; then 7613b9b4fd27Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7614b9b4fd27Smrg # chokes on -Wl,-G. The following line is correct: 7615b9b4fd27Smrg shared_flag='-G' 7616b9b4fd27Smrg else 7617b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 7618b9b4fd27Smrg shared_flag='${wl}-G' 7619b9b4fd27Smrg else 7620b9b4fd27Smrg shared_flag='${wl}-bM:SRE' 7621b9b4fd27Smrg fi 7622b9b4fd27Smrg fi 7623b9b4fd27Smrg fi 7624caade7ccSmrg 7625b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7626b9b4fd27Smrg # It seems that -bexpall does not export symbols beginning with 7627b9b4fd27Smrg # underscore (_), so it is better to generate a list of symbols to export. 7628b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7629b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 7630b9b4fd27Smrg # Warning - without using the other runtime loading flags (-brtl), 7631b9b4fd27Smrg # -berok will link without error, but may produce a broken library. 7632b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7633b9b4fd27Smrg # Determine the default libpath from the value encoded in an 7634b9b4fd27Smrg # empty executable. 7635a5602400Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 7636b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7637e8a5466aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 7638b9b4fd27Smrg else 7639b9b4fd27Smrg if test "$host_cpu" = ia64; then 7640b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7641b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7642b9b4fd27Smrg _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" 7643b9b4fd27Smrg else 7644b9b4fd27Smrg # Determine the default libpath from the value encoded in an 7645b9b4fd27Smrg # empty executable. 7646a5602400Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 7647b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7648b9b4fd27Smrg # Warning - without using the other run time loading flags, 7649b9b4fd27Smrg # -berok will link without error, but may produce a broken library. 7650b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7651b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7652e8a5466aSmrg if test "$with_gnu_ld" = yes; then 7653e8a5466aSmrg # We only use this code for GNU lds that support --whole-archive. 7654e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7655e8a5466aSmrg else 7656e8a5466aSmrg # Exported symbols can be pulled into shared objects from archives 7657e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7658e8a5466aSmrg fi 7659b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7660b9b4fd27Smrg # This is similar to how AIX traditionally builds its shared libraries. 7661b9b4fd27Smrg _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' 7662b9b4fd27Smrg fi 7663b9b4fd27Smrg fi 7664b9b4fd27Smrg ;; 7665caade7ccSmrg 7666b9b4fd27Smrg amigaos*) 7667b9b4fd27Smrg case $host_cpu in 7668b9b4fd27Smrg powerpc) 7669b9b4fd27Smrg # see comment about AmigaOS4 .so support 7670b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7671b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 7672b9b4fd27Smrg ;; 7673b9b4fd27Smrg m68k) 7674b9b4fd27Smrg _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)' 7675b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7676b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7677b9b4fd27Smrg ;; 7678b9b4fd27Smrg esac 7679b9b4fd27Smrg ;; 7680caade7ccSmrg 7681b9b4fd27Smrg bsdi[[45]]*) 7682b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7683b9b4fd27Smrg ;; 7684caade7ccSmrg 7685b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 7686b9b4fd27Smrg # When not using gcc, we currently assume that we are using 7687b9b4fd27Smrg # Microsoft Visual C++. 7688b9b4fd27Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 7689b9b4fd27Smrg # no search path for DLLs. 7690a5602400Smrg case $cc_basename in 7691a5602400Smrg cl*) 7692a5602400Smrg # Native MSVC 7693a5602400Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7694a5602400Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7695a5602400Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7696a5602400Smrg _LT_TAGVAR(file_list_spec, $1)='@' 7697a5602400Smrg # Tell ltmain to make .lib files, not .a files. 7698a5602400Smrg libext=lib 7699a5602400Smrg # Tell ltmain to make .dll files, not .so files. 7700a5602400Smrg shrext_cmds=".dll" 7701a5602400Smrg # FIXME: Setting linknames here is a bad hack. 7702a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7703a5602400Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7704a5602400Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7705a5602400Smrg else 7706a5602400Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7707a5602400Smrg fi~ 7708a5602400Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7709a5602400Smrg linknames=' 7710a5602400Smrg # The linker will not automatically build a static lib if we build a DLL. 7711a5602400Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7712a5602400Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7713a5602400Smrg _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' 7714a5602400Smrg # Don't use ranlib 7715a5602400Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7716a5602400Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7717a5602400Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 7718a5602400Smrg case $lt_outputfile in 7719a5602400Smrg *.exe|*.EXE) ;; 7720a5602400Smrg *) 7721a5602400Smrg lt_outputfile="$lt_outputfile.exe" 7722a5602400Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 7723a5602400Smrg ;; 7724a5602400Smrg esac~ 7725a5602400Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7726a5602400Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7727a5602400Smrg $RM "$lt_outputfile.manifest"; 7728a5602400Smrg fi' 7729a5602400Smrg ;; 7730a5602400Smrg *) 7731a5602400Smrg # Assume MSVC wrapper 7732a5602400Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7733a5602400Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7734a5602400Smrg # Tell ltmain to make .lib files, not .a files. 7735a5602400Smrg libext=lib 7736a5602400Smrg # Tell ltmain to make .dll files, not .so files. 7737a5602400Smrg shrext_cmds=".dll" 7738a5602400Smrg # FIXME: Setting linknames here is a bad hack. 7739a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 7740a5602400Smrg # The linker will automatically build a .lib file if we build a DLL. 7741a5602400Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7742a5602400Smrg # FIXME: Should let the user specify the lib program. 7743a5602400Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 7744a5602400Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7745a5602400Smrg ;; 7746a5602400Smrg esac 7747b9b4fd27Smrg ;; 7748caade7ccSmrg 7749b9b4fd27Smrg darwin* | rhapsody*) 7750b9b4fd27Smrg _LT_DARWIN_LINKER_FEATURES($1) 7751b9b4fd27Smrg ;; 7752caade7ccSmrg 7753b9b4fd27Smrg dgux*) 7754b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7755b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7756b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7757b9b4fd27Smrg ;; 7758caade7ccSmrg 7759b9b4fd27Smrg freebsd1*) 7760b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7761b9b4fd27Smrg ;; 7762caade7ccSmrg 7763b9b4fd27Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7764b9b4fd27Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 7765b9b4fd27Smrg # does not break anything, and helps significantly (at the cost of a little 7766b9b4fd27Smrg # extra space). 7767b9b4fd27Smrg freebsd2.2*) 7768b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7769b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7770b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7771b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7772b9b4fd27Smrg ;; 7773caade7ccSmrg 7774b9b4fd27Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7775b9b4fd27Smrg freebsd2*) 7776b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7777b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7778b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7779b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7780b9b4fd27Smrg ;; 7781caade7ccSmrg 7782b9b4fd27Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7783b9b4fd27Smrg freebsd* | dragonfly*) 7784a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7785b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7786b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7787b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7788b9b4fd27Smrg ;; 7789caade7ccSmrg 7790b9b4fd27Smrg hpux9*) 7791b9b4fd27Smrg if test "$GCC" = yes; then 7792a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7793b9b4fd27Smrg else 7794b9b4fd27Smrg _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' 7795b9b4fd27Smrg fi 7796b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7797b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7798b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7799caade7ccSmrg 7800b9b4fd27Smrg # hardcode_minus_L: Not really in the search PATH, 7801b9b4fd27Smrg # but as the default location of the library. 7802b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7803b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7804b9b4fd27Smrg ;; 7805caade7ccSmrg 7806b9b4fd27Smrg hpux10*) 7807e8a5466aSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7808a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7809b9b4fd27Smrg else 7810b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7811b9b4fd27Smrg fi 7812b9b4fd27Smrg if test "$with_gnu_ld" = no; then 7813b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7814b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7815b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7816b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7817b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7818b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7819b9b4fd27Smrg # hardcode_minus_L: Not really in the search PATH, 7820b9b4fd27Smrg # but as the default location of the library. 7821b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7822b9b4fd27Smrg fi 7823b9b4fd27Smrg ;; 7824caade7ccSmrg 7825b9b4fd27Smrg hpux11*) 7826e8a5466aSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7827b9b4fd27Smrg case $host_cpu in 7828b9b4fd27Smrg hppa*64*) 7829b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7830b9b4fd27Smrg ;; 7831b9b4fd27Smrg ia64*) 7832a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7833b9b4fd27Smrg ;; 7834b9b4fd27Smrg *) 7835a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7836b9b4fd27Smrg ;; 7837b9b4fd27Smrg esac 7838b9b4fd27Smrg else 7839b9b4fd27Smrg case $host_cpu in 7840b9b4fd27Smrg hppa*64*) 7841b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7842b9b4fd27Smrg ;; 7843b9b4fd27Smrg ia64*) 7844b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7845b9b4fd27Smrg ;; 7846b9b4fd27Smrg *) 7847e8a5466aSmrg m4_if($1, [], [ 7848e8a5466aSmrg # Older versions of the 11.00 compiler do not understand -b yet 7849e8a5466aSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 7850e8a5466aSmrg _LT_LINKER_OPTION([if $CC understands -b], 7851e8a5466aSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 7852e8a5466aSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 7853e8a5466aSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 7854e8a5466aSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 7855b9b4fd27Smrg ;; 7856b9b4fd27Smrg esac 7857b9b4fd27Smrg fi 7858b9b4fd27Smrg if test "$with_gnu_ld" = no; then 7859b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7860b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7861caade7ccSmrg 7862b9b4fd27Smrg case $host_cpu in 7863b9b4fd27Smrg hppa*64*|ia64*) 7864b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7865b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7866b9b4fd27Smrg ;; 7867b9b4fd27Smrg *) 7868b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7869b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7870b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7871caade7ccSmrg 7872b9b4fd27Smrg # hardcode_minus_L: Not really in the search PATH, 7873b9b4fd27Smrg # but as the default location of the library. 7874b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7875b9b4fd27Smrg ;; 7876b9b4fd27Smrg esac 7877b9b4fd27Smrg fi 7878b9b4fd27Smrg ;; 7879caade7ccSmrg 7880b9b4fd27Smrg irix5* | irix6* | nonstopux*) 7881b9b4fd27Smrg if test "$GCC" = yes; then 7882a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7883b9b4fd27Smrg # Try to use the -exported_symbol ld option, if it does not 7884b9b4fd27Smrg # work, assume that -exports_file does not work either and 7885b9b4fd27Smrg # implicitly export all symbols. 7886a5602400Smrg # This should be the same for all languages, so no per-tag cache variable. 7887a5602400Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 7888a5602400Smrg [lt_cv_irix_exported_symbol], 7889a5602400Smrg [save_LDFLAGS="$LDFLAGS" 7890a5602400Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 7891a5602400Smrg AC_LINK_IFELSE( 7892a5602400Smrg [AC_LANG_SOURCE( 7893a5602400Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 7894a5602400Smrg [C++], [[int foo (void) { return 0; }]], 7895a5602400Smrg [Fortran 77], [[ 7896a5602400Smrg subroutine foo 7897a5602400Smrg end]], 7898a5602400Smrg [Fortran], [[ 7899a5602400Smrg subroutine foo 7900a5602400Smrg end]])])], 7901a5602400Smrg [lt_cv_irix_exported_symbol=yes], 7902a5602400Smrg [lt_cv_irix_exported_symbol=no]) 7903a5602400Smrg LDFLAGS="$save_LDFLAGS"]) 7904a5602400Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 7905a5602400Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 7906a5602400Smrg fi 7907b9b4fd27Smrg else 7908e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 7909e8a5466aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 7910b9b4fd27Smrg fi 7911b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7912b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7913b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7914b9b4fd27Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 7915b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7916b9b4fd27Smrg ;; 7917caade7ccSmrg 7918b9b4fd27Smrg netbsd*) 7919b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7920b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7921b9b4fd27Smrg else 7922b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7923b9b4fd27Smrg fi 7924b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7925b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7926b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7927b9b4fd27Smrg ;; 7928caade7ccSmrg 7929b9b4fd27Smrg newsos6) 7930b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7931b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7932b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7933b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7934b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7935b9b4fd27Smrg ;; 7936caade7ccSmrg 7937b9b4fd27Smrg *nto* | *qnx*) 7938b9b4fd27Smrg ;; 7939caade7ccSmrg 7940b9b4fd27Smrg openbsd*) 7941b9b4fd27Smrg if test -f /usr/libexec/ld.so; then 7942b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7943b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7944b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7945b9b4fd27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7946b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7947b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7948b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7949b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7950b9b4fd27Smrg else 7951b9b4fd27Smrg case $host_os in 7952b9b4fd27Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7953b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7954b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7955b9b4fd27Smrg ;; 7956b9b4fd27Smrg *) 7957b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7958b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7959b9b4fd27Smrg ;; 7960b9b4fd27Smrg esac 7961b9b4fd27Smrg fi 7962b9b4fd27Smrg else 7963b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7964b9b4fd27Smrg fi 7965b9b4fd27Smrg ;; 7966caade7ccSmrg 7967b9b4fd27Smrg os2*) 7968b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7969b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7970b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7971e8a5466aSmrg _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' 7972b9b4fd27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7973b9b4fd27Smrg ;; 7974caade7ccSmrg 7975b9b4fd27Smrg osf3*) 7976b9b4fd27Smrg if test "$GCC" = yes; then 7977b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7978e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7979b9b4fd27Smrg else 7980b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7981e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 7982b9b4fd27Smrg fi 7983b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7984b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7985b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7986b9b4fd27Smrg ;; 7987caade7ccSmrg 7988b9b4fd27Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 7989b9b4fd27Smrg if test "$GCC" = yes; then 7990b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7991a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7992b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7993b9b4fd27Smrg else 7994b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7995e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 7996b9b4fd27Smrg _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~ 7997e8a5466aSmrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 7998caade7ccSmrg 7999b9b4fd27Smrg # Both c and cxx compiler support -rpath directly 8000b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8001b9b4fd27Smrg fi 8002b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 8003b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8004b9b4fd27Smrg ;; 8005caade7ccSmrg 8006b9b4fd27Smrg solaris*) 8007b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 8008b9b4fd27Smrg if test "$GCC" = yes; then 8009b9b4fd27Smrg wlarc='${wl}' 8010a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 8011b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8012a5602400Smrg $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 8013b9b4fd27Smrg else 8014b9b4fd27Smrg case `$CC -V 2>&1` in 8015b9b4fd27Smrg *"Compilers 5.0"*) 8016b9b4fd27Smrg wlarc='' 8017b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 8018b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8019b9b4fd27Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 8020b9b4fd27Smrg ;; 8021b9b4fd27Smrg *) 8022b9b4fd27Smrg wlarc='${wl}' 8023b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 8024b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8025b9b4fd27Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 8026b9b4fd27Smrg ;; 8027b9b4fd27Smrg esac 8028b9b4fd27Smrg fi 8029b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8030b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8031b9b4fd27Smrg case $host_os in 8032b9b4fd27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8033b9b4fd27Smrg *) 8034b9b4fd27Smrg # The compiler driver will combine and reorder linker options, 8035b9b4fd27Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 8036b9b4fd27Smrg # but is careful enough not to reorder. 8037b9b4fd27Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 8038b9b4fd27Smrg if test "$GCC" = yes; then 8039b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 8040b9b4fd27Smrg else 8041b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 8042b9b4fd27Smrg fi 8043b9b4fd27Smrg ;; 8044b9b4fd27Smrg esac 8045b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8046b9b4fd27Smrg ;; 8047caade7ccSmrg 8048b9b4fd27Smrg sunos4*) 8049b9b4fd27Smrg if test "x$host_vendor" = xsequent; then 8050b9b4fd27Smrg # Use $CC to link under sequent, because it throws in some extra .o 8051b9b4fd27Smrg # files that make .init and .fini sections work. 8052b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 8053b9b4fd27Smrg else 8054b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 8055b9b4fd27Smrg fi 8056b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8057b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8058b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8059b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8060b9b4fd27Smrg ;; 8061caade7ccSmrg 8062b9b4fd27Smrg sysv4) 8063b9b4fd27Smrg case $host_vendor in 8064b9b4fd27Smrg sni) 8065b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8066b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 8067b9b4fd27Smrg ;; 8068b9b4fd27Smrg siemens) 8069b9b4fd27Smrg ## LD is ld it makes a PLAMLIB 8070b9b4fd27Smrg ## CC just makes a GrossModule. 8071b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 8072b9b4fd27Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 8073b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8074b9b4fd27Smrg ;; 8075b9b4fd27Smrg motorola) 8076b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8077b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 8078b9b4fd27Smrg ;; 8079b9b4fd27Smrg esac 8080b9b4fd27Smrg runpath_var='LD_RUN_PATH' 8081b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8082b9b4fd27Smrg ;; 8083caade7ccSmrg 8084b9b4fd27Smrg sysv4.3*) 8085b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8086b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8087b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 8088b9b4fd27Smrg ;; 8089caade7ccSmrg 8090b9b4fd27Smrg sysv4*MP*) 8091b9b4fd27Smrg if test -d /usr/nec; then 8092b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8093b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8094b9b4fd27Smrg runpath_var=LD_RUN_PATH 8095b9b4fd27Smrg hardcode_runpath_var=yes 8096b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8097b9b4fd27Smrg fi 8098b9b4fd27Smrg ;; 8099caade7ccSmrg 8100b9b4fd27Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 8101b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8102b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8103b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8104b9b4fd27Smrg runpath_var='LD_RUN_PATH' 8105caade7ccSmrg 8106b9b4fd27Smrg if test "$GCC" = yes; then 8107b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8108b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8109b9b4fd27Smrg else 8110b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8111b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8112b9b4fd27Smrg fi 8113b9b4fd27Smrg ;; 8114caade7ccSmrg 8115b9b4fd27Smrg sysv5* | sco3.2v5* | sco5v6*) 8116b9b4fd27Smrg # Note: We can NOT use -z defs as we might desire, because we do not 8117b9b4fd27Smrg # link with -lc, and that would cause any symbols used from libc to 8118b9b4fd27Smrg # always be unresolved, which means just about no library would 8119b9b4fd27Smrg # ever link correctly. If we're not using GNU ld we use -z text 8120b9b4fd27Smrg # though, which does catch some bad symbols but isn't as heavy-handed 8121b9b4fd27Smrg # as -z defs. 8122b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8123b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8124b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8125b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8126b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 8127b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8128b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8129b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8130b9b4fd27Smrg runpath_var='LD_RUN_PATH' 8131caade7ccSmrg 8132b9b4fd27Smrg if test "$GCC" = yes; then 8133b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8134b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8135b9b4fd27Smrg else 8136b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8137b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8138b9b4fd27Smrg fi 8139b9b4fd27Smrg ;; 8140caade7ccSmrg 8141b9b4fd27Smrg uts4*) 8142b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8143b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8144b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8145b9b4fd27Smrg ;; 8146caade7ccSmrg 8147b9b4fd27Smrg *) 8148b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8149b9b4fd27Smrg ;; 8150b9b4fd27Smrg esac 8151caade7ccSmrg 8152b9b4fd27Smrg if test x$host_vendor = xsni; then 8153b9b4fd27Smrg case $host in 8154b9b4fd27Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 8155b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 8156b9b4fd27Smrg ;; 8157b9b4fd27Smrg esac 8158b9b4fd27Smrg fi 8159caade7ccSmrg fi 8160b9b4fd27Smrg]) 8161b9b4fd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8162b9b4fd27Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8163caade7ccSmrg 8164b9b4fd27Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 8165caade7ccSmrg 8166b9b4fd27Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 8167b9b4fd27Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 8168b9b4fd27Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 8169b9b4fd27Smrg [The commands to extract the exported symbol list from a shared archive]) 8170caade7ccSmrg 8171b9b4fd27Smrg# 8172b9b4fd27Smrg# Do we need to explicitly link libc? 8173b9b4fd27Smrg# 8174b9b4fd27Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 8175b9b4fd27Smrgx|xyes) 8176b9b4fd27Smrg # Assume -lc should be added 8177b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8178caade7ccSmrg 8179b9b4fd27Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 8180b9b4fd27Smrg case $_LT_TAGVAR(archive_cmds, $1) in 8181b9b4fd27Smrg *'~'*) 8182b9b4fd27Smrg # FIXME: we may have to deal with multi-command sequences. 8183b9b4fd27Smrg ;; 8184b9b4fd27Smrg '$CC '*) 8185b9b4fd27Smrg # Test whether the compiler implicitly links with -lc since on some 8186b9b4fd27Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 8187b9b4fd27Smrg # to ld, don't add -lc before -lgcc. 8188e8a5466aSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 8189e8a5466aSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 8190e8a5466aSmrg [$RM conftest* 8191e8a5466aSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 8192e8a5466aSmrg 8193e8a5466aSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 8194e8a5466aSmrg soname=conftest 8195e8a5466aSmrg lib=conftest 8196e8a5466aSmrg libobjs=conftest.$ac_objext 8197e8a5466aSmrg deplibs= 8198e8a5466aSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 8199e8a5466aSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 8200e8a5466aSmrg compiler_flags=-v 8201e8a5466aSmrg linker_flags=-v 8202e8a5466aSmrg verstring= 8203e8a5466aSmrg output_objdir=. 8204e8a5466aSmrg libname=conftest 8205e8a5466aSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 8206e8a5466aSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 8207e8a5466aSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 8208e8a5466aSmrg then 8209e8a5466aSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8210e8a5466aSmrg else 8211e8a5466aSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8212e8a5466aSmrg fi 8213e8a5466aSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 8214e8a5466aSmrg else 8215e8a5466aSmrg cat conftest.err 1>&5 8216e8a5466aSmrg fi 8217e8a5466aSmrg $RM conftest* 8218e8a5466aSmrg ]) 8219e8a5466aSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 8220b9b4fd27Smrg ;; 8221b9b4fd27Smrg esac 8222caade7ccSmrg fi 8223caade7ccSmrg ;; 8224caade7ccSmrgesac 8225caade7ccSmrg 8226b9b4fd27Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 8227b9b4fd27Smrg [Whether or not to add -lc for building shared libraries]) 8228b9b4fd27Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 8229b9b4fd27Smrg [enable_shared_with_static_runtimes], [0], 8230b9b4fd27Smrg [Whether or not to disallow shared libs when runtime libs are static]) 8231b9b4fd27Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 8232b9b4fd27Smrg [Compiler flag to allow reflexive dlopens]) 8233b9b4fd27Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 8234b9b4fd27Smrg [Compiler flag to generate shared objects directly from archives]) 8235b9b4fd27Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 8236b9b4fd27Smrg [Whether the compiler copes with passing no objects directly]) 8237b9b4fd27Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 8238b9b4fd27Smrg [Create an old-style archive from a shared archive]) 8239b9b4fd27Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 8240b9b4fd27Smrg [Create a temporary old-style archive to link instead of a shared archive]) 8241b9b4fd27Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 8242b9b4fd27Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 8243b9b4fd27Smrg_LT_TAGDECL([], [module_cmds], [2], 8244b9b4fd27Smrg [Commands used to build a loadable module if different from building 8245b9b4fd27Smrg a shared archive.]) 8246b9b4fd27Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 8247b9b4fd27Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 8248b9b4fd27Smrg [Whether we are building with GNU ld or not]) 8249b9b4fd27Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 8250b9b4fd27Smrg [Flag that allows shared libraries with undefined symbols to be built]) 8251b9b4fd27Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 8252b9b4fd27Smrg [Flag that enforces no undefined symbols]) 8253b9b4fd27Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 8254b9b4fd27Smrg [Flag to hardcode $libdir into a binary during linking. 8255b9b4fd27Smrg This must work even if $libdir does not exist]) 8256b9b4fd27Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 8257b9b4fd27Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 8258b9b4fd27Smrg during linking. This must work even if $libdir does not exist]]) 8259b9b4fd27Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 8260b9b4fd27Smrg [Whether we need a single "-rpath" flag with a separated argument]) 8261b9b4fd27Smrg_LT_TAGDECL([], [hardcode_direct], [0], 8262b9b4fd27Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 8263b9b4fd27Smrg DIR into the resulting binary]) 8264b9b4fd27Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 8265b9b4fd27Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 8266b9b4fd27Smrg DIR into the resulting binary and the resulting library dependency is 8267b9b4fd27Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 8268b9b4fd27Smrg library is relocated]) 8269b9b4fd27Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 8270b9b4fd27Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 8271b9b4fd27Smrg into the resulting binary]) 8272b9b4fd27Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 8273b9b4fd27Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 8274b9b4fd27Smrg into the resulting binary]) 8275b9b4fd27Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 8276b9b4fd27Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 8277b9b4fd27Smrg into the library and all subsequent libraries and executables linked 8278b9b4fd27Smrg against it]) 8279b9b4fd27Smrg_LT_TAGDECL([], [inherit_rpath], [0], 8280b9b4fd27Smrg [Set to yes if linker adds runtime paths of dependent libraries 8281b9b4fd27Smrg to runtime path list]) 8282b9b4fd27Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 8283b9b4fd27Smrg [Whether libtool must link a program against all its dependency libraries]) 8284b9b4fd27Smrg_LT_TAGDECL([], [always_export_symbols], [0], 8285b9b4fd27Smrg [Set to "yes" if exported symbols are required]) 8286b9b4fd27Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 8287b9b4fd27Smrg [The commands to list exported symbols]) 8288b9b4fd27Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 8289b9b4fd27Smrg [Symbols that should not be listed in the preloaded symbols]) 8290b9b4fd27Smrg_LT_TAGDECL([], [include_expsyms], [1], 8291b9b4fd27Smrg [Symbols that must always be exported]) 8292b9b4fd27Smrg_LT_TAGDECL([], [prelink_cmds], [2], 8293b9b4fd27Smrg [Commands necessary for linking programs (against libraries) with templates]) 8294a5602400Smrg_LT_TAGDECL([], [postlink_cmds], [2], 8295a5602400Smrg [Commands necessary for finishing linking programs]) 8296b9b4fd27Smrg_LT_TAGDECL([], [file_list_spec], [1], 8297b9b4fd27Smrg [Specify filename containing input files]) 8298b9b4fd27Smrgdnl FIXME: Not yet implemented 8299b9b4fd27Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 8300b9b4fd27Smrgdnl [Compiler flag to generate thread safe objects]) 8301b9b4fd27Smrg])# _LT_LINKER_SHLIBS 8302b9b4fd27Smrg 8303b9b4fd27Smrg 8304b9b4fd27Smrg# _LT_LANG_C_CONFIG([TAG]) 8305b9b4fd27Smrg# ------------------------ 8306b9b4fd27Smrg# Ensure that the configuration variables for a C compiler are suitably 8307b9b4fd27Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 8308b9b4fd27Smrg# the compiler configuration to `libtool'. 8309b9b4fd27Smrgm4_defun([_LT_LANG_C_CONFIG], 8310b9b4fd27Smrg[m4_require([_LT_DECL_EGREP])dnl 8311b9b4fd27Smrglt_save_CC="$CC" 8312b9b4fd27SmrgAC_LANG_PUSH(C) 8313b9b4fd27Smrg 8314b9b4fd27Smrg# Source file extension for C test sources. 8315b9b4fd27Smrgac_ext=c 8316b9b4fd27Smrg 8317b9b4fd27Smrg# Object file extension for compiled C test sources. 8318b9b4fd27Smrgobjext=o 8319b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 8320caade7ccSmrg 8321b9b4fd27Smrg# Code to be used in simple compile tests 8322b9b4fd27Smrglt_simple_compile_test_code="int some_variable = 0;" 8323caade7ccSmrg 8324b9b4fd27Smrg# Code to be used in simple link tests 8325b9b4fd27Smrglt_simple_link_test_code='int main(){return(0);}' 8326caade7ccSmrg 8327b9b4fd27Smrg_LT_TAG_COMPILER 8328b9b4fd27Smrg# Save the default compiler, since it gets overwritten when the other 8329b9b4fd27Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 8330b9b4fd27Smrgcompiler_DEFAULT=$CC 8331caade7ccSmrg 8332b9b4fd27Smrg# save warnings/boilerplate of simple test code 8333b9b4fd27Smrg_LT_COMPILER_BOILERPLATE 8334b9b4fd27Smrg_LT_LINKER_BOILERPLATE 8335caade7ccSmrg 8336b9b4fd27Smrgif test -n "$compiler"; then 8337b9b4fd27Smrg _LT_COMPILER_NO_RTTI($1) 8338b9b4fd27Smrg _LT_COMPILER_PIC($1) 8339b9b4fd27Smrg _LT_COMPILER_C_O($1) 8340b9b4fd27Smrg _LT_COMPILER_FILE_LOCKS($1) 8341b9b4fd27Smrg _LT_LINKER_SHLIBS($1) 8342b9b4fd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 8343b9b4fd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8344b9b4fd27Smrg LT_SYS_DLOPEN_SELF 8345b9b4fd27Smrg _LT_CMD_STRIPLIB 8346b9b4fd27Smrg 8347b9b4fd27Smrg # Report which library types will actually be built 8348b9b4fd27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8349b9b4fd27Smrg AC_MSG_RESULT([$can_build_shared]) 8350b9b4fd27Smrg 8351b9b4fd27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 8352b9b4fd27Smrg test "$can_build_shared" = "no" && enable_shared=no 8353b9b4fd27Smrg 8354b9b4fd27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 8355b9b4fd27Smrg # are all built from PIC. 8356b9b4fd27Smrg case $host_os in 8357b9b4fd27Smrg aix3*) 8358b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 8359b9b4fd27Smrg if test -n "$RANLIB"; then 8360b9b4fd27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8361b9b4fd27Smrg postinstall_cmds='$RANLIB $lib' 8362b9b4fd27Smrg fi 8363b9b4fd27Smrg ;; 8364caade7ccSmrg 8365b9b4fd27Smrg aix[[4-9]]*) 8366b9b4fd27Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8367b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 8368b9b4fd27Smrg fi 8369b9b4fd27Smrg ;; 8370b9b4fd27Smrg esac 8371b9b4fd27Smrg AC_MSG_RESULT([$enable_shared]) 8372caade7ccSmrg 8373b9b4fd27Smrg AC_MSG_CHECKING([whether to build static libraries]) 8374b9b4fd27Smrg # Make sure either enable_shared or enable_static is yes. 8375b9b4fd27Smrg test "$enable_shared" = yes || enable_static=yes 8376b9b4fd27Smrg AC_MSG_RESULT([$enable_static]) 8377caade7ccSmrg 8378b9b4fd27Smrg _LT_CONFIG($1) 8379b9b4fd27Smrgfi 8380b9b4fd27SmrgAC_LANG_POP 8381b9b4fd27SmrgCC="$lt_save_CC" 8382b9b4fd27Smrg])# _LT_LANG_C_CONFIG 8383caade7ccSmrg 8384caade7ccSmrg 8385b9b4fd27Smrg# _LT_LANG_CXX_CONFIG([TAG]) 8386b9b4fd27Smrg# -------------------------- 8387b9b4fd27Smrg# Ensure that the configuration variables for a C++ compiler are suitably 8388b9b4fd27Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 8389b9b4fd27Smrg# the compiler configuration to `libtool'. 8390b9b4fd27Smrgm4_defun([_LT_LANG_CXX_CONFIG], 8391e8a5466aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8392b9b4fd27Smrgm4_require([_LT_DECL_EGREP])dnl 8393a5602400Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 8394e8a5466aSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 8395e8a5466aSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 8396e8a5466aSmrg (test "X$CXX" != "Xg++"))) ; then 8397e8a5466aSmrg AC_PROG_CXXCPP 8398e8a5466aSmrgelse 8399e8a5466aSmrg _lt_caught_CXX_error=yes 8400e8a5466aSmrgfi 8401b9b4fd27Smrg 8402b9b4fd27SmrgAC_LANG_PUSH(C++) 8403b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8404b9b4fd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 8405b9b4fd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 8406b9b4fd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8407b9b4fd27Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 8408b9b4fd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8409b9b4fd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 8410b9b4fd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8411b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8412b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 8413b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8414b9b4fd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8415b9b4fd27Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8416b9b4fd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 8417b9b4fd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 8418b9b4fd27Smrg_LT_TAGVAR(module_cmds, $1)= 8419b9b4fd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 8420b9b4fd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8421b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8422e8a5466aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8423e8a5466aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8424b9b4fd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 8425b9b4fd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8426b9b4fd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8427b9b4fd27Smrg 8428b9b4fd27Smrg# Source file extension for C++ test sources. 8429b9b4fd27Smrgac_ext=cpp 8430b9b4fd27Smrg 8431b9b4fd27Smrg# Object file extension for compiled C++ test sources. 8432b9b4fd27Smrgobjext=o 8433b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 8434b9b4fd27Smrg 8435b9b4fd27Smrg# No sense in running all these tests if we already determined that 8436b9b4fd27Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 8437b9b4fd27Smrg# are currently assumed to apply to all compilers on this platform, 8438b9b4fd27Smrg# and will be corrupted by setting them based on a non-working compiler. 8439b9b4fd27Smrgif test "$_lt_caught_CXX_error" != yes; then 8440b9b4fd27Smrg # Code to be used in simple compile tests 8441b9b4fd27Smrg lt_simple_compile_test_code="int some_variable = 0;" 8442b9b4fd27Smrg 8443b9b4fd27Smrg # Code to be used in simple link tests 8444b9b4fd27Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 8445b9b4fd27Smrg 8446b9b4fd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8447b9b4fd27Smrg _LT_TAG_COMPILER 8448b9b4fd27Smrg 8449b9b4fd27Smrg # save warnings/boilerplate of simple test code 8450b9b4fd27Smrg _LT_COMPILER_BOILERPLATE 8451b9b4fd27Smrg _LT_LINKER_BOILERPLATE 8452b9b4fd27Smrg 8453b9b4fd27Smrg # Allow CC to be a program name with arguments. 8454b9b4fd27Smrg lt_save_CC=$CC 8455a5602400Smrg lt_save_CFLAGS=$CFLAGS 8456b9b4fd27Smrg lt_save_LD=$LD 8457b9b4fd27Smrg lt_save_GCC=$GCC 8458b9b4fd27Smrg GCC=$GXX 8459b9b4fd27Smrg lt_save_with_gnu_ld=$with_gnu_ld 8460b9b4fd27Smrg lt_save_path_LD=$lt_cv_path_LD 8461b9b4fd27Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 8462b9b4fd27Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 8463caade7ccSmrg else 8464b9b4fd27Smrg $as_unset lt_cv_prog_gnu_ld 8465caade7ccSmrg fi 8466b9b4fd27Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 8467b9b4fd27Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 8468caade7ccSmrg else 8469b9b4fd27Smrg $as_unset lt_cv_path_LD 8470caade7ccSmrg fi 8471b9b4fd27Smrg test -z "${LDCXX+set}" || LD=$LDCXX 8472b9b4fd27Smrg CC=${CXX-"c++"} 8473a5602400Smrg CFLAGS=$CXXFLAGS 8474b9b4fd27Smrg compiler=$CC 8475b9b4fd27Smrg _LT_TAGVAR(compiler, $1)=$CC 8476b9b4fd27Smrg _LT_CC_BASENAME([$compiler]) 8477b9b4fd27Smrg 8478b9b4fd27Smrg if test -n "$compiler"; then 8479b9b4fd27Smrg # We don't want -fno-exception when compiling C++ code, so set the 8480b9b4fd27Smrg # no_builtin_flag separately 8481b9b4fd27Smrg if test "$GXX" = yes; then 8482b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 8483b9b4fd27Smrg else 8484b9b4fd27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 8485b9b4fd27Smrg fi 8486caade7ccSmrg 8487b9b4fd27Smrg if test "$GXX" = yes; then 8488b9b4fd27Smrg # Set up default GNU C++ configuration 8489caade7ccSmrg 8490b9b4fd27Smrg LT_PATH_LD 8491caade7ccSmrg 8492b9b4fd27Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 8493b9b4fd27Smrg # archiving commands below assume that GNU ld is being used. 8494b9b4fd27Smrg if test "$with_gnu_ld" = yes; then 8495a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8496a5602400Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 8497caade7ccSmrg 8498b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8499b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8500b9b4fd27Smrg 8501b9b4fd27Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 8502b9b4fd27Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 8503b9b4fd27Smrg # investigate it a little bit more. (MM) 8504b9b4fd27Smrg wlarc='${wl}' 8505b9b4fd27Smrg 8506b9b4fd27Smrg # ancient GNU ld didn't support --whole-archive et. al. 8507b9b4fd27Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 8508b9b4fd27Smrg $GREP 'no-whole-archive' > /dev/null; then 8509b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8510b9b4fd27Smrg else 8511b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8512b9b4fd27Smrg fi 8513b9b4fd27Smrg else 8514b9b4fd27Smrg with_gnu_ld=no 8515b9b4fd27Smrg wlarc= 8516b9b4fd27Smrg 8517b9b4fd27Smrg # A generic and very simple default shared library creation 8518b9b4fd27Smrg # command for GNU C++ for the case where it uses the native 8519b9b4fd27Smrg # linker, instead of GNU ld. If possible, this setting should 8520b9b4fd27Smrg # overridden to take advantage of the native linker features on 8521b9b4fd27Smrg # the platform it is being used on. 8522b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8523caade7ccSmrg fi 8524b9b4fd27Smrg 8525b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8526b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8527b9b4fd27Smrg # linking a shared library. 8528e8a5466aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8529b9b4fd27Smrg 8530b9b4fd27Smrg else 8531b9b4fd27Smrg GXX=no 8532b9b4fd27Smrg with_gnu_ld=no 8533b9b4fd27Smrg wlarc= 8534b9b4fd27Smrg fi 8535b9b4fd27Smrg 8536b9b4fd27Smrg # PORTME: fill in a description of your system's C++ link characteristics 8537b9b4fd27Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8538b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8539caade7ccSmrg case $host_os in 8540b9b4fd27Smrg aix3*) 8541b9b4fd27Smrg # FIXME: insert proper C++ library support 8542b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8543b9b4fd27Smrg ;; 8544485f0483Smrg aix[[4-9]]*) 8545b9b4fd27Smrg if test "$host_cpu" = ia64; then 8546b9b4fd27Smrg # On IA64, the linker does run time linking by default, so we don't 8547b9b4fd27Smrg # have to do anything special. 8548b9b4fd27Smrg aix_use_runtimelinking=no 8549b9b4fd27Smrg exp_sym_flag='-Bexport' 8550b9b4fd27Smrg no_entry_flag="" 8551b9b4fd27Smrg else 8552b9b4fd27Smrg aix_use_runtimelinking=no 8553b9b4fd27Smrg 8554b9b4fd27Smrg # Test if we are trying to use run time linking or normal 8555b9b4fd27Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8556b9b4fd27Smrg # need to do runtime linking. 8557b9b4fd27Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8558b9b4fd27Smrg for ld_flag in $LDFLAGS; do 8559b9b4fd27Smrg case $ld_flag in 8560b9b4fd27Smrg *-brtl*) 8561b9b4fd27Smrg aix_use_runtimelinking=yes 8562b9b4fd27Smrg break 8563b9b4fd27Smrg ;; 8564b9b4fd27Smrg esac 8565b9b4fd27Smrg done 8566b9b4fd27Smrg ;; 8567b9b4fd27Smrg esac 8568b9b4fd27Smrg 8569b9b4fd27Smrg exp_sym_flag='-bexport' 8570b9b4fd27Smrg no_entry_flag='-bnoentry' 8571b9b4fd27Smrg fi 8572b9b4fd27Smrg 8573b9b4fd27Smrg # When large executables or shared objects are built, AIX ld can 8574b9b4fd27Smrg # have problems creating the table of contents. If linking a library 8575b9b4fd27Smrg # or program results in "error TOC overflow" add -mminimal-toc to 8576b9b4fd27Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8577b9b4fd27Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8578b9b4fd27Smrg 8579b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='' 8580b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8581b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8582b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8583b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8584b9b4fd27Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 8585b9b4fd27Smrg 8586b9b4fd27Smrg if test "$GXX" = yes; then 8587b9b4fd27Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8588b9b4fd27Smrg # We only want to do this on AIX 4.2 and lower, the check 8589b9b4fd27Smrg # below for broken collect2 doesn't work under 4.3+ 8590b9b4fd27Smrg collect2name=`${CC} -print-prog-name=collect2` 8591b9b4fd27Smrg if test -f "$collect2name" && 8592b9b4fd27Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8593b9b4fd27Smrg then 8594b9b4fd27Smrg # We have reworked collect2 8595b9b4fd27Smrg : 8596b9b4fd27Smrg else 8597b9b4fd27Smrg # We have old collect2 8598b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8599b9b4fd27Smrg # It fails to find uninstalled libraries when the uninstalled 8600b9b4fd27Smrg # path is not listed in the libpath. Setting hardcode_minus_L 8601b9b4fd27Smrg # to unsupported forces relinking 8602b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8603b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8604b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8605b9b4fd27Smrg fi 8606b9b4fd27Smrg esac 8607b9b4fd27Smrg shared_flag='-shared' 8608b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 8609b9b4fd27Smrg shared_flag="$shared_flag "'${wl}-G' 8610b9b4fd27Smrg fi 8611b9b4fd27Smrg else 8612b9b4fd27Smrg # not using gcc 8613b9b4fd27Smrg if test "$host_cpu" = ia64; then 8614b9b4fd27Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8615b9b4fd27Smrg # chokes on -Wl,-G. The following line is correct: 8616b9b4fd27Smrg shared_flag='-G' 8617b9b4fd27Smrg else 8618b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 8619b9b4fd27Smrg shared_flag='${wl}-G' 8620b9b4fd27Smrg else 8621b9b4fd27Smrg shared_flag='${wl}-bM:SRE' 8622b9b4fd27Smrg fi 8623b9b4fd27Smrg fi 8624b9b4fd27Smrg fi 8625b9b4fd27Smrg 8626b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 8627b9b4fd27Smrg # It seems that -bexpall does not export symbols beginning with 8628b9b4fd27Smrg # underscore (_), so it is better to generate a list of symbols to 8629b9b4fd27Smrg # export. 8630b9b4fd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8631b9b4fd27Smrg if test "$aix_use_runtimelinking" = yes; then 8632b9b4fd27Smrg # Warning - without using the other runtime loading flags (-brtl), 8633b9b4fd27Smrg # -berok will link without error, but may produce a broken library. 8634b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8635b9b4fd27Smrg # Determine the default libpath from the value encoded in an empty 8636b9b4fd27Smrg # executable. 8637a5602400Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8638b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8639b9b4fd27Smrg 8640e8a5466aSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 8641b9b4fd27Smrg else 8642b9b4fd27Smrg if test "$host_cpu" = ia64; then 8643b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 8644b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8645b9b4fd27Smrg _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" 8646b9b4fd27Smrg else 8647b9b4fd27Smrg # Determine the default libpath from the value encoded in an 8648b9b4fd27Smrg # empty executable. 8649a5602400Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 8650b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8651b9b4fd27Smrg # Warning - without using the other run time loading flags, 8652b9b4fd27Smrg # -berok will link without error, but may produce a broken library. 8653b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 8654b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 8655e8a5466aSmrg if test "$with_gnu_ld" = yes; then 8656e8a5466aSmrg # We only use this code for GNU lds that support --whole-archive. 8657e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8658e8a5466aSmrg else 8659e8a5466aSmrg # Exported symbols can be pulled into shared objects from archives 8660e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8661e8a5466aSmrg fi 8662b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8663b9b4fd27Smrg # This is similar to how AIX traditionally builds its shared 8664b9b4fd27Smrg # libraries. 8665b9b4fd27Smrg _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' 8666b9b4fd27Smrg fi 8667b9b4fd27Smrg fi 8668b9b4fd27Smrg ;; 8669b9b4fd27Smrg 8670b9b4fd27Smrg beos*) 8671b9b4fd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8672b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8673b9b4fd27Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8674b9b4fd27Smrg # support --undefined. This deserves some investigation. FIXME 8675b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8676caade7ccSmrg else 8677b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8678caade7ccSmrg fi 8679caade7ccSmrg ;; 8680b9b4fd27Smrg 8681caade7ccSmrg chorus*) 8682b9b4fd27Smrg case $cc_basename in 8683b9b4fd27Smrg *) 8684b9b4fd27Smrg # FIXME: insert proper C++ library support 8685b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8686caade7ccSmrg ;; 8687b9b4fd27Smrg esac 8688b9b4fd27Smrg ;; 8689b9b4fd27Smrg 8690b9b4fd27Smrg cygwin* | mingw* | pw32* | cegcc*) 8691a5602400Smrg case $GXX,$cc_basename in 8692a5602400Smrg ,cl* | no,cl*) 8693a5602400Smrg # Native MSVC 8694a5602400Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 8695a5602400Smrg # no search path for DLLs. 8696a5602400Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 8697a5602400Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8698a5602400Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8699a5602400Smrg _LT_TAGVAR(file_list_spec, $1)='@' 8700a5602400Smrg # Tell ltmain to make .lib files, not .a files. 8701a5602400Smrg libext=lib 8702a5602400Smrg # Tell ltmain to make .dll files, not .so files. 8703a5602400Smrg shrext_cmds=".dll" 8704a5602400Smrg # FIXME: Setting linknames here is a bad hack. 8705a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 8706a5602400Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 8707a5602400Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 8708a5602400Smrg else 8709a5602400Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 8710a5602400Smrg fi~ 8711a5602400Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 8712a5602400Smrg linknames=' 8713a5602400Smrg # The linker will not automatically build a static lib if we build a DLL. 8714a5602400Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 8715a5602400Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8716a5602400Smrg # Don't use ranlib 8717a5602400Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 8718a5602400Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 8719a5602400Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 8720a5602400Smrg case $lt_outputfile in 8721a5602400Smrg *.exe|*.EXE) ;; 8722a5602400Smrg *) 8723a5602400Smrg lt_outputfile="$lt_outputfile.exe" 8724a5602400Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 8725a5602400Smrg ;; 8726a5602400Smrg esac~ 8727a5602400Smrg func_to_tool_file "$lt_outputfile"~ 8728a5602400Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 8729a5602400Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 8730a5602400Smrg $RM "$lt_outputfile.manifest"; 8731a5602400Smrg fi' 8732a5602400Smrg ;; 8733a5602400Smrg *) 8734a5602400Smrg # g++ 8735a5602400Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8736a5602400Smrg # as there is no search path for DLLs. 8737a5602400Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8738a5602400Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 8739a5602400Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8740a5602400Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8741a5602400Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8742a5602400Smrg 8743a5602400Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8744a5602400Smrg _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' 8745a5602400Smrg # If the export-symbols file already is a .def file (1st line 8746a5602400Smrg # is EXPORTS), use it as is; otherwise, prepend... 8747a5602400Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 8748a5602400Smrg cp $export_symbols $output_objdir/$soname.def; 8749a5602400Smrg else 8750a5602400Smrg echo EXPORTS > $output_objdir/$soname.def; 8751a5602400Smrg cat $export_symbols >> $output_objdir/$soname.def; 8752a5602400Smrg fi~ 8753a5602400Smrg $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' 8754a5602400Smrg else 8755a5602400Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8756a5602400Smrg fi 8757a5602400Smrg ;; 8758a5602400Smrg esac 8759a5602400Smrg ;; 8760b9b4fd27Smrg darwin* | rhapsody*) 8761b9b4fd27Smrg _LT_DARWIN_LINKER_FEATURES($1) 8762caade7ccSmrg ;; 8763b9b4fd27Smrg 8764caade7ccSmrg dgux*) 8765b9b4fd27Smrg case $cc_basename in 8766b9b4fd27Smrg ec++*) 8767b9b4fd27Smrg # FIXME: insert proper C++ library support 8768b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8769caade7ccSmrg ;; 8770b9b4fd27Smrg ghcx*) 8771caade7ccSmrg # Green Hills C++ Compiler 8772b9b4fd27Smrg # FIXME: insert proper C++ library support 8773b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8774caade7ccSmrg ;; 8775b9b4fd27Smrg *) 8776b9b4fd27Smrg # FIXME: insert proper C++ library support 8777b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8778caade7ccSmrg ;; 8779b9b4fd27Smrg esac 8780b9b4fd27Smrg ;; 8781b9b4fd27Smrg 8782b9b4fd27Smrg freebsd[[12]]*) 8783b9b4fd27Smrg # C++ shared libraries reported to be fairly broken before 8784b9b4fd27Smrg # switch to ELF 8785b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8786b9b4fd27Smrg ;; 8787b9b4fd27Smrg 8788b9b4fd27Smrg freebsd-elf*) 8789b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8790b9b4fd27Smrg ;; 8791b9b4fd27Smrg 8792b9b4fd27Smrg freebsd* | dragonfly*) 8793b9b4fd27Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 8794b9b4fd27Smrg # conventions 8795b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8796b9b4fd27Smrg ;; 8797b9b4fd27Smrg 8798b9b4fd27Smrg gnu*) 8799b9b4fd27Smrg ;; 8800b9b4fd27Smrg 8801e8a5466aSmrg haiku*) 8802e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8803e8a5466aSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8804e8a5466aSmrg ;; 8805e8a5466aSmrg 8806b9b4fd27Smrg hpux9*) 8807b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8808b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8809b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8810b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8811b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8812b9b4fd27Smrg # but as the default 8813b9b4fd27Smrg # location of the library. 8814b9b4fd27Smrg 8815b9b4fd27Smrg case $cc_basename in 8816b9b4fd27Smrg CC*) 8817b9b4fd27Smrg # FIXME: insert proper C++ library support 8818b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8819b9b4fd27Smrg ;; 8820b9b4fd27Smrg aCC*) 8821b9b4fd27Smrg _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' 8822b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8823b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8824b9b4fd27Smrg # linking a shared library. 8825b9b4fd27Smrg # 8826b9b4fd27Smrg # There doesn't appear to be a way to prevent this compiler from 8827b9b4fd27Smrg # explicitly linking system object files so we need to strip them 8828b9b4fd27Smrg # from the output so that they don't get included in the library 8829b9b4fd27Smrg # dependencies. 8830e8a5466aSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 8831b9b4fd27Smrg ;; 8832b9b4fd27Smrg *) 8833b9b4fd27Smrg if test "$GXX" = yes; then 8834a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 8835b9b4fd27Smrg else 8836b9b4fd27Smrg # FIXME: insert proper C++ library support 8837b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8838b9b4fd27Smrg fi 8839b9b4fd27Smrg ;; 8840b9b4fd27Smrg esac 8841b9b4fd27Smrg ;; 8842b9b4fd27Smrg 8843b9b4fd27Smrg hpux10*|hpux11*) 8844b9b4fd27Smrg if test $with_gnu_ld = no; then 8845b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8846b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8847b9b4fd27Smrg 8848b9b4fd27Smrg case $host_cpu in 8849b9b4fd27Smrg hppa*64*|ia64*) 8850b9b4fd27Smrg ;; 8851b9b4fd27Smrg *) 8852b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8853b9b4fd27Smrg ;; 8854b9b4fd27Smrg esac 8855b9b4fd27Smrg fi 8856b9b4fd27Smrg case $host_cpu in 8857b9b4fd27Smrg hppa*64*|ia64*) 8858b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8859b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8860b9b4fd27Smrg ;; 8861b9b4fd27Smrg *) 8862b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8863b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8864b9b4fd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8865b9b4fd27Smrg # but as the default 8866b9b4fd27Smrg # location of the library. 8867b9b4fd27Smrg ;; 8868b9b4fd27Smrg esac 8869b9b4fd27Smrg 8870b9b4fd27Smrg case $cc_basename in 8871b9b4fd27Smrg CC*) 8872b9b4fd27Smrg # FIXME: insert proper C++ library support 8873b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8874caade7ccSmrg ;; 8875b9b4fd27Smrg aCC*) 8876caade7ccSmrg case $host_cpu in 8877b9b4fd27Smrg hppa*64*) 8878b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8879b9b4fd27Smrg ;; 8880b9b4fd27Smrg ia64*) 8881b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8882b9b4fd27Smrg ;; 8883b9b4fd27Smrg *) 8884b9b4fd27Smrg _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' 8885b9b4fd27Smrg ;; 8886caade7ccSmrg esac 8887b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8888b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8889b9b4fd27Smrg # linking a shared library. 8890b9b4fd27Smrg # 8891b9b4fd27Smrg # There doesn't appear to be a way to prevent this compiler from 8892b9b4fd27Smrg # explicitly linking system object files so we need to strip them 8893b9b4fd27Smrg # from the output so that they don't get included in the library 8894b9b4fd27Smrg # dependencies. 8895e8a5466aSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 8896caade7ccSmrg ;; 8897b9b4fd27Smrg *) 8898b9b4fd27Smrg if test "$GXX" = yes; then 8899b9b4fd27Smrg if test $with_gnu_ld = no; then 8900b9b4fd27Smrg case $host_cpu in 8901b9b4fd27Smrg hppa*64*) 8902b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8903b9b4fd27Smrg ;; 8904b9b4fd27Smrg ia64*) 8905a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8906b9b4fd27Smrg ;; 8907b9b4fd27Smrg *) 8908a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8909b9b4fd27Smrg ;; 8910b9b4fd27Smrg esac 8911b9b4fd27Smrg fi 8912b9b4fd27Smrg else 8913b9b4fd27Smrg # FIXME: insert proper C++ library support 8914b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8915b9b4fd27Smrg fi 8916caade7ccSmrg ;; 8917b9b4fd27Smrg esac 8918b9b4fd27Smrg ;; 8919b9b4fd27Smrg 8920b9b4fd27Smrg interix[[3-9]]*) 8921b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8922b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8923b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8924b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8925b9b4fd27Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8926b9b4fd27Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8927b9b4fd27Smrg # default) and relocated if they conflict, which is a slow very memory 8928b9b4fd27Smrg # consuming and fragmenting process. To avoid this, we pick a random, 8929b9b4fd27Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8930b9b4fd27Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8931b9b4fd27Smrg _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' 8932b9b4fd27Smrg _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' 8933caade7ccSmrg ;; 8934b9b4fd27Smrg irix5* | irix6*) 8935b9b4fd27Smrg case $cc_basename in 8936b9b4fd27Smrg CC*) 8937b9b4fd27Smrg # SGI C++ 8938e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 8939b9b4fd27Smrg 8940b9b4fd27Smrg # Archives containing C++ object files must be created using 8941b9b4fd27Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 8942b9b4fd27Smrg # necessary to make sure instantiated templates are included 8943b9b4fd27Smrg # in the archive. 8944b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 8945caade7ccSmrg ;; 8946b9b4fd27Smrg *) 8947b9b4fd27Smrg if test "$GXX" = yes; then 8948b9b4fd27Smrg if test "$with_gnu_ld" = no; then 8949a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8950b9b4fd27Smrg else 8951a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 8952b9b4fd27Smrg fi 8953b9b4fd27Smrg fi 8954b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8955caade7ccSmrg ;; 8956b9b4fd27Smrg esac 8957b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8958b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8959b9b4fd27Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 8960b9b4fd27Smrg ;; 8961b9b4fd27Smrg 8962e8a5466aSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 8963b9b4fd27Smrg case $cc_basename in 8964b9b4fd27Smrg KCC*) 8965b9b4fd27Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8966b9b4fd27Smrg 8967b9b4fd27Smrg # KCC will only create a shared library if the output file 8968b9b4fd27Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8969b9b4fd27Smrg # to its proper name (with version) after linking. 8970b9b4fd27Smrg _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' 8971b9b4fd27Smrg _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' 8972b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 8973b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 8974b9b4fd27Smrg # linking a shared library. 8975b9b4fd27Smrg # 8976b9b4fd27Smrg # There doesn't appear to be a way to prevent this compiler from 8977b9b4fd27Smrg # explicitly linking system object files so we need to strip them 8978b9b4fd27Smrg # from the output so that they don't get included in the library 8979b9b4fd27Smrg # dependencies. 8980e8a5466aSmrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 8981b9b4fd27Smrg 8982b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8983b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8984b9b4fd27Smrg 8985b9b4fd27Smrg # Archives containing C++ object files must be created using 8986b9b4fd27Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8987b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8988caade7ccSmrg ;; 8989b9b4fd27Smrg icpc* | ecpc* ) 8990caade7ccSmrg # Intel C++ 8991b9b4fd27Smrg with_gnu_ld=yes 8992b9b4fd27Smrg # version 8.0 and above of icpc choke on multiply defined symbols 8993b9b4fd27Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 8994b9b4fd27Smrg # earlier do not add the objects themselves. 8995b9b4fd27Smrg case `$CC -V 2>&1` in 8996b9b4fd27Smrg *"Version 7."*) 8997b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8998b9b4fd27Smrg _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' 8999b9b4fd27Smrg ;; 9000b9b4fd27Smrg *) # Version 8.0 or newer 9001b9b4fd27Smrg tmp_idyn= 9002b9b4fd27Smrg case $host_cpu in 9003b9b4fd27Smrg ia64*) tmp_idyn=' -i_dynamic';; 9004b9b4fd27Smrg esac 9005b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 9006b9b4fd27Smrg _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' 9007b9b4fd27Smrg ;; 9008b9b4fd27Smrg esac 9009b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9010b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 9011b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 9012b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 9013caade7ccSmrg ;; 9014b9b4fd27Smrg pgCC* | pgcpp*) 9015b9b4fd27Smrg # Portland Group C++ compiler 9016b9b4fd27Smrg case `$CC -V` in 9017e8a5466aSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 9018b9b4fd27Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 9019b9b4fd27Smrg rm -rf $tpldir~ 9020b9b4fd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 9021e8a5466aSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 9022b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 9023b9b4fd27Smrg rm -rf $tpldir~ 9024b9b4fd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 9025e8a5466aSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 9026b9b4fd27Smrg $RANLIB $oldlib' 9027b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 9028b9b4fd27Smrg rm -rf $tpldir~ 9029b9b4fd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 9030e8a5466aSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 9031b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 9032b9b4fd27Smrg rm -rf $tpldir~ 9033b9b4fd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 9034e8a5466aSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 9035b9b4fd27Smrg ;; 9036e8a5466aSmrg *) # Version 6 and above use weak symbols 9037b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 9038b9b4fd27Smrg _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' 9039b9b4fd27Smrg ;; 9040b9b4fd27Smrg esac 9041b9b4fd27Smrg 9042b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 9043b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 9044e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 9045b9b4fd27Smrg ;; 9046caade7ccSmrg cxx*) 9047caade7ccSmrg # Compaq C++ 9048b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 9049b9b4fd27Smrg _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' 9050b9b4fd27Smrg 9051b9b4fd27Smrg runpath_var=LD_RUN_PATH 9052b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9053b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9054b9b4fd27Smrg 9055b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 9056b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 9057b9b4fd27Smrg # linking a shared library. 9058b9b4fd27Smrg # 9059b9b4fd27Smrg # There doesn't appear to be a way to prevent this compiler from 9060b9b4fd27Smrg # explicitly linking system object files so we need to strip them 9061b9b4fd27Smrg # from the output so that they don't get included in the library 9062b9b4fd27Smrg # dependencies. 9063e8a5466aSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 9064b9b4fd27Smrg ;; 9065e8a5466aSmrg xl* | mpixl* | bgxl*) 9066b9b4fd27Smrg # IBM XL 8.0 on PPC, with GNU ld 9067b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 9068b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 9069b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 9070b9b4fd27Smrg if test "x$supports_anon_versioning" = xyes; then 9071b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 9072b9b4fd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 9073b9b4fd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 9074b9b4fd27Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 9075b9b4fd27Smrg fi 9076caade7ccSmrg ;; 9077caade7ccSmrg *) 9078485f0483Smrg case `$CC -V 2>&1 | sed 5q` in 9079485f0483Smrg *Sun\ C*) 9080485f0483Smrg # Sun C++ 5.9 9081b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 9082b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9083b9b4fd27Smrg _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' 9084b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9085e8a5466aSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 9086b9b4fd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 9087b9b4fd27Smrg 9088b9b4fd27Smrg # Not sure whether something based on 9089b9b4fd27Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 9090b9b4fd27Smrg # would be better. 9091e8a5466aSmrg output_verbose_link_cmd='func_echo_all' 9092b9b4fd27Smrg 9093b9b4fd27Smrg # Archives containing C++ object files must be created using 9094b9b4fd27Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 9095b9b4fd27Smrg # necessary to make sure instantiated templates are included 9096b9b4fd27Smrg # in the archive. 9097b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 9098485f0483Smrg ;; 9099485f0483Smrg esac 9100caade7ccSmrg ;; 9101caade7ccSmrg esac 9102caade7ccSmrg ;; 9103b9b4fd27Smrg 9104caade7ccSmrg lynxos*) 9105b9b4fd27Smrg # FIXME: insert proper C++ library support 9106b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9107caade7ccSmrg ;; 9108b9b4fd27Smrg 9109caade7ccSmrg m88k*) 9110b9b4fd27Smrg # FIXME: insert proper C++ library support 9111b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9112caade7ccSmrg ;; 9113b9b4fd27Smrg 9114caade7ccSmrg mvs*) 9115b9b4fd27Smrg case $cc_basename in 9116b9b4fd27Smrg cxx*) 9117b9b4fd27Smrg # FIXME: insert proper C++ library support 9118b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9119caade7ccSmrg ;; 9120caade7ccSmrg *) 9121b9b4fd27Smrg # FIXME: insert proper C++ library support 9122b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9123caade7ccSmrg ;; 9124caade7ccSmrg esac 9125caade7ccSmrg ;; 9126b9b4fd27Smrg 9127caade7ccSmrg netbsd*) 9128b9b4fd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9129b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 9130b9b4fd27Smrg wlarc= 9131b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9132b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9133b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9134b9b4fd27Smrg fi 9135b9b4fd27Smrg # Workaround some broken pre-1.5 toolchains 9136b9b4fd27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 9137b9b4fd27Smrg ;; 9138b9b4fd27Smrg 9139b9b4fd27Smrg *nto* | *qnx*) 9140b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9141b9b4fd27Smrg ;; 9142b9b4fd27Smrg 9143b9b4fd27Smrg openbsd2*) 9144b9b4fd27Smrg # C++ shared libraries are fairly broken 9145b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9146b9b4fd27Smrg ;; 9147b9b4fd27Smrg 9148b9b4fd27Smrg openbsd*) 9149b9b4fd27Smrg if test -f /usr/libexec/ld.so; then 9150b9b4fd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9151b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9152b9b4fd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9153b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9154b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 9155b9b4fd27Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 9156b9b4fd27Smrg _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' 9157b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 9158b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 9159b9b4fd27Smrg fi 9160e8a5466aSmrg output_verbose_link_cmd=func_echo_all 9161b9b4fd27Smrg else 9162b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9163b9b4fd27Smrg fi 9164caade7ccSmrg ;; 9165b9b4fd27Smrg 9166caade7ccSmrg osf3* | osf4* | osf5*) 9167b9b4fd27Smrg case $cc_basename in 9168b9b4fd27Smrg KCC*) 9169b9b4fd27Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 9170b9b4fd27Smrg 9171b9b4fd27Smrg # KCC will only create a shared library if the output file 9172b9b4fd27Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 9173b9b4fd27Smrg # to its proper name (with version) after linking. 9174b9b4fd27Smrg _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' 9175b9b4fd27Smrg 9176b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 9177b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9178b9b4fd27Smrg 9179b9b4fd27Smrg # Archives containing C++ object files must be created using 9180b9b4fd27Smrg # the KAI C++ compiler. 9181b9b4fd27Smrg case $host in 9182b9b4fd27Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 9183b9b4fd27Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 9184b9b4fd27Smrg esac 9185caade7ccSmrg ;; 9186b9b4fd27Smrg RCC*) 9187caade7ccSmrg # Rational C++ 2.4.1 9188b9b4fd27Smrg # FIXME: insert proper C++ library support 9189b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9190caade7ccSmrg ;; 9191b9b4fd27Smrg cxx*) 9192b9b4fd27Smrg case $host in 9193b9b4fd27Smrg osf3*) 9194b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 9195e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 9196b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 9197b9b4fd27Smrg ;; 9198b9b4fd27Smrg *) 9199b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9200e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 9201b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 9202b9b4fd27Smrg echo "-hidden">> $lib.exp~ 9203e8a5466aSmrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ 9204b9b4fd27Smrg $RM $lib.exp' 9205b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9206b9b4fd27Smrg ;; 9207b9b4fd27Smrg esac 9208b9b4fd27Smrg 9209b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9210b9b4fd27Smrg 9211b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 9212b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 9213b9b4fd27Smrg # linking a shared library. 9214b9b4fd27Smrg # 9215b9b4fd27Smrg # There doesn't appear to be a way to prevent this compiler from 9216b9b4fd27Smrg # explicitly linking system object files so we need to strip them 9217b9b4fd27Smrg # from the output so that they don't get included in the library 9218b9b4fd27Smrg # dependencies. 9219e8a5466aSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 9220caade7ccSmrg ;; 9221caade7ccSmrg *) 9222b9b4fd27Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 9223b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 9224b9b4fd27Smrg case $host in 9225b9b4fd27Smrg osf3*) 9226e8a5466aSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 9227b9b4fd27Smrg ;; 9228b9b4fd27Smrg *) 9229a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 9230b9b4fd27Smrg ;; 9231b9b4fd27Smrg esac 9232b9b4fd27Smrg 9233b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 9234b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9235b9b4fd27Smrg 9236b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 9237b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 9238b9b4fd27Smrg # linking a shared library. 9239e8a5466aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9240b9b4fd27Smrg 9241b9b4fd27Smrg else 9242b9b4fd27Smrg # FIXME: insert proper C++ library support 9243b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9244b9b4fd27Smrg fi 9245caade7ccSmrg ;; 9246b9b4fd27Smrg esac 9247b9b4fd27Smrg ;; 9248b9b4fd27Smrg 9249caade7ccSmrg psos*) 9250b9b4fd27Smrg # FIXME: insert proper C++ library support 9251b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9252b9b4fd27Smrg ;; 9253b9b4fd27Smrg 9254b9b4fd27Smrg sunos4*) 9255b9b4fd27Smrg case $cc_basename in 9256b9b4fd27Smrg CC*) 9257b9b4fd27Smrg # Sun C++ 4.x 9258b9b4fd27Smrg # FIXME: insert proper C++ library support 9259b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9260b9b4fd27Smrg ;; 9261b9b4fd27Smrg lcc*) 9262b9b4fd27Smrg # Lucid 9263b9b4fd27Smrg # FIXME: insert proper C++ library support 9264b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9265b9b4fd27Smrg ;; 9266b9b4fd27Smrg *) 9267b9b4fd27Smrg # FIXME: insert proper C++ library support 9268b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9269b9b4fd27Smrg ;; 9270b9b4fd27Smrg esac 9271b9b4fd27Smrg ;; 9272b9b4fd27Smrg 9273caade7ccSmrg solaris*) 9274b9b4fd27Smrg case $cc_basename in 9275e8a5466aSmrg CC* | sunCC*) 9276caade7ccSmrg # Sun C++ 4.2, 5.x and Centerline C++ 9277b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 9278b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 9279b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9280b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9281b9b4fd27Smrg $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' 9282b9b4fd27Smrg 9283b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9284b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9285b9b4fd27Smrg case $host_os in 9286b9b4fd27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9287b9b4fd27Smrg *) 9288b9b4fd27Smrg # The compiler driver will combine and reorder linker options, 9289b9b4fd27Smrg # but understands `-z linker_flag'. 9290b9b4fd27Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 9291b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9292b9b4fd27Smrg ;; 9293b9b4fd27Smrg esac 9294b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9295b9b4fd27Smrg 9296e8a5466aSmrg output_verbose_link_cmd='func_echo_all' 9297b9b4fd27Smrg 9298b9b4fd27Smrg # Archives containing C++ object files must be created using 9299b9b4fd27Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 9300b9b4fd27Smrg # necessary to make sure instantiated templates are included 9301b9b4fd27Smrg # in the archive. 9302b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 9303caade7ccSmrg ;; 9304b9b4fd27Smrg gcx*) 9305caade7ccSmrg # Green Hills C++ Compiler 9306b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 9307b9b4fd27Smrg 9308b9b4fd27Smrg # The C++ compiler must be used to create the archive. 9309b9b4fd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 9310caade7ccSmrg ;; 9311b9b4fd27Smrg *) 9312b9b4fd27Smrg # GNU C++ compiler with Solaris linker 9313b9b4fd27Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 9314b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 9315b9b4fd27Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 9316a5602400Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 9317b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9318a5602400Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 9319b9b4fd27Smrg 9320b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 9321b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 9322b9b4fd27Smrg # linking a shared library. 9323e8a5466aSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9324b9b4fd27Smrg else 9325b9b4fd27Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 9326b9b4fd27Smrg # platform. 9327b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 9328b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9329b9b4fd27Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 9330b9b4fd27Smrg 9331b9b4fd27Smrg # Commands to make compiler produce verbose output that lists 9332b9b4fd27Smrg # what "hidden" libraries, object files and flags are used when 9333b9b4fd27Smrg # linking a shared library. 9334e8a5466aSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9335b9b4fd27Smrg fi 9336b9b4fd27Smrg 9337b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 9338b9b4fd27Smrg case $host_os in 9339b9b4fd27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9340b9b4fd27Smrg *) 9341b9b4fd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 9342b9b4fd27Smrg ;; 9343b9b4fd27Smrg esac 9344b9b4fd27Smrg fi 9345caade7ccSmrg ;; 9346b9b4fd27Smrg esac 9347b9b4fd27Smrg ;; 9348b9b4fd27Smrg 9349b9b4fd27Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9350b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 9351b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9352b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9353b9b4fd27Smrg runpath_var='LD_RUN_PATH' 9354b9b4fd27Smrg 9355b9b4fd27Smrg case $cc_basename in 9356b9b4fd27Smrg CC*) 9357b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9358b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9359b9b4fd27Smrg ;; 9360b9b4fd27Smrg *) 9361b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9362b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9363b9b4fd27Smrg ;; 9364b9b4fd27Smrg esac 9365b9b4fd27Smrg ;; 9366b9b4fd27Smrg 9367b9b4fd27Smrg sysv5* | sco3.2v5* | sco5v6*) 9368b9b4fd27Smrg # Note: We can NOT use -z defs as we might desire, because we do not 9369b9b4fd27Smrg # link with -lc, and that would cause any symbols used from libc to 9370b9b4fd27Smrg # always be unresolved, which means just about no library would 9371b9b4fd27Smrg # ever link correctly. If we're not using GNU ld we use -z text 9372b9b4fd27Smrg # though, which does catch some bad symbols but isn't as heavy-handed 9373b9b4fd27Smrg # as -z defs. 9374b9b4fd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 9375b9b4fd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 9376b9b4fd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9377b9b4fd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9378b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 9379b9b4fd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9380b9b4fd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9381b9b4fd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 9382b9b4fd27Smrg runpath_var='LD_RUN_PATH' 9383b9b4fd27Smrg 9384caade7ccSmrg case $cc_basename in 9385b9b4fd27Smrg CC*) 9386b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9387b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9388e8a5466aSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 9389e8a5466aSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 9390e8a5466aSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 9391e8a5466aSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 9392caade7ccSmrg ;; 9393caade7ccSmrg *) 9394b9b4fd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9395b9b4fd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9396caade7ccSmrg ;; 9397caade7ccSmrg esac 9398b9b4fd27Smrg ;; 9399b9b4fd27Smrg 9400caade7ccSmrg tandem*) 9401b9b4fd27Smrg case $cc_basename in 9402b9b4fd27Smrg NCC*) 9403caade7ccSmrg # NonStop-UX NCC 3.20 9404b9b4fd27Smrg # FIXME: insert proper C++ library support 9405b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9406caade7ccSmrg ;; 9407b9b4fd27Smrg *) 9408b9b4fd27Smrg # FIXME: insert proper C++ library support 9409b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9410caade7ccSmrg ;; 9411b9b4fd27Smrg esac 9412b9b4fd27Smrg ;; 9413b9b4fd27Smrg 9414caade7ccSmrg vxworks*) 9415b9b4fd27Smrg # FIXME: insert proper C++ library support 9416b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9417b9b4fd27Smrg ;; 9418b9b4fd27Smrg 9419caade7ccSmrg *) 9420b9b4fd27Smrg # FIXME: insert proper C++ library support 9421b9b4fd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9422b9b4fd27Smrg ;; 9423caade7ccSmrg esac 9424caade7ccSmrg 9425b9b4fd27Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9426b9b4fd27Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 9427b9b4fd27Smrg 9428b9b4fd27Smrg _LT_TAGVAR(GCC, $1)="$GXX" 9429b9b4fd27Smrg _LT_TAGVAR(LD, $1)="$LD" 9430b9b4fd27Smrg 9431b9b4fd27Smrg ## CAVEAT EMPTOR: 9432b9b4fd27Smrg ## There is no encapsulation within the following macros, do not change 9433b9b4fd27Smrg ## the running order or otherwise move them around unless you know exactly 9434b9b4fd27Smrg ## what you are doing... 9435b9b4fd27Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 9436b9b4fd27Smrg _LT_COMPILER_PIC($1) 9437b9b4fd27Smrg _LT_COMPILER_C_O($1) 9438b9b4fd27Smrg _LT_COMPILER_FILE_LOCKS($1) 9439b9b4fd27Smrg _LT_LINKER_SHLIBS($1) 9440b9b4fd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 9441b9b4fd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9442b9b4fd27Smrg 9443b9b4fd27Smrg _LT_CONFIG($1) 9444b9b4fd27Smrg fi # test -n "$compiler" 9445b9b4fd27Smrg 9446b9b4fd27Smrg CC=$lt_save_CC 9447a5602400Smrg CFLAGS=$lt_save_CFLAGS 9448b9b4fd27Smrg LDCXX=$LD 9449b9b4fd27Smrg LD=$lt_save_LD 9450b9b4fd27Smrg GCC=$lt_save_GCC 9451b9b4fd27Smrg with_gnu_ld=$lt_save_with_gnu_ld 9452b9b4fd27Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 9453b9b4fd27Smrg lt_cv_path_LD=$lt_save_path_LD 9454b9b4fd27Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 9455b9b4fd27Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 9456b9b4fd27Smrgfi # test "$_lt_caught_CXX_error" != yes 9457b9b4fd27Smrg 9458b9b4fd27SmrgAC_LANG_POP 9459b9b4fd27Smrg])# _LT_LANG_CXX_CONFIG 9460b9b4fd27Smrg 9461b9b4fd27Smrg 9462a5602400Smrg# _LT_FUNC_STRIPNAME_CNF 9463a5602400Smrg# ---------------------- 9464a5602400Smrg# func_stripname_cnf prefix suffix name 9465a5602400Smrg# strip PREFIX and SUFFIX off of NAME. 9466a5602400Smrg# PREFIX and SUFFIX must not contain globbing or regex special 9467a5602400Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9468a5602400Smrg# dot (in which case that matches only a dot). 9469a5602400Smrg# 9470a5602400Smrg# This function is identical to the (non-XSI) version of func_stripname, 9471a5602400Smrg# except this one can be used by m4 code that may be executed by configure, 9472a5602400Smrg# rather than the libtool script. 9473a5602400Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 9474a5602400SmrgAC_REQUIRE([_LT_DECL_SED]) 9475a5602400SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 9476a5602400Smrgfunc_stripname_cnf () 9477a5602400Smrg{ 9478a5602400Smrg case ${2} in 9479a5602400Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 9480a5602400Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 9481a5602400Smrg esac 9482a5602400Smrg} # func_stripname_cnf 9483a5602400Smrg])# _LT_FUNC_STRIPNAME_CNF 9484a5602400Smrg 9485b9b4fd27Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 9486b9b4fd27Smrg# --------------------------------- 9487b9b4fd27Smrg# Figure out "hidden" library dependencies from verbose 9488b9b4fd27Smrg# compiler output when linking a shared library. 9489b9b4fd27Smrg# Parse the compiler output and extract the necessary 9490b9b4fd27Smrg# objects, libraries and library flags. 9491b9b4fd27Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 9492b9b4fd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9493a5602400SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 9494b9b4fd27Smrg# Dependencies to place before and after the object being linked: 9495b9b4fd27Smrg_LT_TAGVAR(predep_objects, $1)= 9496b9b4fd27Smrg_LT_TAGVAR(postdep_objects, $1)= 9497b9b4fd27Smrg_LT_TAGVAR(predeps, $1)= 9498b9b4fd27Smrg_LT_TAGVAR(postdeps, $1)= 9499b9b4fd27Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 9500b9b4fd27Smrg 9501b9b4fd27Smrgdnl we can't use the lt_simple_compile_test_code here, 9502b9b4fd27Smrgdnl because it contains code intended for an executable, 9503b9b4fd27Smrgdnl not a library. It's possible we should let each 9504b9b4fd27Smrgdnl tag define a new lt_????_link_test_code variable, 9505b9b4fd27Smrgdnl but it's only used here... 9506b9b4fd27Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 9507b9b4fd27Smrgint a; 9508b9b4fd27Smrgvoid foo (void) { a = 0; } 9509b9b4fd27Smrg_LT_EOF 9510b9b4fd27Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 9511b9b4fd27Smrgclass Foo 9512b9b4fd27Smrg{ 9513b9b4fd27Smrgpublic: 9514b9b4fd27Smrg Foo (void) { a = 0; } 9515b9b4fd27Smrgprivate: 9516b9b4fd27Smrg int a; 9517b9b4fd27Smrg}; 9518b9b4fd27Smrg_LT_EOF 9519b9b4fd27Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 9520b9b4fd27Smrg subroutine foo 9521b9b4fd27Smrg implicit none 9522b9b4fd27Smrg integer*4 a 9523b9b4fd27Smrg a=0 9524b9b4fd27Smrg return 9525b9b4fd27Smrg end 9526b9b4fd27Smrg_LT_EOF 9527b9b4fd27Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 9528b9b4fd27Smrg subroutine foo 9529b9b4fd27Smrg implicit none 9530b9b4fd27Smrg integer a 9531b9b4fd27Smrg a=0 9532b9b4fd27Smrg return 9533b9b4fd27Smrg end 9534b9b4fd27Smrg_LT_EOF 9535b9b4fd27Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 9536b9b4fd27Smrgpublic class foo { 9537b9b4fd27Smrg private int a; 9538b9b4fd27Smrg public void bar (void) { 9539b9b4fd27Smrg a = 0; 9540b9b4fd27Smrg } 9541b9b4fd27Smrg}; 9542b9b4fd27Smrg_LT_EOF 9543b9b4fd27Smrg]) 9544a5602400Smrg 9545a5602400Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 9546a5602400Smrgcase "$CC $CFLAGS " in #( 9547a5602400Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 9548a5602400Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 9549a5602400Smrgesac 9550a5602400Smrg 9551b9b4fd27Smrgdnl Parse the compiler output and extract the necessary 9552b9b4fd27Smrgdnl objects, libraries and library flags. 9553b9b4fd27Smrgif AC_TRY_EVAL(ac_compile); then 9554b9b4fd27Smrg # Parse the compiler output and extract the necessary 9555b9b4fd27Smrg # objects, libraries and library flags. 9556b9b4fd27Smrg 9557b9b4fd27Smrg # Sentinel used to keep track of whether or not we are before 9558b9b4fd27Smrg # the conftest object file. 9559b9b4fd27Smrg pre_test_object_deps_done=no 9560b9b4fd27Smrg 9561b9b4fd27Smrg for p in `eval "$output_verbose_link_cmd"`; do 9562a5602400Smrg case ${prev}${p} in 9563b9b4fd27Smrg 9564b9b4fd27Smrg -L* | -R* | -l*) 9565b9b4fd27Smrg # Some compilers place space between "-{L,R}" and the path. 9566b9b4fd27Smrg # Remove the space. 9567b9b4fd27Smrg if test $p = "-L" || 9568b9b4fd27Smrg test $p = "-R"; then 9569b9b4fd27Smrg prev=$p 9570b9b4fd27Smrg continue 9571b9b4fd27Smrg fi 9572b9b4fd27Smrg 9573a5602400Smrg # Expand the sysroot to ease extracting the directories later. 9574a5602400Smrg if test -z "$prev"; then 9575a5602400Smrg case $p in 9576a5602400Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 9577a5602400Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 9578a5602400Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 9579a5602400Smrg esac 9580a5602400Smrg fi 9581a5602400Smrg case $p in 9582a5602400Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 9583a5602400Smrg esac 9584b9b4fd27Smrg if test "$pre_test_object_deps_done" = no; then 9585a5602400Smrg case ${prev} in 9586a5602400Smrg -L | -R) 9587b9b4fd27Smrg # Internal compiler library paths should come after those 9588b9b4fd27Smrg # provided the user. The postdeps already come after the 9589b9b4fd27Smrg # user supplied libs so there is no need to process them. 9590b9b4fd27Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 9591b9b4fd27Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 9592b9b4fd27Smrg else 9593b9b4fd27Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 9594b9b4fd27Smrg fi 9595b9b4fd27Smrg ;; 9596b9b4fd27Smrg # The "-l" case would never come before the object being 9597b9b4fd27Smrg # linked, so don't bother handling this case. 9598b9b4fd27Smrg esac 9599b9b4fd27Smrg else 9600b9b4fd27Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 9601b9b4fd27Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 9602b9b4fd27Smrg else 9603b9b4fd27Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 9604b9b4fd27Smrg fi 9605b9b4fd27Smrg fi 9606a5602400Smrg prev= 9607b9b4fd27Smrg ;; 9608b9b4fd27Smrg 9609a5602400Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 9610b9b4fd27Smrg *.$objext) 9611b9b4fd27Smrg # This assumes that the test object file only shows up 9612b9b4fd27Smrg # once in the compiler output. 9613b9b4fd27Smrg if test "$p" = "conftest.$objext"; then 9614b9b4fd27Smrg pre_test_object_deps_done=yes 9615b9b4fd27Smrg continue 9616b9b4fd27Smrg fi 9617b9b4fd27Smrg 9618b9b4fd27Smrg if test "$pre_test_object_deps_done" = no; then 9619b9b4fd27Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 9620b9b4fd27Smrg _LT_TAGVAR(predep_objects, $1)="$p" 9621b9b4fd27Smrg else 9622b9b4fd27Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 9623b9b4fd27Smrg fi 9624b9b4fd27Smrg else 9625b9b4fd27Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 9626b9b4fd27Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 9627b9b4fd27Smrg else 9628b9b4fd27Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 9629b9b4fd27Smrg fi 9630b9b4fd27Smrg fi 9631b9b4fd27Smrg ;; 9632caade7ccSmrg 9633b9b4fd27Smrg *) ;; # Ignore the rest. 9634caade7ccSmrg 9635b9b4fd27Smrg esac 9636b9b4fd27Smrg done 9637caade7ccSmrg 9638b9b4fd27Smrg # Clean up. 9639b9b4fd27Smrg rm -f a.out a.exe 9640b9b4fd27Smrgelse 9641b9b4fd27Smrg echo "libtool.m4: error: problem compiling $1 test program" 9642b9b4fd27Smrgfi 9643caade7ccSmrg 9644b9b4fd27Smrg$RM -f confest.$objext 9645a5602400SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 9646caade7ccSmrg 9647b9b4fd27Smrg# PORTME: override above test on systems where it is broken 9648b9b4fd27Smrgm4_if([$1], [CXX], 9649b9b4fd27Smrg[case $host_os in 9650b9b4fd27Smrginterix[[3-9]]*) 9651b9b4fd27Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 9652b9b4fd27Smrg # hack all around it, let's just trust "g++" to DTRT. 9653b9b4fd27Smrg _LT_TAGVAR(predep_objects,$1)= 9654b9b4fd27Smrg _LT_TAGVAR(postdep_objects,$1)= 9655b9b4fd27Smrg _LT_TAGVAR(postdeps,$1)= 9656b9b4fd27Smrg ;; 9657caade7ccSmrg 9658b9b4fd27Smrglinux*) 9659b9b4fd27Smrg case `$CC -V 2>&1 | sed 5q` in 9660b9b4fd27Smrg *Sun\ C*) 9661b9b4fd27Smrg # Sun C++ 5.9 9662caade7ccSmrg 9663b9b4fd27Smrg # The more standards-conforming stlport4 library is 9664b9b4fd27Smrg # incompatible with the Cstd library. Avoid specifying 9665b9b4fd27Smrg # it if it's in CXXFLAGS. Ignore libCrun as 9666b9b4fd27Smrg # -library=stlport4 depends on it. 9667b9b4fd27Smrg case " $CXX $CXXFLAGS " in 9668b9b4fd27Smrg *" -library=stlport4 "*) 9669b9b4fd27Smrg solaris_use_stlport4=yes 9670caade7ccSmrg ;; 9671b9b4fd27Smrg esac 9672caade7ccSmrg 9673b9b4fd27Smrg if test "$solaris_use_stlport4" != yes; then 9674b9b4fd27Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9675b9b4fd27Smrg fi 9676b9b4fd27Smrg ;; 9677b9b4fd27Smrg esac 9678b9b4fd27Smrg ;; 9679caade7ccSmrg 9680b9b4fd27Smrgsolaris*) 9681b9b4fd27Smrg case $cc_basename in 9682e8a5466aSmrg CC* | sunCC*) 9683b9b4fd27Smrg # The more standards-conforming stlport4 library is 9684b9b4fd27Smrg # incompatible with the Cstd library. Avoid specifying 9685b9b4fd27Smrg # it if it's in CXXFLAGS. Ignore libCrun as 9686b9b4fd27Smrg # -library=stlport4 depends on it. 9687b9b4fd27Smrg case " $CXX $CXXFLAGS " in 9688b9b4fd27Smrg *" -library=stlport4 "*) 9689b9b4fd27Smrg solaris_use_stlport4=yes 9690caade7ccSmrg ;; 9691caade7ccSmrg esac 9692caade7ccSmrg 9693b9b4fd27Smrg # Adding this requires a known-good setup of shared libraries for 9694b9b4fd27Smrg # Sun compiler versions before 5.6, else PIC objects from an old 9695b9b4fd27Smrg # archive will be linked into the output, leading to subtle bugs. 9696b9b4fd27Smrg if test "$solaris_use_stlport4" != yes; then 9697b9b4fd27Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9698b9b4fd27Smrg fi 9699b9b4fd27Smrg ;; 9700b9b4fd27Smrg esac 9701b9b4fd27Smrg ;; 9702b9b4fd27Smrgesac 9703b9b4fd27Smrg]) 9704caade7ccSmrg 9705b9b4fd27Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 9706b9b4fd27Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 9707b9b4fd27Smrgesac 9708b9b4fd27Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 9709b9b4fd27Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 9710b9b4fd27Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 9711b9b4fd27Smrgfi 9712b9b4fd27Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 9713b9b4fd27Smrg [The directories searched by this compiler when creating a shared library]) 9714b9b4fd27Smrg_LT_TAGDECL([], [predep_objects], [1], 9715b9b4fd27Smrg [Dependencies to place before and after the objects being linked to 9716b9b4fd27Smrg create a shared library]) 9717b9b4fd27Smrg_LT_TAGDECL([], [postdep_objects], [1]) 9718b9b4fd27Smrg_LT_TAGDECL([], [predeps], [1]) 9719b9b4fd27Smrg_LT_TAGDECL([], [postdeps], [1]) 9720b9b4fd27Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 9721b9b4fd27Smrg [The library search path used internally by the compiler when linking 9722b9b4fd27Smrg a shared library]) 9723b9b4fd27Smrg])# _LT_SYS_HIDDEN_LIBDEPS 9724b9b4fd27Smrg 9725b9b4fd27Smrg 9726b9b4fd27Smrg# _LT_LANG_F77_CONFIG([TAG]) 9727b9b4fd27Smrg# -------------------------- 9728b9b4fd27Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 9729b9b4fd27Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9730b9b4fd27Smrg# to write the compiler configuration to `libtool'. 9731b9b4fd27Smrgm4_defun([_LT_LANG_F77_CONFIG], 9732e8a5466aSmrg[AC_LANG_PUSH(Fortran 77) 9733e8a5466aSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 9734e8a5466aSmrg _lt_disable_F77=yes 9735e8a5466aSmrgfi 9736b9b4fd27Smrg 9737b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9738b9b4fd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9739b9b4fd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9740b9b4fd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9741b9b4fd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9742b9b4fd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9743b9b4fd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9744b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9745b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9746b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9747b9b4fd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9748b9b4fd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9749b9b4fd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9750b9b4fd27Smrg_LT_TAGVAR(module_cmds, $1)= 9751b9b4fd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9752b9b4fd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9753b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9754e8a5466aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9755e8a5466aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9756b9b4fd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9757b9b4fd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9758b9b4fd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9759b9b4fd27Smrg 9760b9b4fd27Smrg# Source file extension for f77 test sources. 9761b9b4fd27Smrgac_ext=f 9762b9b4fd27Smrg 9763b9b4fd27Smrg# Object file extension for compiled f77 test sources. 9764b9b4fd27Smrgobjext=o 9765b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 9766b9b4fd27Smrg 9767b9b4fd27Smrg# No sense in running all these tests if we already determined that 9768b9b4fd27Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 9769b9b4fd27Smrg# are currently assumed to apply to all compilers on this platform, 9770b9b4fd27Smrg# and will be corrupted by setting them based on a non-working compiler. 9771b9b4fd27Smrgif test "$_lt_disable_F77" != yes; then 9772b9b4fd27Smrg # Code to be used in simple compile tests 9773b9b4fd27Smrg lt_simple_compile_test_code="\ 9774b9b4fd27Smrg subroutine t 9775b9b4fd27Smrg return 9776b9b4fd27Smrg end 9777b9b4fd27Smrg" 9778b9b4fd27Smrg 9779b9b4fd27Smrg # Code to be used in simple link tests 9780b9b4fd27Smrg lt_simple_link_test_code="\ 9781b9b4fd27Smrg program t 9782b9b4fd27Smrg end 9783b9b4fd27Smrg" 9784b9b4fd27Smrg 9785b9b4fd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9786b9b4fd27Smrg _LT_TAG_COMPILER 9787b9b4fd27Smrg 9788b9b4fd27Smrg # save warnings/boilerplate of simple test code 9789b9b4fd27Smrg _LT_COMPILER_BOILERPLATE 9790b9b4fd27Smrg _LT_LINKER_BOILERPLATE 9791b9b4fd27Smrg 9792b9b4fd27Smrg # Allow CC to be a program name with arguments. 9793b9b4fd27Smrg lt_save_CC="$CC" 9794b9b4fd27Smrg lt_save_GCC=$GCC 9795a5602400Smrg lt_save_CFLAGS=$CFLAGS 9796b9b4fd27Smrg CC=${F77-"f77"} 9797a5602400Smrg CFLAGS=$FFLAGS 9798b9b4fd27Smrg compiler=$CC 9799b9b4fd27Smrg _LT_TAGVAR(compiler, $1)=$CC 9800b9b4fd27Smrg _LT_CC_BASENAME([$compiler]) 9801b9b4fd27Smrg GCC=$G77 9802b9b4fd27Smrg if test -n "$compiler"; then 9803b9b4fd27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9804b9b4fd27Smrg AC_MSG_RESULT([$can_build_shared]) 9805b9b4fd27Smrg 9806b9b4fd27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9807b9b4fd27Smrg test "$can_build_shared" = "no" && enable_shared=no 9808b9b4fd27Smrg 9809b9b4fd27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9810b9b4fd27Smrg # are all built from PIC. 9811b9b4fd27Smrg case $host_os in 9812b9b4fd27Smrg aix3*) 9813b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 9814b9b4fd27Smrg if test -n "$RANLIB"; then 9815b9b4fd27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9816b9b4fd27Smrg postinstall_cmds='$RANLIB $lib' 9817b9b4fd27Smrg fi 9818caade7ccSmrg ;; 9819b9b4fd27Smrg aix[[4-9]]*) 9820b9b4fd27Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9821b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 9822b9b4fd27Smrg fi 9823caade7ccSmrg ;; 9824b9b4fd27Smrg esac 9825b9b4fd27Smrg AC_MSG_RESULT([$enable_shared]) 9826b9b4fd27Smrg 9827b9b4fd27Smrg AC_MSG_CHECKING([whether to build static libraries]) 9828b9b4fd27Smrg # Make sure either enable_shared or enable_static is yes. 9829b9b4fd27Smrg test "$enable_shared" = yes || enable_static=yes 9830b9b4fd27Smrg AC_MSG_RESULT([$enable_static]) 9831b9b4fd27Smrg 9832b9b4fd27Smrg _LT_TAGVAR(GCC, $1)="$G77" 9833b9b4fd27Smrg _LT_TAGVAR(LD, $1)="$LD" 9834b9b4fd27Smrg 9835b9b4fd27Smrg ## CAVEAT EMPTOR: 9836b9b4fd27Smrg ## There is no encapsulation within the following macros, do not change 9837b9b4fd27Smrg ## the running order or otherwise move them around unless you know exactly 9838b9b4fd27Smrg ## what you are doing... 9839b9b4fd27Smrg _LT_COMPILER_PIC($1) 9840b9b4fd27Smrg _LT_COMPILER_C_O($1) 9841b9b4fd27Smrg _LT_COMPILER_FILE_LOCKS($1) 9842b9b4fd27Smrg _LT_LINKER_SHLIBS($1) 9843b9b4fd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 9844b9b4fd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9845b9b4fd27Smrg 9846b9b4fd27Smrg _LT_CONFIG($1) 9847b9b4fd27Smrg fi # test -n "$compiler" 9848b9b4fd27Smrg 9849b9b4fd27Smrg GCC=$lt_save_GCC 9850b9b4fd27Smrg CC="$lt_save_CC" 9851a5602400Smrg CFLAGS="$lt_save_CFLAGS" 9852b9b4fd27Smrgfi # test "$_lt_disable_F77" != yes 9853b9b4fd27Smrg 9854b9b4fd27SmrgAC_LANG_POP 9855b9b4fd27Smrg])# _LT_LANG_F77_CONFIG 9856b9b4fd27Smrg 9857b9b4fd27Smrg 9858b9b4fd27Smrg# _LT_LANG_FC_CONFIG([TAG]) 9859b9b4fd27Smrg# ------------------------- 9860b9b4fd27Smrg# Ensure that the configuration variables for a Fortran compiler are 9861b9b4fd27Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9862b9b4fd27Smrg# to write the compiler configuration to `libtool'. 9863b9b4fd27Smrgm4_defun([_LT_LANG_FC_CONFIG], 9864e8a5466aSmrg[AC_LANG_PUSH(Fortran) 9865e8a5466aSmrg 9866e8a5466aSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 9867e8a5466aSmrg _lt_disable_FC=yes 9868e8a5466aSmrgfi 9869b9b4fd27Smrg 9870b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9871b9b4fd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9872b9b4fd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9873b9b4fd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9874b9b4fd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9875b9b4fd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9876b9b4fd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9877b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9878b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9879b9b4fd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9880b9b4fd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9881b9b4fd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9882b9b4fd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9883b9b4fd27Smrg_LT_TAGVAR(module_cmds, $1)= 9884b9b4fd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9885b9b4fd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9886b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9887e8a5466aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9888e8a5466aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9889b9b4fd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9890b9b4fd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9891b9b4fd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9892b9b4fd27Smrg 9893b9b4fd27Smrg# Source file extension for fc test sources. 9894b9b4fd27Smrgac_ext=${ac_fc_srcext-f} 9895b9b4fd27Smrg 9896b9b4fd27Smrg# Object file extension for compiled fc test sources. 9897b9b4fd27Smrgobjext=o 9898b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 9899b9b4fd27Smrg 9900b9b4fd27Smrg# No sense in running all these tests if we already determined that 9901b9b4fd27Smrg# the FC compiler isn't working. Some variables (like enable_shared) 9902b9b4fd27Smrg# are currently assumed to apply to all compilers on this platform, 9903b9b4fd27Smrg# and will be corrupted by setting them based on a non-working compiler. 9904b9b4fd27Smrgif test "$_lt_disable_FC" != yes; then 9905b9b4fd27Smrg # Code to be used in simple compile tests 9906b9b4fd27Smrg lt_simple_compile_test_code="\ 9907b9b4fd27Smrg subroutine t 9908b9b4fd27Smrg return 9909b9b4fd27Smrg end 9910b9b4fd27Smrg" 9911b9b4fd27Smrg 9912b9b4fd27Smrg # Code to be used in simple link tests 9913b9b4fd27Smrg lt_simple_link_test_code="\ 9914b9b4fd27Smrg program t 9915b9b4fd27Smrg end 9916b9b4fd27Smrg" 9917b9b4fd27Smrg 9918b9b4fd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9919b9b4fd27Smrg _LT_TAG_COMPILER 9920b9b4fd27Smrg 9921b9b4fd27Smrg # save warnings/boilerplate of simple test code 9922b9b4fd27Smrg _LT_COMPILER_BOILERPLATE 9923b9b4fd27Smrg _LT_LINKER_BOILERPLATE 9924b9b4fd27Smrg 9925b9b4fd27Smrg # Allow CC to be a program name with arguments. 9926b9b4fd27Smrg lt_save_CC="$CC" 9927b9b4fd27Smrg lt_save_GCC=$GCC 9928a5602400Smrg lt_save_CFLAGS=$CFLAGS 9929b9b4fd27Smrg CC=${FC-"f95"} 9930a5602400Smrg CFLAGS=$FCFLAGS 9931b9b4fd27Smrg compiler=$CC 9932b9b4fd27Smrg GCC=$ac_cv_fc_compiler_gnu 9933b9b4fd27Smrg 9934b9b4fd27Smrg _LT_TAGVAR(compiler, $1)=$CC 9935b9b4fd27Smrg _LT_CC_BASENAME([$compiler]) 9936b9b4fd27Smrg 9937b9b4fd27Smrg if test -n "$compiler"; then 9938b9b4fd27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9939b9b4fd27Smrg AC_MSG_RESULT([$can_build_shared]) 9940b9b4fd27Smrg 9941b9b4fd27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9942b9b4fd27Smrg test "$can_build_shared" = "no" && enable_shared=no 9943b9b4fd27Smrg 9944b9b4fd27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9945b9b4fd27Smrg # are all built from PIC. 9946b9b4fd27Smrg case $host_os in 9947b9b4fd27Smrg aix3*) 9948b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 9949b9b4fd27Smrg if test -n "$RANLIB"; then 9950b9b4fd27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9951b9b4fd27Smrg postinstall_cmds='$RANLIB $lib' 9952b9b4fd27Smrg fi 9953caade7ccSmrg ;; 9954b9b4fd27Smrg aix[[4-9]]*) 9955b9b4fd27Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9956b9b4fd27Smrg test "$enable_shared" = yes && enable_static=no 9957b9b4fd27Smrg fi 9958b9b4fd27Smrg ;; 9959b9b4fd27Smrg esac 9960b9b4fd27Smrg AC_MSG_RESULT([$enable_shared]) 9961b9b4fd27Smrg 9962b9b4fd27Smrg AC_MSG_CHECKING([whether to build static libraries]) 9963b9b4fd27Smrg # Make sure either enable_shared or enable_static is yes. 9964b9b4fd27Smrg test "$enable_shared" = yes || enable_static=yes 9965b9b4fd27Smrg AC_MSG_RESULT([$enable_static]) 9966b9b4fd27Smrg 9967b9b4fd27Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 9968b9b4fd27Smrg _LT_TAGVAR(LD, $1)="$LD" 9969b9b4fd27Smrg 9970b9b4fd27Smrg ## CAVEAT EMPTOR: 9971b9b4fd27Smrg ## There is no encapsulation within the following macros, do not change 9972b9b4fd27Smrg ## the running order or otherwise move them around unless you know exactly 9973b9b4fd27Smrg ## what you are doing... 9974b9b4fd27Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 9975b9b4fd27Smrg _LT_COMPILER_PIC($1) 9976b9b4fd27Smrg _LT_COMPILER_C_O($1) 9977b9b4fd27Smrg _LT_COMPILER_FILE_LOCKS($1) 9978b9b4fd27Smrg _LT_LINKER_SHLIBS($1) 9979b9b4fd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 9980b9b4fd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9981b9b4fd27Smrg 9982b9b4fd27Smrg _LT_CONFIG($1) 9983b9b4fd27Smrg fi # test -n "$compiler" 9984b9b4fd27Smrg 9985b9b4fd27Smrg GCC=$lt_save_GCC 9986a5602400Smrg CC=$lt_save_CC 9987a5602400Smrg CFLAGS=$lt_save_CFLAGS 9988b9b4fd27Smrgfi # test "$_lt_disable_FC" != yes 9989b9b4fd27Smrg 9990b9b4fd27SmrgAC_LANG_POP 9991b9b4fd27Smrg])# _LT_LANG_FC_CONFIG 9992b9b4fd27Smrg 9993b9b4fd27Smrg 9994b9b4fd27Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 9995b9b4fd27Smrg# -------------------------- 9996b9b4fd27Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 9997b9b4fd27Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9998b9b4fd27Smrg# to write the compiler configuration to `libtool'. 9999b9b4fd27Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 10000b9b4fd27Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 10001b9b4fd27SmrgAC_LANG_SAVE 10002b9b4fd27Smrg 10003b9b4fd27Smrg# Source file extension for Java test sources. 10004b9b4fd27Smrgac_ext=java 10005b9b4fd27Smrg 10006b9b4fd27Smrg# Object file extension for compiled Java test sources. 10007b9b4fd27Smrgobjext=o 10008b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 10009b9b4fd27Smrg 10010b9b4fd27Smrg# Code to be used in simple compile tests 10011b9b4fd27Smrglt_simple_compile_test_code="class foo {}" 10012b9b4fd27Smrg 10013b9b4fd27Smrg# Code to be used in simple link tests 10014b9b4fd27Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 10015b9b4fd27Smrg 10016b9b4fd27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 10017b9b4fd27Smrg_LT_TAG_COMPILER 10018b9b4fd27Smrg 10019b9b4fd27Smrg# save warnings/boilerplate of simple test code 10020b9b4fd27Smrg_LT_COMPILER_BOILERPLATE 10021b9b4fd27Smrg_LT_LINKER_BOILERPLATE 10022b9b4fd27Smrg 10023b9b4fd27Smrg# Allow CC to be a program name with arguments. 10024a5602400Smrglt_save_CC=$CC 10025a5602400Smrglt_save_CFLAGS=$CFLAGS 10026b9b4fd27Smrglt_save_GCC=$GCC 10027b9b4fd27SmrgGCC=yes 10028b9b4fd27SmrgCC=${GCJ-"gcj"} 10029a5602400SmrgCFLAGS=$GCJFLAGS 10030b9b4fd27Smrgcompiler=$CC 10031b9b4fd27Smrg_LT_TAGVAR(compiler, $1)=$CC 10032b9b4fd27Smrg_LT_TAGVAR(LD, $1)="$LD" 10033b9b4fd27Smrg_LT_CC_BASENAME([$compiler]) 10034caade7ccSmrg 10035b9b4fd27Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 10036b9b4fd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 10037caade7ccSmrg 10038b9b4fd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 10039e8a5466aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 10040e8a5466aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 10041485f0483Smrg 10042b9b4fd27Smrgif test -n "$compiler"; then 10043b9b4fd27Smrg _LT_COMPILER_NO_RTTI($1) 10044b9b4fd27Smrg _LT_COMPILER_PIC($1) 10045b9b4fd27Smrg _LT_COMPILER_C_O($1) 10046b9b4fd27Smrg _LT_COMPILER_FILE_LOCKS($1) 10047b9b4fd27Smrg _LT_LINKER_SHLIBS($1) 10048b9b4fd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 10049caade7ccSmrg 10050b9b4fd27Smrg _LT_CONFIG($1) 10051b9b4fd27Smrgfi 10052caade7ccSmrg 10053b9b4fd27SmrgAC_LANG_RESTORE 10054caade7ccSmrg 10055b9b4fd27SmrgGCC=$lt_save_GCC 10056a5602400SmrgCC=$lt_save_CC 10057a5602400SmrgCFLAGS=$lt_save_CFLAGS 10058b9b4fd27Smrg])# _LT_LANG_GCJ_CONFIG 10059caade7ccSmrg 10060caade7ccSmrg 10061b9b4fd27Smrg# _LT_LANG_RC_CONFIG([TAG]) 10062b9b4fd27Smrg# ------------------------- 10063b9b4fd27Smrg# Ensure that the configuration variables for the Windows resource compiler 10064b9b4fd27Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 10065b9b4fd27Smrg# to write the compiler configuration to `libtool'. 10066b9b4fd27Smrgm4_defun([_LT_LANG_RC_CONFIG], 10067b9b4fd27Smrg[AC_REQUIRE([LT_PROG_RC])dnl 10068b9b4fd27SmrgAC_LANG_SAVE 10069caade7ccSmrg 10070b9b4fd27Smrg# Source file extension for RC test sources. 10071b9b4fd27Smrgac_ext=rc 10072caade7ccSmrg 10073b9b4fd27Smrg# Object file extension for compiled RC test sources. 10074b9b4fd27Smrgobjext=o 10075b9b4fd27Smrg_LT_TAGVAR(objext, $1)=$objext 10076caade7ccSmrg 10077b9b4fd27Smrg# Code to be used in simple compile tests 10078b9b4fd27Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 10079b9b4fd27Smrg 10080b9b4fd27Smrg# Code to be used in simple link tests 10081b9b4fd27Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 10082b9b4fd27Smrg 10083b9b4fd27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 10084b9b4fd27Smrg_LT_TAG_COMPILER 10085b9b4fd27Smrg 10086b9b4fd27Smrg# save warnings/boilerplate of simple test code 10087b9b4fd27Smrg_LT_COMPILER_BOILERPLATE 10088b9b4fd27Smrg_LT_LINKER_BOILERPLATE 10089b9b4fd27Smrg 10090b9b4fd27Smrg# Allow CC to be a program name with arguments. 10091b9b4fd27Smrglt_save_CC="$CC" 10092a5602400Smrglt_save_CFLAGS=$CFLAGS 10093b9b4fd27Smrglt_save_GCC=$GCC 10094b9b4fd27SmrgGCC= 10095b9b4fd27SmrgCC=${RC-"windres"} 10096a5602400SmrgCFLAGS= 10097b9b4fd27Smrgcompiler=$CC 10098b9b4fd27Smrg_LT_TAGVAR(compiler, $1)=$CC 10099b9b4fd27Smrg_LT_CC_BASENAME([$compiler]) 10100b9b4fd27Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 10101b9b4fd27Smrg 10102b9b4fd27Smrgif test -n "$compiler"; then 10103b9b4fd27Smrg : 10104b9b4fd27Smrg _LT_CONFIG($1) 10105caade7ccSmrgfi 10106caade7ccSmrg 10107b9b4fd27SmrgGCC=$lt_save_GCC 10108b9b4fd27SmrgAC_LANG_RESTORE 10109a5602400SmrgCC=$lt_save_CC 10110a5602400SmrgCFLAGS=$lt_save_CFLAGS 10111b9b4fd27Smrg])# _LT_LANG_RC_CONFIG 10112b9b4fd27Smrg 10113b9b4fd27Smrg 10114b9b4fd27Smrg# LT_PROG_GCJ 10115b9b4fd27Smrg# ----------- 10116b9b4fd27SmrgAC_DEFUN([LT_PROG_GCJ], 10117b9b4fd27Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 10118b9b4fd27Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 10119b9b4fd27Smrg [AC_CHECK_TOOL(GCJ, gcj,) 10120b9b4fd27Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 10121b9b4fd27Smrg AC_SUBST(GCJFLAGS)])])[]dnl 10122caade7ccSmrg]) 10123caade7ccSmrg 10124b9b4fd27Smrg# Old name: 10125b9b4fd27SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 10126b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 10127b9b4fd27Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 10128caade7ccSmrg 10129caade7ccSmrg 10130b9b4fd27Smrg# LT_PROG_RC 10131b9b4fd27Smrg# ---------- 10132b9b4fd27SmrgAC_DEFUN([LT_PROG_RC], 10133b9b4fd27Smrg[AC_CHECK_TOOL(RC, windres,) 10134b9b4fd27Smrg]) 10135caade7ccSmrg 10136b9b4fd27Smrg# Old name: 10137b9b4fd27SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 10138b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 10139b9b4fd27Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 10140caade7ccSmrg 10141caade7ccSmrg 10142b9b4fd27Smrg# _LT_DECL_EGREP 10143b9b4fd27Smrg# -------------- 10144b9b4fd27Smrg# If we don't have a new enough Autoconf to choose the best grep 10145b9b4fd27Smrg# available, choose the one first in the user's PATH. 10146b9b4fd27Smrgm4_defun([_LT_DECL_EGREP], 10147b9b4fd27Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 10148b9b4fd27SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 10149b9b4fd27Smrgtest -z "$GREP" && GREP=grep 10150b9b4fd27Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 10151b9b4fd27Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 10152b9b4fd27Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 10153b9b4fd27Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 10154b9b4fd27SmrgAC_SUBST([GREP]) 10155b9b4fd27Smrg]) 10156caade7ccSmrg 10157caade7ccSmrg 10158b9b4fd27Smrg# _LT_DECL_OBJDUMP 10159b9b4fd27Smrg# -------------- 10160b9b4fd27Smrg# If we don't have a new enough Autoconf to choose the best objdump 10161b9b4fd27Smrg# available, choose the one first in the user's PATH. 10162b9b4fd27Smrgm4_defun([_LT_DECL_OBJDUMP], 10163b9b4fd27Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 10164b9b4fd27Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 10165b9b4fd27Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 10166b9b4fd27SmrgAC_SUBST([OBJDUMP]) 10167b9b4fd27Smrg]) 10168caade7ccSmrg 10169a5602400Smrg# _LT_DECL_DLLTOOL 10170a5602400Smrg# ---------------- 10171a5602400Smrg# Ensure DLLTOOL variable is set. 10172a5602400Smrgm4_defun([_LT_DECL_DLLTOOL], 10173a5602400Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 10174a5602400Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 10175a5602400Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 10176a5602400SmrgAC_SUBST([DLLTOOL]) 10177a5602400Smrg]) 10178caade7ccSmrg 10179b9b4fd27Smrg# _LT_DECL_SED 10180b9b4fd27Smrg# ------------ 10181b9b4fd27Smrg# Check for a fully-functional sed program, that truncates 10182b9b4fd27Smrg# as few characters as possible. Prefer GNU sed if found. 10183b9b4fd27Smrgm4_defun([_LT_DECL_SED], 10184b9b4fd27Smrg[AC_PROG_SED 10185b9b4fd27Smrgtest -z "$SED" && SED=sed 10186b9b4fd27SmrgXsed="$SED -e 1s/^X//" 10187b9b4fd27Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 10188b9b4fd27Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 10189b9b4fd27Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 10190b9b4fd27Smrg])# _LT_DECL_SED 10191b9b4fd27Smrg 10192b9b4fd27Smrgm4_ifndef([AC_PROG_SED], [ 10193b9b4fd27Smrg# NOTE: This macro has been submitted for inclusion into # 10194b9b4fd27Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 10195b9b4fd27Smrg# a released version of Autoconf we should remove this # 10196b9b4fd27Smrg# macro and use it instead. # 10197b9b4fd27Smrg 10198b9b4fd27Smrgm4_defun([AC_PROG_SED], 10199b9b4fd27Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 10200b9b4fd27SmrgAC_CACHE_VAL(lt_cv_path_SED, 10201b9b4fd27Smrg[# Loop through the user's path and test for sed and gsed. 10202b9b4fd27Smrg# Then use that list of sed's as ones to test for truncation. 10203b9b4fd27Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10204b9b4fd27Smrgfor as_dir in $PATH 10205b9b4fd27Smrgdo 10206b9b4fd27Smrg IFS=$as_save_IFS 10207b9b4fd27Smrg test -z "$as_dir" && as_dir=. 10208b9b4fd27Smrg for lt_ac_prog in sed gsed; do 10209b9b4fd27Smrg for ac_exec_ext in '' $ac_executable_extensions; do 10210b9b4fd27Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 10211b9b4fd27Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 10212caade7ccSmrg fi 10213b9b4fd27Smrg done 10214b9b4fd27Smrg done 10215b9b4fd27Smrgdone 10216b9b4fd27SmrgIFS=$as_save_IFS 10217b9b4fd27Smrglt_ac_max=0 10218b9b4fd27Smrglt_ac_count=0 10219b9b4fd27Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 10220b9b4fd27Smrg# along with /bin/sed that truncates output. 10221b9b4fd27Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 10222b9b4fd27Smrg test ! -f $lt_ac_sed && continue 10223b9b4fd27Smrg cat /dev/null > conftest.in 10224b9b4fd27Smrg lt_ac_count=0 10225b9b4fd27Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 10226b9b4fd27Smrg # Check for GNU sed and select it if it is found. 10227b9b4fd27Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 10228b9b4fd27Smrg lt_cv_path_SED=$lt_ac_sed 10229b9b4fd27Smrg break 10230b9b4fd27Smrg fi 10231b9b4fd27Smrg while true; do 10232b9b4fd27Smrg cat conftest.in conftest.in >conftest.tmp 10233b9b4fd27Smrg mv conftest.tmp conftest.in 10234b9b4fd27Smrg cp conftest.in conftest.nl 10235b9b4fd27Smrg echo >>conftest.nl 10236b9b4fd27Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 10237b9b4fd27Smrg cmp -s conftest.out conftest.nl || break 10238b9b4fd27Smrg # 10000 chars as input seems more than enough 10239b9b4fd27Smrg test $lt_ac_count -gt 10 && break 10240b9b4fd27Smrg lt_ac_count=`expr $lt_ac_count + 1` 10241b9b4fd27Smrg if test $lt_ac_count -gt $lt_ac_max; then 10242b9b4fd27Smrg lt_ac_max=$lt_ac_count 10243b9b4fd27Smrg lt_cv_path_SED=$lt_ac_sed 10244b9b4fd27Smrg fi 10245b9b4fd27Smrg done 10246b9b4fd27Smrgdone 10247b9b4fd27Smrg]) 10248b9b4fd27SmrgSED=$lt_cv_path_SED 10249b9b4fd27SmrgAC_SUBST([SED]) 10250b9b4fd27SmrgAC_MSG_RESULT([$SED]) 10251b9b4fd27Smrg])#AC_PROG_SED 10252b9b4fd27Smrg])#m4_ifndef 10253b9b4fd27Smrg 10254b9b4fd27Smrg# Old name: 10255b9b4fd27SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 10256b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 10257b9b4fd27Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 10258b9b4fd27Smrg 10259b9b4fd27Smrg 10260b9b4fd27Smrg# _LT_CHECK_SHELL_FEATURES 10261b9b4fd27Smrg# ------------------------ 10262b9b4fd27Smrg# Find out whether the shell is Bourne or XSI compatible, 10263b9b4fd27Smrg# or has some other useful features. 10264b9b4fd27Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 10265b9b4fd27Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 10266b9b4fd27Smrg# Try some XSI features 10267b9b4fd27Smrgxsi_shell=no 10268b9b4fd27Smrg( _lt_dummy="a/b/c" 10269a5602400Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 10270a5602400Smrg = c,a/b,b/c, \ 10271b9b4fd27Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 10272b9b4fd27Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 10273b9b4fd27Smrg && xsi_shell=yes 10274b9b4fd27SmrgAC_MSG_RESULT([$xsi_shell]) 10275b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 10276b9b4fd27Smrg 10277b9b4fd27SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 10278b9b4fd27Smrglt_shell_append=no 10279b9b4fd27Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 10280b9b4fd27Smrg >/dev/null 2>&1 \ 10281b9b4fd27Smrg && lt_shell_append=yes 10282b9b4fd27SmrgAC_MSG_RESULT([$lt_shell_append]) 10283b9b4fd27Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 10284b9b4fd27Smrg 10285b9b4fd27Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 10286b9b4fd27Smrg lt_unset=unset 10287b9b4fd27Smrgelse 10288b9b4fd27Smrg lt_unset=false 10289b9b4fd27Smrgfi 10290b9b4fd27Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 10291b9b4fd27Smrg 10292b9b4fd27Smrg# test EBCDIC or ASCII 10293b9b4fd27Smrgcase `echo X|tr X '\101'` in 10294b9b4fd27Smrg A) # ASCII based system 10295b9b4fd27Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 10296b9b4fd27Smrg lt_SP2NL='tr \040 \012' 10297b9b4fd27Smrg lt_NL2SP='tr \015\012 \040\040' 10298b9b4fd27Smrg ;; 10299b9b4fd27Smrg *) # EBCDIC based system 10300b9b4fd27Smrg lt_SP2NL='tr \100 \n' 10301b9b4fd27Smrg lt_NL2SP='tr \r\n \100\100' 10302b9b4fd27Smrg ;; 10303b9b4fd27Smrgesac 10304b9b4fd27Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 10305b9b4fd27Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 10306b9b4fd27Smrg])# _LT_CHECK_SHELL_FEATURES 10307caade7ccSmrg 10308caade7ccSmrg 10309a5602400Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 10310a5602400Smrg# ------------------------------------------------------ 10311a5602400Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 10312a5602400Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 10313a5602400Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 10314a5602400Smrg[dnl { 10315a5602400Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 10316a5602400Smrg$1 ()\ 10317a5602400Smrg{\ 10318a5602400Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 10319a5602400Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 10320a5602400Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 10321a5602400Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 10322a5602400Smrgtest 0 -eq $? || _lt_function_replace_fail=: 10323a5602400Smrg]) 10324caade7ccSmrg 10325caade7ccSmrg 10326a5602400Smrg# _LT_PROG_REPLACE_SHELLFNS 10327a5602400Smrg# ------------------------- 10328a5602400Smrg# Replace existing portable implementations of several shell functions with 10329a5602400Smrg# equivalent extended shell implementations where those features are available.. 10330a5602400Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 10331a5602400Smrg[if test x"$xsi_shell" = xyes; then 10332a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 10333a5602400Smrg case ${1} in 10334a5602400Smrg */*) func_dirname_result="${1%/*}${2}" ;; 10335a5602400Smrg * ) func_dirname_result="${3}" ;; 10336a5602400Smrg esac]) 10337a5602400Smrg 10338a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 10339a5602400Smrg func_basename_result="${1##*/}"]) 10340a5602400Smrg 10341a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 10342a5602400Smrg case ${1} in 10343a5602400Smrg */*) func_dirname_result="${1%/*}${2}" ;; 10344a5602400Smrg * ) func_dirname_result="${3}" ;; 10345a5602400Smrg esac 10346a5602400Smrg func_basename_result="${1##*/}"]) 10347caade7ccSmrg 10348a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 10349a5602400Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 10350a5602400Smrg # positional parameters, so assign one to ordinary parameter first. 10351a5602400Smrg func_stripname_result=${3} 10352a5602400Smrg func_stripname_result=${func_stripname_result#"${1}"} 10353a5602400Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 10354caade7ccSmrg 10355a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 10356a5602400Smrg func_split_long_opt_name=${1%%=*} 10357a5602400Smrg func_split_long_opt_arg=${1#*=}]) 10358b9b4fd27Smrg 10359a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 10360a5602400Smrg func_split_short_opt_arg=${1#??} 10361a5602400Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 10362caade7ccSmrg 10363a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 10364a5602400Smrg case ${1} in 10365a5602400Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 10366a5602400Smrg *) func_lo2o_result=${1} ;; 10367a5602400Smrg esac]) 10368caade7ccSmrg 10369a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 10370caade7ccSmrg 10371a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 10372caade7ccSmrg 10373a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 10374a5602400Smrgfi 10375caade7ccSmrg 10376a5602400Smrgif test x"$lt_shell_append" = xyes; then 10377a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 10378caade7ccSmrg 10379a5602400Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 10380a5602400Smrg func_quote_for_eval "${2}" 10381a5602400Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 10382a5602400Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 10383caade7ccSmrg 10384a5602400Smrg # Save a `func_append' function call where possible by direct use of '+=' 10385a5602400Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 10386a5602400Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 10387a5602400Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 10388a5602400Smrg test 0 -eq $? || _lt_function_replace_fail=: 10389a5602400Smrgelse 10390a5602400Smrg # Save a `func_append' function call even when '+=' is not available 10391a5602400Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 10392a5602400Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 10393a5602400Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 10394a5602400Smrg test 0 -eq $? || _lt_function_replace_fail=: 10395a5602400Smrgfi 10396caade7ccSmrg 10397a5602400Smrgif test x"$_lt_function_replace_fail" = x":"; then 10398a5602400Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 10399a5602400Smrgfi 10400a5602400Smrg]) 10401caade7ccSmrg 10402a5602400Smrg# _LT_PATH_CONVERSION_FUNCTIONS 10403a5602400Smrg# ----------------------------- 10404a5602400Smrg# Determine which file name conversion functions should be used by 10405a5602400Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 10406a5602400Smrg# for certain cross-compile configurations and native mingw. 10407a5602400Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 10408a5602400Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 10409a5602400SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 10410a5602400SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 10411a5602400SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 10412a5602400Smrg[case $host in 10413a5602400Smrg *-*-mingw* ) 10414a5602400Smrg case $build in 10415a5602400Smrg *-*-mingw* ) # actually msys 10416a5602400Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 10417a5602400Smrg ;; 10418a5602400Smrg *-*-cygwin* ) 10419a5602400Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 10420a5602400Smrg ;; 10421a5602400Smrg * ) # otherwise, assume *nix 10422a5602400Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 10423a5602400Smrg ;; 10424a5602400Smrg esac 10425b9b4fd27Smrg ;; 10426a5602400Smrg *-*-cygwin* ) 10427a5602400Smrg case $build in 10428a5602400Smrg *-*-mingw* ) # actually msys 10429a5602400Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 10430a5602400Smrg ;; 10431a5602400Smrg *-*-cygwin* ) 10432a5602400Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 10433a5602400Smrg ;; 10434a5602400Smrg * ) # otherwise, assume *nix 10435a5602400Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 10436a5602400Smrg ;; 10437a5602400Smrg esac 10438b9b4fd27Smrg ;; 10439a5602400Smrg * ) # unhandled hosts (and "normal" native builds) 10440a5602400Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 10441a5602400Smrg ;; 10442a5602400Smrgesac 10443a5602400Smrg]) 10444a5602400Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 10445a5602400SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 10446a5602400Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 10447a5602400Smrg [0], [convert $build file names to $host format])dnl 10448a5602400Smrg 10449a5602400SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 10450a5602400SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 10451a5602400Smrg[#assume ordinary cross tools, or native build. 10452a5602400Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 10453a5602400Smrgcase $host in 10454a5602400Smrg *-*-mingw* ) 10455a5602400Smrg case $build in 10456a5602400Smrg *-*-mingw* ) # actually msys 10457a5602400Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 10458a5602400Smrg ;; 10459a5602400Smrg esac 10460a5602400Smrg ;; 10461a5602400Smrgesac 10462b9b4fd27Smrg]) 10463a5602400Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 10464a5602400SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 10465a5602400Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 10466a5602400Smrg [0], [convert $build files to toolchain format])dnl 10467a5602400Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 10468caade7ccSmrg 10469b9b4fd27Smrg# Helper functions for option handling. -*- Autoconf -*- 10470b9b4fd27Smrg# 10471e8a5466aSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 10472e8a5466aSmrg# Inc. 10473b9b4fd27Smrg# Written by Gary V. Vaughan, 2004 10474b9b4fd27Smrg# 10475b9b4fd27Smrg# This file is free software; the Free Software Foundation gives 10476b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without 10477b9b4fd27Smrg# modifications, as long as this notice is preserved. 10478caade7ccSmrg 10479e8a5466aSmrg# serial 7 ltoptions.m4 10480caade7ccSmrg 10481b9b4fd27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 10482b9b4fd27SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 10483b9b4fd27Smrg 10484b9b4fd27Smrg 10485b9b4fd27Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 10486b9b4fd27Smrg# ------------------------------------------ 10487b9b4fd27Smrgm4_define([_LT_MANGLE_OPTION], 10488b9b4fd27Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 10489b9b4fd27Smrg 10490b9b4fd27Smrg 10491b9b4fd27Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 10492b9b4fd27Smrg# --------------------------------------- 10493b9b4fd27Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 10494b9b4fd27Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 10495b9b4fd27Smrg# saved as a flag. 10496b9b4fd27Smrgm4_define([_LT_SET_OPTION], 10497b9b4fd27Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 10498b9b4fd27Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 10499b9b4fd27Smrg _LT_MANGLE_DEFUN([$1], [$2]), 10500b9b4fd27Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 10501b9b4fd27Smrg]) 10502b9b4fd27Smrg 10503b9b4fd27Smrg 10504b9b4fd27Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 10505b9b4fd27Smrg# ------------------------------------------------------------ 10506b9b4fd27Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 10507b9b4fd27Smrgm4_define([_LT_IF_OPTION], 10508b9b4fd27Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 10509b9b4fd27Smrg 10510b9b4fd27Smrg 10511b9b4fd27Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 10512b9b4fd27Smrg# ------------------------------------------------------- 10513b9b4fd27Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 10514b9b4fd27Smrg# are set. 10515b9b4fd27Smrgm4_define([_LT_UNLESS_OPTIONS], 10516b9b4fd27Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 10517b9b4fd27Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 10518b9b4fd27Smrg [m4_define([$0_found])])])[]dnl 10519b9b4fd27Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 10520b9b4fd27Smrg])[]dnl 10521b9b4fd27Smrg]) 10522caade7ccSmrg 10523caade7ccSmrg 10524b9b4fd27Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 10525b9b4fd27Smrg# ---------------------------------------- 10526b9b4fd27Smrg# OPTION-LIST is a space-separated list of Libtool options associated 10527b9b4fd27Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 10528b9b4fd27Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 10529b9b4fd27Smrg# the unknown option and exit. 10530b9b4fd27Smrgm4_defun([_LT_SET_OPTIONS], 10531b9b4fd27Smrg[# Set options 10532b9b4fd27Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 10533b9b4fd27Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 10534b9b4fd27Smrg 10535b9b4fd27Smrgm4_if([$1],[LT_INIT],[ 10536b9b4fd27Smrg dnl 10537b9b4fd27Smrg dnl Simply set some default values (i.e off) if boolean options were not 10538b9b4fd27Smrg dnl specified: 10539b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 10540b9b4fd27Smrg ]) 10541b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 10542b9b4fd27Smrg ]) 10543b9b4fd27Smrg dnl 10544b9b4fd27Smrg dnl If no reference was made to various pairs of opposing options, then 10545b9b4fd27Smrg dnl we run the default mode handler for the pair. For example, if neither 10546b9b4fd27Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 10547b9b4fd27Smrg dnl archives by default: 10548b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 10549b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 10550b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 10551b9b4fd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 10552b9b4fd27Smrg [_LT_ENABLE_FAST_INSTALL]) 10553b9b4fd27Smrg ]) 10554b9b4fd27Smrg])# _LT_SET_OPTIONS 10555caade7ccSmrg 10556caade7ccSmrg 10557caade7ccSmrg 10558b9b4fd27Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 10559b9b4fd27Smrg# ----------------------------------------- 10560b9b4fd27Smrgm4_define([_LT_MANGLE_DEFUN], 10561b9b4fd27Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 10562caade7ccSmrg 10563caade7ccSmrg 10564b9b4fd27Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 10565b9b4fd27Smrg# ----------------------------------------------- 10566b9b4fd27Smrgm4_define([LT_OPTION_DEFINE], 10567b9b4fd27Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 10568b9b4fd27Smrg])# LT_OPTION_DEFINE 10569caade7ccSmrg 10570caade7ccSmrg 10571b9b4fd27Smrg# dlopen 10572b9b4fd27Smrg# ------ 10573b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 10574b9b4fd27Smrg]) 10575caade7ccSmrg 10576b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 10577b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 10578b9b4fd27SmrgAC_DIAGNOSE([obsolete], 10579b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10580b9b4fd27Smrgput the `dlopen' option into LT_INIT's first parameter.]) 10581b9b4fd27Smrg]) 10582caade7ccSmrg 10583b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 10584b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 10585caade7ccSmrg 10586caade7ccSmrg 10587b9b4fd27Smrg# win32-dll 10588b9b4fd27Smrg# --------- 10589b9b4fd27Smrg# Declare package support for building win32 dll's. 10590b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 10591b9b4fd27Smrg[enable_win32_dll=yes 10592caade7ccSmrg 10593b9b4fd27Smrgcase $host in 10594e8a5466aSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 10595b9b4fd27Smrg AC_CHECK_TOOL(AS, as, false) 10596b9b4fd27Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 10597b9b4fd27Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 10598b9b4fd27Smrg ;; 10599b9b4fd27Smrgesac 10600caade7ccSmrg 10601b9b4fd27Smrgtest -z "$AS" && AS=as 10602e8a5466aSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 10603caade7ccSmrg 10604b9b4fd27Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 10605e8a5466aSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 10606caade7ccSmrg 10607b9b4fd27Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 10608e8a5466aSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 10609b9b4fd27Smrg])# win32-dll 10610caade7ccSmrg 10611b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 10612b9b4fd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 10613b9b4fd27Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 10614b9b4fd27SmrgAC_DIAGNOSE([obsolete], 10615b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10616b9b4fd27Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 10617b9b4fd27Smrg]) 10618caade7ccSmrg 10619b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 10620b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 10621caade7ccSmrg 10622caade7ccSmrg 10623b9b4fd27Smrg# _LT_ENABLE_SHARED([DEFAULT]) 10624b9b4fd27Smrg# ---------------------------- 10625b9b4fd27Smrg# implement the --enable-shared flag, and supports the `shared' and 10626b9b4fd27Smrg# `disable-shared' LT_INIT options. 10627b9b4fd27Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10628b9b4fd27Smrgm4_define([_LT_ENABLE_SHARED], 10629b9b4fd27Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 10630b9b4fd27SmrgAC_ARG_ENABLE([shared], 10631b9b4fd27Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 10632b9b4fd27Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 10633b9b4fd27Smrg [p=${PACKAGE-default} 10634b9b4fd27Smrg case $enableval in 10635b9b4fd27Smrg yes) enable_shared=yes ;; 10636b9b4fd27Smrg no) enable_shared=no ;; 10637b9b4fd27Smrg *) 10638b9b4fd27Smrg enable_shared=no 10639b9b4fd27Smrg # Look at the argument we got. We use all the common list separators. 10640b9b4fd27Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10641b9b4fd27Smrg for pkg in $enableval; do 10642b9b4fd27Smrg IFS="$lt_save_ifs" 10643b9b4fd27Smrg if test "X$pkg" = "X$p"; then 10644b9b4fd27Smrg enable_shared=yes 10645b9b4fd27Smrg fi 10646b9b4fd27Smrg done 10647b9b4fd27Smrg IFS="$lt_save_ifs" 10648caade7ccSmrg ;; 10649b9b4fd27Smrg esac], 10650b9b4fd27Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 10651caade7ccSmrg 10652b9b4fd27Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 10653b9b4fd27Smrg [Whether or not to build shared libraries]) 10654b9b4fd27Smrg])# _LT_ENABLE_SHARED 10655caade7ccSmrg 10656b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 10657b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 10658caade7ccSmrg 10659b9b4fd27Smrg# Old names: 10660b9b4fd27SmrgAC_DEFUN([AC_ENABLE_SHARED], 10661b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 10662b9b4fd27Smrg]) 10663caade7ccSmrg 10664b9b4fd27SmrgAC_DEFUN([AC_DISABLE_SHARED], 10665b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 10666b9b4fd27Smrg]) 10667caade7ccSmrg 10668b9b4fd27SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 10669b9b4fd27SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 10670b9b4fd27Smrg 10671b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 10672b9b4fd27Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 10673b9b4fd27Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 10674caade7ccSmrg 10675caade7ccSmrg 10676caade7ccSmrg 10677b9b4fd27Smrg# _LT_ENABLE_STATIC([DEFAULT]) 10678b9b4fd27Smrg# ---------------------------- 10679b9b4fd27Smrg# implement the --enable-static flag, and support the `static' and 10680b9b4fd27Smrg# `disable-static' LT_INIT options. 10681b9b4fd27Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10682b9b4fd27Smrgm4_define([_LT_ENABLE_STATIC], 10683b9b4fd27Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 10684b9b4fd27SmrgAC_ARG_ENABLE([static], 10685b9b4fd27Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 10686b9b4fd27Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 10687b9b4fd27Smrg [p=${PACKAGE-default} 10688b9b4fd27Smrg case $enableval in 10689b9b4fd27Smrg yes) enable_static=yes ;; 10690b9b4fd27Smrg no) enable_static=no ;; 10691caade7ccSmrg *) 10692b9b4fd27Smrg enable_static=no 10693b9b4fd27Smrg # Look at the argument we got. We use all the common list separators. 10694b9b4fd27Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10695b9b4fd27Smrg for pkg in $enableval; do 10696b9b4fd27Smrg IFS="$lt_save_ifs" 10697b9b4fd27Smrg if test "X$pkg" = "X$p"; then 10698b9b4fd27Smrg enable_static=yes 10699b9b4fd27Smrg fi 10700b9b4fd27Smrg done 10701b9b4fd27Smrg IFS="$lt_save_ifs" 10702caade7ccSmrg ;; 10703b9b4fd27Smrg esac], 10704b9b4fd27Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 10705caade7ccSmrg 10706b9b4fd27Smrg _LT_DECL([build_old_libs], [enable_static], [0], 10707b9b4fd27Smrg [Whether or not to build static libraries]) 10708b9b4fd27Smrg])# _LT_ENABLE_STATIC 10709caade7ccSmrg 10710b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 10711b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 10712caade7ccSmrg 10713b9b4fd27Smrg# Old names: 10714b9b4fd27SmrgAC_DEFUN([AC_ENABLE_STATIC], 10715b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 10716b9b4fd27Smrg]) 10717caade7ccSmrg 10718b9b4fd27SmrgAC_DEFUN([AC_DISABLE_STATIC], 10719b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 10720b9b4fd27Smrg]) 10721caade7ccSmrg 10722b9b4fd27SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 10723b9b4fd27SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 10724b9b4fd27Smrg 10725b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 10726b9b4fd27Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 10727b9b4fd27Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 10728caade7ccSmrg 10729caade7ccSmrg 10730caade7ccSmrg 10731b9b4fd27Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 10732b9b4fd27Smrg# ---------------------------------- 10733b9b4fd27Smrg# implement the --enable-fast-install flag, and support the `fast-install' 10734b9b4fd27Smrg# and `disable-fast-install' LT_INIT options. 10735b9b4fd27Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10736b9b4fd27Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 10737b9b4fd27Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 10738b9b4fd27SmrgAC_ARG_ENABLE([fast-install], 10739b9b4fd27Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 10740b9b4fd27Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 10741b9b4fd27Smrg [p=${PACKAGE-default} 10742b9b4fd27Smrg case $enableval in 10743b9b4fd27Smrg yes) enable_fast_install=yes ;; 10744b9b4fd27Smrg no) enable_fast_install=no ;; 10745b9b4fd27Smrg *) 10746b9b4fd27Smrg enable_fast_install=no 10747b9b4fd27Smrg # Look at the argument we got. We use all the common list separators. 10748b9b4fd27Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10749b9b4fd27Smrg for pkg in $enableval; do 10750b9b4fd27Smrg IFS="$lt_save_ifs" 10751b9b4fd27Smrg if test "X$pkg" = "X$p"; then 10752b9b4fd27Smrg enable_fast_install=yes 10753b9b4fd27Smrg fi 10754b9b4fd27Smrg done 10755b9b4fd27Smrg IFS="$lt_save_ifs" 10756b9b4fd27Smrg ;; 10757b9b4fd27Smrg esac], 10758b9b4fd27Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 10759caade7ccSmrg 10760b9b4fd27Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 10761b9b4fd27Smrg [Whether or not to optimize for fast installation])dnl 10762b9b4fd27Smrg])# _LT_ENABLE_FAST_INSTALL 10763caade7ccSmrg 10764b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 10765b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 10766caade7ccSmrg 10767b9b4fd27Smrg# Old names: 10768b9b4fd27SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 10769b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 10770b9b4fd27SmrgAC_DIAGNOSE([obsolete], 10771b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10772b9b4fd27Smrgthe `fast-install' option into LT_INIT's first parameter.]) 10773caade7ccSmrg]) 10774caade7ccSmrg 10775b9b4fd27SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 10776b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 10777b9b4fd27SmrgAC_DIAGNOSE([obsolete], 10778b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10779b9b4fd27Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 10780caade7ccSmrg]) 10781caade7ccSmrg 10782b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 10783b9b4fd27Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 10784b9b4fd27Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 10785485f0483Smrg 10786485f0483Smrg 10787b9b4fd27Smrg# _LT_WITH_PIC([MODE]) 10788b9b4fd27Smrg# -------------------- 10789b9b4fd27Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 10790b9b4fd27Smrg# LT_INIT options. 10791b9b4fd27Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 10792b9b4fd27Smrgm4_define([_LT_WITH_PIC], 10793b9b4fd27Smrg[AC_ARG_WITH([pic], 10794b9b4fd27Smrg [AS_HELP_STRING([--with-pic], 10795b9b4fd27Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 10796b9b4fd27Smrg [pic_mode="$withval"], 10797b9b4fd27Smrg [pic_mode=default]) 10798485f0483Smrg 10799b9b4fd27Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 10800485f0483Smrg 10801b9b4fd27Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 10802b9b4fd27Smrg])# _LT_WITH_PIC 10803b9b4fd27Smrg 10804b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 10805b9b4fd27SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 10806b9b4fd27Smrg 10807b9b4fd27Smrg# Old name: 10808b9b4fd27SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 10809b9b4fd27Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 10810b9b4fd27SmrgAC_DIAGNOSE([obsolete], 10811b9b4fd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10812b9b4fd27Smrgput the `pic-only' option into LT_INIT's first parameter.]) 10813caade7ccSmrg]) 10814caade7ccSmrg 10815b9b4fd27Smrgdnl aclocal-1.4 backwards compatibility: 10816b9b4fd27Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 10817caade7ccSmrg 10818caade7ccSmrg 10819b9b4fd27Smrgm4_define([_LTDL_MODE], []) 10820b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 10821b9b4fd27Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 10822b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 10823b9b4fd27Smrg [m4_define([_LTDL_MODE], [recursive])]) 10824b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 10825b9b4fd27Smrg [m4_define([_LTDL_MODE], [subproject])]) 10826b9b4fd27Smrg 10827b9b4fd27Smrgm4_define([_LTDL_TYPE], []) 10828b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 10829b9b4fd27Smrg [m4_define([_LTDL_TYPE], [installable])]) 10830b9b4fd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 10831b9b4fd27Smrg [m4_define([_LTDL_TYPE], [convenience])]) 10832b9b4fd27Smrg 10833b9b4fd27Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 10834caade7ccSmrg# 10835b9b4fd27Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 10836b9b4fd27Smrg# Written by Gary V. Vaughan, 2004 10837caade7ccSmrg# 10838b9b4fd27Smrg# This file is free software; the Free Software Foundation gives 10839b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without 10840b9b4fd27Smrg# modifications, as long as this notice is preserved. 10841caade7ccSmrg 10842b9b4fd27Smrg# serial 6 ltsugar.m4 10843caade7ccSmrg 10844b9b4fd27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 10845b9b4fd27SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 10846caade7ccSmrg 10847b9b4fd27Smrg 10848b9b4fd27Smrg# lt_join(SEP, ARG1, [ARG2...]) 10849485f0483Smrg# ----------------------------- 10850b9b4fd27Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 10851b9b4fd27Smrg# associated separator. 10852b9b4fd27Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 10853b9b4fd27Smrg# versions in m4sugar had bugs. 10854b9b4fd27Smrgm4_define([lt_join], 10855b9b4fd27Smrg[m4_if([$#], [1], [], 10856b9b4fd27Smrg [$#], [2], [[$2]], 10857b9b4fd27Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 10858b9b4fd27Smrgm4_define([_lt_join], 10859b9b4fd27Smrg[m4_if([$#$2], [2], [], 10860b9b4fd27Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 10861b9b4fd27Smrg 10862b9b4fd27Smrg 10863b9b4fd27Smrg# lt_car(LIST) 10864b9b4fd27Smrg# lt_cdr(LIST) 10865b9b4fd27Smrg# ------------ 10866b9b4fd27Smrg# Manipulate m4 lists. 10867b9b4fd27Smrg# These macros are necessary as long as will still need to support 10868b9b4fd27Smrg# Autoconf-2.59 which quotes differently. 10869b9b4fd27Smrgm4_define([lt_car], [[$1]]) 10870b9b4fd27Smrgm4_define([lt_cdr], 10871b9b4fd27Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 10872b9b4fd27Smrg [$#], 1, [], 10873b9b4fd27Smrg [m4_dquote(m4_shift($@))])]) 10874b9b4fd27Smrgm4_define([lt_unquote], $1) 10875b9b4fd27Smrg 10876b9b4fd27Smrg 10877b9b4fd27Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 10878b9b4fd27Smrg# ------------------------------------------ 10879b9b4fd27Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 10880b9b4fd27Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 10881b9b4fd27Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 10882b9b4fd27Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 10883b9b4fd27Smrg# than defined and empty). 10884b9b4fd27Smrg# 10885b9b4fd27Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 10886b9b4fd27Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 10887b9b4fd27Smrgm4_define([lt_append], 10888b9b4fd27Smrg[m4_define([$1], 10889b9b4fd27Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 10890b9b4fd27Smrg 10891b9b4fd27Smrg 10892b9b4fd27Smrg 10893b9b4fd27Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 10894b9b4fd27Smrg# ---------------------------------------------------------- 10895b9b4fd27Smrg# Produce a SEP delimited list of all paired combinations of elements of 10896b9b4fd27Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 10897b9b4fd27Smrg# has the form PREFIXmINFIXSUFFIXn. 10898b9b4fd27Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 10899b9b4fd27Smrgm4_define([lt_combine], 10900b9b4fd27Smrg[m4_if(m4_eval([$# > 3]), [1], 10901b9b4fd27Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 10902b9b4fd27Smrg[[m4_foreach([_Lt_prefix], [$2], 10903b9b4fd27Smrg [m4_foreach([_Lt_suffix], 10904b9b4fd27Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 10905b9b4fd27Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 10906b9b4fd27Smrg 10907b9b4fd27Smrg 10908b9b4fd27Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 10909b9b4fd27Smrg# ----------------------------------------------------------------------- 10910b9b4fd27Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 10911b9b4fd27Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 10912b9b4fd27Smrgm4_define([lt_if_append_uniq], 10913b9b4fd27Smrg[m4_ifdef([$1], 10914b9b4fd27Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 10915b9b4fd27Smrg [lt_append([$1], [$2], [$3])$4], 10916b9b4fd27Smrg [$5])], 10917b9b4fd27Smrg [lt_append([$1], [$2], [$3])$4])]) 10918b9b4fd27Smrg 10919b9b4fd27Smrg 10920b9b4fd27Smrg# lt_dict_add(DICT, KEY, VALUE) 10921b9b4fd27Smrg# ----------------------------- 10922b9b4fd27Smrgm4_define([lt_dict_add], 10923b9b4fd27Smrg[m4_define([$1($2)], [$3])]) 10924485f0483Smrg 10925485f0483Smrg 10926b9b4fd27Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 10927b9b4fd27Smrg# -------------------------------------------- 10928b9b4fd27Smrgm4_define([lt_dict_add_subkey], 10929b9b4fd27Smrg[m4_define([$1($2:$3)], [$4])]) 10930caade7ccSmrg 10931caade7ccSmrg 10932b9b4fd27Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 10933b9b4fd27Smrg# ---------------------------------- 10934b9b4fd27Smrgm4_define([lt_dict_fetch], 10935b9b4fd27Smrg[m4_ifval([$3], 10936b9b4fd27Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 10937b9b4fd27Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 10938caade7ccSmrg 10939485f0483Smrg 10940b9b4fd27Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 10941b9b4fd27Smrg# ----------------------------------------------------------------- 10942b9b4fd27Smrgm4_define([lt_if_dict_fetch], 10943b9b4fd27Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 10944b9b4fd27Smrg [$5], 10945b9b4fd27Smrg [$6])]) 10946caade7ccSmrg 10947485f0483Smrg 10948b9b4fd27Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 10949b9b4fd27Smrg# -------------------------------------------------------------- 10950b9b4fd27Smrgm4_define([lt_dict_filter], 10951b9b4fd27Smrg[m4_if([$5], [], [], 10952b9b4fd27Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 10953b9b4fd27Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 10954b9b4fd27Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 10955b9b4fd27Smrg]) 10956485f0483Smrg 10957b9b4fd27Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 10958b9b4fd27Smrg# 10959b9b4fd27Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 10960b9b4fd27Smrg# Written by Scott James Remnant, 2004 10961b9b4fd27Smrg# 10962b9b4fd27Smrg# This file is free software; the Free Software Foundation gives 10963b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without 10964b9b4fd27Smrg# modifications, as long as this notice is preserved. 10965caade7ccSmrg 10966a5602400Smrg# @configure_input@ 10967caade7ccSmrg 10968a5602400Smrg# serial 3293 ltversion.m4 10969b9b4fd27Smrg# This file is part of GNU Libtool 10970caade7ccSmrg 10971a5602400Smrgm4_define([LT_PACKAGE_VERSION], [2.4]) 10972a5602400Smrgm4_define([LT_PACKAGE_REVISION], [1.3293]) 10973b9b4fd27Smrg 10974b9b4fd27SmrgAC_DEFUN([LTVERSION_VERSION], 10975a5602400Smrg[macro_version='2.4' 10976a5602400Smrgmacro_revision='1.3293' 10977b9b4fd27Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 10978b9b4fd27Smrg_LT_DECL(, macro_revision, 0) 10979b9b4fd27Smrg]) 10980b9b4fd27Smrg 10981b9b4fd27Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 10982b9b4fd27Smrg# 10983e8a5466aSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 10984b9b4fd27Smrg# Written by Scott James Remnant, 2004. 10985b9b4fd27Smrg# 10986b9b4fd27Smrg# This file is free software; the Free Software Foundation gives 10987b9b4fd27Smrg# unlimited permission to copy and/or distribute it, with or without 10988b9b4fd27Smrg# modifications, as long as this notice is preserved. 10989b9b4fd27Smrg 10990e8a5466aSmrg# serial 5 lt~obsolete.m4 10991b9b4fd27Smrg 10992b9b4fd27Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 10993b9b4fd27Smrg# 10994b9b4fd27Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 10995b9b4fd27Smrg# which have later been changed to m4_define as they aren't part of the 10996b9b4fd27Smrg# exported API, or moved to Autoconf or Automake where they belong. 10997b9b4fd27Smrg# 10998b9b4fd27Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 10999b9b4fd27Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 11000b9b4fd27Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 11001b9b4fd27Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 11002b9b4fd27Smrg# and doesn't know about Autoconf macros at all.) 11003b9b4fd27Smrg# 11004b9b4fd27Smrg# So we provide this file, which has a silly filename so it's always 11005b9b4fd27Smrg# included after everything else. This provides aclocal with the 11006b9b4fd27Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 11007b9b4fd27Smrg# because those macros already exist, or will be overwritten later. 11008b9b4fd27Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 11009b9b4fd27Smrg# 11010b9b4fd27Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 11011b9b4fd27Smrg# Yes, that means every name once taken will need to remain here until 11012b9b4fd27Smrg# we give up compatibility with versions before 1.7, at which point 11013b9b4fd27Smrg# we need to keep only those names which we still refer to. 11014b9b4fd27Smrg 11015b9b4fd27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 11016b9b4fd27SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 11017b9b4fd27Smrg 11018b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 11019b9b4fd27Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 11020b9b4fd27Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 11021b9b4fd27Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 11022b9b4fd27Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 11023b9b4fd27Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 11024b9b4fd27Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 11025b9b4fd27Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 11026b9b4fd27Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 11027b9b4fd27Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 11028b9b4fd27Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 11029b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 11030b9b4fd27Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 11031b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 11032b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 11033b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 11034b9b4fd27Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 11035b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 11036b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 11037b9b4fd27Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 11038b9b4fd27Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 11039b9b4fd27Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 11040b9b4fd27Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 11041b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 11042b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 11043b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 11044b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 11045b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 11046b9b4fd27Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 11047b9b4fd27Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 11048b9b4fd27Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 11049b9b4fd27Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 11050b9b4fd27Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 11051b9b4fd27Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 11052b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 11053b9b4fd27Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 11054b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 11055b9b4fd27Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 11056b9b4fd27Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 11057b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 11058b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 11059b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 11060b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 11061b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 11062b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 11063b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 11064b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 11065b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 11066b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 11067b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 11068b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 11069b9b4fd27Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 11070b9b4fd27Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 11071b9b4fd27Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 11072e8a5466aSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 11073e8a5466aSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 11074e8a5466aSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 11075e8a5466aSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 11076e8a5466aSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 11077e8a5466aSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 11078e8a5466aSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 11079caade7ccSmrg 11080